Default context autocomplete

This commit is contained in:
Eric Allen 2009-10-07 11:41:31 -04:00
parent c5bb41db82
commit 9cfcd4161a
3 changed files with 3 additions and 2 deletions

View file

@ -27,7 +27,7 @@ suppress_edit_button ||= false
:method => 'get',
:with => "'_source_view=#{@source_view}'",
:before => "$('#{dom_id(project)}').block({message:null});",
:complete => "$('#{dom_id(project)}').unblock();"
:complete => "$('#{dom_id(project)}').unblock();enable_rich_interaction();"
) %>
<% end -%>

View file

@ -20,7 +20,7 @@
:method => 'get',
:with => "'_source_view=#{@source_view}'",
:before => "$('#{dom_id(project)}').block({message: null});",
:complete => "$('#{dom_id(project)}').unblock();"
:complete => "$('#{dom_id(project)}').unblock();enable_rich_interaction();"
) %>
</div>
<% unless project.description.blank? -%>

View file

@ -263,6 +263,7 @@ function enable_rich_interaction(){
$('input.Date').datepicker();
/* Autocomplete */
$('input[name=context_name]').autocomplete(contextNames);
$('input[name=project[default_context_name]]').autocomplete(contextNames);
$('input[name=project_name]').autocomplete(projectNames);
/* have to bind on keypress because of limitataions of live() */