mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 19:39:16 -04:00
60 lines
1.7 KiB
JavaScript
60 lines
1.7 KiB
JavaScript
$(document).ready(function(){
|
|
// Initialize Superfish menus
|
|
$("#g-site-admin-menu ul.g-menu").addClass("sf-menu");
|
|
$("ul.g-menu").addClass("sf-menu");
|
|
$("ul.sf-menu").superfish({
|
|
delay: 500,
|
|
animation: {
|
|
opacity: "show",
|
|
height: "show"
|
|
},
|
|
pathClass: "current",
|
|
speed: "fast"
|
|
});
|
|
$("#g-site-admin-menu").css("display", "block");
|
|
|
|
// Initialize status message effects
|
|
$("#g-action-status li").gallery_show_message();
|
|
|
|
// Initialize modal dialogs
|
|
$(".g-dialog-link").gallery_dialog();
|
|
|
|
// Initialize ajax links
|
|
$(".g-ajax-link").gallery_ajax();
|
|
|
|
// Initialize panels
|
|
$(".g-panel-link").gallery_panel();
|
|
|
|
if ($("#g-photo-stream").length) {
|
|
// Vertically align thumbs in photostream
|
|
$(".g-item").gallery_valign();
|
|
}
|
|
|
|
// Apply jQuery UI button css to submit inputs
|
|
$("input[type=submit]:not(.g-short-form input)").addClass("ui-state-default ui-corner-all");
|
|
|
|
// Round view menu buttons
|
|
if ($("#g-admin-comments-menu").length) {
|
|
$("#g-admin-comments-menu ul").removeClass("g-menu").removeClass("sf-menu");
|
|
$("#g-admin-comments-menu").addClass("g-buttonset");
|
|
$("#g-admin-comments-menu a").addClass("g-button ui-state-default");
|
|
$("#g-admin-comments-menu ul li:first a").addClass("ui-corner-left");
|
|
$("#g-admin-comments-menu ul li:last a").addClass("ui-corner-right");
|
|
}
|
|
|
|
// Round corners
|
|
$(".g-selected").addClass("ui-corner-all");
|
|
$(".g-available .g-block").addClass("ui-corner-all");
|
|
$(".g-unavailable").addClass("ui-corner-all");
|
|
|
|
// Add hover state for buttons
|
|
$(".ui-state-default").hover(
|
|
function() {
|
|
$(this).addClass("ui-state-hover");
|
|
},
|
|
function() {
|
|
$(this).removeClass("ui-state-hover");
|
|
}
|
|
);
|
|
});
|