diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php index fb68bff0e..820601a5d 100644 --- a/gulliver/system/class.g.php +++ b/gulliver/system/class.g.php @@ -983,14 +983,12 @@ class G function streamFile( $file, $download = false, $downloadFileName = '' ) { require_once (PATH_THIRDPARTY . 'jsmin/jsmin.php'); - - $typearray = explode ( '.', $file ); + $typearray = explode ( '.', basename( $file) ); $typefile = $typearray[ count($typearray) -1 ]; - $namearray = explode ( '/', $typearray[0] ); $filename = $file; //trick to generate the translation.language.js file , merging two files and then minified the content. - if ( strtolower ($typefile ) == 'js' && $namearray[ count($namearray) -1 ] == 'translation' ) { + if ( strtolower ($typefile ) == 'js' && $typearray[0] == 'translation' ) { header('Content-Type: text/javascript'); //if userAgent (BROWSER) is MSIE we need special headers to avoid MSIE behaivor. diff --git a/workflow/engine/methods/bpmn/designer.php b/workflow/engine/methods/bpmn/designer.php index 3aac8cbaf..c82d016ff 100755 --- a/workflow/engine/methods/bpmn/designer.php +++ b/workflow/engine/methods/bpmn/designer.php @@ -7,48 +7,49 @@ $oHeadPublisher->addExtJsScript('bpmn/TaskContext', true ); //adding a javascript file .js $oHeadPublisher->addExtJsScript('bpmn/designer', true ); //adding a javascript file .js - $oHeadPublisher->addExtJsScript('bpmn/Annotation' ); + $oHeadPublisher->addExtJsScript('bpmn/Annotation',true ); $oHeadPublisher->addExtJsScript('bpmn/bpmnShapes', true); // - $oHeadPublisher->addExtJsScript('bpmn/LoopingSubProcess'); // - $oHeadPublisher->addExtJsScript('bpmn/LoopingTask'); // - $oHeadPublisher->addExtJsScript('bpmn/Dataobject'); // - $oHeadPublisher->addExtJsScript('bpmn/Pool',true); - $oHeadPublisher->addExtJsScript('bpmn/Lane'); + //$oHeadPublisher->addExtJsScript('bpmn/LoopingSubProcess'); // + //$oHeadPublisher->addExtJsScript('bpmn/LoopingTask'); // + //$oHeadPublisher->addExtJsScript('bpmn/Dataobject'); // + //$oHeadPublisher->addExtJsScript('bpmn/Pool',true); + //$oHeadPublisher->addExtJsScript('bpmn/Lane'); $oHeadPublisher->addExtJsScript('bpmn/EventEmptyStart'); $oHeadPublisher->addExtJsScript('bpmn/EventMessageStart'); - $oHeadPublisher->addExtJsScript('bpmn/EventRuleStart'); - $oHeadPublisher->addExtJsScript('bpmn/EventTimerStart'); - $oHeadPublisher->addExtJsScript('bpmn/EventSignalStart'); - $oHeadPublisher->addExtJsScript('bpmn/EventMulStart'); - $oHeadPublisher->addExtJsScript('bpmn/EventLinkStart'); + //$oHeadPublisher->addExtJsScript('bpmn/EventRuleStart'); + //$oHeadPublisher->addExtJsScript('bpmn/EventTimerStart'); + //$oHeadPublisher->addExtJsScript('bpmn/EventSignalStart'); + //$oHeadPublisher->addExtJsScript('bpmn/EventMulStart'); + //$oHeadPublisher->addExtJsScript('bpmn/EventLinkStart'); $oHeadPublisher->addExtJsScript('bpmn/EventEmptyInter'); $oHeadPublisher->addExtJsScript('bpmn/EventMessageRecInter'); $oHeadPublisher->addExtJsScript('bpmn/EventMessageSendInter'); $oHeadPublisher->addExtJsScript('bpmn/EventTimerInter'); - $oHeadPublisher->addExtJsScript('bpmn/EventBoundaryTimerInter'); - $oHeadPublisher->addExtJsScript('bpmn/EventErrorInter'); - $oHeadPublisher->addExtJsScript('bpmn/EventCompInter'); - $oHeadPublisher->addExtJsScript('bpmn/EventRuleInter'); - $oHeadPublisher->addExtJsScript('bpmn/EventCancelInter'); - $oHeadPublisher->addExtJsScript('bpmn/EventInterSignal'); - $oHeadPublisher->addExtJsScript('bpmn/EventMultipleInter'); - $oHeadPublisher->addExtJsScript('bpmn/EventLinkInter'); + //$oHeadPublisher->addExtJsScript('bpmn/EventBoundaryTimerInter'); + //$oHeadPublisher->addExtJsScript('bpmn/EventErrorInter'); + //$oHeadPublisher->addExtJsScript('bpmn/EventCompInter'); + //$oHeadPublisher->addExtJsScript('bpmn/EventRuleInter'); + //$oHeadPublisher->addExtJsScript('bpmn/EventCancelInter'); + //$oHeadPublisher->addExtJsScript('bpmn/EventInterSignal'); + //$oHeadPublisher->addExtJsScript('bpmn/EventMultipleInter'); + //$oHeadPublisher->addExtJsScript('bpmn/EventLinkInter'); $oHeadPublisher->addExtJsScript('bpmn/EventEmptyEnd'); $oHeadPublisher->addExtJsScript('bpmn/EventMessageEnd'); - $oHeadPublisher->addExtJsScript('bpmn/EventErrorEnd'); - $oHeadPublisher->addExtJsScript('bpmn/EventCompEnd'); - $oHeadPublisher->addExtJsScript('bpmn/EventTerminateEnd'); - $oHeadPublisher->addExtJsScript('bpmn/EventEndSignal'); - $oHeadPublisher->addExtJsScript('bpmn/EventMultipleEnd'); - $oHeadPublisher->addExtJsScript('bpmn/EventCancelEnd'); - $oHeadPublisher->addExtJsScript('bpmn/EventLinkEnd'); + //$oHeadPublisher->addExtJsScript('bpmn/EventErrorEnd'); + //$oHeadPublisher->addExtJsScript('bpmn/EventCompEnd'); + //$oHeadPublisher->addExtJsScript('bpmn/EventTerminateEnd'); + //$oHeadPublisher->addExtJsScript('bpmn/EventEndSignal'); + //$oHeadPublisher->addExtJsScript('bpmn/EventMultipleEnd'); + //$oHeadPublisher->addExtJsScript('bpmn/EventCancelEnd'); + //$oHeadPublisher->addExtJsScript('bpmn/EventLinkEnd'); $oHeadPublisher->addExtJsScript('bpmn/GatewayInclusive' ); $oHeadPublisher->addExtJsScript('bpmn/GatewayExclusiveData' ); - $oHeadPublisher->addExtJsScript('bpmn/GatewayExclusiveEvent' ); + //$oHeadPublisher->addExtJsScript('bpmn/GatewayExclusiveEvent' ); $oHeadPublisher->addExtJsScript('bpmn/GatewayParallel' ); - $oHeadPublisher->addExtJsScript('bpmn/GatewayComplex' ); + //$oHeadPublisher->addExtJsScript('bpmn/GatewayComplex' ); + $oHeadPublisher->addExtJsScript('bpmn/GridPanel'); $oHeadPublisher->addExtJsScript('bpmn/SubProcess' ); diff --git a/workflow/engine/methods/bpmn/processmap.php b/workflow/engine/methods/bpmn/processmap.php index 10e3b85e6..df644ac38 100755 --- a/workflow/engine/methods/bpmn/processmap.php +++ b/workflow/engine/methods/bpmn/processmap.php @@ -15,7 +15,7 @@ $_SESSION['PROCESSMAP'] = 'BPMN'; $oHeadPublisher =& headPublisher::getSingleton(); - $oHeadPublisher->usingExtJs('ux/miframe'); + //$oHeadPublisher->usingExtJs('ux/miframe'); $oHeadPublisher->addExtJsScript('bpmn/ProcessOptions', true); $oHeadPublisher->addExtJsScript('bpmn/processmap', true); $oHeadPublisher->addContent( 'bpmn/processmap'); diff --git a/workflow/engine/templates/bpmn/Annotation.js b/workflow/engine/templates/bpmn/Annotation.js index 2382ad80d..64516d702 100755 --- a/workflow/engine/templates/bpmn/Annotation.js +++ b/workflow/engine/templates/bpmn/Annotation.js @@ -46,71 +46,81 @@ ArrowLine.prototype.paint=function(){ }; DottedConnection=function(){ -ArrowLine.call(this); -this.sourcePort=null; -this.targetPort=null; -this.lineSegments=[]; -this.setColor(new Color(0,0,115)); -this.setLineWidth(1); + ArrowLine.call(this); + this.sourcePort=null; + this.targetPort=null; + this.lineSegments=[]; + this.setColor(new Color(0,0,115)); + this.setLineWidth(1); }; -DottedConnection.prototype=new ArrowLine(); + +DottedConnection.prototype=new ConnectionDecorator(); DottedConnection.prototype.type="DottedConnection"; DottedConnection.prototype.disconnect=function(){ -if(this.sourcePort!==null){ -this.sourcePort.detachMoveListener(this); -} -if(this.targetPort!==null){ -this.targetPort.detachMoveListener(this); -} + if(this.sourcePort!==null){ + this.sourcePort.detachMoveListener(this); + } + if(this.targetPort!==null){ + this.targetPort.detachMoveListener(this); + } }; + DottedConnection.prototype.reconnect=function(){ -if(this.sourcePort!==null){ -this.sourcePort.attachMoveListener(this); -} -if(this.targetPort!==null){ -this.targetPort.attachMoveListener(this); -} + if(this.sourcePort!==null){ + this.sourcePort.attachMoveListener(this); + } + if(this.targetPort!==null){ + this.targetPort.attachMoveListener(this); + } }; + DottedConnection.prototype.isConnector=function(){ -return true; + return true; }; + DottedConnection.prototype.isResizeable=function(){ -return false; + return false; }; + DottedConnection.prototype.setSource=function(port){ -if(this.sourcePort!==null){ -this.sourcePort.detachMoveListener(this); -} -this.sourcePort=port; -if(this.sourcePort===null){ -return; -} -this.sourcePort.attachMoveListener(this); -this.setStartPoint(port.getAbsoluteX(),port.getAbsoluteY()); + if(this.sourcePort!==null){ + this.sourcePort.detachMoveListener(this); + } + this.sourcePort=port; + if(this.sourcePort===null){ + return; + } + this.sourcePort.attachMoveListener(this); + this.setStartPoint(port.getAbsoluteX(),port.getAbsoluteY()); }; + DottedConnection.prototype.getSource=function(){ -return this.sourcePort; + return this.sourcePort; }; + DottedConnection.prototype.setTarget=function(port){ -if(this.targetPort!==null){ -this.targetPort.detachMoveListener(this); -} -this.targetPort=port; -if(this.targetPort===null){ -return; -} -this.targetPort.attachMoveListener(this); -this.setEndPoint(port.getAbsoluteX(),port.getAbsoluteY()); + if(this.targetPort!==null){ + this.targetPort.detachMoveListener(this); + } + this.targetPort=port; + if(this.targetPort===null){ + return; + } + this.targetPort.attachMoveListener(this); + this.setEndPoint(port.getAbsoluteX(),port.getAbsoluteY()); }; + DottedConnection.prototype.getTarget=function(){ -return this.targetPort; + return this.targetPort; }; + DottedConnection.prototype.onOtherFigureMoved=function(_3824){ -if(_3824==this.sourcePort){ -this.setStartPoint(this.sourcePort.getAbsoluteX(),this.sourcePort.getAbsoluteY()); -}else{ -this.setEndPoint(this.targetPort.getAbsoluteX(),this.targetPort.getAbsoluteY()); -} + if(_3824==this.sourcePort){ + this.setStartPoint(this.sourcePort.getAbsoluteX(),this.sourcePort.getAbsoluteY()); + } + else{ + this.setEndPoint(this.targetPort.getAbsoluteX(),this.targetPort.getAbsoluteY()); + } }; @@ -138,27 +148,6 @@ bpmnAnnotation.prototype.setAnnotationName = function (name) { this.annotationName = 'Annotation 1'; }; -bpmnAnnotation.prototype.coord_converter = function (bound_width, bound_height, text_length) { - //bound_width = this.workflow.currentSelection.width; - //bound_height = this.workflow.currentSelection.height; - input_width = text_length * 6 - input_height = 10 - - temp_width = bound_width - input_width; - temp_width /= 2; - temp_x = temp_width; - - temp_height = bound_height - 10; - temp_height /= 2; - temp_y = temp_height; - - var temp_coord = new Object(); - temp_coord.temp_x = temp_x; - temp_coord.temp_y = temp_y; - return temp_coord; -}; - - bpmnAnnotation.prototype.paint = function () { VectorFigure.prototype.paint.call(this); @@ -301,7 +290,6 @@ bpmnAnnotation.prototype.onDoubleClick = function () { } else this.figure.rectWidth = 150; - //tempcoord = this.workflow.currentSelection.coord_converter(this.workflow.currentSelection.width, this.workflow.currentSelection.height, this.input.value.length) this.figure.bpmnText.drawStringAnno(this.input.value,20,20,this.figure.rectWidth,'left'); // this.figure.bpmnNewText.drawTextString(this.input.value, this.workflow.currentSelection.width, this.workflow.currentSelection.height, tempcoord.temp_x, tempcoord.temp_y); this.figure.bpmnText.paint(); diff --git a/workflow/engine/templates/bpmn/MyWorkflow.js b/workflow/engine/templates/bpmn/MyWorkflow.js index 02c6d16a8..e89a0550d 100755 --- a/workflow/engine/templates/bpmn/MyWorkflow.js +++ b/workflow/engine/templates/bpmn/MyWorkflow.js @@ -1392,44 +1392,45 @@ MyWorkflow.prototype.editEventProperties = function(oShape) */ MyWorkflow.prototype.getStartEventConn = function(oShape,sPort,sPortType) { - var aStartTask= new Array(); - //Get all the ports of the shapes - if(workflow.currentSelection != null && typeof workflow.currentSelection != 'undefined') { - var ports = workflow.currentSelection.getPorts(); - var len =ports.data.length; + var aStartTask= new Array(); - //Get all the connection of the shape - var conn = new Array(); - for(var i=0; i<=len; i++){ - if(typeof ports.data[i] === 'object') - if(ports.data[i].type == sPortType) - conn[i] = ports.data[i].getConnections(); + //Get all the ports of the shapes + if( workflow.currentSelection != null && typeof workflow.currentSelection != 'undefined') { + var ports = workflow.currentSelection.getPorts(); + var len = ports.data.length; + + //Get all the connection of the shape + var conn = new Array(); + for(var i=0; i<=len; i++){ + if(typeof ports.data[i] === 'object') + if(ports.data[i].type == sPortType) + conn[i] = ports.data[i].getConnections(); + } + //Initializing Arrays and variables + var countConn = 0; + + var type; + //Get ALL the connections for the specified PORT + for(i = 0; i< conn.length ; i++) + { + if(typeof conn[i] != 'undefined') + for(var j = 0; j < conn[i].data.length ; j++) + { + if(typeof conn[i].data[j] != 'undefined') + { + type = eval('conn[i].data[j].'+sPort+'.parentNode.type') + if(type == 'bpmnTask') + { + aStartTask[countConn] = new Array(); + aStartTask[countConn].value = eval('conn[i].data[j].'+sPort+'.parentNode.id'); + aStartTask[countConn].name = eval('conn[i].data[j].'+sPort+'.parentNode.taskName'); + countConn++; + } } - //Initializing Arrays and variables - var countConn = 0; - - var type; - //Get ALL the connections for the specified PORT - for(i = 0; i< conn.length ; i++) - { - if(typeof conn[i] != 'undefined') - for(var j = 0; j < conn[i].data.length ; j++) - { - if(typeof conn[i].data[j] != 'undefined') - { - type = eval('conn[i].data[j].'+sPort+'.parentNode.type') - if(type == 'bpmnTask') - { - aStartTask[countConn] = new Array(); - aStartTask[countConn].value = eval('conn[i].data[j].'+sPort+'.parentNode.id'); - aStartTask[countConn].name = eval('conn[i].data[j].'+sPort+'.parentNode.taskName'); - countConn++; - } - } - } - } - } - return aStartTask; + } + } + } + return aStartTask; } /** diff --git a/workflow/engine/templates/bpmn/designer.js b/workflow/engine/templates/bpmn/designer.js index 62209a489..3b037d25c 100755 --- a/workflow/engine/templates/bpmn/designer.js +++ b/workflow/engine/templates/bpmn/designer.js @@ -858,8 +858,9 @@ Ext.onReady ( function() { }); //Creating Pool - var oPool = new bpmnPool(workflow); + //var oPool = new bpmnPool(workflow); //workflow.addFigure(oPool,100,70); + if(workflow.taskNo == '') workflow.taskNo= 0; //Initializing Count for the bpmnTask var count = 0;