add timeout to walletHome

This commit is contained in:
Matias Alejo Garcia 2015-05-11 15:21:08 -03:00
commit 4128782979
2 changed files with 11 additions and 11 deletions

View file

@ -91,12 +91,12 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$scope.openCopayersModal = function(copayers, copayerId) {
var fc = profileService.focusedClient;
var ModalInstanceCtrl = function($scope, $modalInstance) {
$scope.copayers = copayers;
$scope.copayerId = copayerId;
$scope.color = fc.backgroundColor;
$scope.cancel = function() {
$scope.cancel = function() {
$modalInstance.dismiss('cancel');
};
};
@ -315,8 +315,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$timeout(function() {
self.setNewAddress();
}, 5000);
}
else {
} else {
$log.debug('Creating address ERROR:', err);
$scope.$emit('Local/ClientError', err);
$scope.$digest();
@ -861,8 +860,9 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
};
// Startup events
this.bindTouchDown();
this.setAddress();
this.setSendFormInputs();
$timeout(function() {
self.bindTouchDown();
self.setAddress();
self.setSendFormInputs();
}, 50);
});

View file

@ -421,7 +421,6 @@ angular
var cleanedUp = false, timeoutID;
var cleanUp = function() {
if (cleanedUp) return;
console.log('[routes.js.423:cleanedUp:]',cleanedUp); //TODO
cleanedUp = true;
e2.parentNode.removeChild(e2);
e2.innerHTML = "";
@ -488,8 +487,9 @@ console.log('[routes.js.423:cleanedUp:]',cleanedUp); //TODO
return true;
} else {
var sc;
var contentDiv = e.getElementsByClassName('content');
if (contentDiv)
// Keep prefDiv scroll
var contentDiv = e.getElementsByClassName('content');
if (contentDiv && contentDiv[0])
sc = contentDiv[0].scrollTop;
cachedBackPanel = e.cloneNode(true);