Merge pull request #529 from gordonwritescode/feature/copay-shell

WIP: Copay Shell Integration 2
This commit is contained in:
Matias Alejo Garcia 2014-06-05 11:31:43 -03:00
commit 30c6dcae6f
4 changed files with 76 additions and 11 deletions

View file

@ -24,6 +24,17 @@ angular.module('copayApp.controllers').controller('ImportController',
});
};
$scope.openFileDialog = function() {
if (window.cshell) {
return cshell.send('backup:import');
}
$scope.choosefile = !$scope.choosefile;
};
$scope.openPasteArea = function() {
$scope.pastetext = !$scope.pastetext;
};
$scope.getFile = function() {
// If we use onloadend, we need to check the readyState.
reader.onloadend = function(evt) {
@ -53,7 +64,7 @@ angular.module('copayApp.controllers').controller('ImportController',
}
$scope.loading = true;
if (backupFile) {
reader.readAsBinaryString(backupFile);
}