angularjs 1.2.0 upgrade

This commit is contained in:
Athou
2013-11-12 09:43:36 +01:00
parent c01c1e93f9
commit 32325bb49c
14 changed files with 259 additions and 213 deletions

View File

@@ -1551,11 +1551,13 @@ module.controller('HelpController', ['$scope', 'CategoryService', 'AnalyticsServ
}]);
module.controller('FooterController', ['$scope', function($scope) {
module.controller('FooterController', ['$scope', '$sce', function($scope, $sce) {
var baseUrl = window.location.href.substring(0, window.location.href.lastIndexOf('#'));
var hostname = window.location.hostname;
$scope.subToMeUrl = baseUrl + 'rest/feed/subscribe?url={feed}';
$scope.subToMeName = hostname.indexOf('www.commafeed.com') !== -1 ? 'CommaFeed' : 'CommaFeed (' + hostname + ')';
var url = baseUrl + 'rest/feed/subscribe?url={feed}';
var name = hostname.indexOf('www.commafeed.com') !== -1 ? 'CommaFeed' : 'CommaFeed (' + hostname + ')';
var subToMeUrl = 'https://www.subtome.com/register-no-ui.html?name=' + name + '&url=' + url;
$scope.subToMeUrl = $sce.trustAsResourceUrl(subToMeUrl);
}]);