This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository coselmar. See http://git.codelutin.com/coselmar.git commit e95c74afb1047d1d387cc318f957ac4b98bb3269 Author: Yannick Martel <martel@©odelutin.com> Date: Fri Feb 13 10:18:47 2015 +0100 begin reflexion about error/sucess messages --- coselmar-ui/src/main/webapp/css/coselmar.css | 64 ++++++++++++++++++++++ coselmar-ui/src/main/webapp/index.html | 1 + coselmar-ui/src/main/webapp/js/coselmar.js | 32 +++++------ .../src/main/webapp/views/users/newPassword.html | 9 ++- 4 files changed, 89 insertions(+), 17 deletions(-) diff --git a/coselmar-ui/src/main/webapp/css/coselmar.css b/coselmar-ui/src/main/webapp/css/coselmar.css index 2634bce..746f42c 100644 --- a/coselmar-ui/src/main/webapp/css/coselmar.css +++ b/coselmar-ui/src/main/webapp/css/coselmar.css @@ -429,3 +429,67 @@ a.dropdown-toggle:hover .caret { input[type="file"] { height: auto; } + +/** + * Animation + */ +/* + We're using CSS transitions for when + the enter and move events are triggered + for the element that has the .repeated-item + class +*/ +.repeated-item.ng-enter, .repeated-item.ng-move { + -webkit-transition:0.5s linear all; + -moz-transition:0.5s linear all; + -o-transition:0.5s linear all; + transition:0.5s linear all; + opacity:0; +} + +/* + The ng-enter-active and ng-move-active + are where the transition destination properties + are set so that the animation knows what to + animate. +*/ +.repeated-item.ng-enter.ng-enter-active, +.repeated-item.ng-move.ng-move-active { + opacity:1; +} + +/* + We're using CSS keyframe animations for when + the leave event is triggered for the element + that has the .repeated-item class +*/ +.repeated-item.ng-leave { + -webkit-animation:0.5s my_animation; + -moz-animation:0.5s my_animation; + -o-animation:0.5s my_animation; + animation:0.5s my_animation; +} + +@keyframes my_animation { + from { opacity:1; } + to { opacity:0; } +} + +/* + Unfortunately each browser vendor requires + its own definition of keyframe animation code... +*/ +@-webkit-keyframes my_animation { + from { opacity:1; } + to { opacity:0; } +} + +@-moz-keyframes my_animation { + from { opacity:1; } + to { opacity:0; } +} + +@-o-keyframes my_animation { + from { opacity:1; } + to { opacity:0; } +} \ No newline at end of file diff --git a/coselmar-ui/src/main/webapp/index.html b/coselmar-ui/src/main/webapp/index.html index ae22b95..adecda5 100644 --- a/coselmar-ui/src/main/webapp/index.html +++ b/coselmar-ui/src/main/webapp/index.html @@ -35,6 +35,7 @@ <script src="webjars/angularjs/1.3.6/angular-route.js"></script> <script src="webjars/angularjs/1.3.6/angular-resource.js"></script> <script src="webjars/angularjs/1.3.6/angular-messages.js"></script> + <script src="webjars/angularjs/1.3.6/angular-animate.js"></script> <!--<script src="nuiton-js/angular-ui-bootstrap.js"></script>--> <script src="webjars/bootstrap/3.3.1/js/bootstrap.js"></script> <script src="webjars/angular-translate/2.5.2/angular-translate.js"></script> diff --git a/coselmar-ui/src/main/webapp/js/coselmar.js b/coselmar-ui/src/main/webapp/js/coselmar.js index a444191..33eb7e7 100644 --- a/coselmar-ui/src/main/webapp/js/coselmar.js +++ b/coselmar-ui/src/main/webapp/js/coselmar.js @@ -21,7 +21,7 @@ * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ -var coselmarApp = angular.module("coselmarApp", ['ngRoute', 'ngResource', 'ngMessages', +var coselmarApp = angular.module("coselmarApp", ['ngRoute', 'ngResource', 'ngMessages', 'ngAnimate', 'pascalprecht.translate', 'tmh.dynamicLocale', 'angular-jwt', 'coselmarControllers', 'coselmarServices']); @@ -113,21 +113,21 @@ coselmarApp.config(function($httpProvider) { return { 'responseError': function(rejection) { - if (rejection.status == 401) { - // create return to path wanted - var returnTo = $location.path(); - $location.path("/401").search('returnTo', returnTo); - - } else if (rejection.status == 403) { - $location.path("/403"); - - } else if (rejection.status == 404) { -// $location.path("/404"); - - } else { - $location.path("/"); - - } +// if (rejection.status == 401) { +// // create return to path wanted +// var returnTo = $location.path(); +// $location.path("/401").search('returnTo', returnTo); +// +// } else if (rejection.status == 403) { +// $location.path("/403"); +// +// } else if (rejection.status == 404) { +//// $location.path("/404"); +// +// } else { +// $location.path("/"); +// +// } return $q.reject(rejection); } }; diff --git a/coselmar-ui/src/main/webapp/views/users/newPassword.html b/coselmar-ui/src/main/webapp/views/users/newPassword.html index faa2d31..4904b2f 100644 --- a/coselmar-ui/src/main/webapp/views/users/newPassword.html +++ b/coselmar-ui/src/main/webapp/views/users/newPassword.html @@ -29,7 +29,14 @@ </div> <div class="text-center"> - <alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg | translate}}</alert> + <!--<alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg | translate}}</alert>--> + <alert class="repeated-item" ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg | translate}}</alert> + + Sinon : + <ul> + <li class="repeated-item" ng-repeat="alert in alerts">{{alert.msg | translate}}</li> + </ul> + </div> <div class="text-center"> -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.