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
Labels
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
5b98f5ec
Commit
5b98f5ec
authored
Jul 26, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Fixup gadget for render urls on listbox
Handle non string values.
parent
33659245
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
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
+8
-12
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
+3
-3
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_js.js
View file @
5b98f5ec
/*globals
console, window, document, rJS, loopEventListener, i18n
*/
/*globals
window, document, rJS, JSON
*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
document
,
rJS
)
{
(
function
(
window
,
document
,
rJS
,
JSON
)
{
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
);
gadget_klass
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
rJS
(
window
)
.
declareMethod
(
"
getContent
"
,
function
()
{
return
{};
})
...
...
@@ -19,7 +13,7 @@
return
gadget
.
getElement
()
.
push
(
function
(
element
)
{
value
=
options
.
value
;
if
(
options
.
value
)
{
if
(
typeof
options
.
value
===
"
string
"
)
{
if
(
options
.
value
.
startsWith
(
"
http://
"
)
||
options
.
value
.
startsWith
(
"
https://
"
))
{
a
=
document
.
createElement
(
'
a
'
);
...
...
@@ -32,9 +26,11 @@
pre
.
innerText
=
options
.
value
;
value
=
pre
.
outerHTML
;
}
element
.
innerHTML
=
value
;
}
else
{
element
.
innerHTML
=
JSON
.
stringify
(
value
);
}
element
.
innerHTML
=
value
;
return
element
;
});
});
}(
window
,
document
,
rJS
));
\ No newline at end of file
}(
window
,
document
,
rJS
,
JSON
));
\ No newline at end of file
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_js.xml
View file @
5b98f5ec
...
...
@@ -222,7 +222,7 @@
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
superthomas
</string>
</value>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
972.17178.36781.34560
</string>
</value>
<value>
<string>
1000.2322.46712.16657
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1
544636507.97
</float>
<float>
1
658871156.69
</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