Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Przybylski <piotrprz@gmail.com>2011-09-20 15:02:30 +0400
committerPiotr Przybylski <piotrprz@gmail.com>2011-09-20 15:02:30 +0400
commitd32bcb16c6ef836c1eb1cf34d389f4ac70321857 (patch)
tree0a4b9d7d2d1fc7143cbac72118ca07626c9df937 /js/config.js
parent95e6e0b447333b888c7836d6e6cb773e3d73b092 (diff)
Better looking settings tabs in pmahomme
Diffstat (limited to 'js/config.js')
-rw-r--r--js/config.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/js/config.js b/js/config.js
index 53702e3938..b965045ca8 100644
--- a/js/config.js
+++ b/js/config.js
@@ -511,9 +511,9 @@ $(function() {
*/
function setTab(tab_id)
{
- $('.tabs a').removeClass('active').filter('[href=' + tab_id + ']').addClass('active');
- $('.tabs_contents fieldset').hide().filter(tab_id).show();
- location.hash = 'tab_' + tab_id.substr(1);
+ $('.tabs li').removeClass('active').find('a[href=#' + tab_id + ']').parent().addClass('active');
+ $('.tabs_contents fieldset').hide().filter('#' + tab_id).show();
+ location.hash = 'tab_' + tab_id;
$('.config-form input[name=tab_hash]').val(location.hash);
}
@@ -526,9 +526,10 @@ $(function() {
tabs.find('a')
.click(function(e) {
e.preventDefault();
- setTab($(this).attr('href'));
+ setTab($(this).attr('href').substr(1));
})
.filter(':first')
+ .parent()
.addClass('active');
$('.tabs_contents fieldset').hide().filter(':first').show();
@@ -539,7 +540,7 @@ $(function() {
if (location.hash != prev_hash) {
prev_hash = location.hash;
if (location.hash.match(/^#tab_.+/) && $('#' + location.hash.substr(5)).length) {
- setTab('#' + location.hash.substr(5));
+ setTab(location.hash.substr(5));
}
}
};