Sha256: fa4b359e8ec7e9f8bb0b0298ef28abd2782bae19372d04fae50b27a5d6009404

Contents?: true

Size: 960 Bytes

Versions: 4

Compression:

Stored size: 960 Bytes

Contents

//= require spotlight/blocks/resources_block

SirTrevor.Blocks.FeaturedPages = (function(){

  return Spotlight.Block.Resources.extend({
    type: "featured_pages",

    icon_name: "pages",

    autocomplete_url: function() { return $(this.inner).closest('form[data-autocomplete-exhibit-feature-pages-path]').data('autocomplete-exhibit-feature-pages-path').replace("%25QUERY", "%QUERY"); },
    autocomplete_template: function() { return '<div class="autocomplete-item{{#unless published}} blacklight-private{{/unless}}">{{log "Look at me"}}{{log thumbnail_image_url}}{{#if thumbnail_image_url}}<div class="document-thumbnail thumbnail"><img src="{{thumbnail_image_url}}" /></div>{{/if}}<span class="autocomplete-title">{{title}}</span><br/><small>&nbsp;&nbsp;{{description}}</small></div>' },
    bloodhoundOptions: function() {
      return {
        prefetch: {
          url: this.autocomplete_url(),
          ttl: 0
        }
      };
    }
  });

})();

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blacklight-spotlight-0.32.0 app/assets/javascripts/spotlight/blocks/pages_block.js
blacklight-spotlight-0.31.0 app/assets/javascripts/spotlight/blocks/pages_block.js
blacklight-spotlight-0.30.0 app/assets/javascripts/spotlight/blocks/pages_block.js
blacklight-spotlight-0.29.1 app/assets/javascripts/spotlight/blocks/pages_block.js