From e9e67713794bfc3c0eb537521ad447ab32823c3b Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Thu, 19 Aug 2010 15:37:45 -0500 Subject: [PATCH] make everything look uniform --- lib/WebGUI/Admin.pm | 35 ++++++----- www/extras/admin/admin.css | 61 +++++++++++------- www/extras/admin/admin.js | 8 ++- www/extras/macro/AdminBar/slidePanel.css | 79 +----------------------- 4 files changed, 64 insertions(+), 119 deletions(-) diff --git a/lib/WebGUI/Admin.pm b/lib/WebGUI/Admin.pm index b3c4c7d2c..88591593c 100644 --- a/lib/WebGUI/Admin.pm +++ b/lib/WebGUI/Admin.pm @@ -486,7 +486,7 @@ sub www_view { $style->setLink( $url->extras('yui/build/datatable/assets/skins/sam/datatable.css'), {rel=>'stylesheet', type=>'text/css'}); $style->setLink( $url->extras('yui/build/container/assets/skins/sam/container.css'), {rel=>'stylesheet', type=>'text/css'}); $style->setLink( $url->extras('yui/build/menu/assets/skins/sam/menu.css'), {rel=>'stylesheet', type=>'text/css'}); - $style->setLink( $url->extras('yui-webgui/build/assetManager/assetManager.css' ), { rel => "stylesheet", type => 'text/css' } ); + #$style->setLink( $url->extras('yui-webgui/build/assetManager/assetManager.css' ), { rel => "stylesheet", type => 'text/css' } ); $style->setLink( $url->extras('macro/AdminBar/slidePanel.css'), {type=>'text/css', rel=>'stylesheet'}); $style->setLink( $url->extras('admin/admin.css'), { type=>'text/css', rel=>'stylesheet'} ); $style->setScript($url->extras('yui/build/yahoo-dom-event/yahoo-dom-event.js')); @@ -521,12 +521,13 @@ __DATA__
^International("admin console","AdminConsole");
- - - icon - - - +
    + +
  • );"> + +
  • +
    +
^International('version tags','VersionTag');
@@ -543,26 +544,27 @@ __DATA__
^International('asset helpers','WebGUI');
-

+

-

^International('history','Asset');

+

^International('history','Asset');

^International('1083','Macro_AdminBar');
-
+
+
@@ -571,22 +573,21 @@ __DATA__
diff --git a/www/extras/admin/admin.css b/www/extras/admin/admin.css index cf99230ac..84529eec4 100644 --- a/www/extras/admin/admin.css +++ b/www/extras/admin/admin.css @@ -103,6 +103,11 @@ text-decoration: underline; } +.with_icon { + padding: 0 0 0 20px; + background: no-repeat 2px 50%; +} + img.icon { vertical-align: baseline; } @@ -114,17 +119,11 @@ a:link { #helper_asset_name { font-size: 14pt; margin-left: 5px; - padding-left: 20px; - background-repeat: no-repeat; - background-position: 0 50%; } #assetHelpers_pane h2 { font-size: 14pt; margin-left: 5px; - padding-left: 20px; - background-repeat: no-repeat; - background-position: 0 50%; } #infoMessageContainer { @@ -139,9 +138,6 @@ a:link { width: 100%; height: 100%; background-color: #ccf; - background-position: 0 50%; - background-repeat: no-repeat; - padding-left: 20px; } #infoMessage * { @@ -154,29 +150,52 @@ a:link { padding: 2px; } -#newContentBar a { - display: block; - height: 24px; - font-size: 12px; - padding-left: 4px; -} - -#newContentBar a:link, #newContentBar a:visited, #newContentBar a:active { +#adminBar a:link, #adminBar a:visited, #adminBar a:active { text-decoration: none; color: black; } -#helper_list, #history_list { +#helper_list, #history_list, #admin_list, .new_content_list { list-style-type: none; - margin: 0 0 0 1.5em; + margin: 0; padding: 0; } -#helper_list li, #history_list li { +#helper_list li, #history_list li, #admin_list a, .new_content_list li { color: black; + margin: 0; + line-height: 18px; + font-size: 10pt; + white-space: nowrap; } -#helper_list li.clickable:hover, #history_list li.clickable:hover { +#helper_list li.clickable:hover, #history_list li.clickable:hover, #admin_list li.clickable:hover, +.new_content_list li.clickable:hover, #adminBar a:hover, #adminBar li:hover a { text-decoration: underline; color: blue; } + +#helper_list li, #history_list li { + margin-left: 10px; +} + +dl.accordion-menu dt.a-m-t { + color: black; + margin: 0; + padding: 0; + background: #dddddd url(../yui/build/assets/skins/sam/sprite.png) repeat-x; + height: 20px; + border: 1px solid #ACACAC; + text-align:center; +} + +dl.accordion-menu dt.a-m-t:hover { + background: #dddddd url(../yui/build/assets/skins/sam/sprite.png) repeat-x 0% -1300px; +} + +dl.accordion-menu dt.a-m-t.selected { + color: white; + background: #ddd url(../yui/build/assets/skins/sam/sprite.png) repeat-x 0% -1400px; + border-color: black; +} + diff --git a/www/extras/admin/admin.js b/www/extras/admin/admin.js index da8aad05b..0c830e408 100644 --- a/www/extras/admin/admin.js +++ b/www/extras/admin/admin.js @@ -46,7 +46,7 @@ WebGUI.Admin = function(cfg){ self.adminBar = new WebGUI.Admin.AdminBar( self.cfg.adminBarId, { expandMax : true } ); self.adminBar.afterShow.subscribe( self.updateAdminBar, self ); YAHOO.util.Event.on( window, 'load', function(){ self.adminBar.show( self.adminBar.dt[0].id ) } ); - self.newContentBar = new WebGUI.Admin.AdminBar( "newContentBar" ); + self.newContentBar = new WebGUI.Admin.AdminBar( "newContentBar", { expandMax : true } ); self.locationBar = new WebGUI.Admin.LocationBar( self.cfg.locationBarId ); self.afterNavigate.subscribe( self.locationBar.afterNavigate, self.locationBar ); if ( self.currentAssetDef ) { @@ -445,7 +445,7 @@ WebGUI.Admin.prototype.updateAssetHelpers for ( var i = 0; i < assetDef.helpers.length; i++ ) { var helper = assetDef.helpers[i]; var li = document.createElement('li'); - li.className = "clickable"; + li.className = "clickable with_icon"; li.appendChild( document.createTextNode( helper.label ) ); this.addHelperHandler( li, helper ); helperEl.appendChild( li ); @@ -687,7 +687,7 @@ WebGUI.Admin.prototype.updateAssetHistory for ( var i = 0; i < assetDef.revisions.length; i++ ) { var revisionDate = assetDef.revisions[i]; var li = document.createElement('li'); - li.className = "clickable"; + li.className = "clickable with_icon"; // Create a descriptive date string var rDate = new Date( revisionDate * 1000 ); // JS requires milliseconds @@ -1677,6 +1677,7 @@ WebGUI.Admin.AdminBar.prototype.show if ( this.currentId ) { // Close the current var old = this.ddById[ this.currentId ]; + YAHOO.util.Dom.removeClass( this.currentId, "selected" ); var oldHeight = this.getExpandHeight( old ); if ( !old.anim ) { old.anim = this.getAnim(this.current); @@ -1699,6 +1700,7 @@ WebGUI.Admin.AdminBar.prototype.show } var dd = this.ddById[ id ]; + YAHOO.util.Dom.addClass( id, "selected" ); if ( !dd.anim ) { dd.anim = this.getAnim(dd); diff --git a/www/extras/macro/AdminBar/slidePanel.css b/www/extras/macro/AdminBar/slidePanel.css index b0e260606..35264d7c4 100644 --- a/www/extras/macro/AdminBar/slidePanel.css +++ b/www/extras/macro/AdminBar/slidePanel.css @@ -2,10 +2,7 @@ dl.accordion-menu dd.a-m-d div.ncmct { width: 140px; border-bottom: 1px solid #bbbbbb; color: black; - font-weight: bold; - font-size: 12px; margin-bottom: 5px; - font-family: sans-serif; } dl.accordion-menu { @@ -25,27 +22,6 @@ dl#adminBar { width: 160px; } -dl.accordion-menu dt.a-m-t { - margin: 0; - padding: 0; - background-color:#dddddd; - background-image: url(btn_bg.jpg); - font-weight: bold; - height: 20px; - color: #444444; - border: 1px solid #ACACAC; - line-height: 20px; - font-size: 12px; - text-align:center; - font-family: sans-serif; -} - -dl.accordion-menu dt.a-m-t-hover{ - margin: 0; - padding: 0; - background:#cdcdcd; -} - dl.accordion-menu dt.a-m-t-down{ margin: 0; @@ -71,6 +47,7 @@ dl.accordion-menu dd.a-m-d { background-image: url(panel_bg.jpg); background-repeat: repeat-x; font-weight: normal; + overflow-x: hidden; } dl.accordion-menu dd.a-m-d .link, @@ -86,13 +63,11 @@ dl.accordion-menu dd.a-m-d .wgButton { font-family: sans-serif; cursor: pointer; font-weight: normal; - font-size: 12px; margin-bottom:5px; margin-left:2px; letter-spacing:0px; text-transform:none; font-variant:normal; - line-height:12px; } dl.accordion-menu dd.a-m-d .wgButton { @@ -105,58 +80,6 @@ dl.accordion-menu dd.a-m-d .wgButton { -moz-user-select: text; } -dl.accordion-menu dd.a-m-d .link img { -margin-left:-20px; -} - -dl.accordion-menu dd.a-m-d .link:hover, -dl.accordion-menu dd.a-m-d button.wgButton:hover span { - color: blue; - background-color: #F5F5F5; -} - -html.accordion-menu-js dd.a-m-d{ - margin: 0; - padding: 0; - display:none; -} - - -html.accordion-menu-js dd.a-m-d-expand { - margin: 0; - padding: 0; - display:block; -} - -html.accordion-menu-js dd.a-m-d-before-expand { - margin: 0; - padding: 0; - display:block; - position:relative; - z-index:-1; - opacity:0; - height:auto !important; - visibility:hidden; - overflow:visible; -} - - -html.accordion-menu-js dt.a-m-t-expand { - margin: 0; - padding: 0; - border-left-color:#222222; - color:black; - background:#c0c0c0; -} - -html.accordion-menu-js dd.a-m-d-anim { - margin: 0; - padding: 0; - overflow:hidden; - display:block; -} - - dl.accordion-menu dl.accordion-menu dt.a-m-t { background: #aaa; }