diff options
author | Chad Kieffer <chad@2tbsp.com> | 2009-02-15 22:36:51 +0000 |
---|---|---|
committer | Chad Kieffer <chad@2tbsp.com> | 2009-02-15 22:36:51 +0000 |
commit | d04dbadfa1c9a2ed6823ac2ffd64d8f68f27581c (patch) | |
tree | 011f4011b1c98b83f65d5cd17ac67400b7ad70be | |
parent | 6c59a196772b6d6c6b2b969b85c1a2551ef017d8 (diff) |
Apply buttons to comment moderation and action buttons, beginnings of a photo stream carousel block in admin dashboard.
-rw-r--r-- | core/views/admin_block_photo_stream.html.php | 16 | ||||
-rw-r--r-- | modules/comment/views/admin_comments.html.php | 81 | ||||
-rw-r--r-- | themes/admin_default/css/screen.css | 46 | ||||
-rw-r--r-- | themes/admin_default/js/ui.init.js | 33 |
4 files changed, 125 insertions, 51 deletions
diff --git a/core/views/admin_block_photo_stream.html.php b/core/views/admin_block_photo_stream.html.php index f7889a9c..e8a4d933 100644 --- a/core/views/admin_block_photo_stream.html.php +++ b/core/views/admin_block_photo_stream.html.php @@ -1,10 +1,14 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<p> - Recent photos added to your Gallery -</p> +<ul> <? foreach ($photos as $photo): ?> -<a href="<?= url::site("photos/$photo->id") ?>" title="<?= $photo->title ?>"> - <img <?= photo::img_dimensions($photo->width, $photo->height, 72) ?> + <li class="gItem gPhoto"> + <a href="<?= url::site("photos/$photo->id") ?>" title="<?= $photo->title ?>"> + <img <?= photo::img_dimensions($photo->width, $photo->height, 72) ?> src="<?= $photo->thumb_url() ?>" alt="<?= $photo->title ?>" /> -</a> + </a> + </li> <? endforeach ?> +</ul> +<p> + <?= t("Recent photos added to your Gallery") ?> +</p> diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php index 14b18e91..ea405197 100644 --- a/modules/comment/views/admin_comments.html.php +++ b/modules/comment/views/admin_comments.html.php @@ -121,49 +121,44 @@ <?= $comment->text ?> </td> <td> - <ul> - <? if ($comment->state != "unpublished"): ?> - <li> - <a href="javascript:set_state('unpublished',<?=$comment->id?>)"> - <?= t("Unapprove") ?> - </a> - </li> - <? endif ?> - - <? if ($comment->state != "published"): ?> - <li> - <a href="javascript:set_state('published',<?=$comment->id?>)"> - <?= t("Approve") ?> - </a> - </li> - <? endif ?> - - <? if ($comment->state != "spam"): ?> - <li> - <a href="javascript:set_state('spam',<?=$comment->id?>)"> - <?= t("Spam") ?> - </a> - </li> - <? endif ?> - - <li> - <a href="javascript:reply(<?=$comment->id?>)"> - <?= t("Reply") ?> - </a> - </li> - - <li> - <a href="javascript:Edit(<?=$comment->id?>)"> - <?= t("Edit") ?> - </a> - </li> - - <li> - <a href="javascript:set_state('deleted',<?=$comment->id?>)"> - <?= t("Delete") ?> - </a> - </li> - </ul> + <div class="gButtonSetVertical"> + <? if ($comment->state != "unpublished"): ?> + <a href="javascript:set_state('unpublished',<?=$comment->id?>)" + class="gButtonLink ui-state-default ui-icon-left"> + <span class="ui-icon ui-icon-check"></span> + <?= t("Unapprove") ?> + </a> + <? endif ?> + <? if ($comment->state != "published"): ?> + <a href="javascript:set_state('published',<?=$comment->id?>)" + class="gButtonLink ui-state-default ui-icon-left"> + <span class="ui-icon ui-icon-check"></span> + <?= t("Approve") ?> + </a> + <? endif ?> + <? if ($comment->state != "spam"): ?> + <a href="javascript:set_state('spam',<?=$comment->id?>)" + class="gButtonLink ui-state-default ui-icon-left"> + <span class="ui-icon ui-icon-cancel"></span> + <?= t("Spam") ?> + </a> + <? endif ?> + <a href="javascript:reply(<?=$comment->id?>)" + class="gButtonLink ui-state-default ui-icon-left"> + <span class="ui-icon ui-icon-arrowreturnthick-1-w"></span> + <?= t("Reply") ?> + </a> + <a href="javascript:Edit(<?=$comment->id?>)" + class="gButtonLink ui-state-default ui-icon-left"> + <span class="ui-icon ui-icon-pencil"></span> + <?= t("Edit") ?> + </a> + <a href="javascript:set_state('deleted',<?=$comment->id?>)" + class="gButtonLink ui-state-default ui-icon-left"> + <span class="ui-icon ui-icon-trash"></span> + <?= t("Delete") ?> + </a> + </div> </td> </tr> <? endforeach ?> diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css index 334db071..85c76c2a 100644 --- a/themes/admin_default/css/screen.css +++ b/themes/admin_default/css/screen.css @@ -69,7 +69,7 @@ #gHeader { background-color: #e8e8e8; border-bottom: 1px solid #ccc; - margin-top: 0; + margin-bottom: 20px; padding: 0 20px; } @@ -114,14 +114,52 @@ background: none; } +#gPhotoStream { + background-color: #e8e8e8; +} + #gPhotoStream .gBlockContent { - overflow: auto; + +} + +#gPhotoStream .gBlockContent ul { + border-right: 1px solid #e8e8e8; + height: 92px; + overflow: hidden; + white-space: nowrap; + width: 100%; +} + +#gContent #gPhotoStream .gItem { + background-color: #fff; + border: 1px solid #e8e8e8; + border-right-color: #ccc; + border-bottom-color: #ccc; + float: left; + font-size: .7em; + height: 90px; + overflow: hidden; + text-align: center; + width: 90px; } #gSiteStatus { margin-bottom: 0; } +#gAdminCommentsMenu { + margin: 1em 0; +} + +#gAdminCommentsMenu li { + float: left; +} + +#gAdminCommentsMenu a { + margin: 0; + padding: .2em .6em; +} + #gAdminGraphics .gAvailable .gBlock { clear: none; float: left; @@ -196,3 +234,7 @@ li.gGroup { .ui-sortable { cursor: move; } + +.gButtonSetVertical a { + width: 8em; +} diff --git a/themes/admin_default/js/ui.init.js b/themes/admin_default/js/ui.init.js index d43a5f1d..120b04ba 100644 --- a/themes/admin_default/js/ui.init.js +++ b/themes/admin_default/js/ui.init.js @@ -20,6 +20,21 @@ $(document).ready(function(){ $(dialogLinks[i]).bind("click", handleDialogEvent); } + if ($("#gPhotoStream").length) { + // Vertically align thumbs in photostream + $('.gItem').vAlign(); + } + + // Round view menu buttons + if ($("#gAdminCommentsMenu").length) { + $("#gAdminCommentsMenu ul").removeClass("gMenu").removeClass("sf-menu"); + $("#gAdminCommentsMenu").addClass("gToolBar"); + $("#gAdminCommentsMenu ul").addClass("gButtonSet"); + $("#gAdminCommentsMenu a").addClass("gButtonLink ui-state-default"); + $("#gAdminCommentsMenu ul li:first a").addClass("ui-corner-left"); + $("#gAdminCommentsMenu ul li:last a").addClass("ui-corner-right"); + } + // Apply hide/show functionality on user admin view var panelLinks = $(".gPanelLink"); for (i=0; i<panelLinks.length; i++) { @@ -137,4 +152,22 @@ function togglePanel(element, on_success) { return false; } +// Vertically align a block element's content +(function ($) { + $.fn.vAlign = function(container) { + return this.each(function(i){ + if (container == null) { + container = 'div'; + } + $(this).html("<" + container + ">" + $(this).html() + "</" + container + ">"); + var el = $(this).children(container + ":first"); + var elh = $(el).height(); + var ph = $(this).height(); + var nh = (ph - elh) / 2; + $(el).css('margin-top', nh); + }); + }; +})(jQuery); + + |