[pollen] branch develop updated (2e7b283 -> 33d4a47)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See http://git.chorem.org/pollen.git from 2e7b283 add info error un tab and remove button create user in home when connected new 33d4a47 fix error limitedVote The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 33d4a47c1026f1b9312c5973a344af092b64056b Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue Aug 19 15:17:56 2014 +0200 fix error limitedVote Summary of changes: pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js | 8 ++++++-- pollen-ui-angular/src/main/webapp/partials/poll-settings.html | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
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 33d4a47c1026f1b9312c5973a344af092b64056b Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue Aug 19 15:17:56 2014 +0200 fix error limitedVote --- pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js | 8 ++++++-- pollen-ui-angular/src/main/webapp/partials/poll-settings.html | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js index 88fa104..818e8a2 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -1155,6 +1155,10 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr savePoll.endChoiceDate = savePoll.endChoiceDate.getTime(); } + if (! savePoll.limitedVote) { + savePoll.maxChoiceNumber = 0; + } + Poll.update({permission:$scope.globalVariables.pollToken}, savePoll, function () { $rootScope.$broadcast('newSuccess', 'poll.saved'); }, function (error) { @@ -1381,7 +1385,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr $scope.toggleVoteValue = function (choice, onEdit, event) { if (onEdit && $scope.voteCountingIsBoolean()) { - if (choice.voteValue == false && $scope.data.poll.maxChoiceNumber > 0) { + if (choice.voteValue == false && $scope.data.poll.limitedVote) { // compte number of choice var myVote = $.grep($scope.data.votants, function(e) { return e.id == oldVote.id; }); myVote = myVote[0]; @@ -1423,7 +1427,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr $scope.toggleValue = function (choice, event) { if ($scope.voteCountingIsBoolean()) { - if (choice.voteValue == false && $scope.data.poll.maxChoiceNumber > 0) { + if (choice.voteValue == false && $scope.data.poll.limitedVote) { var nbChoice = 0; angular.forEach($scope.data.vote.choice, function (ch) { if (ch.voteValue) { diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-settings.html b/pollen-ui-angular/src/main/webapp/partials/poll-settings.html index 07dd120..f5fb775 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-settings.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-settings.html @@ -181,7 +181,7 @@ {{ 'poll.config.label.limitedVote' | translate }} </label> <div class="col-sm-6"> - <input type="number" min="0" step="1" class="form-control" id="formLimitedVote" ng-model="data.poll.limitedVote" auto-save="autoSavePoll()" /> + <input type="checkbox" id="formLimitedVote" ng-model="data.poll.limitedVote" auto-save="autoSavePoll()" /> </div> <div class="col-sm-2"></div> </div> @@ -189,7 +189,7 @@ <label class="col-sm-4 control-label" for="popMaxChoiceNumber">{{ 'poll.config.label.maxChoiceNumber' | translate }}</label> <div class="col-sm-6"> <input-error error="restError.maxChoiceNumber[0]" data="data.poll.maxChoiceNumber"> - <input type="text" class="form-control" id="popMaxChoiceNumber" ng-model="data.poll.maxChoiceNumber" auto-save="autoSavePoll()" /> + <input type="number" min="0" step="1" class="form-control" id="popMaxChoiceNumber" ng-model="data.poll.maxChoiceNumber" auto-save="autoSavePoll()" /> </input-error> </div> <div class="col-sm-2"> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm