Sha256: 558165aacddbad757a4b28dc700ed00a932bb1bf3170ac65d8668bd0d50ad323

Contents?: true

Size: 756 Bytes

Versions: 6

Compression:

Stored size: 756 Bytes

Contents

Blacklight.onLoad(function () {
  'use strict';

  // Any element on page load
  $('[data-arclight-truncate="true"]').each(function (i, e) {
    $(e).responsiveTruncate({
      more: "<%= I18n.t 'arclight.truncation.view_more' %>",
      less: "<%= I18n.t 'arclight.truncation.view_less' %>"
    });
  });

  // When elements get loaded from hierarchy
  $('.al-contents').on('navigation.contains.elements', function () {
    $('a[data-toggle="pill"]').on('shown.bs.tab', function () {
      $('[data-arclight-truncate="true"]').each(function (_, el) {
        $(el).responsiveTruncate({
          more: "<%= I18n.t 'arclight.truncation.view_more' %>",
          less: "<%= I18n.t 'arclight.truncation.view_less' %>"
        });
      });
    });
  });
});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arclight-0.2.0 app/assets/javascripts/arclight/truncator.js.erb
arclight-0.1.4 app/assets/javascripts/arclight/truncator.js.erb
arclight-0.1.3 app/assets/javascripts/arclight/truncator.js.erb
arclight-0.1.2 app/assets/javascripts/arclight/truncator.js.erb
arclight-0.1.1 app/assets/javascripts/arclight/truncator.js.erb
arclight-0.1.0 app/assets/javascripts/arclight/truncator.js.erb