Reimplements the help modal

This commit is contained in:
2016-02-11 17:14:47 +01:00
parent e109e116f5
commit ca9dd50429
5 changed files with 32 additions and 4 deletions

View File

@@ -5,13 +5,31 @@ var controllers = angular.module('satbd.satellite.bar.controllers',[
'ngAnimate'
]);
controllers.controller('NavBarCtrl',function($scope,$location) {
controllers.controller('NavBarCtrl',function($scope,$location,$uibModal) {
$scope.isCollapsed = true;
$scope.isActive = function(loc) {
return loc === $location.path();
};
$scope.search = function(searchTerms) {
$location.url('/search?q='+ encodeURIComponent(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('');
};
});