forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jquery.prettyphoto.d.ts
290 lines (241 loc) · 8.49 KB
/
jquery.prettyphoto.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
// Type definitions for jQuery prettyPhoto 3.1.5
// Project: https://github.com/scaron/prettyphoto
// Definitions by: pgaske <https://github.com/pgaske>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
declare module scaron_prettyPhoto {
/**
* Pretty photo settings
*/
interface PrettyPhotoSettings {
/**
* the attribute tag to use for prettyPhoto hooks. For HTML5, use "data-rel" or similar.
* @default 'rel'
*/
hook?: string;
/**
* fast/slow/normal
* @default 'fast'
*/
animation_speed?: string;
ajaxcallback?: () => void;
/**
* false OR interval time in ms
* @default 5000
*/
slideshow?: any;
/**
* true/false
* @default false
*/
autoplay_slideshow?: boolean;
/**
* Value between 0 and 1
* @default 0.80
*/
opacity?: number;
/**
* true/false
* @default true
*/
show_title?: boolean;
/**
* Resize the photos bigger than viewport. true/false
* @default true
*/
allow_resize?: boolean;
/**
* Allow the user to expand a resized image. true/false
* @default true
*/
allow_expand?: boolean;
/**
* Pixels
* @default 500
*/
default_width?: number;
/**
* Pixels
* @default 344
*/
default_height?: number;
/**
* The separator for the gallery counter 1 "of" 2
* @default '/'
*/
counter_separator_label?: string;
/**
* light_rounded / dark_rounded / light_square / dark_square / facebook
* @default 'pp_default'
*/
theme?: string;
/**
* The padding on each side of the picture
* @default 20
*/
horizontal_padding?: number;
/**
* Hides all the flash object on a page, set to TRUE if flash appears over prettyPhoto
* @default false
*/
hideflash?: boolean;
/**
* Set the flash wmode attribute
* @default 'opaque'
*/
wmode?: string;
/**
* Automatically start videos: True/False
* @default true
*/
autoplay?: boolean;
/**
* If set to true, only the close button will close the window
* @default false
*/
modal?: boolean;
/**
* Allow prettyPhoto to update the url to enable deeplinking.
* @default true
*/
deeplinking?: boolean;
/**
* If set to true, a gallery will overlay the fullscreen image on mouse over
* @default true
*/
overlay_gallery?: boolean;
/**
* Maximum number of pictures in the overlay gallery
* @default 30
*/
overlay_gallery_max?: number;
/**
* Set to false if you open forms inside prettyPhoto
* @default true
*/
keyboard_shortcuts?: boolean;
/**
* Called everytime an item is shown/changed
* @default function () { }
*/
changepicturecallback?: () => void;
/**
* Called when prettyPhoto is closed
* @default function () { }
*/
callback?: () => void;
/**
* @default true
*/
ie6_fallback?: boolean;
/**
* Markup for pretty photo
* @default omitted for brevity
*/
markup?: string;
/**
* Markup for pretty photo gallery
* @default omitted for brevity
*/
gallery_markup?: string;
/**
* Markup for image
* @default '<img id="fullResImage" src="{path}" />'
*/
image_markup?: string;
/**
* Markup for flash
* @default '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="{width}" height="{height}"><param name="wmode" value="{wmode}" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="{path}" /><embed src="{path}" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="{width}" height="{height}" wmode="{wmode}"></embed></object>'
*/
flash_markup?: string;
/**
* Markup for quicktime
* @default '<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="{height}" width="{width}"><param name="src" value="{path}"><param name="autoplay" value="{autoplay}"><param name="type" value="video/quicktime"><embed src="{path}" height="{height}" width="{width}" autoplay="{autoplay}" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"></embed></object>'
*/
quicktime_markup?: string;
/**
* Markup for iframe
* @default '<iframe src ="{path}" width="{width}" height="{height}" frameborder="no"></iframe>'
*/
iframe_markup?: string;
/**
* @default '<div class="pp_inline">{content}</div>'
*/
inline_markup?: string;
/**
* @default ''
*/
custom_markup?: string;
/**
* Markup for social tools, set to html or false to disable
* @default '<div class="twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div class="facebook"><iframe src="//www.facebook.com/plugins/like.php?locale=en_US&href={location_href}&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe></div>'
*/
social_tools?: any;
}
interface moduleJQuery {
/**
* Initialises prettyPhoto
*/
(): JQuery;
/**
* Initialises prettyPhoto specificying overrides for the defaults
* @param pp_settings custom prettyPhoto settings
*/
(pp_settings: PrettyPhotoSettings): JQuery;
}
interface moduleJQueryStatic {
/**
* prettyPhoto version number
*/
version: string;
/**
* Opens the prettyPhoto modal box.
* Note: Always returns false.
*/
open(): boolean;
/**
* Opens the prettyPhoto modal box.
* Note: Always returns false.
* @param image {String} Full path to the image to be open, can also be an array containing full images paths.
* @param title {String} The title to be displayed with the picture, can also be an array containing all the titles.
* @param description {String} The description to be displayed with the picture, can also be an array containing all the descriptions.
*/
open(image: string, title: string, description: string): boolean;
/**
* Opens the prettyPhoto modal box.
* Note: Always returns false.
* @param image {Array} Full path to the image to be open, can also be an array containing full images paths.
* @param title {Array} The title to be displayed with the picture, can also be an array containing all the titles.
* @param description {Array} The description to be displayed with the picture, can also be an array containing all the descriptions.
*/
open(images: string[], titles: string[], descriptions: string[]): boolean;
/**
* Change page in the prettyPhoto modal box
* @param direction {String} Direction of the paging, previous or next.
*/
changePage(direction: string): void;
/**
* Change gallery page in the prettyPhoto modal box
* @param direction {String} Direction of the paging, previous or next.
*/
changeGalleryPage(direction: string): void;
/**
* Start the slideshow...
*/
startSlideshow(): void;
/**
* Stop the slideshow...
*/
stopSlideshow(): void;
/**
* Closes prettyPhoto.
*/
close(): void;
}
}
interface JQuery {
prettyPhoto: scaron_prettyPhoto.moduleJQuery;
}
interface JQueryStatic {
prettyPhoto: scaron_prettyPhoto.moduleJQueryStatic;
}