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

Version Path
blacklight-7.26.0 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.25.3 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.25.2 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.25.1 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.25.0 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.24.0 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.23.0.1 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.23.0 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.22.2 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.22.1 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.22.0 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.21.2 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.21.1 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.21.0 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.20.1 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.20.0 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.19.2 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.19.1 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.19.0 app/javascript/blacklight/bookmark_toggle.js
blacklight-7.18.1 app/javascript/blacklight/bookmark_toggle.js