Files
pathfinder/js/app/ui/dialog/shortcuts.js
Mark Friedrich 5a5959d072 - new "jump history" breadcrumb, closed #812
- new EVE server time clock added to footer
- improved initial page render time,
- refactored JS event trigger/handling
- replaced _jQuery fullscreen_ plugin with HTML5´s native [Fullscreen API](https://developer.mozilla.org/docs/Web/API/Fullscreen_API)
2019-07-13 14:34:57 +02:00

49 lines
1.2 KiB
JavaScript

/**
* shortcuts dialog
*/
define([
'jquery',
'app/init',
'app/util',
'bootbox',
'app/key',
], function($, Init, Util, bootbox, Key){
'use strict';
let config = {
// map dialog
shortcutsDialogId: 'pf-shortcuts-dialog', // id for shortcuts dialog
};
/**
* shows the map manual modal dialog
*/
$.fn.showShortcutsDialog = function(){
requirejs(['text!templates/dialog/shortcuts.html', 'mustache'], function(template, Mustache){
let data = {
id: config.shortcutsDialogId,
shortcuts: Key.getGroupedShortcuts()
};
let content = Mustache.render(template, data);
// show dialog
let shortcutsDialog = bootbox.dialog({
title: 'Keyboard Shortcuts',
message: content,
size: 'large',
buttons: {
success: {
label: 'close',
className: 'btn-default'
}
},
show: true
});
});
};
});