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
Thomas Gambier
slapos.core
Commits
cc41f3a9
Commit
cc41f3a9
authored
May 19, 2018
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: Improve JSON Form Rendering Style
This was done by Sven Franck.
parent
034498e5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
138 additions
and
114 deletions
+138
-114
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
+105
-110
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
+29
-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
+2
-0
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 @
cc41f3a9
div
.subfield
{
margin-left
:
15px
;
}
fieldset
>
.subfield
{
padding-left
:
0
}
.subfield
{
padding-left
:
20px
;
}
label
.slapos-parameter-dict-key
::before
{
content
:
"\25BC Parameter Entry: "
;
}
label
.slapos-parameter-dict-key-colapse
::before
{
content
:
"\25BA Parameter Entry: "
;
}
label
.slapos-parameter-dict-key
{
text-transform
:
capitalize
;
/* display: block !important; */
width
:
99%
;
padding
:
5px
;
font-size
:
110%
;
line-height
:
20px
;
color
:
rgb
(
93
,
128
,
125
)
!important
;
cursor
:
pointer
;
}
div
.slapos-parameter-dict-key
{
margin-top
:
10px
;
background
:
rgb
(
239
,
252
,
249
);
border
:
1px
solid
rgb
(
233
,
247
,
253
);
padding
:
5px
;
}
div
.slapos-parameter-dict-key
.subfield
:last-child
{
padding
:
5px
5px
10px
20px
;
}
#software-type
{
padding
:
10px
0
0
;}
#software-type
{
padding
:
10px
0
0
;}
#software-type
.field
[
title
=
'serialisation_type'
]
.input
{
padding-top
:
0
;
}
#software-type
.field
[
title
=
'serialisation_type'
]
.input
{
padding-top
:
0
;
}
.subfield
,
#software-type
.input
{
.subfield
,
#software-type
.input
{
padding-top
:
10px
;
padding-top
:
10px
;
}
}
.subfield
label
,
#software-type
label
{
display
:
inline-block
;
margin-bottom
:
1px
;
color
:
rgb
(
124
,
134
,
149
)
}
fieldset
>
.subfield
>
label
{
font-size
:
113%
;
color
:
rgb
(
112
,
125
,
136
);
}
.subfield
span
{
.subfield
span
{
font-weight
:
normal
;
font-weight
:
normal
;
font-style
:
italic
;
font-style
:
italic
;
...
@@ -70,41 +22,11 @@ fieldset > .subfield > label {
...
@@ -70,41 +22,11 @@ fieldset > .subfield > label {
font-weight
:
700
;
font-weight
:
700
;
}
}
.subfield
input
{
font-size
:
100%
;
width
:
240px
;
}
.input
button
{
margin-left
:
10px
;}
.input
button
{
margin-left
:
10px
;}
.add-sub-form
{
background
:
#3498db
;
background-image
:
-webkit-linear-gradient
(
top
,
#3498db
,
#2980b9
);
background-image
:
-moz-linear-gradient
(
top
,
#3498db
,
#2980b9
);
background-image
:
-ms-linear-gradient
(
top
,
#3498db
,
#2980b9
);
background-image
:
-o-linear-gradient
(
top
,
#3498db
,
#2980b9
);
background-image
:
linear-gradient
(
to
bottom
,
#3498db
,
#2980b9
);
-webkit-border-radius
:
4
;
-moz-border-radius
:
4
;
border-radius
:
4px
;
border
:
1px
solid
#3498db
;
color
:
#ffffff
;
font-size
:
15px
;
font-weight
:
bold
;
padding
:
6px
20px
;
text-decoration
:
none
;
cursor
:
pointer
;
}
.add-sub-form
:hover
{
background
:
#3cb0fd
;
background-image
:
-webkit-linear-gradient
(
top
,
#3cb0fd
,
#3498db
);
background-image
:
-moz-linear-gradient
(
top
,
#3cb0fd
,
#3498db
);
background-image
:
-ms-linear-gradient
(
top
,
#3cb0fd
,
#3498db
);
background-image
:
-o-linear-gradient
(
top
,
#3cb0fd
,
#3498db
);
background-image
:
linear-gradient
(
to
bottom
,
#3cb0fd
,
#3498db
);
text-decoration
:
none
;
}
.bt_close
,
.subfield
.slapos-parameter-dict-key
span
.bt_close
{
.bt_close
,
.subfield
.slapos-parameter-dict-key
span
.bt_close
{
padding
:
0
6px
;
padding
:
0
6px
;
...
@@ -152,9 +74,6 @@ label.slapos-parameter-dict-key::before {
...
@@ -152,9 +74,6 @@ label.slapos-parameter-dict-key::before {
content
:
"Parameter Entry: "
;
content
:
"Parameter Entry: "
;
}
}
label
.slapos-parameter-dict-key
{
font-color
:
"red"
;
}
div
.slapos-parameter-dict-key
{
div
.slapos-parameter-dict-key
{
margin-top
:
10px
;
margin-top
:
10px
;
...
@@ -164,7 +83,6 @@ div.slapos-parameter-dict-key {
...
@@ -164,7 +83,6 @@ div.slapos-parameter-dict-key {
.subfield
{
.subfield
{
padding-top
:
3px
;
padding-top
:
3px
;
}
}
textarea
.slapos-parameter
{
textarea
.slapos-parameter
{
width
:
400px
;
width
:
400px
;
height
:
100px
;
height
:
100px
;
...
@@ -173,30 +91,107 @@ textarea.slapos-parameter {
...
@@ -173,30 +91,107 @@ textarea.slapos-parameter {
button
.hidden-button
{
button
.hidden-button
{
display
:
none
;
display
:
none
;
}
}
label
.slapos-parameter-dict-key
::before
{
content
:
"\25BC Parameter Entry: "
;
}
label
.slapos-parameter-dict-key-colapse
::before
{
content
:
"\25BA Parameter Entry: "
;
}
div
.slapos-parameter-dict-key
{
margin-top
:
10px
;
background
:
rgb
(
239
,
252
,
249
);
border
:
1px
solid
rgb
(
233
,
247
,
253
);
padding
:
5px
;
}
.add-sub-form
{
/* cleanup */
background
:
#3498db
;
fieldset
>
.subfield
>
label
:not
(
.slapos-parameter-dict-key
)
{
background-image
:
-webkit-linear-gradient
(
top
,
#3498db
,
#2980b9
);
font-size
:
113%
;
background-image
:
-moz-linear-gradient
(
top
,
#3498db
,
#2980b9
);
color
:
rgb
(
112
,
125
,
136
);
background-image
:
-ms-linear-gradient
(
top
,
#3498db
,
#2980b9
);
}
background-image
:
-o-linear-gradient
(
top
,
#3498db
,
#2980b9
);
fieldset
>
div
.subfield
{
background-image
:
linear-gradient
(
to
bottom
,
#3498db
,
#2980b9
);
padding-left
:
15px
;
-webkit-border-radius
:
28
;
-webkit-box-sizing
:
border-box
;
-moz-border-radius
:
28
;
-moz-box-sizing
:
border-box
;
border-radius
:
28px
;
box-sizing
:
border-box
;
font-family
:
Arial
;
}
color
:
#ffffff
;
.field
input
~
span
,
font-size
:
12px
;
.subfield
input
~
span
{
padding
:
5px
20px
5px
20px
;
position
:
relative
;
text-decoration
:
none
;
top
:
-30px
;
pointer-events
:
none
;
cursor
:
text
;
}
.field
input
:not
(
:placeholder-shown
)
~
span
:not
(
.error
),
.subfield
input
:not
(
:placeholder-shown
)
~
span
:not
(
.error
)
{
visibility
:
hidden
;
}
.field
input
~
span
:not
(
.error
),
.subfield
input
~
span
:not
(
.error
)
{
opacity
:
.7
;
}
.field
input
:focus
~
span
,
.subfield
input
:focus
~
span
{
visibility
:
hidden
;
}
.subfield
.input
{
margin-bottom
:
-20px
;
}
.subfield
.error
{
float
:
right
;
margin-right
:
30px
;
}
.subfield
.input
textarea
{
margin-bottom
:
16px
;
}
}
.add-sub-form
:hover
{
.slapos-show-raw-parameter
,
background
:
#3cb0fd
;
.slapos-parameter-dict-key
,
background-image
:
-webkit-linear-gradient
(
top
,
#3cb0fd
,
#3498db
);
.slapos-show-form
{
background-image
:
-moz-linear-gradient
(
top
,
#3cb0fd
,
#3498db
);
cursor
:
pointer
;
background-image
:
-ms-linear-gradient
(
top
,
#3cb0fd
,
#3498db
);
font-style
:
italic
;
background-image
:
-o-linear-gradient
(
top
,
#3cb0fd
,
#3498db
);
font-size
:
14px
;
background-image
:
linear-gradient
(
to
bottom
,
#3cb0fd
,
#3498db
);
color
:
#000
;
}
.slapos-show-form
,
.slapos-show-raw-parameter
{
margin
:
4px
auto
;
padding-left
:
24px
;
/* add an icon? */
}
label
.slapos-parameter-dict-key
{
text-transform
:
capitalize
;
}
label
.slapos-parameter-dict-key
~
div
.input
label
{
font-size
:
113%
;
color
:
rgb
(
112
,
125
,
136
);
}
.slapos-parameter-dict-key
label
{
color
:
rgb
(
112
,
125
,
136
);
}
/* add button */
.slapos-parameter-dict-key
~
.subfield
.input
{
position
:
relative
;
margin-bottom
:
0
;
}
.input
.add-sub-form
{
position
:
absolute
;
right
:
0
;
top
:
0
;
bottom
:
0
;
text-decoration
:
none
;
text-decoration
:
none
;
cursor
:
pointer
;
color
:
#fff
;
margin
:
0
;
}
}
.add-sub-form
:before
{
background
:
url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='50px' height='50px'><path fill='#000' d='m6,17.16589l12.55862,0l0,-15.274l12.88276,0l0,15.274l12.55862,0l0,15.66822l-12.55862,0l0,15.274l-12.88276,0l0,-15.274l-12.55862,0l0,-15.66822z' fill-opacity='0.5'/></svg>")
;
background-size
:
contain
;
content
:
""
;
width
:
16px
;
height
:
16px
;
position
:
absolute
;
background-repeat
:
no-repeat
;
top
:
8px
;
left
:
4px
;
}
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_css.xml
View file @
cc41f3a9
...
@@ -73,6 +73,14 @@
...
@@ -73,6 +73,14 @@
<key>
<string>
content_type
</string>
</key>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/css
</string>
</value>
<value>
<string>
text/css
</string>
</value>
</item>
</item>
<item>
<key>
<string>
creators
</string>
</key>
<value>
<tuple>
<string>
zope
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
default_reference
</string>
</key>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_page_slap_parameter_form.css
</string>
</value>
<value>
<string>
gadget_erp5_page_slap_parameter_form.css
</string>
</value>
...
@@ -91,6 +99,25 @@
...
@@ -91,6 +99,25 @@
<key>
<string>
language
</string>
</key>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
<value>
<string>
en
</string>
</value>
</item>
</item>
<item>
<key>
<string>
modification_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1523884648.28
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<item>
<key>
<string>
portal_type
</string>
</key>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Style
</string>
</value>
<value>
<string>
Web Style
</string>
</value>
...
@@ -234,7 +261,7 @@
...
@@ -234,7 +261,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.4082.5546.20428
</string>
</value>
<value>
<string>
96
6.58781.43824.3635
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +279,7 @@
...
@@ -252,7 +279,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
12997577.25
</float>
<float>
15
26718311.48
</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 @
cc41f3a9
...
@@ -268,6 +268,7 @@
...
@@ -268,6 +268,7 @@
input
=
render_field
(
json_field
.
properties
[
key
],
default_dict
[
key
]);
input
=
render_field
(
json_field
.
properties
[
key
],
default_dict
[
key
]);
input
.
name
=
path
+
"
/
"
+
key
;
input
.
name
=
path
+
"
/
"
+
key
;
input
.
setAttribute
(
"
class
"
,
"
slapos-parameter
"
);
input
.
setAttribute
(
"
class
"
,
"
slapos-parameter
"
);
input
.
setAttribute
(
"
placeholder
"
,
"
"
);
div_input
.
appendChild
(
input
);
div_input
.
appendChild
(
input
);
}
}
default_used_list
.
push
(
key
);
default_used_list
.
push
(
key
);
...
@@ -297,6 +298,7 @@
...
@@ -297,6 +298,7 @@
input
=
render_field
({
"
type
"
:
"
string
"
},
default_dict
[
key
]);
input
=
render_field
({
"
type
"
:
"
string
"
},
default_dict
[
key
]);
input
.
name
=
path
+
"
/
"
+
key
;
input
.
name
=
path
+
"
/
"
+
key
;
input
.
setAttribute
(
"
class
"
,
"
slapos-parameter
"
);
input
.
setAttribute
(
"
class
"
,
"
slapos-parameter
"
);
input
.
setAttribute
(
"
placeholder
"
,
"
"
);
div_input
.
appendChild
(
input
);
div_input
.
appendChild
(
input
);
default_used_list
.
push
(
key
);
default_used_list
.
push
(
key
);
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_parameter_form_js.xml
View file @
cc41f3a9
...
@@ -274,7 +274,7 @@
...
@@ -274,7 +274,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
967.3
0809.39786.479
5
</string>
</value>
<value>
<string>
967.3
1177.54920.3237
5
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -292,7 +292,7 @@
...
@@ -292,7 +292,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1526
066609.97
</float>
<float>
1526
718410.04
</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