From a7ec18fde9b382a1e3b82e2f0df98db701a95bc4 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 30 Jan 2011 08:32:13 -0500 Subject: [PATCH] Bug #3167048 Error when viewing table content/structure (Also this bug caused the chosen table not to be marked in navi panel) --- js/common.js | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/js/common.js b/js/common.js index 0ab1e8890..b3e996c02 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 ... -- 2.11.4.GIT