diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2017-10-12 04:34:04 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-10-12 04:34:04 +0300 |
commit | 124f6dc441e1431d3a13c62c457f094fe05e2bbf (patch) | |
tree | 54bf075d5ecd5a9cd287cfc739b283778783430b /plugins/SegmentEditor/javascripts | |
parent | 75beda195d07d0c8c40a5c535e8272336c28cdcf (diff) |
Make sure segment is updated in exported widget (#12167)
fixes #12166
Diffstat (limited to 'plugins/SegmentEditor/javascripts')
-rw-r--r-- | plugins/SegmentEditor/javascripts/Segmentation.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js index e018fec7cd..b6f9a1a885 100644 --- a/plugins/SegmentEditor/javascripts/Segmentation.js +++ b/plugins/SegmentEditor/javascripts/Segmentation.js @@ -842,7 +842,13 @@ $(document).ready(function() { this.forceSegmentReload = function (segmentDefinition) { segmentDefinition = this.uriEncodeSegmentDefinition(segmentDefinition); - return broadcast.propagateNewPage('', true, 'segment=' + segmentDefinition); + + if (piwikHelper.isAngularRenderingThePage()) { + return broadcast.propagateNewPage('', true, 'segment=' + segmentDefinition); + } else { + // eg in case of exported dashboard + return broadcast.propagateNewPage('segment=' + segmentDefinition, true, 'segment=' + segmentDefinition); + } }; this.changeSegmentList = function () {}; |