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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
2c3b23b1
Commit
2c3b23b1
authored
Nov 17, 2020
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: Use domsugar instead of document.createElement
parent
157e2c07
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
30 deletions
+33
-30
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_html.html
...mplateItem/web_page_module/rjs_gadget_erp5_form_html.html
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_html.xml
...emplateItem/web_page_module/rjs_gadget_erp5_form_html.xml
+2
-2
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
+7
-7
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_html.html
...tem/web_page_module/rjs_gadget_erp5_label_field_html.html
+2
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_html.xml
...Item/web_page_module/rjs_gadget_erp5_label_field_html.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
+9
-9
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_pt_form_dialog_js.js
...Item/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.js
+4
-4
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
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_html.html
View file @
2c3b23b1
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<!-- renderjs -->
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"domsugar.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<!-- custom script -->
<script
src=
"gadget_erp5_form.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_form.js"
type=
"text/javascript"
></script>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_html.xml
View file @
2c3b23b1
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
69.41882.58371.33382
</string>
</value>
<value>
<string>
9
87.52327.33749.63539
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
536679144.4
5
</float>
<float>
1
605646543.3
5
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.js
View file @
2c3b23b1
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*global window, document, rJS, RSVP*/
/*global window, document, rJS, RSVP
, domsugar
*/
/** Form is one of a complicated gadget!
/** Form is one of a complicated gadget!
*
*
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* changed in FormBox gadget which renders form as a subgadget
* changed in FormBox gadget which renders form as a subgadget
**/
**/
(
function
(
window
,
document
,
rJS
,
RSVP
)
{
(
function
(
window
,
document
,
rJS
,
RSVP
,
domsugar
)
{
"
use strict
"
;
"
use strict
"
;
/**
/**
...
@@ -234,19 +234,19 @@
...
@@ -234,19 +234,19 @@
}
}
if
(
form_definition
.
hasOwnProperty
(
"
edit_form_href
"
))
{
if
(
form_definition
.
hasOwnProperty
(
"
edit_form_href
"
))
{
field_href
=
do
cument
.
createElement
(
"
a
"
);
field_href
=
do
msugar
(
"
a
"
);
field_href
.
href
=
form_definition
.
edit_form_href
;
field_href
.
href
=
form_definition
.
edit_form_href
;
field_href
.
title
=
"
Edit this form
"
;
field_href
.
title
=
"
Edit this form
"
;
field_href
.
appendChild
(
do
cument
.
createElement
(
"
img
"
));
field_href
.
appendChild
(
do
msugar
(
"
img
"
));
field_href
.
firstElementChild
.
src
=
form_definition
.
edit_form_icon
;
field_href
.
firstElementChild
.
src
=
form_definition
.
edit_form_icon
;
form_gadget
.
element
.
insertBefore
(
field_href
,
dom_element
);
form_gadget
.
element
.
insertBefore
(
field_href
,
dom_element
);
}
}
if
(
form_definition
.
hasOwnProperty
(
"
edit_form_action_href
"
))
{
if
(
form_definition
.
hasOwnProperty
(
"
edit_form_action_href
"
))
{
field_href
=
do
cument
.
createElement
(
"
a
"
);
field_href
=
do
msugar
(
"
a
"
);
field_href
.
href
=
form_definition
.
edit_form_action_href
;
field_href
.
href
=
form_definition
.
edit_form_action_href
;
field_href
.
title
=
"
Edit this form's action
"
;
field_href
.
title
=
"
Edit this form's action
"
;
field_href
.
appendChild
(
do
cument
.
createElement
(
"
img
"
));
field_href
.
appendChild
(
do
msugar
(
"
img
"
));
field_href
.
firstElementChild
.
src
=
form_definition
.
edit_form_action_icon
;
field_href
.
firstElementChild
.
src
=
form_definition
.
edit_form_action_icon
;
form_gadget
.
element
.
insertBefore
(
field_href
,
dom_element
);
form_gadget
.
element
.
insertBefore
(
field_href
,
dom_element
);
}
}
...
@@ -328,4 +328,4 @@
...
@@ -328,4 +328,4 @@
},
{
mutex
:
'
changestate
'
});
},
{
mutex
:
'
changestate
'
});
}(
window
,
document
,
rJS
,
RSVP
));
}(
window
,
document
,
rJS
,
RSVP
,
domsugar
));
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
View file @
2c3b23b1
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
7.52017.59742.51780
</string>
</value>
<value>
<string>
98
8.2144.42914.58385
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
160
4672111.49
</float>
<float>
160
5646718.06
</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_html.html
View file @
2c3b23b1
...
@@ -10,8 +10,10 @@
...
@@ -10,8 +10,10 @@
<!-- renderjs -->
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"domsugar.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<!-- custom script -->
<script
src=
"gadget_erp5_label_field.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_label_field.js"
type=
"text/javascript"
></script>
</head>
</head>
<body>
<body>
<div
class=
"ui-field-contain"
>
<div
class=
"ui-field-contain"
>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_html.xml
View file @
2c3b23b1
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
70.11191.7445.40789
</string>
</value>
<value>
<string>
9
88.2724.42282.37358
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
536679172.23
</float>
<float>
1
605646555.5
</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 @
2c3b23b1
/*global window, document, rJS */
/*global window, document, rJS
, domsugar
*/
/*jslint indent: 2, maxerr: 3 */
/*jslint indent: 2, maxerr: 3 */
/**
/**
* Label gadget takes care of displaying validation errors and label.
* Label gadget takes care of displaying validation errors and label.
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
* - class "horizontal_align_form_box" will prevent any label to show as well
* - class "horizontal_align_form_box" will prevent any label to show as well
*
*
*/
*/
(
function
(
window
,
document
,
rJS
)
{
(
function
(
window
,
document
,
rJS
,
domsugar
)
{
"
use strict
"
;
"
use strict
"
;
var
SCOPE
=
'
field
'
;
var
SCOPE
=
'
field
'
;
...
@@ -134,28 +134,28 @@
...
@@ -134,28 +134,28 @@
if
(
field_json
)
{
if
(
field_json
)
{
if
(
field_json
.
hasOwnProperty
(
'
edit_field_href
'
))
{
if
(
field_json
.
hasOwnProperty
(
'
edit_field_href
'
))
{
field_href
=
do
cument
.
createElement
(
"
a
"
);
field_href
=
do
msugar
(
"
a
"
);
field_href
.
href
=
field_json
.
edit_field_href
;
field_href
.
href
=
field_json
.
edit_field_href
;
field_href
.
title
=
"
Edit this field
"
;
field_href
.
title
=
"
Edit this field
"
;
field_href
.
appendChild
(
do
cument
.
createElement
(
"
img
"
));
field_href
.
appendChild
(
do
msugar
(
"
img
"
));
field_href
.
firstElementChild
.
src
=
field_json
.
edit_field_icon
;
field_href
.
firstElementChild
.
src
=
field_json
.
edit_field_icon
;
this
.
props
.
label_element
.
appendChild
(
field_href
);
this
.
props
.
label_element
.
appendChild
(
field_href
);
}
}
if
(
field_json
.
hasOwnProperty
(
'
translate_title_href
'
))
{
if
(
field_json
.
hasOwnProperty
(
'
translate_title_href
'
))
{
field_href
=
do
cument
.
createElement
(
"
a
"
);
field_href
=
do
msugar
(
"
a
"
);
field_href
.
href
=
field_json
.
translate_title_href
;
field_href
.
href
=
field_json
.
translate_title_href
;
field_href
.
title
=
"
Translate this field title
"
;
field_href
.
title
=
"
Translate this field title
"
;
field_href
.
appendChild
(
do
cument
.
createElement
(
"
img
"
));
field_href
.
appendChild
(
do
msugar
(
"
img
"
));
field_href
.
firstElementChild
.
src
=
field_json
.
translate_title_icon
;
field_href
.
firstElementChild
.
src
=
field_json
.
translate_title_icon
;
this
.
props
.
label_element
.
appendChild
(
field_href
);
this
.
props
.
label_element
.
appendChild
(
field_href
);
}
}
if
(
field_json
.
hasOwnProperty
(
'
translate_description_href
'
))
{
if
(
field_json
.
hasOwnProperty
(
'
translate_description_href
'
))
{
field_href
=
do
cument
.
createElement
(
"
a
"
);
field_href
=
do
msugar
(
"
a
"
);
field_href
.
href
=
field_json
.
translate_description_href
;
field_href
.
href
=
field_json
.
translate_description_href
;
field_href
.
title
=
"
Translate this field description
"
;
field_href
.
title
=
"
Translate this field description
"
;
field_href
.
appendChild
(
do
cument
.
createElement
(
"
img
"
));
field_href
.
appendChild
(
do
msugar
(
"
img
"
));
field_href
.
firstElementChild
.
src
=
field_json
.
translate_description_icon
;
field_href
.
firstElementChild
.
src
=
field_json
.
translate_description_icon
;
this
.
props
.
label_element
.
appendChild
(
field_href
);
this
.
props
.
label_element
.
appendChild
(
field_href
);
}
}
...
@@ -280,4 +280,4 @@
...
@@ -280,4 +280,4 @@
return
this
.
changeState
({
first_call
:
true
,
error_text
:
error_text
});
return
this
.
changeState
({
first_call
:
true
,
error_text
:
error_text
});
});
});
}(
window
,
document
,
rJS
));
}(
window
,
document
,
rJS
,
domsugar
));
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_label_field_js.xml
View file @
2c3b23b1
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
7.42313.38411.5666
</string>
</value>
<value>
<string>
98
8.2731.33743.17595
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
160
4090662.46
</float>
<float>
160
5646942.89
</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 @
2c3b23b1
...
@@ -295,19 +295,19 @@
...
@@ -295,19 +295,19 @@
selector
.
textContent
=
"
\
u00A0
"
+
translated_title_list
[
0
];
selector
.
textContent
=
"
\
u00A0
"
+
translated_title_list
[
0
];
selector
.
className
=
"
ui-content-title ui-body-c ui-icon ui-icon-custom
"
+
icon
;
selector
.
className
=
"
ui-content-title ui-body-c ui-icon ui-icon-custom
"
+
icon
;
if
(
form_definition
.
hasOwnProperty
(
"
edit_form_href
"
))
{
if
(
form_definition
.
hasOwnProperty
(
"
edit_form_href
"
))
{
field_href
=
do
cument
.
createElement
(
"
a
"
);
field_href
=
do
msugar
(
"
a
"
);
field_href
.
href
=
form_definition
.
edit_form_href
;
field_href
.
href
=
form_definition
.
edit_form_href
;
field_href
.
title
=
"
Edit this form
"
;
field_href
.
title
=
"
Edit this form
"
;
field_href
.
appendChild
(
do
cument
.
createElement
(
"
img
"
));
field_href
.
appendChild
(
do
msugar
(
"
img
"
));
field_href
.
firstElementChild
.
src
=
form_definition
.
edit_form_icon
;
field_href
.
firstElementChild
.
src
=
form_definition
.
edit_form_icon
;
selector
.
appendChild
(
field_href
);
selector
.
appendChild
(
field_href
);
}
}
if
(
form_definition
.
hasOwnProperty
(
"
edit_form_action_href
"
))
{
if
(
form_definition
.
hasOwnProperty
(
"
edit_form_action_href
"
))
{
field_href
=
do
cument
.
createElement
(
"
a
"
);
field_href
=
do
msugar
(
"
a
"
);
field_href
.
href
=
form_definition
.
edit_form_action_href
;
field_href
.
href
=
form_definition
.
edit_form_action_href
;
field_href
.
title
=
"
Edit this form's action
"
;
field_href
.
title
=
"
Edit this form's action
"
;
field_href
.
appendChild
(
do
cument
.
createElement
(
"
img
"
));
field_href
.
appendChild
(
do
msugar
(
"
img
"
));
field_href
.
firstElementChild
.
src
=
form_definition
.
edit_form_action_icon
;
field_href
.
firstElementChild
.
src
=
form_definition
.
edit_form_action_icon
;
selector
.
appendChild
(
field_href
);
selector
.
appendChild
(
field_href
);
}
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_dialog_js.xml
View file @
2c3b23b1
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
987.
42388.43014.21896
</string>
</value>
<value>
<string>
987.
52327.33749.63539
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
160
4095960.55
</float>
<float>
160
5641027.16
</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