Sha256: ee0912a0aaeec131a38724d60a010583864cf2e3eb4603017d2779d82e81f5dd

Contents?: true

Size: 1.84 KB

Versions: 3

Compression:

Stored size: 1.84 KB

Contents

o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1358560041.326087:@value"ð{I"
class:EFI"BundledAsset;FI"logical_path;FI"&showboat/plugins/slide_heading.js;FI"
pathname;FI"]/Users/mkitt/Sites/showboat/app/assets/javascripts/showboat/plugins/slide_heading.coffee;FI"content_type;FI"application/javascript;FI"
mtime;FI"2013-01-18T18:47:16-07:00;FI"length;FiI"digest;F"%25876709b803a2ce985362462b20de31I"source;FI"(function() {

  window.SlideHeading = (function() {

    function SlideHeading(reveal) {
      var _this = this;
      this.reveal = reveal;
      this.header = document.querySelector('#main_heading');
      this.heading = this.header.querySelector('h1');
      this.reveal.addEventListener('slidechanged', function() {
        return _this.render.apply(_this, arguments);
      });
      this.render({
        currentSlide: _.last(document.querySelectorAll('.present'))
      });
    }

    SlideHeading.prototype.render = function(e) {
      var markup, method, slide;
      slide = e.currentSlide;
      markup = this.title(slide);
      markup += this.link(slide);
      method = _.isEmpty(markup) ? 'remove' : 'add';
      this.heading.innerHTML = markup;
      return this.header.classList[method]('in');
    };

    SlideHeading.prototype.title = function(slide) {
      return slide.getAttribute('data-heading') || '';
    };

    SlideHeading.prototype.link = function(slide) {
      var link, src;
      link = slide.getAttribute('data-link');
      if (!link) {
        return '';
      }
      src = slide.getAttribute('data-src') || "#";
      return "<a href='" + src + "' target='_blank'>" + link + "</a>";
    };

    return SlideHeading;

  })();

}).call(this);
;FI"required_assets_digest;F"%9b7f093259ffd7a8e27febc238054d41I"
_version;F"%6776f581a4329e299531e1d52aa59832

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
showboat-0.0.3 spec/dummy/tmp/cache/assets/DB4/460/sprockets%2F35c9f4f6c51502bacb0dcbc1e3a0409c
showboat-0.0.2 spec/dummy/tmp/cache/assets/DB4/460/sprockets%2F35c9f4f6c51502bacb0dcbc1e3a0409c
showboat-0.0.1 spec/dummy/tmp/cache/assets/DB4/460/sprockets%2F35c9f4f6c51502bacb0dcbc1e3a0409c