diff --git a/templates/Sparkle/assets/css/main.css b/templates/Sparkle/assets/css/main.css
index 1f15bb3f..486f2b4c 100644
--- a/templates/Sparkle/assets/css/main.css
+++ b/templates/Sparkle/assets/css/main.css
@@ -929,4 +929,16 @@ label.nobr {
caption {
font-weight:700;
margin-bottom:.2em;
+}
+
+.scrollup {
+ width:40px;
+ height:40px;
+ opacity:0.3;
+ position:fixed;
+ bottom:15px;
+ left:100px;
+ display:none;
+ text-indent:-9999px;
+ background: url(../img/top.png) no-repeat;
}
\ No newline at end of file
diff --git a/templates/Sparkle/assets/img/top.png b/templates/Sparkle/assets/img/top.png
new file mode 100644
index 00000000..8ec2d6b3
Binary files /dev/null and b/templates/Sparkle/assets/img/top.png differ
diff --git a/templates/Sparkle/assets/js/main.js b/templates/Sparkle/assets/js/main.js
index c8c63842..53ab32ff 100644
--- a/templates/Sparkle/assets/js/main.js
+++ b/templates/Sparkle/assets/js/main.js
@@ -6,10 +6,19 @@ function twoDigits(value) {
}
$(document).ready(function() {
- // Format date in header
- var lastlogin = new Date($("#lastlogin").text() * 1000);
- //var d = Date.parse(lastlogin);
- $("#lastlogin").text(lastlogin.getFullYear() + "-" + twoDigits(lastlogin.getMonth()) + "-" + twoDigits(lastlogin.getDate()) + " " + twoDigits(lastlogin.getHours()) + ":" + twoDigits(lastlogin.getMinutes()) + ":" + twoDigits(lastlogin.getSeconds()));
+ // Scroll to top
+ $(window).scroll(function() {
+ if ($(this).scrollTop() > 100) {
+ $('.scrollup').fadeIn();
+ } else {
+ $('.scrollup').fadeOut();
+ }
+ });
+
+ $('.scrollup').click(function() {
+ $("html, body").animate({ scrollTop: 0 }, 600);
+ return false;
+ });
// this is necessary for the special setting feature (ref #1010)
$.getQueryVariable = function(key) {
@@ -40,22 +49,12 @@ $(document).ready(function() {
// make rel="external" links open in a new window
$("a[rel='external']").attr('target', '_blank');
$(".main").css('min-height', $("nav").height() - 134);
- //$(".dboarditem:last").css('min-height', $(".dboarditem:first").height());
- //$(".dboarditem:first").css('min-height', $(".dboarditem:last").height());
-
+
// set focus on username-field if on loginpage
if ($(".loginpage").length != 0) {
$("#loginname").focus();
}
- /*if ($("table.formtable").length != 0) {
- $("table.formtable tr").hover(function() {
- $(this).css("background-color", "#f5f5f5");
- }, function() {
- $(this).css("background-color", "#fff");
- });
- }*/
-
if ($("table.bradiusodd").length != 0) {
$("table.bradiusodd tbody tr").hover(function() {
$(this).css("background-color", "#f5f5f5");
diff --git a/templates/Sparkle/footer.tpl b/templates/Sparkle/footer.tpl
index ffbde3ce..2be72311 100644
--- a/templates/Sparkle/footer.tpl
+++ b/templates/Sparkle/footer.tpl
@@ -10,5 +10,6 @@
{$lng['panel']['translator']}: {$lng['translator']}
+Scroll