Sha256: e5d95a8b7292c28fe3f933bf289f42c0569076441fb3f8941c83ba000be05eb9
Contents?: true
Size: 624 Bytes
Versions: 5
Compression:
Stored size: 624 Bytes
Contents
import Blacklight from './core' import CheckboxSubmit from './checkbox_submit' const BookmarkToggle = (() => { // change form submit toggle to checkbox Blacklight.doBookmarkToggleBehavior = function() { document.addEventListener('click', (e) => { if (e.target.matches('[data-checkboxsubmit-target="checkbox"]')) { const form = e.target.closest('form') if (form) new CheckboxSubmit(form).clicked(e); } }); }; Blacklight.doBookmarkToggleBehavior.selector = 'form.bookmark-toggle'; Blacklight.doBookmarkToggleBehavior(); })() export default BookmarkToggle
Version data entries
5 entries across 5 versions & 1 rubygems