From f3c3fedf328ea917a2a042c789e35a0cab2a92a6 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 28 Nov 2014 17:34:38 +0000 Subject: [PATCH] If the current application does not own the template, load the javascript for the current application and the application owning the template. (Gets actions working reliably in home) --- etemplate/js/etemplate2.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index c5b5a88436..75e8d3cd02 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -329,6 +329,12 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback) { egw.debug("warn", "Did not load '%s' JS object",appname); } + // If etemplate current app does not match app owning the template, + // initialize the current app too + if (typeof app[this.app] !== 'object' && typeof app.classes[this.app] == 'function') + { + app[this.app] = new app.classes[this.app](); + } if(typeof app[appname] == "object") { app_callback = function(_et2, _name) {