This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See http://git.codelutin.com/faxtomail.git commit 0a46ceb9c94f330b57c5ada0bbacbd42d21528c6 Author: Kevin Morin <morin@codelutin.com> Date: Thu Sep 3 15:10:36 2015 +0200 Erreur d'enregistrement des images des tampons fixes #7506 --- .../WEB-INF/content/admin/configuration-input.jsp | 6 +++--- faxtomail-ui-web/src/main/webapp/js/configuration.js | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp b/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp index 264a771..c69d3b1 100644 --- a/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp +++ b/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp @@ -260,7 +260,7 @@ </div> <div class="form-group"> - <label><input type="radio" ng-model="selectedStamp.isImageType" ng-value="true" /> + <label><input type="radio" ng-model="selectedStamp.isImageType" ng-value="true"/> Image :</label> <div ng-show="selectedStamp.isImageType"> @@ -708,12 +708,12 @@ </div> </div> - <!-- Sélection des états d'attentes possibles pour ce dossier --> + <!-- Sélection des états d'attente possibles pour ce dossier --> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a data-toggle="collapse" data-parent="#accordion" href="#collapse3"> - Sélection des états d'attentes possibles pour ce dossier + Sélection des états d'attente possibles pour ce dossier </a> </h4> </div> diff --git a/faxtomail-ui-web/src/main/webapp/js/configuration.js b/faxtomail-ui-web/src/main/webapp/js/configuration.js index 80da58d..f4e16ea 100644 --- a/faxtomail-ui-web/src/main/webapp/js/configuration.js +++ b/faxtomail-ui-web/src/main/webapp/js/configuration.js @@ -353,8 +353,21 @@ ConfigurationModule.controller('ConfigurationStampsController', ['$scope', '$win for (var i = 0 ; i < $scope.stamps.length ; i++) { var stamp = $scope.stamps[i]; stamp.isImageType = stamp.image != null; + stamp.oldImage = stamp.image; + stamp.oldText = stamp.text; } + $scope.$watch("selectedStamp.isImageType", function(newValue) { + if (newValue) { + $scope.selectedStamp.text = null; + $scope.selectedStamp.image = $scope.selectedStamp.oldImage; + + } else { + $scope.selectedStamp.image = null; + $scope.selectedStamp.text = $scope.selectedStamp.oldText; + } + }); + // edition d'un tampon $scope.editStamp = function(stamp) { @@ -413,7 +426,10 @@ ConfigurationModule.controller('ConfigurationStampsController', ['$scope', '$win // Closure to capture the file information. reader.onloadend = function() { - $scope.selectedStamp.image = reader.result; + $scope.$apply(function() { + $scope.selectedStamp.image = reader.result; + $scope.selectedStamp.oldImage = reader.result; + }); $('#stampPreview').attr('src', reader.result); }; -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.