1
0

Merge commit '5929bd2774d45590561f4a8ae1b263409cad5ae9'

This commit is contained in:
Fredrik Erlandsson 2012-01-11 14:16:07 +01:00
commit 768fec3fe7
3 changed files with 6 additions and 28 deletions

View File

@ -3,15 +3,14 @@ body {
}
.g-hover-item {
border: 0px solid #000;
position: absolute !important;
position: relative !important;
z-index: 11 !important;
display: block;
}
#g-place-holder {
position: relative;
visibility: hidden;
z-index: 1;
position: absolute;
display: none;
}
.gallery-thumb {
float: left;

View File

@ -24,7 +24,7 @@ function thumbPadding() {
var size, width, margin;
/* Padding on thumbs to make them flow nicer */
size = Math.ceil((mosaicView) ? $('#imgSlider').slider('value') / 2 : $('#imgSlider').slider('value')) + 10;
width = $('#mosaicGridContainer').innerWidth() - 15;
width = $('#mosaicGridContainer').innerWidth() - 16;
margin = width / Math.floor(width / size) - size;
// console.log(size, width, margin, "px");
$('.gallery-thumb').css({'margin-left': Math.ceil(margin / 2) + 'px', 'margin-right': Math.floor(margin / 2) + 'px'});
@ -523,36 +523,15 @@ function bodyLoad(vm, bgcolor) {
var placeHolder = $(this).clone().attr("id", "g-place-holder");
$(this).after($(placeHolder));
// Style and position the hover item
var position = $(this).position();
$(this).css("top", position.top).css("left", position.left);
$(this).addClass("g-hover-item");
// Initialize the contextual menu
$(this).gallery_context_menu();
// 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();
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() {
var sib_height;
if (mosaicView) { return; }
// Reset item height and position
if ($(this).next().height()) {
sib_height = $(this).next().height();
} else {
sib_height = $(this).prev().height();
}
if ($.browser.msie && $.browser.version >= 8) {
sib_height = sib_height + 1;
}
$(this).css({"height": "", "position": "", "top": "", "left": ""});
// Remove the placeholder and hover class from the item
$(this).removeClass("g-hover-item");
$("#g-place-holder").remove();

View File

@ -48,6 +48,7 @@ else print $mosaic_effect;
<? if ($child->is_album() || $child->is_movie()): ?>
<div class="gallery-thumb-round"></div>
<? endif ?>
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
<? if ($child->has_thumb()): ?>
<?= $child->thumb_img(array("class" => $img_class, "id" => "thumb_$child->id", "style" => "width: 200px; height 200px;")) ?>
<? else: ?>
@ -71,7 +72,6 @@ if($child->is_album()):
endforeach;
endif;
// End skimming // ?>
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
<p class="giTitle <? if(!$child->is_album()) print 'center';?>"><?= html::purify(text::limit_chars($child->title, 20)) ?> </p>
<? if($child->is_album()): ?><div class="giInfo"><?= count($granchildren)?> photos</div><? endif ?>
</div>
@ -106,7 +106,7 @@ endif;
</div>
<? if (module::get_var("th_pear4gallery3", "sidebar_view") != ''): ?>
</td><td>
<div id="sidebarContainer">
<div id="sidebarContainer" style="overflow-y: auto;">
<div id="sidebarBorder" style="background-color: darkGrey; width: 5px; height: 100%; position: absolute;"></div>
<div id="sidebar" class="sidebar" style="width: 220px; position: aboslute; padding-left: 5px;">
<? if ($theme->page_subtype != "login"): ?>