Adding a dependency is cancelled if you click anywhere that's not a task

FEA: ItEr02S03MigracionZK5
This commit is contained in:
Farruco Sanjurjo 2010-12-20 11:48:48 +01:00
parent 2e99fc12dc
commit 0660490c9b

View file

@ -289,8 +289,10 @@ ganttz.UnlinkedDependencyComponent = zk.$extends(ganttz.DependencyComponentBase,
var dependency = null;
if ((dependency = this._isOverTask()) != null){
this._WGTorigin.consolidateNewDependency(dependency);
ganttz.DependencyList.getInstance().removeChild(this); //A new dependecy line will be created
}
/* We remove the dependency line. If the user clicked over a
* task, a new dependecy line will be created */
ganttz.DependencyList.getInstance().removeChild(this);
},
_isOverTask : function() {
var tasksArray = jq('div[z\\.type="ganttz.task.Task"]');