1angular.module("irk") 2.controller('LocaleChooser', function ($scope, $http, $location, Session, $templateCache, $route, $window) { 3 $scope.changeLocale = function(locale, reload) { 4 if(locale === undefined) { 5 return; 6 } 7 return $http.post('REST/locale/'+locale, {}) 8 .then(function (response) { 9 $scope.currentLocale = locale; 10 if(reload) { 11 $window.location.reload(); 12 } 13 }); 14 }; 15 16 $scope.currentLocale = undefined; 17 18 $scope.checkCurrentLocale = function() { 19 return $http.get('REST/locale', {}) 20 .then(function (response) { 21 $scope.currentLocale = response.data; 22 Session.registerObserverCallback(function() { 23 $scope.changeLocale($scope.currentLocale, false); 24 }); 25 }); 26 }; 27 28 $scope.checkCurrentLocale(); 29}) 30.directive("localeChooser", 31 function() { 32 return { 33 restrict : "E", 34 replace : true, 35 transclude : true, 36 templateUrl : "../../content/script/irk/layout/localeChooser/localeChooserTemplate.html" 37 } 38 }); 39;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.