[Bug #1120] Fixed appearance of labels on tasks when its parent is expanded

FEA: ItEr75S04BugFixing
This commit is contained in:
Lorenzo Tilve Álvaro 2011-10-27 20:14:16 +02:00
parent c46917ba1c
commit d0f0a90239
3 changed files with 11 additions and 3 deletions

View file

@ -766,11 +766,11 @@ public class Planner extends HtmlMacroComponent {
getDependencyList().redrawDependencies();
if (isShowingLabels) {
Clients.evalJavaScript("zkTasklist.showAllTooltips();");
Clients.evalJavaScript("ganttz.TaskList.getInstance().showAllTaskLabels();");
}
if (isShowingResources) {
Clients.evalJavaScript("zkTasklist.showResourceTooltips();");
Clients.evalJavaScript("ganttz.TaskList.getInstance().showResourceTooltips();");
}
}

View file

@ -139,7 +139,7 @@ public class TaskContainer extends Task {
private void refreshTooltips() {
// Could be optimized asking planner for tooltips display state to
// create expanded elements with the proper state
Clients.evalJavaScript("zkTasklist.refreshTooltips();");
Clients.evalJavaScript("ganttz.TaskList.getInstance().refreshTooltips();");
}
@Override

View file

@ -24,6 +24,14 @@ ganttz.TaskList = zk.$extends(zk.Widget, {
legendResize : function() {
var taskdetailsContainer = jq('.taskdetailsContainer')[0];
jq('.legend-container').width(taskdetailsContainer.clientWidth-75);
},
refreshTooltips : function() {
if (jq('.show-resources').hasClass('clicked')) {
this.showResourceTooltips();
}
if (jq('.show-labels').hasClass('clicked')) {
this.showAllTaskLabels();
}
}
},{//Class stuff