story tag selector: only match at the beginning of the tag name

makes much more sense when quickly typing in tag names to match the
tag name you're typing, not a tag that has a description that
contains a word with what you're typing
This commit is contained in:
joshua stein 2013-03-15 19:13:58 -05:00
parent 1c0a8dfd03
commit 66548e21cf

View file

@ -301,6 +301,9 @@ $(document).ready(function() {
$("#story_tags_a").select2({
formatSelection: function(what) {
return what.id;
},
matcher: function(term, text) {
return text.toUpperCase().indexOf(term.toUpperCase()) == 0;
}
});