From eaa8614f90359e3114c4d71fe80a80de80b070b0 Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Fri, 8 Jun 2012 09:20:47 +0200 Subject: [PATCH] Bug #1439: Fix issue changing JavaScript to show/hide labels As the resources text case was working properly, a similar code has been used for the labels. FEA: ItEr76S04BugFixing --- ganttzk/src/main/resources/web/js/ganttz/TaskComponent.js | 4 ++-- ganttzk/src/main/resources/web/js/ganttz/TaskList.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ganttzk/src/main/resources/web/js/ganttz/TaskComponent.js b/ganttzk/src/main/resources/web/js/ganttz/TaskComponent.js index 4a803d8e1..86de72579 100644 --- a/ganttzk/src/main/resources/web/js/ganttz/TaskComponent.js +++ b/ganttzk/src/main/resources/web/js/ganttz/TaskComponent.js @@ -231,10 +231,10 @@ ganttz.TaskComponent = zk.$extends(zul.Widget, { jq('#'+ this.uuid + ' .task-resources').hide(); }, showLabels : function(){ - jq('.task-labels',this.$n()).show(); + jq('#'+ this.uuid + ' .task-labels').show(); }, hideLabels : function(){ - jq('.task-labels',this.$n()).hide(); + jq('#'+ this.uuid + ' .task-labels').hide(); }, setClass : function(cssClass){ jq(this.$n()).removeClass().addClass(cssClass); diff --git a/ganttzk/src/main/resources/web/js/ganttz/TaskList.js b/ganttzk/src/main/resources/web/js/ganttz/TaskList.js index 309afa191..307902894 100644 --- a/ganttzk/src/main/resources/web/js/ganttz/TaskList.js +++ b/ganttzk/src/main/resources/web/js/ganttz/TaskList.js @@ -10,7 +10,8 @@ ganttz.TaskList = zk.$extends(zk.Widget, { child.showLabels(); }, hideAllTaskLabels : function(){ - jq('.task-labels').css('display','none'); + for(var child = this.firstChild; child; child = child.nextSibling) + child.hideLabels(); }, showResourceTooltips : function(){ for(var child = this.firstChild; child; child = child.nextSibling)