-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjQuery.freezeTable.pagination.js
More file actions
57 lines (48 loc) · 1.25 KB
/
jQuery.freezeTable.pagination.js
File metadata and controls
57 lines (48 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// ref -- jQuery.
// ref -- jQuery.freezeTable 1.1
// pagination plugin
(function ($, freezeTable, undefined) {
function isDefined(obj) {
return typeof obj !== 'undefined' && obj != null;
}
function isFunction(func) {
return typeof func === 'function';
}
function log(msg) {
if (isDefined(console)) {
console.log(msg);
}
}
function extend(obj, ext) {
if (!obj) {
obj = {};
}
var k = undefined,
extObj = ext || {};
for (k in extObj) {
if (typeof (obj[k]) === 'object') {
arguments.callee(obj[k], extObj[k]);
} else {
obj[k] = extObj[k];
}
}
return obj;
}
function Pagination(table) {
this.table = table;
this.table.pagination = extend({
enabled: false,
size: 200,
total: undefined
}, this.table.pagination);
}
extend(Pagination.prototype, {
initialize: function () {
if (this.table.pagination.enabled == false) {
return;
}
}
});
// register plugins
freezeTable.plugins.pagination = Pagination;
})(jQuery, freezeTable);