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

erp5_forge: submit vcs gadget content

parent a668fbf7
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
<value> <string>BusinessTemplate_doVcsCommit</string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
......@@ -57,15 +57,15 @@
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
<list>
<string>your_vcs_status_gadget</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>your_vcs_status_gadget</string>
</list>
<list/>
</value>
</item>
<item>
......
......@@ -13,6 +13,8 @@
<string>gadget_url</string>
<string>renderjs_extra</string>
<string>title</string>
<string>validator_field_id</string>
<string>validator_form_id</string>
</list>
</value>
</item>
......@@ -105,6 +107,14 @@
<key> <string>title</string> </key>
<value> <string>Gadget</string> </value>
</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>
</value>
</item>
......
......@@ -487,9 +487,8 @@
get_tree_url: options.get_tree_url,
remote_comment: options.remote_comment,
remote_url: options.remote_url,
// key: options.key,
// value: options.value || "",
value: JSON.stringify({added: [], modified: [], deleted: [],
key: options.key,
value: options.value || JSON.stringify({added: [], modified: [], deleted: [],
changelog: ''}),
editable: (options.editable === undefined) ? true : options.editable
});
......@@ -517,7 +516,9 @@
return renderChangelogView(gadget);
}
throw new Error('Unhandled display step: ' + gadget.state.display_step);
if (modification_dict.hasOwnProperty('display_step')) {
throw new Error('Unhandled display step: ' + gadget.state.display_step);
}
})
......@@ -624,7 +625,33 @@
}, {mutex: 'changestate'})
.declareMethod('checkValidity', function () {
return true;
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));
\ 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