BUGFIX: Closing TinyMCE image, link or flash panel when loading form (ticket #4907) (from r98690)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@111599 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-04 05:21:04 +00:00
parent 0d66807586
commit b7b0e1ab0b

View File

@ -64,6 +64,8 @@
// Import forms are processed without ajax
if(this.is('#Form_ImportForm')) return true;
$('#contentPanel').closeRightPanel();
this.trigger('beforeSubmit');
var btn = $(this[0].clickedButton);
@ -120,6 +122,7 @@
}
});
/**
* Class: .resultsTable tbody td
*
@ -194,5 +197,20 @@
}
});
$('#contentPanel').entwine({
/**
* Close TinyMCE image, link or flash panel.
* this function is called everytime a new search, back or add new DataObject are clicked
**/
closeRightPanel: function(){
if($('#contentPanel').is(':visible')) {
$('#contentPanel').hide();
$('#Form_EditorToolbarImageForm').hide();
$('#Form_EditorToolbarFlashForm').hide();
$('#Form_EditorToolbarLinkForm').hide();
}
}
});
});
})(jQuery);