_options: { },
_pageNo: 1,
_pages: 0,
+ _previousPageNo: 0,
init: function(options) {
this._options = $.extend({
// callbacks
loadItems: null
}, options);
+
+ this._cache = { };
+ this._pageNo = 1;
+ this._pages = 0;
+ this._previousPageNo = 0;
+
+ if (this._pagination.data('pages')) {
+ this._pagination.wcfPages({
+ maxPage: this._pagination.data('pages')
+ }).on('wcfpagesswitched', $.proxy(this._showPage, this));
+ }
},
/**
}
}
else {
- this._loadItems();
+ this._options.loadItems();
}
},
activePage: pageNo,
template: template
});
+ },
+
+ getPageNo: function() {
+ return this._pageNo;
}
});