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 e8fe1048b8fd49dbb5e88481f2ffc0be5e659a80 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Thu Aug 14 16:23:27 2014 +0200 add appendClass in directive infoError --- pollen-ui-angular/src/main/webapp/js/directives.js | 17 ++++++++++------- .../src/main/webapp/less/variables.less | 4 ++++ .../src/main/webapp/partials/inline-poll.html | 6 +++--- .../src/main/webapp/partials/poll-comment.html | 4 ++-- .../main/webapp/partials/poll-listParticipant.html | 2 +- .../src/main/webapp/partials/poll-poll.html | 2 +- .../src/main/webapp/partials/poll-settings.html | 22 +++++++++++----------- .../src/main/webapp/partials/user-edit.html | 8 ++++---- .../src/main/webapp/partials/user-login.html | 2 +- .../main/webapp/partials/user-lostPassword.html | 2 +- .../src/main/webapp/partials/user-register.html | 2 +- 11 files changed, 39 insertions(+), 32 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/js/directives.js b/pollen-ui-angular/src/main/webapp/js/directives.js index d0fa8f6..8e66413 100644 --- a/pollen-ui-angular/src/main/webapp/js/directives.js +++ b/pollen-ui-angular/src/main/webapp/js/directives.js @@ -126,19 +126,22 @@ angular.module('pollenDirective', []) ///// INFO ERROR ///// ////////////////////////////////////// -.directive('infoError', [function() { +.directive('infoError', ['$timeout', function($timeout) { return { restrict:'E', scope: { error: '=', - forData: '=data' + forData: '=data', + appendClass: '@' }, - template: '<span class="fa fa-exclamation-circle danger fa-lg" tooltip="{{error}}" ng-if="error"></span>', + template: '<span class="fa fa-info-error danger" ng-class="appendClass" tooltip="{{error}}" ng-if="error"></span>', link: function (scope) { - scope.$watch('forData', function (newVal, oldVal) { - if (newVal != oldVal) { - delete scope.error; - } + $timeout(function () { + scope.$watch('forData', function (newVal, oldVal) { + if (newVal != oldVal) { + delete scope.error; + } + }); }); } }; diff --git a/pollen-ui-angular/src/main/webapp/less/variables.less b/pollen-ui-angular/src/main/webapp/less/variables.less index d819187..21bf6a0 100644 --- a/pollen-ui-angular/src/main/webapp/less/variables.less +++ b/pollen-ui-angular/src/main/webapp/less/variables.less @@ -113,3 +113,7 @@ .@{fa-css-prefix}-remove:before { content: @fa-var-times; } + +.@{fa-css-prefix}-info-error:before { + content: @fa-var-exclamation-circle; +} 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 17cb380..649ac25 100644 --- a/pollen-ui-angular/src/main/webapp/partials/inline-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/inline-poll.html @@ -29,7 +29,7 @@ <div ng-if="choice.choiceType == 'TEXT'" edit-me="showEdit" > <div ng-hide="showEdit && ((data.poll.addChoiceAllowed && (choice.permission || !choice.id)) || globalVariables.editMode)" class="fixe-input" title="{{choice.description}}"> {{ choice.choiceValue || ('poll.edit' | translate) }} - <info-error error="choice.restError.choiceValue[0]" data="choice.choiceValue"></info-error> + <info-error error="choice.restError.choiceValue[0]" data="choice.choiceValue" append-class="fa-lg"></info-error> <input type="button" class="btn btn-default" ng-if="(data.poll.choiceAddAllowed && (choice.permission || !choice.id)) || globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice, $event);" value="..."/></div> <div ng-show="showEdit && ((data.poll.addChoiceAllowed && (choice.permission || !choice.id)) || globalVariables.editMode)"> <input type="text" class="form-control" ng-model="choice.choiceValue" focus-me="showEdit" ng-exit="showEdit = false;" auto-save="saveChoice(choice)" required/> @@ -39,7 +39,7 @@ <div ng-if="choice.choiceType == 'DATE'" edit-me="showEdit" > <div ng-hide="showEdit && (data.poll.addChoiceAllowed && (choice.permission || !choice.id) || globalVariables.editMode)" class="fixe-input" title="{{choice.description}}"> {{ (choice.choiceValue | date:globalVariables.dateTimeFormat) || ('poll.edit' | translate) }} - <info-error error="choice.restError.choiceValue[0]" data="choice.choiceValue"></info-error> + <info-error error="choice.restError.choiceValue[0]" data="choice.choiceValue" append-class="fa-lg"></info-error> <input type="button" class="btn btn-default" ng-if="(data.poll.choiceAddAllowed && (choice.permission || !choice.id)) || globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice, $event);" value="..."/> </div> <div ng-show="showEdit && (data.poll.choiceAddAllowed && (choice.permission || !choice.id) || globalVariables.editMode)" > @@ -50,7 +50,7 @@ <div ng-if="choice.choiceType == 'RESOURCE'"> <div class="fixe-input" title="{{choice.description}}"> {{choice.choiceValue.meta.name}} - <info-error error="choice.restError.choiceValue[0]" data="choice.choiceValue"></info-error> + <info-error error="choice.restError.choiceValue[0]" data="choice.choiceValue" append-class="fa-lg"></info-error> <input type="button" class="btn btn-default" ng-if="data.poll.choiceAddAllowed && (choice.permission || !choice.id) || globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice, $event);" value="..."/> <br/> <print-resource image="choice.choiceValue.id" meta="choice.choiceValue.meta"></print-resource> diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-comment.html b/pollen-ui-angular/src/main/webapp/partials/poll-comment.html index 2ff9034..15f3736 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-comment.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-comment.html @@ -27,7 +27,7 @@ <div class="form-group"> <label class="col-sm-2"> {{ 'user.name' | translate }} </label> <div class="col-sm-1"> - <info-error error="restError['author.name'][0]" data="comment.authorName"></info-error> + <info-error error="restError['author.name'][0]" data="comment.authorName" append-class="fa-2x"></info-error> </div> <div class="col-sm-9"> <input type="text" ng-model="comment.authorName" class="form-control" focus-me="comment.id != null || restError['author.name'] !== undefined" /> @@ -36,7 +36,7 @@ <div class="form-group"> <label class="col-sm-2"> {{ 'comment' | translate }} </label> - <div class="col-sm-1"><info-error error="restError.text[0]" data="comment.text"></info-error></div> + <div class="col-sm-1"><info-error error="restError.text[0]" data="comment.text" append-class="fa-2x"></info-error></div> <div class="col-sm-9"> <textarea ck-editor ng-model="comment.text" focus-me="comment.id != null || restError.text[0] !== undefined"></textarea> </div> diff --git a/pollen-ui-angular/src/main/webapp/partials/poll-listParticipant.html b/pollen-ui-angular/src/main/webapp/partials/poll-listParticipant.html index 187da71..28e2af5 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-listParticipant.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-listParticipant.html @@ -21,7 +21,7 @@ <h1>{{data.poll.title}}</h1> <h2> {{ 'poll.restricted.pollType' | translate }} - <info-error error="restError.pollType" data="data.poll.pollType"></info-error> + <info-error error="restError.pollType" data="data.poll.pollType" append-class="fa-lg"></info-error> </h2> <div> <label for="formFree"> 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 bb0dff9..59782cb 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-poll.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-poll.html @@ -21,7 +21,7 @@ <div class="pollTitle" edit-me="showEditTitle" novalidate> <h1 ng-hide="showEditTitle"> {{data.poll.title || 'poll.edit' | translate }} - <info-error error="restError.title[0]" data="data.poll.title"></info-error> + <info-error error="restError.title[0]" data="data.poll.title" append-class="fa-lg"></info-error> </h1> <h1 ng-show="showEditTitle"> 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 327e903..07dd120 100644 --- a/pollen-ui-angular/src/main/webapp/partials/poll-settings.html +++ b/pollen-ui-angular/src/main/webapp/partials/poll-settings.html @@ -32,7 +32,7 @@ </input-error> </div> <div class="col-sm-2"> - <info-error error="restError['creator.name'][0]"></info-error> + <info-error error="restError['creator.name'][0]" append-class="fa-2x"></info-error> </div> </div> @@ -47,7 +47,7 @@ </input-error> </div> <div class="col-sm-2"> - <info-error error="restError['creator.email'][0]"></info-error> + <info-error error="restError['creator.email'][0]" append-class="fa-2x"></info-error> </div> </div> @@ -65,7 +65,7 @@ </input-error> </div> <div class="col-sm-2"> - <info-error error="restError.beginDate[0]" data="data.poll.beginDate"></info-error> + <info-error error="restError.beginDate[0]" data="data.poll.beginDate" append-class="fa-2x"></info-error> </div> </div> @@ -80,7 +80,7 @@ </input-error> </div> <div class="col-sm-2"> - <info-error error="restError.endDate[0]" data="data.poll.endDate"></info-error> + <info-error error="restError.endDate[0]" data="data.poll.endDate" append-class="fa-2x"></info-error> </div> </div> @@ -117,7 +117,7 @@ </label> </div> <div class="col-sm-2"> - <info-error error="restError.resultVisibility[0]" data="data.poll.resultVisibility"></info-error> + <info-error error="restError.resultVisibility[0]" data="data.poll.resultVisibility" append-class="fa-2x"></info-error> </div> </div> @@ -155,7 +155,7 @@ </input-error> </div> <div class="col-sm-2"> - <info-error error="restError.beginChoiceDate[0]" data="data.poll.beginChoiceDate"></info-error> + <info-error error="restError.beginChoiceDate[0]" data="data.poll.beginChoiceDate" append-class="fa-2x"></info-error> </div> </div> <div class="form-group row" ng-if="data.poll.choiceAddAllowed"> @@ -172,7 +172,7 @@ </input-error> </div> <div class="col-sm-2"> - <info-error error="restError.endChoiceDate[0]" data="data.poll.endChoiceDate"></info-error> + <info-error error="restError.endChoiceDate[0]" data="data.poll.endChoiceDate" append-class="fa-2x"></info-error> </div> </div> @@ -193,7 +193,7 @@ </input-error> </div> <div class="col-sm-2"> - <info-error error="restError.maxChoiceNumber[0]" data="data.poll.maxChoiceNumber"></info-error> + <info-error error="restError.maxChoiceNumber[0]" data="data.poll.maxChoiceNumber" append-class="fa-2x"></info-error> </div> </div> @@ -215,7 +215,7 @@ <p ng-bind-html="toHTML(data.voteCountingType.helper)"></p> </div> <div class="col-sm-2"> - <info-error error="restError.voteCountingType[0]" data="data.poll.voteCountingType"></info-error> + <info-error error="restError.voteCountingType[0]" data="data.poll.voteCountingType" append-class="fa-2x"></info-error> </div> </div> @@ -257,7 +257,7 @@ </label> </div> <div class="col-sm-2"> - <info-error error="restError.voteVisibility[0]" data="data.poll.voteVisibility"></info-error> + <info-error error="restError.voteVisibility[0]" data="data.poll.voteVisibility" append-class="fa-2x"></info-error> </div> </div> @@ -303,7 +303,7 @@ </label> </div> <div class="col-sm-2"> - <info-error error="restError.commentVisibility[0]" data="data.poll.commentVisibility"></info-error> + <info-error error="restError.commentVisibility[0]" data="data.poll.commentVisibility" append-class="fa-2x"></info-error> </div> </div> </form> diff --git a/pollen-ui-angular/src/main/webapp/partials/user-edit.html b/pollen-ui-angular/src/main/webapp/partials/user-edit.html index 72200d3..1dd40a3 100644 --- a/pollen-ui-angular/src/main/webapp/partials/user-edit.html +++ b/pollen-ui-angular/src/main/webapp/partials/user-edit.html @@ -42,7 +42,7 @@ <input type="email" id="formEmail" name="email" class="form-control" ng-model="data.user.email" auto-save="editUser()" /> </div> <div class="col-sm-1"> - <info-error error="restError.email[0]" data="data.user.email"></info-error> + <info-error error="restError.email[0]" data="data.user.email" append-class="fa-2x"></info-error> </div> </div> @@ -64,7 +64,7 @@ <input type="password" id="formNewPassword" class="form-control" ng-model="data.user.newPassword" auto-save="editPassword()"/> </div> <div class="col-sm-1"> - <info-error error="restError.newPassword[0]" data="data.user.newPassword"></info-error> + <info-error error="restError.newPassword[0]" data="data.user.newPassword" append-class="fa-2x"></info-error> </div> </div> @@ -76,7 +76,7 @@ <input type="password" id="formNewPassword2" class="form-control" ng-model="data.user.newPassword2" auto-save="editPassword()"/> </div> <div class="col-sm-1"> - <span class="fa fa-exclamation-circle danger" tooltip="{{ 'user.error.password.diff' | translate }}" ng-if="data.user.newPassword != data.user.newPassword2"></span> + <span class="fa fa-info-error fa-2x danger" tooltip="{{ 'user.error.password.diff' | translate }}" ng-if="data.user.newPassword != data.user.newPassword2"></span> </div> </div> @@ -94,7 +94,7 @@ <input type="password" id="formCurrentPassword" class="form-control" ng-model="data.user.password" auto-save="editPassword()" /> </div> <div class="col-sm-1"> - <info-error error="restError.password[0]" data="data.user.password"></info-error> + <info-error error="restError.password[0]" data="data.user.password" append-class="fa-2x"></info-error> </div> </div> diff --git a/pollen-ui-angular/src/main/webapp/partials/user-login.html b/pollen-ui-angular/src/main/webapp/partials/user-login.html index d3b68c4..5099fdc 100644 --- a/pollen-ui-angular/src/main/webapp/partials/user-login.html +++ b/pollen-ui-angular/src/main/webapp/partials/user-login.html @@ -24,7 +24,7 @@ <div class="control-group"> <label class="control-label"> {{ 'user.mail' | translate }} - <info-error error="restError.connexion" data="data.user"></info-error> + <info-error error="restError.connexion" data="data.user" append-class="fa-lg"></info-error> </label> <input type="text" name='login' ng-model="data.user.login" class="form-control"/> </div> diff --git a/pollen-ui-angular/src/main/webapp/partials/user-lostPassword.html b/pollen-ui-angular/src/main/webapp/partials/user-lostPassword.html index 0fdff8c..5b54bc4 100644 --- a/pollen-ui-angular/src/main/webapp/partials/user-lostPassword.html +++ b/pollen-ui-angular/src/main/webapp/partials/user-lostPassword.html @@ -31,7 +31,7 @@ <input type="email" id="formEmail" name="email" class="form-control" ng-model="email"/> </div> <div class="col-sm-1"> - <info-error error="restError.email[0]" data="email"></info-error> + <info-error error="restError.email[0]" data="email" append-class="fa-2x"></info-error> </div> </div> diff --git a/pollen-ui-angular/src/main/webapp/partials/user-register.html b/pollen-ui-angular/src/main/webapp/partials/user-register.html index 5eecc92..66dab4e 100644 --- a/pollen-ui-angular/src/main/webapp/partials/user-register.html +++ b/pollen-ui-angular/src/main/webapp/partials/user-register.html @@ -73,7 +73,7 @@ <input type="password" id="formPassword2" name="password2" class="form-control" ng-model="data.user.password2"/> </div> <div class="col-sm-1"> - <span class="fa fa-exclamation-circle danger" tooltip="{{ 'user.error.password.diff' | translate }}" ng-if="data.user.password != data.user.password2"></span> + <span class="fa fa-info-error fa-2x danger" tooltip="{{ 'user.error.password.diff' | translate }}" ng-if="data.user.password != data.user.password2"></span> </div> </div> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.