Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
f37dbece
Commit
f37dbece
authored
Feb 10, 2015
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: improve gadgetfield
1: Resize gadget if it's declared in iframe 2: Add getContent test
parent
73eb31dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_gadgetfield_js.xml
...teItem/web_page_module/rjs_gadget_erp5_gadgetfield_js.xml
+14
-3
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_gadgetfield_js.xml
View file @
f37dbece
...
...
@@ -120,7 +120,16 @@
});\n
})\n
.push(function (field_gadget) {\n
var iframe;\n
gadget.props.field_gadget = field_gadget;\n
if (field_json.css_class) {\n
gadget_element.setAttribute("class", field_json.css_class);\n
}\n
if (field_json.sandbox === "iframe") {\n
iframe = gadget_element.querySelector("iframe");\n
iframe.style.width = "100%";\n
iframe.style.height = "100%";\n
}\n
if (field_gadget.render !== undefined) {\n
return field_gadget.render(suboptions);\n
}\n
...
...
@@ -163,7 +172,9 @@
}\n
})\n
.declareMethod("getContent", function () {\n
return this.props.field_gadget.getContent();\n
if (this.props.field_gadget.getContent) {\n
return this.props.field_gadget.getContent();\n
}\n
});\n
}(window, document, rJS, RSVP));\n
</string>
</value>
...
...
@@ -301,7 +312,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
940.
17406.2535.58641
</string>
</value>
<value>
<string>
940.
57981.32712.11997
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -319,7 +330,7 @@
</tuple>
<state>
<tuple>
<float>
142
1153187.18
</float>
<float>
142
3588896.63
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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