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

index.twig « templates « Live « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b0a9382b652f37b696fdaaf565d89f3bc500498c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<script type="text/javascript" charset="utf-8">
    $(document).ready(function () {
        var segment = broadcast.getValueFromUrl('segment');

        $('#visitsLive').liveWidget({
            interval: {{ liveRefreshAfterMs }},
            onUpdate: function () {
                //updates the numbers of total visits in startbox
                var ajaxRequest = new ajaxHelper();
                ajaxRequest.setFormat('html');
                ajaxRequest.addParams({
                    module: 'Live',
                    action: 'ajaxTotalVisitors',
                    segment: segment
                }, 'GET');
                ajaxRequest.setCallback(function (r) {
                    $("#visitsTotal").html(r);
                });
                ajaxRequest.send(false);
            },
            maxRows: 10,
            fadeInSpeed: 600,
            dataUrlParams: {
                module: 'Live',
                action: 'getLastVisitsStart',
                segment: segment
            }
        });
    });
</script>

{% include "@Live/_totalVisitors.twig" %}

{{ visitors|raw }}

{% spaceless %}
<div class="visitsLiveFooter">
    <a title="{{ 'Live_OnClickPause'|translate('Live_VisitorsInRealTime'|translate) }}" href="javascript:void(0);" onclick="onClickPause();">
        <img id="pauseImage" border="0" src="plugins/Live/images/pause.gif" />
    </a>
    <a title="{{ 'Live_OnClickStart'|translate('Live_VisitorsInRealTime'|translate) }}" href="javascript:void(0);" onclick="onClickPlay();">
        <img id="playImage" style="display: none;" border="0" src="plugins/Live/images/play.gif" />
    </a>
    {% if not disableLink %}
        &nbsp;
        <a class="rightLink" href="#" onclick="this.href=broadcast.buildReportingUrl('category=General_Visitors&subcategory=Live_VisitorLog')">{{ 'Live_LinkVisitorLog'|translate }}</a>
    {% endif %}
</div>
{% endspaceless %}