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
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
91bfa49d
Commit
91bfa49d
authored
Oct 11, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Use onStateChange method
parent
03253e2b
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
95 additions
and
156 deletions
+95
-156
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
...thTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
+1
-1
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
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_js.js
...ateItem/web_page_module/rjs_gadget_erp5_label_field_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_js.xml
...teItem/web_page_module/rjs_gadget_erp5_label_field_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
...mplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
...plateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
...Item/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
...tem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
...b_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
..._page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
...teItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_formpage_js.js
...ateItem/web_page_module/rjs_gadget_erp5_pt_formpage_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_formpage_js.xml
...teItem/web_page_module/rjs_gadget_erp5_pt_formpage_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_report_view_js.js
...Item/web_page_module/rjs_gadget_erp5_pt_report_view_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_report_view_js.xml
...tem/web_page_module/rjs_gadget_erp5_pt_report_view_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.js
...ateItem/web_page_module/rjs_gadget_erp5_searchfield_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
...teItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_stringfield_js.js
...ateItem/web_page_module/rjs_gadget_erp5_stringfield_js.js
+51
-112
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_stringfield_js.xml
...teItem/web_page_module/rjs_gadget_erp5_stringfield_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_textareafield_js.js
...eItem/web_page_module/rjs_gadget_erp5_textareafield_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_textareafield_js.xml
...Item/web_page_module/rjs_gadget_erp5_textareafield_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_element_js.js
...mplateItem/web_page_module/rjs_gadget_html5_element_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_element_js.xml
...plateItem/web_page_module/rjs_gadget_html5_element_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
...TemplateItem/web_page_module/rjs_gadget_html5_input_js.js
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.xml
...emplateItem/web_page_module/rjs_gadget_html5_input_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.js
...plateItem/web_page_module/rjs_gadget_html5_textarea_js.js
+1
-1
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.xml
...lateItem/web_page_module/rjs_gadget_html5_textarea_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
View file @
91bfa49d
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
});
});
})
})
.
declareMethod
(
'
updateDOM
'
,
function
(
modification_dict
)
{
.
onStateChange
(
function
(
modification_dict
)
{
var
i
,
var
i
,
erp5_document
=
this
.
state
.
erp5_document
,
erp5_document
=
this
.
state
.
erp5_document
,
form_definition
=
this
.
state
.
form_definition
,
form_definition
=
this
.
state
.
form_definition
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.273
20.12986.5102
9
</string>
</value>
<value>
<string>
954.273
30.54941.2914
9
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5762090.29
</float>
<float>
147
6193992.94
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_js.js
View file @
91bfa49d
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
declareMethod
(
'
updateDOM
'
,
function
(
modification_dict
)
{
.
onStateChange
(
function
(
modification_dict
)
{
var
gadget
=
this
;
var
gadget
=
this
;
if
(
modification_dict
.
hasOwnProperty
(
'
label_text
'
))
{
if
(
modification_dict
.
hasOwnProperty
(
'
label_text
'
))
{
this
.
state
.
label_text_element
.
textContent
=
this
.
state
.
label_text
;
this
.
state
.
label_text_element
.
textContent
=
this
.
state
.
label_text
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.2594
0.33315.42837
</string>
</value>
<value>
<string>
954.2594
1.22930.26914
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5678720
.94
</float>
<float>
147
6194017
.94
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
View file @
91bfa49d
...
@@ -446,7 +446,7 @@
...
@@ -446,7 +446,7 @@
.
allowPublicAcquisition
(
"
renderApplication
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
renderApplication
"
,
function
(
param_list
)
{
return
this
.
render
.
apply
(
this
,
param_list
);
return
this
.
render
.
apply
(
this
,
param_list
);
})
})
.
declareMethod
(
'
updateDOM
'
,
function
(
modification_dict
)
{
.
onStateChange
(
function
(
modification_dict
)
{
var
gadget
=
this
,
var
gadget
=
this
,
route_result
=
gadget
.
state
;
route_result
=
gadget
.
state
;
if
(
modification_dict
.
hasOwnProperty
(
'
url
'
))
{
if
(
modification_dict
.
hasOwnProperty
(
'
url
'
))
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.
23080.38606.35464
</string>
</value>
<value>
<string>
954.
34539.19221.9523
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5507095.45
</float>
<float>
147
6198512.38
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
View file @
91bfa49d
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
declareMethod
(
'
updateDOM
'
,
function
()
{
.
onStateChange
(
function
()
{
var
form_gadget
=
this
,
var
form_gadget
=
this
,
icon
,
icon
,
selector
=
form_gadget
.
element
.
querySelector
(
"
h3
"
),
selector
=
form_gadget
.
element
.
querySelector
(
"
h3
"
),
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.559
3.38130.32665
</string>
</value>
<value>
<string>
954.559
4.14865.13670
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
4544293.54
</float>
<float>
147
6194100.02
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.js
View file @
91bfa49d
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
});
});
})
})
.
declareMethod
(
'
updateDOM
'
,
function
()
{
.
onStateChange
(
function
()
{
var
form_gadget
=
this
;
var
form_gadget
=
this
;
// render the erp5 form
// render the erp5 form
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.
5675.50023.58965
</string>
</value>
<value>
<string>
954.
34605.28227.45721
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
4549231.17
</float>
<float>
147
6198578.1
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.js
View file @
91bfa49d
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
declareMethod
(
'
updateDOM
'
,
function
()
{
.
onStateChange
(
function
()
{
var
form_gadget
=
this
;
var
form_gadget
=
this
;
// render the erp5 form
// render the erp5 form
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_editable_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.2582
0.35404.6229
</string>
</value>
<value>
<string>
954.2582
1.46431.41233
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5671542.46
</float>
<float>
147
6194167.31
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.js
View file @
91bfa49d
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
declareMethod
(
'
updateDOM
'
,
function
()
{
.
onStateChange
(
function
()
{
var
gadget
=
this
;
var
gadget
=
this
;
// render the erp5 form
// render the erp5 form
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
View file @
91bfa49d
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
4546509.43
</float>
<float>
147
6194151.17
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_formpage_js.js
View file @
91bfa49d
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
});
});
});
});
})
})
.
declareMethod
(
'
updateDOM
'
,
function
(
modification_dict
)
{
.
onStateChange
(
function
(
modification_dict
)
{
var
queue
,
var
queue
,
gadget
=
this
,
gadget
=
this
,
options
=
this
.
state
.
options
,
options
=
this
.
state
.
options
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_formpage_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.
15904.46164.40277
</string>
</value>
<value>
<string>
954.
23027.11225.50944
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5503870.23
</float>
<float>
147
6194208.6
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_report_view_js.js
View file @
91bfa49d
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
form_gadget_url
:
form_gadget_url
form_gadget_url
:
form_gadget_url
});
});
})
})
.
declareMethod
(
'
updateDOM
'
,
function
(
modification_dict
)
{
.
onStateChange
(
function
(
modification_dict
)
{
var
gadget
=
this
,
var
gadget
=
this
,
form_gadget
,
form_gadget
,
section_container_element
=
document
.
createElement
(
'
div
'
),
section_container_element
=
document
.
createElement
(
'
div
'
),
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_report_view_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.2591
7.62680.11605
</string>
</value>
<value>
<string>
954.2591
9.63902.23893
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5677438.49
</float>
<float>
147
6194238.38
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.js
View file @
91bfa49d
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
declareMethod
(
'
updateDOM
'
,
function
()
{
.
onStateChange
(
function
()
{
var
gadget
=
this
;
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
'
input
'
)
return
gadget
.
getDeclaredGadget
(
'
input
'
)
.
push
(
function
(
input_gadget
)
{
.
push
(
function
(
input_gadget
)
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.1733
1.42805.2906
4
</string>
</value>
<value>
<string>
954.1733
6.1268.5507
4
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5248801.1
</float>
<float>
147
6194269.08
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_stringfield_js.js
View file @
91bfa49d
/*global window, rJS
, RSVP, loopEventListener, document
*/
/*global window, rJS */
/*jslint indent: 2, maxerr: 3 */
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
loopEventListener
,
document
)
{
(
function
(
window
,
rJS
)
{
"
use strict
"
;
"
use strict
"
;
rJS
(
window
)
rJS
(
window
)
.
ready
(
function
(
gadget
)
{
.
setState
({
return
gadget
.
getElement
()
tag
:
'
p
'
.
push
(
function
(
element
)
{
gadget
.
props
=
{};
gadget
.
element
=
element
;
});
})
.
declareAcquiredMethod
(
"
notifyValid
"
,
"
notifyValid
"
)
.
declareAcquiredMethod
(
"
notifyInvalid
"
,
"
notifyInvalid
"
)
.
declareAcquiredMethod
(
"
notifyChange
"
,
"
notifyChange
"
)
.
declareMethod
(
'
getTextContent
'
,
function
()
{
return
this
.
props
.
value
;
})
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
element
,
var
field_json
=
options
.
field_json
||
{},
field_json
=
options
.
field_json
||
{},
state_dict
=
{
created
=
false
;
value
:
field_json
.
value
||
field_json
.
default
||
""
,
this
.
props
.
value
=
field_json
.
value
||
field_json
.
default
||
""
;
editable
:
field_json
.
editable
,
this
.
props
.
editable
=
field_json
.
editable
;
required
:
field_json
.
required
,
if
(
field_json
.
editable
)
{
name
:
field_json
.
key
,
element
=
this
.
element
.
querySelector
(
'
input
'
);
title
:
field_json
.
title
if
(
element
===
null
)
{
};
element
=
document
.
createElement
(
'
input
'
);
state_dict
.
text_content
=
state_dict
.
value
;
element
.
setAttribute
(
"
type
"
,
"
text
"
);
return
this
.
changeState
(
state_dict
);
created
=
true
;
})
}
.
onStateChange
(
function
(
modification_dict
)
{
element
.
setAttribute
(
'
value
'
,
this
.
props
.
value
);
var
element
=
this
.
element
,
element
.
setAttribute
(
'
name
'
,
field_json
.
key
);
gadget
=
this
,
element
.
setAttribute
(
'
title
'
,
field_json
.
title
);
url
,
if
(
field_json
.
required
===
1
)
{
result
;
element
.
setAttribute
(
'
required
'
,
'
required
'
);
if
(
modification_dict
.
hasOwnProperty
(
'
editable
'
))
{
}
else
{
if
(
gadget
.
state
.
editable
)
{
element
.
removeAttribute
(
'
required
'
);
url
=
'
gadget_html5_input.html
'
;
}
if
(
field_json
.
disabled
)
{
element
.
setAttribute
(
"
disabled
"
,
"
disabled
"
);
}
else
{
}
else
{
element
.
removeAttribute
(
'
disabled
'
)
;
url
=
'
gadget_html5_element.html
'
;
}
}
result
=
this
.
declareGadget
(
url
,
{
scope
:
'
sub
'
})
.
push
(
function
(
input
)
{
// Clear first to DOM, append after to reduce flickering/manip
while
(
element
.
firstChild
)
{
element
.
removeChild
(
element
.
firstChild
);
}
element
.
appendChild
(
input
.
element
);
return
input
;
});
}
else
{
}
else
{
element
=
this
.
element
.
querySelector
(
'
p
'
);
result
=
this
.
getDeclaredGadget
(
'
sub
'
);
if
(
element
===
null
)
{
element
=
document
.
createElement
(
"
p
"
);
element
.
setAttribute
(
"
class
"
,
"
ui-content-non-editable
"
);
created
=
true
;
}
element
.
textContent
=
this
.
props
.
value
;
}
if
(
created
)
{
this
.
element
.
innerHTML
=
''
;
this
.
element
.
appendChild
(
element
);
}
}
return
result
.
push
(
function
(
input
)
{
return
input
.
render
(
gadget
.
state
);
});
})
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
()
{
var
input
,
if
(
this
.
state
.
editable
)
{
re
sult
=
{};
re
turn
this
.
getDeclaredGadget
(
'
sub
'
)
if
(
this
.
props
.
editable
)
{
.
push
(
function
(
gadget
)
{
input
=
this
.
element
.
querySelector
(
'
input
'
);
return
gadget
.
getContent
(
);
result
[
input
.
getAttribute
(
'
name
'
)]
=
input
.
value
;
})
;
}
}
return
result
;
return
{}
;
})
})
.
declareMethod
(
'
checkValidity
'
,
function
()
{
.
declareMethod
(
'
checkValidity
'
,
function
()
{
var
result
;
if
(
this
.
state
.
editable
)
{
if
(
!
this
.
props
.
editable
)
{
return
this
.
getDeclaredGadget
(
'
sub
'
)
return
true
;
.
push
(
function
(
gadget
)
{
}
return
gadget
.
checkValidity
();
result
=
this
.
element
.
querySelector
(
'
input
'
).
checkValidity
();
if
(
result
)
{
return
this
.
notifyValid
()
.
push
(
function
()
{
return
result
;
});
});
}
}
return
result
;
return
true
;
})
.
declareService
(
function
()
{
////////////////////////////////////
// Check field validity when the value changes
////////////////////////////////////
var
field_gadget
=
this
;
if
(
!
field_gadget
.
props
.
editable
)
{
return
;
}
function
notifyChange
()
{
return
RSVP
.
all
([
field_gadget
.
checkValidity
(),
field_gadget
.
notifyChange
()
]);
}
// Listen to input change
return
loopEventListener
(
field_gadget
.
element
.
querySelector
(
'
input
'
),
'
change
'
,
false
,
notifyChange
);
})
.
declareService
(
function
()
{
////////////////////////////////////
// Inform when the field input is invalid
////////////////////////////////////
var
field_gadget
=
this
;
if
(
!
field_gadget
.
props
.
editable
)
{
return
;
}
function
notifyInvalid
(
evt
)
{
return
field_gadget
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
}
// Listen to input change
return
loopEventListener
(
field_gadget
.
element
.
querySelector
(
'
input
'
),
'
invalid
'
,
false
,
notifyInvalid
);
});
});
}(
window
,
rJS
,
RSVP
,
loopEventListener
,
document
));
}(
window
,
rJS
));
\ No newline at end of file
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_stringfield_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
3.643.50676.9335
</string>
</value>
<value>
<string>
95
4.34570.5720.55227
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
0315124.05
</float>
<float>
147
6197972.06
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_textareafield_js.js
View file @
91bfa49d
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
declareMethod
(
'
updateDOM
'
,
function
(
modification_dict
)
{
.
onStateChange
(
function
(
modification_dict
)
{
var
element
=
this
.
element
,
var
element
=
this
.
element
,
gadget
=
this
,
gadget
=
this
,
url
,
url
,
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_textareafield_js.xml
View file @
91bfa49d
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.
15897.25014.42086
</string>
</value>
<value>
<string>
954.
34595.10317.3037
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5764759.74
</float>
<float>
147
6198249.72
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_element_js.js
View file @
91bfa49d
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
declareMethod
(
'
updateDOM
'
,
function
()
{
.
onStateChange
(
function
()
{
var
element
=
this
.
element
,
var
element
=
this
.
element
,
new_element
=
document
.
createElement
(
this
.
state
.
tag
);
new_element
=
document
.
createElement
(
this
.
state
.
tag
);
new_element
.
textContent
=
this
.
state
.
text_content
;
new_element
.
textContent
=
this
.
state
.
text_content
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_element_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.22958.
17507.4778
</string>
</value>
<value>
<string>
954.22958.
59420.56644
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5499774.36
</float>
<float>
147
6194334.9
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
View file @
91bfa49d
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
declareMethod
(
'
updateDOM
'
,
function
()
{
.
onStateChange
(
function
()
{
var
textarea
=
this
.
element
.
querySelector
(
'
input
'
);
var
textarea
=
this
.
element
.
querySelector
(
'
input
'
);
textarea
.
setAttribute
(
'
value
'
,
this
.
state
.
value
);
textarea
.
setAttribute
(
'
value
'
,
this
.
state
.
value
);
textarea
.
value
=
this
.
state
.
value
;
textarea
.
value
=
this
.
state
.
value
;
...
@@ -99,6 +99,6 @@
...
@@ -99,6 +99,6 @@
.
onEvent
(
'
invalid
'
,
function
(
evt
)
{
.
onEvent
(
'
invalid
'
,
function
(
evt
)
{
// invalid event does not bubble
// invalid event does not bubble
return
this
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
return
this
.
notifyInvalid
(
evt
.
target
.
validationMessage
);
},
true
,
tru
e
);
},
true
,
fals
e
);
}(
window
,
rJS
,
RSVP
));
}(
window
,
rJS
,
RSVP
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.
22957.21991.6673
</string>
</value>
<value>
<string>
954.
34535.18115.52548
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5511138.87
</float>
<float>
147
6198804.5
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.js
View file @
91bfa49d
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
return
this
.
changeState
(
state_dict
);
return
this
.
changeState
(
state_dict
);
})
})
.
declareMethod
(
'
updateDOM
'
,
function
()
{
.
onStateChange
(
function
()
{
var
textarea
=
this
.
element
.
querySelector
(
'
textarea
'
);
var
textarea
=
this
.
element
.
querySelector
(
'
textarea
'
);
// textarea.setAttribute('value', this.state.value);
// textarea.setAttribute('value', this.state.value);
textarea
.
value
=
this
.
state
.
value
;
textarea
.
value
=
this
.
state
.
value
;
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_textarea_js.xml
View file @
91bfa49d
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
954.27
370.32393.51592
</string>
</value>
<value>
<string>
954.27
455.2029.68
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
147
5769541.61
</float>
<float>
147
6194310.55
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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