projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e63d4c4
)
TabMenus now properly revert if hash is empty
author
Alexander Ebert
<ebert@woltlab.com>
Tue, 31 Jan 2012 17:00:07 +0000
(18:00 +0100)
committer
Alexander Ebert
<ebert@woltlab.com>
Tue, 31 Jan 2012 17:00:07 +0000
(18:00 +0100)
Fixes #397
wcfsetup/install/files/js/WCF.js
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install/files/js/WCF.js
b/wcfsetup/install/files/js/WCF.js
index bc3364feda1de91749781de3cb52f1e59e78bafd..8149c828aa746e5b9a11881264e8e8737c91dd02 100644
(file)
--- a/
wcfsetup/install/files/js/WCF.js
+++ b/
wcfsetup/install/files/js/WCF.js
@@
-2223,6
+2223,12
@@
WCF.TabMenu = {
}
}
}
+ else {
+ // revert to default values
+ for (var $containerID in this._containers) {
+ this._containers[$containerID].wcfTabs('revertToDefault');
+ }
+ }
}
};
@@
-4388,6
+4394,16
@@
$.widget('ui.wcfTabs', $.ui.tabs, {
});
return $matches;
+ },
+
+ /**
+ * Shows default tab.
+ */
+ revertToDefault: function() {
+ var $active = this.element.data('active');
+ if (!$active || $active === '') $active = 0;
+
+ this.select($active);
}
});