From 887c3a032a9bce868f08df25cdd71fda1b35061b Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 17 Dec 2014 11:20:07 -0300 Subject: [PATCH] use angular standard window variable --- js/controllers/createProfile.js | 4 ++-- js/controllers/home.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/js/controllers/createProfile.js b/js/controllers/createProfile.js index 1fcddda7e..4e211ecb7 100644 --- a/js/controllers/createProfile.js +++ b/js/controllers/createProfile.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, notification, pluginManager, identityService, pinService, isMobile, configService, go) { +angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, $window, notification, pluginManager, identityService, pinService, isMobile, configService, go) { var _credentials, _firstpin; @@ -46,7 +46,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun $rootScope.starting = true; // hide Keyboard after submit form - var hideKeyboard = document.querySelector('#repeatpin').blur(); + $window.document.querySelector('#repeatpin').blur(); $timeout(function() { pinService.save(pin, _credentials.email, _credentials.password, function(err) { diff --git a/js/controllers/home.js b/js/controllers/home.js index b80be77d7..39613cb67 100644 --- a/js/controllers/home.js +++ b/js/controllers/home.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $timeout, go, notification, identityService, Compatibility, pinService, applicationService, isMobile) { +angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $timeout, $window, go, notification, identityService, Compatibility, pinService, applicationService, isMobile) { var _credentials, _firstpin; $scope.init = function() { @@ -64,7 +64,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc $rootScope.starting = true; // hide Keyboard after submit form - var hideKeyboard = document.querySelector('#pin').blur(); + $window.document.querySelector('#pin').blur(); $timeout(function() { var credentials = pinService.get(pin, function(err, credentials) { @@ -93,7 +93,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc $rootScope.starting = true; // hide Keyboard after submit form - var hideKeyboard = document.querySelector('#repeatpin').blur(); + $window.document.querySelector('#repeatpin').blur(); $timeout(function() { pinService.save(pin, _credentials.email, _credentials.password, function(err) {