mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
Some style fixes:
- Missing icons in several dialogs - Change nextmatch dialog action to use et2_dialog
This commit is contained in:
parent
4724ed2a05
commit
2d93c48b75
@ -420,44 +420,45 @@ function nm_open_popup(_action, _selected)
|
|||||||
var d_buttons = [];
|
var d_buttons = [];
|
||||||
var action = _action;
|
var action = _action;
|
||||||
popup.show();
|
popup.show();
|
||||||
var buttons = jQuery('button:visible',popup).each(function(index) {
|
jQuery('button:visible',popup).each(function(index) {
|
||||||
var but = jQuery(this);
|
var but = jQuery(this);
|
||||||
but.hide();
|
|
||||||
if(but.attr("id"))
|
if(but.attr("id"))
|
||||||
{
|
{
|
||||||
// Find the associated widget
|
// Find the associated widget
|
||||||
var widget_id = but.attr("id").replace(_action.data.nextmatch.getInstanceManager().uniqueId+'_', '');
|
var widget_id = but.attr("id").replace(_action.data.nextmatch.getInstanceManager().uniqueId+'_', '');
|
||||||
var button = nm_popup_action.data.nextmatch.getRoot().getWidgetById(widget_id);
|
var button = nm_popup_action.data.nextmatch.getRoot().getWidgetById(widget_id);
|
||||||
}
|
}
|
||||||
d_buttons.push({
|
var button_data = {
|
||||||
text: but.text(),
|
text: but.text(),
|
||||||
|
id: widget_id,
|
||||||
click: button && button.onclick ? function(e) {
|
click: button && button.onclick ? function(e) {
|
||||||
dialog.dialog("close");
|
jQuery(this).dialog("close");
|
||||||
nm_popup_action = action;
|
nm_popup_action = action;
|
||||||
button.onclick.apply(button, e.currentTarget);
|
button.onclick.apply(button, e.currentTarget);
|
||||||
} : function(e) {
|
} : function(e) {
|
||||||
dialog.dialog("close");
|
jQuery(this).dialog("close");
|
||||||
nm_popup_action = null;
|
nm_popup_action = null;
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
});
|
if(button && button.options && button.options.image)
|
||||||
// Need to get the dialog width before make it hidden
|
{
|
||||||
var dialog_width = dialog.outerWidth(true);
|
button_data.image = button.options.image;
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
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
|
// Reset global variables
|
||||||
|
@ -435,23 +435,24 @@ var et2_selectAccount = (function(){ "use strict"; return et2_selectbox.extend(
|
|||||||
*/
|
*/
|
||||||
_create_dialog: function(widgets, update_function) {
|
_create_dialog: function(widgets, update_function) {
|
||||||
this.dialog = widgets;
|
this.dialog = widgets;
|
||||||
widgets.dialog({
|
var dialog = et2_dialog.show_dialog(false,
|
||||||
title: this.options.label ? this.options.label : this.egw().lang('Select'),
|
'',
|
||||||
modal: true,
|
this.options.label ? this.options.label : this.egw().lang('Select'),
|
||||||
// Static size for easier layout
|
{},
|
||||||
width: "500",
|
[{
|
||||||
height: "350",
|
|
||||||
buttons: [{
|
|
||||||
text: this.egw().lang("ok"),
|
text: this.egw().lang("ok"),
|
||||||
|
image: 'check',
|
||||||
click: update_function
|
click: update_function
|
||||||
},{
|
},{
|
||||||
text: this.egw().lang("cancel"),
|
text: this.egw().lang("cancel"),
|
||||||
click: function() {
|
image: 'cancel'
|
||||||
jQuery(this).dialog("close");
|
}]
|
||||||
jQuery(this).dialog("destroy");
|
);
|
||||||
}}
|
dialog.set_dialog_type('');
|
||||||
]
|
// Static size for easier layout
|
||||||
});
|
dialog.div.dialog({width: "500", height: "370"});
|
||||||
|
|
||||||
|
dialog.div.append(widgets.width('100%'));
|
||||||
return widgets;
|
return widgets;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -699,7 +699,7 @@ div.et2_link_entry:after {
|
|||||||
margin: -12px;
|
margin: -12px;
|
||||||
}
|
}
|
||||||
div.et2_link_entry select, div.et2_link_entry {
|
div.et2_link_entry select, div.et2_link_entry {
|
||||||
width: 40%;
|
/*width: 40%;*/
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
/* Icons in app selection */
|
/* Icons in app selection */
|
||||||
|
@ -165,10 +165,10 @@
|
|||||||
<taglist-account id="responsible" rows="5" account_type="both" class=" et2_fullWidth" empty_label="Delegation"/>
|
<taglist-account id="responsible" rows="5" account_type="both" class=" et2_fullWidth" empty_label="Delegation"/>
|
||||||
</vbox>
|
</vbox>
|
||||||
<hbox>
|
<hbox>
|
||||||
<button label="Ok" id="responsible_action[ok]" onclick="nm_submit_popup(this); return false;"/>
|
<button label="Ok" id="responsible_action[ok]" onclick="nm_submit_popup(this); return false;" image="check" background_image="true"/>
|
||||||
<button label="Add" id="responsible_action[add]" onclick="nm_submit_popup(this); return false;"/>
|
<button label="Add" id="responsible_action[add]" onclick="nm_submit_popup(this); return false;"/>
|
||||||
<button label="Delete" id="responsible_action[delete]" onclick="nm_submit_popup(this); return false;"/>
|
<button label="Delete" id="responsible_action[delete]" onclick="nm_submit_popup(this); return false;"/>
|
||||||
<buttononly label="Cancel" onclick="nm_hide_popup(this,'responsible_popup');"/>
|
<button label="Cancel" id="responsible_cancel" onclick="nm_hide_popup(this,'responsible_popup');" image="cancelled" background_image="true"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</box>
|
</box>
|
||||||
@ -177,9 +177,9 @@
|
|||||||
<description value="Delete" class="promptheader"/>
|
<description value="Delete" class="promptheader"/>
|
||||||
<description value="Delete selected entries?" id="delete_prompt"/>
|
<description value="Delete selected entries?" id="delete_prompt"/>
|
||||||
<hbox>
|
<hbox>
|
||||||
<button label="Yes - Delete" id="delete" onclick="nm_submit_popup(this); return false;"/>
|
<button label="Yes - Delete" id="delete" onclick="nm_submit_popup(this); return false;" image="check" background_image="true"/>
|
||||||
<button label="Yes - Delete including sub-entries" id="delete_sub" onclick="nm_popup_action.id = 'delete_sub'; nm_submit_popup(this); return false;"/>
|
<button label="Yes - Delete including sub-entries" id="delete_sub" onclick="nm_popup_action.id = 'delete_sub'; nm_submit_popup(this); return false;" image="check" background_image="true"/>
|
||||||
<buttononly label="No - Cancel" onclick="nm_hide_popup(this,'delete_popup');"/>
|
<button label="No - Cancel" id="delete_cancel" onclick="nm_hide_popup(this,'delete_popup');" image="cancelled" background_image="true"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</box>
|
</box>
|
||||||
@ -190,7 +190,7 @@
|
|||||||
<hbox>
|
<hbox>
|
||||||
<button label="Add" id="link_action[add]" onclick="nm_submit_popup(this); return false;"/>
|
<button label="Add" id="link_action[add]" onclick="nm_submit_popup(this); return false;"/>
|
||||||
<button label="Delete" id="link_action[delete]" onclick="nm_submit_popup(this); return false;"/>
|
<button label="Delete" id="link_action[delete]" onclick="nm_submit_popup(this); return false;"/>
|
||||||
<buttononly label="Cancel" onclick="nm_hide_popup(this,'link_popup');"/>
|
<button label="Cancel" id="link_cancel" onclick="nm_hide_popup(this,'link_popup');" image="cancelled" background_image="true"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</box>
|
</box>
|
||||||
@ -200,8 +200,8 @@
|
|||||||
<description id="startdate_action[title]"/>
|
<description id="startdate_action[title]"/>
|
||||||
<date-time id="startdate" class="action_popup-content"/>
|
<date-time id="startdate" class="action_popup-content"/>
|
||||||
<hbox>
|
<hbox>
|
||||||
<button label="Ok" id="startdate_action[ok]" onclick="nm_submit_popup(this); return false;"/>
|
<button label="Ok" id="startdate_action[ok]" onclick="nm_submit_popup(this); return false;" image="check" background_image="true"/>
|
||||||
<buttononly label="Cancel" onclick="nm_hide_popup(this,'link_popup');"/>
|
<button label="Cancel" id="startdate_cancel" onclick="nm_hide_popup(this,'link_popup');" image="cancelled" background_image="true"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</box>
|
</box>
|
||||||
@ -211,8 +211,8 @@
|
|||||||
<description id="enddate_action[title]"/>
|
<description id="enddate_action[title]"/>
|
||||||
<date-time id="enddate" class="action_popup-content"/>
|
<date-time id="enddate" class="action_popup-content"/>
|
||||||
<hbox>
|
<hbox>
|
||||||
<button label="Ok" id="enddate_action[ok]" onclick="nm_submit_popup(this); return false;"/>
|
<button label="Ok" id="enddate_action[ok]" onclick="nm_submit_popup(this); return false;" image="check" background_image="true"/>
|
||||||
<buttononly label="Cancel" onclick="nm_hide_popup(this,'link_popup');"/>
|
<button label="Cancel" id="enddate_cancel" onclick="nm_hide_popup(this,'link_popup');" image="cancelled" background_image="true"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</box>
|
</box>
|
||||||
|
@ -1074,8 +1074,8 @@ app.classes.mail = AppJS.extend(
|
|||||||
typeof dataElem.data.flags.mdnsent == 'undefined' && typeof dataElem.data.flags.mdnnotsent == 'undefined')
|
typeof dataElem.data.flags.mdnsent == 'undefined' && typeof dataElem.data.flags.mdnnotsent == 'undefined')
|
||||||
{
|
{
|
||||||
var buttons = [
|
var buttons = [
|
||||||
{text: this.egw.lang("Yes"), id: "mdnsent"},
|
{text: this.egw.lang("Yes"), id: "mdnsent", image: "check"},
|
||||||
{text: this.egw.lang("No"), id:"mdnnotsent"}
|
{text: this.egw.lang("No"), id:"mdnnotsent", image: "cancelled"}
|
||||||
];
|
];
|
||||||
et2_dialog.show_dialog(function(_button_id, _value) {
|
et2_dialog.show_dialog(function(_button_id, _value) {
|
||||||
switch (_button_id)
|
switch (_button_id)
|
||||||
|
@ -193,8 +193,7 @@
|
|||||||
.et2_selectbox .ui-multiselect-checkboxes div.ui-icon-close {
|
.et2_selectbox .ui-multiselect-checkboxes div.ui-icon-close {
|
||||||
/*visibility: hidden;*/
|
/*visibility: hidden;*/
|
||||||
background-image: url(../images/close.png);
|
background-image: url(../images/close.png);
|
||||||
background: #FFFFFF;
|
margin: -2px -3px;
|
||||||
margin: 2px;
|
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -155,9 +155,8 @@ input[type=button] {}
|
|||||||
|
|
||||||
.et2_selectbox .ui-multiselect-checkboxes div.ui-icon-close{
|
.et2_selectbox .ui-multiselect-checkboxes div.ui-icon-close{
|
||||||
/*visibility: hidden;*/
|
/*visibility: hidden;*/
|
||||||
background-image: url(../images/close.png);
|
background-image: url(../images/close.png);
|
||||||
background: @gray_0;
|
margin: -2px -3px;
|
||||||
margin: 2px;
|
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
<hbox class="dialogFooterToolbar">
|
<hbox class="dialogFooterToolbar">
|
||||||
<button label="Change" id="button[change]"/>
|
<button label="Change" id="button[change]" image="check" background_image="true"/>
|
||||||
<button label="Cancel" id="button[cancel]" onclick="window.close();"/>
|
<button label="Cancel" id="button[cancel]" onclick="window.close();"/>
|
||||||
</hbox>
|
</hbox>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user