Fixed error where saving message appears twice.
This commit is contained in:
parent
7a8c762e48
commit
059ab889bd
|
@ -62,17 +62,8 @@ function showControls(filename){
|
||||||
}
|
}
|
||||||
|
|
||||||
function bindControlEvents(){
|
function bindControlEvents(){
|
||||||
$("#editor_save").live('click',function() {
|
$("#editor_save").die('click', doFileSave).live('click', doFileSave);
|
||||||
if(is_editor_shown){
|
$('#editor_close').live('click', hideFileEditor);
|
||||||
doFileSave();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#editor_close').live('click',function() {
|
|
||||||
if(is_editor_shown){
|
|
||||||
hideFileEditor();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateSessionFileHash(path){
|
function updateSessionFileHash(path){
|
||||||
|
@ -175,24 +166,26 @@ function showFileEditor(dir,filename){
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideFileEditor(){
|
function hideFileEditor(){
|
||||||
$('#editor').attr('editorshown','false');
|
if(!is_editor_shown){
|
||||||
// Fade out controls
|
$('#editor').attr('editorshown','false');
|
||||||
$('#editor_close').fadeOut('slow');
|
// Fade out controls
|
||||||
// Fade out the save button
|
$('#editor_close').fadeOut('slow');
|
||||||
$('#editor_save').fadeOut('slow');
|
// Fade out the save button
|
||||||
// Fade out breadcrumb
|
$('#editor_save').fadeOut('slow');
|
||||||
$('#breadcrumb_file').fadeOut('slow', function(){ $(this).remove();});
|
// Fade out breadcrumb
|
||||||
// Fade out editor
|
$('#breadcrumb_file').fadeOut('slow', function(){ $(this).remove();});
|
||||||
$('#editor').fadeOut('slow', function(){
|
// Fade out editor
|
||||||
$('#editor_close').remove();
|
$('#editor').fadeOut('slow', function(){
|
||||||
$('#editor_save').remove();
|
$('#editor_close').remove();
|
||||||
$('#editor').remove();
|
$('#editor_save').remove();
|
||||||
var editorhtml = '<div id="editor"></div>';
|
$('#editor').remove();
|
||||||
$('table').after(editorhtml);
|
var editorhtml = '<div id="editor"></div>';
|
||||||
$('.actions,#file_access_panel').fadeIn('slow');
|
$('table').after(editorhtml);
|
||||||
$('table').fadeIn('slow');
|
$('.actions,#file_access_panel').fadeIn('slow');
|
||||||
});
|
$('table').fadeIn('slow');
|
||||||
is_editor_shown = false;
|
});
|
||||||
|
is_editor_shown = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(window).resize(function() {
|
$(window).resize(function() {
|
||||||
|
|
Loading…
Reference in New Issue