Mobile theme W.I.P.:

- Add subscription dialog
- Re-arrange mail actions in context menu
This commit is contained in:
Hadi Nategh 2016-02-16 18:02:49 +00:00
parent 18c4661e3c
commit 304d1b0f68
2 changed files with 44 additions and 7 deletions

View File

@ -526,7 +526,7 @@ class mail_ui
$etpl = new etemplate_new('mail.index'); $etpl = new etemplate_new('mail.index');
// Start at 2 so auto-added copy+paste actions show up as second group // 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 // Needed because there's no 'select all' action to push things down
$group=2; $group=1;
// Set tree actions // Set tree actions
$tree_actions = array( $tree_actions = array(
'drop_move_mail' => array( 'drop_move_mail' => array(
@ -600,11 +600,12 @@ class mail_ui
'enabled' => 'javaScript:app.mail.mail_CheckFolderNoSelect', 'enabled' => 'javaScript:app.mail.mail_CheckFolderNoSelect',
'onExecute' => 'javaScript:app.mail.folderManagement', 'onExecute' => 'javaScript:app.mail.folderManagement',
'group' => $group, 'group' => $group,
'hideOnMobile' => true
), ),
'sieve' => array( 'sieve' => array(
'caption' => 'Mail filter', 'caption' => 'Mail filter',
'onExecute' => 'javaScript:app.mail.edit_sieve', 'onExecute' => 'javaScript:app.mail.edit_sieve',
'group' => ++$group, // new group for filter
'enabled' => 'javaScript:app.mail.sieve_enabled', 'enabled' => 'javaScript:app.mail.sieve_enabled',
'icon' => 'etemplate/fav_filter', // funnel 'icon' => 'etemplate/fav_filter', // funnel
'hideOnMobile' => true 'hideOnMobile' => true
@ -613,21 +614,18 @@ class mail_ui
'caption' => 'Vacation notice', 'caption' => 'Vacation notice',
'icon' => 'mail/navbar', // mail as in admin 'icon' => 'mail/navbar', // mail as in admin
'onExecute' => 'javaScript:app.mail.edit_vacation', 'onExecute' => 'javaScript:app.mail.edit_vacation',
'group' => $group,
'enabled' => 'javaScript:app.mail.sieve_enabled', 'enabled' => 'javaScript:app.mail.sieve_enabled',
), ),
'edit_account' => array( 'edit_account' => array(
'caption' => 'Edit account ...', 'caption' => 'Edit account ...',
'icon' => 'configure', 'icon' => 'configure',
'onExecute' => 'javaScript:app.mail.edit_account', 'onExecute' => 'javaScript:app.mail.edit_account',
'group' => ++$group, // new groups for account & acl
), ),
'edit_acl' => array( 'edit_acl' => array(
'caption' => 'Edit folder ACL ...', 'caption' => 'Edit folder ACL ...',
'icon' => 'lock', 'icon' => 'lock',
'enabled' => 'javaScript:app.mail.acl_enabled', 'enabled' => 'javaScript:app.mail.acl_enabled',
'onExecute' => 'javaScript:app.mail.edit_acl', 'onExecute' => 'javaScript:app.mail.edit_acl',
'group' => $group,
), ),
); );
// the preference prefaskformove controls actually if there is a popup on target or not // the preference prefaskformove controls actually if there is a popup on target or not
@ -675,7 +673,7 @@ class mail_ui
); );
break; break;
} }
++$group; // put empty spam immediately in own group
$junkFolder = $this->mail_bo->getJunkFolder(); $junkFolder = $this->mail_bo->getJunkFolder();
//error_log(__METHOD__.__LINE__.$junkFolder); //error_log(__METHOD__.__LINE__.$junkFolder);
if ($junkFolder && !empty($junkFolder)) if ($junkFolder && !empty($junkFolder))
@ -688,7 +686,10 @@ class mail_ui
'group' => $group, '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 // enforce global (group-specific) ACL
if (!mail_hooks::access('aclmanagement')) if (!mail_hooks::access('aclmanagement'))
{ {
@ -1028,6 +1029,7 @@ class mail_ui
'group' => ++$group, 'group' => ++$group,
'onExecute' => 'javaScript:app.mail.mail_print', 'onExecute' => 'javaScript:app.mail.mail_print',
'allowOnMultiple' => false, 'allowOnMultiple' => false,
'hideOnMobile' => true
), ),
'save' => array( 'save' => array(
'caption' => 'Save', 'caption' => 'Save',
@ -1041,6 +1043,7 @@ class mail_ui
'icon' => 'fileexport', 'icon' => 'fileexport',
'onExecute' => 'javaScript:app.mail.mail_save', 'onExecute' => 'javaScript:app.mail.mail_save',
'allowOnMultiple' => false, 'allowOnMultiple' => false,
'hideOnMobile' => true
), ),
'save2filemanager' => array( 'save2filemanager' => array(
'caption' => 'Filemanager', 'caption' => 'Filemanager',

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE overlay PUBLIC "-//Stylite AG//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
<!-- $Id$ -->
<overlay>
<template id="mail.subscribe" template="" lang="" group="0" version="1.9.001">
<grid width="100%">
<columns>
<column width="20%"/>
</columns>
<rows>
<row disabled="@hidebuttons" class="dialogHeadbar" >
<hbox span="all" width="100%">
<button statustext="Saves this entry" id="button[save]" image="save" background_image="1"/>
<button statustext="Apply the changes" id="button[apply]" image="apply" background_image="1"/>
</hbox>
</row>
<row disabled="!@showsearchbuttons" class="dialogHeadbar">
<hbox span="all" width="100%">
<button label="Search" id="button[search]" image="search" background_image="1"/>
<button label="Cancel" id="button[cancelsearch]" image="cancel" background_image="1"/>
</hbox>
</row>
<row>
<description value="Subscription folders" class="mail_subscription_header"/>
</row>
<row>
<box scrolling="auto">
<tree id="foldertree" multiple="true" autoloading="mail_ui::ajax_tree_autoloading" onopenstart="app.mail.subscription_autoloadingStart" onopenend="app.mail.subscription_autoloadingEnd"/>
</box>
</row>
</rows>
</grid>
</template>
</overlay>