/**
* Widget defining the button controlling the popup for the date range for the results
*
+ * @class
* @extends OO.ui.Widget
*
* @constructor
width: 300,
padded: true,
anchor: false,
- align: 'backwards',
+ align: 'forwards',
$autoCloseIgnore: this.$overlay,
$content: datePopupWidget.$element
}
* @param {string} filterName Chosen filter name
*/
mw.rcfilters.ui.DateButtonWidget.prototype.onPopupDays = function ( filterName ) {
+ var item = this.daysGroupModel.getItemByName( filterName );
+
this.controller.toggleFilterSelect( filterName, true );
+ this.controller.updateDaysDefault( item.getParamName() );
+ this.button.popup.toggle( false );
};
/**
if ( item ) {
this.button.setLabel(
mw.msg(
- // Number( item.getParamName() ) < 1 ?
- // 'rcfilters-days-show-hours' : 'rcfilters-days-show-days',
-
- // Temporarily hide the functionality for hours, use days only
- 'rcfilters-days-show-days',
+ Number( item.getParamName() ) < 1 ?
+ 'rcfilters-days-show-hours' : 'rcfilters-days-show-days',
item.getLabel()
)
);