added a new directive for import backups
This commit is contained in:
parent
05f41a8e46
commit
3746a9b878
2 changed files with 15 additions and 1 deletions
|
|
@ -162,6 +162,10 @@
|
||||||
<script type="text/ng-template" id="import.html">
|
<script type="text/ng-template" id="import.html">
|
||||||
<div ng-controller="ImportController">
|
<div ng-controller="ImportController">
|
||||||
<h3>{{title}}</h3>
|
<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>
|
</div>
|
||||||
</script>
|
</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…
Add table
Add a link
Reference in a new issue