Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorjulien <julien@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-01-30 03:51:41 +0300
committerjulien <julien@59fd770c-687e-43c8-a1e3-f5a4ff64c105>2008-01-30 03:51:41 +0300
commit566170538353022b78919dd7c32a756763b42f2d (patch)
treea4a57836afd18dedd1d7047172d2a620c236b02b /themes
parent4ae1e85ae970a25ca36fc85f2b6fd5698c9aa52d (diff)
-Draft implementation of the Dashboard
-Scroll to on datatable reload -Modified initialisation calls of dataTables to facilitate ajax loading
Diffstat (limited to 'themes')
-rw-r--r--themes/default/common.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/themes/default/common.js b/themes/default/common.js
index 37b6224287..0013824264 100644
--- a/themes/default/common.js
+++ b/themes/default/common.js
@@ -52,4 +52,18 @@ function getStandardAjaxConf()
ajaxRequest.success = ajaxHandleResponse;
return ajaxRequest;
-} \ No newline at end of file
+}
+
+//scroll the window to the jquery element 'elem' if necessary
+//time specify the duration of the animation in ms
+function lazyScrollTo(elem, time)
+{
+ var elemTop = $(elem).offset().top;
+ //only scroll the page if the graph is not visible
+ if(elemTop < $(window).scrollTop()
+ || elemTop > $(window).scrollTop()+$(window).height())
+ {
+ //scroll the page smoothly to the graph
+ $.scrollTo(elem, time);
+ }
+}