Cleanup bottom menu html

Menu always has 3 items, so no need in complex markup
This commit is contained in:
Kosta Korenkov 2016-04-10 17:45:58 +03:00 committed by Gustavo Maximiliano Cortez
parent 108fd714d7
commit aab77c8fae
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
2 changed files with 3 additions and 25 deletions

View File

@ -1,30 +1,10 @@
<div class="bottom-bar second-bottom-bar row collapse animated slideInRight" ng-class="{ 'slideOutRight': !showPlugins }" ng-if="index.menu.length > 6">
<div class="medium-{{index.menuItemSize}} small-{{index.menuItemSize}} columns text-center bottombar-item" ng-repeat="item in index.menu | limitTo: 5 - index.menu.length">
<span ng-include="'views/includes/menu-item.html'"></span>
</div>
<div class="medium-{{index.menuItemSize}} small-{{index.menuItemSize}} columns text-center bottombar-item" ng-repeat="n in index.menu | limitTo: 4 - index.menu.length % 6">
<a></a>
</div>
<menu-toggle ng-show="index.menu.length > 6"></menu-toggle>
</div>
<div class="bottom-bar row collapse" ng-show="!index.notAuthorized">
<div ng-class="{ 'medium-10 small-10 columns': index.menu.length == 5 }">
<div>
<div class="row collapse">
<div class="medium-{{index.menuItemSize}} small-{{index.menuItemSize}} columns text-center bottombar-item"
ng-repeat="item in index.menu | limitTo: (index.menu.length > 6 ? 5 : (index.menu.length == 5 ? 4 : index.menu.length))">
<div class="medium-4 small-4 columns text-center bottombar-item"
ng-repeat="item in index.menu">
<span ng-include="'views/includes/menu-item.html'"></span>
</div>
<menu-toggle ng-show="index.menu.length > 6"></menu-toggle>
</div>
</div>
<div class="medium-2 small-2 columns text-center bottombar-item" ng-show="index.menu.length == 5">
<span ng-include="'views/includes/menu-item.html'" ng-init="item = index.menu[4]"></span>
</div>
</div>

View File

@ -41,8 +41,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
}];
ret.addonViews = addonManager.addonViews();
ret.menu = ret.menu.concat(addonManager.addonMenuItems());
ret.menuItemSize = ret.menu.length > 4 ? 2 : 4;
ret.txTemplateUrl = addonManager.txTemplateUrl() || 'views/includes/transaction.html';
ret.tab = 'walletHome';