Toggle navigation bar on mobile and desktop devices
Signed-off-by: Artem Anufrij <artem.anufrij@live.de>
This commit is contained in:
committed by
Julius Härtl
parent
42f3f5c1dd
commit
882bf773c8
@@ -53,4 +53,24 @@ app.run(function ($document, $rootScope, $transitions, BoardService) {
|
||||
OC.filePath('deck', 'img', 'app-512.png')
|
||||
);
|
||||
|
||||
$('#app-navigation-toggle').off('click');
|
||||
// App sidebar on mobile
|
||||
var snapper = new Snap({
|
||||
element: document.getElementById('app-content'),
|
||||
disable: 'right',
|
||||
maxPosition: 250,
|
||||
minDragDistance: 100
|
||||
});
|
||||
|
||||
$('#app-navigation-toggle').click(function(){
|
||||
if($(window).width() > 768) {
|
||||
$('#app-navigation').toggle('hidde');
|
||||
} else {
|
||||
if(snapper.state().state == 'left'){
|
||||
snapper.close();
|
||||
} else {
|
||||
snapper.open('left');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user