Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
fa704347
Commit
fa704347
authored
May 14, 2018
by
Tomáš Peterka
Committed by
Tomáš Peterka
May 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[renderjs_ui] Lock Formbox using mutex
parent
1fecf1e3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
26 deletions
+12
-26
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_html.html
...m/web_page_module/rjs_gadget_erp5_field_formbox_html.html
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_html.xml
...em/web_page_module/rjs_gadget_erp5_field_formbox_html.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_js.js
...eItem/web_page_module/rjs_gadget_erp5_field_formbox_js.js
+5
-20
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_js.xml
...Item/web_page_module/rjs_gadget_erp5_field_formbox_js.xml
+3
-3
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_html.html
View file @
fa704347
...
...
@@ -13,5 +13,6 @@
</head>
<body>
<div
data-gadget-url=
'gadget_erp5_page_form.html'
data-gadget-scope=
'sub'
></div>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_html.xml
View file @
fa704347
...
...
@@ -220,7 +220,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
superkato
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.
29269.53660.61405
</string>
</value>
<value>
<string>
961.
56527.16709.20804
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
15
02977305.6
</float>
<float>
15
26316799.74
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_js.js
View file @
fa704347
...
...
@@ -24,8 +24,8 @@
gadget
=
this
,
field_json
=
options
.
field_json
||
{},
new_state
=
{
value
:
field_json
.
value
||
field_json
.
default
||
""
,
text_content
:
field_json
.
value
||
field_json
.
default
||
""
,
value
:
field_json
.
value
||
field_json
[
'
default
'
]
||
""
,
text_content
:
field_json
.
value
||
field_json
[
'
default
'
]
||
""
,
editable
:
field_json
.
editable
,
required
:
field_json
.
required
,
name
:
field_json
.
key
,
...
...
@@ -41,21 +41,6 @@
new_state
.
editable
=
options
.
editable
;
}
if
(
gadget
.
state
.
subgadget_template
===
undefined
||
options
.
reset
===
true
)
{
// render subgadget only when there is none OR render is explicitely requested
return
gadget
.
declareGadget
(
'
gadget_erp5_page_form.html
'
,
{
scope
:
'
sub
'
})
.
push
(
function
(
form_gadget
)
{
// Clear first to DOM, append after to reduce flickering/manip
while
(
element
.
firstChild
)
{
element
.
removeChild
(
element
.
firstChild
);
}
element
.
appendChild
(
form_gadget
.
element
);
// Add newly created subgadget to the state
new_state
.
subgadget_template
=
'
gadget_erp5_page_form.html
'
;
return
gadget
.
changeState
(
new_state
);
});
}
return
gadget
.
changeState
(
new_state
);
})
...
...
@@ -78,7 +63,7 @@
return
gadget
.
getDeclaredGadget
(
'
sub
'
)
.
push
(
function
(
subgadget
)
{
subgadget
.
render
(
form_options
);
return
subgadget
.
render
(
form_options
);
});
})
...
...
@@ -90,7 +75,7 @@
});
}
return
{};
})
}
,
{
mutex
:
'
changestate
'
}
)
.
declareMethod
(
'
checkValidity
'
,
function
()
{
if
(
this
.
state
.
editable
)
{
...
...
@@ -100,6 +85,6 @@
});
}
return
true
;
});
}
,
{
mutex
:
'
changestate
'
}
);
}(
window
,
rJS
,
URI
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_field_formbox_js.xml
View file @
fa704347
...
...
@@ -216,7 +216,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
<value>
<string>
superkato
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.24080.24291.61081
</string>
</value>
<value>
<string>
96
7.35221.49309.22852
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
152
1818911.25
</float>
<float>
152
6316882.68
</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