02/03: change choice.value to choice.choiceValue in UI
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 75e6f561dd6bb62d5498b10cbc5554dac133c7f7 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Thu Jul 10 10:41:53 2014 +0200 change choice.value to choice.choiceValue in UI --- .../src/main/webapp/js/controllers/pollCtrl.js | 38 +++++++++++----------- .../src/main/webapp/partials/inline-poll.html | 18 +++++----- .../src/main/webapp/partials/poll-popupChoice.html | 6 ++-- .../src/main/webapp/partials/poll-result.html | 2 +- 4 files changed, 32 insertions(+), 32 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 e5a201b..c03f5a6 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -198,10 +198,10 @@ angular.module('pollControllers', []) $scope.preSendChoice = function (choice) { if (choice.choiceType == 'DATE') { - choice.value = choice.value.getTime(); + choice.choiceValue = choice.choiceValue.getTime(); } else if (choice.choiceType == 'IMAGE') { - choice.value = choice.value.meta.name+"####"+choice.value.data; + choice.choiceValue = choice.choiceValue.meta.name+"####"+choice.choiceValue.data; } return choice; @@ -209,12 +209,12 @@ angular.module('pollControllers', []) $scope.postReceiveChoice = function (choice) { if (choice.choiceType == 'DATE') { - choice.value = new Date(Number(choice.value)); + choice.choiceValue = new Date(Number(choice.choiceValue)); } else if (choice.choiceType == 'IMAGE') { - var tmp = choice.value.split("####"); + var tmp = choice.choiceValue.split("####"); - choice.value = {meta:{name:tmp[0]}, data : tmp[1]}; + choice.choiceValue = {meta:{name:tmp[0]}, data : tmp[1]}; } return choice; @@ -362,7 +362,7 @@ angular.module('pollControllers', []) var initChoice = function () { return { choiceType : $scope.globalVariables.lastType, - value : '' + choiceValue : '' }; } @@ -400,18 +400,18 @@ angular.module('pollControllers', []) title : function () { return title;}, choice : function () { if (choice.choiceType == 'TEXT') { - choice.valueText = choice.value; + choice.choiceValueText = choice.choiceValue; } else if (choice.choiceType == 'DATE') { - choice.valueDate = choice.value; + choice.choiceValueDate = choice.choiceValue; } else if (choice.choiceType == 'IMAGE') { - choice.valueImage = choice.value; + choice.choiceValueImage = choice.choiceValue; } // set default date - if (angular.isUndefined(choice.valueDate)) { - choice.valueDate = $scope.globalVariables.lastDate; + if (angular.isUndefined(choice.choiceValueDate)) { + choice.choiceValueDate = $scope.globalVariables.lastDate; } return choice; @@ -426,18 +426,18 @@ angular.module('pollControllers', []) $scope.globalVariables.lastType = choice.choiceType; if (choice.choiceType == 'TEXT') { - choice.value = choice.valueText; + choice.choiceValue = choice.choiceValueText; } else if (choice.choiceType == 'DATE') { - choice.value = choice.valueDate; - $scope.globalVariables.lastDate = angular.copy(choice.valueDate); + choice.choiceValue = choice.choiceValueDate; + $scope.globalVariables.lastDate = angular.copy(choice.choiceValueDate); } else if (choice.choiceType == 'IMAGE') { - choice.value = choice.valueImage; + choice.choiceValue = choice.choiceValueImage; } if (!angular.equals(choiceEdit, choice)) { - choiceEdit.value = choice.value; + choiceEdit.choiceValue = choice.choiceValue; choiceEdit.choiceType = choice.choiceType; choiceEdit.description = choice.description; @@ -1277,15 +1277,15 @@ angular.module('pollControllers', []) switch (value.choice.choiceType) { case 'TEXT': - scores.push([value.choice.value, value.scoreValue]); + scores.push([value.choice.choiceValue, value.scoreValue]); break; case 'DATE': - scores.push([$filter('date')(value.choice.value, $scope.globalVariables.dateFormat), value.scoreValue]); + scores.push([$filter('date')(value.choice.choiceValue, $scope.globalVariables.dateFormat), value.scoreValue]); break; case 'IMAGE': - scores.push([value.choice.value.meta.name, value.scoreValue]); + scores.push([value.choice.choiceValue.meta.name, value.scoreValue]); break; default: diff --git a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html index af8c658..f42f38f 100644 --- a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html @@ -30,33 +30,33 @@ <td ng-repeat="choice in data.choices" class="pollChoice pollAnim" ng-mouseenter="showEditHover = true" ng-mouseleave="showEditHover = false"> <div ng-if="choice.choiceType == 'TEXT'" edit-me="showEdit" > <div ng-hide="showEdit && !globalVariables.voted" class="fixe-input" title="{{choice.description}}"> - {{ choice.value || ('poll.edit' | translate) }} - <info-error error="choice.restError.value[0]" data="choice.value"></info-error> + {{ choice.choiceValue || ('poll.edit' | translate) }} + <info-error error="choice.restError.choiceValue[0]" data="choice.choiceValue"></info-error> <input type="button" class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)" value="..."/></div> <div ng-show="showEdit && !globalVariables.voted"> - <input type="text" class="form-control" ng-model="choice.value" focus-me="showEdit" ng-exit="showEdit = false;" auto-save="saveChoice(choice)" required/> + <input type="text" class="form-control" ng-model="choice.choiceValue" focus-me="showEdit" ng-exit="showEdit = false;" auto-save="saveChoice(choice)" required/> <input type="button" class="btn btn-default" data-toggle="modal" data-target="#popupAddChoice" ng-click="editChoice(choice)" value="..."/> </div> </div> <div ng-if="choice.choiceType == 'DATE'" edit-me="showEdit" > <div ng-hide="!globalVariables.voted && showEdit || isOpen" class="fixe-input" title="{{choice.description}}"> - {{ (choice.value | date:globalVariables.dateFormat) || ('poll.edit' | translate) }} - <info-error error="choice.restError.value[0]" data="choice.value"></info-error> + {{ (choice.choiceValue | date:globalVariables.dateFormat) || ('poll.edit' | translate) }} + <info-error error="choice.restError.choiceValue[0]" data="choice.choiceValue"></info-error> <input type="button" class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)" value="..."/> </div> <div ng-show="!globalVariables.voted && showEdit || isOpen" > - <input type="text" class="form-control" ng-model="choice.value" focus-me="showEdit" datepicker-popup="{{globalVariables.dateFormat}}" is-open="isOpen" ng-exit="showEdit = false" ng-click="isOpen = true" auto-save="saveChoice(choice)" required/> + <input type="text" class="form-control" ng-model="choice.choiceValue" focus-me="showEdit" datepicker-popup="{{globalVariables.dateFormat}}" is-open="isOpen" ng-exit="showEdit = false" ng-click="isOpen = true" auto-save="saveChoice(choice)" required/> <input type="button" class="btn btn-default" data-toggle="modal" data-target="#popupAddChoice" ng-click="editChoice(choice)" value="..."/> </div> </div> <div ng-if="choice.choiceType == 'IMAGE'"> <div class="fixe-input" title="{{choice.description}}"> - {{choice.value.meta.name}} - <info-error error="choice.restError.value[0]" data="choice.value"></info-error> + {{choice.choiceValue.meta.name}} + <info-error error="choice.restError.choiceValue[0]" data="choice.choiceValue"></info-error> <input type="button" class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)" value="..."/> <br/> - <zoom-image image="choice.value.data" name="choice.value.meta.name"></zoom-image> + <zoom-image image="choice.choiceValue.data" name="choice.choiceValue.meta.name"></zoom-image> </div> diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html b/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html index 88a448e..0a5a988 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html @@ -39,7 +39,7 @@ <label for="popChoiceText" class="col-sm-4 control-label">Nom du Choix : </label> <div class="col-sm-6"> - <input id="popChoiceText" type="text" ng-model="choice.valueText" class="form-control" focus-me="choice.choiceType == 'TEXT'"/> + <input id="popChoiceText" type="text" ng-model="choice.choiceValueText" class="form-control" focus-me="choice.choiceType == 'TEXT'"/> </div> </div> @@ -49,7 +49,7 @@ <div class="col-sm-6"> <div class="right-inner-addon "> <i class="glyphicon glyphicon-calendar glyphicon-input"></i> - <input id="popChoiceDate" class="form-control" datepicker-popup="{{dateFormat}}" type="text" ng-model="choice.valueDate" is-open="opened" ng-click="opened = true" focus-me="choice.choiceType == 'DATE'"/> + <input id="popChoiceDate" class="form-control" datepicker-popup="{{dateFormat}}" type="text" ng-model="choice.choiceValueDate" is-open="opened" ng-click="opened = true" focus-me="choice.choiceType == 'DATE'"/> </div> </div> </div> @@ -58,7 +58,7 @@ <label class="col-sm-4 control-label">Image : </label> <div class="col-sm-6"> - <upload-file ng-model="choice.valueImage"></upload-file> + <upload-file ng-model="choice.choiceValueImage"></upload-file> </div> </div> diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-result.html b/pollen-ui-angular/src/main/webapp/partials/poll-result.html index 6965664..3f8a503 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-result.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-result.html @@ -24,7 +24,7 @@ <th>{{ 'poll.result.score' | translate }}</th> </tr> <tr ng-repeat="score in data.result.scores"> - <th> {{ score.choice.value.meta.name || (score.choice.value | date:globalVariables.dateFormat) || score.choice.value }} </th> + <th> {{ score.choice.choiceValue.meta.name || (score.choice.choiceValue | date:globalVariables.dateFormat) || score.choice.choiceValue }} </th> <td> {{score.scoreValue}} </td> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm