Merge branch 'ref/design' of https://github.com/bitpay/bitpay-wallet into feature/external_link_open_system_browser

# Conflicts:
#	src/js/services/externalLinkService.js
This commit is contained in:
Jamal Jackson 2016-10-12 13:57:21 -04:00
commit 3d9e40b4c5
10 changed files with 73 additions and 40 deletions

View file

@ -3,6 +3,17 @@
angular.module('copayApp.services').service('externalLinkService', function(platformInfo, nodeWebkitService, popupService, gettextCatalog) {
this.open = function(url, optIn, title, desc, okText, cancelText) {
var old = $window.handleOpenURL;
$window.handleOpenURL = function(url) {
// Ignore external URLs
$log.debug('Skip: ' + url);
};
$timeout(function() {
$window.handleOpenURL = old;
}, 500);
if (platformInfo.isNW) {
nodeWebkitService.openExternalLink(url);
} else {

View file

@ -118,7 +118,7 @@ angular.module('copayApp.services').service('popupService', function($log, $ioni
this.showPrompt = function(title, message, opts, cb) {
$log.warn(title + ": " + message);
if (isCordova)
if (isCordova && !opts.forceHTMLPrompt)
_cordovaPrompt(title, message, opts, cb);
else
_ionicPrompt(title, message, opts, cb);

View file

@ -42,6 +42,8 @@ angular.module('copayApp.services')
root._detect = function(cb) {
return cb('en'); //disable auto detection for release;
var userLang, androidLang;
if (navigator && navigator.globalization) {

View file

@ -512,6 +512,12 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
});
};
root.editTxNote = function(wallet, args, cb) {
wallet.editTxNote(args, function(err, res) {
return cb(err, res);
});
};
root.getTxp = function(wallet, txpid, cb) {
wallet.getTx(txpid, function(err, txp) {
if (err) return cb(err);
@ -821,7 +827,8 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
// An alert dialog
var askPassword = function(name, title, cb) {
var opts = {
inputType: 'password'
inputType: 'password',
forceHTMLPrompt: true
};
popupService.showPrompt(title, name, opts, function(res) {
if (!res) return cb();
@ -961,7 +968,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
$rootScope.$emit('Local/TxAction', wallet.id);
var type = root.getViewStatus(wallet, broadcastedTxp);
if(!customStatusHandler) {
if (!customStatusHandler) {
root.openStatusModal(type, broadcastedTxp, function() {});
}
@ -972,7 +979,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
var type = root.getViewStatus(wallet, signedTxp);
if(!customStatusHandler) {
if (!customStatusHandler) {
root.openStatusModal(type, signedTxp, function() {});
}