mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +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@63154 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
4044898bb1
commit
9d8b60ac87
@ -66,23 +66,23 @@ class AssetAdmin extends LeftAndMain {
|
||||
function init() {
|
||||
parent::init();
|
||||
|
||||
if(!file_exists('../assets')) {
|
||||
mkdir('../assets');
|
||||
if(!file_exists(ASSETS_PATH)) {
|
||||
mkdir(ASSETS_PATH);
|
||||
}
|
||||
|
||||
// needed for MemberTableField (Requirements not determined before Ajax-Call)
|
||||
Requirements::javascript("sapphire/javascript/ComplexTableField.js");
|
||||
Requirements::css("jsparty/greybox/greybox.css");
|
||||
Requirements::css("sapphire/css/ComplexTableField.css");
|
||||
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField.js");
|
||||
Requirements::css(THIRDPARTY_DIR . "/greybox/greybox.css");
|
||||
Requirements::css(SAPPHIRE_DIR . "/css/ComplexTableField.css");
|
||||
|
||||
Requirements::javascript("cms/javascript/AssetAdmin.js");
|
||||
Requirements::javascript("cms/javascript/AssetAdmin_left.js");
|
||||
Requirements::javascript("cms/javascript/AssetAdmin_right.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/AssetAdmin.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/AssetAdmin_left.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/AssetAdmin_right.js");
|
||||
|
||||
Requirements::javascript("cms/javascript/CMSMain_upload.js");
|
||||
Requirements::javascript("cms/javascript/Upload.js");
|
||||
Requirements::javascript("sapphire/javascript/Security_login.js");
|
||||
Requirements::javascript("jsparty/SWFUpload/SWFUpload.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/CMSMain_upload.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/Upload.js");
|
||||
Requirements::javascript(SAPPHIRE_DIR . "/javascript/Security_login.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/SWFUpload/SWFUpload.js");
|
||||
|
||||
// Include the right JS]
|
||||
// Hayden: This didn't appear to be used at all
|
||||
@ -90,11 +90,11 @@ class AssetAdmin extends LeftAndMain {
|
||||
$fileList->setClick_AjaxLoad('admin/assets/getfile/', 'Form_SubForm');
|
||||
$fileList->FieldHolder();*/
|
||||
|
||||
Requirements::javascript("jsparty/greybox/AmiJS.js");
|
||||
Requirements::javascript("jsparty/greybox/greybox.js");
|
||||
Requirements::css("jsparty/greybox/greybox.css");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/greybox/AmiJS.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/greybox/greybox.js");
|
||||
Requirements::css(THIRDPARTY_DIR . "/greybox/greybox.css");
|
||||
|
||||
Requirements::css("cms/css/AssetAdmin.css");
|
||||
Requirements::css(CMS_DIR . "/css/AssetAdmin.css");
|
||||
}
|
||||
|
||||
|
||||
@ -109,18 +109,18 @@ class AssetAdmin extends LeftAndMain {
|
||||
function uploadiframe() {
|
||||
Requirements::clear();
|
||||
|
||||
Requirements::javascript("jsparty/prototype.js");
|
||||
Requirements::javascript("jsparty/loader.js");
|
||||
Requirements::javascript("jsparty/behaviour.js");
|
||||
Requirements::javascript("jsparty/prototype_improvements.js");
|
||||
Requirements::javascript("jsparty/layout_helpers.js");
|
||||
Requirements::javascript("cms/javascript/LeftAndMain.js");
|
||||
Requirements::javascript("jsparty/multifile/multifile.js");
|
||||
Requirements::css("jsparty/multifile/multifile.css");
|
||||
Requirements::css("cms/css/typography.css");
|
||||
Requirements::css("cms/css/layout.css");
|
||||
Requirements::css("cms/css/cms_left.css");
|
||||
Requirements::css("cms/css/cms_right.css");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/prototype.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/loader.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/prototype_improvements.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/layout_helpers.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/LeftAndMain.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/multifile/multifile.js");
|
||||
Requirements::css(THIRDPARTY_DIR . "/multifile/multifile.css");
|
||||
Requirements::css(CMS_DIR . "/css/typography.css");
|
||||
Requirements::css(CMS_DIR . "/css/layout.css");
|
||||
Requirements::css(CMS_DIR . "/css/cms_left.css");
|
||||
Requirements::css(CMS_DIR . "/css/cms_right.css");
|
||||
|
||||
if(isset($data['ID']) && $data['ID'] != 'root') $folder = DataObject::get_by_id("Folder", $data['ID']);
|
||||
else $folder = singleton('Folder');
|
||||
@ -506,7 +506,7 @@ JS;
|
||||
|
||||
// Get the folder to be created
|
||||
if(isset($parentObj->ID)) $filename = $parentObj->FullPath . $p->Name;
|
||||
else $filename = '../assets/' . $p->Name;
|
||||
else $filename = ASSETS_PATH . '/' . $p->Name;
|
||||
|
||||
// Ensure uniqueness
|
||||
$i = 2;
|
||||
@ -518,8 +518,8 @@ JS;
|
||||
}
|
||||
|
||||
// Actually create
|
||||
if(!file_exists('../assets')) {
|
||||
mkdir('../assets');
|
||||
if(!file_exists(ASSETS_PATH)) {
|
||||
mkdir(ASSETS_PATH);
|
||||
}
|
||||
mkdir($filename);
|
||||
chmod($filename, Filesystem::$file_create_mask);
|
||||
@ -700,7 +700,7 @@ JS;
|
||||
|
||||
public function deleteUnusedThumbnails() {
|
||||
foreach($this->getUnusedThumbnailsArray() as $file) {
|
||||
unlink("../assets/" . $file);
|
||||
unlink(ASSETS_PATH . "/" . $file);
|
||||
}
|
||||
echo "statusMessage('"._t('AssetAdmin.THUMBSDELETED', 'All unused thumbnails have been deleted')."','good')";
|
||||
}
|
||||
@ -717,7 +717,7 @@ JS;
|
||||
|
||||
private function getUnusedThumbnailsArray() {
|
||||
$allThumbnails = array();
|
||||
$dirIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('../assets'));
|
||||
$dirIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(ASSETS_PATH));
|
||||
foreach ($dirIterator as $file) {
|
||||
if($file->isFile()) {
|
||||
if(strpos($file->getPathname(),"_resampled") !== false) {
|
||||
|
@ -72,18 +72,18 @@ 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::javascriptTemplate("cms/javascript/tinymce.template.js", array(
|
||||
"ContentCSS" => (SSViewer::current_theme() ? "themes/" . SSViewer::current_theme() : project()) . "/css/editor.css",
|
||||
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(),
|
||||
"Lang" => i18n::get_tinymce_lang()
|
||||
));
|
||||
}
|
||||
|
||||
Requirements::javascript('cms/javascript/CMSMain.js');
|
||||
Requirements::javascript('cms/javascript/CMSMain_left.js');
|
||||
Requirements::javascript('cms/javascript/CMSMain_right.js');
|
||||
Requirements::javascript('sapphire/javascript/UpdateURL.js');
|
||||
Requirements::javascript('jsparty/tabstrip/tabstrip.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain_left.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/CMSMain_right.js');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/UpdateURL.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/tabstrip/tabstrip.js');
|
||||
|
||||
/**
|
||||
* HACK ALERT: Project-specific requirements
|
||||
@ -97,7 +97,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
Requirements::javascript("parents/javascript/NotifyMembers.js");
|
||||
Requirements::css("tourism/css/SurveyCMSMain.css");
|
||||
Requirements::javascript("tourism/javascript/QuotasReport.js");
|
||||
Requirements::javascript("sapphire/javascript/ReportField.js");
|
||||
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ReportField.js");
|
||||
Requirements::javascript("ptraining/javascript/BookingList.js");
|
||||
Requirements::javascript("forum/javascript/ForumAccess.js");
|
||||
Requirements::javascript('gallery/javascript/GalleryPage_CMS.js');
|
||||
@ -950,11 +950,11 @@ HTML;
|
||||
|
||||
function canceldraftchangesdialog() {
|
||||
Requirements::clear();
|
||||
Requirements::css('cms/css/dialog.css');
|
||||
Requirements::javascript('jsparty/prototype.js');
|
||||
Requirements::javascript('jsparty/behaviour.js');
|
||||
Requirements::javascript('jsparty/prototype_improvements.js');
|
||||
Requirements::javascript('cms/javascript/dialog.js');
|
||||
Requirements::css(CMS_DIR . 'css/dialog.css');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/prototype.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/behaviour.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/prototype_improvements.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/dialog.js');
|
||||
|
||||
$message = _t('CMSMain.COPYPUBTOSTAGE',"Do you really want to copy the published content to the stage site?");
|
||||
$buttons = "<button name=\"OK\">" . _t('CMSMain.OK','OK') ."</button><button name=\"Cancel\">" . _t('CMSMain.CANCEL',"Cancel") . "</button>";
|
||||
|
@ -18,25 +18,25 @@ class ImageEditor extends Controller {
|
||||
*/
|
||||
public function index() {
|
||||
Requirements::clear();
|
||||
Requirements::javascript('jsparty/prototype.js');
|
||||
Requirements::javascript('jsparty/scriptaculous/scriptaculous.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/Utils.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/ImageHistory.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/Image.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/ImageTransformation.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/Resizeable.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/Effects.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/Environment.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/Crop.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/Resize.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/ImageBox.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/ImageEditor.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/DocumentBody.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/prototype.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/scriptaculous/scriptaculous.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/Utils.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/ImageHistory.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/Image.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/ImageTransformation.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/Resizeable.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/Effects.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/Environment.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/Crop.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/Resize.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/ImageBox.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/ImageEditor.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/DocumentBody.js');
|
||||
|
||||
Requirements::javascript('jsparty/loader.js');
|
||||
Requirements::javascript('jsparty/behaviour.js');
|
||||
Requirements::javascript('cms/javascript/LeftAndMain.js');
|
||||
Requirements::css('cms/css/ImageEditor/ImageEditor.css');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/loader.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . 'jsparty/behaviour.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain.js');
|
||||
Requirements::css(CMS_DIR . 'css/ImageEditor/ImageEditor.css');
|
||||
|
||||
if(!isset($this->requestParams['fileToEdit'])) $this->raiseError();
|
||||
$fileWithPath = $this->requestParams['fileToEdit'];
|
||||
@ -81,8 +81,8 @@ class ImageEditor extends Controller {
|
||||
break;
|
||||
}
|
||||
$rand = md5(rand(1,100000));
|
||||
$gd->writeTo('../assets/_tmp/' . $rand . '.' . $fileInfo['extension']);
|
||||
return $this->getImageInfoInJSON($gd,'assets/_tmp/' . $rand . '.' . $fileInfo['extension']);
|
||||
$gd->writeTo(ASSETS_PATH . '/_tmp/' . $rand . '.' . $fileInfo['extension']);
|
||||
return $this->getImageInfoInJSON($gd,ASSETS_PATH . '/_tmp/' . $rand . '.' . $fileInfo['extension']);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -128,7 +128,7 @@ class ImageEditor extends Controller {
|
||||
*/
|
||||
|
||||
public function close() {
|
||||
$tmpDir = '../assets/_tmp';
|
||||
$tmpDir = ASSETS_PATH . '/_tmp';
|
||||
if(file_exists($tmpDir)) {
|
||||
Filesystem::removeFolder($tmpDir);
|
||||
mkdir($tmpDir, Filesystem::$folder_create_mask);
|
||||
|
@ -104,109 +104,109 @@ class LeftAndMain extends Controller {
|
||||
// Audit logging hook
|
||||
if(empty($_REQUEST['executeForm']) && !Director::is_ajax()) $this->extend('accessedCMS');
|
||||
|
||||
Requirements::css('cms/css/typography.css');
|
||||
Requirements::css('cms/css/layout.css');
|
||||
Requirements::css('cms/css/cms_left.css');
|
||||
Requirements::css('cms/css/cms_right.css');
|
||||
Requirements::css(CMS_DIR . '/css/typography.css');
|
||||
Requirements::css(CMS_DIR . '/css/layout.css');
|
||||
Requirements::css(CMS_DIR . '/css/cms_left.css');
|
||||
Requirements::css(CMS_DIR . '/css/cms_right.css');
|
||||
|
||||
if(isset($_REQUEST['debug_firebug'])) {
|
||||
// Firebug is a useful console for debugging javascript
|
||||
// Its available as a Firefox extension or a javascript library
|
||||
// for easy inclusion in other browsers (just append ?debug_firebug=1 to the URL)
|
||||
Requirements::javascript('jsparty/firebug/firebug-lite-compressed.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/firebug/firebug-lite-compressed.js');
|
||||
} else {
|
||||
// By default, we include fake-objects for all firebug calls
|
||||
// to avoid javascript errors when referencing console.log() etc in javascript code
|
||||
Requirements::javascript('jsparty/firebug/firebugx.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/firebug/firebugx.js');
|
||||
}
|
||||
|
||||
Requirements::javascript('jsparty/prototype.js');
|
||||
Requirements::javascript('jsparty/behaviour.js');
|
||||
Requirements::javascript('jsparty/prototype_improvements.js');
|
||||
Requirements::javascript('jsparty/loader.js');
|
||||
Requirements::javascript('jsparty/hover.js');
|
||||
Requirements::javascript('jsparty/layout_helpers.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/prototype.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/behaviour.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/prototype_improvements.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/loader.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/hover.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/layout_helpers.js');
|
||||
|
||||
Requirements::javascript(MCE_ROOT . 'tiny_mce_src.js');
|
||||
Requirements::javascript('cms/javascript/ImageEditor/Activator.js');
|
||||
Requirements::javascript('jsparty/tiny_mce_improvements.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ImageEditor/Activator.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/tiny_mce_improvements.js');
|
||||
|
||||
Requirements::javascript('jsparty/scriptaculous/effects.js');
|
||||
Requirements::javascript('jsparty/scriptaculous/dragdrop.js');
|
||||
Requirements::javascript('jsparty/scriptaculous/controls.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/effects.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/dragdrop.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/controls.js');
|
||||
|
||||
Requirements::css('jsparty/greybox/greybox.css');
|
||||
Requirements::javascript('jsparty/greybox/AmiJS.js');
|
||||
Requirements::javascript('jsparty/greybox/greybox.js');
|
||||
Requirements::css(THIRDPARTY_DIR . '/greybox/greybox.css');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/greybox/AmiJS.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/greybox/greybox.js');
|
||||
|
||||
Requirements::javascript('jsparty/tree/tree.js');
|
||||
Requirements::css('jsparty/tree/tree.css');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/tree/tree.js');
|
||||
Requirements::css(THIRDPARTY_DIR . '/tree/tree.css');
|
||||
|
||||
Requirements::javascript('jsparty/tabstrip/tabstrip.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/tabstrip/tabstrip.js');
|
||||
|
||||
Requirements::css('jsparty/tabstrip/tabstrip.css');
|
||||
Requirements::css(THIRDPARTY_DIR . '/tabstrip/tabstrip.css');
|
||||
|
||||
Requirements::css('cms/css/TinyMCEImageEnhancement.css');
|
||||
Requirements::javascript('cms/javascript/TinyMCEImageEnhancement.js');
|
||||
Requirements::css(CMS_DIR . '/css/TinyMCEImageEnhancement.css');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/TinyMCEImageEnhancement.js');
|
||||
|
||||
Requirements::javascript('cms/javascript/LeftAndMain.js');
|
||||
Requirements::javascript('cms/javascript/LeftAndMain_left.js');
|
||||
Requirements::javascript('cms/javascript/LeftAndMain_right.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain_left.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain_right.js');
|
||||
|
||||
Requirements::css('sapphire/css/Form.css');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/Form.css');
|
||||
|
||||
Requirements::javascript('cms/javascript/ForumAdmin.js');
|
||||
Requirements::javascript('cms/javascript/SideTabs.js');
|
||||
Requirements::javascript('cms/javascript/TaskList.js');
|
||||
Requirements::javascript('cms/javascript/CommentList.js');
|
||||
Requirements::javascript('cms/javascript/SideReports.js');
|
||||
Requirements::javascript('cms/javascript/LangSelector.js');
|
||||
Requirements::javascript('cms/javascript/TranslationTab.js');
|
||||
Requirements::javascript('sapphire/javascript/Validator.js');
|
||||
Requirements::javascript('sapphire/javascript/UniqueFields.js');
|
||||
Requirements::javascript('sapphire/javascript/RedirectorPage.js');
|
||||
Requirements::javascript('sapphire/javascript/ToggleCompositeField.js');
|
||||
Requirements::css('sapphire/css/SubmittedFormReportField.css');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/ForumAdmin.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/SideTabs.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/TaskList.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/CommentList.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/SideReports.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/LangSelector.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/TranslationTab.js');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/Validator.js');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/UniqueFields.js');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/RedirectorPage.js');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/ToggleCompositeField.js');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/SubmittedFormReportField.css');
|
||||
|
||||
Requirements::javascript('sapphire/javascript/FieldEditor.js');
|
||||
Requirements::css('sapphire/css/FieldEditor.css');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/FieldEditor.js');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/FieldEditor.css');
|
||||
|
||||
Requirements::css('sapphire/css/TableListField.css');
|
||||
Requirements::css('sapphire/css/ComplexTableField.css');
|
||||
Requirements::javascript('sapphire/javascript/TableListField.js');
|
||||
Requirements::javascript('sapphire/javascript/TableField.js');
|
||||
Requirements::javascript('sapphire/javascript/ComplexTableField.js');
|
||||
Requirements::javascript('sapphire/javascript/RelationComplexTableField.js');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/TableListField.css');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/ComplexTableField.css');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/TableListField.js');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/TableField.js');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/ComplexTableField.js');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/RelationComplexTableField.js');
|
||||
|
||||
Requirements::css('sapphire/css/TreeDropdownField.css');
|
||||
Requirements::css('sapphire/css/CheckboxSetField.css');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/TreeDropdownField.css');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/CheckboxSetField.css');
|
||||
|
||||
Requirements::javascript('jsparty/calendar/calendar.js');
|
||||
Requirements::javascript('jsparty/calendar/lang/calendar-en.js');
|
||||
Requirements::javascript('jsparty/calendar/calendar-setup.js');
|
||||
Requirements::css('sapphire/css/CalendarDateField.css');
|
||||
Requirements::css('jsparty/calendar/calendar-win2k-1.css');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/calendar/calendar.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/calendar/lang/calendar-en.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/calendar/calendar-setup.js');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/CalendarDateField.css');
|
||||
Requirements::css(THIRDPARTY_DIR . '/calendar/calendar-win2k-1.css');
|
||||
|
||||
Requirements::javascript('sapphire/javascript/DropdownTimeField.js');
|
||||
Requirements::css('sapphire/css/DropdownTimeField.css');
|
||||
Requirements::css('sapphire/css/PopupDateTimeField.css');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/DropdownTimeField.js');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/DropdownTimeField.css');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/PopupDateTimeField.css');
|
||||
|
||||
Requirements::javascript('sapphire/javascript/SelectionGroup.js');
|
||||
Requirements::css('sapphire/css/SelectionGroup.css');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/SelectionGroup.js');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/SelectionGroup.css');
|
||||
|
||||
Requirements::javascript('jsparty/SWFUpload/SWFUpload.js');
|
||||
Requirements::javascript('cms/javascript/Upload.js');
|
||||
Requirements::javascript(THIRDPARTY_DIR . '/SWFUpload/SWFUpload.js');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/Upload.js');
|
||||
|
||||
Requirements::javascript('sapphire/javascript/HasManyFileField.js');
|
||||
Requirements::css('sapphire/css/HasManyFileField.css');
|
||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/HasManyFileField.js');
|
||||
Requirements::css(SAPPHIRE_DIR . '/css/HasManyFileField.css');
|
||||
|
||||
Requirements::themedCSS('typography');
|
||||
|
||||
// For Widgets
|
||||
Requirements::css('cms/css/WidgetAreaEditor.css');
|
||||
Requirements::javascript('cms/javascript/WidgetAreaEditor.js');
|
||||
Requirements::css(CMS_DIR . '/css/WidgetAreaEditor.css');
|
||||
Requirements::javascript(CMS_DIR . '/javascript/WidgetAreaEditor.js');
|
||||
|
||||
Requirements::javascript("sapphire/javascript/Security_login.js");
|
||||
Requirements::javascript(SAPPHIRE_DIR . "/javascript/Security_login.js");
|
||||
|
||||
foreach (self::$extra_requirements['javascript'] as $file) {
|
||||
Requirements::javascript($file[0]);
|
||||
@ -765,7 +765,7 @@ JS;
|
||||
$form->actions = null;
|
||||
|
||||
Requirements::clear();
|
||||
Requirements::css('cms/css/LeftAndMain_printable.css');
|
||||
Requirements::css(CMS_DIR . '/css/LeftAndMain_printable.css');
|
||||
return array(
|
||||
"PrintForm" => $form
|
||||
);
|
||||
@ -1114,7 +1114,7 @@ JS;
|
||||
|
||||
/**
|
||||
* Register the given javascript file as required in the CMS.
|
||||
* Filenames should be relative to the base, eg, 'sapphire/javascript/loader.js'
|
||||
* Filenames should be relative to the base, eg, SAPPHIRE_DIR . '/javascript/loader.js'
|
||||
*/
|
||||
public static function require_javascript($file) {
|
||||
self::$extra_requirements['javascript'][] = array($file);
|
||||
@ -1123,7 +1123,7 @@ JS;
|
||||
/**
|
||||
* Register the given stylesheet file as required.
|
||||
*
|
||||
* @param $file String Filenames should be relative to the base, eg, 'jsparty/tree/tree.css'
|
||||
* @param $file String Filenames should be relative to the base, eg, THIRDPARTY_DIR . '/tree/tree.css'
|
||||
* @param $media String Comma-separated list of media-types (e.g. "screen,projector")
|
||||
* @see http://www.w3.org/TR/REC-CSS2/media.html
|
||||
*/
|
||||
|
@ -27,23 +27,23 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
|
||||
parent::init();
|
||||
|
||||
Requirements::javascript("jsparty/hover.js");
|
||||
Requirements::javascript("jsparty/scriptaculous/controls.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/hover.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/scriptaculous/controls.js");
|
||||
|
||||
// needed for MemberTableField (Requirements not determined before Ajax-Call)
|
||||
Requirements::javascript("sapphire/javascript/TableListField.js");
|
||||
Requirements::javascript("sapphire/javascript/TableField.js");
|
||||
Requirements::javascript("sapphire/javascript/ComplexTableField.js");
|
||||
Requirements::javascript("cms/javascript/MemberTableField.js");
|
||||
Requirements::css("jsparty/greybox/greybox.css");
|
||||
Requirements::css("sapphire/css/ComplexTableField.css");
|
||||
Requirements::javascript(SAPPHIRE_DIR . "/javascript/TableListField.js");
|
||||
Requirements::javascript(SAPPHIRE_DIR . "/javascript/TableField.js");
|
||||
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/MemberTableField.js");
|
||||
Requirements::css(THIRDPARTY_DIR . "/greybox/greybox.css");
|
||||
Requirements::css(SAPPHIRE_DIR . "/css/ComplexTableField.css");
|
||||
|
||||
Requirements::javascript("cms/javascript/SecurityAdmin.js");
|
||||
Requirements::javascript("cms/javascript/SecurityAdmin_left.js");
|
||||
Requirements::javascript("cms/javascript/SecurityAdmin_right.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/SecurityAdmin.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/SecurityAdmin_left.js");
|
||||
Requirements::javascript(CMS_DIR . "/javascript/SecurityAdmin_right.js");
|
||||
|
||||
Requirements::javascript("jsparty/greybox/AmiJS.js");
|
||||
Requirements::javascript("jsparty/greybox/greybox.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/greybox/AmiJS.js");
|
||||
Requirements::javascript(THIRDPARTY_DIR . "/greybox/greybox.js");
|
||||
}
|
||||
|
||||
public function getEditForm($id) {
|
||||
|
@ -52,7 +52,7 @@ class StaticExporter extends Controller {
|
||||
if(!project()) $folder .= 'site';
|
||||
if(!file_exists($folder)) mkdir($folder, Filesystem::$folder_create_mask, true);
|
||||
|
||||
$f1 = Director::baseFolder() . '/assets';
|
||||
$f1 = ASSETS_PATH;
|
||||
$f2 = Director::baseFolder() . '/' . project();
|
||||
`cd $folder; ln -s $f1; ln -s $f2`;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user