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
Xavier Thompson
slapos.core
Commits
eb538f1d
Commit
eb538f1d
authored
Nov 23, 2022
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Fixup collapse/expand of parameters
parent
adee783a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
37 deletions
+25
-37
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css.css
...e_module/rjs_gadget_erp5_page_slap_parameter_form_css.css
+2
-17
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css.xml
...e_module/rjs_gadget_erp5_page_slap_parameter_form_css.xml
+2
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_html.html
...module/rjs_gadget_erp5_page_slap_parameter_form_html.html
+1
-1
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_html.xml
..._module/rjs_gadget_erp5_page_slap_parameter_form_html.xml
+2
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.js
...age_module/rjs_gadget_erp5_page_slap_parameter_form_js.js
+16
-13
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
...ge_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
+2
-2
No files found.
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css.css
View file @
eb538f1d
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
display
:
inline-block
;
display
:
inline-block
;
}
}
button
.hidden-button
{
.display-none
{
display
:
none
;
display
:
none
;
}
}
...
@@ -68,29 +68,14 @@ margin: 5px 0 10px; max-height: 250px; width: 80%;}
...
@@ -68,29 +68,14 @@ margin: 5px 0 10px; max-height: 250px; width: 80%;}
.subfield
{
.subfield
{
padding-left
:
20px
;
padding-left
:
20px
;
}
label
.slapos-parameter-dict-key
::before
{
content
:
"Parameter Entry: "
;
}
div
.slapos-parameter-dict-key
{
margin-top
:
10px
;
margin-left
:
6px
;
}
.subfield
{
padding-top
:
3px
;
padding-top
:
3px
;
}
}
textarea
.slapos-parameter
{
textarea
.slapos-parameter
{
width
:
400px
;
width
:
400px
;
height
:
100px
;
height
:
100px
;
}
}
button
.hidden-button
{
display
:
none
;
}
label
.slapos-parameter-dict-key
::before
{
label
.slapos-parameter-dict-key
::before
{
content
:
"\25BC Parameter Entry: "
;
content
:
"\25BC Parameter Entry: "
;
}
}
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css.xml
View file @
eb538f1d
...
@@ -267,7 +267,7 @@
...
@@ -267,7 +267,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
977.18105.11982.1041
0
</string>
</value>
<value>
<string>
1004.33923.4937.1937
0
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -285,7 +285,7 @@
...
@@ -285,7 +285,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1
563920275.64
</float>
<float>
1
669223474.78
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_html.html
View file @
eb538f1d
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
</div>
</div>
<div
class=
"field"
title=
"hide_show_button"
>
<div
class=
"field"
title=
"hide_show_button"
>
<div
class=
"input"
>
<div
class=
"input"
>
<button
type=
"button"
class=
"slapos-show-form
hidden-button
"
>
Show Parameter Form
</button>
<button
type=
"button"
class=
"slapos-show-form
display-none
"
>
Show Parameter Form
</button>
<button
type=
"button"
class=
"slapos-show-raw-parameter"
>
Show Parameter XML
</button>
<button
type=
"button"
class=
"slapos-show-raw-parameter"
>
Show Parameter XML
</button>
</div>
</div>
</div>
</div>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_html.xml
View file @
eb538f1d
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,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
4.26625.54107.30429
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -256,7 +256,7 @@
...
@@ -256,7 +256,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
166
8785389.46
</float>
<float>
166
9223665.45
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.js
View file @
eb538f1d
...
@@ -375,7 +375,8 @@
...
@@ -375,7 +375,8 @@
render_subform
({},
render_subform
({},
default_dict
[
key
],
default_dict
[
key
],
domsugar
(
"
div
"
,
{
"
class
"
:
"
input
"
}),
domsugar
(
"
div
"
,
{
"
class
"
:
"
input
"
}),
path
+
"
/
"
+
key
)
path
+
"
/
"
+
key
,
editable
)
]);
]);
}
else
{
}
else
{
input
=
render_field
({
"
type
"
:
"
string
"
,
"
textarea
"
:
true
},
default_dict
[
key
],
false
);
input
=
render_field
({
"
type
"
:
"
string
"
,
"
textarea
"
:
true
},
default_dict
[
key
],
false
);
...
@@ -485,13 +486,15 @@
...
@@ -485,13 +486,15 @@
}
}
function
collapseParameter
(
element
)
{
function
collapseParameter
(
element
)
{
element
.
parentNode
.
querySelector
(
"
div
"
).
toggle
(
300
);
element
.
parentNode
.
querySelectorAll
(
"
div.subfield
"
).
forEach
(
function
(
div
,
i
)
{
div
.
classList
.
toggle
(
"
display-none
"
);
});
element
.
classList
.
toggle
(
"
slapos-parameter-dict-key-colapse
"
);
element
.
classList
.
toggle
(
"
slapos-parameter-dict-key-colapse
"
);
return
element
;
return
element
;
}
}
function
removeSubParameter
(
element
)
{
function
removeSubParameter
(
element
)
{
element
.
parentNo
n
e
.
parentNode
.
remove
();
element
.
parentNo
d
e
.
parentNode
.
remove
();
return
false
;
return
false
;
}
}
...
@@ -511,7 +514,7 @@
...
@@ -511,7 +514,7 @@
text
:
input_text
.
value
text
:
input_text
.
value
})]);
})]);
div
=
render_subform
(
subform_json
,
{},
div
,
element
.
name
+
"
/
"
+
input_text
.
value
);
div
=
render_subform
(
subform_json
,
{},
div
,
element
.
name
+
"
/
"
+
input_text
.
value
,
gadget
.
state
.
editable
);
element
.
parentNode
.
parentNode
.
insertBefore
(
div
,
element
.
parentNode
.
parentNode
.
children
[
1
]);
element
.
parentNode
.
parentNode
.
insertBefore
(
div
,
element
.
parentNode
.
parentNode
.
children
[
1
]);
return
div
;
return
div
;
}
}
...
@@ -552,8 +555,8 @@
...
@@ -552,8 +555,8 @@
throw
new
Error
(
"
Select not found.
"
);
throw
new
Error
(
"
Select not found.
"
);
}
}
to_hide
.
classList
.
add
(
"
hidden-button
"
);
to_hide
.
classList
.
add
(
"
display-none
"
);
to_show
.
classList
.
remove
(
"
hidden-button
"
);
to_show
.
classList
.
remove
(
"
display-none
"
);
return
g
.
changeState
({
return
g
.
changeState
({
display_step
:
DISPLAY_JSON_FORM
,
display_step
:
DISPLAY_JSON_FORM
,
...
@@ -567,8 +570,8 @@
...
@@ -567,8 +570,8 @@
var
e
=
g
.
element
.
querySelector
(
"
button.slapos-show-raw-parameter
"
),
var
e
=
g
.
element
.
querySelector
(
"
button.slapos-show-raw-parameter
"
),
to_show
=
g
.
element
.
querySelector
(
"
button.slapos-show-form
"
);
to_show
=
g
.
element
.
querySelector
(
"
button.slapos-show-form
"
);
e
.
classList
.
add
(
"
hidden-button
"
);
e
.
classList
.
add
(
"
display-none
"
);
to_show
.
classList
.
remove
(
"
hidden-button
"
);
to_show
.
classList
.
remove
(
"
display-none
"
);
return
g
.
changeState
({
return
g
.
changeState
({
display_step
:
DISPLAY_RAW_XML
,
display_step
:
DISPLAY_RAW_XML
,
...
@@ -685,11 +688,11 @@
...
@@ -685,11 +688,11 @@
if
(
error_text
)
{
if
(
error_text
)
{
if
(
show_raw_button
!==
null
)
{
if
(
show_raw_button
!==
null
)
{
show_raw_button
.
classList
.
add
(
"
hidden-button
"
);
show_raw_button
.
classList
.
add
(
"
display-none
"
);
}
}
if
(
show_form_button
!==
null
)
{
if
(
show_form_button
!==
null
)
{
show_form_button
.
classList
.
remove
(
"
hidden-button
"
);
show_form_button
.
classList
.
remove
(
"
display-none
"
);
}
}
div_error
=
domsugar
(
'
div
'
,
{
div_error
=
domsugar
(
'
div
'
,
{
...
@@ -753,11 +756,11 @@
...
@@ -753,11 +756,11 @@
}
}
if
(
to_hide
!==
null
)
{
if
(
to_hide
!==
null
)
{
to_hide
.
classList
.
add
(
"
hidden-button
"
);
to_hide
.
classList
.
add
(
"
display-none
"
);
}
}
if
(
to_show
!==
null
)
{
if
(
to_show
!==
null
)
{
to_show
.
classList
.
remove
(
"
hidden-button
"
);
to_show
.
classList
.
remove
(
"
display-none
"
);
}
}
return
gadget
.
loadSoftwareJSON
(
json_url
)
return
gadget
.
loadSoftwareJSON
(
json_url
)
.
push
(
function
(
json
)
{
.
push
(
function
(
json
)
{
...
@@ -961,7 +964,7 @@
...
@@ -961,7 +964,7 @@
for
(
i
=
0
;
i
<
div_list
.
length
;
i
=
i
+
1
)
{
for
(
i
=
0
;
i
<
div_list
.
length
;
i
=
i
+
1
)
{
// This should be replaced by a proper class hidden-div
// This should be replaced by a proper class hidden-div
div_list
[
i
].
style
.
display
=
'
none
'
;
div_list
[
i
].
classList
.
add
(
'
display-none
'
)
;
}
}
for
(
i
=
0
;
i
<
label_list
.
length
;
i
=
i
+
1
)
{
for
(
i
=
0
;
i
<
label_list
.
length
;
i
=
i
+
1
)
{
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
View file @
eb538f1d
...
@@ -280,7 +280,7 @@
...
@@ -280,7 +280,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
1004.
26620.25323.62993
</string>
</value>
<value>
<string>
1004.
33938.61743.7680
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -298,7 +298,7 @@
...
@@ -298,7 +298,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
166
8786346.24
</float>
<float>
166
9224195.85
</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