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:
Marco Antonio Nina
2013-02-22 15:55:26 -04:00
parent 0c8f05a1c9
commit bd748a805c

View File

@@ -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:""
}); });
task.derivation={to:[]}; if (spec == false && typeof(rec) == 'undefined') {
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,15 +2460,19 @@ 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) {
var bd = this.parent.dom.capture("tag.body 0"); try {
var sm = this.parent.dom.element("pm_submenu"); var bd = this.parent.dom.capture("tag.body 0");
this.parent.dom.setStyle(bd,{ var sm = this.parent.dom.element("pm_submenu");
backgroundColor:"buttonface" this.parent.dom.setStyle(bd,{
}); backgroundColor:"buttonface"
this.parent.dom.setStyle(sm,{ });
//height:(sm.offsetHeight-21) this.parent.dom.setStyle(sm,{
height:25 //height:(sm.offsetHeight-21)
}); height:25
});
} catch(e) {
}
} }
/* Change skin fro processmap END */ /* Change skin fro processmap END */