mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-01 21:58:22 +02:00
BUGFIX: Closing TinyMCE image, link or flash panel when loading form (ticket #4907)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98690 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
16e1941203
commit
a94ddab4cd
@ -33,6 +33,11 @@ $(document).ready(function() {
|
|||||||
$(this).addClass('loading');
|
$(this).addClass('loading');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('input[name=action_search]').livequery('click', function() {
|
||||||
|
$('#contentPanel').fn('closeRightPanel');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
$("#right").scroll( function () {
|
$("#right").scroll( function () {
|
||||||
positionActionArea();
|
positionActionArea();
|
||||||
});
|
});
|
||||||
@ -88,7 +93,7 @@ $(document).ready(function() {
|
|||||||
*/
|
*/
|
||||||
$('#SearchForm_holder .tab form:not(#Form_ImportForm)').submit(function () {
|
$('#SearchForm_holder .tab form:not(#Form_ImportForm)').submit(function () {
|
||||||
var $form = $(this);
|
var $form = $(this);
|
||||||
|
$('#contentPanel').fn('closeRightPanel');
|
||||||
// @todo TinyMCE coupling
|
// @todo TinyMCE coupling
|
||||||
tinymce_removeAll();
|
tinymce_removeAll();
|
||||||
|
|
||||||
@ -284,10 +289,27 @@ $(document).ready(function() {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
// Helper functions
|
// Helper functions
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
$('#contentPanel').fn({
|
||||||
|
/**
|
||||||
|
* 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
$('#ModelAdminPanel').fn({
|
$('#ModelAdminPanel').fn({
|
||||||
/**
|
/**
|
||||||
* Load a detail editing form into the main edit panel
|
* Load a detail editing form into the main edit panel
|
||||||
@ -296,7 +318,7 @@ $(document).ready(function() {
|
|||||||
loadForm: function(url, successCallback) {
|
loadForm: function(url, successCallback) {
|
||||||
// @todo TinyMCE coupling
|
// @todo TinyMCE coupling
|
||||||
tinymce_removeAll();
|
tinymce_removeAll();
|
||||||
|
$('#contentPanel').fn('closeRightPanel');
|
||||||
$('#right #ModelAdminPanel').load(url, standardStatusHandler(function(result) {
|
$('#right #ModelAdminPanel').load(url, standardStatusHandler(function(result) {
|
||||||
if(typeof(successCallback) == 'function') successCallback.apply();
|
if(typeof(successCallback) == 'function') successCallback.apply();
|
||||||
if(!this.future || !this.future.length) {
|
if(!this.future || !this.future.length) {
|
||||||
@ -311,6 +333,8 @@ $(document).ready(function() {
|
|||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
startHistory: function(url, data) {
|
startHistory: function(url, data) {
|
||||||
this.history = [];
|
this.history = [];
|
||||||
$(this).fn('addHistory', url, data);
|
$(this).fn('addHistory', url, data);
|
||||||
|
Loading…
Reference in New Issue
Block a user