- improved mobile template: calendar & email sidebox is showing now, removed most of the former css hidden stuff

- fixes jscalendar to work will in sliding sidebox
This commit is contained in:
Ralf Becker 2011-07-09 16:35:18 +00:00
parent 79fa226d83
commit 8e83e41263
5 changed files with 53 additions and 31 deletions

View File

@ -1078,7 +1078,8 @@ Calendar._keyEvent = function(ev) {
Calendar.prototype._init = function (firstDayOfWeek, date) {
var today = new Date();
date.setHours(12); // Bugfix: Required for daylight saving!!!
this.table.style.visibility = "hidden";
// disabled, as it seems not to be needed and stalls hiding sidebox in calendar
//this.table.style.visibility = "hidden";
var year = date.getFullYear();
if (year < this.minYear) {
year = this.minYear;
@ -1177,7 +1178,8 @@ Calendar.prototype._init = function (firstDayOfWeek, date) {
this.ar_days = ar_days;
Calendar._setCellText(this.title,this.params ? this.date.print(this.params.titleFormat) : Calendar._MN[month] + ", " + year);
this.onSetTime();
this.table.style.visibility = "visible";
// disabled, as it seems not to be needed and stalls hiding sidebox in calendar
//this.table.style.visibility = "visible";
// PROFILE
// Calendar._setCellText(this.tooltips,"Generated in " + ((new Date()) - today) + " ms");
};

View File

@ -6,18 +6,14 @@
<!-- BEGIN app_extra_icons_div -->
<script language="javascript">
new ypSlideOutMenu("menu1", "down", 10, {menu1top}, 160, 200,'right');
new ypSlideOutMenu("menu1", "down", 10, {menu1top}, 180, 200,'right');
</script>
<div id="menu1Container">
<div id="menu1Content" style="position: relative; left: 0; text-align: left;">
<div id="extraIcons">
<a id="menu1close" href="#" {show_menu_event}="ypSlideOutMenu.hide('menu1')" title="{lang_close}"><img style="" border="0" src="{img_root}/close.png"/></a>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td colspan="2" nowrap="nowrap" align="right" style="background-color:#dddddd; padding:1px;">
<a href="#" {show_menu_event}="ypSlideOutMenu.hide('menu1')" title="{lang_close}"><img style="" border="0" src="{img_root}/close.png"/></a>
</td>
</tr>
<!-- BEGIN app_extra_block -->
<tr>
<td class="extraIconsRow"><a href="{url}" {target}><img src="{icon}" alt="{title}" title="{title}" width="16" border="0" /></a></td>
@ -31,6 +27,7 @@
<!-- END app_extra_icons_div -->
<div id="divMain">
<!-- BEGIN navbar -->
<div id="divUpperTabs">
<ul>
<!-- BEGIN upper_tab_block -->
@ -50,7 +47,9 @@
<!-- END app_icon_block -->
<!-- BEGIN app_extra_icons_icon -->
<td width="26" valign="top" align="right" style="padding-right:3px; padding-top:20px;">
<!-- BEGIN extra_icons_show -->
<a id="extra_icons_show" title="{lang_show_more_apps}" href="#" {show_menu_event}="ypSlideOutMenu.showMenu('menu1')"><img src="{img_root}/extra_icons.png" border="0" /></a>
<!-- END extra_icons_show -->
</td>
<!-- END app_extra_icons_icon -->
</tr>
@ -69,6 +68,7 @@
<td align="center" id="admin_info">{current_users}</td>
<td width="33%" align="right" id="quick_add">{quick_add}</td>
</tr></table></div>
<!-- END navbar -->
<!-- END navbar_header -->
@ -102,7 +102,7 @@
<!-- BEGIN sidebox_hide_footer -->
</div>
</td><td style="padding-top:10px" valign="top">
</td><td id="menu2handle" valign="top">
<a href="#" onclick="ypSlideOutMenu.hide('menu2')" ><img src="{img_root}/dragarea_left.png" align="right" /></a>
</td>
</tr></table>
@ -167,9 +167,3 @@
<div class="sideboxSpace"></div>
<!-- END extra_blocks_footer -->

View File

@ -146,6 +146,12 @@ class idots_framework extends egw_framework
$this->tpl->set_block('navbar','app_extra_icons_div');
$this->tpl->set_block('navbar','app_extra_icons_icon');
if (html::$ua_mobile) // replace whole navbar with just the extra apps icon
{
$this->tpl->set_block('navbar','navbar','mobil_not_needed');
$this->tpl->set_block('app_extra_icons_icon','extra_icons_show');
$this->tpl->set_var('mobil_not_needed',$this->tpl->get_var('extra_icons_show'));
}
$this->tpl->set_block('navbar','navbar_header','navbar_header');
$apps = $this->_get_navbar_apps();
@ -156,7 +162,7 @@ class idots_framework extends egw_framework
{
$content .= '<script type="text/javascript">'."\nwindow.egw_link_registry=".egw_link::json_registry().";\n</script>\n";
}
if($GLOBALS['egw_info']['user']['preferences']['common']['show_general_menu'] != 'sidebox')
if($GLOBALS['egw_info']['user']['preferences']['common']['show_general_menu'] != 'sidebox' && !html::$ua_mobile)
{
$content .= $this->topmenu($vars,$apps);
$vars['current_users'] = $vars['quick_add'] = $vars['user_info']='';
@ -208,7 +214,7 @@ class idots_framework extends egw_framework
if($this->sidebox_content)
{
if($GLOBALS['egw_info']['user']['preferences']['common']['auto_hide_sidebox'])
if($GLOBALS['egw_info']['user']['preferences']['common']['auto_hide_sidebox'] || html::$ua_mobile)
{
$this->tpl->set_var('lang_show_menu',lang('show menu'));
$content .= $this->tpl->parse('out','sidebox_hide_header');
@ -579,8 +585,8 @@ class idots_framework extends egw_framework
$var['app_titles'] = '<td colspan="'.$max_icons.'">&nbsp;</td>';
}
// mobile support
$var['menu1top'] = html::$ua_mobile ? 20 : 114;
$var['menu2top'] = html::$ua_mobile ? 20 : 105;
$var['menu1top'] = html::$ua_mobile ? 0 : 114;
$var['menu2top'] = html::$ua_mobile ? 0 : 105;
return $var;
}

View File

@ -69,7 +69,17 @@ a:hover,a:active
z-index:100;
position:absolute;
left:0px;
top:105px"
top:105px;
}
#menu2handle {
padding-top: 10px;
}
#menu1close {
position: absolute;
right: 7px;
top: 7px;
}
/*

View File

@ -4,29 +4,31 @@
* @version $Id$
*/
#divLogo,#XXXdivAppIconBar,#tdSidebox,#divStatusBar,#topmenu,#divGenTime,#divPoweredBy,#divUpperTabs,.tdAppIcon,#divAppboxHeader {
#divLogo,#tdSidebox,#divGenTime,#divPoweredBy,#divUpperTabs,#divAppboxHeader {
display:none;
}
#divAppIconBar {
position: relative;
height: 0px;
overflow: visible;
border: none;
}
#extra_icons_show {
position: absolute;
top: 0;
top: 17px;
left: 0;
}
#menu1Container {
left: 5px;
left: 0px;
}
td.extraIconsRow {
padding-top: 5px;
padding-bottom: 5px;
}
#sideboxdragarea {
top: 20px;
top: 60px;
}
#menu2handle {
padding-top: 60px;
}
#divMain,#popupMainDiv {
@ -42,3 +44,11 @@
#divAppboxHeader {
background: none;
}
div#divAppbox {
min-height: 768px;
}
div.prefAppBox {
width: 215px;
}