From 55cd2afde539842d54bd79fb7bdced37e5e53101 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Sat, 24 Jan 2009 20:06:13 +0000 Subject: Admin theme style cleanup. Merged separate selected, available, unavailable into a single set of reusable classes. Applied alternating row bg colors. Removed inline CSS from admin views. Moved user admin css into admin_default theme style sheet. --- core/controllers/admin_graphics.php | 1 + core/views/admin_graphics.html.php | 12 +- core/views/admin_graphics_gd.html.php | 2 +- core/views/admin_graphics_graphicsmagick.html.php | 2 +- core/views/admin_graphics_imagemagick.html.php | 2 +- core/views/admin_maintenance.html.php | 6 +- core/views/admin_modules.html.php | 4 +- core/views/admin_themes.html.php | 144 ++++++++-------- lib/gallery.dialog.js | 3 + modules/akismet/views/admin_akismet_stats.html.php | 2 +- .../views/admin_block_recent_comments.html.php | 4 +- modules/comment/views/admin_comments.html.php | 4 +- modules/tag/views/admin_tags.html.php | 4 +- modules/user/views/admin_groups.html.php | 2 +- modules/user/views/admin_users.html.php | 65 ------- themes/admin_default/css/screen.css | 186 +++++++++++---------- themes/admin_default/js/ui.init.js | 93 ++++++----- 17 files changed, 244 insertions(+), 292 deletions(-) diff --git a/core/controllers/admin_graphics.php b/core/controllers/admin_graphics.php index fe71a222..f0855660 100644 --- a/core/controllers/admin_graphics.php +++ b/core/controllers/admin_graphics.php @@ -28,6 +28,7 @@ class Admin_Graphics_Controller extends Admin_Controller { if ($id == $active) { $view->content->active = new View("admin_graphics_$id.html"); $view->content->active->tk = $tk; + $view->content->active->is_active = true; } else { $v = new View("admin_graphics_$id.html"); $v->tk = $tk; diff --git a/core/views/admin_graphics.html.php b/core/views/admin_graphics.html.php index c5e32320..9cf54ccd 100644 --- a/core/views/admin_graphics.html.php +++ b/core/views/admin_graphics.html.php @@ -2,12 +2,12 @@ @@ -17,12 +17,10 @@

-
-

- -
+

+ -
+

diff --git a/core/views/admin_graphics_gd.html.php b/core/views/admin_graphics_gd.html.php index 8c645f4f..605e09ff 100644 --- a/core/views/admin_graphics_gd.html.php +++ b/core/views/admin_graphics_gd.html.php @@ -1,5 +1,5 @@ -
"> +
gd["GD Version"] ? "" : " gUnavailable" ?>"> " alt="" />

diff --git a/core/views/admin_graphics_graphicsmagick.html.php b/core/views/admin_graphics_graphicsmagick.html.php index bb4f906d..8196289e 100644 --- a/core/views/admin_graphics_graphicsmagick.html.php +++ b/core/views/admin_graphics_graphicsmagick.html.php @@ -1,5 +1,5 @@ -

"> +
graphicsmagick ? "" : " gUnavailable" ?>">

" alt="" />

diff --git a/core/views/admin_graphics_imagemagick.html.php b/core/views/admin_graphics_imagemagick.html.php index 7898a8d1..1166ff71 100644 --- a/core/views/admin_graphics_imagemagick.html.php +++ b/core/views/admin_graphics_imagemagick.html.php @@ -1,5 +1,5 @@ -

"> +
imagemagick ? "" : " gUnavailable" ?>">

" alt="" />

diff --git a/core/views/admin_maintenance.html.php b/core/views/admin_maintenance.html.php index b893ed0d..c2e28276 100644 --- a/core/views/admin_maintenance.html.php +++ b/core/views/admin_maintenance.html.php @@ -7,7 +7,7 @@

- +
@@ -41,7 +41,7 @@

- +
- - + $comment): ?> + "> - - + $tag): ?> + ">
@@ -100,7 +100,7 @@

- +
+ $module_info): ?> - + "> $module_name); ?> locked) $data["disabled"] = 1; ?> @@ -23,6 +24,7 @@ +
diff --git a/core/views/admin_modules.html.php b/core/views/admin_modules.html.php index 53af2116..fa303320 100644 --- a/core/views/admin_modules.html.php +++ b/core/views/admin_modules.html.php @@ -14,8 +14,9 @@
version ?> description) ?>
"/> diff --git a/core/views/admin_themes.html.php b/core/views/admin_themes.html.php index 43328b3a..3bf246a4 100644 --- a/core/views/admin_themes.html.php +++ b/core/views/admin_themes.html.php @@ -7,85 +7,83 @@ } -
-

-

- -

+

+

+ +

-
-

-
- " - alt="name ?>" /> -

name ?>

-

- description ?> -

+
+

+
+ " + alt="name ?>" /> +

name ?>

+

+ description ?> +

+
+ +

+ - -

- -

- -
+
+

+
+ " + alt="name ?>" /> +

name ?>

+

+ description ?> +

-
-

-
- " - alt="name ?>" /> -

name ?>

-

- description ?> -

+

+ -
+
\ No newline at end of file diff --git a/lib/gallery.dialog.js b/lib/gallery.dialog.js index 6309e75a..eb87533e 100644 --- a/lib/gallery.dialog.js +++ b/lib/gallery.dialog.js @@ -95,6 +95,9 @@ function showLoading(element) { case "#gDialog": size = "Large"; break; + case "#gPanel": + size = "Large"; + break; default: size = "Small"; break; diff --git a/modules/akismet/views/admin_akismet_stats.html.php b/modules/akismet/views/admin_akismet_stats.html.php index d82704cd..41bad15b 100644 --- a/modules/akismet/views/admin_akismet_stats.html.php +++ b/modules/akismet/views/admin_akismet_stats.html.php @@ -5,7 +5,7 @@ });
-
diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php index 39d39929..d641d9ae 100644 --- a/modules/comment/views/admin_block_recent_comments.html.php +++ b/modules/comment/views/admin_block_recent_comments.html.php @@ -1,7 +1,7 @@
    - -
  • + $comment): ?> +
  • "> " class="gAvatar" alt="author_name() ?>" diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index c5bbc2b6..14b18e91 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -93,8 +93,8 @@
" diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php index 5e9613b1..8700fc09 100644 --- a/modules/tag/views/admin_tags.html.php +++ b/modules/tag/views/admin_tags.html.php @@ -17,8 +17,8 @@
name ?> count ?> diff --git a/modules/user/views/admin_groups.html.php b/modules/user/views/admin_groups.html.php index a2ad652f..c1b7dbde 100644 --- a/modules/user/views/admin_groups.html.php +++ b/modules/user/views/admin_groups.html.php @@ -6,7 +6,7 @@
    $group): ?> -
  • +
  • "> name ?> "> diff --git a/modules/user/views/admin_users.html.php b/modules/user/views/admin_users.html.php index b4673aec..8b585a36 100644 --- a/modules/user/views/admin_users.html.php +++ b/modules/user/views/admin_users.html.php @@ -1,69 +1,4 @@ - -

    diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css index e1f468c0..c2b903dd 100644 --- a/themes/admin_default/css/screen.css +++ b/themes/admin_default/css/screen.css @@ -9,18 +9,62 @@ **********************************************************************/ .gBlock { + background-color: #fff; border: 1px solid #e7e7e7; margin-bottom: 1em; - padding: 1em .4em; + padding: 1em; } .gBlockContent { padding: 0 1em 1em 1em; } +.gSelected img, +.gAvailable img { + float: left; + margin-right: 1em; +} + +.gSelected { + background: #cfc; +} + +.gAvailable .gBlock { + cursor: pointer; +} + +.gAvailable .gBlock:hover { + background: #eee; +} + +.gUnavailable { + border-color: #ccc; + cursor: default; + opacity: 0.4; +} + +.gUnavailable:hover { + opacity: 1; +} + +.gFirstRow { + border-bottom: 1px solid #ccc; + padding-bottom: .5em; + padding-left: 30px !important; +} + +.gOddRow { + background-color: #eee; +} + +.gEvenRow { + background-color: #fff; +} + /** ******************************************************************* * Page layout containers **********************************************************************/ + .gView { min-width: 974px !important; } @@ -82,118 +126,80 @@ margin-bottom: 0; } -/** ******************************************************************* - * Browser hacks - *********************************************************************/ - -#gHeader:after, -#gAdminCommentsMenu:after, -#gThemeTabs:after, -#gSelectedTheme .gBlock:after { - clear: both; - content: "."; - display: block; - height: 0; - visibility: hidden; +.gButtonLink { + border-width: 1px; + border-style: solid; + border-color: #ececec #c8c8c8 #c8c8c8 #ececec; + background-image: url('/gallery3/themes/admin_default/images/backg-buttonlink.png'); + padding: .2em .3em; + font-weight: bold; } -/** ******************************************************************* - * Stuff that needs a home or needs to be organized - *********************************************************************/ - -#gAdminGraphics #gSelectedToolkit img { - float: right; - margin-right: 1em; +.gButtonLink:hover { + border-color: #c8c8c8 #ececec #ececec #c8c8c8; } -#gAdminGraphics #gSelectedToolkit div.gBlock { - width: 700px; - height: 140px; - background: #cfc; -} - -#gAdminGraphics .gBlock { - background: #fff; - padding: 1em; -} - -#gAdminGraphics #gAvailableToolkits .gBlock { - clear: none; - cursor: pointer; - float: left; - margin-right: 1em; - text-align: center; - width: 250px; -} - -#gAdminGraphics #gAvailableToolkits .gBlock { - width: 328px; - height: 300px; -} - -#gAdminGraphics #gAvailableToolkits .unavailable { - background-color: #fee !important; - cursor: default !important; -} - -#gAdminGraphics #gAvailableToolkits .gBlock:hover { - background: #eee; +.gBlock h2 a { + font-size: .7em; + float: right; + position: relative; + top: -1.69em; } -#gAdminGraphics a { - color: #333; +.gUserAdminList li { + padding: .4em .4em .3em .4em; + position: relative; } -#gAdminGraphics #gAvailableToolkits .gBlock { - cursor: pointer; +.gUserAdminList li img { + width: 20px; + height: 20px; + cursor: move; } - -#gAdminThemes #gAdminTheme, -#gAdminThemes #gSiteTheme { - width: 400px; - float: left; +.gActions { + position: absolute; + left: 400px; } -#gAdminThemes #gAdminTheme { - padding-left: 40px; +.gActions a, +.gActions span { + margin-right: 40px; } - -#gAdminThemes #gSelectedTheme img { - float: left; - margin-right: 1em; +#gPanel { + display: none; + padding: 1em; } -#gAdminThemes .selected { - background: #cfc !important; - cursor: default !important; +#gPanel legend { + display: none; } -#gAdminThemes .gBlock { - width: 328px; - height: 140px; - background: #fff; - padding: 1em; - text-align: center; +#gPanel fieldset { + border: none; } -#gAdminThemes .gBlock { - clear: none; - cursor: pointer; +li.gGroup { float: left; - text-align: center; - width: 328px; + display: block; + width: 200px; height: 200px; + border: 1px solid gray; + padding: .5em; + margin-right: 1em; } -#gAvailableSiteThemes .gBlock:hover, -#gAvailableAdminThemes .gBlock:hover { - background: #eee; -} +/** ******************************************************************* + * Browser hacks + *********************************************************************/ -#gAdminThemes a { - color: #333; - text-decoration: none; +#gHeader:after, +#gAdminCommentsMenu:after, +.gSelected:after { + clear: both; + content: "."; + display: block; + height: 0; + visibility: hidden; } - diff --git a/themes/admin_default/js/ui.init.js b/themes/admin_default/js/ui.init.js index 4ccc5b75..79da8695 100644 --- a/themes/admin_default/js/ui.init.js +++ b/themes/admin_default/js/ui.init.js @@ -26,48 +26,57 @@ $(document).ready(function(){ $(panelLinks[i]).bind("click", {element: panelLinks[i]}, handlePanelEvent); } - function handlePanelEvent(event) { - togglePanel(event.data.element); - event.preventDefault(); +}); + +function handlePanelEvent(event) { + togglePanel(event.data.element); + event.preventDefault(); +} + +function togglePanel(element, on_success) { + var parent = $(element).parent().parent(); + var sHref = $(element).attr("href"); + var ePanel = '
    '; + + if ($("#gPanel").length) { + $("#gPanel").slideUp("slow"); + $("#gPanel *").remove(); + $("#gPanel").remove(); } - function togglePanel(element, on_success) { - var parent = $(element).parent().parent(); - var sHref = $(element).attr("href"); - var ePanel = '
    '; - if ($(parent).children(".gPanel").length) { - console.log("In here"); - $(parent).children(".gPanel").slideToggle("slow"); - } else { - $(parent).append(ePanel); - var panel = $(parent).children(".gPanel"); - $(panel).html(sHref); - panel.show().slideDown("slow"); - $.get(sHref, function(data) { - $(panel).html(data); - ajaxify_panel = function() { - $(".gPanel form").ajaxForm({ - dataType: "json", - success: function(data) { - if (data.form) { - $(".gPanel form").replaceWith(data.form); - ajaxify_panel(); - } - if (data.result == "success") { - if (on_success) { - on_success(); - } else if (data.location) { - window.location = data.location; - } else { - window.location.reload(); - } - } - } - }); - }; - ajaxify_panel(); + $(parent).append(ePanel); + + var panel = $(parent).children("#gPanel"); + + showLoading("#gPanel"); + + $(panel).html(sHref); + panel.show().slideDown("slow"); + + $.get(sHref, function(data) { + $(panel).html(data); + ajaxify_panel = function() { + $("#gPanel form").ajaxForm({ + dataType: "json", + success: function(data) { + if (data.form) { + $("#gPanel form").replaceWith(data.form); + ajaxify_panel(); + } + if (data.result == "success") { + if (on_success) { + on_success(); + } else if (data.location) { + window.location = data.location; + } else { + window.location.reload(); + } + } + } }); - } - return false; - } -}); + showLoading("#gPanel"); + }; + ajaxify_panel(); + }); + return false; +} -- cgit v1.2.3