Author: garandel Date: 2014-05-16 14:11:00 +0200 (Fri, 16 May 2014) New Revision: 3956 Url: http://forge.chorem.org/projects/pollen/repository/revisions/3956 Log: debug ui and translate to french all element Modified: trunk/pollen-ui-angular/src/main/webapp/index.html trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js trunk/pollen-ui-angular/src/main/webapp/js/services.js trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html trunk/pollen-ui-angular/src/main/webapp/partials/poll-list.html trunk/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html trunk/pollen-ui-angular/src/main/webapp/partials/poll-settings.html trunk/pollen-ui-angular/src/main/webapp/partials/poll.html Modified: trunk/pollen-ui-angular/src/main/webapp/index.html =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/index.html 2014-05-16 09:59:58 UTC (rev 3955) +++ trunk/pollen-ui-angular/src/main/webapp/index.html 2014-05-16 12:11:00 UTC (rev 3956) @@ -53,34 +53,34 @@ </ul> <ul class="nav navbar-nav pull-right"> <li ng-show="!currentUser.login"> - <a href="#/user/register/">register</a> + <a href="#/user/register/">S'enregistrer</a> </li> <li class="divider-vertical" ng-show="!currentUser.login"></li> <li class="dropdown" ng-show="!currentUser.login"> <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"> - login<strong class="caret"></strong> + Connexion<strong class="caret"></strong> </a> <div class="dropdown-menu form" role="menu"> <form id='loginForm'> <div class="control-group"> - <label class="control-label">Login</label> + <label class="control-label">Utilisateur</label> <input type="text" name='login' /> <span class="help-block hide"></span> </div> <div class="control-group"> - <label class="control-label" >Password</label> + <label class="control-label" >Mot de Passe</label> <input type="password" name='password' /> <span class="help-block hide"></span> </div> <div class="control-group"> <label class="control-label checkbox" > - <input type="checkbox" name='rememberMe'> Remember Me + <input type="checkbox" name='rememberMe'> Connexion automatique </label> </div> @@ -104,7 +104,7 @@ <li class="divider" role="presentation"></li> <li role="presentation"> - <a id='menuItemLogout'>logout</a> + <a id='menuItemLogout'>Deconnexion</a> </li> </ul> Modified: trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js 2014-05-16 09:59:58 UTC (rev 3955) +++ trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js 2014-05-16 12:11:00 UTC (rev 3956) @@ -92,13 +92,13 @@ if (angular.isDefined($scope.restError)) { delete $scope.restError.choice; } - popupChoice(choice, 'Add Choice', $scope.callBackAddChoice); + popupChoice(choice, 'Ajout d\'un Choix', $scope.callBackAddChoice); } $scope.callBackAddChoice = function (choice) {} $scope.editChoice = function (choice) { - popupChoice(choice, 'Edit Choice', $scope.callBackEditChoice); + popupChoice(choice, 'Edition du Choix', $scope.callBackEditChoice); } $scope.callBackEditChoice = function (choice) {} @@ -186,7 +186,7 @@ poll.choice = angular.copy($scope.data.choices); Poll.add(poll, function (data) { $cookieStore.put('saved', true); - $location.url('/poll/edit/'+data.topiaId+'?token='+data.permission); + $location.url('/poll/edit/'+data.id+'?token='+data.permission); }, function (error) { $scope.globalVariables.restError = true; $scope.restError = error.data; @@ -220,7 +220,7 @@ } $scope.callBackEditChoice = function (choice) { - PollChoice.update({permission:$routeParams.token, pollId:$routeParams.pollId, choiceId:choice.topiaId}, choice, function() { + PollChoice.update({permission:$routeParams.token, pollId:$routeParams.pollId}, choice, function() { delete choice.restError; $scope.globalVariables.saved = true; }, function (error) { @@ -229,7 +229,7 @@ } $scope.deleteChoice = function (choice) { - PollChoice.delete({pollId:$routeParams.pollId, permission:$routeParams.token, choiceId: choice.topiaId}, function () { + PollChoice.delete({pollId:$routeParams.pollId, permission:$routeParams.token, choiceId: choice.id}, function () { $scope.globalVariables.saved = true; var index = $scope.data.choices.indexOf(choice); if (index > -1) { @@ -309,11 +309,11 @@ var initVote = function () { $scope.data.vote = {}; - $scope.data.vote.voter = {name : ""}; + $scope.data.vote.voterName = ""; $scope.data.vote.anonymous = false; $scope.data.vote.choice = []; for (var i = 0; i < $scope.data.choices.length; ++i) { - $scope.data.vote.choice.push({choiceId:$scope.data.choices[i].topiaId, voteValue:false}); + $scope.data.vote.choice.push({choiceId:$scope.data.choices[i].id, voteValue:false}); } } Modified: trunk/pollen-ui-angular/src/main/webapp/js/services.js =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/js/services.js 2014-05-16 09:59:58 UTC (rev 3955) +++ trunk/pollen-ui-angular/src/main/webapp/js/services.js 2014-05-16 12:11:00 UTC (rev 3956) @@ -22,7 +22,7 @@ .factory('Poll', ['$resource', function ($resource) { - return $resource(conf.restURL+'/polls/:pollId/:cmd', {pollId:'@topiaId'}, { + return $resource(conf.restURL+'/polls/:pollId/:cmd', {pollId:'@id'}, { 'add' : { method : 'POST', transformRequest : function (data, headersGetter) { @@ -46,7 +46,7 @@ return 'choice='+encodeURIComponent(JSON.stringify(data)); }; - return $resource(conf.restURL+'/polls/:pollId/choices/:choiceId', {choiceId : '@topiaId'}, + return $resource(conf.restURL+'/polls/:pollId/choices/:choiceId', {choiceId : '@id'}, { 'add' : { method:'POST', @@ -70,7 +70,7 @@ return 'vote='+encodeURIComponent(JSON.stringify(data)); }; - return $resource(conf.restURL+'/polls/:pollId/votes/:voteId', {voteId : '@topiaId'}, + return $resource(conf.restURL+'/polls/:pollId/votes/:voteId', {voteId : '@id'}, { 'add' : { method:'POST', Modified: trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html 2014-05-16 09:59:58 UTC (rev 3955) +++ trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html 2014-05-16 12:11:00 UTC (rev 3956) @@ -28,7 +28,7 @@ <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.name || 'click for edit'}} + {{choice.name || 'click pour éditer'}} <info-Error error="choice.restError.name[0]" data="choice.name"></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"> @@ -50,7 +50,7 @@ <!-- begin input vote --> <tr ng-show="!globalVariables.editMode"> - <td class="pollChoice"> <input type="text" class="form-control" placeholder="votre nom" ng-model="data.vote.voter.name" /> </td> + <td class="pollChoice"> <input type="text" class="form-control" placeholder="votre nom" ng-model="data.vote.voterName" /> </td> <td ng-repeat="choice in data.vote.choice" class="pollChoice"> <input type="checkbox" name="{{choice.choice.topiaId}}" ng-model="choice.voteValue" /> </td> @@ -62,7 +62,7 @@ <!-- begin print vote --> <tr ng-repeat="vote in data.votants track by $index" class="pollAnim" ng-show="!globalVariables.editMode"> - <td class="pollChoice"> {{vote.voter.name}}</td> + <td class="pollChoice"> {{vote.voterName}}</td> <td ng-repeat="choice in vote.choice" class="pollChoice"> <input type="checkbox" ng-model="choice.voteValue" disabled /> </td> Modified: trunk/pollen-ui-angular/src/main/webapp/partials/poll-list.html =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/partials/poll-list.html 2014-05-16 09:59:58 UTC (rev 3955) +++ trunk/pollen-ui-angular/src/main/webapp/partials/poll-list.html 2014-05-16 12:11:00 UTC (rev 3956) @@ -1,6 +1,6 @@ <div ng-repeat="poll in data.polls"> - <h2><a href="#/poll/vote/{{poll.topiaId}}">{{poll.title}}</a> <a href="#/poll/edit/{{poll.topiaId}}?token={{poll.creator.permission.token}}"><i class="glyphicon glyphicon-pencil"></i></a></h2> + <h2><a href="#/poll/vote/{{poll.id}}">{{poll.title}}</a> <a href="#/poll/edit/{{poll.id}}?token={{poll.permission}}"><i class="glyphicon glyphicon-pencil"></i></a></h2> <p ng-bind-html="toHTML(poll.description)"></p> <hr/> </div> \ No newline at end of file Modified: trunk/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html 2014-05-16 09:59:58 UTC (rev 3955) +++ trunk/pollen-ui-angular/src/main/webapp/partials/poll-popupChoice.html 2014-05-16 12:11:00 UTC (rev 3956) @@ -62,8 +62,8 @@ </div> </div> <div class="modal-footer"> - <button type="button" class="btn btn-danger" ng-click="deleteChoice(choice)">Delete</button> - <button type="button" class="btn btn-default" ng-click="cancelChoice()">Cancel</button> - <button type="button" class="btn btn-primary" ng-click="saveChoice()">Save</button> + <button type="button" class="btn btn-danger" ng-click="deleteChoice(choice)">Supprimer</button> + <button type="button" class="btn btn-default" ng-click="cancelChoice()">Annuler</button> + <button type="button" class="btn btn-primary" ng-click="saveChoice()">Sauvegarder</button> </div> </form> \ No newline at end of file Modified: trunk/pollen-ui-angular/src/main/webapp/partials/poll-settings.html =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/partials/poll-settings.html 2014-05-16 09:59:58 UTC (rev 3955) +++ trunk/pollen-ui-angular/src/main/webapp/partials/poll-settings.html 2014-05-16 12:11:00 UTC (rev 3956) @@ -49,11 +49,18 @@ <div class="form-group"> <label class="col-lg-4 control-label">Résultat : </label> + <div class="col-lg-8"> + <label><input type="radio" ng-model="data.poll.resultVisibility" name="resultVisibility" value="EVERYBODY" /> Public</label> + <label><input type="radio" ng-model="data.poll.resultVisibility" name="resultVisibility" value="VOTER" /> Participants</label> + <label><input type="radio" ng-model="data.poll.resultVisibility" name="resultVisibility" value="CREATOR" /> Créateur</label> + </div> + <!-- <div class="col-lg-8 btn-group"> <button type="button" class="btn btn-success" ng-model="data.poll.resultVisibility" btn-radio="'EVERYBODY'">Public</button> <button type="button" class="btn btn-success" ng-model="data.poll.resultVisibility" btn-radio="'VOTER'">Participants</button> <button type="button" class="btn btn-success" ng-model="data.poll.resultVisibility" btn-radio="'CREATOR'">Créateur</button> </div> + --> </div> <div class="form-group"> Modified: trunk/pollen-ui-angular/src/main/webapp/partials/poll.html =================================================================== --- trunk/pollen-ui-angular/src/main/webapp/partials/poll.html 2014-05-16 09:59:58 UTC (rev 3955) +++ trunk/pollen-ui-angular/src/main/webapp/partials/poll.html 2014-05-16 12:11:00 UTC (rev 3956) @@ -30,11 +30,11 @@ <alert type="warning" ng-if="globalVariables.created"> <a href="#/poll/edit/{{pollId}}"> Edition du sondage </a>.. </alert> <tabset> -<tab heading="Poll"> +<tab heading="Sondage"> <div class="pollTitle" edit-me="showEditTitle"> <h1 ng-hide="showEditTitle"> - {{data.poll.title || 'Click Me for Editing'}} + {{data.poll.title || 'Click pour éditer'}} <info-Error error="restError.title[0]" data="data.poll.title"></info-Error> </h1> @@ -59,7 +59,7 @@ </div> </tab> -<tab heading="Setting" ng-show="globalVariables.editMode" > +<tab heading="Configuration" ng-show="globalVariables.editMode" > <div ng-include="'partials/poll-settings.html'"></div> </tab> </tabset> @@ -67,13 +67,13 @@ <div ng-if="globalVariables.create"> <hr/> <button type="button" class="btn btn-default" ng-model="globalVariables.editMode" btn-checkbox>Mode Edition</button> - <button class="btn btn-primary" ng-click="save()">Save</button> + <button class="btn btn-primary" ng-click="save()">Sauvegarder</button> </div> <div ng-if="globalVariables.edit"> <hr/> <button type="button" class="btn btn-default" ng-model="globalVariables.editMode" btn-checkbox>Mode Edition</button> - <button class="btn btn-danger" ng-click="delete();">Delete</button> + <button class="btn btn-danger" ng-click="delete();">Supprimer</button> </div> </form> \ No newline at end of file