diff --git a/vasl_templates/webapp/static/user_settings.js b/vasl_templates/webapp/static/user_settings.js index fcbdcf7..e36a4e6 100644 --- a/vasl_templates/webapp/static/user_settings.js +++ b/vasl_templates/webapp/static/user_settings.js @@ -46,9 +46,10 @@ function user_settings() height: 250, resizable: false, create: function() { - init_dialog( $(this), "OK", false ) ; + init_dialog( $(this), "OK", true ) ; }, open: function() { + on_dialog_open( $(this) ) ; // load the current user settings load_settings( $(this) ) ; }, diff --git a/vasl_templates/webapp/static/utils.js b/vasl_templates/webapp/static/utils.js index 183db02..b4a3049 100644 --- a/vasl_templates/webapp/static/utils.js +++ b/vasl_templates/webapp/static/utils.js @@ -148,10 +148,16 @@ function init_dialog( $dlg, ok_button_text, auto_dismiss ) // allow Ctrl-Enter to dismiss the dialog if ( auto_dismiss ) { - $dlg.find("input[type='text']").keydown( function(evt) { + $dlg.find( "input[type='text']" ).keydown( function(evt) { auto_dismiss_dialog( $dlg, evt, ok_button_text ) ; } ) ; - $dlg.find("textarea").keydown( function(evt) { + $dlg.find( "input[type='checkbox']" ).keydown( function(evt) { + auto_dismiss_dialog( $dlg, evt, ok_button_text ) ; + } ) ; + $dlg.find( "select" ).keydown( function(evt) { + auto_dismiss_dialog( $dlg, evt, ok_button_text ) ; + } ) ; + $dlg.find( "textarea" ).keydown( function(evt) { auto_dismiss_dialog( $dlg, evt, ok_button_text ) ; } ) ; }