Created
December 5, 2012 19:11
-
-
Save mquan/4218591 to your computer and use it in GitHub Desktop.
comma stuffs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/views/auction/view_beta.html.erb b/app/views/auction/view_beta.html.erb | |
index 5a7f8d4..e817565 100644 | |
--- a/app/views/auction/view_beta.html.erb | |
+++ b/app/views/auction/view_beta.html.erb | |
@@ -472,6 +472,7 @@ | |
:onclick => "this.value = ''" %> | |
<% else %> | |
<%= f.text_field :amount, | |
+ :data => {:remove_comma => true}, | |
:placeholder => "#{@minimum_bid_amount} or more" %> | |
<% end %> | |
</div> | |
$(document).ready -> | |
$(document).on 'submit', $("input[data-remove-comma='true']").closest('form'), (e)-> | |
field = $("input[data-remove-comma='true']", $(this)) | |
field.val(field.val().replace(/,/g, '')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment