merge with the latest Wind theme changes
This commit is contained in:
parent
f8e91efb43
commit
732eaa0741
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
// Initialize Superfish menus
|
// Initialize Superfish menus
|
||||||
$("#g-site-admin-menu .g-menu").hide().addClass("sf-menu");
|
$("#g-site-admin-menu .g-menu").hide().addClass("sf-menu");
|
||||||
$("#g-site-admin-menu .g-menu").superfish({
|
$("#g-site-admin-menu .g-menu").superfish({
|
||||||
|
@ -54,7 +54,9 @@ $(document).ready(function(){
|
||||||
$(".g-available .g-block").addClass("ui-corner-all");
|
$(".g-available .g-block").addClass("ui-corner-all");
|
||||||
$(".g-unavailable").addClass("ui-corner-all");
|
$(".g-unavailable").addClass("ui-corner-all");
|
||||||
|
|
||||||
|
// Remove titles for menu options since we're displaying that text anyway
|
||||||
|
$(".sf-menu a, .sf-menu li").removeAttr("title");
|
||||||
|
|
||||||
// Initialize button hover effect
|
// Initialize button hover effect
|
||||||
$.fn.gallery_hover_init();
|
$.fn.gallery_hover_init();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -43,6 +43,9 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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
|
// Album and search results views
|
||||||
if ($("#g-album-grid").length) {
|
if ($("#g-album-grid").length) {
|
||||||
// Set equal height for album items and vertically align thumbnails/metadata
|
// Set equal height for album items and vertically align thumbnails/metadata
|
||||||
|
@ -87,9 +90,18 @@ $(document).ready(function() {
|
||||||
$(this).css("top", 0).css("left", 0);
|
$(this).css("top", 0).css("left", 0);
|
||||||
// Remove the placeholder and hover class from the item
|
// Remove the placeholder and hover class from the item
|
||||||
$(this).removeClass("g-hover-item");
|
$(this).removeClass("g-hover-item");
|
||||||
|
$(this).gallery_valign();
|
||||||
$("#g-place-holder").remove();
|
$("#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() {
|
||||||
|
$(".g-item").each(function() {
|
||||||
|
$(this).height($(this).find("img").height() + 2);
|
||||||
|
});
|
||||||
|
$(".g-item").equal_heights().gallery_valign();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Photo/Item item view
|
// Photo/Item item view
|
||||||
|
|
|
@ -4,10 +4,23 @@
|
||||||
<!-- Use javascript to show the full size as an overlay on the current page -->
|
<!-- Use javascript to show the full size as an overlay on the current page -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
full_dims = [<?= $theme->item()->width ?>, <?= $theme->item()->height ?>];
|
||||||
$(".g-fullsize-link").click(function() {
|
$(".g-fullsize-link").click(function() {
|
||||||
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, "<?= $theme->item()->width ?>", "<?= $theme->item()->height ?>");
|
$.gallery_show_full_size(<?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// After the image is rotated or replaced we have to reload the image dimensions
|
||||||
|
// so that the full size view isn't distorted.
|
||||||
|
$("#g-photo").bind("gallery.change", function() {
|
||||||
|
$.ajax({
|
||||||
|
url: "<?= url::site("items/dimensions/" . $theme->item()->id) ?>",
|
||||||
|
dataType: "json",
|
||||||
|
success: function(data, textStatus) {
|
||||||
|
full_dims = data.full;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<? endif ?>
|
<? endif ?>
|
||||||
|
|
Reference in New Issue
Block a user