Commit ca1f586f authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Oculta botón de búsqueda extendida por defecto

Permite activar a voluntad la aparición del botón de expandir búsqueda
desde el buscador de texto. Se omite su creación por defecto.
parent 1bbffccc
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ define([
				expandSearchButtonClass: 'expandSearchButton',
				searchButtonClass: 'searchButton',
				suggestionsShownClass: 'suggestionsShown',
				showExpandIcon: false,
				events: {
					SEARCH_CHANGED: "searchChanged",
					NEW_SEARCH: "newSearch",
@@ -127,11 +128,14 @@ define([
				searchButton = put(outerButtonsContainer, 'i.' + this.searchButtonClass +
					'[title=' + this.i18n.search + ']');

			searchButton.onclick = lang.hitch(this, this._onClickSearch);

			if (this.showExpandIcon) {
				this.expandSearchNode = put(outerButtonsContainer, 'i.' + this.expandSearchButtonClass + '[title=' +
					this.i18n.advancedSearch + ']');

			searchButton.onclick = lang.hitch(this, this._onClickSearch);
				this.expandSearchNode.onclick = lang.hitch(this, this._expandSearch);
			}
		},

		_createSuggestions: function() {
@@ -204,6 +208,10 @@ define([

		_expandSearch: function() {

			if (!this.showExpandIcon) {
				return;
			}

			this.emit(this.events.EXPAND_SEARCH, {
				node: this.expandSearchNode
			});