Skip to content
This repository has been archived by the owner on Apr 7, 2018. It is now read-only.

Commit

Permalink
Merge commit '5929bd2774d45590561f4a8ae1b263409cad5ae9'
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrike committed Jan 11, 2012
2 parents d4c8341 + 5929bd2 commit 768fec3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 28 deletions.
7 changes: 3 additions & 4 deletions 3.0/themes/pear4gallery3/css/pear.css
Expand Up @@ -3,15 +3,14 @@ body {
} }
.g-hover-item { .g-hover-item {
border: 0px solid #000; border: 0px solid #000;
position: absolute !important; position: relative !important;
z-index: 11 !important; z-index: 11 !important;
display: block; display: block;
} }


#g-place-holder { #g-place-holder {
position: relative; position: absolute;
visibility: hidden; display: none;
z-index: 1;
} }
.gallery-thumb { .gallery-thumb {
float: left; float: left;
Expand Down
23 changes: 1 addition & 22 deletions 3.0/themes/pear4gallery3/js/pear.js
Expand Up @@ -24,7 +24,7 @@ function thumbPadding() {
var size, width, margin; var size, width, margin;
/* Padding on thumbs to make them flow nicer */ /* Padding on thumbs to make them flow nicer */
size = Math.ceil((mosaicView) ? $('#imgSlider').slider('value') / 2 : $('#imgSlider').slider('value')) + 10; 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; margin = width / Math.floor(width / size) - size;
// console.log(size, width, margin, "px"); // console.log(size, width, margin, "px");
$('.gallery-thumb').css({'margin-left': Math.ceil(margin / 2) + 'px', 'margin-right': Math.floor(margin / 2) + 'px'}); $('.gallery-thumb').css({'margin-left': Math.ceil(margin / 2) + 'px', 'margin-right': Math.floor(margin / 2) + 'px'});
Expand Down Expand Up @@ -523,36 +523,15 @@ function bodyLoad(vm, bgcolor) {
var placeHolder = $(this).clone().attr("id", "g-place-holder"); var placeHolder = $(this).clone().attr("id", "g-place-holder");
$(this).after($(placeHolder)); $(this).after($(placeHolder));
// Style and position the hover item // Style and position the hover item
var position = $(this).position();
$(this).css("top", position.top).css("left", position.left);
$(this).addClass("g-hover-item"); $(this).addClass("g-hover-item");
// Initialize the contextual menu // Initialize the contextual menu
$(this).gallery_context_menu(); $(this).gallery_context_menu();
// Set the hover item's height // Set the hover item's height
$(this).height("auto"); $(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() { function() {
var sib_height; var sib_height;
if (mosaicView) { return; } 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 // Remove the placeholder and hover class from the item
$(this).removeClass("g-hover-item"); $(this).removeClass("g-hover-item");
$("#g-place-holder").remove(); $("#g-place-holder").remove();
Expand Down
4 changes: 2 additions & 2 deletions 3.0/themes/pear4gallery3/views/album.html.php
Expand Up @@ -48,6 +48,7 @@
<? if ($child->is_album() || $child->is_movie()): ?> <? if ($child->is_album() || $child->is_movie()): ?>
<div class="gallery-thumb-round"></div> <div class="gallery-thumb-round"></div>
<? endif ?> <? endif ?>
<?= $theme->context_menu($child, "#g-item-id-{$child->id} .g-thumbnail") ?>
<? if ($child->has_thumb()): ?> <? if ($child->has_thumb()): ?>
<?= $child->thumb_img(array("class" => $img_class, "id" => "thumb_$child->id", "style" => "width: 200px; height 200px;")) ?> <?= $child->thumb_img(array("class" => $img_class, "id" => "thumb_$child->id", "style" => "width: 200px; height 200px;")) ?>
<? else: ?> <? else: ?>
Expand All @@ -71,7 +72,6 @@
endforeach; endforeach;
endif; endif;
// End skimming // ?> // 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> <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 ?> <? if($child->is_album()): ?><div class="giInfo"><?= count($granchildren)?> photos</div><? endif ?>
</div> </div>
Expand Down Expand Up @@ -106,7 +106,7 @@
</div> </div>
<? if (module::get_var("th_pear4gallery3", "sidebar_view") != ''): ?> <? if (module::get_var("th_pear4gallery3", "sidebar_view") != ''): ?>
</td><td> </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="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;"> <div id="sidebar" class="sidebar" style="width: 220px; position: aboslute; padding-left: 5px;">
<? if ($theme->page_subtype != "login"): ?> <? if ($theme->page_subtype != "login"): ?>
Expand Down

0 comments on commit 768fec3

Please sign in to comment.