Sha256: 4398b2508fa348ec30090847fcd70d72d4e0ff5b81deee87b2cb6bbea00d76cd
Contents?: true
Size: 911 Bytes
Versions: 75
Compression:
Stored size: 911 Bytes
Contents
(function($) { //change form submit toggle to checkbox Blacklight.doBookmarkToggleBehavior = function() { if (typeof Blacklight.do_bookmark_toggle_behavior == 'function') { console.warn("do_bookmark_toggle_behavior is deprecated. Use doBookmarkToggleBehavior instead."); return Blacklight.do_bookmark_toggle_behavior(); } $(Blacklight.doBookmarkToggleBehavior.selector).blCheckboxSubmit({ // cssClass is added to elements added, plus used for id base cssClass: 'toggle-bookmark', success: function(checked, response) { if (response.bookmarks) { $('[data-role=bookmark-counter]').text(response.bookmarks.count); } } }); }; Blacklight.doBookmarkToggleBehavior.selector = 'form.bookmark-toggle'; Blacklight.onLoad(function() { Blacklight.doBookmarkToggleBehavior(); }); })(jQuery);
Version data entries
75 entries across 75 versions & 2 rubygems