Skip to content
Snippets Groups Projects
Commit e8143c5c authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Allow to reload same avatar image, or same file upload

parent 95116318
No related branches found
No related tags found
No related merge requests found
...@@ -464,6 +464,10 @@ angular.module('cesium.directives', []) ...@@ -464,6 +464,10 @@ angular.module('cesium.directives', [])
fileContent: onLoadEvent.target.result, fileContent: onLoadEvent.target.result,
fileData : fileData} fileData : fileData}
}); });
// Reset the input file
fileInput[0].value = '';
}); });
}; };
reader.readAsText((onChangeEvent.srcElement || onChangeEvent.target).files[0]); reader.readAsText((onChangeEvent.srcElement || onChangeEvent.target).files[0]);
......
...@@ -461,6 +461,10 @@ function ESAvatarModalController($scope, $sce) { ...@@ -461,6 +461,10 @@ function ESAvatarModalController($scope, $sce) {
$scope.doPrevious = function() { $scope.doPrevious = function() {
$scope.formData.imageCropStep -= 1; $scope.formData.imageCropStep -= 1;
// Reset the image
if ($scope.formData.imageCropStep === 1) {
$scope.formData.imgSrc = undefined;
}
}; };
$scope.doCrop = function() { $scope.doCrop = function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment