X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.rcfilters%2Fui%2Fmw.rcfilters.ui.FormWrapperWidget.js;h=82992fb84708d9830231a6c03f3500286c279ed5;hp=ee8e0bc1b9c4710edf4f8c36ffbe073b8b7e47fa;hb=956c2430c7b8fceb289aaeacc8d6c2e0def2c56e;hpb=2a1b1880eaadd4c35bc789870a45e45f14ffdb26 diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js index ee8e0bc1b9..82992fb847 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js @@ -133,10 +133,8 @@ } ); // Hide namespaces and tags - if ( mw.config.get( 'wgStructuredChangeFiltersEnableExperimentalViews' ) ) { - $namespaceSelect.closest( 'tr' ).detach(); - this.$element.find( '.mw-tagfilter-label' ).closest( 'tr' ).detach(); - } + $namespaceSelect.closest( 'tr' ).detach(); + this.$element.find( '.mw-tagfilter-label' ).closest( 'tr' ).detach(); // Hide limit and days this.$element.find( '.rclinks' ).detach(); @@ -145,11 +143,22 @@ this.$element.find( '.mw-recentchanges-table' ).detach(); this.$element.find( 'hr' ).detach(); } + if ( !this.$element.find( '.rcshowhide' ).contents().length ) { this.$element.find( '.rcshowhide' ).detach(); // If we're hiding rcshowhide, the '
's are around it, // there's no need for them either. this.$element.find( 'br' ).detach(); } + + if ( mw.rcfilters.featureFlags.liveUpdate ) { + this.$element.find( + 'legend, .rclistfrom, .rcnotefrom, .rcoptions-listfromreset' + ).detach(); + } + + if ( this.$element.text().trim() === '' ) { + this.$element.detach(); + } }; }( mediaWiki ) );