Mobile theme:

- Eliminates some actions from contextmenu only on mobile
This commit is contained in:
Hadi Nategh 2016-03-09 12:31:55 +00:00
parent f5a6d52ae2
commit dbd97cd37a
5 changed files with 37 additions and 19 deletions

View File

@ -372,7 +372,8 @@ class addressbook_ui extends addressbook_bo
'disableClass' => 'contact_organisation', 'disableClass' => 'contact_organisation',
'hideOnDisabled' => true, 'hideOnDisabled' => true,
// Children added below // Children added below
'children' => array() 'children' => array(),
'hideOnMobile' => true
), ),
'open' => array( 'open' => array(
'caption' => 'Open', 'caption' => 'Open',
@ -404,6 +405,7 @@ class addressbook_ui extends addressbook_bo
'icon' => 'copy', 'icon' => 'copy',
), ),
), ),
'hideOnMobile' => true
), ),
); );
// CRM view options // CRM view options
@ -548,6 +550,7 @@ class addressbook_ui extends addressbook_bo
'prefix' => 'move_to_', 'prefix' => 'move_to_',
'group' => $group, 'group' => $group,
'disableClass' => 'rowNoDelete', 'disableClass' => 'rowNoDelete',
'hideOnMobile' => true
); );
} }
$actions['merge'] = array( $actions['merge'] = array(
@ -556,6 +559,7 @@ class addressbook_ui extends addressbook_bo
'hint' => 'Merge into first or account, deletes all other!', 'hint' => 'Merge into first or account, deletes all other!',
'allowOnMultiple' => 'only', 'allowOnMultiple' => 'only',
'group' => $group, 'group' => $group,
'hideOnMobile' => true
); );
++$group; // integration with other apps: infolog, calendar, filemanager ++$group; // integration with other apps: infolog, calendar, filemanager
@ -580,7 +584,8 @@ class addressbook_ui extends addressbook_bo
'popup' => egw_link::get_registry('infolog', 'add_popup'), 'popup' => egw_link::get_registry('infolog', 'add_popup'),
'onExecute' => 'javaScript:app.addressbook.add_task', // call server for org-view only 'onExecute' => 'javaScript:app.addressbook.add_task', // call server for org-view only
), ),
) ),
'hideOnMobile' => true
); );
} }
if ($GLOBALS['egw_info']['user']['apps']['calendar']) if ($GLOBALS['egw_info']['user']['apps']['calendar'])
@ -604,6 +609,7 @@ class addressbook_ui extends addressbook_bo
'onExecute' => 'javaScript:app.addressbook.add_cal', 'onExecute' => 'javaScript:app.addressbook.add_cal',
), ),
), ),
'hideOnMobile' => true
); );
} }
//Send to email //Send to email
@ -664,6 +670,7 @@ class addressbook_ui extends addressbook_bo
'group' => $group, 'group' => $group,
// disable for for org-views, as it needs contact-ids // disable for for org-views, as it needs contact-ids
'disableClass' => 'contact_organisation', 'disableClass' => 'contact_organisation',
'hideOnMobile' => true
); );
} }
// check if user is an admin or the export is not generally turned off (contact_export_limit is non-numerical, eg. no) // check if user is an admin or the export is not generally turned off (contact_export_limit is non-numerical, eg. no)
@ -687,6 +694,7 @@ class addressbook_ui extends addressbook_bo
'icon' => egw_vfs::mime_icon('text/vcard'), 'icon' => egw_vfs::mime_icon('text/vcard'),
), ),
), ),
'hideOnMobile' => true
); );
} }
@ -703,6 +711,7 @@ class addressbook_ui extends addressbook_bo
'onExecute' => 'javaScript:app.addressbook.adb_mail_vcard', 'onExecute' => 'javaScript:app.addressbook.adb_mail_vcard',
'disableClass' => 'contact_organisation', 'disableClass' => 'contact_organisation',
'hideOnDisabled' => true, 'hideOnDisabled' => true,
'hideOnMobile' => true
); );
} }
++$group; ++$group;

View File

@ -868,7 +868,8 @@ class calendar_uilist extends calendar_ui
$actions = array( $actions = array(
'add' => array( 'add' => array(
'caption' => 'Add', 'caption' => 'Add',
'egw_open' => 'add-calendar' 'egw_open' => 'add-calendar',
'hideOnMobile' => true
), ),
'open' => array( 'open' => array(
'caption' => 'Open', 'caption' => 'Open',

View File

@ -1089,6 +1089,7 @@ class infolog_ui
'enabled' => 'javaScript:app.infolog.has_parent', 'enabled' => 'javaScript:app.infolog.has_parent',
'onExecute' => 'javaScript:app.infolog.view_parent', 'onExecute' => 'javaScript:app.infolog.view_parent',
'group' => $group, 'group' => $group,
'hideOnMobile' => true
), ),
'add' => array( 'add' => array(
'caption' => 'Add', 'caption' => 'Add',
@ -1115,6 +1116,7 @@ class infolog_ui
'icon' => 'copy', 'icon' => 'copy',
), ),
), ),
'hideOnMobile' => true
), ),
'no_notifications' => array( 'no_notifications' => array(
'caption' => 'Do not notify', 'caption' => 'Do not notify',
@ -1165,6 +1167,7 @@ class infolog_ui
'nm_action' => 'open_popup', 'nm_action' => 'open_popup',
), ),
), ),
'hideOnMobile' => true
), ),
'close' => array( 'close' => array(
'caption' => 'Close', 'caption' => 'Close',
@ -1245,6 +1248,7 @@ class infolog_ui
'postSubmit' => true, // download needs post submit to work 'postSubmit' => true, // download needs post submit to work
'group' => $group, 'group' => $group,
'allowOnMultiple' => true, 'allowOnMultiple' => true,
'hideOnMobile' => true
); );
$actions['delete'] = array( $actions['delete'] = array(

View File

@ -955,6 +955,7 @@ class mail_ui
'onExecute' => 'javaScript:app.mail.mail_compose', 'onExecute' => 'javaScript:app.mail.mail_compose',
), ),
), ),
'hideOnMobile' => true
), ),
'composeasnew' => array( 'composeasnew' => array(
'caption' => 'Compose', 'caption' => 'Compose',
@ -1063,6 +1064,7 @@ class mail_ui
'allowOnMultiple' => false, 'allowOnMultiple' => false,
), ),
), ),
'hideOnMobile' => true
), ),
'view' => array( 'view' => array(
'caption' => 'View', 'caption' => 'View',
@ -1102,6 +1104,7 @@ class mail_ui
'allowOnMultiple' => false, 'allowOnMultiple' => false,
), ),
), ),
'hideOnMobile' => true
), ),
'mark' => array( 'mark' => array(
'caption' => 'Set / Remove Flags', 'caption' => 'Set / Remove Flags',

View File

@ -195,6 +195,7 @@ class resources_ui
'url' => 'menuaction=resources.resources_ui.edit&accessory_of=-1', 'url' => 'menuaction=resources.resources_ui.edit&accessory_of=-1',
'popup' => egw_link::get_registry('resources', 'add_popup'), 'popup' => egw_link::get_registry('resources', 'add_popup'),
'group' => $group, 'group' => $group,
'hideOnMobile' => true
), ),
'view-acc' => array( 'view-acc' => array(
'caption' => 'View accessories', 'caption' => 'View accessories',