Merge pull request #5630 from cmgustavo/ref/remove-files-01

Ref/remove files 01
This commit is contained in:
Javier Donadío 2017-02-20 10:21:44 -05:00 committed by GitHub
commit 928dda70a4
7 changed files with 81 additions and 179 deletions

View file

@ -14,7 +14,6 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
$scope.canSign = $scope.wallet.canSign() || $scope.wallet.isPrivKeyExternal();
$scope.color = $scope.wallet.color;
$scope.data = {};
$scope.hasClick = platformInfo.hasClick;
$scope.displayAmount = getDisplayAmount($scope.tx.amountStr);
$scope.displayUnit = getDisplayUnit($scope.tx.amountStr);
initActionList();

View file

@ -1096,8 +1096,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
uxLanguage.init();
$ionicPlatform.ready(function() {
if (platformInfo.isCordova) {
if (screen.width < 768)
screen.lockOrientation('portrait');
@ -1154,7 +1152,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
$ionicPlatform.on('menubutton', function() {
window.location = '#/preferences';
});
}
});
$log.info('Init profile...');
// Try to open local profile
@ -1191,7 +1189,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
openURLService.init();
}, 1000);
});
});
if (platformInfo.isNW) {
var gui = require('nw.gui');

View file

@ -1,34 +0,0 @@
'use strict';
angular.module('copayApp.services').service('addonManager', function (lodash) {
var addons = [];
this.registerAddon = function (addonSpec) {
addons.push(addonSpec);
};
this.addonMenuItems = function () {
return lodash.map(addons, function (addonSpec) {
return addonSpec.menuItem;
});
};
this.addonViews = function () {
return lodash.map(addons, function (addonSpec) {
return addonSpec.view;
});
};
this.formatPendingTxp = function (txp) {
lodash.each(addons, function (addon) {
if (addon.formatPendingTxp) {
addon.formatPendingTxp(txp);
}
});
};
this.txTemplateUrl = function() {
var addon = lodash.find(addons, 'txTemplateUrl');
return addon ? addon.txTemplateUrl() : null;
}
});

View file

@ -1,7 +0,0 @@
'use strict';
'use strict';
angular.module('copayApp.services')
.factory('addressService', function(storageService, profileService, $log, $timeout, lodash, bwcError, gettextCatalog) {
var root = {};
return root;
});

View file

@ -1,37 +0,0 @@
'use strict';
angular.module('copayApp.services').factory('confirmDialog', function($log, $timeout, profileService, configService, gettextCatalog, platformInfo) {
var root = {};
var acceptMsg = gettextCatalog.getString('Accept');
var cancelMsg = gettextCatalog.getString('Cancel');
var confirmMsg = gettextCatalog.getString('Confirm');
root.show = function(msg, cb) {
if (platformInfo.isCordova) {
navigator.notification.confirm(
msg,
function(buttonIndex) {
if (buttonIndex == 1) {
$timeout(function() {
return cb(true);
}, 1);
} else {
return cb(false);
}
},
confirmMsg, [acceptMsg, cancelMsg]
);
} else if (platformInfo.isChromeApp) {
// No feedback, alert/confirm not supported.
return cb(true);
} else {
return cb(confirm(msg));
}
};
return root;
});

View file

@ -39,21 +39,5 @@ angular.module('copayApp.services').factory('platformInfo', function($window) {
ret.isChromeApp = $window.chrome && chrome.runtime && chrome.runtime.id && !ret.isNW;
ret.isDevel = !ret.isMobile && !ret.isChromeApp && !ret.isNW;
ret.hasClick = false;
if ($window.sessionStorage.getItem('hasClick')) {
ret.hasClick = true;
}
$window.addEventListener('mousedown', function() {
ret.hasClick = true;
$window.sessionStorage.setItem('hasClick', 'true');
});
$window.addEventListener('touchstart', function() {
ret.hasClick = false;
$window.sessionStorage.removeItem('hasClick');
});
return ret;
});

View file

@ -163,13 +163,13 @@
<click-to-accept
ng-click="onConfirm(statusChangeHandler)"
ng-if="tx.pendingForUs && canSign && !paymentExpired && hasClick"
ng-if="tx.pendingForUs && canSign && !paymentExpired && !isCordova"
click-send-status="sendStatus"
has-wallet-chosen="true">
{{buttonText}}
</click-to-accept>
<slide-to-accept
ng-if="tx.pendingForUs && canSign && !paymentExpired && !hasClick"
ng-if="tx.pendingForUs && canSign && !paymentExpired && isCordova"
slide-on-confirm="onConfirm()"
slide-send-status="sendStatus"
has-wallet-chosen="true">