[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA2-1497-ga7ec18f

Marc Delisle lem9 at users.sourceforge.net
Sun Jan 30 14:37:17 CET 2011


The branch, master has been updated
       via  a7ec18fde9b382a1e3b82e2f0df98db701a95bc4 (commit)
      from  c432089db8041ae0b2f2f725076ba1a169a416db (commit)


- Log -----------------------------------------------------------------
commit a7ec18fde9b382a1e3b82e2f0df98db701a95bc4
Author: Marc Delisle <marc at infomarc.info>
Date:   Sun Jan 30 08:32:13 2011 -0500

    Bug #3167048 Error when viewing table content/structure
    (Also this bug caused the chosen table not to be marked in navi panel)

-----------------------------------------------------------------------

Summary of changes:
 js/common.js |   32 ++++----------------------------
 1 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/js/common.js b/js/common.js
index 0ab1e88..b3e996c 100644
--- a/js/common.js
+++ b/js/common.js
@@ -206,40 +206,16 @@ function refreshNavigation(force) {
     }
 }
 
-/**
- * adds class to element
- */
-function addClass(element, classname)
-{
-    if (element != null) {
-        $("#"+element).addClass(classname);
-        //alert('set class: ' + classname + ', now: ' + element.className);
-    }
-}
-
-/**
- * removes class from element
- */
-function removeClass(element, classname)
-{
-    if (element != null) {
-        $("#"+element).removeClass(classname);
-        //alert('removed class: ' + classname + ', now: ' + element.className);
-    }
-}
-
 function unmarkDbTable(db, table)
 {
     var element_reference = window.frame_navigation.document.getElementById(db);
     if (element_reference != null) {
-        //alert('remove from: ' + db);
-        removeClass(element_reference.parentNode, 'marked');
+        $(element_reference).parent().removeClass('marked');
     }
 
     element_reference = window.frame_navigation.document.getElementById(db + '.' + table);
     if (element_reference != null) {
-        //alert('remove from: ' + db + '.' + table);
-        removeClass(element_reference.parentNode, 'marked');
+        $(element_reference).parent().removeClass('marked');
     }
 }
 
@@ -247,7 +223,7 @@ function markDbTable(db, table)
 {
     var element_reference = window.frame_navigation.document.getElementById(db);
     if (element_reference != null) {
-        addClass(element_reference.parentNode, 'marked');
+        $(element_reference).parent().addClass('marked');
         // scrolldown
         element_reference.focus();
         // opera marks the text, we dont want this ...
@@ -256,7 +232,7 @@ function markDbTable(db, table)
 
     element_reference = window.frame_navigation.document.getElementById(db + '.' + table);
     if (element_reference != null) {
-        addClass(element_reference.parentNode, 'marked');
+        $(element_reference).parent().addClass('marked');
         // scrolldown
         element_reference.focus();
         // opera marks the text, we dont want this ...


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list