fix controllers

This commit is contained in:
Matias Alejo Garcia 2016-05-31 19:02:00 -03:00
commit 800ca91ad6
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
7 changed files with 13 additions and 10 deletions

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('disclaimerController', angular.module('copayApp.controllers').controller('disclaimerController',
function($scope, $timeout, $log, profileService, isCordova, applicationService, gettextCatalog, uxLanguage, go) { function($scope, $timeout, $log, profileService, applicationService, gettextCatalog, uxLanguage, go) {
var self = this; var self = this;
self.tries = 0; self.tries = 0;
$scope.creatingProfile = true; $scope.creatingProfile = true;

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('joinController', angular.module('copayApp.controllers').controller('joinController',
function($scope, $rootScope, $timeout, go, notification, profileService, configService, isCordova, storageService, applicationService, $modal, gettext, lodash, ledger, trezor, platformInfo, derivationPathHelper) { function($scope, $rootScope, $timeout, go, notification, profileService, configService, storageService, applicationService, $modal, gettext, lodash, ledger, trezor, platformInfo, derivationPathHelper) {
var isChromeApp = platformInfo.isChromeApp; var isChromeApp = platformInfo.isChromeApp;
var isDevel = platformInfo.isDevel; var isDevel = platformInfo.isDevel;

View file

@ -1,7 +1,8 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController', angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
function($scope, $rootScope, $filter, $timeout, $modal, $log, storageService, notification, profileService, isCordova, go, gettext, gettextCatalog, animationService, applicationService) { function($scope, $rootScope, $filter, $timeout, $modal, $log, storageService, notification, profileService, platformInfo, go, gettext, gettextCatalog, animationService, applicationService) {
var isCordova = platformInfo.isCordova;
this.isCordova = isCordova; this.isCordova = isCordova;
this.error = null; this.error = null;
$scope.isDeletingWallet = false; $scope.isDeletingWallet = false;

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesGlideraController', angular.module('copayApp.controllers').controller('preferencesGlideraController',
function($scope, $modal, $timeout, profileService, applicationService, glideraService, storageService, isChromeApp, animationService) { function($scope, $modal, $timeout, profileService, applicationService, glideraService, storageService, animationService) {
this.getEmail = function(token) { this.getEmail = function(token) {
var self = this; var self = this;

View file

@ -1,8 +1,9 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesGlobalController', angular.module('copayApp.controllers').controller('preferencesGlobalController',
function($scope, $rootScope, $log, configService, uxLanguage, isCordova, isMobile, pushNotificationsService, profileService, feeService) { function($scope, $rootScope, $log, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService) {
var isCordova = platformInfo.isCordova;
this.init = function() { this.init = function() {
var config = configService.getSync(); var config = configService.getSync();
this.unitName = config.wallet.settings.unitName; this.unitName = config.wallet.settings.unitName;
@ -13,9 +14,9 @@ angular.module('copayApp.controllers').controller('preferencesGlobalController',
}; };
this.feeOpts = feeService.feeOpts; this.feeOpts = feeService.feeOpts;
this.currentFeeLevel = feeService.getCurrentFeeLevel(); this.currentFeeLevel = feeService.getCurrentFeeLevel();
this.usePushNotifications = isCordova && !isMobile.Windows(); this.usePushNotifications = isCordova && !platformInfo.isWP;
$scope.PNEnabledByUser = true; $scope.PNEnabledByUser = true;
$scope.isIOSApp = isMobile.iOS() && isCordova; $scope.isIOSApp = platformInfo.isIOS && isCordova;
if ($scope.isIOSApp) { if ($scope.isIOSApp) {
cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) { cordova.plugins.diagnostic.isRemoteNotificationsEnabled(function(isEnabled) {
$scope.PNEnabledByUser = isEnabled; $scope.PNEnabledByUser = isEnabled;

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('sellGlideraController', angular.module('copayApp.controllers').controller('sellGlideraController',
function($rootScope, $scope, $timeout, $log, $modal, configService, profileService, addressService, feeService, glideraService, bwsError, lodash, isChromeApp, animationService, walletService, fingerprintService) { function($rootScope, $scope, $timeout, $log, $modal, configService, profileService, addressService, feeService, glideraService, bwsError, lodash, animationService, walletService, fingerprintService) {
var self = this; var self = this;
var config = configService.getSync(); var config = configService.getSync();

View file

@ -1,8 +1,9 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('txController', angular.module('copayApp.controllers').controller('txController',
function($rootScope, $scope, $timeout, $filter, lodash, profileService, isCordova, nodeWebkit, configService, animationService, gettextCatalog) { function($rootScope, $scope, $timeout, $filter, lodash, profileService, platformInfo, nodeWebkit, configService, animationService, gettextCatalog) {
var isCordova = platformInfo.isCordova;
var fc = profileService.focusedClient; var fc = profileService.focusedClient;
var config = configService.getSync(); var config = configService.getSync();
var configWallet = config.wallet; var configWallet = config.wallet;
@ -53,7 +54,7 @@ angular.module('copayApp.controllers').controller('txController',
if (isCordova) { if (isCordova) {
window.cordova.plugins.clipboard.copy(value); window.cordova.plugins.clipboard.copy(value);
window.plugins.toast.showShortCenter(gettextCatalog.getString('Copied to clipboard')); window.plugins.toast.showShortCenter(gettextCatalog.getString('Copied to clipboard'));
} else if (nodeWebkit.isDefined()) { } else if (platformInfo.isNW) {
nodeWebkit.writeToClipboard(value); nodeWebkit.writeToClipboard(value);
} }
}; };