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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
dde9c3b4
Commit
dde9c3b4
authored
Jun 12, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: add support for image field
parent
05d7b949
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
711 additions
and
2 deletions
+711
-2
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
...tal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
+13
-0
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
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_imagefield_html.xml
...eItem/web_page_module/rjs_gadget_erp5_imagefield_html.xml
+351
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_imagefield_js.xml
...ateItem/web_page_module/rjs_gadget_erp5_imagefield_js.xml
+343
-0
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.xml
View file @
dde9c3b4
...
...
@@ -182,6 +182,19 @@ def renderField(field, form_relative_url, value=None, meta_type=None, key=None):
result["default"] = getFieldDefault(field, result["key"], value)\n
if meta_type == "FloatField":\n
result["precision"] = field.get_value("precision")\n
if meta_type == "ImageField":\n
options = {}\n
options[\'display\'] = field.get_value(\'image_display\')\n
options[\'format\'] = field.get_value(\'image_format\')\n
options[\'quality\'] = field.get_value(\'image_quality\')\n
pre_converted_only = field.get_value(\'image_pre_converted_only\')\n
if pre_converted_only:\n
options[\'pre_converted_only\'] = pre_converted_only\n
parameters = \'&\'.join([\'%s=%s\' % (k, v) for k, v in options.items() \\\n
if v])\n
if parameters:\n
result["default"] = \'%s?%s\' % (result["default"], parameters)\n
\n
elif meta_type == "DateTimeField":\n
result = {\n
"type": meta_type,\n
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
View file @
dde9c3b4
...
...
@@ -145,6 +145,8 @@
field_url = \'gadget_erp5_field_gadget.html\';\n
} else if (type === \'RadioField\') {\n
field_url = \'gadget_erp5_field_radio.html\';\n
} else if (type === \'ImageField\') {\n
field_url = \'gadget_erp5_field_image.html\';\n
}\n
return field_url;\n
}\n
...
...
@@ -508,7 +510,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
943.407
50.19186.4829
</string>
</value>
<value>
<string>
943.407
72.7493.11212
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -526,7 +528,7 @@
</tuple>
<state>
<tuple>
<float>
14340
06006.8
</float>
<float>
14340
89456.97
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_imagefield_html.xml
0 → 100644
View file @
dde9c3b4
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_imagefield_js.xml
0 → 100644
View file @
dde9c3b4
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