From 50ed4f515d70a053efb549cae471ac96ca575635 Mon Sep 17 00:00:00 2001 From: Naomi Guyer Date: Mon, 18 Jun 2012 12:13:20 +1200 Subject: [PATCH 01/15] BUGFIX: Show text for collapsed side panel in IE8 and 9 (fixes #7469) Altered IE CSS for CMS-panel to allow the text to display from top to bottom. --- admin/css/ie7.css | 3 +++ admin/css/ie8.css | 4 ++-- admin/scss/_ieShared.scss | 21 ++++++++++++++++++++- admin/scss/ie7.scss | 2 ++ admin/scss/ie8.scss | 9 ++------- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/admin/css/ie7.css b/admin/css/ie7.css index a4bc9e3d9..564a0fd1d 100644 --- a/admin/css/ie7.css +++ b/admin/css/ie7.css @@ -91,3 +91,6 @@ table.ss-gridfield-table tr.ss-gridfield-item.even { background: #F0F4F7; } .cms-content-header h2 { float: left; } .cms-content-header h2 .section-icon { display: none; } .cms-content-header .cms-content-header-tabs { position: absolute; right: 0; } + +.cms-panel-content-collapsed { position: relative; width: 40px; } +.cms-panel-content-collapsed h2.cms-panel-header, .cms-panel-content-collapsed h3.cms-panel-header { zoom: 1; position: absolute; top: 10px; right: 10px; writing-mode: tb-rl; float: right; z-index: 5000; } diff --git a/admin/css/ie8.css b/admin/css/ie8.css index 5787429b3..9208a4fd3 100644 --- a/admin/css/ie8.css +++ b/admin/css/ie8.css @@ -36,8 +36,8 @@ .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.file input.file { margin-left: -132px; } .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.checkbox { padding: 0px; } -.cms-panel .cms-panel-content-collapsed { width: 40px; } -.cms-panel .cms-panel-content-collapsed h2, .cms-panel .cms-panel-content-collapsed h3 { display: none; } +.cms-panel .cms-panel-content-collapsed { position: relative; width: 40px; } +.cms-panel .cms-panel-content-collapsed h2.cms-panel-header, .cms-panel .cms-panel-content-collapsed h3.cms-panel-header { zoom: 1; position: absolute; top: 10px; right: 10px; writing-mode: tb-rl; float: right; z-index: 5000; } .cms-content-toolbar .cms-tree-view-modes .checkboxAboveTree { margin-right: 1px; } diff --git a/admin/scss/_ieShared.scss b/admin/scss/_ieShared.scss index b3e7054c1..bbcb0e1cd 100644 --- a/admin/scss/_ieShared.scss +++ b/admin/scss/_ieShared.scss @@ -1,3 +1,23 @@ +//Mixin to adjust text in collapsed side panel and display vertically +@mixin IEVerticalPanelText{ + .cms-panel-content-collapsed { + position:relative; + width: 40px; + h2, h3 { + &.cms-panel-header { + zoom: 1; + position:absolute; + top:10px; + right:10px; + writing-mode: tb-rl; + float:right; + z-index:5000; + } + } + } +} + + //fix for background colors on buttons .cms .ss-ui-button { background-color: $color-button-generic; @@ -97,7 +117,6 @@ } } - //fix for model admin filter styling .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content { #Form_ImportForm { diff --git a/admin/scss/ie7.scss b/admin/scss/ie7.scss index 07e1f0f28..16023b04c 100644 --- a/admin/scss/ie7.scss +++ b/admin/scss/ie7.scss @@ -199,3 +199,5 @@ table.ss-gridfield-table { } } + +@include IEVerticalPanelText; //IE7 needs this defined outside .cms-panel \ No newline at end of file diff --git a/admin/scss/ie8.scss b/admin/scss/ie8.scss index f3f45dae9..3aca6a267 100644 --- a/admin/scss/ie8.scss +++ b/admin/scss/ie8.scss @@ -1,14 +1,9 @@ @import 'themes/default'; @import 'ieShared'; - +//IE8 needs this defined inside .cms-panel .cms-panel { - .cms-panel-content-collapsed { - width: 40px; - h2, h3 { - display: none; - } - } + @include IEVerticalPanelText; } //fix for overlapping of tree view mode checkboxes From 42d40a7c1a7d891c3dc41e17786644ddc45dd7eb Mon Sep 17 00:00:00 2001 From: Naomi Guyer Date: Mon, 18 Jun 2012 13:22:01 +1200 Subject: [PATCH 02/15] BUGFIX: Turn off filters on IE Nav icons (fixes #7471) Set filter to none so that the icons appear correctly in IE7and 8 Conflicts: admin/scss/_ieShared.scss --- admin/css/ie7.css | 2 ++ admin/css/ie8.css | 2 ++ admin/scss/_ieShared.scss | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/admin/css/ie7.css b/admin/css/ie7.css index 564a0fd1d..99f5e114a 100644 --- a/admin/css/ie7.css +++ b/admin/css/ie7.css @@ -32,6 +32,8 @@ .cms .cms-content .cms-content-fields .aligned_right_label { margin-left: 0; } +.cms-menu-list li a .icon { filter: none; } + .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.file { margin: 0px; } .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.file input.file { margin-left: -132px; } .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.checkbox { padding: 0px; } diff --git a/admin/css/ie8.css b/admin/css/ie8.css index 9208a4fd3..84417bc63 100644 --- a/admin/css/ie8.css +++ b/admin/css/ie8.css @@ -32,6 +32,8 @@ .cms .cms-content .cms-content-fields .aligned_right_label { margin-left: 0; } +.cms-menu-list li a .icon { filter: none; } + .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.file { margin: 0px; } .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.file input.file { margin-left: -132px; } .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.checkbox { padding: 0px; } diff --git a/admin/scss/_ieShared.scss b/admin/scss/_ieShared.scss index bbcb0e1cd..f3c7ea312 100644 --- a/admin/scss/_ieShared.scss +++ b/admin/scss/_ieShared.scss @@ -117,6 +117,11 @@ } } +.cms-menu-list li a .icon{ + filter:none; +} + + //fix for model admin filter styling .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content { #Form_ImportForm { From 3eff92ad406ebb7a0ea5432640bd9c407f700057 Mon Sep 17 00:00:00 2001 From: Naomi Guyer Date: Tue, 19 Jun 2012 17:52:09 +1200 Subject: [PATCH 03/15] ChangedBUG FIX: IE filter buttons (fixes #7501) * Changed spacing of IE filter buttons Conflicts: admin/css/ie7.css admin/css/ie8.css admin/scss/ie7.scss --- admin/css/ie7.css | 7 +++++-- admin/css/ie8.css | 11 +++++++++-- admin/scss/_ieShared.scss | 8 ++++++++ admin/scss/ie7.scss | 21 +++++++++++++++++++-- admin/scss/ie8.scss | 14 ++++++++++++++ 5 files changed, 55 insertions(+), 6 deletions(-) diff --git a/admin/css/ie7.css b/admin/css/ie7.css index 99f5e114a..fce4e75bb 100644 --- a/admin/css/ie7.css +++ b/admin/css/ie7.css @@ -38,6 +38,8 @@ .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.file input.file { margin-left: -132px; } .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.checkbox { padding: 0px; } +.filter-buttons button.ss-gridfield-button-filter { background-position: -18px 4px !important; } + html { overflow: hidden; } .field input.text, .field textarea, .field .TreeDropdownField { padding-left: 0; padding-right: 0; } @@ -56,6 +58,8 @@ html { overflow: hidden; } .cms-content-toolbar { padding-bottom: 5px; } +.cms-menu-list li { list-style-type: none; width: 100%; float: left; margin: 0px; padding: 0px; } + .jstree li a .ui-icon { text-indent: 0px !important; } .cms table.ss-gridfield-table tbody td { width: auto; } @@ -94,5 +98,4 @@ table.ss-gridfield-table tr.ss-gridfield-item.even { background: #F0F4F7; } .cms-content-header h2 .section-icon { display: none; } .cms-content-header .cms-content-header-tabs { position: absolute; right: 0; } -.cms-panel-content-collapsed { position: relative; width: 40px; } -.cms-panel-content-collapsed h2.cms-panel-header, .cms-panel-content-collapsed h3.cms-panel-header { zoom: 1; position: absolute; top: 10px; right: 10px; writing-mode: tb-rl; float: right; z-index: 5000; } +.ss-ui-button.ss-gridfield-button-filter { border: none !important; } diff --git a/admin/css/ie8.css b/admin/css/ie8.css index 84417bc63..2102df8cd 100644 --- a/admin/css/ie8.css +++ b/admin/css/ie8.css @@ -38,10 +38,17 @@ .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.file input.file { margin-left: -132px; } .ModelAdmin .cms-content-fields .cms-content-tools .cms-panel-content #Form_ImportForm div.checkbox { padding: 0px; } -.cms-panel .cms-panel-content-collapsed { position: relative; width: 40px; } -.cms-panel .cms-panel-content-collapsed h2.cms-panel-header, .cms-panel .cms-panel-content-collapsed h3.cms-panel-header { zoom: 1; position: absolute; top: 10px; right: 10px; writing-mode: tb-rl; float: right; z-index: 5000; } +.filter-buttons button.ss-gridfield-button-filter { background-position: -18px 4px !important; } + +.cms-panel .cms-panel-content-collapsed { width: 40px; } +.cms-panel .cms-panel-content-collapsed h2, .cms-panel .cms-panel-content-collapsed h3 { display: none; } .cms-content-toolbar .cms-tree-view-modes .checkboxAboveTree { margin-right: 1px; } .cms .cms-content-tools { border-right: 1px solid #CCC; } .cms .cms-content-tools .cms-panel-content .dropdown select { width: 152px; } + +.filter-buttons button { width: 23px !important; height: 23px !important; } +.filter-buttons button.ss-gridfield-button-close { margin-right: -7px !important; } + +.col-buttons { width: 18px; } diff --git a/admin/scss/_ieShared.scss b/admin/scss/_ieShared.scss index f3c7ea312..a37cffda0 100644 --- a/admin/scss/_ieShared.scss +++ b/admin/scss/_ieShared.scss @@ -136,3 +136,11 @@ } } } + +.filter-buttons{ + button{ + &.ss-gridfield-button-filter{ + background-position: -18px 4px !important; + } + } +} diff --git a/admin/scss/ie7.scss b/admin/scss/ie7.scss index 16023b04c..fb678a98e 100644 --- a/admin/scss/ie7.scss +++ b/admin/scss/ie7.scss @@ -40,6 +40,8 @@ html { } + + //fix for the tree view modes not displaying inline .cms-tree-view-modes { div { @@ -64,6 +66,17 @@ html { padding-bottom:5px; } +.cms-menu-list{ + li{ + list-style-type: none; + width: 100%; + float: left; + margin: 0px; + padding: 0px; + } +} + + // fix jstree themeroller plugin bug: tree disappear in IE7 @@ -198,6 +211,10 @@ table.ss-gridfield-table { right: 0; } } - + -@include IEVerticalPanelText; //IE7 needs this defined outside .cms-panel \ No newline at end of file +.ss-ui-button{ + &.ss-gridfield-button-filter{ + border:none !important; + } +} diff --git a/admin/scss/ie8.scss b/admin/scss/ie8.scss index 3aca6a267..8d74e7838 100644 --- a/admin/scss/ie8.scss +++ b/admin/scss/ie8.scss @@ -25,4 +25,18 @@ .cms-panel-content .dropdown select { width:152px; } +} + +.filter-buttons{ + button{ + width:23px !important; + height:23px !important; + &.ss-gridfield-button-close{ + margin-right:-7px !important; + } + } +} + +.col-buttons{ + width:18px; } \ No newline at end of file From eb2a0427cce98d702b3fec38bb9706221dfffc2f Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Tue, 19 Jun 2012 22:33:19 +1200 Subject: [PATCH 04/15] MINOR: exclude functional tests when running just framework module tests --- dev/TestRunner.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dev/TestRunner.php b/dev/TestRunner.php index 1b4661928..a11ec5890 100644 --- a/dev/TestRunner.php +++ b/dev/TestRunner.php @@ -129,7 +129,7 @@ class TestRunner extends Controller { $reflection = new ReflectionClass($class); if(!$reflection->isInstantiable()) unset($tests[$class]); } - + $this->runTests($tests, $coverage); } @@ -236,18 +236,21 @@ class TestRunner extends Controller { $classNames = array(); $moduleNames = explode(',', $request->param('ModuleName')); + $ignored = array('functionaltest', 'phpsyntaxtest'); + foreach($moduleNames as $moduleName) { $classesForModule = ClassInfo::classes_for_folder($moduleName); if($classesForModule) { foreach($classesForModule as $className) { if(class_exists($className) && is_subclass_of($className, 'SapphireTest')) { - $classNames[] = $className; + if(!in_array($className, $ignored)) + $classNames[] = $className; } } } } - + $this->runTests($classNames, $coverage); } From 8b43780e23745b65766e376a7261adfd51a1de4a Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Tue, 19 Jun 2012 22:34:54 +1200 Subject: [PATCH 05/15] MINOR: remove dependency on RootURLController and show a default Controller template as a failback. --- _config/routes.yml | 10 ++++++++-- control/Controller.php | 4 ++++ templates/Controller.ss | 22 ++++++++++++++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 templates/Controller.ss diff --git a/_config/routes.yml b/_config/routes.yml index e31876da8..95273ebc4 100644 --- a/_config/routes.yml +++ b/_config/routes.yml @@ -1,4 +1,11 @@ --- +Name: rootroutes +Before: '*' +--- +Director: + rules: + '': 'Controller' +--- Name: coreroutes After: cms/routes#modelascontrollerroutes Before: '*' @@ -19,5 +26,4 @@ After: framework/routes#coreroutes Director: rules: 'admin': 'AdminRootController' - '': 'RootURLController' - 'dev/buildcache/$Action': 'RebuildStaticCacheTask' + 'dev/buildcache/$Action': 'RebuildStaticCacheTask' \ No newline at end of file diff --git a/control/Controller.php b/control/Controller.php index d526f3a36..c1264fb08 100644 --- a/control/Controller.php +++ b/control/Controller.php @@ -274,6 +274,7 @@ class Controller extends RequestHandler implements TemplateGlobalProvider { $templates = $this->template; } else { // Add action-specific templates for inheritance chain + $templates = array(); $parentClass = $this->class; if($action && $action != 'index') { $parentClass = $this->class; @@ -289,9 +290,12 @@ class Controller extends RequestHandler implements TemplateGlobalProvider { $parentClass = get_parent_class($parentClass); } + $templates[] = 'Controller'; + // remove duplicates $templates = array_unique($templates); } + return new SSViewer($templates); } diff --git a/templates/Controller.ss b/templates/Controller.ss new file mode 100644 index 000000000..3d787bea1 --- /dev/null +++ b/templates/Controller.ss @@ -0,0 +1,22 @@ + + + + + + <% base_tag %> + + $MetaTags + + +

<% if $Title %>$Title<% else %>Welcome to SilverStripe<% end_if %>

+ <% if $Content %>$Content<% else %> +

To get started with the SilverStripe framework:

+
    +
  1. Create a Controller subclass (doc.silverstripe.org/sapphire/en/topics/controller)
  2. +
  3. Setup the routes to your Controller.
  4. +
  5. Create a template for your Controller (doc.silverstripe.org/sapphire/en/trunk/reference/templates)
  6. +
+ <% end_if %> +

Generated with the default Controller.ss template.

+ + From d82b67cf9705ad7e9ee6fb28acae511f9dc25ea9 Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Tue, 19 Jun 2012 22:45:44 +1200 Subject: [PATCH 06/15] ENHANCEMENT: remove dependencies between framework tests and cms module. --- filesystem/File.php | 16 ++++++++------- security/Member.php | 6 +++++- tests/filesystem/FileTest.php | 33 ++++++++++++++++++++++++------- tests/filesystem/FileTest.yml | 4 ---- tests/security/PermissionTest.php | 15 ++++++-------- 5 files changed, 46 insertions(+), 28 deletions(-) diff --git a/filesystem/File.php b/filesystem/File.php index 380f124a9..6712ee6f4 100644 --- a/filesystem/File.php +++ b/filesystem/File.php @@ -168,11 +168,14 @@ class File extends DataObject { public static function link_shortcode_handler($arguments, $content = null, $parser = null) { if(!isset($arguments['id']) || !is_numeric($arguments['id'])) return; - if ( - !($record = DataObject::get_by_id('File', $arguments['id'])) // Get the file by ID. - && !($record = DataObject::get_one('ErrorPage', '"ErrorCode" = \'404\'')) // Link to 404 page directly. - ) { - return; // There were no suitable matches at all. + $record = DataObject::get_by_id('File', $arguments['id']); + + if (!$record) { + if(class_exists('ErrorPage')) { + $record = DataObject::get_one('ErrorPage', '"ErrorCode" = \'404\''); + } + + if (!$record) return; // There were no suitable matches at all. } // build the HTML tag @@ -360,8 +363,7 @@ class File extends DataObject { sprintf('%s', $this->Link(), $this->RelativeLink()) ), new DateField_Disabled("Created", _t('AssetTableField.CREATED','First uploaded') . ':'), - new DateField_Disabled("LastEdited", _t('AssetTableField.LASTEDIT','Last changed') . ':'), - new ReadonlyField('BackLinkCount', _t('AssetTableField.BACKLINKCOUNT', 'Used on:'), $this->BackLinkTracking()->Count() . ' ' . _t('AssetTableField.PAGES', 'page(s)')) + new DateField_Disabled("LastEdited", _t('AssetTableField.LASTEDIT','Last changed') . ':') ) )->setName("FilePreviewData")->addExtraClass('cms-file-info-data') )->setName("FilePreview")->addExtraClass('cms-file-info'); diff --git a/security/Member.php b/security/Member.php index 3521b7524..c885706ec 100644 --- a/security/Member.php +++ b/security/Member.php @@ -1037,7 +1037,11 @@ class Member extends DataObject implements TemplateGlobalProvider { if(!$groups || $groups->Count() == 0) { $perms = array('ADMIN', 'CMS_ACCESS_AssetAdmin'); - $cmsPerms = singleton('CMSMain')->providePermissions(); + if(class_exists('CMSMain')) { + $cmsPerms = singleton('CMSMain')->providePermissions(); + } else { + $cmsPerms = singleton('LeftAndMain')->providePermissions(); + } if(!empty($cmsPerms)) { $perms = array_unique(array_merge($perms, array_keys($cmsPerms))); diff --git a/tests/filesystem/FileTest.php b/tests/filesystem/FileTest.php index 04e18361f..72f4645f5 100644 --- a/tests/filesystem/FileTest.php +++ b/tests/filesystem/FileTest.php @@ -11,7 +11,6 @@ class FileTest extends SapphireTest { public function testLinkShortcodeHandler() { $testFile = $this->objFromFixture('File', 'asdf'); - $errorPage = $this->objFromFixture('ErrorPage', '404'); $parser = new ShortcodeParser(); $parser->register('file_link', array('File', 'link_shortcode_handler')); @@ -30,15 +29,25 @@ class FileTest extends SapphireTest { $fileShortcode = '[file_link id="-1"]'; $fileEnclosed = '[file_link id="-1"]Example Content[/file_link]'; - $fileShortcodeExpected = $errorPage->Link(); - $fileEnclosedExpected = sprintf('Example Content', $errorPage->Link()); - - $this->assertEquals($fileShortcodeExpected, $parser->parse($fileShortcode), 'Test link to 404 page if no suitable matches.'); - $this->assertEquals($fileEnclosedExpected, $parser->parse($fileEnclosed)); - $this->assertEquals('', $parser->parse('[file_link]'), 'Test that invalid ID attributes are not parsed.'); $this->assertEquals('', $parser->parse('[file_link id="text"]')); $this->assertEquals('', $parser->parse('[file_link]Example Content[/file_link]')); + + if(class_exists('ErrorPage')) { + $errorPage = ErrorPage::get()->filter('ErrorCode', 404)->First(); + $this->assertEquals( + $errorPage->Link(), + $parser->parse($fileShortcode), + 'Test link to 404 page if no suitable matches.' + ); + $this->assertEquals( + sprintf('Example Content', $errorPage->Link()), + $parser->parse($fileEnclosed) + ); + } else { + $this->assertEquals('', $parser->parse($fileShortcode), 'Short code is removed if file record is not present.'); + $this->assertEquals('', $parser->parse($fileEnclosed)); + } } function testCreateWithFilenameWithSubfolder() { @@ -372,6 +381,16 @@ class FileTest extends SapphireTest { fwrite($fh, str_repeat('x',1000000)); fclose($fh); } + + // Conditional fixture creation in case the 'cms' module is installed + if(class_exists('ErrorPage')) { + $page = new ErrorPage(array( + 'Title' => 'Page not Found', + 'ErrorCode' => 404 + )); + $page->write(); + $page->publish('Stage', 'Live'); + } } function tearDown() { diff --git a/tests/filesystem/FileTest.yml b/tests/filesystem/FileTest.yml index 63e8df2c5..e4eeab45c 100644 --- a/tests/filesystem/FileTest.yml +++ b/tests/filesystem/FileTest.yml @@ -28,7 +28,3 @@ File: Filename: assets/FileTest-folder1/File1.txt Name: File1.txt ParentID: =>Folder.folder1 -ErrorPage: - 404: - Title: Page not Found - ErrorCode: 404 diff --git a/tests/security/PermissionTest.php b/tests/security/PermissionTest.php index f88539a0d..2d89aa4d5 100644 --- a/tests/security/PermissionTest.php +++ b/tests/security/PermissionTest.php @@ -68,16 +68,13 @@ class PermissionTest extends SapphireTest { function testHiddenPermissions(){ $permissionCheckboxSet = new PermissionCheckboxSetField('Permissions','Permissions','Permission','GroupID'); - $this->assertContains('CMS_ACCESS_CMSMain', $permissionCheckboxSet->Field()); - $this->assertContains('CMS_ACCESS_AssetAdmin', $permissionCheckboxSet->Field()); + $this->assertContains('CMS_ACCESS_LeftAndMain', $permissionCheckboxSet->Field()); - Permission::add_to_hidden_permissions('CMS_ACCESS_CMSMain'); - Permission::add_to_hidden_permissions('CMS_ACCESS_AssetAdmin'); - $this->assertNotContains('CMS_ACCESS_CMSMain', $permissionCheckboxSet->Field()); - $this->assertNotContains('CMS_ACCESS_AssetAdmin', $permissionCheckboxSet->Field()); + Permission::add_to_hidden_permissions('CMS_ACCESS_LeftAndMain'); + + $this->assertNotContains('CMS_ACCESS_LeftAndMain', $permissionCheckboxSet->Field()); - Permission::remove_from_hidden_permissions('CMS_ACCESS_AssetAdmin'); - $this->assertContains('CMS_ACCESS_AssetAdmin', $permissionCheckboxSet->Field()); - Permission::remove_from_hidden_permissions('CMS_ACCESS_CMSMain'); + Permission::remove_from_hidden_permissions('CMS_ACCESS_LeftAndMain'); + $this->assertContains('CMS_ACCESS_LeftAndMain', $permissionCheckboxSet->Field()); } } From 3a7128d00cdd76bd7305860ba4b1a1a85470f001 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 20 Jun 2012 23:59:16 +0200 Subject: [PATCH 07/15] MINOR Fixed phpdocs --- control/injector/AfterCallAspect.php | 2 +- control/injector/AopProxyService.php | 2 +- control/injector/BeforeCallAspect.php | 2 +- control/injector/Injector.php | 2 +- dev/install/DatabaseAdapterRegistry.php | 2 +- dev/install/MySQLDatabaseConfigurationHelper.php | 2 +- forms/TreeDropdownField.php | 8 ++++---- i18n/i18nRailsYamlAdapter.php | 2 +- i18n/i18nSSLegacyAdapter.php | 2 +- i18n/i18nTextCollector.php | 2 +- i18n/i18nTranslateAdapterInterface.php | 2 +- model/DataQuery.php | 2 +- tests/i18n/i18nSSLegacyAdapterTest.php | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/control/injector/AfterCallAspect.php b/control/injector/AfterCallAspect.php index 3da0df056..ce7ab303d 100644 --- a/control/injector/AfterCallAspect.php +++ b/control/injector/AfterCallAspect.php @@ -7,7 +7,7 @@ * as PHP doesn't really care about types... * * @author Marcus Nyeholt - * @package sapphire + * @package framework * @subpackage injector * @license BSD http://silverstripe.org/BSD-license */ diff --git a/control/injector/AopProxyService.php b/control/injector/AopProxyService.php index bb52ef8bf..2bff1f5a4 100644 --- a/control/injector/AopProxyService.php +++ b/control/injector/AopProxyService.php @@ -5,7 +5,7 @@ * injected * * @author marcus@silverstripe.com.au - * @package sapphire + * @package framework * @subpackage injector * * @license http://silverstripe.org/bsd-license/ diff --git a/control/injector/BeforeCallAspect.php b/control/injector/BeforeCallAspect.php index 350dd1c8d..7060bbcba 100644 --- a/control/injector/BeforeCallAspect.php +++ b/control/injector/BeforeCallAspect.php @@ -7,7 +7,7 @@ * as PHP doesn't really care about types... * * @author Marcus Nyeholt - * @package sapphire + * @package framework * @subpackage injector * @license BSD http://silverstripe.org/BSD-license */ diff --git a/control/injector/Injector.php b/control/injector/Injector.php index 37d758480..58c1aff17 100644 --- a/control/injector/Injector.php +++ b/control/injector/Injector.php @@ -108,7 +108,7 @@ * * A service named 'PermissionService' has been configured * * @author marcus@silverstripe.com.au - * @package sapphire + * @package framework * @subpackage injector * @license BSD License http://silverstripe.org/bsd-license/ */ diff --git a/dev/install/DatabaseAdapterRegistry.php b/dev/install/DatabaseAdapterRegistry.php index 7ef855074..e9115417a 100644 --- a/dev/install/DatabaseAdapterRegistry.php +++ b/dev/install/DatabaseAdapterRegistry.php @@ -5,7 +5,7 @@ * and provides a meaning of registering community built * adapters in to the installer process. * - * @package installer + * @package framework * @author Tom Rix */ class DatabaseAdapterRegistry { diff --git a/dev/install/MySQLDatabaseConfigurationHelper.php b/dev/install/MySQLDatabaseConfigurationHelper.php index 6b68263d9..f86009610 100644 --- a/dev/install/MySQLDatabaseConfigurationHelper.php +++ b/dev/install/MySQLDatabaseConfigurationHelper.php @@ -5,7 +5,7 @@ * It does all the specific checking for MySQLDatabase * to ensure that the configuration is setup correctly. * - * @package sappire + * @package framework * @subpackage model */ class MySQLDatabaseConfigurationHelper implements DatabaseConfigurationHelper { diff --git a/forms/TreeDropdownField.php b/forms/TreeDropdownField.php index d94896a51..9db1875b2 100644 --- a/forms/TreeDropdownField.php +++ b/forms/TreeDropdownField.php @@ -31,10 +31,10 @@ * This will generate a tree allowing the user to expand and contract subsections * to find the appropriate page to save to the field. * - * @see {@link TreeMultiselectField} for the same implementation allowing multiple selections - * @see {@link DropdownField} for a simple dropdown field. - * @see {@link CheckboxSetField} for multiple selections through checkboxes. - * @see {@link OptionsetField} for single selections via radiobuttons. + * @see TreeMultiselectField for the same implementation allowing multiple selections + * @see DropdownField for a simple dropdown field. + * @see CheckboxSetField for multiple selections through checkboxes. + * @see OptionsetField for single selections via radiobuttons. * * @package forms * @subpackage fields-relational diff --git a/i18n/i18nRailsYamlAdapter.php b/i18n/i18nRailsYamlAdapter.php index be52d8718..f4dbcfcae 100644 --- a/i18n/i18nRailsYamlAdapter.php +++ b/i18n/i18nRailsYamlAdapter.php @@ -3,7 +3,7 @@ require_once 'Zend/Translate.php'; require_once 'zend_translate_railsyaml/library/Translate/Adapter/RailsYAML.php'; /** - * @package sapphire + * @package framework * @subpackage i18n */ diff --git a/i18n/i18nSSLegacyAdapter.php b/i18n/i18nSSLegacyAdapter.php index 9f784de4d..848644163 100644 --- a/i18n/i18nSSLegacyAdapter.php +++ b/i18n/i18nSSLegacyAdapter.php @@ -3,7 +3,7 @@ require_once 'Zend/Locale.php'; require_once 'Zend/Translate/Adapter.php'; /** - * @package sapphire + * @package framework * @subpackage i18n */ diff --git a/i18n/i18nTextCollector.php b/i18n/i18nTextCollector.php index b80d5d1f9..b80315166 100644 --- a/i18n/i18nTextCollector.php +++ b/i18n/i18nTextCollector.php @@ -153,7 +153,7 @@ class i18nTextCollector extends Object { /** * Builds a master string table from php and .ss template files for the module passed as the $module param - * @see {@link collectFromCode} and {@link collectFromTemplate} + * @see collectFromCode() and collectFromTemplate() * * @param string $module A module's name or just 'themes' * @return array $entities An array of entities found in the files that comprise the module diff --git a/i18n/i18nTranslateAdapterInterface.php b/i18n/i18nTranslateAdapterInterface.php index d0c054016..d375498d4 100644 --- a/i18n/i18nTranslateAdapterInterface.php +++ b/i18n/i18nTranslateAdapterInterface.php @@ -1,6 +1,6 @@ Date: Thu, 21 Jun 2012 14:19:41 +1200 Subject: [PATCH 08/15] BUGFIX: Add validation to fix open.silverstripe.org ticket #7494 When adding media via the HtmlEditorField dialog, the value of the URL field wasnt being validated. Youd get different errors depending on if the field was empty or if it had text, but it didnt look like an absolute URL to HtmlEditorField#viewfile. This adds some javascript validation to make the text field look like a URL field --- admin/css/screen.css | 6 ++++- admin/scss/_style.scss | 22 ++++++++++++++++++ forms/HtmlEditorField.php | 2 +- javascript/HtmlEditorField.js | 42 +++++++++++++++++++++++++++++++---- 4 files changed, 66 insertions(+), 6 deletions(-) diff --git a/admin/css/screen.css b/admin/css/screen.css index 9e16d874d..5b6e7a882 100644 --- a/admin/css/screen.css +++ b/admin/css/screen.css @@ -545,10 +545,14 @@ body.cms-dialog { overflow: auto; background: url("../images/textures/bg_cms_mai /** -------------------------------------------- "Insert X" forms -------------------------------------------- */ .htmleditorfield-dialog.ui-dialog-content { padding: 0; position: relative; } .htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb .CompositeField { overflow: hidden; *zoom: 1; } -.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL { border: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; width: 55%; float: left; } +.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL { border: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; width: 55%; float: left; position: relative; } +.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL label { position: absolute; left: 8px; top: 0px; font-weight: normal; color: #888; } +.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL .middleColumn { margin-left: 0; } +.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb #RemoteURL input.remoteurl { padding-left: 40px; } .htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url { padding-top: 15px; overflow: hidden; *zoom: 1; border: none; background: none; opacity: 0.8; cursor: hand; } .htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url .btn-icon-addMedia { width: 20px; height: 20px; } .htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url:hover, .htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url:active { border: none; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; opacity: 1; } +.htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url.ui-state-disabled, .htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url.ui-state-disabled:hover, .htmleditorfield-dialog #MediaFormInsertMediaTabs_Fromtheweb button.add-url.ui-state-disabled:active { opacity: 0.35; filter: Alpha(Opacity=35); } .htmleditorfield-dialog .cms-content-header { padding: 0; width: 100%; height: 40px; } .htmleditorfield-dialog .cms-content-header h3 { padding: 0 8px; margin: 10px; } .htmleditorfield-dialog .ui-tabs { position: static; } diff --git a/admin/scss/_style.scss b/admin/scss/_style.scss index 26d12e580..b16826f7d 100644 --- a/admin/scss/_style.scss +++ b/admin/scss/_style.scss @@ -1449,6 +1449,22 @@ body.cms-dialog { @include box-shadow-none; width:55%; float:left; + position: relative; + + label { + position: absolute; + left: 8px; + top: 0px; + font-weight: normal; color: #888; + } + + .middleColumn { + margin-left: 0; + } + + input.remoteurl { + padding-left: 40px; + } } button.add-url{ padding-top:15px; @@ -1466,6 +1482,12 @@ body.cms-dialog { @include box-shadow-none; opacity:1; } + &.ui-state-disabled { + &, &:hover, &:active { + opacity: 0.35; + filter: Alpha(Opacity=35); + } + } } } diff --git a/forms/HtmlEditorField.php b/forms/HtmlEditorField.php index cc7a1778f..90be1f668 100644 --- a/forms/HtmlEditorField.php +++ b/forms/HtmlEditorField.php @@ -392,7 +392,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { $fromWeb = new CompositeField( new LiteralField('headerURL', '

' . sprintf($numericLabelTmpl, '1', _t('HtmlEditorField.ADDURL', 'Add URL')) . '

'), - $remoteURL = new TextField('RemoteURL', ''), + $remoteURL = new TextField('RemoteURL', 'http://'), new LiteralField('addURLImage', '') ); $remoteURL->addExtraClass('remoteurl'); diff --git a/javascript/HtmlEditorField.js b/javascript/HtmlEditorField.js index 6c3b59e14..53bf85985 100644 --- a/javascript/HtmlEditorField.js +++ b/javascript/HtmlEditorField.js @@ -871,17 +871,51 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE; }); + $('form.htmleditorfield-form.htmleditorfield-mediaform input.remoteurl').entwine({ + onadd: function() { + this.validate(); + }, + + onkeyup: function() { + this.validate(); + }, + + onchange: function() { + this.validate(); + }, + + getAddButton: function() { + return this.closest('.CompositeField').find('button.add-url'); + }, + + validate: function() { + var val = this.val(), orig = val; + + val = val.replace(/^https?:\/\//i, ''); + if (orig !== val) this.val(val); + + this.getAddButton().button(!!val ? 'enable' : 'disable'); + return !!val; + } + }); + /** * Show the second step after adding a URL */ $('form.htmleditorfield-form.htmleditorfield-mediaform .add-url').entwine({ + getURLField: function() { + return this.closest('.CompositeField').find('input.remoteurl'); + }, + onclick: function(e) { - var form = this.closest('form'); + var urlField = this.getURLField(); - var urlField = this.closest('.CompositeField').find('input.remoteurl'); + if (urlField.validate()) { + var form = this.closest('form'); + form.showFileView('http://' + urlField.val()); + form.redraw(); + } - form.showFileView(urlField.val()); - form.redraw(); return false; } }); From daa226a9af4ce63f4add2872add8efd4339e86ca Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Fri, 22 Jun 2012 10:46:03 +1200 Subject: [PATCH 09/15] BUGFIX: Fix trac ticket #7476 We missed making an event delegatable in https://github.com/silverstripe/sapphire/pull/542 the result was 7476 wasnt actually fixed --- admin/javascript/LeftAndMain.Tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/javascript/LeftAndMain.Tree.js b/admin/javascript/LeftAndMain.Tree.js index bf23fd084..f9ffdde84 100644 --- a/admin/javascript/LeftAndMain.Tree.js +++ b/admin/javascript/LeftAndMain.Tree.js @@ -102,7 +102,7 @@ }); }) // Make some jstree events delegatable - .bind('select_node.jstree check_node.jstree', function(e, data) { + .bind('select_node.jstree check_node.jstree uncheck_node.jstree', function(e, data) { $(document).triggerHandler(e, data); }) }, From 0352a9191e87346da6b84479af57e7c0e69a49f3 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 18 Jun 2012 18:19:45 +1200 Subject: [PATCH 10/15] MINOR: Fixed filename glitch in changelog --- .../rc/\0333.0.0-rc1.md" => docs/en/changelogs/rc/3.0.0-rc1.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename "docs/en/changelogs/rc/\0333.0.0-rc1.md" => docs/en/changelogs/rc/3.0.0-rc1.md (100%) diff --git "a/docs/en/changelogs/rc/\0333.0.0-rc1.md" b/docs/en/changelogs/rc/3.0.0-rc1.md similarity index 100% rename from "docs/en/changelogs/rc/\0333.0.0-rc1.md" rename to docs/en/changelogs/rc/3.0.0-rc1.md From 0bea6974b6213d497db8a046409ee860d71da4d6 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Fri, 22 Jun 2012 13:34:03 +1200 Subject: [PATCH 11/15] BUGFIX: Make themedCSS use {theme}_{module}/css/{name}.css files if they exist 2.4 used to use a manifest to find css. One side-effect of that is that even without explicit support, css files in module-specific themes (/themes/{theme}_{module}/) would get picked up. This broke in 3. This fix does still require the module name to be explicitly passed as a parameter to themedCSS, but if you do, and a css file of that name exists in the module-specific themes css directory, that will be included in preference to the theme or module provided css --- view/Requirements.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/view/Requirements.php b/view/Requirements.php index 00d439af7..564ebb426 100644 --- a/view/Requirements.php +++ b/view/Requirements.php @@ -1074,16 +1074,18 @@ class Requirements_Backend { * @see Requirements::themedCSS() */ public function themedCSS($name, $module = null, $media = null) { - $theme = SSViewer::current_theme(); - $path = SSViewer::get_theme_folder() . "/css/$name.css"; + $path = SSViewer::get_theme_folder(); + $abspath = BASE_PATH . DIRECTORY_SEPARATOR . $path; + $css = "/css/$name.css"; - if (file_exists(BASE_PATH . '/' . $path)) { - $this->css($path, $media); - return; + if ($module && file_exists($abspath.'_'.$module.$css)) { + $this->css($path.'_'.$module.$css, $media); } - - if ($module) { - $this->css("$module/css/$name.css"); + else if (file_exists($abspath.$css)) { + $this->css($path.$css, $media); + } + else if ($module) { + $this->css($module.$css); } } From 03469230ff1f2027a85487f086e4986ce300fde5 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Fri, 22 Jun 2012 13:59:08 +1200 Subject: [PATCH 12/15] BUGFIX: Add batch handler status messages (fixes #7427) 7427 was mostly fixed by Ingos previous patch. But two batch actions, delete from draft site and delete from published site werent returning status messages. Abstracted out the status preperation code that the batch actions that were returning status messages were using, and used that to add status messages to the problem two --- admin/code/CMSBatchAction.php | 43 +++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/admin/code/CMSBatchAction.php b/admin/code/CMSBatchAction.php index 1e190ca6d..25d04229f 100644 --- a/admin/code/CMSBatchAction.php +++ b/admin/code/CMSBatchAction.php @@ -27,7 +27,38 @@ abstract class CMSBatchAction extends Object { * Return a set of status-updated JavaScript to return to the CMS. */ abstract function run(SS_List $objs); - + + /** + * Helper method for responding to a back action request + * @param $successMessage string - The message to return as a notification. + * Can have up to two %d's in it. The first will be replaced by the number of successful + * changes, the second by the number of failures + * @param $status array - A status array like batchactions builds. Should be + * key => value pairs, the key can be any string: "error" indicates errors, anything + * else indicates a type of success. The value is an array. We don't care what's in it, + * we just use count($value) to find the number of items that succeeded or failed + */ + public function response($successMessage, $status) { + $count = 0; + $errors = 0; + + foreach($status as $k => $v) { + if ($k == 'errors') $errors = count($v); + else $count += count($v); + } + + $response = Controller::curr()->getResponse(); + + if($response) { + $response->setStatusCode( + 200, + sprintf($successMessage, $count, $errors) + ); + } + + return Convert::raw2json($status); + } + /** * Helper method for processing batch actions. * Returns a set of status-updating JavaScript to return to the CMS. @@ -67,15 +98,7 @@ abstract class CMSBatchAction extends Object { unset($obj); } - $response = Controller::curr()->getResponse(); - if($response) { - $response->setStatusCode( - 200, - sprintf($successMessage, $objs->Count(), count($status['error'])) - ); - } - - return Convert::raw2json($status); + return $this->response($successMessage, $status); } From 1b5768975c24014f5a9cd74cdf35a6ec3716ac3d Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Fri, 22 Jun 2012 14:34:06 +1200 Subject: [PATCH 13/15] BUG: exclude() clears previously selected filters() (Trac #7529) This bug was caused by the fact that SQLQuery::whereAny() removed existing filters. In line with addWhere() and setWhere(), I split this into addWhereAny() and setWhereAny(). Strictly speaking, this drops the method SQLQuery::whereAny(), but it was really just an internal function for exclude, and so I think that's acceptable. --- model/DataQuery.php | 2 +- model/SQLQuery.php | 16 +++++++++++++++- tests/model/DataListTest.php | 11 +++++++++++ tests/model/SQLQueryTest.php | 4 ++-- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/model/DataQuery.php b/model/DataQuery.php index 8d2a4be36..e220961a8 100644 --- a/model/DataQuery.php +++ b/model/DataQuery.php @@ -461,7 +461,7 @@ function max($field) { function whereAny($filter) { if($filter) { $clone = $this; - $clone->query->whereAny($filter); + $clone->query->addWhereAny($filter); return $clone; } else { return $this; diff --git a/model/SQLQuery.php b/model/SQLQuery.php index 3808fecbd..daf9e0ad0 100644 --- a/model/SQLQuery.php +++ b/model/SQLQuery.php @@ -738,14 +738,28 @@ class SQLQuery { return $this->setWhere($where); } + public function whereAny($where) { + Deprecation::notice('3.0', 'Please use setWhereAny() or setWhereAny() instead!'); + return $this->setWhereAny($where); + } + /** * @param String|array $filters Predicate(s) to set, as escaped SQL statements. */ - function whereAny($filters) { + function setWhereAny($filters) { if(is_string($filters)) $filters = func_get_args(); $clause = implode(" OR ", $filters); return $this->setWhere($clause); } + + /** + * @param String|array $filters Predicate(s) to set, as escaped SQL statements. + */ + function addWhereAny($filters) { + if(is_string($filters)) $filters = func_get_args(); + $clause = implode(" OR ", $filters); + return $this->addWhere($clause); + } /** * Use the disjunctive operator 'OR' to join filter expressions in the WHERE clause. diff --git a/tests/model/DataListTest.php b/tests/model/DataListTest.php index 232631061..ff2b9edb6 100755 --- a/tests/model/DataListTest.php +++ b/tests/model/DataListTest.php @@ -437,6 +437,17 @@ class DataListTest extends SapphireTest { $list->exclude(array('Name'=>'Bob', 'Comment'=>'This is a team comment by Bob')); $this->assertEquals(2, $list->count()); } + + /** + * Test that if an exclude() is applied to a filter(), the filter() is still preserved. + */ + public function testExcludeOnFilter() { + $list = DataObjectTest_TeamComment::get(); + $list = $list->filter('Comment', 'Phil is a unique guy, and comments on team2'); + $list = $list->exclude('Name', 'Bob'); + + $this->assertContains('WHERE ("Comment" = \'Phil is a unique guy, and comments on team2\') AND ("Name" != \'Bob\')', $list->sql()); + } /** * $list->exclude(array('Name'=>'bob, 'Age'=>array(21, 43))); // exclude bob with Age 21 or 43 diff --git a/tests/model/SQLQueryTest.php b/tests/model/SQLQueryTest.php index e23b5022b..3819b352c 100755 --- a/tests/model/SQLQueryTest.php +++ b/tests/model/SQLQueryTest.php @@ -258,11 +258,11 @@ class SQLQueryTest extends SapphireTest { ); } - public function testWhereAny() { + public function testSetWhereAny() { $query = new SQLQuery(); $query->setFrom('MyTable'); - $query->whereAny(array("Monkey = 'Chimp'", "Color = 'Brown'")); + $query->setWhereAny(array("Monkey = 'Chimp'", "Color = 'Brown'")); $this->assertEquals("SELECT * FROM MyTable WHERE (Monkey = 'Chimp' OR Color = 'Brown')",$query->sql()); } From f3933aa3fbc000534cb98b0dd06fc634223d0a46 Mon Sep 17 00:00:00 2001 From: Naomi Guyer Date: Fri, 22 Jun 2012 16:23:01 +1200 Subject: [PATCH 14/15] BUGFIX: Make entire tab clickable in htmleditor (fixes #7407) --- admin/css/screen.css | 2 +- admin/scss/_style.scss | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/css/screen.css b/admin/css/screen.css index 5b6e7a882..7a9291c07 100644 --- a/admin/css/screen.css +++ b/admin/css/screen.css @@ -558,7 +558,7 @@ body.cms-dialog { overflow: auto; background: url("../images/textures/bg_cms_mai .htmleditorfield-dialog .ui-tabs { position: static; } .htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav { float: right; position: absolute; top: 0; right: 40px; } .htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav li { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IwYmVjNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzhjYTFhZSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b0bec7), color-stop(100%, #8ca1ae)); background-image: -webkit-linear-gradient(#b0bec7, #8ca1ae); background-image: -moz-linear-gradient(#b0bec7, #8ca1ae); background-image: -o-linear-gradient(#b0bec7, #8ca1ae); background-image: -ms-linear-gradient(#b0bec7, #8ca1ae); background-image: linear-gradient(#b0bec7, #8ca1ae); -webkit-border-radius: 0px; -moz-border-radius: 0px; -ms-border-radius: 0px; -o-border-radius: 0px; border-radius: 0px; padding-top: 10px; height: 28px; overflow: hidden; font-weight: bold; } -.htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav li a { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); } +.htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav li a { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); display: block; height: 100%; } .htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav li.ui-state-active { background: #f0f3f4 url("../admin/images/textures/bg_cms_main_content.png") repeat left top; } .htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav li.ui-state-active a { color: #444444; text-shadow: none; } .htmleditorfield-dialog .ui-tabs .ui-tabs-panel { padding: 0; } diff --git a/admin/scss/_style.scss b/admin/scss/_style.scss index b16826f7d..c964c9482 100644 --- a/admin/scss/_style.scss +++ b/admin/scss/_style.scss @@ -1519,6 +1519,8 @@ body.cms-dialog { a{ color:#fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); + display:block; + height:100%; } &.ui-state-active{ background: #F0F3F4 url("../admin/images/textures/bg_cms_main_content.png") repeat left top; From cffb95280f8af50ded6d691a06994d2f970f0233 Mon Sep 17 00:00:00 2001 From: Naomi Guyer Date: Fri, 22 Jun 2012 16:55:40 +1200 Subject: [PATCH 15/15] BUGFIX: Tab colour htmleditor in IE7 --- admin/css/screen.css | 2 +- admin/scss/_style.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/css/screen.css b/admin/css/screen.css index 7a9291c07..7aecde5d3 100644 --- a/admin/css/screen.css +++ b/admin/css/screen.css @@ -557,7 +557,7 @@ body.cms-dialog { overflow: auto; background: url("../images/textures/bg_cms_mai .htmleditorfield-dialog .cms-content-header h3 { padding: 0 8px; margin: 10px; } .htmleditorfield-dialog .ui-tabs { position: static; } .htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav { float: right; position: absolute; top: 0; right: 40px; } -.htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav li { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IwYmVjNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzhjYTFhZSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b0bec7), color-stop(100%, #8ca1ae)); background-image: -webkit-linear-gradient(#b0bec7, #8ca1ae); background-image: -moz-linear-gradient(#b0bec7, #8ca1ae); background-image: -o-linear-gradient(#b0bec7, #8ca1ae); background-image: -ms-linear-gradient(#b0bec7, #8ca1ae); background-image: linear-gradient(#b0bec7, #8ca1ae); -webkit-border-radius: 0px; -moz-border-radius: 0px; -ms-border-radius: 0px; -o-border-radius: 0px; border-radius: 0px; padding-top: 10px; height: 28px; overflow: hidden; font-weight: bold; } +.htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav li { background-color: #92A6B3; background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2IwYmVjNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzhjYTFhZSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background-size: 100%; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #b0bec7), color-stop(100%, #8ca1ae)); background-image: -webkit-linear-gradient(#b0bec7, #8ca1ae); background-image: -moz-linear-gradient(#b0bec7, #8ca1ae); background-image: -o-linear-gradient(#b0bec7, #8ca1ae); background-image: -ms-linear-gradient(#b0bec7, #8ca1ae); background-image: linear-gradient(#b0bec7, #8ca1ae); -webkit-border-radius: 0px; -moz-border-radius: 0px; -ms-border-radius: 0px; -o-border-radius: 0px; border-radius: 0px; padding-top: 10px; height: 28px; overflow: hidden; font-weight: bold; } .htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav li a { color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); display: block; height: 100%; } .htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav li.ui-state-active { background: #f0f3f4 url("../admin/images/textures/bg_cms_main_content.png") repeat left top; } .htmleditorfield-dialog .ui-tabs ul.ui-tabs-nav li.ui-state-active a { color: #444444; text-shadow: none; } diff --git a/admin/scss/_style.scss b/admin/scss/_style.scss index c964c9482..8db3ff5d9 100644 --- a/admin/scss/_style.scss +++ b/admin/scss/_style.scss @@ -1508,6 +1508,7 @@ body.cms-dialog { top:0; right: 40px; li{ + background-color:#92A6B3; @include background-image( linear-gradient(#B0BEC7, #8CA1AE) );