Fix couple of glitches in mobile theme:

- Fix extra gap between topmenu icons
- Shows no print button
- Resize sidebox
- Fix not loading the default app
This commit is contained in:
Hadi Nategh 2015-03-17 13:58:58 +00:00
parent 92da1d0759
commit c2b6b0027d
5 changed files with 65 additions and 63 deletions

View File

@ -367,13 +367,15 @@ div .egw_fw_ui_sidemenu_entry_content > div {
$this->tpl->set_var('sidebox_width', self::get_global_sidebar_width());
$this->tpl->set_var('sidebox_min_width', self::MIN_SIDEBAR_WIDTH);
// logout button
$this->tpl->set_var('title_logout', lang("Logout"));
$this->tpl->set_var('link_logout', egw::link('/logout.php'));
//Print button title
$this->tpl->set_var('title_print', lang("Print current view"));
if (!(html::$ua_mobile || $GLOBALS['egw_info']['user']['preferences']['common']['theme'] == 'mobile'))
{
// logout button
$this->tpl->set_var('title_logout', lang("Logout"));
$this->tpl->set_var('link_logout', egw::link('/logout.php'));
//Print button title
$this->tpl->set_var('title_print', lang("Print current view"));
}
// add framework div's
$this->tpl->set_var($this->_get_footer());
$content .= $this->tpl->fp('out','framework');
@ -443,7 +445,15 @@ div .egw_fw_ui_sidemenu_entry_content > div {
switch($app_data['name'])
{
case 'logout':
return; // no need for logout in topmenu on jdots
if (html::$ua_mobile || $GLOBALS['egw_info']['user']['preferences']['common']['theme'] == 'mobile')
{
}
else
{
return; // no need for logout in topmenu on jdots
}
break;
case 'manual':
$app_data['url'] = "javascript:callManual();";

View File

@ -534,6 +534,14 @@
// Do not load the apps which are not in the navbar
if (app_navbar_lookup(app)) this.applicationTabNavigate(restore[app].app, restore[app].url, app == activeApp?false:true,-1);
}
// Check if there is no activeApp active the Home app if exist
// otherwise the first app in the list
if (activeApp =="" || !activeApp)
{
this.setActiveApp(typeof this.applications.home !='undefined'?
this.applications.home:this.applications[Object.keys(this.applications)[0]]);
}
//Set the current state of the tabs and activate TabChangeNotification.
this.serializedTabState = egw.jsonEncode(this.assembleTabList());
@ -876,7 +884,7 @@
$j(document).ready(function() {
window.framework = new fw_mobile("egw_fw_sidemenu", "egw_fw_tabs",
window.egw_webserverUrl, egw_setSideboxSize, 350, 'egw_fw_basecontainer', 'egw_fw_menu');
window.egw_webserverUrl, egw_setSideboxSize, 300, 'egw_fw_basecontainer', 'egw_fw_menu');
window.callManual = window.framework.callManual;
jQuery('#egw_fw_print').click(function(){window.framework.print();});
jQuery('#egw_fw_logout').click(function(){ window.framework.redirect(this.getAttribute('data-logout-url')); });

View File

@ -6335,22 +6335,6 @@ a.textSidebox {
#egw_fw_basecontainer #egw_fw_top_toolbar div.egw_fw_ui_tabs_header span h1 {
display: none;
}
#egw_fw_basecontainer div#egw_fw_logout {
left: 310px;
top: 20px;
width: 24px;
height: 24px;
background-size: 24px 24px;
z-index: 1;
}
#egw_fw_basecontainer div#egw_fw_print {
left: 268px;
top: 20px;
width: 24px;
height: 24px;
background-size: 24px 24px;
z-index: 1;
}
#egw_fw_basecontainer .egw_fw_top_toolbar > div:hover {
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
-moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
@ -6381,7 +6365,7 @@ a.textSidebox {
box-shadow: inset 1px 2px 1px rgba(0, 0, 0, 0.5);
}
#egw_fw_basecontainer div#egw_fw_topmenu_items {
width: 250px;
width: 280px;
display: inline;
float: left;
position: fixed;
@ -6397,13 +6381,23 @@ a.textSidebox {
#egw_fw_basecontainer div#egw_fw_topmenu_items ul li {
display: -webkit-inline-box;
display: -moz-inline-box;
padding-right: 0.5em;
padding: 2px;
}
#egw_fw_basecontainer div#egw_fw_topmenu_items ul li:hover {
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.5);
box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.5);
}
#egw_fw_basecontainer div#egw_fw_topmenu_items ul a#topmenu_logout:before {
content: "";
background-image: url(../images/logout.png);
background-repeat: no-repeat;
width: 32px;
height: 32px;
background-size: 30px 30px;
display: inline-block;
background-position: center;
}
#egw_fw_basecontainer div#egw_fw_topmenu_items ul a#topmenu_home:before {
content: " ";
background-image: url(../images/topmenu_items/mobile/home.png);
@ -6422,6 +6416,7 @@ a.textSidebox {
height: 32px;
background-size: 32px 32px;
display: inline-block;
background-position: center;
}
#egw_fw_basecontainer div#egw_fw_topmenu_items ul a#topmenu_prefs:active {
-webkit-transform: rotate(180deg);
@ -6435,6 +6430,7 @@ a.textSidebox {
background-size: 32px 32px;
background-image: url(../images/topmenu_items/mobile/access.png);
display: inline-block;
background-position: center;
}
#egw_fw_basecontainer div#egw_fw_topmenu_items ul a#topmenu_cats:before {
background-image: url(../images/topmenu_items/mobile/category.png);
@ -6444,6 +6440,7 @@ a.textSidebox {
height: 32px;
background-size: 32px 32px;
display: inline-block;
background-position: center;
}
#egw_fw_basecontainer div#egw_fw_topmenu_items ul a#topmenu_password:before {
background-image: url(../images/topmenu_items/mobile/password.png);
@ -6453,6 +6450,7 @@ a.textSidebox {
height: 32px;
background-size: 32px 32px;
display: inline-block;
background-position: center;
}
#egw_fw_basecontainer div#egw_fw_topmenu_items ul a#topmenu_manual:before {
background-image: url(../images/topmenu_items/mobile/help.png);
@ -6471,11 +6469,7 @@ a.textSidebox {
height: 32px;
background-size: 32px 32px;
display: inline-block;
}
#egw_fw_basecontainer div#egw_fw_topmenu_items ul a#topmenu_search:active {
transform: scale(-2);
-webkit-transform: scale(-2);
-webkit-transition: 1s ease;
background-position: center;
}
.egw_fw_ui_tabs_header {
margin: 0px 0 0 0;
@ -6963,9 +6957,7 @@ a.textSidebox {
.sidebar-toggle #egw_fw_sidebar #egw_fw_sidemenu .egw_fw_ui_sidemenu_entry_header_active h1 {
display: none;
}
.sidebar-toggle #egw_fw_logout,
.sidebar-toggle #egw_fw_topmenu_items,
.sidebar-toggle #egw_fw_print {
.sidebar-toggle #egw_fw_topmenu_items {
display: none !important;
}
.tabs-header-portrait-collapsed {

View File

@ -132,25 +132,7 @@
}
}
}
//FW Logout
div#egw_fw_logout{
left: 310px;
top: 20px;
width: 24px;
height: 24px;
background-size: 24px 24px;
z-index: 1;
}
//FW Print
div#egw_fw_print{
left: 268px;
top: 20px;
width: 24px;
height: 24px;
background-size: 24px 24px;
z-index: 1;
}
.egw_fw_top_toolbar>div:hover{
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
-moz-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
@ -184,7 +166,7 @@
box-shadow: inset 1px 2px 1px rgba(0, 0, 0, 0.5);
}
div#egw_fw_topmenu_items{
width: 250px;
width: 280px;
display: inline;
float: left;
position: fixed;
@ -198,13 +180,25 @@
li{
display: -webkit-inline-box;
display: -moz-inline-box;
padding-right: 0.5em;
padding:2px;
&:hover {
-webkit-box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.5);
box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.5);
}
}
a#topmenu_logout{
&:before {
content: "";
background-image: url(../images/logout.png);
background-repeat: no-repeat;
width: 32px;
height: 32px;
background-size: 30px 30px;
display: inline-block;
background-position: center;
}
}
a#topmenu_home:before {
content: " ";
background-image: url(../images/topmenu_items/mobile/home.png);
@ -224,6 +218,7 @@
height: 32px;
background-size: 32px 32px;
display: inline-block;
background-position: center;
}
&:active {
-webkit-transform:rotate(180deg);
@ -239,6 +234,7 @@
background-size: 32px 32px;
background-image: url(../images/topmenu_items/mobile/access.png);
display: inline-block;
background-position: center;
}
a#topmenu_cats:before {
@ -249,6 +245,7 @@
height: 32px;
background-size: 32px 32px;
display: inline-block;
background-position: center;
}
a#topmenu_password:before {
background-image: url(../images/topmenu_items/mobile/password.png);
@ -258,6 +255,7 @@
height: 32px;
background-size: 32px 32px;
display: inline-block;
background-position: center;
}
a#topmenu_manual:before {
@ -279,11 +277,7 @@
height: 32px;
background-size: 32px 32px;
display: inline-block;
}
&:active {
transform: scale(-2);
-webkit-transform:scale(-2);
-webkit-transition: 1s ease;
background-position: center;
}
}
}
@ -717,7 +711,7 @@
}
}
}
#egw_fw_logout, #egw_fw_topmenu_items, #egw_fw_print{
#egw_fw_topmenu_items {
display:none !important;
}
}

View File

@ -28,8 +28,6 @@
{hook_after_navbar}
<div id="egw_fw_basecontainer">
<div id="egw_fw_top_toolbar">
<div id="egw_fw_logout" title="{title_logout}" data-logout-url="{link_logout}"></div>
<div id="egw_fw_print" title="{title_print}"></div>
<div id="egw_fw_topmenu_items">{topmenu_items}</div>
<div id="egw_fw_menu" title="{title_menu}">
<audio id="egw_fw_menuAudioTag" autobuffer="autobuffer">