]> git.joonet.de Git - adminer.git/commitdiff
AJAX: fix active link
authorJakub Vrana <jakub@vrana.cz>
Thu, 2 Dec 2010 21:20:01 +0000 (22:20 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 3 Dec 2010 18:42:10 +0000 (19:42 +0100)
adminer/static/functions.js

index ee717fa8d2707ae9b6d24e961a792502a233f725..7bcc235cd7dd8b3bc368685f6da0cf98995e6b68 100644 (file)
@@ -250,8 +250,9 @@ function ajaxSend(url, data) {
                        }
                        
                        var as = document.getElementById('menu').getElementsByTagName('a');
+                       var href = location.href.replace(/(&(sql=|dump=|(select|table)=[^&]*)).*/, '$1');
                        for (var i=0; i < as.length; i++) {
-                               if (location.href == as[i].href) {
+                               if (href == as[i].href) {
                                        as[i].className = 'active';
                                } else if (as[i].className == 'active') {
                                        as[i].className = '';