-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocumentation.html
More file actions
274 lines (273 loc) · 9.26 KB
/
documentation.html
File metadata and controls
274 lines (273 loc) · 9.26 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>elModal demos</title>
<link rel="stylesheet" type="text/css" href="dist/elModal.css">
<style type="text/css" media="screen">
body {
background-color: #e4e4e4;
font-family: serif;
}
.title {
color: #0ab2f7;
margin: 10px;
text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}
.wrap-title {
box-shadow: 0 2px 2px rgba(0,0,0,0.3);
margin: -10px;
}
.wrap-title, .wrap-title .title {
padding: 5px;
color: white;
background-color: #0ab2f7;
}
.code {
margin-top: 10px;
width: auto;
padding: 10px;
line-height: 20px;
text-align: left;
background-color: #f5f5f5;
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.example {
background-color: white;
padding: 10px;
border-radius: 6px;
}
button {
border: 0px;
background-color: #0ab2f7;
color: #fff;
cursor: pointer;
padding: 5px 10px 5px 10px;
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
a {
background-color: #0ab2f7;
padding:7px 20px 7px 20px;
color: white;
font-size: 15px;
border-radius: 10px;
box-shadow: 0 2px 2px rgba(0,0,0,0.3);
margin-bottom: 10px;
}
</style>
</head>
<body>
<div class="wrap-title"><h2 class="title">Documentation plugin elModal.js</h2></div>
<br>
<div class="example">
<h3>Modal normal</h3>
<p>1. Simple modal normal</p>
<a href="demos/basic modal normal.html" title="">View demo</a><br>
<div class="code"><code><pre>
// $('button').elModal();
</pre></code></div>
<br>
<p>2. Modal normal with some options</p>
<a href="demos/basic modal normal with different size and styles.html" title="">View demo</a>
<div class="code">
<code><pre>
// $('button').elModal({
type: 'normal',
size: 'medium',
items : {
close : 'X',
header : '<h3>Hello world</h3>',
content : '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>',
footer : '<span style="cursor:pointer" data-dismiss="elmahbub-modal">Accept</span>'
},
styles : {
backgroundContent : '#ff0000',
colorContent: '#fff'
}
});</pre></code>
</div>
</div>
<div class="example">
<h3>Modal viewer</h3>
<p>1. Basic modal viewer</p>
<a href="demos/basic modal viewer.html" title="">View demo</a><br>
<div class="code"><code><pre>
// $('button').elModal({
type: 'viewer'
});</pre></code></div>
<br>
<p>2. Modal viewer with some options</p>
<a href="demos/basic modal viewer with some option.html" title="">View demo</a><br>
<div class="code">
<code><pre>
// $('button').elModal({
type: 'viewer',
itemsViewer : {
close : '&times;',
typeFile : 'image',
arrowLeft : '&#10094;',
arrowRight : '&#10095;',
toggleFullscreen : '&#8599;',
playSlideShow : '&#9654;',
stopSlideShow : '&#9725;',
captions : '<p style="margin-left:10px">Lorem ipsum dolor sit amet.</p>',
files : $('img'),
attributes : '',
contents : '<p style="margin:10px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod'+
'tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,'+
'quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo'+
'consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse'+
'cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non'+
'proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>'
}
});</pre></code>
</div>
</div>
<div class="example">
<h3>Modal gallery</h3>
<p>1. Basic modal gallery</p>
<a href="demos/basic modal gallery.html" title="">View demo</a><br>
<div class="code">
<code><pre>
// $('button').elModal({
type: 'gallery',
itemsViewer : {
close : '&times;',
typeFile : 'image',
arrowLeft : '&#10094;',
arrowRight : '&#10095;',
toggleFullscreen : '&#8599;',
playSlideShow : '&#9654;',
stopSlideShow : '&#9725;',
captions : '<p style="margin-left:10px">Lorem ipsum dolor sit amet.</p>',
files : $('img'),
attributes : '',
contents : '<p style="margin:10px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod'+
'tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,'+
'quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo'+
'consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse'+
'cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non'+
'proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>'
}
});</pre></code>
</div>
<br>
<p>2. Modal gallery with slideshow and thumbnails</p>
<a href="demos/basic modal gallery with slideshow and thumbnails.html" title="">View demo</a><br>
<div class="code">
<code><pre>
// $('button').elModal({
type: 'gallery',
itemsViewer : {
close : '&times;',
typeFile : 'image',
arrowLeft : '&#10094;',
arrowRight : '&#10095;',
toggleFullscreen : '&#8599;',
playSlideShow : '&#9654;',
stopSlideShow : '&#9725;',
captions : '<p style="margin-left:10px">Lorem ipsum dolor sit amet.</p>',
files : $('img'),
attributes : '',
contents : '<p style="margin:10px">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod'+
'tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,'+
'quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo'+
'consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse'+
'cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non'+
'proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>'
},
slideShow: true,
thumbnailsEnabled: true
});
</pre></code>
</div>
<div class="example">
<h3>Modal iframe</h3>
<p>1. Basic modal iframe</p>
<a href="demos/basic modal iframe.html" title="">View demo</a><br>
<div class="code">
<code><pre>
// $('button').elModal({
type: 'iframe',
size: 'small',
items : {
close : 'X',
header : '<h3>Hello world</h3>',
content : '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>',
footer : '<span style="cursor:pointer" data-dismiss="elmahbub-modal">Accept</span>',
sourceIframe: $('a').attr('href')
},
styles : {
heightContent: '300px'
}
});</pre></code>
</div>
<br>
<h3>Options plugin</h3>
<code><pre>
type : 'normal', // Type modal : 'normal', 'viewer', 'gallery', 'iframe', 'normal and iframe'. Default : 'normal'.
size : 'small', // Size modal : 'small', 'medium', 'large', 'fullscreen'. Default : 'small'.
autoClose : true, // Option auto close modal
timeOut : 240000, // 3 minutes for auto close -> default.
escapeClose : true, // Close modal with escape key
outsideClose : false, // Close modal with click outside modal
templates : '', // Default template
idTarget : '',
styles : { // Styling template
backgroundModal : 'transparent',
backgroundContent : '#fff',
colorContent : '#000',
borderRadius : '0',
border: '0',
zIndexModal : '1065',
zIndexContent : '1065',
heightContent : '',
widthContent : ''
},
items : { // Items modal normal. It also instead for normal + iframe
close : '×',
header : 'Title modal', // Content header modal normal
content : '', // Content body modal normal
footer : 'Finish', // Content footer modal normal
sourceIframe : '' // Source or link for modal iframe
},
itemsViewer : { // Items modal viewer and gallery
close : '&times;',
typeFile : 'image', // Type file modal viewer : 'image', 'video'. Default : 'image'.
arrowLeft : '&#10094;', // Icon arrow left
arrowRight : '&#10095;', // Icon arrow right
toggleFullscreen : '&#8599;', // Icon toggle fullscreen
playSlideShow : '&#9654;', // Icon play slideshow
stopSlideShow : '&#9725;', // Icon stop slideshow
captions : '', // Captions files modal viewer and gallery
files : '', // Target files modal viewer and gallery.
attributes : '', // Attributes files. (ex: controls,loop,autobuffer,autoloop etc for video).
contents : ''
},
titleButtons : { // Title buttons
closeModal : 'Close',
prevSlide : 'Previous',
nextSlide : 'Next',
playSlide : 'Play slideshow',
stopSlide : 'Stop slideshow',
toggleFullscreen : 'Fullscreen mode'
},
thumbnailsEnabled : false, // Option enabled and disabled thumbnails.
setPosition : 'C', // Options modal normal position, TL : Top left, TR : Top right, BL : Bottom left, BR : Bottom right, C : Center. Default : C.
slideShow : false, // Option for slide show. Default : false.
timeSlideShow : 2000, // Time repeat slide show.
arrowKeyboard : true, // Option arrow keyboard for slideshow.
speed: 'fast', // Speed for show and hide modal. Default : fast.
fullscreenMode : true, // Fullscreen mode for modal viewer and gallery. Default : false.
targetFullscreen : 'data-elmahbub-fullscreen'
</pre></code>
<br>
<hr>
<h4>MIT License</h4>
<script src="dist/jquery.min.js" type="text/javascript"></script>
<script src="dist/elModal.js" type="text/javascript"></script>
<script>
</script>
</body>
</html>