mirror of https://github.com/BTCPrivate/copay.git
added a new directive for import backups
This commit is contained in:
parent
05f41a8e46
commit
3746a9b878
|
@ -162,6 +162,10 @@
|
|||
<script type="text/ng-template" id="import.html">
|
||||
<div ng-controller="ImportController">
|
||||
<h3>{{title}}</h3>
|
||||
|
||||
<div class="large-6 columns">
|
||||
<input type="file" class="form-control" placeholder="Select a backup file" ng-model="backupFile" autofocus="" ng-file-select>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
|
|
@ -75,5 +75,15 @@ angular.module('copay.directives')
|
|||
}
|
||||
}
|
||||
})
|
||||
;
|
||||
.directive('ngFileSelect',function() {
|
||||
return {
|
||||
link: function($scope, el) {
|
||||
el.bind('change', function(e) {
|
||||
$scope.file = (e.srcElement || e.target).files[0];
|
||||
console.log('file directive', $scope.file);
|
||||
$scope.getFile();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue