From a52514a30613111d6f1687062d3fd573fc2c37f1 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 6 Nov 2012 10:53:34 +0100 Subject: [PATCH] ENHANCEMENT Tab style consolidation and design consistency --- code/controllers/AssetAdmin.php | 6 +-- code/model/SiteConfig.php | 11 +++-- css/screen.css | 8 ---- scss/_AssetAdmin.scss | 40 ------------------- templates/Includes/AssetAdmin_Content.ss | 2 +- .../Includes/AssetAdmin_UploadContent.ss | 2 +- templates/Includes/CMSMain_Content.ss | 2 +- .../Includes/CMSPagesController_Content.ss | 8 ++-- .../Includes/CMSSettingsController_Content.ss | 2 +- 9 files changed, 18 insertions(+), 63 deletions(-) diff --git a/code/controllers/AssetAdmin.php b/code/controllers/AssetAdmin.php index 2cb18d76..295f4aea 100644 --- a/code/controllers/AssetAdmin.php +++ b/code/controllers/AssetAdmin.php @@ -221,11 +221,11 @@ JS $tabList = new Tab('ListView', _t('AssetAdmin.ListView', 'List View')), $tabTree = new Tab('TreeView', _t('AssetAdmin.TreeView', 'Tree View')) ); - $tabList->addExtraClass("content-listview"); - $tabTree->addExtraClass("content-treeview"); + $tabList->addExtraClass("content-listview cms-tabset-icon list"); + $tabTree->addExtraClass("content-treeview cms-tabset-icon tree"); if($fields->Count() && $folder->exists()) { $tabs->push($tabDetails = new Tab('DetailsView', _t('AssetAdmin.DetailsView', 'Details'))); - $tabDetails->addExtraClass("content-galleryview"); + $tabDetails->addExtraClass("content-galleryview cms-tabset-icon edit"); foreach($fields as $field) { $fields->removeByName($field->getName()); $tabDetails->push($field); diff --git a/code/model/SiteConfig.php b/code/model/SiteConfig.php index 4f5b38d5..8c3f18ed 100644 --- a/code/model/SiteConfig.php +++ b/code/model/SiteConfig.php @@ -51,10 +51,13 @@ class SiteConfig extends DataObject implements PermissionProvider { $fields = new FieldList( new TabSet("Root", - $tabMain = new Tab('Main', - $titleField = new TextField("Title", _t('SiteConfig.SITETITLE', "Site title")), - $taglineField = new TextField("Tagline", _t('SiteConfig.SITETAGLINE', "Site Tagline/Slogan")), - $themeDropdownField = new DropdownField("Theme", _t('SiteConfig.THEME', 'Theme'), $this->getAvailableThemes()) + $tabMain = new TabSet('Main', + new Tab('bla', + $titleField = new TextField("Title", _t('SiteConfig.SITETITLE', "Site title")), + $taglineField = new TextField("Tagline", _t('SiteConfig.SITETAGLINE', "Site Tagline/Slogan")), + $themeDropdownField = new DropdownField("Theme", _t('SiteConfig.THEME', 'Theme'), $this->getAvailableThemes()) + ), + new Tab('blubb') ), $tabAccess = new Tab('Access', $viewersOptionsField = new OptionsetField("CanViewType", _t('SiteConfig.VIEWHEADER', "Who can view pages on this site?")), diff --git a/css/screen.css b/css/screen.css index 8f690c35..0f1ecad1 100644 --- a/css/screen.css +++ b/css/screen.css @@ -33,14 +33,6 @@ .cms .AssetAdmin .cms-content-fields .cms-edit-form.AssetAdmin { overflow-y: auto; } .cms .AssetAdmin .cms-content-fields .cms-content-tools .cms-panel-content { overflow: hidden; } .cms .AssetAdmin .cms-content-fields .cms-content-tools .cms-panel-content .cms-search-form { height: 100%; } -.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav li a { font-weight: bold; padding: 0 20px 0; text-indent: -9999em; background: url(../images/content-header-tabs-sprite.png) no-repeat; } -.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav li.content-treeview a { background-position: 2px 0px; } -.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav li.content-galleryview a { background-position: -160px 0px; } -.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav li.content-listview a { background-position: -39px 0px; } -.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-state-active, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-content .ui-state-active, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-header .ui-state-active { border-top: none; } -.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-state-active.content-treeview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-content .ui-state-active.content-treeview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-header .ui-state-active.content-treeview a { background-position: 1px -40px; } -.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-state-active.content-galleryview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-content .ui-state-active.content-galleryview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-header .ui-state-active.content-galleryview a { background-position: -161px -40px; } -.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-state-active.content-listview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-content .ui-state-active.content-listview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-header .ui-state-active.content-listview a { background-position: -38px -40px; } .cms .AssetAdmin .cms-content-toolbar .cms-page-add-button { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f3f3f3), color-stop(100%, #d9d9d9)); background-image: -webkit-linear-gradient(#f3f3f3, #d9d9d9); background-image: -moz-linear-gradient(#f3f3f3, #d9d9d9); background-image: -o-linear-gradient(#f3f3f3, #d9d9d9); background-image: linear-gradient(#f3f3f3, #d9d9d9); border-color: #c0c0c2; } .cms .AssetAdmin .cms-content-toolbar .cms-page-add-button span.btn-icon-add { height: 17px; } .cms .AssetAdmin .cms-content-toolbar .cms-page-add-button span.ui-button-text { color: #393939; text-shadow: white 0 1px 1px; } diff --git a/scss/_AssetAdmin.scss b/scss/_AssetAdmin.scss index b4b25bae..5bd1599b 100644 --- a/scss/_AssetAdmin.scss +++ b/scss/_AssetAdmin.scss @@ -11,46 +11,6 @@ } } } - .cms-content-header-tabs { - .ui-tabs-nav { - li { - a { - font-weight: bold; - padding: 0 20px 0; - text-indent:-9999em; - background: url(../images/content-header-tabs-sprite.png) no-repeat; - } - - &.content-treeview a { - background-position: 2px 0px; - } - &.content-galleryview a { - background-position: -160px 0px; - } - &.content-listview a { - background-position: -39px 0px; - } - } - - .ui-state-active, - .ui-widget-content .ui-state-active, - .ui-widget-header .ui-state-active { - border: { - top:none; - } - - &.content-treeview a { - background-position: 1px -40px; - } - &.content-galleryview a { - background-position: -161px -40px; - } - &.content-listview a { - background-position: -38px -40px; - } - } - } - } .cms-content-toolbar { .cms-page-add-button { diff --git a/templates/Includes/AssetAdmin_Content.ss b/templates/Includes/AssetAdmin_Content.ss index c24fbbed..11232eea 100644 --- a/templates/Includes/AssetAdmin_Content.ss +++ b/templates/Includes/AssetAdmin_Content.ss @@ -14,7 +14,7 @@ <% if Fields.hasTabset %> <% with Fields.fieldByName('Root') %>
-
-
-
-