Sha256: c778c70314705bd631a57505f6d375739084a89ebe50db87036feaa5e70ef077

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 KB

Contents

/*
  Sir Trevor ItemText Block.
  This block takes an ID,
  fetches the record from solr,
  displays the image, title, 
  and any provided text
  and displays them.
*/
import Spotlight from 'spotlight'

SirTrevor.Blocks.Oembed =  (function(){

  return Spotlight.Block.extend({
    plustextable: true,

    id_key:"url",

    type: "oembed",
    
    title: function() { return i18n.t('blocks:oembed:title'); },
    description: function() { return i18n.t('blocks:oembed:description'); },

    icon_name: "oembed",
    show_heading: false,

    editorHTML: function () {
      return `<div class="form oembed-text-admin clearfix">
      <div class="widget-header">
        ${this.description()}
      </div>
      <div class="row">
        <div class="form-group col-md-8">
          <label for="${this.formId(id_key)}">${i18n.t("blocks:oembed:url")}</label>
          <input name="${id_key}" class="form-control col-md-6" type="text" id="${this.formId(id_key)}" />
        </div>
      </div>
      ${this.text_area()}
    </div>`
    }
  });
})();

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-spotlight-3.6.0.beta4 app/javascript/spotlight/admin/blocks/oembed_block.js
blacklight-spotlight-3.6.0.beta3 app/javascript/spotlight/admin/blocks/oembed_block.js
blacklight-spotlight-3.6.0.beta1 app/javascript/spotlight/admin/blocks/oembed_block.js