Commit 9d290396 authored by Romain Courteaud's avatar Romain Courteaud

erp5_forge: submit vcs gadget content

parent a668fbf7
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</item> </item>
<item> <item>
<key> <string>action</string> </key> <key> <string>action</string> </key>
<value> <string></string> </value> <value> <string>BusinessTemplate_doVcsCommit</string> </value>
</item> </item>
<item> <item>
<key> <string>action_title</string> </key> <key> <string>action_title</string> </key>
...@@ -57,15 +57,15 @@ ...@@ -57,15 +57,15 @@
<item> <item>
<key> <string>bottom</string> </key> <key> <string>bottom</string> </key>
<value> <value>
<list/> <list>
<string>your_vcs_status_gadget</string>
</list>
</value> </value>
</item> </item>
<item> <item>
<key> <string>center</string> </key> <key> <string>center</string> </key>
<value> <value>
<list> <list/>
<string>your_vcs_status_gadget</string>
</list>
</value> </value>
</item> </item>
<item> <item>
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
<string>gadget_url</string> <string>gadget_url</string>
<string>renderjs_extra</string> <string>renderjs_extra</string>
<string>title</string> <string>title</string>
<string>validator_field_id</string>
<string>validator_form_id</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -105,6 +107,14 @@ ...@@ -105,6 +107,14 @@
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Gadget</string> </value> <value> <string>Gadget</string> </value>
</item> </item>
<item>
<key> <string>validator_field_id</string> </key>
<value> <string>my_core_mode_text_content_validator</string> </value>
</item>
<item>
<key> <string>validator_form_id</string> </key>
<value> <string>erp5_core/Base_viewFieldLibrary</string> </value>
</item>
</dictionary> </dictionary>
</value> </value>
</item> </item>
......
...@@ -487,9 +487,8 @@ ...@@ -487,9 +487,8 @@
get_tree_url: options.get_tree_url, get_tree_url: options.get_tree_url,
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,
// value: options.value || "", value: options.value || JSON.stringify({added: [], modified: [], deleted: [],
value: JSON.stringify({added: [], modified: [], deleted: [],
changelog: ''}), changelog: ''}),
editable: (options.editable === undefined) ? true : options.editable editable: (options.editable === undefined) ? true : options.editable
}); });
...@@ -517,7 +516,9 @@ ...@@ -517,7 +516,9 @@
return renderChangelogView(gadget); return renderChangelogView(gadget);
} }
if (modification_dict.hasOwnProperty('display_step')) {
throw new Error('Unhandled display step: ' + gadget.state.display_step); throw new Error('Unhandled display step: ' + gadget.state.display_step);
}
}) })
...@@ -624,7 +625,33 @@ ...@@ -624,7 +625,33 @@
}, {mutex: 'changestate'}) }, {mutex: 'changestate'})
.declareMethod('checkValidity', function () { .declareMethod('checkValidity', function () {
return true;
throw new Error('checkValidity not implemented'); throw new Error('checkValidity not implemented');
}, {mutex: 'changestate'}); }, {mutex: 'changestate'})
.declareAcquiredMethod("notifyChange", "notifyChange")
.onEvent('change', function change() {
return RSVP.all([
this.checkValidity(),
this.notifyChange("change")
]);
}, false, false)
.onEvent('input', function input() {
return RSVP.all([
this.checkValidity(),
this.notifyChange("input")
]);
}, false, false)
.declareAcquiredMethod("notifyFocus", "notifyFocus")
.onEvent('focus', function focus() {
return this.notifyFocus();
}, true, false)
.declareAcquiredMethod("notifyBlur", "notifyBlur")
.onEvent('blur', function blur() {
return this.notifyBlur();
}, true, false);
}(window, rJS, RSVP, domsugar, jIO, console, document, NodeFilter)); }(window, rJS, RSVP, domsugar, jIO, console, document, NodeFilter));
\ No newline at end of file
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