1
0

updated paginator with support for hash

This commit is contained in:
Fredrik Erlandsson 2011-11-15 09:51:33 +01:00
parent 6a13dab2c9
commit 5c21b24ff4
3 changed files with 26 additions and 22 deletions

View File

@ -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;
}

View File

@ -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>

View File

@ -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 ?>
&nbsp;
</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 ?>
&nbsp;
</li>
</ul>
<? endif ?>