From 3b4864df7ce94ccf4deeeb1d983e69d2a90739fc Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 13 Aug 2015 17:34:12 +0000 Subject: [PATCH] Mail folder management dialog: - Add some translation - Add hints for multiple selection action - Some styling --- mail/inc/class.mail_ui.inc.php | 4 ++-- mail/js/app.js | 19 ++++++++++++++++--- mail/lang/egw_de.lang | 4 ++++ mail/lang/egw_en.lang | 4 ++++ mail/templates/pixelegg/app.css | 8 ++++++-- mail/templates/pixelegg/app.less | 8 ++++---- 6 files changed, 36 insertions(+), 11 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 40c3ffcbea..cb566db577 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -594,10 +594,10 @@ class mail_ui 'group' => $group, ), 'foldermanagement' => array( - 'caption' => 'Folder Management...', + 'caption' => 'Folder Management ...', 'enabled' => 'javaScript:app.mail.mail_CheckFolderNoSelect', 'onExecute' => 'javaScript:app.mail.folderManagement', - 'group' => ++$group, + 'group' => $group, ), 'sieve' => array( 'caption' => 'Mail filter', diff --git a/mail/js/app.js b/mail/js/app.js index 064181b5d5..63fa465c2f 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -292,6 +292,9 @@ app.classes.mail = AppJS.extend( tree.input.loadJSONObject(tree._htmlencode_node(state)); } + break; + case 'mail.folder_management': + this.egw.message('If you would like to select multiple folders in one action, you can hold ctrl key then select a folder as start range and another folder within a same level as end range, all folders in between will be selected or unselected based on their current status.','info',true); } }, @@ -4956,7 +4959,14 @@ app.classes.mail = AppJS.extend( */ folderMgmt_onCheck: function (_id, _widget) { - console.log(); + var selected = _widget.input.getAllChecked(); + if (selected && selected.split(_widget.input.dlmtr).length > 5) + { + egw.message('If you would like to select multiple folders in one action,\n\ + you can hold ctrl key then select a folder as start range and another\n\ + folder within a same level as end range, all folders in between will be \n\ + selected or unselected based on their current status.'); + } }, /** @@ -4979,7 +4989,7 @@ app.classes.mail = AppJS.extend( if (selFolders) { var selFldArr = selFolders.split(tree.input.dlmtr); - var msg = egw.lang('Folders deleting in progress ...'); + var msg = egw.lang('Deleting %1 folders in progress ...', selFldArr.length); et2_dialog.long_task(function(_val, _resp){ console.log(_val, _resp); if (_val && _resp.type !== 'error') @@ -4993,6 +5003,9 @@ app.classes.mail = AppJS.extend( } // delete the item from index folderTree egw.window.app.mail.mail_removeLeaf(stat); + } + else + { // submit etemplate2.getByApplication('mail')[0].widgetContainer._inst.submit(); } @@ -5002,7 +5015,7 @@ app.classes.mail = AppJS.extend( } } }; - et2_dialog.show_dialog(callbackDialog, egw.lang('Are you sure you want to delete all selected folders?'), egw.lang('Delete folders'), {}, + et2_dialog.show_dialog(callbackDialog, egw.lang('Are you sure you want to delete all selected folders?'), egw.lang('Delete folder'), {}, et2_dialog.BUTTON_YES_NO, et2_dialog.WARNING_MESSAGE, undefined, egw); } diff --git a/mail/lang/egw_de.lang b/mail/lang/egw_de.lang index d23042e3f1..133495ae51 100644 --- a/mail/lang/egw_de.lang +++ b/mail/lang/egw_de.lang @@ -41,6 +41,8 @@ any of mail de mit einem any status mail de Alle Status append mail de hinzufügen appended after reply before sending mail de Einfügen nach dem zitierten Text im Zuge des Versendens +application mail expected but got: %1 mail de Anwendung Mail erwarted, aber %1 erhalten! +are you sure you want to delete all selected folders? mail de Sollen alle selektierten Ordner gelöcht werden? arrival mail de Empfangsdatum attach users vcard at compose to every new mail mail de Füge die VCard des aktiven Benutzers an jede neue E-Mail an attach vcard mail de vCard hinzufügen @@ -92,6 +94,7 @@ delete folder %1 ? mail de Ordner %1 löschen? deleted mail de gelöscht deleted %1 messages in %2 mail de Es wurden %1 Nachricht(en) in %2 gelöscht deleted! mail de gelöscht! +deleting %1 folders in progress ... mail de de %1 Ordner in Bearbeitung zum Löschen deny certain groups access to following features mail de Den Zugriff auf bestimmte Funktionen im E-Mail Modul einschränken. directories have to be shared. mail de Verzeichnisse müssen freigegeben werden. disable mail de Deaktivieren @@ -164,6 +167,7 @@ event details follow mail de Details zum Termin folgen everyone mail de Alle Anwender extended mail de Erweitert extra sent folders mail de Anzeigeschema Gesendet Ordner +failed to delete %1 mail de Löschen von %1 fehlgeschlagen failed to delete %1 ! reason: %2 mail de Löschen von %1 fehlgeschlagen! Grund: %2 failed to delete %1. server responded: mail de Löschen von %1 fehlgeschlagen! Grund: %2 failed to move %1 ! reason: %2 mail de Verschieben von %1 fehlgeschlagen! Grund: %2 diff --git a/mail/lang/egw_en.lang b/mail/lang/egw_en.lang index 04cf4094c7..285d14bb73 100644 --- a/mail/lang/egw_en.lang +++ b/mail/lang/egw_en.lang @@ -42,6 +42,7 @@ any status mail en any status append mail en append appended after reply before sending mail en Appended after reply before sending application mail expected but got: %1 mail en Application mail expected but got: %1 +are you sure you want to delete all selected folders? mail en Are you sure you want to delete all selected folders? arrival mail en Recieved attach users vcard at compose to every new mail mail en attach users VCard at compose to every new mail attach vcard mail en Attach vCard @@ -93,6 +94,7 @@ delete folder %1 ? mail en DELETE Folder %1 ? deleted mail en deleted deleted %1 messages in %2 mail en deleted %1 messages in %2 deleted! mail en deleted! +deleting %1 folders in progress ... mail en Deleting %1 folders in progress ... deny certain groups access to following features mail en Deny certain groups access to following features directories have to be shared. mail en Directories have to be shared. disable mail en Disable @@ -165,6 +167,7 @@ event details follow mail en Event Details follow everyone mail en Everyone extended mail en Extended extra sent folders mail en Extra sent folders +failed to delete %1 mail en Failed to delete %1 failed to delete %1 ! reason: %2 mail en failed to delete %1 ! Reason: %2 failed to delete %1. server responded: mail en Failed to delete %1. Server responded: failed to move %1 ! reason: %2 mail en failed to move %1 ! Reason: %2 @@ -185,6 +188,7 @@ flagged %1 messages as unflagged in %2 mail en flagged %1 messages as unflagged flagged / unflagged mail en Flagged / Unflagged folder mail en Folder folder %1 %2 failed! mail en Folder %1 %2 failed! +folder management ... mail en Folder Management ... folder settings mail en Folder settings for e.g.: mpeg mail en for e.g.: mpeg for eg.: mpeg mail en for eg.: mpeg diff --git a/mail/templates/pixelegg/app.css b/mail/templates/pixelegg/app.css index 592c8dc259..e493190a7b 100755 --- a/mail/templates/pixelegg/app.css +++ b/mail/templates/pixelegg/app.css @@ -1090,10 +1090,12 @@ body { .egw_fw_ui_category_content .selectedTreeRow_lor { background-color: #ffc200; color: #1e1e1e; + text-decoration: none; } .egw_fw_ui_category_content .standartTreeRow_lor { - background-color: #f2f2f2; + background-color: rgba(103, 159, 210, 0.2); color: #1e1e1e; + text-decoration: none; } /* ################################################################################## * E-Mail Dialog "Compose" @@ -1707,11 +1709,13 @@ div#displayToolbar-menulist img { #mail-folder_management .selectedTreeRow_lor { background-color: #ffc200; color: #1e1e1e; + text-decoration: none; } #mail-subscribe .standartTreeRow_lor, #mail-folder_management .standartTreeRow_lor { - background-color: #f2f2f2; + background-color: rgba(103, 159, 210, 0.2); color: #1e1e1e; + text-decoration: none; } .mail_subscription_header, .mail_folder_management_header { diff --git a/mail/templates/pixelegg/app.less b/mail/templates/pixelegg/app.less index 8b5b1783a6..dbd8103be6 100755 --- a/mail/templates/pixelegg/app.less +++ b/mail/templates/pixelegg/app.less @@ -287,9 +287,9 @@ body { // color - selected tree item - .selectedTreeRow, .selectedTreeRow_lor {background-color: @egw_color_1_a; color: @gray_90;} + .selectedTreeRow, .selectedTreeRow_lor {background-color: @egw_color_1_a; color: @gray_90;text-decoration: none;} - .standartTreeRow_lor {background-color: @gray_5; color: @gray_90;} + .standartTreeRow_lor {background-color: rgba(103, 159, 210, 0.2); color: @gray_90;text-decoration: none;} /*new mail in FOlder span.standartTreeRow b {color: @egw_color_2_a;} */ @@ -891,9 +891,9 @@ div#displayToolbar-menulist{ } // color - selected tree item - .selectedTreeRow,.selectedTreeRow_lor {background-color: @egw_color_1_a; color: @gray_90;} + .selectedTreeRow,.selectedTreeRow_lor {background-color: @egw_color_1_a; color: @gray_90;text-decoration: none;} // color - hover over standard tree item - .standartTreeRow_lor {background-color: @gray_5; color: @gray_90;} + .standartTreeRow_lor {background-color: rgba(103, 159, 210, 0.2); color: @gray_90;text-decoration: none;} } // #mail-subscribe