URL handler to return the code after send a request for access token

This commit is contained in:
Gustavo Maximiliano Cortez 2015-09-09 14:15:08 -03:00
commit 38a4919f01
7 changed files with 108 additions and 13 deletions

View file

@ -29,12 +29,13 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
}
};
root.openExternalLink = function(url) {
root.openExternalLink = function(url, target) {
if (nodeWebkit.isDefined()) {
nodeWebkit.openExternalLink(url);
}
else {
var ref = window.open(url, '_blank', 'location=no');
target = target || '_blank';
var ref = window.open(url, target, 'location=no');
}
};
@ -89,8 +90,8 @@ angular.module('copayApp.services').factory('go', function($window, $rootScope,
root.path(path);
};
$rootScope.openExternalLink = function(url) {
root.openExternalLink(url);
$rootScope.openExternalLink = function(url, target) {
root.openExternalLink(url, target);
};