RCFilters: Remove new changes visual cue for Live Update feature
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / ui / mw.rcfilters.ui.FormWrapperWidget.js
index 04ccaf6..7f7bbd2 100644 (file)
@@ -87,6 +87,7 @@
         */
        mw.rcfilters.ui.FormWrapperWidget.prototype.onChangesModelInvalidate = function () {
                this.$submitButton.prop( 'disabled', true );
+               this.$element.removeClass( 'mw-rcfilters-ui-ready' );
        };
 
        /**
         */
        mw.rcfilters.ui.FormWrapperWidget.prototype.onChangesModelUpdate = function ( $changesList, $fieldset, isInitialDOM ) {
                this.$submitButton.prop( 'disabled', false );
+               this.$element.removeClass( 'mw-rcfilters-ui-ready' );
 
                // Replace the entire fieldset
                this.$element.empty().append( $fieldset.contents() );
                } );
 
                // 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();
                        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 '<br>'s are around it,
                        // there's no need for them either.
                        this.$element.find( 'br' ).detach();
                }
+
+               this.$element.find(
+                       'legend, .rclistfrom, .rcnotefrom, .rcoptions-listfromreset'
+               ).detach();
+
+               if ( this.$element.text().trim() === '' ) {
+                       this.$element.detach();
+               }
        };
 }( mediaWiki ) );