From: Moriel Schottlender Date: Wed, 28 Jun 2017 23:44:54 +0000 (-0700) Subject: RCFilters: Followup I200720ffde8ad: Hide extended footer if gater is disabled X-Git-Tag: 1.31.0-rc.0~2848 X-Git-Url: http://git.cyclocoop.org/clavettes/images/siteon3.jpg?a=commitdiff_plain;h=94bfd5fc9cfb9dc08c62ea2dd48f8f2c4e2de8f4;p=lhc%2Fweb%2Fwiklou.git RCFilters: Followup I200720ffde8ad: Hide extended footer if gater is disabled Bug: T169163 Change-Id: I62f63cbf06a7e42864faca1a196903eb34ea077b --- diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js index 0ab459e73d..9671f5e33a 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js @@ -47,6 +47,7 @@ footers: [ { name: 'viewSelect', + disabled: !mw.config.get( 'wgStructuredChangeFiltersEnableExperimentalViews' ), sticky: false, // View select menu, appears on default view only $element: $( '
' ) diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js index c12e10eff4..d9a182265f 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js @@ -92,12 +92,14 @@ views: footerData.views }; - this.footers.push( adjustedData ); + if ( !footerData.disabled ) { + this.footers.push( adjustedData ); - if ( isSticky ) { - this.$element.append( adjustedData.$element ); - } else { - this.$body.append( adjustedData.$element ); + if ( isSticky ) { + this.$element.append( adjustedData.$element ); + } else { + this.$body.append( adjustedData.$element ); + } } }.bind( this ) );