mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
MINOR Removed useless Requirements calls to javascript
MINOR Documentation MINOR Code formatting cleanup git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@63753 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9a667bbd2a
commit
f5194a6e0b
@ -2,9 +2,10 @@
|
|||||||
/**
|
/**
|
||||||
* Reports section of the CMS.
|
* Reports section of the CMS.
|
||||||
*
|
*
|
||||||
* @TODO If reports need to subclass Report in order
|
* All reports that should show in the ReportAdmin section
|
||||||
* to show, then why don't we have an abstract Report
|
* of the CMS need to subclass Report.
|
||||||
* class around?'
|
*
|
||||||
|
* @see Report
|
||||||
*
|
*
|
||||||
* @package cms
|
* @package cms
|
||||||
* @subpackage reports
|
* @subpackage reports
|
||||||
@ -16,44 +17,18 @@ class ReportAdmin extends LeftAndMain {
|
|||||||
public function init() {
|
public function init() {
|
||||||
parent::init();
|
parent::init();
|
||||||
|
|
||||||
// @TODO determine what is not necessary to include here
|
Requirements::javascript(CMS_DIR . '/javascript/ReportAdmin_left.js');
|
||||||
Requirements::javascript(MCE_ROOT . "tiny_mce_src.js");
|
Requirements::javascript(CMS_DIR . '/javascript/ReportAdmin_right.js');
|
||||||
Requirements::javascript(THIRDPARTY_DIR . "/tiny_mce_improvements.js");
|
|
||||||
|
Requirements::css(CMS_DIR . '/css/ReportAdmin.css');
|
||||||
|
|
||||||
Requirements::javascript(THIRDPARTY_DIR . "/hover.js");
|
// We don't want this showing up in every ajax-response, it should
|
||||||
Requirements::javascript(THIRDPARTY_DIR . "/scriptaculous/controls.js");
|
// always be present in a CMS environment
|
||||||
|
|
||||||
Requirements::javascript(CMS_DIR . "/javascript/SecurityAdmin.js");
|
|
||||||
|
|
||||||
Requirements::javascript(CMS_DIR . "/javascript/LeftAndMain_left.js");
|
|
||||||
Requirements::javascript(CMS_DIR . "/javascript/LeftAndMain_right.js");
|
|
||||||
Requirements::javascript(CMS_DIR . "/javascript/CMSMain_left.js");
|
|
||||||
|
|
||||||
Requirements::javascript(CMS_DIR . "/javascript/ReportAdmin_left.js");
|
|
||||||
Requirements::javascript(CMS_DIR . "/javascript/ReportAdmin_right.js");
|
|
||||||
|
|
||||||
Requirements::css(CMS_DIR . "/css/ReportAdmin.css");
|
|
||||||
|
|
||||||
// TODO Find a better solution to integrate optional Requirements in a specific order
|
|
||||||
if(Director::fileExists("ecommerce/css/DataReportCMSMain.css")) {
|
|
||||||
Requirements::css("ecommerce/css/DataReportCMSMain.css");
|
|
||||||
}
|
|
||||||
if(Director::fileExists("ecommerce/css/DataReportCMSMain.css")) {
|
|
||||||
Requirements::javascript("ecommerce/javascript/DataReport.js");
|
|
||||||
}
|
|
||||||
if(Director::fileExists(project() . "/css/DataReportCMSMain.css")) {
|
|
||||||
Requirements::css(project() . "/css/DataReportCMSMain.css");
|
|
||||||
}
|
|
||||||
if(Director::fileExists(project() . "/css/DataReportCMSMain.css")) {
|
|
||||||
Requirements::javascript(project() . "/javascript/DataReport.js");
|
|
||||||
}
|
|
||||||
|
|
||||||
// We don't want this showing up in every ajax-response, it should always be present in a CMS-environment
|
|
||||||
if(!Director::is_ajax()) {
|
if(!Director::is_ajax()) {
|
||||||
Requirements::javascriptTemplate("cms/javascript/tinymce.template.js", array(
|
Requirements::javascriptTemplate(CMS_DIR . '/javascript/tinymce.template.js', array(
|
||||||
"ContentCSS" => project() . "/css/editor.css",
|
'ContentCSS' => project() . '/css/editor.css',
|
||||||
"BaseURL" => Director::absoluteBaseURL(),
|
'BaseURL' => Director::absoluteBaseURL(),
|
||||||
"Lang" => i18n::get_tinymce_lang()
|
'Lang' => i18n::get_tinymce_lang()
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,9 +88,9 @@ class ReportAdmin extends LeftAndMain {
|
|||||||
))->renderWith($this->getTemplatesWithSuffix('_right'));
|
))->renderWith($this->getTemplatesWithSuffix('_right'));
|
||||||
|
|
||||||
return $this->getLastFormIn($result);
|
return $this->getLastFormIn($result);
|
||||||
} else {
|
|
||||||
return array();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user