diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-10-20 16:54:30 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-10-20 16:54:30 -0400 |
commit | 5892d600044758a1b9f17adfe1c77d4c6a898a90 (patch) | |
tree | fa3f863c79030316f91afaf7b92bee96153ad3c9 /src | |
parent | c47e78f70d49ba694eb0b452a0bcdc9b12d8a626 (diff) | |
download | pfsense-5892d600044758a1b9f17adfe1c77d4c6a898a90.zip pfsense-5892d600044758a1b9f17adfe1c77d4c6a898a90.tar.gz |
Show "Top of page" arrows only when required (page > window)
Diffstat (limited to 'src')
-rwxr-xr-x | src/usr/local/www/foot.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/usr/local/www/foot.inc b/src/usr/local/www/foot.inc index 5b84e0c..52f459e 100755 --- a/src/usr/local/www/foot.inc +++ b/src/usr/local/www/foot.inc @@ -12,11 +12,11 @@ <footer class="footer"> <div class="container"> <p class="text-muted"> - <a href="#" title="<?=gettext('Top of page')?>"><i class="icon icon-arrow-up pull-left"></i></a> + <a id="tpl" style="display: none;" href="#" title="<?=gettext('Top of page')?>"><i class="icon icon-arrow-up pull-left"></i></a> <a target="_blank" href="<?=$g['product_website_footer']?>"><?=$g['product_name']?></a> is © <?=$g['product_copyright_years']?> by <a href="<?=$g['product_copyright_url']?>" class="tblnk"><?=$g['product_copyright']?></a>. All Rights Reserved. [<a href="/license.php" class="tblnk">view license</a>] - <a href="#" title="<?=gettext('Top of page')?>"><i class="icon icon-arrow-up pull-right"></i></a> + <a id="tpr" style="display: none;" href="#" title="<?=gettext('Top of page')?>"><i class="icon icon-arrow-up pull-right"></i></a></span> </p> </div> </footer> @@ -27,5 +27,11 @@ <script src="/jquery/pfSense.js"></script> <script src="/jquery/pfSenseHelpers.js"></script> + <script> + // Un-hide the "Top of page" icons if the page is larger than the window + if ($(document).height() > $(window).height()) { + $('[id^=tp]').show(); + } + </script> </body> </html> |