Permalink
Browse files

Added tag autocompletion for batch job.

As per request in #192.
  • Loading branch information...
1 parent aadde9d commit 1d5ba0435053ffa7f5ac57d9afb0d0622b0a0b1f @nanaya committed Jan 23, 2013
Showing with 7 additions and 1 deletion.
  1. +6 −0 app/assets/javascripts/init.autocomplete.js.erb
  2. +1 −1 app/views/batch/create.html.erb
@@ -8,4 +8,10 @@ jQuery(document).ready(function($) {
source: '<%= url.ac_tag_name_path %>',
minLength: 2
});
+ if ($('#edit-form').length && $('textarea.ac-tags').length) {
+ new TagCompletionBox($('textarea.ac-tags')[0]);
+ if (TagCompletion) {
+ TagCompletion.observe_tag_changes_on_submit($('#edit-form')[0], $('input.ac-tags')[0], null);
+ };
+ };
});
@@ -46,7 +46,7 @@
<tr>
<th> <label for="post_tags"><%= t('.tags') %></label> </th>
<td>
- <%= text_area "post", "tags", :value => params[:tags], :size => "60x2", :tabindex => 3 %>
+ <%= text_area "post", "tags", :value => params[:tags], :size => "60x2", :tabindex => 3, :class => 'ac-tags' %>
</td>
</tr>

0 comments on commit 1d5ba04

Please sign in to comment.