calling app[appname].et2_ready(et2,name) with template name as second parameter

This commit is contained in:
Ralf Becker 2014-02-17 14:58:20 +00:00
parent 6a1b0e846d
commit d01d5119ca
2 changed files with 8 additions and 5 deletions

View File

@ -299,7 +299,9 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
}
if(typeof app[appname] == "object")
{
app_callback = function(et2) {app[appname].et2_ready(et2);};
app_callback = function(_et2, _name) {
app[appname].et2_ready(_et2, _name);
};
}
// Create the document fragment into which the HTML will be injected
@ -381,11 +383,11 @@ etemplate2.prototype.load = function(_name, _url, _data, _callback)
// Tell others about it
if(typeof _callback == "function")
{
_callback.call(window,this);
_callback.call(window,this,_name);
}
if(app_callback && _callback != app_callback)
{
app_callback.call(window,this);
app_callback.call(window,this,_name);
}
$j(this.DOMContainer).trigger('load', this);

View File

@ -110,9 +110,10 @@ var AppJS = Class.extend(
* make sure to clean it up in destroy(). Note that this can be called
* several times, with different et2 objects, as templates are loaded.
*
* @param et2 etemplate2 Newly ready object
* @param {etemplate2} et2
* @param {string} name template name
*/
et2_ready: function(et2) {
et2_ready: function(et2,name) {
if(this.et2 !== null)
{
egw.debug('log', "Changed et2 object");