smarter mobile detection (fix #255 and fix #487)

This commit is contained in:
Athou
2013-11-08 11:09:13 +01:00
parent 73323335cb
commit fc318ad211
6 changed files with 13 additions and 11 deletions

View File

@@ -23,8 +23,7 @@ module.service('MobileService', ['$state', function($state) {
this.rightMenu = !this.rightMenu;
$('body').toggleClass('right-menu-active');
};
var width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
this.mobile = width < 979;
this.mobile = device.mobile() || device.tablet();
}]);
module.factory('ProfileService', ['$resource', function($resource) {