X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/b2d72160e2a68991c66ea6017b871d7f42c0b29d..470817c5149ca294bd929fb29632a91c985aef0a:/project/static/js/editor.js diff --git a/project/static/js/editor.js b/project/static/js/editor.js index 7951ee74..0cbb9341 100644 --- a/project/static/js/editor.js +++ b/project/static/js/editor.js @@ -253,7 +253,9 @@ Panel.prototype.isHotkey = function(event) { if(event.ctrlKey) code = code | 0x200; if(event.shiftKey) code = code | 0x400; - if(this.hotkeys[code] !== null) { + $.log(event.character, this.hotkeys[code]); + + if(this.hotkeys[code]) { return true; } return false; @@ -301,6 +303,10 @@ Editor.prototype.loadConfig = function() { this.fileOptions = this.options; var self = this; + + if(!this.options.recentFiles) + this.options.recentFiles = []; + $.each(this.options.recentFiles, function(index) { if (fileId == self.options.recentFiles[index].fileId) { $.log('Found options for', fileId);