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

@ -18,7 +18,7 @@
//////////////////////////////////////////////////////////////////
// Search form
//////////////////////////////////////////////////////////////////
/**
* Class: #ModelClassSelector select
*
@ -63,6 +63,8 @@
onsubmit: function(e) {
// Import forms are processed without ajax
if(this.is('#Form_ImportForm')) return true;
$('#contentPanel').closeRightPanel();
this.trigger('beforeSubmit');
@ -119,7 +121,8 @@
return false;
}
});
/**
* Class: .resultsTable tbody td
*
@ -193,6 +196,21 @@
this._super();
}
});
$('#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);