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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
fa6b944b
Commit
fa6b944b
authored
Oct 17, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Rewrite readonly field
parent
71636846
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
20 deletions
+24
-20
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_html.html
...m/web_page_module/rjs_gadget_erp5_readonlyfield_html.html
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_html.xml
...em/web_page_module/rjs_gadget_erp5_readonlyfield_html.xml
+4
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_js.js
...eItem/web_page_module/rjs_gadget_erp5_readonlyfield_js.js
+15
-11
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_js.xml
...Item/web_page_module/rjs_gadget_erp5_readonlyfield_js.xml
+4
-4
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_html.html
View file @
fa6b944b
...
...
@@ -13,6 +13,6 @@
</head>
<body>
<
p></p
>
<
div
data-gadget-url=
"gadget_html5_element.html"
data-gadget-scope=
"p"
></div
>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_html.xml
View file @
fa6b944b
...
...
@@ -220,7 +220,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
37.48463.61692.15325
</string>
</value>
<value>
<string>
9
54.42863.28521.29388
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,8 +252,8 @@
</tuple>
<state>
<tuple>
<float>
14
11392972.05
</float>
<string>
GMT
</string>
<float>
14
76694144.73
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_js.js
View file @
fa6b944b
/*global window, rJS
*/
/*global window, rJS*/
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
)
{
"
use strict
"
;
rJS
(
window
)
.
ready
(
function
(
gadget
)
{
return
gadget
.
getElement
()
.
push
(
function
(
element
)
{
gadget
.
element
=
element
;
});
.
setState
({
tag
:
'
p
'
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
input
=
this
.
element
.
querySelector
(
'
p
'
),
field_json
=
options
.
field_json
||
{};
input
.
textContent
=
field_json
.
value
||
field_json
.
default
||
""
;
var
field_json
=
options
.
field_json
||
{},
state_dict
=
{
text_content
:
field_json
.
value
||
field_json
.
default
||
""
};
return
this
.
changeState
(
state_dict
);
})
.
declareMethod
(
'
getContent
'
,
function
()
{
return
{};
.
onStateChange
(
function
(
modification_dict
)
{
var
gadget
=
this
;
return
this
.
getDeclaredGadget
(
'
p
'
)
.
push
(
function
(
input
)
{
return
input
.
render
(
gadget
.
state
);
});
});
}(
window
,
rJS
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_readonlyfield_js.xml
View file @
fa6b944b
...
...
@@ -216,7 +216,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
romain
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
37.42845.63862.35925
</string>
</value>
<value>
<string>
9
54.42865.16049.14216
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,8 +248,8 @@
</tuple>
<state>
<tuple>
<float>
14
11392995.5
</float>
<string>
GMT
</string>
<float>
14
76694564.13
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
...
...
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