.text( mw.msg( this.getMsgKeyForNoResults( noResultsDetails ) ) )
);
- this.$element.removeClass( 'mw-changeslist-timeout' );
- this.$element.removeClass( 'mw-changeslist-notargetpage' );
+ // remove all classes matching mw-changeslist-*
+ this.$element.removeClass( function ( elementIndex, allClasses ) {
+ return allClasses
+ .split( ' ' )
+ .filter( function ( className ) {
+ return className.indexOf( 'mw-changeslist-' ) === 0;
+ } )
+ .join( ' ' );
+ } );
}
this.$element.append( $message );
}
+ this.$element.prepend( $( '<div>' ).addClass( 'mw-changeslist-overlay' ) );
+
loaderPromise.done( function () {
if ( !isInitialDOM && !isEmpty ) {
// Make sure enhanced RC re-initializes correctly
} );
};
+ /** Toggles overlay class on changes list
+ *
+ * @param {boolean} isVisible True if overlay should be visible
+ */
+ mw.rcfilters.ui.ChangesListWrapperWidget.prototype.toggleOverlay = function ( isVisible ) {
+ this.$element.toggleClass( 'mw-rcfilters-ui-changesListWrapperWidget--overlaid', isVisible );
+ };
+
/**
* Map a reason for having no results to its message key
*
NO_RESULTS_NORMAL: 'recentchanges-noresult',
NO_RESULTS_TIMEOUT: 'recentchanges-timeout',
NO_RESULTS_NETWORK_ERROR: 'recentchanges-network',
- NO_RESULTS_NO_TARGET_PAGE: 'recentchanges-notargetpage'
+ NO_RESULTS_NO_TARGET_PAGE: 'recentchanges-notargetpage',
+ NO_RESULTS_INVALID_TARGET_PAGE: 'allpagesbadtitle'
};
return reasonMsgKeyMap[ reason ];
};
+
/**
* Emphasize the elements (or groups) newer than the 'from' parameter
* @param {string} from Anything newer than this is considered 'new'