forked from dokufreaks/plugin-tag
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
16 lines (16 loc) · 657 Bytes
/
script.js
File metadata and controls
16 lines (16 loc) · 657 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
* For the searchtags syntax: make the checkboxes behave like radio buttons
* so the user can't both include and exclude a tag
*/
jQuery(function() {
jQuery('form.plugin__tag_search table input').change(function() {
if (jQuery(this).attr('checked')) { // was this input checked?
if (jQuery(this).parent().hasClass('minus')) {
// find the other input in the same tr and uncheck it
jQuery(this).closest('tr').find('.plus input').attr('checked', false);
} else {
jQuery(this).closest('tr').find('.minus input').attr('checked', false);
}
}
})
});