diff options
author | Andrew Dolgov <[email protected]> | 2013-04-04 14:53:36 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-04 14:53:36 +0400 |
commit | 122e9d788ea00c2a174961895dd6a6af0aea3aeb (patch) | |
tree | 2971ea94d1d25470dc2ada9b222297142db70785 | |
parent | e6cdbaec9fcc6a5245edbc3af358e64839646ff6 (diff) |
add a dropdown button action to save and exit prefs (closes #660)
-rw-r--r-- | classes/pref/prefs.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index c91c0cf3c..b491a930e 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -429,8 +429,8 @@ class Pref_Prefs extends Handler_Protected { print "<form dojoType=\"dijit.form.Form\" id=\"changeSettingsForm\">"; - print "<script type=\"dojo/method\" event=\"onSubmit\" args=\"evt\"> - evt.preventDefault(); + print "<script type=\"dojo/method\" event=\"onSubmit\" args=\"evt, quit\"> + if (evt) evt.preventDefault(); if (this.validate()) { console.log(dojo.objectToQuery(this.getValues())); @@ -439,6 +439,7 @@ class Pref_Prefs extends Handler_Protected { onComplete: function(transport) { var msg = transport.responseText; notify_info(msg); + if (quit) gotoMain(); } }); } </script>"; @@ -644,8 +645,14 @@ class Pref_Prefs extends Handler_Protected { print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"op\" value=\"pref-prefs\">"; print "<input dojoType=\"dijit.form.TextBox\" style=\"display : none\" name=\"method\" value=\"saveconfig\">"; - print "<button dojoType=\"dijit.form.Button\" type=\"submit\">". - __('Save configuration')."</button> "; + print "<div dojoType=\"dijit.form.ComboButton\" type=\"submit\"> + <span>".__('Save configuration')."</span> + <div dojoType=\"dijit.DropDownMenu\"> + <div dojoType=\"dijit.MenuItem\" + onclick=\"dijit.byId('changeSettingsForm').onSubmit(null, true)\">". + __("Save and exit preferences")."</div> + </div> + </div>"; print "<button dojoType=\"dijit.form.Button\" onclick=\"return editProfiles()\">". __('Manage profiles')."</button> "; |