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
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserCountryMap/javascripts/realtime-map.js')
-rw-r--r--plugins/UserCountryMap/javascripts/realtime-map.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/UserCountryMap/javascripts/realtime-map.js b/plugins/UserCountryMap/javascripts/realtime-map.js
index 5724294276..c116709ff7 100644
--- a/plugins/UserCountryMap/javascripts/realtime-map.js
+++ b/plugins/UserCountryMap/javascripts/realtime-map.js
@@ -59,13 +59,15 @@
_initStandaloneMap: function () {
$('#periodString').hide();
initTopControls();
- $('#secondNavBar').on('piwikSwitchPage', function (event, item) {
- var href = $(item).attr('href');
+
+ var $rootScope = piwikHelper.getAngularDependency('$rootScope');
+ $rootScope.$on('piwikPageChange', function () {
+ var href = location.href;
var clickedMenuIsNotMap = !href || (href.indexOf('module=UserCountryMap&action=realtimeWorldMap') == -1);
if (clickedMenuIsNotMap) {
$('#periodString').show();
initTopControls();
- }
+ };
});
$('.realTimeMap_overlay').css('top', '0px');
$('.realTimeMap_datetime').css('top', '20px');
@@ -220,7 +222,7 @@
// User ID
(r.userId ? _pk_translate('General_UserId') + ':&nbsp;' + r.userId + '<br/>' : '') +
// last action
- (ad && ad.length && ad[ad.length - 1].pageTitle ? '<em>' + ad[ad.length - 1].pageTitle + '</em><br/>' : '') +
+ (ad && ad.length && ad[ad.length - 1].pageTitle ? '' + ad[ad.length - 1].pageTitle + '<br/>' : '') +
// time of visit
'<div class="rel-time" data-actiontime="' + r.lastActionTimestamp + '">' + relativeTime(ds) + '</div>' +
// either from or direct
@@ -632,8 +634,8 @@
map.symbolGroups[0].update();
}
- if (w < 355) $('.tableIcon span').hide();
- else $('.tableIcon span').show();
+ if (w < 355) $('.UserCountryMap .tableIcon span').hide();
+ else $('.UserCountryMap .tableIcon span').show();
},
_destroy: function () {