mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT Introduced constants for system paths like /sapphire in preparation for a more flexible directory reorganisation. Instead of hardcoding your path, please use the following constants: BASE_PATH, BASE_URL, SAPPHIRE_DIR, SAPPHIRE_PATH, CMS_DIR, CMS_PATH, THIRDPARTY_DIR, THIRDPARTY_PATH, ASSETS_DIR, ASSETS_PATH, THEMES_DIR, THEMES_PATH
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@63175 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9d8b60ac87
commit
a322fbd59f
@ -18,8 +18,8 @@ class CommentAdmin extends LeftAndMain {
|
||||
public function init() {
|
||||
parent::init();
|
||||
|
||||
Requirements::javascript('cms/javascript/CommentAdmin_right.js');
|
||||
Requirements::css('cms/css/CommentAdmin.css');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/CommentAdmin_right.js');
|
||||
Requirements::css(CMS_DIR . 'css/CommentAdmin.css');
|
||||
}
|
||||
|
||||
public function Link($action = null) {
|
||||
|
@ -22,7 +22,7 @@ class CommentTableField extends ComplexTableField {
|
||||
$this->sourceFilter[] = "( `Name` LIKE '%$search%' OR `Comment` LIKE '%$search%')";
|
||||
}
|
||||
|
||||
Requirements::javascript('cms/javascript/CommentTableField.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/CommentTableField.js');
|
||||
}
|
||||
|
||||
function Items() {
|
||||
|
@ -77,17 +77,17 @@ abstract class GenericDataAdmin extends LeftAndMain {
|
||||
parent::init();
|
||||
|
||||
Requirements::javascript(MCE_ROOT . "tiny_mce_src.js");
|
||||
Requirements::javascript("jsparty/tiny_mce_improvements.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/tiny_mce_improvements.js");
|
||||
|
||||
Requirements::javascript("jsparty/hover.js");
|
||||
Requirements::javascript("jsparty/scriptaculous/controls.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/hover.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/scriptaculous/controls.js");
|
||||
|
||||
Requirements::javascript("cms/javascript/SecurityAdmin.js");
|
||||
Requirements::javascript("cms/javascript/CMSMain_left.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/SecurityAdmin.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/CMSMain_left.js");
|
||||
|
||||
Requirements::javascript("cms/javascript/GenericDataAdmin_left.js");
|
||||
Requirements::javascript("cms/javascript/GenericDataAdmin_right.js");
|
||||
Requirements::javascript("cms/javascript/SideTabs.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/GenericDataAdmin_left.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/GenericDataAdmin_right.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/SideTabs.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()) {
|
||||
@ -98,7 +98,7 @@ abstract class GenericDataAdmin extends LeftAndMain {
|
||||
));
|
||||
}
|
||||
|
||||
Requirements::css("cms/css/GenericDataAdmin.css");
|
||||
Requirements::css(CMS_DIR . "/css/GenericDataAdmin.css");
|
||||
|
||||
//For wrightgroup workshop
|
||||
Requirements::css("writework/css/WorkshopCMSLayout.css");
|
||||
|
@ -123,8 +123,8 @@ class MemberTableField extends ComplexTableField {
|
||||
|
||||
parent::__construct($controller, $name, $sourceClass, $fieldList, $detailFormFields);
|
||||
|
||||
Requirements::javascript('cms/javascript/MemberTableField.js');
|
||||
Requirements::javascript("cms/javascript/MemberTableField_popup.js");
|
||||
Requirements::javascript(CMS_DIR . '/javascript/MemberTableField.js');
|
||||
Requirements::javascript(CMS_DIR . "/javascript/MemberTableField_popup.js");
|
||||
|
||||
// construct the filter and sort
|
||||
if(isset($_REQUEST['MemberOrderByField'])) {
|
||||
@ -428,8 +428,8 @@ class MemberTableField_Popup extends ComplexTableField_Popup {
|
||||
function __construct($controller, $name, $fields, $sourceClass, $readonly=false, $validator = null) {
|
||||
parent::__construct($controller, $name, $fields, $sourceClass, $readonly, $validator);
|
||||
|
||||
Requirements::javascript('cms/javascript/MemberTableField.js');
|
||||
Requirements::javascript('cms/javascript/MemberTableField_popup.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/MemberTableField.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/MemberTableField_popup.js');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -102,17 +102,17 @@ abstract class ModelAdmin extends LeftAndMain {
|
||||
//user_error('ModelAdmin::init(): Invalid Model class', E_USER_ERROR);
|
||||
}
|
||||
|
||||
Requirements::css('cms/css/ModelAdmin.css'); // standard layout formatting for management UI
|
||||
Requirements::css('cms/css/silverstripe.tabs.css'); // follows the jQuery UI theme conventions
|
||||
Requirements::css(CMS_DIR . 'css/ModelAdmin.css'); // standard layout formatting for management UI
|
||||
Requirements::css(CMS_DIR . 'css/silverstripe.tabs.css'); // follows the jQuery UI theme conventions
|
||||
|
||||
Requirements::javascript('jsparty/jquery/jquery.js');
|
||||
Requirements::javascript('jsparty/jquery/plugins/livequery/jquery.livequery.js');
|
||||
Requirements::javascript('jsparty/jquery/ui/ui.core.js');
|
||||
Requirements::javascript('jsparty/jquery/ui/ui.tabs.js');
|
||||
Requirements::javascript('jsparty/jquery/plugins/form/jquery.form.js');
|
||||
Requirements::javascript('jsparty/jquery/plugins/effen/jquery.fn.js');
|
||||
Requirements::javascript('jsparty/jquery/jquery_improvements.js');
|
||||
Requirements::javascript('cms/javascript/ModelAdmin.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/jquery/jquery.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/jquery/plugins/livequery/jquery.livequery.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/jquery/ui/ui.core.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/jquery/ui/ui.tabs.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/jquery/plugins/form/jquery.form.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/jquery/plugins/effen/jquery.fn.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/jquery/jquery_improvements.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ModelAdmin.js');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -161,8 +161,8 @@ class UserDefinedForm extends Page {
|
||||
class UserDefinedForm_Controller extends Page_Controller {
|
||||
|
||||
function init() {
|
||||
Requirements::javascript('jsparty/prototype-safe.js');
|
||||
Requirements::javascript('jsparty/behaviour.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/prototype-safe.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/behaviour.js');
|
||||
|
||||
parent::init();
|
||||
}
|
||||
|
@ -13,22 +13,22 @@ class ReportAdmin extends LeftAndMain {
|
||||
parent::init();
|
||||
|
||||
Requirements::javascript(MCE_ROOT . "tiny_mce_src.js");
|
||||
Requirements::javascript("jsparty/tiny_mce_improvements.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/tiny_mce_improvements.js");
|
||||
|
||||
Requirements::javascript("jsparty/hover.js");
|
||||
Requirements::javascript("jsparty/scriptaculous/controls.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/hover.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/scriptaculous/controls.js");
|
||||
|
||||
Requirements::javascript("cms/javascript/SecurityAdmin.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/SecurityAdmin.js");
|
||||
|
||||
Requirements::javascript("cms/javascript/LeftAndMain_left.js");
|
||||
Requirements::javascript("cms/javascript/LeftAndMain_right.js");
|
||||
Requirements::javascript("cms/javascript/CMSMain_left.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/javascript/ReportAdmin_left.js");
|
||||
Requirements::javascript("cms/javascript/ReportAdmin_right.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/ReportAdmin_left.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/ReportAdmin_right.js");
|
||||
|
||||
Requirements::css("cms/css/ReportAdmin.css");
|
||||
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")) {
|
||||
|
@ -22,7 +22,7 @@ class ThumbnailStripField extends FormField {
|
||||
}
|
||||
|
||||
function FieldHolder() {
|
||||
Requirements::javascript('cms/javascript/ThumbnailStripField.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ThumbnailStripField.js');
|
||||
return $this->renderWith('ThumbnailStripField');
|
||||
}
|
||||
|
||||
|
@ -100,10 +100,10 @@ class PageCommentInterface extends RequestHandlingData {
|
||||
}
|
||||
|
||||
function PostCommentForm() {
|
||||
Requirements::javascript('jsparty/behaviour.js');
|
||||
Requirements::javascript('jsparty/prototype.js');
|
||||
Requirements::javascript('jsparty/scriptaculous/effects.js');
|
||||
Requirements::javascript('cms/javascript/PageCommentInterface.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/behaviour.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/prototype.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/scriptaculous/effects.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/PageCommentInterface.js');
|
||||
|
||||
|
||||
$fields = new FieldSet(
|
||||
|
Loading…
Reference in New Issue
Block a user