mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
Merged from branches/2.3
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@76918 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
491118381c
commit
b34dcd40b0
@ -33,12 +33,10 @@ class ReportAdmin extends LeftAndMain {
|
||||
// always be present in a CMS environment
|
||||
if(!Director::is_ajax()) {
|
||||
Requirements::javascript(MCE_ROOT . "tiny_mce_src.js");
|
||||
Requirements::javascriptTemplate(CMS_DIR . '/javascript/tinymce.template.js', array(
|
||||
'ContentCSS' => project() . '/css/editor.css',
|
||||
'BaseURL' => Director::absoluteBaseURL(),
|
||||
'Lang' => i18n::get_tinymce_lang()
|
||||
));
|
||||
HtmlEditorConfig::get('cms')->setOption('ContentCSS', project() . '/css/editor.css');
|
||||
HtmlEditorConfig::get('cms')->setOption('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');
|
||||
}
|
||||
|
@ -906,7 +906,7 @@ Behaviour.register({
|
||||
}
|
||||
this.resetChanged = function() {
|
||||
inst = tinyMCE.getInstanceById(this.id);
|
||||
inst.startContent = tinymce.trim(inst.getContent({format : 'raw', no_events : 1}));
|
||||
if (inst) inst.startContent = tinymce.trim(inst.getContent({format : 'raw', no_events : 1}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class CMSMainTest extends FunctionalTest {
|
||||
function testPublish() {
|
||||
$this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin'));
|
||||
|
||||
$response = $this->post('admin/cms/publishall', array('confirm' => 1));
|
||||
$response = Director::test("admin/cms/publishall", array('confirm' => 1), $this->session());
|
||||
|
||||
$this->assertContains(
|
||||
sprintf(_t('CMSMain.PUBPAGES',"Done: Published %d pages"), 5),
|
||||
@ -22,6 +22,7 @@ class CMSMainTest extends FunctionalTest {
|
||||
);
|
||||
|
||||
$response = Director::test("admin/cms/batchactions/publish", array('csvIDs' => '1,2', 'ajax' => 1), $this->session());
|
||||
|
||||
$this->assertContains('setNodeTitle(1, \'Page 1\');', $response->getBody());
|
||||
$this->assertContains('setNodeTitle(2, \'Page 2\');', $response->getBody());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user