Commit f2d6619c authored by Randall Leeds's avatar Randall Leeds

Remove the clear icon in the search bar

After performing a search, there's already a clear search link in
the view. Without a border around the search bar, the clear icon
looks a little lonely and strange all the way over on the right.
I offer that users have plenty of ways to clear text boxes and
we needn't give them this one.
parent 4b409753
......@@ -29,9 +29,6 @@ simpleSearch = ['$parse', ($parse) ->
<form class="simple-search-form" ng-class="!searchtext && 'simple-search-inactive'" name="searchBox" ng-submit="search($event)">
<input id="simple-search-{{viewId}}" class="simple-search-input" type="text" ng-model="searchtext" name="searchText" placeholder="Search…" />
<label for="simple-search-{{viewId}}" class="simple-search-icon h-icon-search"></label>
<button class="simple-search-clear" type="reset" ng-hide="!searchtext" ng-click="reset($event)">
<i class="h-icon-clear"></i>
</button>
</form>
'''
]
......
......@@ -46,18 +46,6 @@ describe 'h:directives.simple-search', ->
$element.find('form').triggerHandler('submit')
sinon.assert.calledWith($scope.update, "Test query")
it 'calls the given clear function', ->
$element.find('.simple-search-clear').click()
assert($scope.clear.called)
it 'clears the search-bar', ->
isolate.query = ''
isolate.$digest()
isolate.searchtext = "Test query"
isolate.$digest()
$element.find('.simple-search-clear').click()
assert.equal(isolate.searchtext, '')
it 'invokes callbacks when the input model changes', ->
$scope.query = "Test query"
$scope.$digest()
......
......@@ -42,18 +42,3 @@
border-color: #f3f3f3 !important;
}
}
.simple-search-clear {
position: absolute;
top: 0;
right: 0;
border: none;
background: none;
color: $gray;
line-height: inherit;
padding: 0;
&:focus, &:hover, &:active:not([disabled]) {
color: $text-color;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment