Carousel Slider - Version 1.6.0

Version Description

Download this release

Release Info

Developer sayful
Plugin Icon Carousel Slider
Version 1.6.0
Comparing to
See all releases

Code changes from version 1.5.3 to 1.6.0

Files changed (74) hide show
  1. LICENSE.txt +0 -339
  2. assets/css/admin.css +294 -10
  3. assets/css/index.php +2 -0
  4. assets/css/style.css +16 -2
  5. assets/img/ajax-loader.gif +0 -0
  6. assets/img/icon-images.svg +55 -1
  7. assets/img/index.php +2 -0
  8. assets/img/play.svg +0 -0
  9. assets/img/spin.gif +0 -0
  10. assets/index.php +2 -0
  11. assets/js/admin.js +187 -21
  12. assets/js/index.php +2 -0
  13. assets/js/jquery.livequery.js +8 -0
  14. assets/js/owl.carousel.min.js +7 -2
  15. assets/js/select2.min.js +3 -0
  16. assets/sass/admin.scss +6 -56
  17. assets/sass/admin/_datepicker.scss +46 -0
  18. assets/sass/admin/_meta-box.scss +149 -0
  19. assets/sass/admin/_model.scss +140 -0
  20. assets/sass/admin/_select2.scss +484 -0
  21. assets/sass/admin/_toggle.scss +53 -0
  22. assets/sass/admin/_widget.scss +10 -0
  23. assets/sass/admin/index.php +2 -0
  24. assets/sass/index.php +2 -0
  25. assets/sass/{_animate.scss → public/_animate.scss} +0 -0
  26. assets/sass/{_autoheight.scss → public/_autoheight.scss} +0 -0
  27. assets/sass/{_core.scss → public/_core.scss} +0 -0
  28. assets/sass/{_lazyload.scss → public/_lazyload.scss} +0 -0
  29. assets/sass/public/_post-carousel.scss +120 -0
  30. assets/sass/{_theme.scss → public/_theme.scss} +2 -2
  31. assets/sass/{_variables.scss → public/_variables.scss} +0 -0
  32. assets/sass/{_video.scss → public/_video.scss} +0 -0
  33. assets/sass/public/index.php +2 -0
  34. assets/sass/style.scss +8 -7
  35. carousel-slider.php +121 -53
  36. includes/Carousel_Slider_Activation.php +43 -0
  37. includes/Carousel_Slider_Admin.php +241 -245
  38. includes/Carousel_Slider_Documentation.php +0 -0
  39. includes/Carousel_Slider_Form.php +262 -0
  40. includes/Carousel_Slider_Meta_Box.php +0 -291
  41. includes/Carousel_Slider_VC_Element.php +27 -7
  42. includes/index.php +1 -1
  43. index.php +1 -1
  44. languages/index.php +1 -1
  45. readme.txt +50 -134
  46. screenshot-1.jpg +0 -0
  47. screenshot-2.jpg +0 -0
  48. screenshot-3.jpg +0 -0
  49. screenshot-4.jpg +0 -0
  50. screenshot-5.jpg +0 -0
  51. screenshot-6.jpg +0 -0
  52. screenshot-7.jpg +0 -0
  53. shortcodes/Carousel_Slider_Deprecated_Shortcode.php +120 -0
  54. shortcodes/Carousel_Slider_Shortcode.php +110 -96
  55. shortcodes/index.php +1 -1
  56. templates/admin/autoplay.php +37 -0
  57. templates/admin/general.php +56 -0
  58. templates/admin/images-carousel-url.php +99 -0
  59. templates/admin/images.php +16 -0
  60. templates/admin/index.php +2 -0
  61. templates/admin/navigation.php +36 -0
  62. templates/admin/post-carousel.php +62 -0
  63. templates/admin/responsive.php +50 -0
  64. templates/admin/types.php +26 -0
  65. templates/admin/video-carousel.php +28 -0
  66. templates/carousel.php +12 -4
  67. templates/documentation.php +86 -139
  68. templates/images-carousel-url.php +72 -0
  69. templates/{carousel_slide.php → images-carousel.php} +13 -9
  70. templates/index.php +1 -1
  71. templates/post-carousel.php +150 -0
  72. templates/video-carousel.php +21 -0
  73. widgets/index.php +2 -0
  74. widgets/widget-carousel_slider.php +47 -57
LICENSE.txt DELETED
@@ -1,339 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your
12
- freedom to share and change it. By contrast, the GNU General Public
13
- License is intended to guarantee your freedom to share and change free
14
- software--to make sure the software is free for all its users. This
15
- General Public License applies to most of the Free Software
16
- Foundation's software and to any other program whose authors commit to
17
- using it. (Some other Free Software Foundation software is covered by
18
- the GNU Lesser General Public License instead.) You can apply it to
19
- your programs, too.
20
-
21
- When we speak of free software, we are referring to freedom, not
22
- price. Our General Public Licenses are designed to make sure that you
23
- have the freedom to distribute copies of free software (and charge for
24
- this service if you wish), that you receive source code or can get it
25
- if you want it, that you can change the software or use pieces of it
26
- in new free programs; and that you know you can do these things.
27
-
28
- To protect your rights, we need to make restrictions that forbid
29
- anyone to deny you these rights or to ask you to surrender the rights.
30
- These restrictions translate to certain responsibilities for you if you
31
- distribute copies of the software, or if you modify it.
32
-
33
- For example, if you distribute copies of such a program, whether
34
- gratis or for a fee, you must give the recipients all the rights that
35
- you have. You must make sure that they, too, receive or can get the
36
- source code. And you must show them these terms so they know their
37
- rights.
38
-
39
- We protect your rights with two steps: (1) copyright the software, and
40
- (2) offer you this license which gives you legal permission to copy,
41
- distribute and/or modify the software.
42
-
43
- Also, for each author's protection and ours, we want to make certain
44
- that everyone understands that there is no warranty for this free
45
- software. If the software is modified by someone else and passed on, we
46
- want its recipients to know that what they have is not the original, so
47
- that any problems introduced by others will not reflect on the original
48
- authors' reputations.
49
-
50
- Finally, any free program is threatened constantly by software
51
- patents. We wish to avoid the danger that redistributors of a free
52
- program will individually obtain patent licenses, in effect making the
53
- program proprietary. To prevent this, we have made it clear that any
54
- patent must be licensed for everyone's free use or not licensed at all.
55
-
56
- The precise terms and conditions for copying, distribution and
57
- modification follow.
58
-
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
- 0. This License applies to any program or other work which contains
63
- a notice placed by the copyright holder saying it may be distributed
64
- under the terms of this General Public License. The "Program", below,
65
- refers to any such program or work, and a "work based on the Program"
66
- means either the Program or any derivative work under copyright law:
67
- that is to say, a work containing the Program or a portion of it,
68
- either verbatim or with modifications and/or translated into another
69
- language. (Hereinafter, translation is included without limitation in
70
- the term "modification".) Each licensee is addressed as "you".
71
-
72
- Activities other than copying, distribution and modification are not
73
- covered by this License; they are outside its scope. The act of
74
- running the Program is not restricted, and the output from the Program
75
- is covered only if its contents constitute a work based on the
76
- Program (independent of having been made by running the Program).
77
- Whether that is true depends on what the Program does.
78
-
79
- 1. You may copy and distribute verbatim copies of the Program's
80
- source code as you receive it, in any medium, provided that you
81
- conspicuously and appropriately publish on each copy an appropriate
82
- copyright notice and disclaimer of warranty; keep intact all the
83
- notices that refer to this License and to the absence of any warranty;
84
- and give any other recipients of the Program a copy of this License
85
- along with the Program.
86
-
87
- You may charge a fee for the physical act of transferring a copy, and
88
- you may at your option offer warranty protection in exchange for a fee.
89
-
90
- 2. You may modify your copy or copies of the Program or any portion
91
- of it, thus forming a work based on the Program, and copy and
92
- distribute such modifications or work under the terms of Section 1
93
- above, provided that you also meet all of these conditions:
94
-
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
113
-
114
- These requirements apply to the modified work as a whole. If
115
- identifiable sections of that work are not derived from the Program,
116
- and can be reasonably considered independent and separate works in
117
- themselves, then this License, and its terms, do not apply to those
118
- sections when you distribute them as separate works. But when you
119
- distribute the same sections as part of a whole which is a work based
120
- on the Program, the distribution of the whole must be on the terms of
121
- this License, whose permissions for other licensees extend to the
122
- entire whole, and thus to each and every part regardless of who wrote it.
123
-
124
- Thus, it is not the intent of this section to claim rights or contest
125
- your rights to work written entirely by you; rather, the intent is to
126
- exercise the right to control the distribution of derivative or
127
- collective works based on the Program.
128
-
129
- In addition, mere aggregation of another work not based on the Program
130
- with the Program (or with a work based on the Program) on a volume of
131
- a storage or distribution medium does not bring the other work under
132
- the scope of this License.
133
-
134
- 3. You may copy and distribute the Program (or a work based on it,
135
- under Section 2) in object code or executable form under the terms of
136
- Sections 1 and 2 above provided that you also do one of the following:
137
-
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
148
-
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
154
-
155
- The source code for a work means the preferred form of the work for
156
- making modifications to it. For an executable work, complete source
157
- code means all the source code for all modules it contains, plus any
158
- associated interface definition files, plus the scripts used to
159
- control compilation and installation of the executable. However, as a
160
- special exception, the source code distributed need not include
161
- anything that is normally distributed (in either source or binary
162
- form) with the major components (compiler, kernel, and so on) of the
163
- operating system on which the executable runs, unless that component
164
- itself accompanies the executable.
165
-
166
- If distribution of executable or object code is made by offering
167
- access to copy from a designated place, then offering equivalent
168
- access to copy the source code from the same place counts as
169
- distribution of the source code, even though third parties are not
170
- compelled to copy the source along with the object code.
171
-
172
- 4. You may not copy, modify, sublicense, or distribute the Program
173
- except as expressly provided under this License. Any attempt
174
- otherwise to copy, modify, sublicense or distribute the Program is
175
- void, and will automatically terminate your rights under this License.
176
- However, parties who have received copies, or rights, from you under
177
- this License will not have their licenses terminated so long as such
178
- parties remain in full compliance.
179
-
180
- 5. You are not required to accept this License, since you have not
181
- signed it. However, nothing else grants you permission to modify or
182
- distribute the Program or its derivative works. These actions are
183
- prohibited by law if you do not accept this License. Therefore, by
184
- modifying or distributing the Program (or any work based on the
185
- Program), you indicate your acceptance of this License to do so, and
186
- all its terms and conditions for copying, distributing or modifying
187
- the Program or works based on it.
188
-
189
- 6. Each time you redistribute the Program (or any work based on the
190
- Program), the recipient automatically receives a license from the
191
- original licensor to copy, distribute or modify the Program subject to
192
- these terms and conditions. You may not impose any further
193
- restrictions on the recipients' exercise of the rights granted herein.
194
- You are not responsible for enforcing compliance by third parties to
195
- this License.
196
-
197
- 7. If, as a consequence of a court judgment or allegation of patent
198
- infringement or for any other reason (not limited to patent issues),
199
- conditions are imposed on you (whether by court order, agreement or
200
- otherwise) that contradict the conditions of this License, they do not
201
- excuse you from the conditions of this License. If you cannot
202
- distribute so as to satisfy simultaneously your obligations under this
203
- License and any other pertinent obligations, then as a consequence you
204
- may not distribute the Program at all. For example, if a patent
205
- license would not permit royalty-free redistribution of the Program by
206
- all those who receive copies directly or indirectly through you, then
207
- the only way you could satisfy both it and this License would be to
208
- refrain entirely from distribution of the Program.
209
-
210
- If any portion of this section is held invalid or unenforceable under
211
- any particular circumstance, the balance of the section is intended to
212
- apply and the section as a whole is intended to apply in other
213
- circumstances.
214
-
215
- It is not the purpose of this section to induce you to infringe any
216
- patents or other property right claims or to contest validity of any
217
- such claims; this section has the sole purpose of protecting the
218
- integrity of the free software distribution system, which is
219
- implemented by public license practices. Many people have made
220
- generous contributions to the wide range of software distributed
221
- through that system in reliance on consistent application of that
222
- system; it is up to the author/donor to decide if he or she is willing
223
- to distribute software through any other system and a licensee cannot
224
- impose that choice.
225
-
226
- This section is intended to make thoroughly clear what is believed to
227
- be a consequence of the rest of this License.
228
-
229
- 8. If the distribution and/or use of the Program is restricted in
230
- certain countries either by patents or by copyrighted interfaces, the
231
- original copyright holder who places the Program under this License
232
- may add an explicit geographical distribution limitation excluding
233
- those countries, so that distribution is permitted only in or among
234
- countries not thus excluded. In such case, this License incorporates
235
- the limitation as if written in the body of this License.
236
-
237
- 9. The Free Software Foundation may publish revised and/or new versions
238
- of the General Public License from time to time. Such new versions will
239
- be similar in spirit to the present version, but may differ in detail to
240
- address new problems or concerns.
241
-
242
- Each version is given a distinguishing version number. If the Program
243
- specifies a version number of this License which applies to it and "any
244
- later version", you have the option of following the terms and conditions
245
- either of that version or of any later version published by the Free
246
- Software Foundation. If the Program does not specify a version number of
247
- this License, you may choose any version ever published by the Free Software
248
- Foundation.
249
-
250
- 10. If you wish to incorporate parts of the Program into other free
251
- programs whose distribution conditions are different, write to the author
252
- to ask for permission. For software which is copyrighted by the Free
253
- Software Foundation, write to the Free Software Foundation; we sometimes
254
- make exceptions for this. Our decision will be guided by the two goals
255
- of preserving the free status of all derivatives of our free software and
256
- of promoting the sharing and reuse of software generally.
257
-
258
- NO WARRANTY
259
-
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
- REPAIR OR CORRECTION.
269
-
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
- POSSIBILITY OF SUCH DAMAGES.
279
-
280
- END OF TERMS AND CONDITIONS
281
-
282
- How to Apply These Terms to Your New Programs
283
-
284
- If you develop a new program, and you want it to be of the greatest
285
- possible use to the public, the best way to achieve this is to make it
286
- free software which everyone can redistribute and change under these terms.
287
-
288
- To do so, attach the following notices to the program. It is safest
289
- to attach them to the start of each source file to most effectively
290
- convey the exclusion of warranty; and each file should have at least
291
- the "copyright" line and a pointer to where the full notice is found.
292
-
293
- <one line to give the program's name and a brief idea of what it does.>
294
- Copyright (C) <year> <name of author>
295
-
296
- This program is free software; you can redistribute it and/or modify
297
- it under the terms of the GNU General Public License as published by
298
- the Free Software Foundation; either version 2 of the License, or
299
- (at your option) any later version.
300
-
301
- This program is distributed in the hope that it will be useful,
302
- but WITHOUT ANY WARRANTY; without even the implied warranty of
303
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
- GNU General Public License for more details.
305
-
306
- You should have received a copy of the GNU General Public License along
307
- with this program; if not, write to the Free Software Foundation, Inc.,
308
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
-
310
- Also add information on how to contact you by electronic and paper mail.
311
-
312
- If the program is interactive, make it output a short notice like this
313
- when it starts in an interactive mode:
314
-
315
- Gnomovision version 69, Copyright (C) year name of author
316
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
- This is free software, and you are welcome to redistribute it
318
- under certain conditions; type `show c' for details.
319
-
320
- The hypothetical commands `show w' and `show c' should show the appropriate
321
- parts of the General Public License. Of course, the commands you use may
322
- be called something other than `show w' and `show c'; they could even be
323
- mouse-clicks or menu items--whatever suits your program.
324
-
325
- You should also get your employer (if you work as a programmer) or your
326
- school, if any, to sign a "copyright disclaimer" for the program, if
327
- necessary. Here is a sample; alter the names:
328
-
329
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
-
332
- <signature of Ty Coon>, 1 April 1989
333
- Ty Coon, President of Vice
334
-
335
- This General Public License does not permit incorporating your program into
336
- proprietary programs. If your program is a subroutine library, you may
337
- consider it more useful to permit linking proprietary applications with the
338
- library. If this is what you want to do, use the GNU Lesser General
339
- Public License instead of this License.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/admin.css CHANGED
@@ -1,15 +1,299 @@
1
  div[id*="_carousel_slider"] .widget-top { background: #ddffff !important; border: 1px solid #2196f3 !important; }
2
  div[id*="_carousel_slider"] .widget-top:hover { background: #ffdddd !important; border: 1px solid #f44336 !important; }
3
 
4
- .wpdh-gallery-thumbs { display: block; margin: 15px 0; }
5
- .wpdh-gallery-thumbs:before, .wpdh-gallery-thumbs:after { display: table; content: ""; }
6
- .wpdh-gallery-thumbs:after { clear: both; }
7
- .wpdh-gallery-thumbs ul { margin: 0; padding: 0; list-style: none; }
8
- .wpdh-gallery-thumbs li { display: inline-block; margin: 0 10px 10px 0; }
9
- .wpdh-gallery-thumbs li img { display: block; }
10
-
11
- .carousel-thumbs { margin: 0; padding: 0; list-style: none; }
12
- .carousel-thumbs li { float: left; display: inline; margin: 0; padding: 0; }
13
- .carousel-thumbs li img { display: block; margin: 0 5px 5px 0; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  /*# sourceMappingURL=admin.css.map */
1
  div[id*="_carousel_slider"] .widget-top { background: #ddffff !important; border: 1px solid #2196f3 !important; }
2
  div[id*="_carousel_slider"] .widget-top:hover { background: #ffdddd !important; border: 1px solid #f44336 !important; }
3
 
4
+ .shapla-toggle { margin: 0 0 1em 0; }
5
+ .shapla-toggle-title { display: block; padding: 15px 10px; outline: 0; cursor: pointer; position: relative; }
6
+ .shapla-toggle-title:after { position: absolute; right: 15px; font-size: 18px; font: 400 20px/1 dashicons; margin-left: -1px; padding-right: 3px; vertical-align: top; content: "\f132"; }
7
+ .shapla-toggle-title.ui-state-active:after { content: "\f460"; }
8
+ .shapla-toggle-content { padding: 20px; background-color: #f1f1f1; }
9
+ .shapla-toggle--normal .shapla-toggle-title { background: #9e9e9e; color: white; font-weight: 600; }
10
+ .shapla-toggle--stroke .shapla-toggle-title { border: 1px solid #363f48; font-weight: 600; }
11
+ .shapla-toggle--stroke .shapla-toggle-title:after { color: #363f48; }
12
+ .shapla-toggle--stroke .shapla-toggle-content { padding: 20px; background-color: #ffffff; border: 1px solid #363f48; border-top: none; }
13
+
14
+ .overflowHidden { overflow: hidden; }
15
+
16
+ .overflowVisible { overflow: visible; }
17
+
18
+ .sp-input-group { margin-bottom: 10px; }
19
+ .sp-input-group:after { content: ""; display: table; clear: both; }
20
+ .sp-input-label label { font-weight: 600; margin-right: 30px; }
21
+ .sp-input-label, .sp-input-field { float: left; width: 100%; }
22
+ .sp-input-desc { color: #999; font-size: 0.9em; line-height: 1.3em; margin: 10px 30px 10px 0; }
23
+ .sp-input-text { width: 100%; padding: 8px 8px 8px 16px; height: 35px !important; }
24
+ .sp-input-text option { padding: 8px 4px; }
25
+
26
+ @media only screen and (min-width: 600px) { .sp-input-label { width: 40%; }
27
+ .sp-input-field { width: 60%; } }
28
+ @media only screen and (min-width: 783px) { .sp-input-label { width: 30%; }
29
+ .sp-input-field { width: 70%; }
30
+ .sp-input-text { width: 25em; } }
31
+ @media only screen and (min-width: 851px) { .sp-input-label, .sp-input-field { width: 100%; } }
32
+ @media only screen and (min-width: 1200px) { .sp-input-label { width: 40%; }
33
+ .sp-input-field { width: 60%; } }
34
+ @media only screen and (min-width: 1600px) { .sp-input-label { width: 30%; }
35
+ .sp-input-field { width: 70%; } }
36
+ .carousel_slider_images:before, .carousel_slider_images:after { display: table; content: ""; }
37
+ .carousel_slider_images:after { clear: both; }
38
+ .carousel_slider_gallery_btn { border: 1px solid #616161; color: #616161; background-color: #f1f1f1; padding: 5px 15px; text-decoration: none; }
39
+ .carousel_slider_gallery_btn:hover { background-color: #ffffff; color: #616161; }
40
+ .carousel_slider_gallery_list { margin: 15px 0 0 0; padding: 0; list-style: none; box-sizing: border-box; }
41
+ .carousel_slider_gallery_list:before, .carousel_slider_gallery_list:after { display: table; content: ""; }
42
+ .carousel_slider_gallery_list:after { clear: both; }
43
+ .carousel_slider_gallery_list li { float: left; margin: 0; padding: 0; }
44
+ .carousel_slider_gallery_list li > img { margin-right: 10px; margin-bottom: 10px; display: block; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); }
45
+
46
+ /* jQuery UI Datepicker */
47
+ .ui-datepicker { background-color: #ffffff; border: 1px solid #cccccc; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); padding: 8px; display: none; }
48
+
49
+ .ui-datepicker-header { background-color: #f1f1f1; }
50
+
51
+ .ui-datepicker-prev, .ui-datepicker-next { color: #000; padding: 6px; cursor: pointer; }
52
+
53
+ .ui-datepicker-prev:hover, .ui-datepicker-next:hover { color: #000; }
54
+
55
+ .ui-datepicker-prev { float: left; }
56
+
57
+ .ui-datepicker-next { float: right; }
58
+
59
+ .ui-datepicker-calendar td > a { border: 1px solid #ddd; display: block; padding: 6px; text-decoration: none; color: #000; background-color: #f1f1f1; }
60
+
61
+ .ui-datepicker-calendar td.ui-datepicker-today > a { color: #000; background-color: #ffeb3b; }
62
+
63
+ .ui-datepicker-calendar td.ui-datepicker-current-day > a { color: #fff; background-color: #f44336; }
64
+
65
+ .sp-wp-editor-container { max-width: 560px; }
66
+
67
+ .select2-container { box-sizing: border-box; display: inline-block; margin: 0; position: relative; vertical-align: middle; }
68
+
69
+ .select2-container .select2-selection--single { box-sizing: border-box; cursor: pointer; display: block; height: 28px; user-select: none; -webkit-user-select: none; }
70
+
71
+ .select2-container .select2-selection--single .select2-selection__rendered { display: block; padding-left: 8px; padding-right: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
72
+
73
+ .select2-container .select2-selection--single .select2-selection__clear { position: relative; }
74
+
75
+ .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered { padding-right: 8px; padding-left: 20px; }
76
+
77
+ .select2-container .select2-selection--multiple { box-sizing: border-box; cursor: pointer; display: block; min-height: 32px; user-select: none; -webkit-user-select: none; }
78
+
79
+ .select2-container .select2-selection--multiple .select2-selection__rendered { display: inline-block; overflow: hidden; padding-left: 8px; text-overflow: ellipsis; white-space: nowrap; }
80
+
81
+ .select2-container .select2-search--inline { float: left; }
82
+
83
+ .select2-container .select2-search--inline .select2-search__field { box-sizing: border-box; border: none; font-size: 100%; margin-top: 5px; padding: 0; }
84
+
85
+ .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button { -webkit-appearance: none; }
86
+
87
+ .select2-dropdown { background-color: white; border: 1px solid #aaa; border-radius: 0; box-sizing: border-box; display: block; position: absolute; left: -100000px; width: 100%; z-index: 1051; }
88
+
89
+ .select2-results { display: block; }
90
+
91
+ .select2-results__options { list-style: none; margin: 0; padding: 0; }
92
+
93
+ .select2-results__option { padding: 6px; user-select: none; -webkit-user-select: none; }
94
+
95
+ .select2-results__option[aria-selected] { cursor: pointer; }
96
+
97
+ .select2-container--open .select2-dropdown { left: 0; }
98
+
99
+ .select2-container--open .select2-dropdown--above { border-bottom: none; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
100
+
101
+ .select2-container--open .select2-dropdown--below { border-top: none; border-top-left-radius: 0; border-top-right-radius: 0; }
102
+
103
+ .select2-search--dropdown { display: block; padding: 4px; }
104
+
105
+ .select2-search--dropdown .select2-search__field { padding: 4px; width: 100%; box-sizing: border-box; }
106
+
107
+ .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button { -webkit-appearance: none; }
108
+
109
+ .select2-search--dropdown.select2-search--hide { display: none; }
110
+
111
+ .select2-close-mask { border: 0; margin: 0; padding: 0; display: block; position: fixed; left: 0; top: 0; min-height: 100%; min-width: 100%; height: auto; width: auto; opacity: 0; z-index: 99; background-color: #fff; filter: alpha(opacity=0); }
112
+
113
+ .select2-hidden-accessible { border: 0 !important; clip: rect(0 0 0 0) !important; height: 1px !important; margin: -1px !important; overflow: hidden !important; padding: 0 !important; position: absolute !important; width: 1px !important; }
114
+
115
+ .select2-container--default .select2-selection--single { background-color: #fff; border: 1px solid #aaa; border-radius: 0; }
116
+
117
+ .select2-container--default .select2-selection--single .select2-selection__rendered { color: #444; line-height: 28px; }
118
+
119
+ .select2-container--default .select2-selection--single .select2-selection__clear { cursor: pointer; float: right; font-weight: bold; }
120
+
121
+ .select2-container--default .select2-selection--single .select2-selection__placeholder { color: #999; }
122
+
123
+ .select2-container--default .select2-selection--single .select2-selection__arrow { height: 26px; position: absolute; top: 1px; right: 1px; width: 20px; }
124
+
125
+ .select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: #888 transparent transparent transparent; border-style: solid; border-width: 5px 4px 0 4px; height: 0; left: 50%; margin-left: -4px; margin-top: -2px; position: absolute; top: 50%; width: 0; }
126
+
127
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear { float: left; }
128
+
129
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow { left: 1px; right: auto; }
130
+
131
+ .select2-container--default.select2-container--disabled .select2-selection--single { background-color: #eee; cursor: default; }
132
+
133
+ .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear { display: none; }
134
+
135
+ .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent #888 transparent; border-width: 0 4px 5px 4px; }
136
+
137
+ .select2-container--default .select2-selection--multiple { background-color: white; border: 1px solid #aaa; border-radius: 0; cursor: text; }
138
+
139
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered { box-sizing: border-box; list-style: none; margin: 0; padding: 0 5px; width: 100%; }
140
+
141
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li { list-style: none; }
142
+
143
+ .select2-container--default .select2-selection--multiple .select2-selection__placeholder { color: #999; margin-top: 5px; float: left; }
144
+
145
+ .select2-container--default .select2-selection--multiple .select2-selection__clear { cursor: pointer; float: right; font-weight: bold; margin-top: 5px; margin-right: 10px; }
146
+
147
+ .select2-container--default .select2-selection--multiple .select2-selection__choice { background-color: #e4e4e4; border: 1px solid #aaa; border-radius: 0; cursor: default; float: left; margin-right: 5px; margin-top: 5px; padding: 0 5px; }
148
+
149
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: #999; cursor: pointer; display: inline-block; font-weight: bold; margin-right: 2px; }
150
+
151
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { color: #333; }
152
+
153
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline { float: right; }
154
+
155
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice { margin-left: 5px; margin-right: auto; }
156
+
157
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove { margin-left: 2px; margin-right: auto; }
158
+
159
+ .select2-container--default.select2-container--focus .select2-selection--multiple { border: solid black 1px; outline: 0; }
160
+
161
+ .select2-container--default.select2-container--disabled .select2-selection--multiple { background-color: #eee; cursor: default; }
162
+
163
+ .select2-container--default.select2-container--disabled .select2-selection__choice__remove { display: none; }
164
+
165
+ .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple { border-top-left-radius: 0; border-top-right-radius: 0; }
166
+
167
+ .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
168
+
169
+ .select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid #aaa; }
170
+
171
+ .select2-container--default .select2-search--inline .select2-search__field { background: transparent; border: none; outline: 0; box-shadow: none; -webkit-appearance: textfield; }
172
+
173
+ .select2-container--default .select2-results > .select2-results__options { max-height: 200px; overflow-y: auto; }
174
+
175
+ .select2-container--default .select2-results__option[role=group] { padding: 0; }
176
+
177
+ .select2-container--default .select2-results__option[aria-disabled=true] { color: #999; }
178
+
179
+ .select2-container--default .select2-results__option[aria-selected=true] { background-color: #ddd; }
180
+
181
+ .select2-container--default .select2-results__option .select2-results__option { padding-left: 1em; }
182
+
183
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__group { padding-left: 0; }
184
+
185
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option { margin-left: -1em; padding-left: 2em; }
186
+
187
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -2em; padding-left: 3em; }
188
+
189
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -3em; padding-left: 4em; }
190
+
191
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -4em; padding-left: 5em; }
192
+
193
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option { margin-left: -5em; padding-left: 6em; }
194
+
195
+ .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: #5897fb; color: white; }
196
+
197
+ .select2-container--default .select2-results__group { cursor: default; display: block; padding: 6px; }
198
+
199
+ .select2-container--classic .select2-selection--single { background-color: #f7f7f7; border: 1px solid #aaa; border-radius: 0; outline: 0; background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%); background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%); background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
200
+
201
+ .select2-container--classic .select2-selection--single:focus { border: 1px solid #5897fb; }
202
+
203
+ .select2-container--classic .select2-selection--single .select2-selection__rendered { color: #444; line-height: 28px; }
204
+
205
+ .select2-container--classic .select2-selection--single .select2-selection__clear { cursor: pointer; float: right; font-weight: bold; margin-right: 10px; }
206
+
207
+ .select2-container--classic .select2-selection--single .select2-selection__placeholder { color: #999; }
208
+
209
+ .select2-container--classic .select2-selection--single .select2-selection__arrow { background-color: #ddd; border: none; border-left: 1px solid #aaa; border-top-right-radius: 4px; border-bottom-right-radius: 4px; height: 26px; position: absolute; top: 1px; right: 1px; width: 20px; background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%); background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%); background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
210
+
211
+ .select2-container--classic .select2-selection--single .select2-selection__arrow b { border-color: #888 transparent transparent transparent; border-style: solid; border-width: 5px 4px 0 4px; height: 0; left: 50%; margin-left: -4px; margin-top: -2px; position: absolute; top: 50%; width: 0; }
212
+
213
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear { float: left; }
214
+
215
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow { border: none; border-right: 1px solid #aaa; border-radius: 0; border-top-left-radius: 4px; border-bottom-left-radius: 4px; left: 1px; right: auto; }
216
+
217
+ .select2-container--classic.select2-container--open .select2-selection--single { border: 1px solid #5897fb; }
218
+
219
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow { background: transparent; border: none; }
220
+
221
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b { border-color: transparent transparent #888 transparent; border-width: 0 4px 5px 4px; }
222
+
223
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single { border-top: none; border-top-left-radius: 0; border-top-right-radius: 0; background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%); background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%); background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
224
+
225
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single { border-bottom: none; border-bottom-left-radius: 0; border-bottom-right-radius: 0; background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%); background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%); background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%); background-repeat: repeat-x; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
226
+
227
+ .select2-container--classic .select2-selection--multiple { background-color: white; border: 1px solid #aaa; border-radius: 0; cursor: text; outline: 0; }
228
+
229
+ .select2-container--classic .select2-selection--multiple:focus { border: 1px solid #5897fb; }
230
+
231
+ .select2-container--classic .select2-selection--multiple .select2-selection__rendered { list-style: none; margin: 0; padding: 0 5px; }
232
+
233
+ .select2-container--classic .select2-selection--multiple .select2-selection__clear { display: none; }
234
+
235
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice { background-color: #e4e4e4; border: 1px solid #aaa; border-radius: 0; cursor: default; float: left; margin-right: 5px; margin-top: 5px; padding: 0 5px; }
236
+
237
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove { color: #888; cursor: pointer; display: inline-block; font-weight: bold; margin-right: 2px; }
238
+
239
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover { color: #555; }
240
+
241
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice { float: right; }
242
+
243
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice { margin-left: 5px; margin-right: auto; }
244
+
245
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove { margin-left: 2px; margin-right: auto; }
246
+
247
+ .select2-container--classic.select2-container--open .select2-selection--multiple { border: 1px solid #5897fb; }
248
+
249
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple { border-top: none; border-top-left-radius: 0; border-top-right-radius: 0; }
250
+
251
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple { border-bottom: none; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
252
+
253
+ .select2-container--classic .select2-search--dropdown .select2-search__field { border: 1px solid #aaa; outline: 0; }
254
+
255
+ .select2-container--classic .select2-search--inline .select2-search__field { outline: 0; box-shadow: none; }
256
+
257
+ .select2-container--classic .select2-dropdown { background-color: white; border: 1px solid transparent; }
258
+
259
+ .select2-container--classic .select2-dropdown--above { border-bottom: none; }
260
+
261
+ .select2-container--classic .select2-dropdown--below { border-top: none; }
262
+
263
+ .select2-container--classic .select2-results > .select2-results__options { max-height: 200px; overflow-y: auto; }
264
+
265
+ .select2-container--classic .select2-results__option[role=group] { padding: 0; }
266
+
267
+ .select2-container--classic .select2-results__option[aria-disabled=true] { color: grey; }
268
+
269
+ .select2-container--classic .select2-results__option--highlighted[aria-selected] { background-color: #3875d7; color: white; }
270
+
271
+ .select2-container--classic .select2-results__group { cursor: default; display: block; padding: 6px; }
272
+
273
+ .select2-container--classic.select2-container--open .select2-dropdown { border-color: #5897fb; }
274
+
275
+ .carousel_slider-modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; background-color: black; background-color: rgba(0, 0, 0, 0.8); }
276
+ .carousel_slider-modal-content { position: relative; background-color: #fefefe; margin: 50px auto 18px; padding: 0; border: 1px solid #23282d; min-height: 300px; width: 412px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); }
277
+ .carousel_slider-modal-header { background-color: #23282d; color: white; font-weight: bold; padding: 10px 16px; }
278
+ .carousel_slider-modal-body { overflow-x: hidden; overflow-y: scroll; padding: 2px 16px; }
279
+ .carousel_slider-modal-footer { background-color: #23282d; color: white; font-weight: bold; padding: 10px 16px; }
280
+ .carousel_slider-modal-footer img { display: none; height: 14px; vertical-align: middle; width: 14px; }
281
+ .carousel_slider-form { margin-left: -15px; margin-right: -15px; }
282
+ .carousel_slider-fields { background-color: #f1f1f1; margin: 15px; padding: 15px 25px 15px 15px; position: relative; display: inline-block; float: left; }
283
+ .carousel_slider-fields label.setting { display: block; margin-bottom: 5px; }
284
+ .carousel_slider-fields label.setting .name { display: inline-block; vertical-align: top; width: 75px; }
285
+ .carousel_slider-fields label.setting input, .carousel_slider-fields label.setting textarea { width: 250px; }
286
+ .carousel_slider-fields .actions { position: absolute; right: 0; top: 0; }
287
+ .carousel_slider-fields .actions > span { background: #fff none repeat scroll 0 0; display: block; float: none; cursor: pointer; }
288
+ .carousel_slider-fields .actions > span .dashicons-plus-alt:hover { color: green; }
289
+ .carousel_slider-fields .actions > span .dashicons-trash:hover { color: red; }
290
+ .carousel_slider-close { color: #f1f1f1; float: right; font-size: 28px; font-weight: bold; }
291
+ .carousel_slider-close:hover, .carousel_slider-close:focus { color: #fff; text-decoration: none; cursor: pointer; }
292
+
293
+ .carousel_slider_url_images_list { margin: 15px 0 0; padding: 0; list-style: none; }
294
+ .carousel_slider_url_images_list li { float: left; display: inline-block; margin: 0 5px 5px 0; }
295
+
296
+ @media only screen and (min-width: 820px) { .carousel_slider-modal-content { width: 810px; } }
297
+ @media only screen and (min-width: 1230px) { .carousel_slider-modal-content { width: 1220px; } }
298
 
299
  /*# sourceMappingURL=admin.css.map */
assets/css/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
assets/css/style.css CHANGED
@@ -53,7 +53,21 @@
53
  .carousel-slider .carousel-slider__caption .title { overflow: hidden; text-overflow: ellipsis; color: #474747; font-size: 16px; font-weight: 500; margin: 10px 0 0; text-align: center; }
54
  .carousel-slider .carousel-slider__caption .caption { font-size: 14px; font-weight: 300; margin: 10px 0 0; text-align: center; }
55
  .carousel-slider:hover .owl-nav [class*='owl-'] { opacity: 1; }
56
- @media (max-width: 767px) { .carousel-slider:hover .sp-theme .owl-nav { display: none; }
57
- .carousel-slider .sp-theme .owl-nav { display: none; } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  /*# sourceMappingURL=style.css.map */
53
  .carousel-slider .carousel-slider__caption .title { overflow: hidden; text-overflow: ellipsis; color: #474747; font-size: 16px; font-weight: 500; margin: 10px 0 0; text-align: center; }
54
  .carousel-slider .carousel-slider__caption .caption { font-size: 14px; font-weight: 300; margin: 10px 0 0; text-align: center; }
55
  .carousel-slider:hover .owl-nav [class*='owl-'] { opacity: 1; }
56
+ @media (max-width: 767px) { .carousel-slider:hover .owl-nav { display: none; }
57
+ .carousel-slider .owl-nav { display: none; } }
58
+
59
+ .carousel-slider__post { border: 1px solid #f1f1f1; float: left; height: 450px; width: 100%; position: relative; display: block; overflow: hidden; }
60
+ .carousel-slider__post-content { bottom: 0; position: absolute; top: 0; transition: all 0.2s ease 0s; width: 100%; display: block; }
61
+ .carousel-slider__post-image { border-bottom: 1px solid #f1f1f1; display: block; height: 207px; line-height: 0; margin: 0 auto; overflow: hidden; text-align: center; width: 100%; background-color: #f1f1f1; background-size: cover; background-position: center center; }
62
+ .carousel-slider__post-title { display: block; margin: 10px 15px 0; max-height: 70px; }
63
+ .carousel-slider__post-title h1 { color: #4a4a4a; font: bold 18px/1.4em Arial,sans-serif; margin-bottom: 0; margin-top: 0; }
64
+ .carousel-slider__post-excerpt { color: #7d7d7d; font-size: 14px; line-height: 1.5em; padding: 10px 15px 5px; text-align: left; width: 100%; position: absolute; top: 285px; }
65
+ .carousel-slider__post-excerpt-overlay { background: transparent none repeat scroll 0 0; display: block; height: 20px; width: 100%; }
66
+ .carousel-slider__post-meta { bottom: 10px; color: #8e8e8e; font-size: 12px; left: 0; padding: 0 15px; position: absolute; width: 100%; display: block; }
67
+ .carousel-slider__post-publication-meta { background-color: white; display: block; padding-top: 15px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
68
+ .carousel-slider__post-details-info { display: inline-block; }
69
+ .carousel-slider__post-author { display: block; font-style: normal; line-height: 1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px; }
70
+ .carousel-slider__post-author-link { color: #8e8e8e; display: inline-block; max-width: 175px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
71
+ .carousel-slider__post-category { color: #4cc1be; text-transform: uppercase; position: absolute; right: 15px; top: 50px; z-index: 1; }
72
 
73
  /*# sourceMappingURL=style.css.map */
assets/img/ajax-loader.gif CHANGED
File without changes
assets/img/icon-images.svg CHANGED
@@ -1 +1,55 @@
1
- <?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><g><path d="M457.6,140.2l-82.5-4l-4.8-53.8c-1-11.3-11.1-19.2-22.9-18.3L51.4,88.4c-11.8,1-20.3,10.5-19.4,21.7l21.2,235.8 c1,11.3,11.2,19.2,22.9,18.3l15-1.2l-2.4,45.8c-0.6,12.6,9.2,22.8,22.4,23.5L441.3,448c13.2,0.6,24.1-8.6,24.8-21.2L480,163.5 C480.6,151,470.7,140.8,457.6,140.2z M102.6,145.5l-7.1,134.8L78.1,305l-16-178c0-0.2,0-0.3,0-0.5s0-0.3,0-0.5 c0.5-5,4.3-9,9.5-9.4l261-21.4c5.2-0.4,9.7,3,10.5,7.9c0,0.2,0.3,0.2,0.3,0.4c0,0.1,0.3,0.2,0.3,0.4l2.7,30.8l-219-10.5 C114.2,123.8,103.2,133,102.6,145.5z M436.7,382.4l-46.7-55.3l-27.5-32.7c-2.4-2.9-6.3-5.3-10.6-5.5c-4.3-0.2-7.5,1.5-11.1,4.1 l-16.4,11.9c-3.5,2.1-6.2,3.5-9.9,3.3c-3.6-0.2-6.8-1.6-9.1-3.8c-0.8-0.8-2.3-2.2-3.5-3.4l-42.8-48.9c-3.1-3.9-8.2-6.4-13.8-6.7 c-5.7-0.3-11.2,2.1-14.8,5.6L129.4,359.8l-6.8,7.4l0.3-6.8l6.8-128.9l3.3-62.9c0-0.2,0-0.4,0-0.5c0-0.2,0-0.4,0-0.5 c1.4-5.4,6.2-9.3,11.9-9l204.2,9.8l28.7,1.4l58.3,2.8c5.8,0.3,10.3,4.7,10.4,10.2c0,0.2,0.3,0.3,0.3,0.5c0,0.2,0.3,0.3,0.3,0.5 L436.7,382.4z"/></g><path d="M373.2,262.3c19.4,0,35.2-15.8,35.2-35.2s-15.7-35.2-35.2-35.2c-19.4,0-35.2,15.7-35.2,35.2S353.7,262.3,373.2,262.3z"/></g></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
+ height="500"
11
+ id="Layer_1"
12
+ version="1.1"
13
+ viewBox="0 0 500 500"
14
+ width="500"
15
+ xml:space="preserve"
16
+ inkscape:version="0.91 r13725"
17
+ sodipodi:docname="icon.svg"><metadata
18
+ id="metadata15"><rdf:RDF><cc:Work
19
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
20
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
21
+ id="defs13" /><sodipodi:namedview
22
+ pagecolor="#ffffff"
23
+ bordercolor="#666666"
24
+ borderopacity="1"
25
+ objecttolerance="10"
26
+ gridtolerance="10"
27
+ guidetolerance="10"
28
+ inkscape:pageopacity="0"
29
+ inkscape:pageshadow="2"
30
+ inkscape:window-width="1366"
31
+ inkscape:window-height="697"
32
+ id="namedview11"
33
+ showgrid="false"
34
+ fit-margin-top="0"
35
+ fit-margin-left="0"
36
+ fit-margin-right="0"
37
+ fit-margin-bottom="0"
38
+ inkscape:zoom="0.65186406"
39
+ inkscape:cx="-230.31968"
40
+ inkscape:cy="200.41848"
41
+ inkscape:window-x="0"
42
+ inkscape:window-y="24"
43
+ inkscape:window-maximized="1"
44
+ inkscape:current-layer="Layer_1" /><g
45
+ style="fill:#f44336;fill-opacity:1"
46
+ id="g5"
47
+ transform="matrix(1.1158443,0,0,1.3020918,-35.634138,-83.373233)"><path
48
+ inkscape:connector-curvature="0"
49
+ style="fill:#f44336;fill-opacity:1"
50
+ id="path7"
51
+ d="m 457.6,140.2 -82.5,-4 -4.8,-53.8 C 369.3,71.1 359.2,63.2 347.4,64.1 L 51.4,88.4 C 39.6,89.4 31.1,98.9 32,110.1 l 21.2,235.8 c 1,11.3 11.2,19.2 22.9,18.3 l 15,-1.2 -2.4,45.8 c -0.6,12.6 9.2,22.8 22.4,23.5 L 441.3,448 c 13.2,0.6 24.1,-8.6 24.8,-21.2 L 480,163.5 c 0.6,-12.5 -9.3,-22.7 -22.4,-23.3 z m -355,5.3 -7.1,134.8 -17.4,24.7 -16,-178 c 0,-0.2 0,-0.3 0,-0.5 0,-0.2 0,-0.3 0,-0.5 0.5,-5 4.3,-9 9.5,-9.4 l 261,-21.4 c 5.2,-0.4 9.7,3 10.5,7.9 0,0.2 0.3,0.2 0.3,0.4 0,0.1 0.3,0.2 0.3,0.4 l 2.7,30.8 -219,-10.5 c -13.2,-0.4 -24.2,8.8 -24.8,21.3 z M 436.7,382.4 390,327.1 362.5,294.4 c -2.4,-2.9 -6.3,-5.3 -10.6,-5.5 -4.3,-0.2 -7.5,1.5 -11.1,4.1 l -16.4,11.9 c -3.5,2.1 -6.2,3.5 -9.9,3.3 -3.6,-0.2 -6.8,-1.6 -9.1,-3.8 -0.8,-0.8 -2.3,-2.2 -3.5,-3.4 l -42.8,-48.9 c -3.1,-3.9 -8.2,-6.4 -13.8,-6.7 -5.7,-0.3 -11.2,2.1 -14.8,5.6 l -101.1,108.8 -6.8,7.4 0.3,-6.8 6.8,-128.9 3.3,-62.9 c 0,-0.2 0,-0.4 0,-0.5 0,-0.2 0,-0.4 0,-0.5 1.4,-5.4 6.2,-9.3 11.9,-9 l 204.2,9.8 28.7,1.4 58.3,2.8 c 5.8,0.3 10.3,4.7 10.4,10.2 0,0.2 0.3,0.3 0.3,0.5 0,0.2 0.3,0.3 0.3,0.5 l -10.4,198.6 z" /></g><path
52
+ inkscape:connector-curvature="0"
53
+ style="fill:#4caf50;fill-opacity:1"
54
+ id="path9"
55
+ d="m 398.02561,237.56916 c 19.4,0 35.2,-15.8 35.2,-35.2 0,-19.4 -15.7,-35.2 -35.2,-35.2 -19.4,0 -35.2,15.7 -35.2,35.2 0,19.5 15.7,35.2 35.2,35.2 z" /></svg>
assets/img/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
assets/img/play.svg CHANGED
File without changes
assets/img/spin.gif ADDED
Binary file
assets/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
assets/js/admin.js CHANGED
@@ -1,27 +1,143 @@
1
  (function( $ ) {
2
- "use strict";
3
 
4
- // Use WP Color Picker
5
- $('.colorpicker').each(function(){
6
- $(this).wpColorPicker();
7
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
- // Gallery Images Editor
10
  var frame,
11
- images = wpdh_ajax.image_ids,
 
12
  selection = loadImages(images);
13
 
14
- $('#wpdh_images_upload').on('click', function(e) {
15
  e.preventDefault();
16
  var options = {
17
- title: wpdh_ajax.create_btn_text,
18
  state: 'gallery-edit',
 
19
  frame: 'post',
20
  selection: selection
21
  };
22
 
23
  if( frame || selection ) {
24
- options['title'] = wpdh_ajax.edit_btn_text;
25
  }
26
 
27
  frame = wp.media(options).open();
@@ -29,7 +145,7 @@
29
  // Tweak Views
30
  frame.menu.get('view').unset('cancel');
31
  frame.menu.get('view').unset('separateCancel');
32
- frame.menu.get('view').get('gallery-edit').el.innerHTML = wpdh_ajax.edit_btn_text;
33
  frame.content.get('view').sidebar.unset('gallery'); // Hide Gallery Settings in sidebar
34
 
35
  // when editing a gallery
@@ -59,9 +175,9 @@
59
  selection = false;
60
  $.post(ajaxurl, {
61
  ids: '',
62
- action: 'save_images',
63
- post_id: wpdh_ajax.post_id,
64
- nonce: wpdh_ajax.nonce
65
  });
66
  }
67
  });
@@ -70,7 +186,7 @@
70
  frame.toolbar.get('view').set({
71
  insert: {
72
  style: 'primary',
73
- text: wpdh_ajax.save_btn_text,
74
  click: function(){
75
  var models = frame.state().get('library'),
76
  ids = '';
@@ -79,25 +195,25 @@
79
  ids += attachment.id + ','
80
  });
81
 
82
- this.el.innerHTML = wpdh_ajax.progress_btn_text;
83
 
84
  $.ajax({
85
  type: 'POST',
86
  url: ajaxurl,
87
  data: {
88
  ids: ids,
89
- action: 'save_images',
90
- post_id: wpdh_ajax.post_id,
91
- nonce: wpdh_ajax.nonce
92
  },
93
  success: function(){
94
  selection = loadImages(ids);
95
- $('#_wpdh_image_ids').val( ids );
96
  frame.close();
97
  },
98
  dataType: 'html'
99
  }).done( function( data ) {
100
- $('.wpdh-gallery-thumbs').html( data );
101
  console.log(data);
102
  });
103
  }
@@ -136,4 +252,54 @@
136
  return false;
137
  }
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  })(jQuery);
1
  (function( $ ) {
2
+ "use strict";
3
 
4
+ $('#_carousel_slider_slide_type').on('change', function() {
5
+ if (this.value == 'image-carousel') {
6
+ $('#section_post_query').slideUp();
7
+ $('#section_video_settings').slideUp();
8
+ $('#section_url_images_settings').slideUp();
9
+ $('#section_images_settings').slideDown();
10
+ }
11
+ if (this.value == 'image-carousel-url') {
12
+ $('#section_post_query').slideUp();
13
+ $('#section_video_settings').slideUp();
14
+ $('#section_images_settings').slideUp();
15
+ $('#section_url_images_settings').slideDown();
16
+ }
17
+ if (this.value == 'post-carousel') {
18
+ $('#section_images_settings').slideUp();
19
+ $('#section_video_settings').slideUp();
20
+ $('#section_url_images_settings').slideUp();
21
+ $('#section_post_query').slideDown();
22
+ }
23
+ if (this.value == 'video-carousel') {
24
+ $('#section_images_settings').slideUp();
25
+ $('#section_post_query').slideUp();
26
+ $('#section_url_images_settings').slideUp();
27
+ $('#section_video_settings').slideDown();
28
+ }
29
+ });
30
+
31
+ // Select2
32
+ $("select.select2").each( function () {
33
+
34
+ $(this).select2();
35
+ });
36
+
37
+ // Accordion
38
+ $(".shapla-toggle").each( function () {
39
+ if($(this).attr('data-id') == 'closed') {
40
+ $(this).accordion({
41
+ header: '.shapla-toggle-title',
42
+ collapsible: true,
43
+ heightStyle: "content",
44
+ active: false
45
+ });
46
+ } else {
47
+ $(this).accordion({
48
+ header: '.shapla-toggle-title',
49
+ collapsible: true,
50
+ heightStyle: "content"
51
+ });
52
+ }
53
+ });
54
+
55
+ //Initializing jQuery UI Datepicker
56
+ $('.datepicker').each(function(){
57
+ $( this ).datepicker({
58
+ dateFormat: 'MM dd, yy',
59
+ changeMonth: true,
60
+ changeYear: true,
61
+ onClose: function( selectedDate ){
62
+ $( this ).datepicker( 'option', 'minDate', selectedDate );
63
+ }
64
+ });
65
+ });
66
+
67
+ // Initializing WP Color Picker
68
+ $('.colorpicker').each(function(){
69
+ $(this).wpColorPicker();
70
+ });
71
+
72
+ // URL Images Model
73
+ $( "#_images_urls_btn" ).on('click', function(){
74
+ $( "#CarouselSliderModal" ).css("display", "block");
75
+ $("body").addClass("overflowHidden");
76
+ });
77
+ $( "#CarouselSliderModal" ).on('click', '.carousel_slider-close', function(){
78
+ $( "#CarouselSliderModal" ).css("display", "none");
79
+ $("body").removeClass("overflowHidden");
80
+ });
81
+
82
+ $('.carousel_slider-fields').livequery(function(){
83
+ var carouselSliderFields = '<div class="carousel_slider-fields">'
84
+ + '<label class="setting">'
85
+ + '<span class="name">URL</span>'
86
+ + '<input type="url" name="_images_urls[url][]" value="" autocomplete="off">'
87
+ + '</label>'
88
+ + '<label class="setting">'
89
+ + '<span class="name">Title</span>'
90
+ + '<input type="text" name="_images_urls[title][]" value="" autocomplete="off">'
91
+ + '</label>'
92
+ + '<label class="setting">'
93
+ + '<span class="name">Caption</span>'
94
+ + '<textarea name="_images_urls[caption][]"></textarea>'
95
+ + '</label>'
96
+ + '<label class="setting">'
97
+ + '<span class="name">Alt Text</span>'
98
+ + '<input type="text" name="_images_urls[alt][]" value="" autocomplete="off">'
99
+ + '</label>'
100
+ + '<label class="setting">'
101
+ + '<span class="name">Link To URL</span>'
102
+ + '<input type="text" name="_images_urls[link_url][]" value="" autocomplete="off">'
103
+ + '</label>'
104
+ + '<div class="actions">'
105
+ + '<span><span class="dashicons dashicons-move"></span></span>'
106
+ + '<span class="add_row"><span class="dashicons dashicons-plus-alt"></span></span>'
107
+ + '<span class="delete_row"><span class="dashicons dashicons-trash"></span></span>'
108
+ + '</div>'
109
+ + '</div>';
110
+ // Append new row
111
+ $( this ).on('click', '.add_row', function(){
112
+ $( this ).closest('.carousel_slider-fields').after(carouselSliderFields);
113
+ });
114
+ // Delete current row row
115
+ $( this ).on('click', '.delete_row', function(){
116
+ $( this ).closest('.carousel_slider-fields').remove();
117
+ });
118
+ });
119
+ $('#carousel_slider_form').sortable();
120
+ var carouselSliderBodyHeight = $( window ).height() - (38 + 48 + 32 + 30);
121
+ $('.carousel_slider-modal-body').css('height', carouselSliderBodyHeight + 'px');
122
 
123
+ // Gallery Images Editor
124
  var frame,
125
+ isMultiple = true,
126
+ images = CarouselSlider.image_ids,
127
  selection = loadImages(images);
128
 
129
+ $('#carousel_slider_gallery_btn').on('click', function(e) {
130
  e.preventDefault();
131
  var options = {
132
+ title: CarouselSlider.create_btn_text,
133
  state: 'gallery-edit',
134
+ // frame: 'post',
135
  frame: 'post',
136
  selection: selection
137
  };
138
 
139
  if( frame || selection ) {
140
+ options['title'] = CarouselSlider.edit_btn_text;
141
  }
142
 
143
  frame = wp.media(options).open();
145
  // Tweak Views
146
  frame.menu.get('view').unset('cancel');
147
  frame.menu.get('view').unset('separateCancel');
148
+ frame.menu.get('view').get('gallery-edit').el.innerHTML = CarouselSlider.edit_btn_text;
149
  frame.content.get('view').sidebar.unset('gallery'); // Hide Gallery Settings in sidebar
150
 
151
  // when editing a gallery
175
  selection = false;
176
  $.post(ajaxurl, {
177
  ids: '',
178
+ action: 'carousel_slider_save_images',
179
+ post_id: CarouselSlider.post_id,
180
+ nonce: CarouselSlider.nonce
181
  });
182
  }
183
  });
186
  frame.toolbar.get('view').set({
187
  insert: {
188
  style: 'primary',
189
+ text: CarouselSlider.save_btn_text,
190
  click: function(){
191
  var models = frame.state().get('library'),
192
  ids = '';
195
  ids += attachment.id + ','
196
  });
197
 
198
+ this.el.innerHTML = CarouselSlider.progress_btn_text;
199
 
200
  $.ajax({
201
  type: 'POST',
202
  url: ajaxurl,
203
  data: {
204
  ids: ids,
205
+ action: 'carousel_slider_save_images',
206
+ post_id: CarouselSlider.post_id,
207
+ nonce: CarouselSlider.nonce
208
  },
209
  success: function(){
210
  selection = loadImages(ids);
211
+ $('#_carousel_slider_images_ids').val( ids );
212
  frame.close();
213
  },
214
  dataType: 'html'
215
  }).done( function( data ) {
216
+ $('.carousel_slider_gallery_list').html( data );
217
  console.log(data);
218
  });
219
  }
252
  return false;
253
  }
254
 
255
+
256
+ $('#carousel_slider_video_btn').on('click', function(e) {
257
+ e.preventDefault();
258
+
259
+ var options = {
260
+ // state: 'insert',
261
+ className: 'media-frame carousel-slider-media-frame',
262
+ frame: 'select',
263
+ multiple: isMultiple,
264
+ title: CarouselSlider.video_frame_title,
265
+ library: {
266
+ type: 'video'
267
+ },
268
+ button: {
269
+ text: CarouselSlider.insert_btn_text
270
+ }
271
+ };
272
+
273
+ frame = wp.media(options).open();
274
+
275
+ frame.menu.get('view').unset('gallery');
276
+ frame.menu.get('view').unset('featured-image');
277
+
278
+ frame.toolbar.get('view').set({
279
+ insert: {
280
+ style: 'primary',
281
+ text: CarouselSlider.insert_btn_text,
282
+
283
+ click: function() {
284
+ var models = frame.state().get('selection'),
285
+ attachment_id = models.first().attributes.id,
286
+ files = [];
287
+
288
+ if( isMultiple ) {
289
+ models.map (function( attachment ) {
290
+ attachment = attachment.toJSON();
291
+ // console.log(attachment);
292
+ files.push(attachment.url);
293
+ attachment_id = files;
294
+ });
295
+ }
296
+
297
+ $('#_video_url').val( attachment_id );
298
+
299
+ frame.close();
300
+ }
301
+ }
302
+ });
303
+ });
304
+
305
  })(jQuery);
assets/js/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
assets/js/jquery.livequery.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /*! jquery.livequery - v1.3.6 - 2016-12-09
2
+ * Copyright (c)
3
+ * (c) 2010, Brandon Aaron (http://brandonaaron.net)
4
+ * (c) 2012 - 2016, Alexander Zaytsev (https://alexzaytsev.me)
5
+ * Dual licensed under the MIT (MIT_LICENSE.txt)
6
+ * and GPL Version 2 (GPL_LICENSE.txt) licenses.
7
+ */
8
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a,b){function c(a,b,c,d){return!(a.selector!=b.selector||a.context!=b.context||c&&c.$lqguid!=b.fn.$lqguid||d&&d.$lqguid!=b.fn2.$lqguid)}a.extend(a.fn,{livequery:function(b,e){var f,g=this;return a.each(d.queries,function(a,d){if(c(g,d,b,e))return(f=d)&&!1}),f=f||new d(g.selector,g.context,b,e),f.stopped=!1,f.run(),g},expire:function(b,e){var f=this;return a.each(d.queries,function(a,g){c(f,g,b,e)&&!f.stopped&&d.stop(g.id)}),f}});var d=a.livequery=function(b,c,e,f){var g=this;return g.selector=b,g.context=c,g.fn=e,g.fn2=f,g.elements=a([]),g.stopped=!1,g.id=d.queries.push(g)-1,e.$lqguid=e.$lqguid||d.guid++,f&&(f.$lqguid=f.$lqguid||d.guid++),g};d.prototype={stop:function(){var b=this;b.stopped||(b.fn2&&b.elements.each(b.fn2),b.elements=a([]),b.stopped=!0)},run:function(){var b=this;if(!b.stopped){var c=b.elements,d=a(b.selector,b.context),e=d.not(c),f=c.not(d);b.elements=d,e.each(b.fn),b.fn2&&f.each(b.fn2)}}},a.extend(d,{guid:0,queries:[],queue:[],running:!1,timeout:null,registered:[],checkQueue:function(){if(d.running&&d.queue.length)for(var a=d.queue.length;a--;)d.queries[d.queue.shift()].run()},pause:function(){d.running=!1},play:function(){d.running=!0,d.run()},registerPlugin:function(){a.each(arguments,function(b,c){if(a.fn[c]&&!(a.inArray(c,d.registered)>0)){var e=a.fn[c];a.fn[c]=function(){var a=e.apply(this,arguments);return d.run(),a},d.registered.push(c)}})},run:function(c){c!==b?a.inArray(c,d.queue)<0&&d.queue.push(c):a.each(d.queries,function(b){a.inArray(b,d.queue)<0&&d.queue.push(b)}),d.timeout&&clearTimeout(d.timeout),d.timeout=setTimeout(d.checkQueue,20)},stop:function(c){c!==b?d.queries[c].stop():a.each(d.queries,d.prototype.stop)}}),d.registerPlugin("append","prepend","after","before","wrap","attr","removeAttr","addClass","removeClass","toggleClass","empty","remove","html","prop","removeProp"),a(function(){d.play()})});
assets/js/owl.carousel.min.js CHANGED
@@ -1,2 +1,7 @@
1
- !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this.drag=a.extend({},m),this.state=a.extend({},n),this.e=a.extend({},o),this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._invalidated={},this._pipe=[],a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a[0].toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Pipe,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}function f(a){if(a.touches!==d)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(a.touches===d){if(a.pageX!==d)return{x:a.pageX,y:a.pageY};if(a.pageX===d)return{x:a.clientX,y:a.clientY}}}function g(a){var b,d,e=c.createElement("div"),f=a;for(b in f)if(d=f[b],"undefined"!=typeof e.style[d])return e=null,[d,b];return[!1]}function h(){return g(["transition","WebkitTransition","MozTransition","OTransition"])[1]}function i(){return g(["transform","WebkitTransform","MozTransform","OTransform","msTransform"])[0]}function j(){return g(["perspective","webkitPerspective","MozPerspective","OPerspective","MsPerspective"])[0]}function k(){return"ontouchstart"in b||!!navigator.msMaxTouchPoints}function l(){return b.navigator.msPointerEnabled}var m,n,o;m={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,offsetX:0,offsetY:0,distance:null,startTime:0,endTime:0,updatedX:0,targetEl:null},n={isTouch:!1,isScrolling:!1,isSwiping:!1,direction:!1,inMotion:!1},o={_onDragStart:null,_onDragMove:null,_onDragEnd:null,_transitionEnd:null,_resizer:null,_responsiveCall:null,_goToLoop:null,_checkVisibile:null},e.Defaults={items:3,loop:!1,center:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,responsiveClass:!1,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",themeClass:"owl-theme",baseClass:"owl-carousel",itemClass:"owl-item",centerClass:"center",activeClass:"active"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Plugins={},e.Pipe=[{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){var a=this._clones,b=this.$stage.children(".cloned");(b.length!==a.length||!this.settings.loop&&a.length>0)&&(this.$stage.children(".cloned").remove(),this._clones=[])}},{filter:["items","settings"],run:function(){var a,b,c=this._clones,d=this._items,e=this.settings.loop?c.length-Math.max(2*this.settings.items,4):0;for(a=0,b=Math.abs(e/2);b>a;a++)e>0?(this.$stage.children().eq(d.length+c.length-1).remove(),c.pop(),this.$stage.children().eq(0).remove(),c.pop()):(c.push(c.length/2),this.$stage.append(d[c[c.length-1]].clone().addClass("cloned")),c.push(d.length-1-(c.length-1)/2),this.$stage.prepend(d[c[c.length-1]].clone().addClass("cloned")))}},{filter:["width","items","settings"],run:function(){var a,b,c,d=this.settings.rtl?1:-1,e=(this.width()/this.settings.items).toFixed(3),f=0;for(this._coordinates=[],b=0,c=this._clones.length+this._items.length;c>b;b++)a=this._mergers[this.relative(b)],a=this.settings.mergeFit&&Math.min(a,this.settings.items)||a,f+=(this.settings.autoWidth?this._items[this.relative(b)].width()+this.settings.margin:e*a)*d,this._coordinates.push(f)}},{filter:["width","items","settings"],run:function(){var b,c,d=(this.width()/this.settings.items).toFixed(3),e={width:Math.abs(this._coordinates[this._coordinates.length-1])+2*this.settings.stagePadding,"padding-left":this.settings.stagePadding||"","padding-right":this.settings.stagePadding||""};if(this.$stage.css(e),e={width:this.settings.autoWidth?"auto":d-this.settings.margin},e[this.settings.rtl?"margin-left":"margin-right"]=this.settings.margin,!this.settings.autoWidth&&a.grep(this._mergers,function(a){return a>1}).length>0)for(b=0,c=this._coordinates.length;c>b;b++)e.width=Math.abs(this._coordinates[b])-Math.abs(this._coordinates[b-1]||0)-this.settings.margin,this.$stage.children().eq(b).css(e);else this.$stage.children().css(e)}},{filter:["width","items","settings"],run:function(a){a.current&&this.reset(this.$stage.children().index(a.current))}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children("."+this.settings.activeClass).removeClass(this.settings.activeClass),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass(this.settings.activeClass),this.settings.center&&(this.$stage.children("."+this.settings.centerClass).removeClass(this.settings.centerClass),this.$stage.children().eq(this.current()).addClass(this.settings.centerClass))}}],e.prototype.initialize=function(){if(this.trigger("initialize"),this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass("owl-rtl",this.settings.rtl),this.browserSupport(),this.settings.autoWidth&&this.state.imagesLoaded!==!0){var b,c,e;if(b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e)return this.preloadAutoWidthImages(b),!1}this.$element.addClass("owl-loading"),this.$stage=a("<"+this.settings.stageElement+' class="owl-stage"/>').wrap('<div class="owl-stage-outer">'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this._width=this.$element.width(),this.refresh(),this.$element.removeClass("owl-loading").addClass("owl-loaded"),this.eventsCall(),this.internalEvents(),this.addTriggerableEvents(),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),delete e.responsive,e.responsiveClass&&this.$element.attr("class",function(a,b){return b.replace(/\b owl-responsive-\S+/g,"")}).addClass("owl-responsive-"+d)):e=a.extend({},this.options),(null===this.settings||this._breakpoint!==d)&&(this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}))},e.prototype.optionsLogic=function(){this.$element.toggleClass("owl-center",this.settings.center),this.settings.loop&&this._items.length<this.settings.items&&(this.settings.loop=!1),this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.settings.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={}},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){if(0===this._items.length)return!1;(new Date).getTime();this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$stage.addClass("owl-refresh"),this.update(),this.$stage.removeClass("owl-refresh"),this.state.orientation=b.orientation,this.watchVisibility(),this.trigger("refreshed")},e.prototype.eventsCall=function(){this.e._onDragStart=a.proxy(function(a){this.onDragStart(a)},this),this.e._onDragMove=a.proxy(function(a){this.onDragMove(a)},this),this.e._onDragEnd=a.proxy(function(a){this.onDragEnd(a)},this),this.e._onResize=a.proxy(function(a){this.onResize(a)},this),this.e._transitionEnd=a.proxy(function(a){this.transitionEnd(a)},this),this.e._preventClick=a.proxy(function(a){this.preventClick(a)},this)},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this.e._onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.trigger("resize").isDefaultPrevented()?!1:(this._width=this.$element.width(),this.invalidate("width"),this.refresh(),void this.trigger("resized")):!1},e.prototype.eventsRouter=function(a){var b=a.type;"mousedown"===b||"touchstart"===b?this.onDragStart(a):"mousemove"===b||"touchmove"===b?this.onDragMove(a):"mouseup"===b||"touchend"===b?this.onDragEnd(a):"touchcancel"===b&&this.onDragEnd(a)},e.prototype.internalEvents=function(){var c=(k(),l());this.settings.mouseDrag?(this.$stage.on("mousedown",a.proxy(function(a){this.eventsRouter(a)},this)),this.$stage.on("dragstart",function(){return!1}),this.$stage.get(0).onselectstart=function(){return!1}):this.$element.addClass("owl-text-select-on"),this.settings.touchDrag&&!c&&this.$stage.on("touchstart touchcancel",a.proxy(function(a){this.eventsRouter(a)},this)),this.transitionEndVendor&&this.on(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd,!1),this.settings.responsive!==!1&&this.on(b,"resize",a.proxy(this.onThrottledResize,this))},e.prototype.onDragStart=function(d){var e,g,h,i;if(e=d.originalEvent||d||b.event,3===e.which||this.state.isTouch)return!1;if("mousedown"===e.type&&this.$stage.addClass("owl-grab"),this.trigger("drag"),this.drag.startTime=(new Date).getTime(),this.speed(0),this.state.isTouch=!0,this.state.isScrolling=!1,this.state.isSwiping=!1,this.drag.distance=0,g=f(e).x,h=f(e).y,this.drag.offsetX=this.$stage.position().left,this.drag.offsetY=this.$stage.position().top,this.settings.rtl&&(this.drag.offsetX=this.$stage.position().left+this.$stage.width()-this.width()+this.settings.margin),this.state.inMotion&&this.support3d)i=this.getTransformProperty(),this.drag.offsetX=i,this.animate(i),this.state.inMotion=!0;else if(this.state.inMotion&&!this.support3d)return this.state.inMotion=!1,!1;this.drag.startX=g-this.drag.offsetX,this.drag.startY=h-this.drag.offsetY,this.drag.start=g-this.drag.startX,this.drag.targetEl=e.target||e.srcElement,this.drag.updatedX=this.drag.start,("IMG"===this.drag.targetEl.tagName||"A"===this.drag.targetEl.tagName)&&(this.drag.targetEl.draggable=!1),a(c).on("mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents",a.proxy(function(a){this.eventsRouter(a)},this))},e.prototype.onDragMove=function(a){var c,e,g,h,i,j;this.state.isTouch&&(this.state.isScrolling||(c=a.originalEvent||a||b.event,e=f(c).x,g=f(c).y,this.drag.currentX=e-this.drag.startX,this.drag.currentY=g-this.drag.startY,this.drag.distance=this.drag.currentX-this.drag.offsetX,this.drag.distance<0?this.state.direction=this.settings.rtl?"right":"left":this.drag.distance>0&&(this.state.direction=this.settings.rtl?"left":"right"),this.settings.loop?this.op(this.drag.currentX,">",this.coordinates(this.minimum()))&&"right"===this.state.direction?this.drag.currentX-=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length):this.op(this.drag.currentX,"<",this.coordinates(this.maximum()))&&"left"===this.state.direction&&(this.drag.currentX+=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length)):(h=this.coordinates(this.settings.rtl?this.maximum():this.minimum()),i=this.coordinates(this.settings.rtl?this.minimum():this.maximum()),j=this.settings.pullDrag?this.drag.distance/5:0,this.drag.currentX=Math.max(Math.min(this.drag.currentX,h+j),i+j)),(this.drag.distance>8||this.drag.distance<-8)&&(c.preventDefault!==d?c.preventDefault():c.returnValue=!1,this.state.isSwiping=!0),this.drag.updatedX=this.drag.currentX,(this.drag.currentY>16||this.drag.currentY<-16)&&this.state.isSwiping===!1&&(this.state.isScrolling=!0,this.drag.updatedX=this.drag.start),this.animate(this.drag.updatedX)))},e.prototype.onDragEnd=function(b){var d,e,f;if(this.state.isTouch){if("mouseup"===b.type&&this.$stage.removeClass("owl-grab"),this.trigger("dragged"),this.drag.targetEl.removeAttribute("draggable"),this.state.isTouch=!1,this.state.isScrolling=!1,this.state.isSwiping=!1,0===this.drag.distance&&this.state.inMotion!==!0)return this.state.inMotion=!1,!1;this.drag.endTime=(new Date).getTime(),d=this.drag.endTime-this.drag.startTime,e=Math.abs(this.drag.distance),(e>3||d>300)&&this.removeClick(this.drag.targetEl),f=this.closest(this.drag.updatedX),this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(f),this.invalidate("position"),this.update(),this.settings.pullDrag||this.drag.updatedX!==this.coordinates(f)||this.transitionEnd(),this.drag.distance=0,a(c).off(".owl.dragEvents")}},e.prototype.removeClick=function(c){this.drag.targetEl=c,a(c).on("click.preventClick",this.e._preventClick),b.setTimeout(function(){a(c).off("click.preventClick")},300)},e.prototype.preventClick=function(b){b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation&&b.stopPropagation(),a(b.target).off("click.preventClick")},e.prototype.getTransformProperty=function(){var a,c;return a=b.getComputedStyle(this.$stage.get(0),null).getPropertyValue(this.vendorName+"transform"),a=a.replace(/matrix(3d)?\(|\)/g,"").split(","),c=16===a.length,c!==!0?a[4]:a[12]},e.prototype.closest=function(b){var c=-1,d=30,e=this.width(),f=this.coordinates();return this.settings.freeDrag||a.each(f,a.proxy(function(a,g){return b>g-d&&g+d>b?c=a:this.op(b,"<",g)&&this.op(b,">",f[a+1]||g-e)&&(c="left"===this.state.direction?a+1:a),-1===c},this)),this.settings.loop||(this.op(b,">",f[this.minimum()])?c=b=this.minimum():this.op(b,"<",f[this.maximum()])&&(c=b=this.maximum())),c},e.prototype.animate=function(b){this.trigger("translate"),this.state.inMotion=this.speed()>0,this.support3d?this.$stage.css({transform:"translate3d("+b+"px,0px, 0px)",transition:this.speed()/1e3+"s"}):this.state.isTouch?this.$stage.css({left:b+"px"}):this.$stage.animate({left:b},this.speed()/1e3,this.settings.fallbackEasing,a.proxy(function(){this.state.inMotion&&this.transitionEnd()},this))},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(a){this._invalidated[a]=!0},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(b,c){var e=c?this._items.length:this._items.length+this._clones.length;return!a.isNumeric(b)||1>e?d:b=this._clones.length?(b%e+e)%e:Math.max(this.minimum(c),Math.min(this.maximum(c),b))},e.prototype.relative=function(a){return a=this.normalize(a),a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=0,f=this.settings;if(a)return this._items.length-1;if(!f.loop&&f.center)b=this._items.length-1;else if(f.loop||f.center)if(f.loop||f.center)b=this._items.length+f.items;else{if(!f.autoWidth&&!f.merge)throw"Can not detect maximum absolute position.";for(revert=f.rtl?1:-1,c=this.$stage.width()-this.$element.width();(d=this.coordinates(e))&&!(d*revert>=c);)b=++e}else b=this._items.length-f.items;return b},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c=null;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[b-1]||0))/2*(this.settings.rtl?-1:1)):c=this._coordinates[b-1]||0,c)},e.prototype.duration=function(a,b,c){return Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(c,d){if(this.settings.loop){var e=c-this.relative(this.current()),f=this.current(),g=this.current(),h=this.current()+e,i=0>g-h?!0:!1,j=this._clones.length+this._items.length;h<this.settings.items&&i===!1?(f=g+this._items.length,this.reset(f)):h>=j-this.settings.items&&i===!0&&(f=g-this._items.length,this.reset(f)),b.clearTimeout(this.e._goToLoop),this.e._goToLoop=b.setTimeout(a.proxy(function(){this.speed(this.duration(this.current(),f+e,d)),this.current(f+e),this.update()},this),30)}else this.speed(this.duration(this.current(),c,d)),this.current(c),this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.transitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.state.inMotion=!1,void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)},this)),this.reset(a.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(a,b){b=b===d?this._items.length:this.normalize(b,!0),this.trigger("add",{content:a,position:b}),0===this._items.length||b===this._items.length?(this.$stage.append(a),this._items.push(a),this._mergers.push(1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)):(this._items[b].before(a),this._items.splice(b,0,a),this._mergers.splice(b,0,1*a.find("[data-merge]").andSelf("[data-merge]").attr("data-merge")||1)),this.invalidate("items"),this.trigger("added",{content:a,position:b})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.addTriggerableEvents=function(){var b=a.proxy(function(b,c){return a.proxy(function(a){a.relatedTarget!==this&&(this.suppress([c]),b.apply(this,[].slice.call(arguments,1)),this.release([c]))},this)},this);a.each({next:this.next,prev:this.prev,to:this.to,destroy:this.destroy,refresh:this.refresh,replace:this.replace,add:this.add,remove:this.remove},a.proxy(function(a,c){this.$element.on(a+".owl.carousel",b(c,a+".owl.carousel"))},this))},e.prototype.watchVisibility=function(){function c(a){return a.offsetWidth>0&&a.offsetHeight>0}function d(){c(this.$element.get(0))&&(this.$element.removeClass("owl-hidden"),this.refresh(),b.clearInterval(this.e._checkVisibile))}c(this.$element.get(0))||(this.$element.addClass("owl-hidden"),b.clearInterval(this.e._checkVisibile),this.e._checkVisibile=b.setInterval(a.proxy(d,this),500))},e.prototype.preloadAutoWidthImages=function(b){var c,d,e,f;c=0,d=this,b.each(function(g,h){e=a(h),f=new Image,f.onload=function(){c++,e.attr("src",f.src),e.css("opacity",1),c>=b.length&&(d.state.imagesLoaded=!0,d.initialize())},f.src=e.attr("src")||e.attr("data-src")||e.attr("data-src-retina")})},e.prototype.destroy=function(){this.$element.hasClass(this.settings.themeClass)&&this.$element.removeClass(this.settings.themeClass),this.settings.responsive!==!1&&a(b).off("resize.owl.carousel"),this.transitionEndVendor&&this.off(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd);for(var d in this._plugins)this._plugins[d].destroy();(this.settings.mouseDrag||this.settings.touchDrag)&&(this.$stage.off("mousedown touchstart touchcancel"),a(c).off(".owl.dragEvents"),this.$stage.get(0).onselectstart=function(){},this.$stage.off("dragstart",function(){return!1})),this.$element.off(".owl"),this.$stage.children(".cloned").remove(),this.e=null,this.$element.removeData("owlCarousel"),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.unwrap()},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d){var e={item:{count:this._items.length,index:this.current()}},f=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),g=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},e,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(g)}),this.$element.trigger(g),this.settings&&"function"==typeof this.settings[f]&&this.settings[f].apply(this,g)),g},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.browserSupport=function(){if(this.support3d=j(),this.support3d){this.transformVendor=i();var a=["transitionend","webkitTransitionEnd","transitionend","oTransitionEnd"];this.transitionEndVendor=a[h()],this.vendorName=this.transformVendor.replace(/Transform/i,""),this.vendorName=""!==this.vendorName?"-"+this.vendorName.toLowerCase()+"-":""}this.state.orientation=b.orientation},a.fn.owlCarousel=function(b){return this.each(function(){a(this).data("owlCarousel")||a(this).data("owlCarousel",new e(this,b))})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b){var c=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,d=c.center&&Math.ceil(c.items/2)||c.items,e=c.center&&-1*d||0,f=(b.property&&b.property.value||this._core.current())+e,g=this._core.clones().length,h=a.proxy(function(a,b){this.load(b)},this);e++<d;)this.load(g/2+this._core.relative(f)),g&&a.each(this._core.clones(this._core.relative(f++)),h)},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this._core.$element.on(this._handlers)};c.Defaults={lazyLoad:!1},c.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},c.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=c}(window.Zepto||window.jQuery,window,document),function(a){var b=function(c){this._core=c,this._handlers={"initialized.owl.carousel":a.proxy(function(){this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass)===this._core.$stage.children().eq(this._core.current())&&this.update()},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this._core.$element.on(this._handlers)};b.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},b.prototype.update=function(){this._core.$stage.parent().height(this._core.$stage.children().eq(this._core.current()).height()).addClass(this._core.settings.autoHeightClass)},b.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=b}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this._core=b,this._videos={},this._playing=null,this._fullscreen=!1,this._handlers={"resize.owl.carousel":a.proxy(function(a){this._core.settings.video&&!this.isInFullScreen()&&a.preventDefault()},this),"refresh.owl.carousel changed.owl.carousel":a.proxy(function(){this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))},this)},this._core.options=a.extend({},d.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};d.Defaults={video:!1,videoHeight:!1,videoWidth:!1},d.prototype.fetch=function(a,b){var c=a.attr("data-vimeo-id")?"vimeo":"youtube",d=a.attr("data-vimeo-id")||a.attr("data-youtube-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com))\/(video\/|embed\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else{if(!(d[3].indexOf("vimeo")>-1))throw new Error("Video URL not supported.");c="vimeo"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},d.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="http://img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type&&a.ajax({type:"GET",url:"http://vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}))},d.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null},d.prototype.play=function(b){this._core.trigger("play",null,"video"),this._playing&&this.stop();var c,d,e=a(b.target||b.srcElement),f=e.closest("."+this._core.settings.itemClass),g=this._videos[f.attr("data-video")],h=g.width||"100%",i=g.height||this._core.$stage.height();"youtube"===g.type?c='<iframe width="'+h+'" height="'+i+'" src="http://www.youtube.com/embed/'+g.id+"?autoplay=1&v="+g.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===g.type&&(c='<iframe src="http://player.vimeo.com/video/'+g.id+'?autoplay=1" width="'+h+'" height="'+i+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'),f.addClass("owl-video-playing"),this._playing=f,d=a('<div style="height:'+i+"px; width:"+h+'px" class="owl-video-frame">'+c+"</div>"),e.after(d)},d.prototype.isInFullScreen=function(){var d=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return d&&a(d).parent().hasClass("owl-video-frame")&&(this._core.speed(0),this._fullscreen=!0),d&&this._fullscreen&&this._playing?!1:this._fullscreen?(this._fullscreen=!1,!1):this._playing&&this._core.state.orientation!==b.orientation?(this._core.state.orientation=b.orientation,!1):!0},d.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=d}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){this.swapping="translated"==a.type},this),"translate.owl.carousel":a.proxy(function(){this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&this.core.support3d){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c)),f&&e.addClass("animated owl-animated-in").addClass(f).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",c))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.transitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c){var d=function(b){this.core=b,this.core.options=a.extend({},d.Defaults,this.core.options),this.handlers={"translated.owl.carousel refreshed.owl.carousel":a.proxy(function(){this.autoplay()
2
- },this),"play.owl.autoplay":a.proxy(function(a,b,c){this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(){this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this.core.settings.autoplayHoverPause&&this.autoplay()},this)},this.core.$element.on(this.handlers)};d.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},d.prototype.autoplay=function(){this.core.settings.autoplay&&!this.core.state.videoPlay?(b.clearInterval(this.interval),this.interval=b.setInterval(a.proxy(function(){this.play()},this),this.core.settings.autoplayTimeout)):b.clearInterval(this.interval)},d.prototype.play=function(){return c.hidden===!0||this.core.state.isTouch||this.core.state.isScrolling||this.core.state.isSwiping||this.core.state.inMotion?void 0:this.core.settings.autoplay===!1?void b.clearInterval(this.interval):void this.core.next(this.core.settings.autoplaySpeed)},d.prototype.stop=function(){b.clearInterval(this.interval)},d.prototype.pause=function(){b.clearInterval(this.interval)},d.prototype.destroy=function(){var a,c;b.clearInterval(this.interval);for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=d}(window.Zepto||window.jQuery,window,document),function(a){"use strict";var b=function(c){this._core=c,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.push(a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"add.owl.carousel":a.proxy(function(b){this._core.settings.dotsData&&this._templates.splice(b.position,0,a(b.content).find("[data-dot]").andSelf("[data-dot]").attr("data-dot"))},this),"remove.owl.carousel prepared.owl.carousel":a.proxy(function(a){this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"change.owl.carousel":a.proxy(function(a){if("position"==a.property.name&&!this._core.state.revert&&!this._core.settings.loop&&this._core.settings.navRewind){var b=this._core.current(),c=this._core.maximum(),d=this._core.minimum();a.data=a.property.value>c?b>=c?d:c:a.property.value<d?c:a.property.value}},this),"changed.owl.carousel":a.proxy(function(a){"position"==a.property.name&&this.draw()},this),"refreshed.owl.carousel":a.proxy(function(){this._initialized||(this.initialize(),this._initialized=!0),this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation")},this)},this._core.options=a.extend({},b.Defaults,this._core.options),this.$element.on(this._handlers)};b.Defaults={nav:!1,navRewind:!0,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotData:!1,dotsSpeed:!1,dotsContainer:!1,controlsClass:"owl-controls"},b.prototype.initialize=function(){var b,c,d=this._core.settings;d.dotsData||(this._templates=[a("<div>").addClass(d.dotClass).append(a("<span>")).prop("outerHTML")]),d.navContainer&&d.dotsContainer||(this._controls.$container=a("<div>").addClass(d.controlsClass).appendTo(this.$element)),this._controls.$indicators=d.dotsContainer?a(d.dotsContainer):a("<div>").hide().addClass(d.dotsClass).appendTo(this._controls.$container),this._controls.$indicators.on("click","div",a.proxy(function(b){var c=a(b.target).parent().is(this._controls.$indicators)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(c,d.dotsSpeed)},this)),b=d.navContainer?a(d.navContainer):a("<div>").addClass(d.navContainerClass).prependTo(this._controls.$container),this._controls.$next=a("<"+d.navElement+">"),this._controls.$previous=this._controls.$next.clone(),this._controls.$previous.addClass(d.navClass[0]).html(d.navText[0]).hide().prependTo(b).on("click",a.proxy(function(){this.prev(d.navSpeed)},this)),this._controls.$next.addClass(d.navClass[1]).html(d.navText[1]).hide().appendTo(b).on("click",a.proxy(function(){this.next(d.navSpeed)},this));for(c in this._overrides)this._core[c]=a.proxy(this[c],this)},b.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},b.prototype.update=function(){var a,b,c,d=this._core.settings,e=this._core.clones().length/2,f=e+this._core.items().length,g=d.center||d.autoWidth||d.dotData?1:d.dotsEach||d.items;if("page"!==d.slideBy&&(d.slideBy=Math.min(d.slideBy,d.items)),d.dots||"page"==d.slideBy)for(this._pages=[],a=e,b=0,c=0;f>a;a++)(b>=g||0===b)&&(this._pages.push({start:a-e,end:a-e+g-1}),b=0,++c),b+=this._core.mergers(this._core.relative(a))},b.prototype.draw=function(){var b,c,d="",e=this._core.settings,f=(this._core.$stage.children(),this._core.relative(this._core.current()));if(!e.nav||e.loop||e.navRewind||(this._controls.$previous.toggleClass("disabled",0>=f),this._controls.$next.toggleClass("disabled",f>=this._core.maximum())),this._controls.$previous.toggle(e.nav),this._controls.$next.toggle(e.nav),e.dots){if(b=this._pages.length-this._controls.$indicators.children().length,e.dotData&&0!==b){for(c=0;c<this._controls.$indicators.children().length;c++)d+=this._templates[this._core.relative(c)];this._controls.$indicators.html(d)}else b>0?(d=new Array(b+1).join(this._templates[0]),this._controls.$indicators.append(d)):0>b&&this._controls.$indicators.children().slice(b).remove();this._controls.$indicators.find(".active").removeClass("active"),this._controls.$indicators.children().eq(a.inArray(this.current(),this._pages)).addClass("active")}this._controls.$indicators.toggle(e.dots)},b.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotData?1:c.dotsEach||c.items)}},b.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,function(a){return a.start<=b&&a.end>=b}).pop()},b.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},b.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},b.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},b.prototype.to=function(b,c,d){var e;d?a.proxy(this._overrides.to,this._core)(b,c):(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c))},a.fn.owlCarousel.Constructor.Plugins.Navigation=b}(window.Zepto||window.jQuery,window,document),function(a,b){"use strict";var c=function(d){this._core=d,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(){"URLHash"==this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){var c=a(b.content).find("[data-hash]").andSelf("[data-hash]").attr("data-hash");this._hashes[c]=b.content},this)},this._core.options=a.extend({},c.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(){var a=b.location.hash.substring(1),c=this._core.$stage.children(),d=this._hashes[a]&&c.index(this._hashes[a])||0;return a?void this._core.to(d,!1,!0):!1},this))};c.Defaults={URLhashListener:!1},c.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=c}(window.Zepto||window.jQuery,window,document);
 
 
 
 
 
1
+ /**
2
+ * Owl Carousel v2.2.0
3
+ * Copyright 2013-2016 David Deutsch
4
+ * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
5
+ */
6
+ !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.$element.is(":visible")?(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized"))):!1:!1},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return"left"===c&&b>h-e&&h+e>b?d=a:"right"===c&&b>h-f-e&&h-f+e>b?d=a+1:this.op(b,"<",h)&&this.op(b,">",g[a+1]||h-f)&&(d="left"===c?a+1:a),-1===d},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||1>c?a=d:(0>a||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){for(b=this._items.length,c=this._items[--b].width(),d=this.$element.width();b--&&(c+=this._items[b].width()+this.settings.margin,!(c>d)););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(0>e),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&i>=d-e&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.leave("animating"),void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c),e=[],f=0;a.each(d,function(b,c){e.push(a(c).height())}),f=Math.max.apply(null,e),this._core.$stage.parent().height(f).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}}))},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='<iframe width="'+g+'" height="'+h+'" src="//www.youtube.com/embed/'+f.id+"?autoplay=1&v="+f.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===f.type?c='<iframe src="//player.vimeo.com/video/'+f.id+'?autoplay=1" width="'+g+'" height="'+h+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>':"vzaar"===f.type&&(c='<iframe frameborder="0"height="'+h+'"width="'+g+'" allowfullscreen mozallowfullscreen webkitAllowFullScreen src="//view.vzaar.com/'+f.id+'/player?autoplay=true"></iframe>'),a('<div class="owl-video-frame">'+c+"</div>").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null);
7
+ },a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(a,b){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},e.prototype._getNextTimeout=function(d,e){return this._timeout&&b.clearTimeout(this._timeout),b.setTimeout(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout)},e.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearTimeout(this._timeout),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("<div>").addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;e>a;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):0>b&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){return g[b]!==d?(e=c?b:!0,!1):void 0}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
assets/js/select2.min.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ /*! Select2 4.0.3 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.slice(0,n.length-1).concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(b,d.concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){if("string"!=typeof a)throw new Error("See almond README: incorrect module build, no module name");b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice,c=b.call(arguments,1);this.listeners=this.listeners||{},null==c&&(c=[]),0===c.length&&c.push({}),c[0]._type=a,a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.highlightFirstItem=function(){var a=this.$results.find(".select2-results__option[aria-selected]"),b=a.filter("[aria-selected=true]");b.length>0?b.first().trigger("mouseenter"):a.first().trigger("mouseenter"),this.ensureHighlightVisible()},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")})})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("unselect",function(){b.isOpen()&&(d.setClasses(),d.highlightFirstItem())}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-b+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("focus",function(b){a.isOpen()||c.$selection.focus()}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");
2
+ if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},j,l),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){d.status&&"0"===d.status||e.trigger("results:message",{message:"errorLoading"})});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&null!=a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");void 0!==f&&(this.createTag=f);var g=d.get("insertTag");if(void 0!==g&&(this.insertTag=g),b.call(this,c,d),a.isArray(e))for(var h=0;h<e.length;h++){var i=e[h],j=this._normalizeItem(i),k=this.option(j);this.$element.append(k)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(b,c,d){function e(b){var c=g._normalizeItem(b),d=g.$element.find("option").filter(function(){return a(this).val()===c.id});if(!d.length){var e=g.option(c);e.attr("data-select2-tag",!0),g._removeOldTags(),g.addOptions([e])}f(c)}function f(a){g.trigger("select",{data:a})}var g=this;c.term=c.term||"";var h=this.tokenizer(c,this.options,e);h.term!==c.term&&(this.$search.length&&(this.$search.val(h.term),this.$search.focus()),c.term=h.term),b.call(this,c,d)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("focus",function(){c.isOpen()&&e.$search.focus()}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(b,c,d){this.$dropdownParent=d.get("dropdownParent")||a(document.body),b.call(this,c,d)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=this.$container.offset();f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom},m=this.$dropdownParent;"static"===m.css("position")&&(m=m.offsetParent());var n=m.offset();l.top-=n.top,l.left-=n.left,c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-n.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.position="relative",a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(a){d._handleSelectOnClose(a)})},a.prototype._handleSelectOnClose=function(a,b){if(b&&null!=b.originalSelect2Event){var c=b.originalSelect2Event;if("select"===c._type||"unselect"===c._type)return}var d=this.getHighlightedResults();if(!(d.length<1)){var e=d.data("data");null!=e.element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e})}},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{originalEvent:c,originalSelect2Event:b})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend(!0,{},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b=b.replace(/(:|\.|\[|\]|,)/g,""),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this.$element.on("focus.select2",function(a){b.trigger("focus",a)}),this._syncA=c.bind(this._syncAttributes,this),this._syncS=c.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._syncA),a.each(c,b._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",b._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",b._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",b._syncS,!1))},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype._syncSubtree=function(a,b){var c=!1,d=this;if(!a||!a.target||"OPTION"===a.target.nodeName||"OPTGROUP"===a.target.nodeName){if(b)if(b.addedNodes&&b.addedNodes.length>0)for(var e=0;e<b.addedNodes.length;e++){var f=b.addedNodes[e];f.selected&&(c=!0)}else b.removedNodes&&b.removedNodes.length>0&&(c=!0);else c=!0;c&&this.dataAdapter.current(function(a){d.trigger("selection:update",{data:a})})}},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null;
3
+ },e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery-mousewheel",["jquery"],function(a){return a}),b.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,b,c,d){if(null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend(!0,{},b);new c(a(this),d)}),this;if("string"==typeof b){var d,f=Array.prototype.slice.call(arguments,1);return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2."),d=c[b].apply(c,f)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
assets/sass/admin.scss CHANGED
@@ -1,56 +1,6 @@
1
- // Widget Styles
2
- div[id*="_carousel_slider"] .widget-top{
3
- background: #ddffff !important;
4
- border: 1px solid #2196f3 !important;
5
-
6
- &:hover {
7
- background: #ffdddd !important;
8
- border: 1px solid #f44336 !important;
9
- }
10
- }
11
-
12
- .wpdh-gallery-thumbs{
13
- display: block;
14
- margin: 15px 0;
15
- &:before,
16
- &:after {
17
- display: table;
18
- content: "";
19
- }
20
- &:after {
21
- clear: both;
22
- }
23
-
24
- ul {
25
- margin: 0;
26
- padding: 0;
27
- list-style: none;
28
- }
29
-
30
- li {
31
- display: inline-block;
32
- margin: 0 10px 10px 0;
33
-
34
- img {
35
- display: block;
36
- }
37
- }
38
- }
39
-
40
- .carousel-thumbs {
41
- margin: 0;
42
- padding: 0;
43
- list-style: none;
44
-
45
- li {
46
- float: left;
47
- display: inline;
48
- margin: 0;
49
- padding: 0;
50
-
51
- img {
52
- display: block;
53
- margin: 0 5px 5px 0;
54
- }
55
- }
56
- }
1
+ @import 'admin/widget';
2
+ @import 'admin/toggle';
3
+ @import 'admin/meta-box';
4
+ @import 'admin/datepicker';
5
+ @import 'admin/select2';
6
+ @import 'admin/model';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/sass/admin/_datepicker.scss ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* jQuery UI Datepicker */
2
+ .ui-datepicker{
3
+ background-color: #ffffff;
4
+ border:1px solid #cccccc;
5
+ box-shadow:0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
6
+ padding: 8px;
7
+ display: none;
8
+ }
9
+ .ui-datepicker-header {
10
+ background-color: #f1f1f1;
11
+ }
12
+ .ui-datepicker-prev,
13
+ .ui-datepicker-next {
14
+ color:#000;
15
+ padding: 6px;
16
+ cursor: pointer;
17
+ }
18
+ .ui-datepicker-prev:hover,
19
+ .ui-datepicker-next:hover {
20
+ color:#000;
21
+ }
22
+ .ui-datepicker-prev {
23
+ float: left;
24
+ }
25
+ .ui-datepicker-next {
26
+ float: right;
27
+ }
28
+ .ui-datepicker-calendar td > a {
29
+ border: 1px solid #ddd;
30
+ display: block;
31
+ padding: 6px;
32
+ text-decoration: none;
33
+ color:#000;
34
+ background-color:#f1f1f1;
35
+ }
36
+ .ui-datepicker-calendar td.ui-datepicker-today > a {
37
+ color:#000;
38
+ background-color:#ffeb3b;
39
+ }
40
+ .ui-datepicker-calendar td.ui-datepicker-current-day > a {
41
+ color:#fff;
42
+ background-color:#f44336;
43
+ }
44
+ .sp-wp-editor-container {
45
+ max-width: 560px;
46
+ }
assets/sass/admin/_meta-box.scss ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Global
2
+ .overflowHidden {
3
+ overflow: hidden;
4
+ }
5
+ .overflowVisible {
6
+ overflow: visible;
7
+ }
8
+ // Metabox fields
9
+ .sp {
10
+ &-input-group {
11
+ margin-bottom: 10px;
12
+ &:after {
13
+ content:"";
14
+ display:table;
15
+ clear:both
16
+ }
17
+ }
18
+
19
+ &-input-label {
20
+ label {
21
+ font-weight: 600;
22
+ margin-right: 30px;
23
+ }
24
+ }
25
+ &-input-field {}
26
+
27
+ &-input-label,
28
+ &-input-field {
29
+ float: left;
30
+ width: 100%;
31
+ }
32
+ &-input-desc {
33
+ color: #999;
34
+ font-size: 0.9em;
35
+ line-height: 1.3em;
36
+ margin: 10px 30px 10px 0;
37
+ }
38
+ &-input-text {
39
+ width: 100%;
40
+ padding: 8px 8px 8px 16px;
41
+ height: 35px !important;
42
+
43
+ option {
44
+ padding: 8px 4px;
45
+ }
46
+ }
47
+ }
48
+
49
+
50
+ @media only screen and (min-width: 600px ){
51
+ .sp {
52
+ &-input-label {
53
+ width: 40%;
54
+ }
55
+ &-input-field {
56
+ width: 60%;
57
+ }
58
+ }
59
+ }
60
+
61
+ @media only screen and (min-width: 783px ){
62
+ .sp-input-label {
63
+ width: 30%;
64
+ }
65
+ .sp-input-field {
66
+ width: 70%;
67
+ }
68
+ .sp-input-text {
69
+ width: 25em;
70
+ }
71
+ }
72
+
73
+ @media only screen and (min-width: 851px ){
74
+ .sp-input-label,
75
+ .sp-input-field {
76
+ width: 100%;
77
+ }
78
+ }
79
+
80
+ @media only screen and (min-width: 1200px ){
81
+ .sp-input-label {
82
+ width: 40%;
83
+ }
84
+ .sp-input-field {
85
+ width: 60%;
86
+ }
87
+ }
88
+
89
+ @media only screen and (min-width: 1600px ){
90
+ .sp-input-label {
91
+ width: 30%;
92
+ }
93
+ .sp-input-field {
94
+ width: 70%;
95
+ }
96
+ }
97
+
98
+ // Admin Media gallery
99
+ .carousel_slider {
100
+ &_images {
101
+ &:before,
102
+ &:after {
103
+ display: table;
104
+ content: "";
105
+ }
106
+ &:after {
107
+ clear: both;
108
+ }
109
+ }
110
+ &_gallery_btn {
111
+ border: 1px solid #616161;
112
+ color: #616161;
113
+ background-color: #f1f1f1;
114
+ padding: 5px 15px;
115
+ text-decoration: none;
116
+
117
+ &:hover {
118
+ background-color: #ffffff;
119
+ color: #616161;
120
+ }
121
+ }
122
+ &_gallery_list {
123
+ margin: 15px 0 0 0;
124
+ padding: 0;
125
+ list-style: none;
126
+ box-sizing: border-box;
127
+ &:before,
128
+ &:after {
129
+ display: table;
130
+ content: "";
131
+ }
132
+ &:after {
133
+ clear: both;
134
+ }
135
+
136
+ li {
137
+ float: left;
138
+ margin: 0;
139
+ padding: 0;
140
+
141
+ > img {
142
+ margin-right: 10px;
143
+ margin-bottom: 10px;
144
+ display: block;
145
+ box-shadow:0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12);
146
+ }
147
+ }
148
+ }
149
+ }
assets/sass/admin/_model.scss ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .carousel_slider {
2
+ &-modal{
3
+ display: none;
4
+ position: fixed;
5
+ z-index: 10000;
6
+ left: 0;
7
+ top: 0;
8
+ width: 100%;
9
+ height: 100%;
10
+ overflow: hidden;
11
+ background-color: rgb(0,0,0);
12
+ background-color: rgba(0,0,0,0.8);
13
+
14
+ &-content{
15
+ position: relative;
16
+ background-color: #fefefe;
17
+ margin: 50px auto 18px;
18
+ padding: 0;
19
+ border: 1px solid #23282d;
20
+ min-height: 300px;
21
+ width: 412px;
22
+ // height: 90%;
23
+ box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
24
+ }
25
+
26
+ &-header {
27
+ background-color: #23282d;
28
+ color: white;
29
+ font-weight: bold;
30
+ padding: 10px 16px;
31
+ }
32
+ &-body {
33
+ // max-height: 300px;
34
+ overflow-x: hidden;
35
+ overflow-y: scroll;
36
+ padding: 2px 16px;
37
+ }
38
+
39
+ &-footer {
40
+ background-color: #23282d;
41
+ color: white;
42
+ font-weight: bold;
43
+ padding: 10px 16px;
44
+
45
+ img {
46
+ display: none;
47
+ height: 14px;
48
+ vertical-align: middle;
49
+ width: 14px;
50
+ }
51
+ }
52
+ }
53
+
54
+ &-form {
55
+ margin-left: -15px;
56
+ margin-right: -15px;
57
+ }
58
+
59
+ // Carousel Slider Images URL
60
+ &-fields {
61
+ background-color: #f1f1f1;
62
+ margin: 15px;
63
+ padding: 15px 25px 15px 15px;
64
+ position: relative;
65
+ display: inline-block;
66
+ float: left;
67
+
68
+ label.setting {
69
+ display: block;
70
+ margin-bottom: 5px;
71
+
72
+ .name {
73
+ display: inline-block;
74
+ vertical-align: top;
75
+ width: 75px;
76
+ }
77
+ input, textarea {
78
+ width: 250px;
79
+ }
80
+ }
81
+ .actions {
82
+ position: absolute;
83
+ right: 0;
84
+ top: 0;
85
+
86
+ > span {
87
+ background: #fff none repeat scroll 0 0;
88
+ display: block;
89
+ float: none;
90
+ cursor: pointer;
91
+
92
+ .dashicons-plus-alt:hover {
93
+ color: green;
94
+ }
95
+
96
+ .dashicons-trash:hover {
97
+ color: red;
98
+ }
99
+ }
100
+ }
101
+ }
102
+
103
+ &-close {
104
+ color: #f1f1f1;
105
+ float: right;
106
+ font-size: 28px;
107
+ font-weight: bold;
108
+
109
+ &:hover,
110
+ &:focus {
111
+ color: #fff;
112
+ text-decoration: none;
113
+ cursor: pointer;
114
+ }
115
+ }
116
+ }
117
+
118
+ .carousel_slider_url_images_list {
119
+ margin: 15px 0 0;
120
+ padding: 0;
121
+ list-style: none;
122
+
123
+ li {
124
+ float: left;
125
+ display: inline-block;
126
+ margin: 0 5px 5px 0;
127
+ }
128
+ }
129
+
130
+ @media only screen and (min-width: 820px ){
131
+ .carousel_slider-modal-content {
132
+ width: 810px;
133
+ }
134
+ }
135
+
136
+ @media only screen and (min-width: 1230px ){
137
+ .carousel_slider-modal-content {
138
+ width: 1220px;
139
+ }
140
+ }
assets/sass/admin/_select2.scss ADDED
@@ -0,0 +1,484 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .select2-container {
2
+ box-sizing: border-box;
3
+ display: inline-block;
4
+ margin: 0;
5
+ position: relative;
6
+ vertical-align: middle; }
7
+ .select2-container .select2-selection--single {
8
+ box-sizing: border-box;
9
+ cursor: pointer;
10
+ display: block;
11
+ height: 28px;
12
+ user-select: none;
13
+ -webkit-user-select: none; }
14
+ .select2-container .select2-selection--single .select2-selection__rendered {
15
+ display: block;
16
+ padding-left: 8px;
17
+ padding-right: 20px;
18
+ overflow: hidden;
19
+ text-overflow: ellipsis;
20
+ white-space: nowrap; }
21
+ .select2-container .select2-selection--single .select2-selection__clear {
22
+ position: relative; }
23
+ .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
24
+ padding-right: 8px;
25
+ padding-left: 20px; }
26
+ .select2-container .select2-selection--multiple {
27
+ box-sizing: border-box;
28
+ cursor: pointer;
29
+ display: block;
30
+ min-height: 32px;
31
+ user-select: none;
32
+ -webkit-user-select: none; }
33
+ .select2-container .select2-selection--multiple .select2-selection__rendered {
34
+ display: inline-block;
35
+ overflow: hidden;
36
+ padding-left: 8px;
37
+ text-overflow: ellipsis;
38
+ white-space: nowrap; }
39
+ .select2-container .select2-search--inline {
40
+ float: left; }
41
+ .select2-container .select2-search--inline .select2-search__field {
42
+ box-sizing: border-box;
43
+ border: none;
44
+ font-size: 100%;
45
+ margin-top: 5px;
46
+ padding: 0; }
47
+ .select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
48
+ -webkit-appearance: none; }
49
+
50
+ .select2-dropdown {
51
+ background-color: white;
52
+ border: 1px solid #aaa;
53
+ border-radius: 0;
54
+ box-sizing: border-box;
55
+ display: block;
56
+ position: absolute;
57
+ left: -100000px;
58
+ width: 100%;
59
+ z-index: 1051; }
60
+
61
+ .select2-results {
62
+ display: block; }
63
+
64
+ .select2-results__options {
65
+ list-style: none;
66
+ margin: 0;
67
+ padding: 0; }
68
+
69
+ .select2-results__option {
70
+ padding: 6px;
71
+ user-select: none;
72
+ -webkit-user-select: none; }
73
+ .select2-results__option[aria-selected] {
74
+ cursor: pointer; }
75
+
76
+ .select2-container--open .select2-dropdown {
77
+ left: 0; }
78
+
79
+ .select2-container--open .select2-dropdown--above {
80
+ border-bottom: none;
81
+ border-bottom-left-radius: 0;
82
+ border-bottom-right-radius: 0; }
83
+
84
+ .select2-container--open .select2-dropdown--below {
85
+ border-top: none;
86
+ border-top-left-radius: 0;
87
+ border-top-right-radius: 0; }
88
+
89
+ .select2-search--dropdown {
90
+ display: block;
91
+ padding: 4px; }
92
+ .select2-search--dropdown .select2-search__field {
93
+ padding: 4px;
94
+ width: 100%;
95
+ box-sizing: border-box; }
96
+ .select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
97
+ -webkit-appearance: none; }
98
+ .select2-search--dropdown.select2-search--hide {
99
+ display: none; }
100
+
101
+ .select2-close-mask {
102
+ border: 0;
103
+ margin: 0;
104
+ padding: 0;
105
+ display: block;
106
+ position: fixed;
107
+ left: 0;
108
+ top: 0;
109
+ min-height: 100%;
110
+ min-width: 100%;
111
+ height: auto;
112
+ width: auto;
113
+ opacity: 0;
114
+ z-index: 99;
115
+ background-color: #fff;
116
+ filter: alpha(opacity=0); }
117
+
118
+ .select2-hidden-accessible {
119
+ border: 0 !important;
120
+ clip: rect(0 0 0 0) !important;
121
+ height: 1px !important;
122
+ margin: -1px !important;
123
+ overflow: hidden !important;
124
+ padding: 0 !important;
125
+ position: absolute !important;
126
+ width: 1px !important; }
127
+
128
+ .select2-container--default .select2-selection--single {
129
+ background-color: #fff;
130
+ border: 1px solid #aaa;
131
+ border-radius: 0; }
132
+ .select2-container--default .select2-selection--single .select2-selection__rendered {
133
+ color: #444;
134
+ line-height: 28px; }
135
+ .select2-container--default .select2-selection--single .select2-selection__clear {
136
+ cursor: pointer;
137
+ float: right;
138
+ font-weight: bold; }
139
+ .select2-container--default .select2-selection--single .select2-selection__placeholder {
140
+ color: #999; }
141
+ .select2-container--default .select2-selection--single .select2-selection__arrow {
142
+ height: 26px;
143
+ position: absolute;
144
+ top: 1px;
145
+ right: 1px;
146
+ width: 20px; }
147
+ .select2-container--default .select2-selection--single .select2-selection__arrow b {
148
+ border-color: #888 transparent transparent transparent;
149
+ border-style: solid;
150
+ border-width: 5px 4px 0 4px;
151
+ height: 0;
152
+ left: 50%;
153
+ margin-left: -4px;
154
+ margin-top: -2px;
155
+ position: absolute;
156
+ top: 50%;
157
+ width: 0; }
158
+
159
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
160
+ float: left; }
161
+
162
+ .select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
163
+ left: 1px;
164
+ right: auto; }
165
+
166
+ .select2-container--default.select2-container--disabled .select2-selection--single {
167
+ background-color: #eee;
168
+ cursor: default; }
169
+ .select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
170
+ display: none; }
171
+
172
+ .select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
173
+ border-color: transparent transparent #888 transparent;
174
+ border-width: 0 4px 5px 4px; }
175
+
176
+ .select2-container--default .select2-selection--multiple {
177
+ background-color: white;
178
+ border: 1px solid #aaa;
179
+ border-radius: 0;
180
+ cursor: text; }
181
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered {
182
+ box-sizing: border-box;
183
+ list-style: none;
184
+ margin: 0;
185
+ padding: 0 5px;
186
+ width: 100%; }
187
+ .select2-container--default .select2-selection--multiple .select2-selection__rendered li {
188
+ list-style: none; }
189
+ .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
190
+ color: #999;
191
+ margin-top: 5px;
192
+ float: left; }
193
+ .select2-container--default .select2-selection--multiple .select2-selection__clear {
194
+ cursor: pointer;
195
+ float: right;
196
+ font-weight: bold;
197
+ margin-top: 5px;
198
+ margin-right: 10px; }
199
+ .select2-container--default .select2-selection--multiple .select2-selection__choice {
200
+ background-color: #e4e4e4;
201
+ border: 1px solid #aaa;
202
+ border-radius: 0;
203
+ cursor: default;
204
+ float: left;
205
+ margin-right: 5px;
206
+ margin-top: 5px;
207
+ padding: 0 5px; }
208
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
209
+ color: #999;
210
+ cursor: pointer;
211
+ display: inline-block;
212
+ font-weight: bold;
213
+ margin-right: 2px; }
214
+ .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
215
+ color: #333; }
216
+
217
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
218
+ float: right; }
219
+
220
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
221
+ margin-left: 5px;
222
+ margin-right: auto; }
223
+
224
+ .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
225
+ margin-left: 2px;
226
+ margin-right: auto; }
227
+
228
+ .select2-container--default.select2-container--focus .select2-selection--multiple {
229
+ border: solid black 1px;
230
+ outline: 0; }
231
+
232
+ .select2-container--default.select2-container--disabled .select2-selection--multiple {
233
+ background-color: #eee;
234
+ cursor: default; }
235
+
236
+ .select2-container--default.select2-container--disabled .select2-selection__choice__remove {
237
+ display: none; }
238
+
239
+ .select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
240
+ border-top-left-radius: 0;
241
+ border-top-right-radius: 0; }
242
+
243
+ .select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
244
+ border-bottom-left-radius: 0;
245
+ border-bottom-right-radius: 0; }
246
+
247
+ .select2-container--default .select2-search--dropdown .select2-search__field {
248
+ border: 1px solid #aaa; }
249
+
250
+ .select2-container--default .select2-search--inline .select2-search__field {
251
+ background: transparent;
252
+ border: none;
253
+ outline: 0;
254
+ box-shadow: none;
255
+ -webkit-appearance: textfield; }
256
+
257
+ .select2-container--default .select2-results > .select2-results__options {
258
+ max-height: 200px;
259
+ overflow-y: auto; }
260
+
261
+ .select2-container--default .select2-results__option[role=group] {
262
+ padding: 0; }
263
+
264
+ .select2-container--default .select2-results__option[aria-disabled=true] {
265
+ color: #999; }
266
+
267
+ .select2-container--default .select2-results__option[aria-selected=true] {
268
+ background-color: #ddd; }
269
+
270
+ .select2-container--default .select2-results__option .select2-results__option {
271
+ padding-left: 1em; }
272
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__group {
273
+ padding-left: 0; }
274
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option {
275
+ margin-left: -1em;
276
+ padding-left: 2em; }
277
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
278
+ margin-left: -2em;
279
+ padding-left: 3em; }
280
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
281
+ margin-left: -3em;
282
+ padding-left: 4em; }
283
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
284
+ margin-left: -4em;
285
+ padding-left: 5em; }
286
+ .select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
287
+ margin-left: -5em;
288
+ padding-left: 6em; }
289
+
290
+ .select2-container--default .select2-results__option--highlighted[aria-selected] {
291
+ background-color: #5897fb;
292
+ color: white; }
293
+
294
+ .select2-container--default .select2-results__group {
295
+ cursor: default;
296
+ display: block;
297
+ padding: 6px; }
298
+
299
+ .select2-container--classic .select2-selection--single {
300
+ background-color: #f7f7f7;
301
+ border: 1px solid #aaa;
302
+ border-radius: 0;
303
+ outline: 0;
304
+ background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
305
+ background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
306
+ background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
307
+ background-repeat: repeat-x;
308
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
309
+ .select2-container--classic .select2-selection--single:focus {
310
+ border: 1px solid #5897fb; }
311
+ .select2-container--classic .select2-selection--single .select2-selection__rendered {
312
+ color: #444;
313
+ line-height: 28px; }
314
+ .select2-container--classic .select2-selection--single .select2-selection__clear {
315
+ cursor: pointer;
316
+ float: right;
317
+ font-weight: bold;
318
+ margin-right: 10px; }
319
+ .select2-container--classic .select2-selection--single .select2-selection__placeholder {
320
+ color: #999; }
321
+ .select2-container--classic .select2-selection--single .select2-selection__arrow {
322
+ background-color: #ddd;
323
+ border: none;
324
+ border-left: 1px solid #aaa;
325
+ border-top-right-radius: 4px;
326
+ border-bottom-right-radius: 4px;
327
+ height: 26px;
328
+ position: absolute;
329
+ top: 1px;
330
+ right: 1px;
331
+ width: 20px;
332
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
333
+ background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
334
+ background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
335
+ background-repeat: repeat-x;
336
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
337
+ .select2-container--classic .select2-selection--single .select2-selection__arrow b {
338
+ border-color: #888 transparent transparent transparent;
339
+ border-style: solid;
340
+ border-width: 5px 4px 0 4px;
341
+ height: 0;
342
+ left: 50%;
343
+ margin-left: -4px;
344
+ margin-top: -2px;
345
+ position: absolute;
346
+ top: 50%;
347
+ width: 0; }
348
+
349
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
350
+ float: left; }
351
+
352
+ .select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
353
+ border: none;
354
+ border-right: 1px solid #aaa;
355
+ border-radius: 0;
356
+ border-top-left-radius: 4px;
357
+ border-bottom-left-radius: 4px;
358
+ left: 1px;
359
+ right: auto; }
360
+
361
+ .select2-container--classic.select2-container--open .select2-selection--single {
362
+ border: 1px solid #5897fb; }
363
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
364
+ background: transparent;
365
+ border: none; }
366
+ .select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
367
+ border-color: transparent transparent #888 transparent;
368
+ border-width: 0 4px 5px 4px; }
369
+
370
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
371
+ border-top: none;
372
+ border-top-left-radius: 0;
373
+ border-top-right-radius: 0;
374
+ background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
375
+ background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
376
+ background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
377
+ background-repeat: repeat-x;
378
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
379
+
380
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
381
+ border-bottom: none;
382
+ border-bottom-left-radius: 0;
383
+ border-bottom-right-radius: 0;
384
+ background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
385
+ background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
386
+ background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
387
+ background-repeat: repeat-x;
388
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
389
+
390
+ .select2-container--classic .select2-selection--multiple {
391
+ background-color: white;
392
+ border: 1px solid #aaa;
393
+ border-radius: 0;
394
+ cursor: text;
395
+ outline: 0; }
396
+ .select2-container--classic .select2-selection--multiple:focus {
397
+ border: 1px solid #5897fb; }
398
+ .select2-container--classic .select2-selection--multiple .select2-selection__rendered {
399
+ list-style: none;
400
+ margin: 0;
401
+ padding: 0 5px; }
402
+ .select2-container--classic .select2-selection--multiple .select2-selection__clear {
403
+ display: none; }
404
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice {
405
+ background-color: #e4e4e4;
406
+ border: 1px solid #aaa;
407
+ border-radius: 0;
408
+ cursor: default;
409
+ float: left;
410
+ margin-right: 5px;
411
+ margin-top: 5px;
412
+ padding: 0 5px; }
413
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
414
+ color: #888;
415
+ cursor: pointer;
416
+ display: inline-block;
417
+ font-weight: bold;
418
+ margin-right: 2px; }
419
+ .select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
420
+ color: #555; }
421
+
422
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
423
+ float: right; }
424
+
425
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
426
+ margin-left: 5px;
427
+ margin-right: auto; }
428
+
429
+ .select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
430
+ margin-left: 2px;
431
+ margin-right: auto; }
432
+
433
+ .select2-container--classic.select2-container--open .select2-selection--multiple {
434
+ border: 1px solid #5897fb; }
435
+
436
+ .select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
437
+ border-top: none;
438
+ border-top-left-radius: 0;
439
+ border-top-right-radius: 0; }
440
+
441
+ .select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
442
+ border-bottom: none;
443
+ border-bottom-left-radius: 0;
444
+ border-bottom-right-radius: 0; }
445
+
446
+ .select2-container--classic .select2-search--dropdown .select2-search__field {
447
+ border: 1px solid #aaa;
448
+ outline: 0; }
449
+
450
+ .select2-container--classic .select2-search--inline .select2-search__field {
451
+ outline: 0;
452
+ box-shadow: none; }
453
+
454
+ .select2-container--classic .select2-dropdown {
455
+ background-color: white;
456
+ border: 1px solid transparent; }
457
+
458
+ .select2-container--classic .select2-dropdown--above {
459
+ border-bottom: none; }
460
+
461
+ .select2-container--classic .select2-dropdown--below {
462
+ border-top: none; }
463
+
464
+ .select2-container--classic .select2-results > .select2-results__options {
465
+ max-height: 200px;
466
+ overflow-y: auto; }
467
+
468
+ .select2-container--classic .select2-results__option[role=group] {
469
+ padding: 0; }
470
+
471
+ .select2-container--classic .select2-results__option[aria-disabled=true] {
472
+ color: grey; }
473
+
474
+ .select2-container--classic .select2-results__option--highlighted[aria-selected] {
475
+ background-color: #3875d7;
476
+ color: white; }
477
+
478
+ .select2-container--classic .select2-results__group {
479
+ cursor: default;
480
+ display: block;
481
+ padding: 6px; }
482
+
483
+ .select2-container--classic.select2-container--open .select2-dropdown {
484
+ border-color: #5897fb; }
assets/sass/admin/_toggle.scss ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Toggle
2
+ .shapla-toggle {
3
+ margin: 0 0 1em 0;
4
+
5
+ &-title {
6
+ display: block;
7
+ padding: 15px 10px;
8
+ outline: 0;
9
+ cursor: pointer;
10
+ position: relative;
11
+
12
+ &:after {
13
+ position: absolute;
14
+ right: 15px;
15
+ font-size: 18px;
16
+ font: 400 20px/1 dashicons;
17
+ margin-left: -1px;
18
+ padding-right: 3px;
19
+ vertical-align: top;
20
+ content: "\f132";
21
+ }
22
+
23
+ &.ui-state-active:after {
24
+ content: "\f460";
25
+ }
26
+ }
27
+
28
+ &-content {
29
+ padding: 20px;
30
+ background-color: #f1f1f1;
31
+ }
32
+
33
+ &--normal .shapla-toggle-title {
34
+ background: #9e9e9e;
35
+ color: white;
36
+ font-weight: 600;
37
+ }
38
+
39
+ &--stroke .shapla-toggle-title {
40
+ border: 1px solid #363f48;
41
+ font-weight: 600;
42
+
43
+ &:after {
44
+ color: #363f48;
45
+ }
46
+ }
47
+ &--stroke .shapla-toggle-content {
48
+ padding: 20px;
49
+ background-color: #ffffff;
50
+ border: 1px solid #363f48;
51
+ border-top: none;
52
+ }
53
+ }
assets/sass/admin/_widget.scss ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ // Widget Styles
2
+ div[id*="_carousel_slider"] .widget-top{
3
+ background: #ddffff !important;
4
+ border: 1px solid #2196f3 !important;
5
+
6
+ &:hover {
7
+ background: #ffdddd !important;
8
+ border: 1px solid #f44336 !important;
9
+ }
10
+ }
assets/sass/admin/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
assets/sass/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
assets/sass/{_animate.scss → public/_animate.scss} RENAMED
File without changes
assets/sass/{_autoheight.scss → public/_autoheight.scss} RENAMED
File without changes
assets/sass/{_core.scss → public/_core.scss} RENAMED
File without changes
assets/sass/{_lazyload.scss → public/_lazyload.scss} RENAMED
File without changes
assets/sass/public/_post-carousel.scss ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .carousel-slider {
2
+ &__post {
3
+ border: 1px solid #f1f1f1;
4
+ float: left;
5
+ height: 450px;
6
+ width: 100%;
7
+ position: relative;
8
+ display: block;
9
+ overflow: hidden;
10
+
11
+ &-content {
12
+ bottom: 0;
13
+ position: absolute;
14
+ top: 0;
15
+ transition: all 0.2s ease 0s;
16
+ width: 100%;
17
+ display: block;
18
+ }
19
+
20
+ &-image {
21
+ border-bottom: 1px solid #f1f1f1;
22
+ display: block;
23
+ height: 207px;
24
+ line-height: 0;
25
+ margin: 0 auto;
26
+ overflow: hidden;
27
+ text-align: center;
28
+ width: 100%;
29
+ background-color: #f1f1f1;
30
+ background-size: cover;
31
+ background-position: center center;
32
+ }
33
+
34
+ &-title {
35
+ display: block;
36
+ margin: 10px 15px 0;
37
+ max-height: 70px;
38
+
39
+ h1 {
40
+ color: #4a4a4a;
41
+ font: bold 18px/1.4em Arial,sans-serif;
42
+ margin-bottom: 0;
43
+ margin-top: 0;
44
+ }
45
+ }
46
+
47
+ &-excerpt {
48
+ color: #7d7d7d;
49
+ font-size: 14px;
50
+ line-height: 1.5em;
51
+ padding: 10px 15px 5px;
52
+ text-align: left;
53
+ width: 100%;
54
+ position: absolute;
55
+ top: 285px;
56
+
57
+ &-overlay {
58
+ background: transparent none repeat scroll 0 0;
59
+ display: block;
60
+ height: 20px;
61
+ width: 100%;
62
+ }
63
+ }
64
+
65
+ &-meta {
66
+ bottom: 10px;
67
+ color: #8e8e8e;
68
+ font-size: 12px;
69
+ left: 0;
70
+ padding: 0 15px;
71
+ position: absolute;
72
+ width: 100%;
73
+ display: block;
74
+ }
75
+
76
+ &-publication-meta {
77
+ background-color: white;
78
+ display: block;
79
+ padding-top: 15px;
80
+ width: 100%;
81
+ overflow: hidden;
82
+ text-overflow: ellipsis;
83
+ white-space: nowrap;
84
+ }
85
+
86
+ &-details-info {
87
+ display: inline-block;
88
+ }
89
+ &-author {
90
+ display: block;
91
+ font-style: normal;
92
+ line-height: 1em;
93
+ overflow: hidden;
94
+ text-overflow: ellipsis;
95
+ white-space: nowrap;
96
+ margin-bottom: 5px;
97
+
98
+ &-link {
99
+ color: #8e8e8e;
100
+ display: inline-block;
101
+ max-width: 175px;
102
+ overflow: hidden;
103
+ text-overflow: ellipsis;
104
+ vertical-align: middle;
105
+ white-space: nowrap;
106
+ }
107
+ }
108
+
109
+ &-category {
110
+ color: #4cc1be;
111
+ text-transform: uppercase;
112
+ position: absolute;
113
+ right: 15px;
114
+ top: 50px;
115
+ z-index: 1;
116
+
117
+ &-link {}
118
+ }
119
+ }
120
+ }
assets/sass/{_theme.scss → public/_theme.scss} RENAMED
@@ -121,11 +121,11 @@
121
 
122
  @media ( max-width: 767px ) {
123
  &:hover {
124
- .sp-theme .owl-nav {
125
  display : none;
126
  }
127
  }
128
- .sp-theme .owl-nav {
129
  display : none;
130
  }
131
  }
121
 
122
  @media ( max-width: 767px ) {
123
  &:hover {
124
+ .owl-nav {
125
  display : none;
126
  }
127
  }
128
+ .owl-nav {
129
  display : none;
130
  }
131
  }
assets/sass/{_variables.scss → public/_variables.scss} RENAMED
File without changes
assets/sass/{_video.scss → public/_video.scss} RENAMED
File without changes
assets/sass/public/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
assets/sass/style.scss CHANGED
@@ -1,7 +1,8 @@
1
- @import 'variables';
2
- @import 'core';
3
- @import 'animate';
4
- @import 'autoheight';
5
- @import 'lazyload';
6
- @import 'video';
7
- @import 'theme';
 
1
+ @import 'public/variables';
2
+ @import 'public/core';
3
+ @import 'public/animate';
4
+ @import 'public/autoheight';
5
+ @import 'public/lazyload';
6
+ @import 'public/video';
7
+ @import 'public/theme';
8
+ @import 'public/post-carousel';
carousel-slider.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Carousel Slider
4
  Plugin URI: http://wordpress.org/plugins/carousel-slider
5
  Description: Touch enabled WordPress plugin that lets you create beautiful responsive carousel slider.
6
- Version: 1.5.3
7
  Author: Sayful Islam
8
  Author URI: http://sayfulit.com
9
  Text Domain: carousel-slider
@@ -26,13 +26,32 @@ class Carousel_Slider
26
  private $plugin_url;
27
  private $plugin_path;
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  public function __construct()
30
  {
31
  $this->plugin_name = 'carousel-slider';
32
- $this->plugin_version = '1.5.3';
33
 
34
  add_action('wp_enqueue_scripts', array( $this, 'frontend_scripts' ), 15 );
35
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ), 10 );
36
  add_action('wp_footer', array( $this, 'inline_script'), 30);
37
  add_action('init', array( $this, 'load_textdomain' ) );
38
  add_filter('widget_text', 'do_shortcode');
@@ -80,23 +99,25 @@ class Carousel_Slider
80
  {
81
  require_once $this->plugin_path() . '/includes/Carousel_Slider_VC_Element.php';
82
  require_once $this->plugin_path() . '/includes/Carousel_Slider_Documentation.php';
83
- require_once $this->plugin_path() . '/includes/Carousel_Slider_Meta_Box.php';
84
  require_once $this->plugin_path() . '/includes/Carousel_Slider_Admin.php';
85
 
86
- new Carousel_Slider_Admin;
87
  }
88
 
89
  public function frontend_includes()
90
  {
91
  require_once $this->plugin_path() . '/shortcodes/Carousel_Slider_Shortcode.php';
 
92
 
93
  new Carousel_Slider_Shortcode( $this->plugin_path(), $this->plugin_url() );
 
94
  }
95
 
96
  public function frontend_scripts()
97
  {
98
  wp_register_style( $this->plugin_name, $this->plugin_url() . '/assets/css/style.css', array(), $this->plugin_version, 'all' );
99
- wp_register_script( 'owl-carousel', $this->plugin_url() . '/assets/js/owl.carousel.min.js', array( 'jquery' ), '2.0.0', true );
100
 
101
  if( $this->has_shortcode('carousel_slide') || $this->has_shortcode( 'carousel') )
102
  {
@@ -105,41 +126,69 @@ class Carousel_Slider
105
  }
106
  }
107
 
108
- public function admin_scripts()
109
  {
110
  global $post;
111
-
112
- wp_enqueue_style(
113
- $this->plugin_name . '-admin',
114
- $this->plugin_url() . '/assets/css/admin.css',
115
- array(),
116
- $this->plugin_version,
117
- 'all'
118
- );
119
-
120
- if( is_a( $post, 'WP_Post' ) && isset( $post->ID ) ) {
121
-
122
- wp_enqueue_media();
123
- wp_enqueue_style( 'wp-color-picker' );
124
- wp_enqueue_script( 'wp-color-picker' );
125
-
126
- wp_enqueue_script(
127
- $this->plugin_name . '-admin',
128
- $this->plugin_url() . '/assets/js/admin.js',
129
- array( 'jquery', 'wp-color-picker' ),
130
- $this->plugin_version,
131
- true
132
- );
133
-
134
- wp_localize_script( $this->plugin_name . '-admin', 'wpdh_ajax', array(
135
- 'post_id' => $post->ID,
136
- 'image_ids' => get_post_meta( $post->ID, '_wpdh_image_ids', true ),
137
- 'nonce' => wp_create_nonce( 'wpdh-ajax' ),
138
- 'create_btn_text' => __('Create Gallery', 'carousel-slider'),
139
- 'edit_btn_text' => __('Edit Gallery', 'carousel-slider'),
140
- 'save_btn_text' => __('Save Gallery', 'carousel-slider'),
141
- 'progress_btn_text' => __('Saving...', 'carousel-slider'),
142
- ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  }
144
  }
145
 
@@ -150,6 +199,10 @@ class Carousel_Slider
150
  jQuery( document ).ready(function( $ ){
151
  $( 'body' ).find('.carousel-slider').each(function(){
152
  var _this = $(this);
 
 
 
 
153
  _this.owlCarousel({
154
  nav: _this.data('nav'),
155
  dots: _this.data('dots'),
@@ -161,12 +214,17 @@ class Carousel_Slider
161
  autoplayHoverPause: _this.data('autoplay-hover-pause'),
162
  slideBy: _this.data('slide-by'),
163
  lazyLoad: _this.data('lazy-load'),
 
 
 
 
164
  responsive: {
165
  320:{ items: _this.data('colums-mobile') },
166
- 600:{ items: _this.data('colums-tablet') },
167
- 768:{ items: _this.data('colums-small-desktop') },
168
- 980:{ items: _this.data('colums-desktop') },
169
- 1200:{items: _this.data('colums') }
 
170
  }
171
  });
172
  });
@@ -177,12 +235,13 @@ class Carousel_Slider
177
 
178
  private function has_shortcode( $shortcode )
179
  {
180
- global $post;
181
 
182
  if ( is_active_widget( false, false, 'widget_carousel_slider', true ) ) {
183
  return true;
184
  }
185
 
 
 
186
  if ( ! is_a( $post, 'WP_Post' ) ) {
187
  return false;
188
  }
@@ -219,19 +278,28 @@ class Carousel_Slider
219
  endif;
220
 
221
  /**
222
- * The code that runs during plugin activation.
 
 
 
 
 
 
 
 
223
  * The code that runs during plugin deactivation.
224
  */
225
- function carousel_slider_activation_deactivation() {
226
- flush_rewrite_rules();;
227
  }
228
- register_activation_hook( __FILE__, 'carousel_slider_activation_deactivation' );
229
- register_deactivation_hook( __FILE__, 'carousel_slider_activation_deactivation' );
230
 
231
  /**
232
- * Begins execution of the plugin.
233
  */
234
- function run_carousel_slider() {
235
- new Carousel_Slider();
 
 
236
  }
237
- run_carousel_slider();
3
  Plugin Name: Carousel Slider
4
  Plugin URI: http://wordpress.org/plugins/carousel-slider
5
  Description: Touch enabled WordPress plugin that lets you create beautiful responsive carousel slider.
6
+ Version: 1.6.0
7
  Author: Sayful Islam
8
  Author URI: http://sayfulit.com
9
  Text Domain: carousel-slider
26
  private $plugin_url;
27
  private $plugin_path;
28
 
29
+ protected static $instance = null;
30
+
31
+ /**
32
+ * Main Carousel_Slider Instance
33
+ *
34
+ * Ensures only one instance of Carousel_Slider is loaded or can be loaded.
35
+ *
36
+ * @since 1.6.0
37
+ * @static
38
+ * @see Carousel_Slider()
39
+ * @return Carousel_Slider - Main instance
40
+ */
41
+ public static function instance() {
42
+ if ( is_null( self::$instance ) ) {
43
+ self::$instance = new self();
44
+ }
45
+ return self::$instance;
46
+ }
47
+
48
  public function __construct()
49
  {
50
  $this->plugin_name = 'carousel-slider';
51
+ $this->plugin_version = '1.6.0';
52
 
53
  add_action('wp_enqueue_scripts', array( $this, 'frontend_scripts' ), 15 );
54
+ add_action('admin_enqueue_scripts', array( $this, 'admin_scripts' ), 10 );
55
  add_action('wp_footer', array( $this, 'inline_script'), 30);
56
  add_action('init', array( $this, 'load_textdomain' ) );
57
  add_filter('widget_text', 'do_shortcode');
99
  {
100
  require_once $this->plugin_path() . '/includes/Carousel_Slider_VC_Element.php';
101
  require_once $this->plugin_path() . '/includes/Carousel_Slider_Documentation.php';
102
+ require_once $this->plugin_path() . '/includes/Carousel_Slider_Form.php';
103
  require_once $this->plugin_path() . '/includes/Carousel_Slider_Admin.php';
104
 
105
+ new Carousel_Slider_Admin( $this->plugin_path(), $this->plugin_url() );
106
  }
107
 
108
  public function frontend_includes()
109
  {
110
  require_once $this->plugin_path() . '/shortcodes/Carousel_Slider_Shortcode.php';
111
+ require_once $this->plugin_path() . '/shortcodes/Carousel_Slider_Deprecated_Shortcode.php';
112
 
113
  new Carousel_Slider_Shortcode( $this->plugin_path(), $this->plugin_url() );
114
+ new Carousel_Slider_Deprecated_Shortcode( $this->plugin_path() );
115
  }
116
 
117
  public function frontend_scripts()
118
  {
119
  wp_register_style( $this->plugin_name, $this->plugin_url() . '/assets/css/style.css', array(), $this->plugin_version, 'all' );
120
+ wp_register_script( 'owl-carousel', $this->plugin_url() . '/assets/js/owl.carousel.min.js', array( 'jquery' ), '2.2.0', true );
121
 
122
  if( $this->has_shortcode('carousel_slide') || $this->has_shortcode( 'carousel') )
123
  {
126
  }
127
  }
128
 
129
+ public function admin_scripts( $hook )
130
  {
131
  global $post;
132
+
133
+ if ( $hook == 'post-new.php' || $hook == 'post.php' ) {
134
+
135
+ if( is_a( $post, 'WP_Post' ) && 'carousels' == $post->post_type ) {
136
+
137
+ wp_enqueue_style(
138
+ $this->plugin_name . '-admin',
139
+ $this->plugin_url() . '/assets/css/admin.css',
140
+ array(),
141
+ $this->plugin_version,
142
+ 'all'
143
+ );
144
+
145
+ wp_enqueue_media();
146
+ wp_enqueue_style( 'wp-color-picker' );
147
+
148
+ wp_enqueue_script(
149
+ 'select2',
150
+ $this->plugin_url() . '/assets/js/select2.min.js',
151
+ array( 'jquery' ),
152
+ '4.0.3',
153
+ true
154
+ );
155
+
156
+ wp_enqueue_script(
157
+ 'livequery',
158
+ $this->plugin_url() . '/assets/js/jquery.livequery.js',
159
+ array( 'jquery' ),
160
+ '1.3.6',
161
+ true
162
+ );
163
+
164
+ wp_enqueue_script(
165
+ $this->plugin_name . '-admin',
166
+ $this->plugin_url() . '/assets/js/admin.js',
167
+ array(
168
+ 'jquery',
169
+ 'wp-color-picker',
170
+ 'jquery-ui-accordion',
171
+ 'jquery-ui-datepicker',
172
+ 'jquery-ui-sortable',
173
+ 'select2',
174
+ 'livequery'
175
+ ),
176
+ $this->plugin_version,
177
+ true
178
+ );
179
+
180
+ wp_localize_script( $this->plugin_name . '-admin', 'CarouselSlider', array(
181
+ 'post_id' => $post->ID,
182
+ 'image_ids' => get_post_meta( $post->ID, '_wpdh_image_ids', true ),
183
+ 'nonce' => wp_create_nonce( 'carousel_slider_ajax' ),
184
+ 'create_btn_text' => __('Create Gallery', 'carousel-slider'),
185
+ 'edit_btn_text' => __('Edit Gallery', 'carousel-slider'),
186
+ 'save_btn_text' => __('Save Gallery', 'carousel-slider'),
187
+ 'progress_btn_text' => __('Saving...', 'carousel-slider'),
188
+ 'insert_btn_text' => __('Insert', 'carousel-slider'),
189
+ 'video_frame_title' => __('Choose Video', 'carousel-slider'),
190
+ ));
191
+ }
192
  }
193
  }
194
 
199
  jQuery( document ).ready(function( $ ){
200
  $( 'body' ).find('.carousel-slider').each(function(){
201
  var _this = $(this);
202
+ var isVideo = _this.data('slide-type') == 'video-carousel' ? true : false;
203
+ var videoWidth = isVideo ? _this.data('video-width') : false;
204
+ var videoHeight = isVideo ? _this.data('video-height') : false;
205
+ var autoWidth = isVideo ? true : false;
206
  _this.owlCarousel({
207
  nav: _this.data('nav'),
208
  dots: _this.data('dots'),
214
  autoplayHoverPause: _this.data('autoplay-hover-pause'),
215
  slideBy: _this.data('slide-by'),
216
  lazyLoad: _this.data('lazy-load'),
217
+ video:isVideo,
218
+ videoWidth: videoWidth,
219
+ videoHeight: videoHeight,
220
+ autoWidth: autoWidth,
221
  responsive: {
222
  320:{ items: _this.data('colums-mobile') },
223
+ 600:{ items: _this.data('colums-small-tablet') },
224
+ 768:{ items: _this.data('colums-tablet') },
225
+ 993:{ items: _this.data('colums-small-desktop') },
226
+ 1200:{items: _this.data('colums-desktop') },
227
+ 1921:{items: _this.data('colums') }
228
  }
229
  });
230
  });
235
 
236
  private function has_shortcode( $shortcode )
237
  {
 
238
 
239
  if ( is_active_widget( false, false, 'widget_carousel_slider', true ) ) {
240
  return true;
241
  }
242
 
243
+ global $post;
244
+
245
  if ( ! is_a( $post, 'WP_Post' ) ) {
246
  return false;
247
  }
278
  endif;
279
 
280
  /**
281
+ * Begins execution of the plugin.
282
+ *
283
+ * Since everything within the plugin is registered via hooks,
284
+ * then kicking off the plugin from this point in the file does
285
+ * not affect the page life cycle.
286
+ */
287
+ Carousel_Slider::instance();
288
+
289
+ /**
290
  * The code that runs during plugin deactivation.
291
  */
292
+ function carousel_slider_deactivation() {
293
+ flush_rewrite_rules();
294
  }
295
+ register_deactivation_hook( __FILE__, 'carousel_slider_deactivation' );
 
296
 
297
  /**
298
+ * The code that runs during plugin activation.
299
  */
300
+ function carousel_slider_activation()
301
+ {
302
+ require_once plugin_dir_path( __FILE__ ) . 'includes/Carousel_Slider_Activation.php';
303
+ Carousel_Slider_Activation::activate();
304
  }
305
+ register_activation_hook( __FILE__, 'carousel_slider_activation' );
includes/Carousel_Slider_Activation.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! class_exists('Carousel_Slider_Activation') ):
4
+
5
+ class Carousel_Slider_Activation
6
+ {
7
+ public static function activate()
8
+ {
9
+ self::update_meta_160();
10
+
11
+ // Add plugin version to database
12
+ update_option( 'carousel_slider_version', '1.6.0' );
13
+
14
+ // Flush the rewrite rules on activation
15
+ flush_rewrite_rules();
16
+ }
17
+
18
+ public static function update_meta_160()
19
+ {
20
+ $carousels = get_posts( array(
21
+ 'post_type' => 'carousels',
22
+ 'post_status' => 'any',
23
+ ) );
24
+
25
+ if ( count( $carousels ) > 0 ) {
26
+ foreach ($carousels as $carousel) {
27
+
28
+ $id = $carousel->ID;
29
+ $_items_desktop = get_post_meta( $id, '_items', true );
30
+ $_lazy_load = get_post_meta( $id, '_lazy_load_image', true );
31
+ $_lazy_load = $_lazy_load == 'on' ? 'on' : 'off';
32
+
33
+ update_post_meta( $id, '_lazy_load_image', $_lazy_load );
34
+ update_post_meta( $id, '_items_desktop', $_items_desktop );
35
+ update_post_meta( $id, '_slide_type', 'image-carousel' );
36
+ update_post_meta( $id, '_video_width', '560' );
37
+ update_post_meta( $id, '_video_height', '315' );
38
+ }
39
+ }
40
+ }
41
+ }
42
+
43
+ endif;
includes/Carousel_Slider_Admin.php CHANGED
@@ -8,34 +8,51 @@ if( ! class_exists('Carousel_Slider_Admin') ):
8
 
9
  class Carousel_Slider_Admin
10
  {
11
- public function __construct()
 
 
 
 
 
12
  {
 
 
 
13
  add_action('init', array( $this, 'carousel_post_type' ) );
14
  add_action('add_meta_boxes', array( $this, 'add_meta_boxes' ) );
 
15
  add_filter( 'manage_edit-carousels_columns', array( $this, 'columns_head') );
16
  add_filter( 'manage_carousels_posts_custom_column', array( $this, 'columns_content'), 10, 2 );
17
- $this->metaboxs();
 
 
 
 
 
 
 
 
18
  }
19
 
20
  public function carousel_post_type() {
21
  $labels = array(
22
- 'name' => _x( 'Carousels', 'Post Type General Name', 'carousel-slider' ),
23
- 'singular_name' => _x( 'Carousel', 'Post Type Singular Name', 'carousel-slider' ),
24
- 'menu_name' => __( 'Carousels', 'carousel-slider' ),
25
- 'parent_item_colon' => __( 'Parent Carousel:', 'carousel-slider' ),
26
- 'all_items' => __( 'All Carousels', 'carousel-slider' ),
27
- 'view_item' => __( 'View Carousel', 'carousel-slider' ),
28
- 'add_new_item' => __( 'Add New Carousel', 'carousel-slider' ),
29
  'add_new' => __( 'Add New', 'carousel-slider' ),
30
- 'edit_item' => __( 'Edit Carousel', 'carousel-slider' ),
31
- 'update_item' => __( 'Update Carousel', 'carousel-slider' ),
32
- 'search_items' => __( 'Search Carousel', 'carousel-slider' ),
33
  'not_found' => __( 'Not found', 'carousel-slider' ),
34
  'not_found_in_trash' => __( 'Not found in Trash', 'carousel-slider' ),
35
  );
36
  $args = array(
37
- 'label' => __( 'Carousel', 'carousel-slider' ),
38
- 'description' => __( 'Carousel', 'carousel-slider' ),
39
  'labels' => $labels,
40
  'supports' => array( 'title' ),
41
  'hierarchical' => false,
@@ -56,13 +73,25 @@ class Carousel_Slider_Admin
56
  register_post_type( 'carousels', $args );
57
  }
58
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  public function columns_head(){
60
 
61
  $columns = array(
62
- 'cb' => '<input type="checkbox">',
63
- 'title' => __('Carousel Slide Title', 'carousel-slider'),
64
- 'usage' => __('Shortcode', 'carousel-slider'),
65
- 'images' => __('Carousel Images', 'carousel-slider')
66
  );
67
 
68
  return $columns;
@@ -73,25 +102,22 @@ class Carousel_Slider_Admin
73
  switch ($column) {
74
 
75
  case 'usage':
76
-
77
- $id = $post_id;
78
-
79
- if ( !empty($id) ){
80
- echo '<pre><code>[carousel_slide id="'.$id.'"]</code></pre>';
81
- }
 
 
 
 
82
 
83
  break;
84
 
85
- case 'images':
86
- $image_ids = explode(',', get_post_meta( get_the_ID(), '_wpdh_image_ids', true) );
87
- $images ='<ul id="carousel-thumbs" class="carousel-thumbs">';
88
- foreach ( $image_ids as $image ) {
89
- if(!$image) continue;
90
- $src = wp_get_attachment_image_src( $image, array(32,32) );
91
- $images .= "<li><img src='{$src[0]}' width='{$src[1]}' height='{$src[2]}'></li>";
92
- }
93
- $images .= '</ul>';
94
- echo $images;
95
 
96
  break;
97
  default :
@@ -102,26 +128,60 @@ class Carousel_Slider_Admin
102
  public function add_meta_boxes()
103
  {
104
  add_meta_box(
105
- "carousel-shortcode-info",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  __("Usage (Shortcode)", 'carousel-slider'),
107
  array( $this, 'render_meta_box_shortcode_info' ),
108
  "carousels",
109
  "side",
110
- "high"
111
  );
112
  }
113
 
114
  public function render_meta_box_shortcode_info()
115
  {
116
  ob_start(); ?>
117
- <p>
118
- <strong>
119
  <?php _e('Copy the following shortcode and paste in post or page where you want to show.', 'carousel-slider'); ?>
120
- </strong>
121
- </p>
122
- <p>
123
- <pre><code>[carousel_slide id="<?php echo get_the_ID(); ?>"]</code></pre>
124
- </p>
 
 
 
 
125
  <hr>
126
  <p>
127
  <?php _e('If you like this plugin or if you make money using this or if you want to help me to continue my contribution on open source projects, consider to make a small donation.', 'carousel-slider'); ?>
@@ -134,214 +194,150 @@ class Carousel_Slider_Admin
134
  <?php echo ob_get_clean();
135
  }
136
 
137
- public function metaboxs()
138
- {
139
- $carousel_metabox = array(
140
- 'id' => 'metabox-carousel-slide',
141
- 'title' => __('Images Settings', 'carousel-slider'),
142
- 'page' => array('carousels'),
143
- 'context' => 'normal',
144
- 'priority' => 'high',
145
- 'fields' => array(
146
- array(
147
- 'id' => '_carousel_images',
148
- 'type' => 'images',
149
- 'name' => __('Carousel Images', 'carousel-slider'),
150
- 'desc' => __('Choose carousel images.', 'carousel-slider'),
151
- ),
152
- array(
153
- 'id' => '_image_size',
154
- 'type' => 'image_sizes',
155
- 'name' => __('Carousel Image Size', 'carousel-slider'),
156
- 'desc' => sprintf(__( 'Select "full" for full size image or your desired image size for carousel image. You can change the default size for thumbnail, medium and large from %1$s Settings >> Media %2$s.', 'carousel-slider' ),'<a target="_blank" href="'.get_admin_url().'options-media.php">','</a>'),
157
- ),
158
- array(
159
- 'id' => '_show_attachment_title',
160
- 'type' => 'checkbox',
161
- 'name' => __('Show Title', 'carousel-slider'),
162
- 'label' => __('Show Title', 'carousel-slider'),
163
- 'desc' => __('Check to show attachment title below image.', 'carousel-slider'),
164
- 'std' => 'off'
165
- ),
166
- array(
167
- 'id' => '_show_attachment_caption',
168
- 'type' => 'checkbox',
169
- 'name' => __('Show Caption', 'carousel-slider'),
170
- 'label' => __('Show Caption', 'carousel-slider'),
171
- 'desc' => __('Check to show attachment caption below image.', 'carousel-slider'),
172
- 'std' => 'off'
173
- ),
174
- )
175
- );
176
 
177
- $general_metabox = array(
178
- 'id' => 'carousel-slide-general_metabox',
179
- 'title' => __('General Settings', 'carousel-slider'),
180
- 'page' => array('carousels'),
181
- 'context' => 'normal',
182
- 'priority' => 'high',
183
- 'fields' => array(
184
- array(
185
- 'id' => '_slide_by',
186
- 'type' => 'text',
187
- 'name' => __('Slide By', 'carousel-slider'),
188
- 'desc' => __('Navigation slide by x number. Write "page" with inverted comma to slide by page. Default value is 1.', 'carousel-slider'),
189
- 'std' => 1
190
- ),
191
- array(
192
- 'id' => '_margin_right',
193
- 'type' => 'number',
194
- 'name' => __('Margin Right(px) on item.', 'carousel-slider'),
195
- 'desc' => __('margin-right(px) on item. Default value is 10. Example: 20', 'carousel-slider'),
196
- 'std' => 10
197
- ),
198
- array(
199
- 'id' => '_inifnity_loop',
200
- 'type' => 'checkbox',
201
- 'name' => __('Inifnity loop', 'carousel-slider'),
202
- 'label' => __('Inifnity loop.', 'carousel-slider'),
203
- 'desc' => __('Check to show inifnity loop. Duplicate last and first items to get loop illusion', 'carousel-slider'),
204
- 'std' => 'on'
205
- ),
206
- array(
207
- 'id' => '_lazy_load_image',
208
- 'type' => 'checkbox',
209
- 'name' => __('Lazy load image', 'carousel-slider'),
210
- 'label' => __('Lazy load image', 'carousel-slider'),
211
- 'desc' => __('Check to enable image lazy load.', 'carousel-slider'),
212
- 'std' => 'off'
213
- ),
214
- )
215
- );
216
 
217
- $navigation_metabox = array(
218
- 'id' => 'carousel-slide-navigation_metabox',
219
- 'title' => __('Navigation Settings', 'carousel-slider'),
220
- 'page' => array('carousels'),
221
- 'context' => 'normal',
222
- 'priority' => 'high',
223
- 'fields' => array(
224
- array(
225
- 'id' => '_nav_button',
226
- 'type' => 'checkbox',
227
- 'name' => __('Display navigation buttons', 'carousel-slider'),
228
- 'label' => __('Display "next" and "previous" buttons', 'carousel-slider'),
229
- 'desc' => __('Check to display "next" and "previous" buttons', 'carousel-slider'),
230
- ),
231
- array(
232
- 'id' => '_dot_nav',
233
- 'type' => 'checkbox',
234
- 'name' => __('Show dots navigation', 'carousel-slider'),
235
- 'label' => __('Show dots navigation.', 'carousel-slider'),
236
- 'desc' => __('Check to show dots navigation.', 'carousel-slider'),
237
- ),
238
- array(
239
- 'id' => '_nav_color',
240
- 'type' => 'color',
241
- 'name' => __('Navigation Color ', 'carousel-slider'),
242
- 'desc' => __('Enter hex value of color for carousel navigation.', 'carousel-slider'),
243
- 'std' => '#f1f1f1'
244
- ),
245
- array(
246
- 'id' => '_nav_active_color',
247
- 'type' => 'color',
248
- 'name' => __('Navigation Color: Hover & Active', 'carousel-slider'),
249
- 'desc' => __('Enter hex value of color for carousel navigation.', 'carousel-slider'),
250
- 'std' => '#4caf50'
251
- ),
252
- ),
253
- );
254
 
255
- $autoplay_metabox = array(
256
- 'id' => 'carousel-slide-autoplay_metabox',
257
- 'title' => __('Autoplay Settings', 'carousel-slider'),
258
- 'page' => array('carousels'),
259
- 'context' => 'normal',
260
- 'priority' => 'high',
261
- 'fields' => array(
262
- array(
263
- 'id' => '_autoplay',
264
- 'type' => 'checkbox',
265
- 'name' => __('Autoplay', 'carousel-slider'),
266
- 'label' => __('Autoplay.', 'carousel-slider'),
267
- 'desc' => __('Check to enable autoplay', 'carousel-slider'),
268
- 'std' => 'on'
269
- ),
270
- array(
271
- 'id' => '_autoplay_timeout',
272
- 'type' => 'number',
273
- 'name' => __('Autoplay Timeout', 'carousel-slider'),
274
- 'desc' => __('Autoplay interval timeout in millisecond. Default: 5000', 'carousel-slider'),
275
- 'std' => 5000
276
- ),
277
-
278
- array(
279
- 'id' => '_autoplay_speed',
280
- 'type' => 'number',
281
- 'name' => __('Autoplay Speed', 'carousel-slider'),
282
- 'desc' => __('Autoplay speen in millisecond. Default: 500', 'carousel-slider'),
283
- 'std' => 500
284
- ),
285
- array(
286
- 'id' => '_autoplay_pause',
287
- 'type' => 'checkbox',
288
- 'name' => __('Autoplay Hover Pause', 'carousel-slider'),
289
- 'label' => __('Pause on mouse hover.', 'carousel-slider'),
290
- 'desc' => __('Pause autoplay on mouse hover.', 'carousel-slider'),
291
- ),
292
- ),
293
- );
294
 
295
- $responsive_metabox = array(
296
- 'id' => 'carousel-slide-responsive_metabox',
297
- 'title' => __('Responsive Settings', 'carousel-slider'),
298
- 'page' => array('carousels'),
299
- 'context' => 'normal',
300
- 'priority' => 'high',
301
- 'fields' => array(
302
- array(
303
- 'id' => '_items',
304
- 'type' => 'number',
305
- 'name' => __('Carousel items', 'carousel-slider'),
306
- 'desc' => __('To set the maximum amount of items displayed at a time with the widest browser width (window >= 1200)', 'carousel-slider'),
307
- 'std' => 4
308
- ),
309
- array(
310
- 'id' => '_items_small_desktop',
311
- 'type' => 'number',
312
- 'name' => __('Carousel items for small desktop', 'carousel-slider'),
313
- 'desc' => __('This allows you to preset the number of slides visible with (window >= 980) browser width.', 'carousel-slider'),
314
- 'std' => 4
315
- ),
316
- array(
317
- 'id' => '_items_portrait_tablet',
318
- 'type' => 'number',
319
- 'name' => __('Carousel items for portrait Tablet', 'carousel-slider'),
320
- 'desc' => __('This allows you to preset the number of slides visible with (window >= 768) browser width.', 'carousel-slider'),
321
- 'std' => 3
322
- ),
323
- array(
324
- 'id' => '_items_small_portrait_tablet',
325
- 'type' => 'number',
326
- 'name' => __('Carousel items for small portrait Tablet', 'carousel-slider'),
327
- 'desc' => __('This allows you to preset the number of slides visible with (window >= 600) browser width.', 'carousel-slider'),
328
- 'std' => 2
329
- ),
330
- array(
331
- 'id' => '_items_portrait_mobile',
332
- 'type' => 'number',
333
- 'name' => __('Carousel items for portrait Mobile', 'carousel-slider'),
334
- 'desc' => __('This allows you to preset the number of slides visible with (window >= 320) browser width.', 'carousel-slider'),
335
- 'std' => 1
336
- ),
337
- ),
 
 
338
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
 
340
- new Carousel_Slider_Meta_Box( $carousel_metabox );
341
- new Carousel_Slider_Meta_Box( $general_metabox );
342
- new Carousel_Slider_Meta_Box( $navigation_metabox );
343
- new Carousel_Slider_Meta_Box( $autoplay_metabox );
344
- new Carousel_Slider_Meta_Box( $responsive_metabox );
345
  }
346
  }
347
 
8
 
9
  class Carousel_Slider_Admin
10
  {
11
+ use Carousel_Slider_Form;
12
+
13
+ private $plugin_path;
14
+ private $plugin_url;
15
+
16
+ public function __construct( $plugin_path, $plugin_url )
17
  {
18
+ $this->plugin_path = $plugin_path;
19
+ $this->plugin_url = $plugin_url;
20
+
21
  add_action('init', array( $this, 'carousel_post_type' ) );
22
  add_action('add_meta_boxes', array( $this, 'add_meta_boxes' ) );
23
+ add_action('add_meta_boxes', array( $this, 'shortcode_usage_info' ) );
24
  add_filter( 'manage_edit-carousels_columns', array( $this, 'columns_head') );
25
  add_filter( 'manage_carousels_posts_custom_column', array( $this, 'columns_content'), 10, 2 );
26
+ add_action( 'save_post', array( $this, 'save_meta_box' ) );
27
+ add_action( 'wp_ajax_carousel_slider_save_images', array( $this, 'save_images' ) );
28
+
29
+ // Remove view and Quick Edit from Carousels
30
+ add_filter( 'post_row_actions', array( $this, 'post_row_actions'), 10, 2 );
31
+
32
+ // Add custom link to media gallery
33
+ add_filter("attachment_fields_to_edit", array( $this, "attachment_fields_to_edit" ), null, 2);
34
+ add_filter("attachment_fields_to_save", array( $this, "attachment_fields_to_save" ), null, 2);
35
  }
36
 
37
  public function carousel_post_type() {
38
  $labels = array(
39
+ 'name' => _x( 'Slides', 'Post Type General Name', 'carousel-slider' ),
40
+ 'singular_name' => _x( 'Slide', 'Post Type Singular Name', 'carousel-slider' ),
41
+ 'menu_name' => __( 'Carousel Slider', 'carousel-slider' ),
42
+ 'parent_item_colon' => __( 'Parent Slide:', 'carousel-slider' ),
43
+ 'all_items' => __( 'All Slides', 'carousel-slider' ),
44
+ 'view_item' => __( 'View Slide', 'carousel-slider' ),
45
+ 'add_new_item' => __( 'Add New Slide', 'carousel-slider' ),
46
  'add_new' => __( 'Add New', 'carousel-slider' ),
47
+ 'edit_item' => __( 'Edit Slide', 'carousel-slider' ),
48
+ 'update_item' => __( 'Update Slide', 'carousel-slider' ),
49
+ 'search_items' => __( 'Search Slide', 'carousel-slider' ),
50
  'not_found' => __( 'Not found', 'carousel-slider' ),
51
  'not_found_in_trash' => __( 'Not found in Trash', 'carousel-slider' ),
52
  );
53
  $args = array(
54
+ 'label' => __( 'Slide', 'carousel-slider' ),
55
+ 'description' => __( 'The easiest way to create carousel slide', 'carousel-slider' ),
56
  'labels' => $labels,
57
  'supports' => array( 'title' ),
58
  'hierarchical' => false,
73
  register_post_type( 'carousels', $args );
74
  }
75
 
76
+ public function post_row_actions( $actions, $post )
77
+ {
78
+ global $current_screen;
79
+ if( $current_screen->post_type != 'carousels' ){
80
+ return $actions;
81
+ }
82
+
83
+ unset( $actions['view'] );
84
+ unset( $actions['inline hide-if-no-js'] );
85
+ return $actions;
86
+ }
87
+
88
  public function columns_head(){
89
 
90
  $columns = array(
91
+ 'cb' => '<input type="checkbox">',
92
+ 'title' => __('Carousel Slide Title', 'carousel-slider'),
93
+ 'usage' => __('Shortcode', 'carousel-slider'),
94
+ 'slide_type' => __('Slide Type', 'carousel-slider')
95
  );
96
 
97
  return $columns;
102
  switch ($column) {
103
 
104
  case 'usage':
105
+ ?>
106
+ <input
107
+ type="text"
108
+ onmousedown="this.clicked = 1;"
109
+ onfocus="if (!this.clicked) this.select(); else this.clicked = 2;"
110
+ onclick="if (this.clicked == 2) this.select(); this.clicked = 0;"
111
+ value="[carousel_slide id='<?php echo $post_id; ?>']"
112
+ style="background-color: #f1f1f1;font-family: monospace;min-width: 250px;padding: 5px 8px;"
113
+ >
114
+ <?php
115
 
116
  break;
117
 
118
+ case 'slide_type':
119
+ $slide_type = get_post_meta( get_the_ID(), '_slide_type', true);
120
+ echo ucwords(str_replace('-', ' ', $slide_type));
 
 
 
 
 
 
 
121
 
122
  break;
123
  default :
128
  public function add_meta_boxes()
129
  {
130
  add_meta_box(
131
+ "carousel-slider-meta-boxes",
132
+ __("Carousel Slider", 'carousel-slider'),
133
+ array( $this, 'carousel_slider_meta_boxes' ),
134
+ "carousels",
135
+ "normal",
136
+ "high"
137
+ );
138
+ }
139
+
140
+ public function carousel_slider_meta_boxes()
141
+ {
142
+ wp_nonce_field( 'carousel_slider_nonce', '_carousel_slider_nonce' );
143
+
144
+ global $post;
145
+ $slide_type = get_post_meta( $post->ID, '_slide_type', true );
146
+ $slide_type = in_array($slide_type, array('image-carousel', 'post-carousel', 'image-carousel-url', 'video-carousel')) ? $slide_type : 'image-carousel';
147
+
148
+ require_once $this->plugin_path . '/templates/admin/types.php';
149
+ require_once $this->plugin_path . '/templates/admin/images.php';
150
+ require_once $this->plugin_path . '/templates/admin/images-carousel-url.php';
151
+ require_once $this->plugin_path . '/templates/admin/post-carousel.php';
152
+ require_once $this->plugin_path . '/templates/admin/video-carousel.php';
153
+ require_once $this->plugin_path . '/templates/admin/general.php';
154
+ require_once $this->plugin_path . '/templates/admin/navigation.php';
155
+ require_once $this->plugin_path . '/templates/admin/autoplay.php';
156
+ require_once $this->plugin_path . '/templates/admin/responsive.php';
157
+ }
158
+
159
+ public function shortcode_usage_info()
160
+ {
161
+ add_meta_box(
162
+ "carousel-slider-shortcode-info",
163
  __("Usage (Shortcode)", 'carousel-slider'),
164
  array( $this, 'render_meta_box_shortcode_info' ),
165
  "carousels",
166
  "side",
167
+ "low"
168
  );
169
  }
170
 
171
  public function render_meta_box_shortcode_info()
172
  {
173
  ob_start(); ?>
174
+ <p><strong>
 
175
  <?php _e('Copy the following shortcode and paste in post or page where you want to show.', 'carousel-slider'); ?>
176
+ </strong></p>
177
+ <input
178
+ type="text"
179
+ onmousedown="this.clicked = 1;"
180
+ onfocus="if (!this.clicked) this.select(); else this.clicked = 2;"
181
+ onclick="if (this.clicked == 2) this.select(); this.clicked = 0;"
182
+ value="[carousel_slide id='<?php echo get_the_ID(); ?>']"
183
+ style="background-color: #f1f1f1; width: 100%; padding: 8px;"
184
+ >
185
  <hr>
186
  <p>
187
  <?php _e('If you like this plugin or if you make money using this or if you want to help me to continue my contribution on open source projects, consider to make a small donation.', 'carousel-slider'); ?>
194
  <?php echo ob_get_clean();
195
  }
196
 
197
+ /**
198
+ * Save custom meta box
199
+ *
200
+ * @method save_meta_box
201
+ * @param int $post_id The post ID
202
+ */
203
+ public function save_meta_box( $post_id )
204
+ {
205
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){
206
+ return;
207
+ }
208
+ // Check if nonce is set.
209
+ if ( ! isset( $_POST['_carousel_slider_nonce'], $_POST['carousel_slider'] ) ) {
210
+ return;
211
+ }
212
+ // Check if nonce is valid.
213
+ if ( ! wp_verify_nonce( $_POST['_carousel_slider_nonce'], 'carousel_slider_nonce' ) ) {
214
+ return;
215
+ }
216
+ // Check if user has permissions to save data.
217
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
218
+ return;
219
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
 
221
+ foreach( $_POST['carousel_slider'] as $key => $val ){
222
+ if (is_array($val)) {
223
+ $val = implode(',', $val);
224
+ }
225
+ if ($key == '_margin_right' && $val == 0) {
226
+ $val = 'zero';
227
+ }
228
+ update_post_meta( $post_id, $key, sanitize_text_field( $val ) );
229
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
 
231
+ if (isset($_POST['_images_urls'])) {
232
+ $this->save_images_urls( $post_id );
233
+ }
234
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
 
236
+ /**
237
+ * Save carousel slider gallery images
238
+ *
239
+ * @return string
240
+ */
241
+ public function save_images()
242
+ {
243
+ // Check if not an autosave.
244
+ if( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ){
245
+ return;
246
+ }
247
+ // Check if required fields are set
248
+ if ( ! isset( $_POST['ids'], $_POST['post_id'], $_POST['nonce'] ) ) {
249
+ return;
250
+ }
251
+ // Check if nonce is valid.
252
+ if ( ! wp_verify_nonce( $_POST['nonce'], 'carousel_slider_ajax' ) ) {
253
+ return;
254
+ }
255
+ // Check if user has permissions to save data.
256
+ if ( ! current_user_can( 'edit_posts' ) ) {
257
+ return;
258
+ }
259
+
260
+ $ids = strip_tags(rtrim($_POST['ids'], ','));
261
+ update_post_meta($_POST['post_id'], '_wpdh_image_ids', $ids);
262
+
263
+ $thumbs = explode(',', $ids);
264
+ $thumbs_output = '';
265
+ foreach( $thumbs as $thumb ) {
266
+ $thumbs_output .= '<li>' . wp_get_attachment_image( $thumb, array(75,75) ) . '</li>';
267
+ }
268
+
269
+ echo $thumbs_output;
270
+
271
+ die();
272
+ }
 
 
273
 
274
+ /**
275
+ * Save images urls
276
+ *
277
+ * @param integer $post_id
278
+ * @return void
279
+ */
280
+ private function save_images_urls( $post_id )
281
+ {
282
+ if ( ! isset( $_POST['_images_urls'] ) ) {
283
+ return;
284
+ }
285
+ $url = $_POST['_images_urls']['url'];
286
+ $title = $_POST['_images_urls']['title'];
287
+ $caption = $_POST['_images_urls']['caption'];
288
+ $alt = $_POST['_images_urls']['alt'];
289
+ $link_url = $_POST['_images_urls']['link_url'];
290
+
291
+ $urls = array();
292
+
293
+ for ($i=0; $i < count($url); $i++) {
294
+ $urls[] = array(
295
+ 'url' => esc_url_raw($url[$i]),
296
+ 'title' => sanitize_text_field($title[$i]),
297
+ 'caption' => sanitize_text_field($caption[$i]),
298
+ 'alt' => sanitize_text_field($alt[$i]),
299
+ 'link_url' => esc_url_raw($link_url[$i]),
300
+ );
301
+ }
302
+ update_post_meta( $post_id, '_images_urls', $urls );
303
+ }
304
+
305
+ /**
306
+ * Adding our custom fields to the $form_fields array
307
+ *
308
+ * @param array $form_fields
309
+ * @param object $post
310
+ * @return array
311
+ */
312
+ public function attachment_fields_to_edit( $form_fields, $post )
313
+ {
314
+ $form_fields["carousel_slider_link_url"]["label"] = __("Link to URL", "carousel-slider");
315
+ $form_fields["carousel_slider_link_url"]["input"] = "textarea";
316
+ $form_fields["carousel_slider_link_url"]["value"] = get_post_meta($post->ID, "_carousel_slider_link_url", true);
317
+ $form_fields["carousel_slider_link_url"]["extra_rows"] = array(
318
+ 'carouselSliderInfo' => __('"Link to URL" only works on Carousel Slider for linking image to a custom url.', 'carousel-slider'),
319
  );
320
+
321
+ return $form_fields;
322
+ }
323
+
324
+ /**
325
+ * Save custom field value
326
+ *
327
+ * @param array $post
328
+ * @param array $attachment
329
+ * @return object
330
+ */
331
+ public function attachment_fields_to_save( $post, $attachment )
332
+ {
333
+ $slider_link_url = isset($attachment['carousel_slider_link_url']) ? $attachment['carousel_slider_link_url'] : null;
334
+
335
+ if( filter_var( $slider_link_url, FILTER_VALIDATE_URL ) ) {
336
+
337
+ update_post_meta( $post['ID'], '_carousel_slider_link_url', esc_url_raw( $slider_link_url ) );
338
+ }
339
 
340
+ return $post;
 
 
 
 
341
  }
342
  }
343
 
includes/Carousel_Slider_Documentation.php CHANGED
File without changes
includes/Carousel_Slider_Form.php ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ if( ! trait_exists('Carousel_Slider_Form') ):
8
+
9
+ trait Carousel_Slider_Form
10
+ {
11
+ public function text( array $args )
12
+ {
13
+ if( ! isset( $args['id'], $args['name'] ) ) return;
14
+
15
+ list($name, $value) = $this->field_common( $args );
16
+
17
+ echo $this->field_before( $args );
18
+ echo sprintf( '<input type="text" class="sp-input-text" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name);
19
+ echo $this->field_after();
20
+ }
21
+ public function textarea( array $args )
22
+ {
23
+ if( ! isset( $args['id'], $args['name'] ) ) return;
24
+
25
+ list($name, $value) = $this->field_common( $args );
26
+ $cols = isset( $args['cols'] ) ? $args['cols'] : 35;
27
+ $rows = isset( $args['rows'] ) ? $args['rows'] : 6;
28
+
29
+ echo $this->field_before( $args );
30
+ echo sprintf( '<textarea class="sp-input-textarea" id="%2$s" name="%3$s" cols="%4$d" rows="%5$d">%1$s</textarea>', esc_textarea($value), $args['id'], $name, $cols, $rows);
31
+ echo $this->field_after();
32
+ }
33
+
34
+ public function color( array $args )
35
+ {
36
+ if( ! isset( $args['id'], $args['name'] ) ) return;
37
+
38
+ list($name, $value) = $this->field_common( $args );
39
+ $std_value = isset($args['std']) ? $args['std'] : '';
40
+
41
+ echo $this->field_before( $args );
42
+ echo sprintf( '<input type="text" class="colorpicker" value="%1$s" id="%2$s" name="%3$s" data-default-color="%4$s">', $value, $args['id'], $name, $std_value);
43
+ echo $this->field_after();
44
+ }
45
+
46
+ public function date( array $args )
47
+ {
48
+ if( ! isset( $args['id'], $args['name'] ) ) return;
49
+
50
+ list($name, $value) = $this->field_common( $args );
51
+ $std_value = isset($args['std']) ? $args['std'] : '';
52
+
53
+ echo $this->field_before( $args );
54
+ echo sprintf( '<input type="text" class="sp-input-text datepicker" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name, $std_value);
55
+ echo $this->field_after();
56
+ }
57
+
58
+ public function number( array $args )
59
+ {
60
+ if( ! isset( $args['id'], $args['name'] ) ) return;
61
+
62
+ list($name, $value) = $this->field_common( $args );
63
+ $min = isset( $args['min'] ) ? $args['min'] : null;
64
+ $max = isset( $args['max'] ) ? $args['max'] : null;
65
+
66
+ echo $this->field_before( $args );
67
+ echo sprintf( '<input type="number" class="sp-input-text" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name);
68
+ echo $this->field_after();
69
+ }
70
+
71
+ public function checkbox( array $args )
72
+ {
73
+ if( ! isset( $args['id'], $args['name'] ) ) return;
74
+
75
+ list($name, $value) = $this->field_common( $args );
76
+ $checked = ( $value == 'on' ) ? ' checked' : '';
77
+ $label = isset( $args['label'] ) ? $args['label'] : '';
78
+
79
+ echo $this->field_before( $args );
80
+ echo sprintf( '<input type="hidden" name="%1$s" value="off">', $name );
81
+ echo sprintf('<label for="%2$s"><input type="checkbox" %4$s value="on" id="%2$s" name="%1$s">%3$s</label>',$name, $args['id'], $label, $checked);
82
+ echo $this->field_after();
83
+ }
84
+
85
+ public function select( $args )
86
+ {
87
+ if( ! isset( $args['id'], $args['name'] ) ) return;
88
+
89
+ list($name, $value) = $this->field_common( $args );
90
+ $checked = ( $value == 'on' ) ? ' checked' : '';
91
+ $multiple = isset($args['multiple']) ? 'multiple' : '';
92
+
93
+ echo $this->field_before( $args );
94
+ echo sprintf('<select name="%1$s" id="%2$s" class="select2 sp-input-text" %3$s>',$name, $args['id'], $multiple);
95
+ foreach( $args['options'] as $key => $option ){
96
+ $selected = ( $value == $key ) ? ' selected="selected"' : '';
97
+ echo sprintf('<option value="%1$s" %3$s>%2$s</option>',$key, $option, $selected);
98
+ }
99
+ echo'</select>';
100
+ echo $this->field_after();
101
+ }
102
+
103
+ public function posts_list( $args )
104
+ {
105
+ if( ! isset( $args['id'], $args['name'] ) ) return;
106
+
107
+ list($name, $value) = $this->field_common( $args );
108
+ $value = explode(',', $value);
109
+ $multiple = isset($args['multiple']) ? 'multiple' : '';
110
+
111
+ echo $this->field_before( $args );
112
+ echo sprintf('<select name="%1$s" id="%2$s" class="select2 sp-input-text" %3$s>',$name, $args['id'], $multiple);
113
+ $posts = get_posts( array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => -1 ) );
114
+
115
+ foreach( $posts as $post ){
116
+ $selected = in_array($post->ID, $value) ? ' selected="selected"' : '';
117
+ echo sprintf('<option value="%1$s" %3$s>%2$s</option>',$post->ID, $post->post_title, $selected);
118
+ }
119
+ echo'</select>';
120
+ echo $this->field_after();
121
+ }
122
+
123
+ public function images_gallery( $args )
124
+ {
125
+ if( ! isset( $args['id'], $args['name'] ) ) return;
126
+ list($name, $value) = $this->field_common( $args );
127
+
128
+ $btn_text = $value ? 'Edit Gallery' : 'Add Gallery';
129
+ $value = strip_tags(rtrim($value, ','));
130
+ $output = '';
131
+
132
+ if( $value ) {
133
+ $thumbs = explode(',', $value);
134
+ foreach( $thumbs as $thumb ) {
135
+ $output .= '<li>' . wp_get_attachment_image( $thumb, array(50,50) ) . '</li>';
136
+ }
137
+ }
138
+
139
+ $html = $this->field_before( $args );
140
+ $html .= '<div class="carousel_slider_images">';
141
+ $html .= sprintf('<input type="hidden" value="%1$s" id="_carousel_slider_images_ids" name="%2$s">', $value, $name);
142
+ $html .= sprintf('<a href="#" id="carousel_slider_gallery_btn" class="carousel_slider_gallery_btn">%s</a>', $btn_text);
143
+ $html .= sprintf('<ul class="carousel_slider_gallery_list">%s</ul>', $output);
144
+ $html .= '</div>';
145
+ $html .= $this->field_after();
146
+ echo $html;
147
+ }
148
+
149
+ public function images_url( array $args )
150
+ {
151
+ if( ! isset( $args['id'], $args['name'] ) ) return;
152
+ list($name, $value) = $this->field_common( $args );
153
+
154
+ $btn_text = $value ? __('Edit URLs', 'carousel-slider') : __('Add URLs', 'carousel-slider');
155
+
156
+ $html = $this->field_before( $args );
157
+ $html .= sprintf('<a id="_images_urls_btn" class="button button-primary" href="#">%s</a>', $btn_text);
158
+ $html .= '<ul class="carousel_slider_url_images_list">';
159
+ if ( is_array($value) && count($value) > 0){
160
+ foreach ($value as $image ) {
161
+ $html .= sprintf('<li><img src="%s" alt="%s" width="75" height="75"></li>', $image['url'], $image['alt']);
162
+ }
163
+ }
164
+ $html .= '</ul>';
165
+ $html .= $this->field_after();
166
+ echo $html;
167
+ }
168
+
169
+ public function file( array $args )
170
+ {
171
+ if( ! isset( $args['id'], $args['name'] ) ) return;
172
+
173
+ list($name, $value) = $this->field_common( $args );
174
+
175
+ echo $this->field_before( $args );
176
+ echo sprintf( '<input type="text" class="sp-input-text" value="%1$s" id="%2$s" name="%3$s">', $value, $args['id'], $name);
177
+ echo sprintf('<input type="button" class="button" id="carousel_slider_video_btn" value="%s">', __('Browse', 'carousel-slider'));
178
+ echo $this->field_after();
179
+ }
180
+
181
+ public function image_sizes( array $args )
182
+ {
183
+ if( ! isset( $args['id'], $args['name'] ) ) return;
184
+
185
+ list($name, $value) = $this->field_common( $args );
186
+
187
+ global $_wp_additional_image_sizes;
188
+
189
+ $sizes = array();
190
+
191
+ foreach ( get_intermediate_image_sizes() as $_size ) {
192
+ if ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {
193
+
194
+ $width = get_option( "{$_size}_size_w" );
195
+ $height = get_option( "{$_size}_size_h" );
196
+ $crop = (bool) get_option( "{$_size}_crop" ) ? 'hard' : 'soft';
197
+
198
+ $sizes[$_size] = "{$_size} - {$width}x{$height}";
199
+
200
+ } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {
201
+
202
+ $width = $_wp_additional_image_sizes[ $_size ]['width'];
203
+ $height = $_wp_additional_image_sizes[ $_size ]['height'];
204
+ $crop = $_wp_additional_image_sizes[ $_size ]['crop'] ? 'hard' : 'soft';
205
+
206
+ $sizes[$_size] = "{$_size} - {$width}x{$height}";
207
+ }
208
+ }
209
+
210
+ $sizes = array_merge($sizes, array('full' => 'original uploaded image'));
211
+
212
+
213
+ echo $this->field_before( $args );
214
+ echo sprintf('<select name="%1$s" id="%2$s" class="select2 sp-input-text">',$name, $args['id']);
215
+ foreach( $sizes as $key => $option ){
216
+ $selected = ( $value == $key ) ? ' selected="selected"' : '';
217
+ echo sprintf('<option value="%1$s" %3$s>%2$s</option>',$key, $option, $selected);
218
+ }
219
+ echo'</select>';
220
+ echo $this->field_after();
221
+ }
222
+
223
+ private function field_common( $args )
224
+ {
225
+ global $post;
226
+ // Meta Name
227
+ $group = isset($args['group']) ? $args['group'] : 'carousel_slider';
228
+ $multiple = isset($args['multiple']) ? '[]' : '';
229
+ $name = sprintf('%s[%s]%s', $group, $args['id'], $multiple);
230
+
231
+ // Meta Value
232
+ $std_value = isset($args['std']) ? $args['std'] : '';
233
+ $meta = get_post_meta( $post->ID, $args['id'], true );
234
+ $value = ! empty($meta) ? $meta : $std_value;
235
+
236
+ if ($value == 'zero') {
237
+ $value = 0;
238
+ }
239
+
240
+ return array( $name, $value );
241
+ }
242
+
243
+ private function field_before( $args )
244
+ {
245
+ $table = sprintf( '<div class="sp-input-group" id="field-%s">', $args['id'] );
246
+ $table .= sprintf( '<div class="sp-input-label">' );
247
+ $table .= sprintf( '<label for="%1$s">%2$s</label>', $args['id'], $args['name'] );
248
+ if ( ! empty( $args['desc'] ) ) {
249
+ $table .= sprintf( '<p class="sp-input-desc">%s</p>', $args['desc'] );
250
+ }
251
+ $table .= '</div>';
252
+ $table .= sprintf( '<div class="sp-input-field">' );
253
+ return $table;
254
+ }
255
+
256
+ private function field_after()
257
+ {
258
+ return '</div></div>';
259
+ }
260
+ }
261
+
262
+ endif;
includes/Carousel_Slider_Meta_Box.php DELETED
@@ -1,291 +0,0 @@
1
- <?php
2
- // If this file is called directly, abort.
3
- if ( ! defined( 'WPINC' ) ) {
4
- die;
5
- }
6
-
7
- if ( ! class_exists('Carousel_Slider_Meta_Box') ):
8
-
9
- class Carousel_Slider_Meta_Box {
10
-
11
- private $fields;
12
-
13
- public function __construct($fields){
14
- $this->fields = $fields;
15
- add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 15 );
16
- add_action( 'save_post', array( $this, 'save_meta_box' ) );
17
- add_action( 'wp_ajax_save_images', array( $this, 'save_images' ) );
18
- }
19
-
20
- /**
21
- * Add a custom meta box
22
- *
23
- * @method add_meta_boxes
24
- */
25
- public function add_meta_boxes()
26
- {
27
- if( !is_array( $this->fields ) ) return false;
28
- add_meta_box(
29
- $this->fields['id'],
30
- $this->fields['title'],
31
- array( $this, 'meta_box_callback' ),
32
- $this->fields['page'],
33
- $this->fields['context'],
34
- $this->fields['priority'],
35
- $this->fields
36
- );
37
- }
38
-
39
-
40
- /**
41
- * Prints out the HTML for the edit screen section.
42
- * @method meta_box_callback
43
- * @param string $post name of post type
44
- * @param array $form_fields Arguments to pass into your callback function.
45
- *
46
- * @return string
47
- */
48
- public function meta_box_callback($post, $form_fields)
49
- {
50
- if( !is_array( $form_fields) ) return false;
51
-
52
- wp_nonce_field( basename(__FILE__), 'wpdh_meta_box_nonce' );
53
-
54
- echo '<table class="form-table">';
55
-
56
- foreach( $form_fields['args']['fields'] as $field ){
57
-
58
- $meta_id = (isset($field['id'])) ? $field['id'] : strtolower(str_replace(' ', '_', $field['name']));
59
- $meta_name = $this->fields['id'] . '_meta['.$meta_id. ']';
60
- $meta = get_post_meta( $post->ID, $meta_id, true );
61
- $std = (isset($field['std'])) ? $field['std'] : '';
62
- $value = $meta ? $meta : $std;
63
- $desc = (isset($field['desc'])) ? $field['desc'] : '';
64
- $type = (isset($field['type'])) ? $field['type'] : 'text';
65
-
66
- echo sprintf('<tr><th><label for="%1$s"><strong>%2$s</strong></label></th>', $meta_id, $field['name']);
67
-
68
- switch( $type ){
69
- case 'text':
70
- echo sprintf('<td><input type="text" name="%1$s" id="%2$s" value="%3$s" class="regular-text">',$meta_name, $meta_id, $value);
71
- break;
72
-
73
- case 'email':
74
- echo sprintf('<td><input type="email" name="%1$s" id="%2$s" value="%3$s" class="regular-text">',$meta_name, $meta_id, $value);
75
- break;
76
-
77
- case 'number':
78
- if ($value == 'zero') {
79
- $value = 0;
80
- }
81
- echo sprintf('<td><input type="number" name="%1$s" id="%2$s" value="%3$s" class="regular-text">',$meta_name, $meta_id, $value);
82
- break;
83
-
84
- case 'url':
85
- echo sprintf('<td><input type="url" name="%1$s" id="%2$s" value="%3$s" class="regular-text">',$meta_name, $meta_id, $value);
86
- break;
87
-
88
- case 'color':
89
- echo sprintf('<td><input type="text" name="%1$s" id="%2$s" value="%3$s" data-default-color="%4$s" class="colorpicker">',$meta_name, $meta_id, $value, $std);
90
- break;
91
-
92
- case 'date':
93
- echo sprintf('<td><input type="text" name="%1$s" id="%2$s" value="%3$s" class="datepicker">',$meta_name, $meta_id, $value);
94
- break;
95
-
96
- case 'textarea':
97
- echo sprintf('<td><textarea name="%1$s" id="%2$s" rows="8" cols="50">%3$s</textarea>',$meta_name, $meta_id, $value);
98
- break;
99
-
100
- case 'select':
101
- echo sprintf('<td><select name="%1$s" id="%2$s">',$meta_name, $meta_id);
102
- foreach( $field['options'] as $key => $option ){
103
- $selected = ( $value == $key ) ? ' selected="selected"' : '';
104
- echo sprintf('<option value="%1$s" %3$s>%2$s</option>',$key, $option, $selected);
105
- }
106
- echo'</select>';
107
- break;
108
-
109
- case 'image_sizes':
110
- $available_img_size = get_intermediate_image_sizes();
111
- array_push($available_img_size, 'full');
112
-
113
- echo sprintf('<td><select name="%1$s" id="%2$s">',$meta_name, $meta_id);
114
- foreach( $available_img_size as $key => $option ){
115
- $selected = ( $value == $option ) ? ' selected="selected"' : '';
116
- echo sprintf('<option value="%1$s" %3$s>%2$s</option>',$option, $option, $selected);
117
- }
118
- echo'</select>';
119
- break;
120
-
121
- case 'radio':
122
- echo '<td><fieldset>';
123
- foreach( $field['options'] as $key => $option ){
124
-
125
- $checked = ( $value == $key ) ? ' checked="checked"' : '';
126
- echo sprintf('<label for="%1$s"><input type="radio" name="%4$s" id="%1$s" value="%1$s" %3$s>%2$s</label><br>',$key, $option, $checked, $meta_name);
127
- }
128
- echo '<fieldset>';
129
- break;
130
-
131
- case 'checkbox':
132
- $checked = ( $value == 'on' ) ? ' checked' : '';
133
- $label = (isset($field['label'])) ? $field['label'] : '';
134
- echo sprintf( '<input type="hidden" name="%1$s" value="off">', $meta_name );
135
- echo sprintf('<td><label for="%2$s"><input type="checkbox" %4$s value="on" id="%2$s" name="%1$s">%3$s</label>',$meta_name, $meta_id, $label, $checked);
136
- break;
137
-
138
- case 'file':
139
- $multiple = ( isset( $field['multiple'] ) ) ? true : false;
140
- ?><script>
141
- jQuery(function($){
142
- var frame,
143
- isMultiple = "<?php echo $multiple; ?>";
144
-
145
- $('#<?php echo $meta_id; ?>_button').on('click', function(e) {
146
- e.preventDefault();
147
-
148
- var options = {
149
- state: 'insert',
150
- frame: 'post',
151
- multiple: isMultiple
152
- };
153
-
154
- frame = wp.media(options).open();
155
-
156
- frame.menu.get('view').unset('gallery');
157
- frame.menu.get('view').unset('featured-image');
158
-
159
- frame.toolbar.get('view').set({
160
- insert: {
161
- style: 'primary',
162
- text: '<?php _e("Insert", "wpdh"); ?>',
163
-
164
- click: function() {
165
- var models = frame.state().get('selection'),
166
- url = models.first().attributes.url,
167
- files = [];
168
-
169
- if( isMultiple ) {
170
- models.map (function( attachment ) {
171
- attachment = attachment.toJSON();
172
- files.push(attachment.url);
173
- url = files;
174
- });
175
- }
176
-
177
- $('#<?php echo $meta_id; ?>').val( url );
178
-
179
- frame.close();
180
- }
181
- }
182
- });
183
- });
184
- });
185
- </script>
186
-
187
- <?php
188
- echo sprintf('<td><input type="text" name="%1$s" id="%2$s" value="%3$s" class="regular-text">',$meta_name, $meta_id, $value);
189
- echo '<input type="button" class="button" name="'. $meta_id .'_button" id="'. $meta_id .'_button" value="Browse">';
190
- break;
191
-
192
- case 'images':
193
- $create_btn_text = 'Create Gallery';
194
- $edit_btn_text = 'Edit Gallery';
195
-
196
- $meta = get_post_meta( $post->ID, '_wpdh_image_ids', true );
197
- $thumbs_output = '';
198
- $button_text = ($meta) ? $edit_btn_text : $create_btn_text;
199
- if( $meta ) {
200
- $thumbs = explode(',', $meta);
201
- $thumbs_output = '';
202
- foreach( $thumbs as $thumb ) {
203
- $thumbs_output .= '<li>' . wp_get_attachment_image( $thumb, array(75,75) ) . '</li>';
204
- }
205
- }
206
-
207
- echo sprintf('<td class="wpdh-box-%s">', $type);
208
- echo sprintf('<input type="button" class="button" name="%1$s" id="wpdh_images_upload" value="%2$s">', $meta_id, $button_text);
209
- echo '<input type="hidden" name="wpdh_meta[_wpdh_image_ids]" id="_wpdh_image_ids" value="' . ($meta ? $meta : 'false') . '"><br>';
210
-
211
- echo sprintf('<div class="wpdh-gallery-thumbs"><ul>%s</ul></div>',$thumbs_output);
212
- break;
213
-
214
- default:
215
- echo sprintf('<td><input type="text" name="%1$s" id="%2$s" value="%3$s" class="regular-text">',$meta_name, $meta_id, $value);
216
- break;
217
-
218
- }
219
-
220
- if (!empty($desc)) {
221
- echo sprintf('<p class="description">%s</p>', $desc);
222
- }
223
-
224
- echo '</td></tr>';
225
-
226
- }
227
-
228
- echo '</table>';
229
-
230
- }
231
-
232
- /**
233
- * Save custom meta box
234
- * @method save_meta_box
235
- * @param int $post_id The post ID
236
- */
237
- public function save_meta_box( $post_id ) {
238
-
239
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
240
- return;
241
-
242
- $postName = $this->fields['id']. '_meta';
243
-
244
- if ( !isset($_POST[$postName]) || !isset($_POST['wpdh_meta_box_nonce']) || !wp_verify_nonce( $_POST['wpdh_meta_box_nonce'], basename( __FILE__ ) ) )
245
- return;
246
-
247
- if ( 'page' == $_POST['post_type'] ) {
248
- if ( !current_user_can( 'edit_page', $post_id ) ) return;
249
- } else {
250
- if ( !current_user_can( 'edit_post', $post_id ) ) return;
251
- }
252
-
253
- foreach( $_POST[$postName] as $key => $val ){
254
- if ($key == '_margin_right' && $val == 0) {
255
- $val = 'zero';
256
- }
257
- update_post_meta( $post_id, $key, sanitize_text_field( $val ) );
258
- }
259
- }
260
-
261
- /**
262
- * Save images
263
- * @method save_images
264
- */
265
- public function save_images(){
266
- if( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ){
267
- return;
268
- }
269
-
270
- if ( !isset($_POST['ids']) || !isset($_POST['nonce']) || !wp_verify_nonce( $_POST['nonce'], 'wpdh-ajax' ) ){
271
- return;
272
- }
273
-
274
- if ( !current_user_can( 'edit_posts' ) ) return;
275
-
276
- $ids = strip_tags(rtrim($_POST['ids'], ','));
277
- update_post_meta($_POST['post_id'], '_wpdh_image_ids', $ids);
278
-
279
- $thumbs = explode(',', $ids);
280
- $thumbs_output = '';
281
- foreach( $thumbs as $thumb ) {
282
- $thumbs_output .= '<li>' . wp_get_attachment_image( $thumb, array(75,75) ) . '</li>';
283
- }
284
-
285
- echo $thumbs_output;
286
-
287
- die();
288
- }
289
-
290
- }
291
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Carousel_Slider_VC_Element.php CHANGED
@@ -18,7 +18,7 @@ class Carousel_Slider_VC_Element
18
  if ( ! defined( 'WPB_VC_VERSION' ) ) {
19
  return;
20
  }
21
-
22
  vc_map( array(
23
  "name" => __("Carousel Slider", 'carousel-slider'),
24
  "description" => __("Place Carousel Slider.", 'carousel-slider'),
@@ -28,16 +28,36 @@ class Carousel_Slider_VC_Element
28
  "category" => __('Content', 'carousel-slider'),
29
  "params" => array(
30
  array(
31
- "type" => "textfield",
32
- "holder" => "div",
33
- "class" => "",
34
- "param_name" => "id",
35
- "heading" => __("Carousel Slide ID", 'carousel-slider'),
36
- "description" => sprintf(__("Place carousel slide id here. %s to go Carousels page", 'carousel-slider'), '<a href="'. admin_url('edit.php?post_type=carousels') .'" target="_blank">' . __('Click here', 'carousel-slider') . '</a>'),
37
  ),
38
  ),
39
  ));
40
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
42
 
43
  endif;
18
  if ( ! defined( 'WPB_VC_VERSION' ) ) {
19
  return;
20
  }
21
+
22
  vc_map( array(
23
  "name" => __("Carousel Slider", 'carousel-slider'),
24
  "description" => __("Place Carousel Slider.", 'carousel-slider'),
28
  "category" => __('Content', 'carousel-slider'),
29
  "params" => array(
30
  array(
31
+ "type" => "dropdown",
32
+ "holder" => "div",
33
+ "class" => "carousel-slider-id",
34
+ "param_name" => "id",
35
+ "value" => $this->carousels_list(),
36
+ "heading" => __("Choose Carousel Slide", 'carousel-slider'),
37
  ),
38
  ),
39
  ));
40
  }
41
+
42
+ private function carousels_list()
43
+ {
44
+ $carousels = get_posts( array(
45
+ 'post_type' => 'carousels',
46
+ 'post_status' => 'publish',
47
+ ) );
48
+
49
+ if ( count($carousels) < 1) {
50
+ return array();
51
+ }
52
+
53
+ $result = array();
54
+
55
+ foreach($carousels as $carousel) {
56
+ $result[esc_html($carousel->post_title)] = $carousel->ID;
57
+ }
58
+
59
+ return $result;
60
+ }
61
  }
62
 
63
  endif;
includes/index.php CHANGED
@@ -1,2 +1,2 @@
1
  <?php
2
- // Silence is golden
1
  <?php
2
+ // Code is Poetry
index.php CHANGED
@@ -1,2 +1,2 @@
1
  <?php
2
- // Silence is golden
1
  <?php
2
+ // Code is Poetry
languages/index.php CHANGED
@@ -1,2 +1,2 @@
1
  <?php
2
- // Silence is golden
1
  <?php
2
+ // Code is Poetry
readme.txt CHANGED
@@ -4,173 +4,89 @@ Tags: widget, shortcode, images, carousel, carousel slider, image carousel, slid
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3LZWQTHEVYWCY
5
  Requires at least: 3.5
6
  Tested up to: 4.7
7
- Stable tag: 1.5.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Touch enabled wordpress plugin that lets you create beautiful responsive carousel slider.
12
 
13
  == Description ==
14
 
15
- Touch enabled WordPress plugin based on [Owl Carousel 2](http://www.owlcarousel.owlgraphic.com/) that lets you create beautiful responsive carousel slider.
 
16
 
17
- If you like this plugin, please give us ratings for future improvement.
18
 
19
- = Features =
20
 
21
- * Fully Responsive
22
- * Unlimited Slides
 
 
 
 
 
23
  * Supported in all major browsers
24
- * Touch and Grab enabled
25
  * CSS3 3D Acceleration
26
- * Multiple carousel on single page
27
  * Lazy load images
28
- * Navigation and pagination with unlimited colors
29
- * Support image title and caption option
30
  * and more options
31
 
32
- = Usage 1st method =
 
33
 
34
- Then go to `Carousels >> Add New` and fill all fields as your need and then click on "Publish" button. Now copy the generated shortcode and paste on post or page where you want to show carousel slider. See video instruction:
 
35
 
36
- https://www.youtube.com/watch?v=O4-EM32h7b4&feature=youtu.be
 
37
 
38
- = Usage - 2nd method =
 
39
 
40
- Without using custom post (Carousels admin menu), you can use custom shortcode to link image and generate carousel slider.
 
41
 
42
- To gererate carousel slider using shortcode, at first write wrapper shortcode as following:
43
-
44
- `[carousel][/carousel]`
45
-
46
- Now write the following shortcode inside the wrapper shortcode as many image as you want.
47
-
48
- `[item img_link=""]`
49
-
50
- You can add following attribute if you want to link image to custom post, page, image or anything that you want to open on click. Like as following
51
-
52
- `[item img_link="IMAGE_URL_GOES_HERE" href="CUSTOM_URL_GOES_HERE"]`
53
-
54
- The whole shortcode look likes as following: (See example shortcode.)
55
-
56
- `[carousel][item img_link="IMAGE_URL_GOES_HERE"][item img_link="IMAGE_URL_GOES_HERE" href="CUSTOM_URL_GOES_HERE"][item img_link="IMAGE_URL_GOES_HERE"][/carousel]`
57
-
58
- = Change Default Functionality =
59
-
60
- You can change default functionality by adding following optional attributes at `[carousel][/carousel]` shortcode
61
-
62
- `id=''`
63
- Default: Random number
64
- Add id if you want to use multiple carousel at same page. If you leave it blank, it will generate random number.
65
-
66
- `items=''`
67
- Default: 4
68
- To set the maximum amount of items displayed at a time with the widest browser width (window >= 1200)
69
-
70
- `items_desktop=''`
71
- Default: 4
72
- This allows you to preset the number of slides visible with (window >= 980) browser width.
73
-
74
- `items_desktop_small=''`
75
- Default: 3
76
- This allows you to preset the number of slides visible with (window >= 768) browser width.
77
-
78
- `items_tablet=''`
79
- Default: 2
80
- This allows you to preset the number of slides visible with (window >= 600) browser width.
81
-
82
- `items_mobile=''`
83
- Default: 1
84
- This allows you to preset the number of slides visible with (window >= 320) browser width.
85
-
86
- `auto_play=''`
87
- Default: true
88
- Write true to enable autoplay else write false.
89
-
90
- `stop_on_hover=''`
91
- Default: true
92
- Write true pause autoplay on mouse hover else write false.
93
-
94
- `navigation=''`
95
- Default: true
96
- Write false to hide "next" and "previous" buttons.
97
-
98
- `nav_color=''`
99
- Default: #d6d6d6
100
- Enter hex value of color for carousel navigation.
101
-
102
- `nav_active_color=''`
103
- Default: #4dc7a0
104
- Enter hex value of color for carousel navigation on mouse hover.
105
-
106
- `margin_right=''`
107
- Default: 10
108
- margin-right(px) on item. Default value is 10. Example: 20
109
-
110
- `inifnity_loop=''`
111
- Default: true
112
- Write true to show inifnity loop. Duplicate last and first items to get loop illusion
113
-
114
- `autoplay_timeout=''`
115
- Default: 5000
116
- Autoplay interval timeout in millisecond.
117
-
118
- `autoplay_speed=''`
119
- Default: 500
120
- Autoplay speen in millisecond.
121
-
122
- `slide_by=''`
123
- Default: 1
124
- Navigation slide by x number. Default value is 1.
125
-
126
- Example 1 (no attribute):
127
-
128
- `[carousel][item img_link='http://lorempixel.com/400/200/city/1/'][item img_link='http://lorempixel.com/400/200/city/2/'][item img_link='http://lorempixel.com/400/200/city/3/'][item img_link='http://lorempixel.com/400/200/city/4/'][item img_link='http://lorempixel.com/400/200/city/5/'][item img_link='http://lorempixel.com/400/200/city/6/'][item img_link='http://lorempixel.com/400/200/city/7/'][item img_link='http://lorempixel.com/400/200/city/8/'][item img_link='http://lorempixel.com/400/200/city/9/'][item img_link='http://lorempixel.com/400/200/city/10/'][/carousel]`
129
-
130
- Example 2 (with attribute):
131
-
132
- `[carousel id='myCustomId' items='3' items_desktop='3' margin_right='5' navigation='false'][item img_link='http://lorempixel.com/400/200/city/1/'][item img_link='http://lorempixel.com/400/200/city/2/'][item img_link='http://lorempixel.com/400/200/city/3/'][item img_link='http://lorempixel.com/400/200/city/4/'][item img_link='http://lorempixel.com/400/200/city/5/'][item img_link='http://lorempixel.com/400/200/city/6/'][item img_link='http://lorempixel.com/400/200/city/7/'][item img_link='http://lorempixel.com/400/200/city/8/'][item img_link='http://lorempixel.com/400/200/city/9/'][item img_link='http://lorempixel.com/400/200/city/10/'][/carousel]`
133
 
 
 
134
 
135
  == Installation ==
136
 
137
- Installing the plugins is just like installing other WordPress plugins. If you don't know how to install plugins, please review the three options below:
138
-
139
- = Install by Search =
140
-
141
- * From your WordPress dashboard, choose 'Add New' under the 'Plugins' category.
142
- * Search for 'Carousel Slider' a plugin will come called 'Carousel Slider by Sayful Islam' and Click 'Install Now' and confirm your installation by clicking 'ok'
143
- * The plugin will download and install. Just click 'Activate Plugin' to activate it.
144
-
145
- = Install by ZIP File =
146
-
147
- * From your WordPress dashboard, choose 'Add New' under the 'Plugins' category.
148
- * Select 'Upload' from the set of links at the top of the page (the second link)
149
- * From here, browse for the zip file included in your plugin titled 'carousel-slider.zip' and click the 'Install Now' button
150
- * Once installation is complete, activate the plugin to enable its features.
151
-
152
- = Install by FTP =
153
-
154
- * Find the directory titles 'carousel-slider' and upload it and all files within to the plugins directory of your WordPress install (WORDPRESS-DIRECTORY/wp-content/plugins/) [e.g. www.yourdomain.com/wp-content/plugins/]
155
- * From your WordPress dashboard, choose 'Installed Plugins' option under the 'Plugins' category
156
- * Locate the newly added plugin and click on the \'Activate\' link to enable its features.
157
 
 
158
 
159
  == Frequently Asked Questions ==
160
  Do you have questions or issues with Carousel Slider? [Ask for support here](http://wordpress.org/support/plugin/carousel-slider)
161
 
162
  == Screenshots ==
163
 
164
- 1. Screenshot of Carousel Responsive Settings
165
- 2. Screenshot of Carousel All Carousel
166
- 3. Screenshot of Carousel Image Settings
167
- 4. Screenshot of Carousel General Settings
168
- 5. Screenshot of Carousel Navigation Settings
169
- 6. Screenshot of Carousel Autoplay Settings
170
- 7. Screenshot of Carousel Front-end Example.
171
 
172
  == Changelog ==
173
 
 
 
 
 
 
 
 
 
 
 
174
  = version 1.5.3 - 2016-12-08 =
175
  * Fixed - Issue for not saving zero value for margin.
176
 
4
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3LZWQTHEVYWCY
5
  Requires at least: 3.5
6
  Tested up to: 4.7
7
+ Stable tag: 1.6.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Touch enabled wordpress plugin that lets you create beautiful multipurpose responsive carousel slider.
12
 
13
  == Description ==
14
 
15
+ **The Easiest Way to Create Image, Video and Post Carousel.**
16
+ Carousel Slider is a touch enabled WordPress plugin that lets you create highly customizable, stylish responsive carousel slider. With Carousel Slider, you can create image carousel using media gallery or custom url, post carousel, video carousel. We have integrated [Owl Carousel 2](http://www.owlcarousel.owlgraphic.com/) into our plugin for the ultimate device support.
17
 
18
+ **If you like this plugin, please give us [5 star](https://wordpress.org/support/plugin/carousel-slider/reviews/?rate=5#new-post) to encourage for future improvement.**
19
 
20
+ = Full Feature Set =
21
 
22
+ * **Multiple types carousel**, images from media gallery, images from URL, videos from youtube and vimeo, and posts carousel
23
+ * **Posts carousel**, support Specific posts, Posts per page, Date range query and ordering
24
+ * **Video carousel**, support custom height and width (Currently only support video from Youtube and Vimeo)
25
+ * **Fully responsive**, configure the number of items to display for desktop, small desktop, tablet and mobile devices
26
+ * **Lightweight**, only loads stuff when carousel is used
27
+ * **Navigation and pagination**, choose what type of navigation is displayed for your carousel with unlimited colors option
28
+ * **Works great in touch devices**, Touch and Grab enabled
29
  * Supported in all major browsers
 
30
  * CSS3 3D Acceleration
31
+ * Multiple carousel on same page
32
  * Lazy load images
33
+ * Support image title, caption, link url
 
34
  * and more options
35
 
36
+ = Images Carousel using gallery images =
37
+ https://www.youtube.com/watch?v=ZzI1JhElrxc
38
 
39
+ = Images Carousel using custom URLs =
40
+ https://www.youtube.com/watch?v=a7hqn1yNzwM
41
 
42
+ = Posts Carousel =
43
+ https://www.youtube.com/watch?v=ImJB946azy0
44
 
45
+ = With Page Builder by SiteOrigin =
46
+ https://www.youtube.com/watch?v=-OaYQZfr1RM
47
 
48
+ = With WPBakery Visual Composer =
49
+ https://www.youtube.com/watch?v=4LhDXH81whk
50
 
51
+ = Using as a Widget =
52
+ https://www.youtube.com/watch?v=kYgp6wp27lM
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
+ = Full video instruction on Youtube =
55
+ https://www.youtube.com/playlist?list=PL9GiQPpTzMv6aMEq449a7RPzjSVRf1bsc
56
 
57
  == Installation ==
58
 
59
+ * From your WordPress dashboard go to **Plugins > Add New**.
60
+ * Search for **Carousel Slider** in **Search Plugins** box.
61
+ * Find the WordPress Plugin named **Carousel Slider** by **Sayful Islam**.
62
+ * Click **Install Now** to install the **Carousel Slider** Plugin.
63
+ * The plugin will begin to download and install.
64
+ * Now just click **Activate** to activate the plugin.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
+ If you still need help. visit [WordPress codex](https://codex.wordpress.org/Managing_Plugins#Installing_Plugins)
67
 
68
  == Frequently Asked Questions ==
69
  Do you have questions or issues with Carousel Slider? [Ask for support here](http://wordpress.org/support/plugin/carousel-slider)
70
 
71
  == Screenshots ==
72
 
73
+ 1. Carousel slider admin page
74
+ 2. Front-end example of posts carousel slider.
75
+ 3. Front-end example of videos carousel slider.
76
+ 4. Front-end example of images carousel slider.
 
 
 
77
 
78
  == Changelog ==
79
 
80
+ = version 1.6.0 - 2016-12-22 =
81
+ * Added - "Link to URL" field at WordPress media uploader for linking carousel image.
82
+ * Added - Video carousel slider with custom height and width.
83
+ * Added - Posts carousel slider supporting Specific posts, Posts per page, Date range query and ordering posts.
84
+ * Added - Images carousel using custom URL with sorting, custom title, custom caption and link to URL features.
85
+ * Added - New breakpoint for Extra Large Desktop Layout
86
+ * Updated - Owl Carousel v2.2.0 javaScript library
87
+ * Shortcode **[carousel]** and **[item]** has been deprecated but backup up for previous versions.
88
+ * Documentation enhancement and improvements.
89
+
90
  = version 1.5.3 - 2016-12-08 =
91
  * Fixed - Issue for not saving zero value for margin.
92
 
screenshot-1.jpg CHANGED
Binary file
screenshot-2.jpg CHANGED
Binary file
screenshot-3.jpg CHANGED
Binary file
screenshot-4.jpg CHANGED
Binary file
screenshot-5.jpg DELETED
Binary file
screenshot-6.jpg DELETED
Binary file
screenshot-7.jpg DELETED
Binary file
shortcodes/Carousel_Slider_Deprecated_Shortcode.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ if( ! class_exists('Carousel_Slider_Deprecated_Shortcode') ):
8
+
9
+ class Carousel_Slider_Deprecated_Shortcode
10
+ {
11
+ private $plugin_path;
12
+
13
+ public function __construct( $plugin_path )
14
+ {
15
+ $this->plugin_path = $plugin_path;
16
+ // Deprecated since version 1.6.0
17
+ add_shortcode('carousel', array( $this, 'carousel' ) );
18
+ add_shortcode('item', array( $this, 'item' ) );
19
+ }
20
+
21
+ /**
22
+ * A shortcode for rendering the carousel slide.
23
+ *
24
+ * @param array $atts Shortcode attributes.
25
+ * @param string $content The text content for shortcode. Not used.
26
+ *
27
+ * @return string The shortcode output
28
+ */
29
+ public function carousel( $atts, $content = null )
30
+ {
31
+ extract(shortcode_atts(array(
32
+ 'id' => rand(1, 10),
33
+ 'items_desktop_large' => '4',
34
+ 'items' => '4',
35
+ 'items_desktop' => '4',
36
+ 'items_desktop_small' => '3',
37
+ 'items_tablet' => '2',
38
+ 'items_mobile' => '1',
39
+ 'auto_play' => 'true',
40
+ 'stop_on_hover' => 'true',
41
+ 'navigation' => 'true',
42
+ 'pagination' => 'false',
43
+ 'nav_color' => '#f1f1f1',
44
+ 'nav_active_color' => '#4caf50',
45
+ 'margin_right' => '10',
46
+ 'inifnity_loop' => 'true',
47
+ 'autoplay_timeout' => '5000',
48
+ 'autoplay_speed' => '500',
49
+ 'slide_by' => '1',
50
+ ), $atts ) );
51
+
52
+ ob_start();
53
+ require $this->plugin_path . '/templates/carousel.php';
54
+ $html = ob_get_contents();
55
+ ob_end_clean();
56
+
57
+ return $html;
58
+
59
+ }
60
+
61
+ /**
62
+ * A shortcode for rendering the carousel slide.
63
+ *
64
+ * @param array $attributes Shortcode attributes.
65
+ * @param string $content The text content for shortcode. Not used.
66
+ *
67
+ * @return string The shortcode output
68
+ */
69
+ public function item( $attributes, $content = null )
70
+ {
71
+ extract(shortcode_atts(array(
72
+ 'img_link' =>'',
73
+ 'href' =>'',
74
+ 'target' =>'_self',
75
+ ), $attributes ) );
76
+
77
+ if( ! $this->is_valid_url( $img_link ) ) return;
78
+
79
+ if ( $this->is_valid_url( $href ) ) {
80
+
81
+ return sprintf( '<div><a target="%3$s" href="%2$s"><img src="%1$s"></a></div>', esc_url( $img_link ), esc_url( $href ), $target );
82
+ } else {
83
+
84
+ return sprintf('<div><img src="%s"></div>', esc_url( $img_link ) );
85
+ }
86
+ }
87
+
88
+ /**
89
+ * Check if url is valid as per RFC 2396 Generic Syntax
90
+ *
91
+ * @param string $url
92
+ * @return boolean
93
+ */
94
+ private function is_valid_url( $url )
95
+ {
96
+ if ( filter_var( $url, FILTER_VALIDATE_URL ) ) {
97
+ return true;
98
+ }
99
+ return false;
100
+ }
101
+
102
+ /**
103
+ * Convert array to html attributes
104
+ *
105
+ * @param array $array
106
+ * @return string
107
+ */
108
+ private function array_to_data( array $array )
109
+ {
110
+ $array_map = array_map( function( $key, $value )
111
+ {
112
+ return sprintf( '%s="%s"', $key, esc_attr($value) );
113
+
114
+ }, array_keys($array), array_values( $array ) );
115
+
116
+ return join(" ", $array_map );
117
+ }
118
+ }
119
+
120
+ endif;
shortcodes/Carousel_Slider_Shortcode.php CHANGED
@@ -17,8 +17,6 @@ class Carousel_Slider_Shortcode
17
  $this->plugin_url = $plugin_url;
18
 
19
  add_shortcode('carousel_slide', array( $this, 'carousel_slide' ) );
20
- add_shortcode('carousel', array( $this, 'carousel' ) );
21
- add_shortcode('item', array( $this, 'item' ) );
22
  }
23
 
24
  /**
@@ -38,86 +36,43 @@ class Carousel_Slider_Shortcode
38
  )
39
  );
40
  if ( ! $id ) return;
41
- $images_ids = array_filter( explode( ',', get_post_meta( $id, '_wpdh_image_ids', true ) ) );
42
- if (count( $images_ids ) < 1 ) {
43
- return;
44
- }
45
 
46
- ob_start();
47
- require $this->plugin_path . '/templates/carousel_slide.php';
48
- $html = ob_get_contents();
49
- ob_end_clean();
50
-
51
- return $html;
52
- }
53
 
54
- /**
55
- * A shortcode for rendering the carousel slide.
56
- *
57
- * @param array $atts Shortcode attributes.
58
- * @param string $content The text content for shortcode. Not used.
59
- *
60
- * @return string The shortcode output
61
- */
62
- public function carousel( $atts, $content = null )
63
- {
64
- extract(shortcode_atts(array(
65
- 'id' => rand(1, 10),
66
- 'items' => '4',
67
- 'items_desktop' => '4',
68
- 'items_desktop_small' => '3',
69
- 'items_tablet' => '2',
70
- 'items_mobile' => '1',
71
- 'auto_play' => 'true',
72
- 'stop_on_hover' => 'true',
73
- 'navigation' => 'true',
74
- 'pagination' => 'false',
75
- 'nav_color' => '#f1f1f1',
76
- 'nav_active_color' => '#4caf50',
77
- 'margin_right' => '10',
78
- 'inifnity_loop' => 'true',
79
- 'autoplay_timeout' => '5000',
80
- 'autoplay_speed' => '500',
81
- 'slide_by' => '1',
82
- 'lazy_load_image' => 'true',
83
- ), $atts ) );
84
-
85
- ob_start();
86
- require $this->plugin_path . '/templates/carousel.php';
87
- $html = ob_get_contents();
88
- ob_end_clean();
89
-
90
- return $html;
91
- }
92
 
93
- /**
94
- * A shortcode for rendering the carousel slide.
95
- *
96
- * @param array $attributes Shortcode attributes.
97
- * @param string $content The text content for shortcode. Not used.
98
- *
99
- * @return string The shortcode output
100
- */
101
- public function item( $attributes, $content = null )
102
- {
103
- extract(shortcode_atts(array(
104
- 'img_link' => '',
105
- 'href' => '',
106
- 'lazy-load' => '',
107
- 'target' => '_self',
108
- ), $attributes ) );
109
-
110
- if ($this->is_valid_url($href) && $this->is_valid_url($img_link)) {
111
-
112
- return sprintf('<div><a target="%3$s" href="%2$s"><img class="owl-lazy" data-src="%1$s"></a></div>', $img_link, $href, $target);
113
- }
114
 
115
- if ( $this->is_valid_url($img_link) ) {
116
-
117
- return sprintf('<div><img class="owl-lazy" data-src="%1$s"></div>', $img_link);
118
- }
 
 
 
 
 
 
 
 
 
 
 
119
 
120
- return;
121
  }
122
 
123
  private function carousel_options( $id )
@@ -126,40 +81,48 @@ class Carousel_Slider_Shortcode
126
  'id' => 'id-' . $id,
127
  'class' => 'owl-carousel carousel-slider',
128
  // General
129
- 'data-margin' => $this->get_meta( $id, '_margin_right' ),
130
- 'data-slide-by' => $this->get_meta( $id, '_slide_by' ),
131
- 'data-loop' => $this->get_meta( $id, '_inifnity_loop' ),
132
- 'data-lazy-load' => $this->get_meta( $id, '_lazy_load_image' ),
 
133
  // Navigation
134
- 'data-nav' => $this->get_meta( $id, '_nav_button' ),
135
- 'data-dots' => $this->get_meta( $id, '_dot_nav' ),
 
 
 
136
  // Autoplay
137
- 'data-autoplay' => $this->get_meta( $id, '_autoplay' ),
138
- 'data-autoplay-timeout' => $this->get_meta( $id, '_autoplay_timeout' ),
139
- 'data-autoplay-speed' => $this->get_meta( $id, '_autoplay_speed' ),
140
- 'data-autoplay-hover-pause' => $this->get_meta( $id, '_autoplay_pause' ),
141
  // Responsive
142
- 'data-colums' => $this->get_meta( $id, '_items' ),
143
- 'data-colums-desktop' => $this->get_meta( $id, '_items' ),
144
- 'data-colums-small-desktop' => $this->get_meta( $id, '_items_small_desktop' ),
145
- 'data-colums-tablet' => $this->get_meta( $id, '_items_portrait_tablet' ),
146
- 'data-colums-small-tablet' => $this->get_meta( $id, '_items_small_portrait_tablet' ),
147
- 'data-colums-mobile' => $this->get_meta( $id, '_items_portrait_mobile' ),
148
  );
149
 
150
  return $this->array_to_data( $options_array );
151
  }
152
 
153
- public function get_meta($id, $key)
154
  {
155
  $meta = get_post_meta( $id, $key, true );
156
 
 
 
 
 
157
  if ($meta == 'zero') { $meta = '0'; }
158
  if ($meta == 'on') { $meta = 'true'; }
159
  if ($meta == 'off') { $meta = 'false'; }
160
  if ($key == '_margin_right' && $meta == 0) { $meta = '0'; }
161
 
162
- return $meta;
163
  }
164
 
165
  public function array_to_data( $array )
@@ -184,7 +147,7 @@ class Carousel_Slider_Shortcode
184
  return sprintf( '%s="%s"', $key, implode(" ", $value ) );
185
  }
186
 
187
- return sprintf( '%s="%s"', $key, $value );
188
 
189
  }, array_keys($array), array_values( $array ) );
190
 
@@ -206,6 +169,57 @@ class Carousel_Slider_Shortcode
206
 
207
  return false;
208
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  }
210
 
211
  endif;
17
  $this->plugin_url = $plugin_url;
18
 
19
  add_shortcode('carousel_slide', array( $this, 'carousel_slide' ) );
 
 
20
  }
21
 
22
  /**
36
  )
37
  );
38
  if ( ! $id ) return;
 
 
 
 
39
 
40
+ $slide_type = get_post_meta( $id, '_slide_type', true );
41
+ $slide_type = in_array($slide_type, array('image-carousel', 'post-carousel', 'image-carousel-url', 'video-carousel')) ? $slide_type : 'image-carousel';
 
 
 
 
 
42
 
43
+ if ($slide_type == 'post-carousel') {
44
+ ob_start();
45
+ require $this->plugin_path . '/templates/post-carousel.php';
46
+ $html = ob_get_contents();
47
+ ob_end_clean();
48
+ return apply_filters( 'carousel_slider_posts_carousel', $html, $id, $posts );
49
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
+ if ($slide_type == 'video-carousel') {
52
+ ob_start();
53
+ require $this->plugin_path . '/templates/video-carousel.php';
54
+ $html = ob_get_contents();
55
+ ob_end_clean();
56
+ return apply_filters( 'carousel_slider_videos_carousel', $html, $id );
57
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
+ if ($slide_type == 'image-carousel-url') {
60
+ ob_start();
61
+ require $this->plugin_path . '/templates/images-carousel-url.php';
62
+ $html = ob_get_contents();
63
+ ob_end_clean();
64
+ return apply_filters( 'carousel_slider_link_images_carousel', $html, $id );
65
+ }
66
+
67
+ if ($slide_type == 'image-carousel') {
68
+ ob_start();
69
+ require $this->plugin_path . '/templates/images-carousel.php';
70
+ $html = ob_get_contents();
71
+ ob_end_clean();
72
+ return apply_filters( 'carousel_slider_gallery_images_carousel', $html, $id );
73
+ }
74
 
75
+ return;
76
  }
77
 
78
  private function carousel_options( $id )
81
  'id' => 'id-' . $id,
82
  'class' => 'owl-carousel carousel-slider',
83
  // General
84
+ 'data-slide-type' => $this->get_meta( $id, '_slide_type', 'image-carousel' ),
85
+ 'data-margin' => $this->get_meta( $id, '_margin_right', '10' ),
86
+ 'data-slide-by' => $this->get_meta( $id, '_slide_by', '1' ),
87
+ 'data-loop' => $this->get_meta( $id, '_inifnity_loop', 'true' ),
88
+ 'data-lazy-load' => $this->get_meta( $id, '_lazy_load_image', 'false' ),
89
  // Navigation
90
+ 'data-nav' => $this->get_meta( $id, '_nav_button', 'false' ),
91
+ 'data-dots' => $this->get_meta( $id, '_dot_nav', 'false' ),
92
+ // Video
93
+ 'data-video-width' => $this->get_meta( $id, '_video_width', 'false' ),
94
+ 'data-video-height' => $this->get_meta( $id, '_video_height', 'false' ),
95
  // Autoplay
96
+ 'data-autoplay' => $this->get_meta( $id, '_autoplay', 'true' ),
97
+ 'data-autoplay-timeout' => $this->get_meta( $id, '_autoplay_timeout', '5000' ),
98
+ 'data-autoplay-speed' => $this->get_meta( $id, '_autoplay_speed', '500' ),
99
+ 'data-autoplay-hover-pause' => $this->get_meta( $id, '_autoplay_pause', 'false' ),
100
  // Responsive
101
+ 'data-colums' => $this->get_meta( $id, '_items', '4' ),
102
+ 'data-colums-desktop' => $this->get_meta( $id, '_items_desktop', '4' ),
103
+ 'data-colums-small-desktop' => $this->get_meta( $id, '_items_small_desktop', '4' ),
104
+ 'data-colums-tablet' => $this->get_meta( $id, '_items_portrait_tablet', '3' ),
105
+ 'data-colums-small-tablet' => $this->get_meta( $id, '_items_small_portrait_tablet', '2' ),
106
+ 'data-colums-mobile' => $this->get_meta( $id, '_items_portrait_mobile', '1' ),
107
  );
108
 
109
  return $this->array_to_data( $options_array );
110
  }
111
 
112
+ public function get_meta( $id, $key, $default = null )
113
  {
114
  $meta = get_post_meta( $id, $key, true );
115
 
116
+ if ( empty($meta) && $default ) {
117
+ $meta = $default;
118
+ }
119
+
120
  if ($meta == 'zero') { $meta = '0'; }
121
  if ($meta == 'on') { $meta = 'true'; }
122
  if ($meta == 'off') { $meta = 'false'; }
123
  if ($key == '_margin_right' && $meta == 0) { $meta = '0'; }
124
 
125
+ return esc_attr( $meta );
126
  }
127
 
128
  public function array_to_data( $array )
147
  return sprintf( '%s="%s"', $key, implode(" ", $value ) );
148
  }
149
 
150
+ return sprintf( '%s="%s"', $key, esc_attr( $value ) );
151
 
152
  }, array_keys($array), array_values( $array ) );
153
 
169
 
170
  return false;
171
  }
172
+
173
+ public function video_url( $url ) {
174
+ if( ! $this->is_valid_url( $url )){
175
+ return;
176
+ }
177
+
178
+ $url = esc_url( $url );
179
+
180
+ if (strpos($url, 'youtube.com') > 0) {
181
+ return '<div class="item-video"><a class="owl-video" href="'.$url.'"></a></div>';
182
+ }
183
+
184
+ if (strpos($url, 'vimeo.com') > 0) {
185
+ return '<div class="item-video"><a class="owl-video" href="'.$url.'"></a></div>';
186
+ }
187
+
188
+ return;
189
+ }
190
+
191
+ public function filter_posts( $posts )
192
+ {
193
+ if ( ! is_array( $posts ) ) {
194
+ return;
195
+ }
196
+ return array_map(function( $value ){
197
+
198
+ $category = get_the_category( $value->ID );
199
+ $category = (object) array(
200
+ 'link' => isset($category[0]->term_id) ? esc_url( get_category_link( $category[0]->term_id ) ) : '',
201
+ 'title' => isset($category[0]->name) ? esc_html( $category[0]->name ) : '',
202
+ );
203
+
204
+ return (object) array(
205
+ 'id' => $value->ID,
206
+ 'title' => esc_attr($value->post_title),
207
+ 'permalink' => esc_url( get_permalink( $value->ID ) ),
208
+ 'excerpt' => wp_trim_words(
209
+ strip_tags($value->post_content), '19', ' ...'
210
+ ),
211
+ 'thumbnail_id' => intval(get_post_thumbnail_id( $value->ID )),
212
+ 'category' => $category,
213
+ 'author' => (object) array(
214
+ 'id' => intval($value->post_author),
215
+ 'posts_url' => esc_url(get_author_posts_url(intval($value->post_author))),
216
+ 'display_name' => esc_html(get_the_author_meta( 'display_name', intval($value->post_author))),
217
+ ),
218
+ 'created' => strtotime($value->post_date),
219
+ 'modified' => strtotime($value->post_modified),
220
+ );
221
+ }, $posts);
222
+ }
223
  }
224
 
225
  endif;
shortcodes/index.php CHANGED
@@ -1,2 +1,2 @@
1
  <?php
2
- // Silence is golden
1
  <?php
2
+ // Code is Poetry
templates/admin/autoplay.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
+ <span class="shapla-toggle-title">
3
+ <?php _e('Autoplay Settings', 'carousel-slider'); ?>
4
+ </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+ <?php
8
+ $this->checkbox( array(
9
+ 'id' => '_autoplay',
10
+ 'name' => __('Autoplay', 'carousel-slider'),
11
+ 'label' => __('Autoplay.', 'carousel-slider'),
12
+ 'desc' => __('Check to enable autoplay', 'carousel-slider'),
13
+ 'std' => 'on'
14
+ ));
15
+ $this->number( array(
16
+ 'id' => '_autoplay_timeout',
17
+ 'name' => __('Autoplay Timeout', 'carousel-slider'),
18
+ 'desc' => __('Autoplay interval timeout in millisecond. Default: 5000', 'carousel-slider'),
19
+ 'std' => 5000
20
+ ));
21
+
22
+ $this->number( array(
23
+ 'id' => '_autoplay_speed',
24
+ 'name' => __('Autoplay Speed', 'carousel-slider'),
25
+ 'desc' => __('Autoplay speen in millisecond. Default: 500', 'carousel-slider'),
26
+ 'std' => 500
27
+ ));
28
+ $this->checkbox( array(
29
+ 'id' => '_autoplay_pause',
30
+ 'name' => __('Autoplay Hover Pause', 'carousel-slider'),
31
+ 'label' => __('Pause on mouse hover.', 'carousel-slider'),
32
+ 'desc' => __('Pause autoplay on mouse hover.', 'carousel-slider'),
33
+ ));
34
+ ?>
35
+ </div>
36
+ </div>
37
+ </div>
templates/admin/general.php ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
+ <span class="shapla-toggle-title">
3
+ <?php _e('General Settings', 'carousel-slider'); ?>
4
+ </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+ <?php
8
+ $this->text( array(
9
+ 'id' => '_slide_by',
10
+ 'name' => __('Slide By', 'carousel-slider'),
11
+ 'desc' => __('Navigation slide by x number. Write "page" with inverted comma to slide by page. Default value is 1.', 'carousel-slider'),
12
+ 'std' => 1
13
+ ));
14
+ $this->number( array(
15
+ 'id' => '_margin_right',
16
+ 'name' => __('Margin Right(px) on item.', 'carousel-slider'),
17
+ 'desc' => __('margin-right(px) on item. Default value is 10. Example: 20', 'carousel-slider'),
18
+ 'std' => 10
19
+ ));
20
+ $this->checkbox( array(
21
+ 'id' => '_inifnity_loop',
22
+ 'name' => __('Inifnity loop', 'carousel-slider'),
23
+ 'label' => __('Inifnity loop.', 'carousel-slider'),
24
+ 'desc' => __('Check to show inifnity loop. Duplicate last and first items to get loop illusion', 'carousel-slider'),
25
+ 'std' => 'on'
26
+ ));
27
+ $this->checkbox(array(
28
+ 'id' => '_lazy_load_image',
29
+ 'name' => __('Lazy load image', 'carousel-slider'),
30
+ 'label' => __('Lazy load image.', 'carousel-slider'),
31
+ 'desc' => __('Check to enable image lazy load.', 'carousel-slider'),
32
+ 'std' => 'off'
33
+ ));
34
+ $this->checkbox(array(
35
+ 'id' => '_show_attachment_title',
36
+ 'name' => __('Show Image Title', 'carousel-slider'),
37
+ 'label' => __('Show Image Title', 'carousel-slider'),
38
+ 'desc' => __('Check to show title below image. Only works with image carousel.', 'carousel-slider'),
39
+ 'std' => 'off'
40
+ ));
41
+ $this->checkbox(array(
42
+ 'id' => '_show_attachment_caption',
43
+ 'name' => __('Show Image Caption', 'carousel-slider'),
44
+ 'label' => __('Show Image Caption', 'carousel-slider'),
45
+ 'desc' => __('Check to show caption below image. Only works with image carousel.', 'carousel-slider'),
46
+ 'std' => 'off'
47
+ ));
48
+ $this->image_sizes(array(
49
+ 'id' => __('_image_size', 'carousel-slider'),
50
+ 'name' => __('Carousel Image size', 'carousel-slider'),
51
+ 'desc' => sprintf(__( 'Select "original uploaded image" for full size image or your desired image size for carousel image. You can change the default size for thumbnail, medium and large from %1$s Settings >> Media %2$s.', 'carousel-slider' ),'<a target="_blank" href="'.get_admin_url().'options-media.php">','</a>'),
52
+ ));
53
+ ?>
54
+ </div>
55
+ </div>
56
+ </div>
templates/admin/images-carousel-url.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $_images_urls = get_post_meta( $post->ID, '_images_urls', true );
3
+ $btn_text = $_images_urls ? 'Edit URLs' : 'Add URLs';
4
+ ?>
5
+ <div data-id="open" id="section_url_images_settings" class="shapla-toggle shapla-toggle--stroke" style="display: <?php echo $slide_type != 'image-carousel-url' ? 'none' : 'block'; ?>">
6
+ <span class="shapla-toggle-title">
7
+ <?php _e('URL Images Settings', 'carousel-slider'); ?>
8
+ </span>
9
+ <div class="shapla-toggle-inner">
10
+ <div class="shapla-toggle-content">
11
+ <?php
12
+ $this->images_url( array(
13
+ 'id' => '_images_urls',
14
+ 'name' => __('Images URLs', 'carousel-slider'),
15
+ 'desc' => __('Enter external images URLs.', 'carousel-slider'),
16
+ ) );
17
+ ?>
18
+ </div>
19
+ </div>
20
+ </div>
21
+
22
+ <!-- The Modal -->
23
+ <div id="CarouselSliderModal" class="carousel_slider-modal">
24
+
25
+ <!-- Modal content -->
26
+ <div class="carousel_slider-modal-content">
27
+ <div class="carousel_slider-modal-header">
28
+ <span class="carousel_slider-close">&times;</span>
29
+ <?php _e('Image Carousel - from URL', 'carousel-slider'); ?>
30
+ </div>
31
+ <div class="carousel_slider-modal-body">
32
+ <div id="carousel_slider_form" class="carousel_slider-form">
33
+ <?php if ( is_array($_images_urls)): foreach ($_images_urls as $image ): ?>
34
+ <div class="carousel_slider-fields">
35
+ <label class="setting">
36
+ <span class="name"><?php _e('URL', 'carousel-slider'); ?></span>
37
+ <input type="url" name="_images_urls[url][]" value="<?php echo $image['url']; ?>" autocomplete="off">
38
+ </label>
39
+ <label class="setting">
40
+ <span class="name"><?php _e('Title', 'carousel-slider'); ?></span>
41
+ <input type="text" name="_images_urls[title][]" value="<?php echo $image['title']; ?>" autocomplete="off">
42
+ </label>
43
+ <label class="setting">
44
+ <span class="name"><?php _e('Caption', 'carousel-slider'); ?></span>
45
+ <textarea name="_images_urls[caption][]"><?php echo $image['caption']; ?></textarea>
46
+ </label>
47
+ <label class="setting">
48
+ <span class="name"><?php _e('Alt Text', 'carousel-slider'); ?></span>
49
+ <input type="text" name="_images_urls[alt][]" value="<?php echo $image['alt']; ?>" autocomplete="off">
50
+ </label>
51
+ <label class="setting">
52
+ <span class="name"><?php _e('Link To URL', 'carousel-slider'); ?></span>
53
+ <input type="text" name="_images_urls[link_url][]" value="<?php echo $image['link_url']; ?>" autocomplete="off">
54
+ </label>
55
+ <div class="actions">
56
+ <span><span class="dashicons dashicons-move"></span></span>
57
+ <span class="add_row"><span class="dashicons dashicons-plus-alt"></span></span>
58
+ <span class="delete_row"><span class="dashicons dashicons-trash"></span></span>
59
+ </div>
60
+ </div>
61
+ <?php endforeach; else: ?>
62
+ <div class="carousel_slider-fields">
63
+ <label class="setting">
64
+ <span class="name"><?php _e('URL', 'carousel-slider'); ?></span>
65
+ <input type="url" name="_images_urls[url][]" value="">
66
+ </label>
67
+ <label class="setting">
68
+ <span class="name"><?php _e('Title', 'carousel-slider'); ?></span>
69
+ <input type="text" name="_images_urls[title][]" value="">
70
+ </label>
71
+ <label class="setting">
72
+ <span class="name"><?php _e('Caption', 'carousel-slider'); ?></span>
73
+ <textarea name="_images_urls[caption][]"></textarea>
74
+ </label>
75
+ <label class="setting">
76
+ <span class="name"><?php _e('Alt Text', 'carousel-slider'); ?></span>
77
+ <input type="text" name="_images_urls[alt][]" value="">
78
+ </label>
79
+ <label class="setting">
80
+ <span class="name"><?php _e('Link To URL', 'carousel-slider'); ?></span>
81
+ <input type="text" name="_images_urls[link_url][]" value="">
82
+ </label>
83
+ <div class="actions">
84
+ <span><span class="dashicons dashicons-move"></span></span>
85
+ <span class="add_row"><span class="dashicons dashicons-plus-alt"></span></span>
86
+ <span class="delete_row"><span class="dashicons dashicons-trash"></span></span>
87
+ </div>
88
+ </div>
89
+ <?php endif; ?>
90
+ </div>
91
+ </div>
92
+ <div class="carousel_slider-modal-footer">
93
+ <button class="button button-primary" id="save_carousel_images_urls">
94
+ <?php _e('Save', 'carousel-slider'); ?>
95
+ </button>
96
+ </div>
97
+ </div>
98
+
99
+ </div>
templates/admin/images.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div data-id="open" id="section_images_settings" class="shapla-toggle shapla-toggle--stroke" style="display: <?php echo $slide_type != 'image-carousel' ? 'none' : 'block'; ?>">
2
+ <span class="shapla-toggle-title">
3
+ <?php _e('Media Images Settings', 'carousel-slider'); ?>
4
+ </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+ <?php
8
+ $this->images_gallery(array(
9
+ 'id' => '_wpdh_image_ids',
10
+ 'name' => __('Carousel Images', 'carousel-slider'),
11
+ 'desc' => __('Choose carousel images from media library.', 'carousel-slider'),
12
+ ));
13
+ ?>
14
+ </div>
15
+ </div>
16
+ </div>
templates/admin/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
templates/admin/navigation.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
+ <span class="shapla-toggle-title">
3
+ <?php _e('Navigation Settings', 'carousel-slider'); ?>
4
+ </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+ <?php
8
+ $this->checkbox(array(
9
+ 'id' => '_nav_button',
10
+ 'name' => __('Navigation', 'carousel-slider'),
11
+ 'label' => __('Navigation', 'carousel-slider'),
12
+ 'desc' => __('Check to show next/prev icons.', 'carousel-slider'),
13
+ ));
14
+ $this->checkbox(array(
15
+ 'id' => '_dot_nav',
16
+ 'name' => __('Dots', 'carousel-slider'),
17
+ 'label' => __('Dots', 'carousel-slider'),
18
+ 'desc' => __('Check to show dots navigation.', 'carousel-slider'),
19
+ ));
20
+ $this->color(array(
21
+ 'id' => '_nav_color',
22
+ 'type' => 'color',
23
+ 'name' => __('Navigation & Dots Color ', 'carousel-slider'),
24
+ 'desc' => __('Pick a color for navigation and dots.', 'carousel-slider'),
25
+ 'std' => '#f1f1f1'
26
+ ));
27
+ $this->color(array(
28
+ 'id' => '_nav_active_color',
29
+ 'name' => __('Navigation & Dots Color: Hover & Active', 'carousel-slider'),
30
+ 'desc' => __('Pick a color for navigation and dots for active and hover effect.', 'carousel-slider'),
31
+ 'std' => '#4caf50'
32
+ ));
33
+ ?>
34
+ </div>
35
+ </div>
36
+ </div>
templates/admin/post-carousel.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div data-id="open" id="section_post_query" class="shapla-toggle shapla-toggle--stroke" style="display: <?php echo $slide_type != 'post-carousel' ? 'none' : 'block'; ?>">
2
+ <span class="shapla-toggle-title">
3
+ <?php _e('Post Query', 'carousel-slider'); ?>
4
+ </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+ <?php
8
+ $this->select(array(
9
+ 'id' => '_post_order',
10
+ 'name' => __('Order', 'carousel-slider'),
11
+ 'std' => 'DESC',
12
+ 'options' => array(
13
+ 'ASC' => __('Ascending Order', 'carousel-slider'),
14
+ 'DESC' => __('Descending Order', 'carousel-slider'),
15
+ ),
16
+ ));
17
+ $this->select(array(
18
+ 'id' => '_post_orderby',
19
+ 'name' => __('Order by', 'carousel-slider'),
20
+ 'std' => 'ID',
21
+ 'options' => array(
22
+ 'none' => __('No order', 'carousel-slider'),
23
+ 'ID' => __('Post id', 'carousel-slider'),
24
+ 'author' => __('Post author', 'carousel-slider'),
25
+ 'title' => __('Post title', 'carousel-slider'),
26
+ 'modified' => __('Last modified date', 'carousel-slider'),
27
+ 'rand' => __('Random order', 'carousel-slider'),
28
+ 'comment_count' => __('Number of comments', 'carousel-slider'),
29
+ ),
30
+ ));
31
+ $this->date(array(
32
+ 'id' => '_post_date_after',
33
+ 'name' => __('Date from', 'carousel-slider'),
34
+ 'desc' => sprintf(__('Example: %s', 'carousel-slider'), date('F d, Y', strtotime('-3 months'))),
35
+ ));
36
+ $this->date(array(
37
+ 'id' => '_post_date_before',
38
+ 'name' => __('Date to', 'carousel-slider'),
39
+ 'desc' => sprintf(__('Example: %s', 'carousel-slider'), date('F d, Y', strtotime('-7 days'))),
40
+ ));
41
+ $this->number(array(
42
+ 'id' => '_posts_per_page',
43
+ 'name' => __('Posts per page', 'carousel-slider'),
44
+ 'std' => 12,
45
+ 'desc' => __('How many post you want to show on carousel slide', 'carousel-slider'),
46
+ ));
47
+ $this->posts_list(array(
48
+ 'id' => '_post_in',
49
+ 'multiple' => true,
50
+ 'name' => __('Specific posts', 'carousel-slider'),
51
+ 'desc' => __('Select posts that you want to show as slider.', 'carousel-slider'),
52
+ ));
53
+ $this->number(array(
54
+ 'id' => '_post_height',
55
+ 'name' => __('Colums Height', 'carousel-slider'),
56
+ 'std' => 450,
57
+ 'desc' => __('Enter colums height for posts carousel in numbers. 450 (px) is perfect when columns width is around 300px or higher. Otherwise you need to change it for perfection.', 'carousel-slider'),
58
+ ));
59
+ ?>
60
+ </div>
61
+ </div>
62
+ </div>
templates/admin/responsive.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div data-id="open" class="shapla-toggle shapla-toggle--stroke">
2
+ <span class="shapla-toggle-title">
3
+ <?php _e('Responsive Settings', 'carousel-slider'); ?>
4
+ </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+ <?php
8
+ $this->number(array(
9
+ 'id' => '_items',
10
+ 'type' => 'number',
11
+ 'name' => __('Colums', 'carousel-slider'),
12
+ 'desc' => __('The number of items you want to see on the Extra Large Desktop Layout (Screens size greater than 1921 pixels DP)', 'carousel-slider'),
13
+ 'std' => 4
14
+ ));
15
+ $this->number(array(
16
+ 'id' => '_items_desktop',
17
+ 'type' => 'number',
18
+ 'name' => __('Colums : Desktop', 'carousel-slider'),
19
+ 'desc' => __('The number of items you want to see on the Desktop Layout (Screens size from 1200 pixels DP to 1920 pixels DP)', 'carousel-slider'),
20
+ 'std' => 4
21
+ ));
22
+ $this->number(array(
23
+ 'id' => '_items_small_desktop',
24
+ 'type' => 'number',
25
+ 'name' => __('Colums : Small Desktop', 'carousel-slider'),
26
+ 'desc' => __('The number of items you want to see on the Small Desktop Layout (Screens size from 993 pixels DP to 1199 pixels DP)', 'carousel-slider'),
27
+ 'std' => 4
28
+ ));
29
+ $this->number(array(
30
+ 'id' => '_items_portrait_tablet',
31
+ 'name' => __('Colums : Tablet', 'carousel-slider'),
32
+ 'desc' => __('The number of items you want to see on the Tablet Layout (Screens size from 768 pixels DP to 992 pixels DP)', 'carousel-slider'),
33
+ 'std' => 3
34
+ ));
35
+ $this->number(array(
36
+ 'id' => '_items_small_portrait_tablet',
37
+ 'name' => __('Colums : Small Tablet', 'carousel-slider'),
38
+ 'desc' => __('The number of items you want to see on the Small Tablet Layout(Screens size from 600 pixels DP to 767 pixels DP)', 'carousel-slider'),
39
+ 'std' => 2
40
+ ));
41
+ $this->number(array(
42
+ 'id' => '_items_portrait_mobile',
43
+ 'name' => __('Colums : Mobile', 'carousel-slider'),
44
+ 'desc' => __('The number of items you want to see on the Mobile Layout (Screens size from 320 pixels DP to 599 pixels DP)', 'carousel-slider'),
45
+ 'std' => 1
46
+ ));
47
+ ?>
48
+ </div>
49
+ </div>
50
+ </div>
templates/admin/types.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="sp-input-group" style="margin: 10px 0 30px;">
2
+ <div class="sp-input-label">
3
+ <label for="_carousel_slider_slide_type">
4
+ <?php _e('Slide Type', 'carousel-slider'); ?>
5
+ </label>
6
+ </div>
7
+ <div class="sp-input-field">
8
+ <select name="carousel_slider[_slide_type]" id="_carousel_slider_slide_type" class="sp-input-text">
9
+ <option value="image-carousel" <?php echo $slide_type == 'image-carousel' ? 'selected': ''; ?>>
10
+ <?php _e('Image Carousel - from Media Library', 'carousel-slider'); ?>
11
+ </option>
12
+ <option value="image-carousel-url" <?php echo $slide_type == 'image-carousel-url' ? 'selected': ''; ?>>
13
+ <?php _e('Image Carousel - from URL', 'carousel-slider'); ?>
14
+ </option>
15
+ <option value="post-carousel" <?php echo $slide_type == 'post-carousel' ? 'selected': ''; ?>>
16
+ <?php _e('Post Carousel', 'carousel-slider'); ?>
17
+ </option>
18
+ <option value="video-carousel"<?php echo $slide_type == 'video-carousel' ? 'selected': ''; ?>>
19
+ <?php _e('Video Carousel', 'carousel-slider'); ?>
20
+ </option>
21
+ <option value="product-carousel" disabled>
22
+ <?php _e('WooCommerce Product Carousel', 'carousel-slider'); ?>
23
+ </option>
24
+ </select>
25
+ </div>
26
+ </div>
templates/admin/video-carousel.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div data-id="open" id="section_video_settings" class="shapla-toggle shapla-toggle--stroke" style="display: <?php echo $slide_type != 'video-carousel' ? 'none' : 'block'; ?>">
2
+ <span class="shapla-toggle-title">
3
+ <?php _e('Video Settings', 'carousel-slider'); ?>
4
+ </span>
5
+ <div class="shapla-toggle-inner">
6
+ <div class="shapla-toggle-content">
7
+ <?php
8
+ $this->textarea(array(
9
+ 'id' => '_video_url',
10
+ 'name' => __('Video URLs', 'carousel-slider'),
11
+ 'desc' => sprintf('%s<br><br>Example: %s', __('Only support youtube and vimeo. Enter video URL from youtube or vimeo separating each by comma', 'carousel-slider'), __('https://www.youtube.com/watch?v=O4-EM32h7b4,https://www.youtube.com/watch?v=72IO4gzB8mU,https://vimeo.com/193773669,https://vimeo.com/193517656', 'carousel-slider')),
12
+ ));
13
+ $this->number(array(
14
+ 'id' => '_video_width',
15
+ 'name' => __('Video Width', 'carousel-slider'),
16
+ 'std' => 560,
17
+ 'desc' => __('Enter video width in numbers.', 'carousel-slider'),
18
+ ));
19
+ $this->number(array(
20
+ 'id' => '_video_height',
21
+ 'name' => __('Video Height', 'carousel-slider'),
22
+ 'std' => 315,
23
+ 'desc' => __('Enter video height in numbers.', 'carousel-slider'),
24
+ ));
25
+ ?>
26
+ </div>
27
+ </div>
28
+ </div>
templates/carousel.php CHANGED
@@ -1,29 +1,37 @@
1
  <?php
 
 
 
 
 
2
  $options_array = array(
3
  'id' => 'id-' . $id,
4
  'class' => 'owl-carousel carousel-slider',
5
  // General
 
6
  'data-margin' => $margin_right,
7
  'data-slide-by' => $slide_by,
8
  'data-loop' => $inifnity_loop,
9
- 'data-lazy-load' => $lazy_load_image,
10
  // Navigation
11
  'data-nav' => $navigation,
12
  'data-dots' => $pagination,
 
 
 
13
  // Autoplay
14
  'data-autoplay' => $auto_play,
15
  'data-autoplay-timeout' => $autoplay_timeout,
16
  'data-autoplay-speed' => $autoplay_speed,
17
  'data-autoplay-hover-pause' => $stop_on_hover,
18
  // Responsive
19
- 'data-colums' => $items,
20
  'data-colums-desktop' => $items,
21
  'data-colums-small-desktop' => $items_desktop,
22
  'data-colums-tablet' => $items_desktop_small,
23
  'data-colums-small-tablet' => $items_tablet,
24
  'data-colums-mobile' => $items_mobile,
25
  );
26
- $data_attr = join(" ", $this->array_to_data( $options_array ));
27
  ?>
28
  <style>
29
  #id-<?php echo $id; ?> .owl-nav [class*='owl-'],
@@ -36,6 +44,6 @@ $data_attr = join(" ", $this->array_to_data( $options_array ));
36
  background-color: <?php echo $nav_active_color; ?>
37
  }
38
  </style>
39
- <div <?php echo $data_attr; ?>>
40
  <?php echo do_shortcode($content); ?>
41
  </div><!-- .carousel-slider -->
1
  <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
  $options_array = array(
8
  'id' => 'id-' . $id,
9
  'class' => 'owl-carousel carousel-slider',
10
  // General
11
+ 'data-slide-type' => 'image-carousel-url',
12
  'data-margin' => $margin_right,
13
  'data-slide-by' => $slide_by,
14
  'data-loop' => $inifnity_loop,
15
+ 'data-lazy-load' => 'false',
16
  // Navigation
17
  'data-nav' => $navigation,
18
  'data-dots' => $pagination,
19
+ // Video
20
+ 'data-video-width' => 'false',
21
+ 'data-video-height' => 'false',
22
  // Autoplay
23
  'data-autoplay' => $auto_play,
24
  'data-autoplay-timeout' => $autoplay_timeout,
25
  'data-autoplay-speed' => $autoplay_speed,
26
  'data-autoplay-hover-pause' => $stop_on_hover,
27
  // Responsive
28
+ 'data-colums' => $items_desktop_large,
29
  'data-colums-desktop' => $items,
30
  'data-colums-small-desktop' => $items_desktop,
31
  'data-colums-tablet' => $items_desktop_small,
32
  'data-colums-small-tablet' => $items_tablet,
33
  'data-colums-mobile' => $items_mobile,
34
  );
 
35
  ?>
36
  <style>
37
  #id-<?php echo $id; ?> .owl-nav [class*='owl-'],
44
  background-color: <?php echo $nav_active_color; ?>
45
  }
46
  </style>
47
+ <div <?php echo $this->array_to_data( $options_array ); ?>>
48
  <?php echo do_shortcode($content); ?>
49
  </div><!-- .carousel-slider -->
templates/documentation.php CHANGED
@@ -1,160 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="wrap">
2
  <h1 class="wp-heading"><?php _e('Carousel Slider Documentation', 'carousel-slider' ); ?></h1>
3
  <div id="poststuff">
4
  <div id="post-body" class="metabox-holder columns-2">
5
  <div id="post-body-content">
6
-
7
- <div class="postbox ">
8
- <button type="button" class="handlediv button-link" aria-expanded="true">
9
- <span class="screen-reader-text">Toggle panel: Video Instruction</span>
10
- <span class="toggle-indicator" aria-hidden="true"></span>
11
- </button>
12
- <h2 class="hndle ui-sortable-handle"><span>Video Instruction</span></h2>
13
  <div class="inside">
14
- <div style="position: relative; padding-bottom: 56.25%; padding-top: 25px; height: 0;">
15
- <iframe
16
- style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"
17
- width="1280"
18
- height="720"
19
- src="https://www.youtube.com/embed/O4-EM32h7b4?list=PL9GiQPpTzMv5ftsvX55JO_lTDcKrwCPVn"
20
- frameborder="0"
21
- allowfullscreen
22
- ></iframe>
23
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  </div>
25
  </div>
26
-
27
  </div><!-- #post-body-content -->
28
 
29
  <div id="postbox-container-1" class="postbox-container">
30
-
31
  <div class="postbox ">
32
  <div class="inside">
33
  <p><strong>If you like this plugin or if you make money using this or if you want to help me to continue my contribution on open source projects, consider to make a small donation.</strong></p>
34
  <p style="text-align: center;"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3LZWQTHEVYWCY" target="_blank"><img alt="PayPal Donate" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"></a></p>
35
  </div>
36
  </div>
37
-
38
- <div class="postbox ">
39
- <h2 class="hndle"><span>Example 1 - linking image</span></h2>
40
- <div class="inside">
41
- <pre style="overflow: auto;"><code>[carousel][item img_link='http://lorempixel.com/400/400/city/1/'][item img_link='http://lorempixel.com/400/400/city/2/'][item img_link='http://lorempixel.com/400/400/city/3/'][item img_link='http://lorempixel.com/400/400/city/4/'][item img_link='http://lorempixel.com/400/400/city/5/'][item img_link='http://lorempixel.com/400/400/city/6/'][item img_link='http://lorempixel.com/400/400/city/7/'][item img_link='http://lorempixel.com/400/400/city/8/'][item img_link='http://lorempixel.com/400/400/city/9/'][item img_link='http://lorempixel.com/400/400/city/10/'][/carousel]</code></pre>
42
- </div>
43
- </div>
44
-
45
- <div class="postbox">
46
- <h2 class="hndle"><span>Example 2 - linking image</span></h2>
47
- <div class="inside">
48
- <pre style="overflow: auto;"><code>[carousel id='myCustomId' items='3' items_desktop='3' margin_right='5' navigation='false'][item img_link='http://lorempixel.com/400/400/city/1/'][item img_link='http://lorempixel.com/400/400/city/2/'][item img_link='http://lorempixel.com/400/400/city/3/'][item img_link='http://lorempixel.com/400/400/city/4/'][item img_link='http://lorempixel.com/400/400/city/5/'][item img_link='http://lorempixel.com/400/400/city/6/'][item img_link='http://lorempixel.com/400/400/city/7/'][item img_link='http://lorempixel.com/400/400/city/8/'][item img_link='http://lorempixel.com/400/400/city/9/'][item img_link='http://lorempixel.com/400/400/city/10/'][/carousel]</code></pre>
49
- </div>
50
- </div>
51
-
52
  </div><!-- #postbox-container-1 -->
53
- <div id="postbox-container-2" class="postbox-container">
54
- <div class="postbox ">
55
- <h2 class="hndle"><span>Usage - linking image</span></h2>
56
- <div class="inside">
57
- <p>Without using custom post (Carousels admin menu), you can use custom shortcode to link image and generate carousel slider.</p>
58
- <p>To gererate carousel slider using shortcode, at first write wrapper shortcode as following:</p>
59
- <pre><code>[carousel][/carousel]</code></pre>
60
- <p>Now write the following shortcode inside the wrapper shortcode as many image as you want.</p>
61
- <pre><code>[item img_link=""]</code></pre>
62
- <p>You can add following attribute if you want to link image to custom post, page, image, etc. Like as following</p>
63
- <pre><code>[item img_link="IMAGE_URL_GOES_HERE" href="CUSTOM_URL_GOES_HERE"]</code></pre>
64
- <P>The whole shortcode look likes as following: (See example shortcode.)</P>
65
- <pre style="overflow: auto;"><code>[carousel][item img_link="IMAGE_URL_GOES_HERE"][item img_link="IMAGE_URL_GOES_HERE" href="CUSTOM_URL_GOES_HERE"][item img_link="IMAGE_URL_GOES_HERE"][/carousel]</code></pre>
66
- <h2>Shortcode Attributes</h2>
67
- <p>You can use shortcode attributes to change default functionality. These attributes need to place inside wrapper shortcode. The available shortcode attributes are as following:</p>
68
- <table class="form-table doc-table">
69
- <tr>
70
- <th scope="row">Attribute</th>
71
- <th>Default Value</th>
72
- <th>Usage</th>
73
- </tr>
74
- <tr>
75
- <th scope="row">id=''</th>
76
- <td>Random Number.</td>
77
- <td>Add id if you want to use multiple carousel at same page. If you leave it blank, it will generate random number.</td>
78
- </tr>
79
- <tr>
80
- <th scope="row">items=''</th>
81
- <td>4</td>
82
- <td>To set the maximum amount of items displayed at a time with the widest browser width (window >= 1200)</td>
83
- </tr>
84
- <tr>
85
- <th scope="row">items_desktop=''</th>
86
- <td>4</td>
87
- <td>This allows you to preset the number of slides visible with (window >= 980) browser width.</td>
88
- </tr>
89
- <tr>
90
- <th scope="row">items_desktop_small=''</th>
91
- <td>3</td>
92
- <td>This allows you to preset the number of slides visible with (window >= 768) browser width.</td>
93
- </tr>
94
- <tr>
95
- <th scope="row">items_tablet=''</th>
96
- <td>2</td>
97
- <td>This allows you to preset the number of slides visible with (window >= 600) browser width.</td>
98
- </tr>
99
- <tr>
100
- <th scope="row">items_mobile=''</th>
101
- <td>1</td>
102
- <td>This allows you to preset the number of slides visible with (window >= 320) browser width.</td>
103
- </tr>
104
- <tr>
105
- <th scope="row">auto_play=''</th>
106
- <td>true</td>
107
- <td>Write true to enable autoplay else write false.</td>
108
- </tr>
109
- <tr>
110
- <th scope="row">stop_on_hover=''</th>
111
- <td>true</td>
112
- <td>Write true pause autoplay on mouse hover else write false.</td>
113
- </tr>
114
- <tr>
115
- <th scope="row">navigation=''</th>
116
- <td>true</td>
117
- <td>Write false to hide "next" and "previous" buttons.</td>
118
- </tr>
119
- <tr>
120
- <th scope="row">nav_color=''</th>
121
- <td>#d6d6d6</td>
122
- <td>Enter hex value of color for carousel navigation.</td>
123
- </tr>
124
- <tr>
125
- <th scope="row">nav_active_color=''</th>
126
- <td>#4dc7a0</td>
127
- <td>Enter hex value of color for carousel navigation on mouse hover.</td>
128
- </tr>
129
- <tr>
130
- <th scope="row">margin_right=''</th>
131
- <td>10</td>
132
- <td>margin-right(px) on item. Default value is 10. Example: 20</td>
133
- </tr>
134
- <tr>
135
- <th scope="row">inifnity_loop=''</th>
136
- <td>true</td>
137
- <td>Write true to show inifnity loop. Duplicate last and first items to get loop illusion</td>
138
- </tr>
139
- <tr>
140
- <th scope="row">autoplay_timeout=''</th>
141
- <td>5000</td>
142
- <td>Autoplay interval timeout in millisecond. Default: 5000</td>
143
- </tr>
144
- <tr>
145
- <th scope="row">autoplay_speed=''</th>
146
- <td>500</td>
147
- <td>Autoplay speen in millisecond. Default: 500</td>
148
- </tr>
149
- <tr>
150
- <th scope="row">slide_by=''</th>
151
- <td>1</td>
152
- <td>Navigation slide by x number. Default value is 1.</td>
153
- </tr>
154
- </table>
155
- </div>
156
- </div>
157
- </div><!-- #postbox-container-2 -->
158
 
159
  </div><!-- #post-body -->
160
  </div><!-- #poststuff -->
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+ ?>
7
+ <style type="text/css">
8
+ .iframe_wrapper {
9
+ position: relative;
10
+ padding-bottom: 56.25%; /* height / width * 100 */
11
+ padding-top: 25px;
12
+ height: 0;
13
+ }
14
+ .iframe_wrapper > iframe {
15
+ position: absolute;
16
+ top: 0;
17
+ left: 0;
18
+ width: 100%;
19
+ height: 100%;
20
+ }
21
+ </style>
22
  <div class="wrap">
23
  <h1 class="wp-heading"><?php _e('Carousel Slider Documentation', 'carousel-slider' ); ?></h1>
24
  <div id="poststuff">
25
  <div id="post-body" class="metabox-holder columns-2">
26
  <div id="post-body-content">
27
+ <div class="postbox">
 
 
 
 
 
 
28
  <div class="inside">
29
+ <table class="form-table">
30
+ <tr>
31
+ <th scope="row">
32
+ <label>Images Carousel</label>
33
+ <p class="description">Image carousel using gallery images</p>
34
+ </th>
35
+ <td>
36
+ <div class="iframe_wrapper">
37
+ <iframe width="1280" height="720" src="https://www.youtube.com/embed/ZzI1JhElrxc" frameborder="0" allowfullscreen></iframe>
38
+ </div>
39
+ </td>
40
+ </tr>
41
+ <tr>
42
+ <th scope="row">
43
+ <label>Images Carousel</label>
44
+ <p class="description">Image carousel using custom URLs</p>
45
+ </th>
46
+ <td>
47
+ <div class="iframe_wrapper">
48
+ <iframe width="1280" height="720" src="https://www.youtube.com/embed/a7hqn1yNzwM" frameborder="0" allowfullscreen></iframe>
49
+ </div>
50
+ </td>
51
+ </tr>
52
+ <tr>
53
+ <th scope="row">
54
+ <label>Posts Carousel</label>
55
+ </th>
56
+ <td>
57
+ <div class="iframe_wrapper">
58
+ <iframe width="1280" height="720" src="https://www.youtube.com/embed/ImJB946azy0" frameborder="0" allowfullscreen></iframe>
59
+ </div>
60
+ </td>
61
+ </tr>
62
+ <tr>
63
+ <th scope="row">
64
+ <label>In Widget Areas</label>
65
+ </th>
66
+ <td>
67
+ <div class="iframe_wrapper">
68
+ <iframe width="1280" height="720" src="https://www.youtube.com/embed/kYgp6wp27lM" frameborder="0" allowfullscreen></iframe>
69
+ </div>
70
+ </td>
71
+ </tr>
72
+ <tr>
73
+ <th scope="row">
74
+ <label>With Page Builder by SiteOrigin</label>
75
+ </th>
76
+ <td>
77
+ <div class="iframe_wrapper">
78
+ <iframe width="1280" height="720" src="https://www.youtube.com/embed/-OaYQZfr1RM" frameborder="0" allowfullscreen></iframe>
79
+ </div>
80
+ </td>
81
+ </tr>
82
+ <tr>
83
+ <th scope="row">
84
+ <label>With WPBakery Visual Composer</label>
85
+ </th>
86
+ <td>
87
+ <div class="iframe_wrapper">
88
+ <iframe width="1280" height="720" src="https://www.youtube.com/embed/4LhDXH81whk" frameborder="0" allowfullscreen></iframe>
89
+ </div>
90
+ </td>
91
+ </tr>
92
+ </table>
93
  </div>
94
  </div>
 
95
  </div><!-- #post-body-content -->
96
 
97
  <div id="postbox-container-1" class="postbox-container">
 
98
  <div class="postbox ">
99
  <div class="inside">
100
  <p><strong>If you like this plugin or if you make money using this or if you want to help me to continue my contribution on open source projects, consider to make a small donation.</strong></p>
101
  <p style="text-align: center;"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3LZWQTHEVYWCY" target="_blank"><img alt="PayPal Donate" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif"></a></p>
102
  </div>
103
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  </div><!-- #postbox-container-1 -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
 
106
  </div><!-- #post-body -->
107
  </div><!-- #poststuff -->
templates/images-carousel-url.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ // $_image_size = get_post_meta( $id, '_image_size', true );
8
+ $_nav_color = get_post_meta( $id, '_nav_color', true );
9
+ $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
10
+ $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
11
+ $_show_attachment_title = get_post_meta( $id, '_show_attachment_title', true );
12
+ $_show_attachment_caption = get_post_meta( $id, '_show_attachment_caption', true );
13
+ $_images_urls = get_post_meta( $id, '_images_urls', true );
14
+ ?>
15
+ <style>
16
+ #id-<?php echo $id; ?> .owl-nav [class*='owl-'],
17
+ #id-<?php echo $id; ?> .owl-dots .owl-dot span {
18
+ background-color: <?php echo $_nav_color; ?>
19
+ }
20
+ #id-<?php echo $id; ?> .owl-nav [class*='owl-']:hover,
21
+ #id-<?php echo $id; ?> .owl-dots .owl-dot.active span,
22
+ #id-<?php echo $id; ?> .owl-dots .owl-dot:hover span {
23
+ background-color: <?php echo $_nav_active_color; ?>
24
+ }
25
+ </style>
26
+ <div <?php echo join(" ", $this->carousel_options($id)); ?>>
27
+ <?php
28
+ foreach ( $_images_urls as $imageInfo ):
29
+
30
+ echo '<div class="carousel-slider__item">';
31
+
32
+ $title = sprintf( '<h4 class="title">%1$s</h4>', $imageInfo['title'] );
33
+ $caption = sprintf( '<p class="caption">%1$s</p>', $imageInfo['caption'] );
34
+
35
+ if ( $_show_attachment_title == 'on' && $_show_attachment_caption == 'on' ) {
36
+
37
+ $full_caption = sprintf('<div class="carousel-slider__caption">%1$s%2$s</div>', $title, $caption);
38
+
39
+ } elseif( $_show_attachment_title == 'on' ){
40
+
41
+ $full_caption = sprintf('<div class="carousel-slider__caption">%s</div>', $title);
42
+
43
+ } elseif( $_show_attachment_caption == 'on' ){
44
+
45
+ $full_caption = sprintf('<div class="carousel-slider__caption">%s</div>', $caption);
46
+
47
+ } else {
48
+ $full_caption = '';
49
+ }
50
+
51
+ if ( $_lazy_load_image == 'on' ) {
52
+
53
+ $image = sprintf( '<img class="owl-lazy" data-src="%1$s" alt="%2$s" />', $imageInfo['url'], $imageInfo['alt'] );
54
+
55
+ } else {
56
+ $image = sprintf( '<img src="%1$s" alt="%2$s" />', $imageInfo['url'], $imageInfo['alt'] );
57
+ }
58
+
59
+ if ( filter_var( $imageInfo['link_url'], FILTER_VALIDATE_URL) ) {
60
+
61
+ echo sprintf('<a href="%s">%s%s</a>', $imageInfo['link_url'], $image, $full_caption);
62
+
63
+ } else {
64
+
65
+ echo $image . $full_caption ;
66
+ }
67
+
68
+ echo '</div>';
69
+ endforeach;
70
+ ?>
71
+
72
+ </div>
templates/{carousel_slide.php → images-carousel.php} RENAMED
@@ -1,4 +1,13 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
  $_image_size = get_post_meta( $id, '_image_size', true );
3
  $_nav_color = get_post_meta( $id, '_nav_color', true );
4
  $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
@@ -26,6 +35,7 @@ $_show_attachment_caption = get_post_meta( $id, '_show_attachment_caption', tru
26
  $image_caption = $get_post->post_excerpt;
27
  $image_description = $get_post->post_content;
28
  $image_alt_text = trim( strip_tags( get_post_meta( $image_id, '_wp_attachment_image_alt', true ) ) );
 
29
 
30
  echo '<div class="carousel-slider__item">';
31
 
@@ -63,19 +73,13 @@ $_show_attachment_caption = get_post_meta( $id, '_show_attachment_caption', tru
63
  $image = wp_get_attachment_image( $image_id, $_image_size, false, array( 'alt' => $image_alt_text ) );
64
  }
65
 
66
- if ( filter_var( $image_description, FILTER_VALIDATE_URL) ) {
67
 
68
- echo '<a href="'.$image_description.'">';
69
-
70
- echo $image;
71
- echo $full_caption ;
72
-
73
- echo '</a>';
74
 
75
  } else {
76
 
77
- echo $image ;
78
- echo $full_caption ;
79
  }
80
 
81
  echo '</div>';
1
  <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ $images_ids = array_filter( explode( ',', get_post_meta( $id, '_wpdh_image_ids', true ) ) );
8
+ if (count( $images_ids ) < 1 ) {
9
+ return;
10
+ }
11
  $_image_size = get_post_meta( $id, '_image_size', true );
12
  $_nav_color = get_post_meta( $id, '_nav_color', true );
13
  $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
35
  $image_caption = $get_post->post_excerpt;
36
  $image_description = $get_post->post_content;
37
  $image_alt_text = trim( strip_tags( get_post_meta( $image_id, '_wp_attachment_image_alt', true ) ) );
38
+ $image_link_url = get_post_meta( $image_id, "_carousel_slider_link_url", true);
39
 
40
  echo '<div class="carousel-slider__item">';
41
 
73
  $image = wp_get_attachment_image( $image_id, $_image_size, false, array( 'alt' => $image_alt_text ) );
74
  }
75
 
76
+ if ( filter_var( $image_link_url, FILTER_VALIDATE_URL) ) {
77
 
78
+ echo sprintf('<a href="%s">%s%s</a>', esc_url($image_link_url), $image, $full_caption);
 
 
 
 
 
79
 
80
  } else {
81
 
82
+ echo $image . $full_caption ;
 
83
  }
84
 
85
  echo '</div>';
templates/index.php CHANGED
@@ -1,2 +1,2 @@
1
  <?php
2
- // Silence is golden
1
  <?php
2
+ // Code is Poetry
templates/post-carousel.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ $args = array(
8
+ 'post_type' => 'post',
9
+ 'post_status' => 'publish',
10
+ 'order' => get_post_meta( $id, '_post_order', true ),
11
+ 'orderby' => get_post_meta( $id, '_post_orderby', true ),
12
+ );
13
+
14
+ $post_in = explode(',', get_post_meta( $id, '_post_in', true ));
15
+ if ( count( $post_in ) > 10) {
16
+ $post_in = array_map(function($value){ return intval($value);}, $post_in);
17
+ $args = array_merge($args, array('post__in' => $post_in ));
18
+ } else {
19
+
20
+ $post_date_after = get_post_meta( $id, '_post_date_after', true );
21
+ $post_date_before = get_post_meta( $id, '_post_date_before', true );
22
+
23
+ if ( $post_date_after && $post_date_before ) {
24
+ $args = array_merge($args, array(
25
+ 'date_query' => array(
26
+ array(
27
+ 'after' => $post_date_after,
28
+ 'before' => $post_date_before,
29
+ 'inclusive' => true,
30
+ ),
31
+ ),
32
+ ));
33
+ } elseif ($post_date_after ) {
34
+ $args = array_merge($args, array(
35
+ 'date_query' => array(
36
+ array(
37
+ 'before' => $post_date_before,
38
+ 'inclusive' => true,
39
+ ),
40
+ ),
41
+ ));
42
+ } elseif ($post_date_before ) {
43
+ $args = array_merge($args, array(
44
+ 'date_query' => array(
45
+ array(
46
+ 'before' => $post_date_before,
47
+ 'inclusive' => true,
48
+ ),
49
+ ),
50
+ ));
51
+ }
52
+
53
+ $args = array_merge($args, array(
54
+ 'posts_per_page' => intval(get_post_meta( $id, '_posts_per_page', true ))
55
+ ));
56
+ }
57
+
58
+ $posts = get_posts( $args );
59
+ $carousels = $this->filter_posts( $posts );
60
+
61
+ $_image_size = get_post_meta( $id, '_image_size', true );
62
+ $_nav_color = get_post_meta( $id, '_nav_color', true );
63
+ $_nav_active_color = get_post_meta( $id, '_nav_active_color', true );
64
+ $_lazy_load_image = get_post_meta( $id, '_lazy_load_image', true );
65
+ $_post_height = get_post_meta( $id, '_post_height', true );
66
+ ?>
67
+ <style>
68
+ #id-<?php echo $id; ?> .owl-nav [class*='owl-'],
69
+ #id-<?php echo $id; ?> .owl-dots .owl-dot span {
70
+ background-color: <?php echo $_nav_color; ?>
71
+ }
72
+ #id-<?php echo $id; ?> .owl-nav [class*='owl-']:hover,
73
+ #id-<?php echo $id; ?> .owl-dots .owl-dot.active span,
74
+ #id-<?php echo $id; ?> .owl-dots .owl-dot:hover span {
75
+ background-color: <?php echo $_nav_active_color; ?>
76
+ }
77
+ #id-<?php echo $id; ?> .carousel-slider__post {
78
+ height: <?php echo $_post_height; ?>px;
79
+ }
80
+ </style>
81
+ <div <?php echo join(" ", $this->carousel_options($id)); ?>>
82
+ <?php
83
+ foreach ( $carousels as $query ):
84
+ echo '<div class="carousel-slider__post">';
85
+ echo '<div class="carousel-slider__post-content">';
86
+ echo '<div class="carousel-slider__post-header">';
87
+ // Post Thumbnail
88
+ if( $query->thumbnail_id ) {
89
+ $image_src = wp_get_attachment_image_src( $query->thumbnail_id, $_image_size );
90
+
91
+ if ( $_lazy_load_image == 'on' ) {
92
+
93
+ echo sprintf('<a href="%s" class="carousel-slider__post-image owl-lazy" data-src="%s"></a>', $query->permalink, $image_src[0]);
94
+ } else {
95
+
96
+ echo sprintf('<a href="%s" class="carousel-slider__post-image" style="background-image: url(%s)"></a>', $query->permalink, $image_src[0]);
97
+ }
98
+
99
+ } else {
100
+
101
+ echo sprintf('<a href="%s" class="carousel-slider__post-image"></a>', $query->permalink );
102
+ }
103
+
104
+ // Post Title
105
+ echo sprintf('<a class="carousel-slider__post-title" href="%s"><h1>%s</h1></a>', $query->permalink, $query->title );
106
+ echo '</div>'; // End Post Header
107
+ echo '<div class="carousel-slider__post-excerpt">' . $query->excerpt . '</div>';
108
+ echo '<footer class="carousel-slider__post-meta">';
109
+ echo '<div class="carousel-slider__post-excerpt-overlay"></div>';
110
+ echo '<div class="carousel-slider__post-publication-meta">';
111
+ echo '<div class="carousel-slider__post-details-info">';
112
+
113
+ // Post author
114
+ echo sprintf('<div class="carousel-slider__post-author"><a class="carousel-slider__post-author-link" href="%s">%s</a></div>',
115
+ $query->author->posts_url,
116
+ $query->author->display_name
117
+ );
118
+ // Post date
119
+ if ( $query->created !== $query->modified ) {
120
+
121
+ echo sprintf('<time class="carousel-slider__post-publication-date" datetime="%s">%s</time>',
122
+ date_i18n( 'c', $query->modified ),
123
+ date_i18n( get_option( 'date_format' ), $query->modified )
124
+ );
125
+
126
+ } else {
127
+
128
+ echo sprintf('<time class="carousel-slider__post-publication-date" datetime="%s">%s</time>',
129
+ date_i18n( 'c', $query->created ),
130
+ date_i18n( get_option( 'date_format' ), $query->created )
131
+ );
132
+ }
133
+ echo '</div>';
134
+ echo '</div>';
135
+
136
+ // Post catagory
137
+ echo '<div class="carousel-slider__post-category">';
138
+ if ( isset($query->category->link) ) {
139
+ echo sprintf('<a class="carousel-slider__post-category-link" href="%s">%s</a>',
140
+ $query->category->link,
141
+ $query->category->title
142
+ );
143
+ }
144
+ echo '</div>';
145
+ echo '</footer>';
146
+ echo '</div>';
147
+ echo '</div>';
148
+ endforeach;
149
+ ?>
150
+ </div>
templates/video-carousel.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // If this file is called directly, abort.
3
+ if ( ! defined( 'WPINC' ) ) {
4
+ die;
5
+ }
6
+
7
+ $_video_width = $this->get_meta( $id, '_video_width' );
8
+ $_video_height = $this->get_meta( $id, '_video_height' );
9
+ $_video_urls = array_filter( explode( ',', $this->get_meta( $id, '_video_url' )));
10
+
11
+ if ( count($_video_urls) < 1 ) {
12
+ return;
13
+ }
14
+ ?>
15
+ <div <?php echo join(" ", $this->carousel_options($id)); ?>>
16
+ <?php
17
+ foreach ($_video_urls as $url) {
18
+ echo $this->video_url($url);
19
+ }
20
+ ?>
21
+ </div>
widgets/index.php ADDED
@@ -0,0 +1,2 @@
 
 
1
+ <?php
2
+ // Code is Poetry
widgets/widget-carousel_slider.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'WPINC' ) ) {
4
  die;
5
  }
6
 
7
- class Widget_Carousel_Slider extends WP_Widget {
8
 
9
  /**
10
  * Sets up the widgets name etc
@@ -12,9 +12,9 @@ class Widget_Carousel_Slider extends WP_Widget {
12
  public function __construct() {
13
  $widget_ops = array(
14
  'classname' => 'widget_carousel_slider',
15
- 'description' => 'Easily use carousel slider in widget area.',
16
  );
17
- parent::__construct( 'widget_carousel_slider', 'Carousel Slider', $widget_ops );
18
  }
19
 
20
  /**
@@ -29,7 +29,12 @@ class Widget_Carousel_Slider extends WP_Widget {
29
  wp_enqueue_style( 'carousel-slider' );
30
  wp_enqueue_script( 'owl-carousel' );
31
 
32
- $carousel_id = $instance['carousel_id'];
 
 
 
 
 
33
  echo $args['before_widget'];
34
  echo do_shortcode('[carousel_slide id='. $carousel_id .']');
35
  echo $args['after_widget'];
@@ -40,69 +45,35 @@ class Widget_Carousel_Slider extends WP_Widget {
40
  *
41
  * @param array $instance The widget options
42
  */
43
- public function form( $instance ) {
44
- $args = array(
45
- 'post_type' => 'carousels',
46
- 'post_status' => 'publish',
47
- );
48
- $query = new WP_Query( $args );
49
-
50
- if ( $query->have_posts() ) {
51
-
52
- while ( $query->have_posts() ) {
53
- $query->the_post();
54
 
55
- echo "<label style='display: block;overflow: hidden;width: 100%; margin: 10px 0;'>";
56
 
57
- $carousel_id = ! empty( $instance['carousel_id'] ) ? $instance['carousel_id'] : null;
58
- $checked = $carousel_id == get_the_ID() ? 'checked="checket"' : '';
 
 
59
  echo sprintf(
60
- '<input type="radio" name="%s" value="%d" style="%s" %s>',
61
- $this->get_field_name( 'carousel_id' ),
62
- get_the_ID(),
63
- 'float: left;margin: 10px 10px 0 0;',
64
- $checked
65
  );
66
-
67
- $image_ids = explode(',', get_post_meta( get_the_ID(), '_wpdh_image_ids', true) );
68
- echo $this->thumbnail_list( $image_ids );
69
-
70
- echo "</label>";
71
  }
72
- wp_reset_postdata();
73
 
74
  } else {
75
- echo sprintf('%1$sYou did not add any carousel slider yet. %3$s%4$s%5$s to create a new carousel slider now.%2$s',
76
- '<p>',
77
- '</p>',
78
- '<a href="'. admin_url('post-new.php?post_type=carousels') .'">',
79
- __('click here'),
80
- '</a>'
81
  );
82
  }
83
  }
84
 
85
- private function thumbnail_list( $ids )
86
- {
87
- $show_more_icon = false;
88
- if ( count($ids) > 6 ) {
89
- $ids = array_slice($ids, 0, 5);
90
- $show_more_icon = true;
91
- }
92
- $html = "<ul style='float: left;margin:0;'>";
93
- foreach ( $ids as $id ) {
94
- $src = wp_get_attachment_image_src( $id, array(32,32) );
95
- $html .= "<li style='display:inline;margin-right:5px;'><img src='{$src[0]}' width='{$src[1]}' height='{$src[2]}'></li>";
96
- }
97
- if ($show_more_icon) {
98
- $html .= "<li style='display: inline;'>";
99
- $html .= "<span style='display: inline;font-size: 14px;height: 32px;vertical-align: top;width: 32px;'>More +</span>";
100
- $html .= "</li>";
101
- }
102
- $html .= "</ul>";
103
- return $html;
104
- }
105
-
106
  /**
107
  * Processing widget options on save
108
  *
@@ -115,8 +86,27 @@ class Widget_Carousel_Slider extends WP_Widget {
115
 
116
  return $instance;
117
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  }
119
 
120
  add_action( 'widgets_init', function(){
121
- register_widget( 'Widget_Carousel_Slider' );
122
  });
4
  die;
5
  }
6
 
7
+ class Carousel_Slider_Widget extends WP_Widget {
8
 
9
  /**
10
  * Sets up the widgets name etc
12
  public function __construct() {
13
  $widget_ops = array(
14
  'classname' => 'widget_carousel_slider',
15
+ 'description' => __('The easiest way to create image, video and post carousel.', 'carousel-slider'),
16
  );
17
+ parent::__construct( 'widget_carousel_slider', __('Carousel Slider', 'carousel-slider'), $widget_ops );
18
  }
19
 
20
  /**
29
  wp_enqueue_style( 'carousel-slider' );
30
  wp_enqueue_script( 'owl-carousel' );
31
 
32
+ $carousel_id = isset($instance['carousel_id']) ? $instance['carousel_id'] : 0;
33
+
34
+ if ( ! $carousel_id) {
35
+ return;
36
+ }
37
+
38
  echo $args['before_widget'];
39
  echo do_shortcode('[carousel_slide id='. $carousel_id .']');
40
  echo $args['after_widget'];
45
  *
46
  * @param array $instance The widget options
47
  */
48
+ public function form( $instance )
49
+ {
50
+ $carousels = $this->carousels_list();
51
+ $carousel_id = ! empty( $instance['carousel_id'] ) ? $instance['carousel_id'] : null;
 
 
 
 
 
 
 
52
 
53
+ if ( count( $carousels ) > 0 ) {
54
 
55
+ echo sprintf('<p><label>%s</label>', __('Choose Slide', 'carousel-slider'));
56
+ echo sprintf('<select class="widefat" name="%s">', $this->get_field_name( 'carousel_id' ));
57
+ foreach ($carousels as $carousel ) {
58
+ $selected = $carousel->id == $carousel_id ? 'selected="selected"' : '';
59
  echo sprintf(
60
+ '<option value="%1$d" %3$s>%2$s</option>',
61
+ $carousel->id,
62
+ $carousel->title,
63
+ $selected
 
64
  );
 
 
 
 
 
65
  }
66
+ echo "</select></p>";
67
 
68
  } else {
69
+ echo sprintf('<p>%1$s <a href="'. admin_url('post-new.php?post_type=carousels') .'">%3$s</a> %2$s</p>',
70
+ __('You did not add any carousel slider yet.', 'carousel-slider'),
71
+ __('to create a new carousel slider now.', 'carousel-slider'),
72
+ __('click here', 'carousel-slider')
 
 
73
  );
74
  }
75
  }
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  /**
78
  * Processing widget options on save
79
  *
86
 
87
  return $instance;
88
  }
89
+
90
+ private function carousels_list()
91
+ {
92
+ $carousels = get_posts( array(
93
+ 'post_type' => 'carousels',
94
+ 'post_status' => 'publish',
95
+ ) );
96
+
97
+ if ( count($carousels) < 1) {
98
+ return array();
99
+ }
100
+
101
+ return array_map(function($carousel){
102
+ return (object) array(
103
+ 'id' => $carousel->ID,
104
+ 'title' => esc_html($carousel->post_title),
105
+ );
106
+ }, $carousels);
107
+ }
108
  }
109
 
110
  add_action( 'widgets_init', function(){
111
+ register_widget( 'Carousel_Slider_Widget' );
112
  });