Worked on issue with saving annotation linked to task,. and issue with flow menu

This commit is contained in:
girish
2011-03-07 14:40:45 +00:00
parent 17cb6c83d9
commit 6bc6cbfe47
2 changed files with 17 additions and 12 deletions

View File

@@ -1092,8 +1092,11 @@ MyWorkflow.prototype.saveShape= function(oNewShape)
urlparams = '?action='+actiontype+'&data={"uid":"'+ pro_uid +'","label":"'+newlabel+'","task_uid":"'+ next_uid +'","position":'+pos+'}';
break;
case 'updateText':
var next_uid = '';
var taskUidFrom = workflow.getStartEventConn(oNewShape,'sourcePort','OutputPort');
next_uid = '';
if(workflow.currentSelection.type == 'bpmnTask')
taskUidFrom = workflow.getStartEventConn(oNewShape,'sourcePort','OutputPort');
else
taskUidFrom = workflow.getStartEventConn(oNewShape,'sourcePort','InputPort');
if(taskUidFrom.length > 0)
next_uid = taskUidFrom[0].value;
@@ -1405,6 +1408,7 @@ MyWorkflow.prototype.getStartEventConn = function(oShape,sPort,sPortType)
//Get all the ports of the shapes
if( workflow.currentSelection != null && typeof workflow.currentSelection != 'undefined') {
var ports = workflow.currentSelection.getPorts();
//var ports = oShape.getPorts();
var len = ports.data.length;
//Get all the connection of the shape

View File

@@ -389,7 +389,8 @@ InputPort.prototype.onDrop = function (port) {
newObj = port.parentNode;
preObj = this.workflow.currentSelection;
newObj.actiontype = 'updateText';
this.workflow.saveShape(newObj);
preObj.actiontype = 'updateText';
this.workflow.saveShape(preObj);
}
}
};
@@ -1104,7 +1105,7 @@ ButtonInterEvent = function (_30a8) {
Button.call(this, _30a8, 16, 16);
};
ButtonInterEvent.prototype = new Button;
ButtonInterEvent.prototype.type = "/skins/ext/images/gray/shapes/interevent";
ButtonInterEvent.prototype.type = "/images/ext/gray/shapes/interevent";
ButtonInterEvent.prototype.execute = function () {
var count = 0;
this.palette.newShapeName = 'bpmnEventEmptyInter';
@@ -1115,7 +1116,7 @@ ButtonEndEvent = function (_30a8) {
Button.call(this, _30a8, 16, 16);
};
ButtonEndEvent.prototype = new Button;
ButtonEndEvent.prototype.type = "/skins/ext/images/gray/shapes/endevent";
ButtonEndEvent.prototype.type = "/images/ext/gray/shapes/endevent";
ButtonEndEvent.prototype.execute = function () {
var count = 0;
this.palette.newShapeName = 'bpmnEventEmptyEnd';
@@ -1126,7 +1127,7 @@ ButtonGateway = function (_30a8) {
Button.call(this, _30a8, 16, 16);
};
ButtonGateway.prototype = new Button;
ButtonGateway.prototype.type = "/skins/ext/images/gray/shapes/gateway-small";
ButtonGateway.prototype.type = "/images/ext/gray/shapes/gateway-small";
ButtonGateway.prototype.execute = function () {
this.palette.newShapeName = 'bpmnGatewayExclusiveData';
workflow.preSelectedObj = workflow.currentSelection;
@@ -1137,7 +1138,7 @@ ButtonAnnotation = function (_30a8) {
Button.call(this, _30a8, 16, 16);
};
ButtonAnnotation.prototype = new Button;
ButtonAnnotation.prototype.type = "/skins/ext/images/gray/shapes/annotation";
ButtonAnnotation.prototype.type = "/images/ext/gray/shapes/annotation";
ButtonAnnotation.prototype.execute = function () {
var count = 0;
this.palette.newShapeName = 'bpmnAnnotation';
@@ -1149,7 +1150,7 @@ ButtonTask = function (_30a8) {
Button.call(this, _30a8, 16, 16);
};
ButtonTask.prototype = new Button;
ButtonTask.prototype.type = "/skins/ext/images/gray/shapes/Task";
ButtonTask.prototype.type = "/images/ext/gray/shapes/Task";
ButtonTask.prototype.execute = function () {
this.palette.newShapeName = 'bpmnTask';
bpmnTask.prototype.addShapes(this.palette);
@@ -1160,7 +1161,7 @@ ButtonAdd = function (_30a8) {
Button.call(this, _30a8, 16, 16);
};
ButtonAdd.prototype = new Button;
ButtonAdd.prototype.type = "/skins/ext/images/gray/shapes/btn-add";
ButtonAdd.prototype.type = "/images/ext/gray/shapes/btn-add";
ButtonAdd.prototype.execute = function () {
this.palette.newShapeName = 'bpmnTask';
this.palette.workflow.preSelectedObj = this.palette.workflow.currentSelection;
@@ -1171,7 +1172,7 @@ ButtonDelete = function (_30a9) {
Button.call(this, _30a9, 16, 16);
};
ButtonDelete.prototype = new Button;
ButtonDelete.prototype.type = "/skins/ext/images/gray/shapes/btn-del";
ButtonDelete.prototype.type = "/images/ext/gray/shapes/btn-del";
ButtonDelete.prototype.execute = function () {
workflow.hideResizeHandles();
workflow.getDeleteCriteria();
@@ -1180,7 +1181,7 @@ ButtonMoveFront = function (_3e22) {
Button.call(this, _3e22, 16, 16);
};
ButtonMoveFront.prototype = new Button;
ButtonMoveFront.prototype.type = "/skins/ext/images/gray/shapes/btn-movefrnt";
ButtonMoveFront.prototype.type = "/images/ext/gray/shapes/btn-movefrnt";
ButtonMoveFront.prototype.execute = function () {
this.palette.workflow.moveFront(this.palette.workflow.getCurrentSelection());
ToolGeneric.prototype.execute.call(this);
@@ -1189,7 +1190,7 @@ ButtonMoveBack = function (_4091) {
Button.call(this, _4091, 16, 16);
};
ButtonMoveBack.prototype = new Button;
ButtonMoveBack.prototype.type = "/skins/ext/images/gray/shapes/btn-movebk";
ButtonMoveBack.prototype.type = "/images/ext/gray/shapes/btn-movebk";
ButtonMoveBack.prototype.execute = function () {
this.palette.workflow.moveBack(this.palette.workflow.getCurrentSelection());
ToolGeneric.prototype.execute.call(this);