mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
Fixed loading of CMS toolbar with the HtmlEditorField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@68945 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e0611be469
commit
b4d24d441d
@ -92,7 +92,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
// We don't want this showing up in every ajax-response, it should always be present in a CMS-environment
|
||||
if(!Director::is_ajax()) {
|
||||
Requirements::javascript(MCE_ROOT . "tiny_mce_src.js");
|
||||
Requirements::block(SAPPHIRE_DIR . '/javascript/HtmlEditorField.js');
|
||||
Requirements::javascriptTemplate(CMS_DIR . "/javascript/tinymce.template.js", array(
|
||||
"ContentCSS" => (SSViewer::current_theme() ? THEMES_DIR . "/" . SSViewer::current_theme() : project()) . "/css/editor.css",
|
||||
"BaseURL" => Director::absoluteBaseURL(),
|
||||
@ -100,6 +99,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
'SpellcheckLangs' => '+' . implode(',', $spellcheckSpec)
|
||||
));
|
||||
}
|
||||
// Always block the HtmlEditorField.js otherwise it will be sent with an ajax request
|
||||
Requirements::block(SAPPHIRE_DIR . '/javascript/HtmlEditorField.js');
|
||||
|
||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain_left.js');
|
||||
|
@ -33,13 +33,14 @@ class ReportAdmin extends LeftAndMain {
|
||||
// always be present in a CMS environment
|
||||
if(!Director::is_ajax()) {
|
||||
Requirements::javascript(MCE_ROOT . "tiny_mce_src.js");
|
||||
Requirements::block(SAPPHIRE_DIR . '/javascript/HtmlEditorField.js');
|
||||
Requirements::javascriptTemplate(CMS_DIR . '/javascript/tinymce.template.js', array(
|
||||
'ContentCSS' => project() . '/css/editor.css',
|
||||
'BaseURL' => Director::absoluteBaseURL(),
|
||||
'Lang' => i18n::get_tinymce_lang()
|
||||
));
|
||||
}
|
||||
// Always block the HtmlEditorField.js otherwise it will be sent with an ajax request
|
||||
Requirements::block(SAPPHIRE_DIR . '/javascript/HtmlEditorField.js');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user