This is an automated email from the git hooks/post-receive script. New commit to branch devel in repository Pollen. See http://git.None/Pollen.git commit bda66d98813de731d4ea4902ff3e569aae2927ad Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Tue May 27 11:02:10 2014 +0200 Fix url --- .../src/main/webapp/js/controllers/pollCtrl.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 d9eab78..85f5ea8 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js @@ -24,7 +24,7 @@ angular.module('pollControllers', []) .controller('PollCtrl', ['$scope', '$controller', '$sce', '$timeout', '$routeParams', '$location', 'SessionStorage', function ($scope, $controller, $sce, $timeout, $routeParams, $location, SessionStorage) { - $scope.url = $location.protocol()+'://'+$location.host()+'/#'+$location.path(); + $scope.url = window.location.origin+window.location.pathname+'#'+$location.path(); if ($location.search().length != 0) { $scope.url += '?'; angular.forEach($location.search(), function(value, key) { @@ -72,10 +72,16 @@ angular.module('pollControllers', []) $scope.data = {}; $scope.data.poll = {}; + console.log($location); + console.log(window.location); if (angular.isDefined($routeParams.pollId)) { - $scope.globalVariables.linkVote = $location.protocol()+'://'+$location.host()+'/#/poll/vote/'+$routeParams.pollId; - $scope.globalVariables.linkEdit = $location.protocol()+'://'+$location.host()+'/#/poll/edit/'+$routeParams.pollId; - $scope.globalVariables.linkResult = $location.protocol()+'://'+$location.host()+'/#/poll/result/'+$routeParams.pollId; + var baseUrl = window.location.origin+window.location.pathname; + $scope.globalVariables.linkVote = baseUrl; + $scope.globalVariables.linkEdit = baseUrl; + $scope.globalVariables.linkResult = baseUrl; + $scope.globalVariables.linkVote += '#/poll/vote/'+$routeParams.pollId; + $scope.globalVariables.linkEdit += '#/poll/edit/'+$routeParams.pollId; + $scope.globalVariables.linkResult += '#/poll/result/'+$routeParams.pollId; if (angular.isDefined($scope.globalVariables.permission)) { $scope.globalVariables.linkEdit += '?token='+$scope.globalVariables.permission; -- To stop receiving notification emails like this one, please contact Chorem.org SCM administrator <admin+scm@chorem.org>.