BUG 10850 Cuando se borra una tarea de un proceso no se borra... SOLVED
- Derivation no were erased correctly. - Was add validation in file processmap. with '#' will be ignored, and an empty message aborts the commit.
This commit is contained in:
@@ -958,7 +958,9 @@ var processmap=function(){
|
|||||||
this.parent.dom.setStyle(task.object.elements.derivation,{
|
this.parent.dom.setStyle(task.object.elements.derivation,{
|
||||||
background:""
|
background:""
|
||||||
});
|
});
|
||||||
|
if (spec == false && typeof(rec) == 'undefined') {
|
||||||
task.derivation={to:[]};
|
task.derivation={to:[]};
|
||||||
|
}
|
||||||
|
|
||||||
/* Delete derivation recursive */
|
/* Delete derivation recursive */
|
||||||
if(rec)
|
if(rec)
|
||||||
@@ -1556,6 +1558,24 @@ var processmap=function(){
|
|||||||
this.dropables.derivation.unregister(data.object.dropIndex);
|
this.dropables.derivation.unregister(data.object.dropIndex);
|
||||||
this.data.render.deleteDerivation(data.uid, true);
|
this.data.render.deleteDerivation(data.uid, true);
|
||||||
this.parent.dom.remove(data.object.elements);
|
this.parent.dom.remove(data.object.elements);
|
||||||
|
var taskUidDelete = this.data.db.task[data.object.dropIndex].uid;
|
||||||
|
for (var i= 0; i<(this.data.db.task).length;i++) {
|
||||||
|
for (var j= 0; j<(this.data.db.task[i]).length;j++) {
|
||||||
|
this.data.db.task[i] = this.data.db.task[i+1];
|
||||||
|
}
|
||||||
|
var j = 0;
|
||||||
|
var itemDelete = (this.data.db.task[i]).derivation;
|
||||||
|
while (j < itemDelete.to.length) {
|
||||||
|
if (itemDelete.to[j].task == taskUidDelete) {
|
||||||
|
for (var k= j; k<itemDelete.to.length;k++) {
|
||||||
|
itemDelete.to[k] = itemDelete.to[k+1];
|
||||||
|
}
|
||||||
|
(itemDelete.to).splice((itemDelete.to).length - 1,1);
|
||||||
|
} else {
|
||||||
|
j++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
var r2 = new leimnud.module.rpc.xmlhttp({
|
var r2 = new leimnud.module.rpc.xmlhttp({
|
||||||
url: this.options.dataServer,
|
url: this.options.dataServer,
|
||||||
args: "action=deleteTask&data=" + {
|
args: "action=deleteTask&data=" + {
|
||||||
@@ -2199,7 +2219,6 @@ var processmap=function(){
|
|||||||
}
|
}
|
||||||
}.expand(this,true);
|
}.expand(this,true);
|
||||||
this.patternPanel=function(event,index,din){
|
this.patternPanel=function(event,index,din){
|
||||||
|
|
||||||
var options = this.data.db.task[index];
|
var options = this.data.db.task[index];
|
||||||
var db = this.data.db, task=db.task[index];
|
var db = this.data.db, task=db.task[index];
|
||||||
var derivation = task.derivation.to;
|
var derivation = task.derivation.to;
|
||||||
@@ -2441,6 +2460,7 @@ processmap.prototype={
|
|||||||
/* Hidden processmaker menu-submenu END*/
|
/* Hidden processmaker menu-submenu END*/
|
||||||
/* Change skin fro processmap BEGIN */
|
/* Change skin fro processmap BEGIN */
|
||||||
if (this.options.rw === true) {
|
if (this.options.rw === true) {
|
||||||
|
try {
|
||||||
var bd = this.parent.dom.capture("tag.body 0");
|
var bd = this.parent.dom.capture("tag.body 0");
|
||||||
var sm = this.parent.dom.element("pm_submenu");
|
var sm = this.parent.dom.element("pm_submenu");
|
||||||
this.parent.dom.setStyle(bd,{
|
this.parent.dom.setStyle(bd,{
|
||||||
@@ -2450,6 +2470,9 @@ processmap.prototype={
|
|||||||
//height:(sm.offsetHeight-21)
|
//height:(sm.offsetHeight-21)
|
||||||
height:25
|
height:25
|
||||||
});
|
});
|
||||||
|
} catch(e) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Change skin fro processmap END */
|
/* Change skin fro processmap END */
|
||||||
|
|||||||
Reference in New Issue
Block a user