// Collect all data from form
$( e.target ).find( 'input:not([type="hidden"],[type="submit"]), select' ).each( function () {
+ var value = '';
+
if ( !$( this ).is( ':checkbox' ) || $( this ).is( ':checked' ) ) {
- data[ $( this ).prop( 'name' ) ] = $( this ).val();
+ value = $( this ).val();
}
+
+ data[ $( this ).prop( 'name' ) ] = value;
} );
this.controller.updateChangesList( data );
*/
mw.rcfilters.ui.FormWrapperWidget.prototype.cleanUpFieldset = function () {
var $namespaceSelect = this.$element.find( '#namespace' ),
- $namespaceCheckboxes = this.$element.find( '#nsassociated, #nsinvert' ),
collapseCookieName = 'changeslist-state';
this.$element.find( '.rcshowhideoption[data-feature-in-structured-ui=1]' ).each( function () {
this.parentNode.removeChild( this );
} );
- // Bind namespace select to change event
- // see resources/src/mediawiki.special/mediawiki.special.recentchanges.js
- $namespaceCheckboxes.prop( 'disabled', $namespaceSelect.val() === '' );
- $namespaceSelect.on( 'change', function () {
- $namespaceCheckboxes.prop( 'disabled', $( this ).val() === '' );
- } );
+ // Hide namespaces and tags
+ if ( mw.config.get( 'wgStructuredChangeFiltersEnableExperimentalViews' ) ) {
+ $namespaceSelect.closest( 'tr' ).detach();
+ this.$element.find( '.mw-tagfilter-label' ).closest( 'tr' ).detach();
+ }
// Collapse legend
// see resources/src/mediawiki.special/mediawiki.special.changelist.legend.js