Mobile theme W.I.P.:

- Load edit.xet if there's no view template available
- Remove email,phone, link icons from AB edit
This commit is contained in:
Hadi Nategh 2016-02-04 17:25:52 +00:00
parent cb61fa7d4e
commit d2a416baae
4 changed files with 14 additions and 7 deletions

View File

@ -741,7 +741,11 @@ class addressbook_ui extends addressbook_bo
if (isset($actions['export']['children']['csv']) && !importexport_helper_functions::has_definitions('addressbook','export')) unset($actions['export']['children']['csv']); if (isset($actions['export']['children']['csv']) && !importexport_helper_functions::has_definitions('addressbook','export')) unset($actions['export']['children']['csv']);
// Intercept open action in order to open entry into view mode instead of edit // Intercept open action in order to open entry into view mode instead of edit
if (html::$ua_mobile) $actions['open']['onExecute'] = 'javaScript:app.addressbook.viewEntry'; if (html::$ua_mobile)
{
$actions['open']['onExecute'] = 'javaScript:app.addressbook.viewEntry';
$actions['open']['mobileViewTemplate'] = 'view.xet';
}
//echo "<p>".__METHOD__."($do_email, $tid_filter, $org_view)</p>\n"; _debug_array($actions); //echo "<p>".__METHOD__."($do_email, $tid_filter, $org_view)</p>\n"; _debug_array($actions);
// Allow contacts to be dragged // Allow contacts to be dragged

View File

@ -532,8 +532,10 @@ input.et2_radiobox {
#addressbook-edit #addressbook-edit_room { #addressbook-edit #addressbook-edit_room {
margin-left: 0; margin-left: 0;
} }
#addressbook-edit a.et2_url.url,
#addressbook-edit a.et2_url.phone,
#addressbook-edit a.et2_url.email { #addressbook-edit a.et2_url.email {
display: none; display: none !important;
} }
#addressbook-index table.egwGridView_outer tbody span[id^='addressbook-index_'][id$='line1]'] { #addressbook-index table.egwGridView_outer tbody span[id^='addressbook-index_'][id$='line1]'] {
font-size: 12pt; font-size: 12pt;

View File

@ -433,8 +433,8 @@ div.addressbook_edit_general_picture img {
#addressbook-edit_adr_one_locality, #addressbook-edit_adr_two_locality, #addressbook-edit_room{ #addressbook-edit_adr_one_locality, #addressbook-edit_adr_two_locality, #addressbook-edit_room{
margin-left:0; margin-left:0;
} }
a.et2_url.email { a.et2_url.url, a.et2_url.phone, a.et2_url.email {
display: none; display: none !important;
} }
} }

View File

@ -427,7 +427,7 @@ var AppJS = Class.extend(
bottom:0, bottom:0,
right:0, right:0,
overflow:'auto', overflow:'auto',
"padding-top":'60px'}) "padding":'60px 0 10px 0'})
.attr('id','popupMainDiv') .attr('id','popupMainDiv')
.appendTo('body'); .appendTo('body');
@ -452,9 +452,10 @@ var AppJS = Class.extend(
.addClass('et2_mobile-view-container') .addClass('et2_mobile-view-container')
.appendTo(this.viewContainer); .appendTo(this.viewContainer);
var templateName = _action.data.mobileViewTemplate || 'edit.xet';
var etemplate = new etemplate2 (this.viewTemplate[0], false); var etemplate = new etemplate2 (this.viewTemplate[0], false);
var template = egw.webserverUrl+ '/' + this.appname + '/templates/mobile/view.xet?1'; var template = egw.webserverUrl+ '/' + this.appname + '/templates/mobile/'+templateName+'?1';
var data = {content:content, readonlys:{'__ALL__':true,'edit':false}}; var data = {content:content, readonlys:{'__ALL__':true,'link_to':false}};
if(template.indexOf('.xet') > 0) if(template.indexOf('.xet') > 0)
{ {