var browserIndex = sender.parent.value;
var currentIndex = this.$.tabs.getValue();
if (this.$.tabs.getControls().length > 2) {
this.$["tab" + browserIndex].destroy();
this.$["browser" + browserIndex].destroy();
if (browserIndex == currentIndex) {
//start by looking left
for (var i = currentIndex-1; i > -1; i--) {
if (this.$["tab" + (i)]) {
this.$.tabs.setValue(i);
this.tabChanged(this.$.tabs);
return true;
}
}
//then look right if not found
for (var i = currentIndex+1; i < this.tabCount+1; i++) {
if (this.$["tab" + (i)]) {
this.$.tabs.setValue(i);
this.tabChanged(this.$.tabs);
return true;
}
}
}
}
return true;
3. Reboot tablet
4. Done
To save possible error (for non-coders) could you post the edited version in a zipped file for a file replacement please?
ReplyDeleteKnow I haven't coded since college and there three locations on closeTab with { }.
When we coded we used programs similar to NotePad2 that had line numbers. Then you could point to the issue and line number ## through ## to edit.
Sure a lot better to have addresses and line numbers rather than Search & Replace.
NotePad2 can be downloaded from Flo's Freeware
ReplyDeletehttp://www.flos-freeware.ch/notepad2.html