///////////////////////////// Search section ///////////////////////////// 
Clear the search field
197377
function addonsManager_clearSearchField() {
    var textbox = this.getElement({type: "search_textbox"});
    var cmdKey = utils.getEntity(this.dtds, "selectAllCmd.key");

    this._controller.keypress(textbox, cmdKey, {accelKey: true});
    this._controller.keypress(textbox, 'VK_DELETE', {});
  }
1319349
public void clearListSelection() {
        final DropDownListView list = mDropDownList;
        if (list != null) {
            // WARNING: Please read the comment where mListSelectionHidden is declared
            list.mListSelectionHidden = true;
            //list.hideSelector();
            list.requestLayout();
        }
    }
267834
function clearContent () {
    var content = document.getElementById('content');
    content.innerHTML = '';
    var log = document.getElementById('log--content');
    log.innerHTML = '';
    var buttons = document.getElementById('buttons');
    buttons.innerHTML = '';

    setLogVisibility(false);
}
1255939
def clear_scroll( scroll_ids )
      response = delete "/_search/scroll", body: {scroll_id: Array(scroll_ids)}, action: "search.clear_scroll", rest_api: "clear_scroll"
      response.body
    end
97430
function searchBar_clear()
  {
    var activeElement = this._controller.window.document.activeElement;

    var searchInput = this.getElement({type: "searchBar_input"});
    var cmdKey = utils.getEntity(this.getDtds(), "selectAllCmd.key");
    this._controller.keypress(searchInput, cmdKey, {accelKey: true});
    this._controller.keypress(searchInput, 'VK_DELETE', {});

    if (activeElement)
      activeElement.focus();
  }
418109
public void clear() {
        this.attributes.clear();
        this.queryParameters = null;
        this.inReader = null;
        this.streamActive = false;
        this.inStream = null;
        this.encoding = null;
        this.sessionData = null;
        this.strippedURI = null;
        this.srvContext = null;
        this.srvPath = null;
        this.pathInfo = null;
        this.pathInfoComputed = false;
        this.filters = null;
    }
371181
protected void removeQuickBox() {

        if (m_quickSearch != null) {
            m_quickSearch.removeFromParent();
            m_quickSearch = null;
        }
        if (m_searchButton != null) {
            m_searchButton.removeFromParent();
            m_searchButton = null;
        }
    }
1093654
public void clearAll()
    {
        for (int i = 0; i < textFields.size(); i++)
        {
            JTextField textField = textFields.get(i);
            if (textField == null)
            {
                continue;
            }
            textField.setText("");
        }
    }
790506
public function clear()
    {
        $this->currentOutput = '';
        $this->accruedInput = '';
        $this->accruedInputWithoutFormatting = '';
        $this->formattingTemplate = '';
        $this->lastMatchPosition = 0;
        $this->currentFormattingPattern = '';
        $this->prefixBeforeNationalNumber = '';
        $this->extractedNationalPrefix = '';
        $this->nationalNumber = '';
        $this->ableToFormat = true;
        $this->inputHasFormatting = false;
        $this->positionToRemember = 0;
        $this->originalPosition = 0;
        $this->isCompleteNumber = false;
        $this->isExpectingCountryCallingCode = false;
        $this->possibleFormats = array();
        $this->shouldAddSpaceAfterNationalPrefix = false;
        if ($this->currentMetadata !== $this->defaultMetadata) {
            $this->currentMetadata = $this->getMetadataForRegion($this->defaultCountry);
        }
    }
217603
public void clearFields() {
		this.requiredFields = NO_FIELDS;
		this.optionalFields = NO_FIELDS;

		this.textFields = Collections.emptyMap();

		removeAll();
		validate();
	}
1231732
public function ClearSearchCacheTables()
    {
        $sQuery = 'TRUNCATE TABLE `shop_search_cache_item`';
        \MySqlLegacySupport::getInstance()->query($sQuery);
        $sQuery = 'TRUNCATE TABLE `shop_search_cache`';
        \MySqlLegacySupport::getInstance()->query($sQuery);
    }
427543
@VisibleForTesting
  void clear() {
    insertServiceName.clear();
    if (insertRemoteServiceName != null) insertRemoteServiceName.clear();
    insertSpanName.clear();
    indexer.clear();
    if (insertAutocompleteValue != null) insertAutocompleteValue.clear();
  }
424676
function clear() {
    /* clear browser console */
    if (shouldLogToConsole && console && console.clear) {
      console.clear();
    }
    /* clear app console */
    if (shouldLogToElement) {
      element.value = '';
      element.scrollTop = element.scrollHeight;
    }
  }
836861
public function clearSearchIndexAction()
    {
        // get uri builder
        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);

        // admin only access
        if ($this->getBackendUser()->isAdmin()) {
            if ($this->do == 'clear') {
                $databaseConnection = Db::getDatabaseConnection('tx_kesearch_index');
                $databaseConnection->truncate('tx_kesearch_index');
            }
        }

        // build "clear index" link
        $moduleUrl = $uriBuilder->buildUriFromRoute(
            'web_KeSearchBackendModule',
            [
                'id' => $this->id,
                'do' => 'clear'
            ]
        );

        $this->view->assign('moduleUrl', $moduleUrl);
        $this->view->assign('isAdmin', $this->getBackendUser()->isAdmin());
        $this->view->assign('indexCount', $this->getNumberOfRecordsInIndex());

    }
448729
public void clearListField(String fieldName) {
		Object val = getFieldValue(fieldName, true); // internal
		if (val instanceof List<?>)
			((List<?>)val).clear();
		else if (val != null && val.getClass().isArray()) {
			DOField fld = getDomainObjectType().getFieldByName(fieldName);
			String ctn = fld.getComponentTypeName();
			Class<?> clazz;
			try {
				clazz = getDomainObjectType().getDomainModel().getClassForName(ctn);
				tryInitListOrArray(null, fld, clazz);
			} catch (ClassNotFoundException e) {
				throw new RuntimeException(e);
			}
		} else {
			if (!getDomainObjectType().getFieldByName(fieldName).isListOrArray())
				throw new RuntimeException("field: [" + fieldName + "] is neither list nor array");
			if (val == null)
				throw new RuntimeException("list or array field: [" + fieldName + "] is null");
		}
	}
439768
public void clearFolders(boolean searchChanged) {

        Set<String> selectedFolders = m_searchObject.getFolders();
        if (searchChanged) {
            m_searchObjectChanged = true;
        }
        m_handler.onClearFolders(selectedFolders);
        m_searchObject.clearFolders();
        updateResultsTab(false);
        ValueChangeEvent.fire(this, m_searchObject);
    }
1002767
function() {
				fm.lazy(function() {
					var phash, emptyMethod, thtr;

					wz.append(selectAllCheckbox).removeClass('elfinder-cwd-wrapper-empty elfinder-search-result elfinder-incsearch-result elfinder-letsearch-result');
					if (fm.searchStatus.state > 1 || fm.searchStatus.ininc) {
						wz.addClass('elfinder-search-result' + (fm.searchStatus.ininc? ' elfinder-'+(query.substr(0,1) === '/' ? 'let':'inc')+'search-result' : ''));
					}
					
					// abort attachThumbJob
					bufferExt.attachThumbJob && bufferExt.attachThumbJob._abort();
					
					// destroy selectable for GC
					cwd.data('selectable') && cwd.selectable('disable').selectable('destroy').removeData('selectable');
					
					// notify cwd init
					fm.trigger('cwdinit');
					
					selectedNext = $();
					try {
						// to avoid problem with draggable
						cwd.empty();
					} catch (e) {
						cwd.html('');
					}
					
					if (tableHeader) {
						wrapper.off('scroll.fixheader resize.fixheader');
						tableHeader.remove();
						tableHeader = null;
					}

					cwd.removeClass('elfinder-cwd-view-icons elfinder-cwd-view-list')
						.addClass('elfinder-cwd-view-'+(list ? 'list' :'icons'))
						.attr('style', '')
						.css('height', 'auto');
					bottomMarker.hide();

					wrapper[list ? 'addClass' : 'removeClass']('elfinder-cwd-wrapper-list')
						._padding = parseInt(wrapper.css('padding-top')) + parseInt(wrapper.css('padding-bottom'));
					if (fm.UA.iOS) {
						wrapper.removeClass('overflow-scrolling-touch').addClass('overflow-scrolling-touch');
					}

					if (list) {
						cwd.html('<table><thead/><tbody/></table>');
						thtr = $('<tr class="ui-state-default"><td class="elfinder-cwd-view-th-name">'+fm.getColumnName('name')+'</td>'+customColsNameBuild()+'</tr>');
						cwd.find('thead').hide().append(
							thtr
							.on('contextmenu.'+fm.namespace, wrapperContextMenu.contextmenu)
							.on('touchstart.'+fm.namespace, 'td', wrapperContextMenu.touchstart)
							.on('touchmove.'+fm.namespace+' touchend.'+fm.namespace+' mouseup.'+fm.namespace, 'td', wrapperContextMenu.touchend)
							.on('click.'+fm.namespace,'td', wrapperContextMenu.click)
						).find('td:first').append(selectAllCheckbox);

						if ($.fn.sortable) {
							thtr.addClass('touch-punch touch-punch-keep-default')
								.sortable({
								axis: 'x',
								distance: 8,
								items: '> .sortable-item',
								start: function(e, ui) {
									$(ui.item[0]).data('dragging', true);
									ui.placeholder
										.width(ui.helper.removeClass('ui-state-hover').width())
										.removeClass('ui-state-active')
										.addClass('ui-state-hover')
										.css('visibility', 'visible');
								},
								update: function(e, ui){
									var target = $(ui.item[0]).attr('class').split(' ')[0].replace('elfinder-cwd-view-th-', ''),
										prev, done;
									customCols = $.map($(this).children(), function(n) {
										var name = $(n).attr('class').split(' ')[0].replace('elfinder-cwd-view-th-', '');
										if (! done) {
											if (target === name) {
												done = true;
											} else {
												prev = name;
											}
										}
										return (name === 'name')? null : name;
									});
									templates.row = makeTemplateRow();
									fm.storage('cwdCols', customCols);
									prev = '.elfinder-col-'+prev+':first';
									target = '.elfinder-col-'+target+':first';
									fm.lazy(function() {
										cwd.find('tbody tr').each(function() {
											var $this = $(this);
											$this.children(prev).after($this.children(target));
										});
									});
								},
								stop: function(e, ui) {
									setTimeout(function() {
										$(ui.item[0]).removeData('dragging');
									}, 100);
								}
							});
						}

						thtr.find('td').addClass('touch-punch').resizable({
							handles: fm.direction === 'ltr'? 'e' : 'w',
							start: function(e, ui) {
								var target = cwd.find('td.elfinder-col-'
									+ ui.element.attr('class').split(' ')[0].replace('elfinder-cwd-view-th-', '')
									+ ':first');
								
								ui.element
									.data('dragging', true)
									.data('resizeTarget', target)
									.data('targetWidth', target.width());
								colResizing = true;
								if (cwd.find('table').css('table-layout') !== 'fixed') {
									cwd.find('tbody tr:first td').each(function() {
										$(this).width($(this).width());
									});
									cwd.find('table').css('table-layout', 'fixed');
								}
							},
							resize: function(e, ui) {
								ui.element.data('resizeTarget').width(ui.element.data('targetWidth') - (ui.originalSize.width - ui.size.width));
							},
							stop : function(e, ui) {
								colResizing = false;
								fixTableHeader({fitWidth: true});
								colWidth = {};
								cwd.find('tbody tr:first td').each(function() {
									var name = $(this).attr('class').split(' ')[0].replace('elfinder-col-', '');
									colWidth[name] = $(this).width();
								});
								fm.storage('cwdColWidth', colWidth);
								setTimeout(function() {
									ui.element.removeData('dragging');
								}, 100);
							}
						})
						.find('.ui-resizable-handle').addClass('ui-icon ui-icon-grip-dotted-vertical');
					}

					buffer = $.map(incHashes || cwdHashes, function(hash) { return fm.file(hash) || null; });
					
					buffer = fm.sortFiles(buffer);
					
					if (incHashes) {
						incHashes = $.map(buffer, function(f) { return f.hash; });
					} else {
						cwdHashes = $.map(buffer, function(f) { return f.hash; });
					}
					
					bufferExt = {
						renderd: 0,
						attachTmbs: {},
						getTmbs: [],
						tmbLoading: {},
						lazyOpts: { tm : 0 }
					};
					
					wz[(buffer.length < 1) ? 'addClass' : 'removeClass']('elfinder-cwd-wrapper-empty');
					wrapper.off(scrollEvent, render).on(scrollEvent, render).trigger(scrollEvent);
					
					// set droppable
					if (!fm.cwd().write) {
						wrapper.removeClass('native-droppable')
						       .droppable('disable')
						       .removeClass('ui-state-disabled'); // for old jQueryUI see https://bugs.jqueryui.com/ticket/5974
					} else {
						wrapper[fm.isCommandEnabled('upload')? 'addClass' : 'removeClass']('native-droppable');
						wrapper.droppable(fm.isCommandEnabled('paste')? 'enable' : 'disable');
					}
				});
			}