Skip to content

Commit

Permalink
MINOR: css styles and formatting for left hand side menu bar. Altered…
Browse files Browse the repository at this point in the history
… the stylesheet structure to allow future admin scss theme files to be included easier
  • Loading branch information
wilr committed May 19, 2011
1 parent 00b1bf8 commit 6956275
Show file tree
Hide file tree
Showing 104 changed files with 418 additions and 278 deletions.
Empty file modified admin/.gitignore 100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion admin/_config.php 100644 → 100755
Expand Up @@ -35,4 +35,5 @@
HtmlEditorConfig::get('cms')->insertButtonsAfter ('advcode', 'fullscreen', 'separator');

HtmlEditorConfig::get('cms')->removeButtons('tablecontrols');
HtmlEditorConfig::get('cms')->addButtonsToLine(3, 'tablecontrols');
HtmlEditorConfig::get('cms')->addButtonsToLine(3, 'tablecontrols');

Empty file modified admin/code/CMSBatchAction.php 100644 → 100755
Empty file.
Empty file modified admin/code/CMSBatchActionHandler.php 100644 → 100755
Empty file.
Empty file modified admin/code/CMSMenu.php 100644 → 100755
Empty file.
Empty file modified admin/code/CMSMenuItem.php 100644 → 100755
Empty file.
Empty file modified admin/code/GroupImportForm.php 100644 → 100755
Empty file.
43 changes: 33 additions & 10 deletions admin/code/LeftAndMain.php 100644 → 100755
Expand Up @@ -20,29 +20,53 @@ class LeftAndMain extends Controller {
*/
static $url_base = "admin";

/**
* The current url segment attached to the LeftAndMain instance
*
* @var string
*/
static $url_segment;

/**
* @var string
*/
static $url_rule = '/$Action/$ID/$OtherID';

/**
* @var string
*/
static $menu_title;

/**
* @var int
*/
static $menu_priority = 0;

/**
* @var int
*/
static $url_priority = 50;

/**
* @var string A subclass of {@link DataObject}.
* Determines what is managed in this interface,
* through {@link getEditForm()} and other logic.
* A subclass of {@link DataObject}.
*
* Determines what is managed in this interface, through
* {@link getEditForm()} and other logic.
*
* @var string
*/
static $tree_class = null;

/**
* The url used for the link in the Help tab in the backend
* Value can be overwritten if required in _config.php
*/
* The url used for the link in the Help tab in the backend
*
* @var string
*/
static $help_link = 'http://userhelp.silverstripe.org';

/**
* @var array
*/
static $allowed_actions = array(
'index',
'savetreenode',
Expand All @@ -62,7 +86,7 @@ class LeftAndMain extends Controller {
);

/**
* Register additional requirements through the {@link Requirements class}.
* Register additional requirements through the {@link Requirements} class.
* Used mainly to work around the missing "lazy loading" functionality
* for getting css/javascript required after an ajax-call (e.g. loading the editform).
*
Expand All @@ -76,6 +100,7 @@ class LeftAndMain extends Controller {

/**
* @param Member $member
*
* @return boolean
*/
function canView($member = null) {
Expand Down Expand Up @@ -192,7 +217,6 @@ function init() {
$htmlEditorConfig->setOption('content_css', implode(',', $cssFiles));
}

Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/layout.css');
Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/screen.css');

Requirements::javascript(THIRDPARTY_DIR . '/prototype/prototype.js');
Expand Down Expand Up @@ -239,8 +263,6 @@ function init() {
// Handled by LeftAndMain.js
Requirements::block(SAPPHIRE_DIR . '/javascript/DateField.js');

Requirements::themedCSS('typography');

foreach (self::$extra_requirements['javascript'] as $file) {
Requirements::javascript($file[0]);
}
Expand Down Expand Up @@ -315,6 +337,7 @@ function ShowSwitchView() {
return false;
}


//------------------------------------------------------------------------------------------//
// Main controllers

Expand Down
Empty file modified admin/code/LeftAndMainDecorator.php 100644 → 100755
Empty file.
Empty file modified admin/code/LeftAndMainExtension.php 100644 → 100755
Empty file.
Empty file modified admin/code/MemberImportForm.php 100644 → 100755
Empty file.
Empty file modified admin/code/SecurityAdmin.php 100644 → 100755
Empty file.
Empty file modified admin/config.rb 100644 → 100755
Empty file.
Empty file modified admin/css/_old/MemberImportForm.css 100644 → 100755
Empty file.
Empty file modified admin/css/_old/ModelAdmin.css 100644 → 100755
Empty file.
Empty file modified admin/css/_old/SecurityAdmin.css 100644 → 100755
Empty file.
Empty file modified admin/css/_old/cms_left.css 100644 → 100755
Empty file.
Empty file modified admin/css/_old/cms_right.css 100644 → 100755
Empty file.
Empty file modified admin/css/_old/layout.css 100644 → 100755
Empty file.
Empty file modified admin/css/_old/silverstripe.tabs.css 100644 → 100755
Empty file.
Empty file modified admin/css/_old/typography.css 100644 → 100755
Empty file.
Empty file modified admin/css/_old/unjquery.css 100644 → 100755
Empty file.
Empty file modified admin/css/layout.css 100644 → 100755
Empty file.
119 changes: 73 additions & 46 deletions admin/css/screen.css 100644 → 100755

Large diffs are not rendered by default.

Empty file modified admin/images/arrow_refresh.gif 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed admin/images/icons-32.png
Binary file not shown.
Empty file modified admin/images/logo.gif 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/images/logo_small.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified admin/images/logout.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/images/mainmenu/current.gif 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/images/mainmenu/currentHover.gif 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/images/mainmenu/hover.gif 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/images/spinner.gif 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/images/textures/footerBg.gif 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/images/textures/mce_editor.gif 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified admin/javascript/.DS_Store 100644 → 100755
Empty file.
Empty file modified admin/javascript/AssetTableField.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/LeftAndMain.AddForm.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/LeftAndMain.BatchActions.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/LeftAndMain.EditForm.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/LeftAndMain.Preview.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/LeftAndMain.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/MemberImportForm.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/ModelAdmin.History.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/ModelAdmin.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/jquery-changetracker/README.md 100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified admin/javascript/jquery-changetracker/spec/.tmp_spec.html.8678~ 100644 → 100755
Empty file.
Empty file modified admin/javascript/jquery-changetracker/spec/.tmp_spec.html.970~ 100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified admin/javascript/jquery-changetracker/spec/spec.core.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/jquery-changetracker/spec/spec.dom.html 100644 → 100755
Empty file.
Empty file modified admin/javascript/jquery-changetracker/spec/spec.rhino.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/jquery-changetracker/vendor/TrivialReporter.js 100644 → 100755
Empty file.
Empty file modified admin/javascript/jquery-changetracker/vendor/jasmine.css 100644 → 100755
Empty file.
Empty file modified admin/javascript/jquery-changetracker/vendor/jquery-1.3.2.js 100644 → 100755
Empty file.
Empty file.
Empty file modified admin/javascript/jquery-fitheighttoparent/test.html 100644 → 100755
Empty file.
Empty file modified admin/javascript/jquery-fitheighttoparent/tests/unit.html 100644 → 100755
Empty file.
Empty file modified admin/javascript/ssui.core.js 100644 → 100755
Empty file.
44 changes: 0 additions & 44 deletions admin/scss/_colours.scss

This file was deleted.

Empty file modified admin/scss/_forms.scss 100644 → 100755
Empty file.
155 changes: 103 additions & 52 deletions admin/scss/_menu.scss 100644 → 100755
@@ -1,92 +1,143 @@
/**
* Styles for the left hand side menu
*
* @package sapphire
* @subpackage admin
*/
/** -------------------------------------------------------
* CMS Menu Bar
* -------------------------------------------------------- */
@import "compass/css3";

.cms-menu {
z-index: 10;
background-color: $color-widget-bg;
@include box-shadow($color-shadow-light, 3px, 0, 3px);
background: $color-menu-background;
border-right: 1px solid $color-menu-border;
width: 250px;
overflow: auto;

@include box-shadow($color-shadow-dark, 2px, 0, 6px);

a {
text-decoration: none;
}
}

.cms-menu-list {
li {
background-color: $color-base;
@include linear-gradient(color-stops(
$color-base,
darken($color-base, 20%)
));
border-bottom: 1px solid $color-shadow-light;

a {
display: block;
height: 32px;
height: 30px;
line-height: 30px;
vertical-align: middle;
font-size: 14px;
@include text-shadow($color-shadow-light);
font-size: $font-base-size;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-shadow: lighten($color-base, 10%) 1px 1px 0;
color: $color-text-dark;
padding: 5px;
background-color: $color-base;

@include linear-gradient(color-stops(
$color-base,
darken($color-base, 8%)
));

border-top: 1px solid lighten($color-base, 10%);
border-bottom: 1px solid darken($color-base, 20%);

&:hover {
text-decoration: none;
background-color: lighten($color-base, 2%);
border-bottom: 1px solid darken($color-base, 15%);
color: lighten($color-text-dark, 5%);

@include linear-gradient(color-stops(
lighten($color-base, 5%),
$color-base
));
}
&:focus {
border-top: 1px solid darken($color-base, 5%);
text-decoration: none;
background-color: darken($color-base, 5%);
color: lighten($color-text-dark, 10%);

@include linear-gradient(color-stops(
darken($color-base, 10%),
darken($color-base, 5%)
));
}

.icon {
display: block;
float: left;
margin-right: 5px;
margin-right: 4px;
@include sprite-background("icons-32.png");
@include sprite-position(1, 1);
}

.text {
display: block;
padding-top: 10px;
}
}

&.current {
background-color: $color-menu-button;
@include linear-gradient(color-stops(
$color-menu-button,
darken($color-menu-button, 20%)
));

li {
background-color: darken($color-menu-button, 5%);
a {
color: $color-text-light;
text-shadow: darken($color-menu-button, 20%) 0 -1px 0;
border-top: 1px solid lighten($color-menu-button, 10%);
border-bottom: 1px solid darken($color-menu-button, 20%);
background-color: $color-menu-button;
@include linear-gradient(color-stops(
darken($color-menu-button, 5%),
$color-menu-button,
darken($color-menu-button, 10%)
));
}

a {
color: $color-text-light;
@include text-shadow($color-shadow-dark);
}
}

// nested elements
li {


&:first {
@include box-shadow($color-shadow-dark, 0, 4px, 4px);
}

a {
font-size: 12px;
@include text-shadow($color-shadow-dark);
margin: 0;
padding-left: 30px;
color: $color-text-light;
ul {
border-top: 1px solid darken($color-menu-button, 20%);
}

&.current a {
font-weight: bold;
li {
background-color: darken($color-menu-button, 10%);

a {
font-size: $font-small-size;
padding: 0 10px 0 36px;
height: 32px;
line-height: 32px;
color: lighten($color-menu-button, 45%);
background: none;
border-top: 1px solid $color-menu-button;
border-bottom: 1px solid darken($color-menu-button, 20%);

&.current,
&:hover {
background: darken($color-menu-button, 5%);
border-top: 1px solid darken($color-menu-button, 5%);
color: $color-text-light;
}

&:focus {
background: darken($color-menu-button, 15%);
border-top: 1px solid darken($color-menu-button, 20%);
color: lighten($color-menu-button, 60%);
}

}

&.current a {
font-weight: bold;
color: $color-text-light;
}

&.first a {
border-top: none;
}
}
}

}

li#Menu-CMSMain a .icon {@include sprite-position(1, 1);}
li#Menu-CMSMain.current a .icon, li#Menu-CMSMain a:hover .icon {@include sprite-position(2, 1);}
li#Menu-AssetAdmin a .icon {@include sprite-position(1, 2);}
li#Menu-AssetAdmin.current a .icon, li#Menu-AssetAdmin a:hover .icon {@include sprite-position(2, 2);}

}

0 comments on commit 6956275

Please sign in to comment.