Reimplements the help modal
This commit is contained in:
@@ -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('');
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user