summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gallery.common.js4
-rw-r--r--themes/wind/js/ui.init.js10
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 0bd14915..eb57c86c 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -88,8 +88,8 @@
* @return object
*/
$.fn.gallery_get_photo = function() {
- var photo = $(this).find("img").filter(function() {
- return this.id.match(/g-photo-id-\d+/);
+ var photo = $(this).find("img,object").filter(function() {
+ return this.id.match(/g-(photo|movie)-id-\d+/);
});
return photo;
};
diff --git a/themes/wind/js/ui.init.js b/themes/wind/js/ui.init.js
index be03b6a8..f9fb8519 100644
--- a/themes/wind/js/ui.init.js
+++ b/themes/wind/js/ui.init.js
@@ -63,8 +63,8 @@ $(document).ready(function() {
// Set the hover item's height
$(this).height("auto");
var context_menu = $(this).find(".g-context-menu");
- var adj_height = $(this).height() + context_menu.height();
- $(this).height(adj_height);
+ var adj_height = $(this).height() + context_menu.height();
+ $(this).height(adj_height);
},
function() {
// Reset item height and position
@@ -87,12 +87,12 @@ $(document).ready(function() {
}
// Photo/Item item view
- if ($("#g-photo").length) {
+ if ($("#g-photo,#g-movie").length) {
// Ensure the resized image fits within its container
- $("#g-photo").gallery_fit_photo();
+ $("#g-photo,#g-movie").gallery_fit_photo();
// Initialize context menus
- var resize = $("#g-photo").gallery_get_photo();
+ var resize = $("#g-photo,#g-movie").gallery_get_photo();
$(resize).hover(function(){
$(this).gallery_context_menu();
});