Improve view, filter and search.

This commit is contained in:
Lars Jung 2015-05-09 16:29:26 +02:00
parent 4896d9a101
commit a362356a72
6 changed files with 82 additions and 51 deletions

View file

@ -7,7 +7,7 @@ modulejs.define('ext/search', ['_', '$', 'core/event', 'core/location', 'core/re
var template =
'<div id="search" class="tool">' +
'<img src="' + resource.image('search') + '" alt="search"/>' +
'<input class="l10n_ph-search" type="text" value="" placeholder="search"/>' +
'<input class="l10n_ph-search" type="text" value=""/>' +
'</div>';
var inputIsVisible = false;
var prevPattern = '';
@ -39,6 +39,7 @@ modulejs.define('ext/search', ['_', '$', 'core/event', 'core/location', 'core/re
}, function (response) {
$search.removeClass('pending');
view.setHint('noMatch');
view.setItems('search', _.map(response.search, function (item) {
return Item.get(item);