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:
authorMatthieu Aubry <mattab@users.noreply.github.com>2016-12-06 14:01:08 +0300
committerGitHub <noreply@github.com>2016-12-06 14:01:08 +0300
commit401977c0b431c756209c64620f74b87fdbb07a50 (patch)
tree6bf87edefb5f47933c3ec5ff855450bd57e014e1
parent722eacd50e1fd62417616e80ecffdb9547197126 (diff)
After Updating/Deleting/Adding a segment, force a refresh of the dashboard (#10969)
the refresh is currently needed for several reasons as the Segmentation editor is not coded properly and does not just work without the page reload. Ideally we'll rewrite the Segment Editor in AngularJS later so this reload will not be needed. fixes https://github.com/piwik/piwik/issues/10626 Reverting https://github.com/piwik/piwik/commit/5daf6c2388693746f2a47a9e6c31276d0b423a4f part of https://github.com/piwik/piwik/commit/0c9c30b731ccbacf47e154b9f7a590af49e3d799
-rw-r--r--plugins/SegmentEditor/javascripts/Segmentation.js23
1 files changed, 1 insertions, 22 deletions
diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js
index 28280a1a5d..7930ae8c0e 100644
--- a/plugins/SegmentEditor/javascripts/Segmentation.js
+++ b/plugins/SegmentEditor/javascripts/Segmentation.js
@@ -1278,28 +1278,7 @@ $(document).ready(function() {
segmentDefinition = cleanupSegmentDefinition(segmentDefinition);
segmentDefinition = encodeURIComponent(segmentDefinition);
- if (piwikHelper.isAngularRenderingThePage()) {
-
- angular.element(document).injector().invoke(function ($location, $rootScope) {
- var $search = $location.search();
-
- if (segmentDefinition !== $search.segment) {
- // eg when using back button the date might be actually already changed in the URL and we do not
- // want to change the URL again
- $search.segment = segmentDefinition.replace(/%$/, '%25').replace(/%([^\d].)/g, "%25$1");
- $location.search($search);
- setTimeout(function () {
- try {
- $rootScope.$apply();
- } catch (e) {}
- }, 1);
- }
-
- });
- return false;
- } else {
- return broadcast.propagateNewPage('segment=' + segmentDefinition, true);
- }
+ return broadcast.propagateNewPage('segment=' + segmentDefinition, true);
};
this.changeSegmentList = function () {};