Merge pull request #25 from JDonadio/bug/scroll-size

Resize view
This commit is contained in:
Matias Alejo Garcia 2016-08-31 18:53:24 -03:00 committed by GitHub
commit 2748a893df
4 changed files with 14 additions and 10 deletions

View file

@ -28,7 +28,7 @@
ng-blur="create.formFocus(false)">
</label>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable">
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable" ng-change="showAdvChange()">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</ion-toggle>

View file

@ -61,7 +61,7 @@
</select>
</label>
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable">
<ion-toggle ng-model="showAdv" toggle-class="toggle-stable" ng-change="showAdvChange()">
<span translate ng-show="!showAdv">Show advanced options</span>
<span translate ng-show="showAdv">Hide advanced options</span>
</ion-toggle>

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('createController',
function($scope, $rootScope, $timeout, $log, lodash, $state, profileService, configService, gettext, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, storageService) {
function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, profileService, configService, gettext, ledger, trezor, platformInfo, derivationPathHelper, ongoingProcess, walletService, storageService) {
var isChromeApp = platformInfo.isChromeApp;
var isCordova = platformInfo.isCordova;
@ -37,6 +37,10 @@ angular.module('copayApp.controllers').controller('createController',
return new Array(num);
}
$scope.showAdvChange = function() {
$ionicScrollDelegate.resize();
};
var updateRCSelect = function(n) {
$scope.totalCopayers = n;
var maxReq = COPAYER_PAIR_LIMITS[n];

View file

@ -1,7 +1,10 @@
'use strict';
angular.module('copayApp.controllers').controller('tabHomeController',
function($rootScope, $timeout, $scope, $state, lodash, profileService, walletService, configService, txFormatService, $ionicModal, $log, platformInfo, storageService) {
function($rootScope, $timeout, $scope, $state, $ionicScrollDelegate, lodash, profileService, walletService, configService, txFormatService, $ionicModal, $log, platformInfo, storageService) {
$scope.externalServices = {};
$scope.bitpayCardEnabled = true; // TODO
var setNotifications = function(notifications) {
$scope.notifications = notifications;
@ -20,7 +23,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
var notifications = [];
lodash.each($scope.wallets, function(wallet) {
walletService.getStatus(wallet, {}, function(err, status) {
if (err) {
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
@ -28,8 +30,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
}
wallet.status = status;
});
});
$scope.fetchingNotifications = true;
@ -42,6 +42,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
}
$scope.fetchingNotifications = false;
setNotifications(n);
$ionicScrollDelegate.resize();
})
};
@ -63,21 +64,20 @@ angular.module('copayApp.controllers').controller('tabHomeController',
return;
}
setNotifications(n);
$ionicScrollDelegate.resize();
})
});
};
$scope.externalServices = {};
$scope.nextStep = function() {
lodash.each(['AmazonGiftCards', 'BitpayCard', 'BuyAndSell'], function(service) {
storageService.getNextStep(service, function(err, value) {
$scope.externalServices[service] = value ? true : false;
$ionicScrollDelegate.resize();
});
});
};
$scope.bitpayCardEnabled = true; // TODO
var listeners = [
$rootScope.$on('bwsEvent', function(e, walletId, type, n) {
var wallet = profileService.getWallet(walletId);