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
8fb30b9a
Commit
8fb30b9a
authored
Dec 13, 2018
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
listbox_field: add a <pre> tag if parameter value is multilines to save the formatting
Also fix linter
parent
aac8b6c1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
16 deletions
+21
-16
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
+17
-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
+4
-4
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_slapos_label_listbox_field_js.js
View file @
8fb30b9a
/*globals console, window, document, rJS,
RSVP, loopEventListener, i18n, Handlebars $
*/
/*globals console, window, document, rJS,
loopEventListener, i18n
*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
/*jslint indent: 2, nomen: true, maxlen: 80*/
(
function
(
window
,
document
,
rJS
,
RSVP
,
Handlebars
)
{
(
function
(
window
,
document
,
rJS
)
{
"
use strict
"
;
"
use strict
"
;
var
gadget_klass
=
rJS
(
window
);
var
gadget_klass
=
rJS
(
window
);
...
@@ -15,21 +15,26 @@
...
@@ -15,21 +15,26 @@
return
{};
return
{};
})
})
.
declareMethod
(
"
render
"
,
function
(
options
)
{
.
declareMethod
(
"
render
"
,
function
(
options
)
{
var
gadget
=
this
,
a
,
value
;
var
gadget
=
this
,
a
,
pre
,
value
;
return
gadget
.
getElement
()
return
gadget
.
getElement
()
.
push
(
function
(
element
)
{
.
push
(
function
(
element
)
{
value
=
options
.
value
;
value
=
options
.
value
;
if
(
options
.
value
&&
if
(
options
.
value
)
{
(
options
.
value
.
startsWith
(
"
http://
"
)
||
if
(
options
.
value
.
startsWith
(
"
http://
"
)
||
options
.
value
.
startsWith
(
"
https://
"
))
)
{
options
.
value
.
startsWith
(
"
https://
"
))
{
a
=
document
.
createElement
(
'
a
'
);
a
=
document
.
createElement
(
'
a
'
);
a
.
setAttribute
(
"
href
"
,
options
.
value
);
a
.
setAttribute
(
"
href
"
,
options
.
value
);
a
.
setAttribute
(
"
target
"
,
"
_blank
"
);
a
.
setAttribute
(
"
target
"
,
"
_blank
"
);
a
.
innerText
=
options
.
value
;
a
.
innerText
=
options
.
value
;
value
=
a
.
outerHTML
;
value
=
a
.
outerHTML
;
}
else
if
(
options
.
value
.
indexOf
(
"
\n
"
)
!==
-
1
)
{
pre
=
document
.
createElement
(
'
pre
'
);
pre
.
innerText
=
options
.
value
;
value
=
pre
.
outerHTML
;
}
}
}
element
.
innerHTML
=
value
;
element
.
innerHTML
=
value
;
return
element
;
return
element
;
});
});
});
});
}(
window
,
document
,
rJS
,
RSVP
,
Handlebars
));
}(
window
,
document
,
rJS
));
\ 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 @
8fb30b9a
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget SlapOS
Site invoice State
</string>
</value>
<value>
<string>
Gadget SlapOS
Label Listbox Field
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
version
</string>
</key>
<key>
<string>
version
</string>
</key>
...
@@ -216,7 +216,7 @@
...
@@ -216,7 +216,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
actor
</string>
</key>
<key>
<string>
actor
</string>
</key>
<value>
<string>
ERP5TypeTestCase
</string>
</value>
<value>
<string>
superthomas
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
comment
</string>
</key>
<key>
<string>
comment
</string>
</key>
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
65.40941.62497.477
</string>
</value>
<value>
<string>
9
72.17178.36781.34560
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
19141899.05
</float>
<float>
15
44636507.97
</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