File: PaginatedView.js

package info (click to toggle)
libjs-cocktail 0.5.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 600 kB
  • sloc: javascript: 10,697; makefile: 9
file content (15 lines) | stat: -rw-r--r-- 340 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
window.MyPaginatedView = Backbone.View.extend({
  render: function() {
    this.$el.append('<div class="the-number"></div>')
  },

  renderCurrentPage: function(page) {
    this.$('.the-number').text(page + 1);
  },

  numberOfPages: function() {
    return 10;
  }
})

Cocktail.mixin(window.MyPaginatedView, window.MyMixins.PaginateMixin);