this.pollingRate = require( './config.json' ).StructuredChangeFiltersLiveUpdatePollingRate;
this.requestCounter = {};
- this.baseFilterState = {};
this.uriProcessor = null;
this.initialized = false;
this.wereSavedQueriesSaved = false;
return this.defaultFilters;
};
-/**
- * This is for a single_option and string_options group types
- * it returns the value of the default
- *
- * @return {string} Value of the default
- */
-FilterGroup.prototype.getDefaulParamValue = function () {
- return this.defaultParams[ this.getName() ];
-};
/**
* Get the messags defining the 'whats this' popup for this group
*
this.conflicts = conflicts;
};
-/**
- * Set conflicts for each filter item in the group based on the
- * given conflict map
- *
- * @param {Object} conflicts Object representing the conflict map,
- * keyed by the item name, where its value is an object for all its conflicts
- */
-FilterGroup.prototype.setFilterConflicts = function ( conflicts ) {
- this.getItems().forEach( function ( filterItem ) {
- if ( conflicts[ filterItem.getName() ] ) {
- filterItem.setConflicts( conflicts[ filterItem.getName() ] );
- }
- } );
-};
-
/**
* Check whether this item has a potential conflict with the given item
*
/**
* Get the prefix used for the filter names inside this group.
*
- * @param {string} [name] Filter name to prefix
* @return {string} Group prefix
*/
FilterGroup.prototype.getNamePrefix = function () {
/**
* Get the message for the display area for the currently active conflict
*
- * @private
* @return {string} Conflict result message key
*/
FilterItem.prototype.getCurrentConflictResultMessage = function () {
- var details = {};
+ var details;
// First look in filter's own conflicts
details = this.getConflictDetails( this.getOwnConflicts(), 'globalDescription' );
*/
FiltersViewModel.prototype.initializeFilters = function ( filterGroups, views ) {
var filterConflictResult, groupConflictResult,
- allViews = {},
+ allViews,
model = this,
items = [],
groupConflictMap = {},
/**
* Respond to limit choose event
- *
- * @param {string} filterName Filter name
*/
ChangesLimitAndDateButtonWidget.prototype.updateButtonLabel = function () {
var message,
this.filtersViewModel = filtersViewModel;
this.changesListViewModel = changesListViewModel;
this.controller = controller;
- this.highlightClasses = null;
// Events
this.filtersViewModel.connect( this, {
OO.inheritClass( ChangesListWrapperWidget, OO.ui.Widget );
-/**
- * Get all available highlight classes
- *
- * @return {string[]} An array of available highlight class names
- */
-ChangesListWrapperWidget.prototype.getHighlightClasses = function () {
- if ( !this.highlightClasses || !this.highlightClasses.length ) {
- this.highlightClasses = this.filtersViewModel.getItemsSupportingHighlights()
- .map( function ( filterItem ) {
- return filterItem.getCssClass();
- } );
- }
-
- return this.highlightClasses;
-};
-
/**
* Respond to the highlight feature being toggled on and off
*
*
* @constructor
* @param {Object} [config] Configuration object
- * @param {Object} [events] Events to aggregate. The object represent the
+ * @cfg {Object} [events] Events to aggregate. The object represent the
* event name to aggregate and the event value to emit on aggregate for items.
*/
var GroupWidget = function MwRcfiltersUiViewSwitchWidget( config ) {
/**
* Save the name of the query
*
- * @param {string} [value] The value to save
* @fires edit
*/
SavedLinksListItemWidget.prototype.save = function () {