mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@77033 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c69994f98f
commit
f27122e102
@ -110,15 +110,9 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
$spellcheckSpec = array();
|
$spellcheckSpec = array();
|
||||||
foreach($spellcheckLangs as $lang => $title) $spellcheckSpec[] = "{$title}={$lang}";
|
foreach($spellcheckLangs as $lang => $title) $spellcheckSpec[] = "{$title}={$lang}";
|
||||||
|
|
||||||
|
// Set custom options for TinyMCE specific to CMSMain
|
||||||
HtmlEditorConfig::get('cms')->setOption('spellchecker_languages', '+' . implode(',', $spellcheckSpec));
|
HtmlEditorConfig::get('cms')->setOption('spellchecker_languages', '+' . implode(',', $spellcheckSpec));
|
||||||
|
|
||||||
// @todo Do we need this - I'm pretty sure not, since HtmlEditorField#Field() will include it on being called.
|
|
||||||
// The only time you might need it is if you are creating an textarea.htmlfield yourself, in which case bad things are going to happen now we've moved configuration
|
|
||||||
// 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::javascript(CMS_DIR . '/javascript/CMSMain.js');
|
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.js');
|
||||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain_left.js');
|
Requirements::javascript(CMS_DIR . '/javascript/CMSMain_left.js');
|
||||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain_right.js');
|
Requirements::javascript(CMS_DIR . '/javascript/CMSMain_right.js');
|
||||||
|
@ -883,6 +883,9 @@ JS;
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function EditForm() {
|
public function EditForm() {
|
||||||
|
// Include JavaScript to ensure HtmlEditorField works.
|
||||||
|
HtmlEditorField::include_js();
|
||||||
|
|
||||||
$record = $this->currentPage();
|
$record = $this->currentPage();
|
||||||
if(!$record) return false;
|
if(!$record) return false;
|
||||||
|
|
||||||
|
@ -29,13 +29,9 @@ class ReportAdmin extends LeftAndMain {
|
|||||||
|
|
||||||
Requirements::css(CMS_DIR . '/css/ReportAdmin.css');
|
Requirements::css(CMS_DIR . '/css/ReportAdmin.css');
|
||||||
|
|
||||||
// We don't want this showing up in every ajax-response, it should
|
// Set custom options for TinyMCE specific to ReportAdmin
|
||||||
// always be present in a CMS environment
|
|
||||||
if(!Director::is_ajax()) {
|
|
||||||
Requirements::javascript(MCE_ROOT . "tiny_mce_src.js");
|
|
||||||
HtmlEditorConfig::get('cms')->setOption('ContentCSS', project() . '/css/editor.css');
|
HtmlEditorConfig::get('cms')->setOption('ContentCSS', project() . '/css/editor.css');
|
||||||
HtmlEditorConfig::get('cms')->setOption('Lang', i18n::get_tinymce_lang());
|
HtmlEditorConfig::get('cms')->setOption('Lang', i18n::get_tinymce_lang());
|
||||||
}
|
|
||||||
|
|
||||||
// Always block the HtmlEditorField.js otherwise it will be sent with an ajax request
|
// Always block the HtmlEditorField.js otherwise it will be sent with an ajax request
|
||||||
Requirements::block(SAPPHIRE_DIR . '/javascript/HtmlEditorField.js');
|
Requirements::block(SAPPHIRE_DIR . '/javascript/HtmlEditorField.js');
|
||||||
|
Loading…
Reference in New Issue
Block a user