Mobile theme W.I.P.:

- Fix error 500 happens when opening view template
- Implement better approach for specifying currentapp
This commit is contained in:
Hadi Nategh 2016-02-22 13:03:57 +00:00
parent 7224b39bf9
commit 848c7d71d2
2 changed files with 2 additions and 2 deletions

View File

@ -350,7 +350,7 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
this.template_base_url += _url.split(_name.split('.').shift())[0];
egw().debug("info", "Loaded data", _data);
var currentapp = this.app = _data.currentapp || window.egw_appName;
var currentapp = this.app = _data.currentapp || egw().app_name();
// extract $content['msg'] and call egw.message() with it
var msg = _data.content.msg;

View File

@ -455,7 +455,7 @@ var AppJS = Class.extend(
var templateName = _action.data.mobileViewTemplate || 'edit.xet';
var etemplate = new etemplate2 (this.viewTemplate[0], false);
var template = egw.webserverUrl+ '/' + this.appname + '/templates/mobile/'+templateName+'?1';
var data = {content:content, readonlys:{'__ALL__':true,'link_to':false}};
var data = {content:content, readonlys:{'__ALL__':true,'link_to':false}, currentapp:id_app[0]};
if(template.indexOf('.xet') > 0)
{