diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-12-10 06:43:15 -0500 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-12-10 06:43:15 -0500 |
commit | 630d08fb49615cce9827d604854d58a78adf6e7d (patch) | |
tree | 52b140fe3af7eb68483083668f16065a728d912d /program/js | |
parent | d7cd5ddb8610cf2e7beffb3192863a0e24ef1117 (diff) |
Assign "mainaction" class to "default" buttons in dialogs
Diffstat (limited to 'program/js')
-rw-r--r-- | program/js/app.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js index 95a056e4d..e0a6d26e3 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -3427,6 +3427,7 @@ function rcube_webmail() this.get_label('restoremessage'), [{ text: this.get_label('restore'), + 'class': 'mainaction', click: function(){ ref.restore_compose_form(key, html_mode); ref.remove_compose_data(key); // remove old copy @@ -3436,6 +3437,7 @@ function rcube_webmail() }, { text: this.get_label('delete'), + 'class': 'delete', click: function(){ ref.remove_compose_data(key); $(this).dialog('close'); @@ -3688,7 +3690,7 @@ function rcube_webmail() $(this).dialog('close'); }; - this.show_popup_dialog(html, this.gettext('newresponse'), buttons); + this.show_popup_dialog(html, this.gettext('newresponse'), buttons, {button_classes: ['mainaction']}); $('#ffresponsetext').val(text); $('#ffresponsename').select(); @@ -5174,6 +5176,7 @@ function rcube_webmail() this.show_popup_dialog(content, this.get_label('newgroup'), [{ text: this.get_label('save'), + 'class': 'mainaction', click: function() { var name; @@ -5201,6 +5204,7 @@ function rcube_webmail() this.show_popup_dialog(content, this.get_label('grouprename'), [{ text: this.get_label('save'), + 'class': 'mainaction', click: function() { var name; @@ -5564,6 +5568,7 @@ function rcube_webmail() this.show_popup_dialog(content, this.get_label('searchsave'), [{ text: this.get_label('save'), + 'class': 'mainaction', click: function() { var name; @@ -6567,6 +6572,11 @@ function rcube_webmail() width: Math.min(w - 20, width + 36) }); + // assign special classes to dialog buttons + $.each(options.button_classes || [], function(i, v) { + if (v) $($('.ui-dialog-buttonpane button.ui-button', popup.parent()).get(i)).addClass(v); + }); + return popup; }; |