Add delay to list.js search

This commit is contained in:
Julius 2013-09-22 21:50:59 +02:00
parent 14d4d2f12d
commit 891293af84
3 changed files with 46 additions and 2 deletions

View file

@ -8,7 +8,7 @@
setToleranceBehaviour(#{FoodsoftConfig[:tolerance_is_costly]});
setStockit(#{@order.stockit?});
// create List for search-feature (using list.js, http://listjs.com)
new List(document.body, { valueNames: ['name'], engine: 'unlist' });
new CustomizedList(document.body, { valueNames: ['name'], engine: 'unlist' });
});
- title t('.title'), false
@ -41,7 +41,7 @@
.row-fluid
.well.clear
= text_field_tag :article, params[:article], placeholder: t('.search_article'), class: 'search-query input-large search'
= text_field_tag :article, params[:article], placeholder: t('.search_article'), class: 'search-query input-large delayed-search'
= form_for @group_order do |f|
= f.hidden_field :lock_version