Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
2ab4fc29
Commit
2ab4fc29
authored
Aug 09, 2017
by
Benjamin Fischer
Browse files
MainMenu: fixed placement when on the right side of the screen
parent
7589ab30
Changes
6
Hide whitespace changes
Inline
Side-by-side
vispa/static/css/common.css
View file @
2ab4fc29
...
...
@@ -5,6 +5,8 @@ ul.dropdown-menu>li.divider:first-child{display:none}
.fa-none
:before
{
content
:
"\2122"
;
color
:
transparent
!important
}
.dropdown-submenu
{
position
:
relative
}
.dropdown-submenu
>
.dropdown-menu
{
top
:
0
;
left
:
100%
;
margin-top
:
-6px
;
margin-left
:
-1px
}
.dropdown-menu-left
.dropdown-submenu
>
.dropdown-menu
{
left
:
100%
;
margin-left
:
-1px
}
.dropdown-menu-right
.dropdown-submenu
>
.dropdown-menu
{
right
:
100%
;
margin-right
:
1px
}
.dropdown-submenu
:hover
>
.dropdown-menu
{
display
:
block
}
.dropup
.dropdown-submenu
>
.dropdown-menu
{
margin-bottom
:
auto
;
bottom
:
-6px
;
top
:
auto
}
.dropdown-submenu
>
a
:after
{
display
:
block
;
content
:
" "
;
float
:
right
;
width
:
0
;
height
:
0
;
border-color
:
transparent
;
border-style
:
solid
;
border-width
:
5px
0
5px
5px
;
border-left-color
:
#ccc
;
margin-top
:
5px
;
margin-right
:
-10px
}
...
...
vispa/static/css/common.less
View file @
2ab4fc29
...
...
@@ -49,6 +49,15 @@ nav > .navbar-nav > li.active > a > b.caret {
margin-top: -6px;
margin-left: -1px;
}
.dropdown-menu-left .dropdown-submenu > .dropdown-menu {
left: 100%;
margin-left: -1px;
}
.dropdown-menu-right .dropdown-submenu > .dropdown-menu {
left: initial;
right: 100%;
margin-right: 1px;
}
.dropdown-submenu:hover > .dropdown-menu {
display: block;
}
...
...
vispa/static/css/index.css
View file @
2ab4fc29
...
...
@@ -5,6 +5,8 @@ ul.dropdown-menu>li.divider:first-child{display:none}
.fa-none
:before
{
content
:
"\2122"
;
color
:
transparent
!important
}
.dropdown-submenu
{
position
:
relative
}
.dropdown-submenu
>
.dropdown-menu
{
top
:
0
;
left
:
100%
;
margin-top
:
-6px
;
margin-left
:
-1px
}
.dropdown-menu-left
.dropdown-submenu
>
.dropdown-menu
{
left
:
100%
;
margin-left
:
-1px
}
.dropdown-menu-right
.dropdown-submenu
>
.dropdown-menu
{
left
:
initial
;
right
:
100%
;
margin-right
:
1px
}
.dropdown-submenu
:hover
>
.dropdown-menu
{
display
:
block
}
.dropup
.dropdown-submenu
>
.dropdown-menu
{
margin-bottom
:
auto
;
bottom
:
-6px
;
top
:
auto
}
.dropdown-submenu
>
a
:after
{
display
:
block
;
content
:
" "
;
float
:
right
;
width
:
0
;
height
:
0
;
border-color
:
transparent
;
border-style
:
solid
;
border-width
:
5px
0
5px
5px
;
border-left-color
:
#ccc
;
margin-top
:
5px
;
margin-right
:
-10px
}
...
...
vispa/static/html/index/vue/menu-main.html
View file @
2ab4fc29
<ul
class=
"dropdown-menu"
>
<ul
:
class=
"
['
dropdown-menu
', 'dropdown-menu-' + direction]
"
>
<li
:class=
"wsClass"
>
<a
v-if=
"wsData.current"
@
click.stop
>
<i
:class=
"wsStateIcon | iconPrefix"
></i>
...
...
vispa/static/js/ui/tabber.js
View file @
2ab4fc29
...
...
@@ -218,6 +218,10 @@ define([
// initialize spaner
this
.
_nodes
.
$spawner
.
children
().
click
(
function
()
{
// $(this).toggleClass("open", true);
var
r
=
this
.
parentNode
.
getBoundingClientRect
();
var
l
=
r
.
left
+
window
.
pageXOffset
;
var
w
=
window
.
innerWidth
;
vispa
.
mainMenu
.
direction
=
2
*
l
>
w
?
"
right
"
:
"
left
"
;
vispa
.
mainMenu
.
$appendTo
(
this
.
parentNode
);
vispa
.
mainMenu
.
$options
.
tabber
=
self
;
});
...
...
vispa/static/js/vue/mainmenu.js
View file @
2ab4fc29
...
...
@@ -114,6 +114,11 @@ define([
});
var
MainMenu
=
Menu
.
headless
.
extend
({
data
:
function
()
{
return
{
direction
:
"
left
"
,
};
},
template
:
tMainMenu
.
trim
(),
created
:
function
()
{
this
.
wsExtra
=
$
.
extend
(
true
,
{},
wsExtra
);
...
...
Write
Preview
Supports
Markdown
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