File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
plugins/SegmentEditor/javascripts Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,7 @@ public function getClientSideOptions()
188188 'action_title_category_delimiter ' => $ general ['action_title_category_delimiter ' ],
189189 'are_ads_enabled ' => Advertising::isAdsEnabledInConfig ($ general ),
190190 'autocomplete_min_sites ' => $ general ['autocomplete_min_sites ' ],
191+ 'data_comparison_segment_limit ' => $ general ['data_comparison_segment_limit ' ],
191192 'datatable_export_range_as_day ' => $ general ['datatable_export_range_as_day ' ],
192193 'datatable_row_limits ' => $ this ->getDatatableRowLimits (),
193194 'enable_general_settings_admin ' => Controller::isGeneralSettingsAdminEnabled (),
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ Segmentation = (function($) {
110110 self . checkIfComparedSegmentsHasReachedLimit ( ) ;
111111 } ;
112112 segmentation . prototype . checkIfComparedSegmentsHasReachedLimit = function ( ) {
113- const limit = 6 ;
113+ const limit = piwik . config . data_comparison_segment_limit ;
114114 const comparisonService = window . CoreHome . ComparisonsStoreInstance ;
115115 const comparedSegmentsLength = comparisonService . getSegmentComparisons ( ) . length ;
116116 console . log ( 'these are the available segments: ' , this . availableSegments ) ;
@@ -120,7 +120,7 @@ Segmentation = (function($) {
120120 if ( comparedSegmentsLength >= limit ) {
121121 console . log ( 'limit reached' ) ;
122122 $ ( this ) . addClass ( 'no-click' ) ;
123- $ ( this ) . parent ( ) . attr ( 'title' , _pk_translate ( 'General_MaximumNumberOfSegmentsComparedIs' , [ 6 ] ) ) ;
123+ $ ( this ) . parent ( ) . attr ( 'title' , _pk_translate ( 'General_MaximumNumberOfSegmentsComparedIs' , [ limit ] ) ) ;
124124 } else {
125125 console . log ( 'removing class' ) ;
126126 $ ( this ) . removeClass ( 'no-click' ) ;
You can’t perform that action at this time.
0 commit comments