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 bd04e9d6ab03237dacb6b01afb88518811bf1d41 Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Mon Jul 28 16:31:53 2014 +0200 alert can print html, url of vote is now in input --- .../src/main/webapp/js/controllers/alertCtrl.js | 8 ++++-- .../src/main/webapp/js/controllers/pollCtrl.js | 6 +++- pollen-ui-angular/src/main/webapp/less/style.less | 32 +++++++++++++++++----- .../src/main/webapp/partials/alerts.html | 4 ++- 4 files changed, 39 insertions(+), 11 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/js/controllers/alertCtrl.js b/pollen-ui-angular/src/main/webapp/js/controllers/alertCtrl.js index d388b25..85075fd 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/alertCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/alertCtrl.js @@ -21,8 +21,8 @@ 'use strict'; angular.module('alertControllers', []) -.controller('printAlertCtrl', ['$scope', '$timeout', - function ($scope, $timeout) { +.controller('printAlertCtrl', ['$scope', '$timeout', '$sce', '$filter', + function ($scope, $timeout, $sce, $filter) { if (angular.isUndefined($scope.data)) { $scope.data = {} @@ -94,4 +94,8 @@ angular.module('alertControllers', []) $scope.data.alerts.splice(index, 1); } } + + $scope.toHTML = function (msg) { + return $sce.trustAsHtml($filter('translate')(msg)); + } }]) \ No newline at end of file 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 cc02944..12e37f3 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -1119,7 +1119,11 @@ angular.module('pollControllers', ['ngRoute', 'pollenServices', 'pascalprecht.tr $rootScope.$broadcast('newSuccess', 'vote.added'); initVote(); - $rootScope.$broadcast('newInfo', $scope.globalVariables.baseUrl+'#/poll/vote/'+$routeParams.pollId+'/'+ returnRequest.permission, -1); + $rootScope.$broadcast('newInfo', + '<input type="text" class="form-control" value="' + + $scope.globalVariables.baseUrl+'#/poll/vote/'+$routeParams.pollId+'/'+ returnRequest.permission + + '" readonly />' + , -1); $location.url('/poll/vote/'+$routeParams.pollId+'/'+ returnRequest.permission); }, function (error) { if (angular.isDefined(error.data["voter.name"])) { diff --git a/pollen-ui-angular/src/main/webapp/less/style.less b/pollen-ui-angular/src/main/webapp/less/style.less index 9321c36..e8159ec 100644 --- a/pollen-ui-angular/src/main/webapp/less/style.less +++ b/pollen-ui-angular/src/main/webapp/less/style.less @@ -358,14 +358,32 @@ font-size:1.1em; font-weight:bold; z-index: 100000; - opacity: 0.9; - .glyphicon { - display:inline-block; - font-size:1.4em; - top:5px; - font-weight:bolder; - margin-right: 15px; + .alert { + opacity:0.9; + + .transition(opacity @short-time-transition ease); + + &:hover { + opacity:0.7; + + .transition(opacity @short-time-transition ease); + } + + .glyphicon { + display:inline-block; + font-size:1.4em; + top:5px; + font-weight:bolder; + margin-right: 15px; + } + + .alert-message { + margin-right:20px; + margin-left: 30px; + margin-top: -12px; + + } } } diff --git a/pollen-ui-angular/src/main/webapp/partials/alerts.html b/pollen-ui-angular/src/main/webapp/partials/alerts.html index 7afa3ab..37bc807 100644 --- a/pollen-ui-angular/src/main/webapp/partials/alerts.html +++ b/pollen-ui-angular/src/main/webapp/partials/alerts.html @@ -1,3 +1,5 @@ <div ng-controller="printAlertCtrl" > - <alert ng-repeat="alert in data.alerts" type="{{alert.type}}" class="fakeLink" close="hideAlert(alert)" ng-click="hideAlert(alert)"><span class="glyphicon" ng-class="alert.glyphicon"></span> {{ alert.msg | translate }} </alert> + <alert ng-repeat="alert in data.alerts" + type="{{alert.type}}" + close="hideAlert(alert)"><span class="glyphicon" ng-class="alert.glyphicon"></span> <div class="alert-message" ng-bind-html="toHTML(alert.msg)"></div> </alert> </div> \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.