superdesk/superdesk-client-core

View on GitHub
scripts/apps/search/views/item-searchbar.html

Summary

Maintainability
Test Coverage
<div class="item-searchbar" ng-class="{focused: focused}" ng-click="$event.stopPropagation();">

    <label for="search-input" class="search-icon">
        <i class="icon-search"></i>
    </label>

    <input id="search-input"
        type="text"
        placeholder="{{ 'Search'|translate }}"
        ng-keyup="searchOnEnter($event)"
        ng-model="query"
        tabindex="1"
        ng-focus="focused = true">

    <button class="search-cancel" ng-click="cancel();" ng-if="query">
        <i class="icon-remove-sign"></i>
    </button>

    <button id="search-button" ng-click="search();" class="search-start" aria-label="{{ 'Start search' | translate }}" ng-if="focused" tabindex="2">
        <i class="icon-chevron-right-thin"></i>
    </button>

</div>