*/
class SearchInputWidget extends TitleInputWidget {
- protected $pushPending = false;
protected $performSearchOnClick = true;
protected $validateTitle = false;
protected $highlightFirst = false;
/**
* @param array $config Configuration options
- * - int|null $config['pushPending'] Whether the input should be visually marked as
- * "pending", while requesting suggestions (default: false)
* - bool|null $config['performSearchOnClick'] If true, the script will start a search
* whenever a user hits a suggestion. If false, the text of the suggestion is inserted into
* the text field only (default: true)
parent::__construct( $config );
// Properties, which are ignored in PHP and just shipped back to JS
- if ( isset( $config['pushPending'] ) ) {
- $this->pushPending = $config['pushPending'];
- }
-
if ( isset( $config['performSearchOnClick'] ) ) {
$this->performSearchOnClick = $config['performSearchOnClick'];
}
}
public function getConfig( &$config ) {
- $config['pushPending'] = $this->pushPending;
$config['performSearchOnClick'] = $this->performSearchOnClick;
if ( $this->dataLocation ) {
$config['dataLocation'] = $this->dataLocation;
*
* @constructor
* @param {Object} [config] Configuration options
- * @cfg {boolean} [pushPending=false] Visually mark the input field as "pending", while
- * requesting suggestions.
* @cfg {boolean} [performSearchOnClick=true] If true, the script will start a search when-
* ever a user hits a suggestion. If false, the text of the suggestion is inserted into the
* text field only.
config = $.extend( {
icon: 'search',
maxLength: undefined,
+ showPendingRequest: false,
performSearchOnClick: true,
dataLocation: 'header'
}, config );
this.$element.addClass( 'mw-widget-searchInputWidget' );
this.lookupMenu.$element.addClass( 'mw-widget-searchWidget-menu' );
this.lastLookupItems = [];
- if ( !config.pushPending ) {
- this.pushPending = false;
- }
if ( config.dataLocation ) {
this.dataLocation = config.dataLocation;
}