preparation for tree-menu action control on noSelect folders

This commit is contained in:
Klaus Leithoff 2014-02-11 15:20:44 +00:00
parent a639b42222
commit 7809cdcdcc
4 changed files with 32 additions and 16 deletions

View File

@ -412,25 +412,30 @@ class mail_ui
),
'edit' => array(
'caption' => 'Rename Folder',
'onExecute' => 'javaScript:app.mail.mail_RenameFolder'
'onExecute' => 'javaScript:app.mail.mail_RenameFolder',
'enabled' => 'javaScript:app.mail.mail_CheckFolderNoSelect',
),
'move' => array(
'caption' => 'Move Folder',
'type' => 'drag',
'enabled' => 'javaScript:app.mail.mail_CheckFolderNoSelect',
'dragType' => array('mailFolder')
),
'delete' => array(
'caption' => 'Delete Folder',
'onExecute' => 'javaScript:app.mail.mail_DeleteFolder'
'enabled' => 'javaScript:app.mail.mail_CheckFolderNoSelect',
'onExecute' => 'javaScript:app.mail.mail_DeleteFolder',
),
'subscribe' => array(
'caption' => 'Subscribe folder ...',
//'icon' => 'configure',
'enabled' => 'javaScript:app.mail.mail_CheckFolderNoSelect',
'onExecute' => 'javaScript:app.mail.edit_subscribe',
),
'unsubscribe' => array(
'caption' => 'Unsubscribe folder',
//'icon' => 'configure',
'enabled' => 'javaScript:app.mail.mail_CheckFolderNoSelect',
'onExecute' => 'javaScript:app.mail.unsubscribe_folder',
),
'sieve' => array(
@ -909,7 +914,7 @@ class mail_ui
if ($createMissingParents)
{
unset($item);
$item = array('id' => $parent.$component, 'text' => $component, 'im0' => "folderNoSelectClosed.gif",'im1' => "folderNoSelectOpen.gif",'im2' => "folderNoSelectClosed.gif",'tooltip' => '**missing**');
$item = array('id' => $parent.$component, 'text' => $component, 'im0' => "folderNoSelectClosed.gif",'im1' => "folderNoSelectOpen.gif",'im2' => "folderNoSelectClosed.gif",'tooltip' => 'no access');
$insert['item'][] =& $item;
$insert =& $item;
}

View File

@ -852,6 +852,27 @@ app.classes.mail = AppJS.extend(
}, 100);
},
/**
* mail_CheckFolderNoSelect - implementation of the mail_CheckFolderNoSelect action to control right click options on the tree
*
* @param _action
* @param _senders - the representation of the tree leaf to be manipulated
*/
mail_CheckFolderNoSelect: function(action,_senders,_currentNode) {
console.log(action,_senders,_currentNode);
// Abort if user selected an un-selectable node
// Use image over anything else because...?
var ftree = this.et2.getWidgetById(this.nm_index+'[foldertree]');
/*
if (img.indexOf('NoSelect') !== -1)
{
//ftree.reSelectItem(_previous);
return false;
}
*/
return true;
},
/**
* mail_setFolderStatus, function to set the status for the visible folders
*/
@ -1116,18 +1137,6 @@ app.classes.mail = AppJS.extend(
*/
mail_undeleteMessages: function(_messageList) {
// setting class of row, the old style
/*
for(var i=0;i<_messageList['msg'].length;i++) {
_id = _messageList['msg'][i];
var dataElem = egw_appWindow('felamimail').mailGrid.dataRoot.getElementById(_id);
if (dataElem)
{
//dataElem.clearData();
//dataElem.addClass('deleted');
dataElem.removeClass('deleted');
}
}
*/
},
/**
@ -1155,7 +1164,7 @@ app.classes.mail = AppJS.extend(
// .sendRequest(true);
// since the json reply is using egw_refresh, we should not need to call refreshFolderStatus
// as the actions thereof are now bound to run after grid refresh
//this.mail_g();
//this.mail_refreshFolderStatus();
},
/**

View File

@ -232,6 +232,7 @@ never display html emails mail de niemals anzeigen
new mail notification mail de Benachrichtigung über neue E-Mails in:
new message type mail de Neue E-Mails verfassen als
no (valid) send folder set in preferences mail de Es ist kein gültiger Gesendet Ordner hinterlegt.
no access mail de Kein Zugriff
no action defined! mail de Keine Aktion ausgewählt!
no address to/cc/bcc supplied, and no folder to save message to provided. mail de Keine Empfänger Adresse (To/CC/BCC ) angegeben und kein Ordner zur Ablage der E-Mail spezifiziert.
no adress, to send this mail to, supplied mail de Keine Empfängeradresse angegeben!

View File

@ -231,6 +231,7 @@ never display html emails mail en never display html emails
new mail notification mail en New mail notification
new message type mail en New message type
no (valid) send folder set in preferences mail en No (valid) Send Folder set in preferences
no access mail en no access
no action defined! mail en No action defined!
no address to/cc/bcc supplied, and no folder to save message to provided. mail en No Address TO/CC/BCC supplied, and no folder to save message to provided.
no adress, to send this mail to, supplied mail en no adress, to send this mail to, supplied