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/Live/javascripts/visitorProfile.js')
-rw-r--r--plugins/Live/javascripts/visitorProfile.js29
1 files changed, 21 insertions, 8 deletions
diff --git a/plugins/Live/javascripts/visitorProfile.js b/plugins/Live/javascripts/visitorProfile.js
index 021908f2e8..c533561887 100644
--- a/plugins/Live/javascripts/visitorProfile.js
+++ b/plugins/Live/javascripts/visitorProfile.js
@@ -71,14 +71,27 @@
var self = this,
$element = this.$element;
- $element.on('click', '.visitor-profile-close', function (e) {
- e.preventDefault();
- try {
- $element.tooltip('destroy');
- } catch (e) {}
- broadcast.propagateNewPopoverParameter(false);
- return false;
- });
+ // if there are no popover params in stack, simply close the popover
+ if (!broadcast.popoverParamStack.length) {
+ $element.on('click', '.visitor-profile-close', function (e) {
+ e.preventDefault();
+ try {
+ $element.tooltip('destroy');
+ } catch (e) {
+ }
+ Piwik_Popover.close();
+ });
+ } else {
+ $element.on('click', '.visitor-profile-close', function (e) {
+ e.preventDefault();
+ try {
+ $element.tooltip('destroy');
+ } catch (e) {
+ }
+ broadcast.propagateNewPopoverParameter(false);
+ return false;
+ });
+ }
$element.on('click', '.visitor-profile-toggle-actions', function (e) {
e.preventDefault();