Open file promp function added & help updated

Prompt opens asking user to input relative file path, which on hitting
OK will attempt to open. Triggered with CTRL+o shortcut, which is also
added to help screen. Also clarified CTRL+g and noted it's anywhere, not
elsewhere.
This commit is contained in:
Matt Pass
2013-03-16 12:54:04 +00:00
parent a33ded4409
commit e2adcabc5b
2 changed files with 18 additions and 2 deletions

View File

@@ -584,6 +584,15 @@ var ICEcoder = {
}
},
// Show file prompt to open file
openPrompt: function() {
var fileLink;
if(fileLink = top.ICEcoder.getInput('Enter relative file path prefixed with /','')) {
top.ICEcoder.openFile(fileLink);
}
},
// Save a file
saveFile: function(saveAs) {
var saveType;
@@ -2037,6 +2046,12 @@ var ICEcoder = {
top.ICEcoder.ctrlKeyDown = false;
return false;
// CTRL+O (Open Prompt)
} else if(key==79 && top.ICEcoder.ctrlKeyDown==true) {
top.ICEcoder.openPrompt();
top.ICEcoder.ctrlKeyDown = false;
return false;
// CTRL+Space (Show snippet)
} else if(key==32 && top.ICEcoder.ctrlKeyDown==true && area=="content") {
top.ICEcoder.addSnippet();