Commit eace43b4 authored by Romain Courteaud's avatar Romain Courteaud

erp5_forge: send one json only

parent 544ce7cf
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<key> <string>bottom</string> </key> <key> <string>bottom</string> </key>
<value> <value>
<list> <list>
<string>your_vcs_status_gadget</string> <string>your_commit_json</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>your_vcs_status_gadget</string> </value> <value> <string>your_commit_json</string> </value>
</item> </item>
<item> <item>
<key> <string>message_values</string> </key> <key> <string>message_values</string> </key>
...@@ -62,20 +62,18 @@ ...@@ -62,20 +62,18 @@
</item> </item>
<item> <item>
<key> <string>gadget_url</string> </key> <key> <string>gadget_url</string> </key>
<value> <value> <string></string> </value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item> </item>
<item> <item>
<key> <string>renderjs_extra</string> </key> <key> <string>renderjs_extra</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
<item> <item>
...@@ -103,7 +101,7 @@ ...@@ -103,7 +101,7 @@
</item> </item>
<item> <item>
<key> <string>gadget_url</string> </key> <key> <string>gadget_url</string> </key>
<value> <string></string> </value> <value> <string>gadget_vcs_status.html</string> </value>
</item> </item>
<item> <item>
<key> <string>renderjs_extra</string> </key> <key> <string>renderjs_extra</string> </key>
...@@ -137,25 +135,12 @@ ...@@ -137,25 +135,12 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>string: gadget_vcs_status.html</string> </value> <value> <string>python: [(\'diff_url\', \'%s/BusinessTemplate_doVcsDiffAsJson\' % here.absolute_url()), (\'get_tree_url\', \'%s/tree.xml\' % here.absolute_url()), (\'remote_url\', here.getVcsTool().getRemoteUrl()), (\'remote_comment\', here.getVcsTool().getRemoteComment())]</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [(\'modified_key\', \'field_your_modified:list\'), (\'removed_key\', \'field_your_removed:list\'), (\'added_key\', \'field_your_added:list\'), (\'diff_url\', \'%s/BusinessTemplate_doVcsDiffAsJson\' % here.absolute_url()), (\'get_tree_url\', \'%s/tree.xml\' % here.absolute_url()), (\'remote_url\', here.getVcsTool().getRemoteUrl()), (\'remote_comment\', here.getVcsTool().getRemoteComment())]</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/> <global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle> </pickle>
......
...@@ -492,11 +492,12 @@ ...@@ -492,11 +492,12 @@
remote_comment: options.remote_comment, remote_comment: options.remote_comment,
remote_url: options.remote_url, remote_url: options.remote_url,
key: options.key, key: options.key,
added_key: options.added_key, value: options.value || JSON.stringify({
removed_key: options.removed_key, added: [],
modified_key: options.modified_key, modified: [],
value: options.value || JSON.stringify({added: [], modified: [], removed: [], removed: [],
changelog: ''}), changelog: ''
}),
editable: (options.editable === undefined) ? true : options.editable editable: (options.editable === undefined) ? true : options.editable
}); });
}) })
...@@ -627,9 +628,6 @@ ...@@ -627,9 +628,6 @@
parsed_value_dict = JSON.parse(gadget.state.value); parsed_value_dict = JSON.parse(gadget.state.value);
if (gadget.state.editable) { if (gadget.state.editable) {
result[gadget.state.key] = gadget.state.value; result[gadget.state.key] = gadget.state.value;
// result[gadget.state.added_key] = parsed_value_dict.added;
// result[gadget.state.removed_key] = parsed_value_dict.removed;
// result[gadget.state.modified_key] = parsed_value_dict.modified;
} }
console.log('getContent', result); console.log('getContent', result);
return result; return result;
......
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