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 77a870fe889eec473b8bebe41bfa522123d85a3b Author: Kevin Morin <morin@codelutin.com> Date: Fri Mar 13 17:41:13 2015 +0100 start making the poll creation as a real form --- pollen-ui-angular/src/main/webapp/i18n/en.js | 3 ++- pollen-ui-angular/src/main/webapp/i18n/fr.js | 3 ++- pollen-ui-angular/src/main/webapp/index.html | 2 +- .../src/main/webapp/js/controllers/pollCtrl.js | 1 + .../src/main/webapp/js/controllers/userCtrl.js | 2 +- .../src/main/webapp/partials/poll-poll.html | 27 ++++++++-------------- 6 files changed, 17 insertions(+), 21 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/i18n/en.js b/pollen-ui-angular/src/main/webapp/i18n/en.js index c7bedcb..3a870ad 100644 --- a/pollen-ui-angular/src/main/webapp/i18n/en.js +++ b/pollen-ui-angular/src/main/webapp/i18n/en.js @@ -117,7 +117,8 @@ var translateEN = { 'poll.new' : 'New Poll', 'poll.edit' : 'Click to edit', 'poll.edit.choice' : 'Click to edit the choice', -'poll.edit.title' : 'Click to edit the title', +'poll.edit.description' : 'Description', +'poll.edit.title' : 'Title', 'poll.desc' : 'Description is optional. This message will not visible in vote page.', 'poll.saved' : 'Poll saved.', 'poll.created.printLink' : 'You can modify your poll to using this address when you are not connected: {{url}}', diff --git a/pollen-ui-angular/src/main/webapp/i18n/fr.js b/pollen-ui-angular/src/main/webapp/i18n/fr.js index b9b2dc7..83aa080 100644 --- a/pollen-ui-angular/src/main/webapp/i18n/fr.js +++ b/pollen-ui-angular/src/main/webapp/i18n/fr.js @@ -117,7 +117,8 @@ var translateFR = { 'poll.new' : 'Nouveau sondage', 'poll.edit' : 'Cliquez pour modifier', 'poll.edit.choice' : 'Cliquez pour modifier le choix', -'poll.edit.title' : 'Cliquez pour modifier le titre', +'poll.edit.description' : 'Description', +'poll.edit.title' : 'Titre', 'poll.desc' : 'Description (facultative). Ce cadre n\'apparait pas si aucune description n\'est saisie.', 'poll.saved' : 'Sondage sauvegardé', 'poll.created.printLink' : 'Garder le lien suivant pour pouvoir modifier votre sondage plus tard, lorsque vous n\'êtes pas connecté : {{url}}', diff --git a/pollen-ui-angular/src/main/webapp/index.html b/pollen-ui-angular/src/main/webapp/index.html index 703de08..7d77fef 100644 --- a/pollen-ui-angular/src/main/webapp/index.html +++ b/pollen-ui-angular/src/main/webapp/index.html @@ -122,7 +122,7 @@ <li class="divider"></li> <li> - <a ng-click="logout()">{{ 'action.logout' | translate }}</a> + <a href="#" ng-click="logout()">{{ 'action.logout' | translate }}</a> </li> </ul> 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 cad7434..f39d79b 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -1593,6 +1593,7 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr return PollComment.get({pollId: $routeParams.pollId, permission: $scope.commentToken, paginationParameter: paginationParameter}, function (data) { $scope.data.comments = data.elements; $scope.data.commentsPagination = data.pagination; + console.log("comments " + data.pagination.count); $scope.data.poll.commentCount = data.pagination.count; }).$promise; }; initComments(); diff --git a/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js b/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js index 47b4b4e..9096a16 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js @@ -270,7 +270,7 @@ angular.module('userControllers', []) $scope.logout = function () { var currentUser = SessionStorage.get().user; - if (user) { + if (currentUser) { UserLogout.logout(); diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-poll.html b/pollen-ui-angular/src/main/webapp/partials/poll-poll.html index 6201431..81bad14 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-poll.html @@ -19,32 +19,25 @@ #L% --> <div class="pollTitle" edit-me="showEditTitle" novalidate> - <h1 ng-hide="showEditTitle"> - <span tooltip="{{ !globalVariables.editMode ? '' : 'poll.edit.title' | translate }}">{{data.poll.title || 'poll.edit.title' | translate }}</span> <span class="fa fa-pencil" showonhoverparent ng-if="globalVariables.editMode"></span> + <h1 ng-hide="globalVariables.editMode"> + <span>{{data.poll.title}}</span> <info-error error="restError.title[0]" data="data.poll.title" append-class="fa-lg"></info-error> </h1> - <h1 ng-show="showEditTitle"> + <div ng-show="globalVariables.editMode"> + <label class="control-label">{{'poll.edit.title' | translate}}</label> <input type="text" class="form-control" focus-me="showEditTitle" ng-model="data.poll.title" ng-exit="showEditTitle = false" auto-save="autoSavePoll()" required/> - </h1> + </div> </div> <div ng-include="'./partials/poll-info.html'" ng-controller="PollInfoCtrl" class="poll-info"></div> -<div ng-hide="showEditDesc || !globalVariables.editMode && !data.poll.description " class="pollDesc" edit-me="showEditDesc" > - <div> - <span class="fa fa-pencil" style="float: right" showonhoverparent ng-if="globalVariables.editMode"></span> - <div ng-bind-html="toHTML(data.poll.description)" tooltip="{{ !globalVariables.editMode ? '' : 'poll.edit' | translate }}"></div> - </div> - <div ng-hide="data.poll.description"> - <span tooltip="{{ 'poll.edit' | translate }}">{{ 'poll.desc' | translate }}</span> - <span class="fa fa-pencil" showonhoverparent></span> - </div> +<div ng-hide="globalVariables.editMode" class="pollDesc"> + <div ng-bind-html="toHTML(data.poll.description)"></div> </div> -<div ng-show="showEditDesc" class="pollDesc"> - <textarea id="descEditor" data-ck-editor ng-model="data.poll.description" focus-me="showEditDesc"></textarea> - - <button type="button" class="btn btn-primary" ng-click="showEditDesc = false">{{ 'action.return' | translate }}</button> +<div ng-show="globalVariables.editMode" class="pollDesc"> + <label class="control-label">{{'poll.edit.description' | translate}}</label> + <textarea id="descEditor" data-ck-editor ng-model="data.poll.description"></textarea> </div> <div id="poll"> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.