From 304d1b0f68c2f5f376fb21222cadb9ee64c162cd Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 16 Feb 2016 18:02:49 +0000 Subject: [PATCH] Mobile theme W.I.P.: - Add subscription dialog - Re-arrange mail actions in context menu --- mail/inc/class.mail_ui.inc.php | 17 +++++++++------ mail/templates/mobile/subscribe.xet | 34 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 mail/templates/mobile/subscribe.xet diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 2aeafb3e4d..93ab78fb38 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -526,7 +526,7 @@ class mail_ui $etpl = new etemplate_new('mail.index'); // Start at 2 so auto-added copy+paste actions show up as second group // Needed because there's no 'select all' action to push things down - $group=2; + $group=1; // Set tree actions $tree_actions = array( 'drop_move_mail' => array( @@ -600,11 +600,12 @@ class mail_ui 'enabled' => 'javaScript:app.mail.mail_CheckFolderNoSelect', 'onExecute' => 'javaScript:app.mail.folderManagement', 'group' => $group, + 'hideOnMobile' => true ), 'sieve' => array( 'caption' => 'Mail filter', 'onExecute' => 'javaScript:app.mail.edit_sieve', - 'group' => ++$group, // new group for filter + 'enabled' => 'javaScript:app.mail.sieve_enabled', 'icon' => 'etemplate/fav_filter', // funnel 'hideOnMobile' => true @@ -613,21 +614,18 @@ class mail_ui 'caption' => 'Vacation notice', 'icon' => 'mail/navbar', // mail as in admin 'onExecute' => 'javaScript:app.mail.edit_vacation', - 'group' => $group, 'enabled' => 'javaScript:app.mail.sieve_enabled', ), 'edit_account' => array( 'caption' => 'Edit account ...', 'icon' => 'configure', 'onExecute' => 'javaScript:app.mail.edit_account', - 'group' => ++$group, // new groups for account & acl ), 'edit_acl' => array( 'caption' => 'Edit folder ACL ...', 'icon' => 'lock', 'enabled' => 'javaScript:app.mail.acl_enabled', 'onExecute' => 'javaScript:app.mail.edit_acl', - 'group' => $group, ), ); // the preference prefaskformove controls actually if there is a popup on target or not @@ -675,7 +673,7 @@ class mail_ui ); break; } - ++$group; // put empty spam immediately in own group + $junkFolder = $this->mail_bo->getJunkFolder(); //error_log(__METHOD__.__LINE__.$junkFolder); if ($junkFolder && !empty($junkFolder)) @@ -688,7 +686,10 @@ class mail_ui 'group' => $group, ); } - + $tree_actions['sieve']['group'] = $tree_actions['vacation']['group'] = ++$group; // new group for filter + $tree_actions['edit_account']['group'] = $tree_actions['edit_acl']['group'] = ++$group; + + // enforce global (group-specific) ACL if (!mail_hooks::access('aclmanagement')) { @@ -1028,6 +1029,7 @@ class mail_ui 'group' => ++$group, 'onExecute' => 'javaScript:app.mail.mail_print', 'allowOnMultiple' => false, + 'hideOnMobile' => true ), 'save' => array( 'caption' => 'Save', @@ -1041,6 +1043,7 @@ class mail_ui 'icon' => 'fileexport', 'onExecute' => 'javaScript:app.mail.mail_save', 'allowOnMultiple' => false, + 'hideOnMobile' => true ), 'save2filemanager' => array( 'caption' => 'Filemanager', diff --git a/mail/templates/mobile/subscribe.xet b/mail/templates/mobile/subscribe.xet new file mode 100644 index 0000000000..a99dbd2b41 --- /dev/null +++ b/mail/templates/mobile/subscribe.xet @@ -0,0 +1,34 @@ + + + + + +