Reimplements the help modal
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -31,3 +31,4 @@ _testmain.go
|
|||||||
tmp/
|
tmp/
|
||||||
bower_components
|
bower_components
|
||||||
node_modules
|
node_modules
|
||||||
|
/webapp/index.html
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ func (a *appData) buildRouter() http.Handler {
|
|||||||
|
|
||||||
})))
|
})))
|
||||||
|
|
||||||
dirs := []string{"css", "js", "img", "bower_components"}
|
dirs := []string{"css", "js", "img", "bower_components", "html"}
|
||||||
for _, d := range dirs {
|
for _, d := range dirs {
|
||||||
router.ServeFiles(path.Join("/", d, "/*filepath"), http.Dir(filepath.Join("webapp", d)))
|
router.ServeFiles(path.Join("/", d, "/*filepath"), http.Dir(filepath.Join("webapp", d)))
|
||||||
}
|
}
|
||||||
|
|||||||
9
webapp/html/help.html
Normal file
9
webapp/html/help.html
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<div class="modal-header">
|
||||||
|
<h3 class="modal-title">Aide</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p> Bientôt disponible </p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn btn-primary" type="button" ng-click="ok()">OK</button>
|
||||||
|
</div>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<input type="text" class="form-control" ng-model="searchTerms" placeholder="Chercher ...">
|
<input type="text" class="form-control" ng-model="searchTerms" placeholder="Chercher ...">
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<button class="btn btn-default" type="submit">Go!</button>
|
<button class="btn btn-default" type="submit">Go!</button>
|
||||||
<button type="button" class="btn btn-default" ng-click="openModal('lg')">
|
<button type="button" class="btn btn-default" ng-click="openHelpModal()">
|
||||||
<span class="glyphicon glyphicon-question-sign" aria-label="help"></span>
|
<span class="glyphicon glyphicon-question-sign" aria-label="help"></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,13 +5,31 @@ var controllers = angular.module('satbd.satellite.bar.controllers',[
|
|||||||
'ngAnimate'
|
'ngAnimate'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
controllers.controller('NavBarCtrl',function($scope,$location) {
|
controllers.controller('NavBarCtrl',function($scope,$location,$uibModal) {
|
||||||
$scope.isCollapsed = true;
|
$scope.isCollapsed = true;
|
||||||
$scope.isActive = function(loc) {
|
$scope.isActive = function(loc) {
|
||||||
return loc === $location.path();
|
return loc === $location.path();
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.search = function(searchTerms) {
|
$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