mirror of https://github.com/portainer/portainer
feat(node-browser): add upload spinner
parent
e171624fbd
commit
e6d4e802dc
|
@ -13,10 +13,10 @@ angular.module('portainer.agent').controller('FileUploaderController', [
|
||||||
if (!file) {
|
if (!file) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctrl.state.uploadInProgress = true;
|
ctrl.state.uploadInProgress = true;
|
||||||
$q.when(ctrl.uploadFile(file)).finally(function toggleProgress() {
|
$q.when(ctrl.uploadFile(file)).finally(function toggleProgress() {
|
||||||
ctrl.state.uploadInProgress = false;
|
ctrl.state.uploadInProgress = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<button
|
<button
|
||||||
ngf-select="$ctrl.onFileSelected($file)"
|
ngf-select="$ctrl.onFileSelected($file)"
|
||||||
class="btn ng-scope">
|
class="btn ng-scope"
|
||||||
<i class="fa fa-upload"></i>
|
button-spinner="$ctrl.state.uploadInProgress">
|
||||||
|
<i style="margin:0" class="fa fa-upload" ng-if="!$ctrl.state.uploadInProgress"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in New Issue