Merge pull request #580 from im-mi/mass-tagger-fixes

Mass tagger fixes
This commit is contained in:
Shish 2016-09-02 15:49:18 +01:00 committed by GitHub
commit bc0b37a21f
2 changed files with 10 additions and 2 deletions

View file

@ -24,13 +24,18 @@ function toggle_tag( button, id ) {
var string = list.val();
if( (string.indexOf(id) == 0) || (string.indexOf(":"+id) > -1) ) {
$(button).css('border', 'none');
$(button).removeClass('mass-tagger-selected');
string = string.replace(id, '');
list.val(string);
}
else {
$(button).css('border', '3px solid blue');
$(button).addClass('mass-tagger-selected');
string += id;
list.val(string);
}
}
$(function () {
// Clear the selection, in case it was autocompleted by the browser.
$('#mass_tagger_ids').val("");
});

View file

@ -0,0 +1,3 @@
.mass-tagger-selected {
border: 3px solid blue;
}