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-07-19 03:26:01 +0300
committerGitHub <noreply@github.com>2016-07-19 03:26:01 +0300
commitfe213cd85d370a9f4e822247c32641d142da7b49 (patch)
treeac8d48f5b60f5478d468eace4407331a430e9014 /plugins/SegmentEditor/javascripts/Segmentation.js
parentb7a2cecc872ddd423a9ce754eaa6091620c20c67 (diff)
Segment editor, updating segments, logic when to display messages (#10322)
* Display the right message when segment is set to real time * Correct logic * UI tests: minor messaging change
Diffstat (limited to 'plugins/SegmentEditor/javascripts/Segmentation.js')
-rw-r--r--plugins/SegmentEditor/javascripts/Segmentation.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js
index 7365a89fd6..96436f70c8 100644
--- a/plugins/SegmentEditor/javascripts/Segmentation.js
+++ b/plugins/SegmentEditor/javascripts/Segmentation.js
@@ -1077,16 +1077,21 @@ Segmentation = (function($) {
});
if(segmentStr != getSegmentFromId(segmentId).definition && $('.segment-definition-change-confirm').data('hideMessage') != 1) {
- var segmentProcessedOnRequest = $('.segment-definition-change-confirm').data('segmentProcessedOnRequest');
+ var isBrowserArchivingAvailableForSegments = $('.segment-definition-change-confirm').data('segmentProcessedOnRequest');
+ var isRealTimeSegment = (autoArchive == 0);
+ var segmentNotProcessedOnRequest = !isBrowserArchivingAvailableForSegments || !isRealTimeSegment;
$('.process-on-request, .no-process-on-request').hide();
- if (segmentProcessedOnRequest == 1 && autoArchive == 0) {
- $('.process-on-request').show();
- } else {
+ if (segmentNotProcessedOnRequest) {
$('.no-process-on-request').show();
+ } else {
+ $('.process-on-request').show();
}
+ //bug: real time + isBrowserArchivingAvailableForSegments ---> see pre processed, expect real time
+
+
piwikHelper.modalConfirm('.segment-definition-change-confirm', {
yes: function () {
if ($('#hideSegmentMessage:checked').length) {