From 7c944b5aeb9a698640dd12f613736bda567763d9 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 16 Nov 2015 15:45:04 +0000 Subject: [PATCH] Mobile theme W.I.P.: - Sidebar acts based on device size - Remove portrait top header (sidebar toggle menu will be positioned next to nm header) - Remove collapsed sidebar application navigator, only for devices --- home/inc/class.home_tutorial_ui.inc.php | 1 + infolog/inc/class.infolog_hooks.inc.php | 2 +- mail/inc/class.mail_hooks.inc.php | 2 +- mail/inc/class.mail_ui.inc.php | 1 + mail/templates/default/app.css | 6 + mail/templates/default/mobile_index.xet | 45 +-- mail/templates/pixelegg/app.css | 6 + phpgwapi/inc/class.egw_framework.inc.php | 2 +- phpgwapi/inc/class.hooks.inc.php | 1 + phpgwapi/js/framework/fw_base.js | 37 +- phpgwapi/js/login.js | 3 + pixelegg/css/mobile.css | 419 ++++++++++++++++----- pixelegg/css/mobile.less | 457 +++++++++++++++++++---- pixelegg/head_mobile.tpl | 2 +- pixelegg/login_mobile.tpl | 75 ++++ 15 files changed, 853 insertions(+), 206 deletions(-) create mode 100644 pixelegg/login_mobile.tpl diff --git a/home/inc/class.home_tutorial_ui.inc.php b/home/inc/class.home_tutorial_ui.inc.php index eab44ef195..4bc8770ce2 100644 --- a/home/inc/class.home_tutorial_ui.inc.php +++ b/home/inc/class.home_tutorial_ui.inc.php @@ -132,6 +132,7 @@ class home_tutorial_ui */ public static function tutorial_menu() { + if (html::$ua_mobile) return; $tutorials = json_decode(self::getJsonData(),true); $appname = $GLOBALS['egw_info']['flags']['currentapp']; if (!is_array($tutorials[$appname])) return false; diff --git a/infolog/inc/class.infolog_hooks.inc.php b/infolog/inc/class.infolog_hooks.inc.php index 476b73f18b..691ca9b452 100644 --- a/infolog/inc/class.infolog_hooks.inc.php +++ b/infolog/inc/class.infolog_hooks.inc.php @@ -109,7 +109,7 @@ class infolog_hooks display_sidebox($appname,$GLOBALS['egw_info']['apps']['infolog']['title'].' '.lang('Menu'),$file); } - if ($GLOBALS['egw_info']['user']['apps']['admin']) + if ($GLOBALS['egw_info']['user']['apps']['admin'] && !html::$ua_mobile) { $file = Array( 'Site configuration' => egw::link('/index.php',array( diff --git a/mail/inc/class.mail_hooks.inc.php b/mail/inc/class.mail_hooks.inc.php index 4193144d36..cf0d514df4 100644 --- a/mail/inc/class.mail_hooks.inc.php +++ b/mail/inc/class.mail_hooks.inc.php @@ -526,7 +526,7 @@ class mail_hooks // display them all display_sidebox($appname,$menu_title,$file); - if ($GLOBALS['egw_info']['user']['apps']['admin']) + if ($GLOBALS['egw_info']['user']['apps']['admin'] && !html::$ua_mobile) { $file = Array( 'Site Configuration' => egw::link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname), diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 36478b578f..98b6001273 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -436,6 +436,7 @@ class mail_ui 'actions' => self::get_actions(), 'row_id' => 'row_id', // is a concatenation of trim($GLOBALS['egw_info']['user']['account_id']):profileID:base64_encode(FOLDERNAME):uid 'placeholder_actions' => array('composeasnew'), + 'header_row' => 'mail.mobile_index.header_right' ); } } diff --git a/mail/templates/default/app.css b/mail/templates/default/app.css index bb9f6a9220..251ea27515 100644 --- a/mail/templates/default/app.css +++ b/mail/templates/default/app.css @@ -838,6 +838,9 @@ blockquote blockquote blockquote blockquote blockquote blockquote{ padding-top: 8px; padding-bottom: 8px; } + table.egwGridView_grid span.et2_date_ro.et2_label { + font-size: 9px; + } /*Make Font size readable in mobile theme*/ #mail-compose .mailComposeHeaders span, #mail-compose .mailComposeHeadersSection span, div.mailDisplayHeaders > span:first-child, div.mailComposeHeaders > span:first-child, div.mailComposeBody, div.mailPreviewHeaders > *{ @@ -846,6 +849,9 @@ blockquote blockquote blockquote blockquote blockquote blockquote{ .mailDisplayHeaders, .mailDisplayAttachments > * { font-size: large !important; } + span.status_img { + background-image: none !important; + } } /* tablets and smartphones (portrait) ----------- */ @media only screen diff --git a/mail/templates/default/mobile_index.xet b/mail/templates/default/mobile_index.xet index 66cb4cd869..dd38bee377 100644 --- a/mail/templates/default/mobile_index.xet +++ b/mail/templates/default/mobile_index.xet @@ -5,52 +5,41 @@ +