* @cfg {jQuery} [$overlay] A jQuery object serving as overlay for popups
*/
mw.rcfilters.ui.FilterWrapperWidget = function MwRcfiltersUiFilterWrapperWidget( controller, model, savedQueriesModel, config ) {
+ var $bottom;
config = config || {};
// Parent
{ $overlay: this.$overlay }
);
+ this.liveUpdateButton = new mw.rcfilters.ui.LiveUpdateButtonWidget(
+ this.controller
+ );
+
+ this.numChangesWidget = new mw.rcfilters.ui.ChangesLimitButtonWidget(
+ this.controller,
+ this.model,
+ {
+ $overlay: this.$overlay
+ }
+ );
+
+ this.dateWidget = new mw.rcfilters.ui.DateButtonWidget(
+ this.controller,
+ this.model,
+ {
+ $overlay: this.$overlay
+ }
+ );
+
// Initialize
this.$element
.addClass( 'mw-rcfilters-ui-filterWrapperWidget' );
this.$element.append(
this.savedLinksListWidget.$element
);
+ }
+
+ $bottom = $( '<div>' )
+ .addClass( 'mw-rcfilters-ui-filterWrapperWidget-bottom' )
+ .append(
+ this.numChangesWidget.$element,
+ this.dateWidget.$element
+ );
+ if (
+ mw.config.get( 'wgStructuredChangeFiltersEnableLiveUpdate' ) ||
+ // Allow users to enable live update with ?liveupdate=1
+ new mw.Uri().query.liveupdate
+ ) {
+ $bottom.append( this.liveUpdateButton.$element );
}
this.$element.append(
- this.filterTagWidget.$element
+ this.filterTagWidget.$element,
+ $bottom
);
};