Hi all, I do some xtreme programming to fluo and make a little
improvement to process rendering (very, very alpha)
A sample process definition
class CAR < OpenWFE::ProcessDefinition
sequence do
_set :field => "system", :value => "CHANGE ME"
car
participant :field_ref => "system"
_set :field => "system", :value => "CHANGE ME"
_case do
equals :field_value => "system", :other_value => "ABS"
abs
equals :field_value => "system", :other_value => "SSP"
ssp
end
car
end
end
1º render correctly "participant :field_ref"
2º try to render a branch expression
Index: public/javascripts/densha-fluo.js
===================================================================
--- public/javascripts/densha-fluo.js (revisión: 1005)
+++ public/javascripts/densha-fluo.js (copia de trabajo)
@@ -266,6 +266,11 @@
height = 60;
}
+ if (this.exp_attributes['field-ref']) {
+ width = 120;
+ height = 40;
+ }
+
var ebox = buildBox(width, height);
this.div.appendChild(ebox);
@@ -299,7 +304,74 @@
}
});
+var BranchExpression = Class.create(NoChildrenExpression, {
+ cssName : function () {
+ return "branch";
+ },
+
+ horizontalBar : function () {
+
+ var eBar = new Element('div', { "class": "fluo_pixel" });
+ eBar.setStyle({ "width": "100%", "height": "1px" });
+
+ return eBar;
+ },
+
+ renderChildren : function () {
+
+ this.content_div.appendChild(this.horizontalBar());
+
+ var eChildren = new Element(
+ 'div', { "class": "fluo_exp_branch_children" });
+
+ var width = 200;
+ if (width > 0) width = 200 / this.exp_children.length;
+
+
+ for (var i=0; i<this.exp_children.length; i++) {
+
+
+ var child = this.exp_children[i];
+
+ var eChild = new Element(
+ "div", { "class": "fluo_exp_branch_child" });
+ eChild.setStyle({ "width": ""+width+"%" });
+
+
+
+ var dArrow = new Element("div", {});
+ var iArrow = new Element("img", { src: "/images/fluo/
adown.png" });
+ dArrow.appendChild(iArrow);
+ eChild.appendChild(dArrow);
+
+ renderExpression(eChild, this.exp_id+"."+i, child);
+
+ i++;
+ var eChildBranch = new Element(
+ "div", { "class": "fluo_exp_sequence" });
+ eChildBranch.setStyle({ "width": ""+width+"%" });
+ child = this.exp_children[i];
+
+ dArrow = new Element("div", {});
+ iArrow = new Element("img", { src: "/images/fluo/
adown.png" });
+
+ dArrow.appendChild(iArrow);
+ eChildBranch.appendChild(dArrow);
+
+ renderExpression(eChildBranch, this.exp_id+"."+i, child);
+ eChild.appendChild(eChildBranch);
+ eChildren.appendChild(eChild);
+
+ }
+ this.content_div.appendChild(eChildren);
+
+ this.content_div.appendChild(divClear());
+
+ this.content_div.appendChild(this.horizontalBar());
+ }
+
+});
+
//
// the TOP
@@ -315,7 +387,9 @@
"participant" : ParticipantExpression,
"reval" : Expression,
"set" : Expression,
- "sleep" : Expression
+ "sleep" : Expression,
+ "case" : BranchExpression,
+ "equals" : Expression
}
var MINOR_EXPRESSIONS = $A([
Index: public/stylesheets/densha-fluo.css
===================================================================
--- public/stylesheets/densha-fluo.css (revisión: 1005)
+++ public/stylesheets/densha-fluo.css (copia de trabajo)
@@ -47,6 +47,16 @@
padding-bottom: 4px;
}
+.fluo_exp_branch_children
+{
+}
+.fluo_exp_branch_child
+{
+ float: left;
+ padding-top: 4px;
+ padding-bottom: 4px;
+}
+
.fluo_exp_has_workitem
{
border: 7px dotted #cccccc;
Best regards
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenWFEru dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/openwferu-dev?hl=en
-~----------~----~----~----~------~----~------~--~---