summaryrefslogtreecommitdiff
path: root/themes/wind_npk/js/ui.init.js
diff options
context:
space:
mode:
Diffstat (limited to 'themes/wind_npk/js/ui.init.js')
-rw-r--r--themes/wind_npk/js/ui.init.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/themes/wind_npk/js/ui.init.js b/themes/wind_npk/js/ui.init.js
index f9fb8519..a4fc0e2f 100644
--- a/themes/wind_npk/js/ui.init.js
+++ b/themes/wind_npk/js/ui.init.js
@@ -43,7 +43,10 @@ $(document).ready(function() {
});
}
- // Album view only
+ // Remove titles for menu options since we're displaying that text anyway
+ $(".sf-menu a, .sf-menu li").removeAttr("title");
+
+ // Album and search results views
if ($("#g-album-grid").length) {
// Set equal height for album items and vertically align thumbnails/metadata
$('.g-item').equal_heights().gallery_valign();
@@ -64,7 +67,13 @@ $(document).ready(function() {
$(this).height("auto");
var context_menu = $(this).find(".g-context-menu");
var adj_height = $(this).height() + context_menu.height();
- $(this).height(adj_height);
+ if ($(this).next().height() > $(this).height()) {
+ $(this).height($(this).next().height());
+ } else if ($(this).prev().height() > $(this).height()) {
+ $(this).height($(this).prev().height());
+ } else {
+ $(this).height(adj_height);
+ }
},
function() {
// Reset item height and position
@@ -92,8 +101,7 @@ $(document).ready(function() {
$("#g-photo,#g-movie").gallery_fit_photo();
// Initialize context menus
- var resize = $("#g-photo,#g-movie").gallery_get_photo();
- $(resize).hover(function(){
+ $("#g-photo,#g-movie").hover(function(){
$(this).gallery_context_menu();
});
@@ -103,6 +111,9 @@ $(document).ready(function() {
duration: 1000,
hash: true
});
+
+ $(this).find(".g-dialog-link").gallery_dialog();
+ $(this).find(".g-ajax-link").gallery_ajax();
}
// Initialize button hover effect