Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Vincent Bechu
erp5
Commits
7805962e
Commit
7805962e
authored
Dec 07, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] add possibility to hide panel in desktop view
parent
b631f7e1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
175 additions
and
27 deletions
+175
-27
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
...mplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
+23
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
...plateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
+2
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
...emplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
+76
-11
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
...emplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
+2
-2
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
...teItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
+72
-9
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
View file @
7805962e
...
...
@@ -168,7 +168,20 @@
}
return
displayErrorContent
(
gadget
,
error
);
}
function
hideDesktopPanel
(
gadget
,
hide
)
{
gadget
.
props
.
hide_panel
=
hide
;
if
(
hide
)
{
if
(
!
gadget
.
element
.
classList
.
contains
(
'
desktop-panel-hidden
'
))
{
gadget
.
element
.
classList
.
toggle
(
'
desktop-panel-hidden
'
);
}
return
route
(
gadget
,
"
panel
"
,
"
close
"
);
}
else
{
if
(
gadget
.
element
.
classList
.
contains
(
'
desktop-panel-hidden
'
))
{
gadget
.
element
.
classList
.
remove
(
'
desktop-panel-hidden
'
);
}
return
route
(
gadget
,
"
panel
"
,
"
open
"
);
}
}
//////////////////////////////////////////
// Page rendering
//////////////////////////////////////////
...
...
@@ -434,6 +447,9 @@
.
allowPublicAcquisition
(
'
triggerPanel
'
,
function
()
{
return
route
(
this
,
"
panel
"
,
"
toggle
"
);
})
.
allowPublicAcquisition
(
'
hidePanel
'
,
function
(
param_list
)
{
return
hideDesktopPanel
(
this
,
param_list
[
0
]);
})
.
allowPublicAcquisition
(
'
renderEditorPanel
'
,
function
(
param_list
)
{
return
route
(
this
,
"
editor_panel
"
,
'
render
'
,
param_list
);
})
...
...
@@ -566,9 +582,13 @@
})
.
push
(
function
()
{
var
promise_list
=
[
route
(
gadget
,
'
panel
'
,
'
close
'
),
route
(
gadget
,
'
editor_panel
'
,
'
close
'
)
];
if
(
gadget
.
props
.
desktop
&&
!
gadget
.
props
.
hide_panel
)
{
promise_list
.
push
(
route
(
gadget
,
'
panel
'
,
'
open
'
));
}
else
{
promise_list
.
push
(
route
(
gadget
,
'
panel
'
,
'
close
'
));
}
if
(
keep_message
!==
true
)
{
promise_list
.
push
(
route
(
gadget
,
'
notification
'
,
'
close
'
));
}
...
...
@@ -597,7 +617,7 @@
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
var
desktop
=
window
.
matchMedia
(
"
(min-width: 85em)
"
).
matches
,
method
=
desktop
?
'
open
'
:
'
close
'
;
method
=
desktop
&&
!
gadget
.
props
.
hide_panel
?
'
open
'
:
'
close
'
;
gadget
.
props
.
panel_argument_list
.
desktop
=
desktop
;
gadget
.
props
.
desktop
=
desktop
;
return
route
(
gadget
,
'
panel
'
,
method
);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
7805962e
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
963.638
70.21758.35942
</string>
</value>
<value>
<string>
963.638
96.43591.9710
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
151265
2755.
5
</float>
<float>
151265
4651.5
5
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.css
View file @
7805962e
...
...
@@ -433,24 +433,19 @@ div[data-gadget-scope='panel'] {
overflow-y
:
auto
;
position
:
fixed
;
top
:
0
;
left
:
0
;
left
:
-186pt
;
display
:
block
;
z-index
:
2000
;
transition
:
transform
200ms
ease-out
;
transform
:
translate3d
(
0
,
0
,
0
);
}
@media
not
screen
and
(
min-width
:
45em
),
only
screen
and
(
min-width
:
45em
)
and
(
max-width
:
85em
)
{
div
[
data-gadget-scope
=
'panel'
]
{
box-shadow
:
5px
0
5px
rgba
(
0
,
0
,
0
,
0.15
);
}
}
@media
not
screen
and
(
min-width
:
45em
),
only
screen
and
(
min-width
:
45em
)
and
(
max-width
:
85em
)
{
div
[
data-gadget-scope
=
'panel'
]
{
left
:
-186pt
;
transition
:
transform
200ms
ease-out
;
transform
:
translate3d
(
0
,
0
,
0
);
}
div
[
data-gadget-scope
=
'panel'
]
.visible
{
div
[
data-gadget-scope
=
'panel'
]
.visible
{
transform
:
translate3d
(
186pt
,
0
,
0
);
}
}
div
[
data-gadget-scope
=
'panel'
]
div
[
data-role
=
"header"
]
{
display
:
flex
;
...
...
@@ -686,7 +681,8 @@ div[data-gadget-scope='header'] .ui-header {
}
@media
not
screen
and
(
max-width
:
85em
)
{
div
[
data-gadget-scope
=
'header'
]
.ui-header
{
margin-left
:
180pt
;
transition
:
transform
200ms
ease-out
;
transform
:
translate3d
(
180pt
,
0
,
0
);
}
}
div
[
data-gadget-scope
=
'header'
]
.ui-header
button
,
...
...
@@ -1511,6 +1507,75 @@ div[data-gadget-scope='notification'] button.error {
}
}
/**********************************************
* Desktop Panel Hidden
**********************************************/
@media
not
screen
and
(
max-width
:
85em
)
{
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
{
margin-left
:
0
;
transform
:
translate3d
(
0
,
0
,
0
);
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
.ui-controlgroup-controls
button
,
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
.ui-controlgroup-controls
a
{
background-color
:
#085078
;
width
:
8em
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
.ui-controlgroup-controls
button
[
name
=
"panel"
],
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
.ui-controlgroup-controls
a
[
name
=
"panel"
]
{
display
:
block
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
>
.ui-btn-right
button
,
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
>
.ui-btn-right
a
{
border-left
:
1px
solid
rgba
(
255
,
255
,
255
,
0.55
);
padding-left
:
0
;
padding-right
:
0
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
h1
{
flex
:
1
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
h1
>
span
{
padding-left
:
16pt
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
h1
>
span
::before
{
margin-right
:
14pt
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
h1
a
::before
,
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
h1
form
button
::before
{
text-align
:
center
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
.ui-subheader
{
text-align
:
center
;
flex
:
1
100%
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
ul
>
li
{
flex
:
1
;
border-left
:
1px
solid
rgba
(
0
,
0
,
0
,
0.55
);
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
ul
>
li
:first-child
{
border-left
:
none
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
ul
>
li
a
{
display
:
block
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
ul
>
li
a
{
padding-top
:
3pt
;
padding-bottom
:
3pt
;
line-height
:
inherit
;
white-space
:
nowrap
;
overflow
:
hidden
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
"header"
]
.ui-header
ul
>
li
a
::before
{
font-size
:
1.2em
;
display
:
block
;
}
.desktop-panel-hidden
.gadget-content
{
margin-left
:
0
;
padding-top
:
7em
;
}
.desktop-panel-hidden
div
[
data-gadget-scope
=
'panel'
]
div
[
data-role
=
"header"
]
button
[
data-i18n
=
"Close"
]
{
display
:
block
;
}
}
/**********************************************
* Class
**********************************************/
.content-iframe-maximize
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_nojqm_css.xml
View file @
7805962e
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
963.63
661.56222.1621
</string>
</value>
<value>
<string>
963.63
901.12081.3089
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
15126
40534.69
</float>
<float>
15126
54762.48
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui/erp5css.less.txt
View file @
7805962e
...
...
@@ -541,18 +541,15 @@ div[data-gadget-scope='panel'] {
overflow-y: auto;
position: fixed;
top: 0;
left:
0
;
left:
-@panelwidth - @margin-size
;
display: block;
z-index: 2000;
@media @smartphone, @tablet {
left: -@panelwidth - @margin-size;
transition: transform 200ms ease-out;
transform: translate3d(0, 0, 0);
&.visible {
transform: translate3d(@panelwidth + @margin-size, 0, 0);
}
}
div[data-role="header"] {
display: flex;
...
...
@@ -856,7 +853,8 @@ div[data-gadget-scope='header'] .ui-header {
width: 100%;
@media @desktop {
margin-left: @panelwidth;
transition: transform 200ms ease-out;
transform: translate3d(@panelwidth, 0, 0);
}
color: @white;
...
...
@@ -1728,7 +1726,72 @@ div[data-gadget-scope='notification'] {
from {opacity:0;}
to {opacity:1;}
}
/**********************************************
* Desktop Panel Hidden
**********************************************/
@media @desktop {
.desktop-panel-hidden {
div[data-gadget-scope="header"] .ui-header {
margin-left: 0;
transform: translate3d(0, 0, 0);
.ui-controlgroup-controls {
button, a {
background-color: @colorheaderbackground;
width: 8em;
&[name="panel"] {
display: block;
}
}
}
& > .ui-btn-right {
button, a {
border-left: 1px solid rgba(255, 255, 255, 0.55);
padding-left: 0;
padding-right: 0;
}
}
h1 {
flex: 1;
& > span {
.renderTabletNotALinkTitle();
}
a, form button {
&::before {
text-align: center;
}
}
}
.ui-subheader {
text-align: center;
flex: 1 100%;
}
ul > li {
.renderTabletSubListElement();
a {
.renderTabletSubLink();
}
}
}
.gadget-content {
margin-left: 0;
padding-top: 7em;
}
div[data-gadget-scope='panel'] {
div[data-role="header"] {
button[data-i18n="Close"] {
display: block;
}
}
}
}
}
/**********************************************
* Class
**********************************************/
...
...
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