Debian Codegraph @

example/PaginatedViewAlt.js

raw symbols SCIP
1 (function (Cocktail) {
2 'use strict';
3
4 // Showcases the instance-based mixin method
5 // as opposed to the constructor extension
6 window.MyPaginatedViewAlt = Backbone.View.extend({
7 initialize: function () {
8 Cocktail.mixin(this, window.MyMixins.PaginateMixin);
9 },
10
11 render: function() {
12 this.$el.append('<div class="the-number"></div>');
13 },
14
15 renderCurrentPage: function(page) {
16 this.$('.the-number').text(page + 1);
17 },
18
19 numberOfPages: function() {
20 return 10;
21 }
22 });
23 })(window.Cocktail);