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
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
Levin Zimmermann
erp5
Commits
5dcf3bc7
Commit
5dcf3bc7
authored
Jan 18, 2022
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: Use domsugar instead of DOM API
also, fix indentation
parent
f46c50ec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
22 deletions
+25
-22
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_html.html
...tem/web_page_module/rjs_gadget_erp5_searchfield_html.html
+8
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_html.xml
...Item/web_page_module/rjs_gadget_erp5_searchfield_html.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
+13
-11
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
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_html.html
View file @
5dcf3bc7
...
...
@@ -9,6 +9,7 @@
<!-- renderjs -->
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"domsugar.js"
></script>
<script
src=
"jiodev.js"
type=
"text/javascript"
></script>
<!-- custom script -->
...
...
@@ -16,12 +17,12 @@
</head>
<body>
<div
class=
"ui-input-text"
>
<div
class=
"search_parsed_value"
></div>
<div
data-gadget-url=
"gadget_html5_input.html"
data-gadget-scope=
"input"
data-gadget-sandbox=
"public"
></div>
<button
class=
"search_button ui-btn-icon-notext ui-icon-search"
type=
"submit"
/>
</div>
<div
class=
"ui-input-text"
>
<div
class=
"search_parsed_value"
></div>
<div
data-gadget-url=
"gadget_html5_input.html"
data-gadget-scope=
"input"
data-gadget-sandbox=
"public"
></div>
<button
class=
"search_button ui-btn-icon-notext ui-icon-search"
type=
"submit"
/>
</div>
</body>
</html>
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_html.xml
View file @
5dcf3bc7
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
70.15561.39912.10990
</string>
</value>
<value>
<string>
9
97.39354.39569.61815
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
1
537193726.71
</float>
<float>
1
642544018.82
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.js
View file @
5dcf3bc7
/*global window, rJS, document, Node,
QueryFactory, SimpleQuery, ComplexQuery, Query*/
QueryFactory, SimpleQuery, ComplexQuery, Query
, domsugar
*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
document
,
Node
,
QueryFactory
,
SimpleQuery
,
ComplexQuery
,
Query
)
{
QueryFactory
,
SimpleQuery
,
ComplexQuery
,
Query
,
domsugar
)
{
"
use strict
"
;
function
convertQueryToSearchText
(
query
)
{
...
...
@@ -114,15 +114,17 @@
button_container
.
innerHTML
=
''
;
len
=
query_text_list
.
length
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
button
=
document
.
createElement
(
'
button
'
);
button
.
textContent
=
query_text_list
[
i
];
button
.
value
=
i
;
button_container
.
appendChild
(
button
);
button_container
.
appendChild
(
domsugar
(
"
button
"
,
{
"
text
"
:
query_text_list
[
i
],
"
value
"
:
i
})
);
}
button
=
document
.
createElement
(
'
input
'
);
button
.
setAttribute
(
"
type
"
,
"
hidden
"
);
button
.
value
=
parsed_value
;
button_container
.
appendChild
(
button
);
button
_container
.
appendChild
(
domsugar
(
"
input
"
,
{
"
type
"
:
"
hidden
"
,
"
value
"
:
parsed_value
})
);
return
gadget
.
getDeclaredGadget
(
'
input
'
)
.
push
(
function
(
input_gadget
)
{
...
...
@@ -235,4 +237,4 @@
},
false
,
false
);
}(
window
,
rJS
,
document
,
Node
,
QueryFactory
,
SimpleQuery
,
ComplexQuery
,
Query
));
\ No newline at end of file
QueryFactory
,
SimpleQuery
,
ComplexQuery
,
Query
,
domsugar
));
\ No newline at end of file
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_searchfield_js.xml
View file @
5dcf3bc7
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
87.27464.21813.55483
</string>
</value>
<value>
<string>
9
97.39359.32235.40874
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
16
04428536.71
</float>
<float>
16
42544051.96
</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