mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-27 16:15:42 +02:00
split constructor function and place of instanciation for app.js objects: app[appname] = new app.classes[appname]();
This commit is contained in:
@@ -214,7 +214,13 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
|
||||
// Initialize application js
|
||||
var app_callback = null;
|
||||
// Only initialize once
|
||||
if(typeof app[appname] == "function")
|
||||
// new app class with constructor function in app.classes[appname]
|
||||
if (typeof app[appname] !== 'object' && typeof app.classes[appname] == 'function')
|
||||
{
|
||||
app[appname] = new app.classes[appname]();
|
||||
}
|
||||
// old app class with constructor function in app[appname] (deprecated)
|
||||
else if(typeof app[appname] == "function")
|
||||
{
|
||||
(function() { new app[appname]();}).call();
|
||||
}
|
||||
|
Reference in New Issue
Block a user