From e8758c9cd6b05563116063306ed21328406f3a2b Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 28 Nov 2017 15:59:06 -0700 Subject: [PATCH] Some style fixes: - Missing icons in several dialogs - Change nextmatch dialog action to use et2_dialog --- .../et2_extension_nextmatch_actions.js | 45 ++++++++++--------- api/js/etemplate/et2_widget_selectAccount.js | 29 ++++++------ api/templates/default/etemplate2.css | 2 +- infolog/templates/default/index.xet | 20 ++++----- mail/js/app.js | 4 +- pixelegg/css/pixelegg.css | 3 +- pixelegg/less/etemplate2.less | 5 +-- preferences/templates/default/password.xet | 2 +- 8 files changed, 55 insertions(+), 55 deletions(-) diff --git a/api/js/etemplate/et2_extension_nextmatch_actions.js b/api/js/etemplate/et2_extension_nextmatch_actions.js index 0100340adc..fe38b39b46 100644 --- a/api/js/etemplate/et2_extension_nextmatch_actions.js +++ b/api/js/etemplate/et2_extension_nextmatch_actions.js @@ -420,44 +420,45 @@ function nm_open_popup(_action, _selected) var d_buttons = []; var action = _action; popup.show(); - var buttons = jQuery('button:visible',popup).each(function(index) { + jQuery('button:visible',popup).each(function(index) { var but = jQuery(this); - but.hide(); if(but.attr("id")) { // Find the associated widget var widget_id = but.attr("id").replace(_action.data.nextmatch.getInstanceManager().uniqueId+'_', ''); var button = nm_popup_action.data.nextmatch.getRoot().getWidgetById(widget_id); } - d_buttons.push({ + var button_data = { text: but.text(), + id: widget_id, click: button && button.onclick ? function(e) { - dialog.dialog("close"); + jQuery(this).dialog("close"); nm_popup_action = action; button.onclick.apply(button, e.currentTarget); } : function(e) { - dialog.dialog("close"); + jQuery(this).dialog("close"); nm_popup_action = null; } - }); - }); - // Need to get the dialog width before make it hidden - var dialog_width = dialog.outerWidth(true); - popup.hide(); - dialog.dialog({ - title: jQuery('.promptheader',popup).text(), - modal: true, - buttons: d_buttons, - minWidth: dialog_width, - close: function(event, ui) { - // Need to destroy the dialog, etemplate widget needs divs back where they were - dialog.dialog("destroy"); - - // Put it back where it came from, or et2 will error when clear() is called - dialog.appendTo(dialog_parent); - buttons.show(); + }; + if(button && button.options && button.options.image) + { + button_data.image = button.options.image; } + d_buttons.push(button_data); }); + + popup.hide(); + var _dialog = et2_dialog.show_dialog(function() { + dialog_parent.append(dialog); + }, + '', + jQuery('.promptheader',popup).text(), + {}, + d_buttons + ); + _dialog.set_dialog_type(''); + _dialog.div.append(dialog) + .css('overflow', 'initial'); } // Reset global variables diff --git a/api/js/etemplate/et2_widget_selectAccount.js b/api/js/etemplate/et2_widget_selectAccount.js index e9b64de849..a41f34186d 100644 --- a/api/js/etemplate/et2_widget_selectAccount.js +++ b/api/js/etemplate/et2_widget_selectAccount.js @@ -435,23 +435,24 @@ var et2_selectAccount = (function(){ "use strict"; return et2_selectbox.extend( */ _create_dialog: function(widgets, update_function) { this.dialog = widgets; - widgets.dialog({ - title: this.options.label ? this.options.label : this.egw().lang('Select'), - modal: true, - // Static size for easier layout - width: "500", - height: "350", - buttons: [{ + var dialog = et2_dialog.show_dialog(false, + '', + this.options.label ? this.options.label : this.egw().lang('Select'), + {}, + [{ text: this.egw().lang("ok"), + image: 'check', click: update_function - },{ + },{ text: this.egw().lang("cancel"), - click: function() { - jQuery(this).dialog("close"); - jQuery(this).dialog("destroy"); - }} - ] - }); + image: 'cancel' + }] + ); + dialog.set_dialog_type(''); + // Static size for easier layout + dialog.div.dialog({width: "500", height: "370"}); + + dialog.div.append(widgets.width('100%')); return widgets; }, diff --git a/api/templates/default/etemplate2.css b/api/templates/default/etemplate2.css index c67d52cf9a..b8403d8c3b 100644 --- a/api/templates/default/etemplate2.css +++ b/api/templates/default/etemplate2.css @@ -699,7 +699,7 @@ div.et2_link_entry:after { margin: -12px; } div.et2_link_entry select, div.et2_link_entry { - width: 40%; + /*width: 40%;*/ margin-right: 10px; } /* Icons in app selection */ diff --git a/infolog/templates/default/index.xet b/infolog/templates/default/index.xet index 4f46cf2a1d..86787dbd55 100644 --- a/infolog/templates/default/index.xet +++ b/infolog/templates/default/index.xet @@ -165,10 +165,10 @@ -