mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-11 19:16:49 +01:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user