Mobile theme W.I.P.:

- Introduce mobile template-set
- Change loading mail index mobile template according to mobile template-set
This commit is contained in:
Hadi Nategh 2015-11-25 15:17:59 +00:00
parent cbfb44e551
commit ac16d1fb95
5 changed files with 15 additions and 18 deletions

View File

@ -505,6 +505,13 @@ class etemplate_new extends etemplate_widget_template
*/
public function read($name,$template_set=null,$lang='default',$group=0,$version='',$load_via='')
{
// For mobile experience try to load custom mobile templates
if (html::$ua_mobile)
{
$template_set = "mobile";
}
unset($lang); unset($group); // not used, but in old signature
$this->rel_path = self::relPath($this->name=$name, $this->template_set=$template_set,
$this->version=$version, $this->laod_via = $load_via);

View File

@ -439,7 +439,7 @@ class mail_ui
);
}
if (html::$ua_mobile) $content[self::$nm_index]['header_row'] = 'mail.mobile_index.header_right';
if (html::$ua_mobile) $content[self::$nm_index]['header_row'] = 'mail.index.header_right';
}
$content[self::$nm_index]['get_rows'] = 'mail_ui::get_rows';
@ -523,7 +523,7 @@ class mail_ui
$sel_options['filter2'] = $this->searchTypes;
$sel_options['filter'] = $this->statusTypes;
$etpl = new etemplate_new(html::$ua_mobile?'mail.mobile_index':'mail.index');
$etpl = new etemplate_new('mail.index');
// 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
$group=2;

View File

@ -858,7 +858,7 @@ blockquote blockquote blockquote blockquote blockquote blockquote{
and (max-device-width : 1024px)
and (orientation : portrait) {
#mail-index div#mail-index_nm tr.mail.row {
font-size: medium;
}
}
@ -867,7 +867,7 @@ and (orientation : portrait) {
and (min-width : 321px)
and (max-device-width:768){
#mail-index div#mail-index_nm tr.mail.row {
font-size: medium;
}
}

View File

@ -2,7 +2,7 @@
<!DOCTYPE overlay PUBLIC "-//Stylite AG//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
<!-- $Id$ -->
<overlay>
<template id="mail.mobile_index.rows" template="" lang="" group="0" version="1.9.001">
<template id="mail.index.rows" template="" lang="" group="0" version="1.9.001">
<grid width="100%">
<columns>
<column/>
@ -28,10 +28,10 @@
</rows>
</grid>
</template>
<template id="mail.mobile_index.header_right">
<template id="mail.index.header_right">
<hbox class="mail-index_quotabox"><progress id="nm[quotainpercent]" label="@nm[quota]" class="@nm[quotaclass]"/></hbox>
</template>
<template id="mail.mobile_index" template="" lang="" group="0" version="1.9.001">
<template id="mail.index" template="" lang="" group="0" version="1.9.001">
<tree autoloading="mail.mail_ui.ajax_foldertree" id="nm[foldertree]" onclick="app.mail.mail_changeFolder" parent_node="mail-tree_target"/>
<html id="msg"/>
<buttononly id="button[mailcreate]" onclick="app.mail.mail_compose(false);" label="Compose" parent_node="mail-index_buttonmailcreate"/>
@ -39,7 +39,7 @@
<description id="nm[vacationnotice]" class="@nm[vacationclass]"/>
<description id="nm[vacationrange]" class="@nm[vacationrangeclass]"/></vbox>
</hbox>
<nextmatch id="nm" onselect="app.mail.mail_preview" template="mail.mobile_index.rows" right_header="mail.mobile_index.header_right"/>
<nextmatch id="nm" onselect="app.mail.mail_preview" template="mail.index.rows" right_header="mail.index.header_right"/>
<iframe frameborder="1" id="extra_iframe" scrolling="auto" disabled="true"/>
</template>
</overlay>

View File

@ -855,17 +855,7 @@ blockquote blockquote blockquote blockquote blockquote blockquote {
}
}
/* tablets and smartphones (portrait) ----------- */
@media only screen and (max-device-width: 1024px) and (orientation: portrait) {
#mail-index div#mail-index_nm tr.mail.row {
font-size: medium;
}
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width: 321px) and (max-device-width: 768) {
#mail-index div#mail-index_nm tr.mail.row {
font-size: medium;
}
}
/* Mobile (landscape) Tablet----------- */
span#mail-compose_cc_expander,
span#mail-compose_bcc_expander,