Sha256: 540c6153c2fb4e75a330fb33485873a9418716eba7edff3090dac147a850b2fa

Contents?: true

Size: 750 Bytes

Versions: 84

Compression:

Stored size: 750 Bytes

Contents

//= require blacklight/core
//= require blacklight/checkbox_submit
(function($) {
//change form submit toggle to checkbox
    Blacklight.do_bookmark_toggle_behavior = function() {
      $(Blacklight.do_bookmark_toggle_behavior.selector).bl_checkbox_submit({
         //css_class is added to elements added, plus used for id base
         css_class: "toggle_bookmark",
         success: function(checked, response) {
           if (response.bookmarks) {
             $('[data-role=bookmark-counter]').text(response.bookmarks.count);
           }
         }
      });
    };
    Blacklight.do_bookmark_toggle_behavior.selector = "form.bookmark_toggle"; 

Blacklight.onLoad(function() {
  Blacklight.do_bookmark_toggle_behavior();  
});
  

})(jQuery);

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
blacklight-6.25.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.24.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.23.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.22.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.21.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.20.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.19.2 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.19.1 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.19.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.18.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.17.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.16.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.15.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.14.1 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.14.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.13.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.12.0 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.11.2 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.11.1 app/assets/javascripts/blacklight/bookmark_toggle.js
blacklight-6.11.0 app/assets/javascripts/blacklight/bookmark_toggle.js