Merge pull request #3760 from cmgustavo/bug/glidera-resume-event

Bug/glidera resume event
This commit is contained in:
Matias Alejo Garcia 2016-01-12 11:35:25 -03:00
commit 265517c8eb
7 changed files with 22 additions and 6 deletions

View file

@ -9,6 +9,8 @@ angular.module('copayApp.controllers').controller('buyGlideraController',
this.success = null;
this.loading = null;
window.ignoreMobilePause = true;
var otherWallets = function(testnet) {
var network = testnet ? 'testnet' : 'livenet';
return lodash.filter(profileService.getWallets(network), function(w) {

View file

@ -1,7 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('glideraController',
function($scope, $timeout, $modal, profileService, configService, storageService, glideraService, isChromeApp, animationService) {
function($rootScope, $scope, $timeout, $modal, profileService, configService, storageService, glideraService, isChromeApp, animationService, lodash) {
window.ignoreMobilePause = true;
this.getAuthenticateUrl = function() {
return glideraService.getOauthCodeUrl();
@ -35,6 +37,7 @@ angular.module('copayApp.controllers').controller('glideraController',
};
this.openTxModal = function(token, tx) {
$rootScope.modalOpened = true;
var self = this;
var config = configService.getSync().wallet.settings;
var fc = profileService.focusedClient;
@ -48,9 +51,9 @@ angular.module('copayApp.controllers').controller('glideraController',
$scope.tx = tx;
});
$scope.cancel = function() {
$scope.cancel = lodash.debounce(function() {
$modalInstance.dismiss('cancel');
};
}, 0, 1000);
};
@ -60,7 +63,13 @@ angular.module('copayApp.controllers').controller('glideraController',
controller: ModalInstanceCtrl,
});
var disableCloseModal = $rootScope.$on('closeModal', function() {
modalInstance.dismiss('cancel');
});
modalInstance.result.finally(function() {
$rootScope.modalOpened = false;
disableCloseModal();
var m = angular.element(document.getElementsByClassName('reveal-modal'));
m.addClass(animationService.modalAnimated.slideOutRight);
});

View file

@ -14,6 +14,8 @@ angular.module('copayApp.controllers').controller('sellGlideraController',
this.currentFeeLevel = config.wallet.settings.feeLevel || 'normal';
var fc;
window.ignoreMobilePause = true;
var otherWallets = function(testnet) {
var network = testnet ? 'testnet' : 'livenet';
return lodash.filter(profileService.getWallets(network), function(w) {

View file

@ -3,6 +3,7 @@
angular.module('copayApp.controllers').controller('walletHomeController', function($scope, $rootScope, $timeout, $filter, $modal, $log, notification, txStatus, isCordova, profileService, lodash, configService, rateService, storageService, bitcore, isChromeApp, gettext, gettextCatalog, nodeWebkit, addressService, ledger, bwsError, confirmDialog, txFormatService, animationService, addressbookService, go, feeService) {
var self = this;
window.ignoreMobilePause = false;
$rootScope.hideMenuBar = false;
$rootScope.wpInputFocused = false;
var config = configService.getSync();

View file

@ -45,7 +45,9 @@ angular.element(document).ready(function() {
}, 100);
}
setTimeout(function() {
window.ignoreMobilePause = false;
var loc = window.location;
var ignoreMobilePause = loc.toString().match(/(glidera|buy|sell)/) ? true : false;
window.ignoreMobilePause = ignoreMobilePause;
}, 100);
}, false);