diff options
author | sgiehl <stefan@piwik.org> | 2015-12-22 03:48:26 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-12-22 03:48:26 +0300 |
commit | b26070eecb0a2ca15f3a052243a4a6d4109519e8 (patch) | |
tree | 78ef090b5a375418fd225a63c2c8f329d7905dc7 /plugins/SitesManager/templates | |
parent | 6e089e9f3afd0290cce04b91e9e58a6622b7a3fc (diff) |
split text; use live widget logic to reload page as soon as a visit was tracked
Diffstat (limited to 'plugins/SitesManager/templates')
-rw-r--r-- | plugins/SitesManager/templates/siteWithoutData.twig | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/SitesManager/templates/siteWithoutData.twig b/plugins/SitesManager/templates/siteWithoutData.twig index 2cd2f2f852..498d2ee765 100644 --- a/plugins/SitesManager/templates/siteWithoutData.twig +++ b/plugins/SitesManager/templates/siteWithoutData.twig @@ -8,6 +8,22 @@ {% block content %} + <script type="text/javascript" charset="utf-8"> + $(document).ready(function () { + $('<div />').insertAfter('.site-without-data').liveWidget({ + interval: 1000, + onUpdate: function () { + // reload page as soon as a visit was detected + document.location.reload(); + }, + dataUrlParams: { + module: 'Live', + action: 'getLastVisitsStart' + } + }); + }); + </script> + <div class="site-without-data"> <h2>{{ 'SitesManager_SiteWithoutDataTitle'|translate }}</h2> @@ -21,6 +37,7 @@ </p> <p> + {{ 'SitesManager_SiteWithoutDataMessageDisappears'|translate }} {{ 'SitesManager_SiteWithoutDataSetupGoals'|translate('<a href="' ~ linkTo({ 'module': 'Goals', 'action': 'manage', |