mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 21:56:05 -05:00
30 lines
589 B
CoffeeScript
30 lines
589 B
CoffeeScript
define [
|
|
"utils/Modal"
|
|
"ace/lib/useragent"
|
|
], (Modal) ->
|
|
useragent = require("ace/lib/useragent")
|
|
|
|
class HotKeysManager
|
|
template: $("#hotKeysLinkTemplate").html()
|
|
|
|
constructor: (@ide) ->
|
|
@$el = $(@template)
|
|
$("#toolbar-footer").append(@$el)
|
|
@$el.on "click", (e) =>
|
|
e.preventDefault()
|
|
@showHotKeys()
|
|
|
|
showHotKeys: () ->
|
|
el = $($("#hotKeysListTemplate").html())
|
|
if useragent.isMac
|
|
el.find(".win").hide()
|
|
else
|
|
el.find(".mac").hide()
|
|
|
|
new Modal
|
|
title: "Hot keys"
|
|
el: el
|
|
buttons: [{
|
|
text: "Hide"
|
|
class: "btn-primary"
|
|
}]
|