{I" class:ETI"BundledAsset;FI"logical_path;TI"!blacklight/search_context.js;FI" pathname;TI"/Users/jfriesen/.rvm/gems/ruby-2.0.0-p247@curate/gems/blacklight-4.5.0/app/assets/javascripts/blacklight/search_context.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+ hnRI" length;TiåI" digest;TI"%79be78c16547a6d7635192c6d1e4655a;FI" source;TI"åBlacklight = function() { var buffer = new Array; return { onLoad: function(func) { buffer.push(func); }, activate: function() { for(var i = 0; i < buffer.length; i++) { buffer[i].call(); } } } }(); if (typeof Turbolinks !== "undefined") { $(document).on('page:load', function() { Blacklight.activate(); }); } $(document).ready(function() { Blacklight.activate(); }); (function($) { Blacklight.do_search_context_behavior = function() { $('a[data-counter]').click(function(event) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'POST'; f.action = $(this).attr('href'); if(event.metaKey || event.ctrlKey){f.target = '_blank';}; var d = document.createElement('input'); d.setAttribute('type', 'hidden'); d.setAttribute('name', 'counter'); d.setAttribute('value', $(this).data('counter')); f.appendChild(d); var id = document.createElement('input'); id.setAttribute('type', 'hidden'); id.setAttribute('name', 'search_id'); id.setAttribute('value', $(this).data('search_id')); f.appendChild(id); var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', '_method'); m.setAttribute('value', 'put'); f.appendChild(m); var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', $('meta[name="csrf-param"]').attr('content')); m.setAttribute('value', $('meta[name="csrf-token"]').attr('content')); f.appendChild(m); f.submit(); return false; }); }; Blacklight.onLoad(function() { Blacklight.do_search_context_behavior(); }); })(jQuery); ;TI"required_assets_digest;TI"%03f859a9b9ab17a99623bab81b540200;FI" _version;TI"%2cf3622cbba861b85d33ffabfa420c13;F