forked from extern/egroupware
Fix missing label / icon in delete folder confirmation
Some other et2_dialog->Et2Dialog changes
This commit is contained in:
parent
6c315301aa
commit
4b73a80699
157
mail/js/app.js
157
mail/js/app.js
@ -911,8 +911,9 @@ app.classes.mail = AppJS.extend(
|
||||
&& filemode && filemode.get_value() != content[field]['files']['filemode'])
|
||||
{
|
||||
var filemode_label = filemode.options.select_options[content[field]['files']['filemode']]['label'];
|
||||
et2_dialog.show_dialog(function(_button){
|
||||
if (_button == 2)
|
||||
Et2Dialog.show_dialog(function (_button)
|
||||
{
|
||||
if (_button == Et2Dialog.YES_BUTTON)
|
||||
{
|
||||
compose_et2[0].widgetContainer._inst.submit();
|
||||
}
|
||||
@ -920,7 +921,7 @@ app.classes.mail = AppJS.extend(
|
||||
this.egw.lang(
|
||||
'Be aware by adding all selected files as %1 mode, it will also change all existing attachments in the list to %2 mode as well. Would you like to proceed?',
|
||||
filemode_label, filemode_label),
|
||||
this.egw.lang('Add files as %1', filemode_label), '', et2_dialog.BUTTONS_YES_NO, et2_dialog.WARNING_MESSAGE);
|
||||
this.egw.lang('Add files as %1', filemode_label), '', Et2Dialog.BUTTONS_YES_NO, Et2Dialog.WARNING_MESSAGE);
|
||||
return;
|
||||
}
|
||||
else
|
||||
@ -1328,10 +1329,11 @@ app.classes.mail = AppJS.extend(
|
||||
typeof dataElem.data.flags.mdnsent == 'undefined' && typeof dataElem.data.flags.mdnnotsent == 'undefined')
|
||||
{
|
||||
var buttons = [
|
||||
{text: this.egw.lang("Yes"), id: "mdnsent", image: "check"},
|
||||
{text: this.egw.lang("No"), id:"mdnnotsent", image: "cancelled"}
|
||||
{label: this.egw.lang("Yes"), id: "mdnsent", image: "check"},
|
||||
{label: this.egw.lang("No"), id: "mdnnotsent", image: "cancelled"}
|
||||
];
|
||||
et2_dialog.show_dialog(function(_button_id, _value) {
|
||||
Et2Dialog.show_dialog(function (_button_id, _value)
|
||||
{
|
||||
switch (_button_id)
|
||||
{
|
||||
case "mdnsent":
|
||||
@ -1577,11 +1579,12 @@ app.classes.mail = AppJS.extend(
|
||||
{
|
||||
var self = this;
|
||||
var buttons = [
|
||||
{text: this.egw.lang("Empty Trash and Junk"), id: "cleanup", class: "ui-priority-primary", default: true, image:"delete"},
|
||||
{text: this.egw.lang("Cancel"), id:"cancel"}
|
||||
{label: this.egw.lang("Empty Trash and Junk"), id: "cleanup", class: "ui-priority-primary", default: true, image: "delete"},
|
||||
{label: this.egw.lang("Cancel"), id: "cancel"}
|
||||
];
|
||||
var server = [{iface:{id: _data.data.profileid+'::'}}];
|
||||
et2_dialog.show_dialog(function(_button_id) {
|
||||
Et2Dialog.show_dialog(function (_button_id)
|
||||
{
|
||||
if (_button_id == "cleanup")
|
||||
{
|
||||
self.mail_emptySpam(null, server);
|
||||
@ -1591,7 +1594,7 @@ app.classes.mail = AppJS.extend(
|
||||
},
|
||||
this.egw.lang("Your remaining quota %1 is too low, you may not be able to send/receive further emails.\n Although cleaning up emails in trash or junk folder might help you to get some free space back.\n If that didn't help, please ask your administrator for more quota.", _data.data.quotafreespace),
|
||||
this.egw.lang("Mail cleanup"),
|
||||
'', buttons, et2_dialog.WARNING_MESSAGE);
|
||||
'', buttons, Et2Dialog.WARNING_MESSAGE);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2484,8 +2487,8 @@ app.classes.mail = AppJS.extend(
|
||||
if (_confirm)
|
||||
{
|
||||
var buttons = [
|
||||
{text: this.egw.lang("Yes"), id: "all", "class": "ui-priority-primary", "default": true, image: 'check'},
|
||||
{text: this.egw.lang("Cancel"), id:"cancel"}
|
||||
{label: this.egw.lang("Yes"), id: "all", "class": "ui-priority-primary", "default": true, image: 'check'},
|
||||
{label: this.egw.lang("Cancel"), id: "cancel"}
|
||||
];
|
||||
var messageToDisplay = '';
|
||||
var actionlabel =_action.id;
|
||||
@ -2525,7 +2528,8 @@ app.classes.mail = AppJS.extend(
|
||||
}
|
||||
messageToDisplay = this.egw.lang("Do you really want to apply %1 to ALL messages in the current view?",this.egw.lang(type?type:_action.id))+" ";
|
||||
}
|
||||
return et2_dialog.show_dialog(function(_button_id) {
|
||||
return Et2Dialog.show_dialog(function (_button_id)
|
||||
{
|
||||
var rv = false;
|
||||
switch (_button_id)
|
||||
{
|
||||
@ -2535,7 +2539,10 @@ app.classes.mail = AppJS.extend(
|
||||
case "cancel":
|
||||
rv = 'cancel';
|
||||
}
|
||||
if (rv !="cancel") that.lock_tree();
|
||||
if (rv != "cancel")
|
||||
{
|
||||
that.lock_tree();
|
||||
}
|
||||
switch (_action.id)
|
||||
{
|
||||
case "delete":
|
||||
@ -3394,15 +3401,18 @@ app.classes.mail = AppJS.extend(
|
||||
if (!_entryId)
|
||||
{
|
||||
var buttons = [
|
||||
{text: app.mail.egw.lang('Append'), id: 'append', image: 'check', default:true},
|
||||
{text: app.mail.egw.lang('Add as new'), id: 'new', image: 'check'},
|
||||
{text: app.mail.egw.lang('Cancel'), id: 'cancel', image: 'check'}
|
||||
{label: app.mail.egw.lang('Append'), id: 'append', image: 'check', default: true},
|
||||
{label: app.mail.egw.lang('Add as new'), id: 'new', image: 'check'},
|
||||
{label: app.mail.egw.lang('Cancel'), id: 'cancel', image: 'check'}
|
||||
];
|
||||
et2_createWidget("dialog",
|
||||
{
|
||||
callback: function (_buttons, _value)
|
||||
{
|
||||
if (_buttons == 'cancel') return;
|
||||
if (_buttons == 'cancel')
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (_buttons == 'append' && _value)
|
||||
{
|
||||
_entryId = _value.id;
|
||||
@ -3410,13 +3420,14 @@ app.classes.mail = AppJS.extend(
|
||||
execCallback.call(this, {entryid: _entryId, url: _url});
|
||||
},
|
||||
title: egw.lang(_title),
|
||||
buttons: buttons||et2_dialog.BUTTONS_OK_CANCEL,
|
||||
buttons: buttons || Et2Dialog.BUTTONS_OK_CANCEL,
|
||||
value: {
|
||||
content: {
|
||||
appName: _appName // appName to search on its list later
|
||||
}},
|
||||
}
|
||||
},
|
||||
template: egw.webserverUrl + '/mail/templates/default/integration_to_entry_dialog.xet'
|
||||
},et2_dialog._create_parent('mail'));
|
||||
}, Et2Dialog._create_parent('mail'));
|
||||
}
|
||||
else // there is an entry saved related to this mail's subject
|
||||
{
|
||||
@ -3699,12 +3710,16 @@ app.classes.mail = AppJS.extend(
|
||||
var ftree = this.et2.getWidgetById(this.nm_index+'[foldertree]');
|
||||
var OldFolderName = ftree.getLabel(_senders[0].id).replace(this._unseen_regexp,'');
|
||||
var buttons = [
|
||||
{text: this.egw.lang("Add"), id: "add", "class": "ui-priority-primary", "default": true},
|
||||
{text: this.egw.lang("Cancel"), id:"cancel"}
|
||||
{label: this.egw.lang("Add"), id: "add", "class": "ui-priority-primary", "default": true},
|
||||
{label: this.egw.lang("Cancel"), id: "cancel"}
|
||||
];
|
||||
et2_dialog.show_prompt(function(_button_id, _value) {
|
||||
Et2Dialog.show_prompt(function (_button_id, _value)
|
||||
{
|
||||
var NewFolderName = null;
|
||||
if (_value.length>0) NewFolderName = _value;
|
||||
if (_value.length > 0)
|
||||
{
|
||||
NewFolderName = _value;
|
||||
}
|
||||
//alert(NewFolderName);
|
||||
if (NewFolderName && NewFolderName.length > 0)
|
||||
{
|
||||
@ -3735,12 +3750,16 @@ app.classes.mail = AppJS.extend(
|
||||
var ftree = this.et2.getWidgetById(this.nm_index+'[foldertree]');
|
||||
var OldFolderName = ftree.getLabel(_senders[0].id).replace(this._unseen_regexp,'');
|
||||
var buttons = [
|
||||
{text: this.egw.lang("Rename"), id: "rename", "class": "ui-priority-primary", image: 'edit', "default": true},
|
||||
{text: this.egw.lang("Cancel"), id:"cancel"}
|
||||
{label: this.egw.lang("Rename"), id: "rename", "class": "ui-priority-primary", image: 'edit', "default": true},
|
||||
{label: this.egw.lang("Cancel"), id: "cancel"}
|
||||
];
|
||||
et2_dialog.show_prompt(function(_button_id, _value) {
|
||||
Et2Dialog.show_prompt(function (_button_id, _value)
|
||||
{
|
||||
var NewFolderName = null;
|
||||
if (_value.length>0) NewFolderName = _value;
|
||||
if (_value.length > 0)
|
||||
{
|
||||
NewFolderName = _value;
|
||||
}
|
||||
//alert(NewFolderName);
|
||||
if (NewFolderName && NewFolderName.length > 0)
|
||||
{
|
||||
@ -3785,7 +3804,7 @@ app.classes.mail = AppJS.extend(
|
||||
|
||||
var callback = function (_button)
|
||||
{
|
||||
if (_button == et2_dialog.YES_BUTTON)
|
||||
if (_button == Et2Dialog.YES_BUTTON)
|
||||
{
|
||||
egw.appName = 'mail';
|
||||
egw.message(egw.lang('Folder %1 is moving to folder %2', src_label, dest_label));
|
||||
@ -3794,7 +3813,8 @@ app.classes.mail = AppJS.extend(
|
||||
{
|
||||
egw.jsonq('mail.mail_ui.ajax_MoveFolder', [_senders[i].id, destination.id],
|
||||
// Move is done (successfully or not), remove loading
|
||||
function() {
|
||||
function ()
|
||||
{
|
||||
var id = destination.id.split('::');
|
||||
//refersh the top parent
|
||||
ftree.refreshItem(id[0], null);
|
||||
@ -3804,8 +3824,8 @@ app.classes.mail = AppJS.extend(
|
||||
}
|
||||
}
|
||||
};
|
||||
et2_dialog.show_dialog(callback, this.egw.lang('Are you sure you want to move folder %1 to folder %2?',
|
||||
src_label, dest_label), this.egw.lang('Move folder'), {},et2_dialog.BUTTONS_YES_NO, et2_dialog.WARNING_MESSAGE);
|
||||
Et2Dialog.show_dialog(callback, this.egw.lang('Are you sure you want to move folder %1 to folder %2?',
|
||||
src_label, dest_label), this.egw.lang('Move folder'), {}, Et2Dialog.BUTTONS_YES_NO, Et2Dialog.WARNING_MESSAGE);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -3814,16 +3834,18 @@ app.classes.mail = AppJS.extend(
|
||||
* @param _action
|
||||
* @param _senders - the representation of the tree leaf to be manipulated
|
||||
*/
|
||||
mail_DeleteFolder: function(_action,_senders) {
|
||||
mail_DeleteFolder: function(_action,_senders)
|
||||
{
|
||||
//action.id == 'delete'
|
||||
//_senders.iface.id == target leaf / leaf to edit
|
||||
var ftree = this.et2.getWidgetById(this.nm_index + '[foldertree]');
|
||||
var OldFolderName = ftree.getLabel(_senders[0].id).replace(this._unseen_regexp, '');
|
||||
var buttons = [
|
||||
{text: this.egw.lang("Yes"), id: "delete", "class": "ui-priority-primary", "default": true},
|
||||
{text: this.egw.lang("Cancel"), id:"cancel"}
|
||||
{label: this.egw.lang("Yes"), id: "delete", "class": "ui-priority-primary", "default": true, image: "check"},
|
||||
{label: this.egw.lang("Cancel"), id: "cancel", image: "cancel"}
|
||||
];
|
||||
et2_dialog.show_dialog(function(_button_id, _value) {
|
||||
Et2Dialog.show_dialog(function (_button_id, _value)
|
||||
{
|
||||
switch (_button_id)
|
||||
{
|
||||
case "delete":
|
||||
@ -4185,13 +4207,13 @@ app.classes.mail = AppJS.extend(
|
||||
|
||||
var callbackDeleteDialog = function (button_id)
|
||||
{
|
||||
if (button_id == et2_dialog.YES_BUTTON )
|
||||
if (button_id == Et2Dialog.YES_BUTTON)
|
||||
{
|
||||
actionData = _type.parent.data.widget.getArrayMgr('content');
|
||||
that._do_action(typeId, actionData['data'], ruleID);
|
||||
}
|
||||
};
|
||||
et2_dialog.show_dialog(callbackDeleteDialog, this.egw.lang("Do you really want to DELETE this Rule"),this.egw.lang("Delete"), {},et2_dialog.BUTTONS_YES_CANCEL, et2_dialog.WARNING_MESSAGE);
|
||||
Et2Dialog.show_dialog(callbackDeleteDialog, this.egw.lang("Do you really want to DELETE this Rule"), this.egw.lang("Delete"), {}, Et2Dialog.BUTTONS_YES_CANCEL, Et2Dialog.WARNING_MESSAGE);
|
||||
|
||||
break;
|
||||
case 'add' :
|
||||
@ -5102,9 +5124,9 @@ app.classes.mail = AppJS.extend(
|
||||
{
|
||||
const mode = _widget.get_value();
|
||||
const mode_label = _widget.select_options.filter(option => option.value == mode)[0]?.label;
|
||||
et2_dialog.alert(this.egw.lang('Be aware that all attachments will be sent as %1!', mode_label),
|
||||
Et2Dialog.alert(this.egw.lang('Be aware that all attachments will be sent as %1!', mode_label),
|
||||
this.egw.lang('Filemode has been switched to %1', mode_label),
|
||||
et2_dialog.WARNING_MESSAGE);
|
||||
Et2Dialog.WARNING_MESSAGE);
|
||||
const content = this.et2.getArrayMgr('content');
|
||||
const attachments = this.et2.getWidgetById('attachments');
|
||||
for (let i in content.data.attachments)
|
||||
@ -5349,9 +5371,9 @@ app.classes.mail = AppJS.extend(
|
||||
else
|
||||
{
|
||||
// switch Mailvelop off again, but warn user he will loose his content
|
||||
et2_dialog.show_dialog(function (_button_id)
|
||||
Et2Dialog.show_dialog(function (_button_id)
|
||||
{
|
||||
if (_button_id == et2_dialog.YES_BUTTON )
|
||||
if (_button_id == Et2Dialog.YES_BUTTON)
|
||||
{
|
||||
self.et2.getWidgetById('mimeType').set_readonly(false);
|
||||
self.et2.getWidgetById('mail_plaintext').set_disabled(false);
|
||||
@ -5364,7 +5386,7 @@ app.classes.mail = AppJS.extend(
|
||||
},
|
||||
this.egw.lang('You will loose current message body, unless you save it to your clipboard!'),
|
||||
this.egw.lang('Switch off encryption?'),
|
||||
{}, et2_dialog.BUTTONS_YES_NO, et2_dialog.WARNING_MESSAGE, undefined, this.egw);
|
||||
{}, Et2Dialog.BUTTONS_YES_NO, Et2Dialog.WARNING_MESSAGE, undefined, this.egw);
|
||||
}
|
||||
},
|
||||
|
||||
@ -5544,7 +5566,7 @@ app.classes.mail = AppJS.extend(
|
||||
this.saveAsDraft(null, 'autosaving').then(function(){
|
||||
self.compose_saveDraft2fm(_action);
|
||||
}, function(){
|
||||
et2_dialog.alert('You need to save the message as draft first before to be able to save it into VFS','Save to filemanager','info');
|
||||
Et2Dialog.alert('You need to save the message as draft first before to be able to save it into VFS', 'Save to filemanager', 'info');
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -5687,7 +5709,7 @@ app.classes.mail = AppJS.extend(
|
||||
var callbackDialog = function(_btn)
|
||||
{
|
||||
egw.appName='mail';
|
||||
if (_btn === et2_dialog.YES_BUTTON)
|
||||
if (_btn === Et2Dialog.YES_BUTTON)
|
||||
{
|
||||
if (tree)
|
||||
{
|
||||
@ -5696,7 +5718,8 @@ app.classes.mail = AppJS.extend(
|
||||
{
|
||||
var selFldArr = selFolders.split(tree.input.dlmtr);
|
||||
var msg = egw.lang('Deleting %1 folders in progress ...', selFldArr.length);
|
||||
et2_dialog.long_task(function(_val, _resp){
|
||||
Et2Dialog.long_task(function (_val, _resp)
|
||||
{
|
||||
console.log(_val, _resp);
|
||||
if (_val && _resp.type !== 'error')
|
||||
{
|
||||
@ -5721,8 +5744,8 @@ app.classes.mail = AppJS.extend(
|
||||
}
|
||||
}
|
||||
};
|
||||
et2_dialog.show_dialog(callbackDialog, this.egw.lang('Are you sure you want to delete all selected folders?'), this.egw.lang('Delete folder'), {},
|
||||
et2_dialog.BUTTON_YES_NO, et2_dialog.WARNING_MESSAGE, undefined, egw);
|
||||
Et2Dialog.show_dialog(callbackDialog, this.egw.lang('Are you sure you want to delete all selected folders?'), this.egw.lang('Delete folder'), {},
|
||||
Et2Dialog.BUTTON_YES_NO, Et2Dialog.WARNING_MESSAGE, undefined, egw);
|
||||
},
|
||||
|
||||
/**
|
||||
@ -5968,8 +5991,8 @@ app.classes.mail = AppJS.extend(
|
||||
},
|
||||
title: egw.lang('Request for passphrase'),
|
||||
buttons: [
|
||||
{text: this.egw.lang("Send"), id: "send", "class": "ui-priority-primary", "default": true},
|
||||
{text: this.egw.lang("Cancel"), id:"cancel"}
|
||||
{label: this.egw.lang("Send"), id: "send", "class": "ui-priority-primary", "default": true},
|
||||
{label: this.egw.lang("Cancel"), id: "cancel"}
|
||||
],
|
||||
value:{
|
||||
content:{
|
||||
@ -6139,12 +6162,12 @@ app.classes.mail = AppJS.extend(
|
||||
var content = jQuery.extend(true, {message:_metadata.msg}, _metadata);
|
||||
var buttons = [
|
||||
|
||||
{text: this.egw.lang("Close"), id:"close"}
|
||||
{label: this.egw.lang("Close"), id: "close"}
|
||||
];
|
||||
if (!_display)
|
||||
{
|
||||
buttons[1] = {
|
||||
text: this.egw.lang("Add this certificate into contact"),
|
||||
label: this.egw.lang("Add this certificate into contact"),
|
||||
id: "contact",
|
||||
image: "add",
|
||||
"class": "ui-priority-primary",
|
||||
@ -6229,11 +6252,6 @@ app.classes.mail = AppJS.extend(
|
||||
var data = (_sender && _sender.uid) ? {data:_sender} : egw.dataGetUIDdata(id);
|
||||
var subject = data && data.data? data.data.subject : "";
|
||||
|
||||
var buttons = [
|
||||
{text: this.egw.lang("Save"), id: "save", "class": "ui-priority-primary", "default": true},
|
||||
{text: this.egw.lang("Cancel"), id:"cancel"}
|
||||
];
|
||||
|
||||
et2_createWidget("dialog",
|
||||
{
|
||||
callback: function(_button_id, _value) {
|
||||
@ -6244,9 +6262,10 @@ app.classes.mail = AppJS.extend(
|
||||
{
|
||||
switch (_button_id)
|
||||
{
|
||||
case "save":
|
||||
case Et2Dialog.OK_BUTTON:
|
||||
egw.loading_prompt('modifyMessageSubjectDialog', true);
|
||||
egw.json('mail.mail_ui.ajax_saveModifiedMessageSubject',[id, newSubject], function(_data){
|
||||
egw.json('mail.mail_ui.ajax_saveModifiedMessageSubject', [id, newSubject], function (_data)
|
||||
{
|
||||
egw.loading_prompt('modifyMessageSubjectDialog', false);
|
||||
if (_data && !_data.success)
|
||||
{
|
||||
@ -6254,7 +6273,10 @@ app.classes.mail = AppJS.extend(
|
||||
return;
|
||||
}
|
||||
var nm = app.mail.et2.getWidgetById('nm');
|
||||
if (nm) {nm.applyFilters();}
|
||||
if (nm)
|
||||
{
|
||||
nm.applyFilters();
|
||||
}
|
||||
|
||||
}).sendRequest(true);
|
||||
return;
|
||||
@ -6263,7 +6285,7 @@ app.classes.mail = AppJS.extend(
|
||||
}
|
||||
},
|
||||
title: this.egw.lang("Modify subject"),
|
||||
buttons: buttons,
|
||||
buttons: Et2Dialog.BUTTONS_OK_CANCEL,
|
||||
value: {content: {value: subject}},
|
||||
template: egw.webserverUrl + '/mail/templates/default/modifyMessageSubjectDialog.xet?1',
|
||||
resizable: false,
|
||||
@ -6314,26 +6336,23 @@ app.classes.mail = AppJS.extend(
|
||||
*/
|
||||
set_predefined_addresses: function(action,_senders)
|
||||
{
|
||||
var buttons = [
|
||||
{text: this.egw.lang("Save"), id: "save", "class": "ui-priority-primary", "default": true},
|
||||
{text: this.egw.lang("Cancel"), id:"cancel"}
|
||||
];
|
||||
var pref_id = _senders[0].id.split('::')[0]+'_predefined_compose_addresses';
|
||||
var prefs = egw.preference(pref_id, 'mail');
|
||||
|
||||
et2_createWidget("dialog",
|
||||
{
|
||||
callback: function(_button_id, _value) {
|
||||
callback: function (_button_id, _value)
|
||||
{
|
||||
switch (_button_id)
|
||||
{
|
||||
case "save":
|
||||
case Et2Dialog.OK_BUTTON:
|
||||
egw.set_preference('mail', pref_id, _value);
|
||||
return;
|
||||
case "cancel":
|
||||
}
|
||||
},
|
||||
title: this.egw.lang("Predefined addresses for compose"),
|
||||
buttons: buttons,
|
||||
buttons: Et2Dialog.BUTTONS_OK_CANCEL,
|
||||
value: {content: prefs || {}},
|
||||
minWidth: 410,
|
||||
template: egw.webserverUrl + '/mail/templates/default/predefinedAddressesDialog.xet?',
|
||||
|
Loading…
Reference in New Issue
Block a user