Fix modified view templates are not getting updated because of no cache-buster modification timestamp

This commit is contained in:
Hadi Nategh 2016-05-25 16:44:23 +02:00
parent 14415720bc
commit 60bc400313
7 changed files with 12 additions and 8 deletions

View File

@ -216,14 +216,14 @@ class addressbook_hooks
$settings['geolocation_src'] = array( $settings['geolocation_src'] = array(
'type' => 'select', 'type' => 'select',
'label' => 'Default geolocation source address', 'label' => 'Default GeoLocation source address',
'name' => 'geolocation_src', 'name' => 'geolocation_src',
'values' => array( 'values' => array(
'browser' => lang('Browser location'), 'browser' => lang('Browser location'),
'one' => lang('Business address'), 'one' => lang('Business address'),
'two' => lang('Private address') 'two' => lang('Private address')
), ),
'help' => 'Select a source address to be used in geolocation routing system', 'help' => 'Select a source address to be used in GeoLocation routing system',
'xmlrpc' => True, 'xmlrpc' => True,
'admin' => false, 'admin' => false,
'default'=> 'browser', 'default'=> 'browser',

View File

@ -786,7 +786,7 @@ class addressbook_ui extends addressbook_bo
if (Api\Header\UserAgent::mobile()) if (Api\Header\UserAgent::mobile())
{ {
$actions['open']['onExecute'] = 'javaScript:app.addressbook.viewEntry'; $actions['open']['onExecute'] = 'javaScript:app.addressbook.viewEntry';
$actions['open']['mobileViewTemplate'] = 'view'; $actions['open']['mobileViewTemplate'] = 'view?'.filemtime(Api\Etemplate\Widget\Template::rel2path('/addressbook/templates/mobile/view.xet'));
$actions['view']['default'] = false; $actions['view']['default'] = false;
$actions['open']['default'] = true; $actions['open']['default'] = true;
} }

View File

@ -465,8 +465,10 @@ var AppJS = (function(){ "use strict"; return Class.extend(
.addClass('et2_mobile-view-container popupMainDiv') .addClass('et2_mobile-view-container popupMainDiv')
.appendTo(this.viewContainer); .appendTo(this.viewContainer);
var templateName = _action.data.mobileViewTemplate || 'edit'; var mobileViewTemplate = (_action.data.mobileViewTemplate ||'edit').split('?');
var templateURL = egw.webserverUrl+ '/' + this.appname + '/templates/mobile/'+templateName+'.xet'+'?1'; var templateName = mobileViewTemplate[0];
var templateTimestamp = mobileViewTemplate[1];
var templateURL = egw.webserverUrl+ '/' + this.appname + '/templates/mobile/'+templateName+'.xet'+'?'+templateTimestamp;
var data = {content:content, readonlys:{'__ALL__':true,'link_to':false}, currentapp:this.appname}; var data = {content:content, readonlys:{'__ALL__':true,'link_to':false}, currentapp:this.appname};
// etemplate2 object for view // etemplate2 object for view

View File

@ -151,7 +151,7 @@ class filemanager_ui
'group' => $group, 'group' => $group,
'allowOnMultiple' => false, 'allowOnMultiple' => false,
'onExecute' => Api\Header\UserAgent::mobile()?'javaScript:app.filemanager.viewEntry':'javaScript:app.filemanager.editprefs', 'onExecute' => Api\Header\UserAgent::mobile()?'javaScript:app.filemanager.viewEntry':'javaScript:app.filemanager.editprefs',
'mobileViewTemplate' => 'file' 'mobileViewTemplate' => 'file?'.filemtime(Api\Etemplate\Widget\Template::rel2path('/filemanager/templates/mobile/file.xet'))
), ),
'mkdir' => array( 'mkdir' => array(
'caption' => lang('Create directory'), 'caption' => lang('Create directory'),

View File

@ -1079,6 +1079,7 @@ class infolog_ui
'url' => 'menuaction=infolog.infolog_ui.edit&info_id=$id', 'url' => 'menuaction=infolog.infolog_ui.edit&info_id=$id',
'popup' => Link::get_registry('infolog', 'add_popup'), 'popup' => Link::get_registry('infolog', 'add_popup'),
'group' => $group=1, 'group' => $group=1,
'mobileViewTemplate' => 'edit?'.filemtime(Api\Etemplate\Widget\Template::rel2path('/infolog/templates/mobile/edit.xet'))
), ),
'parent' => array( 'parent' => array(
'caption' => 'View parent with children', 'caption' => 'View parent with children',

View File

@ -939,7 +939,7 @@ class mail_ui
'onExecute' => Api\Header\UserAgent::mobile()?'javaScript:app.mail.mobileView':'javaScript:app.mail.mail_open', 'onExecute' => Api\Header\UserAgent::mobile()?'javaScript:app.mail.mobileView':'javaScript:app.mail.mail_open',
'allowOnMultiple' => false, 'allowOnMultiple' => false,
'default' => true, 'default' => true,
'mobileViewTemplate' => 'view' 'mobileViewTemplate' => 'view?'.filemtime(Api\Etemplate\Widget\Template::rel2path('/mail/templates/mobile/view.xet'))
), ),
'reply' => array( 'reply' => array(
'caption' => 'Reply', 'caption' => 'Reply',

View File

@ -946,7 +946,8 @@ class timesheet_ui extends timesheet_bo
'popup' => Link::get_registry('timesheet', 'add_popup'), 'popup' => Link::get_registry('timesheet', 'add_popup'),
'group' => $group=1, 'group' => $group=1,
'disableClass' => 'th', 'disableClass' => 'th',
'onExecute' => Api\Header\UserAgent::mobile()?'javaScript:app.timesheet.viewEntry':'' 'onExecute' => Api\Header\UserAgent::mobile()?'javaScript:app.timesheet.viewEntry':'',
'mobileViewTemplate' => 'edit?'.filemtime(Api\Etemplate\Widget\Template::rel2path('/timesheet/templates/mobile/edit.xet'))
), ),
/* /*
'view' => array( 'view' => array(