I got some trouble with the tab controls
var tabx = $(this.root.baseDiv).tabs("getTabIndex", this.settings.Text);
$(this.root.baseDiv).tabs("close", tabx);
$(this.root.baseDiv).tabs("add", { title: this.settings.Text, content: this.baseDiv, closable: true });
This is totally not working ! It doesn't close the tabs, and if I delete manually, it will create two tabs on next try.
If I replace second line with : $(this.root.baseDiv).tabs("close", 0);
The tab is only removed the second time, I add a tab ! And always with double tabs.