devtools shortcut

This commit is contained in:
antelle 2016-03-19 14:37:52 +03:00
parent b19dd8d594
commit 90b51376b9
2 changed files with 8 additions and 1 deletions

View File

@ -346,7 +346,7 @@ var AppModel = Backbone.Model.extend({
storageLoad();
}
} else {
logger.info('Open file from cache with sync after load', params.storage);
logger.info('Open file from cache, after load will sync', params.storage);
this.openFileFromCache(params, function(err, file) {
if (!err && file) {
logger.info('Sync just opened file');

View File

@ -77,6 +77,7 @@ var AppView = Backbone.View.extend({
KeyHandler.onKey(Keys.DOM_VK_ESCAPE, this.escPressed, this);
KeyHandler.onKey(Keys.DOM_VK_BACK_SPACE, this.backspacePressed, this);
KeyHandler.onKey(Keys.DOM_VK_F12, this.openDevTools, this, KeyHandler.SHORTCUT_ACTION);
setInterval(this.syncAllByTimer.bind(this), Timeouts.AutoSync);
},
@ -306,6 +307,12 @@ var AppView = Backbone.View.extend({
}
},
openDevTools: function() {
if (Launcher && Launcher.devTools) {
Launcher.openDevTools();
}
},
selectAll: function() {
this.menuSelect({ item: this.model.menu.allItemsSection.get('items').first() });
},