Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
Xiaowu Zhang
slapos.core
Commits
3d81a2c4
Commit
3d81a2c4
authored
Aug 30, 2022
by
Romain Courteaud
Committed by
Rafael Monnerat
Dec 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: use domsugar in rjs_gadget_slapos_label_listbox_field_html
parent
df92f04d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
29 deletions
+35
-29
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_html.html
...ge_module/rjs_gadget_slapos_label_listbox_field_html.html
+1
-0
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_html.xml
...age_module/rjs_gadget_slapos_label_listbox_field_html.xml
+2
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_js.js
...b_page_module/rjs_gadget_slapos_label_listbox_field_js.js
+30
-25
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_js.xml
..._page_module/rjs_gadget_slapos_label_listbox_field_js.xml
+2
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_html.html
View file @
3d81a2c4
...
...
@@ -8,6 +8,7 @@
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"domsugar.js"
></script>
<script
src=
"gadget_slapos_label_listbox_field.js"
></script>
</head>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_html.xml
View file @
3d81a2c4
...
...
@@ -240,7 +240,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
74.62049.17150.78
5
</string>
</value>
<value>
<string>
9
99.37330.56513.5326
5
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>
1
555532209.6
1
</float>
<float>
1
661864726.7
1
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_js.js
View file @
3d81a2c4
/*globals window, document, rJS, JSON */
/*globals window, document, rJS, JSON
, domsugar
*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
document
,
rJS
,
JSON
)
{
(
function
(
window
,
document
,
rJS
,
JSON
,
domsugar
)
{
"
use strict
"
;
rJS
(
window
)
...
...
@@ -9,28 +9,33 @@
return
{};
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
a
,
pre
,
value
;
return
gadget
.
getElement
()
.
push
(
function
(
element
)
{
value
=
options
.
value
;
if
(
typeof
options
.
value
===
"
string
"
)
{
if
(
options
.
value
.
startsWith
(
"
http://
"
)
||
options
.
value
.
startsWith
(
"
https://
"
))
{
a
=
document
.
createElement
(
'
a
'
);
a
.
setAttribute
(
"
href
"
,
options
.
value
);
a
.
setAttribute
(
"
target
"
,
"
_blank
"
);
a
.
innerText
=
options
.
value
;
value
=
a
.
outerHTML
;
}
else
if
(
options
.
value
.
indexOf
(
"
\n
"
)
!==
-
1
)
{
pre
=
document
.
createElement
(
'
pre
'
);
pre
.
innerText
=
options
.
value
;
value
=
pre
.
outerHTML
;
}
element
.
innerHTML
=
value
;
}
else
{
element
.
innerHTML
=
JSON
.
stringify
(
value
);
}
return
element
;
var
gadget
=
this
,
a
,
pre
,
value
=
options
.
value
,
element
=
gadget
.
element
;
if
(
typeof
value
===
"
string
"
)
{
if
(
value
.
startsWith
(
"
http://
"
)
||
value
.
startsWith
(
"
https://
"
))
{
domsugar
(
element
,
[
domsugar
(
'
a
'
,
{
href
:
value
,
target
:
'
_blank
'
,
text
:
value
})
]);
// } else if (options.value.indexOf("\n") !== -1) {
}
else
{
domsugar
(
element
,
[
domsugar
(
'
pre
'
,
{
text
:
value
})
]);
}
}
else
{
domsugar
(
element
,
{
text
:
JSON
.
stringify
(
value
)
});
}
});
}(
window
,
document
,
rJS
,
JSON
));
\ No newline at end of file
}(
window
,
document
,
rJS
,
JSON
,
domsugar
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_js.xml
View file @
3d81a2c4
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
100
0.2322.46712.16657
</string>
</value>
<value>
<string>
100
2.40907.53458.50261
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
16
58871156.69
</float>
<float>
16
61864631.42
</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