Reset FileService status when switching cards
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -43,6 +43,7 @@ app.controller('CardController', function ($scope, $rootScope, $sce, $location,
|
|||||||
return $state.params;
|
return $state.params;
|
||||||
}, function (params) {
|
}, function (params) {
|
||||||
$scope.params = params;
|
$scope.params = params;
|
||||||
|
$scope.fileservice.reset();
|
||||||
}, true);
|
}, true);
|
||||||
$scope.params = $state.params;
|
$scope.params = $state.params;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
* @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>
|
||||||
*
|
*
|
||||||
* @author Julius Härtl <jus@bitgrid.net>
|
* @author Julius Härtl <jus@bitgrid.net>
|
||||||
*
|
*
|
||||||
@@ -37,6 +37,10 @@ export default class FileService {
|
|||||||
this.status = null;
|
this.status = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset () {
|
||||||
|
this.status = null;
|
||||||
|
}
|
||||||
|
|
||||||
runUpload (fileItem, attachmentId) {
|
runUpload (fileItem, attachmentId) {
|
||||||
this.status = null;
|
this.status = null;
|
||||||
fileItem.url = OC.generateUrl('/apps/deck/cards/' + fileItem.cardId + '/attachment?type=deck_file');
|
fileItem.url = OC.generateUrl('/apps/deck/cards/' + fileItem.cardId + '/attachment?type=deck_file');
|
||||||
|
|||||||
Reference in New Issue
Block a user