mirror of
https://github.com/fergalmoran/dss.web.git
synced 2026-02-22 16:04:01 +00:00
38 lines
1.1 KiB
JavaScript
38 lines
1.1 KiB
JavaScript
'use strict';
|
|
|
|
angular.module('dssWebApp')
|
|
.controller('NavbarCtrl', function ($rootScope, $scope, $location, $http, SERVER_CONFIG) {
|
|
$scope.menu = [{
|
|
'title': 'Home',
|
|
'link': '/'
|
|
}];
|
|
$scope.selected = undefined;
|
|
$scope.isCollapsed = true;
|
|
$scope.loadingSearchResults = false;
|
|
$scope.notificationCount = 0;
|
|
$scope.isActive = function (route) {
|
|
return route === $location.path();
|
|
};
|
|
$scope.podcastUrl = SERVER_CONFIG.podcastUrl;
|
|
|
|
$scope.showActivityArea = function () {
|
|
$scope.activityAreaOpen = true;
|
|
};
|
|
|
|
$scope.getSearchResults = function (val) {
|
|
$scope.loadingSearchResults = true;
|
|
return $http.get(SERVER_CONFIG.apiUrl + '/_search/', {
|
|
params: {
|
|
q: val
|
|
}
|
|
}).then(function (response) {
|
|
return response.data;
|
|
});
|
|
};
|
|
|
|
$scope.doDebug = function () {
|
|
$http.get(SERVER_CONFIG.apiUrl + '/__debug/');
|
|
};
|
|
|
|
});
|