[Bug #1215] Store the labels hidden/shown state in the TaskRow widget and use that state when redrawing the TaskComponents.
FEA: ItEr75S04BugFixing
This commit is contained in:
parent
e3fe3f1a27
commit
25b367cccb
4 changed files with 20 additions and 2 deletions
|
|
@ -213,6 +213,12 @@ ganttz.TaskComponent = zk.$extends(zul.Widget, {
|
|||
hideResourceTooltip : function(){
|
||||
jq('#'+ this.uuid + ' .task-resources').hide();
|
||||
},
|
||||
showLabels : function(){
|
||||
jq('.task-labels',this.$n()).show();
|
||||
},
|
||||
hideLabels : function(){
|
||||
jq('.task-labels',this.$n()).hide();
|
||||
},
|
||||
setClass : function(cssClass){
|
||||
jq(this.$n()).addClass(cssClass);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ ganttz.TaskList = zk.$extends(zk.Widget, {
|
|||
this.$class.setInstance(this);
|
||||
},
|
||||
showAllTaskLabels : function(){
|
||||
jq('.task-labels').css('display','inline');
|
||||
for(var child = this.firstChild; child; child = child.nextSibling)
|
||||
child.showLabels();
|
||||
},
|
||||
hideAllTaskLabels : function(){
|
||||
jq('.task-labels').css('display','none');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,15 @@
|
|||
zk.$package("ganttz");
|
||||
|
||||
ganttz.TaskRow = zk.$extends(zk.Widget, {
|
||||
_labelsHidden : true,
|
||||
showLabels : function(){
|
||||
this._labelsHidden = false;
|
||||
this.firstChild.showLabels();
|
||||
},
|
||||
hideLabels : function(){
|
||||
this._labelsHidden = true;
|
||||
this.firstChild.hideLabels();
|
||||
},
|
||||
hideResourceTooltip : function(){
|
||||
this.firstChild.hideResourceTooltip();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ function(out){
|
|||
' z.type="ganttz.task.Task" idTask="', this.id,'"',
|
||||
' class="box" >');
|
||||
|
||||
out.push('<div class="task-labels">', this.getLabelsText(),'</div>');
|
||||
out.push('<div class="task-labels" ',
|
||||
this.parent._labelsHidden?'>':'style="display:block;">',
|
||||
this.getLabelsText(),'</div>');
|
||||
out.push('<div class="task-resources">');
|
||||
out.push('<div class="task-resources-inner">', this.getResourcesText(),'</div>');
|
||||
out.push('</div>');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue