Register an app_refresh function to handle the special case of framwork detecting same URL = simple refresh on egw_refresh(), and reload iframe. Fixes open admin tab not re-loading a link that was used to open the tab.

This commit is contained in:
Nathan Gray 2014-02-06 16:55:38 +00:00
parent 6a8802fc35
commit a45bc7f4a4

View File

@ -73,10 +73,30 @@ app.classes.admin = AppJS.extend(
self.splitter.resize(); self.splitter.resize();
} }
); );
// Register app refresh now that iframe is available
register_app_refresh('admin',jQuery.proxy(this.refresh,this));
} }
this.splitter = this.et2.getWidgetById('splitter'); this.splitter = this.et2.getWidgetById('splitter');
}, },
/**
* Special handling for egw_refresh() in admin, to refresh the iframe when
* the framework detects a simple refresh can be used (same URL).
*
* All parameters ignored.
*
* @param {string} _msg Message to display
* @param {string} _app Application being refreshed, should be 'admin'
* @param {string} _id Unique record ID.
* @param {string} _type=null Type of refresh. Either 'edit', 'delete',
* 'add' or null
*/
refresh: function(_msg, _app, _id, _type)
{
this.linkHandler(window.framework.getApplicationByName(_app).browser.currentLocation);
},
/** /**
* Hide navbar for idots template * Hide navbar for idots template
* *