Changeset 1702


Ignore:
Timestamp:
Apr 5, 2011, 11:11:06 AM (9 years ago)
Author:
work@…
Message:

resolves #369

Location:
trunk/web-app/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/web-app/js/disableKeys.js

    r959 r1702  
    11// disable key presses
    22$(document).ready(function() {
    3     // disable enter key in input boxes to make sure
    4     // accidental submits do not happen
    5     $('input:text').each(function() {
    6         $(this).bind('keypress', function(e) {
    7             if (e.keyCode == 13) {
    8                 return false;
    9             }
    10         });
    11     });
     3        disableKeys();
    124});
     5
     6function disableKeys() {
     7        // disable enter key in input boxes to make sure
     8        // accidental submits do not happen
     9        $('input:text').each(function() {
     10                $(this).bind('keypress', function(e) {
     11                        if (e.keyCode == 13) {
     12console.log('ignoring enter key!');
     13                                return false;
     14                        }
     15                });
     16        });
     17}
  • trunk/web-app/js/studywizard.js

    r1680 r1702  
    2222        attachDatePickers();
    2323        attachDateTimePickers();
     24        disableKeys();
    2425
    2526        // handle and initialize table(s)
Note: See TracChangeset for help on using the changeset viewer.