updated paginator with support for hash
This commit is contained in:
parent
6a13dab2c9
commit
5c21b24ff4
@ -130,11 +130,13 @@ function getViewMode() {
|
||||
}
|
||||
|
||||
function updateHash() {
|
||||
var hash, img = "";
|
||||
var hash, img = "", val, i;
|
||||
if (currentImg !== 0) {
|
||||
img = "img=" + currentImg;
|
||||
}
|
||||
hash = "#" + img + getViewMode() + "&bgcolor=" + bgcolor;
|
||||
if($('#paginator')) { $('#paginator a').each(function () { val = $(this).attr("href"); i = val.indexOf("#"); if (i !== -1) { val = val.substr(0, i) } $(this).attr("href", val + hash); });
|
||||
}
|
||||
window.location.hash = hash;
|
||||
}
|
||||
|
||||
|
@ -2,21 +2,21 @@
|
||||
<? /* Placeholder for infromation in mosaic view. */ ?>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
bodyLoad( "<?=module::get_var("th_pear4gallery3", "mainmenu_view")?>",
|
||||
bodyLoad( "<?=module::get_var("th_pear4gallery3", "mainmenu_view")?>",
|
||||
"<?=module::get_var("th_pear4gallery3", "background")?>");
|
||||
});
|
||||
</script>
|
||||
<table id="mosaicTable" style="width: 100%; margin: -2px -2px 0px 0px; overflow: hidden">
|
||||
<table id="mosaicTable" style="width: 100%; margin: -2px -2px 0px 0px; overflow: hidden">
|
||||
<tr>
|
||||
<td class="left" style=" width: 65%; vertical-align: middle; padding: 0px;">
|
||||
<div id="gsImageView" class="gbBlock gcBorder1" style="padding: 0px !important; text-align: center;">
|
||||
<div style="padding: 0px; width: 0px; margin-top: 0px; opacity: 0.999999; display: none;" id="mosaicDetail">
|
||||
<div id="photo"> <img id="mosaicImg" src="" alt="Main image"/> </div>
|
||||
<div class="gsContentDetail" style="width: 100%;">
|
||||
<div id="gsImageView" class="gbBlock gcBorder1" style="padding: 0px !important; text-align: center;">
|
||||
<div style="padding: 0px; width: 0px; margin-top: 0px; opacity: 0.999999; display: none;" id="mosaicDetail">
|
||||
<div id="photo"> <img id="mosaicImg" src="" alt="Main image"/> </div>
|
||||
<div class="gsContentDetail" style="width: 100%;">
|
||||
<div class="gbBlock gcBorder1" id="imageTitle"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="right" style="margin: 0px; padding: 0px; width: 35%; vertical-align: top;">
|
||||
<div class="gallery-album" id="mosaicGridContainer" style="display: block;">
|
||||
@ -46,7 +46,7 @@ $(function() {
|
||||
<? if ($child->is_movie()): ?>
|
||||
<span class="p-video"></span>
|
||||
<? endif ?>
|
||||
<?// Begin skimming
|
||||
<?// Begin skimming
|
||||
if($child->is_album()):
|
||||
$granchildren = $child->viewable()->children();
|
||||
$offset = 0;
|
||||
@ -58,8 +58,8 @@ if($child->is_album()):
|
||||
<div class="skimm_div" style="height: 200px; width: <?=$step?>px; left: <?=$offset?>px; top: 0px;" onmouseover="$('#thumb_<?=$child->id?>').attr('src', '<?=$granchild->thumb_url()?>');skimimg=<?=$i-1?>;" id="area_<?=$granchild->id?>"></div>
|
||||
<? endif ?>
|
||||
<? $offset+=$step;
|
||||
endforeach;
|
||||
endif;
|
||||
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>
|
||||
@ -96,8 +96,8 @@ endif;
|
||||
<? endif; ?>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
<div id="pearFlowPadd" class="imageflow" style="display: none;"></div>
|
||||
<div id="pearImageFlow" class="imageflow" style="display: none;"> </div>
|
||||
<?= $theme->album_bottom() ?>
|
||||
|
||||
<?= $theme->paginator() ?>
|
||||
<div id="pearFlowPadd" class="imageflow" style="display: none;"></div>
|
||||
<div id="pearImageFlow" class="imageflow" style="display: none;"> </div>
|
||||
|
@ -30,15 +30,17 @@
|
||||
<li class="g-first">
|
||||
<? if ($page_type == "collection"): ?>
|
||||
<? if (isset($first_page_url)): ?>
|
||||
<a href="<?= $first_page_url ?>" class="buttonAction buttonFirst" title="<?= t("First") ?>"> </a>
|
||||
<a href="<?= $first_page_url ?>" class="g-button ui-icon-left ui-state-default ui-corner-all" style="float: left;">
|
||||
<span class="ui-icon ui-icon-seek-first"></span><?= t("First") ?></a>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
|
||||
<? if (isset($previous_page_url)): ?>
|
||||
<a href="<?= $previous_page_url ?>" class="buttonAction buttonPrev" title="<?= t("Previous") ?>"> </a>
|
||||
<a href="<?= $previous_page_url ?>" class="g-button ui-icon-left ui-state-default ui-corner-all" style="float: left;">
|
||||
<span class="ui-icon ui-icon-seek-prev"></span><?= t("Previous") ?></a>
|
||||
<? endif ?>
|
||||
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li class="g-info">
|
||||
<? if ($total): ?>
|
||||
@ -60,15 +62,15 @@
|
||||
|
||||
<li class="g-text-right">
|
||||
<? if ($page_type == "collection"): ?>
|
||||
<? if (isset($next_page_url)): ?>
|
||||
<a href="<?= $next_page_url ?>" class="g-button ui-icon-right ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-next"></span><?= t("Next") ?></a>
|
||||
<? endif ?>
|
||||
<? if (isset($last_page_url)): ?>
|
||||
<a href="<?= $last_page_url ?>" class="buttonAction buttonLast" title="<?= t("Last") ?>"> </a>
|
||||
<a href="<?= $last_page_url ?>" class="g-button ui-icon-right ui-state-default ui-corner-all">
|
||||
<span class="ui-icon ui-icon-seek-end"></span><?= t("Last") ?></a>
|
||||
<? endif ?>
|
||||
<? endif ?>
|
||||
<? if (isset($next_page_url)): ?>
|
||||
<a href="<?= $next_page_url ?>" class="buttonAction buttonNext" title="<?= t("Next") ?>"> </a>
|
||||
<? endif ?>
|
||||
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<? endif ?>
|
||||
|
Reference in New Issue
Block a user