From 91d4ffa68068dd194f3b789ab6cbc8f1aabe7627 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 9 Sep 2010 20:36:18 -0700 Subject: Change the color of the text in the close button to match the foreground color not the border color. --- modules/organize/lib/Gallery3WebClient.swf | Bin 148920 -> 148926 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/modules/organize/lib/Gallery3WebClient.swf b/modules/organize/lib/Gallery3WebClient.swf index 71daa2f9..356a1a2f 100644 Binary files a/modules/organize/lib/Gallery3WebClient.swf and b/modules/organize/lib/Gallery3WebClient.swf differ -- cgit v1.2.3 From 32878ebfdce943271824891639ab0384053bbadd Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 9 Sep 2010 21:04:18 -0700 Subject: Replace the hook function hack I introduced in cbba45fffc7368280e9529f55e108d0080175b6a with a namespaced jQuery custom event. This is way more portable. --- lib/gallery.common.js | 8 +++----- themes/wind/views/photo.html.php | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 69452f39..9fccc602 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -119,11 +119,9 @@ }; // Ajax handler for replacing an image, used in Ajax thumbnail rotation - $.gallery_replace_image = function(data, thumb) { - $(thumb).attr({src: data.src, width: data.width, height: data.height}); - if (typeof gallery_image_replaced_hook == 'function') { - gallery_image_replaced_hook(data, thumb); - } + $.gallery_replace_image = function(data, img_selector) { + $(img_selector).attr({src: data.src, width: data.width, height: data.height}); + $(img_selector).trigger("gallery.change"); }; // Initialize context menus diff --git a/themes/wind/views/photo.html.php b/themes/wind/views/photo.html.php index cb830e23..b42ab987 100644 --- a/themes/wind/views/photo.html.php +++ b/themes/wind/views/photo.html.php @@ -12,7 +12,7 @@ // After the image is rotated or replaced we have to reload the image dimensions // so that the full size view isn't distorted. - gallery_image_replaced_hook = function(data, thumb) { + $("#g-photo").bind("gallery.change", function() { $.ajax({ url: "item()->id) ?>", dataType: "json", @@ -20,7 +20,7 @@ full_dims = data.full; } }); - } + }); }); -- cgit v1.2.3 From 6211ed69d7a07d88b18c4db2928663c2cb76b1ba Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 9 Sep 2010 21:25:23 -0700 Subject: Vertically realign thumbnails after rotation so that they stay centered. Partial fix for #1354. --- lib/gallery.common.js | 8 ++++++-- themes/wind/js/ui.init.js | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/gallery.common.js b/lib/gallery.common.js index 9fccc602..548b2e7c 100644 --- a/lib/gallery.common.js +++ b/lib/gallery.common.js @@ -24,8 +24,12 @@ if (container == null) { container = 'div'; } - $(this).html("<" + container + " class=\"g-valign\">" + $(this).html() + ""); - var el = $(this).children(container + ".g-valign"); + var el = $(this).find(".g-valign"); + if (!el.length) { + $(this).html("<" + container + " class=\"g-valign\">" + $(this).html() + + ""); + el = $(this).children(container + ".g-valign"); + } var elh = $(el).height(); var ph = $(this).height(); var nh = (ph - elh) / 2; diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index a4fc0e2f..7637ad80 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -93,6 +93,11 @@ $(document).ready(function() { $("#g-place-holder").remove(); } ); + + // Realign any thumbnails that change so that when we rotate a thumb it stays centered. + $(".g-item").bind("gallery.change", function() { + $(this).gallery_valign(); + }); } // Photo/Item item view -- cgit v1.2.3 From 6e62d604a45b9bf1a60d04effb7eb08e7d15463c Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 9 Sep 2010 21:58:16 -0700 Subject: Resize the .g-item to contain the rotated image, and make all .g-item's the same height and realign the photo vertically, both on the .g-item and the hover placeholder. Fixes ticket #1354. --- themes/wind/js/ui.init.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js index 7637ad80..e5071dc1 100644 --- a/themes/wind/js/ui.init.js +++ b/themes/wind/js/ui.init.js @@ -90,13 +90,15 @@ $(document).ready(function() { $(this).css("top", 0).css("left", 0); // Remove the placeholder and hover class from the item $(this).removeClass("g-hover-item"); + $(this).gallery_valign(); $("#g-place-holder").remove(); } ); // Realign any thumbnails that change so that when we rotate a thumb it stays centered. $(".g-item").bind("gallery.change", function() { - $(this).gallery_valign(); + $(this).height($(this).find("img").height() + 2); + $(".g-item").equal_heights().gallery_valign(); }); } -- cgit v1.2.3