This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See http://git.chorem.org/pollen.git commit f3a179e84eb61dde5c6f7963b86a38929dc5b1f4 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue Jun 10 18:10:34 2014 +0200 update directive autoSave --- pollen-ui-angular/src/main/webapp/js/app.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/js/app.js b/pollen-ui-angular/src/main/webapp/js/app.js index 3763db6..11774ca 100644 --- a/pollen-ui-angular/src/main/webapp/js/app.js +++ b/pollen-ui-angular/src/main/webapp/js/app.js @@ -203,16 +203,12 @@ angular.module('pollen', ['pollenServices', 'ngRoute', 'pollControllers', 'userC return { restrict : 'A', link : function (scope, element, attrs) { - var oldValue = null; - element.bind('focus', function () { - scope.$apply(function () { - oldValue = element.val(); - }); - }); - element.bind('blur', function () { - if (element.val() != oldValue && scope.globalVariables.edit) { + element.bind('change', function () { + if (scope.globalVariables.edit) { scope.$apply(function () { - scope.$eval(attrs.autoSave); + $timeout(function() { + scope.$eval(attrs.autoSave); + },100); }); } }); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.