Skip to content

Commit

Permalink
Separate tags with comma instead of space when quick adding tags thro…
Browse files Browse the repository at this point in the history
…ugh javascript
  • Loading branch information
mrDoktar committed Jun 14, 2010
1 parent 98062bd commit b7414e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/admin/posts/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
if(tag_list_val.search(new RegExp(tag_name,"i")) >= 0)
return;

var space = (tag_list_val.substring(-1) == " " || tag_list_val.length == 0) ? "" : " ";
var comma = (tag_list_val.length == 0) ? "" : ", ";

$("#post_tag_list").val(tag_list_val + space + tag_name)
$("#post_tag_list").val(tag_list_val + comma + tag_name)
});

0 comments on commit b7414e8

Please sign in to comment.