Sha256: 8f6e717bd5d20cbe4aab7c3903ce74830f89ddb302c98d47fe929d8a07908918

Contents?: true

Size: 1.81 KB

Versions: 8

Compression:

Stored size: 1.81 KB

Contents

{I"
class:ETI"ProcessedAsset;FI"logical_path;TI"admin/more-or-less.js;FI"
pathname;TI"s/Users/brittanymartin/.rvm/gems/ruby-2.1.5/gems/trusty-cms-2.0.20/app/assets/javascripts/admin/more-or-less.js;FI"content_type;TI"application/javascript;TI"
mtime;Tl+
€WI"length;TiÈI"digest;TI"%f939e0bc80ad090fa13a3edbb2747279;FI"source;TI"È(function(MoreOrLess, $) {
  MoreOrLess.setupToggle = function (link){
    if (link.innerHTML.match(/less/i)) {
      MoreOrLess.toggle(link);
    }
    $(link).on('click', function(event){
      event.preventDefault();
      MoreOrLess.toggle(this);
    });
  }

  MoreOrLess.toggle = function(link) {
    var elements = MoreOrLess.extractToggleObjects($(link).attr('rel'));
    $(elements).slideToggle();

    $(link).toggleClass('less more');
    if (link.innerHTML.match(/less/i)) {
      link.innerHTML = 'More';
    } else if (link.innerHTML.match(/more/i)) {
      link.innerHTML = 'Less';
    }
  }

  MoreOrLess.extractToggleObjects = function(rel) {
    var matches = rel.match(/^toggle\[(.+)\]$/);
    if (matches) {
      var ids = matches[1].split(',');
      return $("#" + ids.join(", #"));
    }
  }

}(window.MoreOrLess = window.MoreOrLess || {}, jQuery));

$(function () {
  $('a.toggle').each(function(){
    MoreOrLess.setupToggle(this);
  });
});
;TI"dependency_digest;TI"%272fbe3fb70fc66fbeb8525a28dabdc4;FI"required_paths;T[I"s/Users/brittanymartin/.rvm/gems/ruby-2.1.5/gems/trusty-cms-2.0.20/app/assets/javascripts/admin/more-or-less.js;FI"dependency_paths;T[{I"	path;TI"s/Users/brittanymartin/.rvm/gems/ruby-2.1.5/gems/trusty-cms-2.0.20/app/assets/javascripts/admin/more-or-less.js;FI"
mtime;TI"2016-04-04T10:54:05-04:00;TI"digest;TI"%f939e0bc80ad090fa13a3edbb2747279;FI"
_version;TI"%5dbb392182285b4042e11c847d2199ba;F

Version data entries

8 entries across 4 versions & 1 rubygems

Version Path
trusty-clipped-extension-3.0.0 spec/dummy/tmp/cache/assets/test/sprockets/a01b9db4659f0ca25a54c07a2e1d0de7
trusty-clipped-extension-3.0.0 spec/dummy/tmp/cache/assets/test/sprockets/a6938da7a9d54ff7ef474fb6e15a6e06
trusty-clipped-extension-2.0.15 spec/dummy/tmp/cache/assets/test/sprockets/a01b9db4659f0ca25a54c07a2e1d0de7
trusty-clipped-extension-2.0.15 spec/dummy/tmp/cache/assets/test/sprockets/a6938da7a9d54ff7ef474fb6e15a6e06
trusty-clipped-extension-2.0.14 spec/dummy/tmp/cache/assets/test/sprockets/a01b9db4659f0ca25a54c07a2e1d0de7
trusty-clipped-extension-2.0.14 spec/dummy/tmp/cache/assets/test/sprockets/a6938da7a9d54ff7ef474fb6e15a6e06
trusty-clipped-extension-2.0.12 spec/dummy/tmp/cache/assets/test/sprockets/a01b9db4659f0ca25a54c07a2e1d0de7
trusty-clipped-extension-2.0.12 spec/dummy/tmp/cache/assets/test/sprockets/a6938da7a9d54ff7ef474fb6e15a6e06