Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
GitLab is undergoing maintenance
You are on a read-only GitLab instance.
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
327fbe02
Commit
327fbe02
authored
10 years ago
by
Michael Enz
Browse files
Options
Downloads
Patches
Plain Diff
FXOLAT-480: fixed offcanvas, menu should always show when toggle is clicked
parent
d46cd51c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/webapp/static/js/jquery/openolat/jquery.navbar.js
+18
-13
18 additions, 13 deletions
src/main/webapp/static/js/jquery/openolat/jquery.navbar.js
src/main/webapp/static/js/js.plugins.min.js
+1
-1
1 addition, 1 deletion
src/main/webapp/static/js/js.plugins.min.js
with
19 additions
and
14 deletions
src/main/webapp/static/js/jquery/openolat/jquery.navbar.js
+
18
−
13
View file @
327fbe02
...
@@ -28,7 +28,6 @@
...
@@ -28,7 +28,6 @@
this
.
addExtraElements
();
this
.
addExtraElements
();
this
.
state
=
{
this
.
state
=
{
rightVisible
:
false
,
busy
:
false
,
busy
:
false
,
brandW
:
0
,
brandW
:
0
,
sitesW
:
0
,
sitesW
:
0
,
...
@@ -355,18 +354,19 @@
...
@@ -355,18 +354,19 @@
}
}
Navbar
.
prototype
.
showRight
=
function
()
{
Navbar
.
prototype
.
showRight
=
function
()
{
if
(
!
this
.
state
.
rightVisible
)
{
if
(
!
this
.
isOffcanvasVisible
()
&&
!
this
.
offcanvasTransitioning
)
{
this
.
offcanvasTransitioning
=
true
;
var
that
=
this
;
var
that
=
this
;
var
box
=
$
(
'
#o_offcanvas_right
'
);
var
box
=
$
(
'
#o_offcanvas_right
'
);
box
.
show
().
transition
({
x
:
-
that
.
state
.
offCanvasWidth
},
function
()
{
box
.
show
().
transition
({
x
:
-
that
.
state
.
offCanvasWidth
},
function
()
{
that
.
offcanvasTransitioning
=
false
;
$
(
'
body
'
).
addClass
(
'
o_offcanvas_right_visible
'
);
$
(
'
body
'
).
addClass
(
'
o_offcanvas_right_visible
'
);
that
.
state
.
rightVisible
=
true
;
// hide menu when clicking anywhere in content (timeout to pass the event in IE8/9 which hide the navbar)
var
listener
=
$
.
proxy
(
that
.
hideRightOnClick
,
that
);
setTimeout
(
function
()
{
$
(
'
html
'
).
on
(
'
click
'
,
listener
);
},
10
);
}
);
}
);
// hide menu when clicking anywhere in content (timeout to pass the event in IE8/9 which hide the navbar)
var
listener
=
$
.
proxy
(
this
.
hideRightOnClick
,
this
);
setTimeout
(
function
()
{
$
(
'
html
'
).
on
(
'
click
'
,
listener
);
},
10
);
}
}
}
}
Navbar
.
prototype
.
hideRightOnClick
=
function
(
e
)
{
Navbar
.
prototype
.
hideRightOnClick
=
function
(
e
)
{
...
@@ -375,26 +375,31 @@
...
@@ -375,26 +375,31 @@
}
}
}
}
Navbar
.
prototype
.
hideRight
=
function
()
{
Navbar
.
prototype
.
hideRight
=
function
()
{
if
(
this
.
state
.
rightVisible
)
{
if
(
this
.
isOffcanvasVisible
()
&&
!
this
.
offcanvasTransitioning
)
{
this
.
offcanvasTransitioning
=
true
;
// remove listener to hide menu
$
(
'
html
'
).
off
(
'
click
'
,
$
.
proxy
(
this
.
hideRight
,
this
));
var
that
=
this
;
var
that
=
this
;
var
box
=
$
(
'
#o_offcanvas_right
'
);
var
box
=
$
(
'
#o_offcanvas_right
'
);
box
.
transition
({
x
:
that
.
state
.
offCanvasWidth
},
function
()
{
box
.
transition
({
x
:
that
.
state
.
offCanvasWidth
},
function
()
{
that
.
offcanvasTransitioning
=
false
;
box
.
hide
();
box
.
hide
();
$
(
'
body
'
).
removeClass
(
'
o_offcanvas_right_visible
'
);
$
(
'
body
'
).
removeClass
(
'
o_offcanvas_right_visible
'
);
that
.
state
.
rightVisible
=
false
;
}
);
}
);
// remove listener to hide menu
$
(
'
html
'
).
off
(
'
click
'
,
$
.
proxy
(
this
.
hideRight
,
this
));
}
}
}
}
Navbar
.
prototype
.
toggleRight
=
function
()
{
Navbar
.
prototype
.
toggleRight
=
function
()
{
if
(
this
.
state
.
right
Visible
)
{
if
(
this
.
isOffcanvas
Visible
()
)
{
this
.
hideRight
();
this
.
hideRight
();
}
else
{
}
else
{
this
.
showRight
();
this
.
showRight
();
}
}
}
}
Navbar
.
prototype
.
isOffcanvasVisible
=
function
()
{
return
$
(
'
#o_offcanvas_right:visible
'
).
length
;
}
Navbar
.
prototype
.
getSites
=
function
()
{
Navbar
.
prototype
.
getSites
=
function
()
{
return
$
(
'
#o_navbar_container .o_navbar_sites
'
);
return
$
(
'
#o_navbar_container .o_navbar_sites
'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/static/js/js.plugins.min.js
+
1
−
1
View file @
327fbe02
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment