//= require spotlight/blocks/browse_block SirTrevor.Blocks.SearchResults = (function(){ return SirTrevor.Blocks.Browse.extend({ type: "search_results", icon_name: 'search_results', searches_key: "slug", view_key: "view", plustextable: false, content: function() { return _.template([this.items_selector()].join("
\n"))(this); }, item_options: function() { var block = this; var fields = $('[data-blacklight-configuration-search-views]').data('blacklight-configuration-search-views'); return $.map(fields, function(field) { checkbox = "" checkbox += "
"; checkbox += ""; checkbox += "
"; return checkbox; }).join("\n"); }, afterPanelRender: function(data, panel) { $(this.inner).find('.item-input-field').attr("disabled", "disabled"); }, afterPanelDelete: function() { $(this.inner).find('.item-input-field').removeAttr("disabled"); }, }); })();