Commit 7d7a3a42 authored by Krzysztof Kutt's avatar Krzysztof Kutt
Browse files

rule task activity support, JS fixes (2013-08-08)

parent 1bc35984
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
......
......@@ -1954,7 +1954,7 @@
this.context.restore();
},
_drawBusiness: function(){
_drawBusinessRule: function(){
this.context.save();
this.context.beginPath();
......@@ -2043,9 +2043,9 @@
for( b in this.getBoundaryEvents() ) {
this.boundary[b].draw(debug);
}
if( !this.structure.markers || (this.structure.markers && $.inArray("subprocess",this.structure.markers) == -1 ) ) {
switch( this.structure.type ) {
case "service":
this._drawService();
......@@ -2062,8 +2062,8 @@
case "manual":
this._drawManual();
break;
case "business":
this._drawBusiness();
case "businessRule":
this._drawBusinessRule();
break;
case "script":
this._drawScript();
......
......@@ -19,7 +19,6 @@ var Converter = {
this.parentTxtarea = $(window.opener.document).find('#'+edid);
this.convertBtn = $('#convert');
this.insertBtn = $('#insert');
this.convertBtn.click(function(ev){
ev.preventDefault();
......@@ -34,18 +33,20 @@ var Converter = {
self.insertBtn.removeProp('disabled');
});
this.insertBtn.click(function(ev){
this.insertBtn.click(function(ev){
ev.preventDefault();
var c = self.parentTxtarea.caret();
v = c.replace(self.resTxtarea.val());
self.parentTxtarea.val(v);
var selectionStart = self.parentTxtarea[0].selectionStart;
var selectionEnd = self.parentTxtarea[0].selectionEnd;
var parentText = self.parentTxtarea[0].value;
var cuttedParentText = parentText.substr(0,selectionStart) + parentText.substr(selectionEnd);
var newParentText = [cuttedParentText.slice(0,selectionStart), self.resTxtarea.val(), cuttedParentText.slice(selectionStart)].join('');
self.parentTxtarea[0].value = newParentText;
var close = confirm("Code inserted! Do you want to close this window?");
if( close ) {
if( close ) {
self.parentTxtarea[0].selectionStart = selectionStart;
self.parentTxtarea[0].selectionEnd = selectionStart+newParentText.length;
window.close();
self.parentTxtarea.focus().caret(c.start,c.start);
}
});
......@@ -148,6 +149,8 @@ var Converter = {
obj.type = "send";
} else if ( $n.is(':node(userTask)') ) {
obj.type = "user";
} else if ( $n.is(':node(businessRuleTask)') ) {
obj.type = "businessRule"
} else if ( $n.is(':node(serviceTask)') ) {
obj.type = "service";
} else if ( $n.is(':node(receiveTask)') ) {
......@@ -251,6 +254,7 @@ var Converter = {
|| $n.is(':node(receiveTask)')
|| $n.is(':node(manualTask)')
|| $n.is(':node(businessTask)')
|| $n.is(':node(businessRuleTask)')
|| $n.is(':node(scriptTask)')
|| $n.is(':node(subProcess)')
|| $n.is(':node(callActivity)')
......
base simplebpmn
author Urszula Ciaputa
email u.ciaputa@gmail.com
date 2012-09-06
author GEIST Research Group
email geist@agh.edu.pl
date 2013-08-08
name simplebpmn plugin
desc Simple plugin that allows rendering of the diagrams specified in SimpleBPMN notation
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment