File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
plugins/SegmentEditor/javascripts Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,12 @@ Segmentation = (function($) {
8787 content : title ,
8888 } ) ;
8989 } ;
90+ // We will listen to changes in the Segment Comparison Store
91+ // so we can mark compared segments properly. This will now include deletion of compared segments.
92+ piwik . on ( 'piwikComparisonsChanged' , function ( ) {
93+ console . log ( 'there was a change in the compared segments' ) ;
94+ self . markComparedSegments ( ) ;
95+ } ) ;
9096
9197 segmentation . prototype . markComparedSegments = function ( ) {
9298 var comparisonService = window . CoreHome . ComparisonsStoreInstance ;
@@ -114,7 +120,7 @@ Segmentation = (function($) {
114120 if ( comparedSegmentsLength >= limit ) {
115121 console . log ( 'limit reached' ) ;
116122 $ ( this ) . addClass ( 'no-click' ) ;
117- $ ( this ) . parent ( ) . attr ( 'title' , _pk_translate ( 'General_MaximumNumberOfSegmentsComparedIs' ) ) ;
123+ $ ( this ) . parent ( ) . attr ( 'title' , _pk_translate ( 'General_MaximumNumberOfSegmentsComparedIs' , [ 6 ] ) ) ;
118124 } else {
119125 console . log ( 'removing class' ) ;
120126 $ ( this ) . removeClass ( 'no-click' ) ;
You can’t perform that action at this time.
0 commit comments