mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
Display user's manual when help is asked, if no tour is available
This commit is contained in:
parent
8976336a6a
commit
86ae46e4c3
@ -1,6 +1,7 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
- Updated user's manual for v4.3 (fr)
|
||||
- Display user's manual when help is asked, if no tour is available
|
||||
- Change style and pluralize the text of the slot division alert in new availability assistant
|
||||
- Fix a bug: in feature tours, next and previous arrows may be broken on some systems
|
||||
- Fix a bug: in the user's menu, two links to the personal wallet
|
||||
|
@ -344,6 +344,24 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
|
||||
$scope.isAuthenticated = Auth.isAuthenticated;
|
||||
$scope.isAuthorized = AuthService.isAuthorized;
|
||||
$rootScope.login = $scope.login;
|
||||
|
||||
// handle F1 key to trigger help
|
||||
window.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'F1') {
|
||||
if ($rootScope.currentUser.role !== 'admin') return;
|
||||
|
||||
e.preventDefault();
|
||||
// we wait a little bit and then, check if a tour has started (by checking for a tour popover).
|
||||
// if not, we consider that we are on a page that does not provides a tour so we fallback to the default behavior
|
||||
// -> opening the user's manual
|
||||
setTimeout(function() {
|
||||
const tourPopover = document.querySelector('.ui-tour-popup');
|
||||
if (!tourPopover || (tourPopover.offsetTop === 0 && tourPopover.offsetTop === 0)) {
|
||||
window.open('https://github.com/sleede/fab-manager/raw/master/doc/fr/guide_utilisation_fab_manager_v4.3.pdf', '_blank');
|
||||
}
|
||||
}, 300);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user