36 lines
782 B
JavaScript
36 lines
782 B
JavaScript
var controllers = angular.module('satbd.satellite.bar.controllers',[
|
|
'ui.bootstrap',
|
|
'ngAnimate'
|
|
]);
|
|
|
|
controllers.controller('NavBarCtrl',function($scope,$location,$uibModal) {
|
|
"use strict";
|
|
|
|
$scope.isCollapsed = true;
|
|
$scope.isActive = function(loc) {
|
|
return loc === $location.path();
|
|
};
|
|
|
|
$scope.search = function(searchTerms) {
|
|
if (searchTerms) {
|
|
$location.url('/search?q='+ encodeURIComponent(searchTerms));
|
|
}
|
|
};
|
|
|
|
$scope.openHelpModal = function () {
|
|
var modalInstance = $uibModal.open({
|
|
templateUrl: 'html/help.html',
|
|
controller: 'HelpInstanceCtrl',
|
|
size: 'large',
|
|
keyboard: true,
|
|
});
|
|
};
|
|
});
|
|
|
|
|
|
controllers.controller('HelpInstanceCtrl',function($scope, $uibModalInstance) {
|
|
$scope.ok = function () {
|
|
$uibModalInstance.close('');
|
|
};
|
|
});
|