add shortcut to preview

This commit is contained in:
Xuan Sang LE 2018-03-03 11:18:46 +01:00
parent 794ff33735
commit 685301e793

View File

@ -8,8 +8,8 @@ class Preview extends this.OS.GUI.BaseApplication
@view = @find "view" @view = @find "view"
@status = @find "status" @status = @find "status"
PDFJS.workerSrc = @_api.handler.get + "/#{@path()}/pdf.worker.js" PDFJS.workerSrc = @_api.handler.get + "/#{@path()}/pdf.worker.js"
@bindKey "ALT-O", () -> me.actionFile "#{me.mame}-Open" @bindKey "ALT-O", () -> me.actionFile "#{me.name}-Open"
@bindKey "CTRL-O", () -> me.actionFile "#{me.name}-Close" @bindKey "CTRL-X", () -> me.actionFile "#{me.name}-Close"
@open @currfile @open @currfile
@ -106,6 +106,7 @@ class Preview extends this.OS.GUI.BaseApplication
menu menu
actionFile: (e) -> actionFile: (e) ->
console.log e
me = @ me = @
switch e switch e
when "#{@name}-Open" when "#{@name}-Open"