forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootpag.d.ts
126 lines (104 loc) · 2.93 KB
/
bootpag.d.ts
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// Type definitions for jQuery-Bootpag 1.0.7
// Project: http://botmonster.com/jquery-bootpag/
// Definitions by: MAF.DAP / Romain Deneau <https://github.com/rdeneau/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts"/>
declare namespace JqueryBootpag {
/**
* Bootpag plugin interface options
*/
export interface Options {
/**
* number of pages
*/
total: number;
/**
* maximum number of visible pages
*/
maxVisible: number;
/**
* page to show on start
*/
page?: number;
/**
* next/prev buttons move over one page or maximum visible pages (default true)
*/
leaps?: boolean;
/**
* next button text (default "�")
*/
next?: string;
/**
* prev button text (default "�")
*/
prev?: string;
/**
* template for pagination links (default "javascript:void(0);")
*/
href?: string;
/**
* variable name in href template for page number (default "{{number}}")
*/
hrefVariable?: string;
/**
* do we ant first and last (default true)
*/
firstLastUse?: boolean;
/**
* name of first (default 'FIRST')
*/
first?: string;
/**
* name of last (default 'LAST')
*/
last?: string;
/**
* css class for wrap (default 'pagination')
*/
wrapClass?: string;
/**
* css class for active (default 'active')
*/
activeClass?: string;
/**
* css class for disabled (default 'disabled')
*/
disabledClass?: string;
/**
* css class for next (default 'next')
*/
nextClass?: string;
/**
* css class for prev (default 'prev')
*/
prevClass?: string;
/**
* css class for last (default 'last')
*/
lastClass?: string;
/**
* css class for first (default 'first')
*/
firstClass?: string;
}
/**
* Event handler on page click.
* @param event : JQueryEventObject
* @param pageNumber : number of the clicked page
*/
interface PageEventHandler {
(event: JQueryEventObject, pageNumber: number): any;
}
}
interface JQuery {
/**
* jQuery Bootpag plugin main method
*/
bootpag(options: JqueryBootpag.Options): JQuery;
/**
* jQuery Bootpag "page" event occurring on page click.
* @param eventName : always "page"
* @param handler : A function to execute when the event is triggered. The value false is also allowed as a shorthand for a function that simply does return false.
*/
on(eventName: "page", handler: JqueryBootpag.PageEventHandler): JQuery;
}