mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-28 10:14:13 +00:00
minor changes
This commit is contained in:
parent
f60b799a01
commit
95bff794b7
2 changed files with 39 additions and 9 deletions
|
|
@ -8,14 +8,16 @@ CloudCommander.Editor.CodeMirror = {
|
|||
|
||||
/* function shows editor */
|
||||
var createEditorDiv = function(){
|
||||
if (!document.getElementById('CloudEditor')) {
|
||||
var lEditor=document.createElement('div');
|
||||
lEditor.id ='CloudEditor';
|
||||
if (!pParent.getById('CloudEditor')) {
|
||||
var lFM = document.getElementById('fm');
|
||||
|
||||
if(lFM){
|
||||
lFM.appendChild(lEditor);
|
||||
}else console.log('Error. Something went wrong FM not found');
|
||||
if(lFM)
|
||||
CloudCommander.anyload({
|
||||
name : 'div',
|
||||
id : 'CloudEditor',
|
||||
element : lFM
|
||||
});
|
||||
else
|
||||
console.log('Error. Something went wrong FM not found');
|
||||
|
||||
pParent.show();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,8 +16,36 @@ CloudCommander.Terminal.jqconsole = {
|
|||
});
|
||||
},
|
||||
|
||||
init: function(){
|
||||
|
||||
init: (function(){
|
||||
var pConsole = document.getById('terminal');
|
||||
if(!pConsole){
|
||||
CloudCommander.anyload({
|
||||
name : 'div',
|
||||
id :'terminal'
|
||||
});
|
||||
}
|
||||
}),
|
||||
|
||||
show: function(){
|
||||
$(function () {
|
||||
var jqconsole = $('#terminal').jqconsole('Hi\n', '>>>');
|
||||
var startPrompt = function () {
|
||||
// Start the prompt with history enabled.
|
||||
jqconsole.Prompt(true, function (input) {
|
||||
// Output input with the class jqconsole-output.
|
||||
jqconsole.Write(input + '\n', 'jqconsole-output');
|
||||
// Restart the prompt.
|
||||
startPrompt();
|
||||
});
|
||||
};
|
||||
startPrompt();
|
||||
});
|
||||
},
|
||||
|
||||
getById : function(pId){return document.getElementById(pId);},
|
||||
|
||||
getByClass : function(pClass){
|
||||
return document.getElementsByClassName(pClass);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue