if(!tab){
return null;
}
- if(tab == this.active || tab.disabled){
- return tab;
- }
- var e = {};
- this.fireEvent("beforetabchange", this, e, tab);
- if(e.cancel !== true && !tab.disabled){
- if(this.active){
- this.active.hide();
+
+ if(this.fireEvent("beforetabchange", this, e, tab) !== false){
+ if(tab == this.active || tab.disabled){
+ return tab;
}
- this.active = this.items[id];
- this.active.show();
- this.fireEvent("tabchange", this, this.active);
+// var e = {};
+// this.fireEvent("beforetabchange", this, e, tab);
+// if(e.cancel !== true && !tab.disabled){
+ if(this.active){
+ this.active.hide();
+ }
+ this.active = this.items[id];
+ this.active.show();
+ this.fireEvent("tabchange", this, this.active);
+// }
+ return tab;
}
- return tab;
+
+
},
/**