Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Squashed '3.0/themes/pear4gallery3/' changes from 11c3c2a..08def4b

08def4b nicer flow and better handling of thumb padding
f1ead59 fix for scrolling even when hovering over a thumb
9a094c2 sidebar overflow fix

git-subtree-dir: 3.0/themes/pear4gallery3
git-subtree-split: 08def4bcfbd4bc35e9bac0ed3868fa0b2413986b
  • Loading branch information...
commit 5929bd2774d45590561f4a8ae1b263409cad5ae9 1 parent f17acfd
@fredrike fredrike authored
Showing with 6 additions and 28 deletions.
  1. +3 −4 css/pear.css
  2. +1 −22 js/pear.js
  3. +2 −2 views/album.html.php
View
7 css/pear.css
@@ -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
23 js/pear.js
@@ -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
4 views/album.html.php
@@ -48,6 +48,7 @@
<? 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 @@
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 @@
</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"): ?>
Please sign in to comment.
Something went wrong with that request. Please try again.