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=ad99e223cd739c2846cd6eb1590cecb01b2c95e2;hp=82992fb84708d9830231a6c03f3500286c279ed5;hb=802c199d0bd80ff0f4d730c61fd58cbf08a52d8d;hpb=36395150104588f2afea866c330b683e4329fa48 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 82992fb847..ad99e223cd 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js @@ -117,9 +117,7 @@ * Clean up the old-style show/hide that we have implemented in the filter list */ mw.rcfilters.ui.FormWrapperWidget.prototype.cleanUpFieldset = function () { - var $namespaceSelect = this.$element.find( '#namespace' ); - - this.$element.find( '.rcshowhideoption[data-feature-in-structured-ui=1]' ).each( function () { + this.$element.find( '.clshowhideoption[data-feature-in-structured-ui=1]' ).each( function () { // HACK: Remove the text node after the span. // If there isn't one, we're at the end, so remove the text node before the span. // This would be unnecessary if we added separators with CSS. @@ -133,11 +131,11 @@ } ); // Hide namespaces and tags - $namespaceSelect.closest( 'tr' ).detach(); + this.$element.find( '.namespaceForm' ).detach(); this.$element.find( '.mw-tagfilter-label' ).closest( 'tr' ).detach(); - // Hide limit and days - this.$element.find( '.rclinks' ).detach(); + // misc: limit, days, watchlist info msg + this.$element.find( '.rclinks, .cldays, .wlinfo' ).detach(); if ( !this.$element.find( '.mw-recentchanges-table tr' ).length ) { this.$element.find( '.mw-recentchanges-table' ).detach(); @@ -151,13 +149,15 @@ this.$element.find( 'br' ).detach(); } - if ( mw.rcfilters.featureFlags.liveUpdate ) { - this.$element.find( - 'legend, .rclistfrom, .rcnotefrom, .rcoptions-listfromreset' - ).detach(); + if ( this.$element.find( '.cloption' ).text().trim() === '' ) { + this.$element.find( '.cloption-submit' ).detach(); } - if ( this.$element.text().trim() === '' ) { + this.$element.find( + '.rclistfrom, .rcnotefrom, .rcoptions-listfromreset' + ).detach(); + + if ( this.$element.text().trim() === this.$element.find( 'legend' ).text() ) { this.$element.detach(); } };