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:
authorThomas Steur <thomas.steur@googlemail.com>2014-03-21 01:24:59 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-03-21 01:24:59 +0400
commitfe389fa035951b796881c85c4a996d7aa2eb0d53 (patch)
treeae6ef92b12958e3841c16d8ab2800bec384da9c1 /plugins/SegmentEditor
parent7006e827ad57cf605bd12f27063c53d413998ebb (diff)
fixes #4873 when Live plugin is disabled, do not show error in Segment value auto-suggest
Diffstat (limited to 'plugins/SegmentEditor')
-rw-r--r--plugins/SegmentEditor/javascripts/Segmentation.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js
index 5d843e6fcf..5193eacccd 100644
--- a/plugins/SegmentEditor/javascripts/Segmentation.js
+++ b/plugins/SegmentEditor/javascripts/Segmentation.js
@@ -590,17 +590,21 @@ Segmentation = (function($) {
method: 'API.getSuggestedValuesForSegment',
segmentName: segmentName
}, 'GET');
+ ajaxHandler.useRegularCallbackInCaseOfError = true;
ajaxHandler.setCallback(function(response) {
loadingElement.hide();
- inputElement.autocomplete({
- source: response,
- minLength: 0,
- select: function(event, ui){
- event.preventDefault();
- $(inputElement).val(ui.item.value);
- }
- });
+ if (response && response.result != 'error') {
+
+ inputElement.autocomplete({
+ source: response,
+ minLength: 0,
+ select: function(event, ui){
+ event.preventDefault();
+ $(inputElement).val(ui.item.value);
+ }
+ });
+ }
inputElement.click(function (e) {
$(inputElement).autocomplete('search', $(inputElement).val());