Added addRelatedDependency method for TaskComponent widget-class

FEA: ItEr02S03MigracionZK5
This commit is contained in:
Farruco Sanjurjo 2010-08-31 11:31:11 +02:00
parent 43c2f05c7a
commit f614e7b35f
2 changed files with 6 additions and 2 deletions

View file

@ -12,8 +12,8 @@ ganttz.DependencyComponent = zk.$extends(zk.Widget,{
this._setupArrow();
YAHOO.util.Event.onDOMReady(this.proxy(function() {
this.draw();
// zkTask.addRelatedDependency(origin, dependency);
// zkTask.addRelatedDependency(destination, dependency);
ganttz.TaskComponent.$(this.getIdTaskOrig()).addRelatedDependency(this);
ganttz.TaskComponent.$(this.getIdTaskEnd()).addRelatedDependency(this);
}));
},
draw : function(){

View file

@ -16,6 +16,10 @@ ganttz.TaskComponent = zk.$extends(zk.Widget, {
this.domUnlisten_(this.$n(), "onMouseover", '_showTooltip');
this.$supers('unbind_', arguments);
},
addRelatedDependency : function(dependency){
if(this._dependencies == undefined) this._dependencies = [];
this._dependencies.push(dependency);
},
_showTooltip : function(){
this._tooltipTimeout = setTimeout(jq.proxy(function(offset) {
var element = jq("#tasktooltip" + this.uuid);