Merge pull request #4571 from bitpay/revert-4536-fix/menu-disclaimer

Revert "Do not show the menu in disclaimer view"
This commit is contained in:
Gustavo Maximiliano Cortez 2016-07-11 10:09:43 -03:00 committed by GitHub
commit 26f9581945
4 changed files with 6 additions and 18 deletions

View File

@ -19,11 +19,12 @@
<ion-side-menus class="page" ng-controller="indexController as index">
<!-- Left menu -->
<ion-side-menu side="left" expose-aside-when="large" ng-if="isDisclaimerAccepted">
<ion-side-menu side="left" expose-aside-when="large">
<div ng-include="'views/includes/sidebar.html'" ng-if="index.hasProfile"></div>
</ion-side-menu>
<!-- Main content -->
<ion-side-menu-content drag-content="index.isCordova && index.allowSideBar">
<div notifications="right top"></div>
<div id="sectionContainer">

View File

@ -1,7 +1,7 @@
<nav ng-controller="topbarController as topbar"
class="tab-bar" ng-style="{'background-color': noColor ? '#4B6178' : index.backgroundColor}">
<section class="left-small">
<a id="hamburger" class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet && physicalScreenWidth"
<a id="hamburger" class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet && index.physicalScreenWidth < 768"
on-tap="index.toggleLeftMenu()"><i class="fi-list size-24"></i>
</a>
<a ng-show="goBackToState" ng-click="$root.go(goBackToState); goBackToState = null"><i class="icon-arrow-left3 icon-back"></i>

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('disclaimerController',
function($rootScope, $scope, $timeout, $log, $ionicSideMenuDelegate, profileService, applicationService, gettextCatalog, uxLanguage, go, storageService, gettext, platformInfo, ongoingProcess) {
function($scope, $timeout, $log, $ionicSideMenuDelegate, profileService, applicationService, gettextCatalog, uxLanguage, go, storageService, gettext, platformInfo, ongoingProcess) {
var self = this;
self.tries = 0;
var isCordova = platformInfo.isCordova;
@ -62,7 +62,6 @@ angular.module('copayApp.controllers').controller('disclaimerController',
if (err) $log.error(err);
else {
$ionicSideMenuDelegate.canDragContent(true);
$rootScope.$emit('disclaimerAccepted');
go.walletHome();
}
});

View File

@ -18,6 +18,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
ret.historyShowMoreLimit = 10;
ret.isSearching = false;
ret.prevState = 'walletHome';
ret.physicalScreenWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width);
ret.menu = [{
'title': gettext('Receive'),
@ -60,13 +61,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
});
}
$timeout(function() {
$scope.physicalScreenWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width) < 768;
profileService.isDisclaimerAccepted(function(val) {
$scope.isDisclaimerAccepted = val;
});
}, 1);
function strip(number) {
return (parseFloat(number.toPrecision(12)));
};
@ -1416,12 +1410,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.tab = 'walletHome';
});
$rootScope.$on('disclaimerAccepted', function(event) {
profileService.isDisclaimerAccepted(function(val) {
$scope.isDisclaimerAccepted = val;
});
});
$rootScope.$on('Local/ValidatingWalletEnded', function(ev, walletId, isOK) {
if (self.isInFocus(walletId)) {
@ -1685,7 +1673,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
});
$rootScope.$on('Local/WindowResize', function() {
$scope.physicalScreenWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width) < 768;
self.physicalScreenWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width);
});
$rootScope.$on('Local/NeedsConfirmation', function(event, txp, cb) {