diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 55e06bfc0d..879677312a 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -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; } diff --git a/mail/js/app.js b/mail/js/app.js index 2104033b4e..6efe55b5f2 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -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(); }, /** diff --git a/mail/lang/egw_de.lang b/mail/lang/egw_de.lang index ff902115b1..4f2570344c 100644 --- a/mail/lang/egw_de.lang +++ b/mail/lang/egw_de.lang @@ -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! diff --git a/mail/lang/egw_en.lang b/mail/lang/egw_en.lang index 41717e4317..d6e3feba7f 100644 --- a/mail/lang/egw_en.lang +++ b/mail/lang/egw_en.lang @@ -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