Sha256: 8ef20f056882cc031e1bfd5904b52f6af52c0c740c85eb89e64805708216c10e

Contents?: true

Size: 1.98 KB

Versions: 1

Compression:

Stored size: 1.98 KB

Contents

{I"
class:ETI"ProcessedAsset;FI"logical_path;TI"!tenon/features/pagination.js;FI"
pathname;TI"^/Users/seanroberts/Sites/tenon/app/assets/javascripts/tenon/features/pagination.js.coffee;FI"content_type;TI"application/javascript;TI"
mtime;Tl+b+SI"length;Ti¯I"digest;TI"%f76f35d7f48ccfa3104bb506ad00f5fc;FI"source;TI"¯(function() {
  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

  Tenon.features.Pagination = (function() {

    function Pagination() {
      this._setActive = __bind(this._setActive, this);
      this._goToPage = __bind(this._goToPage, this);
      this._pageClicked = __bind(this._pageClicked, this);      $('ul.pagination').on('click', 'a', this._pageClicked);
    }

    Pagination.prototype._pageClicked = function(e) {
      e.preventDefault();
      this.$link = $(e.currentTarget);
      this.$pagination = this.$link.closest('.pagination');
      this._goToPage();
      return this._setActive();
    };

    Pagination.prototype._goToPage = function() {
      var $recordList;
      $recordList = $(this.$pagination.data('record-list'));
      $recordList.data('records-page', this.$link.data('page')).find('li').addClass('hidden').delay(250).remove();
      return new Tenon.features.RecordList($recordList);
    };

    Pagination.prototype._setActive = function() {
      this.$pagination.find('li.active').removeClass('active');
      return this.$link.closest('li').addClass('active');
    };

    return Pagination;

  })();

}).call(this);
;TI"dependency_digest;TI"%2841c665abe2f66cb181f5ebc2d11f55;FI"required_paths;T[I"^/Users/seanroberts/Sites/tenon/app/assets/javascripts/tenon/features/pagination.js.coffee;FI"dependency_paths;T[{I"	path;TI"^/Users/seanroberts/Sites/tenon/app/assets/javascripts/tenon/features/pagination.js.coffee;FI"
mtime;TI"2014-03-20T11:21:06-04:00;TI"digest;TI"%875d671647c5647695f272f8c5cd7473;FI"
_version;TI"%a56df69ef97ba4d9f1a23bf9b0add58a;F

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tenon-1.0 spec/dummy/tmp/cache/assets/development/sprockets/5eb52e1e8079e771fa5477efe7b16b0b