diff options
author | Matthieu Aubry <matt@piwik.org> | 2015-01-10 04:39:11 +0300 |
---|---|---|
committer | Matthieu Aubry <matt@piwik.org> | 2015-01-10 04:39:11 +0300 |
commit | 918b282c7e68189ba8021f5ddcd334372357ccde (patch) | |
tree | 405562aa83976731ecb868e6de5ce903c0f945c8 /plugins/SegmentEditor/javascripts | |
parent | 5ceebd93b08bae246f970fd831570138695b9be6 (diff) | |
parent | 44c00237f14b60348a0f3dfb374e678d1442b585 (diff) |
Merge pull request #6970 from jantlwoomy/selected_segment_css
Selected segment css
Diffstat (limited to 'plugins/SegmentEditor/javascripts')
-rw-r--r-- | plugins/SegmentEditor/javascripts/Segmentation.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/SegmentEditor/javascripts/Segmentation.js b/plugins/SegmentEditor/javascripts/Segmentation.js index 2c53ebdba6..176283eded 100644 --- a/plugins/SegmentEditor/javascripts/Segmentation.js +++ b/plugins/SegmentEditor/javascripts/Segmentation.js @@ -196,7 +196,6 @@ Segmentation = (function($) { var getListHtml = function() { var html = self.editorTemplate.find("> .listHtml").clone(); var segment, injClass; - var listHtml = '<li data-idsegment="" ' + (self.currentSegmentStr == "" ? " class='segmentSelected' " : "") + ' data-definition=""><span class="segname">' + self.translations['SegmentEditor_DefaultAllVisits'] @@ -207,7 +206,12 @@ Segmentation = (function($) { { segment = self.availableSegments[i]; injClass = ""; - if( segment.definition == self.currentSegmentStr){ + var checkSelected = segment.definition; + if(!$.browser.mozilla) { + checkSelected = encodeURIComponent(checkSelected); + } + + if( checkSelected == self.currentSegmentStr){ injClass = 'class="segmentSelected"'; } listHtml += '<li data-idsegment="'+segment.idsegment+'" data-definition="'+ (segment.definition).replace(/"/g, '"') +'" ' |