better mobile layout

This commit is contained in:
Athou
2013-05-26 17:51:32 +02:00
parent 03a9a23742
commit 77ca2d44df
2 changed files with 7 additions and 2 deletions

View File

@@ -13,10 +13,14 @@ module.service('AnalyticsService', [ '$state', function($state) {
} ]);
module.service('MobileService', [ '$state', function($state) {
this.leftMenu = false;
this.rightMenu = false;
this.toggleLeftMenu = function() {
this.leftMenu = !this.leftMenu;
$('body').toggleClass('left-menu-active');
};
this.toggleRightMenu = function() {
this.rightMenu = !this.rightMenu;
$('body').toggleClass('right-menu-active');
};
var width = (window.innerWidth > 0) ? window.innerWidth : screen.width;