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:
authorsgiehl <stefan@piwik.org>2016-05-30 23:49:52 +0300
committersgiehl <stefan@piwik.org>2016-07-14 00:31:20 +0300
commita00908444f4b39ad2647a8be4f76700d4474ac01 (patch)
tree72ba815f8d2dd9342c33d23fb62a9a3541275b92 /plugins/SegmentEditor/javascripts/Segmentation.js
parentf6c3da4b50fe161cde8c30f436acf8c72cf45545 (diff)
refs #9984 - adds confirmation when changing segments definition
Diffstat (limited to 'plugins/SegmentEditor/javascripts/Segmentation.js')
-rw-r--r--plugins/SegmentEditor/javascripts/Segmentation.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js
index ce3c166cf1..2623570f21 100644
--- a/plugins/SegmentEditor/javascripts/Segmentation.js
+++ b/plugins/SegmentEditor/javascripts/Segmentation.js
@@ -1075,7 +1075,16 @@ Segmentation = (function($) {
jQuery.extend(params, {
"idSegment": segmentId
});
- self.updateMethod(params);
+
+ if(segmentStr != getSegmentFromId(segmentId).definition) {
+ piwikHelper.modalConfirm(self.target.find('.segment-change-confirm'), {
+ yes: function () {
+ self.updateMethod(params);
+ }
+ });
+ } else {
+ self.updateMethod(params);
+ }
}
};