Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
erp5
Commits
08e44d70
Commit
08e44d70
authored
Feb 11, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: add first support of multilistfield
parent
f37dbece
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
807 additions
and
6 deletions
+807
-6
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
...tal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
+17
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
...TemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
+4
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
...hTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
+4
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_html.xml
...m/web_page_module/rjs_gadget_erp5_multilistfield_html.xml
+361
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_js.xml
...tem/web_page_module/rjs_gadget_erp5_multilistfield_js.xml
+421
-0
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
View file @
08e44d70
...
@@ -104,7 +104,7 @@ def renderField(field, meta_type=None):\n
...
@@ -104,7 +104,7 @@ def renderField(field, meta_type=None):\n
\n
\n
if meta_type == "ProxyField":\n
if meta_type == "ProxyField":\n
result = renderField(field, meta_type=field.getRecursiveTemplateField().meta_type)\n
result = renderField(field, meta_type=field.getRecursiveTemplateField().meta_type)\n
elif meta_type
in ("ListField", "ParallelListField", "MultiListField")
:\n
elif meta_type
== "ListField"
:\n
result = {\n
result = {\n
"type": meta_type,\n
"type": meta_type,\n
"key": field.generate_field_key(),\n
"key": field.generate_field_key(),\n
...
@@ -118,6 +118,22 @@ def renderField(field, meta_type=None):\n
...
@@ -118,6 +118,22 @@ def renderField(field, meta_type=None):\n
# XXX Message can not be converted to json as is\n
# XXX Message can not be converted to json as is\n
"items": field.get_value("items"),\n
"items": field.get_value("items"),\n
}\n
}\n
elif meta_type in ("ParallelListField", "MultiListField"):\n
result = {\n
"type": meta_type,\n
"key": field.generate_field_key(),\n
"default": field.get_value("default"),\n
"editable": field.get_value("editable"),\n
"css_class": field.get_value("css_class"),\n
"hidden": field.get_value("hidden"),\n
"description": field.get_value("description"),\n
"title": field.get_value("title"),\n
"required": field.get_value("required"),\n
# XXX Message can not be converted to json as is\n
"items": field.get_value("items"),\n
}\n
result["sub_select_key"] = traversed_document.Field_getSubFieldKeyDict(field, \'default:list\', key=result["key"])\n
result["sub_input_key"] = "default_" + traversed_document.Field_getSubFieldKeyDict(field, \'default:list:int\', key=result["key"])\n
elif meta_type in ("StringField", "FloatField", "EmailField", "TextAreaField",\n
elif meta_type in ("StringField", "FloatField", "EmailField", "TextAreaField",\n
"LinesField", "ImageField", "FileField", "IntegerField",\n
"LinesField", "ImageField", "FileField", "IntegerField",\n
"PasswordField", "EditorField"):\n
"PasswordField", "EditorField"):\n
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
View file @
08e44d70
...
@@ -145,6 +145,8 @@ gadget_erp5_field_list.html\n
...
@@ -145,6 +145,8 @@ gadget_erp5_field_list.html\n
gadget_erp5_field_list.js\n
gadget_erp5_field_list.js\n
gadget_erp5_field_listbox.html\n
gadget_erp5_field_listbox.html\n
gadget_erp5_field_listbox.js\n
gadget_erp5_field_listbox.js\n
gadget_erp5_field_multilist.html\n
gadget_erp5_field_multilist.js\n
gadget_erp5_field_readonly.html\n
gadget_erp5_field_readonly.html\n
gadget_erp5_field_readonly.js\n
gadget_erp5_field_readonly.js\n
gadget_erp5_field_string.html\n
gadget_erp5_field_string.html\n
...
@@ -327,7 +329,7 @@ NETWORK:\n
...
@@ -327,7 +329,7 @@ NETWORK:\n
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
940.5
6086.25956.64870
</string>
</value>
<value>
<string>
940.5
7527.43918.57497
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -345,7 +347,7 @@ NETWORK:\n
...
@@ -345,7 +347,7 @@ NETWORK:\n
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1423
560460.16
</float>
<float>
1423
645129.22
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
View file @
08e44d70
...
@@ -214,9 +214,10 @@
...
@@ -214,9 +214,10 @@
field_element.appendChild(label_element);\n
field_element.appendChild(label_element);\n
}\n
}\n
if (renderered_field.type === \'ListField\') {\n
if (renderered_field.type === \'ListField\') {\n
// (renderered_field.type === \'ParallelListField\') ||\n
// (renderered_field.type === \'MultiListField\')) {\n
field_url = \'gadget_erp5_field_list.html\';\n
field_url = \'gadget_erp5_field_list.html\';\n
} else if ((renderered_field.type === \'ParallelListField\') ||\n
(renderered_field.type === \'MultiListField\')) {\n
field_url = \'gadget_erp5_field_multilist.html\';\n
} else if (renderered_field.type === \'CheckBoxField\') {\n
} else if (renderered_field.type === \'CheckBoxField\') {\n
field_url = \'gadget_erp5_field_checkbox.html\';\n
field_url = \'gadget_erp5_field_checkbox.html\';\n
} else if (renderered_field.type === \'StringField\') {\n
} else if (renderered_field.type === \'StringField\') {\n
...
@@ -509,7 +510,7 @@
...
@@ -509,7 +510,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
142356
0248.21
</float>
<float>
142356
5705.92
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_html.xml
0 → 100644
View file @
08e44d70
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_multilistfield_js.xml
0 → 100644
View file @
08e44d70
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment