dropdown layout of proposals.

Show on one level only if anything to show.

Signed-off-by: Zeljko <zeljko@zwr.fi>
show tips only when search empty

Signed-off-by: Zeljko <zeljko@zwr.fi>
search cats and manus on two letters minimum

And do not show them all when empty, it is just too many.

Signed-off-by: Zeljko <zeljko@zwr.fi>
Prevent adding the same group multiple times

Caveat in comments. Note that this feature is meant to work together
with the backend not sending back selected groups.

Signed-off-by: Ari Rahikkala <ari.rahikkala@gmail.com>
change incoming nil to empty (string or array)

This significantly reduces code later and avoids traps.

Signed-off-by: Zeljko <zeljko@zwr.fi>
do not include selected subs

Signed-off-by: Zeljko <zeljko@zwr.fi>
Remove a lost script element

Signed-off-by: Ari Rahikkala <ari.rahikkala@gmail.com>
Separate out searchItem directive

This is fairly trivial, mostly for the purpose of learning how to use
Angular directives at all, but it does at least DRY up setting a
search item's class based on the type the backend gives us.

Signed-off-by: Ari Rahikkala <ari.rahikkala@gmail.com>
other search proposals and code dry-up

Signed-off-by: Zeljko <zeljko@zwr.fi>
A first try at inline selected boxes

They're pretty bad in many ways; for instance, buttons on the row
containing the search box show up differently than buttons on
different rows (though we probably won't actually be seeing multiple
rows of buttons in a normal case). But this gets the basic idea
across, I think.

Signed-off-by: Ari Rahikkala <ari.rahikkala@gmail.com>
dry-up: parameters to hash for response

Signed-off-by: Zeljko <zeljko@zwr.fi>
code dry-up, adding urls

1. No more mapping in many places, but only in one (actually two,
   as products have their own map, but they are different than
   the subs, so they are ok).
2. Products and categories now have URLs, which should work (they
   are constructed, not scanned). Product URLs are shown as results.

Signed-off-by: Zeljko <zeljko@zwr.fi>
fix: do not sent anythong on empty query

Signed-off-by: Zeljko <zeljko@zwr.fi>
url stored in database

Note that URLs are not constructed in the database, but they
need to be made later using methods defined here.

Signed-off-by: Zeljko <zeljko@zwr.fi>
use newer zwr gem

Signed-off-by: Zeljko <zeljko@zwr.fi>
precompiled resources

Signed-off-by: Zeljko <zeljko@zwr.fi>