mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 10:38:26 +00:00
fixed bug with CodeMirror ajax error processing
This commit is contained in:
parent
8a1f4f047c
commit
18e69efd99
2 changed files with 5 additions and 7 deletions
|
|
@ -58,8 +58,7 @@ CloudCommander.Editor.CodeMirror = {
|
|||
/* if CloudEditor is not loaded - loading him */
|
||||
if(!document.getElementById('CloudEditor'))
|
||||
return this.load(this);
|
||||
/* removing keyBinding if set */
|
||||
CloudCommander.keyBinded = false;
|
||||
/* removing keyBinding if set */
|
||||
|
||||
var lParent = this;
|
||||
var initCodeMirror_f = function(pValue){
|
||||
|
|
@ -94,16 +93,15 @@ CloudCommander.Editor.CodeMirror = {
|
|||
/* reading data from current file */
|
||||
$.ajax({
|
||||
url:lA,
|
||||
|
||||
error: function(jqXHR, textStatus, errorThrown){
|
||||
console.log(textStatus+' : '+ errorThrown);
|
||||
|
||||
return false;
|
||||
console.log(textStatus+' : '+ errorThrown);
|
||||
},
|
||||
|
||||
success:function(data, textStatus, jqXHR){
|
||||
initCodeMirror_f(data);
|
||||
|
||||
CloudCommander.keyBinded = false;
|
||||
|
||||
lLeft &&
|
||||
(lLeft.className = 'panel hidden');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ CloudCommander.keyBinding=(function(){
|
|||
/* добавляем обработчик клавишь */
|
||||
if(document.addEventListener)
|
||||
document.addEventListener('keydown', key_event,false);
|
||||
else document.onkeypress=key_event;
|
||||
else document.onkeypress = key_event;
|
||||
/* клавиши назначены*/
|
||||
CloudCommander.keyBinded=true;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue