Assign "mainaction" class to "default" buttons in dialogs
| | |
| | | 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 |
| | |
| | | }, |
| | | { |
| | | text: this.get_label('delete'), |
| | | 'class': 'delete', |
| | | click: function(){ |
| | | ref.remove_compose_data(key); |
| | | $(this).dialog('close'); |
| | |
| | | $(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(); |
| | |
| | | this.show_popup_dialog(content, this.get_label('newgroup'), |
| | | [{ |
| | | text: this.get_label('save'), |
| | | 'class': 'mainaction', |
| | | click: function() { |
| | | var name; |
| | | |
| | |
| | | this.show_popup_dialog(content, this.get_label('grouprename'), |
| | | [{ |
| | | text: this.get_label('save'), |
| | | 'class': 'mainaction', |
| | | click: function() { |
| | | var name; |
| | | |
| | |
| | | this.show_popup_dialog(content, this.get_label('searchsave'), |
| | | [{ |
| | | text: this.get_label('save'), |
| | | 'class': 'mainaction', |
| | | click: function() { |
| | | var name; |
| | | |
| | |
| | | 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; |
| | | }; |
| | | |