Commit 697eed66 authored by Jérome Perrin's avatar Jérome Perrin

working version !

parent 25d2bd08
...@@ -58,9 +58,7 @@ position_graph = context.getProperty(\'jsplumb_graph\')\n ...@@ -58,9 +58,7 @@ position_graph = context.getProperty(\'jsplumb_graph\')\n
\n \n
if position_graph:\n if position_graph:\n
context.log(position_graph)\n context.log(position_graph)\n
\n position_graph = json.loads(position_graph)[\'graph\']\n
position_graph = json.loads(position_graph)\n
\n
\n \n
visited_business_process_set = set() # prevent infinite recurisions\n visited_business_process_set = set() # prevent infinite recurisions\n
\n \n
...@@ -72,9 +70,12 @@ def getBusinessProcessGraph(business_process):\n ...@@ -72,9 +70,12 @@ def getBusinessProcessGraph(business_process):\n
for link in business_process.contentValues(portal_type=\'Business Link\'):\n for link in business_process.contentValues(portal_type=\'Business Link\'):\n
for trade_state in (link.getPredecessorValue(), link.getSuccessorValue()):\n for trade_state in (link.getPredecessorValue(), link.getSuccessorValue()):\n
if trade_state is not None:\n if trade_state is not None:\n
graph[\'node\'][trade_state.getReference() or trade_state.getId()] = dict(\n state_id = trade_state.getReference() or trade_state.getId()\n
graph[\'node\'][state_id] = dict(\n
_class=\'erp5.business_process.trade_state\',\n _class=\'erp5.business_process.trade_state\',\n
name=trade_state.getTranslatedTitle())\n name=trade_state.getTranslatedTitle())\n
if state_id in position_graph[\'node\']:\n
graph[\'node\'][state_id][\'coordinate\'] = position_graph[\'node\'][state_id][\'coordinate\'] \n
if link.getPredecessor() and link.getSuccessor(): # XXX no start ??\n if link.getPredecessor() and link.getSuccessor(): # XXX no start ??\n
graph[\'edge\'][link.getRelativeUrl()] = dict(\n graph[\'edge\'][link.getRelativeUrl()] = dict(\n
_class=\'erp5.business_process.business_link\',\n _class=\'erp5.business_process.business_link\',\n
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</item> </item>
<item> <item>
<key> <string>enctype</string> </key> <key> <string>enctype</string> </key>
<value> <string>application/x-www-form-urlencoded</string> </value> <value> <string></string> </value>
</item> </item>
<item> <item>
<key> <string>group_list</string> </key> <key> <string>group_list</string> </key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_EtagSupport__etag</string> </key> <key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts17687421.03</string> </value> <value> <string>ts17691107.44</string> </value>
</item> </item>
<item> <item>
<key> <string>__name__</string> </key> <key> <string>__name__</string> </key>
...@@ -526,7 +526,6 @@ ...@@ -526,7 +526,6 @@
}).declareAcquiredMethod("notifyDataChanged", "notifyDataChanged").declareMethod("render", function(data) {\n }).declareAcquiredMethod("notifyDataChanged", "notifyDataChanged").declareMethod("render", function(data) {\n
var gadget = this;\n var gadget = this;\n
this.props.data = {};\n this.props.data = {};\n
console.log("render", data);\n
if (data.value) {\n if (data.value) {\n
// Gadget embedded in ERP5\n // Gadget embedded in ERP5\n
this.props.erp5_key = data.key;\n this.props.erp5_key = data.key;\n
...@@ -545,9 +544,11 @@ ...@@ -545,9 +544,11 @@
}\n }\n
this.props.jsplumb_instance = jsPlumb.getInstance();\n this.props.jsplumb_instance = jsPlumb.getInstance();\n
}).declareMethod("getContent", function() {\n }).declareMethod("getContent", function() {\n
var ret = {};\n
if (this.props.erp5_key) {\n if (this.props.erp5_key) {\n
// ERP5\n // ERP5\n
return JSON.stringify({key: this.props.erp5_key, value: this.props.data});\n ret[this.props.erp5_key] = JSON.stringify(this.props.data);\n
return ret;\n
}\n }\n
return JSON.stringify(this.props.data);\n return JSON.stringify(this.props.data);\n
}).declareMethod("startService", function() {\n }).declareMethod("startService", function() {\n
...@@ -598,7 +599,7 @@ ...@@ -598,7 +599,7 @@
</item> </item>
<item> <item>
<key> <string>size</string> </key> <key> <string>size</string> </key>
<value> <int>25449</int> </value> <value> <int>25441</int> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
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