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;

View File

@@ -26,7 +26,7 @@
<div class="btn-group hidden-desktop">
<button type="button" class="btn" ng-click="MobileService.toggleRightMenu()">
<i class="icon-wrench"></i>
<i ng-class="{'icon-double-angle-right' : !MobileService.rightMenu, 'icon-double-angle-left': MobileService.rightMenu}"></i>
</button>
</div>
@@ -65,7 +65,8 @@
<button class="btn" type="submit"><i class="icon-search"></i></button>
</form>
<div class="btn-group donate">
<button class="btn btn-success" type="button" ng-click="toHelp()"><i class="icon-question-sign"></i> ${toolbar.about} / ${toolbar.donate}</button>
<button class="btn btn-success" type="button" ng-click="toHelp()"><i class="icon-question-sign"></i>
{{ MobileService.mobile ? ' ' : '${toolbar.about} / ${toolbar.donate}' }}</button>
</div>
</div>