Merge "RCFilters UI: Only mute 'fullyCovered' items in the capsule"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 28 Feb 2017 19:47:29 +0000 (19:47 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 28 Feb 2017 19:47:29 +0000 (19:47 +0000)
1  2 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js

@@@ -21,7 -21,6 +21,7 @@@
  
                this.controller = controller;
                this.model = model;
 +              this.selected = false;
  
                this.checkboxWidget = new mw.rcfilters.ui.CheckboxInputWidget( {
                        value: this.model.getName(),
                this.setCurrentMuteState();
        };
  
 +      /**
 +       * Set selected state on this widget
 +       *
 +       * @param {boolean} [isSelected] Widget is selected
 +       */
 +      mw.rcfilters.ui.FilterItemWidget.prototype.toggleSelected = function ( isSelected ) {
 +              isSelected = isSelected !== undefined ? isSelected : !this.selected;
 +
 +              if ( this.selected !== isSelected ) {
 +                      this.selected = isSelected;
 +
 +                      this.$element.toggleClass( 'mw-rcfilters-ui-filterItemWidget-selected', this.selected );
 +              }
 +      };
 +
        /**
         * Set the current mute state for this item
         */
                        'mw-rcfilters-ui-filterItemWidget-muted',
                        this.model.isConflicted() ||
                        this.model.isIncluded() ||
-                       this.model.isFullyCovered() ||
                        (
                                // Item is also muted when any of the items in its group is active
                                this.model.getGroupModel().isActive() &&