SAAS-1184 - bugfixes and polish
This commit is contained in:
parent
f352b61707
commit
bb7f8c1ed3
10 changed files with 105 additions and 24 deletions
|
@ -136,6 +136,13 @@ var AIRTIME = (function(AIRTIME){
|
|||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Internal destructor. Can be assigned via assignOnCloseHandler
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
Tab.prototype._destroy = function () {}
|
||||
|
||||
/**
|
||||
* Assign the given function f as the click handler for the tab
|
||||
*
|
||||
|
@ -164,6 +171,15 @@ var AIRTIME = (function(AIRTIME){
|
|||
this.tab.find(".lib_pl_close").unbind("click").click(f);
|
||||
};
|
||||
|
||||
/**
|
||||
* Assign an implicit destructor
|
||||
*
|
||||
* @param {function} fn function to run when this Tab is destroyed
|
||||
*/
|
||||
Tab.prototype.assignOnCloseHandler = function (fn) {
|
||||
this._destroy = fn;
|
||||
};
|
||||
|
||||
/**
|
||||
* Open this tab in the right-hand pane and set it as the currently active tab
|
||||
*/
|
||||
|
@ -205,6 +221,8 @@ var AIRTIME = (function(AIRTIME){
|
|||
} else {
|
||||
mod.onResize();
|
||||
}
|
||||
|
||||
self._destroy();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue