test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 in kaui-0.1.6 vs test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 in kaui-0.1.7

- old
+ new

@@ -1,8 +1,8 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1344915439.1911309: @value"Y{I" +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1345505742.202441: @value"{I" class:EFI"BundledAsset;FI"logical_path;FI"application.js;TI" pathname;FI"0$root/app/assets/javascripts/application.js;FI"content_type;FI"application/javascript;FI" -mtime;FI"2012-08-13T14:44:47-07:00;FI" length;FiI" digest;F"%233a836f0997f02cdd898809992b29b2I" source;FI"/*! +mtime;FI"2012-08-20T16:27:49-07:00;FI" length;FiI" digest;F"%206e7d6244138f86410c3d4f3d6a40bbI" source;FI"/*! * jQuery JavaScript Library v1.7.2 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. @@ -9780,10 +9780,32 @@ $(document).delegate(rails.formSubmitSelector, 'ajax:complete.rails', function(event) { if (this == event.target) rails.enableFormElements($(this)); }); })( jQuery ); +// Restrict numeric input for a text field +// TODO - consider switching to HTML5's <input type="number" /> +function preventNonNumericValues(event) { + // Allow: backspace, delete, tab, escape, and enter + if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 || + // Allow: Ctrl+A + (event.keyCode == 65 && event.ctrlKey === true) || + // Allow dot + (event.keyCode == 190) || + // Allow: home, end, left, right + (event.keyCode >= 35 && event.keyCode <= 39)) { + // let it happen, don't do anything + return; + } + else { + // Ensure that it is a number and stop the keypress + if (event.shiftKey || (event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 )) { + event.preventDefault(); + } + } +} +; // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. @@ -9795,7 +9817,8 @@ // GO AFTER THE REQUIRES BELOW. // + ; -;FI"required_assets_digest;F"%1a2dc79471515227aafd54563970d306I" _version;F"%9f3b95dd7ea3030dc35985c0a8020862 +;FI"required_assets_digest;F"%538cbeb9e848c2559f39def2c2fc0c2aI" _version;F"%9f3b95dd7ea3030dc35985c0a8020862 \ No newline at end of file