diff options
author | Stefan Giehl <stefan@piwik.org> | 2017-06-14 08:23:58 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-06-14 08:23:58 +0300 |
commit | fe08be5148aca478c2b6cff64f9de9ae4ece5921 (patch) | |
tree | 88424b0f15466b808db6f9ab4a95612e4a596007 /plugins | |
parent | b6fd19b92896b50bc6c89ecaaa4c4bbf4009c44d (diff) |
update only hash values when updating a segment (#11790)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CoreHome/javascripts/broadcast.js | 7 | ||||
-rw-r--r-- | plugins/SegmentEditor/javascripts/Segmentation.js | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/plugins/CoreHome/javascripts/broadcast.js b/plugins/CoreHome/javascripts/broadcast.js index a58868261f..4b9a8f21ed 100644 --- a/plugins/CoreHome/javascripts/broadcast.js +++ b/plugins/CoreHome/javascripts/broadcast.js @@ -315,10 +315,15 @@ var broadcast = { if (!currentSearchStr) { currentSearchStr = '?'; } - + var oldUrl = currentSearchStr + currentHashStr; for (var i = 0; i < params_vals.length; i++) { + + if(params_vals[i].length == 0) { + continue; // updating with empty string would destroy some values + } + // update both the current search query and hash string currentSearchStr = broadcast.updateParamValue(params_vals[i], currentSearchStr); diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js index d85399781b..1ca8bfc014 100644 --- a/plugins/SegmentEditor/javascripts/Segmentation.js +++ b/plugins/SegmentEditor/javascripts/Segmentation.js @@ -1314,7 +1314,7 @@ $(document).ready(function() { this.forceSegmentReload = function (segmentDefinition) { segmentDefinition = this.uriEncodeSegmentDefinition(segmentDefinition); - return broadcast.propagateNewPage('segment=' + segmentDefinition, true); + return broadcast.propagateNewPage('', true, 'segment=' + segmentDefinition); }; this.changeSegmentList = function () {}; |