Commit 05210e87 authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui: add LabelField support

parent 5b93b30f
......@@ -47,6 +47,8 @@
field_url = 'gadget_erp5_field_file.html';
} else if (field_type === 'IntegerField') {
field_url = 'gadget_erp5_field_integer.html';
} else if (field_type === 'LabelField') {
field_url = 'gadget_erp5_field_label.html';
} else if (field_type === 'ListBox') {
field_url = 'gadget_erp5_field_listbox.html';
} else if (field_type === 'EditorField') {
......
......@@ -148,11 +148,13 @@
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
......@@ -196,16 +198,20 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
......@@ -228,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.47815.40095.24627</string> </value>
<value> <string>977.38881.34981.23125</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1557925216.18</float>
<float>1590484760.02</float>
<string>UTC</string>
</tuple>
</state>
......@@ -255,16 +261,20 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="5" aka="AAAAAAAAAAU=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
<pickle>
<tuple>
<none/>
<dictionary>
<item>
<key> <string>_log</string> </key>
<value>
<list>
<dictionary>
<item>
......@@ -312,7 +322,9 @@
</item>
</dictionary>
</list>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<title>ERP5 Labelfield</title>
<link rel="http://www.renderjs.org/rel/interface" href="interface_erp5_field.html">
<link rel="http://www.renderjs.org/rel/interface" href="interface_erp5_form_content_provider.html">
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_field_label.js" type="text/javascript"></script>
</head>
<body>
</body>
</html>
\ No newline at end of file
/*global window, rJS */
/*jslint indent: 2, maxerr: 3 */
(function (window, rJS) {
"use strict";
rJS(window)
.setState({
tag: 'p'
})
.declareMethod('render', function (options) {
var field_json = options.field_json || {};
return this.changeState({
value: field_json.value || field_json.default || ""
});
})
.onStateChange(function () {
this.element.innerHTML = this.state.value;
})
.declareMethod('getContent', function () {
return {};
})
.declareMethod('checkValidity', function () {
return true;
});
}(window, rJS));
\ No newline at end of file
......@@ -46,6 +46,8 @@ url_list = [
'gadget_erp5_field_image.js',
'gadget_erp5_field_integer.html',
'gadget_erp5_field_integer.js',
'gadget_erp5_field_label.html',
'gadget_erp5_field_label.js',
'gadget_erp5_field_list.html',
'gadget_erp5_field_list.js',
'gadget_erp5_field_lines.html',
......
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