Merge pull request +8560 from c9/growth-hacks

3 growth hacks
pull/124/head
Nikolai Onken 2015-08-06 15:52:32 +02:00
commit 0f4831d7f5
2 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -94,7 +94,7 @@
"c9.ide.navigate": "#f358997d93",
"c9.ide.newresource": "#f1f0624768",
"c9.ide.openfiles": "#28a4f5af16",
"c9.ide.preview": "#d10e9d75e1",
"c9.ide.preview": "#a75e218d3e",
"c9.ide.preview.browser": "#c50007ebbc",
"c9.ide.preview.markdown": "#ab8d30ad9f",
"c9.ide.pubsub": "#a85fb27eca",
@ -111,6 +111,6 @@
"c9.ide.threewaymerge": "#229382aa0b",
"c9.ide.undo": "#b028bcb4d5",
"c9.ide.upload": "#0bd010d3dc",
"c9.ide.welcome": "#c370b3f191"
"c9.ide.welcome": "#0cb72cfc56"
}
}

Wyświetl plik

@ -104,6 +104,8 @@ define(function(require, exports, module) {
}, 500);
function exec(command, editor, args, e) {
var sCommand = command;
if (!editor || editor.fake)
editor = emit("getEditor");
@ -119,8 +121,10 @@ define(function(require, exports, module) {
if (typeof command === 'string')
command = commands[command];
if (!command)
if (!command) {
console.warn("Could not find command ", sCommand);
return false;
}
if (command.isAvailable && !command.isAvailable(editor, args, e))
return; //Disable commands for other contexts