From 5f59b3a3c957a52444d854b0ffac2bb230df9de7 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 23 Mar 2011 23:07:31 +1300 Subject: [PATCH] MINOR Fixed paths due to file moving into sapphire/admin --- admin/code/CMSBatchAction.php | 2 +- admin/code/LeftAndMain.php | 48 +++++++++++++++------------------ admin/code/MemberImportForm.php | 2 +- admin/code/MemberTableField.php | 10 +++---- admin/code/ModelAdmin.php | 8 +++--- admin/code/SecurityAdmin.php | 21 +++++++-------- admin/css/cms_right.css | 2 +- admin/css/layout.css | 7 +---- admin/templates/LeftAndMain.ss | 2 +- core/Core.php | 4 +++ dev/DebugView.php | 2 +- 11 files changed, 51 insertions(+), 57 deletions(-) diff --git a/admin/code/CMSBatchAction.php b/admin/code/CMSBatchAction.php index 990e73557..39c7afdc0 100644 --- a/admin/code/CMSBatchAction.php +++ b/admin/code/CMSBatchAction.php @@ -2,7 +2,7 @@ /** * A class representing back actions. - * See cms/javascript/CMSMain.BatchActions.js on how to add custom javascript + * See CMSMain.BatchActions.js on how to add custom javascript * functionality. * * diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 31d056452..438649ac6 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -174,7 +174,7 @@ class LeftAndMain extends Controller { $htmlEditorConfig = HtmlEditorConfig::get_active(); $htmlEditorConfig->setOption('language', i18n::get_tinymce_lang()); if(!$htmlEditorConfig->getOption('content_css')) { - $cssFiles = 'cms/css/editor.css'; + $cssFiles = 'sapphire/admin/css/editor.css'; // Use theme from the site config if(($config = SiteConfig::current_site_config()) && $config->Theme) { @@ -192,10 +192,10 @@ class LeftAndMain extends Controller { } - 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'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/typography.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/layout.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/cms_left.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/cms_right.css'); Requirements::css(SAPPHIRE_DIR . '/css/Form.css'); if(isset($_REQUEST['debug_firebug'])) { @@ -214,13 +214,13 @@ class LeftAndMain extends Controller { Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/jquery-ui.js'); //import all of jquery ui - Requirements::javascript(CMS_DIR . '/thirdparty/jquery-layout/jquery.layout.js'); - Requirements::javascript(CMS_DIR . '/thirdparty/jquery-layout/jquery.layout.state.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-layout/jquery.layout.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-layout/jquery.layout.state.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/json-js/json2.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-metadata/jquery.metadata.js'); - Requirements::javascript(CMS_DIR . '/javascript/jquery-fitheighttoparent/jquery.fitheighttoparent.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/jquery-fitheighttoparent/jquery.fitheighttoparent.js'); - Requirements::javascript(CMS_DIR . '/javascript/ssui.core.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/ssui.core.js'); // @todo Load separately so the CSS files can be inlined Requirements::css(SAPPHIRE_DIR . '/thirdparty/jquery-ui-themes/smoothness/jquery.ui.all.css'); @@ -232,11 +232,11 @@ class LeftAndMain extends Controller { Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/behaviour/behaviour.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-cookie/jquery.cookie.js'); - Requirements::javascript(CMS_DIR . '/thirdparty/jquery-notice/jquery.notice.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-notice/jquery.notice.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/jquery-ondemand/jquery.ondemand.js'); - Requirements::javascript(CMS_DIR . '/javascript/jquery-changetracker/lib/jquery.changetracker.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/jquery-changetracker/lib/jquery.changetracker.js'); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); - Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang'); + Requirements::add_i18n_javascript(SAPPHIRE_ADMIN_DIR . '/javascript/lang'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/scriptaculous/effects.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/scriptaculous/dragdrop.js'); @@ -247,15 +247,11 @@ class LeftAndMain extends Controller { Requirements::javascript(THIRDPARTY_DIR . '/jstree/jquery.jstree.js'); Requirements::css(THIRDPARTY_DIR . '/jstree/themes/apple/style.css'); - Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain.js'); - Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain.Tree.js'); - Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain.EditForm.js'); - Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain.AddForm.js'); - Requirements::javascript(CMS_DIR . '/javascript/LeftAndMain.BatchActions.js'); - - // navigator - Requirements::css(CMS_DIR . '/css/SilverStripeNavigator.css'); - Requirements::javascript(CMS_DIR . '/javascript/SilverStripeNavigator.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.Tree.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.EditForm.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.AddForm.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/LeftAndMain.BatchActions.js'); Requirements::themedCSS('typography'); @@ -271,7 +267,7 @@ class LeftAndMain extends Controller { Requirements::themedCSS($file[0], $file[1]); } - Requirements::css(CMS_DIR . '/css/unjquery.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/unjquery.css'); // Javascript combined files Requirements::combine_files( @@ -295,7 +291,7 @@ class LeftAndMain extends Controller { 'sapphire/thirdparty/scriptaculous/effects.js', 'sapphire/thirdparty/scriptaculous/dragdrop.js', 'sapphire/thirdparty/scriptaculous/controls.js', - 'cms/javascript/LeftAndMain.js', + 'sapphire/admin/javascript/LeftAndMain.js', 'sapphire/javascript/tree/tree.js', 'sapphire/javascript/TreeDropdownField.js', 'cms/javascript/ThumbnailStripField.js', @@ -971,7 +967,7 @@ class LeftAndMain extends Controller { $form->setActions(null); Requirements::clear(); - Requirements::css(CMS_DIR . '/css/LeftAndMain_printable.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/LeftAndMain_printable.css'); return array( "PrintForm" => $form ); @@ -1161,7 +1157,7 @@ class LeftAndMain extends Controller { * * @var unknown_type */ - static $application_logo = 'cms/images/mainmenu/logo.gif'; + static $application_logo = 'sapphire/admin/images/mainmenu/logo.gif'; /** * The application logo style. Customisable by calling @@ -1189,7 +1185,7 @@ class LeftAndMain extends Controller { * If the given image's height is significantly larger or smaller, adjust the loading animation's top offset in * positionLoadingSpinner() in LeftAndMain.js */ - protected static $loading_image = 'cms/images/logo.gif'; + protected static $loading_image = 'sapphire/admin/images/logo.gif'; /** * Set the image shown when the CMS is loading. diff --git a/admin/code/MemberImportForm.php b/admin/code/MemberImportForm.php index a2423ef64..af288852b 100644 --- a/admin/code/MemberImportForm.php +++ b/admin/code/MemberImportForm.php @@ -57,7 +57,7 @@ class MemberImportForm extends Form { parent::__construct($controller, $name, $fields, $actions, $validator); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(CMS_DIR . '/javascript/MemberImportForm.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberImportForm.js'); $this->addExtraClass('import-form'); } diff --git a/admin/code/MemberTableField.php b/admin/code/MemberTableField.php index 806d18dae..c517c2642 100755 --- a/admin/code/MemberTableField.php +++ b/admin/code/MemberTableField.php @@ -121,8 +121,8 @@ class MemberTableField extends ComplexTableField { $ret = parent::FieldHolder(); Requirements::javascript(SAPPHIRE_DIR . "/thirdparty/scriptaculous/controls.js"); - Requirements::javascript(CMS_DIR . '/javascript/MemberTableField.js'); - Requirements::javascript(CMS_DIR . "/javascript/MemberTableField_popup.js"); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberTableField.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . "/javascript/MemberTableField_popup.js"); return $ret; } @@ -470,9 +470,9 @@ class MemberTableField_Popup extends ComplexTableField_Popup { function forTemplate() { $ret = parent::forTemplate(); - Requirements::css(CMS_DIR . '/css/SecurityAdmin.css'); - Requirements::javascript(CMS_DIR . '/javascript/MemberTableField.js'); - Requirements::javascript(CMS_DIR . '/javascript/MemberTableField_popup.js'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/SecurityAdmin.css'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberTableField.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberTableField_popup.js'); return $ret; } diff --git a/admin/code/ModelAdmin.php b/admin/code/ModelAdmin.php index 5127242fe..891d8dfc7 100755 --- a/admin/code/ModelAdmin.php +++ b/admin/code/ModelAdmin.php @@ -147,15 +147,15 @@ abstract class ModelAdmin extends LeftAndMain { //user_error('ModelAdmin::init(): Invalid Model class', E_USER_ERROR); } - 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::css(SAPPHIRE_ADMIN_DIR . '/css/ModelAdmin.css'); // standard layout formatting for management UI + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/silverstripe.tabs.css'); // follows the jQuery UI theme conventions Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-livequery/jquery.livequery.js'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-ui/jquery-ui.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/jquery/jquery_improvements.js'); - Requirements::javascript(CMS_DIR . '/javascript/ModelAdmin.js'); - Requirements::javascript(CMS_DIR . '/javascript/ModelAdmin.History.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/ModelAdmin.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/ModelAdmin.History.js'); } /** diff --git a/admin/code/SecurityAdmin.php b/admin/code/SecurityAdmin.php index 1fb22838c..d2d4968d1 100644 --- a/admin/code/SecurityAdmin.php +++ b/admin/code/SecurityAdmin.php @@ -36,7 +36,6 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { public function init() { parent::init(); - Requirements::javascript(CMS_DIR . '/javascript/hover.js'); Requirements::javascript(THIRDPARTY_DIR . "/scriptaculous/controls.js"); Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js'); @@ -45,12 +44,12 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { 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::javascript(SAPPHIRE_ADMIN_DIR . "/javascript/MemberTableField.js"); Requirements::css(THIRDPARTY_DIR . "/greybox/greybox.css"); Requirements::css(SAPPHIRE_DIR . "/css/ComplexTableField.css"); - Requirements::javascript(CMS_DIR . '/javascript/SecurityAdmin_left.js'); - Requirements::javascript(CMS_DIR . '/javascript/SecurityAdmin_right.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/SecurityAdmin_left.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/SecurityAdmin_right.js'); Requirements::javascript(THIRDPARTY_DIR . "/greybox/AmiJS.js"); Requirements::javascript(THIRDPARTY_DIR . "/greybox/greybox.js"); @@ -193,13 +192,13 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { Requirements::clear(); Requirements::css(SAPPHIRE_DIR . '/css/Form.css'); Requirements::css(CMS_DIR . '/css/typography.css'); - Requirements::css(CMS_DIR . '/css/cms_right.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/cms_right.css'); Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/jquery_improvements.js'); - Requirements::css(CMS_DIR . '/css/MemberImportForm.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/MemberImportForm.css'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(CMS_DIR . '/javascript/MemberImportForm.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberImportForm.js'); return $this->renderWith('BlankPage', array( 'Form' => $this->MemberImportForm() @@ -225,14 +224,14 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { public function groupimport() { Requirements::clear(); Requirements::css(SAPPHIRE_DIR . '/css/Form.css'); - Requirements::css(CMS_DIR . '/css/typography.css'); - Requirements::css(CMS_DIR . '/css/cms_right.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/typography.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/cms_right.css'); Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js'); Requirements::javascript(THIRDPARTY_DIR . '/jquery-livequery/jquery.livequery.js'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/jquery_improvements.js'); - Requirements::css(CMS_DIR . '/css/MemberImportForm.css'); + Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/MemberImportForm.css'); Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); - Requirements::javascript(CMS_DIR . '/javascript/MemberImportForm.js'); + Requirements::javascript(SAPPHIRE_ADMIN_DIR . '/javascript/MemberImportForm.js'); return $this->renderWith('BlankPage', array( 'Form' => $this->GroupImportForm() diff --git a/admin/css/cms_right.css b/admin/css/cms_right.css index e6e6b902e..64433c801 100644 --- a/admin/css/cms_right.css +++ b/admin/css/cms_right.css @@ -585,6 +585,6 @@ } #UploadFormResponse.loading .loading#UploadFormResponse { - background: url(../../cms/images/network-save.gif) no-repeat left center; + background: url(../images/network-save.gif) no-repeat left center; padding-left: 20px; } \ No newline at end of file diff --git a/admin/css/layout.css b/admin/css/layout.css index 29692bede..79e6e24bd 100644 --- a/admin/css/layout.css +++ b/admin/css/layout.css @@ -531,11 +531,6 @@ li.spacer { margin-right: 4px; } -/* CMS specific icons for the tree */ -ul.tree li.Root span.Root span.c a { - background: url(../../cms/images/treeicons/root.png) no-repeat !important; -} - /* Misc Styling */ iframe { border: none; @@ -659,7 +654,7 @@ iframe { display: block; width: 20px; height: 20px; - background: transparent url(../../cms/images/arrow_refresh.gif) no-repeat; + background: transparent url(../../../cms/images/arrow_refresh.gif) no-repeat; } #Form_EditorToolbarLinkForm select.hasRefreshButton { diff --git a/admin/templates/LeftAndMain.ss b/admin/templates/LeftAndMain.ss index 19b807088..59f646a98 100644 --- a/admin/templates/LeftAndMain.ss +++ b/admin/templates/LeftAndMain.ss @@ -10,7 +10,7 @@
diff --git a/core/Core.php b/core/Core.php index a9a523547..f9934b011 100644 --- a/core/Core.php +++ b/core/Core.php @@ -24,6 +24,8 @@ * - CMS_PATH: Absolute filepath, e.g. "/var/www/my-webroot/cms" * - SAPPHIRE_DIR: Path relative to webroot, e.g. "sapphire" * - SAPPHIRE_PATH:Absolute filepath, e.g. "/var/www/my-webroot/sapphire" + * - SAPPHIRE_ADMIN_DIR: + * - SAPPHIRE_ADMIN_PATH: * - THIRDPARTY_DIR: Path relative to webroot, e.g. "sapphire/thirdparty" * - THIRDPARTY_PATH: Absolute filepath, e.g. "/var/www/my-webroot/sapphire/thirdparty" * @@ -165,6 +167,8 @@ define('THEMES_DIR', 'themes'); define('THEMES_PATH', BASE_PATH . '/' . THEMES_DIR); define('SAPPHIRE_DIR', 'sapphire'); define('SAPPHIRE_PATH', BASE_PATH . '/' . SAPPHIRE_DIR); +define('SAPPHIRE_ADMIN_DIR', 'sapphire/admin'); +define('SAPPHIRE_ADMIN_PATH', BASE_PATH . '/' . SAPPHIRE_ADMIN_DIR); define('CMS_DIR', 'cms'); define('CMS_PATH', BASE_PATH . '/' . CMS_DIR); define('THIRDPARTY_DIR', SAPPHIRE_DIR . '/thirdparty'); diff --git a/dev/DebugView.php b/dev/DebugView.php index 40d2b9a5a..76b15e27e 100644 --- a/dev/DebugView.php +++ b/dev/DebugView.php @@ -94,7 +94,7 @@ class DebugView extends Object { echo '.failure span { color:#C80700; font-weight:bold; }'; echo ''; echo ''; - echo '
'; + echo '
'; } /**