Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Refs #1120

Adding missing js to hook +  Minor updates
  • Loading branch information...
commit c44d4ad35d06655cc889cd538b1622ef7e4cc962 1 parent cd61fc4
matt authored
View
1  plugins/Live/Live.php
@@ -48,6 +48,7 @@ function getJsFiles( $notification )
$jsFiles = &$notification->getNotificationObject();
$jsFiles[] = "plugins/Live/templates/scripts/spy.js";
+ $jsFiles[] = "plugins/Live/templates/scripts/live.js";
}
function addMenu()
View
52 plugins/Live/templates/index.tpl
@@ -1,33 +1,37 @@
{literal}
<script type="text/javascript" charset="utf-8">
- $(document).ready(function() {
- if($('#_spyTmp').size() == 0) {
- $('#visitsLive > div:gt(2)').fadeEachDown(); // initial fade
- $('#visitsLive').spy({
- limit: 10,
- ajax: 'index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=getLastVisitsStart',
- fadeLast: 2,
- isDupe: check_for_dupe,
- timeout: 8000,
- customParameterName: 'minIdVisit',
- customParameterValueCallback: lastIdVisit,
- fadeInSpeed: 600
- });
- }
- });
+$(document).ready(function() {
+ initSpy();
+});
- // updates the numbers of total visits in startbox
- function updateTotalVisits()
- {
- $("#visitsTotal").load("index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=ajaxTotalVisitors");
- }
- // updates the visit table, to refresh the already presented visitors pages
- function updateVisitBox()
- {
- $("#visitsLive").load("index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=getLastVisitsStart");
+function initSpy()
+{
+ if($('#_spyTmp').size() == 0) {
+ $('#visitsLive > div:gt(2)').fadeEachDown(); // initial fade
+ $('#visitsLive').spy({
+ limit: 10,
+ ajax: 'index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=getLastVisitsStart',
+ fadeLast: 2,
+ isDupe: check_for_dupe,
+ timeout: 8000,
+ customParameterName: 'minIdVisit',
+ customParameterValueCallback: lastIdVisit,
+ fadeInSpeed: 600
+ });
}
+}
+//updates the numbers of total visits in startbox
+function updateTotalVisits()
+{
+ $("#visitsTotal").load("index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=ajaxTotalVisitors");
+}
+//updates the visit table, to refresh the already presented visitors pages
+function updateVisitBox()
+{
+ $("#visitsLive").load("index.php?module=Live&idSite={/literal}{$idSite}{literal}&action=getLastVisitsStart");
+}
</script>
{/literal}
View
9 plugins/Live/templates/live.css
@@ -46,7 +46,14 @@
#visitsLive .returning {
background:#F9FAFA none repeat scroll 0 0;
}
-
+.visitsLiveFooter img {
+ vertical-align:middle;
+}
+ .visitsLiveFooter {
+ line-height:2.5em;
+ }
+
+
.visitsLiveFooter a.rightLink{
float:right;
padding-right:20px;
View
18 plugins/Live/templates/scripts/live.js
@@ -1,19 +1,25 @@
+
// first I'm ensuring that 'last' has been initialised (with last.constructor == Object),
// then prev.html() == last.html() will return true if the HTML is the same, or false,
// if I have a different entry.
function check_for_dupe(prev, last)
{
-if (last.constructor == Object) {
- return (prev.html() == last.html());
-}
-else {
- return 0;
-}
+ if (last.constructor == Object)
+ {
+ return (prev.html() == last.html());
+ }
+ else
+ {
+ return 0;
+ }
}
+
+
function lastIdVisit()
{
updateTotalVisits();
updateVisitBox();
+
return $('#visitsLive > div:lt(2) .idvisit').html();
}
var pauseImage = "plugins/Live/templates/images/pause.gif";
View
6 plugins/Live/templates/visitorLog.tpl
@@ -1,6 +1,6 @@
-<div class="home" id="content" style="display: block;"><a graphid="VisitsSummarygetEvolutionGraph" name="evolutionGraph"></a>
-<h2>Besucherverlauf</h2>
-
+<div class="home" id="content" style="display: block;">
+<a graphid="VisitsSummarygetEvolutionGraph" name="evolutionGraph"></a>
+<h2>{'Live_VisitorLog'|translate}</h2>
<div id="{$properties.uniqueId}">
{if isset($arrayDataTable.result) and $arrayDataTable.result == 'error'}
Please sign in to comment.
Something went wrong with that request. Please try again.