From f1e008a14f2dfb51d1204dad3deb19e2e3df16c8 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Fri, 28 Aug 2009 13:47:35 -0600 Subject: Don't clone hover item, apply styles to the original container. Contextual menu rotates are now immediately visible. Fixes ticket 667. --- themes/default/css/screen.css | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'themes/default/css') diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 55839c57..cc5f6bcb 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -406,7 +406,6 @@ form .gError, } #gSidebar { - background-color: #fff; font-size: .9em; padding: 0 20px; width: 220px; @@ -492,23 +491,13 @@ form .gError, width: 16px; } -#gContent #gAlbumGrid #gHoverItem { +#gContent #gAlbumGrid .gHoverItem { background-color: #fff; border: 1px solid #000; - display: none; - height: auto; - padding: 0; - position: absolute; - width: auto; - z-index: 100; -} - -#gContent #gAlbumGrid #gHoverItem .gItem { - border: none; } -#gContent #gHoverItem .gItem h2, -#gContent #gHoverItem .gItem .gMetadata { +#gContent .gHoverItem h2, +#gContent .gHoverItem .gMetadata { display: block; } @@ -647,15 +636,15 @@ form .gError, line-height: 1.6em; } -#gHoverItem .gContextMenu { +.gHoverItem .gContextMenu { display: block; } -#gHoverItem .gContextMenu li { +.gHoverItem .gContextMenu li { text-align: left; } -#gHoverItem .gContextMenu a:hover { +.gHoverItem .gContextMenu a:hover { text-decoration: none; } -- cgit v1.2.3 From 1d5262f9c354a8564f05a8a31b915ad479f4d361 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 28 Aug 2009 13:44:01 -0700 Subject: Fix ticket #591: reCaptcha always on the page. 1) move creating the "Add a comment" button into the comments.html.php 2) use $.get() to retrieve the comment add form --- modules/comment/helpers/comment_theme.php | 2 -- modules/comment/js/comment.js | 10 +++++++++- modules/comment/views/comments.html.php | 10 ++++++++-- themes/default/css/screen.css | 7 +++++++ themes/default/js/ui.init.js | 12 ------------ themes/default/views/movie.html.php | 3 --- themes/default/views/photo.html.php | 3 --- 7 files changed, 24 insertions(+), 23 deletions(-) (limited to 'themes/default/css') diff --git a/modules/comment/helpers/comment_theme.php b/modules/comment/helpers/comment_theme.php index b807e2cf..38a00b5c 100644 --- a/modules/comment/helpers/comment_theme.php +++ b/modules/comment/helpers/comment_theme.php @@ -26,7 +26,6 @@ class comment_theme_Core { static function photo_bottom($theme) { $block = new Block; $block->css_id = "gComments"; - $block->anchor = t("comments"); $block->title = t("Comments"); $view = new View("comments.html"); @@ -37,7 +36,6 @@ class comment_theme_Core { ->find_all(); $block->content = $view; - $block->content .= comment::get_add_form($theme->item())->render("form.html"); return $block; } } \ No newline at end of file diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js index 00fc6027..9fd63c1a 100644 --- a/modules/comment/js/comment.js +++ b/modules/comment/js/comment.js @@ -1,5 +1,13 @@ $("document").ready(function() { - ajaxify_comment_form(); + $("#gAddCommentButton").click(function(event) { + event.preventDefault(); + $.get($(this).attr("href"), + {}, + function(data) { + $("#gCommentDetail").append(data); + ajaxify_comment_form(); + }); + }); }); function ajaxify_comment_form() { diff --git a/modules/comment/views/comments.html.php b/modules/comment/views/comments.html.php index f7251389..6dce9971 100644 --- a/modules/comment/views/comments.html.php +++ b/modules/comment/views/comments.html.php @@ -1,11 +1,17 @@ + id})") ?>" id="gAddCommentButton" + class="gButtonLink ui-corner-all ui-icon-left ui-state-default right"> + + + +
count()): ?>

comment!", array("attrs" => "href=\"#add_comment_form\" class=\"showCommentForm\"")) ?>

-
    +
    • @@ -26,4 +32,4 @@

    - +
diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index ecae2bb2..481581a2 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -530,6 +530,7 @@ form .gError, #gContent #gComments { margin-top: 2em; + position: relative; } #gContent #gComments ul li { @@ -561,6 +562,12 @@ form .gError, width: 32px; } +#gAddCommentButton { + position: absolute; + right: 0; + top: 2px; +} + #gContent #gAddCommentForm { margin-top: 2em; } diff --git a/themes/default/js/ui.init.js b/themes/default/js/ui.init.js index 2391f638..67cdb968 100644 --- a/themes/default/js/ui.init.js +++ b/themes/default/js/ui.init.js @@ -110,18 +110,6 @@ $(document).ready(function() { $(this).gallery_context_menu(); }); - // Collapse comments form, insert button to expand - if ($("#gAddCommentForm").length) { - var showCommentForm = '' - + '' + ADD_A_COMMENT + ''; - $("#gAddCommentForm").hide(); - $("#gComments").prepend(showCommentForm); - $(".showCommentForm").click(function(){ - $("#gAddCommentForm").show(1000); - }); - } - // Add scroll effect for links to named anchors $.localScroll({ queue: true, diff --git a/themes/default/views/movie.html.php b/themes/default/views/movie.html.php index c8ecd769..29789f8e 100644 --- a/themes/default/views/movie.html.php +++ b/themes/default/views/movie.html.php @@ -32,9 +32,6 @@
description)) ?>
- photo_bottom() ?> context_menu($item, "#gMovieId-{$item->id}") ?> diff --git a/themes/default/views/photo.html.php b/themes/default/views/photo.html.php index fa5def47..39e61ef6 100644 --- a/themes/default/views/photo.html.php +++ b/themes/default/views/photo.html.php @@ -55,8 +55,5 @@
description)) ?>
- photo_bottom() ?> -- cgit v1.2.3 From c428e49f3273f04fd220107b4992e6177aa1b265 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Fri, 28 Aug 2009 15:24:21 -0600 Subject: Make gMessage 100% of the width of its container. --- themes/admin_default/css/screen.css | 2 +- themes/default/css/screen.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'themes/default/css') diff --git a/themes/admin_default/css/screen.css b/themes/admin_default/css/screen.css index 88631e81..062c0e41 100644 --- a/themes/admin_default/css/screen.css +++ b/themes/admin_default/css/screen.css @@ -276,7 +276,7 @@ li.gError select { /* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ #gMessage { - width: 99%; + width: 100%; } #gAdminAkismet .gSuccess, diff --git a/themes/default/css/screen.css b/themes/default/css/screen.css index 26339e35..8a8f634a 100644 --- a/themes/default/css/screen.css +++ b/themes/default/css/screen.css @@ -276,7 +276,7 @@ li.gError select { /* Status messages ~~~~~~~~~~~~~~~~~~~~~~~ */ #gMessage { - width: 99%; + width: 100%; } #gAdminAkismet .gSuccess, -- cgit v1.2.3