Sha256: 58f0257552544befc3bf0f3ee28411417dd107503d64f886917e395a7e6f6925

Contents?: true

Size: 1.02 KB

Versions: 6

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 Core from 'spotlight/core'

SirTrevor.Blocks.Oembed =  (function(){

  return Core.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

6 entries across 6 versions & 1 rubygems

Version Path
blacklight-spotlight-3.6.0.beta10 app/javascript/spotlight/admin/blocks/oembed_block.js
blacklight-spotlight-3.6.0.beta9 app/javascript/spotlight/admin/blocks/oembed_block.js
blacklight-spotlight-3.6.0.beta8 app/javascript/spotlight/admin/blocks/oembed_block.js
blacklight-spotlight-3.6.0.beta7 app/javascript/spotlight/admin/blocks/oembed_block.js
blacklight-spotlight-3.6.0.beta6 app/javascript/spotlight/admin/blocks/oembed_block.js
blacklight-spotlight-3.6.0.beta5 app/javascript/spotlight/admin/blocks/oembed_block.js