use twitter/typeahead for autocomplete. make go to project|context|tag work and show

project details in a popover
This commit is contained in:
Reinier Balt 2013-08-07 23:31:28 +02:00
parent 31386db3df
commit c0edd1749c
19 changed files with 1924 additions and 187 deletions

View file

@ -31,7 +31,9 @@ class ContextsController < ApplicationController
headers['Content-Type']=Mime::TEXT.to_s
render :action => 'index', :layout => false, :content_type => Mime::TEXT
end
format.autocomplete &render_autocomplete
format.autocomplete do
render :text => for_autocomplete(@all_contexts, params[:query] || params[:term])
end
end
end
@ -220,12 +222,6 @@ class ContextsController < ApplicationController
end
end
def render_autocomplete
lambda do
render :text => for_autocomplete(current_user.contexts, params[:term])
end
end
def feed_options
Context.feed_options(current_user)
end