protected $performSearchOnClick = true;
protected $validateTitle = false;
protected $highlightFirst = false;
+ protected $dataLocation = 'header';
/**
* @param array $config Configuration options
* @param boolean|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)
+ * @param string $config['dataLocation'] Where the search input field will be
+ * used (header or content, default: header)
*/
public function __construct( array $config = [] ) {
$config = array_merge( [
'maxLength' => null,
'type' => 'search',
'icon' => 'search',
- 'dataLocation' => 'content',
], $config );
// Parent constructor
* @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.
+ * @cfg {string} [dataLocation='header'] Where the search input field will be
+ * used (header or content).
*/
mw.widgets.SearchInputWidget = function MwWidgetsSearchInputWidget( config ) {
config = $.extend( {
type: 'search',
icon: 'search',
maxLength: undefined,
- performSearchOnClick: true
+ performSearchOnClick: true,
+ dataLocation: 'header'
}, config );
// Parent constructor