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
1
Merge Requests
1
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
Romain Courteaud
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
Show 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 @@
...
@@ -8,6 +8,7 @@
<script
src=
"rsvp.js"
></script>
<script
src=
"rsvp.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"renderjs.js"
></script>
<script
src=
"domsugar.js"
></script>
<script
src=
"gadget_slapos_label_listbox_field.js"
></script>
<script
src=
"gadget_slapos_label_listbox_field.js"
></script>
</head>
</head>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_html.xml
View file @
3d81a2c4
...
@@ -240,7 +240,7 @@
...
@@ -240,7 +240,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -258,7 +258,7 @@
...
@@ -258,7 +258,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
555532209.6
1
</float>
<float>
1
661864726.7
1
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
document
,
rJS
,
JSON
)
{
(
function
(
window
,
document
,
rJS
,
JSON
,
domsugar
)
{
"
use strict
"
;
"
use strict
"
;
rJS
(
window
)
rJS
(
window
)
...
@@ -9,28 +9,33 @@
...
@@ -9,28 +9,33 @@
return
{};
return
{};
})
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
a
,
pre
,
value
;
var
gadget
=
this
,
return
gadget
.
getElement
()
a
,
.
push
(
function
(
element
)
{
pre
,
value
=
options
.
value
;
value
=
options
.
value
,
if
(
typeof
options
.
value
===
"
string
"
)
{
element
=
gadget
.
element
;
if
(
options
.
value
.
startsWith
(
"
http://
"
)
||
if
(
typeof
value
===
"
string
"
)
{
options
.
value
.
startsWith
(
"
https://
"
))
{
if
(
value
.
startsWith
(
"
http://
"
)
||
a
=
document
.
createElement
(
'
a
'
);
value
.
startsWith
(
"
https://
"
))
{
a
.
setAttribute
(
"
href
"
,
options
.
value
);
domsugar
(
element
,
[
a
.
setAttribute
(
"
target
"
,
"
_blank
"
);
domsugar
(
'
a
'
,
{
a
.
innerText
=
options
.
value
;
href
:
value
,
value
=
a
.
outerHTML
;
target
:
'
_blank
'
,
}
else
if
(
options
.
value
.
indexOf
(
"
\n
"
)
!==
-
1
)
{
text
:
value
pre
=
document
.
createElement
(
'
pre
'
);
})
pre
.
innerText
=
options
.
value
;
]);
value
=
pre
.
outerHTML
;
// } else if (options.value.indexOf("\n") !== -1) {
}
element
.
innerHTML
=
value
;
}
else
{
}
else
{
element
.
innerHTML
=
JSON
.
stringify
(
value
);
domsugar
(
element
,
[
domsugar
(
'
pre
'
,
{
text
:
value
})
]);
}
}
return
element
;
}
else
{
domsugar
(
element
,
{
text
:
JSON
.
stringify
(
value
)
});
});
}
});
});
}(
window
,
document
,
rJS
,
JSON
));
}(
window
,
document
,
rJS
,
JSON
,
domsugar
));
\ No newline at end of file
\ 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 @@
...
@@ -236,7 +236,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<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>
<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>
16
58871156.69
</float>
<float>
16
61864631.42
</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