RCFilters: some more highlight cleanup
authorStephane Bisson <sbisson@wikimedia.org>
Thu, 9 Nov 2017 00:46:45 +0000 (19:46 -0500)
committerStephane Bisson <sbisson@wikimedia.org>
Thu, 9 Nov 2017 00:46:45 +0000 (19:46 -0500)
Change-Id: I81eb3bf86f786c79a94e99d51602d904504f918f

resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js

index 3a6efe2..d959540 100644 (file)
                this.getItemByName( filterName ).clearHighlightColor();
        };
 
                this.getItemByName( filterName ).clearHighlightColor();
        };
 
-       /**
-        * Clear highlight for all filter items
-        */
-       mw.rcfilters.dm.FiltersViewModel.prototype.clearAllHighlightColors = function () {
-               this.getItems().forEach( function ( filterItem ) {
-                       filterItem.clearHighlightColor();
-               } );
-       };
-
        /**
         * Return a version of the given string that is without any
         * view triggers.
        /**
         * Return a version of the given string that is without any
         * view triggers.
index 7b54833..44b6c8c 100644 (file)
@@ -41,7 +41,6 @@
                // Highlight
                this.cssClass = config.cssClass;
                this.highlightColor = config.defaultHighlightColor;
                // Highlight
                this.cssClass = config.cssClass;
                this.highlightColor = config.defaultHighlightColor;
-               this.highlightEnabled = !!config.defaultHighlightColor;
        };
 
        /* Initialization */
        };
 
        /* Initialization */
index 23f6007..1d7934f 100644 (file)
                // Return parameter representation
                return this.filtersModel.getMinimizedParamRepresentation( $.extend( true, {},
                        this.filtersModel.getParametersFromFilters( savedFilters ),
                // Return parameter representation
                return this.filtersModel.getMinimizedParamRepresentation( $.extend( true, {},
                        this.filtersModel.getParametersFromFilters( savedFilters ),
-                       data.highlights,
-                       { highlight: data.params.highlight }
+                       data.highlights
                ) );
        };
 
                ) );
        };