WordPress Infinite Scroll – Ajax Load More - Version 5.4.2.1

Version Description

  • January 3, 2020 =
  • HOTFIX - Fixed issue with non-functioning Shortcode Builder on sites without tags or categories present.
Download this release

Release Info

Developer dcooney
Plugin Icon 128x128 WordPress Infinite Scroll – Ajax Load More
Version 5.4.2.1
Comparing to
See all releases

Code changes from version 5.4.2 to 5.4.2.1

Files changed (80) hide show
  1. LICENSE.txt +339 -0
  2. README.txt +7 -3
  3. admin/admin.php +0 -0
  4. admin/includes/components/custom-layouts.php +0 -0
  5. admin/includes/cta/extend-theme-repeaters.php +0 -32
  6. admin/includes/cta/extend.php +0 -0
  7. admin/includes/cta/pro-hero.php +0 -0
  8. admin/shortcode-builder/js/shortcode-builder.js +7 -7
  9. admin/shortcode-builder/shortcode-builder.php +0 -0
  10. admin/src/js/admin.js +532 -0
  11. admin/src/js/libs/jquery.drops.js +52 -0
  12. admin/src/js/libs/jquery.tooltipster.min.js +1 -0
  13. admin/src/js/libs/select2.min.js +5 -0
  14. admin/src/js/modules/sticky.js +65 -0
  15. admin/src/scss/_variables.scss +16 -0
  16. admin/src/scss/admin.scss +3924 -0
  17. admin/src/scss/libs/select2.scss +349 -0
  18. admin/src/scss/libs/tooltipster.scss +276 -0
  19. admin/src/scss/partials/_alm-block.scss +49 -0
  20. admin/src/scss/partials/_alm-settings-feedback.scss +63 -0
  21. admin/src/scss/partials/_builder-option-toggle.scss +54 -0
  22. admin/src/scss/partials/_codemirror.scss +83 -0
  23. admin/src/scss/partials/_header.scss +55 -0
  24. admin/src/scss/partials/_pro-listing.scss +242 -0
  25. admin/src/scss/partials/_select2.scss +74 -0
  26. admin/src/scss/partials/_shortcode-builder.scss +200 -0
  27. admin/src/scss/partials/_sidebar.scss +25 -0
  28. admin/src/scss/partials/_woocommerce.scss +33 -0
  29. admin/views/add-ons.php +0 -0
  30. admin/views/go-pro.php +0 -0
  31. admin/views/help.php +0 -0
  32. admin/views/licenses.php +0 -0
  33. admin/views/repeater-templates.php +5 -4
  34. admin/views/shortcode-builder.php +0 -0
  35. ajax-load-more.php +3 -3
  36. core/classes/includes/preloaded.php +0 -0
  37. core/functions.php +0 -0
  38. core/src/js/addons/cache.js +59 -0
  39. core/src/js/addons/elementor.js +340 -0
  40. core/src/js/addons/filters.js +163 -0
  41. core/src/js/addons/seo.js +149 -0
  42. core/src/js/addons/singleposts.js +29 -0
  43. core/src/js/addons/woocommerce.js +205 -0
  44. core/src/js/ajax-load-more.js +2570 -0
  45. core/src/js/helpers/almAppendChild.js +26 -0
  46. core/src/js/helpers/almAppendChildren.js +20 -0
  47. core/src/js/helpers/almDomParser.js +17 -0
  48. core/src/js/helpers/commentReplyFix.js +47 -0
  49. core/src/js/helpers/getCacheUrl.js +79 -0
  50. core/src/js/helpers/getParameterByName.js +10 -0
  51. core/src/js/helpers/getQueryVariable.js +19 -0
  52. core/src/js/helpers/helpers.js +138 -0
  53. core/src/js/helpers/polyfills.js +232 -0
  54. core/src/js/helpers/queryParams.js +223 -0
  55. core/src/js/helpers/srcsetPolyfill.js +31 -0
  56. core/src/js/helpers/stripEmptyNodes.js +24 -0
  57. core/src/js/helpers/tableWrap.js +17 -0
  58. core/src/js/modules/almDebug.js +19 -0
  59. core/src/js/modules/fadeIn.js +25 -0
  60. core/src/js/modules/fadeOut.js +17 -0
  61. core/src/js/modules/filtering.js +198 -0
  62. core/src/js/modules/getButtonURL.js +17 -0
  63. core/src/js/modules/getScrollPercentage.js +26 -0
  64. core/src/js/modules/insertScript.js +62 -0
  65. core/src/js/modules/loadImage.js +25 -0
  66. core/src/js/modules/loadItems.js +67 -0
  67. core/src/js/modules/masonry.js +176 -0
  68. core/src/js/modules/noResults.js +20 -0
  69. core/src/js/modules/placeholder.js +25 -0
  70. core/src/js/modules/resultsText.js +150 -0
  71. core/src/js/modules/setFocus.js +111 -0
  72. core/src/js/modules/setLocalizedVars.js +72 -0
  73. core/src/js/modules/tableofcontents.js +155 -0
  74. core/src/js/vendor/imagesloaded/imagesloaded.pkgd.min.js +6 -0
  75. core/src/scss/_listing.scss +162 -0
  76. core/src/scss/_loaders.scss +281 -0
  77. core/src/scss/_tableofcontents.scss +32 -0
  78. core/src/scss/_variables.scss +3 -0
  79. core/src/scss/ajax-load-more.scss +18 -0
  80. lang/ajax-load-more.pot +21 -22
LICENSE.txt ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.
README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, load more, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
5
  Requires at least: 4.0
6
  Tested up to: 5.6
7
- Stable tag: 5.4.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -347,10 +347,14 @@ How to install Ajax Load More.
347
 
348
  == Changelog ==
349
 
 
 
 
350
  = 5.4.2 - January 3, 2020 =
351
- * NEW - Added new `vars` parameter that allows for passing data more easily into Filters and Repeater Templates. Variables can accessed in Repeater Templates by accessing the `$args` array. This will pull in all query and variable parameters.
 
352
  `[ajax_load_more vars="var1:The value of var1 value;var2:The value for #2"]`
353
- `print_r($args);`
354
  * UPDATE - Various admin UI/UX updates and layout improvements.
355
  * FIX - Fixed issue with Single Posts add-on custom query returning all posts if the query was empty.
356
  * FIX - Fixed issue with height of Ajax Load More when filtering with Masonry and zero results are returned.
4
  Tags: infinite scroll, load more, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
5
  Requires at least: 4.0
6
  Tested up to: 5.6
7
+ Stable tag: 5.4.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
347
 
348
  == Changelog ==
349
 
350
+ = 5.4.2.1 - January 3, 2020 =
351
+ * HOTFIX - Fixed issue with non-functioning Shortcode Builder on sites without `tags` or `categories` present.
352
+
353
  = 5.4.2 - January 3, 2020 =
354
+ * NEW - Added new `vars` parameter that allows for passing data into Hooks and Repeater Templates.
355
+ Variables can accessed in Repeater Templates by accessing the `$args` array. This will pull in all query and variable parameters into an array.
356
  `[ajax_load_more vars="var1:The value of var1 value;var2:The value for #2"]`
357
+ `echo $args['alm_vars'];` // Prints an array of key value pairs. See docs for more info.
358
  * UPDATE - Various admin UI/UX updates and layout improvements.
359
  * FIX - Fixed issue with Single Posts add-on custom query returning all posts if the query was empty.
360
  * FIX - Fixed issue with height of Ajax Load More when filtering with Masonry and zero results are returned.
admin/admin.php CHANGED
File without changes
admin/includes/components/custom-layouts.php CHANGED
File without changes
admin/includes/cta/extend-theme-repeaters.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
- $extend = alm_get_addon( 'theme-repeaters' );
3
- if ( $extend ) {
4
- $name = $extend['name'];
5
- $intro = $extend['intro'];
6
- $desc = $extend['desc'];
7
- $key = $extend['key'];
8
- $url = $extend['url'];
9
- $img = $extend['img'];
10
- ?>
11
- <div id="alm-add-ons">
12
- <div class="flexbox-wrap">
13
- <div class="group no-shadow extend">
14
- <a href="<?php echo $url; ?>?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=<?php echo $name; ?>" target="_blank">
15
- <div class="pro-img">
16
- <img src="<?php echo ALM_ADMIN_URL; ?><?php echo $img; ?>" alt="">
17
- </div>
18
- <div class="pro-details">
19
- <h2 class="addon-title"><?php echo $name; ?></h2>
20
- <p class="addon-intro"><?php echo $intro; ?></p>
21
- <p class="pro-desc"><?php echo $desc; ?></p>
22
- <?php
23
- echo '<span class="cnkt-button">' . __( 'Upgrade Now', 'ajax-load-more' ) . '</span>';
24
- ?>
25
- </div>
26
- </a>
27
- </div>
28
- </div>
29
- </div>
30
- <?php
31
- }
32
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/cta/extend.php CHANGED
File without changes
admin/includes/cta/pro-hero.php CHANGED
File without changes
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -754,19 +754,19 @@ jQuery(document).ready(function ($) {
754
 
755
  // IN
756
  var cat = $('.categories #category-select').val();
757
- if (cat !== '' && cat.length > 0 && cat !== undefined && cat !== null) {
758
  output += ' category="' + cat + '"';
759
  }
760
 
761
  // AND
762
  var cat__and = $('.categories #category--and-select').val();
763
- if (cat__and !== '' && cat__and.length > 0 && cat__and !== undefined && cat__and !== null) {
764
  output += ' category__and="' + cat__and + '"';
765
  }
766
 
767
  // NOT_IN
768
  var cat_not_in = $('.categories #category-exclude-select').val();
769
- if (cat_not_in !== '' && cat_not_in.length > 0 && cat_not_in !== undefined && cat_not_in !== null) output += ' category__not_in="' + cat_not_in + '"';
770
 
771
  // ---------------------------
772
  // - Tags
@@ -795,19 +795,19 @@ jQuery(document).ready(function ($) {
795
 
796
  // IN
797
  var tag = $('.tags #tag-select').val();
798
- if (tag !== '' && tag.length > 0 && tag !== undefined && tag !== null) {
799
  output += ' tag="' + tag + '"';
800
  }
801
 
802
  // AND
803
  var tag__and = $('.tags #tag--and-select').val();
804
- if (tag__and !== '' && tag__and.length > 0 && tag__and !== undefined && tag__and !== null) {
805
  output += ' tag__and="' + tag__and + '"';
806
  }
807
 
808
  // NOT_IN
809
  var tag_not_in = $('.tags #tag-exclude-select').val();
810
- if (tag_not_in !== '' && tag_not_in.length > 0 && tag_not_in !== undefined && tag_not_in !== null) output += ' tag__not_in="' + tag_not_in + '"';
811
 
812
  // ---------------------------
813
  // - Taxonomy Query
@@ -1013,7 +1013,7 @@ jQuery(document).ready(function ($) {
1013
  // ---------------------------
1014
 
1015
  var author = $('.authors #author-select').val();
1016
- if (author !== '' && author.length > 0 && author !== undefined && author !== null) output += ' author="' + author + '"';
1017
 
1018
  // ---------------------------
1019
  // - Posts
754
 
755
  // IN
756
  var cat = $('.categories #category-select').val();
757
+ if (cat !== '' && cat !== undefined && cat !== null && cat.length > 0) {
758
  output += ' category="' + cat + '"';
759
  }
760
 
761
  // AND
762
  var cat__and = $('.categories #category--and-select').val();
763
+ if (cat__and !== '' && cat__and !== undefined && cat__and !== null && cat__and.length > 0) {
764
  output += ' category__and="' + cat__and + '"';
765
  }
766
 
767
  // NOT_IN
768
  var cat_not_in = $('.categories #category-exclude-select').val();
769
+ if (cat_not_in !== '' && cat_not_in !== undefined && cat_not_in !== null && cat_not_in.length > 0) output += ' category__not_in="' + cat_not_in + '"';
770
 
771
  // ---------------------------
772
  // - Tags
795
 
796
  // IN
797
  var tag = $('.tags #tag-select').val();
798
+ if (tag !== '' && tag !== undefined && tag !== null && tag.length > 0) {
799
  output += ' tag="' + tag + '"';
800
  }
801
 
802
  // AND
803
  var tag__and = $('.tags #tag--and-select').val();
804
+ if (tag__and !== '' && tag__and !== undefined && tag__and !== null && tag__and.length > 0) {
805
  output += ' tag__and="' + tag__and + '"';
806
  }
807
 
808
  // NOT_IN
809
  var tag_not_in = $('.tags #tag-exclude-select').val();
810
+ if (tag_not_in !== '' && tag_not_in !== undefined && tag_not_in !== null && tag_not_in.length > 0) output += ' tag__not_in="' + tag_not_in + '"';
811
 
812
  // ---------------------------
813
  // - Taxonomy Query
1013
  // ---------------------------
1014
 
1015
  var author = $('.authors #author-select').val();
1016
+ if (author !== '' && author !== undefined && author !== null && author.length > 0) output += ' author="' + author + '"';
1017
 
1018
  // ---------------------------
1019
  // - Posts
admin/shortcode-builder/shortcode-builder.php CHANGED
File without changes
admin/src/js/admin.js ADDED
@@ -0,0 +1,532 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var _alm = _alm || {};
2
+
3
+ jQuery(document).ready(function ($) {
4
+ 'use strict';
5
+
6
+ _alm.options = {
7
+ speed: 200,
8
+ };
9
+
10
+ /*
11
+ * Test REST API access
12
+ *
13
+ * @since 5.1.1
14
+ */
15
+ if ($('.restapi-access').length) {
16
+ $.ajax({
17
+ type: 'GET',
18
+ url: alm_admin_localize.restapi.url + alm_admin_localize.restapi.namespace + '/test/',
19
+ dataType: 'json',
20
+ success: function (data) {
21
+ if (data.success) {
22
+ console.log('Ajax Load More successfully connected to the WordPress REST API.');
23
+ }
24
+ },
25
+ error: function (xhr, status, error) {
26
+ console.log(status);
27
+ $('.restapi-access').fadeIn();
28
+ },
29
+ });
30
+ }
31
+
32
+ /*
33
+ * Save Repeater Templates with cmd + s and ctrl + s
34
+ * @since 5.1
35
+ */
36
+ document.addEventListener(
37
+ 'keydown',
38
+ function (e) {
39
+ if ((window.navigator.platform.match('Mac') ? e.metaKey : e.ctrlKey) && e.keyCode == 83) {
40
+ if (e.target.nodeName === 'TEXTAREA' && $(e.target).closest('.repeater-wrap')) {
41
+ console.log('Saving template...');
42
+ var btn = $(e.target).closest('.repeater-wrap').find('input.save-repeater');
43
+ if (btn) {
44
+ btn.click();
45
+ }
46
+ }
47
+
48
+ e.preventDefault();
49
+ }
50
+ },
51
+ false
52
+ );
53
+
54
+ /*
55
+ * Set focus in code mirror editor
56
+ * @since 5.1
57
+ */
58
+ $('label.trigger-codemirror').on('click', function () {
59
+ var el = $(this);
60
+ var id = el.data('id');
61
+ var cm = window['editor_' + id];
62
+ if (cm) {
63
+ cm.focus();
64
+ cm.setCursor(cm.lineCount(), 0);
65
+ }
66
+ });
67
+
68
+ /*
69
+ * _alm.saveSettings
70
+ * Setting panel save actions
71
+ *
72
+ * @since 3.2.0
73
+ */
74
+
75
+ let almSettings = $('#alm_OptionsForm'),
76
+ savingSettings = false,
77
+ settingsForm = document.querySelector('#alm_OptionsForm'),
78
+ settingsTarget = document.querySelector('.alm-settings-feedback');
79
+
80
+ if (settingsForm) {
81
+ document.body.appendChild(settingsTarget);
82
+ }
83
+
84
+ _alm.saveSettings = function () {
85
+ if (savingSettings) return false;
86
+
87
+ savingSettings = true;
88
+ settingsForm.classList.add('--saving');
89
+ settingsTarget.classList.add('--saving');
90
+ settingsTarget.innerHTML = alm_admin_localize.settings_saving;
91
+
92
+ almSettings.ajaxSubmit({
93
+ // Success
94
+ success: function () {
95
+ // Delay for effect
96
+ setTimeout(function () {
97
+ settingsTarget.classList.remove('--saving');
98
+ settingsTarget.classList.add('--saved');
99
+ settingsTarget.innerHTML = alm_admin_localize.settings_saved;
100
+ settingsForm.classList.remove('--saving');
101
+ //console.log(alm_admin_localize.ajax_load_more +' - '+ alm_admin_localize.settings_saved);
102
+ savingSettings = false;
103
+
104
+ setTimeout(function () {
105
+ settingsTarget.classList.remove('--saved');
106
+ }, 2500);
107
+ }, 500);
108
+ },
109
+
110
+ // Error
111
+ error: function () {
112
+ // Delay for effect
113
+ setTimeout(function () {
114
+ settingsTarget.classList.remove('--saving');
115
+ settingsTarget.classList.add('--error');
116
+ settingsTarget.innerHTML = alm_admin_localize.settings_error;
117
+ settingsForm.classList.remove('--saving');
118
+ console.log(alm_admin_localize.ajax_load_more + ' - ' + alm_admin_localize.settings_error);
119
+ savingSettings = false;
120
+
121
+ setTimeout(function () {
122
+ settingsTarget.classList.remove('--error');
123
+ }, 2500);
124
+ }, 500);
125
+ },
126
+ });
127
+ return false;
128
+ };
129
+
130
+ // On Change, save the settings
131
+ let settingsTimer;
132
+ $(document).on('change', '#alm_OptionsForm input, #alm_OptionsForm textarea, #alm_OptionsForm select', function () {
133
+ // Set a timer to avoid updating settings to frequently
134
+ if (settingsTimer) clearTimeout(settingsTimer);
135
+ settingsTimer = setTimeout(function () {
136
+ _alm.saveSettings();
137
+ }, 500);
138
+ });
139
+
140
+ /*
141
+ * Download Repeater Template
142
+ * Trigger the download of a repeater template from the admin
143
+ *
144
+ * @since 3.6
145
+ */
146
+
147
+ $('.download-repeater').on('click', function (e) {
148
+ let el = this;
149
+ el.closest('form').submit();
150
+ });
151
+
152
+ /*
153
+ * Tooltipster
154
+ * http://iamceege.github.io/tooltipster/
155
+ *
156
+ * @since 2.8.4
157
+ */
158
+ $('body').on('mouseenter', '.tooltip:not(.tooltipstered)', function () {
159
+ $(this)
160
+ .tooltipster({
161
+ delay: 100,
162
+ speed: 150,
163
+ maxWidth: 325,
164
+ })
165
+ .tooltipster('show');
166
+ });
167
+
168
+ /*
169
+ * Button preview pane
170
+ * Found on Settings and Shortcode Builder
171
+ *
172
+ * @since 2.8.4
173
+ */
174
+
175
+ $('select#alm_settings_btn_color').change(function () {
176
+ var color = jQuery(this).val();
177
+ // Remove other colors
178
+
179
+ $('.alm-btn-wrap .ajax-load-more-wrap').attr('class', 'ajax-load-more-wrap');
180
+ $('.alm-btn-wrap .ajax-load-more-wrap').addClass(color);
181
+ $('.alm-btn-wrap .ajax-load-more-wrap #test-alm-button').removeClass('loading');
182
+
183
+ // Add loading class if Infinite loading style
184
+ if (color.indexOf('infinite') >= 0) {
185
+ $('.alm-btn-wrap .ajax-load-more-wrap #test-alm-button').addClass('loading');
186
+ }
187
+ });
188
+
189
+ $('select#alm_settings_btn_color').click(function (e) {
190
+ e.preventDefault();
191
+ });
192
+
193
+ $('.alm-template-listing li a').click(function (e) {
194
+ e.preventDefault();
195
+ var el = $(this),
196
+ val = el.data('path');
197
+ el.parent().parent().next('.template-selection').val(val);
198
+ });
199
+
200
+ $('.alm-template-section-nav li a').click(function (e) {
201
+ e.preventDefault();
202
+ var el = $(this),
203
+ index = el.parent().index(),
204
+ parent = el.parent().parent().parent('.repeater-wrap');
205
+
206
+ if (!el.hasClass('active')) {
207
+ el.parent().addClass('active').siblings().removeClass('active');
208
+ $('.alm-template-toggle', parent).hide();
209
+ $('.alm-template-toggle', parent).eq(index).show();
210
+ }
211
+ });
212
+
213
+ // Copy to Clipboard
214
+ $('.copy-to-clipboard').on('click', function () {
215
+ var btn = $(this).get(0);
216
+ var input = document.querySelector('#shortcode_output');
217
+
218
+ if (input && btn) {
219
+ var old_txt = btn.innerHTML;
220
+ var copied_txt = btn.dataset.copied ? btn.dataset.copied : old_txt;
221
+
222
+ input.select();
223
+ document.execCommand('copy');
224
+ input.disabled = true;
225
+ btn.disabled = true;
226
+ input.focus();
227
+
228
+ // Set Text of Button
229
+ btn.innerHTML = copied_txt;
230
+
231
+ setTimeout(function () {
232
+ btn.innerHTML = old_txt;
233
+ input.disabled = false;
234
+ btn.disabled = false;
235
+ }, 2500);
236
+ }
237
+ });
238
+
239
+ // Copy link on repeater templates
240
+ $('.alm-dropdown .copy a').click(function () {
241
+ var container = $(this).closest('.repeater-wrap'), // find closet wrap
242
+ el = container.data('name'); // get template name
243
+
244
+ if (el === 'default') el = 'template-default';
245
+ var c = $('#' + el).val(); // Get textarea val()
246
+ _alm.copyToClipboard(c);
247
+ });
248
+
249
+ /*
250
+ * Expand/Collapse shortcode headings
251
+ *
252
+ * @since 2.0.0
253
+ */
254
+
255
+ $(document).on('click', 'h2.shortcode-title', function () {
256
+ var el = $(this);
257
+ var parent = el.closest('.shortcode-parameter-wrap');
258
+ if (el.hasClass('open')) {
259
+ el.next('.section-wrap').slideDown(_alm.options.speed, 'alm_easeInOutQuad', function () {
260
+ el.removeClass('open');
261
+ parent.removeClass('closed');
262
+ });
263
+ } else {
264
+ el.next('.section-wrap').slideUp(_alm.options.speed, 'alm_easeInOutQuad', function () {
265
+ el.addClass('open');
266
+ parent.addClass('closed');
267
+ });
268
+ }
269
+ });
270
+
271
+ $(document).on('click', 'h3.heading', function () {
272
+ var el = $(this);
273
+ if ($(el).hasClass('open')) {
274
+ $(el)
275
+ .next('.expand-wrap')
276
+ .slideDown(_alm.options.speed, 'alm_easeInOutQuad', function () {
277
+ $(el).removeClass('open');
278
+ });
279
+ } else {
280
+ $(el)
281
+ .next('.expand-wrap')
282
+ .slideUp(_alm.options.speed, 'alm_easeInOutQuad', function () {
283
+ $(el).addClass('open');
284
+ });
285
+ }
286
+ });
287
+
288
+ $(document).on('click', '.toggle-all', function () {
289
+ var el = $(this),
290
+ type = el.data('id');
291
+ if (el.hasClass('closed')) {
292
+ el.removeClass('closed');
293
+
294
+ $('h2.shortcode-title').closest('.shortcode-parameter-wrap').removeClass('closed');
295
+ $('h3.heading, h2.shortcode-title').removeClass('open');
296
+ $('.section-wrap').slideDown(_alm.options.speed, 'alm_easeInOutQuad');
297
+ $('.expand-wrap').slideDown(_alm.options.speed, 'alm_easeInOutQuad');
298
+ } else {
299
+ el.addClass('closed');
300
+
301
+ $('h2.shortcode-title').closest('.shortcode-parameter-wrap').addClass('closed');
302
+ $('h3.heading, h2.shortcode-title').addClass('open');
303
+ $('.section-wrap').slideUp(_alm.options.speed, 'alm_easeInOutQuad');
304
+ $('.expand-wrap').slideUp(_alm.options.speed, 'alm_easeInOutQuad');
305
+ }
306
+ });
307
+
308
+ // Trigger click events on enter/return
309
+ $('h3.heading, h2.shortcode-title').keypress(function (e) {
310
+ var key = e.which;
311
+ if (key == 13) {
312
+ // the enter key code
313
+ $(this).click();
314
+ return false;
315
+ }
316
+ });
317
+
318
+ /*
319
+ * Activate License
320
+ *
321
+ * @since 2.8.3
322
+ */
323
+
324
+ var almActivating = false;
325
+ $(document).on('click', '.license-btn', function (e) {
326
+ e.preventDefault();
327
+
328
+ if (!almActivating) {
329
+ $('.license-btn-wrap .msg').remove();
330
+ almActivating = true;
331
+
332
+ var el = $(this),
333
+ wrap = el.closest('.license-btn-wrap'),
334
+ parent = el.closest('.license'),
335
+ type = el.data('type'),
336
+ item = wrap.data('name'),
337
+ url = wrap.data('url'),
338
+ upgrade = wrap.data('upgrade-url'),
339
+ status = wrap.data('option-status'),
340
+ key = wrap.data('option-key'),
341
+ license = parent.find('input[type=text]').val();
342
+
343
+ $('.loading', parent).fadeIn(300);
344
+
345
+ // Get value from Ajax
346
+ $.ajax({
347
+ type: 'GET',
348
+ url: alm_admin_localize.ajax_admin_url,
349
+ dataType: 'json',
350
+
351
+ data: {
352
+ action: 'alm_license_activation',
353
+ nonce: alm_admin_localize.alm_admin_nonce,
354
+ type: type,
355
+ item: item,
356
+ status: status,
357
+ url: url,
358
+ upgrade: upgrade,
359
+ key: key,
360
+ license: license,
361
+ },
362
+
363
+ success: function (data) {
364
+ if (data.msg) {
365
+ $('.license-btn-wrap', parent).append('<div class="msg">' + data.msg + '</div>');
366
+ }
367
+
368
+ if (data.license === 'valid') {
369
+ $('.license-key-field .status', parent).addClass('active').removeClass('inactive').text(alm_admin_localize.active);
370
+ $('.license-title .status', parent).addClass('valid').removeClass('invalid');
371
+ $('.activate.license-btn', parent).addClass('hide');
372
+ $('.check-licence.license-btn', parent).addClass('hide');
373
+ $('.deactivate.license-btn', parent).removeClass('hide');
374
+ $('.renew-btn', parent).addClass('hide');
375
+ $('.no-license', parent).slideUp(200);
376
+ } else {
377
+ $('.license-key-field .status', parent).removeClass('active').addClass('inactive').text(alm_admin_localize.inactive);
378
+ $('.license-title .status', parent).removeClass('valid').addClass('invalid');
379
+ $('.activate.license-btn', parent).removeClass('hide');
380
+ $('.check-licence.license-btn', parent).addClass('hide');
381
+ $('.deactivate.license-btn', parent).addClass('hide');
382
+ $('.no-license', parent).slideDown(200);
383
+ }
384
+
385
+ $('.loading', parent).delay(250).fadeOut(300);
386
+ almActivating = false;
387
+ },
388
+
389
+ error: function (xhr, status, error) {
390
+ console.log(status);
391
+ $('.loading', parent).delay(250).fadeOut(300);
392
+ almActivating = false;
393
+ },
394
+ });
395
+ }
396
+ });
397
+
398
+ /*
399
+ * Get layout value Ajax
400
+ * @since 2.8.7
401
+ */
402
+ $(document).on('click', '.alm-layout-selection li a.layout', function (e) {
403
+ e.preventDefault();
404
+ var el = $(this),
405
+ type = el.data('type'),
406
+ custom = el.hasClass('custom') ? 'true' : 'false',
407
+ textarea = el.closest('.repeater-wrap').find('.CodeMirror'),
408
+ layout_btn_text = el.html(),
409
+ name = el.closest('.repeater-wrap').data('name');
410
+
411
+ if (!el.hasClass('updating')) {
412
+ el.addClass('updating').text(alm_admin_localize.applying_layout + '...');
413
+ textarea.addClass('loading');
414
+
415
+ // Get Codemirror Editor ID
416
+ var eid = '';
417
+ if (name === 'default') {
418
+ // Default Template
419
+ eid = window.editor_default;
420
+ } else {
421
+ // Repeater Templates
422
+ eid = window['editor_' + name];
423
+ }
424
+
425
+ // Get value from Ajax
426
+ $.ajax({
427
+ type: 'GET',
428
+ url: alm_admin_localize.ajax_admin_url,
429
+ data: {
430
+ action: 'alm_get_layout',
431
+ type: type,
432
+ custom: custom,
433
+ nonce: alm_admin_localize.alm_admin_nonce,
434
+ },
435
+ dataType: 'JSON',
436
+ success: function (data) {
437
+ eid.setValue(data.value);
438
+
439
+ // Clear button styles
440
+ setTimeout(function () {
441
+ el.text(alm_admin_localize.template_updated).blur();
442
+ setTimeout(function () {
443
+ el.removeClass('updating').html(layout_btn_text).blur(); // CLose drop menu
444
+ el.closest('.alm-drop-btn').trigger('click');
445
+ textarea.removeClass('loading');
446
+ }, 400);
447
+ }, 400);
448
+ },
449
+ error: function (xhr, status, error) {
450
+ console.log(status);
451
+ textarea.removeClass('loading');
452
+ },
453
+ });
454
+ }
455
+ });
456
+
457
+ /*
458
+ * Dismiss Sharing (Transient)
459
+ * @since 2.8.7
460
+ */
461
+ $(document).on('click', '.alm-notification--dismiss', function (e) {
462
+ e.preventDefault();
463
+ var el = $(this),
464
+ container = el.parent('.cta');
465
+
466
+ // Get value from Ajax
467
+ $.ajax({
468
+ type: 'POST',
469
+ url: alm_admin_localize.ajax_admin_url,
470
+ data: {
471
+ action: 'alm_dismiss_sharing',
472
+ nonce: alm_admin_localize.alm_admin_nonce,
473
+ },
474
+ success: function (data) {
475
+ container.fadeOut();
476
+ },
477
+ error: function (xhr, status, error) {
478
+ console.log(status);
479
+ },
480
+ });
481
+ });
482
+
483
+ /*
484
+ * Set Transient (Transient)
485
+ * @since 4.0
486
+ */
487
+ $(document).on('click', '.alm-transient button.notice-dismiss', function (e) {
488
+ e.preventDefault();
489
+ var el = $(this),
490
+ container = el.parent('.alm-transient'),
491
+ transient_name = container.data('transient'),
492
+ duration = container.data('duration');
493
+
494
+ // Get value from Ajax
495
+ $.ajax({
496
+ type: 'POST',
497
+ url: alm_admin_localize.ajax_admin_url,
498
+ data: {
499
+ action: 'alm_set_transient',
500
+ nonce: alm_admin_localize.alm_admin_nonce,
501
+ transient_name: transient_name,
502
+ duration: duration,
503
+ },
504
+ success: function (data) {
505
+ container.fadeOut();
506
+ },
507
+ error: function (xhr, status, error) {
508
+ console.log(status);
509
+ },
510
+ });
511
+ });
512
+
513
+ /*
514
+ * Scroll to setting section
515
+ * @since 2.7.3
516
+ */
517
+
518
+ $(document).on('change', '#alm-settings-nav', function (e) {
519
+ e.preventDefault();
520
+ var el = $(this),
521
+ index = $('option:selected', el).index();
522
+ if (index !== '#') {
523
+ index = index - 1;
524
+ $('html, body').animate(
525
+ {
526
+ scrollTop: $('#alm_OptionsForm h2').eq(index).offset().top - 40,
527
+ },
528
+ 500
529
+ );
530
+ }
531
+ });
532
+ });
admin/src/js/libs/jquery.drops.js ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var drops = drops || {};
2
+
3
+ jQuery(document).ready(function($) {
4
+ "use strict";
5
+
6
+ drops.dropdown = function(e) {
7
+ var el = e.parent();
8
+ var dropdown = $('.alm-dropdown', el);
9
+ var text = $('input[type="text"]', el);
10
+
11
+ if($(el).hasClass('active')){//If is currently active, hide it
12
+ el.removeClass('active');
13
+ $('.alm-dropdown', el).removeClass('active');
14
+ return false;
15
+ }
16
+ else if($('.alm-dropdown').hasClass('active')){
17
+ $('.alm-dropdown').each(function(i){
18
+ $(this).removeClass('active');
19
+ $(this).parent().removeClass('active');
20
+ });
21
+ }
22
+
23
+ $('.alm-dropdown').removeClass('active');//remove active states from currently open dropdowns
24
+ el.addClass('active');
25
+ $('.alm-dropdown', el).addClass('active');
26
+ text.focus(); //Focus on input boxes
27
+
28
+ $(window).unbind('click').bind('click', drops.closeDropDown); // Bind click event to site container
29
+
30
+ dropdown.unbind('click').bind('click', function(event){
31
+ //event.stopPropagation();
32
+ });
33
+ //http://stackoverflow.com/questions/10439779/closing-modal-popup-by-clicking-away-from-it
34
+ };
35
+ drops.closeDropDown = function() {
36
+ $('.alm-dropdown').each(function(i) {
37
+ $(this).removeClass('active');
38
+ $(this).parent().removeClass('active');
39
+ });
40
+ };
41
+
42
+ //Dropdown links
43
+ $(document).on('click', '.alm-drop-btn a.target', function(){
44
+ var e = $(this);
45
+ drops.dropdown(e);
46
+ return false;
47
+ });
48
+
49
+
50
+
51
+
52
+ });
admin/src/js/libs/jquery.tooltipster.min.js ADDED
@@ -0,0 +1 @@
 
1
+ /* Tooltipster v3.3.0 */;(function(e,t,n){function s(t,n){this.bodyOverflowX;this.callbacks={hide:[],show:[]};this.checkInterval=null;this.Content;this.$el=e(t);this.$elProxy;this.elProxyPosition;this.enabled=true;this.options=e.extend({},i,n);this.mouseIsOverProxy=false;this.namespace="tooltipster-"+Math.round(Math.random()*1e5);this.Status="hidden";this.timerHide=null;this.timerShow=null;this.$tooltip;this.options.iconTheme=this.options.iconTheme.replace(".","");this.options.theme=this.options.theme.replace(".","");this._init()}function o(t,n){var r=true;e.each(t,function(e,i){if(typeof n[e]==="undefined"||t[e]!==n[e]){r=false;return false}});return r}function f(){return!a&&u}function l(){var e=n.body||n.documentElement,t=e.style,r="transition";if(typeof t[r]=="string"){return true}v=["Moz","Webkit","Khtml","O","ms"],r=r.charAt(0).toUpperCase()+r.substr(1);for(var i=0;i<v.length;i++){if(typeof t[v[i]+r]=="string"){return true}}return false}var r="tooltipster",i={animation:"fade",arrow:true,arrowColor:"",autoClose:true,content:null,contentAsHTML:false,contentCloning:true,debug:true,delay:200,minWidth:0,maxWidth:null,functionInit:function(e,t){},functionBefore:function(e,t){t()},functionReady:function(e,t){},functionAfter:function(e){},hideOnClick:false,icon:"(?)",iconCloning:true,iconDesktop:false,iconTouch:false,iconTheme:"tooltipster-icon",interactive:false,interactiveTolerance:350,multiple:false,offsetX:0,offsetY:0,onlyOne:false,position:"top",positionTracker:false,positionTrackerCallback:function(e){if(this.option("trigger")=="hover"&&this.option("autoClose")){this.hide()}},restoration:"current",speed:350,timer:0,theme:"tooltipster-default",touchDevices:true,trigger:"hover",updateAnimation:true};s.prototype={_init:function(){var t=this;if(n.querySelector){var r=null;if(t.$el.data("tooltipster-initialTitle")===undefined){r=t.$el.attr("title");if(r===undefined)r=null;t.$el.data("tooltipster-initialTitle",r)}if(t.options.content!==null){t._content_set(t.options.content)}else{t._content_set(r)}var i=t.options.functionInit.call(t.$el,t.$el,t.Content);if(typeof i!=="undefined")t._content_set(i);t.$el.removeAttr("title").addClass("tooltipstered");if(!u&&t.options.iconDesktop||u&&t.options.iconTouch){if(typeof t.options.icon==="string"){t.$elProxy=e('<span class="'+t.options.iconTheme+'"></span>');t.$elProxy.text(t.options.icon)}else{if(t.options.iconCloning)t.$elProxy=t.options.icon.clone(true);else t.$elProxy=t.options.icon}t.$elProxy.insertAfter(t.$el)}else{t.$elProxy=t.$el}if(t.options.trigger=="hover"){t.$elProxy.on("mouseenter."+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=true;t._show()}}).on("mouseleave."+t.namespace,function(){if(!f()||t.options.touchDevices){t.mouseIsOverProxy=false}});if(u&&t.options.touchDevices){t.$elProxy.on("touchstart."+t.namespace,function(){t._showNow()})}}else if(t.options.trigger=="click"){t.$elProxy.on("click."+t.namespace,function(){if(!f()||t.options.touchDevices){t._show()}})}}},_show:function(){var e=this;if(e.Status!="shown"&&e.Status!="appearing"){if(e.options.delay){e.timerShow=setTimeout(function(){if(e.options.trigger=="click"||e.options.trigger=="hover"&&e.mouseIsOverProxy){e._showNow()}},e.options.delay)}else e._showNow()}},_showNow:function(n){var r=this;r.options.functionBefore.call(r.$el,r.$el,function(){if(r.enabled&&r.Content!==null){if(n)r.callbacks.show.push(n);r.callbacks.hide=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;if(r.options.onlyOne){e(".tooltipstered").not(r.$el).each(function(t,n){var r=e(n),i=r.data("tooltipster-ns");e.each(i,function(e,t){var n=r.data(t),i=n.status(),s=n.option("autoClose");if(i!=="hidden"&&i!=="disappearing"&&s){n.hide()}})})}var i=function(){r.Status="shown";e.each(r.callbacks.show,function(e,t){t.call(r.$el)});r.callbacks.show=[]};if(r.Status!=="hidden"){var s=0;if(r.Status==="disappearing"){r.Status="appearing";if(l()){r.$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-"+r.options.animation+"-show");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.stop().fadeIn(i)}}else if(r.Status==="shown"){i()}}else{r.Status="appearing";var s=r.options.speed;r.bodyOverflowX=e("body").css("overflow-x");e("body").css("overflow-x","hidden");var o="tooltipster-"+r.options.animation,a="-webkit-transition-duration: "+r.options.speed+"ms; -webkit-animation-duration: "+r.options.speed+"ms; -moz-transition-duration: "+r.options.speed+"ms; -moz-animation-duration: "+r.options.speed+"ms; -o-transition-duration: "+r.options.speed+"ms; -o-animation-duration: "+r.options.speed+"ms; -ms-transition-duration: "+r.options.speed+"ms; -ms-animation-duration: "+r.options.speed+"ms; transition-duration: "+r.options.speed+"ms; animation-duration: "+r.options.speed+"ms;",f=r.options.minWidth?"min-width:"+Math.round(r.options.minWidth)+"px;":"",c=r.options.maxWidth?"max-width:"+Math.round(r.options.maxWidth)+"px;":"",h=r.options.interactive?"pointer-events: auto;":"";r.$tooltip=e('<div class="tooltipster-base '+r.options.theme+'" style="'+f+" "+c+" "+h+" "+a+'"><div class="tooltipster-content"></div></div>');if(l())r.$tooltip.addClass(o);r._content_insert();r.$tooltip.appendTo("body");r.reposition();r.options.functionReady.call(r.$el,r.$el,r.$tooltip);if(l()){r.$tooltip.addClass(o+"-show");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(i)}else{r.$tooltip.css("display","none").fadeIn(r.options.speed,i)}r._interval_set();e(t).on("scroll."+r.namespace+" resize."+r.namespace,function(){r.reposition()});if(r.options.autoClose){e("body").off("."+r.namespace);if(r.options.trigger=="hover"){if(u){setTimeout(function(){e("body").on("touchstart."+r.namespace,function(){r.hide()})},0)}if(r.options.interactive){if(u){r.$tooltip.on("touchstart."+r.namespace,function(e){e.stopPropagation()})}var p=null;r.$elProxy.add(r.$tooltip).on("mouseleave."+r.namespace+"-autoClose",function(){clearTimeout(p);p=setTimeout(function(){r.hide()},r.options.interactiveTolerance)}).on("mouseenter."+r.namespace+"-autoClose",function(){clearTimeout(p)})}else{r.$elProxy.on("mouseleave."+r.namespace+"-autoClose",function(){r.hide()})}if(r.options.hideOnClick){r.$elProxy.on("click."+r.namespace+"-autoClose",function(){r.hide()})}}else if(r.options.trigger=="click"){setTimeout(function(){e("body").on("click."+r.namespace+" touchstart."+r.namespace,function(){r.hide()})},0);if(r.options.interactive){r.$tooltip.on("click."+r.namespace+" touchstart."+r.namespace,function(e){e.stopPropagation()})}}}}if(r.options.timer>0){r.timerHide=setTimeout(function(){r.timerHide=null;r.hide()},r.options.timer+s)}}})},_interval_set:function(){var t=this;t.checkInterval=setInterval(function(){if(e("body").find(t.$el).length===0||e("body").find(t.$elProxy).length===0||t.Status=="hidden"||e("body").find(t.$tooltip).length===0){if(t.Status=="shown"||t.Status=="appearing")t.hide();t._interval_cancel()}else{if(t.options.positionTracker){var n=t._repositionInfo(t.$elProxy),r=false;if(o(n.dimension,t.elProxyPosition.dimension)){if(t.$elProxy.css("position")==="fixed"){if(o(n.position,t.elProxyPosition.position))r=true}else{if(o(n.offset,t.elProxyPosition.offset))r=true}}if(!r){t.reposition();t.options.positionTrackerCallback.call(t,t.$el)}}}},200)},_interval_cancel:function(){clearInterval(this.checkInterval);this.checkInterval=null},_content_set:function(e){if(typeof e==="object"&&e!==null&&this.options.contentCloning){e=e.clone(true)}this.Content=e},_content_insert:function(){var e=this,t=this.$tooltip.find(".tooltipster-content");if(typeof e.Content==="string"&&!e.options.contentAsHTML){t.text(e.Content)}else{t.empty().append(e.Content)}},_update:function(e){var t=this;t._content_set(e);if(t.Content!==null){if(t.Status!=="hidden"){t._content_insert();t.reposition();if(t.options.updateAnimation){if(l()){t.$tooltip.css({width:"","-webkit-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-moz-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-o-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms","-ms-transition":"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms",transition:"all "+t.options.speed+"ms, width 0ms, height 0ms, left 0ms, top 0ms"}).addClass("tooltipster-content-changing");setTimeout(function(){if(t.Status!="hidden"){t.$tooltip.removeClass("tooltipster-content-changing");setTimeout(function(){if(t.Status!=="hidden"){t.$tooltip.css({"-webkit-transition":t.options.speed+"ms","-moz-transition":t.options.speed+"ms","-o-transition":t.options.speed+"ms","-ms-transition":t.options.speed+"ms",transition:t.options.speed+"ms"})}},t.options.speed)}},t.options.speed)}else{t.$tooltip.fadeTo(t.options.speed,.5,function(){if(t.Status!="hidden"){t.$tooltip.fadeTo(t.options.speed,1)}})}}}}else{t.hide()}},_repositionInfo:function(e){return{dimension:{height:e.outerHeight(false),width:e.outerWidth(false)},offset:e.offset(),position:{left:parseInt(e.css("left")),top:parseInt(e.css("top"))}}},hide:function(n){var r=this;if(n)r.callbacks.hide.push(n);r.callbacks.show=[];clearTimeout(r.timerShow);r.timerShow=null;clearTimeout(r.timerHide);r.timerHide=null;var i=function(){e.each(r.callbacks.hide,function(e,t){t.call(r.$el)});r.callbacks.hide=[]};if(r.Status=="shown"||r.Status=="appearing"){r.Status="disappearing";var s=function(){r.Status="hidden";if(typeof r.Content=="object"&&r.Content!==null){r.Content.detach()}r.$tooltip.remove();r.$tooltip=null;e(t).off("."+r.namespace);e("body").off("."+r.namespace).css("overflow-x",r.bodyOverflowX);e("body").off("."+r.namespace);r.$elProxy.off("."+r.namespace+"-autoClose");r.options.functionAfter.call(r.$el,r.$el);i()};if(l()){r.$tooltip.clearQueue().removeClass("tooltipster-"+r.options.animation+"-show").addClass("tooltipster-dying");if(r.options.speed>0)r.$tooltip.delay(r.options.speed);r.$tooltip.queue(s)}else{r.$tooltip.stop().fadeOut(r.options.speed,s)}}else if(r.Status=="hidden"){i()}return r},show:function(e){this._showNow(e);return this},update:function(e){return this.content(e)},content:function(e){if(typeof e==="undefined"){return this.Content}else{this._update(e);return this}},reposition:function(){var n=this;if(e("body").find(n.$tooltip).length!==0){n.$tooltip.css("width","");n.elProxyPosition=n._repositionInfo(n.$elProxy);var r=null,i=e(t).width(),s=n.elProxyPosition,o=n.$tooltip.outerWidth(false),u=n.$tooltip.innerWidth()+1,a=n.$tooltip.outerHeight(false);if(n.$elProxy.is("area")){var f=n.$elProxy.attr("shape"),l=n.$elProxy.parent().attr("name"),c=e('img[usemap="#'+l+'"]'),h=c.offset().left,p=c.offset().top,d=n.$elProxy.attr("coords")!==undefined?n.$elProxy.attr("coords").split(","):undefined;if(f=="circle"){var v=parseInt(d[0]),m=parseInt(d[1]),g=parseInt(d[2]);s.dimension.height=g*2;s.dimension.width=g*2;s.offset.top=p+m-g;s.offset.left=h+v-g}else if(f=="rect"){var v=parseInt(d[0]),m=parseInt(d[1]),y=parseInt(d[2]),b=parseInt(d[3]);s.dimension.height=b-m;s.dimension.width=y-v;s.offset.top=p+m;s.offset.left=h+v}else if(f=="poly"){var w=[],E=[],S=0,x=0,T=0,N=0,C="even";for(var k=0;k<d.length;k++){var L=parseInt(d[k]);if(C=="even"){if(L>T){T=L;if(k===0){S=T}}if(L<S){S=L}C="odd"}else{if(L>N){N=L;if(k==1){x=N}}if(L<x){x=L}C="even"}}s.dimension.height=N-x;s.dimension.width=T-S;s.offset.top=p+x;s.offset.left=h+S}else{s.dimension.height=c.outerHeight(false);s.dimension.width=c.outerWidth(false);s.offset.top=p;s.offset.left=h}}var A=0,O=0,M=0,_=parseInt(n.options.offsetY),D=parseInt(n.options.offsetX),P=n.options.position;function H(){var n=e(t).scrollLeft();if(A-n<0){r=A-n;A=n}if(A+o-n>i){r=A-(i+n-o);A=i+n-o}}function B(n,r){if(s.offset.top-e(t).scrollTop()-a-_-12<0&&r.indexOf("top")>-1){P=n}if(s.offset.top+s.dimension.height+a+12+_>e(t).scrollTop()+e(t).height()&&r.indexOf("bottom")>-1){P=n;M=s.offset.top-a-_-12}}if(P=="top"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left+D-j/2;M=s.offset.top-a-_-12;H();B("bottom","top")}if(P=="top-left"){A=s.offset.left+D;M=s.offset.top-a-_-12;H();B("bottom-left","top-left")}if(P=="top-right"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top-a-_-12;H();B("bottom-right","top-right")}if(P=="bottom"){var j=s.offset.left+o-(s.offset.left+s.dimension.width);A=s.offset.left-j/2+D;M=s.offset.top+s.dimension.height+_+12;H();B("top","bottom")}if(P=="bottom-left"){A=s.offset.left+D;M=s.offset.top+s.dimension.height+_+12;H();B("top-left","bottom-left")}if(P=="bottom-right"){A=s.offset.left+s.dimension.width+D-o;M=s.offset.top+s.dimension.height+_+12;H();B("top-right","bottom-right")}if(P=="left"){A=s.offset.left-D-o-12;O=s.offset.left+D+s.dimension.width+12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A<0&&O+o>i){var I=parseFloat(n.$tooltip.css("border-width"))*2,q=o+A-I;n.$tooltip.css("width",q+"px");a=n.$tooltip.outerHeight(false);A=s.offset.left-D-q-12-I;F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A<0){A=s.offset.left+D+s.dimension.width+12;r="left"}}if(P=="right"){A=s.offset.left+D+s.dimension.width+12;O=s.offset.left-D-o-12;var F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_;if(A+o>i&&O<0){var I=parseFloat(n.$tooltip.css("border-width"))*2,q=i-A-I;n.$tooltip.css("width",q+"px");a=n.$tooltip.outerHeight(false);F=s.offset.top+a-(s.offset.top+s.dimension.height);M=s.offset.top-F/2-_}else if(A+o>i){A=s.offset.left-D-o-12;r="right"}}if(n.options.arrow){var R="tooltipster-arrow-"+P;if(n.options.arrowColor.length<1){var U=n.$tooltip.css("background-color")}else{var U=n.options.arrowColor}if(!r){r=""}else if(r=="left"){R="tooltipster-arrow-right";r=""}else if(r=="right"){R="tooltipster-arrow-left";r=""}else{r="left:"+Math.round(r)+"px;"}if(P=="top"||P=="top-left"||P=="top-right"){var z=parseFloat(n.$tooltip.css("border-bottom-width")),W=n.$tooltip.css("border-bottom-color")}else if(P=="bottom"||P=="bottom-left"||P=="bottom-right"){var z=parseFloat(n.$tooltip.css("border-top-width")),W=n.$tooltip.css("border-top-color")}else if(P=="left"){var z=parseFloat(n.$tooltip.css("border-right-width")),W=n.$tooltip.css("border-right-color")}else if(P=="right"){var z=parseFloat(n.$tooltip.css("border-left-width")),W=n.$tooltip.css("border-left-color")}else{var z=parseFloat(n.$tooltip.css("border-bottom-width")),W=n.$tooltip.css("border-bottom-color")}if(z>1){z++}var X="";if(z!==0){var V="",J="border-color: "+W+";";if(R.indexOf("bottom")!==-1){V="margin-top: -"+Math.round(z)+"px;"}else if(R.indexOf("top")!==-1){V="margin-bottom: -"+Math.round(z)+"px;"}else if(R.indexOf("left")!==-1){V="margin-right: -"+Math.round(z)+"px;"}else if(R.indexOf("right")!==-1){V="margin-left: -"+Math.round(z)+"px;"}X='<span class="tooltipster-arrow-border" style="'+V+" "+J+';"></span>'}n.$tooltip.find(".tooltipster-arrow").remove();var K='<div class="'+R+' tooltipster-arrow" style="'+r+'">'+X+'<span style="border-color:'+U+';"></span></div>';n.$tooltip.append(K)}n.$tooltip.css({top:Math.round(M)+"px",left:Math.round(A)+"px"})}return n},enable:function(){this.enabled=true;return this},disable:function(){this.hide();this.enabled=false;return this},destroy:function(){var t=this;t.hide();if(t.$el[0]!==t.$elProxy[0]){t.$elProxy.remove()}t.$el.removeData(t.namespace).off("."+t.namespace);var n=t.$el.data("tooltipster-ns");if(n.length===1){var r=null;if(t.options.restoration==="previous"){r=t.$el.data("tooltipster-initialTitle")}else if(t.options.restoration==="current"){r=typeof t.Content==="string"?t.Content:e("<div></div>").append(t.Content).html()}if(r){t.$el.attr("title",r)}t.$el.removeClass("tooltipstered").removeData("tooltipster-ns").removeData("tooltipster-initialTitle")}else{n=e.grep(n,function(e,n){return e!==t.namespace});t.$el.data("tooltipster-ns",n)}return t},elementIcon:function(){return this.$el[0]!==this.$elProxy[0]?this.$elProxy[0]:undefined},elementTooltip:function(){return this.$tooltip?this.$tooltip[0]:undefined},option:function(e,t){if(typeof t=="undefined")return this.options[e];else{this.options[e]=t;return this}},status:function(){return this.Status}};e.fn[r]=function(){var t=arguments;if(this.length===0){if(typeof t[0]==="string"){var n=true;switch(t[0]){case"setDefaults":e.extend(i,t[1]);break;default:n=false;break}if(n)return true;else return this}else{return this}}else{if(typeof t[0]==="string"){var r="#*$~&";this.each(function(){var n=e(this).data("tooltipster-ns"),i=n?e(this).data(n[0]):null;if(i){if(typeof i[t[0]]==="function"){var s=i[t[0]](t[1],t[2])}else{throw new Error('Unknown method .tooltipster("'+t[0]+'")')}if(s!==i){r=s;return false}}else{throw new Error("You called Tooltipster's \""+t[0]+'" method on an uninitialized element')}});return r!=="#*$~&"?r:this}else{var o=[],u=t[0]&&typeof t[0].multiple!=="undefined",a=u&&t[0].multiple||!u&&i.multiple,f=t[0]&&typeof t[0].debug!=="undefined",l=f&&t[0].debug||!f&&i.debug;this.each(function(){var n=false,r=e(this).data("tooltipster-ns"),i=null;if(!r){n=true}else if(a){n=true}else if(l){console.log('Tooltipster: one or more tooltips are already attached to this element: ignoring. Use the "multiple" option to attach more tooltips.')}if(n){i=new s(this,t[0]);if(!r)r=[];r.push(i.namespace);e(this).data("tooltipster-ns",r);e(this).data(i.namespace,i)}o.push(i)});if(a)return o;else return this}}};var u=!!("ontouchstart"in t);var a=false;e("body").one("mousemove",function(){a=true})})(jQuery,window,document);
admin/src/js/libs/select2.min.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ /*
2
+ SELECT 2 FORM REPLACEMNT
3
+ */
4
+ (function(a){a.fn.each2===void 0&&a.fn.extend({each2:function(b){for(var c=a([0]),d=-1,e=this.length;e>++d&&(c.context=c[0]=this[d])&&b.call(c[0],d,c)!==!1;);return this}})})(jQuery),function(a,b){"use strict";function k(a,b){for(var c=0,d=b.length;d>c;c+=1)if(l(a,b[c]))return c;return-1}function l(a,c){return a===c?!0:a===b||c===b?!1:null===a||null===c?!1:a.constructor===String?a+""==c+"":c.constructor===String?c+""==a+"":!1}function m(b,c){var d,e,f;if(null===b||1>b.length)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function n(a){return a.outerWidth(!1)-a.width()}function o(c){var d="keyup-change-value";c.bind("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.bind("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function p(c){c.bind("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function q(a,c,d){d=d||b;var e;return function(){var b=arguments;window.clearTimeout(e),e=window.setTimeout(function(){c.apply(d,b)},a)}}function r(a){var c,b=!1;return function(){return b===!1&&(c=a(),b=!0),c}}function s(a,b){var c=q(a,function(a){b.trigger("scroll-debounced",a)});b.bind("scroll",function(a){k(a.target,b.get())>=0&&c(a)})}function t(a){a[0]!==document.activeElement&&window.setTimeout(function(){var d,b=a[0],c=a.val().length;a.focus(),a.is(":visible")&&b===document.activeElement&&(b.setSelectionRange?b.setSelectionRange(c,c):b.createTextRange&&(d=b.createTextRange(),d.collapse(!1),d.select()))},0)}function u(a){a.preventDefault(),a.stopPropagation()}function v(a){a.preventDefault(),a.stopImmediatePropagation()}function w(b){if(!h){var c=b[0].currentStyle||window.getComputedStyle(b[0],null);h=a(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:c.fontSize,fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight,letterSpacing:c.letterSpacing,textTransform:c.textTransform,whiteSpace:"nowrap"}),h.attr("class","select2-sizer"),a("body").append(h)}return h.text(b.val()),h.width()}function x(b,c,d){var e,g,f=[];e=b.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0===this.indexOf("select2-")&&f.push(this)})),e=c.attr("class"),e&&(e=""+e,a(e.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(g=d(this),g&&f.push(this))})),b.attr("class",f.join(" "))}function y(a,c,d,e){var f=a.toUpperCase().indexOf(c.toUpperCase()),g=c.length;return 0>f?(d.push(e(a)),b):(d.push(e(a.substring(0,f))),d.push("<span class='select2-match'>"),d.push(e(a.substring(f,f+g))),d.push("</span>"),d.push(e(a.substring(f+g,a.length))),b)}function z(b){var c,d=0,e=null,f=b.quietMillis||100,g=b.url,h=this;return function(i){window.clearTimeout(c),c=window.setTimeout(function(){d+=1;var c=d,f=b.data,j=g,k=b.transport||a.ajax,l=b.type||"GET",m={};f=f?f.call(h,i.term,i.page,i.context):null,j="function"==typeof j?j.call(h,i.term,i.page,i.context):j,null!==e&&e.abort(),b.params&&(a.isFunction(b.params)?a.extend(m,b.params.call(h)):a.extend(m,b.params)),a.extend(m,{url:j,dataType:b.dataType,data:f,type:l,cache:!1,success:function(a){if(!(d>c)){var e=b.results(a,i.page);i.callback(e)}}}),e=k.call(h,m)},f)}}function A(c){var e,f,d=c,g=function(a){return""+a.text};a.isArray(d)&&(f=d,d={results:f}),a.isFunction(d)===!1&&(f=d,d=function(){return f});var h=d();return h.text&&(g=h.text,a.isFunction(g)||(e=d.text,g=function(a){return a[e]})),function(c){var h,e=c.term,f={results:[]};return""===e?(c.callback(d()),b):(h=function(b,d){var f,i;if(b=b[0],b.children){f={};for(i in b)b.hasOwnProperty(i)&&(f[i]=b[i]);f.children=[],a(b.children).each2(function(a,b){h(b,f.children)}),(f.children.length||c.matcher(e,g(f),b))&&d.push(f)}else c.matcher(e,g(b),b)&&d.push(b)},a(d().results).each2(function(a,b){h(b,f.results)}),c.callback(f),b)}}function B(c){var d=a.isFunction(c);return function(e){var f=e.term,g={results:[]};a(d?c():c).each(function(){var a=this.text!==b,c=a?this.text:this;(""===f||e.matcher(f,c))&&g.results.push(a?this:{id:this,text:this})}),e.callback(g)}}function C(b){if(a.isFunction(b))return!0;if(!b)return!1;throw Error("formatterName must be a function or a falsy value")}function D(b){return a.isFunction(b)?b():b}function E(b){var c=0;return a.each(b,function(a,b){b.children?c+=E(b.children):c++}),c}function F(a,c,d,e){var h,i,j,k,m,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||1>e.tokenSeparators.length)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(m=e.tokenSeparators[j],i=a.indexOf(m),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+m.length),h.length>0&&(h=e.createSearchChoice(h,c),h!==b&&null!==h&&e.id(h)!==b&&null!==e.id(h))){for(g=!1,j=0,k=c.length;k>j;j++)if(l(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:b}function G(b,c){var d=function(){};return d.prototype=new b,d.prototype.constructor=d,d.prototype.parent=b.prototype,d.prototype=a.extend(d.prototype,c),d}if(window.Select2===b){var c,d,e,f,g,h,i,j;c={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(a){switch(a=a.which?a.which:a){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:return!0}return!1},isControl:function(a){var b=a.which;switch(b){case c.SHIFT:case c.CTRL:case c.ALT:return!0}return a.metaKey?!0:!1},isFunctionKey:function(a){return a=a.which?a.which:a,a>=112&&123>=a}},j=a(document),g=function(){var a=1;return function(){return a++}}(),j.bind("mousemove",function(a){i={x:a.pageX,y:a.pageY}}),d=G(Object,{bind:function(a){var b=this;return function(){a.apply(b,arguments)}},init:function(c){var d,e,f=".select2-results";this.opts=c=this.prepareOpts(c),this.id=c.id,c.element.data("select2")!==b&&null!==c.element.data("select2")&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(c.element.attr("id")||"autogen"+g()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=r(function(){return c.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(D(c.containerCss)),this.container.addClass(D(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){a(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(D(c.dropdownCssClass)),this.dropdown.data("select2",this),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),e.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),p(this.results),this.dropdown.delegate(f,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),s(80,this.results),this.dropdown.delegate(f,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),u(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),u(a))}),o(e),e.bind("keyup-change input paste",this.bind(this.updateResults)),e.bind("focus",function(){e.addClass("select2-focused")}),e.bind("blur",function(){e.removeClass("select2-focused")}),this.dropdown.delegate(f,"mouseup",this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.bind("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(c.element.is(":disabled")||c.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var a=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),a!==b&&(a.container.remove(),a.dropdown.remove(),a.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(c){var d,e,f,g;if(d=c.element,"select"===d.get(0).tagName.toLowerCase()&&(this.select=e=c.element),e&&a.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in c)throw Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),c=a.extend({},{populateResults:function(d,e,f){var g,k=this.opts.id,l=this;g=function(d,e,h){var i,j,m,n,o,p,q,r,s,t;for(d=c.sortResults(d,e,f),i=0,j=d.length;j>i;i+=1)m=d[i],o=m.disabled===!0,n=!o&&k(m)!==b,p=m.children&&m.children.length>0,q=a("<li></li>"),q.addClass("select2-results-dept-"+h),q.addClass("select2-result"),q.addClass(n?"select2-result-selectable":"select2-result-unselectable"),o&&q.addClass("select2-disabled"),p&&q.addClass("select2-result-with-children"),q.addClass(l.opts.formatResultCssClass(m)),r=a(document.createElement("div")),r.addClass("select2-result-label"),t=c.formatResult(m,r,f,l.opts.escapeMarkup),t!==b&&r.html(t),q.append(r),p&&(s=a("<ul></ul>"),s.addClass("select2-result-sub"),g(m.children,s,h+1),q.append(s)),q.data("select2-data",m),e.append(q)},g(e,d,0)}},a.fn.select2.defaults,c),"function"!=typeof c.id&&(f=c.id,c.id=function(a){return a[f]}),a.isArray(c.element.data("select2Tags"))){if("tags"in c)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+c.element.attr("id");c.tags=c.element.data("select2Tags")}if(e?(c.query=this.bind(function(c){var g,h,i,e={results:[],more:!1},f=c.term;i=function(a,b){var d;a.is("option")?c.matcher(f,a.text(),a)&&b.push({id:a.attr("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:l(a.attr("disabled"),"disabled")}):a.is("optgroup")&&(d={text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")},a.children().each2(function(a,b){i(b,d.children)}),d.children.length>0&&b.push(d))},g=d.children(),this.getPlaceholder()!==b&&g.length>0&&(h=g[0],""===a(h).text()&&(g=g.not(h))),g.each2(function(a,b){i(b,e.results)}),c.callback(e)}),c.id=function(a){return a.id},c.formatResultCssClass=function(a){return a.css}):"query"in c||("ajax"in c?(g=c.element.data("ajax-url"),g&&g.length>0&&(c.ajax.url=g),c.query=z.call(c.element,c.ajax)):"data"in c?c.query=A(c.data):"tags"in c&&(c.query=B(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(a){return{id:a,text:a}}),c.initSelection===b&&(c.initSelection=function(d,e){var f=[];a(m(d.val(),c.separator)).each(function(){var d=this,e=this,g=c.tags;a.isFunction(g)&&(g=g()),a(g).each(function(){return l(this.id,d)?(e=this.text,!1):b}),f.push({id:d,text:e})}),e(f)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");return c},monitorSource:function(){var b,a=this.opts.element;a.bind("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),b=this.bind(function(){var a,b;a="disabled"!==this.opts.element.attr("disabled"),b="readonly"===this.opts.element.attr("readonly"),a=a&&!b,this.enabled!==a&&(a?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(D(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(D(this.opts.dropdownCssClass))}),a.bind("propertychange.select2 DOMAttrModified.select2",b),"undefined"!=typeof WebKitMutationObserver&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(a){a.forEach(b)}),this.propertyObserver.observe(a.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(b){b=b||{},b=a.extend({},b,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(b),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){this.enabled||(this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled"))},disable:function(){this.enabled&&(this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled"))},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var o,p,q,b=this.container.offset(),c=this.container.outerHeight(!1),d=this.container.outerWidth(!1),e=this.dropdown.outerHeight(!1),f=a(window).scrollLeft()+a(window).width(),g=a(window).scrollTop()+a(window).height(),h=b.top+c,i=b.left,j=g>=h+e,k=b.top-e>=this.body().scrollTop(),l=this.dropdown.outerWidth(!1),m=f>=i+l,n=this.dropdown.hasClass("select2-drop-above");"static"!==this.body().css("position")&&(o=this.body().offset(),h-=o.top,i-=o.left),n?(p=!0,!k&&j&&(p=!1)):(p=!1,!j&&k&&(p=!0)),m||(i=b.left+d-l),p?(h=b.top-e,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),q=a.extend({top:h,left:i,width:d},D(this.opts.dropdownCss)),this.dropdown.css(q)},shouldOpen:function(){var b;return this.opened()?!1:(b=a.Event("opening"),this.opts.element.trigger(b),!b.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){function h(){return{width:Math.max(document.documentElement.scrollWidth,a(window).width()),height:Math.max(document.documentElement.scrollHeight,a(window).height())}}var f,b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),f=a("#select2-drop-mask"),0==f.length&&(f=a(document.createElement("div")),f.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),f.hide(),f.appendTo(this.body()),f.bind("mousedown touchstart",function(){var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),f.css(h()),f.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var g=this;this.container.parents().add(window).each(function(){a(this).bind(d+" "+c+" "+e,function(){a("#select2-drop-mask").css(h()),g.positionDropdown()})}),this.focusSearch()},close:function(){if(this.opened()){var b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.parents().add(window).each(function(){a(this).unbind(c).unbind(d).unbind(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("close"))}},clearSearch:function(){},getMaximumSelectionSize:function(){return D(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var d,e,f,g,h,i,j,c=this.results;if(e=this.highlight(),!(0>e)){if(0==e)return c.scrollTop(0),b;d=this.findHighlightableChoices(),f=a(d[e]),g=f.offset().top+f.outerHeight(!0),e===d.length-1&&(j=c.find("li.select2-more-results"),j.length>0&&(g=j.offset().top+j.outerHeight(!0))),h=c.offset().top+c.outerHeight(!0),g>h&&c.scrollTop(c.scrollTop()+(g-h)),i=f.offset().top-c.offset().top,0>i&&"none"!=f.css("display")&&c.scrollTop(c.scrollTop()+i)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)"),this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&c.length>d;){d+=b;var e=a(c[d]);if(e.hasClass("select2-result-selectable")&&!e.hasClass("select2-disabled")&&!e.hasClass("select2-selected")){this.highlight(d);break}}},highlight:function(c){var e,f,d=this.findHighlightableChoices();return 0===arguments.length?k(d.filter(".select2-highlighted")[0],d.get()):(c>=d.length&&(c=d.length-1),0>c&&(c=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),e=a(d[c]),e.addClass("select2-highlighted"),this.ensureHighlightVisible(),f=e.data("select2-data"),f&&this.opts.element.trigger({type:"highlight",val:this.id(f),choice:f}),b)},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(b){var c=a(b.target).closest(".select2-result-selectable");if(c.length>0&&!c.is(".select2-highlighted")){var d=this.findHighlightableChoices();this.highlight(d.index(c))}else 0==c.length&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),e=this.resultsPage+1,f=this,g=this.search.val(),h=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),this.opts.loadMorePadding>=c&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:g,page:e,context:h,matcher:this.opts.matcher,callback:this.bind(function(c){f.opened()&&(f.opts.populateResults.call(this,a,c.results,{term:g,page:e,context:h}),f.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).text(f.opts.formatLoadMore(e+1)),window.setTimeout(function(){f.loadMoreIfNeeded()},10)):b.remove(),f.positionDropdown(),f.resultsPage=e,f.context=c.context)})})))},tokenize:function(){},updateResults:function(c){function m(){e.scrollTop(0),d.removeClass("select2-active"),h.positionDropdown()}function n(a){e.html(a),m()}var g,i,d=this.search,e=this.results,f=this.opts,h=this,j=d.val(),k=a.data(this.container,"select2-last-term");if((c===!0||!k||!l(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){var o=this.getMaximumSelectionSize();if(o>=1&&(g=this.data(),a.isArray(g)&&g.length>=o&&C(f.formatSelectionTooBig,"formatSelectionTooBig")))return n("<li class='select2-selection-limit'>"+f.formatSelectionTooBig(o)+"</li>"),b;if(d.val().length<f.minimumInputLength)return C(f.formatInputTooShort,"formatInputTooShort")?n("<li class='select2-no-results'>"+f.formatInputTooShort(d.val(),f.minimumInputLength)+"</li>"):n(""),b;if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return C(f.formatInputTooLong,"formatInputTooLong")?n("<li class='select2-no-results'>"+f.formatInputTooLong(d.val(),f.maximumInputLength)+"</li>"):n(""),b;f.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+f.formatSearching()+"</li>"),d.addClass("select2-active"),i=this.tokenize(),i!=b&&null!=i&&d.val(i),this.resultsPage=1,f.query({element:f.element,term:d.val(),page:this.resultsPage,context:null,matcher:f.matcher,callback:this.bind(function(g){var i;return this.opened()?(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==d.val()&&(i=this.opts.createSearchChoice.call(null,d.val(),g.results),i!==b&&null!==i&&h.id(i)!==b&&null!==h.id(i)&&0===a(g.results).filter(function(){return l(h.id(this),h.id(i))}).length&&g.results.unshift(i)),0===g.results.length&&C(f.formatNoMatches,"formatNoMatches")?(n("<li class='select2-no-results'>"+f.formatNoMatches(d.val())+"</li>"),b):(e.empty(),h.opts.populateResults.call(this,e,g.results,{term:d.val(),page:this.resultsPage,context:null}),g.more===!0&&C(f.formatLoadMore,"formatLoadMore")&&(e.append("<li class='select2-more-results'>"+h.opts.escapeMarkup(f.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){h.loadMoreIfNeeded()},10)),this.postprocessResults(g,c),m(),this.opts.element.trigger({type:"loaded",data:g}),b)):(this.search.removeClass("select2-active"),b)})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){t(this.search)},selectHighlighted:function(a){var b=this.highlight(),c=this.results.find(".select2-highlighted"),d=c.closest(".select2-result").data("select2-data");d&&(this.highlight(b),this.onSelect(d,a))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function c(){var c,d,e,f,g;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(c=this.opts.element.attr("style"),c!==b)for(d=c.split(";"),f=0,g=d.length;g>f;f+=1)if(e=d[f].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/),null!==e&&e.length>=1)return e[1];return"resolve"===this.opts.width?(c=this.opts.element.css("width"),c.indexOf("%")>0?c:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return a.isFunction(this.opts.width)?this.opts.width():this.opts.width}var d=c.call(this);null!==d&&this.container.css("width",d)}}),e=G(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},disable:function(){this.enabled&&(this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled"))},enable:function(){this.enabled||(this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled"))},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(a.Event("open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),t(this.focusser))},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var d,e=this.container,f=this.dropdown,h=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=d=e.find(".select2-choice"),this.focusser=e.find(".select2-focusser"),this.focusser.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id")),this.search.bind("keydown",this.bind(function(a){if(this.enabled){if(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)return u(a),b;switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),u(a),b;case c.TAB:case c.ENTER:return this.selectHighlighted(),u(a),b;case c.ESC:return this.cancel(a),u(a),b}}})),this.search.bind("blur",this.bind(function(){document.activeElement===this.body().get(0)&&window.setTimeout(this.bind(function(){this.search.focus()}),0)})),this.focusser.bind("keydown",this.bind(function(a){return!this.enabled||a.which===c.TAB||c.isControl(a)||c.isFunctionKey(a)||a.which===c.ESC?b:this.opts.openOnEnter===!1&&a.which===c.ENTER?(u(a),b):a.which==c.DOWN||a.which==c.UP||a.which==c.ENTER&&this.opts.openOnEnter?(this.open(),u(a),b):a.which==c.DELETE||a.which==c.BACKSPACE?(this.opts.allowClear&&this.clear(),u(a),b):b})),o(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(a){this.opened()||(this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),u(a))})),d.delegate("abbr","mousedown",this.bind(function(a){this.enabled&&(this.clear(),v(a),this.close(),this.selection.focus())})),d.bind("mousedown",this.bind(function(a){h=!0,this.opened()?this.close():this.enabled&&this.open(),u(a),h=!1})),f.bind("mousedown",this.bind(function(){this.search.focus()})),d.bind("focus",this.bind(function(a){u(a)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(a){var b=this.selection.data("select2-data");b&&(this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),a!==!1&&(this.opts.element.trigger({type:"removed",val:this.id(b),choice:b}),this.triggerChange({removed:b})))},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text())this.close(),this.setPlaceholder();else{var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.setPlaceholder())})}},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments);return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(b,c){var d=b.find(":selected");a.isFunction(c)&&c({id:d.attr("value"),text:d.text(),element:d})}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=c.val(),f=null;b.query({matcher:function(a,c,d){var g=l(e,b.id(d));return g&&(f=d),g},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},getPlaceholder:function(){return this.select&&""!==this.select.find("option").first().text()?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(""===this.opts.element.val()&&a!==b){if(this.select&&""!==this.select.find("option:first").text())return;this.selection.find("span").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(a,c,d){var e=0,f=this,g=!0;if(this.findHighlightableChoices().each2(function(a,c){return l(f.id(c.data("select2-data")),f.opts.element.val())?(e=a,!1):b}),d!==!1&&this.highlight(e),c===!0){var h=this.opts.minimumResultsForSearch;g=0>h?!1:E(a.results)>=h,this.showSearch(g)}},showSearch:function(b){this.showSearchInput=b,this.dropdown.find(".select2-search")[b?"removeClass":"addClass"]("select2-search-hidden"),a(this.dropdown,this.container)[b?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(a,b){var c=this.opts.element.val();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),this.close(),b&&b.noFocus||this.selection.focus(),l(c,this.id(a))||this.triggerChange()},updateSelection:function(a){var d,c=this.selection.find("span");this.selection.data("select2-data",a),c.empty(),d=this.opts.formatSelection(a,c),d!==b&&c.append(this.opts.escapeMarkup(d)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.selection.find("abbr").show()},val:function(){var a,c=!1,d=null,e=this;if(0===arguments.length)return this.opts.element.val();if(a=arguments[0],arguments.length>1&&(c=arguments[1]),this.select)this.select.val(a).find(":selected").each2(function(a,b){return d={id:b.attr("value"),text:b.text(),element:b.get(0)},!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange();else{if(this.opts.initSelection===b)throw Error("cannot call val() if initSelection() is not defined");if(!a&&0!==a)return this.clear(c),c&&this.triggerChange(),b;this.opts.element.val(a),this.opts.initSelection(this.opts.element,function(a){e.opts.element.val(a?e.id(a):""),e.updateSelection(a),e.setPlaceholder(),c&&e.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(a&&""!==a?(this.opts.element.val(a?this.id(a):""),this.updateSelection(a)):this.clear(),b)}}),f=G(d,{createContainer:function(){var b=a(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments);return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var c=[];a.find(":selected").each2(function(a,b){c.push({id:b.attr("value"),text:b.text(),element:b[0]})}),b(c)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=m(c.val(),b.separator),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return l(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){d(f)}:a.noop})}),b},initContainer:function(){var e,d=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=e=this.container.find(d),this.search.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.search.attr("id")),this.search.bind("input paste",this.bind(function(){this.enabled&&(this.opened()||this.open())})),this.search.bind("keydown",this.bind(function(a){if(this.enabled){if(a.which===c.BACKSPACE&&""===this.search.val()){this.close();var d,f=e.find(".select2-search-choice-focus");if(f.length>0)return this.unselect(f.first()),this.search.width(10),u(a),b;d=e.find(".select2-search-choice:not(.select2-locked)"),d.length>0&&d.last().addClass("select2-search-choice-focus")}else e.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),u(a),b;case c.ENTER:case c.TAB:return this.selectHighlighted(),u(a),b;case c.ESC:return this.cancel(a),u(a),b}if(a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.BACKSPACE&&a.which!==c.ESC){if(a.which===c.ENTER){if(this.opts.openOnEnter===!1)return;if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return}this.open(),(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)&&u(a),a.which===c.ENTER&&u(a)}}})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(a){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),a.stopImmediatePropagation()})),this.container.delegate(d,"mousedown",this.bind(function(b){this.enabled&&(a(b.target).closest(".select2-search-choice").length>0||(this.clearPlaceholder(),this.open(),this.focusSearch(),b.preventDefault()))
5
+ })),this.container.delegate(d,"focus",this.bind(function(){this.enabled&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.clearSearch()},enable:function(){this.enabled||(this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled"))},disable:function(){this.enabled&&(this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0))},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var c=this;this.opts.initSelection.call(null,this.opts.element,function(a){a!==b&&null!==a&&(c.updateSelection(a),c.close(),c.clearSearch())})}},clearSearch:function(){var a=this.getPlaceholder();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(this.getMaxSearchWidth())):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),this.opts.element.trigger(a.Event("open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(b){var c=[],d=[],e=this;a(b).each(function(){0>k(e.id(this),c)&&(c.push(e.id(this)),d.push(this))}),b=d,this.selection.find(".select2-search-choice").remove(),a(b).each(function(){e.addSelectedChoice(this)}),e.postprocessResults()},tokenize:function(){var a=this.search.val();a=this.opts.tokenizer(a,this.data(),this.bind(this.onSelect),this.opts),null!=a&&a!=b&&(this.search.val(a),a.length>0&&this.open())},onSelect:function(a,b){this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:a}),b&&b.noFocus||this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(c){var j,d=!c.locked,e=a("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),f=a("<li class='select2-search-choice select2-locked'><div></div></li>"),g=d?e:f,h=this.id(c),i=this.getVal();j=this.opts.formatSelection(c,g.find("div")),j!=b&&g.find("div").replaceWith("<div>"+this.opts.escapeMarkup(j)+"</div>"),d&&g.find(".select2-search-choice-close").bind("mousedown",u).bind("click dblclick",this.bind(function(b){this.enabled&&(a(b.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(a(b.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),u(b))})).bind("focus",this.bind(function(){this.enabled&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),g.data("select2-data",c),g.insertBefore(this.searchContainer),i.push(h),this.setVal(i)},unselect:function(a){var c,d,b=this.getVal();if(a=a.closest(".select2-search-choice"),0===a.length)throw"Invalid argument: "+a+". Must be .select2-search-choice";c=a.data("select2-data"),c&&(d=k(this.id(c),b),d>=0&&(b.splice(d,1),this.setVal(b),this.select&&this.postprocessResults()),a.remove(),this.opts.element.trigger({type:"removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))},postprocessResults:function(){var a=this.getVal(),b=this.results.find(".select2-result"),c=this.results.find(".select2-result-with-children"),d=this;b.each2(function(b,c){var e=d.id(c.data("select2-data"));k(e,a)>=0&&(c.addClass("select2-selected"),c.find(".select2-result-selectable").addClass("select2-selected"))}),c.each2(function(a,b){b.is(".select2-result-selectable")||0!==b.find(".select2-result-selectable:not(.select2-selected)").length||b.addClass("select2-selected")}),-1==this.highlight()&&d.highlight(0)},getMaxSearchWidth:function(){return this.selection.width()-n(this.search)},resizeSearch:function(){var a,b,c,d,e,f=n(this.search);a=w(this.search)+10,b=this.search.offset().left,c=this.selection.width(),d=this.selection.offset().left,e=c-(b-d)-f,a>e&&(e=c-f),40>e&&(e=c-f),0>=e&&(e=a),this.search.width(e)},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),m(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){0>k(this,c)&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},val:function(){var c,d=!1,f=this;if(0===arguments.length)return this.getVal();if(c=arguments[0],arguments.length>1&&(d=arguments[1]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange(),b;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange();else{if(this.opts.initSelection===b)throw Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a(b).map(f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var b=[],c=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){b.push(c.opts.id(a(this).data("select2-data")))}),this.setVal(b),this.triggerChange()},data:function(c){var e,d=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(c||(c=[]),e=a.map(c,function(a){return d.opts.id(a)}),this.setVal(e),this.updateSelection(c),this.clearSearch(),b)}}),a.fn.select2=function(){var d,g,h,i,c=Array.prototype.slice.call(arguments,0),j=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(0===c.length||"object"==typeof c[0])d=0===c.length?{}:a.extend({},c[0]),d.element=a(this),"select"===d.element.get(0).tagName.toLowerCase()?i=d.element.attr("multiple"):(i=d.multiple||!1,"tags"in d&&(d.multiple=i=!0)),g=i?new f:new e,g.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(0>k(c[0],j))throw"Unknown method: "+c[0];if(h=b,g=a(this).data("select2"),g===b)return;if(h="container"===c[0]?g.container:g[c[0]].apply(g,c.slice(1)),h!==b)return!1}}),h===b?this:h},a.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(a,b,c,d){var e=[];return y(a.text,c.term,e,d),e.join("")},formatSelection:function(a){return a?a.text:b},sortResults:function(a){return a},formatResultCssClass:function(){return b},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(a,b){var c=b-a.length;return"Please enter "+c+" more character"+(1==c?"":"s")},formatInputTooLong:function(a,b){var c=a.length-b;return"Please delete "+c+" character"+(1==c?"":"s")},formatSelectionTooBig:function(a){return"You can only select "+a+" item"+(1==a?"":"s")},formatLoadMore:function(){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(a){return a.id},matcher:function(a,b){return(""+b).toUpperCase().indexOf((""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:F,escapeMarkup:function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;","/":"&#47;"};return(a+"").replace(/[&<>"'\/\\]/g,function(a){return b[a[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null}},window.Select2={query:{ajax:z,local:A,tags:B},util:{debounce:q,markMatch:y},"class":{"abstract":d,single:e,multi:f}}}}(jQuery);
admin/src/js/modules/sticky.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var alm = alm || {};
2
+
3
+ /*
4
+ * alm.attachSticky
5
+ */
6
+ alm.attachSticky = (el, anchor, top = 0) => {
7
+ let h = el.offsetHeight + top, // height of sticky el
8
+ anchorOffset = anchor.getBoundingClientRect(),
9
+ anchor_top = anchorOffset.top,
10
+ w_height = window.innerHeight, // Window height
11
+ el_height = el.offsetHeight; // element height
12
+
13
+ if(w_height > (el_height + top)){
14
+ // If container height > than sticky height
15
+ if(anchor_top <= top) {
16
+ el.classList.add('attached');
17
+ } else {
18
+ if(anchor_top > top) {
19
+ el.classList.remove('attached');
20
+ }
21
+ }
22
+ }
23
+ };
24
+
25
+
26
+
27
+ /*
28
+ * alm.resizeSticky
29
+ */
30
+ alm.resizeSticky = () => {
31
+ let sticky = document.getElementById('cnkt-sticky');
32
+ let el = document.getElementById('cnkt-sticky-wrapper');
33
+ let atts = window.getComputedStyle(el);
34
+ sticky.style.width = atts.width;
35
+ }
36
+
37
+
38
+
39
+ /*
40
+ * initSticky
41
+ */
42
+ const initSticky = () => {
43
+ if(document.getElementById("cnkt-sticky-wrapper")){
44
+ const sticky_el = document.getElementById('cnkt-sticky');
45
+ const sticky_anchor = document.getElementById('cnkt-sticky-wrapper');
46
+ const sticky_top = 70; // The position the sticky should stick
47
+
48
+ // Scroll
49
+ window.addEventListener('scroll', function(e) {
50
+ alm.attachSticky(sticky_el, sticky_anchor, sticky_top);
51
+ });
52
+ // Resize
53
+ window.addEventListener('resize', function(e) {
54
+ alm.resizeSticky();
55
+ });
56
+ // Init
57
+ alm.resizeSticky();
58
+ alm.attachSticky(sticky_el, sticky_anchor, sticky_top);
59
+
60
+ }
61
+ }
62
+
63
+ window.onload = function(){
64
+ initSticky();
65
+ }
admin/src/scss/_variables.scss ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $gutter: 25px;
2
+ $padding: 15px;
3
+ $grey: #555;
4
+ $green: #8ed074;
5
+ $green_hover: #57bda4;
6
+ $yellow: #ffffe8;
7
+ $yellow_dark: #e4e4c8;
8
+ $red: #e06464;
9
+ $light_grey: #f7f7f7;
10
+ $light_border: #f1f1f1;
11
+ $grey_blue: #f8f9fb;
12
+ $border: #e1e1e1;
13
+ $border_hover: #ccc;
14
+ $radius: 3px;
15
+
16
+ $small: 480px;
admin/src/scss/admin.scss ADDED
@@ -0,0 +1,3924 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css';
2
+ @import 'libs/tooltipster';
3
+ @import 'libs/select2';
4
+ @import 'variables';
5
+ @import 'partials/header';
6
+ @import 'partials/pro-listing';
7
+ @import 'partials/codemirror';
8
+ @import 'partials/sidebar';
9
+ @import 'partials/alm-settings-feedback';
10
+ @import 'partials/select2';
11
+ @import 'partials/shortcode-builder';
12
+ @import 'partials/woocommerce';
13
+ @import 'partials/builder-option-toggle';
14
+
15
+ body.toplevel_page_ajax-load-more,
16
+ body.ajax-load-more_page_ajax-load-more-repeaters,
17
+ body.ajax-load-more_page_ajax-load-more-shortcode-builder,
18
+ body.ajax-load-more_page_ajax-load-more-add-ons,
19
+ body.ajax-load-more_page_ajax-load-more-extensions,
20
+ body.ajax-load-more_page_ajax-load-more-help,
21
+ body.ajax-load-more_page_ajax-load-more-licenses,
22
+ body.ajax-load-more_page_ajax-load-more-cache,
23
+ body.ajax-load-more_page_ajax-load-more-filters,
24
+ body.ajax-load-more_page_ajax-load-more-pro,
25
+ body.ajax-load-more_page_ajax-load-more-go-pro,
26
+ body.ajax-load-more_page_ajax-load-more-woocommerce {
27
+ //background-color: $light_grey;
28
+ #wpcontent {
29
+ padding-left: 0;
30
+ padding-bottom: 20px;
31
+ //background-color: #efefef;
32
+ }
33
+ #wpbody-content {
34
+ padding-bottom: 0;
35
+ }
36
+ }
37
+ body.toplevel_page_ajax-load-more,
38
+ body.ajax-load-more_page_ajax-load-more-repeaters,
39
+ body.ajax-load-more_page_ajax-load-more-shortcode-builder,
40
+ body.ajax-load-more_page_ajax-load-more-add-ons,
41
+ body.ajax-load-more_page_ajax-load-more-extensions,
42
+ body.ajax-load-more_page_ajax-load-more-help,
43
+ body.ajax-load-more_page_ajax-load-more-licenses,
44
+ body.ajax-load-more_page_ajax-load-more-cache,
45
+ body.ajax-load-more_page_ajax-load-more-filters,
46
+ body.ajax-load-more_page_ajax-load-more-pro,
47
+ body.ajax-load-more_page_ajax-load-more-go-pro,
48
+ body.ajax-load-more_page_ajax-load-more-woocommerce {
49
+ //background: #efefef;
50
+ #wpfooter {
51
+ padding-top: 0;
52
+ padding-bottom: 0;
53
+ line-height: 42px;
54
+ background: $grey_blue;
55
+ border-top: 1px solid $border;
56
+ position: fixed;
57
+ bottom: 0;
58
+ z-index: 1100;
59
+ p {
60
+ line-height: 42px;
61
+ }
62
+ }
63
+ }
64
+ .main-cnkt-wrap {
65
+ padding: 0 !important;
66
+ margin: 0 !important;
67
+ }
68
+ .ajax-load-more-inner-wrapper {
69
+ padding: $padding $padding $padding * 3;
70
+ display: block;
71
+ clear: both;
72
+ max-width: 1440px;
73
+ position: relative;
74
+ }
75
+
76
+ .ajax-load-more .alm-transient {
77
+ padding: 6px 12px;
78
+ p {
79
+ margin: 0.5em 0;
80
+ a {
81
+ font-weight: 600;
82
+ }
83
+ }
84
+ a.button {
85
+ position: static;
86
+ vertical-align: inherit !important;
87
+ }
88
+ button {
89
+ transform: translateY(-50%);
90
+ top: 50%;
91
+ }
92
+ }
93
+
94
+ // Styled Buttons
95
+ #wpcontent .ajax-load-more {
96
+ .button:not(.button-primary),
97
+ .button.button-secondary {
98
+ border-color: #ccc;
99
+ color: #444;
100
+ background-color: #f3f5f6;
101
+ &:hover,
102
+ &:active,
103
+ &:focus {
104
+ color: #222;
105
+ border-color: #999;
106
+ background-color: #f1f1f1;
107
+ box-shadow: none;
108
+ }
109
+ &:focus {
110
+ background-color: #e7e7e7;
111
+ }
112
+ }
113
+ }
114
+
115
+ /*
116
+ * Admin - Popup Generator
117
+ *
118
+ * @since 1.0
119
+ */
120
+
121
+ .ajax-load-more * {
122
+ box-sizing: border-box;
123
+ }
124
+ .forceColors {
125
+ background: #fff !important;
126
+ }
127
+ .offscreen {
128
+ position: absolute;
129
+ left: -9999px;
130
+ }
131
+ .ajax-load-more {
132
+ font-size: 14px;
133
+ color: #666;
134
+ position: relative;
135
+ max-width: 100%;
136
+ }
137
+ #alm-help.ajax-load-more {
138
+ max-width: 1600px;
139
+ }
140
+ .ajax-load-more img {
141
+ max-width: 100%;
142
+ }
143
+ #alm-container {
144
+ overflow: hidden;
145
+ padding: 15px 10px 140px !important;
146
+ }
147
+ #alm-settings {
148
+ .admin-select {
149
+ width: 100%;
150
+ display: block;
151
+ padding: 0 0 25px;
152
+ margin: -10px 0 0;
153
+ .select2-container {
154
+ width: 40%;
155
+ min-width: 40%;
156
+ display: inline-block;
157
+ vertical-align: top;
158
+ }
159
+ }
160
+ }
161
+
162
+ /* Saved Settings */
163
+
164
+ #alm-settings .row.alm-save-settings {
165
+ padding-bottom: 5px !important;
166
+ }
167
+
168
+ #alm-settings form {
169
+ h2 {
170
+ padding: 20px 20px 5px 5px;
171
+ margin: 0;
172
+ font-weight: 700;
173
+ border-radius: 2px 2px 0 0;
174
+ &:first-of-type {
175
+ padding-top: 0;
176
+ }
177
+ + p {
178
+ color: #999;
179
+ padding: 0 20px 15px 5px;
180
+ margin: 0;
181
+ font-size: 14px;
182
+ }
183
+ }
184
+ }
185
+
186
+ // File location on Theme Repeaters
187
+ .ajax-load-more .file-location {
188
+ border: 1px solid $border;
189
+ background: #fff;
190
+ margin: 0;
191
+ padding: 0;
192
+ line-height: 1;
193
+ display: flex;
194
+ flex-wrap: nowrap;
195
+ font-family: Consolas, monaco, monospace;
196
+ border-radius: 3px;
197
+ p,
198
+ code {
199
+ padding: 12px 16px;
200
+ line-height: 18px;
201
+ font-size: 12px;
202
+ }
203
+ p {
204
+ background: $light_grey;
205
+ color: #555;
206
+ font-weight: 600;
207
+ margin: 0;
208
+ width: auto;
209
+ display: inline;
210
+ border-right: 1px solid $border;
211
+ }
212
+ code {
213
+ color: #999;
214
+ background: transparent;
215
+ cursor: help;
216
+ }
217
+ }
218
+
219
+ .ajax-load-more code {
220
+ background: #fcf3d0;
221
+ }
222
+ .ajax-load-more p {
223
+ display: block;
224
+ color: #777;
225
+ width: 100%;
226
+ display: block;
227
+ clear: both;
228
+ text-transform: none;
229
+ padding: 0;
230
+ margin: 0 0 15px;
231
+ }
232
+
233
+ .ajax-load-more p,
234
+ .ajax-load-more li,
235
+ .ajax-load-more input,
236
+ .ajax-load-more textarea,
237
+ .ajax-load-more label {
238
+ font-size: 14px;
239
+ &.lg {
240
+ font-size: 16px;
241
+ }
242
+ }
243
+ textarea#_alm_layouts_css {
244
+ height: 240px;
245
+ }
246
+ a.layout-hover {
247
+ width: 20px !important;
248
+ height: 20px !important;
249
+ background: #ccc;
250
+ display: inline-block;
251
+ position: relative;
252
+ }
253
+ a.layout-hover img {
254
+ position: absolute;
255
+ left: 100%;
256
+ top: 0;
257
+ z-index: 999;
258
+ opacity: 0;
259
+ filter: alpha(opacity=0);
260
+ }
261
+ a.layout-hover:hover img {
262
+ position: absolute;
263
+ left: 100%;
264
+ top: 0;
265
+ z-index: 999;
266
+ opacity: 1;
267
+ filter: alpha(opacity=100);
268
+ }
269
+
270
+ .ajax-load-more p.highlight {
271
+ background-color: #fffbd4;
272
+ color: #333;
273
+ padding: 5px 10px;
274
+ border-radius: 3px;
275
+ margin: -5px 0 10px;
276
+ }
277
+
278
+ .ajax-load-more h1 {
279
+ font-weight: 600;
280
+ line-height: 28px;
281
+ }
282
+ .ajax-load-more h1,
283
+ .ajax-load-more h3,
284
+ .ajax-load-more h4 {
285
+ color: #444;
286
+ margin-top: 0;
287
+ }
288
+ .ajax-load-more h4 + p {
289
+ margin-top: -6px;
290
+ }
291
+ .ajax-load-more p.small {
292
+ font-size: 12px;
293
+ margin-top: -10px;
294
+ opacity: 0.7;
295
+ }
296
+ .ajax-load-more.shortcode-builder .major-publishing-actions {
297
+ position: relative;
298
+ }
299
+ .ajax-load-more p.small.reset-shortcode-builder {
300
+ position: absolute;
301
+ right: 15px;
302
+ top: 50%;
303
+ transform: translateY(-45%);
304
+ text-align: right;
305
+ margin: 0;
306
+ padding: 0;
307
+ display: none;
308
+ width: auto;
309
+ opacity: 1;
310
+ font-size: 12px;
311
+ }
312
+ .ajax-load-more p.small.reset-shortcode-builder a {
313
+ text-decoration: none;
314
+ }
315
+
316
+ /* Expand Collapse Headings */
317
+ .ajax-load-more h3.heading {
318
+ font-weight: 700;
319
+ padding: 15px 10px 15px 38px !important;
320
+ line-height: normal !important;
321
+ margin: 0 !important;
322
+ color: $grey;
323
+ cursor: pointer;
324
+ width: 100%;
325
+ position: relative;
326
+ font-size: 16px;
327
+ background: $light_grey;
328
+ border-bottom: 1px solid $border;
329
+ }
330
+ .ajax-load-more h3.heading:hover:after,
331
+ .ajax-load-more h3.heading:focus:after {
332
+ color: #ccc;
333
+ }
334
+ .ajax-load-more h3.heading:hover,
335
+ .ajax-load-more h3.heading:focus {
336
+ color: #222;
337
+ outline: none;
338
+ }
339
+ .ajax-load-more h3.heading:after {
340
+ font-family: 'FontAwesome';
341
+ content: '\f056';
342
+ color: $border;
343
+ position: absolute;
344
+ left: 13px;
345
+ top: 16px;
346
+ height: 20px;
347
+ width: 20px;
348
+ }
349
+ .ajax-load-more h3.heading.open:after {
350
+ content: '\f055';
351
+ }
352
+ .ajax-load-more h3.heading.open {
353
+ border-bottom-color: transparent;
354
+ }
355
+
356
+ /* Expand/Collapse all rows */
357
+ .ajax-load-more {
358
+ .toggle-all {
359
+ position: static;
360
+ top: -21px;
361
+ right: 20px;
362
+ width: auto;
363
+ display: inline-block;
364
+ font-size: 11px;
365
+ text-transform: uppercase;
366
+ border-radius: 3px;
367
+ padding: 0 12px 0 10px;
368
+ height: 38px;
369
+ line-height: 37px;
370
+ background: #fff;
371
+ border: 1px solid $border;
372
+ color: #777;
373
+ cursor: pointer;
374
+ z-index: 20;
375
+ margin-bottom: 10px;
376
+ overflow: hidden;
377
+ @media screen and (min-width: 768px) {
378
+ position: absolute;
379
+ }
380
+ }
381
+ .toggle-all:hover {
382
+ color: #ca5252;
383
+ }
384
+ .toggle-all .inner-wrap {
385
+ position: relative;
386
+ padding-left: 16px;
387
+ line-height: 24px;
388
+ }
389
+ .toggle-all .expand {
390
+ display: none;
391
+ }
392
+ .toggle-all .collapse {
393
+ display: inline-block;
394
+ }
395
+ .toggle-all em {
396
+ font-style: normal;
397
+ }
398
+ .toggle-all.closed .expand {
399
+ display: inline-block;
400
+ }
401
+ .toggle-all.closed .collapse {
402
+ display: none;
403
+ }
404
+ .toggle-all .inner-wrap:before {
405
+ font-family: 'FontAwesome';
406
+ content: '\f068';
407
+ font-size: 10px;
408
+ position: absolute;
409
+ left: 0;
410
+ top: -5px;
411
+ }
412
+ .toggle-all.closed .inner-wrap:before {
413
+ content: '\f067';
414
+ }
415
+ }
416
+ #alm-container.ajax-load-more .toggle-all {
417
+ display: none;
418
+ }
419
+
420
+ #alm-builder {
421
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
422
+ }
423
+
424
+ a.button-small {
425
+ text-decoration: none;
426
+ font-size: 12px;
427
+ padding: 7px 10px;
428
+ display: inline-block;
429
+ background-color: #eaf6fb;
430
+ border: 1px solid #b9d2de;
431
+ color: #333;
432
+ line-height: 1.1;
433
+ border-radius: 2px;
434
+ &:hover,
435
+ &:focus {
436
+ color: #222;
437
+ background-color: #d9edf5;
438
+ text-decoration: none;
439
+ border-color: #98b2be;
440
+ }
441
+ }
442
+
443
+ .ajax-load-more ul {
444
+ padding: 0;
445
+ margin: 0;
446
+ list-style: none;
447
+ }
448
+ #alm-builder li,
449
+ .forceColors li {
450
+ padding: 0 5% 0 0;
451
+ margin: 0 0 5px;
452
+ width: 48.666%;
453
+ clear: both;
454
+ display: inline-block;
455
+ vertical-align: top;
456
+ overflow: visible;
457
+ position: relative;
458
+ }
459
+
460
+ .ajax-load-more label.full {
461
+ display: block;
462
+ clear: both;
463
+ width: 100%;
464
+ color: #444;
465
+ font-weight: 600;
466
+ padding: 0 0 10px;
467
+ cursor: default;
468
+ font-size: 12px;
469
+ text-transform: uppercase;
470
+ }
471
+ .ajax-load-more .border-top {
472
+ display: block;
473
+ border-top: 1px solid #efefef;
474
+ width: 100%;
475
+ clear: both;
476
+ margin: 0 0 20px;
477
+ padding: 20px 0 0 !important;
478
+ overflow: visible;
479
+ position: relative;
480
+ }
481
+ .ajax-load-more .border-top.controls {
482
+ padding: 0 !important;
483
+ }
484
+ .ajax-load-more .border-top.controls button {
485
+ margin-top: 20px !important;
486
+ }
487
+
488
+ .ajax-load-more .border-top.highlighted {
489
+ background-color: #feffe3;
490
+ padding: 15px !important;
491
+ border: 1px solid #eeefd4;
492
+ }
493
+
494
+ .ajax-load-more .alm-settings-nav {
495
+ margin: 0 0 5px;
496
+ padding: 0;
497
+ overflow: hidden;
498
+ position: relative;
499
+ width: calc(100% + 40px);
500
+ top: -20px;
501
+ left: -20px;
502
+ border-bottom: 1px solid #ebebeb;
503
+ background: $light_grey;
504
+ border-radius: 3px 3px 0 0;
505
+ }
506
+ .alm-settings-nav li {
507
+ float: left;
508
+ margin: 0;
509
+ padding: 0;
510
+ font-weight: 600;
511
+ background: none;
512
+ font-size: 13px;
513
+ }
514
+
515
+ .alm-settings-nav a {
516
+ text-decoration: none;
517
+ padding: 8px 16px 8px 16px;
518
+ border-left: 1px solid #ebebeb;
519
+ display: block;
520
+ }
521
+ .alm-settings-nav a:hover {
522
+ color: #fff;
523
+ background-color: #ff5a58;
524
+ }
525
+ .alm-settings-nav li:first-of-type a {
526
+ border: none;
527
+ border-radius: 3px 0 0 0;
528
+ }
529
+
530
+ #meta-query-relation {
531
+ margin: 10px 0 0;
532
+ }
533
+ #meta-query-relation .inner {
534
+ margin: 5px 0 0 !important;
535
+ }
536
+ #alm-meta-key .meta-query-wrap,
537
+ .taxonomy-wrap {
538
+ padding: 15px;
539
+ border: 1px solid #efefef;
540
+ margin: 20px 0 0;
541
+ position: relative;
542
+ border-radius: 2px;
543
+ }
544
+ .meta-query-wrap.removing,
545
+ .taxonomy-wrap.removing {
546
+ background-color: #f5d0d0;
547
+ }
548
+ #alm-meta-key .meta-query-wrap-first .meta-query-wrap {
549
+ border: none;
550
+ background-color: transparent;
551
+ padding: 0;
552
+ margin: 0;
553
+ }
554
+ #meta-key .border-top {
555
+ border: none !important;
556
+ }
557
+ .row .controls {
558
+ display: block;
559
+ clear: both;
560
+ padding: 20px 0 10px;
561
+ overflow: hidden;
562
+ }
563
+ .row.taxonomy .controls {
564
+ padding-bottom: 20px;
565
+ }
566
+ .row.taxonomy .highlighted {
567
+ margin-bottom: 0 !important;
568
+ }
569
+
570
+ .meta-query-wrap .remove-meta-query,
571
+ .taxonomy-wrap .remove-tax-query {
572
+ position: absolute;
573
+ right: 7px;
574
+ top: 7px;
575
+ width: 24px;
576
+ height: 24px;
577
+ line-height: 24px;
578
+ text-align: center;
579
+ font-weight: 400;
580
+ font-size: 17px;
581
+ background-color: transparent;
582
+ color: #666;
583
+ text-decoration: none;
584
+ border-radius: 2px;
585
+ &:hover,
586
+ &:hover {
587
+ background-color: #cb2222;
588
+ color: #fff;
589
+ }
590
+ }
591
+
592
+ .ajax-load-more .meta-query-wrap .border-top:first-of-type {
593
+ padding: 0 0 0 !important;
594
+ border: none;
595
+ }
596
+
597
+ .ajax-load-more #taxonomy-extended,
598
+ .ajax-load-more #nav-controls,
599
+ .ajax-load-more #seo-extended,
600
+ .ajax-load-more #meta-query-relation,
601
+ .ajax-load-more #tax-query-relation,
602
+ .ajax-load-more .comments_extras,
603
+ .ajax-load-more #users-extended,
604
+ .ajax-load-more .taxonomy-extended,
605
+ .ajax-load-more #paging-controls-nav {
606
+ display: none;
607
+ overflow: hidden;
608
+ }
609
+ .ajax-load-more .taxonomy-extended {
610
+ padding-top: 20px;
611
+ }
612
+ .ajax-load-more #tax-query-relation {
613
+ margin-top: 20px;
614
+ }
615
+ .ajax-load-more .taxonomy-wrap {
616
+ display: none;
617
+ position: relative;
618
+ }
619
+ .ajax-load-more .row .wrap .inner .ajax-load-more p.warning {
620
+ color: #d24646;
621
+ font-size: 13px;
622
+ border-left: 3px solid #d24646;
623
+ margin: 0;
624
+ padding: 0 0 0 10px;
625
+ }
626
+ .ajax-load-more .row .wrap .inner.taxonomy {
627
+ padding-bottom: 0;
628
+ }
629
+
630
+ .ajax-load-more p.warning-callout {
631
+ background-color: #eaf6fb;
632
+ border-left: 6px solid #4e99bf;
633
+ color: #333;
634
+ font-size: 12px;
635
+ margin: 0;
636
+ display: block;
637
+ padding: 18px 100px 18px 18px;
638
+ border-radius: 3px;
639
+ margin: 10px;
640
+ width: auto;
641
+ line-height: 1.55;
642
+ position: relative;
643
+ a {
644
+ color: #0071ac;
645
+ }
646
+ a.button-small {
647
+ position: absolute;
648
+ right: 14px;
649
+ top: 14px;
650
+ font-size: 12px;
651
+ display: inline-block;
652
+ background-color: rgba(255, 255, 255, 0.75);
653
+ margin: 0 0 0 10px;
654
+ &:hover,
655
+ &:focus {
656
+ background-color: #fff;
657
+ }
658
+ }
659
+ strong {
660
+ display: inline-block;
661
+ font-weight: normal;
662
+ font-family: Consolas, monaco, monospace;
663
+ background-color: #fff;
664
+ padding: 1px 6px 0;
665
+ border-radius: 2px;
666
+ }
667
+ }
668
+ .ajax-load-more p.warning-callout.notify {
669
+ background-color: #da5858;
670
+ border-color: #b94848;
671
+ color: #fff;
672
+ strong {
673
+ background-color: #9a4343;
674
+ color: #fff;
675
+ }
676
+ }
677
+
678
+ .ajax-load-more label,
679
+ .ajax-load-more input,
680
+ .ajax-load-more select,
681
+ .ajax-load-more textarea {
682
+ font-size: 14px;
683
+ padding: 5px 8px;
684
+ width: auto;
685
+ margin-top: 0;
686
+ display: inline-block;
687
+ clear: both;
688
+ border-radius: 3px;
689
+ color: $grey;
690
+ box-shadow: none;
691
+ }
692
+ .ajax-load-more input[type='checkbox'],
693
+ .ajax-load-more input[type='radio'] {
694
+ width: 1rem;
695
+ }
696
+
697
+ .controls button.disabled {
698
+ opacity: 0.5;
699
+ }
700
+
701
+ .ajax-load-more textarea._alm_repeater {
702
+ font-family: Consolas, monaco, monospace;
703
+ font-size: 13px;
704
+ line-height: 19px;
705
+ padding: 10px;
706
+ }
707
+ .ajax-load-more textarea._alm_repeater:focus {
708
+ color: #222;
709
+ }
710
+
711
+ .ajax-load-more label {
712
+ padding: 5px 0;
713
+ border-radius: 0;
714
+ }
715
+
716
+ .checkboxes {
717
+ }
718
+ .checkboxes input,
719
+ .radio input {
720
+ margin-top: 2px;
721
+ }
722
+ .checkboxes input,
723
+ .checkboxes label,
724
+ .radio input,
725
+ .radio label {
726
+ float: left;
727
+ width: auto;
728
+ margin-right: 10px;
729
+ padding: 0;
730
+ clear: none;
731
+ }
732
+ .radio input {
733
+ margin-left: 3px;
734
+ }
735
+ .ajax-load-more textarea,
736
+ .ajax-load-more input[type='text'],
737
+ .ajax-load-more input[type='number'] {
738
+ padding: 10px 12px;
739
+ line-height: 1.3;
740
+ border: 1px solid $border;
741
+ width: 60%;
742
+ }
743
+ .ajax-load-more input[type='text'].full {
744
+ width: 100%;
745
+ }
746
+
747
+ .ajax-load-more .wrap-30 {
748
+ width: 32.333%;
749
+ padding-right: 3%;
750
+ display: inline-block;
751
+ vertical-align: top;
752
+ }
753
+ .ajax-load-more .wrap-30.wrap-50 {
754
+ width: 48.6666%;
755
+ }
756
+ .ajax-load-more .wrap-30.wrap-50.padding-top {
757
+ padding-top: 15px;
758
+ }
759
+ .ajax-load-more .wrap-30 input[type='text'].sm,
760
+ .ajax-load-more .wrap-30 .select2-container {
761
+ width: 100%;
762
+ margin: 0;
763
+ }
764
+
765
+ .ajax-load-more input[type='number'].sm {
766
+ width: 100px;
767
+ }
768
+
769
+ .ajax-load-more ::-webkit-input-placeholder {
770
+ color: #999;
771
+ font-style: italic;
772
+ }
773
+
774
+ .ajax-load-more :-moz-placeholder {
775
+ /* Firefox 18- */
776
+ color: #999;
777
+ font-style: italic;
778
+ }
779
+
780
+ .ajax-load-more ::-moz-placeholder {
781
+ /* Firefox 19+ */
782
+ color: #999;
783
+ font-style: italic;
784
+ }
785
+
786
+ .ajax-load-more :-ms-input-placeholder {
787
+ color: #999;
788
+ font-style: italic;
789
+ }
790
+
791
+ .ajax-load-more input[type='text'],
792
+ .ajax-load-more input[type='number'],
793
+ .ajax-load-more input[type='email'],
794
+ .ajax-load-more textarea {
795
+ background: $light_grey;
796
+ }
797
+ .ajax-load-more .repeaters input[type='text'] {
798
+ padding: 9px 10px;
799
+ }
800
+ .ajax-load-more input[type='number'] {
801
+ height: auto;
802
+ }
803
+
804
+ .ajax-load-more input.disabled-input {
805
+ opacity: 0.5;
806
+ filter: alpha(opacity=50);
807
+ cursor: not-allowed;
808
+ background: $light_grey !important;
809
+ border-color: #ccc !important;
810
+ box-shadow: none !important;
811
+ }
812
+ .ajax-load-more input[type='text']:focus,
813
+ .ajax-load-more input[type='number']:focus,
814
+ .ajax-load-more input[type='email']:focus,
815
+ .ajax-load-more textarea:focus {
816
+ border-color: #bbbbbb;
817
+ box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
818
+ background: $light_grey;
819
+ }
820
+
821
+ .checkboxes label {
822
+ margin-right: 5px;
823
+ }
824
+
825
+ .ajax-load-more .one_half {
826
+ display: inline-block;
827
+ width: 48%;
828
+ margin: 0 -2px 1% 2%;
829
+ vertical-align: top;
830
+ }
831
+ .ajax-load-more .one_half:first-of-type {
832
+ margin: 0 2% 1% 0;
833
+ }
834
+
835
+ // 2018 Grid
836
+ .ajax-load-more .alm-row {
837
+ display: block;
838
+ width: 100%;
839
+ &:after {
840
+ content: '';
841
+ clear: both;
842
+ display: table;
843
+ }
844
+ &--margin-btm {
845
+ margin-bottom: $padding;
846
+ }
847
+ &--margin-btm-lg {
848
+ margin-bottom: $gutter;
849
+ }
850
+ .column {
851
+ width: 100%;
852
+ float: none;
853
+ padding: 0 $padding;
854
+ &--half {
855
+ width: 50%;
856
+ float: left;
857
+ }
858
+ &--one-third {
859
+ width: 33.333%;
860
+ float: left;
861
+ }
862
+ &--two-third {
863
+ width: 66.666%;
864
+ float: left;
865
+ }
866
+ &--one-fourth {
867
+ width: 25%;
868
+ float: left;
869
+ }
870
+ @media screen and (max-width: $small) {
871
+ &--half,
872
+ &--one-third {
873
+ float: none;
874
+ width: 100%;
875
+ }
876
+ }
877
+ }
878
+ }
879
+
880
+ /* --------------------------------------------------------------------------- */
881
+ /* Row */
882
+ /* --------------------------------------------------------------------------- */
883
+
884
+ .ajax-load-more .row {
885
+ padding: 0 !important;
886
+ margin: 10px 0 0;
887
+ height: auto;
888
+ width: 100%;
889
+ display: block;
890
+ overflow: hidden;
891
+ clear: both;
892
+ border: 1px solid $border;
893
+ border-radius: $radius;
894
+ &.no-brd {
895
+ border: none !important;
896
+ padding: 0 !important;
897
+ }
898
+ }
899
+ .ajax-load-more#alm-repeaters .row {
900
+ overflow: visible;
901
+ }
902
+ .admin.ajax-load-more .row,
903
+ .forceColors .ajax-load-more .row {
904
+ border-color: $border;
905
+ }
906
+ .admin.ajax-load-more .repeaters .row:hover,
907
+ .admin.ajax-load-more.shortcode-builder .row:hover {
908
+ border-color: #d9d9d9;
909
+ box-shadow: 0 0 0 3px $light_grey;
910
+ }
911
+ .admin.ajax-load-more .row:first-of-type {
912
+ margin-top: 20px;
913
+ padding-top: 0;
914
+ }
915
+ .ajax-load-more .intro {
916
+ height: auto;
917
+ width: 100%;
918
+ display: block;
919
+ overflow: hidden;
920
+ }
921
+
922
+ /* Jump Menu */
923
+
924
+ .pop-up-jump {
925
+ display: block;
926
+ width: 100%;
927
+ .jump-menu-wrap {
928
+ position: relative;
929
+ float: right;
930
+ width: 30%;
931
+ }
932
+ .jump-menu-wrap .select2-container {
933
+ width: 100% !important;
934
+ margin-bottom: 15px;
935
+ position: relative;
936
+ top: -5px;
937
+ }
938
+ .intro-wrap {
939
+ position: relative;
940
+ float: left;
941
+ width: 65%;
942
+ padding-right: 5%;
943
+ }
944
+ }
945
+ .admin.ajax-load-more .jump-menu {
946
+ display: none;
947
+ }
948
+
949
+ /* Table of Contents */
950
+ #cnkt-sticky {
951
+ }
952
+ #cnkt-sticky.attached {
953
+ position: fixed;
954
+ width: auto;
955
+ top: 70px;
956
+ }
957
+ .table-of-contents .select2-container {
958
+ width: 100%;
959
+ }
960
+ .table-of-contents ul {
961
+ margin: 0 !important;
962
+ }
963
+ .table-of-contents li {
964
+ width: auto !important;
965
+ display: inline-block;
966
+ vertical-align: top;
967
+ padding: 0;
968
+ margin: 5px 5px 5px 0;
969
+ }
970
+
971
+ .ajax-load-more .expand-wrap {
972
+ display: block;
973
+ }
974
+ #alm-examples.ajax-load-more .expand-wrap {
975
+ padding: 10px 10px 0;
976
+ }
977
+ .ajax-load-more .expand-wrap hr {
978
+ border: 0;
979
+ height: 0;
980
+ border-top: 1px solid #efefef;
981
+ border-bottom: 1px solid rgba(255, 255, 255, 0.3);
982
+ }
983
+ hr.indented {
984
+ // Indented as fake padding in shortcode builder
985
+ width: calc(100% - 40px);
986
+ margin-left: 20px;
987
+ }
988
+ .ajax-load-more .section-title {
989
+ float: left;
990
+ padding: 20px 0 25px 20px;
991
+ width: 35%;
992
+ &.full {
993
+ width: 100%;
994
+ float: none;
995
+ padding-right: 25px;
996
+ }
997
+ p:last-of-type {
998
+ margin-bottom: 0;
999
+ }
1000
+ small {
1001
+ font-size: 12px;
1002
+ padding-top: 10px;
1003
+ display: block;
1004
+ }
1005
+ h4 {
1006
+ font-size: 14px;
1007
+ font-weight: 600;
1008
+ margin-bottom: 15px;
1009
+ }
1010
+ p,
1011
+ .wrap p.descriptor {
1012
+ font-size: 13px;
1013
+ line-height: 20px;
1014
+ color: #999;
1015
+ }
1016
+ }
1017
+ .ajax-load-more .wrap p.descriptor {
1018
+ margin: 0;
1019
+ font-style: italic;
1020
+ }
1021
+ .ajax-load-more .section-title p .fa.tooltip:hover,
1022
+ .form-table label .fa.tooltip:hover {
1023
+ opacity: 1;
1024
+ }
1025
+ .ajax-load-more .fa.tooltip {
1026
+ display: inline-block;
1027
+ margin: 0 2px;
1028
+ text-decoration: none;
1029
+ cursor: help;
1030
+ position: relative;
1031
+ top: 0;
1032
+ background: #fff;
1033
+ border-radius: 100%;
1034
+ width: 20px;
1035
+ height: 20px;
1036
+ text-align: center;
1037
+ line-height: 20px;
1038
+ box-shadow: 0 -1px 1px #ccc;
1039
+ }
1040
+ .cta h3 .fa.tooltip {
1041
+ top: 1px;
1042
+ }
1043
+ .ajax-load-more .section-title p span,
1044
+ .admin.ajax-load-more.settings .form-table p.notify span {
1045
+ display: inline-block;
1046
+ padding: 0 4px;
1047
+ border-radius: 2px;
1048
+ background: $light_grey;
1049
+ border: 1px solid #efefef;
1050
+ color: #666;
1051
+ }
1052
+ .ajax-load-more .section-title h4 {
1053
+ margin: 0 0 10px;
1054
+ }
1055
+
1056
+ .ajax-load-more .repeaters .section-title,
1057
+ .ajax-load-more .repeaters .row .wrap {
1058
+ width: 100%;
1059
+ float: none;
1060
+ padding: 0;
1061
+ }
1062
+ .ajax-load-more .repeaters .section-title p {
1063
+ padding-left: 0 !important;
1064
+ }
1065
+ .ajax-load-more label.template-title {
1066
+ padding: 3px 2px 0;
1067
+ margin: 0;
1068
+ display: block;
1069
+ &.has-margin-btm {
1070
+ margin-bottom: 10px;
1071
+ }
1072
+ }
1073
+
1074
+ .ajax-load-more label input._alm_repeater_alias {
1075
+ height: auto;
1076
+ line-height: normal !important;
1077
+ }
1078
+
1079
+ .preload_amount,
1080
+ .cache_id,
1081
+ .alternate_template_wrap,
1082
+ .cta_template_wrap,
1083
+ .restapi_options,
1084
+ .filters_options,
1085
+ .next-page-content,
1086
+ .acf-options,
1087
+ .masonry-options,
1088
+ .progress-bar-options,
1089
+ .hide-section {
1090
+ display: none;
1091
+ }
1092
+
1093
+ .ajax-load-more .row .wrap {
1094
+ padding: 20px 20px 0 5%;
1095
+ margin: 0;
1096
+ border: none;
1097
+ width: 65%;
1098
+ float: left;
1099
+ position: relative;
1100
+ }
1101
+ .ajax-load-more .row .wrap.full {
1102
+ float: none;
1103
+ width: 100%;
1104
+ padding: 0 15px 15px 36px;
1105
+ }
1106
+
1107
+ /* ***********************************
1108
+ -- Shortcode Output
1109
+ **************************************/
1110
+ .ajax-load-more .output-wrap {
1111
+ margin: 20px 0 0;
1112
+ background: #ff5a58;
1113
+ width: 100%;
1114
+ display: block;
1115
+ border-radius: 3px;
1116
+ textarea {
1117
+ background-color: transparent !important;
1118
+ resize: none !important;
1119
+ height: auto !important;
1120
+ min-height: 100px;
1121
+ border: none !important;
1122
+ width: 100% !important;
1123
+ display: block;
1124
+ border-radius: 3px;
1125
+ font-family: monospace;
1126
+ font-size: 12px;
1127
+ line-height: 18px;
1128
+ color: #fff;
1129
+ cursor: pointer;
1130
+ }
1131
+ }
1132
+ .ajax-load-more .row .wrap.output {
1133
+ display: block !important;
1134
+ }
1135
+ .ajax-load-more .row .wrap .inner {
1136
+ padding: 0 0 20px;
1137
+ }
1138
+ .ajax-load-more .row .wrap .inner.half {
1139
+ padding: 0 0 20px;
1140
+ width: 49.333%;
1141
+ display: inline-block;
1142
+ }
1143
+
1144
+ /*
1145
+ * Insert Shortcode Button
1146
+ *
1147
+ * @since 1.0
1148
+ */
1149
+
1150
+ #insert.insert_alm {
1151
+ background: #fff !important;
1152
+ color: #ca5252 !important;
1153
+ border: none;
1154
+ font-size: 14px !important;
1155
+ font-weight: 600;
1156
+ padding: 8px 13px;
1157
+ display: inline-block;
1158
+ text-align: center;
1159
+ margin: 15px 0;
1160
+ float: left;
1161
+ line-height: normal !important;
1162
+ height: auto !important;
1163
+ box-shadow: inset 0 -15px 15px rgba(0, 0, 0, 0.1), 0 1px 0px #ca5252;
1164
+ text-shadow: none !important;
1165
+ max-width: 20%;
1166
+ border-radius: 2px;
1167
+ }
1168
+ .admin.ajax-load-more #insert.insert_alm {
1169
+ display: none;
1170
+ }
1171
+
1172
+ #insert.insert_alm:hover {
1173
+ box-shadow: inset 0 -15px 15px rgba(0, 0, 0, 0.1), 0 0 3px rgba(255, 255, 255, 1);
1174
+ }
1175
+ #insert.insert_alm:active {
1176
+ background: #d0413f !important;
1177
+ box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1);
1178
+ color: #fff !important;
1179
+ }
1180
+
1181
+ .ajax-load-more .clear {
1182
+ clear: both;
1183
+ height: auto;
1184
+ overflow: hidden;
1185
+ width: 100%;
1186
+ padding: 0;
1187
+ margin: 0;
1188
+ }
1189
+
1190
+ /*
1191
+ * Admin Screens - Setting pages
1192
+ *
1193
+ * @since 1.0
1194
+ */
1195
+
1196
+ .form-table label {
1197
+ display: block;
1198
+ clear: both;
1199
+ float: none;
1200
+ padding: 0 0 8px;
1201
+ max-width: 90%;
1202
+ cursor: pointer !important;
1203
+ line-height: 1.5;
1204
+ }
1205
+ .form-table input[type='radio'],
1206
+ .form-table input[type='checkbox'] {
1207
+ vertical-align: top;
1208
+ margin-top: 0 !important;
1209
+ max-width: 8%;
1210
+ }
1211
+ .form-table label + textarea {
1212
+ margin-top: 10px;
1213
+ }
1214
+ .form-table label span,
1215
+ #alm-shortcode-builder-form label span.description {
1216
+ font-size: 13px;
1217
+ color: #999;
1218
+ padding-top: 10px;
1219
+ }
1220
+ #alm-shortcode-builder-form label span.description {
1221
+ display: block;
1222
+ padding-top: 1px;
1223
+ padding-bottom: 5px;
1224
+ }
1225
+
1226
+ .form-table .template-tags {
1227
+ overflow: hidden;
1228
+ border-left: 6px solid #dfd8c2;
1229
+ padding: 15px;
1230
+ background: #fff9ea;
1231
+ margin: 20px 0 0;
1232
+ border-radius: 3px;
1233
+ }
1234
+ .form-table .template-tags h4,
1235
+ .form-table .template-tags li {
1236
+ margin: 0 0 8px;
1237
+ padding: 0;
1238
+ font-size: 13px;
1239
+ }
1240
+ .form-table .template-tags li {
1241
+ margin: 2px 0;
1242
+ }
1243
+ .form-table .template-tags ul {
1244
+ margin: 0;
1245
+ padding: 0;
1246
+ }
1247
+ .form-table .template-tags pre {
1248
+ display: inline-block;
1249
+ min-width: 120px;
1250
+ padding: 0;
1251
+ margin: 0;
1252
+ color: #888;
1253
+ }
1254
+
1255
+ .admin.ajax-load-more .form-table textarea {
1256
+ clear: both;
1257
+ display: inline-block;
1258
+ float: none;
1259
+ width: 100%;
1260
+ }
1261
+ .admin.ajax-load-more textarea.disabled,
1262
+ .admin.ajax-load-more input.disabled {
1263
+ opacity: 0.9;
1264
+ filter: alpha(opacity=90);
1265
+ cursor: default;
1266
+ border: 1px solid #ccc;
1267
+ background: #efefef;
1268
+ color: #666;
1269
+ text-shadow: 1px 1px 0 #fff;
1270
+ resize: none;
1271
+ }
1272
+
1273
+ .admin.ajax-load-more .form-table input[type='radio'],
1274
+ .admin.ajax-load-more .form-table input[type='checkbox'] {
1275
+ margin-right: 10px;
1276
+ margin-top: 0 !important;
1277
+ }
1278
+
1279
+ .admin.ajax-load-more.settings input[type='text'],
1280
+ .admin.ajax-load-more.settings input[type='number'],
1281
+ .admin.ajax-load-more.settings .select2-container {
1282
+ margin-top: 10px;
1283
+ }
1284
+ .admin.ajax-load-more .alm-btn-wrap {
1285
+ text-align: left;
1286
+ }
1287
+ .admin.ajax-load-more .ajax-load-more-wrap {
1288
+ position: relative;
1289
+ top: 5px;
1290
+ padding: 15px;
1291
+ border: 1px dashed $border;
1292
+ display: inline-block;
1293
+ margin-top: 10px;
1294
+ margin-bottom: 10px;
1295
+ &.preview-pane.none {
1296
+ display: none;
1297
+ }
1298
+ button {
1299
+ margin: 0 !important;
1300
+ }
1301
+ > span {
1302
+ display: block;
1303
+ font-size: 10px;
1304
+ line-height: 1;
1305
+ opacity: 0.7;
1306
+ padding: 0 0 15px;
1307
+ text-transform: uppercase;
1308
+ }
1309
+ }
1310
+
1311
+ .admin.ajax-load-more.settings .ajax-load-more-wrap.pages {
1312
+ }
1313
+ .admin.ajax-load-more.settings .ajax-load-more-wrap.pages li {
1314
+ font-size: 14px;
1315
+ }
1316
+ .admin.ajax-load-more.settings .ajax-load-more-wrap.pages li a {
1317
+ text-decoration: none;
1318
+ }
1319
+
1320
+ /* Table Overrides */
1321
+ .admin.ajax-load-more.settings .form-table td,
1322
+ .admin.ajax-load-more.settings .form-table th {
1323
+ padding: 20px;
1324
+ line-height: 1.5;
1325
+ }
1326
+ .admin.ajax-load-more.settings .form-table td {
1327
+ padding-right: 20px;
1328
+ }
1329
+ .admin.ajax-load-more.settings .form-table th {
1330
+ padding-left: 20px;
1331
+ font-weight: 700;
1332
+ background-color: $light_grey;
1333
+ border-right: 1px solid $border;
1334
+ }
1335
+ .admin.ajax-load-more.settings .form-table p {
1336
+ margin-top: 0;
1337
+ }
1338
+ .admin.ajax-load-more.settings .form-table p.notify {
1339
+ font-size: 12px;
1340
+ padding: 5px 0;
1341
+ margin: 5px 0 20px;
1342
+ overflow: hidden;
1343
+ color: #999;
1344
+ }
1345
+
1346
+ .ajax-load-more h2.addon-title {
1347
+ font-size: 19px !important;
1348
+ line-height: 24px;
1349
+ font-weight: 700 !important;
1350
+ color: #444 !important;
1351
+ padding: 0;
1352
+ margin: 0 0 10px;
1353
+ }
1354
+ .ajax-load-more p.addon-intro {
1355
+ font-size: 16px !important;
1356
+ line-height: 22px !important;
1357
+ color: #999 !important;
1358
+ }
1359
+
1360
+ .ajax-load-more h3.add-on-title {
1361
+ padding: 0 0 10px;
1362
+ margin: 0 0 20px;
1363
+ border-bottom: 1px solid #efefef;
1364
+ }
1365
+ .ajax-load-more h3 {
1366
+ margin-bottom: 10px;
1367
+ }
1368
+ .ajax-load-more h3.add-on-title,
1369
+ .ajax-load-more .cnkt-sidebar h3 {
1370
+ padding: 0 0 10px;
1371
+ margin: 0 0 20px;
1372
+ border-bottom: 1px solid $border;
1373
+ }
1374
+ .ajax-load-more p.desc,
1375
+ .ajax-load-more p.writeable-title {
1376
+ padding: 0 0 2px 28px;
1377
+ }
1378
+ .ajax-load-more p.desc {
1379
+ font-size: 13px !important;
1380
+ line-height: 19px !important;
1381
+ }
1382
+ .ajax-load-more p.writeable-title {
1383
+ position: relative;
1384
+ }
1385
+ .ajax-load-more p.writeable-title i {
1386
+ position: absolute !important;
1387
+ left: 0 !important;
1388
+ top: 1px !important;
1389
+ }
1390
+
1391
+ .ajax-load-more p.back2top {
1392
+ font-size: 14px;
1393
+ margin: 0;
1394
+ padding: 0;
1395
+ text-align: center;
1396
+ }
1397
+ .ajax-load-more p.back2top a {
1398
+ text-decoration: none;
1399
+ display: block;
1400
+ }
1401
+
1402
+ .saved-response,
1403
+ p.loading {
1404
+ font-size: 12px;
1405
+ padding: 0;
1406
+ color: #999;
1407
+ background: none;
1408
+ transition: padding 0.2s ease;
1409
+ display: inline-block;
1410
+ width: auto;
1411
+ position: relative;
1412
+ top: 5px;
1413
+ left: 15px;
1414
+ }
1415
+
1416
+ .saved-error {
1417
+ color: #e03e3e;
1418
+ }
1419
+ .saved-response em {
1420
+ color: #333;
1421
+ display: block;
1422
+ padding: 5px 0;
1423
+ }
1424
+
1425
+ .saved {
1426
+ color: #90be59;
1427
+ font-weight: 700;
1428
+ }
1429
+
1430
+ p.loading {
1431
+ position: static;
1432
+ }
1433
+ .saved-response.loading,
1434
+ p.loading,
1435
+ .alm-dropdown ul li a.updating {
1436
+ background: url('../../img/loader.gif') no-repeat left center;
1437
+ padding-left: 24px;
1438
+ }
1439
+
1440
+ .alm-dropdown ul li a.updating {
1441
+ background-position: 9px 54%;
1442
+ padding-left: 34px;
1443
+ }
1444
+
1445
+ .restore-default {
1446
+ float: right;
1447
+ margin: 19px 20px 0 0;
1448
+ font-size: 12px;
1449
+ }
1450
+ .restore-default a {
1451
+ text-decoration: none;
1452
+ }
1453
+
1454
+ table.highlight {
1455
+ background: #fff !important;
1456
+ }
1457
+
1458
+ /* Columns */
1459
+ .ajax-load-more .cnkt-main {
1460
+ width: 70%;
1461
+ float: left;
1462
+ background: #fff;
1463
+ padding: $gutter;
1464
+ border: 1px solid $border;
1465
+ border-radius: $radius;
1466
+ &.stylefree {
1467
+ padding: 0;
1468
+ background-color: transparent;
1469
+ border: none;
1470
+ }
1471
+ }
1472
+ .ajax-load-more .cnkt-main .group {
1473
+ background: #fff;
1474
+ padding: 20px;
1475
+ margin: 0 0 20px;
1476
+ position: relative;
1477
+ display: block;
1478
+ clear: both;
1479
+ }
1480
+ .ajax-load-more .cnkt-main .group,
1481
+ .ajax-load-more .cnkt-sidebar .cta,
1482
+ .call-out.light {
1483
+ border: 1px solid $border;
1484
+ box-shadow: 0 0 5px rgba(#000, 0.1);
1485
+ &.no-shadow {
1486
+ box-shadow: none;
1487
+ }
1488
+ }
1489
+
1490
+ .ajax-load-more .cnkt-main .repeater-listing {
1491
+ border: 1px solid $border;
1492
+ background-color: #fff;
1493
+ border-radius: $radius;
1494
+ padding: $gutter;
1495
+ position: relative;
1496
+ .toggle-all {
1497
+ right: -1px;
1498
+ top: -45px;
1499
+ }
1500
+ .flexbox-wrap {
1501
+ margin: 0;
1502
+ }
1503
+ }
1504
+
1505
+ .ajax-load-more .cnkt-main.full {
1506
+ width: 100%;
1507
+ float: none;
1508
+ }
1509
+ .ajax-load-more .cnkt-main h2,
1510
+ .ajax-load-more .cnkt-main h3,
1511
+ .ajax-load-more .cnkt-main h4 {
1512
+ margin-top: 0;
1513
+ }
1514
+ .form-table tr {
1515
+ border-top: 1px solid $border;
1516
+ }
1517
+ .form-table {
1518
+ border: 1px solid $border;
1519
+ margin: 0 0 20px;
1520
+ br {
1521
+ height: 1px;
1522
+ display: block;
1523
+ overflow: hidden;
1524
+ line-height: 1px;
1525
+ margin: 0;
1526
+ content: '';
1527
+ }
1528
+ }
1529
+ #alm_OptionsForm {
1530
+ .form-table:last-of-type {
1531
+ margin-bottom: 0;
1532
+ }
1533
+ }
1534
+
1535
+ /* Repeaters */
1536
+ .repeaters {
1537
+ .repeater-wrap {
1538
+ padding: 15px 0 !important;
1539
+ }
1540
+ .repeater-wrap label {
1541
+ font-weight: 600;
1542
+ span {
1543
+ display: block;
1544
+ font-weight: 400;
1545
+ color: #999;
1546
+ font-size: 13px;
1547
+ padding-top: 2px;
1548
+ }
1549
+ }
1550
+ input.save-repeater {
1551
+ display: inline-block;
1552
+ margin: 0;
1553
+ clear: none;
1554
+ max-width: 25%;
1555
+ }
1556
+ .repeater-wrap textarea,
1557
+ .repeater-wrap input[type='text'] {
1558
+ width: 100%;
1559
+ }
1560
+ input.save-repeater.saving {
1561
+ cursor: default !important;
1562
+ opacity: 0.3 !important;
1563
+ }
1564
+ .saved-response {
1565
+ max-width: 72%;
1566
+ opacity: 0;
1567
+ }
1568
+ .one_half {
1569
+ padding-bottom: 10px;
1570
+ }
1571
+ .alm-delete {
1572
+ clear: none;
1573
+ display: inline-block;
1574
+ margin: 14px 0 0;
1575
+ width: auto;
1576
+ float: right;
1577
+ opacity: 0;
1578
+ transition: all 0.2s ease;
1579
+ position: absolute;
1580
+ right: 15px;
1581
+ bottom: 15px;
1582
+ a {
1583
+ border-radius: $radius;
1584
+ background: none;
1585
+ color: #c94141;
1586
+ font-size: 14px;
1587
+ line-height: 28px;
1588
+ height: 28px;
1589
+ text-decoration: none;
1590
+ display: block;
1591
+ padding: 0 10px;
1592
+ &:hover {
1593
+ background-color: #c94141;
1594
+ color: #fff;
1595
+ }
1596
+ &:focus {
1597
+ box-shadow: none;
1598
+ }
1599
+ &:active {
1600
+ background-color: #b93636;
1601
+ }
1602
+ }
1603
+ }
1604
+ .row:hover .alm-delete {
1605
+ opacity: 1;
1606
+ }
1607
+ }
1608
+
1609
+ /* Add-ons & Extensions */
1610
+
1611
+ .flexbox-wrap {
1612
+ display: flex;
1613
+ flex-wrap: wrap;
1614
+ margin-bottom: 20px;
1615
+ border-top: 1px solid $border;
1616
+ border-left: 1px solid $border;
1617
+ background-color: #fff;
1618
+ box-shadow: inset 0 0 0 1px $border;
1619
+ p.intro {
1620
+ border-bottom: 1px solid $border;
1621
+ width: 100%;
1622
+ padding: $padding;
1623
+ margin: 0;
1624
+ font-style: italic;
1625
+ }
1626
+ }
1627
+
1628
+ #alm-add-ons .group {
1629
+ overflow: hidden;
1630
+ width: 33.333%;
1631
+ display: flex;
1632
+ vertical-align: top;
1633
+ text-align: center;
1634
+ margin: 0 !important;
1635
+ padding: 0;
1636
+ border-radius: 0;
1637
+ border-top: none;
1638
+ border-left: none;
1639
+
1640
+ // Featured Addon
1641
+ &.highlighted,
1642
+ &.extend {
1643
+ width: 100%;
1644
+ a {
1645
+ background: $light_grey;
1646
+ border: 10px solid rgba(0, 0, 0, 0.025);
1647
+ }
1648
+ img {
1649
+ padding: 10px;
1650
+ }
1651
+ @media screen and (min-width: 768px) {
1652
+ text-align: left;
1653
+ a {
1654
+ padding: 25px;
1655
+ overflow: hidden;
1656
+ display: flex;
1657
+ flex-wrap: nowrap;
1658
+ align-items: center;
1659
+ }
1660
+ .pro-img,
1661
+ .pro-details {
1662
+ flex: 1;
1663
+ }
1664
+ .pro-img {
1665
+ max-width: 355px;
1666
+ }
1667
+ .pro-details {
1668
+ padding: 0 15px 0 35px;
1669
+ }
1670
+ img {
1671
+ position: static;
1672
+ }
1673
+ span.cnkt-button {
1674
+ position: static;
1675
+ width: auto;
1676
+ display: inline-block;
1677
+ padding: 13px 30px;
1678
+ text-align: center;
1679
+ margin-top: 15px;
1680
+ font-size: 14px;
1681
+ }
1682
+ }
1683
+ @media screen and (min-width: 769px) and (max-width: 1270px) {
1684
+ .pro-desc {
1685
+ display: none;
1686
+ }
1687
+ }
1688
+ }
1689
+ &.extend {
1690
+ a {
1691
+ background-color: #fff;
1692
+ }
1693
+ }
1694
+ &.installed {
1695
+ opacity: 0.85;
1696
+ filter: grayscale(1);
1697
+ p:before {
1698
+ display: none !important;
1699
+ }
1700
+ }
1701
+ @media screen and (max-width: 1350px) {
1702
+ width: 50%;
1703
+ }
1704
+ }
1705
+
1706
+ #alm-add-ons .group span.cnkt-button {
1707
+ position: absolute;
1708
+ left: 20px;
1709
+ bottom: 20px;
1710
+ width: 100%;
1711
+ width: calc(100% - 40px);
1712
+ display: block;
1713
+ font-size: 14px;
1714
+ padding: 11px 14px;
1715
+ transition: all 0.15s ease;
1716
+ border-bottom: none;
1717
+ border-left: none;
1718
+ border-right: none;
1719
+ }
1720
+ #alm-add-ons .group img {
1721
+ padding: 0 15px 15px;
1722
+ }
1723
+ #alm-add-ons .group {
1724
+ a {
1725
+ text-decoration: none;
1726
+ display: block;
1727
+ padding: 25px 25px 70px;
1728
+ position: relative;
1729
+ }
1730
+ &--pro {
1731
+ a {
1732
+ padding-bottom: 17px;
1733
+ }
1734
+ }
1735
+ }
1736
+
1737
+ #alm-add-ons .group:hover h2 {
1738
+ text-decoration: underline;
1739
+ }
1740
+ #alm-add-ons .group a h2 {
1741
+ transition: all 0.15s ease;
1742
+ }
1743
+ #alm-add-ons .group a:hover h2 {
1744
+ color: #ff5a58 !important;
1745
+ }
1746
+ #alm-add-ons .group.installed a:hover h2 {
1747
+ color: #444 !important;
1748
+ }
1749
+
1750
+ /* Add-on Callout! */
1751
+ .call-out {
1752
+ background: #75d0b4;
1753
+ font-size: 14px;
1754
+ color: #fff;
1755
+ font-weight: 400;
1756
+ padding: 20px 100px 20px 20px;
1757
+ border-radius: 3px;
1758
+ margin: 0;
1759
+ width: 100%;
1760
+ display: block;
1761
+ position: relative;
1762
+ }
1763
+ .call-out.light {
1764
+ background: #fdfdec;
1765
+ }
1766
+ .call-out.light p {
1767
+ margin: 0;
1768
+ padding: 0 30px;
1769
+ text-align: center;
1770
+ font-weight: 400;
1771
+ }
1772
+ .call-out.light p a {
1773
+ color: #ff5a58 !important;
1774
+ }
1775
+ .call-out.light p a:hover {
1776
+ text-decoration: underline;
1777
+ }
1778
+ #alm-builder .call-out,
1779
+ .forceColors .call-out {
1780
+ /* Shortcode builder */
1781
+ width: 90%;
1782
+ width: calc(100% - 20px);
1783
+ margin: 10px;
1784
+ }
1785
+ .call-out .cnkt-button {
1786
+ font-size: 13px;
1787
+ padding: 6px 10px;
1788
+ display: inline-block;
1789
+ background: #fff;
1790
+ border: none;
1791
+ border-radius: 3px;
1792
+ position: absolute;
1793
+ right: 12px;
1794
+ top: 13px;
1795
+ color: #387061 !important;
1796
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
1797
+ }
1798
+ .call-out a {
1799
+ color: #42524e !important;
1800
+ text-decoration: none;
1801
+ font-weight: 600;
1802
+ }
1803
+ .call-out a:hover,
1804
+ .call-out a:focus {
1805
+ color: #222 !important;
1806
+ }
1807
+ a.cnkt-button,
1808
+ span.cnkt-button {
1809
+ padding: 6px 10px;
1810
+ display: inline-block;
1811
+ background: #5acfb2;
1812
+ border: 1px solid #5acfb2;
1813
+ border-radius: 2px;
1814
+ position: static;
1815
+ text-decoration: none !important;
1816
+ color: #fff !important;
1817
+ font-size: 14px;
1818
+ font-weight: 600;
1819
+ }
1820
+ a.cnkt-button:hover,
1821
+ a.cnkt-button:hover i,
1822
+ .group:hover span.cnkt-button,
1823
+ .group:hover span.cnkt-button i {
1824
+ background-color: #935eaf;
1825
+ border-color: #935eaf;
1826
+ color: #fff !important;
1827
+ box-shadow: none;
1828
+ }
1829
+ a.cnkt-button:focus,
1830
+ .group:focus span.cnkt-button {
1831
+ background-color: #83519d;
1832
+ border-color: #935eaf;
1833
+ color: #fff !important;
1834
+ outline: none;
1835
+ }
1836
+ a.cnkt-button i,
1837
+ span.cnkt-button i {
1838
+ color: #397666;
1839
+ margin-right: 3px;
1840
+ position: relative;
1841
+ top: 1px;
1842
+ background: none !important;
1843
+ transition: all 0.15s ease;
1844
+ }
1845
+ a.cnkt-button.installed,
1846
+ span.cnkt-button.installed,
1847
+ .group span.cnkt-button.installed {
1848
+ background: $light_grey !important;
1849
+ border-color: #efefef !important;
1850
+ color: #888 !important;
1851
+ box-shadow: none !important;
1852
+ }
1853
+ a.cnkt-button.installed i,
1854
+ span.cnkt-button.installed i,
1855
+ .group:hover span.cnkt-button.installed i {
1856
+ background: none !important;
1857
+ color: #5da592 !important;
1858
+ top: 0;
1859
+ }
1860
+
1861
+ /*
1862
+ * Licenses
1863
+ *
1864
+ * @since 2.7.0
1865
+ */
1866
+
1867
+ .license {
1868
+ overflow: hidden;
1869
+ margin: 0;
1870
+ display: block;
1871
+ padding: 20px 0 0;
1872
+ position: relative;
1873
+ }
1874
+
1875
+ .license:first-of-type {
1876
+ padding: 10px 0 0;
1877
+ }
1878
+ .license-title {
1879
+ border-radius: 3px 3px 0 0;
1880
+ border: 1px solid $border;
1881
+ background-color: $light_grey;
1882
+ position: relative;
1883
+ }
1884
+ .license-title .status {
1885
+ width: 13px;
1886
+ height: 13px;
1887
+ border-radius: 100%;
1888
+ background: #d45656;
1889
+ position: absolute;
1890
+ left: 15px;
1891
+ top: 50%;
1892
+ margin-top: -7px;
1893
+ box-shadow: inset 0 -6px 6px rgba(0, 0, 0, 0.05), 0 1px 0 #fff;
1894
+ }
1895
+ .license-title .status.valid {
1896
+ background-color: $green;
1897
+ }
1898
+ .license h2 {
1899
+ margin: 0;
1900
+ padding: 15px 15px 15px 38px;
1901
+ font-size: 16px;
1902
+ font-weight: 700;
1903
+ line-height: 1.2;
1904
+ }
1905
+ .license p,
1906
+ .license label {
1907
+ font-size: 400;
1908
+ font-size: 14px;
1909
+ }
1910
+ .license .cnkt-button {
1911
+ position: absolute;
1912
+ top: 9px;
1913
+ right: 15px;
1914
+ padding: 5px 7px !important;
1915
+ }
1916
+ .license a.cnkt-button.installed {
1917
+ background-color: none !important;
1918
+ box-shadow: none !important;
1919
+ border-color: transparent !important;
1920
+ }
1921
+
1922
+ .license .no-license {
1923
+ display: block;
1924
+ padding: 12px;
1925
+ margin: 0 0 20px;
1926
+ border: 1px solid #e7e7c6;
1927
+ background-color: #ffffe5;
1928
+ border-radius: 2px;
1929
+ }
1930
+ .license .no-license h4 {
1931
+ margin: 0 0 3px;
1932
+ }
1933
+ .license .no-license p {
1934
+ margin: 5px 0 0;
1935
+ padding: 0;
1936
+ }
1937
+
1938
+ .license .loading {
1939
+ position: absolute;
1940
+ left: 0;
1941
+ top: 0;
1942
+ width: 100%;
1943
+ height: 100%;
1944
+ background: rgba(255, 255, 255, 0.6) url('../../img/loader.gif') no-repeat center center;
1945
+ z-index: 9;
1946
+ display: none;
1947
+ }
1948
+ .license-btn.hide,
1949
+ .renew-btn.hide {
1950
+ display: none;
1951
+ }
1952
+ .license-btn-wrap {
1953
+ display: block;
1954
+ }
1955
+ .license-btn-wrap .msg {
1956
+ display: block;
1957
+ padding: 15px 0 0;
1958
+ font-size: 14px;
1959
+ line-height: 24px;
1960
+ position: relative;
1961
+ top: 4px;
1962
+ }
1963
+ .license-btn-wrap .msg strong {
1964
+ display: block;
1965
+ }
1966
+ .license-btn-wrap .msg em {
1967
+ opacity: 0.7;
1968
+ font-style: normal;
1969
+ }
1970
+
1971
+ .license-wrap,
1972
+ .license-no-addons {
1973
+ overflow: hidden;
1974
+ display: block;
1975
+ padding: 18px 15px;
1976
+ border: 1px solid $border;
1977
+ border-top: none;
1978
+ background-color: #fff;
1979
+ border-radius: 0 0 3px 3px;
1980
+ }
1981
+ .license-wrap label {
1982
+ font-weight: 600;
1983
+ top: -3px;
1984
+ }
1985
+ .license-wrap input[type='text'] {
1986
+ margin: 0;
1987
+ width: 100% !important;
1988
+ padding: 14px;
1989
+ }
1990
+ .license-wrap .button-primary {
1991
+ margin-right: 5px;
1992
+ }
1993
+ .license-key-field {
1994
+ position: relative;
1995
+ display: block;
1996
+ margin: 0 0 20px;
1997
+ }
1998
+ .license-key-field .status {
1999
+ position: absolute;
2000
+ right: 10px;
2001
+ top: 50%;
2002
+ transform: translateY(-50%);
2003
+ display: inline-block;
2004
+ border-radius: 2px;
2005
+ padding: 6px 12px;
2006
+ line-height: 1.3;
2007
+ color: #fff;
2008
+ border-color: #999;
2009
+ cursor: default;
2010
+ }
2011
+ .license-key-field .status.active {
2012
+ background-color: $green;
2013
+ }
2014
+ .license-key-field .status.inactive {
2015
+ background-color: #d45656;
2016
+ }
2017
+
2018
+ .ajax-load-more .alm-nav {
2019
+ font-size: 600;
2020
+ font-size: 14px;
2021
+ margin: 0 !important;
2022
+ padding: 5px 0 5px;
2023
+ }
2024
+ .ajax-load-more .alm-nav a {
2025
+ display: inline-block;
2026
+ }
2027
+
2028
+ .license-no-addons {
2029
+ border: 1px solid #bad0da;
2030
+ border-radius: 3px;
2031
+ background-color: #e0f5ff;
2032
+ }
2033
+ .license-no-addons p {
2034
+ margin: 0;
2035
+ padding: 0;
2036
+ }
2037
+
2038
+ /*
2039
+ * Plugin Sidebar
2040
+ *
2041
+ * @since 1.0
2042
+ */
2043
+ .ajax-load-more .cnkt-sidebar .cta {
2044
+ background: #fff;
2045
+ padding: 0;
2046
+ margin: 0 0 20px;
2047
+ overflow: visible;
2048
+ position: relative;
2049
+ box-shadow: 0 4px 10px 1px rgba(0, 0, 0, 0.065);
2050
+ border-radius: $radius;
2051
+ .alm-file-location {
2052
+ padding-top: 15px;
2053
+ margin-top: 15px;
2054
+ border-top: 1px solid #efefef;
2055
+ input {
2056
+ font-size: 12px;
2057
+ font-family: Consolas, monaco, monospace;
2058
+ background: $light_grey;
2059
+ border: 1px solid $border;
2060
+ display: block;
2061
+ width: 100%;
2062
+ padding: 8px;
2063
+ margin: 0;
2064
+ color: #777;
2065
+ box-shadow: none !important;
2066
+ }
2067
+ }
2068
+ }
2069
+ .ajax-load-more .cnkt-sidebar .cta-inner {
2070
+ padding: 15px;
2071
+ display: block;
2072
+ .cta-inner {
2073
+ background-color: $light_grey;
2074
+ border-radius: 3px;
2075
+ border: 1px solid $border;
2076
+ }
2077
+ }
2078
+ .ajax-load-more .cnkt-sidebar .cta-inner.padding-bottom {
2079
+ padding-bottom: 80px;
2080
+ }
2081
+ .ajax-load-more .cnkt-sidebar .cta.mailing-list .head-wrap {
2082
+ display: block;
2083
+ padding: 20px;
2084
+ }
2085
+ .ajax-load-more .cnkt-sidebar .cta.padding-bottom {
2086
+ padding-bottom: 50px;
2087
+ }
2088
+ .ajax-load-more .cnkt-sidebar h3,
2089
+ .ajax-load-more .cnkt-sidebar h4 {
2090
+ margin-top: 0;
2091
+ }
2092
+ .ajax-load-more .cnkt-sidebar h3 {
2093
+ padding: 12px $padding;
2094
+ margin: 0;
2095
+ display: block;
2096
+ font-size: 14px;
2097
+ font-weight: 700;
2098
+ text-transform: none;
2099
+ }
2100
+
2101
+ .ajax-load-more .cnkt-sidebar .item {
2102
+ overflow: hidden;
2103
+ }
2104
+ .ajax-load-more .cnkt-sidebar .item h4 {
2105
+ margin: 0 0 5px;
2106
+ font-size: 0.9em;
2107
+ text-transform: uppercase;
2108
+ opacity: 0.5;
2109
+ }
2110
+ .ajax-load-more .cnkt-sidebar h4 {
2111
+ margin-bottom: 5px;
2112
+ }
2113
+ .ajax-load-more .cnkt-sidebar p {
2114
+ line-height: 22px;
2115
+ margin: 0 0 5px;
2116
+ font-size: 14px;
2117
+ }
2118
+ .ajax-load-more .cnkt-sidebar .cta.dyk {
2119
+ .cta-inner {
2120
+ overflow: hidden;
2121
+ }
2122
+ .img {
2123
+ float: left;
2124
+ width: 40%;
2125
+ padding: 0 10px 10px 0;
2126
+ }
2127
+ .text {
2128
+ float: left;
2129
+ width: 60%;
2130
+ padding: 0 0 10px 10px;
2131
+ }
2132
+ @media screen and (min-width: 900px) and (max-width: 1300px) {
2133
+ .img,
2134
+ .text {
2135
+ float: none;
2136
+ padding: 0 0 10px;
2137
+ width: 100%;
2138
+ }
2139
+ }
2140
+ @media screen and (max-width: 480px) {
2141
+ .img,
2142
+ .text {
2143
+ float: none;
2144
+ padding: 0 0 10px;
2145
+ width: 100%;
2146
+ }
2147
+ }
2148
+ p {
2149
+ margin: 0 0 15px;
2150
+ clear: none;
2151
+ &:last-child {
2152
+ margin: 0;
2153
+ }
2154
+ &.addon-intro {
2155
+ margin-top: -1px;
2156
+ font-size: 16px;
2157
+ }
2158
+ }
2159
+ }
2160
+ .ajax-load-more .cnkt-sidebar ul {
2161
+ padding: 5px 0 0;
2162
+ margin: 0;
2163
+ overflow: hidden;
2164
+ }
2165
+ .ajax-load-more .cnkt-sidebar li {
2166
+ font-size: 14px;
2167
+ margin: 0 0 10px;
2168
+ line-height: 1.5;
2169
+ }
2170
+
2171
+ .ajax-load-more .cnkt-sidebar .cta.resources li {
2172
+ display: block;
2173
+ width: 100%;
2174
+ line-height: 1;
2175
+ margin: 1px 0;
2176
+ }
2177
+ .ajax-load-more .cnkt-sidebar .cta.resources li a {
2178
+ text-decoration: none;
2179
+ padding: 10px 0;
2180
+ display: block;
2181
+ border-top: 1px solid #efefef;
2182
+ }
2183
+ .ajax-load-more .cnkt-sidebar .cta.resources li:first-of-type a {
2184
+ border: none;
2185
+ padding-top: 0;
2186
+ }
2187
+ .ajax-load-more .cnkt-sidebar .cta.resources li i {
2188
+ display: inline-block;
2189
+ width: 20px;
2190
+ text-align: center;
2191
+ color: #ccc;
2192
+ text-decoration: none;
2193
+ font-size: 14px;
2194
+ }
2195
+ .ajax-load-more .cnkt-sidebar .item i {
2196
+ font-size: 12px;
2197
+ float: left;
2198
+ width: 18px;
2199
+ height: 18px;
2200
+ border-radius: 100%;
2201
+ background: #efefef;
2202
+ line-height: 18px;
2203
+ text-align: center;
2204
+ margin: 1px 7px 0 0;
2205
+ position: relative;
2206
+ }
2207
+
2208
+ .ajax-load-more .cnkt-sidebar .item i.fa-check {
2209
+ background: #90be59;
2210
+ color: #fff;
2211
+ }
2212
+ .ajax-load-more .cnkt-sidebar .item i.fa-exclamation {
2213
+ background: #c43a3a;
2214
+ color: #fff;
2215
+ }
2216
+
2217
+ .ajax-load-more .cnkt-sidebar a.visit {
2218
+ background: #ed7070;
2219
+ padding: 17px 20px 18px 44px;
2220
+ position: absolute;
2221
+ bottom: 0;
2222
+ left: 0;
2223
+ width: 100%;
2224
+ display: block;
2225
+ color: #fff !important;
2226
+ z-index: 2;
2227
+ text-decoration: none;
2228
+ line-height: 1;
2229
+ border-radius: 0 0 2px 2px;
2230
+ }
2231
+ .ajax-load-more .cnkt-sidebar a.visit i {
2232
+ font-size: 21px;
2233
+ opacity: 0.6;
2234
+ margin: 0 5px 0 0;
2235
+ position: absolute;
2236
+ top: 13px;
2237
+ left: 18px;
2238
+ display: inline-block;
2239
+ }
2240
+ .ajax-load-more .cnkt-sidebar a.visit:hover,
2241
+ .ajax-load-more .cnkt-sidebar a.visit:focus {
2242
+ background: #f06060;
2243
+ }
2244
+ .ajax-load-more .cnkt-sidebar a.visit:hover i {
2245
+ opacity: 1;
2246
+ }
2247
+
2248
+ .ajax-load-more .cnkt-sidebar .project-listing {
2249
+ padding: 0;
2250
+ }
2251
+ .ajax-load-more .cnkt-sidebar .project-listing li {
2252
+ margin: 20px 0 0;
2253
+ padding: 0;
2254
+ position: relative;
2255
+ clear: both;
2256
+ }
2257
+ .ajax-load-more .cnkt-sidebar .project-listing li a {
2258
+ display: block;
2259
+ position: static;
2260
+ padding-left: 60px;
2261
+ min-height: 58px;
2262
+ text-decoration: none;
2263
+ }
2264
+ .ajax-load-more .cnkt-sidebar .project-listing li:first-of-type {
2265
+ margin-top: 0;
2266
+ }
2267
+ .ajax-load-more .cnkt-sidebar .project-listing img {
2268
+ height: 48px;
2269
+ left: 0;
2270
+ position: absolute;
2271
+ top: 2px;
2272
+ width: 48px;
2273
+ }
2274
+ .ajax-load-more .cnkt-sidebar .project-listing li strong {
2275
+ display: block;
2276
+ }
2277
+ .ajax-load-more .cnkt-sidebar .project-listing li span {
2278
+ color: #777;
2279
+ }
2280
+
2281
+ /*
2282
+ * CodeMirror Syntax Highlighting
2283
+ * @since 2.2.0
2284
+ */
2285
+
2286
+ .shortcode-builder {
2287
+ hr {
2288
+ margin: 0;
2289
+ }
2290
+ }
2291
+
2292
+ /*
2293
+ * Delete Template (Unlimited Repeaters
2294
+ *
2295
+ * @since 2.2.7
2296
+ */
2297
+
2298
+ #unlmited-container {
2299
+ margin: 0;
2300
+ display: block;
2301
+ overflow: visible;
2302
+ }
2303
+ .admin.ajax-load-more .row.unlimited:first-of-type {
2304
+ margin-top: 10px;
2305
+ }
2306
+
2307
+ .repeaters .row,
2308
+ .shortcode-builder .row {
2309
+ transition: background-color 0.3s ease;
2310
+ }
2311
+ .repeaters .row.no-brd:hover,
2312
+ .shortcode-builder .row.no-brd:hover {
2313
+ box-shadow: none;
2314
+ border-color: transparent;
2315
+ }
2316
+ .unlimited-wrap {
2317
+ display: none;
2318
+ }
2319
+
2320
+ .admin.ajax-load-more .row.unlimited.deleting {
2321
+ /* Deleting Row */
2322
+ background: #fff url('../../img/loader-unlimited.gif') no-repeat center center;
2323
+ border-color: #fff;
2324
+ opacity: 0.4;
2325
+ }
2326
+ .admin.ajax-load-more .row.unlimited.deleting.deleted {
2327
+ /* Deleting Row */
2328
+ background-image: none !important;
2329
+ }
2330
+ .admin.ajax-load-more .row.unlimited.new {
2331
+ /* New Row */
2332
+ background: url('../../img/loader-unlimited.gif') no-repeat center center;
2333
+ border-color: #efefef !important;
2334
+ min-height: 60px;
2335
+ display: none;
2336
+ }
2337
+ .admin.ajax-load-more .row.unlimited.new.done {
2338
+ background-image: none !important;
2339
+ }
2340
+ .admin.ajax-load-more .row.unlimited.loaded {
2341
+ /* Loading complete */
2342
+ background-color: #64e49d;
2343
+ border-color: #64e49d;
2344
+ }
2345
+
2346
+ .admin.ajax-load-more .row.unlimited.deleting .expand-wrap,
2347
+ .row.unlimited.deleting h3.heading {
2348
+ opacity: 0.6;
2349
+ }
2350
+ .row.unlimited.deleting .alm-delete {
2351
+ display: none;
2352
+ }
2353
+ .row.unlimited.deleting .save-repeater {
2354
+ opacity: 0;
2355
+ cursor: default;
2356
+ }
2357
+
2358
+ .ajax-load-more .row.unlimited input[type='text'] {
2359
+ width: 100%;
2360
+ }
2361
+
2362
+ .alm-add-template {
2363
+ text-align: center;
2364
+ margin: 20px 0 5px !important;
2365
+ display: block;
2366
+ font-size: 15px !important;
2367
+ font-weight: 700;
2368
+ text-transform: none !important;
2369
+ text-align: center;
2370
+ }
2371
+ .alm-add-template a {
2372
+ background: #efefef;
2373
+ border: 1px solid $border;
2374
+ color: #333;
2375
+ display: inline-block;
2376
+ padding: 11px 16px 13px;
2377
+ line-height: 1;
2378
+ border-radius: 3px;
2379
+ text-decoration: none;
2380
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
2381
+ text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4);
2382
+ }
2383
+ .alm-add-template a.active {
2384
+ opacity: 0.5;
2385
+ cursor: default;
2386
+ color: #333 !important;
2387
+ background: #efefef !important;
2388
+ border-color: #efefef !important;
2389
+ }
2390
+ .alm-add-template a:hover {
2391
+ background: #ff5a58;
2392
+ border-color: #ff5a58;
2393
+ color: #fff;
2394
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 0 rgba(0, 0, 0, 0.07);
2395
+ text-shadow: none;
2396
+ }
2397
+ .alm-add-template a:focus {
2398
+ box-shadow: none;
2399
+ text-shadow: none;
2400
+ }
2401
+ .alm-add-template a:active {
2402
+ color: #fff;
2403
+ background: #ec4745;
2404
+ border-color: #ec4745;
2405
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
2406
+ text-shadow: none;
2407
+ }
2408
+
2409
+ .alm-add-template a i {
2410
+ font-size: 20px;
2411
+ color: #ec4745;
2412
+ margin: 0 3px 0 0;
2413
+ position: relative;
2414
+ top: 2px;
2415
+ left: -1px;
2416
+ }
2417
+ .alm-add-template a:hover i,
2418
+ .alm-add-template a:active i {
2419
+ color: #fff;
2420
+ }
2421
+
2422
+ .spacer {
2423
+ height: 10px;
2424
+ clear: both;
2425
+ display: block;
2426
+ &.lg {
2427
+ height: 20px;
2428
+ }
2429
+ }
2430
+ .alm-text-center {
2431
+ text-align: center;
2432
+ }
2433
+
2434
+ .ajax-load-more p.generate-id {
2435
+ margin: 10px 0 0 !important;
2436
+ padding: 0 0 0 5px;
2437
+ font-size: 12px !important;
2438
+ i {
2439
+ margin: 0 2px 0 0;
2440
+ color: #999;
2441
+ }
2442
+ a {
2443
+ text-decoration: none;
2444
+ }
2445
+ }
2446
+
2447
+ /*
2448
+ * Cache
2449
+ * @since 2.6.0
2450
+ */
2451
+
2452
+ .alm-cache {
2453
+ .group .row {
2454
+ overflow: visible;
2455
+ }
2456
+ .row {
2457
+ &:first-of-type {
2458
+ margin-top: 0 !important;
2459
+ }
2460
+ }
2461
+
2462
+ h3.heading {
2463
+ padding-right: 90px !important;
2464
+ white-space: nowrap;
2465
+ overflow: hidden;
2466
+ text-overflow: ellipsis;
2467
+ }
2468
+
2469
+ /* Live Search */
2470
+ .alm-cache-search-wrap {
2471
+ position: relative;
2472
+ display: block;
2473
+ margin: 0 0 15px;
2474
+ input {
2475
+ width: 100% !important;
2476
+ margin: 0 !important;
2477
+ padding: 12px 20px;
2478
+ display: block;
2479
+ font-size: 16px;
2480
+ border-radius: 100px;
2481
+ }
2482
+ i {
2483
+ position: absolute;
2484
+ right: 15px;
2485
+ top: 50%;
2486
+ transform: translateY(-50%);
2487
+ color: #ccc;
2488
+ font-size: 20px;
2489
+ z-index: 1;
2490
+ }
2491
+ }
2492
+
2493
+ .alm-cache-listing {
2494
+ position: relative;
2495
+ .toggle-all {
2496
+ right: 0;
2497
+ top: -42px;
2498
+ }
2499
+ }
2500
+
2501
+ hr {
2502
+ margin: 30px 0 25px;
2503
+ border-top-color: #efefef;
2504
+ }
2505
+
2506
+ /* Directory Listing */
2507
+ .alm-dir-listing {
2508
+ border: 1px solid $border;
2509
+ border-radius: $radius;
2510
+ overflow: hidden;
2511
+ padding: 0;
2512
+ margin: 10px 0 0;
2513
+ &--nested {
2514
+ padding: 0 15px 15px;
2515
+ .alm-dir-listing {
2516
+ margin: 0;
2517
+ }
2518
+ }
2519
+ &:hover {
2520
+ //box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
2521
+ }
2522
+ &.theme-repeaters {
2523
+ padding: 15px;
2524
+ margin: 0;
2525
+ ul {
2526
+ border: none;
2527
+ padding: 0;
2528
+ margin: 0;
2529
+ }
2530
+ i {
2531
+ color: #ccc;
2532
+ font-size: 1.1em;
2533
+ }
2534
+ }
2535
+ }
2536
+
2537
+ .alm-dir-listing.deleting {
2538
+ opacity: 0.5;
2539
+ background: #fff url('../../img/loader-unlimited.gif') no-repeat center center;
2540
+ }
2541
+ .alm-dir-listing .dir-title {
2542
+ margin: 0 0 5px;
2543
+ position: relative;
2544
+ }
2545
+ .alm-dir-listing h3.heading {
2546
+ padding-left: 40px !important;
2547
+ &:after {
2548
+ content: '\f07c';
2549
+ }
2550
+ &.open:after {
2551
+ content: '\f07b';
2552
+ }
2553
+ }
2554
+ .alm-dir-listing .dir-title .delete {
2555
+ position: absolute;
2556
+ right: 10px;
2557
+ top: 10px;
2558
+ font-weight: 400;
2559
+ font-size: 13px;
2560
+ text-decoration: none;
2561
+ padding: 5px 12px;
2562
+ border: 1px solid $border;
2563
+ color: #ccc;
2564
+ border-radius: $radius;
2565
+ }
2566
+ .alm-dir-listing:hover .dir-title .delete {
2567
+ border-color: $border;
2568
+ background-color: #fff;
2569
+ color: #666;
2570
+ }
2571
+ .alm-dir-listing .dir-title .delete:hover {
2572
+ background-color: #c94141;
2573
+ border-color: #c94141;
2574
+ color: #fff;
2575
+ }
2576
+ .alm-dir-listing .dir-title .delete:active {
2577
+ box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2);
2578
+ }
2579
+
2580
+ .cache-page-title {
2581
+ font-size: 12px;
2582
+ display: block;
2583
+ width: 100%;
2584
+ padding: 0 7px 10px;
2585
+ font-weight: 700;
2586
+ text-transform: uppercase;
2587
+ }
2588
+
2589
+ .cache-page-wrap {
2590
+ padding: 0 10px 20px;
2591
+ }
2592
+
2593
+ .cache-full-path {
2594
+ display: none;
2595
+ &-button {
2596
+ border: 1px solid $light_border;
2597
+ border-radius: 3px;
2598
+ background: #fff;
2599
+ cursor: pointer;
2600
+ margin: 0 2px 0 0;
2601
+ text-align: left;
2602
+ color: #878787;
2603
+ font-size: 13px;
2604
+ padding: 2px 4px;
2605
+ &:hover,
2606
+ &:focus {
2607
+ border-color: $border;
2608
+ }
2609
+ }
2610
+ }
2611
+
2612
+ .alm-dir-listing ul.cache-details {
2613
+ display: block;
2614
+ padding: 15px 10px 5px;
2615
+ margin: 0;
2616
+ border: none;
2617
+ li {
2618
+ position: relative;
2619
+ display: block;
2620
+ width: 100%;
2621
+ background: none;
2622
+ padding: 0 10px 0 28px;
2623
+ margin: 0 0 10px;
2624
+ color: #878787;
2625
+ font-size: 13px;
2626
+ i {
2627
+ color: #ccc;
2628
+ font-size: 16px;
2629
+ position: absolute;
2630
+ top: 1px;
2631
+ left: 5px;
2632
+ }
2633
+ a {
2634
+ word-break: break-word;
2635
+ }
2636
+ }
2637
+ }
2638
+
2639
+ .dir-empty {
2640
+ margin-top: 10px;
2641
+ }
2642
+ .dir-empty,
2643
+ .cache-cleared {
2644
+ background-color: $yellow;
2645
+ border: 1px solid $yellow_dark;
2646
+ padding: 20px;
2647
+ display: block;
2648
+ color: #222;
2649
+ text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2);
2650
+ }
2651
+ .cache-cleared {
2652
+ margin: 0 0 20px;
2653
+ background-color: #e0f5ff;
2654
+ border-color: #bad0da;
2655
+ color: #666;
2656
+ i {
2657
+ color: #111;
2658
+ margin: 0 5px 0 0;
2659
+ }
2660
+ .remove {
2661
+ float: right;
2662
+ font-size: 12px;
2663
+ font-weight: 600;
2664
+ }
2665
+ }
2666
+ .cnkt-sidebar .item {
2667
+ padding: 20px;
2668
+ display: block;
2669
+ }
2670
+ p.cache-stats {
2671
+ min-height: 38px;
2672
+ line-height: 37px;
2673
+ display: block;
2674
+ padding: 0;
2675
+ margin: 0;
2676
+ span {
2677
+ display: inline-block;
2678
+ width: 38px;
2679
+ height: 38px;
2680
+ line-height: 36px;
2681
+ text-align: center;
2682
+ margin: 0 9px 0 0;
2683
+ font-weight: 700;
2684
+ font-size: 15px;
2685
+ border-radius: 2px;
2686
+ background: #a4a5e2;
2687
+ background: linear-gradient(to bottom, #a4a5e2 0%, #9ea0d9 50%, #8d8fce 51%, #a4a5e2 100%);
2688
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a4a5e2', endColorstr='#a4a5e2',GradientType=0 );
2689
+ border: 1px solid #8586be;
2690
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
2691
+ color: #fff;
2692
+ text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.1);
2693
+ }
2694
+ }
2695
+ }
2696
+
2697
+ // Directory Listing
2698
+ .alm-dir-listing ul {
2699
+ padding: 20px 0 0;
2700
+ margin: 10px 0 0;
2701
+ border-top: 1px solid #efefef;
2702
+ }
2703
+ p.theme-title {
2704
+ font-weight: 600;
2705
+ margin: 0 0 15px !important;
2706
+ padding: 0 5px;
2707
+ }
2708
+ .alm-dir-listing ul li {
2709
+ margin: 0 -2px;
2710
+ padding: 9px 0 5px 40px;
2711
+ display: inline-block;
2712
+ vertical-align: top;
2713
+ overflow: hidden;
2714
+ width: 47%;
2715
+ font-size: 14px;
2716
+ background: transparent url('../../img/directory-list.gif') no-repeat left 46%;
2717
+ &.full {
2718
+ width: 100%;
2719
+ display: block;
2720
+ }
2721
+ }
2722
+ .alm-dir-listing.theme-repeaters ul li {
2723
+ display: block;
2724
+ width: 100%;
2725
+ padding-top: 10px;
2726
+ padding: 0 0 0 40px;
2727
+ background-position: left 54%;
2728
+ }
2729
+ .alm-dir-listing.theme-repeaters ul li label {
2730
+ display: block;
2731
+ width: 100%;
2732
+ }
2733
+
2734
+ .alm-dir-listing ul li:last-child,
2735
+ .alm-dir-listing ul li:nth-last-child(2) {
2736
+ background-image: url('../../img/directory-list-btm.gif');
2737
+ }
2738
+ .alm-dir-listing.theme-repeaters ul li:nth-last-child(2) {
2739
+ background: transparent url('../../img/directory-list.gif') no-repeat left center;
2740
+ }
2741
+ .alm-dir-listing ul li a {
2742
+ text-decoration: none;
2743
+ }
2744
+ .alm-dir-listing li i {
2745
+ color: #999;
2746
+ padding: 0 5px 0 0;
2747
+ }
2748
+
2749
+ /*
2750
+ * Error Handling
2751
+ *
2752
+ * @since 2.6
2753
+ */
2754
+
2755
+ .alm-error {
2756
+ position: absolute;
2757
+ z-index: 9999;
2758
+ background: #fff;
2759
+ padding: 10px;
2760
+ }
2761
+
2762
+ /*
2763
+ * Form Replacements
2764
+ *
2765
+ * @since 2.4
2766
+ */
2767
+
2768
+ .ajax-load-more .alm-styled-input {
2769
+ display: flex;
2770
+ width: 100%;
2771
+ flex-wrap: nowrap;
2772
+ align-items: center;
2773
+ border-radius: 3px;
2774
+ border: 1px solid $border;
2775
+ label {
2776
+ padding: 10px;
2777
+ font-size: 12px;
2778
+ font-weight: 700;
2779
+ border-right: 1px solid $border;
2780
+ }
2781
+ input {
2782
+ border: none;
2783
+ border-radius: 0 2px 2px 0;
2784
+ margin: 0;
2785
+ width: 100%;
2786
+ }
2787
+ }
2788
+
2789
+ .shortcode-builder input[type='checkbox'],
2790
+ .shortcode-builder input[type='radio'],
2791
+ .ajax-load-more .form-table input[type='checkbox'],
2792
+ .ajax-load-more .form-table input[type='radio'] {
2793
+ width: 0;
2794
+ height: 0;
2795
+ opacity: 0;
2796
+ position: absolute;
2797
+ }
2798
+
2799
+ .shortcode-builder input[type='checkbox'] + label,
2800
+ .ajax-load-more .form-table input[type='checkbox'] + label,
2801
+ .shortcode-builder input[type='radio'] + label,
2802
+ .ajax-load-more .form-table input[type='radio'] + label {
2803
+ background: transparent url('../../img/bkg-chkbox_off.png') no-repeat left 1px;
2804
+ height: auto;
2805
+ min-height: 23px;
2806
+ width: 100%;
2807
+ display: inline-block;
2808
+ padding: 0.1em 0 0 30px;
2809
+ margin: 0 0 5px;
2810
+ font-size: 14px;
2811
+ line-height: 1.5;
2812
+ cursor: pointer !important;
2813
+ span {
2814
+ display: inline-block;
2815
+ padding-left: 1px;
2816
+ font-size: 12px;
2817
+ color: #999;
2818
+ }
2819
+ }
2820
+ .shortcode-builder input[type='radio'] + label,
2821
+ .ajax-load-more .form-table input[type='radio'] + label {
2822
+ background: transparent url('../../img/bkg-radio_off.png') no-repeat left 2px;
2823
+ }
2824
+
2825
+ .shortcode-builder input[type='checkbox']:hover + label,
2826
+ .ajax-load-more .form-table input[type='checkbox']:hover + label,
2827
+ .shortcode-builder input[type='checkbox']:focus + label,
2828
+ .ajax-load-more .form-table input[type='checkbox']:focus + label {
2829
+ /* hover/focus */
2830
+ background-image: url('../../img/bkg-chkbox_on.png');
2831
+ }
2832
+
2833
+ .shortcode-builder input[type='radio']:hover + label,
2834
+ .ajax-load-more .form-table input[type='radio']:hover + label,
2835
+ .shortcode-builder input[type='radio']:focus + label,
2836
+ .ajax-load-more .form-table input[type='radio']:focus + label {
2837
+ /* hover/focus */
2838
+ background-image: url('../../img/bkg-radio_on.png');
2839
+ }
2840
+
2841
+ .shortcode-builder input[type='checkbox']:checked + label,
2842
+ .ajax-load-more .form-table input[type='checkbox']:checked + label {
2843
+ /* selected */
2844
+ background-image: url('../../img/bkg-chkbox_selected.png');
2845
+ color: #000;
2846
+ }
2847
+
2848
+ .shortcode-builder input[type='radio']:checked + label,
2849
+ .ajax-load-more .form-table input[type='radio']:checked + label {
2850
+ /* selected */
2851
+ background-image: url('../../img/bkg-radio_selected.png');
2852
+ color: #000;
2853
+ }
2854
+
2855
+ .shortcode-builder input[type='checkbox'] + label:hover,
2856
+ .ajax-load-more .form-table input[type='checkbox'] + label:hover,
2857
+ .shortcode-builder input[type='radio'] + label:hover,
2858
+ .ajax-load-more .form-table input[type='radio'] + label:hover {
2859
+ color: #000;
2860
+ }
2861
+
2862
+ /*
2863
+ * Shortcode Builder
2864
+ *
2865
+ * @since 2.13.0
2866
+ */
2867
+ #alm-shortcode-builder-form {
2868
+ position: relative;
2869
+ }
2870
+ #alm-shortcode-builder-form .shortcode-parameter-wrap {
2871
+ padding: 0 20px 20px;
2872
+ display: block;
2873
+ background: #fff;
2874
+ border: 1px solid $border;
2875
+ border-radius: 3px;
2876
+ margin-bottom: 10px;
2877
+ &.closed {
2878
+ padding-bottom: 0;
2879
+ border-bottom: none;
2880
+ }
2881
+ h2 {
2882
+ padding: 20px 22px 20px 43px;
2883
+ margin: 0 -20px;
2884
+ display: block;
2885
+ font-size: 20px;
2886
+ width: calc(100% + 40px);
2887
+ border-bottom: 1px solid $border;
2888
+ background-color: $light_grey;
2889
+ border-radius: 2px 2px 0 0;
2890
+ color: $grey;
2891
+ font-weight: 700;
2892
+ position: relative;
2893
+ cursor: pointer;
2894
+ &:focus,
2895
+ &:hover {
2896
+ color: #222;
2897
+ outline: none;
2898
+ }
2899
+ &:hover:after,
2900
+ &:focus:after {
2901
+ color: #ccc;
2902
+ }
2903
+ &:after {
2904
+ font-family: 'FontAwesome';
2905
+ content: '\f056';
2906
+ color: $border;
2907
+ position: absolute;
2908
+ left: 15px;
2909
+ top: 20px;
2910
+ height: 20px;
2911
+ width: 20px;
2912
+ }
2913
+ &.open:after {
2914
+ content: '\f055';
2915
+ }
2916
+ i {
2917
+ position: absolute;
2918
+ right: 15px;
2919
+ top: 50%;
2920
+ transform: translateY(-50%);
2921
+ font-size: 25px;
2922
+ color: #ccc;
2923
+ opacity: 0.45;
2924
+ display: none;
2925
+ }
2926
+ }
2927
+ }
2928
+
2929
+ #alm-shortcode-builder-form .shortcode-parameter-wrap:first-of-type {
2930
+ margin-top: 0;
2931
+ }
2932
+ .progress_bar_color_indicator {
2933
+ position: absolute;
2934
+ left: 11px;
2935
+ top: 9px;
2936
+ width: 0;
2937
+ height: 0;
2938
+ padding: 11px;
2939
+ border-radius: 2px;
2940
+ z-index: 1;
2941
+ display: block;
2942
+ background-color: #ed7070;
2943
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
2944
+ }
2945
+
2946
+ /*
2947
+ * Repeater Template options dropdown
2948
+ * @since 2.4.1
2949
+ */
2950
+
2951
+ .ajax-load-more .row.template {
2952
+ position: relative;
2953
+ &:first-of-type {
2954
+ margin-top: 0;
2955
+ }
2956
+ }
2957
+ .ajax-load-more .row.template:hover .alm-repeater-options {
2958
+ opacity: 1;
2959
+ }
2960
+
2961
+ .alm-drop-btn.alm-repeater-options {
2962
+ position: absolute;
2963
+ top: -42px;
2964
+ right: 7px;
2965
+ z-index: 8;
2966
+ a.target {
2967
+ padding: 5px 10px;
2968
+ box-shadow: none;
2969
+ border: none;
2970
+ > i {
2971
+ font-size: 20px;
2972
+ position: static;
2973
+ }
2974
+ }
2975
+ }
2976
+
2977
+ .alm-drop-btn a.target {
2978
+ position: relative;
2979
+ color: #444;
2980
+ text-decoration: none !important;
2981
+ padding: 0 12px 0 28px;
2982
+ border: 1px solid #ccc;
2983
+ border-radius: $radius;
2984
+ font-size: 13px;
2985
+ line-height: 30px;
2986
+ height: 32px;
2987
+ display: block;
2988
+ box-shadow: 0 0 0 1px #fff;
2989
+ }
2990
+ .alm-drop-btn a.target > i {
2991
+ color: #999;
2992
+ font-size: 15px;
2993
+ position: absolute;
2994
+ top: 8px;
2995
+ left: 8px;
2996
+ }
2997
+ .alm-repeater-options a.target:hover i.fa-cog {
2998
+ color: #333;
2999
+ }
3000
+
3001
+ /* Active / Hover state */
3002
+ .alm-repeater-options a.target:active,
3003
+ .alm-repeater-options.active a.target,
3004
+ .alm-repeater-options a.target:hover,
3005
+ .alm-repeater-options a.target:focus {
3006
+ background-color: transparent;
3007
+ color: #222;
3008
+ border-color: transparent;
3009
+ box-shadow: none;
3010
+ opacity: 1;
3011
+ }
3012
+ .alm-repeater-options.active a.target,
3013
+ .alm-repeater-options.active a.target i.fa-cog {
3014
+ color: #444;
3015
+ }
3016
+
3017
+ /* Layout Dropdown */
3018
+ .alm-drop-btn.alm-layout-selection {
3019
+ display: inline-block;
3020
+ float: right;
3021
+ margin: 6px 0 0;
3022
+ @media screen and (max-width: 480px) {
3023
+ float: none;
3024
+ }
3025
+ a.target {
3026
+ background-color: $light_grey;
3027
+ border-color: $border;
3028
+ color: $grey;
3029
+ text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2);
3030
+ }
3031
+ > a > i {
3032
+ left: 12px;
3033
+ }
3034
+ li.type {
3035
+ height: 36px;
3036
+ line-height: 36px;
3037
+ padding: 0 4px 0 8px;
3038
+ position: relative;
3039
+ border-top: 1px solid $border;
3040
+ &:first-of-type {
3041
+ border: none;
3042
+ }
3043
+ }
3044
+ }
3045
+ .alm-dropdown ul li.layout i {
3046
+ top: 11px;
3047
+ }
3048
+ .alm-drop-btn.alm-layout-selection li.type .col-select {
3049
+ float: right;
3050
+ text-align: right;
3051
+ width: auto;
3052
+ height: 33px;
3053
+ line-height: 33px;
3054
+ }
3055
+ .alm-drop-btn.alm-layout-selection li.type .col-select a {
3056
+ width: 32px;
3057
+ height: 30px;
3058
+ margin: 3px 0 0 0;
3059
+ padding: 0;
3060
+ float: left;
3061
+ text-align: center;
3062
+ background-position: center center;
3063
+ background-repeat: no-repeat;
3064
+ vertical-align: top;
3065
+ text-indent: -99999px;
3066
+ overflow: hidden;
3067
+ opacity: 1;
3068
+ border-radius: 2px;
3069
+ border: 1px solid transparent;
3070
+ }
3071
+ .alm-drop-btn.alm-layout-selection li.type .col-select a.column-1 {
3072
+ background-image: url('../../img/column-1.png');
3073
+ }
3074
+ .alm-drop-btn.alm-layout-selection li.type .col-select a.column-2 {
3075
+ background-image: url('../../img/column-2.png');
3076
+ }
3077
+ .alm-drop-btn.alm-layout-selection li.type .col-select a.column-3 {
3078
+ background-image: url('../../img/column-3.png');
3079
+ width: 36px;
3080
+ }
3081
+ .alm-drop-btn.alm-layout-selection li.type .col-select a.column-4 {
3082
+ background-image: url('../../img/column-4.png');
3083
+ width: 36px;
3084
+ }
3085
+ .alm-drop-btn.alm-layout-selection li.type .col-select a.column-1.updating,
3086
+ .alm-drop-btn.alm-layout-selection li.type .col-select a.column-2.updating,
3087
+ .alm-drop-btn.alm-layout-selection li.type .col-select a.column-3.updating {
3088
+ background-image: url('../../img/loader.gif');
3089
+ padding: 0 !important;
3090
+ }
3091
+ .alm-drop-btn.alm-layout-selection li.type .col-select a:hover,
3092
+ .alm-drop-btn.alm-layout-selection li.type .col-select a.updating {
3093
+ opacity: 1;
3094
+ background-color: #fff;
3095
+ border-color: #ccc;
3096
+ }
3097
+ .alm-drop-btn.alm-layout-selection li.type:hover {
3098
+ background-color: #faf8e6;
3099
+ }
3100
+
3101
+ /* External Link + Add-on */
3102
+ .alm-drop-btn.alm-layout-selection a.external,
3103
+ .alm-drop-btn.alm-layout-selection a.add-on {
3104
+ background-color: $light_grey;
3105
+ padding: 13px 10px 13px 36px;
3106
+ display: block;
3107
+ }
3108
+ .alm-drop-btn.alm-layout-selection a.external {
3109
+ padding: 0 10px 0 36px;
3110
+ font-weight: 600;
3111
+ border: 1px solid $border;
3112
+ border-radius: $radius;
3113
+ }
3114
+ .alm-drop-btn.alm-layout-selection a.external i {
3115
+ color: #999;
3116
+ border-color: #ccc;
3117
+ top: 53%;
3118
+ transform: translateY(-50%);
3119
+ width: 38px;
3120
+ }
3121
+ .alm-drop-btn.alm-layout-selection a.external:hover i {
3122
+ color: #666;
3123
+ }
3124
+ .alm-drop-btn.alm-layout-selection a.add-on {
3125
+ line-height: 1.5;
3126
+ background-color: #75d0b4;
3127
+ border: none;
3128
+ color: #fff;
3129
+ font-weight: 400;
3130
+ text-overflow: inherit;
3131
+ height: auto;
3132
+ white-space: normal;
3133
+ font-size: 13px;
3134
+ padding: 12px 15px;
3135
+ }
3136
+ .alm-drop-btn.alm-layout-selection a.add-on:hover,
3137
+ .alm-drop-btn.alm-layout-selection a.add-on:focus {
3138
+ background-color: $green_hover;
3139
+ }
3140
+ .alm-drop-btn.alm-layout-selection a.add-on:hover i {
3141
+ opacity: 1;
3142
+ }
3143
+ .alm-drop-btn.alm-layout-selection a.add-on strong {
3144
+ color: #41635a;
3145
+ font-weight: 600;
3146
+ }
3147
+ .alm-drop-btn.alm-layout-selection a.add-on i {
3148
+ top: 14px;
3149
+ left: 3px;
3150
+ display: none;
3151
+ }
3152
+ .alm-drop-btn.alm-layout-selection a.add-on i {
3153
+ color: #fff !important;
3154
+ border-color: rgba(255, 255, 255, 0.3);
3155
+ }
3156
+
3157
+ .alm-drop-btn.alm-layout-selection a.target:hover,
3158
+ .alm-drop-btn.alm-layout-selection a.target:active,
3159
+ .alm-drop-btn.alm-layout-selection.active a.target {
3160
+ color: #222;
3161
+ border-color: #999;
3162
+ background-color: #f1f1f1;
3163
+ opacity: 1;
3164
+ }
3165
+ .alm-drop-btn.alm-layout-selection.active a.target,
3166
+ .alm-drop-btn.alm-layout-selection a.target:active {
3167
+ box-shadow: inset 0 1px 1px #ccc !important;
3168
+ }
3169
+
3170
+ .alm-drop-btn.alm-layout-selection .alm-dropdown {
3171
+ display: none;
3172
+ position: absolute;
3173
+ right: 0;
3174
+ top: 108%;
3175
+ z-index: 9;
3176
+ @media screen and (max-width: $small) {
3177
+ right: auto;
3178
+ left: 0;
3179
+ }
3180
+ }
3181
+ .alm-drop-btn .alm-dropdown:hover {
3182
+ display: block !important;
3183
+ }
3184
+
3185
+ @media screen and (max-width: $small) {
3186
+ .alm-drop-btn.alm-layout-selection .alm-dropdown .alm-drop-inner:after,
3187
+ .alm-drop-btn.alm-layout-selection .alm-dropdown .alm-drop-inner:before {
3188
+ right: auto;
3189
+ left: 36px;
3190
+ }
3191
+ .alm-drop-btn.alm-layout-selection .alm-dropdown .alm-drop-inner:after {
3192
+ margin-left: 0;
3193
+ }
3194
+ .alm-drop-btn.alm-layout-selection .alm-dropdown .alm-drop-inner:before {
3195
+ right: auto;
3196
+ left: 35px;
3197
+ }
3198
+ }
3199
+
3200
+ .add-layout-cta {
3201
+ border-radius: 2px;
3202
+ border: 1px solid $border;
3203
+ background-color: #fefeed;
3204
+ padding: 10px 100px 10px 10px;
3205
+ display: block;
3206
+ margin: 5px 0 15px;
3207
+ font-weight: 600;
3208
+ position: relative;
3209
+ }
3210
+ .add-layout-cta p {
3211
+ margin: 0;
3212
+ font-size: 13px;
3213
+ }
3214
+ span.dismiss {
3215
+ position: absolute;
3216
+ right: 10px;
3217
+ top: 11px;
3218
+ font-size: 13px;
3219
+ }
3220
+ span.dismiss a {
3221
+ text-decoration: none;
3222
+ }
3223
+
3224
+ /* Dropwbown */
3225
+
3226
+ .alm-drop-btn {
3227
+ position: relative;
3228
+ width: auto;
3229
+ }
3230
+
3231
+ .alm-dropdown {
3232
+ display: none;
3233
+ position: absolute;
3234
+ top: 108%;
3235
+ right: -15px;
3236
+ z-index: 9;
3237
+ .alm-drop-inner {
3238
+ display: block;
3239
+ position: relative;
3240
+ background: #fff;
3241
+ border-radius: $radius;
3242
+ border: 1px solid #ccc;
3243
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
3244
+ padding: 8px 10px;
3245
+ width: 220px;
3246
+ }
3247
+ .alm-drop-inner:after,
3248
+ .alm-drop-inner:before {
3249
+ bottom: 100%;
3250
+ right: 26px;
3251
+ border: solid transparent;
3252
+ content: ' ';
3253
+ height: 0;
3254
+ width: 0;
3255
+ position: absolute;
3256
+ pointer-events: none;
3257
+ }
3258
+
3259
+ .alm-drop-inner:after {
3260
+ border-color: rgba(247, 247, 247, 0);
3261
+ border-bottom-color: #fff;
3262
+ border-width: 7px;
3263
+ margin-left: -7px;
3264
+ }
3265
+ .alm-drop-inner:before {
3266
+ border-color: rgba(204, 204, 204, 0);
3267
+ border-bottom-color: #ccc;
3268
+ border-width: 8px;
3269
+ right: 25px;
3270
+ }
3271
+
3272
+ &.active {
3273
+ display: block !important;
3274
+ }
3275
+ }
3276
+
3277
+ .alm-layout-selection .alm-dropdown .alm-drop-inner {
3278
+ width: 270px;
3279
+ padding: 10px 10px 6px;
3280
+ }
3281
+
3282
+ .alm-dropdown {
3283
+ ul {
3284
+ padding: 0;
3285
+ margin: 0;
3286
+ overflow: hidden;
3287
+ }
3288
+ li {
3289
+ margin: 0;
3290
+ padding: 2px 0;
3291
+ list-style: none;
3292
+ clear: both;
3293
+ font-size: 13px;
3294
+ line-height: 1.2;
3295
+ font-weight: 400;
3296
+ &.option {
3297
+ border-radius: $radius;
3298
+ &:nth-child(even) {
3299
+ background-color: $light_grey;
3300
+ }
3301
+ }
3302
+ a:not(.button) {
3303
+ padding: 0 10px 0 32px;
3304
+ line-height: 40px;
3305
+ height: 40px;
3306
+ display: block;
3307
+ text-decoration: none;
3308
+ background-position: 4px center;
3309
+ color: $grey;
3310
+ box-shadow: none !important;
3311
+ position: relative;
3312
+ width: 100%;
3313
+ white-space: nowrap;
3314
+ overflow: hidden;
3315
+ text-overflow: ellipsis;
3316
+ border-radius: $radius;
3317
+ &:hover,
3318
+ &:focus {
3319
+ color: #333;
3320
+ i {
3321
+ opacity: 0.8;
3322
+ }
3323
+ }
3324
+ i {
3325
+ margin: 0;
3326
+ position: absolute;
3327
+ left: 0px;
3328
+ top: 50%;
3329
+ transform: translateY(-50%);
3330
+ width: 32px;
3331
+ font-size: 14px;
3332
+ line-height: 1;
3333
+ display: inline-block;
3334
+ text-align: center;
3335
+ opacity: 0.5;
3336
+ }
3337
+ }
3338
+ &.layout-cta {
3339
+ border: 1px solid $border;
3340
+ padding: 20px 10px;
3341
+ border-radius: $radius;
3342
+ margin-bottom: 5px;
3343
+ background-color: #fffeed;
3344
+ text-align: center;
3345
+ span {
3346
+ display: block;
3347
+ padding: 0 0 12px;
3348
+ line-height: 1.5;
3349
+ }
3350
+ }
3351
+ }
3352
+ }
3353
+
3354
+ /*
3355
+ * Mailchimp Sign-up
3356
+ *
3357
+ * @since 2.7.2
3358
+ */
3359
+
3360
+ #alm-mailing-list {
3361
+ }
3362
+ #alm-mailing-list .center {
3363
+ text-align: center;
3364
+ display: block;
3365
+ background: $light_grey;
3366
+ border: 1px solid #efefef;
3367
+ padding: 15px;
3368
+ margin: -5px 0 20px;
3369
+ border-radius: 2px;
3370
+ box-shadow: inset 0 0 0 1px #fff;
3371
+ }
3372
+ .center-text {
3373
+ text-align: center;
3374
+ }
3375
+ #alm-mailing-list .center p {
3376
+ margin-bottom: 15px;
3377
+ }
3378
+ .ajax-load-more .cnkt-sidebar .cta.social .follow-btn {
3379
+ display: inline-block;
3380
+ background-color: #fff;
3381
+ color: #333;
3382
+ font-size: 20px;
3383
+ padding: 0;
3384
+ width: 44px;
3385
+ height: 44px;
3386
+ line-height: 44px;
3387
+ text-align: center;
3388
+ vertical-align: top;
3389
+ border-radius: 100%;
3390
+ margin: 0 1px 0 0;
3391
+ opacity: 0.8;
3392
+ }
3393
+
3394
+ .ajax-load-more .cnkt-sidebar .cta.social .follow-btn.facebook {
3395
+ background-color: #3b5998;
3396
+ color: #fff;
3397
+ }
3398
+ .ajax-load-more .cnkt-sidebar .cta.social .follow-btn.twitter {
3399
+ background-color: #00aced;
3400
+ color: #fff;
3401
+ }
3402
+ .ajax-load-more .cnkt-sidebar .cta.social .follow-btn:hover {
3403
+ opacity: 1;
3404
+ }
3405
+
3406
+ #alm-mailing-list .form-wrap {
3407
+ background-color: #fff;
3408
+ padding: 12px;
3409
+ border: 1px solid $border;
3410
+ box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.025);
3411
+ position: relative;
3412
+ border-radius: 2px;
3413
+ }
3414
+ #alm-mailing-list .form-wrap .inner-wrap {
3415
+ position: relative;
3416
+ display: block;
3417
+ }
3418
+ #alm-mailing-list .form-wrap input {
3419
+ width: 100%;
3420
+ display: block;
3421
+ margin: 0;
3422
+ background: #fff;
3423
+ font-size: 13px;
3424
+ border-color: #eee;
3425
+ padding: 0 7px 0 46px;
3426
+ height: 40px;
3427
+ line-height: 40px;
3428
+ }
3429
+ #alm-mailing-list .form-wrap i.fa-envelope {
3430
+ color: #fff;
3431
+ background: #ff5a58;
3432
+ position: absolute;
3433
+ top: 0;
3434
+ left: 0;
3435
+ font-size: 18px;
3436
+ z-index: 1;
3437
+ height: 40px;
3438
+ width: 40px;
3439
+ text-align: center;
3440
+ line-height: 40px;
3441
+ border-radius: 2px 0 0 2px;
3442
+ }
3443
+ #alm-mailing-list .form-wrap button {
3444
+ padding: 0;
3445
+ margin: 0;
3446
+ height: auto;
3447
+ line-height: 1.2;
3448
+ font-weight: 600;
3449
+ position: absolute;
3450
+ right: 0;
3451
+ top: 0;
3452
+ z-index: 1;
3453
+ height: 100%;
3454
+ font-size: 13px;
3455
+ border-radius: 0;
3456
+ width: 40px;
3457
+ height: 40px;
3458
+ color: #ff5a58;
3459
+ background: none !important;
3460
+ cursor: pointer;
3461
+ }
3462
+
3463
+ #alm-mailing-list .form-wrap button i {
3464
+ color: #ccc;
3465
+ line-height: 40px;
3466
+ width: 20px;
3467
+ text-align: center;
3468
+ position: absolute;
3469
+ right: 5px;
3470
+ top: 0;
3471
+ font-size: 19px;
3472
+ }
3473
+ #alm-mailing-list .form-wrap button:hover i {
3474
+ color: #999;
3475
+ }
3476
+
3477
+ #alm-mailing-list .form-wrap button span {
3478
+ position: absolute;
3479
+ left: -9999px;
3480
+ top: -9999px;
3481
+ }
3482
+
3483
+ #alm-mailing-list .form-wrap label {
3484
+ font-size: 11px;
3485
+ text-transform: uppercase;
3486
+ margin: 0 0;
3487
+ padding: 0;
3488
+ font-weight: 600;
3489
+ position: absolute;
3490
+ left: -9999px;
3491
+ top: -9999px;
3492
+ }
3493
+ #alm-mailing-list .form-wrap #response {
3494
+ padding-top: 11px;
3495
+ font-size: 13px;
3496
+ display: none;
3497
+ text-align: center;
3498
+ position: absolute;
3499
+ left: 0;
3500
+ top: 0;
3501
+ width: 100%;
3502
+ height: 100%;
3503
+ background: #fff;
3504
+ z-index: 1;
3505
+ }
3506
+ #alm-mailing-list .form-wrap #response p {
3507
+ font-style: normal !important;
3508
+ }
3509
+
3510
+ /* share-alm */
3511
+ .alm-notification {
3512
+ border-radius: 2px;
3513
+ &--blue {
3514
+ background: #5899de !important;
3515
+ border-color: #4b7eb5 !important;
3516
+ }
3517
+ &:hover {
3518
+ a.dismiss {
3519
+ opacity: 0.7;
3520
+ }
3521
+ }
3522
+ &--inner {
3523
+ padding: 14px 20px 20px;
3524
+ }
3525
+ .dotted {
3526
+ border: none;
3527
+ border-bottom: 1px dashed #ccc;
3528
+ background: none;
3529
+ margin: 0 0 20px;
3530
+ padding: 0 0 15px;
3531
+ }
3532
+ h2 {
3533
+ line-height: 1.25;
3534
+ position: relative;
3535
+ color: #fff;
3536
+ font-size: 15px;
3537
+ margin: 0;
3538
+ padding: 14px 20px;
3539
+ font-weight: 700;
3540
+ border-bottom: 1px solid rgba(255, 255, 255, 0.15);
3541
+ span {
3542
+ position: absolute;
3543
+ left: 0;
3544
+ top: 0;
3545
+ }
3546
+ @media screen and (max-width: $small) {
3547
+ padding-left: 0;
3548
+ span {
3549
+ display: none;
3550
+ }
3551
+ }
3552
+ }
3553
+
3554
+ p {
3555
+ font-size: 14px;
3556
+ margin: 0 0 20px;
3557
+ a {
3558
+ font-weight: 600;
3559
+ &:hover,
3560
+ &:focus {
3561
+ text-decoration: none;
3562
+ }
3563
+ }
3564
+ &.opening {
3565
+ font-size: 18px;
3566
+ margin: 0 0 15px;
3567
+ font-weight: 300;
3568
+ line-height: 1.4;
3569
+ }
3570
+ }
3571
+
3572
+ p.opener {
3573
+ color: #444;
3574
+ font-weight: 700;
3575
+ font-size: 16px;
3576
+ position: relative;
3577
+ margin: 0 0 20px;
3578
+ }
3579
+
3580
+ ul.share {
3581
+ margin: 0;
3582
+ padding: 0;
3583
+ width: auto;
3584
+ clear: both;
3585
+ display: flex;
3586
+ flex-wrap: nowrap;
3587
+ width: 100%;
3588
+ overflow: visible;
3589
+ text-align: left;
3590
+ width: 100%;
3591
+ height: auto;
3592
+ border-radius: 0 0 3px 3px;
3593
+ background-color: $red;
3594
+ background-color: #9d87c7;
3595
+ li {
3596
+ flex: 1;
3597
+ background: none;
3598
+ display: block;
3599
+ vertical-align: top;
3600
+ height: auto;
3601
+ line-height: 40px;
3602
+ font-size: 13px;
3603
+ position: relative;
3604
+ font-weight: 400;
3605
+ text-align: left;
3606
+ background: none;
3607
+ color: #787878;
3608
+ width: auto;
3609
+ text-align: center;
3610
+ margin: 0 !important;
3611
+ padding: 0;
3612
+ background: none;
3613
+ border-left: 1px solid rgba(255, 255, 255, 0.15);
3614
+ &:first-of-type {
3615
+ border-left: none;
3616
+ }
3617
+ a {
3618
+ display: block;
3619
+ line-height: 50px;
3620
+ height: 50px;
3621
+ width: 100%;
3622
+ padding: 0 10px;
3623
+ text-decoration: none;
3624
+ color: #fff;
3625
+ text-align: center;
3626
+ background: none;
3627
+ border-radius: 0;
3628
+ position: relative;
3629
+ font-weight: 500;
3630
+ &:hover,
3631
+ &:focus {
3632
+ background-color: #b3a0d6 !important;
3633
+ }
3634
+ i {
3635
+ margin: 0 10px 0 0;
3636
+ font-size: 1.25em;
3637
+ position: relative;
3638
+ top: 1px;
3639
+ }
3640
+ &:hover,
3641
+ &:hover i {
3642
+ text-decoration: none;
3643
+ color: #fff !important;
3644
+ span {
3645
+ text-decoration: none;
3646
+ }
3647
+ }
3648
+ }
3649
+ &.twitter a {
3650
+ //background: #00aced;
3651
+ }
3652
+ &.twitter a:hover {
3653
+ //background: #13beff !important;
3654
+ }
3655
+ &.facebook a {
3656
+ //background: #3b5998;
3657
+ }
3658
+ &.facebook a:hover {
3659
+ //background: #466cbc !important;
3660
+ }
3661
+ }
3662
+ }
3663
+
3664
+ // Close BTN
3665
+ a.dismiss {
3666
+ position: absolute;
3667
+ right: 3px;
3668
+ top: 3px;
3669
+ text-decoration: none;
3670
+ width: 30px;
3671
+ height: 30px;
3672
+ line-height: 30px;
3673
+ padding: 0;
3674
+ text-align: center;
3675
+ color: #ccc;
3676
+ border-right: none;
3677
+ border-top: none;
3678
+ display: block;
3679
+ font-size: 24px;
3680
+ font-weight: 300;
3681
+ opacity: 0.3;
3682
+ &:hover,
3683
+ &:focus {
3684
+ color: #999;
3685
+ opacity: 1;
3686
+ }
3687
+ }
3688
+ }
3689
+
3690
+ /*
3691
+ * Local templates Add-on
3692
+ *
3693
+ * @since 2.7.3
3694
+ */
3695
+
3696
+ .select-theme-repeater {
3697
+ display: flex;
3698
+ width: 100%;
3699
+ flex-wrap: nowrap;
3700
+ position: relative;
3701
+ .or {
3702
+ position: absolute;
3703
+ left: 70px;
3704
+ top: -20px;
3705
+ background: #fff;
3706
+ color: #333;
3707
+ width: 34px;
3708
+ height: 34px;
3709
+ line-height: 34px;
3710
+ text-align: center;
3711
+ z-index: 1;
3712
+ font-weight: 700;
3713
+ border-radius: 100%;
3714
+ text-transform: uppercase;
3715
+ border: 1px solid $border;
3716
+ box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
3717
+ font-size: 11px;
3718
+ }
3719
+ }
3720
+
3721
+ .alm-template-section-nav {
3722
+ display: block;
3723
+ margin: 0 0;
3724
+ padding: 0;
3725
+ }
3726
+ .alm-template-section-nav li {
3727
+ display: inline-block;
3728
+ vertical-align: top;
3729
+ }
3730
+ .alm-template-section-nav li a {
3731
+ padding: 5px;
3732
+ display: block;
3733
+ }
3734
+ .alm-template-section-nav li.active a {
3735
+ background: #ff0000;
3736
+ }
3737
+
3738
+ /*
3739
+ * Toggle Switch
3740
+ *
3741
+ * @since 2.14.0
3742
+ */
3743
+ .ajax-load-more .alm-toggle-switch {
3744
+ display: block;
3745
+ clear: both;
3746
+ margin: 0;
3747
+ padding: 2px $gutter 0;
3748
+ overflow: hidden;
3749
+ position: relative;
3750
+ top: 1px;
3751
+ z-index: 9;
3752
+ li {
3753
+ float: left;
3754
+ margin: 0 2px 0 0;
3755
+ padding: 0;
3756
+ background: none;
3757
+ list-style: none;
3758
+ }
3759
+ li a {
3760
+ display: block;
3761
+ padding: $padding 20px;
3762
+ line-height: 1;
3763
+ text-decoration: none;
3764
+ border: 1px solid $border;
3765
+ border-radius: $radius $radius 0 0;
3766
+ background: $light_grey;
3767
+ color: $grey;
3768
+ }
3769
+ li a:hover {
3770
+ color: #222;
3771
+ background-color: #fff;
3772
+ }
3773
+ li a.active {
3774
+ background: #fff;
3775
+ font-weight: 700;
3776
+ border-bottom-color: #fff;
3777
+ color: #111;
3778
+ }
3779
+ }
3780
+
3781
+ /*
3782
+ * Admin screen media queries
3783
+ *
3784
+ * @since 1.0
3785
+ */
3786
+
3787
+ @media screen and (max-width: 1200px) {
3788
+ .ajax-load-more input[type='text'],
3789
+ .ajax-load-more input[type='number'],
3790
+ .select2-container,
3791
+ #alm-builder .select2-container-multi,
3792
+ .ajax-load-more textarea {
3793
+ width: 95%;
3794
+ }
3795
+
3796
+ #alm-builder .select2-container-multi {
3797
+ width: 95% !important;
3798
+ }
3799
+ }
3800
+
3801
+ @media screen and (max-width: 900px) {
3802
+ .table-of-contents {
3803
+ position: static !important;
3804
+ width: 100% !important;
3805
+ }
3806
+ .ajax-load-more .cnkt-main,
3807
+ .ajax-load-more .cnkt-sidebar,
3808
+ .ajax-load-more .cnkt-main.full {
3809
+ float: none;
3810
+ clear: both;
3811
+ margin: 0;
3812
+ width: 100%;
3813
+ position: static !important;
3814
+ }
3815
+ .admin.ajax-load-more.settings .form-table td {
3816
+ padding: 24px 20px 20px;
3817
+ }
3818
+ .call-out.light {
3819
+ padding: 15px !important;
3820
+ }
3821
+ .repeaters input.save-repeater {
3822
+ max-width: 50%;
3823
+ }
3824
+ }
3825
+
3826
+ @media screen and (max-width: 782px) {
3827
+ .admin.ajax-load-more.settings .form-table th {
3828
+ padding-bottom: 0;
3829
+ border: none;
3830
+ background-color: transparent;
3831
+ }
3832
+ .share-alm .sharing {
3833
+ padding-right: 0;
3834
+ width: 100%;
3835
+ margin-right: 0 !important;
3836
+ }
3837
+ .share-alm .mailing {
3838
+ width: 100%;
3839
+ margin-left: 0 !important;
3840
+ padding-left: 0;
3841
+ padding-top: 40px;
3842
+ border-left: none;
3843
+ }
3844
+ }
3845
+
3846
+ @media screen and (max-width: 480px) {
3847
+ .ajax-load-more .section-title,
3848
+ .ajax-load-more .row .wrap {
3849
+ clear: both;
3850
+ width: 100%;
3851
+ display: block;
3852
+ float: none;
3853
+ padding: 10px;
3854
+ }
3855
+ .ajax-load-more .section-title {
3856
+ padding: 20px 20px 10px;
3857
+ }
3858
+ .ajax-load-more .row .wrap {
3859
+ padding: 10px 20px;
3860
+ }
3861
+ .ajax-load-more textarea,
3862
+ .ajax-load-more input[type='text'],
3863
+ .ajax-load-more input[type='number'],
3864
+ .select2-container,
3865
+ #alm-builder .select2-container-multi {
3866
+ width: 100% !important;
3867
+ }
3868
+ .ajax-load-more .row .wrap .inner.half {
3869
+ display: block;
3870
+ padding: 0 0 20px;
3871
+ width: 100%;
3872
+ }
3873
+ .ajax-load-more .section-title p {
3874
+ color: #999;
3875
+ padding: 0 !important;
3876
+ }
3877
+ #alm-add-ons .row .wrap {
3878
+ padding-bottom: 60px;
3879
+ width: 100%;
3880
+ }
3881
+ #alm-add-ons .section-title {
3882
+ width: 100%;
3883
+ }
3884
+
3885
+ .alm-repeater-options {
3886
+ display: none !important;
3887
+ }
3888
+
3889
+ .ajax-load-more .wrap-30 {
3890
+ width: 100%;
3891
+ display: block;
3892
+ padding: 0 0 10px;
3893
+ }
3894
+ .ajax-load-more .row .wrap.full {
3895
+ padding: 10px;
3896
+ }
3897
+
3898
+ #alm-add-ons .group {
3899
+ width: 100%;
3900
+ display: block;
3901
+ margin: 0 0 2% 0;
3902
+ }
3903
+ .call-out.light {
3904
+ background: #fdfdec none repeat scroll 0 0;
3905
+ width: 100%;
3906
+ }
3907
+ .call-out.light p {
3908
+ padding: 0;
3909
+ }
3910
+ .ajax-load-more .one_half {
3911
+ width: 100%;
3912
+ margin: 0 0 2%;
3913
+ display: block;
3914
+ }
3915
+ .add-layout-cta {
3916
+ padding: 10px;
3917
+ }
3918
+ span.dismiss {
3919
+ position: static;
3920
+ padding-top: 20px;
3921
+ display: block;
3922
+ font-size: 12px;
3923
+ }
3924
+ }
admin/src/scss/libs/select2.scss ADDED
@@ -0,0 +1,349 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /*
3
+ * Select2 - form replacement - http://ivaynberg.github.io/select2/
4
+ *
5
+ * @since 1.0
6
+ */
7
+
8
+ .select2-container {
9
+ position: relative;
10
+ display: inline-block;
11
+ zoom: 1;
12
+ *display: inline;
13
+ vertical-align: middle;
14
+ min-width: 60%;
15
+ }
16
+ .inner.half .select2-container{
17
+ min-width: 90%;
18
+ width: 90%;
19
+ }
20
+ #alm-builder .select2-container li{
21
+ padding-right: 0;
22
+ }
23
+ .select2-container a.select2-choice {
24
+ display: block;
25
+ height: 40px;
26
+ line-height: 38px;
27
+ padding: 0 10px;
28
+ overflow: hidden;
29
+ position: relative;
30
+ border: 1px solid #e1e1e1;
31
+ white-space: nowrap;
32
+ color: #333;
33
+ text-decoration: none;
34
+ background: #fff;
35
+ background: #f7f7f7;
36
+ border-radius:2px;
37
+ -webkit-background-clip: padding-box;
38
+ -moz-background-clip: padding;
39
+ background-clip: padding-box;
40
+ -webkit-touch-callout: none;
41
+ -webkit-user-select: none;
42
+ -khtml-user-select: none;
43
+ -moz-user-select: none;
44
+ -ms-user-select: none;
45
+ user-select: none;
46
+ font-size: 14px;
47
+ }
48
+
49
+ .select2-dropdown-open.select2-container-active .select2-choice {
50
+ -webkit-border-radius: 4px 4px 0 0;
51
+ -moz-border-radius: 4px 4px 0 0;
52
+ border-radius: 4px 4px 0 0;
53
+ }
54
+
55
+ .select2-container.select2-drop-above .select2-choice {
56
+ background: #fff;
57
+ -webkit-border-radius: 0 0 4px 4px;
58
+ -moz-border-radius: 0px 0px 4px 4px;
59
+ border-radius: 0 0 4px 4px;
60
+ }
61
+
62
+ .select2-container .select2-choice span {
63
+ margin-right: 30px;
64
+ margin-left: 2px;
65
+ display: block;
66
+ overflow: hidden;
67
+ white-space: nowrap;
68
+ color: #666;
69
+ -ms-text-overflow: ellipsis;
70
+ -o-text-overflow: ellipsis;
71
+ text-overflow: ellipsis;
72
+ }
73
+
74
+ .select2-container .select2-choice abbr:hover {
75
+ background-position: right -11px;
76
+ cursor: pointer;
77
+ }
78
+
79
+ .select2-drop-mask {
80
+ position: absolute;
81
+ left: 0;
82
+ top: 0;
83
+ z-index: 8;
84
+ background-color: #fff;
85
+ opacity: 0;
86
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
87
+ /* works in IE 8 */
88
+ filter: "alpha(opacity=0)";
89
+ /* expected to work in IE 8 */
90
+ filter: alpha(opacity = 0);
91
+ /* IE 4-7 */
92
+ }
93
+
94
+ .select2-drop {
95
+ overflow: hidden;
96
+ width: 100%;
97
+ margin-top: -1px;
98
+ position: absolute;
99
+ z-index: 9;
100
+ top: 100%;
101
+ background: #fff;
102
+ color: #000;
103
+ border: 1px solid #efefef;
104
+ border-top: 0;
105
+ border-radius: 0 0 2px 2px;
106
+ box-shadow: 0 2px 1px rgba(0, 0, 0, 0.1);
107
+ font-size: 14px;
108
+ }
109
+
110
+ .select2-drop.select2-drop-above {
111
+ margin-top: 1px;
112
+ border-top: 1px solid #efefef;
113
+ border-bottom: 0;
114
+ border-radius: 2px 2px 0 0;
115
+ box-shadow: 0 -2px -1px rgba(0, 0, 0, 0.1);
116
+ }
117
+
118
+ .select2-container .select2-choice div {
119
+ display: block;
120
+ width: 30px;
121
+ height: 100%;
122
+ position: absolute;
123
+ right: 0;
124
+ top: 0;
125
+ }
126
+
127
+ .select2-container .select2-choice div b {
128
+ display: block;
129
+ width: 100%;
130
+ height: 100%;
131
+ background: #fff url("../../img/bkg-select.png") no-repeat center center;
132
+ }
133
+
134
+ .select2-dropdown-open.select2-container-active div b {
135
+ display: block;
136
+ width: 100%;
137
+ height: 100%;
138
+ background-color: #fff;
139
+ }
140
+
141
+ /* Search */
142
+ .select2-search {
143
+ display: none !important;
144
+ padding: 2px;
145
+ display: block;
146
+ background-color: #fff;
147
+ }
148
+ .select2-search .select2-input{
149
+ width: 99%;
150
+ height: 26px !important;
151
+ border-color: #efefef !important;
152
+ -webkit-box-shadow: none !important;
153
+ -moz-box-shadow: none !important;
154
+ box-shadow: none !important;
155
+ background: url("../../img/select2.png") no-repeat scroll 100% -22px !important;
156
+ }
157
+
158
+ /* Multi select box */
159
+ #alm-builder .select2-container-multi{
160
+ width: 60%;
161
+ }
162
+ #alm-builder .select2-results li{
163
+ width: 100%;
164
+ }
165
+
166
+ #alm-builder .select2-container-multi .select2-input{
167
+ cursor: pointer;
168
+ margin: 0 !important;
169
+ }
170
+
171
+ #alm-builder ul.select2-choices{
172
+ width: 100%;
173
+ overflow: hidden;
174
+ }
175
+ #alm-builder ul.select2-choices li.select2-search-field,
176
+ #alm-builder ul.select2-choices li.select2-search-field input{
177
+ width: 100% !important;
178
+ display: block;
179
+ }
180
+ /* Selected Choice */
181
+ #alm-builder ul.select2-choices li.select2-search-choice{
182
+ display: inline-block;
183
+ font-size: 12px;
184
+ line-height: 13px;
185
+ margin: 0 5px 5px 0;
186
+ padding: 5px 10px 5px 24px;
187
+ border-radius: 3px;
188
+ background: #fff;
189
+ border: 1px solid #ccc;
190
+ width: auto;
191
+ position: relative;
192
+ }
193
+ #alm-builder ul.select2-choices .select2-input{
194
+ background: #f7f7f7 url("../../img/bkg-select.png") no-repeat right center;
195
+ }
196
+ #alm-builder ul.select2-choices li.select2-search-choice a{
197
+ position: absolute;
198
+ left: 5px;
199
+ top: 5px;
200
+ width: 13px;
201
+ height: 13px;
202
+ background: #999 url("../../img/ico-close.png") no-repeat center center;
203
+ color: #fff;
204
+ display: block;
205
+ border-radius: 2px;
206
+ }
207
+
208
+ #alm-builder ul.select2-choices li.select2-search-choice a:hover{
209
+ background-color: #ff0000;
210
+ }
211
+
212
+
213
+ /* results UL */
214
+ .select2-results {
215
+ max-height: 311px;
216
+ padding: 0 0 0 0;
217
+ margin: 0 0 0 0;
218
+ position: relative;
219
+ overflow-x: hidden;
220
+ overflow-y: auto;
221
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
222
+ }
223
+ .select2-result-sub{
224
+ margin: 0;
225
+ padding: 0;
226
+ }
227
+
228
+ .select2-results li {
229
+ list-style: none;
230
+ display: block;
231
+ background-image: none;
232
+ padding: 0;
233
+ margin: 0 !important;
234
+ border-top: 1px solid #efefef;
235
+ color: #666;
236
+ width: auto;
237
+ font-size: 13px;
238
+ }
239
+
240
+ .select2-results li.select2-result-with-children > .select2-result-label {
241
+ font-weight: 600;
242
+ font-size: 14px;
243
+ cursor: default;
244
+ color: #222;
245
+ }
246
+
247
+ .select2-results .select2-result-label {
248
+ margin: 0;
249
+ cursor: pointer;
250
+ min-height: 1em;
251
+ padding: 10px 8px;
252
+ -webkit-touch-callout: none;
253
+ -webkit-user-select: none;
254
+ -khtml-user-select: none;
255
+ -moz-user-select: none;
256
+ -ms-user-select: none;
257
+ user-select: none;
258
+ }
259
+
260
+ .select2-results .select2-highlighted .select2-result-label{ /* Hover */
261
+ background: #f7f7f7;
262
+ color: #ca5252;
263
+ }
264
+
265
+ .select2-results .select2-highlighted:active {
266
+ background: #fff;
267
+ }
268
+
269
+ .select2-results li em {
270
+ background: #feffde;
271
+ font-style: normal;
272
+ }
273
+
274
+ .select2-results .select2-highlighted em {
275
+ background: transparent;
276
+ }
277
+
278
+ .select2-results .select2-highlighted ul {
279
+ background: white;
280
+ color: #000;
281
+ }
282
+
283
+ .select2-results .select2-no-results,
284
+ .select2-results .select2-searching,
285
+ .select2-results .select2-selection-limit {
286
+ background: #f4f4f4;
287
+ display: list-item;
288
+ }
289
+
290
+ .select2-results .select2-no-results{
291
+ min-height: 1em;
292
+ padding: 10px 7px;
293
+ font-size: 13px;
294
+ }
295
+
296
+ /*
297
+ disabled look for disabled choices in the results dropdown
298
+ */
299
+ .select2-results .select2-disabled.select2-highlighted {
300
+ color: #666;
301
+ background: #f4f4f4;
302
+ display: list-item;
303
+ cursor: default;
304
+ }
305
+
306
+ .select2-results .select2-disabled {
307
+ background: #f4f4f4;
308
+ display: list-item;
309
+ cursor: default;
310
+ }
311
+
312
+ .select2-results .select2-selected {
313
+ display: none;
314
+ }
315
+
316
+ .select2-more-results {
317
+ background: #f4f4f4;
318
+ display: list-item;
319
+ }
320
+
321
+ /* disabled styles */
322
+ .select2-container.select2-container-disabled .select2-choice {
323
+ background-color: #f4f4f4;
324
+ background-image: none;
325
+ border: 1px solid #ddd;
326
+ cursor: default;
327
+ }
328
+
329
+ .select2-container.select2-container-disabled .select2-choice div {
330
+ background-color: #f4f4f4;
331
+ background-image: none;
332
+ border-left: 0;
333
+ }
334
+
335
+ .select2-container.select2-container-disabled .select2-choice abbr {
336
+ display: none;
337
+ }
338
+
339
+ .select2-offscreen {
340
+ border: 0;
341
+ clip: rect(0 0 0 0);
342
+ height: 1px;
343
+ margin: -1px;
344
+ overflow: hidden;
345
+ padding: 0;
346
+ position: absolute;
347
+ width: 1px;
348
+ left: 0;
349
+ }
admin/src/scss/libs/tooltipster.scss ADDED
@@ -0,0 +1,276 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* This is the default Tooltipster theme (feel free to modify or duplicate and create multiple themes!): */
2
+ .tooltipster-default {
3
+ border-radius: 3px;
4
+ border: 2px solid #222;
5
+ border: none;
6
+ background: #0073aa;
7
+ background: rgba(33, 149, 204, 0.95);
8
+ color: #e7f3f8;
9
+ }
10
+
11
+ /* Use this next selector to style things like font-size and line-height: */
12
+ .tooltipster-default .tooltipster-content {
13
+ font-size: 12px;
14
+ line-height: 20px;
15
+ padding: 12px 16px;
16
+ overflow: hidden;
17
+ text-align: center;
18
+ }
19
+
20
+ /* This next selector defines the color of the border on the outside of the arrow. This will automatically match the color and size of the border set on the main tooltip styles. Set display: none; if you would like a border around the tooltip but no border around the arrow */
21
+ .tooltipster-default .tooltipster-arrow .tooltipster-arrow-border {
22
+ /* border-color: ... !important; */
23
+ }
24
+
25
+
26
+ /* If you're using the icon option, use this next selector to style them */
27
+ .tooltipster-icon {
28
+ cursor: help;
29
+ margin-left: 4px;
30
+ }
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ /* This is the base styling required to make all Tooltipsters work */
40
+ .tooltipster-base {
41
+ padding: 0;
42
+ font-size: 0;
43
+ line-height: 0;
44
+ position: absolute;
45
+ left: 0;
46
+ top: 0;
47
+ z-index: 9999999;
48
+ pointer-events: none;
49
+ width: auto;
50
+ overflow: visible;
51
+ }
52
+ .tooltipster-base .tooltipster-content {
53
+ overflow: hidden;
54
+ }
55
+
56
+
57
+ /* These next classes handle the styles for the little arrow attached to the tooltip. By default, the arrow will inherit the same colors and border as what is set on the main tooltip itself. */
58
+ .tooltipster-arrow {
59
+ display: block;
60
+ text-align: center;
61
+ width: 100%;
62
+ height: 100%;
63
+ position: absolute;
64
+ top: 0;
65
+ left: 0;
66
+ z-index: -1;
67
+ }
68
+ .tooltipster-arrow span, .tooltipster-arrow-border {
69
+ display: block;
70
+ width: 0;
71
+ height: 0;
72
+ position: absolute;
73
+ }
74
+ .tooltipster-arrow-top span, .tooltipster-arrow-top-right span, .tooltipster-arrow-top-left span {
75
+ border-left: 8px solid transparent !important;
76
+ border-right: 8px solid transparent !important;
77
+ border-top: 8px solid;
78
+ bottom: -7px;
79
+ }
80
+ .tooltipster-arrow-top .tooltipster-arrow-border, .tooltipster-arrow-top-right .tooltipster-arrow-border, .tooltipster-arrow-top-left .tooltipster-arrow-border {
81
+ border-left: 9px solid transparent !important;
82
+ border-right: 9px solid transparent !important;
83
+ border-top: 9px solid;
84
+ bottom: -7px;
85
+ }
86
+
87
+ .tooltipster-arrow-bottom span, .tooltipster-arrow-bottom-right span, .tooltipster-arrow-bottom-left span {
88
+ border-left: 8px solid transparent !important;
89
+ border-right: 8px solid transparent !important;
90
+ border-bottom: 8px solid;
91
+ top: -7px;
92
+ }
93
+ .tooltipster-arrow-bottom .tooltipster-arrow-border, .tooltipster-arrow-bottom-right .tooltipster-arrow-border, .tooltipster-arrow-bottom-left .tooltipster-arrow-border {
94
+ border-left: 9px solid transparent !important;
95
+ border-right: 9px solid transparent !important;
96
+ border-bottom: 9px solid;
97
+ top: -7px;
98
+ }
99
+ .tooltipster-arrow-top span, .tooltipster-arrow-top .tooltipster-arrow-border, .tooltipster-arrow-bottom span, .tooltipster-arrow-bottom .tooltipster-arrow-border {
100
+ left: 0;
101
+ right: 0;
102
+ margin: 0 auto;
103
+ }
104
+ .tooltipster-arrow-top-left span, .tooltipster-arrow-bottom-left span {
105
+ left: 6px;
106
+ }
107
+ .tooltipster-arrow-top-left .tooltipster-arrow-border, .tooltipster-arrow-bottom-left .tooltipster-arrow-border {
108
+ left: 5px;
109
+ }
110
+ .tooltipster-arrow-top-right span, .tooltipster-arrow-bottom-right span {
111
+ right: 6px;
112
+ }
113
+ .tooltipster-arrow-top-right .tooltipster-arrow-border, .tooltipster-arrow-bottom-right .tooltipster-arrow-border {
114
+ right: 5px;
115
+ }
116
+ .tooltipster-arrow-left span, .tooltipster-arrow-left .tooltipster-arrow-border {
117
+ border-top: 8px solid transparent !important;
118
+ border-bottom: 8px solid transparent !important;
119
+ border-left: 8px solid;
120
+ top: 50%;
121
+ margin-top: -7px;
122
+ right: -7px;
123
+ }
124
+ .tooltipster-arrow-left .tooltipster-arrow-border {
125
+ border-top: 9px solid transparent !important;
126
+ border-bottom: 9px solid transparent !important;
127
+ border-left: 9px solid;
128
+ margin-top: -8px;
129
+ }
130
+ .tooltipster-arrow-right span, .tooltipster-arrow-right .tooltipster-arrow-border {
131
+ border-top: 8px solid transparent !important;
132
+ border-bottom: 8px solid transparent !important;
133
+ border-right: 8px solid;
134
+ top: 50%;
135
+ margin-top: -7px;
136
+ left: -7px;
137
+ }
138
+ .tooltipster-arrow-right .tooltipster-arrow-border {
139
+ border-top: 9px solid transparent !important;
140
+ border-bottom: 9px solid transparent !important;
141
+ border-right: 9px solid;
142
+ margin-top: -8px;
143
+ }
144
+
145
+
146
+ /* Some CSS magic for the awesome animations - feel free to make your own custom animations and reference it in your Tooltipster settings! */
147
+
148
+ .tooltipster-fade {
149
+ opacity: 0;
150
+ -webkit-transition-property: opacity;
151
+ -moz-transition-property: opacity;
152
+ -o-transition-property: opacity;
153
+ -ms-transition-property: opacity;
154
+ transition-property: opacity;
155
+ }
156
+ .tooltipster-fade-show {
157
+ opacity: 1;
158
+ }
159
+
160
+ .tooltipster-grow {
161
+ -webkit-transform: scale(0,0);
162
+ -moz-transform: scale(0,0);
163
+ -o-transform: scale(0,0);
164
+ -ms-transform: scale(0,0);
165
+ transform: scale(0,0);
166
+ -webkit-transition-property: -webkit-transform;
167
+ -moz-transition-property: -moz-transform;
168
+ -o-transition-property: -o-transform;
169
+ -ms-transition-property: -ms-transform;
170
+ transition-property: transform;
171
+ -webkit-backface-visibility: hidden;
172
+ }
173
+ .tooltipster-grow-show {
174
+ -webkit-transform: scale(1,1);
175
+ -moz-transform: scale(1,1);
176
+ -o-transform: scale(1,1);
177
+ -ms-transform: scale(1,1);
178
+ transform: scale(1,1);
179
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
180
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
181
+ -moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
182
+ -ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
183
+ -o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
184
+ transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
185
+ }
186
+
187
+ .tooltipster-swing {
188
+ opacity: 0;
189
+ -webkit-transform: rotateZ(4deg);
190
+ -moz-transform: rotateZ(4deg);
191
+ -o-transform: rotateZ(4deg);
192
+ -ms-transform: rotateZ(4deg);
193
+ transform: rotateZ(4deg);
194
+ -webkit-transition-property: -webkit-transform, opacity;
195
+ -moz-transition-property: -moz-transform;
196
+ -o-transition-property: -o-transform;
197
+ -ms-transition-property: -ms-transform;
198
+ transition-property: transform;
199
+ }
200
+ .tooltipster-swing-show {
201
+ opacity: 1;
202
+ -webkit-transform: rotateZ(0deg);
203
+ -moz-transform: rotateZ(0deg);
204
+ -o-transform: rotateZ(0deg);
205
+ -ms-transform: rotateZ(0deg);
206
+ transform: rotateZ(0deg);
207
+ -webkit-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 1);
208
+ -webkit-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
209
+ -moz-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
210
+ -ms-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
211
+ -o-transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
212
+ transition-timing-function: cubic-bezier(0.230, 0.635, 0.495, 2.4);
213
+ }
214
+
215
+ .tooltipster-fall {
216
+ top: 0;
217
+ -webkit-transition-property: top;
218
+ -moz-transition-property: top;
219
+ -o-transition-property: top;
220
+ -ms-transition-property: top;
221
+ transition-property: top;
222
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
223
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
224
+ -moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
225
+ -ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
226
+ -o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
227
+ transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
228
+ }
229
+ .tooltipster-fall-show {
230
+ }
231
+ .tooltipster-fall.tooltipster-dying {
232
+ -webkit-transition-property: all;
233
+ -moz-transition-property: all;
234
+ -o-transition-property: all;
235
+ -ms-transition-property: all;
236
+ transition-property: all;
237
+ top: 0px !important;
238
+ opacity: 0;
239
+ }
240
+
241
+ .tooltipster-slide {
242
+ left: -40px;
243
+ -webkit-transition-property: left;
244
+ -moz-transition-property: left;
245
+ -o-transition-property: left;
246
+ -ms-transition-property: left;
247
+ transition-property: left;
248
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
249
+ -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
250
+ -moz-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
251
+ -ms-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
252
+ -o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
253
+ transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.15);
254
+ }
255
+ .tooltipster-slide.tooltipster-slide-show {
256
+ }
257
+ .tooltipster-slide.tooltipster-dying {
258
+ -webkit-transition-property: all;
259
+ -moz-transition-property: all;
260
+ -o-transition-property: all;
261
+ -ms-transition-property: all;
262
+ transition-property: all;
263
+ left: 0px !important;
264
+ opacity: 0;
265
+ }
266
+
267
+
268
+ /* CSS transition for when contenting is changing in a tooltip that is still open. The only properties that will NOT transition are: width, height, top, and left */
269
+ .tooltipster-content-changing {
270
+ opacity: 0.5;
271
+ -webkit-transform: scale(1.1, 1.1);
272
+ -moz-transform: scale(1.1, 1.1);
273
+ -o-transform: scale(1.1, 1.1);
274
+ -ms-transform: scale(1.1, 1.1);
275
+ transform: scale(1.1, 1.1);
276
+ }
admin/src/scss/partials/_alm-block.scss ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ajax-load-more{
2
+
3
+ .alm-block{
4
+ &--wrap{
5
+ border: 1px solid $border;
6
+ border-top: none;
7
+ }
8
+ &--row{
9
+ display: flex;
10
+ flex-wrap: nowrap;
11
+ border-top: 1px solid $border;
12
+ &_title{
13
+ width: 100%;
14
+ flex: 1;
15
+ padding: 20px;
16
+ h3{
17
+ font-weight: 700;
18
+ margin: 0;
19
+ padding: 0;
20
+ }
21
+ }
22
+ &_label,
23
+ &_detail{
24
+ padding: 20px;
25
+ }
26
+ &_label{
27
+ background-color: #f7f7f7;
28
+ font-weight: 600;
29
+ width: 20%;
30
+ border-right: 1px solid $border;
31
+ }
32
+ &_detail{
33
+ background-color: #fff;
34
+ flex: 1;
35
+ }
36
+ }
37
+
38
+ label{
39
+ font-size: 14px;
40
+ .small{
41
+ font-weight: 400;
42
+ font-size: 12px;
43
+ line-height: 1.35;
44
+ opacity: 0.8;
45
+ }
46
+ }
47
+ }
48
+
49
+ }
admin/src/scss/partials/_alm-settings-feedback.scss ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .alm-settings-feedback{
2
+ position: fixed;
3
+ bottom: 20px;
4
+ right: 25px;
5
+ width: auto;
6
+ height: auto;
7
+ background: #fff;
8
+ border-left: 5px solid #5cc583;
9
+ color: #444;
10
+ padding: 25px 30px 25px 25px;
11
+ line-height: 1;
12
+ z-index: 9999;
13
+ border-radius: 2px;
14
+ opacity: 0;
15
+ visibility: hidden;
16
+ transition: all 0.2s ease-in-out;
17
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
18
+ font-size: 13px;
19
+ &.--saving{
20
+ border-color: #e0bd5e;
21
+ opacity: 1;
22
+ visibility: visible;
23
+ bottom: 25px;
24
+ }
25
+ &.--saved{
26
+ opacity: 1;
27
+ visibility: visible;
28
+ bottom: 25px;
29
+ }
30
+ &.--error{
31
+ border-color: #e03e3e;
32
+ opacity: 1;
33
+ visibility: visible;
34
+ bottom: 25px;
35
+ }
36
+ i{
37
+ opacity: 0.6;
38
+ margin: 0 3px 0 0;
39
+ }
40
+ }
41
+
42
+ #alm_OptionsForm{
43
+ position: relative;
44
+ .save-in-progress{
45
+ width: 100%;
46
+ height: 100%;
47
+ position: absolute;
48
+ left: 0;
49
+ top: 0;
50
+ z-index: 10;
51
+ background: rgba(255, 255, 255, 0.5);
52
+ transition: all 0.2s ease;
53
+ opacity: 0;
54
+ visibility: hidden;
55
+ }
56
+ &.--saving{
57
+ .save-in-progress{
58
+ opacity: 1;
59
+ visibility: visible;
60
+ cursor: not-allowed !important;
61
+ }
62
+ }
63
+ }
admin/src/scss/partials/_builder-option-toggle.scss ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ajax-load-more .builder-option-toggle{
2
+ display: flex;
3
+ flex-wrap: nowrap;
4
+ input{
5
+ border-radius: $radius 0 0 $radius;
6
+ margin: 0;
7
+ width: auto;
8
+ flex: 1;
9
+ }
10
+ &--buttons{
11
+ border-radius: 0 $radius $radius 0;
12
+ padding: 3px;
13
+ width: auto;
14
+ border: 1px solid $border;
15
+ border-left: none;
16
+ button{
17
+ height: 100%;
18
+ border: 1px solid $border;
19
+ border-left-width: 0;
20
+ margin: 0;
21
+ font-weight: 600;
22
+ font-size: 11px;
23
+ text-transform: uppercase;
24
+ float: left;
25
+ cursor: pointer;
26
+ padding: 0;
27
+ margin: 0;
28
+ border-radius: 0;
29
+ width: 34px;
30
+ text-align: center;
31
+ display: inline-block;
32
+ color: $grey;
33
+ background-color: transparent;
34
+ &:hover,
35
+ &:focus{
36
+ color: #222;
37
+ border-color: #ccc;
38
+ }
39
+ &:first-child{
40
+ border-radius: $radius 0 0 $radius;
41
+ border-left-width: 1px;
42
+ }
43
+ &:last-child{
44
+ border-radius: 0 $radius $radius 0;
45
+ }
46
+ &.active{
47
+ border-color: $grey;
48
+ background-color: $grey;
49
+ color: #fff;
50
+ cursor: default;
51
+ }
52
+ }
53
+ }
54
+ }
admin/src/scss/partials/_codemirror.scss ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ajax-load-more .CodeMirror {
2
+ height: auto;
3
+ border-radius: $radius;
4
+ padding: 0;
5
+ background: $light_grey;
6
+ border: 1px solid $border;
7
+ color: #999;
8
+ line-height: 1.5;
9
+ font-size: 13px;
10
+ &.CodeMirror-focused{
11
+ border-color: #bbbbbb;
12
+ box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
13
+ }
14
+ }
15
+ .ajax-load-more .cm-readonly .CodeMirror{
16
+ opacity: 0.8;
17
+ }
18
+ .ajax-load-more .cm-readonly .CodeMirror pre{
19
+ cursor: default !important;
20
+ }
21
+ .ajax-load-more .CodeMirror pre{
22
+ padding: 0 10px;
23
+ }
24
+ .CodeMirror-lines{
25
+ padding: 10px !important;
26
+ }
27
+ .CodeMirror-linenumber{
28
+ padding: 0 10px !important;
29
+ line-height: 1.25 !important;
30
+ color: #ccc !important;
31
+ }
32
+ .CodeMirror-linenumber.CodeMirror-gutter-elt {
33
+ padding: 0 20px 0 0 !important;
34
+ }
35
+ .ajax-load-more .cm-readonly.sm-margin .CodeMirror{
36
+ margin: 0 0 10px;
37
+ }
38
+ .ajax-load-more .cm-readonly p.warning-callout{
39
+ margin: 0 0 10px;
40
+ }
41
+ .ajax-load-more .CodeMirror.loading {
42
+ background: $light_grey url("../../img/loader-unlimited.gif") no-repeat center center;
43
+ opacity: 0.6;
44
+ }
45
+ .ajax-load-more .cm-s-pastel-on-dark.CodeMirror{ /* Bkg color */
46
+ background: #333;
47
+ }
48
+ .ajax-load-more .CodeMirror-gutters{ /* Line Number color */
49
+ background: #fff;
50
+ border-right: 1px solid $border;
51
+ border-radius: 2px;
52
+ }
53
+ .ajax-load-more .CodeMirror-scroll {
54
+ overflow-y: hidden;
55
+ overflow-x: auto;
56
+ }
57
+
58
+ .ajax-load-more .cm-tag{ /* <li> <h2> html elements */
59
+ color: #0a4b83 !important;
60
+ }
61
+ .ajax-load-more .cm-string{ /* Elements in " " */
62
+ color: #c75050 !important;
63
+ }
64
+ .ajax-load-more .cm-attribute{ /* class names */
65
+ color: #008080 !important;
66
+ }
67
+ .ajax-load-more .cm-keyword{ /* if, array, echo */
68
+ color: #ae5fb3 !important;
69
+ }
70
+ .ajax-load-more span.CodeMirror-matchingbracket{
71
+ color: #ff0000 !important;
72
+ }
73
+ .ajax-load-more .CodeMirror span.cm-meta{ /* <?php */
74
+ color: #999;
75
+ }
76
+ .ajax-load-more .CodeMirror span.cm-variable{ /* Function names */
77
+ color: #111;
78
+ font-weight: 500;
79
+ padding: 0 1px;
80
+ }
81
+ .ajax-load-more .CodeMirror span.cm-number{ /* Numbers */
82
+ color: #009999 !important;
83
+ }
admin/src/scss/partials/_header.scss ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ajax-load-more .header-wrap {
2
+ position: relative;
3
+ z-index: 1;
4
+ h1 {
5
+ padding: $padding $padding $padding 80px;
6
+ margin: 0;
7
+ min-height: 48px;
8
+ background: #fff url('../../img/alm-logo-48x48.png') no-repeat $padding $padding;
9
+ background: #fff url('../../img/alm-logo-48x48.svg') no-repeat $padding $padding;
10
+ font-size: 18px;
11
+ font-weight: 800;
12
+ border-bottom: 1px solid $border;
13
+ @media screen and (min-width: 768px) {
14
+ font-size: 21px;
15
+ }
16
+ em {
17
+ display: block;
18
+ position: relative;
19
+ font-size: 12px;
20
+ @media screen and (min-width: 768px) {
21
+ font-size: 14px;
22
+ }
23
+ color: #999;
24
+ font-style: normal;
25
+ font-weight: 400;
26
+ line-height: 1.3;
27
+ padding: 1px 0 0;
28
+ margin: 0;
29
+ }
30
+ strong {
31
+ font-weight: 600;
32
+ }
33
+ span {
34
+ color: #999;
35
+ font-weight: 300;
36
+ font-style: italic;
37
+ margin: 0 0 0 5px;
38
+ vertical-align: top;
39
+ font-size: 12px;
40
+ @media screen and (min-width: 768px) {
41
+ font-size: 13px;
42
+ }
43
+ background-color: $light_grey;
44
+ border-radius: 2px;
45
+ padding: 2px 4px;
46
+ display: inline-block;
47
+ line-height: 1.45;
48
+ position: relative;
49
+ top: 3px;
50
+ }
51
+ }
52
+ .notice {
53
+ margin: $padding;
54
+ }
55
+ }
admin/src/scss/partials/_pro-listing.scss ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* Pro Add-on Listing */
3
+ .alm-pro-listing{
4
+ padding: 0;
5
+ border-top: none;
6
+ position: relative;
7
+ padding-bottom: 20px;
8
+ .loader{
9
+ position: absolute;
10
+ left: 0;
11
+ top: 0;
12
+ width: 100%;
13
+ height: 100%;
14
+ z-index: 99;
15
+ display: none;
16
+ }
17
+ &.loading{
18
+ .loader{
19
+ display: block;
20
+ }
21
+ }
22
+ &--header{
23
+ border: 1px solid #e1e1e1;
24
+ background: #f7f7f7;
25
+ padding: 18px;
26
+ font-size: 13px;
27
+ font-weight: 600;
28
+ text-transform: uppercase;
29
+ color: #23282d;
30
+ position: relative;
31
+ margin-bottom: 30px;
32
+ border-radius: 2px;
33
+ div{
34
+ position: absolute;
35
+ right: 15px;
36
+ top: 50%;
37
+ transform: translateY(-50%);
38
+ font-size: 13px;
39
+ opacity: 0.7;
40
+ font-weight: normal;
41
+ text-transform: none;
42
+ font-style: italic;
43
+ @media screen and (max-width: 480px){
44
+ display: none;
45
+ }
46
+ }
47
+ }
48
+ &--wrap{
49
+ display: flex;
50
+ flex-wrap: wrap;
51
+ width: calc(100% + 10px);
52
+ margin-left: -5px;
53
+ }
54
+
55
+ .item{
56
+ width: calc(50% - 10px);
57
+ display: flex;
58
+ margin: 0 5px 10px;
59
+ @media screen and (min-width: 1500px){
60
+ width: calc(33.333% - 10px);
61
+ }
62
+ @media screen and (max-width: 480px){
63
+ width: 100%;
64
+ margin: 0 0 10px;
65
+ }
66
+ h2, p, img, .state{
67
+ transition: all 0.15s ease;
68
+ }
69
+ a{
70
+ text-decoration: none !important;
71
+ padding: 0 55px 0 0;
72
+ position: relative;
73
+ display: flex;
74
+ border: 1px solid #e1e1e1;
75
+ transition: all 0.15s ease;
76
+ border-radius: 2px;
77
+ @media screen and (max-width: 1100px){
78
+ padding: 0 10px 20px;
79
+ }
80
+ &:hover,
81
+ &:focus{
82
+ border-color: #bbb;
83
+ h2{
84
+ text-decoration: none;
85
+ }
86
+ }
87
+ }
88
+ &--detail{
89
+ padding: 20px;
90
+ position: relative;
91
+ min-height: 110px;
92
+ display: flex;
93
+ align-items: flex-start;
94
+ @media screen and (max-width: 1100px){
95
+ display: block;
96
+ text-align: center;
97
+ img{
98
+ padding-bottom: 20px;
99
+ }
100
+ }
101
+ div{
102
+ padding: 0;
103
+ }
104
+ img{
105
+ width: 110px;
106
+ height: auto;
107
+ margin-right: 20px;
108
+ }
109
+ a{
110
+ text-decoration: none;
111
+ &:hover,
112
+ &:focus{
113
+ text-decoration: none;
114
+ h2{
115
+ text-decoration: none;
116
+ }
117
+ }
118
+ }
119
+ h2{
120
+ margin: 0 0 7px;
121
+ font-size: 16px;
122
+ line-height: 1;
123
+ transition: all 0.15s ease;
124
+ span{
125
+ font-weight: 400;
126
+ opacity: 0.4;
127
+ font-size: 12px;
128
+ position: relative;
129
+ top: 0;
130
+ left: 3px;
131
+ text-decoration: none !important;
132
+ }
133
+ }
134
+ p{
135
+ margin: 0;
136
+ padding: 0;
137
+ font-size: 14px;
138
+ &.link{
139
+ font-size: 13px;
140
+ padding-top: 2px;
141
+ opacity: 0;
142
+ transition: opacity 0.15s ease;
143
+ }
144
+ }
145
+ .highlight-addon{
146
+ padding-top: 15px;
147
+ font-size: 12px;
148
+ margin: 0;
149
+
150
+ span{
151
+ display: inline-block;
152
+ padding: 5px;
153
+ position: relative;
154
+ left: -5px;
155
+ line-height: 1;
156
+ background-color: $yellow;
157
+ font-weight: 500;
158
+ }
159
+ }
160
+ }
161
+ .result{
162
+ position: absolute;
163
+ right: 6px;
164
+ bottom: 6px;
165
+ font-size: 12px;
166
+ opacity: 0;
167
+ transition: all 0.25s ease;
168
+ &.in-view{
169
+ opacity: 0.7;
170
+ }
171
+ .type{
172
+ background: #47bd79;
173
+ color: #fff;
174
+ display: none;
175
+ border-radius: 2px;
176
+ padding: 3px 6px;
177
+ display: inline-block;
178
+ }
179
+ .type.inactive{
180
+ background: #c54545;
181
+ display: none;
182
+ }
183
+ }
184
+ .state{
185
+ width: 22px;
186
+ height: 22px;
187
+ position: absolute;
188
+ right: 6px;
189
+ top: 6px;
190
+ border-radius: 2px;
191
+ background: #57d48c;
192
+ color: #fff;
193
+ display: flex;
194
+ align-items: center;
195
+ justify-content: center;
196
+ text-decoration: none !important;
197
+ font-size: 12px;
198
+ transition: all 0.15s ease;
199
+ &:before{
200
+ font-family: 'FontAwesome';
201
+ content: '\f00c';
202
+ display: block;
203
+
204
+ }
205
+ }
206
+
207
+ &.active{
208
+ a{
209
+ border-color: #57d48c;
210
+ }
211
+ &:hover{
212
+ .state{
213
+ opacity: 0.9;
214
+ }
215
+ }
216
+ }
217
+
218
+ &.inactive{
219
+ h2, p, img, .state{
220
+ opacity: 0.5;
221
+ }
222
+ .state{
223
+ background: #e1e1e1;
224
+ &:before{
225
+ opacity: 0;
226
+ }
227
+ }
228
+ &:hover{
229
+ h2, p, img, .state{
230
+ opacity: 0.8;
231
+ }
232
+
233
+ .state{
234
+ background: #ccc;
235
+ &:before{
236
+ opacity: 1;
237
+ }
238
+ }
239
+ }
240
+ }
241
+ }
242
+ }
admin/src/scss/partials/_select2.scss ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Custom buttom/loading styles */
2
+ .select2-results .select2-result.alm-color .select2-result-label{
3
+ position: relative;
4
+ }
5
+ .select2-results .select2-result.alm-color .select2-result-label:after{
6
+ width: 10px;
7
+ height: 10px;
8
+ border-radius: 100%;
9
+ content: '';
10
+ display: block;
11
+ position: absolute;
12
+ right: 20px;
13
+ top: 50%;
14
+ margin-top: -5px;
15
+ z-index: 1;
16
+ }
17
+ .select2-results .select2-result.alm-color.default .select2-result-label:after{
18
+ background-color: #ed7070;
19
+ }
20
+ .select2-results .select2-result.alm-color.white .select2-result-label:after{
21
+ background-color: #fff;
22
+ box-shadow: 0 0 0 1px #ccc;
23
+ }
24
+ .select2-results .select2-result.alm-color.light-grey .select2-result-label:after{
25
+ background-color: #efefef;
26
+ box-shadow: 0 0 0 1px #ccc;
27
+ }
28
+ .select2-results .select2-result.alm-color.blue .select2-result-label:after{
29
+ background-color: #1b91ca;
30
+ }
31
+ .select2-results .select2-result.alm-color.green .select2-result-label:after{
32
+ background-color: #80ca7a;
33
+ }
34
+ .select2-results .select2-result.alm-color.purple .select2-result-label:after{
35
+ background-color: #b97eca;
36
+ }
37
+ .select2-results .select2-result.alm-color.grey .select2-result-label:after{
38
+ background-color: #a09e9e;
39
+ }
40
+ .select2-results .select2-result.infinite .select2-result-label:after{
41
+ display: none;
42
+ }
43
+ .select2-results .select2-result.infinite .select2-result-label{
44
+ -webkit-background-size: 20px 20px;
45
+ -moz-background-size: 20px 20px;
46
+ background-size: 20px 20px;
47
+ background-repeat: no-repeat;
48
+ background-position: 93% center;
49
+ }
50
+ .select2-results .select2-result.classic .select2-result-label{
51
+ background-image: url("../../../core/img/spinner.gif");
52
+ }
53
+ .select2-results .select2-result.skype .select2-result-label{
54
+ background-image: url("../../../core/img/spinner-skype.gif");
55
+ }
56
+ .select2-results .select2-result.ring .select2-result-label{
57
+ background-image: url("../../../core/img/spinner-ring.gif");
58
+ }
59
+ .select2-results .select2-result.chasing-arrows .select2-result-label{
60
+ background-image: url("../../../core/img/spinner-chasing-arrows.gif");
61
+ }
62
+ .select2-results .select2-result.fading-blocks .select2-result-label{
63
+ background-image: url("../../../core/img/loader-fading-blocks.gif");
64
+ -webkit-background-size: 20px 16px;
65
+ -moz-background-size: 20px 16px;
66
+ background-size: 20px 16px;
67
+ }
68
+ .select2-results .select2-result.fading-circles .select2-result-label{
69
+ background-image: url("../../../core/img/loader-fading-circles.gif");
70
+ -webkit-background-size: 30px 10px;
71
+ -moz-background-size: 30px 10px;
72
+ background-size: 30px 10px;
73
+ background-position: 95% center;
74
+ }
admin/src/scss/partials/_shortcode-builder.scss ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .shortcode-builder{
2
+
3
+ p.warning-callout{
4
+ &:before{
5
+ display: block;
6
+ width: calc(100% + 36px);
7
+ height: 1px;
8
+ content: '';
9
+ background: $light_border;
10
+ position: absolute;
11
+ left: -18px;
12
+ top: -10px;
13
+ z-index: 1;
14
+ }
15
+ }
16
+ section{
17
+ display: flex;
18
+ flex-wrap: nowrap;
19
+ width: 100%;
20
+ border-top: 1px solid $light_border;
21
+ &:hover,
22
+ &:focus-within{
23
+ h4{
24
+ text-decoration: underline;
25
+ }
26
+ }
27
+ &.first{
28
+ border-top: none;
29
+ }
30
+ &.full{
31
+ flex-wrap: wrap;
32
+ .shortcode-builder--label,
33
+ .shortcode-builder--fields{
34
+ width: 100%;
35
+ }
36
+ .shortcode-builder--label{
37
+ border-bottom: 1px solid $light_border;
38
+ }
39
+ }
40
+ input[type=text],
41
+ input[type=email],
42
+ input[type=number],
43
+ textarea{
44
+ width: 100%;
45
+ }
46
+ .select2-container{
47
+ min-width: 100%;
48
+ width: 100%;
49
+ }
50
+ }
51
+ &--label,
52
+ &--fields{
53
+ padding: 23px 20px;
54
+ }
55
+ &--label{
56
+ background-color: #fcfcfc;
57
+ border-right: 1px solid $light_border;
58
+ width: 40%;
59
+ padding-right: 30px;
60
+ &.full{
61
+ width: 100%;
62
+ }
63
+ h4{
64
+ margin: 0 0 10px;
65
+ }
66
+ p{
67
+ font-size: 13px !important;
68
+ line-height: 18px !important;
69
+ small{
70
+ padding-top: 10px;
71
+ display: block;
72
+ font-size: 12px !important;
73
+ }
74
+ &:last-of-type{
75
+ margin-bottom: 0;
76
+ }
77
+ }
78
+ }
79
+ &--fields{
80
+ padding-top: 22px;
81
+ flex: 1;
82
+ input, textarea, select{
83
+ width: 100%;
84
+ }
85
+ section{
86
+ width: 104%;
87
+ margin-left: -2%;
88
+ border: none;
89
+ }
90
+ .half{
91
+ width: 50%;
92
+ padding: 0 2%;
93
+ }
94
+ .flex-grid{
95
+ display: flex;
96
+ width: 100%;
97
+ flex-wrap: nowrap;
98
+ &--two,
99
+ &--three{
100
+ width: 102%;
101
+ margin-left: -1%;
102
+ > div {
103
+ width: 50%;
104
+ padding: 0 1%;
105
+ }
106
+ }
107
+
108
+ &--three{
109
+ > div{
110
+ width: 33.333%;
111
+ }
112
+ }
113
+ }
114
+ }
115
+
116
+ @media screen and (max-width: 1000px){
117
+ section{
118
+ flex-wrap: wrap;
119
+ }
120
+ &--label,
121
+ &--fields{
122
+ width: 100%;
123
+ }
124
+ &--label{
125
+ border-right: none;
126
+ border-bottom: 1px solid $light_border;
127
+ }
128
+
129
+ }
130
+
131
+ .flex-input{
132
+ display: flex;
133
+ width: 100%;
134
+ flex-wrap: nowrap;
135
+ input{
136
+ margin: 0;
137
+ flex: 1;
138
+ border-radius: 3px 0 0 3px;
139
+ }
140
+ span{
141
+ border: 1px solid #e1e1e1;
142
+ border-left: none;
143
+ margin: 0;
144
+ font-weight: 600;
145
+ font-size: 11px;
146
+ text-transform: uppercase;
147
+ padding: 0 15px;
148
+ display: flex;
149
+ align-items: center;
150
+ border-radius: 0 3px 3px 0;
151
+ }
152
+ }
153
+
154
+
155
+ .nested-component{
156
+ padding: 0;
157
+ position: relative;
158
+ &:after, &:before {
159
+ top: 0;
160
+ left: 35px;
161
+ border: solid transparent;
162
+ content: " ";
163
+ height: 0;
164
+ width: 0;
165
+ position: absolute;
166
+ pointer-events: none;
167
+ z-index: 2;
168
+ }
169
+ &:after {
170
+ border-color: rgba(255, 255, 255, 0);
171
+ border-top-color: #fcfcfc;
172
+ border-width: 10px;
173
+ margin-left: -10px;
174
+ }
175
+ &:before {
176
+ border-color: rgba(239, 239, 239, 0);
177
+ border-top-color: $border;
178
+ border-width: 11px;
179
+ margin-left: -11px;
180
+ z-index: 1;
181
+ }
182
+
183
+ &--inner{
184
+ padding: 0;
185
+ position: relative;
186
+ //border-top: 1px solid $light_border;
187
+ &:after {
188
+ clear: both;
189
+ display: table;
190
+ content: '';
191
+ }
192
+ }
193
+ }
194
+ .section-intro{
195
+ font-size: 13px;
196
+ padding: 20px 5px 20px;
197
+ margin: 0 0 20px;
198
+ border-bottom: 1px solid $light_border;
199
+ }
200
+ }
admin/src/scss/partials/_sidebar.scss ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ajax-load-more .cnkt-sidebar {
2
+ width: 30%;
3
+ float: right;
4
+ padding: $padding;
5
+ position: absolute;
6
+ right: 0;
7
+ top: 0;
8
+ height: 100%;
9
+ @media screen and (max-width: 900px) {
10
+ padding-left: 0;
11
+ padding-right: 0;
12
+ }
13
+ .major-publishing-actions {
14
+ padding: $padding;
15
+ clear: both;
16
+ border-top: 1px solid $border;
17
+ box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.025);
18
+ background: $light_grey;
19
+ border-radius: 0 0 2px 2px;
20
+ i {
21
+ opacity: 0.4;
22
+ margin: 0 2px 0 0;
23
+ }
24
+ }
25
+ }
admin/src/scss/partials/_woocommerce.scss ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .woocommerce-intro{
2
+ }
3
+ .woocommerce-help{
4
+ &--item{
5
+ width: 100%;
6
+ display: flex;
7
+ flex-wrap: nowrap;
8
+ align-items: center;
9
+ padding-top: 20px;
10
+ margin-top: 20px;
11
+ border-top: 1px solid #efefef;
12
+ div{
13
+ flex: 1;
14
+ padding: 20px 20px 20px 30px;
15
+ @media screen and (max-width: 600px){
16
+ padding: 20px 0;
17
+ }
18
+ }
19
+ .img{
20
+ padding: 0;
21
+ flex: none;
22
+ width: 30%;
23
+ @media screen and (max-width: 600px){
24
+ display: none;
25
+ }
26
+ img{
27
+ border: 1px solid #efefef;
28
+ padding: 2px;
29
+ border-radius: 4px;
30
+ }
31
+ }
32
+ }
33
+ }
admin/views/add-ons.php CHANGED
File without changes
admin/views/go-pro.php CHANGED
File without changes
admin/views/help.php CHANGED
File without changes
admin/views/licenses.php CHANGED
File without changes
admin/views/repeater-templates.php CHANGED
@@ -155,10 +155,11 @@
155
  <?php } ?>
156
 
157
  <?php } else {
158
- $tr_extend_cta = alm_get_addon( 'theme-repeaters' );
159
- if ( $tr_extend_cta ) {
160
- echo alm_display_featured_addon( $tr_extend_cta, 'Upgrade Now');
161
- }
 
162
  } ?>
163
 
164
  <?php } else { ?>
155
  <?php } ?>
156
 
157
  <?php } else {
158
+ // Display Theme Repeaters CTA.
159
+ $tr_extend_cta = alm_get_addon( 'theme-repeaters' );
160
+ if ( $tr_extend_cta ) {
161
+ echo alm_display_featured_addon( $tr_extend_cta, 'Upgrade Now');
162
+ }
163
  } ?>
164
 
165
  <?php } else { ?>
admin/views/shortcode-builder.php CHANGED
File without changes
ajax-load-more.php CHANGED
@@ -7,15 +7,15 @@ Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: https://connekthq.com
10
- Version: 5.4.2
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
  // @codingStandardsIgnoreStart
16
 
17
- define( 'ALM_VERSION', '5.4.2' );
18
- define( 'ALM_RELEASE', 'January 3, 2021' );
19
  define( 'ALM_STORE_URL', 'https://connekthq.com' );
20
 
21
  /**
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: https://connekthq.com
10
+ Version: 5.4.2.1
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
  // @codingStandardsIgnoreStart
16
 
17
+ define( 'ALM_VERSION', '5.4.2.1' );
18
+ define( 'ALM_RELEASE', 'January 5, 2021' );
19
  define( 'ALM_STORE_URL', 'https://connekthq.com' );
20
 
21
  /**
core/classes/includes/preloaded.php CHANGED
File without changes
core/functions.php CHANGED
File without changes
core/src/js/addons/cache.js ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import axios from 'axios';
2
+
3
+ /**
4
+ * createCacheFile
5
+ * Create a single post cache file
6
+ *
7
+ * @param {Object} alm
8
+ * @param {String} content
9
+ * @param {String} type
10
+ * @since 5.3.1
11
+ */
12
+ export function createCacheFile(alm, content, type = 'standard') {
13
+ if (alm.addons.cache !== 'true' || !content || content === '') {
14
+ return false;
15
+ }
16
+
17
+ let name = type === 'single' ? alm.addons.single_post_id : `page-${alm.page + 1}`;
18
+
19
+ let formData = new FormData();
20
+ formData.append('action', 'alm_cache_from_html');
21
+ formData.append('security', alm_localize.alm_nonce);
22
+ formData.append('cache_id', alm.addons.cache_id);
23
+ formData.append('cache_logged_in', alm.addons.cache_logged_in);
24
+ formData.append('canonical_url', alm.canonical_url);
25
+ formData.append('name', name);
26
+ formData.append('html', content.trim());
27
+
28
+ axios.post(alm_localize.ajaxurl, formData).then(function (response) {
29
+ console.log('Cache created for: ' + alm.canonical_url);
30
+ });
31
+ }
32
+
33
+ /**
34
+ * wooCache
35
+ * Create a WooCommerce cache file
36
+ *
37
+ * @param {Object} alm
38
+ * @param {String} content
39
+ * @since 5.3.1
40
+ */
41
+ export function wooCache(alm, content) {
42
+ if (alm.addons.cache !== 'true' || !content || content === '') {
43
+ return false;
44
+ }
45
+
46
+ let formData = new FormData();
47
+ formData.append('action', 'alm_cache_from_html');
48
+ formData.append('security', alm_localize.alm_nonce);
49
+ formData.append('cache_id', alm.addons.cache_id);
50
+ formData.append('cache_logged_in', alm.addons.cache_logged_in);
51
+ formData.append('canonical_url', alm.canonical_url);
52
+ formData.append('name', `page-${alm.page}`);
53
+ formData.append('html', content.trim());
54
+
55
+ axios.post(alm_localize.ajaxurl, formData).then(function (response) {
56
+ console.log('Cache created for post: ' + alm.canonical_url);
57
+ //console.log(response);
58
+ });
59
+ }
core/src/js/addons/elementor.js ADDED
@@ -0,0 +1,340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import loadItems from '../modules/loadItems';
2
+
3
+ /**
4
+ * Set up the instance on Elementor
5
+ *
6
+ * @param {object} alm
7
+ * @since 5.3.0
8
+ */
9
+
10
+ export function elementorInit(alm) {
11
+ if (!alm.addons.elementor || !alm.addons.elementor_type || !alm.addons.elementor_type === 'posts') {
12
+ return false;
13
+ }
14
+ let target = alm.addons.elementor_element;
15
+
16
+ if (target) {
17
+ // Set button data attributes
18
+ alm.button.dataset.page = alm.addons.elementor_paged;
19
+
20
+ // Set button URL
21
+ let nextPage = alm.addons.elementor_next_page_url;
22
+ alm.button.dataset.url = nextPage ? nextPage : '';
23
+
24
+ // Set a11y attributes
25
+ target.setAttribute('aria-live', 'polite');
26
+ target.setAttribute('aria-atomic', 'true');
27
+
28
+ alm.listing.removeAttribute('aria-live');
29
+ alm.listing.removeAttribute('aria-atomic');
30
+
31
+ // Set data atts on 1st grid item
32
+ let item = target.querySelector(`.${alm.addons.elementor_item_class}`); // Get first `.product` item
33
+ if (item) {
34
+ item.classList.add('alm-elementor');
35
+ item.dataset.url = window.location;
36
+ item.dataset.page = alm.addons.elementor_paged;
37
+ item.dataset.pageTitle = document.title;
38
+ }
39
+
40
+ if (alm.addons.elementor_paged > 1) {
41
+ // maybe soon
42
+ //almElementorResultsTextInit(alm);
43
+ }
44
+
45
+ // Masonry Window Resize. Delay for masonry to be added via Elementor.
46
+ if (alm.addons.elementor_masonry) {
47
+ let resizeTimeout;
48
+ setTimeout(function () {
49
+ window.addEventListener('resize', function () {
50
+ clearTimeout(resizeTimeout);
51
+ resizeTimeout = setTimeout(function () {
52
+ positionMasonryItems(alm, `.${alm.addons.elementor_container_class}`, `.${alm.addons.elementor_item_class}`);
53
+ }, 100);
54
+ });
55
+ }, 250);
56
+ }
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Core ALM Elementor loader.
62
+ *
63
+ * @param {HTMLElement} content
64
+ * @param {object} alm
65
+ * @param {String} pageTitle
66
+ * @since 5.3.0
67
+ */
68
+
69
+ export function elementor(content, alm, pageTitle = document.title) {
70
+ if (!content || !alm) {
71
+ return false;
72
+ }
73
+
74
+ return new Promise((resolve) => {
75
+ let container = alm.addons.elementor_element.querySelector(`.${alm.addons.elementor_container_class}`); // Get post container
76
+ let items = content.querySelectorAll(`.${alm.addons.elementor_item_class}`); // Get all items in container
77
+ let url = alm.addons.elementor_current_url; // Current Page URL
78
+
79
+ if (container && items && url) {
80
+ // Convert NodeList to Array
81
+ items = Array.prototype.slice.call(items);
82
+
83
+ // Load the items
84
+ (async function () {
85
+ await loadItems(container, items, alm, pageTitle, url, 'alm-elementor');
86
+ if (alm.addons.elementor_masonry) {
87
+ setTimeout(function () {
88
+ positionMasonryItems(alm, `.${alm.addons.elementor_container_class}`, `.${alm.addons.elementor_item_class}`);
89
+ }, 125);
90
+ }
91
+
92
+ resolve(true);
93
+ })().catch((e) => {
94
+ console.log(e, 'There was an error with Elementor');
95
+ });
96
+ } else {
97
+ resolve(false);
98
+ }
99
+ });
100
+ }
101
+
102
+ /**
103
+ * Get the content, title and results text from the Ajax response.
104
+ *
105
+ * @param {*} response
106
+ * @param {object} alm
107
+ * @since 5.4.0
108
+ */
109
+ export function elementorGetContent(response, alm) {
110
+ let data = {
111
+ html: '',
112
+ meta: {
113
+ postcount: 1,
114
+ totalposts: alm.localize.total_posts,
115
+ debug: 'Elementor Query',
116
+ },
117
+ };
118
+ if (response.status === 200 && response.data) {
119
+ let div = document.createElement('div');
120
+ div.innerHTML = response.data;
121
+
122
+ // Get Page Title
123
+ let title = div.querySelector('title').innerHTML;
124
+ data.pageTitle = title;
125
+
126
+ // Get Elementor Items HTML
127
+ let items = div.querySelector(`${alm.addons.elementor_target} .${alm.addons.elementor_container_class}`);
128
+ data.html = items ? items.innerHTML : '';
129
+
130
+ // Set Page URL Params
131
+ alm.addons.elementor_current_url = alm.addons.elementor_next_page_url; // Set current to previous page URL
132
+ alm.addons.elementor_next_page_url = elementorGetNextPage(div, alm.addons.elementor_pagination_class);
133
+
134
+ // Results Text
135
+ //almElementorResultsText(div, alm);
136
+ }
137
+
138
+ return data;
139
+ }
140
+
141
+ /**
142
+ * Create Elementor Params for ALM.
143
+ *
144
+ * @param Object alm
145
+ * @return alm
146
+ */
147
+ export function elementorCreateParams(alm) {
148
+ // Get Settings
149
+ alm.addons.elementor_type = 'posts';
150
+ alm.addons.elementor_settings = JSON.parse(alm.listing.dataset.elementorSettings);
151
+
152
+ // Parse Container Settings
153
+ alm.addons.elementor_target = alm.addons.elementor_settings.target;
154
+ alm.addons.elementor_element = alm.addons.elementor_settings.target
155
+ ? document.querySelector(`.elementor-widget-wrap ${alm.addons.elementor_settings.target}`)
156
+ : '';
157
+ alm.addons.elementor_widget = elementorGetWidgetType(alm.addons.elementor_element);
158
+
159
+ // Masonry
160
+ alm = setElementorClasses(alm, alm.addons.elementor_widget);
161
+
162
+ // Pagination Element
163
+ alm.addons.elementor_pagination =
164
+ alm.addons.elementor_element.querySelector(alm.addons.elementor_pagination_class) ||
165
+ alm.addons.elementor_element.querySelector(`.${alm.addons.elementor_settings.pagination_class}`);
166
+ alm.addons.elementor_pagination = alm.addons.elementor_pagination ? alm.addons.elementor_pagination : false;
167
+
168
+ alm.addons.elementor_controls = alm.addons.elementor_settings.controls;
169
+ alm.addons.elementor_controls = alm.addons.elementor_controls === 'true' ? true : false;
170
+ alm.addons.elementor_scrolltop = parseInt(alm.addons.elementor_settings.scrolltop);
171
+
172
+ // Set Page & URL params
173
+ alm.addons.elementor_current_url = window.location.href;
174
+ alm.addons.elementor_next_page_url = elementorGetNextUrl(alm.addons.elementor_pagination);
175
+ alm.addons.elementor_paged = alm.addons.elementor_settings.paged ? parseInt(alm.addons.elementor_settings.paged) : 1;
176
+ alm.page = parseInt(alm.page) + alm.addons.elementor_paged;
177
+
178
+ // Masonry
179
+ alm = parseMasonryConfig(alm);
180
+
181
+ if (!alm.addons.elementor_element) {
182
+ console.warn("Ajax Load More: Unable to locate Elementor Widget. Are you sure you've set up your target parameter correctly?");
183
+ }
184
+ if (!alm.addons.elementor_pagination) {
185
+ console.warn(
186
+ 'Ajax Load More: Unable to locate Elementor pagination. There are either no results or p Ajax Load More is unable to locate the pagination widget?'
187
+ );
188
+ }
189
+ return alm;
190
+ }
191
+
192
+ /**
193
+ * Set the required classnames for parsing data and injecting content into the Elementor listing
194
+ *
195
+ * @param {*} alm
196
+ * @param {*} type
197
+ */
198
+ function setElementorClasses(alm, type = 'posts') {
199
+ // Container Class
200
+ alm.addons.elementor_container_class =
201
+ type === 'woocommerce' ? alm.addons.elementor_settings.woo_container_class : alm.addons.elementor_settings.posts_container_class;
202
+
203
+ // Item Class
204
+ alm.addons.elementor_item_class = type === 'woocommerce' ? alm.addons.elementor_settings.woo_item_class : alm.addons.elementor_settings.posts_item_class;
205
+
206
+ // Pagination Class
207
+ alm.addons.elementor_pagination_class =
208
+ type === 'woocommerce' ? `.${alm.addons.elementor_settings.woo_pagination_class}` : `.${alm.addons.elementor_settings.posts_pagination_class}`;
209
+
210
+ return alm;
211
+ }
212
+
213
+ /**
214
+ * Parse Masonry Settings from Elementor Data atts
215
+ *
216
+ * @param {*} alm
217
+ */
218
+ function parseMasonryConfig(alm) {
219
+ if (!alm.addons.elementor_element) {
220
+ return alm; // Exit if not found.
221
+ }
222
+
223
+ const target = alm.addons.elementor_element;
224
+
225
+ const settings = target.dataset.settings ? JSON.parse(target.dataset.settings) : '';
226
+ if (!settings) {
227
+ return alm; // Exit if not found.
228
+ }
229
+
230
+ alm.addons.elementor_masonry = settings.hasOwnProperty('cards_masonry') || settings.hasOwnProperty('classic_masonry');
231
+ if (alm.addons.elementor_masonry) {
232
+ alm.addons.elementor_masonry_columns = parseInt(settings.cards_columns) || parseInt(settings.classic_columns);
233
+ alm.addons.elementor_masonry_columns_mobile = parseInt(settings.cards_columns_mobile) || parseInt(settings.classic_columns_mobile);
234
+ alm.addons.elementor_masonry_columns_tablet = parseInt(settings.cards_columns_tablet) || parseInt(settings.classic_columns_tablet);
235
+ alm.addons.elementor_masonry_gap = parseInt(settings.cards_row_gap.size);
236
+ }
237
+
238
+ return alm;
239
+ }
240
+
241
+ /**
242
+ * Position Elementor Masonry Items
243
+ *
244
+ * @param {*} alm
245
+ * @param {*} container_class
246
+ * @param {*} item_class
247
+ */
248
+ function positionMasonryItems(alm, container_class, item_class) {
249
+ let heights = [];
250
+
251
+ // Get Elementor Settings
252
+ const columnsCount = alm.addons.elementor_masonry_columns;
253
+ const columnsCountTablet = alm.addons.elementor_masonry_columns_tablet;
254
+ const columnsCountMobile = alm.addons.elementor_masonry_columns_mobile;
255
+ const verticalSpaceBetween = alm.addons.elementor_masonry_gap;
256
+ let columns = columnsCount;
257
+
258
+ // Get Elementor Breakpoints
259
+ const breakpoints = window.elementorFrontendConfig && window.elementorFrontendConfig.breakpoints ? window.elementorFrontendConfig.breakpoints : 0;
260
+ const windowW = window.innerWidth;
261
+
262
+ // Set Columns
263
+ if (windowW > breakpoints.lg) {
264
+ columns = columnsCount;
265
+ } else if (windowW > breakpoints.md) {
266
+ columns = columnsCountTablet;
267
+ } else {
268
+ columns = columnsCountMobile;
269
+ }
270
+
271
+ // Get Containers
272
+ const container = document.querySelector(container_class);
273
+ if (!container) {
274
+ return false;
275
+ }
276
+ const items = container.querySelectorAll(item_class);
277
+ if (!items) {
278
+ return false;
279
+ }
280
+
281
+ // Loop items
282
+ items.forEach((item, index) => {
283
+ let row = Math.floor(index / columns);
284
+ let itemHeight = item.getBoundingClientRect().height + verticalSpaceBetween;
285
+
286
+ if (row) {
287
+ let itemPosition = jQuery(item).position();
288
+ let indexAtRow = index % columns;
289
+ let pullHeight = Math.round(itemPosition.top) - heights[indexAtRow];
290
+
291
+ pullHeight *= -1;
292
+ item.style.marginTop = `${Math.round(pullHeight)}px`;
293
+ heights[indexAtRow] += itemHeight;
294
+ } else {
295
+ heights.push(itemHeight);
296
+ }
297
+ });
298
+ }
299
+
300
+ /**
301
+ * Determine the type of elementor widget (woocommerce || posts)
302
+ *
303
+ * @param {*} target
304
+ * @param {*} classname
305
+ */
306
+ function elementorGetWidgetType(target) {
307
+ if (!target) {
308
+ return false;
309
+ }
310
+ // If container contains the woocommerce elementor class
311
+ const type = target.classList.contains('elementor-wc-products') ? 'woocommerce' : 'posts';
312
+ return type;
313
+ }
314
+
315
+ /**
316
+ * Get the upcoming URL from the a.next link from the HTML
317
+ *
318
+ * @param {HTMLElement} element
319
+ * @param {String} classname
320
+ * @return {string} href
321
+ */
322
+ function elementorGetNextPage(element, classname) {
323
+ const pagination = element.querySelector(classname);
324
+ const href = pagination ? elementorGetNextUrl(pagination) : '';
325
+
326
+ return href;
327
+ }
328
+
329
+ /**
330
+ * Get the URL of the next page to load from the a.next href
331
+ *
332
+ * @param {HTMLElement} element
333
+ * @return {String} url
334
+ */
335
+ function elementorGetNextUrl(element) {
336
+ if (!element) {
337
+ return '';
338
+ }
339
+ return element.querySelector('a.next') ? element.querySelector('a.next').href : '';
340
+ }
core/src/js/addons/filters.js ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import getQueryVariable from '../helpers/getQueryVariable';
2
+ const FILTERS_CLASSNAME = 'alm-filters';
3
+
4
+ /**
5
+ * parseQuerystring
6
+ * Parse a filter querystring for returning caches directories
7
+ *
8
+ * @param {Object} alm
9
+ * @param {Array} elements
10
+ * @since 5.3.1
11
+ */
12
+ export function parseQuerystring(path) {
13
+ // Get querystring
14
+ let query = window.location.search.substring(1);
15
+ let obj = '';
16
+ let cache_dir = '';
17
+
18
+ // Parse querystring into object
19
+ if (query) {
20
+ obj = JSON.parse('{"' + query.replace(/&/g, '","').replace(/=/g, '":"') + '"}', function (key, value) {
21
+ // Replace + with - in URL
22
+ return key === '' ? value : decodeURIComponent(value.replace(/\+/g, '-'));
23
+ });
24
+
25
+ // Remove the following properties from the object as they should not be included in the cache ID
26
+
27
+ if (obj.pg) {
28
+ // `pg` object prop
29
+ delete obj.pg;
30
+ }
31
+
32
+ if (obj.auto) {
33
+ // `auto` object prop
34
+ delete obj.auto;
35
+ }
36
+ }
37
+
38
+ if (obj) {
39
+ cache_dir += '/';
40
+ Object.keys(obj).forEach((key, index) => {
41
+ cache_dir += index > 0 ? '--' : '';
42
+ cache_dir += `${key}--${obj[key]}`;
43
+ });
44
+ }
45
+
46
+ return path + cache_dir;
47
+ }
48
+
49
+ /**
50
+ * Build new paging URL for filters
51
+ *
52
+ * @param {Object} alm
53
+ * @param {String} querystring
54
+ * @param {Int} page
55
+ * @since 5.3.5
56
+ */
57
+ export function buildFilterURL(alm, querystring = '', page = 0) {
58
+ let qs = querystring;
59
+
60
+ if (alm.addons.filters_paging) {
61
+ if (page > 1) {
62
+ // Paged
63
+ if (qs) {
64
+ // If already has `pg` in querystring
65
+ if (getQueryVariable('pg')) {
66
+ qs = querystring.replace(/(pg=)[^\&]+/, '$1' + page);
67
+ } else {
68
+ qs = querystring + '&pg=' + page;
69
+ }
70
+ } else {
71
+ qs = '?pg=' + page;
72
+ }
73
+ } else {
74
+ // Not Paged
75
+ qs = querystring.replace(/(pg=)[^\&]+/, '');
76
+ qs = qs === '?' ? '' : qs; // Remove `?` if only symbol in querystring
77
+ qs = qs[qs.length - 1] === '&' ? qs.slice(0, -1) : qs; // Remove trailing `&` symbols
78
+ }
79
+ }
80
+
81
+ return qs;
82
+ }
83
+
84
+ /**
85
+ * Create data attributes for Filters paged results
86
+ *
87
+ * @param {Object} alm
88
+ * @param {Array} elements
89
+ * @since 5.3.1
90
+ */
91
+ export function createMasonryFiltersPage(alm, element) {
92
+ if (!alm.addons.filters) {
93
+ return element;
94
+ }
95
+
96
+ let querystring = window.location.search;
97
+ let page = alm.page + 1;
98
+ page = alm.addons.preloaded === 'true' ? page + 1 : page;
99
+ element = masonryFiltersAtts(alm, element, querystring, page);
100
+
101
+ return element;
102
+ }
103
+
104
+ /**
105
+ * Create data attributes for Filters - used when ?pg=2, ?pg=3 etc are hit on page load
106
+ *
107
+ * @param {Object} alm
108
+ * @param {Array} elements
109
+ * @since 5.3.1
110
+ */
111
+ export function createMasonryFiltersPages(alm, elements) {
112
+ if (!alm.addons.filters) {
113
+ return elements;
114
+ }
115
+
116
+ let pagenum = 1;
117
+ let page = alm.page;
118
+ let querystring = window.location.search;
119
+
120
+ if (alm.addons.filters_startpage > 1) {
121
+ // Create pages
122
+ let posts_per_page = parseInt(alm.posts_per_page);
123
+ let return_data = [];
124
+
125
+ // Slice data array into individual pages
126
+ for (let i = 0; i < elements.length; i += posts_per_page) {
127
+ return_data.push(elements.slice(i, posts_per_page + i));
128
+ }
129
+
130
+ // Loop new data array
131
+ for (let k = 0; k < return_data.length; k++) {
132
+ let target = k > 0 ? k * posts_per_page : 0;
133
+ pagenum = k + 1;
134
+
135
+ if (elements[target]) {
136
+ elements[target] = masonryFiltersAtts(alm, elements[target], querystring, pagenum);
137
+ }
138
+ }
139
+ } else {
140
+ pagenum = page;
141
+ if (elements && elements[0]) {
142
+ elements[0] = masonryFiltersAtts(alm, elements[0], querystring, pagenum);
143
+ }
144
+ }
145
+
146
+ return elements;
147
+ }
148
+
149
+ // Create the attributes (page, url, classes) for the masonry items
150
+ function masonryFiltersAtts(alm, element, querystring, pagenum) {
151
+ element.classList.add(FILTERS_CLASSNAME);
152
+ element.dataset.page = pagenum;
153
+ if (pagenum > 1) {
154
+ element.dataset.url = alm.canonical_url + buildFilterURL(alm, querystring, pagenum);
155
+ } else {
156
+ let updatedQS = querystring.replace(/(pg=)[^\&]+/, ''); // Remove `pg` from querysting
157
+ updatedQS = updatedQS === '?' ? '' : updatedQS; // Remove empty querysting
158
+
159
+ element.dataset.url = alm.canonical_url + updatedQS;
160
+ }
161
+
162
+ return element;
163
+ }
core/src/js/addons/seo.js ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * createMasonrySEOPage
3
+ * Create data attributes for SEO paged results
4
+ *
5
+ * @param {Object} alm
6
+ * @param {Array} elements
7
+ * @since 5.3.1
8
+ */
9
+ export function createMasonrySEOPage(alm, element) {
10
+ if (!alm.addons.seo) {
11
+ return element;
12
+ }
13
+
14
+ let querystring = window.location.search;
15
+ let seo_class = 'alm-seo';
16
+ let page = alm.page + 1;
17
+ page = alm.addons.preloaded === 'true' ? page + 1 : page;
18
+ element = masonrySEOAtts(alm, element, querystring, seo_class, page);
19
+
20
+ return element;
21
+ }
22
+
23
+ /**
24
+ * createMasonrySEOPages
25
+ * Create data attributes for SEO - used when /page/2/, /page/3/ etc are hit on page load
26
+ *
27
+ * @param {Object} alm
28
+ * @param {Array} elements
29
+ * @since 5.3.1
30
+ */
31
+ export function createMasonrySEOPages(alm, elements) {
32
+ if (!alm.addons.seo) {
33
+ return elements;
34
+ }
35
+
36
+ let pagenum = 1;
37
+ let page = alm.page;
38
+ let seo_class = 'alm-seo';
39
+ let querystring = window.location.search;
40
+
41
+ if (alm.start_page > 1) {
42
+ // Create pages
43
+ let posts_per_page = parseInt(alm.posts_per_page);
44
+ let return_data = [];
45
+
46
+ // Slice data array into individual pages
47
+ for (let i = 0; i < elements.length; i += posts_per_page) {
48
+ return_data.push(elements.slice(i, posts_per_page + i));
49
+ }
50
+
51
+ // Loop new data array
52
+ for (let k = 0; k < return_data.length; k++) {
53
+ let target = k > 0 ? k * posts_per_page : 0;
54
+ pagenum = k + 1;
55
+ if (elements[target]) {
56
+ elements[target] = masonrySEOAtts(
57
+ alm,
58
+ elements[target],
59
+ querystring,
60
+ seo_class,
61
+ pagenum
62
+ );
63
+ }
64
+ }
65
+ } else {
66
+ pagenum = page;
67
+ elements[0] = masonrySEOAtts(
68
+ alm,
69
+ elements[0],
70
+ querystring,
71
+ seo_class,
72
+ pagenum
73
+ );
74
+ }
75
+
76
+ return elements;
77
+ }
78
+
79
+ // Create the attributes (page, url, classes) for the masonry items
80
+ function masonrySEOAtts(alm, element, querystring, seo_class, pagenum) {
81
+ element.classList.add(seo_class);
82
+ element.dataset.page = pagenum;
83
+
84
+ if (alm.addons.seo_permalink === 'default') {
85
+ // Default Permalinks
86
+ if (pagenum > 1) {
87
+ element.dataset.url =
88
+ alm.canonical_url + querystring + '&paged=' + pagenum;
89
+ } else {
90
+ element.dataset.url = alm.canonical_url + querystring;
91
+ }
92
+ } else {
93
+ // Pretty Permalinks
94
+ if (pagenum > 1) {
95
+ element.dataset.url =
96
+ alm.canonical_url +
97
+ alm.addons.seo_leading_slash +
98
+ 'page/' +
99
+ pagenum +
100
+ alm.addons.seo_trailing_slash +
101
+ querystring;
102
+ } else {
103
+ element.dataset.url = alm.canonical_url + querystring;
104
+ }
105
+ }
106
+
107
+ return element;
108
+ }
109
+
110
+ /**
111
+ * createSEOAttributes
112
+ * Create data attributes for SEO - used when /page/2/, /page/3/ etc are hit on page load
113
+ *
114
+ * @param {Object} alm
115
+ * @param {Array} elements
116
+ * ...
117
+ * @since 5.3.1
118
+ */
119
+ export function createSEOAttributes(
120
+ alm,
121
+ element,
122
+ querystring,
123
+ seo_class,
124
+ pagenum
125
+ ) {
126
+ element.setAttribute('class', 'alm-reveal' + seo_class + alm.tcc);
127
+ element.dataset.page = pagenum;
128
+
129
+ if (alm.addons.seo_permalink === 'default') {
130
+ // Default Permalinks
131
+ element.dataset.url =
132
+ pagenum > 1
133
+ ? alm.canonical_url + querystring + '&paged=' + pagenum
134
+ : alm.canonical_url + querystring;
135
+ } else {
136
+ // Pretty Permalinks
137
+ element.dataset.url =
138
+ pagenum > 1
139
+ ? alm.canonical_url +
140
+ alm.addons.seo_leading_slash +
141
+ 'page/' +
142
+ pagenum +
143
+ alm.addons.seo_trailing_slash +
144
+ querystring
145
+ : alm.canonical_url + querystring;
146
+ }
147
+
148
+ return element;
149
+ }
core/src/js/addons/singleposts.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * singlePostHTML
3
+ * Create the HTML for loading Single Posts
4
+ *
5
+ * @param {Object} response Query response
6
+ * @param {HTMLElement} target The target div
7
+ * @since 5.1.8.1
8
+ */
9
+ export function singlePostHTML(response, target = null){
10
+ let data = {
11
+ html: '',
12
+ meta: {
13
+ postcount: 1,
14
+ totalposts: 1,
15
+ debug: 'Single Posts Query',
16
+ }
17
+ }
18
+ if(response.status === 200 && response.data && target){
19
+ let div = document.createElement("div");
20
+ div.innerHTML = response.data;
21
+ let htmlTarget = div.querySelector(target);
22
+ if(htmlTarget){
23
+ data.html = htmlTarget.innerHTML;
24
+ }
25
+ }
26
+ return data;
27
+ }
28
+
29
+ export default singlePostHTML;
core/src/js/addons/woocommerce.js ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import axios from 'axios';
2
+ import loadItems from '../modules/loadItems';
3
+
4
+ /**
5
+ * Set up the instance of ALM WooCommerce
6
+ *
7
+ * @param {object} alm
8
+ * @since 5.3.0
9
+ */
10
+ export function wooInit(alm) {
11
+ if (!alm || !alm.addons.woocommerce) {
12
+ return false;
13
+ }
14
+
15
+ alm.button.dataset.page = alm.addons.woocommerce_settings.paged + 1; // Page
16
+
17
+ // URL
18
+ let nextPage = alm.addons.woocommerce_settings.paged_urls[alm.addons.woocommerce_settings.paged];
19
+ if (nextPage) {
20
+ alm.button.dataset.url = nextPage;
21
+ } else {
22
+ alm.button.dataset.url = '';
23
+ }
24
+
25
+ // Set up URL and class parameters on first item in product listing
26
+ let products = document.querySelector(alm.addons.woocommerce_settings.container); // Get `ul.products`
27
+ if (products) {
28
+ products.setAttribute('aria-live', 'polite');
29
+ products.setAttribute('aria-atomic', 'true');
30
+
31
+ alm.listing.removeAttribute('aria-live');
32
+ alm.listing.removeAttribute('aria-atomic');
33
+
34
+ let product = products.querySelector(alm.addons.woocommerce_settings.products); // Get first `.product` item
35
+ if (product) {
36
+ product.classList.add('alm-woocommerce');
37
+ product.dataset.url = alm.addons.woocommerce_settings.paged_urls[alm.addons.woocommerce_settings.paged - 1];
38
+ product.dataset.page = alm.page;
39
+ product.dataset.pageTitle = document.title;
40
+ }
41
+
42
+ if (alm.addons.woocommerce_settings.paged > 1) {
43
+ almWooCommerceResultsTextInit(alm);
44
+ }
45
+ }
46
+ }
47
+
48
+ /**
49
+ * Core ALM WooCommerce product loader
50
+ *
51
+ * @param {HTMLElement} content
52
+ * @param {object} alm
53
+ * @param {String} pageTitle
54
+ * @since 5.3.0
55
+ */
56
+
57
+ export function woocommerce(content, alm, pageTitle = document.title) {
58
+ if (!content || !alm) {
59
+ return false;
60
+ }
61
+
62
+ return new Promise((resolve) => {
63
+ let container = document.querySelector(alm.addons.woocommerce_settings.container); // Get `ul.products`
64
+ let products = content.querySelectorAll(alm.addons.woocommerce_settings.products); // Get all `.products`
65
+ let url = alm.addons.woocommerce_settings.paged_urls[alm.page];
66
+
67
+ if (container && products && url) {
68
+ // Convert NodeList to Array
69
+ products = Array.prototype.slice.call(products);
70
+
71
+ // Load the Products
72
+ (async function () {
73
+ await loadItems(container, products, alm, pageTitle, url, 'alm-woocommerce');
74
+ resolve(true);
75
+ })().catch((e) => {
76
+ console.log(e, 'There was an error with WooCommerce');
77
+ });
78
+ }
79
+ });
80
+ }
81
+
82
+ /**
83
+ * Reset a WooCommerce Instance by hitting the updated site URL
84
+ *
85
+ * @since 5.3.8
86
+ */
87
+ export function wooReset() {
88
+ return new Promise((resolve) => {
89
+ let url = window.location;
90
+ axios
91
+ .get(url)
92
+ .then((response) => {
93
+ if (response.status === 200 && response.data) {
94
+ let div = document.createElement('div');
95
+ div.innerHTML = response.data; // Add data to div
96
+
97
+ let alm = div.querySelector('.ajax-load-more-wrap .alm-listing[data-woo="true"]'); // Get ALM instance
98
+ let settings = alm ? alm.dataset.wooSettings : ''; // Get settings data
99
+ resolve(settings);
100
+ } else {
101
+ resolve(false);
102
+ }
103
+ })
104
+ .catch(function (error) {
105
+ resolve(false);
106
+ });
107
+ });
108
+ }
109
+
110
+ /**
111
+ * Get the content, title and results text from the Ajax response
112
+ *
113
+ * @param {object} alm
114
+ * @since 5.3.0
115
+ */
116
+ export function wooGetContent(response, alm) {
117
+ let data = {
118
+ html: '',
119
+ meta: {
120
+ postcount: 1,
121
+ totalposts: alm.localize.total_posts,
122
+ debug: 'WooCommerce Query',
123
+ },
124
+ };
125
+ if (response.status === 200 && response.data) {
126
+ let div = document.createElement('div');
127
+ div.innerHTML = response.data;
128
+
129
+ // Get Page Title
130
+ let title = div.querySelector('title').innerHTML;
131
+ data.pageTitle = title;
132
+
133
+ // Get Products HTML
134
+ let products = div.querySelector(alm.addons.woocommerce_settings.container);
135
+ data.html = products ? products.innerHTML : '';
136
+
137
+ // Results Text
138
+ almWooCommerceResultsText(div, alm);
139
+ }
140
+
141
+ return data;
142
+ }
143
+
144
+ /**
145
+ * Set results text for WooCommerce Add-on.
146
+ *
147
+ * @param {HTMLElement} target
148
+ * @param {Object} alm
149
+ * @since 5.3
150
+ */
151
+ function almWooCommerceResultsText(target = '', alm) {
152
+ if (target && alm && alm.addons.woocommerce_settings.results_text) {
153
+ let currentResults = target.querySelector(alm.addons.woocommerce_settings.results);
154
+ let link = alm.addons.woocommerce_settings.settings.previous_page_link;
155
+ let label = alm.addons.woocommerce_settings.settings.previous_page_label;
156
+ let sep = alm.addons.woocommerce_settings.settings.previous_page_sep;
157
+
158
+ if (alm.addons.woocommerce_settings.results_text) {
159
+ alm.addons.woocommerce_settings.results_text.forEach((element) => {
160
+ if (link && label) {
161
+ element.innerHTML = returnButton(currentResults, link, label, sep);
162
+ } else {
163
+ element.innerHTML = currentResults.innerHTML;
164
+ }
165
+ });
166
+ }
167
+ }
168
+ }
169
+
170
+ /**
171
+ * Initiate Results text.
172
+ *
173
+ * @param {Object} alm
174
+ * @since 5.3
175
+ */
176
+ function almWooCommerceResultsTextInit(alm) {
177
+ if (alm && alm.addons.woocommerce_settings.results_text) {
178
+ let results = document.querySelectorAll(alm.addons.woocommerce_settings.results);
179
+ if (results.length < 1) {
180
+ return false;
181
+ }
182
+ let link = alm.addons.woocommerce_settings.settings.previous_page_link;
183
+ let label = alm.addons.woocommerce_settings.settings.previous_page_label;
184
+ let sep = alm.addons.woocommerce_settings.settings.previous_page_sep;
185
+ // Loop all result text elements
186
+ results.forEach((element) => {
187
+ if (link && label) {
188
+ element.innerHTML = returnButton(element, link, label, sep);
189
+ }
190
+ });
191
+ }
192
+ }
193
+
194
+ /**
195
+ * Create button text for returning to the first page
196
+ *
197
+ * @param {*} text
198
+ * @param {*} link
199
+ * @param {*} label
200
+ * @param {*} seperator
201
+ */
202
+ function returnButton(text, link, label, seperator) {
203
+ let button = ` ${seperator} <a href="${link}">${label}</a>`;
204
+ return text.innerHTML + button;
205
+ }
core/src/js/ajax-load-more.js ADDED
@@ -0,0 +1,2570 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Ajax Load More
3
+ * https://connekthq.com/plugins/ajax-load-more/
4
+ * Author: Darren Cooney
5
+ * Twitter: @KaptonKaos, @ajaxloadmore, @connekthq
6
+ * Copyright Connekt Media - https://connekthq.com
7
+ */
8
+
9
+ // Polyfills
10
+ require('@babel/polyfill/noConflict');
11
+ require('focus-options-polyfill');
12
+ require('./helpers/polyfills.js');
13
+
14
+ // External Modules
15
+ let qs = require('qs');
16
+ let imagesLoaded = require('imagesloaded');
17
+ import axios from 'axios';
18
+ import smoothscroll from 'smoothscroll-polyfill'; // Smooth scrolling polyfill
19
+ smoothscroll.polyfill();
20
+
21
+ // ALM Modules
22
+ import './helpers/helpers';
23
+ //import commentReplyFix from './helpers/commentReplyFix';
24
+ import getParameterByName from './helpers/getParameterByName';
25
+ import almAppendChildren from './helpers/almAppendChildren';
26
+ import tableWrap from './helpers/tableWrap';
27
+ import getCacheUrl from './helpers/getCacheUrl';
28
+ import almDomParser from './helpers/almDomParser';
29
+ import stripEmptyNodes from './helpers/stripEmptyNodes';
30
+ import * as queryParams from './helpers/queryParams';
31
+ import * as resultsText from './modules/resultsText';
32
+ import { tableOfContents } from './modules/tableofcontents';
33
+ import setLocalizedVars from './modules/setLocalizedVars';
34
+ import insertScript from './modules/insertScript';
35
+ import setFocus from './modules/setFocus';
36
+ import getButtonURL from './modules/getButtonURL';
37
+ import almMasonry from './modules/masonry';
38
+ import almFadeIn from './modules/fadeIn';
39
+ import almFadeOut from './modules/fadeOut';
40
+ import almFilter from './modules/filtering';
41
+ import almNoResults from './modules/noResults';
42
+ import almDebug from './modules/almDebug';
43
+ import getScrollPercentage from './modules/getScrollPercentage';
44
+ import srcsetPolyfill from './helpers/srcsetPolyfill';
45
+ import { showPlaceholder, hidePlaceholder } from './modules/placeholder';
46
+ import { singlePostHTML } from './addons/singleposts';
47
+ import { createCacheFile } from './addons/cache';
48
+ import { wooInit, woocommerce, wooGetContent, wooReset } from './addons/woocommerce';
49
+ import { elementorCreateParams, elementorGetContent, elementorInit, elementor } from './addons/elementor';
50
+ import { buildFilterURL } from './addons/filters';
51
+ import { createSEOAttributes } from './addons/seo';
52
+
53
+ // Global filtering var
54
+ let alm_is_filtering = false;
55
+
56
+ // Start ALM
57
+ (function () {
58
+ 'use strict';
59
+
60
+ /**
61
+ * ajaxloadmore
62
+ * Init Ajax Load More
63
+ *
64
+ * @param {*} el
65
+ * @param {*} e
66
+ */
67
+ let ajaxloadmore = function (el, e) {
68
+ // Move user to top of page to prevent loading of unnessasry posts
69
+ if (alm_localize && alm_localize.scrolltop === 'true') {
70
+ window.scrollTo(0, 0);
71
+ }
72
+
73
+ //Set ALM Variables
74
+ let alm = this;
75
+ alm.AjaxLoadMore = {};
76
+ alm.addons = {};
77
+ alm.extensions = {};
78
+ alm.integration = {};
79
+ alm.window = window;
80
+ alm.page = 0;
81
+ alm.posts = 0;
82
+ alm.totalposts = 0;
83
+ alm.proceed = false;
84
+ alm.disable_ajax = false;
85
+ alm.init = true;
86
+ alm.loading = true;
87
+ alm.finished = false;
88
+ alm.timer = null;
89
+
90
+ alm.ua = window.navigator.userAgent ? window.navigator.userAgent : ''; // Browser User Agent
91
+ alm.vendor = window.navigator.vendor ? window.navigator.vendor : ''; // Browser Vendor
92
+ alm.isSafari = /Safari/i.test(alm.ua) && /Apple Computer/.test(alm.vendor) && !/Mobi|Android/i.test(alm.ua);
93
+
94
+ alm.master_id = el.dataset.id ? `ajax-load-more-${el.dataset.id}` : el.id; // The defined or generated ID of the ALM instance
95
+ el.classList.add('alm-' + e); // Add unique classname
96
+ el.setAttribute('data-alm-id', e); // Add unique data id
97
+
98
+ // Get localized <script/> variables
99
+ alm.master_id = alm.master_id.replace(/-/g, '_'); // Convert dashes to underscores for the var name
100
+ alm.localize = window[alm.master_id + '_vars']; // Get localize vars
101
+
102
+ // ALM Element Containers
103
+ alm.main = el; // Top level DOM element
104
+ alm.listing = el.querySelector('.alm-listing') || el.querySelector('.alm-comments');
105
+ alm.content = alm.listing;
106
+ alm.el = alm.content;
107
+ alm.ajax = el.querySelector('.alm-ajax');
108
+ alm.container_type = alm.listing.dataset.containerType;
109
+
110
+ // Instance Params
111
+ alm.canonical_url = el.dataset.canonicalUrl;
112
+ alm.nested = el.dataset.nested ? el.dataset.nested : null;
113
+ alm.is_search = el.dataset.search;
114
+ alm.slug = el.dataset.slug;
115
+ alm.post_id = el.dataset.postId;
116
+ alm.id = el.dataset.id ? el.dataset.id : '';
117
+
118
+ // No results template
119
+ let alm_no_results = el.querySelector('.alm-no-results');
120
+ alm.no_results = alm_no_results ? alm_no_results.innerHTML : '';
121
+
122
+ // Shortcode Params
123
+ alm.repeater = alm.listing.dataset.repeater; // Repeaters
124
+ alm.theme_repeater = alm.listing.dataset.themeRepeater;
125
+
126
+ alm.post_type = alm.listing.dataset.postType ? alm.listing.dataset.postType : 'post';
127
+ alm.sticky_posts = alm.listing.dataset.stickyPosts ? alm.listing.dataset.stickyPosts : null;
128
+
129
+ alm.btnWrap = el.querySelectorAll('.alm-btn-wrap'); // Get all `.alm-button-wrap` divs
130
+ alm.btnWrap = Array.prototype.slice.call(alm.btnWrap); // Convert NodeList to array
131
+ alm.btnWrap[alm.btnWrap.length - 1].style.visibility = 'visible'; // Get last element (used for nesting)
132
+ alm.trigger = alm.btnWrap[alm.btnWrap.length - 1];
133
+ alm.button = alm.trigger.querySelector('button.alm-load-more-btn');
134
+
135
+ alm.button_label = alm.listing.dataset.buttonLabel;
136
+ alm.button_loading_label = alm.listing.dataset.buttonLoadingLabel;
137
+ alm.button_done_label = alm.listing.dataset.buttonDoneLabel;
138
+
139
+ alm.placeholder = alm.main.querySelector('.alm-placeholder');
140
+
141
+ alm.scroll_distance = alm.listing.dataset.scrollDistance;
142
+ alm.scroll_distance = alm.scroll_distance ? alm.scroll_distance : 100;
143
+ alm.scroll_container = alm.listing.dataset.scrollContainer;
144
+ alm.scroll_direction = alm.listing.dataset.scrollDirection;
145
+ alm.max_pages = alm.listing.dataset.maxPages ? parseInt(alm.listing.dataset.maxPages) : 0;
146
+ alm.pause_override = alm.listing.dataset.pauseOverride; // true | false
147
+ alm.pause = alm.listing.dataset.pause ? alm.listing.dataset.pause : false; // true | false
148
+ alm.transition = alm.listing.dataset.transition; // Transition
149
+ alm.transition_container = alm.listing.dataset.transitionContainer; // Transition Container
150
+ alm.tcc = alm.listing.dataset.transitionContainerClasses; // Transition Container Classes
151
+ alm.speed = alm_localize.speed ? parseInt(alm_localize.speed) : 200;
152
+ alm.images_loaded = alm.listing.dataset.imagesLoaded ? alm.listing.dataset.imagesLoaded : false;
153
+ alm.destroy_after = alm.listing.dataset.destroyAfter ? alm.listing.dataset.destroyAfter : '';
154
+ alm.orginal_posts_per_page = parseInt(alm.listing.dataset.postsPerPage); // Used for paging add-on
155
+ alm.posts_per_page = alm.listing.dataset.postsPerPage;
156
+ alm.offset = alm.listing.dataset.offset ? parseInt(alm.listing.dataset.offset) : 0;
157
+ alm.integration.woocommerce = alm.listing.dataset.woocommerce ? alm.listing.dataset.woocommerce : false;
158
+ alm.integration.woocommerce = alm.integration.woocommerce === 'true' ? true : false;
159
+ alm.is_search = alm.is_search === undefined ? false : alm.is_search;
160
+ alm.search_value = alm.is_search === 'true' ? alm.slug : ''; // Convert to value of slug for appending to seo url
161
+
162
+ // Add-on Shortcode Params
163
+
164
+ // Elementor add-on
165
+ alm.addons.elementor = alm.listing.dataset.elementor === 'posts' && alm.listing.dataset.elementorSettings ? true : false;
166
+ if (alm.addons.elementor) {
167
+ alm = elementorCreateParams(alm);
168
+ }
169
+
170
+ // WooCommerce add-on
171
+ alm.addons.woocommerce = alm.listing.dataset.woo && alm.listing.dataset.woo === 'true' ? true : false;
172
+ if (alm.addons.woocommerce && alm.listing.dataset.wooSettings) {
173
+ alm.addons.woocommerce_settings = JSON.parse(alm.listing.dataset.wooSettings);
174
+ alm.addons.woocommerce_settings.results_text = document.querySelectorAll(alm.addons.woocommerce_settings.results); // Add Results Text
175
+ alm.page = parseInt(alm.page) + parseInt(alm.addons.woocommerce_settings.paged);
176
+ }
177
+
178
+ // Cache add-on
179
+ alm.addons.cache = alm.listing.dataset.cache;
180
+ alm.addons.cache = alm.addons.cache === undefined ? false : alm.addons.cache;
181
+ if (alm.addons.cache === 'true') {
182
+ alm.addons.cache_id = alm.listing.dataset.cacheId;
183
+ alm.addons.cache_path = alm.listing.dataset.cachePath;
184
+ alm.addons.cache_logged_in = alm.listing.dataset.cacheLoggedIn;
185
+ alm.addons.cache_logged_in = alm.addons.cache_logged_in === undefined ? false : alm.addons.cache_logged_in;
186
+ }
187
+
188
+ // CTA add-on
189
+ alm.addons.cta = alm.listing.dataset.cta ? alm.listing.dataset.cta : false;
190
+ if (alm.addons.cta === 'true') {
191
+ alm.addons.cta_position = alm.listing.dataset.ctaPosition;
192
+ alm.addons.cta_repeater = alm.listing.dataset.ctaRepeater;
193
+ alm.addons.cta_theme_repeater = alm.listing.dataset.ctaThemeRepeater;
194
+ }
195
+
196
+ // Nextpage add-on
197
+ alm.addons.nextpage = alm.listing.dataset.nextpage;
198
+ if (alm.addons.nextpage === 'true') {
199
+ alm.addons.nextpage_urls = alm.listing.dataset.nextpageUrls;
200
+ alm.addons.nextpage_scroll = alm.listing.dataset.nextpageScroll;
201
+ alm.addons.nextpage_pageviews = alm.listing.dataset.nextpagePageviews;
202
+ alm.addons.nextpage_post_id = alm.listing.dataset.nextpagePostId;
203
+ alm.addons.nextpage_startpage = alm.listing.dataset.nextpageStartpage;
204
+ }
205
+
206
+ // Single Posts add-on
207
+ alm.addons.single_post = alm.listing.dataset.singlePost;
208
+ if (alm.addons.single_post === 'true') {
209
+ alm.addons.single_post_id = alm.listing.dataset.singlePostId;
210
+ alm.addons.single_post_query = alm.listing.dataset.singlePostQuery;
211
+ alm.addons.single_post_order = alm.listing.dataset.singlePostOrder;
212
+ alm.addons.single_post_init_id = alm.listing.dataset.singlePostId;
213
+ alm.addons.single_post_taxonomy = alm.listing.dataset.singlePostTaxonomy;
214
+ alm.addons.single_post_excluded_terms = alm.listing.dataset.singlePostExcludedTerms;
215
+ alm.addons.single_post_progress_bar = alm.listing.dataset.singlePostProgressBar;
216
+ alm.addons.single_post_target = alm.listing.dataset.singlePostTarget;
217
+ }
218
+
219
+ // Comments add-on
220
+ alm.addons.comments = alm.listing.dataset.comments ? alm.listing.dataset.comments : false;
221
+ if (alm.addons.comments === 'true') {
222
+ alm.addons.comments_post_id = alm.listing.dataset.comments_post_id; // current post id
223
+ alm.addons.comments_per_page = alm.listing.dataset.comments_per_page;
224
+ alm.addons.comments_per_page = alm.addons.comments_per_page === undefined ? '5' : alm.addons.comments_per_page;
225
+ alm.addons.comments_type = alm.listing.dataset.comments_type;
226
+ alm.addons.comments_style = alm.listing.dataset.comments_style;
227
+ alm.addons.comments_template = alm.listing.dataset.comments_template;
228
+ alm.addons.comments_callback = alm.listing.dataset.comments_callback;
229
+ }
230
+
231
+ alm.addons.tabs = alm.listing.dataset.tabs;
232
+
233
+ alm.addons.filters = alm.listing.dataset.filters;
234
+
235
+ alm.addons.seo = alm.listing.dataset.seo;
236
+
237
+ // Preloaded
238
+ alm.addons.preloaded = alm.listing.dataset.preloaded; // Preloaded add-on
239
+ alm.addons.preloaded_amount = alm.listing.dataset.preloadedAmount ? alm.listing.dataset.preloadedAmount : 0;
240
+ alm.is_preloaded = alm.listing.dataset.isPreloaded === 'true' ? true : false;
241
+
242
+ // Users
243
+ alm.addons.users = alm.listing.dataset.users === 'true' ? true : false; // Users add-on
244
+ if (alm.addons.users) {
245
+ // Override paging params for users
246
+ alm.orginal_posts_per_page = alm.listing.dataset.usersPerPage;
247
+ alm.posts_per_page = alm.listing.dataset.usersPerPage;
248
+ }
249
+
250
+ // Extension Shortcode Params
251
+ alm.extensions.restapi = alm.listing.dataset.restapi; // REST API
252
+ alm.extensions.restapi_base_url = alm.listing.dataset.restapiBaseUrl;
253
+ alm.extensions.restapi_namespace = alm.listing.dataset.restapiNamespace;
254
+ alm.extensions.restapi_endpoint = alm.listing.dataset.restapiEndpoint;
255
+ alm.extensions.restapi_template_id = alm.listing.dataset.restapiTemplateId;
256
+ alm.extensions.restapi_debug = alm.listing.dataset.restapiDebug;
257
+
258
+ alm.extensions.acf = alm.listing.dataset.acf; // ACF
259
+ alm.extensions.acf_field_type = alm.listing.dataset.acfFieldType;
260
+ alm.extensions.acf_field_name = alm.listing.dataset.acfFieldName;
261
+ alm.extensions.acf_parent_field_name = alm.listing.dataset.acfParentFieldName;
262
+ alm.extensions.acf_post_id = alm.listing.dataset.acfPostId;
263
+ alm.extensions.acf = alm.extensions.acf === 'true' ? true : false;
264
+ // if field type, name or post ID is empty
265
+ if (alm.extensions.acf_field_type === undefined || alm.extensions.acf_field_name === undefined || alm.extensions.acf_post_id === undefined) {
266
+ alm.extensions.acf = false;
267
+ }
268
+
269
+ // Term Query
270
+ alm.extensions.term_query = alm.listing.dataset.termQuery; // TERM QUERY
271
+ alm.extensions.term_query_taxonomy = alm.listing.dataset.termQueryTaxonomy;
272
+ alm.extensions.term_query_hide_empty = alm.listing.dataset.termQueryHideEmpty;
273
+ alm.extensions.term_query_number = alm.listing.dataset.termQueryNumber;
274
+ alm.extensions.term_query = alm.extensions.term_query === 'true' ? true : false;
275
+
276
+ // Paging
277
+ alm.addons.paging = alm.listing.dataset.paging; // Paging add-on
278
+ if (alm.addons.paging === 'true') {
279
+ alm.addons.paging = true;
280
+ alm.addons.paging_init = true;
281
+ alm.addons.paging_controls = alm.listing.dataset.pagingControls === 'true' ? true : false;
282
+ alm.addons.paging_show_at_most = alm.listing.dataset.pagingShowAtMost;
283
+ alm.addons.paging_classes = alm.listing.dataset.pagingClasses;
284
+ alm.addons.paging_show_at_most = alm.addons.paging_show_at_most === undefined ? 7 : alm.addons.paging_show_at_most;
285
+
286
+ alm.addons.paging_first_label = alm.listing.dataset.pagingFirstLabel;
287
+ alm.addons.paging_previous_label = alm.listing.dataset.pagingPreviousLabel;
288
+ alm.addons.paging_next_label = alm.listing.dataset.pagingNextLabel;
289
+ alm.addons.paging_last_label = alm.listing.dataset.pagingLastLabel;
290
+
291
+ alm.addons.paging_scroll = alm.listing.dataset.pagingScroll ? alm.listing.dataset.pagingScroll : false;
292
+ alm.addons.paging_scrolltop = alm.listing.dataset.pagingScrolltop ? parseInt(alm.listing.dataset.pagingScrolltop) : 100;
293
+
294
+ // If preloaded, pause ALM
295
+ alm.pause = alm.addons.preloaded === 'true' ? true : alm.pause;
296
+ } else {
297
+ alm.addons.paging = false;
298
+ }
299
+ /* End Paging */
300
+
301
+ /* Filters */
302
+ if (alm.addons.filters === 'true') {
303
+ alm.addons.filters = true;
304
+
305
+ alm.addons.filters_url = alm.listing.dataset.filtersUrl === 'true' ? true : false;
306
+ alm.addons.filters_paging = alm.listing.dataset.filtersPaging === 'true' ? true : false;
307
+ alm.addons.filters_scroll = alm.listing.dataset.filtersScroll === 'true' ? true : false;
308
+ alm.addons.filters_scrolltop = alm.listing.dataset.filtersScrolltop ? alm.listing.dataset.filtersScrolltop : '30';
309
+ alm.addons.filters_analtyics = alm.listing.dataset.filtersAnalytics;
310
+ alm.addons.filters_debug = alm.listing.dataset.filtersDebug;
311
+ alm.addons.filters_startpage = 0;
312
+
313
+ // Get Paged Querystring Val
314
+ let page = getParameterByName('pg');
315
+ alm.addons.filters_startpage = page !== null ? parseInt(page) : 0;
316
+
317
+ // If not Paging add-on
318
+ if (!alm.addons.paging && alm.addons.filters_startpage > 0) {
319
+ alm.posts_per_page = alm.posts_per_page * alm.addons.filters_startpage;
320
+ alm.isPaged = alm.addons.filters_startpage > 0 ? true : false;
321
+ }
322
+ } else {
323
+ alm.addons.filters = false;
324
+ }
325
+ /* End Filters */
326
+
327
+ /* TABS */
328
+ if (alm.addons.tabs === 'true') {
329
+ alm.addons.tabs = true;
330
+ alm.addons.tab_template = alm.listing.dataset.tabTemplate ? alm.listing.dataset.tabTemplate : '';
331
+ alm.addons.tab_onload = alm.listing.dataset.tabOnload ? alm.listing.dataset.tabOnload : '';
332
+ alm.addons.tabs_resturl = alm.listing.dataset.tabsRestUrl ? alm.listing.dataset.tabsRestUrl : '';
333
+
334
+ // Locate active template (deeplinks)
335
+ if (alm.addons.tab_onload !== '') {
336
+ let tabNav = document.querySelector(`.alm-tab-nav li [data-tab-url=${alm.addons.tab_onload}]`);
337
+ alm.addons.tab_template = tabNav ? tabNav.dataset.tabTemplate : alm.addons.tab_template;
338
+ alm.listing.dataset.tabOnload = ''; // Clear tabOnload param
339
+ // Set selected tab
340
+ if (tabNav) {
341
+ let activeTab = document.querySelector(`.alm-tab-nav li .active`);
342
+ if (activeTab) {
343
+ activeTab.classList.remove('active');
344
+ }
345
+ }
346
+ }
347
+ } else {
348
+ alm.addons.tabs = false;
349
+ }
350
+ /* End TABS */
351
+
352
+ /* REST API */
353
+ if (alm.extensions.restapi === 'true') {
354
+ alm.extensions.restapi = true;
355
+ alm.extensions.restapi_debug = alm.extensions.restapi_debug === undefined ? false : alm.extensions.restapi_debug;
356
+ alm.extensions.restapi = alm.extensions.restapi_template_id === '' ? false : alm.extensions.restapi;
357
+ } else {
358
+ alm.extensions.restapi = false;
359
+ }
360
+ /* End REST API */
361
+
362
+ /* Preloaded */
363
+ if (alm.addons.preloaded === 'true') {
364
+ // Preloaded Amount
365
+ alm.addons.preloaded_amount = alm.addons.preloaded_amount === undefined ? alm.posts_per_page : alm.addons.preloaded_amount;
366
+ // Disable ALM if total_posts is less than or equal to preloaded_amount
367
+ if (alm.localize && alm.localize.total_posts) {
368
+ if (parseInt(alm.localize.total_posts) <= parseInt(alm.addons.preloaded_amount)) {
369
+ alm.addons.preloaded_total_posts = alm.localize.total_posts;
370
+ alm.disable_ajax = true;
371
+ }
372
+ }
373
+ } else {
374
+ alm.addons.preloaded = 'false';
375
+ }
376
+ /* End Preloaded */
377
+
378
+ /* SEO */
379
+ alm.addons.seo = alm.addons.seo === undefined ? false : alm.addons.seo;
380
+ alm.addons.seo = alm.addons.seo === 'true' ? true : alm.addons.seo;
381
+
382
+ if (alm.addons.seo) {
383
+ alm.addons.seo_permalink = alm.listing.dataset.seoPermalink;
384
+ alm.addons.seo_pageview = alm.listing.dataset.seoPageview;
385
+ alm.addons.seo_trailing_slash = alm.listing.dataset.seoTrailingSlash === 'false' ? '' : '/';
386
+ alm.addons.seo_leading_slash = alm.listing.dataset.seoLeadingSlash === 'true' ? '/' : '';
387
+ }
388
+ alm.start_page = alm.listing.dataset.seoStartPage;
389
+
390
+ if (alm.start_page) {
391
+ alm.addons.seo_scroll = alm.listing.dataset.seoScroll;
392
+ alm.addons.seo_scrolltop = alm.listing.dataset.seoScrolltop;
393
+ alm.addons.seo_controls = alm.listing.dataset.seoControls;
394
+ alm.isPaged = false;
395
+ if (alm.start_page > 1) {
396
+ alm.isPaged = true; // Is this a paged page > 1 ?
397
+ alm.posts_per_page = alm.start_page * alm.posts_per_page;
398
+ }
399
+ if (alm.addons.paging) {
400
+ // If paging, reset posts_per_page
401
+ alm.posts_per_page = alm.orginal_posts_per_page;
402
+ }
403
+ } else {
404
+ alm.start_page = 1;
405
+ }
406
+ /* End SEO */
407
+
408
+ /* Nextpage */
409
+ if (alm.addons.nextpage === 'true') {
410
+ alm.addons.nextpage = true;
411
+ alm.posts_per_page = 1;
412
+
413
+ if (alm.addons.nextpage_urls === undefined) {
414
+ alm.addons.nextpage_urls = 'true';
415
+ }
416
+ if (alm.addons.nextpage_scroll === undefined) {
417
+ alm.addons.nextpage_scroll = 'false:30';
418
+ }
419
+ if (alm.addons.nextpage_pageviews === undefined) {
420
+ alm.addons.nextpage_pageviews = 'true';
421
+ }
422
+ if (alm.addons.nextpage_post_id === undefined) {
423
+ alm.addons.nextpage = false;
424
+ alm.addons.nextpage_post_id = null;
425
+ }
426
+ if (alm.addons.nextpage_startpage === undefined) {
427
+ alm.addons.nextpage_startpage = 1;
428
+ }
429
+ if (alm.addons.nextpage_startpage > 1) {
430
+ alm.isPaged = true;
431
+ }
432
+ } else {
433
+ alm.addons.nextpage = false;
434
+ }
435
+ /* End Nextpage */
436
+
437
+ /* Single Post */
438
+ if (alm.addons.single_post === 'true') {
439
+ alm.addons.single_post = true;
440
+ alm.addons.single_post_permalink = '';
441
+ alm.addons.single_post_title = '';
442
+ alm.addons.single_post_slug = '';
443
+ alm.addons.single_post_order = alm.addons.single_post_order === undefined ? 'previous' : alm.addons.single_post_order;
444
+ alm.addons.single_post_taxonomy = alm.addons.single_post_taxonomy === undefined ? '' : alm.addons.single_post_taxonomy;
445
+ alm.addons.single_post_excluded_terms = alm.addons.single_post_excluded_terms === undefined ? '' : alm.addons.single_post_excluded_terms;
446
+ alm.addons.single_post_progress_bar = alm.addons.single_post_progress_bar === undefined ? '' : alm.addons.single_post_progress_bar;
447
+ alm.addons.single_post_target = alm.addons.single_post_target === undefined ? '' : alm.addons.single_post_target;
448
+ alm.addons.single_post_title_template = alm.listing.dataset.singlePostTitleTemplate;
449
+ alm.addons.single_post_siteTitle = alm.listing.dataset.singlePostSiteTitle;
450
+ alm.addons.single_post_siteTagline = alm.listing.dataset.singlePostSiteTagline;
451
+ alm.addons.single_post_pageview = alm.listing.dataset.singlePostPageview;
452
+ alm.addons.single_post_scroll = alm.listing.dataset.singlePostScroll;
453
+ alm.addons.single_post_scroll_speed = alm.listing.dataset.singlePostScrollSpeed;
454
+ alm.addons.single_post_scroll_top = alm.listing.dataset.singlePostScrolltop;
455
+ alm.addons.single_post_controls = alm.listing.dataset.singlePostControls;
456
+ } else {
457
+ alm.addons.single_post = false;
458
+ }
459
+ if (alm.addons.single_post && alm.addons.single_post_id === undefined) {
460
+ alm.addons.single_post_id = '';
461
+ alm.addons.single_post_init_id = '';
462
+ }
463
+ /* End Single Post */
464
+
465
+ /* Pause */
466
+ if (alm.pause === undefined || (alm.addons.seo && alm.start_page > 1)) {
467
+ // SEO only
468
+ alm.pause = false;
469
+ }
470
+ if (alm.addons.preloaded === 'true' && alm.addons.seo && alm.start_page > 0) {
471
+ // SEO + Preloaded
472
+ alm.pause = false;
473
+ }
474
+ if (alm.addons.filters && alm.addons.filters_startpage > 0) {
475
+ // Filters
476
+ alm.pause = false;
477
+ }
478
+ if (alm.addons.preloaded === 'true' && alm.addons.paging) {
479
+ alm.pause = true;
480
+ }
481
+
482
+ /* Repeater and Theme Repeater */
483
+ alm.repeater = alm.repeater === undefined ? 'default' : alm.repeater;
484
+ alm.theme_repeater = alm.theme_repeater === undefined ? false : alm.theme_repeater;
485
+
486
+ /* Max Pages (while scrolling) */
487
+ alm.max_pages = alm.max_pages === undefined || alm.max_pages === 0 ? 10000 : alm.max_pages;
488
+
489
+ /* Scroll Distance */
490
+ alm.scroll_distance = alm.scroll_distance === undefined ? 100 : alm.scroll_distance;
491
+ alm.scroll_distance_perc = false;
492
+ if (alm.scroll_distance.toString().indexOf('%') == -1) {
493
+ // Standard scroll_distance
494
+ alm.scroll_distance = parseInt(alm.scroll_distance);
495
+ } else {
496
+ // Percentage scroll_distance
497
+ alm.scroll_distance_perc = true;
498
+ alm.scroll_distance_orig = parseInt(alm.scroll_distance);
499
+ alm.scroll_distance = getScrollPercentage(alm);
500
+ }
501
+
502
+ /* Scroll Container */
503
+ alm.scroll_container = alm.scroll_container === undefined ? '' : alm.scroll_container;
504
+
505
+ /* Scroll Direction */
506
+ alm.scroll_direction = alm.scroll_direction === undefined ? 'vertical' : alm.scroll_direction;
507
+
508
+ /* Transition */
509
+ alm.transition = alm.transition === undefined ? 'fade' : alm.transition;
510
+
511
+ /* Transition Container Class */
512
+ alm.tcc = alm.tcc === undefined ? '' : alm.tcc;
513
+
514
+ /* Masonry */
515
+ alm.is_masonry_preloaded = false;
516
+ if (alm.transition === 'masonry') {
517
+ alm.masonry_init = true;
518
+ if (alm.msnry) {
519
+ alm.msnry.destroy(); // destroy masonry if it currently exists
520
+ } else {
521
+ alm.msnry = '';
522
+ }
523
+ alm.masonry_selector = alm.listing.dataset.masonrySelector;
524
+ alm.masonry_columnwidth = alm.listing.dataset.masonryColumnwidth;
525
+ alm.masonry_animation = alm.listing.dataset.masonryAnimation;
526
+ alm.masonry_animation = alm.masonry_animation === undefined ? 'standard' : alm.masonry_animation;
527
+ alm.masonry_horizontalorder = alm.listing.dataset.masonryHorizontalorder;
528
+ alm.masonry_horizontalorder = alm.masonry_horizontalorder === undefined ? 'true' : alm.masonry_horizontalorder;
529
+ alm.transition_container = false;
530
+ alm.images_loaded = false;
531
+ alm.is_masonry_preloaded = alm.addons.preloaded === 'true' ? true : alm.is_masonry_preloaded;
532
+ }
533
+
534
+ /* Scroll */
535
+ if (alm.listing.dataset.scroll === undefined) {
536
+ alm.scroll = true;
537
+ } else if (alm.listing.dataset.scroll === 'false') {
538
+ alm.scroll = false;
539
+ } else {
540
+ alm.scroll = true;
541
+ }
542
+
543
+ /* Transition Container */
544
+ alm.transition_container = alm.transition_container === undefined || alm.transition_container === 'true' ? true : false;
545
+
546
+ /* Button Labels */
547
+ alm.button_label = alm.button_label === undefined ? 'Load More' : alm.button_label;
548
+ alm.button_loading_label = alm.button_loading_label === undefined ? false : alm.button_loading_label;
549
+ alm.button_done_label = alm.button_done_label === undefined ? false : alm.button_done_label;
550
+
551
+ /* Paging */
552
+ if (alm.addons.paging) {
553
+ alm.main.classList.add('loading'); // add loading class to main container
554
+ } else {
555
+ let almChildren = el.childNodes; // Get child nodes of instance [nodeList]
556
+ if (almChildren) {
557
+ let almChildArray = Array.prototype.slice.call(almChildren); // Convert nodeList to array
558
+
559
+ // Filter array to find the `.alm-btn-wrap` div
560
+ let btnWrap = almChildArray.filter(function (element) {
561
+ if (!element.classList) {
562
+ // If not element (#text node)
563
+ return false;
564
+ }
565
+ return element.classList.contains('alm-btn-wrap');
566
+ });
567
+ alm.button = btnWrap ? btnWrap[0].querySelector('.alm-load-more-btn') : container.querySelector('.alm-btn-wrap .alm-load-more-btn');
568
+ } else {
569
+ alm.button = container.querySelector('.alm-btn-wrap .alm-load-more-btn');
570
+ }
571
+
572
+ // Reset button state
573
+ alm.button.disabled = false;
574
+ alm.button.style.display = '';
575
+ }
576
+
577
+ // Results Text
578
+ // Render "Showing x of y results" text.
579
+ // If woocommerce, get the default woocommerce results block
580
+ if (alm.integration.woocommerce) {
581
+ alm.resultsText = document.querySelectorAll('.woocommerce-result-count');
582
+ if (alm.resultsText.length < 1) {
583
+ alm.resultsText = document.querySelectorAll('.alm-results-text');
584
+ }
585
+ } else {
586
+ alm.resultsText = document.querySelectorAll('.alm-results-text');
587
+ }
588
+ if (alm.resultsText) {
589
+ alm.resultsText.forEach(function (results) {
590
+ results.setAttribute('aria-live', 'polite');
591
+ results.setAttribute('aria-atomic', 'true');
592
+ });
593
+ } else {
594
+ alm.resultsText = false;
595
+ }
596
+
597
+ // Table of Contents
598
+ // Render 1, 2, 3 etc. when pages are loaded
599
+ alm.tableofcontents = document.querySelector('.alm-toc');
600
+ if (alm.tableofcontents) {
601
+ alm.tableofcontents.setAttribute('aria-live', 'polite');
602
+ alm.tableofcontents.setAttribute('aria-atomic', 'true');
603
+ } else {
604
+ alm.tableofcontents = false;
605
+ }
606
+
607
+ /**
608
+ * LoadPosts()
609
+ * The function to get posts via Ajax
610
+ * @since 2.0.0
611
+ */
612
+
613
+ alm.AjaxLoadMore.loadPosts = function () {
614
+ if (typeof almOnChange === 'function') {
615
+ window.almOnChange(alm);
616
+ }
617
+
618
+ showPlaceholder(alm);
619
+
620
+ if (!alm.disable_ajax) {
621
+ // Check for ajax blocker
622
+ if (!alm.addons.paging) {
623
+ alm.button.classList.add('loading');
624
+ if (alm.button_loading_label !== false) {
625
+ alm.button.innerHTML = alm.button_loading_label;
626
+ }
627
+ }
628
+ alm.main.classList.add('alm-loading');
629
+ alm.loading = true;
630
+ if (alm.addons.cache === 'true' && !alm.addons.cache_logged_in) {
631
+ // Cache
632
+ let cache_page = getCacheUrl(alm);
633
+
634
+ if (cache_page) {
635
+ // Load `.html` page
636
+ axios
637
+ .get(cache_page)
638
+ .then((response) => {
639
+ // Exists
640
+ alm.AjaxLoadMore.success(response.data, true);
641
+ })
642
+ .catch(function (error) {
643
+ // Error || Page does not yet exist
644
+ alm.AjaxLoadMore.ajax('standard');
645
+ });
646
+ } else {
647
+ // Standard ALM query
648
+ alm.AjaxLoadMore.ajax('standard');
649
+ }
650
+ } else {
651
+ // Standard ALM query
652
+ alm.AjaxLoadMore.ajax('standard');
653
+ }
654
+ }
655
+ };
656
+
657
+ /* ajax()
658
+ * Ajax Load Moe Ajax function
659
+ *
660
+ * @param queryType The type of Ajax request (standard/totalposts)
661
+ * @since 2.6.0
662
+ */
663
+
664
+ alm.AjaxLoadMore.ajax = function (queryType) {
665
+ // Default ALM action
666
+ let action = 'alm_get_posts';
667
+
668
+ // ACF Params
669
+ alm.acf_array = '';
670
+ if (alm.extensions.acf) {
671
+ // Custom query for the Repeater / Gallery / Flexible Content field types
672
+ if (alm.extensions.acf_field_type !== 'relationship') {
673
+ action = 'alm_acf';
674
+ }
675
+ alm.acf_array = {
676
+ acf: 'true',
677
+ post_id: alm.extensions.acf_post_id,
678
+ field_type: alm.extensions.acf_field_type,
679
+ field_name: alm.extensions.acf_field_name,
680
+ parent_field_name: alm.extensions.acf_parent_field_name,
681
+ };
682
+ }
683
+
684
+ // Term Query Params
685
+ alm.term_query_array = '';
686
+ if (alm.extensions.term_query) {
687
+ action = 'alm_get_terms';
688
+ alm.term_query_array = {
689
+ term_query: 'true',
690
+ taxonomy: alm.extensions.term_query_taxonomy,
691
+ hide_empty: alm.extensions.term_query_hide_empty,
692
+ number: alm.extensions.term_query_number,
693
+ };
694
+ }
695
+
696
+ // Nextpage Params
697
+ alm.nextpage_array = '';
698
+ if (alm.addons.nextpage) {
699
+ action = 'alm_nextpage';
700
+ alm.nextpage_array = {
701
+ nextpage: 'true',
702
+ urls: alm.addons.nextpage_urls,
703
+ scroll: alm.addons.nextpage_scroll,
704
+ pageviews: alm.addons.nextpage_pageviews,
705
+ post_id: alm.addons.nextpage_post_id,
706
+ startpage: alm.addons.nextpage_startpage,
707
+ };
708
+ }
709
+
710
+ // Previous Post Params
711
+ alm.single_post_array = '';
712
+ if (alm.addons.single_post) {
713
+ alm.single_post_array = {
714
+ single_post: 'true',
715
+ id: alm.addons.single_post_id,
716
+ slug: alm.addons.single_post_slug,
717
+ };
718
+ }
719
+
720
+ // Comment Params
721
+ alm.comments_array = '';
722
+ if (alm.addons.comments === 'true') {
723
+ action = 'alm_comments';
724
+ alm.posts_per_page = alm.addons.comments_per_page;
725
+ alm.comments_array = {
726
+ comments: 'true',
727
+ post_id: alm.addons.comments_post_id,
728
+ per_page: alm.addons.comments_per_page,
729
+ type: alm.addons.comments_type,
730
+ style: alm.addons.comments_style,
731
+ template: alm.addons.comments_template,
732
+ callback: alm.addons.comments_callback,
733
+ };
734
+ }
735
+
736
+ // Users Params
737
+ alm.users_array = '';
738
+ if (alm.addons.users) {
739
+ action = 'alm_users';
740
+ alm.users_array = {
741
+ users: 'true',
742
+ role: alm.listing.dataset.usersRole,
743
+ include: alm.listing.dataset.usersInclude,
744
+ exclude: alm.listing.dataset.usersExclude,
745
+ per_page: alm.posts_per_page,
746
+ order: alm.listing.dataset.usersOrder,
747
+ orderby: alm.listing.dataset.usersOrderby,
748
+ };
749
+ }
750
+
751
+ // CTA Params
752
+ alm.cta_array = '';
753
+ if (alm.addons.cta === 'true') {
754
+ alm.cta_array = {
755
+ cta: 'true',
756
+ cta_position: alm.addons.cta_position,
757
+ cta_repeater: alm.addons.cta_repeater,
758
+ cta_theme_repeater: alm.addons.cta_theme_repeater,
759
+ };
760
+ }
761
+
762
+ // REST API
763
+ if (alm.extensions.restapi) {
764
+ alm.AjaxLoadMore.restapi(alm, action, queryType);
765
+ }
766
+ // Tabs
767
+ else if (alm.addons.tabs) {
768
+ alm.AjaxLoadMore.tabs(alm);
769
+ }
770
+ // Standard ALM
771
+ else {
772
+ alm.AjaxLoadMore.adminajax(alm, action, queryType);
773
+ }
774
+ };
775
+
776
+ /**
777
+ * adminajax
778
+ * Send request to the admin-ajax.php
779
+ *
780
+ * @param {*} alm | ALm object
781
+ * @param {*} action | Ajax action
782
+ * @param {*} queryType
783
+ * @since 5.0.0
784
+ */
785
+ alm.AjaxLoadMore.adminajax = function (alm, action, queryType) {
786
+ if (alm.page != 1 && !alm.addons.paging) {
787
+ alm.button.classList.add('loading');
788
+ }
789
+
790
+ // Axios Interceptor for nested data objects
791
+ axios.interceptors.request.use((config) => {
792
+ config.paramsSerializer = (params) => {
793
+ // Qs is already included in the Axios package
794
+ return qs.stringify(params, {
795
+ arrayFormat: 'brackets',
796
+ encode: false,
797
+ });
798
+ };
799
+ return config;
800
+ });
801
+
802
+ // Get Ajax URL
803
+ let ajaxURL = alm_localize.ajaxurl;
804
+
805
+ // Get data params
806
+ let params = queryParams.almGetAjaxParams(alm, action, queryType); // [./helpers/queryParams.js
807
+
808
+ // Single Posts Add-on
809
+ // If has `single_post_target`, adjust the Ajax URL to the post URL.
810
+ if (alm.addons.single_post && alm.addons.single_post_target) {
811
+ ajaxURL = `${alm.addons.single_post_permalink}?id=${alm.addons.single_post_id}&alm_page=${parseInt(alm.page) + 1}`;
812
+ params = '';
813
+ }
814
+
815
+ // WooCommerce Add-on
816
+ if (alm.addons.woocommerce) {
817
+ ajaxURL = getButtonURL(alm);
818
+ params = '';
819
+ }
820
+
821
+ // Elementor Add-on
822
+ if (alm.addons.elementor && alm.addons.elementor_type && alm.addons.elementor_type === 'posts') {
823
+ ajaxURL = getButtonURL(alm);
824
+ params = '';
825
+ }
826
+
827
+ // Send HTTP request via axios
828
+ axios
829
+ .get(ajaxURL, { params })
830
+ .then(function (response) {
831
+ // Success
832
+ let data = '';
833
+
834
+ if (alm.addons.single_post && alm.addons.single_post_target) {
835
+ // Single Posts
836
+ data = singlePostHTML(response, alm.addons.single_post_target);
837
+ createCacheFile(alm, data.html, 'single');
838
+ } else if (alm.addons.woocommerce) {
839
+ // WooCommerce
840
+ data = wooGetContent(response, alm);
841
+ createCacheFile(alm, data.html, 'woocommerce');
842
+ } else if (alm.addons.elementor) {
843
+ // Elementor
844
+ data = elementorGetContent(response, alm);
845
+ createCacheFile(alm, data.html, 'elementor');
846
+ } else {
847
+ // Get data from response
848
+ data = response.data;
849
+ }
850
+
851
+ // Standard Query
852
+ if (queryType === 'standard') {
853
+ alm.AjaxLoadMore.success(data, false);
854
+ } else if (queryType === 'totalpages' && alm.addons.paging && alm.addons.nextpage) {
855
+ // Next Page and Paging
856
+ if (typeof almBuildPagination === 'function') {
857
+ window.almBuildPagination(data.totalpages, alm);
858
+ }
859
+ } else if (queryType === 'totalposts' && alm.addons.paging) {
860
+ // Paging
861
+ if (typeof almBuildPagination === 'function') {
862
+ window.almBuildPagination(data.totalposts, alm);
863
+ }
864
+ }
865
+ })
866
+ .catch(function (error) {
867
+ // Error
868
+ alm.AjaxLoadMore.error(error, 'adminajax');
869
+ });
870
+ };
871
+
872
+ /**
873
+ * tabs
874
+ * Send request to the WP REST API
875
+ *
876
+ * @param {*} alm | ALm object
877
+ * @since 5.2.0
878
+ */
879
+ alm.AjaxLoadMore.tabs = function (alm) {
880
+ let alm_rest_url = `${alm.addons.tabs_resturl}ajaxloadmore/tab`;
881
+
882
+ let params = {
883
+ post_id: alm.post_id,
884
+ template: alm.addons.tab_template,
885
+ };
886
+
887
+ // Axios Interceptor for nested data objects
888
+ axios.interceptors.request.use((config) => {
889
+ config.paramsSerializer = (params) => {
890
+ // Qs is already included in the Axios package
891
+ return qs.stringify(params, {
892
+ arrayFormat: 'brackets',
893
+ encode: false,
894
+ });
895
+ };
896
+ return config;
897
+ });
898
+
899
+ // Send Ajax request
900
+ axios
901
+ .get(alm_rest_url, { params })
902
+ .then(function (response) {
903
+ // Success
904
+ let results = response.data; // Get data from response
905
+ let html = results.html;
906
+
907
+ // Create object to pass to success()
908
+ let obj = {
909
+ html: html,
910
+ meta: {
911
+ postcount: 1,
912
+ totalposts: 1,
913
+ },
914
+ };
915
+ alm.AjaxLoadMore.success(obj, false); // Send data
916
+
917
+ // Callback to Tabs add-on
918
+ if (typeof almTabLoaded === 'function') {
919
+ window.almTabLoaded(alm);
920
+ }
921
+ })
922
+ .catch(function (error) {
923
+ // Error
924
+ alm.AjaxLoadMore.error(error, 'restapi');
925
+ });
926
+ };
927
+
928
+ /**
929
+ * restapi
930
+ * Send request to the WP REST API
931
+ *
932
+ * @param {*} alm | ALm object
933
+ * @param {*} action | Ajax action
934
+ * @param {*} queryType
935
+ * @since 5.0.0
936
+ */
937
+ alm.AjaxLoadMore.restapi = function (alm, action, queryType) {
938
+ let alm_rest_template = wp.template(alm.extensions.restapi_template_id);
939
+ let alm_rest_url = `${alm.extensions.restapi_base_url}/${alm.extensions.restapi_namespace}/${alm.extensions.restapi_endpoint}`;
940
+ let params = queryParams.almGetRestParams(alm); // [./helpers/queryParams.js]
941
+
942
+ // Axios Interceptor for nested data objects
943
+ axios.interceptors.request.use((config) => {
944
+ config.paramsSerializer = (params) => {
945
+ // Qs is already included in the Axios package
946
+ return qs.stringify(params, {
947
+ arrayFormat: 'brackets',
948
+ encode: false,
949
+ });
950
+ };
951
+ return config;
952
+ });
953
+
954
+ // Send Ajax request
955
+ axios
956
+ .get(alm_rest_url, { params })
957
+ .then(function (response) {
958
+ // Success
959
+ let results = response.data; // Get data from response
960
+ let data = '',
961
+ html = results.html,
962
+ meta = results.meta,
963
+ postcount = meta.postcount,
964
+ totalposts = meta.totalposts;
965
+
966
+ // loop results to get data from each
967
+ for (let i = 0; i < html.length; i++) {
968
+ let result = html[i];
969
+ if (alm.restapi_debug === 'true') {
970
+ // If debug
971
+ console.log(result);
972
+ }
973
+ data += alm_rest_template(result);
974
+ }
975
+
976
+ // Create object to pass to success()
977
+ let obj = {
978
+ html: data,
979
+ meta: {
980
+ postcount: postcount,
981
+ totalposts: totalposts,
982
+ },
983
+ };
984
+ alm.AjaxLoadMore.success(obj, false); // Send data
985
+ })
986
+ .catch(function (error) {
987
+ // Error
988
+ alm.AjaxLoadMore.error(error, 'restapi');
989
+ });
990
+ };
991
+
992
+ // If pagination enabled, run totalposts query
993
+ if (alm.addons.paging) {
994
+ if (alm.addons.nextpage) {
995
+ alm.AjaxLoadMore.ajax('totalpages'); // Create paging menu and query for total pages
996
+ } else {
997
+ alm.AjaxLoadMore.ajax('totalposts'); // Create paging menu and query for total posts
998
+ }
999
+ }
1000
+
1001
+ /**
1002
+ * success
1003
+ * Success function after loading data
1004
+ *
1005
+ * @param data The results of the Ajax request
1006
+ * @param is_cache Are results of the Ajax request coming from cache
1007
+ * @since 2.6.0
1008
+ */
1009
+ alm.AjaxLoadMore.success = function (data, is_cache) {
1010
+ if (alm.addons.single_post) {
1011
+ // Get previous page data
1012
+ alm.AjaxLoadMore.getSinglePost();
1013
+ }
1014
+
1015
+ let isPaged = false;
1016
+
1017
+ // Create `.alm-reveal` element
1018
+ //let reveal = document.createElement('div');
1019
+ let reveal = alm.container_type === 'table' ? document.createElement('tbody') : document.createElement('div');
1020
+ alm.el = reveal;
1021
+ reveal.style.opacity = 0;
1022
+ reveal.style.height = 0;
1023
+ reveal.style.outline = 'none';
1024
+
1025
+ // Paging container
1026
+ let pagingContent = alm.listing.querySelector('.alm-paging-content');
1027
+
1028
+ var html, meta, total, totalLoaded;
1029
+
1030
+ if (is_cache) {
1031
+ // If Cache, do not look for json data as we won't be querying the DB.
1032
+ html = data;
1033
+ } else {
1034
+ // Standard ALM query results
1035
+ html = data.html;
1036
+ meta = data.meta;
1037
+ alm.posts = alm.addons.paging ? meta.postcount : alm.posts + meta.postcount;
1038
+ total = meta.postcount;
1039
+ alm.totalposts = meta.totalposts;
1040
+ alm.totalposts = alm.addons.preloaded === 'true' ? alm.totalposts - alm.addons.preloaded_amount : alm.totalposts;
1041
+ alm.debug = meta.debug ? meta.debug : '';
1042
+ }
1043
+
1044
+ // Set alm.html as plain text return
1045
+ alm.html = html;
1046
+
1047
+ // If cache, get the length of the html object
1048
+ total = is_cache ? almDomParser(html).length : total;
1049
+
1050
+ // First Run Only
1051
+ if (alm.init) {
1052
+ // Set Meta
1053
+ if (meta) {
1054
+ alm.main.dataset.totalPosts = meta.totalposts ? meta.totalposts : 0;
1055
+ }
1056
+ // Paging
1057
+ if (alm.addons.paging && total > 0) {
1058
+ // Add paging containers and content
1059
+ alm.AjaxLoadMore.pagingInit(html, 'alm-reveal');
1060
+ }
1061
+ // ALM Empty
1062
+ if (total === 0) {
1063
+ if (alm.addons.paging) {
1064
+ if (typeof almPagingEmpty === 'function') {
1065
+ window.almPagingEmpty(alm);
1066
+ }
1067
+ }
1068
+ if (typeof almEmpty === 'function') {
1069
+ window.almEmpty(alm);
1070
+ }
1071
+ if (alm.no_results) {
1072
+ setTimeout(function () {
1073
+ almNoResults(alm.content, alm.no_results);
1074
+ }, alm.speed + 10);
1075
+ }
1076
+ }
1077
+
1078
+ // isPaged
1079
+ if (alm.isPaged) {
1080
+ // Reset the posts_per_page parameter
1081
+ alm.posts_per_page = alm.addons.users ? alm.listing.dataset.usersPerPage : alm.listing.dataset.postsPerPage; // Users
1082
+ alm.posts_per_page = alm.addons.nextpage ? 1 : alm.posts_per_page; // NextPage
1083
+
1084
+ // SEO add-on
1085
+ alm.page = alm.start_page ? alm.start_page - 1 : alm.page; // Set new page #
1086
+
1087
+ // Filters add-on
1088
+ if (alm.addons.filters) {
1089
+ if (alm.addons.filters_startpage > 0) {
1090
+ alm.page = alm.addons.filters_startpage - 1; // Set new page #
1091
+ alm.posts_per_page = alm.listing.dataset.postsPerPage; // Reset `filters-startpage` data after the first run
1092
+ }
1093
+ }
1094
+ }
1095
+ }
1096
+
1097
+ /*
1098
+ * Display alm_debug results
1099
+ */
1100
+
1101
+ almDebug(alm);
1102
+
1103
+ /*
1104
+ * Set localized variables and Results Text
1105
+ */
1106
+
1107
+ (async () => {
1108
+ await setLocalizedVars(alm);
1109
+ })();
1110
+
1111
+ /*
1112
+ * Render results
1113
+ */
1114
+
1115
+ if (total > 0) {
1116
+ // We have results!
1117
+
1118
+ if (!alm.addons.paging) {
1119
+ if (alm.addons.single_post) {
1120
+ // Single Posts
1121
+ reveal.setAttribute('class', 'alm-reveal alm-single-post post-' + alm.addons.single_post_id + alm.tcc);
1122
+ reveal.dataset.url = alm.addons.single_post_permalink;
1123
+ if (alm.addons.single_post_target) {
1124
+ reveal.dataset.page = parseInt(alm.page) + 1;
1125
+ } else {
1126
+ reveal.dataset.page = alm.page;
1127
+ }
1128
+ reveal.dataset.id = alm.addons.single_post_id;
1129
+ reveal.dataset.title = alm.addons.single_post_title;
1130
+ reveal.innerHTML = alm.html;
1131
+ } else {
1132
+ if (!alm.transition_container) {
1133
+ // No transition container
1134
+
1135
+ alm.el = alm.html;
1136
+ reveal = alm.container_type === 'table' ? tableWrap(alm.html) : stripEmptyNodes(almDomParser(alm.html, 'text/html'));
1137
+ } else {
1138
+ // Standard container
1139
+
1140
+ let pagenum;
1141
+ let querystring = window.location.search;
1142
+ let seo_class = alm.addons.seo ? ' alm-seo' : '';
1143
+ let filters_class = alm.addons.filters ? ' alm-filters' : '';
1144
+ let preloaded_class = alm.is_preloaded ? ' alm-preloaded' : '';
1145
+
1146
+ // Init, SEO and Filter Paged
1147
+ if (alm.init && (alm.start_page > 1 || alm.addons.filters_startpage > 0)) {
1148
+ // loop through items and break into separate .alm-reveal divs for paging
1149
+
1150
+ let return_data = [];
1151
+ let container_array = [];
1152
+ let posts_per_page = parseInt(alm.posts_per_page);
1153
+ let pages = Math.ceil(total / posts_per_page);
1154
+ isPaged = true;
1155
+
1156
+ // Call to Actions
1157
+ if (alm.addons.cta === 'true') {
1158
+ posts_per_page = posts_per_page + 1; // Add 1 to posts_per_page for CTAs
1159
+ pages = Math.ceil(total / posts_per_page); // Update pages var with new posts_per_page
1160
+ total = pages + total; // Get new total w/ CTAs added
1161
+ }
1162
+
1163
+ // Parse returned HTML and strip empty nodes
1164
+ let data = stripEmptyNodes(almDomParser(alm.html, 'text/html'));
1165
+
1166
+ // Slice data array into individual pages (array)
1167
+ for (let i = 0; i < total; i += posts_per_page) {
1168
+ return_data.push(data.slice(i, posts_per_page + i));
1169
+ }
1170
+
1171
+ // Loop return_data array to build .alm-reveal containers
1172
+ for (let k = 0; k < return_data.length; k++) {
1173
+ let p = alm.addons.preloaded === 'true' ? 1 : 0; // Add 1 page if items are preloaded.
1174
+ let alm_reveal = document.createElement('div');
1175
+
1176
+ if (k > 0 || alm.addons.preloaded === 'true') {
1177
+ pagenum = k + 1 + p; // > Paged
1178
+
1179
+ if (alm.addons.seo) {
1180
+ // SEO
1181
+ alm_reveal = createSEOAttributes(alm, alm_reveal, querystring, seo_class, pagenum);
1182
+ }
1183
+
1184
+ if (alm.addons.filters) {
1185
+ // Filters
1186
+ alm_reveal.setAttribute('class', 'alm-reveal' + filters_class + alm.tcc);
1187
+ alm_reveal.dataset.url = alm.canonical_url + buildFilterURL(alm, querystring, pagenum);
1188
+ alm_reveal.dataset.page = pagenum;
1189
+ }
1190
+ } else {
1191
+ // First Page
1192
+ if (alm.addons.seo) {
1193
+ // SEO
1194
+ alm_reveal = createSEOAttributes(alm, alm_reveal, querystring, seo_class, 1);
1195
+ }
1196
+ if (alm.addons.filters) {
1197
+ // Filters
1198
+ alm_reveal.setAttribute('class', 'alm-reveal' + filters_class + preloaded_class + alm.tcc);
1199
+ alm_reveal.dataset.url = alm.canonical_url + buildFilterURL(alm, querystring, 0);
1200
+ alm_reveal.dataset.page = '1';
1201
+ }
1202
+ }
1203
+
1204
+ // Append children to `.alm-reveal` element
1205
+ almAppendChildren(alm_reveal, return_data[k]);
1206
+
1207
+ // Run srcSet polyfill
1208
+ srcsetPolyfill(alm_reveal, alm.ua);
1209
+
1210
+ // Push alm_reveal elements into container_array
1211
+ container_array.push(alm_reveal);
1212
+ }
1213
+
1214
+ // Set opacity and height of .alm-listing div to allow for fadein.
1215
+ alm.listing.style.opacity = 0;
1216
+ alm.listing.style.height = 0;
1217
+
1218
+ // Append container_array to `.alm-listing`
1219
+ almAppendChildren(alm.listing, container_array);
1220
+
1221
+ reveal = alm.listing;
1222
+ alm.el = reveal;
1223
+ }
1224
+ // End Init & SEO
1225
+ else {
1226
+ // Preloaded OR SEO (and Paged)
1227
+ if ((alm.addons.seo && alm.page > 0) || alm.addons.preloaded === 'true') {
1228
+ let p2 = alm.addons.preloaded === 'true' ? 1 : 0; // Add 1 page if items are preloaded.
1229
+
1230
+ // SEO [Paged]
1231
+ pagenum = alm.page + 1 + p2;
1232
+
1233
+ if (alm.addons.seo) {
1234
+ // SEO
1235
+ reveal = createSEOAttributes(alm, reveal, querystring, seo_class, pagenum);
1236
+ } else if (alm.addons.filters) {
1237
+ // Filters
1238
+ reveal.setAttribute('class', 'alm-reveal' + filters_class + alm.tcc);
1239
+ reveal.dataset.url = alm.canonical_url + buildFilterURL(alm, querystring, pagenum);
1240
+ reveal.dataset.page = pagenum;
1241
+ } else {
1242
+ // Basic ALM
1243
+ reveal.setAttribute('class', 'alm-reveal' + alm.tcc);
1244
+ }
1245
+ } else if (alm.addons.filters) {
1246
+ // Filters
1247
+ reveal.setAttribute('class', 'alm-reveal' + filters_class + alm.tcc);
1248
+ reveal.dataset.url = alm.canonical_url + buildFilterURL(alm, querystring, parseInt(alm.page) + 1);
1249
+ reveal.dataset.page = parseInt(alm.page) + 1;
1250
+ } else {
1251
+ if (alm.addons.seo) {
1252
+ // SEO [Page 1]
1253
+ reveal = createSEOAttributes(alm, reveal, querystring, seo_class, 1);
1254
+ } else {
1255
+ // Basic ALM
1256
+ reveal.setAttribute('class', 'alm-reveal' + alm.tcc);
1257
+ }
1258
+ }
1259
+
1260
+ reveal.innerHTML = alm.html;
1261
+ }
1262
+ }
1263
+ }
1264
+
1265
+ // WooCommerce Add-on
1266
+ if (alm.addons.woocommerce) {
1267
+ (async function () {
1268
+ await woocommerce(reveal, alm, data.pageTitle);
1269
+
1270
+ let nextPageNum = alm.page + 2;
1271
+
1272
+ // Set button data attributes
1273
+ alm.button.dataset.page = nextPageNum; // Page
1274
+ let nextPage = alm.addons.woocommerce_settings.paged_urls[nextPageNum - 1]; // URL
1275
+ alm.button.dataset.url = nextPage ? nextPage : '';
1276
+
1277
+ alm.AjaxLoadMore.transitionEnd();
1278
+
1279
+ // almComplete
1280
+ if (typeof almComplete === 'function' && alm.transition !== 'masonry') {
1281
+ window.almComplete(alm);
1282
+ }
1283
+
1284
+ // ALM Done
1285
+ if (nextPageNum > parseInt(alm.addons.woocommerce_settings.pages)) {
1286
+ alm.AjaxLoadMore.triggerDone();
1287
+ }
1288
+ })().catch((e) => {
1289
+ console.log(e);
1290
+ console.log('There was an error loading woocommerce products');
1291
+ });
1292
+
1293
+ alm.init = false;
1294
+
1295
+ return;
1296
+ }
1297
+
1298
+ // Elementor Add-on
1299
+ if (alm.addons.elementor) {
1300
+ (async function () {
1301
+ await elementor(reveal, alm, data.pageTitle);
1302
+
1303
+ let nextPageNum = alm.page + 1;
1304
+
1305
+ // Set button data attributes
1306
+ alm.button.dataset.page = nextPageNum; // Page
1307
+ let nextPage = alm.addons.elementor_next_page_url; // URL
1308
+ alm.button.dataset.url = nextPage ? nextPage : '';
1309
+
1310
+ alm.AjaxLoadMore.transitionEnd();
1311
+
1312
+ // almComplete
1313
+ if (typeof almComplete === 'function' && alm.transition !== 'masonry') {
1314
+ window.almComplete(alm);
1315
+ }
1316
+
1317
+ // ALM Done
1318
+ if (!nextPage) {
1319
+ alm.AjaxLoadMore.triggerDone();
1320
+ }
1321
+ })().catch((e) => {
1322
+ console.log(e);
1323
+ console.log('There was an error loading Elementor Post Widget items');
1324
+ });
1325
+
1326
+ alm.init = false;
1327
+
1328
+ return;
1329
+ }
1330
+
1331
+ // Append `reveal` div to ALM Listing container
1332
+ // Do not append when transtion == masonry OR init and !preloaded
1333
+ if (alm.transition !== 'masonry' || (alm.init && !alm.is_masonry_preloaded)) {
1334
+ if (!isPaged) {
1335
+ if (!alm.transition_container) {
1336
+ // No transition container
1337
+ if (alm.images_loaded === 'true') {
1338
+ imagesLoaded(reveal, function () {
1339
+ almAppendChildren(alm.listing, reveal);
1340
+
1341
+ // Run srcSet polyfill
1342
+ srcsetPolyfill(alm.listing, alm.ua);
1343
+ });
1344
+ } else {
1345
+ almAppendChildren(alm.listing, reveal);
1346
+
1347
+ // Run srcSet polyfill
1348
+ srcsetPolyfill(alm.listing, alm.ua);
1349
+ }
1350
+ } else {
1351
+ // Standard container
1352
+ alm.listing.appendChild(reveal);
1353
+ }
1354
+ }
1355
+ }
1356
+
1357
+ // *****
1358
+ // Transitions
1359
+ // *****
1360
+
1361
+ // Masonry
1362
+ if (alm.transition === 'masonry') {
1363
+ alm.el = alm.listing;
1364
+
1365
+ // Wrap almMasonry in anonymous async/await function
1366
+ (async function () {
1367
+ await almMasonry(alm, alm.init, alm_is_filtering);
1368
+ alm.masonry_init = false;
1369
+
1370
+ alm.AjaxLoadMore.triggerWindowResize();
1371
+ alm.AjaxLoadMore.transitionEnd();
1372
+ if (typeof almComplete === 'function') {
1373
+ window.almComplete(alm);
1374
+ }
1375
+ })().catch((e) => {
1376
+ console.log('There was an error with ALM Masonry');
1377
+ });
1378
+ }
1379
+
1380
+ // None
1381
+ else if (alm.transition === 'none') {
1382
+ if (alm.images_loaded === 'true') {
1383
+ imagesLoaded(reveal, function () {
1384
+ almFadeIn(reveal, 0);
1385
+ alm.AjaxLoadMore.transitionEnd();
1386
+ });
1387
+ } else {
1388
+ almFadeIn(reveal, 0);
1389
+ alm.AjaxLoadMore.transitionEnd();
1390
+ }
1391
+ }
1392
+
1393
+ // Default(Fade)
1394
+ else {
1395
+ if (alm.images_loaded === 'true') {
1396
+ imagesLoaded(reveal, function () {
1397
+ if (alm.transition_container) {
1398
+ almFadeIn(reveal, alm.speed);
1399
+ }
1400
+ alm.AjaxLoadMore.transitionEnd();
1401
+ });
1402
+ } else {
1403
+ if (alm.transition_container) {
1404
+ almFadeIn(reveal, alm.speed);
1405
+ }
1406
+ alm.AjaxLoadMore.transitionEnd();
1407
+ }
1408
+ }
1409
+
1410
+ // TABS - Trigger almTabsSetHeight callback in Tabs add-on
1411
+ if (alm.addons.tabs && typeof almTabsSetHeight === 'function') {
1412
+ imagesLoaded(reveal, function () {
1413
+ almFadeIn(alm.listing, alm.speed);
1414
+ setTimeout(function () {
1415
+ window.almTabsSetHeight(alm);
1416
+ }, alm.speed);
1417
+ });
1418
+ }
1419
+ } else {
1420
+ // Paging
1421
+ if (!alm.init) {
1422
+ if (pagingContent) {
1423
+ almFadeOut(pagingContent, alm.speed);
1424
+ pagingContent.style.outline = 'none';
1425
+ alm.main.classList.remove('alm-loading');
1426
+
1427
+ setTimeout(function () {
1428
+ pagingContent.style.opacity = 0;
1429
+ pagingContent.innerHTML = alm.html;
1430
+
1431
+ imagesLoaded(pagingContent, function () {
1432
+ // Delay for effect
1433
+ alm.AjaxLoadMore.triggerAddons(alm);
1434
+ almFadeIn(pagingContent, alm.speed);
1435
+
1436
+ // Remove opacity on element to fix CSS transition
1437
+ setTimeout(function () {
1438
+ pagingContent.style.opacity = '';
1439
+
1440
+ // Insert Script
1441
+ insertScript.init(pagingContent);
1442
+ }, parseInt(alm.speed) + 10);
1443
+
1444
+ // Paging addon
1445
+ if (typeof almOnPagingComplete === 'function') {
1446
+ window.almOnPagingComplete(alm);
1447
+ }
1448
+ });
1449
+ }, parseInt(alm.speed) + 25);
1450
+ }
1451
+ } else {
1452
+ setTimeout(function () {
1453
+ alm.main.classList.remove('alm-loading');
1454
+ alm.AjaxLoadMore.triggerAddons(alm);
1455
+ }, alm.speed);
1456
+ }
1457
+ // End Paging
1458
+ }
1459
+
1460
+ // ALM Loaded, run complete callbacks
1461
+ imagesLoaded(reveal, function () {
1462
+ // Nested
1463
+ alm.AjaxLoadMore.nested(reveal);
1464
+
1465
+ // Insert Script
1466
+ insertScript.init(alm.el);
1467
+
1468
+ // almComplete
1469
+ if (typeof almComplete === 'function' && alm.transition !== 'masonry') {
1470
+ window.almComplete(alm);
1471
+ }
1472
+
1473
+ // Filters Add-on Complete
1474
+ if (alm_is_filtering && alm.addons.filters) {
1475
+ if (typeof almFiltersAddonComplete === 'function') {
1476
+ // Filters Add-on
1477
+ window.almFiltersAddonComplete(el);
1478
+ }
1479
+ }
1480
+ alm_is_filtering = false;
1481
+
1482
+ // Tabs Complete
1483
+ if (alm.addons.tabs) {
1484
+ // Tabs Complete
1485
+ if (typeof almTabsComplete === 'function') {
1486
+ // Standard Filtering
1487
+ window.almTabsComplete();
1488
+ }
1489
+ }
1490
+
1491
+ // ALM Done
1492
+ if (!alm.addons.cache) {
1493
+ // Not Cache & Single Post
1494
+ if (alm.posts >= alm.totalposts && !alm.addons.single_post) {
1495
+ alm.AjaxLoadMore.triggerDone();
1496
+ }
1497
+ } else {
1498
+ // Cache
1499
+ if (alm.addons.nextpage && alm.localize) {
1500
+ // Nextpage
1501
+ if (parseInt(alm.localize.page) === parseInt(alm.localize.total_posts)) {
1502
+ alm.AjaxLoadMore.triggerDone();
1503
+ }
1504
+ } else {
1505
+ if (total < parseInt(alm.posts_per_page)) {
1506
+ alm.AjaxLoadMore.triggerDone();
1507
+ }
1508
+ }
1509
+ }
1510
+ // End ALM Done
1511
+ });
1512
+ // End ALM Loaded
1513
+
1514
+ // Filters onLoad
1515
+ if (typeof almFiltersOnload === 'function' && alm.init) {
1516
+ window.almFiltersOnload(alm);
1517
+ }
1518
+ } else {
1519
+ /*
1520
+ * No results from Ajax
1521
+ */
1522
+ alm.AjaxLoadMore.noresults();
1523
+ }
1524
+
1525
+ // Destroy After
1526
+ if (alm.destroy_after !== undefined && alm.destroy_after !== '') {
1527
+ var currentPage = alm.page + 1; // Add 1 because alm.page starts at 0
1528
+ currentPage = alm.addons.preloaded === 'true' ? currentPage++ : currentPage; // Add 1 for preloaded
1529
+ if (currentPage == alm.destroy_after) {
1530
+ // Disable ALM if page = alm.destroy_after val
1531
+ alm.AjaxLoadMore.destroyed();
1532
+ }
1533
+ }
1534
+
1535
+ /*
1536
+ * Display tableOfContents
1537
+ */
1538
+
1539
+ tableOfContents(alm, alm.init);
1540
+
1541
+ // Set Focus for A11y
1542
+ if (alm.transition !== 'masonry') {
1543
+ setFocus(alm, reveal, total, alm_is_filtering);
1544
+ }
1545
+
1546
+ // Remove filtering class
1547
+ if (alm.main.classList.contains('alm-is-filtering')) {
1548
+ alm.main.classList.remove('alm-is-filtering');
1549
+ }
1550
+
1551
+ // Set init flag
1552
+ alm.init = false;
1553
+ };
1554
+
1555
+ /**
1556
+ * noresults
1557
+ * Functions run when no results are returned.
1558
+ *
1559
+ * @since 5.3.1
1560
+ */
1561
+ alm.AjaxLoadMore.noresults = function () {
1562
+ if (!alm.addons.paging) {
1563
+ // Add .done class, reset btn text
1564
+ setTimeout(function () {
1565
+ alm.button.classList.remove('loading');
1566
+ alm.button.classList.add('done');
1567
+ }, alm.speed);
1568
+ alm.AjaxLoadMore.resetBtnText();
1569
+ }
1570
+
1571
+ // almComplete
1572
+ if (typeof almComplete === 'function' && alm.transition !== 'masonry') {
1573
+ window.almComplete(alm);
1574
+ }
1575
+
1576
+ // Filters Add-on Complete
1577
+ if (alm_is_filtering && alm.addons.filters) {
1578
+ if (typeof almFiltersAddonComplete === 'function') {
1579
+ // Filters Add-on
1580
+ almFiltersAddonComplete(el);
1581
+ }
1582
+ alm_is_filtering = false;
1583
+ }
1584
+
1585
+ // Tabs Complete
1586
+ if (alm.addons.tabs) {
1587
+ // Tabs Complete
1588
+ if (typeof almTabsComplete === 'function') {
1589
+ // Standard Filtering
1590
+ almTabsComplete();
1591
+ }
1592
+ }
1593
+
1594
+ // Masonry, clear `alm-listing` height
1595
+ if (alm.transition === 'masonry') {
1596
+ alm.content.style.height = 'auto';
1597
+ }
1598
+
1599
+ alm.AjaxLoadMore.triggerDone(); // ALM Done
1600
+ };
1601
+
1602
+ /**
1603
+ * pagingPreloadedInit
1604
+ * First run for Paging + Preloaded add-ons
1605
+ * Moves preloaded content into ajax container
1606
+ *
1607
+ * @param {data} Results of the Ajax request
1608
+ * @since 2.11.3
1609
+ */
1610
+ alm.AjaxLoadMore.pagingPreloadedInit = function (data) {
1611
+ data = data == null ? '' : data; // Check for null data object
1612
+
1613
+ // Add paging containers and content
1614
+ alm.AjaxLoadMore.pagingInit(data, 'alm-reveal');
1615
+
1616
+ if (data === '') {
1617
+ if (typeof almPagingEmpty === 'function') {
1618
+ window.almPagingEmpty(alm);
1619
+ }
1620
+ if (typeof almEmpty === 'function') {
1621
+ window.almEmpty(alm);
1622
+ }
1623
+ if (alm.no_results) {
1624
+ almNoResults(alm.content, alm.no_results);
1625
+ }
1626
+ }
1627
+ };
1628
+
1629
+ /**
1630
+ * pagingNextpageInit
1631
+ * First run for Paging + Next Page add-ons
1632
+ * Moves .alm-nextpage content into ajax container
1633
+ *
1634
+ * @param {data} Results of Ajax request
1635
+ * @since 2.14.0
1636
+ */
1637
+ alm.AjaxLoadMore.pagingNextpageInit = function (data) {
1638
+ data = data == null ? '' : data; // Check for null data object
1639
+
1640
+ // Add paging containers and content
1641
+ alm.AjaxLoadMore.pagingInit(data, 'alm-reveal alm-nextpage');
1642
+
1643
+ // Set up Nextpage Vars
1644
+ if (typeof almSetNextPageVars === 'function') {
1645
+ window.almSetNextPageVars(alm); // Next Page Add-on
1646
+ }
1647
+ };
1648
+
1649
+ /**
1650
+ * pagingInit
1651
+ * First run for Paging + (Preloaded & Next Page) add-ons. Create required containers.
1652
+ *
1653
+ * @param {data} Ajax results
1654
+ * @param {classes} added classes
1655
+ * @since 5.0
1656
+ */
1657
+ alm.AjaxLoadMore.pagingInit = function (data, classes = 'alm-reveal') {
1658
+ data = data == null ? '' : data; // Check for null data object
1659
+
1660
+ // Create `alm-reveal` container
1661
+ let reveal = document.createElement('div');
1662
+ reveal.setAttribute('class', classes);
1663
+
1664
+ // Create `alm-paging-loading` container
1665
+ let content = document.createElement('div');
1666
+ content.setAttribute('class', 'alm-paging-content' + alm.tcc);
1667
+ content.innerHTML = data;
1668
+ reveal.appendChild(content);
1669
+
1670
+ // Create `alm-paging-content` container
1671
+ let loader = document.createElement('div');
1672
+ loader.setAttribute('class', 'alm-paging-loading');
1673
+ reveal.appendChild(loader);
1674
+
1675
+ // Add div to container
1676
+ alm.listing.appendChild(reveal);
1677
+
1678
+ // Get/Set height of .alm-listing div
1679
+ let styles = window.getComputedStyle(alm.listing);
1680
+ let pTop = parseInt(styles.getPropertyValue('padding-top').replace('px', ''));
1681
+ let pBtm = parseInt(styles.getPropertyValue('padding-bottom').replace('px', ''));
1682
+ let h = reveal.offsetHeight;
1683
+
1684
+ // Set initial `.alm-listing` height
1685
+ alm.listing.style.height = h + pTop + pBtm + 'px';
1686
+
1687
+ // Insert Script
1688
+ insertScript.init(reveal);
1689
+
1690
+ // Reset button text
1691
+ alm.AjaxLoadMore.resetBtnText();
1692
+
1693
+ // Delay reveal of paging to avoid positioning issues
1694
+ setTimeout(function () {
1695
+ if (typeof almFadePageControls === 'function') {
1696
+ window.almFadePageControls(alm.btnWrap);
1697
+ }
1698
+ if (typeof almOnWindowResize === 'function') {
1699
+ window.almOnWindowResize(alm);
1700
+ }
1701
+ // Remove loading class from main container
1702
+ alm.main.classList.remove('loading');
1703
+ }, alm.speed);
1704
+ };
1705
+
1706
+ /**
1707
+ * nested
1708
+ * Automatically trigger nested ALM instances (Requies `.alm-reveal` container
1709
+ *
1710
+ * @param {object} instance
1711
+ * @since 5.0
1712
+ */
1713
+ alm.AjaxLoadMore.nested = function (reveal) {
1714
+ if (!reveal || !alm.transition_container) {
1715
+ return false; // Exit if not `transition_container`
1716
+ }
1717
+ let nested = reveal.querySelectorAll('.ajax-load-more-wrap'); // Get all instances from jQuery obj
1718
+ if (nested) {
1719
+ nested.forEach(function (element) {
1720
+ window.almInit(element);
1721
+ });
1722
+ }
1723
+ };
1724
+
1725
+ /**
1726
+ * Get the Single Posts post ID via ajax.
1727
+ *
1728
+ * @since 2.7.4
1729
+ */
1730
+ if (alm.addons.single_post_id) {
1731
+ alm.fetchingPreviousPost = false;
1732
+ alm.addons.single_post_init = true;
1733
+ }
1734
+
1735
+ alm.AjaxLoadMore.getSinglePost = function () {
1736
+ let action = 'alm_get_single';
1737
+
1738
+ if (alm.fetchingPreviousPost) {
1739
+ return false;
1740
+ }
1741
+
1742
+ alm.fetchingPreviousPost = true;
1743
+
1744
+ // Get admin-ajax.php URL
1745
+ let ajaxURL = alm_localize.ajaxurl;
1746
+
1747
+ // Get data params
1748
+ let params = {
1749
+ id: alm.addons.single_post_id,
1750
+ initial_id: alm.addons.single_post_init_id,
1751
+ order: alm.addons.single_post_order,
1752
+ taxonomy: alm.addons.single_post_taxonomy,
1753
+ excluded_terms: alm.addons.single_post_excluded_terms,
1754
+ post_type: alm.post_type,
1755
+ init: alm.addons.single_post_init,
1756
+ action: action,
1757
+ };
1758
+
1759
+ // Send HTTP request via Axios
1760
+ axios
1761
+ .get(ajaxURL, { params })
1762
+ .then(function (response) {
1763
+ // Success
1764
+ let data = response.data; // Get data from response
1765
+
1766
+ if (data.has_previous_post) {
1767
+ alm.listing.dataset.singlePostId = data.prev_id; // Update single-post-id on instance
1768
+ alm.addons.single_post_id = data.prev_id;
1769
+ alm.addons.single_post_permalink = data.prev_permalink;
1770
+ alm.addons.single_post_title = data.prev_title;
1771
+ alm.addons.single_post_slug = data.prev_slug;
1772
+ } else {
1773
+ if (!data.has_previous_post) {
1774
+ alm.AjaxLoadMore.triggerDone();
1775
+ }
1776
+ }
1777
+ if (typeof window.almSetSinglePost === 'function') {
1778
+ window.almSetSinglePost(alm, data.current_id, data.permalink, data.title);
1779
+ }
1780
+ alm.fetchingPreviousPost = false;
1781
+ alm.addons.single_post_init = false;
1782
+ })
1783
+ .catch(function (error) {
1784
+ // Error
1785
+ alm.AjaxLoadMore.error(error, 'getSinglePost');
1786
+ alm.fetchingPreviousPost = false;
1787
+ });
1788
+ };
1789
+
1790
+ /**
1791
+ * Triggers various add-on functions (if available) after load complete.
1792
+ *
1793
+ * @since 2.14.0
1794
+ */
1795
+ alm.AjaxLoadMore.triggerAddons = function (alm) {
1796
+ if (typeof almSetNextPage === 'function') {
1797
+ // Next Page
1798
+ window.almSetNextPage(alm);
1799
+ }
1800
+ if (typeof almSEO === 'function') {
1801
+ // SEO
1802
+ window.almSEO(alm, false);
1803
+ }
1804
+ if (typeof almWooCommerce === 'function') {
1805
+ // WooCommerce
1806
+ window.almWooCommerce(alm);
1807
+ }
1808
+ if (typeof almElementor === 'function') {
1809
+ // Elementor
1810
+ window.almElementor(alm);
1811
+ }
1812
+ };
1813
+
1814
+ /**
1815
+ * Fires a set of actions and functions when ALM has no other posts to load.
1816
+ *
1817
+ * @since 2.11.3
1818
+ */
1819
+ alm.AjaxLoadMore.triggerDone = function () {
1820
+ alm.loading = false;
1821
+ alm.finished = true;
1822
+ hidePlaceholder(alm);
1823
+
1824
+ if (!alm.addons.paging) {
1825
+ // Update button text
1826
+ if (alm.button_done_label !== false) {
1827
+ setTimeout(function () {
1828
+ alm.button.innerHTML = alm.button_done_label;
1829
+ }, 75);
1830
+ }
1831
+
1832
+ alm.button.classList.add('done');
1833
+ alm.button.disabled = true;
1834
+ }
1835
+
1836
+ // almDone
1837
+ if (typeof almDone === 'function') {
1838
+ // Delay done until animations complete
1839
+ setTimeout(function () {
1840
+ window.almDone(alm);
1841
+ }, alm.speed + 10);
1842
+ }
1843
+ };
1844
+
1845
+ /**
1846
+ * Resets the loading button text after loading has completed.
1847
+ *
1848
+ * @since 2.8.4
1849
+ */
1850
+ alm.AjaxLoadMore.resetBtnText = function () {
1851
+ if (alm.button_loading_label !== false && !alm.addons.paging) {
1852
+ // Reset button text
1853
+ alm.button.innerHTML = alm.button_label;
1854
+ }
1855
+ };
1856
+
1857
+ /**
1858
+ * Error function after failed data attempt.
1859
+ *
1860
+ * @since 2.6.0
1861
+ */
1862
+ alm.AjaxLoadMore.error = function (error, location = null) {
1863
+ alm.loading = false;
1864
+ if (!alm.addons.paging) {
1865
+ alm.button.classList.remove('loading');
1866
+ alm.AjaxLoadMore.resetBtnText();
1867
+ }
1868
+
1869
+ console.log('Error: ', error);
1870
+ if (error.response) {
1871
+ // The request was made and the server responded with a status code
1872
+ // that falls out of the range of 2xx
1873
+ //console.log(error.response.data);
1874
+ //console.log(error.response.status);
1875
+ //console.log(error.response.headers);
1876
+ console.log('Error Msg: ', error.message);
1877
+ } else if (error.request) {
1878
+ // The request was made but no response was received
1879
+ // `error.request` is an instance of XMLHttpRequest in the browser and an instance of
1880
+ // http.ClientRequest in node.js
1881
+ console.log(error.request);
1882
+ } else {
1883
+ // Something happened in setting up the request that triggered an Error
1884
+ console.log('Error Msg: ', error.message);
1885
+ }
1886
+
1887
+ if (location) {
1888
+ console.log('ALM Error started in ' + location);
1889
+ }
1890
+
1891
+ if (error.config) {
1892
+ console.log('ALM Error Debug: ', error.config);
1893
+ }
1894
+ };
1895
+
1896
+ /**
1897
+ * Button click handler to load posts.
1898
+ *
1899
+ * @since 4.2.0
1900
+ */
1901
+ alm.AjaxLoadMore.click = function (e) {
1902
+ let button = e.target || e.currentTarget;
1903
+ if (alm.pause === 'true') {
1904
+ alm.pause = false;
1905
+ alm.pause_override = false;
1906
+ alm.AjaxLoadMore.loadPosts();
1907
+ }
1908
+ if (!alm.loading && !alm.finished && !button.classList.contains('done')) {
1909
+ alm.loading = true;
1910
+ alm.page++;
1911
+ alm.AjaxLoadMore.loadPosts();
1912
+ }
1913
+ button.blur(); // Remove button focus
1914
+ };
1915
+
1916
+ /**
1917
+ * Load More button click event handler.
1918
+ *
1919
+ * @since 1.0.0
1920
+ */
1921
+ if (!alm.addons.paging && !alm.fetchingPreviousPost) {
1922
+ alm.button.onclick = alm.AjaxLoadMore.click;
1923
+ }
1924
+
1925
+ /**
1926
+ * Window resize functions for Paging, Scroll Distance Percentage, Tabs etc.
1927
+ *
1928
+ * @since 2.1.2
1929
+ * @updated 5.2
1930
+ */
1931
+ if (alm.addons.paging || alm.addons.tabs || alm.scroll_distance_perc || alm.scroll_direction === 'horizontal') {
1932
+ let resize;
1933
+ alm.window.onresize = function () {
1934
+ clearTimeout(resize);
1935
+ resize = setTimeout(function (e) {
1936
+ if (alm.addons.tabs) {
1937
+ // Tabs
1938
+ if (typeof almOnTabsWindowResize === 'function') {
1939
+ window.almOnTabsWindowResize(alm);
1940
+ }
1941
+ }
1942
+ if (alm.addons.paging) {
1943
+ // Paging
1944
+ if (typeof almOnWindowResize === 'function') {
1945
+ window.almOnWindowResize(alm);
1946
+ }
1947
+ }
1948
+ if (alm.scroll_distance_perc) {
1949
+ alm.scroll_distance = getScrollPercentage(alm);
1950
+ }
1951
+ if (alm.scroll_direction === 'horizontal') {
1952
+ alm.AjaxLoadMore.horizontal();
1953
+ }
1954
+ }, alm.speed);
1955
+ };
1956
+ }
1957
+
1958
+ /**
1959
+ * Check to see if element is visible before loading posts.
1960
+ *
1961
+ * @since 2.1.2
1962
+ */
1963
+ alm.AjaxLoadMore.isVisible = function () {
1964
+ // Check for a width and height to determine visibility
1965
+ alm.visible = alm.main.clientWidth > 0 && alm.main.clientHeight > 0 ? true : false;
1966
+ return alm.visible;
1967
+ };
1968
+
1969
+ /**
1970
+ * Trigger a window resize browser function.
1971
+ *
1972
+ * @since 5.3.1
1973
+ */
1974
+ alm.AjaxLoadMore.triggerWindowResize = function () {
1975
+ if (typeof Event === 'function') {
1976
+ // modern browsers
1977
+ window.dispatchEvent(new Event('resize'));
1978
+ } else {
1979
+ //This will be executed on old browsers and especially IE
1980
+ var resizeEvent = window.document.createEvent('UIEvents');
1981
+ resizeEvent.initUIEvent('resize', true, false, window, 0);
1982
+ window.dispatchEvent(resizeEvent);
1983
+ }
1984
+ };
1985
+
1986
+ /**
1987
+ * Load posts as user scrolls the page.
1988
+ *
1989
+ * @since 1.0
1990
+ * @updated 4.2.0
1991
+ */
1992
+ alm.AjaxLoadMore.scroll = function () {
1993
+ if (alm.timer) {
1994
+ clearTimeout(alm.timer);
1995
+ }
1996
+
1997
+ alm.timer = setTimeout(function () {
1998
+ if (alm.AjaxLoadMore.isVisible() && !alm.fetchingPreviousPost) {
1999
+ let trigger = alm.trigger.getBoundingClientRect();
2000
+ let btnPos = Math.round(trigger.top - alm.window.innerHeight) + alm.scroll_distance;
2001
+ let scrollTrigger = btnPos <= 0 ? true : false;
2002
+
2003
+ // Scroll Container
2004
+ if (alm.window !== window) {
2005
+ let scrollHeight = alm.main.offsetHeight; // ALM height
2006
+ let scrollWidth = alm.main.offsetWidth; // ALM Width
2007
+ let scrollPosition = '';
2008
+
2009
+ if (alm.scroll_direction === 'horizontal') {
2010
+ // Left/Right
2011
+ alm.AjaxLoadMore.horizontal();
2012
+ scrollPosition = Math.round(alm.window.scrollLeft + alm.window.offsetWidth - alm.scroll_distance); // How far user has scrolled
2013
+ scrollTrigger = scrollWidth <= scrollPosition ? true : false;
2014
+ } else {
2015
+ // Up/Down
2016
+ scrollPosition = Math.round(alm.window.scrollTop + alm.window.offsetHeight - alm.scroll_distance); // How far user has scrolled
2017
+ scrollTrigger = scrollHeight <= scrollPosition ? true : false;
2018
+ }
2019
+ }
2020
+
2021
+ // If Pause && Pause Override
2022
+ if (
2023
+ !alm.loading &&
2024
+ !alm.finished &&
2025
+ scrollTrigger &&
2026
+ alm.page < alm.max_pages - 1 &&
2027
+ alm.proceed &&
2028
+ alm.pause === 'true' &&
2029
+ alm.pause_override === 'true'
2030
+ ) {
2031
+ alm.button.click();
2032
+ }
2033
+
2034
+ // Standard Scroll
2035
+ else {
2036
+ if (!alm.loading && !alm.finished && scrollTrigger && alm.page < alm.max_pages - 1 && alm.proceed && alm.pause !== 'true') {
2037
+ alm.button.click();
2038
+ }
2039
+ }
2040
+ }
2041
+ }, 25);
2042
+ };
2043
+
2044
+ /**
2045
+ * Add scroll eventlisteners, only when needed.
2046
+ *
2047
+ * @since 5.2.0
2048
+ */
2049
+ alm.AjaxLoadMore.scrollSetup = function () {
2050
+ if (alm.scroll && !alm.addons.paging) {
2051
+ if (alm.scroll_container !== '') {
2052
+ // Scroll Container
2053
+ alm.window = document.querySelector(alm.scroll_container) ? document.querySelector(alm.scroll_container) : alm.window;
2054
+ setTimeout(function () {
2055
+ // Delay to allow for ALM container to resize on load.
2056
+ alm.AjaxLoadMore.horizontal();
2057
+ }, 500);
2058
+ }
2059
+ alm.window.addEventListener('scroll', alm.AjaxLoadMore.scroll); // Scroll
2060
+ alm.window.addEventListener('touchstart', alm.AjaxLoadMore.scroll); // Touch Devices
2061
+ alm.window.addEventListener('wheel', function (e) {
2062
+ // Mousewheel
2063
+ let direction = Math.sign(e.deltaY);
2064
+ if (direction > 0) {
2065
+ alm.AjaxLoadMore.scroll();
2066
+ }
2067
+ });
2068
+ alm.window.addEventListener('keyup', function (e) {
2069
+ // End, Page Down
2070
+ let code = e.keyCode ? e.keyCode : e.which;
2071
+ switch (code) {
2072
+ case 35:
2073
+ case 34:
2074
+ alm.AjaxLoadMore.scroll();
2075
+ break;
2076
+ }
2077
+ });
2078
+ }
2079
+ };
2080
+
2081
+ /**
2082
+ * Configure horizontal scroll settings.
2083
+ *
2084
+ * @since 5.3.6
2085
+ */
2086
+ alm.AjaxLoadMore.horizontal = function () {
2087
+ if (alm.scroll_direction === 'horizontal') {
2088
+ alm.main.style.width = `${alm.listing.offsetWidth}px`;
2089
+ }
2090
+ };
2091
+
2092
+ /**
2093
+ * Destroy Ajax Load More functionality.
2094
+ *
2095
+ * @since 3.4.2
2096
+ */
2097
+ alm.AjaxLoadMore.destroyed = function () {
2098
+ alm.disable_ajax = true;
2099
+ if (!alm.addons.paging) {
2100
+ alm.button.style.display = 'none';
2101
+ alm.AjaxLoadMore.triggerDone();
2102
+ if (typeof almDestroyed === 'function') {
2103
+ window.almDestroyed(alm);
2104
+ }
2105
+ }
2106
+ };
2107
+
2108
+ /**
2109
+ * Set variables after loading transiton completes.
2110
+ *
2111
+ * @since 3.5
2112
+ */
2113
+ alm.AjaxLoadMore.transitionEnd = function () {
2114
+ setTimeout(function () {
2115
+ alm.AjaxLoadMore.resetBtnText();
2116
+ alm.main.classList.remove('alm-loading');
2117
+ alm.button.classList.remove('loading'); // Loading button
2118
+ alm.AjaxLoadMore.triggerAddons(alm);
2119
+ if (!alm.addons.paging) {
2120
+ setTimeout(function () {
2121
+ alm.loading = false; // Delay to prevent loading to fast
2122
+ }, alm.speed * 3);
2123
+ }
2124
+ }, 50);
2125
+ hidePlaceholder(alm);
2126
+ };
2127
+
2128
+ /**
2129
+ * Set individual localized variable.
2130
+ *
2131
+ * @param {string} name
2132
+ * @param {string} value
2133
+ * @since 4.1
2134
+ */
2135
+ alm.AjaxLoadMore.setLocalizedVar = function (name = '', value = '') {
2136
+ if (alm.localize && name !== '' && value !== '') {
2137
+ alm.localize[name] = value.toString(); // Set ALM localize var
2138
+ window[alm.master_id + '_vars'][name] = value.toString(); // Update global window obj vars
2139
+ }
2140
+ };
2141
+
2142
+ /**
2143
+ * Init Ajax load More functionality and add-ons.
2144
+ *
2145
+ * @since 2.0
2146
+ */
2147
+ alm.AjaxLoadMore.init = function () {
2148
+ // Preloaded and destroy_after is 1
2149
+ if (alm.addons.preloaded === 'true' && alm.destroy_after == 1) {
2150
+ alm.AjaxLoadMore.destroyed();
2151
+ }
2152
+
2153
+ if (!alm.addons.paging && !alm.addons.single_post) {
2154
+ if (alm.disable_ajax) {
2155
+ alm.finished = true;
2156
+ alm.button.classList.add('done');
2157
+ } else {
2158
+ if (alm.pause === 'true') {
2159
+ alm.button.innerHTML = alm.button_label;
2160
+ alm.loading = false;
2161
+ } else {
2162
+ alm.AjaxLoadMore.loadPosts();
2163
+ }
2164
+ }
2165
+ }
2166
+
2167
+ // Single Post Add-on
2168
+ if (alm.addons.single_post) {
2169
+ alm.AjaxLoadMore.getSinglePost(); // Set next post on load
2170
+ alm.loading = false;
2171
+
2172
+ // Trigger done if custom query and no posts to render
2173
+ if (alm.addons.single_post_query && alm.addons.single_post_order === '') {
2174
+ alm.AjaxLoadMore.triggerDone();
2175
+ }
2176
+
2177
+ /*
2178
+ * Display tableOfContents
2179
+ */
2180
+
2181
+ tableOfContents(alm, true, true);
2182
+ }
2183
+
2184
+ // Preloaded + SEO && !Paging
2185
+ if (alm.addons.preloaded === 'true' && alm.addons.seo && !alm.addons.paging) {
2186
+ // Delay for scripts to load
2187
+ setTimeout(function () {
2188
+ if (typeof almSEO === 'function' && alm.start_page < 1) {
2189
+ window.almSEO(alm, true);
2190
+ }
2191
+ }, alm.speed);
2192
+ }
2193
+
2194
+ // Preloaded && !Paging
2195
+ if (alm.addons.preloaded === 'true' && !alm.addons.paging) {
2196
+ // Delay for scripts to load
2197
+ setTimeout(function () {
2198
+ // triggerDone
2199
+ if (alm.addons.preloaded_total_posts <= parseInt(alm.addons.preloaded_amount)) {
2200
+ alm.AjaxLoadMore.triggerDone();
2201
+ }
2202
+ // almEmpty
2203
+ if (alm.addons.preloaded_total_posts == 0) {
2204
+ if (typeof almEmpty === 'function') {
2205
+ window.almEmpty(alm);
2206
+ }
2207
+ if (alm.no_results) {
2208
+ almNoResults(alm.content, alm.no_results);
2209
+ }
2210
+ }
2211
+ }, alm.speed);
2212
+ }
2213
+
2214
+ // Preloaded Add-on ONLY
2215
+ if (alm.addons.preloaded === 'true') {
2216
+ if (alm.resultsText) {
2217
+ resultsText.almInitResultsText(alm, 'preloaded');
2218
+ }
2219
+
2220
+ /*
2221
+ * Display tableOfContents
2222
+ */
2223
+
2224
+ tableOfContents(alm, alm.init, true);
2225
+ }
2226
+
2227
+ // Next Page Add-on
2228
+ if (alm.addons.nextpage) {
2229
+ // Check that posts remain on load
2230
+ if (alm.listing.querySelector('.alm-nextpage') && !alm.addons.paging) {
2231
+ let nextpage_pages = alm.listing.querySelectorAll('.alm-nextpage'); // All Next Page Items
2232
+
2233
+ if (nextpage_pages) {
2234
+ let nextpage_first = nextpage_pages[0];
2235
+ let nextpage_total = alm.localize.total_posts ? parseInt(alm.localize.total_posts) : nextpage_first.dataset.totalPosts;
2236
+
2237
+ // Disable if last page loaded
2238
+ if (nextpage_pages.length === nextpage_total || parseInt(nextpage_first.dataset.id) === nextpage_total) {
2239
+ alm.AjaxLoadMore.triggerDone();
2240
+ }
2241
+ }
2242
+ }
2243
+
2244
+ if (alm.resultsText) {
2245
+ resultsText.almInitResultsText(alm, 'nextpage');
2246
+ }
2247
+
2248
+ /*
2249
+ * Display tableOfContents
2250
+ */
2251
+
2252
+ tableOfContents(alm, alm.init, true);
2253
+ }
2254
+
2255
+ // WooCommerce Add-on
2256
+ if (alm.addons.woocommerce) {
2257
+ // Initiate WooCommerce
2258
+ wooInit(alm);
2259
+
2260
+ // Trigger `Done` if `paged is less than `pages`
2261
+ if (alm.addons.woocommerce_settings.paged >= parseInt(alm.addons.woocommerce_settings.pages)) {
2262
+ alm.AjaxLoadMore.triggerDone();
2263
+ }
2264
+ }
2265
+
2266
+ // Elementor Add-on
2267
+ if (alm.addons.elementor && alm.addons.elementor_type && alm.addons.elementor_type === 'posts') {
2268
+ // Initiate Elementor
2269
+ elementorInit(alm);
2270
+
2271
+ // Trigger `Done` if `elementor_next_page_url` is empty
2272
+ if (alm.addons.elementor_next_page_url === '') {
2273
+ alm.AjaxLoadMore.triggerDone();
2274
+ }
2275
+ }
2276
+
2277
+ // Window Load (Masonry + Preloaded)
2278
+ alm.window.addEventListener('load', function () {
2279
+ if (alm.is_masonry_preloaded) {
2280
+ // Wrap almMasonry in anonymous async/await function
2281
+ (async function () {
2282
+ await almMasonry(alm, true, false);
2283
+ alm.masonry_init = false;
2284
+ })().catch((e) => {
2285
+ console.log('There was an error with ALM Masonry');
2286
+ });
2287
+ }
2288
+ if (typeof almOnLoad === 'function') {
2289
+ window.almOnLoad(alm);
2290
+ }
2291
+ });
2292
+ };
2293
+
2294
+ /**
2295
+ * Update current page - triggered from paging add-on.
2296
+ *
2297
+ * @since 2.7.0
2298
+ */
2299
+ window.almUpdateCurrentPage = function (current, obj, alm) {
2300
+ alm.page = current;
2301
+ alm.page = alm.addons.nextpage && !alm.addons.paging ? alm.page - 1 : alm.page; // Next Page add-on
2302
+
2303
+ let data = '';
2304
+ let target = '';
2305
+
2306
+ if (alm.addons.paging_init && alm.addons.preloaded === 'true') {
2307
+ // Paging + Preloaded Firstrun
2308
+ target = alm.listing.querySelector('.alm-reveal') || alm.listing.querySelector('.alm-nextpage');
2309
+ if (target) {
2310
+ data = target.innerHTML; // Get content
2311
+ target.parentNode.removeChild(target); // Remove target
2312
+ alm.addons.preloaded_amount = 0; // Reset preloaded
2313
+ alm.AjaxLoadMore.pagingPreloadedInit(data);
2314
+ }
2315
+ alm.addons.paging_init = false;
2316
+ alm.init = false;
2317
+ } else if (alm.addons.paging_init && alm.addons.nextpage) {
2318
+ // Paging + Next Page on firstrun
2319
+ target = alm.listing.querySelector('.alm-reveal') || alm.listing.querySelector('.alm-nextpage');
2320
+ if (target) {
2321
+ data = target.innerHTML; // Get content
2322
+ target.parentNode.removeChild(target); // Remove target
2323
+ alm.AjaxLoadMore.pagingNextpageInit(data);
2324
+ }
2325
+ alm.addons.paging_init = false;
2326
+ alm.init = false;
2327
+ } else {
2328
+ // Standard Paging
2329
+ alm.AjaxLoadMore.loadPosts();
2330
+ }
2331
+ };
2332
+
2333
+ /**
2334
+ * Get the parent ALM container.
2335
+ *
2336
+ * @since 2.7.0
2337
+ * @return element
2338
+ */
2339
+ window.almGetParentContainer = function () {
2340
+ return alm.listing;
2341
+ };
2342
+
2343
+ /**
2344
+ * Returns the current ALM obj.
2345
+ *
2346
+ * @param {string} specific obj
2347
+ * @since 2.7.0
2348
+ * @return object
2349
+ */
2350
+ window.almGetObj = function (obj = '') {
2351
+ if (obj !== '') {
2352
+ return alm[obj]; // Return specific param
2353
+ } else {
2354
+ return alm; // Return the entire alm object
2355
+ }
2356
+ };
2357
+
2358
+ /**
2359
+ * Trigger ajaxloadmore from any element on page.
2360
+ *
2361
+ * @since 2.12.0
2362
+ */
2363
+ window.almTriggerClick = function () {
2364
+ alm.button.click();
2365
+ };
2366
+
2367
+ // Flag to prevent loading of posts on initial page load.
2368
+ setTimeout(function () {
2369
+ alm.proceed = true;
2370
+ alm.AjaxLoadMore.scrollSetup();
2371
+ }, 500);
2372
+
2373
+ // Init Ajax Load More
2374
+ alm.AjaxLoadMore.init();
2375
+ };
2376
+
2377
+ // End ajaxloadmore
2378
+
2379
+ /**
2380
+ * Initiate instance of Ajax load More
2381
+ *
2382
+ * @since 5.0
2383
+ */
2384
+ window.almInit = function (el, id = 0) {
2385
+ new ajaxloadmore(el, id);
2386
+ };
2387
+
2388
+ /**
2389
+ * Initiate Ajax load More if div is present on screen
2390
+ *
2391
+ * @since 2.1.2
2392
+ */
2393
+ let alm_instances = document.querySelectorAll('.ajax-load-more-wrap');
2394
+ if (alm_instances.length) {
2395
+ [...alm_instances].forEach((alm, e) => {
2396
+ new ajaxloadmore(alm, e);
2397
+ });
2398
+ }
2399
+ })();
2400
+
2401
+ /**
2402
+ * Filter an Ajax Load More instance.
2403
+ *
2404
+ * @since 5.0
2405
+ * @param {*} transition
2406
+ * @param {*} speed
2407
+ * @param {*} data
2408
+ */
2409
+ let filter = function (transition = 'fade', speed = '200', data = '') {
2410
+ if (!transition || !speed || !data) {
2411
+ return false;
2412
+ }
2413
+ alm_is_filtering = true;
2414
+ almFilter(transition, speed, data, 'filter');
2415
+ };
2416
+ export { filter };
2417
+
2418
+ /**
2419
+ * Reset an Ajax Load More instance.
2420
+ *
2421
+ * @since 5.3.8
2422
+ * @param {*} target
2423
+ */
2424
+ let reset = function (props = {}) {
2425
+ let data = {};
2426
+ alm_is_filtering = true;
2427
+
2428
+ if (props && props.target) {
2429
+ data = {
2430
+ target: target,
2431
+ };
2432
+ }
2433
+
2434
+ if (props && props.type === 'woocommerce') {
2435
+ // WooCommerce
2436
+ (async function () {
2437
+ let instance = document.querySelector('.ajax-load-more-wrap .alm-listing[data-woo="true"]'); // Get ALM instance
2438
+ let settings = await wooReset(); // Get WooCommerce `settings` via Ajax
2439
+ if (settings) {
2440
+ instance.dataset.wooSettings = settings; // Update data atts
2441
+ almFilter('fade', '100', data, 'filter');
2442
+ }
2443
+ })().catch((e) => {
2444
+ console.log('There was an resetting the Ajax Load More instance.');
2445
+ });
2446
+ } else {
2447
+ // Standard ALM
2448
+ almFilter('fade', '200', data, 'filter');
2449
+ }
2450
+ };
2451
+ export { reset };
2452
+
2453
+ /**
2454
+ * Tabbed content for Ajax Load More instance.
2455
+ *
2456
+ * @since 5.2
2457
+ * @param {*} data
2458
+ * @param {*} url
2459
+ */
2460
+ let tab = function (data = '', url = false) {
2461
+ let transition = 'fade';
2462
+ let speed = alm_localize.speed ? parseInt(alm_localize.speed) : 200;
2463
+
2464
+ if (!data) {
2465
+ return false;
2466
+ }
2467
+
2468
+ alm_is_filtering = true;
2469
+ almFilter(transition, speed, data, 'tab');
2470
+ };
2471
+ export { tab };
2472
+
2473
+ /**
2474
+ * Track Page Views in Google Analytics.
2475
+ *
2476
+ * @since 5.0
2477
+ * @param {*} path
2478
+ */
2479
+ let tracking = function (path) {
2480
+ if (typeof gtag === 'function') {
2481
+ // Gtag GA Tracking
2482
+ gtag('event', 'page_view', {
2483
+ page_path: path,
2484
+ });
2485
+ if (alm_localize.ga_debug) {
2486
+ console.log('Pageview sent to Google Analytics (gtag)');
2487
+ }
2488
+ }
2489
+ if (typeof ga === 'function') {
2490
+ // Deprecated GA Tracking
2491
+ ga('send', 'pageview', path);
2492
+ if (alm_localize.ga_debug) {
2493
+ console.log('Pageview sent to Google Analytics (ga)');
2494
+ }
2495
+ }
2496
+ if (typeof __gaTracker === 'function') {
2497
+ // Monster Insights
2498
+ __gaTracker('send', 'pageview', path);
2499
+ if (alm_localize.ga_debug) {
2500
+ console.log('Pageview sent to Google Analytics (__gaTracker)');
2501
+ }
2502
+ }
2503
+
2504
+ // Dispatch global Analytics callback
2505
+ if (typeof almAnalytics === 'function') {
2506
+ window.almAnalytics(path);
2507
+ }
2508
+ };
2509
+ export { tracking };
2510
+
2511
+ /**
2512
+ * Trigger Ajax Load More from other events.
2513
+ *
2514
+ * @since 5.0
2515
+ * @param {*} el
2516
+ */
2517
+ let start = function (el) {
2518
+ if (!el) {
2519
+ return false;
2520
+ }
2521
+ window.almInit(el);
2522
+ };
2523
+ export { start };
2524
+
2525
+ /**
2526
+ * Scroll window to position (global function).
2527
+ *
2528
+ * @since 5.0
2529
+ * @param {*} position
2530
+ */
2531
+ let almScroll = function (position) {
2532
+ if (!position) {
2533
+ return false;
2534
+ }
2535
+ window.scrollTo({
2536
+ top: position,
2537
+ behavior: 'smooth',
2538
+ });
2539
+ };
2540
+ export { almScroll };
2541
+
2542
+ /**
2543
+ * Get the current top/left coordinates of an element relative to the document.
2544
+ *
2545
+ * @since 5.0
2546
+ * @param {*} el
2547
+ */
2548
+ let getOffset = function (el = null) {
2549
+ if (!el) {
2550
+ return false;
2551
+ }
2552
+ let rect = el.getBoundingClientRect(),
2553
+ scrollLeft = window.pageXOffset || document.documentElement.scrollLeft,
2554
+ scrollTop = window.pageYOffset || document.documentElement.scrollTop;
2555
+ return { top: rect.top + scrollTop, left: rect.left + scrollLeft };
2556
+ };
2557
+ export { getOffset };
2558
+
2559
+ /**
2560
+ * ALM Render (in progress)
2561
+ *
2562
+ * @since 5.0
2563
+ */
2564
+ let render = function (el, options = null) {
2565
+ if (!el) {
2566
+ return false;
2567
+ }
2568
+ // console.log(el, options);
2569
+ };
2570
+ export { render };
core/src/js/helpers/almAppendChild.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Append a child element to a container
3
+ *
4
+ * @param {*} target | Target element to append items
5
+ * @param {*} element | The element to append
6
+ * @param {*} transition | The transiton
7
+ * @since 5.0
8
+ */
9
+
10
+ let nodeNameArray = ['#text', '#comment'];
11
+
12
+ let almAppendChild = function( target = null, element = null, transition = 'fade' ) {
13
+ if(!target || !element){
14
+ return false;
15
+ }
16
+
17
+ // Do not append elements that are not actual element nodes (i.e. #text node)
18
+ // Add item if not in exclude array
19
+ if(nodeNameArray.indexOf(element.nodeName.toLowerCase()) === -1){
20
+ if(transition === 'masonry'){ // If Masonry, opacity = zero
21
+ element.style.opacity = 0;
22
+ }
23
+ target.appendChild(element);
24
+ }
25
+ };
26
+ export default almAppendChild;
core/src/js/helpers/almAppendChildren.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import almAppendChild from './almAppendChild';
2
+ /**
3
+ * Loop array of elements and append to target
4
+ *
5
+ * @param {*} target | Target element to append items
6
+ * @param {*} array | An array of elements
7
+ * @param {*} transition | The transiton
8
+ * @since 5.0
9
+ */
10
+
11
+ let almAppendChildren = function( target = null, array = null, transition = 'fade' ) {
12
+ if(!target || !array){
13
+ return false;
14
+ }
15
+ for (var i = 0; i < array.length; i++) {
16
+ let element = array[i];
17
+ almAppendChild(target, element, transition);
18
+ }
19
+ };
20
+ export default almAppendChildren;
core/src/js/helpers/almDomParser.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Convert a plain text string into an array of HTML nodes
3
+ *
4
+ * @param {*} html | The HTML string
5
+ * @param {*} type
6
+ * @return array
7
+ * @since 5.0
8
+ */
9
+ let almDomParser = function( html = '', type = 'text/html' ) {
10
+ if(!html){
11
+ return false;
12
+ }
13
+ let parser = new DOMParser();
14
+ let data = parser.parseFromString(html, type);
15
+ return (data) ? Array.prototype.slice.call(data.body.childNodes) : data;
16
+ };
17
+ export default almDomParser;
core/src/js/helpers/commentReplyFix.js ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * commentReplyFix
3
+ * Hotfix for Reply links not working in WordPress 5.1+
4
+ *
5
+ * @param comments string
6
+ * @param listing object
7
+ * @since 5.1
8
+ */
9
+ let commentReplyFix = function(comments = false, listing = null) {
10
+
11
+ if(comments !== 'true'){
12
+ // Exit if not comments
13
+ return false;
14
+ }
15
+
16
+ // Get all `Reply` links.
17
+ let replyLinks = listing.querySelectorAll('.comment-reply-link');
18
+ if(!replyLinks){
19
+ return false;
20
+ }
21
+ // Loop links
22
+ replyLinks.forEach(function(link){
23
+ // Add custom click handler
24
+ link.onclick = function(e) {
25
+ e.preventDefault();
26
+ let commId = link.dataset.belowelement,
27
+ parentId = link.dataset.commentid,
28
+ respondId = link.dataset.respondelement,
29
+ postId = link.dataset.postid,
30
+ follow;
31
+ if ( ! commId || ! parentId || ! respondId || ! postId ) {
32
+ /*
33
+ * Theme or plugin defines own link via custom `wp_list_comments()` callback
34
+ * and calls `moveForm()` either directly or via a custom event hook.
35
+ */
36
+ return;
37
+ }
38
+
39
+ // Move reply form
40
+ follow = window.addComment.moveForm(commId, parentId, respondId, postId);
41
+ if (false === follow) {
42
+ event.preventDefault();
43
+ }
44
+ };
45
+ });
46
+ };
47
+ export default commentReplyFix;
core/src/js/helpers/getCacheUrl.js ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { parseQuerystring } from '../addons/filters';
2
+
3
+ /**
4
+ * Generate the cache page URL for GET request
5
+ *
6
+ * @param {*} alm
7
+ * @since 5.0
8
+ * @supports Standard, SEO, Filters, Nextpage, Single Posts
9
+ */
10
+ let getCacheUrl = function (alm) {
11
+ if (!alm) {
12
+ return false;
13
+ }
14
+
15
+ let firstpage = '1';
16
+ let cache_url = '';
17
+ let ext = '.html';
18
+ let path = alm.addons.cache_path + alm.addons.cache_id;
19
+
20
+ // SEO Add-on
21
+ if (alm.init && alm.addons.seo && alm.isPaged) {
22
+ // If request is a paged URL (e.g. /page/3/)
23
+ cache_url = path + '/page-' + firstpage + '-' + alm.start_page + ext;
24
+ }
25
+
26
+ // Filters
27
+ else if (alm.addons.filters) {
28
+ let filtersPath = parseQuerystring(path);
29
+
30
+ if (alm.init && alm.isPaged) {
31
+ // First run & Paged
32
+ cache_url = filtersPath + '/page-' + firstpage + '-' + alm.addons.filters_startpage + ext;
33
+ } else {
34
+ let page = alm.page + 1;
35
+
36
+ if (alm.addons.preloaded === 'true') {
37
+ // Preloaded + Filters
38
+ page = alm.page + 2;
39
+ }
40
+ cache_url = filtersPath + '/page-' + page + ext;
41
+ }
42
+ }
43
+
44
+ // Nextpage
45
+ else if (alm.addons.nextpage) {
46
+ let nextpage_cache_url;
47
+ if (alm.addons.paging) {
48
+ nextpage_cache_url = parseInt(alm.page) + 1;
49
+ } else {
50
+ nextpage_cache_url = parseInt(alm.page) + 2;
51
+ if (alm.isPaged) {
52
+ // If the request a paged URL (/page/3/)
53
+ nextpage_cache_url = parseInt(alm.page) + parseInt(alm.addons.nextpage_startpage) + 1;
54
+ }
55
+ }
56
+
57
+ cache_url = path + '/page-' + nextpage_cache_url + ext;
58
+ }
59
+
60
+ // Single Post
61
+ else if (alm.addons.single_post) {
62
+ cache_url = path + '/' + alm.addons.single_post_id + ext;
63
+ }
64
+
65
+ // Comments & Preloaded
66
+ else if (alm.addons.comments === 'true' && alm.addons.preloaded === 'true') {
67
+ // When using comments we need to increase the current page by 2
68
+ cache_url = path + '/page-' + (alm.page + 2) + ext;
69
+ }
70
+
71
+ // Standard URL request
72
+ else {
73
+ cache_url = path + '/page-' + (alm.page + 1) + ext;
74
+ }
75
+
76
+ return cache_url;
77
+ };
78
+
79
+ export default getCacheUrl;
core/src/js/helpers/getParameterByName.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ let getParameterByName = function( name, url ) {
2
+ if (!url) url = window.location.href;
3
+ name = name.replace(/[\[\]]/g, "\\$&");
4
+ var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
5
+ results = regex.exec(url);
6
+ if (!results) return null;
7
+ if (!results[2]) return '';
8
+ return decodeURIComponent(results[2].replace(/\+/g, " "));
9
+ };
10
+ export default getParameterByName;
core/src/js/helpers/getQueryVariable.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Get a query variable from location querystring
3
+ *
4
+ * @param {String} variable
5
+ * @since 5.3.4
6
+ */
7
+ const getQueryVariable = function (variable) {
8
+ var query = window.location.search.substring(1);
9
+ var vars = query.split("&");
10
+ for (var i = 0; i < vars.length; i++) {
11
+ var pair = vars[i].split("=");
12
+ if (decodeURIComponent(pair[0]) == variable) {
13
+ return decodeURIComponent(pair[1]);
14
+ }
15
+ }
16
+ return false;
17
+ };
18
+
19
+ export default getQueryVariable;
core/src/js/helpers/helpers.js ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Prevent native browser scrolling on popstate
2
+ // https://developer.mozilla.org/en-US/docs/Web/API/History#Browser_compatibility
3
+ if ('scrollRestoration' in history) {
4
+ //history.scrollRestoration = 'manual';
5
+ }
6
+
7
+
8
+ // Object.entries
9
+ if (!Object.entries){
10
+ Object.entries = function( obj ){
11
+ var ownProps = Object.keys( obj ),
12
+ i = ownProps.length,
13
+ resArray = new Array(i); // preallocate the Array
14
+ while (i--)
15
+ resArray[i] = [ownProps[i], obj[ownProps[i]]];
16
+
17
+ return resArray;
18
+ };
19
+ }
20
+
21
+
22
+ // isArray
23
+ if (typeof Array.isArray === 'undefined') {
24
+ Array.isArray = function(obj) {
25
+ return Object.prototype.toString.call(obj) === '[object Array]';
26
+ }
27
+ };
28
+
29
+
30
+ // Array.from
31
+ if (!Array.from) {
32
+ Array.from = (function () {
33
+ var toStr = Object.prototype.toString;
34
+ var isCallable = function (fn) {
35
+ return typeof fn === 'function' || toStr.call(fn) === '[object Function]';
36
+ };
37
+ var toInteger = function (value) {
38
+ var number = Number(value);
39
+ if (isNaN(number)) { return 0; }
40
+ if (number === 0 || !isFinite(number)) { return number; }
41
+ return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));
42
+ };
43
+ var maxSafeInteger = Math.pow(2, 53) - 1;
44
+ var toLength = function (value) {
45
+ var len = toInteger(value);
46
+ return Math.min(Math.max(len, 0), maxSafeInteger);
47
+ };
48
+
49
+ // The length property of the from method is 1.
50
+ return function from(arrayLike/*, mapFn, thisArg */) {
51
+ // 1. Let C be the this value.
52
+ var C = this;
53
+
54
+ // 2. Let items be ToObject(arrayLike).
55
+ var items = Object(arrayLike);
56
+
57
+ // 3. ReturnIfAbrupt(items).
58
+ if (arrayLike == null) {
59
+ throw new TypeError('Array.from requires an array-like object - not null or undefined');
60
+ }
61
+
62
+ // 4. If mapfn is undefined, then let mapping be false.
63
+ var mapFn = arguments.length > 1 ? arguments[1] : void undefined;
64
+ var T;
65
+ if (typeof mapFn !== 'undefined') {
66
+ // 5. else
67
+ // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.
68
+ if (!isCallable(mapFn)) {
69
+ throw new TypeError('Array.from: when provided, the second argument must be a function');
70
+ }
71
+
72
+ // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.
73
+ if (arguments.length > 2) {
74
+ T = arguments[2];
75
+ }
76
+ }
77
+
78
+ // 10. Let lenValue be Get(items, "length").
79
+ // 11. Let len be ToLength(lenValue).
80
+ var len = toLength(items.length);
81
+
82
+ // 13. If IsConstructor(C) is true, then
83
+ // 13. a. Let A be the result of calling the [[Construct]] internal method
84
+ // of C with an argument list containing the single item len.
85
+ // 14. a. Else, Let A be ArrayCreate(len).
86
+ var A = isCallable(C) ? Object(new C(len)) : new Array(len);
87
+
88
+ // 16. Let k be 0.
89
+ var k = 0;
90
+ // 17. Repeat, while k < len… (also steps a - h)
91
+ var kValue;
92
+ while (k < len) {
93
+ kValue = items[k];
94
+ if (mapFn) {
95
+ A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);
96
+ } else {
97
+ A[k] = kValue;
98
+ }
99
+ k += 1;
100
+ }
101
+ // 18. Let putStatus be Put(A, "length", len, true).
102
+ A.length = len;
103
+ // 20. Return A.
104
+ return A;
105
+ };
106
+ }());
107
+ }
108
+
109
+
110
+ // Nodelist
111
+ if (window.NodeList && !NodeList.prototype.forEach) {
112
+ NodeList.prototype.forEach = function (callback, thisArg) {
113
+ thisArg = thisArg || window;
114
+ for (var i = 0; i < this.length; i++) {
115
+ callback.call(thisArg, this[i], i, this);
116
+ }
117
+ };
118
+ }
119
+
120
+
121
+ // removeChild
122
+ // https://github.com/jserz/js_piece/blob/master/DOM/ChildNode/remove()/remove().md
123
+ (function (arr) {
124
+ arr.forEach(function (item) {
125
+ if (item.hasOwnProperty('remove')) {
126
+ return;
127
+ }
128
+ Object.defineProperty(item, 'remove', {
129
+ configurable: true,
130
+ enumerable: true,
131
+ writable: true,
132
+ value: function remove() {
133
+ if (this.parentNode !== null)
134
+ this.parentNode.removeChild(this);
135
+ }
136
+ });
137
+ });
138
+ })([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
core/src/js/helpers/polyfills.js ADDED
@@ -0,0 +1,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Add dataset support to elements
3
+ * No globals, no overriding prototype with non-standard methods,
4
+ * handles CamelCase properly, attempts to use standard
5
+ * Object.defineProperty() (and Function bind()) methods,
6
+ * falls back to native implementation when existing
7
+ * Inspired by http://code.eligrey.com/html5/dataset/
8
+ * (via https://github.com/adalgiso/html5-dataset/blob/master/html5-dataset.js )
9
+ * Depends on Function.bind and Object.defineProperty/Object.getOwnPropertyDescriptor (polyfills below)
10
+ * All code below is Licensed under the X11/MIT License
11
+ */
12
+ if (!Function.prototype.bind) {
13
+ Function.prototype.bind = function (oThis) {
14
+ 'use strict';
15
+ if (typeof this !== "function") {
16
+ // closest thing possible to the ECMAScript 5 internal IsCallable function
17
+ throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
18
+ }
19
+
20
+ var aArgs = Array.prototype.slice.call(arguments, 1),
21
+ fToBind = this,
22
+ FNOP = function () {},
23
+ fBound = function () {
24
+ return fToBind.apply(
25
+ this instanceof FNOP && oThis ? this : oThis,
26
+ aArgs.concat(Array.prototype.slice.call(arguments))
27
+ );
28
+ };
29
+
30
+ FNOP.prototype = this.prototype;
31
+ fBound.prototype = new FNOP();
32
+
33
+ return fBound;
34
+ };
35
+ }
36
+
37
+ /*
38
+ * Xccessors Standard: Cross-browser ECMAScript 5 accessors
39
+ * http://purl.eligrey.com/github/Xccessors
40
+ *
41
+ * 2010-06-21
42
+ *
43
+ * By Eli Grey, http://eligrey.com
44
+ *
45
+ * A shim that partially implements Object.defineProperty,
46
+ * Object.getOwnPropertyDescriptor, and Object.defineProperties in browsers that have
47
+ * legacy __(define|lookup)[GS]etter__ support.
48
+ *
49
+ * Licensed under the X11/MIT License
50
+ * See LICENSE.md
51
+ */
52
+
53
+ (function () {
54
+ 'use strict';
55
+ var ObjectProto = Object.prototype,
56
+ defineGetter = ObjectProto.__defineGetter__,
57
+ defineSetter = ObjectProto.__defineSetter__,
58
+ lookupGetter = ObjectProto.__lookupGetter__,
59
+ lookupSetter = ObjectProto.__lookupSetter__,
60
+ hasOwnProp = ObjectProto.hasOwnProperty;
61
+
62
+ if (defineGetter && defineSetter && lookupGetter && lookupSetter) {
63
+
64
+ if (!Object.defineProperty) {
65
+ Object.defineProperty = function (obj, prop, descriptor) {
66
+ if (arguments.length < 3) { // all arguments required
67
+ throw new TypeError("Arguments not optional");
68
+ }
69
+
70
+ prop += ""; // convert prop to string
71
+
72
+ if (hasOwnProp.call(descriptor, "value")) {
73
+ if (!lookupGetter.call(obj, prop) && !lookupSetter.call(obj, prop)) {
74
+ // data property defined and no pre-existing accessors
75
+ obj[prop] = descriptor.value;
76
+ }
77
+
78
+ if ((hasOwnProp.call(descriptor, "get") ||
79
+ hasOwnProp.call(descriptor, "set")))
80
+ {
81
+ // descriptor has a value prop but accessor already exists
82
+ throw new TypeError("Cannot specify an accessor and a value");
83
+ }
84
+ }
85
+
86
+ // can't switch off these features in ECMAScript 3
87
+ // so throw a TypeError if any are false
88
+ if (!(descriptor.writable && descriptor.enumerable &&
89
+ descriptor.configurable))
90
+ {
91
+ throw new TypeError(
92
+ "This implementation of Object.defineProperty does not support" +
93
+ " false for configurable, enumerable, or writable."
94
+ );
95
+ }
96
+
97
+ if (descriptor.get) {
98
+ defineGetter.call(obj, prop, descriptor.get);
99
+ }
100
+ if (descriptor.set) {
101
+ defineSetter.call(obj, prop, descriptor.set);
102
+ }
103
+
104
+ return obj;
105
+ };
106
+ }
107
+
108
+ if (!Object.getOwnPropertyDescriptor) {
109
+ Object.getOwnPropertyDescriptor = function (obj, prop) {
110
+ if (arguments.length < 2) { // all arguments required
111
+ throw new TypeError("Arguments not optional.");
112
+ }
113
+
114
+ prop += ""; // convert prop to string
115
+
116
+ var descriptor = {
117
+ configurable: true,
118
+ enumerable : true,
119
+ writable : true
120
+ },
121
+ getter = lookupGetter.call(obj, prop),
122
+ setter = lookupSetter.call(obj, prop);
123
+
124
+ if (!hasOwnProp.call(obj, prop)) {
125
+ // property doesn't exist or is inherited
126
+ return descriptor;
127
+ }
128
+ if (!getter && !setter) { // not an accessor so return prop
129
+ descriptor.value = obj[prop];
130
+ return descriptor;
131
+ }
132
+
133
+ // there is an accessor, remove descriptor.writable;
134
+ // populate descriptor.get and descriptor.set (IE's behavior)
135
+ delete descriptor.writable;
136
+ descriptor.get = descriptor.set = undefined;
137
+
138
+ if (getter) {
139
+ descriptor.get = getter;
140
+ }
141
+ if (setter) {
142
+ descriptor.set = setter;
143
+ }
144
+
145
+ return descriptor;
146
+ };
147
+ }
148
+
149
+ if (!Object.defineProperties) {
150
+ Object.defineProperties = function (obj, props) {
151
+ var prop;
152
+ for (prop in props) {
153
+ if (hasOwnProp.call(props, prop)) {
154
+ Object.defineProperty(obj, prop, props[prop]);
155
+ }
156
+ }
157
+ };
158
+ }
159
+ }
160
+ }());
161
+
162
+ // Begin dataset code
163
+
164
+ if (!document.documentElement.dataset &&
165
+ // FF is empty while IE gives empty object
166
+ (!Object.getOwnPropertyDescriptor(Element.prototype, 'dataset') ||
167
+ !Object.getOwnPropertyDescriptor(Element.prototype, 'dataset').get)
168
+ ) {
169
+ var propDescriptor = {
170
+ enumerable: true,
171
+ get: function () {
172
+ 'use strict';
173
+ var i,
174
+ that = this,
175
+ HTML5_DOMStringMap,
176
+ attrVal, attrName, propName,
177
+ attribute,
178
+ attributes = this.attributes,
179
+ attsLength = attributes.length,
180
+ toUpperCase = function (n0) {
181
+ return n0.charAt(1).toUpperCase();
182
+ },
183
+ getter = function () {
184
+ return this;
185
+ },
186
+ setter = function (attrName, value) {
187
+ return (typeof value !== 'undefined') ?
188
+ this.setAttribute(attrName, value) :
189
+ this.removeAttribute(attrName);
190
+ };
191
+ try { // Simulate DOMStringMap w/accessor support
192
+ // Test setting accessor on normal object
193
+ ({}).__defineGetter__('test', function () {});
194
+ HTML5_DOMStringMap = {};
195
+ }
196
+ catch (e1) { // Use a DOM object for IE8
197
+ HTML5_DOMStringMap = document.createElement('div');
198
+ }
199
+ for (i = 0; i < attsLength; i++) {
200
+ attribute = attributes[i];
201
+ // Fix: This test really should allow any XML Name without
202
+ // colons (and non-uppercase for XHTML)
203
+ if (attribute && attribute.name &&
204
+ (/^data-\w[\w\-]*$/).test(attribute.name)) {
205
+ attrVal = attribute.value;
206
+ attrName = attribute.name;
207
+ // Change to CamelCase
208
+ propName = attrName.substr(5).replace(/-./g, toUpperCase);
209
+ try {
210
+ Object.defineProperty(HTML5_DOMStringMap, propName, {
211
+ enumerable: this.enumerable,
212
+ get: getter.bind(attrVal || ''),
213
+ set: setter.bind(that, attrName)
214
+ });
215
+ }
216
+ catch (e2) { // if accessors are not working
217
+ HTML5_DOMStringMap[propName] = attrVal;
218
+ }
219
+ }
220
+ }
221
+ return HTML5_DOMStringMap;
222
+ }
223
+ };
224
+ try {
225
+ // FF enumerates over element's dataset, but not
226
+ // Element.prototype.dataset; IE9 iterates over both
227
+ Object.defineProperty(Element.prototype, 'dataset', propDescriptor);
228
+ } catch (e) {
229
+ propDescriptor.enumerable = false; // IE8 does not allow setting to true
230
+ Object.defineProperty(Element.prototype, 'dataset', propDescriptor);
231
+ }
232
+ }
core/src/js/helpers/queryParams.js ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * almGetAjaxParams
3
+ * Build the data object to send with the Ajax request
4
+ *
5
+ * @param alm object
6
+ * @param action string
7
+ * @param queryType string
8
+ * @since 3.6
9
+ */
10
+
11
+ export function almGetAjaxParams(alm, action, queryType) {
12
+ // Defaults
13
+ let data = {
14
+ id: alm.id,
15
+ post_id: alm.post_id,
16
+ slug: alm.slug,
17
+ canonical_url: encodeURIComponent(alm.canonical_url),
18
+ posts_per_page: alm.posts_per_page,
19
+ page: alm.page,
20
+ offset: alm.offset,
21
+ post_type: alm.post_type,
22
+ repeater: alm.repeater,
23
+ seo_start_page: alm.start_page,
24
+ };
25
+
26
+ // Addons & Extensions
27
+
28
+ if (alm.theme_repeater) {
29
+ data.theme_repeater = alm.theme_repeater;
30
+ }
31
+ if (alm.addons.filters) {
32
+ data.filters = alm.addons.filters;
33
+ data.filters_startpage = alm.addons.filters_startpage;
34
+ }
35
+ if (alm.addons.paging) {
36
+ data.paging = alm.addons.paging;
37
+ }
38
+ if (alm.addons.preloaded) {
39
+ data.preloaded = alm.addons.preloaded;
40
+ data.preloaded_amount = alm.addons.preloaded_amount;
41
+ }
42
+ if (alm.addons.cache === 'true') {
43
+ data.cache_id = alm.addons.cache_id;
44
+ data.cache_logged_in = alm.addons.cache_logged_in;
45
+ }
46
+ if (alm.acf_array) {
47
+ data.acf = alm.acf_array;
48
+ }
49
+ if (alm.term_query_array) {
50
+ data.term_query = alm.term_query_array;
51
+ }
52
+ if (alm.cta_array) {
53
+ data.cta = alm.cta_array;
54
+ }
55
+ if (alm.comments_array) {
56
+ data.comments = alm.comments_array;
57
+ }
58
+ if (alm.nextpage_array) {
59
+ data.nextpage = alm.nextpage_array;
60
+ }
61
+ if (alm.single_post_array) {
62
+ data.single_post = alm.single_post_array;
63
+ }
64
+ if (alm.users_array) {
65
+ data.users = alm.users_array;
66
+ }
67
+
68
+ // Query data
69
+ if (alm.listing.dataset.lang) {
70
+ data.lang = alm.listing.dataset.lang;
71
+ }
72
+ if (alm.listing.dataset.stickyPosts) {
73
+ data.sticky_posts = alm.listing.dataset.stickyPosts;
74
+ }
75
+ if (alm.listing.dataset.postFormat) {
76
+ data.post_format = alm.listing.dataset.postFormat;
77
+ }
78
+ if (alm.listing.dataset.category) {
79
+ data.category = alm.listing.dataset.category;
80
+ }
81
+ if (alm.listing.dataset.categoryAnd) {
82
+ data.category__and = alm.listing.dataset.categoryAnd;
83
+ }
84
+ if (alm.listing.dataset.categoryNotIn) {
85
+ data.category__not_in = alm.listing.dataset.categoryNotIn;
86
+ }
87
+ if (alm.listing.dataset.tag) {
88
+ data.tag = alm.listing.dataset.tag;
89
+ }
90
+ if (alm.listing.dataset.tagAnd) {
91
+ data.tag__and = alm.listing.dataset.tagAnd;
92
+ }
93
+ if (alm.listing.dataset.tagNotIn) {
94
+ data.tag__not_in = alm.listing.dataset.tagNotIn;
95
+ }
96
+ if (alm.listing.dataset.taxonomy) {
97
+ data.taxonomy = alm.listing.dataset.taxonomy;
98
+ }
99
+ if (alm.listing.dataset.taxonomyTerms) {
100
+ data.taxonomy_terms = alm.listing.dataset.taxonomyTerms;
101
+ }
102
+ if (alm.listing.dataset.taxonomyOperator) {
103
+ data.taxonomy_operator = alm.listing.dataset.taxonomyOperator;
104
+ }
105
+ if (alm.listing.dataset.taxonomyRelation) {
106
+ data.taxonomy_relation = alm.listing.dataset.taxonomyRelation;
107
+ }
108
+ if (alm.listing.dataset.metaKey) {
109
+ data.meta_key = alm.listing.dataset.metaKey;
110
+ }
111
+ if (alm.listing.dataset.metaValue) {
112
+ data.meta_value = alm.listing.dataset.metaValue;
113
+ }
114
+ if (alm.listing.dataset.metaCompare) {
115
+ data.meta_compare = alm.listing.dataset.metaCompare;
116
+ }
117
+ if (alm.listing.dataset.metaRelation) {
118
+ data.meta_relation = alm.listing.dataset.metaRelation;
119
+ }
120
+ if (alm.listing.dataset.metaType) {
121
+ data.meta_type = alm.listing.dataset.metaType;
122
+ }
123
+ if (alm.listing.dataset.author) {
124
+ data.author = alm.listing.dataset.author;
125
+ }
126
+ if (alm.listing.dataset.year) {
127
+ data.year = alm.listing.dataset.year;
128
+ }
129
+ if (alm.listing.dataset.month) {
130
+ data.month = alm.listing.dataset.month;
131
+ }
132
+ if (alm.listing.dataset.day) {
133
+ data.day = alm.listing.dataset.day;
134
+ }
135
+ if (alm.listing.dataset.order) {
136
+ data.order = alm.listing.dataset.order;
137
+ }
138
+ if (alm.listing.dataset.orderby) {
139
+ data.orderby = alm.listing.dataset.orderby;
140
+ }
141
+ if (alm.listing.dataset.postStatus) {
142
+ data.post_status = alm.listing.dataset.postStatus;
143
+ }
144
+ if (alm.listing.dataset.postIn) {
145
+ data.post__in = alm.listing.dataset.postIn;
146
+ }
147
+ if (alm.listing.dataset.postNotIn) {
148
+ data.post__not_in = alm.listing.dataset.postNotIn;
149
+ }
150
+ if (alm.listing.dataset.exclude) {
151
+ data.exclude = alm.listing.dataset.exclude;
152
+ }
153
+ if (alm.listing.dataset.search) {
154
+ data.search = alm.listing.dataset.search;
155
+ }
156
+ if (alm.listing.dataset.s) {
157
+ data.search = alm.listing.dataset.s;
158
+ }
159
+ if (alm.listing.dataset.customArgs) {
160
+ data.custom_args = escape(alm.listing.dataset.customArgs);
161
+ }
162
+ if (alm.listing.dataset.vars) {
163
+ data.vars = escape(alm.listing.dataset.vars);
164
+ }
165
+
166
+ data.action = action;
167
+ data.query_type = queryType;
168
+
169
+ return data;
170
+ }
171
+
172
+ /**
173
+ * almGetRestParams
174
+ * Build the REST API data object to send with REST API request
175
+ *
176
+ * @param alm object
177
+ * @since 3.6
178
+ */
179
+ export function almGetRestParams(alm) {
180
+ let data = {
181
+ id: alm.id,
182
+ post_id: alm.post_id,
183
+ posts_per_page: alm.posts_per_page,
184
+ page: alm.page,
185
+ offset: alm.offset,
186
+ slug: alm.slug,
187
+ canonical_url: encodeURIComponent(alm.canonical_url),
188
+ post_type: alm.post_type,
189
+ post_format: alm.listing.dataset.postFormat,
190
+ category: alm.listing.dataset.category,
191
+ category__not_in: alm.listing.dataset.categoryNotIn,
192
+ tag: alm.listing.dataset.tag,
193
+ tag__not_in: alm.listing.dataset.tagNotIn,
194
+ taxonomy: alm.listing.dataset.taxonomy,
195
+ taxonomy_terms: alm.listing.dataset.taxonomyTerms,
196
+ taxonomy_operator: alm.listing.dataset.taxonomyOperator,
197
+ taxonomy_relation: alm.listing.dataset.taxonomyRelation,
198
+ meta_key: alm.listing.dataset.metaKey,
199
+ meta_value: alm.listing.dataset.metaValue,
200
+ meta_compare: alm.listing.dataset.metaCompare,
201
+ meta_relation: alm.listing.dataset.metaRelation,
202
+ meta_type: alm.listing.dataset.metaType,
203
+ author: alm.listing.dataset.author,
204
+ year: alm.listing.dataset.year,
205
+ month: alm.listing.dataset.month,
206
+ day: alm.listing.dataset.day,
207
+ post_status: alm.listing.dataset.postStatus,
208
+ order: alm.listing.dataset.order,
209
+ orderby: alm.listing.dataset.orderby,
210
+ post__in: alm.listing.dataset.postIn,
211
+ post__not_in: alm.listing.dataset.postNotIn,
212
+ search: alm.listing.dataset.search,
213
+ s: alm.listing.dataset.s,
214
+ custom_args: alm.listing.dataset.customArgs,
215
+ vars: alm.listing.dataset.vars,
216
+ lang: alm.lang,
217
+ preloaded: alm.addons.preloaded,
218
+ preloaded_amount: alm.addons.preloaded_amount,
219
+ seo_start_page: alm.start_page,
220
+ };
221
+
222
+ return data;
223
+ }
core/src/js/helpers/srcsetPolyfill.js ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * srcsetPolyfill
3
+ * A Safari srcset polyfill to get Masonry and ImagesLoaded working
4
+ *
5
+ * @param {*} container Element
6
+ * @param {*} ua String
7
+ * @since 5.0.2
8
+ */
9
+ let srcsetPolyfill = (container = null, ua = '') => {
10
+
11
+ // Exit if no container
12
+ if( !container ){
13
+ return false;
14
+ }
15
+
16
+ // Exit if useragent is Chrome, Safari or Windows
17
+ if( (ua.indexOf('Safari') > -1 && ua.indexOf('Chrome') != -1) || (ua.indexOf('Firefox') > -1) || (ua.indexOf('Windows') > -1) ){
18
+ return false;
19
+ }
20
+
21
+ // Get the images
22
+ let imgs = container.querySelectorAll('img[srcset]:not(.alm-loaded)');
23
+
24
+ // Loop images
25
+ for ( var i=0; i < imgs.length; i++ ) {
26
+ let img = imgs[i];
27
+ img.classList.add('alm-loaded');
28
+ img.outerHTML = img.outerHTML;
29
+ }
30
+ }
31
+ export default srcsetPolyfill;
core/src/js/helpers/stripEmptyNodes.js ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Remove empty HTML nodes from array of nodes
3
+ * Remove all empty text nodes from SEO and Filters return
4
+ *
5
+ * @param {*} nodes | Array of HTML nodes
6
+ * @return array
7
+ * @since 5.1.3
8
+ */
9
+ let stripEmptyNodes = function( nodes = '' ) {
10
+ if(!nodes){
11
+ return false;
12
+ }
13
+
14
+ // Exclude these nodeNames from being rendered
15
+ let nodeNameArray = ['#text', '#comment'];
16
+
17
+ // Filter data by nodeName
18
+ let results = nodes.filter(node => (nodeNameArray.indexOf(node.nodeName.toLowerCase()) === -1) );
19
+
20
+ // Send the results
21
+ return results;
22
+
23
+ };
24
+ export default stripEmptyNodes;
core/src/js/helpers/tableWrap.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Wrap `table` containers in tbody elements
3
+ * innerHTML and DOMParser do not work with <tr/> <td/> elements etc.
4
+ *
5
+ * @param {*} html | Plain text
6
+ * @since 5.0
7
+ */
8
+ let tableWrap = function( html = null ) {
9
+ if(!html){
10
+ return false;
11
+ }
12
+ let table_reveal = document.createElement('tbody');
13
+ table_reveal.innerHTML = html;
14
+ let table_reveal_array = [table_reveal];
15
+ return table_reveal_array; // Return new array
16
+ };
17
+ export default tableWrap;
core/src/js/modules/almDebug.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Display alm_debug results
3
+ * https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/#alm_debug
4
+ *
5
+ * @param {object} alm Global alm object
6
+ * @since 5.1.6
7
+ */
8
+
9
+ let almDebug = function(alm){
10
+ if(alm && alm.debug){
11
+ let obj = {
12
+ 'query' : alm.debug,
13
+ 'localize' : alm.localize
14
+ }
15
+ console.log('ALM Debug:', obj);
16
+ }
17
+ }
18
+
19
+ export default almDebug;
core/src/js/modules/fadeIn.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Fade element in
3
+ * @param {*} element
4
+ * @param {*} speed
5
+ */
6
+ let almFadeIn = (element, speed) => {
7
+ if(speed == 0){
8
+ element.style.opacity = 1;
9
+ element.style.height = 'auto';
10
+
11
+ } else {
12
+ speed = speed/10;
13
+ let op = 0; // initial opacity
14
+ let timer = setInterval(function () {
15
+ if (op > 0.9){
16
+ element.style.opacity = 1;
17
+ clearInterval(timer);
18
+ }
19
+ element.style.opacity = op;
20
+ op += 0.1;
21
+ }, speed);
22
+ element.style.height = 'auto';
23
+ }
24
+ }
25
+ export default almFadeIn;
core/src/js/modules/fadeOut.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Fade element out
3
+ * @param {*} element
4
+ * @param {*} speed
5
+ */
6
+ let almFadeOut = (element, speed) => {
7
+ speed = speed/10;
8
+ element.style.opacity = 0.5;
9
+ let fadeEffect = setInterval(function () {
10
+ if (element.style.opacity < 0.1) {
11
+ clearInterval(fadeEffect);
12
+ } else {
13
+ element.style.opacity -= 0.1;
14
+ }
15
+ }, speed);
16
+ }
17
+ export default almFadeOut;
core/src/js/modules/filtering.js ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import almFadeIn from './fadeIn';
2
+ import almFadeOut from './fadeOut';
3
+ import { clearTOC } from './tableofcontents';
4
+
5
+ /**
6
+ * almFilter(type, speed, data)
7
+ * Filter Ajax Load More
8
+ *
9
+ * @param {*} transition string;
10
+ * @param {*} speed number;
11
+ * @param {*} data obj;
12
+ * @param {*} type string;
13
+ * @since 2.6.1
14
+ */
15
+
16
+ let almFilter = function (transition, speed, data, type = 'filter') {
17
+ if (data.target) {
18
+ // if a target has been specified
19
+ let target = document.querySelectorAll(
20
+ '.ajax-load-more-wrap[data-id="' + data.target + '"]'
21
+ );
22
+ target.forEach(function (element) {
23
+ almFilterTransition(transition, speed, data, element, type);
24
+ });
25
+ } else {
26
+ // Target not specified
27
+ let alm = document.querySelectorAll('.ajax-load-more-wrap');
28
+ alm.forEach(function (element) {
29
+ almFilterTransition(transition, speed, data, element, type);
30
+ });
31
+ }
32
+
33
+ // Clear table of contents if required
34
+ clearTOC();
35
+ };
36
+ export default almFilter;
37
+
38
+ /**
39
+ * almFilterTransition(transition, speed, data, el)
40
+ * Transition Ajax Load More
41
+ *
42
+ * @param {*} transition string;
43
+ * @param {*} speed number;
44
+ * @param {*} data obj;
45
+ * @param {*} el element;
46
+ * @param {*} type string;
47
+ * @since 2.13.1
48
+ */
49
+ let almFilterTransition = function (transition, speed, data, el, type) {
50
+ if (transition === 'fade' || transition === 'masonry') {
51
+ // Fade, Masonry transition
52
+
53
+ switch (type) {
54
+ case 'filter':
55
+ el.classList.add('alm-is-filtering');
56
+ almFadeOut(el, speed);
57
+
58
+ break;
59
+
60
+ case 'tab':
61
+ el.classList.add('alm-loading');
62
+ let new_el = el.querySelector('.alm-listing');
63
+ el.style.height = new_el.offsetHeight + 'px';
64
+ almFadeOut(new_el, speed);
65
+
66
+ break;
67
+ }
68
+
69
+ // Move to next function
70
+ setTimeout(function () {
71
+ almCompleteFilterTransition(speed, data, el, type);
72
+ }, speed);
73
+ } else {
74
+ // No transition
75
+ el.classList.add('alm-is-filtering');
76
+ almCompleteFilterTransition(speed, data, el, type);
77
+ }
78
+ };
79
+
80
+ /**
81
+ * almCompleteFilterTransition
82
+ * Complete the filter transition
83
+ *
84
+ * @param {*} speed number;
85
+ * @param {*} data obj;
86
+ * @param {*} el element;
87
+ * @param {*} type string;
88
+ * @since 3.3
89
+ */
90
+ let almCompleteFilterTransition = (speed, data, el, type) => {
91
+ // Get `.alm-btn-wrap` element
92
+ let btnWrap = el.querySelector('.alm-btn-wrap');
93
+
94
+ // Get `.alm-listing` element
95
+ let listing = el.querySelectorAll('.alm-listing');
96
+
97
+ // Loop over all .alm-listing divs
98
+ [...listing].forEach(function (e) {
99
+ e.innerHTML = ''; // Clear listings
100
+ });
101
+
102
+ // Get Load More button
103
+ let button = btnWrap.querySelector('.alm-load-more-btn');
104
+ if (button) {
105
+ button.classList.remove('done'); // Reset Button
106
+ }
107
+
108
+ // Clear paging navigation
109
+ let paging = btnWrap.querySelector('.alm-paging');
110
+ if (paging) {
111
+ paging.style.opacity = 0;
112
+ }
113
+
114
+ // Reset Preloaded Amount
115
+ data.preloadedAmount = 0;
116
+ // Dispatch Filters
117
+ almSetFilters(speed, data, el, type);
118
+ };
119
+
120
+ /**
121
+ * almSetFilters
122
+ * Set filter parameters on .alm-listing element
123
+ *
124
+ * @param {*} speed number;
125
+ * @param {*} el element;
126
+ * @param {*} data string;
127
+ * @param {*} type string;
128
+ * @updated 3.3
129
+ * @since 2.6.1
130
+ */
131
+ let almSetFilters = function (speed = 250, data, el, type) {
132
+ // Get `alm-listing` container
133
+ let listing =
134
+ el.querySelector('.alm-listing') || el.querySelector('.alm-comments');
135
+ if (!listing) {
136
+ return false;
137
+ }
138
+
139
+ switch (type) {
140
+ case 'filter':
141
+ // Update data attributes
142
+ for (let [key, value] of Object.entries(data)) {
143
+ // Convert camelCase data atts back to dashes (-).
144
+ key = key
145
+ .replace(/\W+/g, '-')
146
+ .replace(/([a-z\d])([A-Z])/g, '$1-$2')
147
+ .toLowerCase();
148
+ listing.setAttribute('data-' + key, value);
149
+ }
150
+ // Fade ALM back (Filters only)
151
+ almFadeIn(el, speed);
152
+ break;
153
+
154
+ case 'tab':
155
+ // Update `data-tab-template` attribute
156
+ listing.setAttribute('data-preloaded', 'false');
157
+ listing.setAttribute('data-pause', 'false');
158
+ listing.setAttribute('data-tab-template', data.tabTemplate);
159
+
160
+ break;
161
+ }
162
+
163
+ // Re-initiate Ajax Load More
164
+ let target = '';
165
+ if (data.target) {
166
+ // Target has been specified
167
+ target = document.querySelector(
168
+ '.ajax-load-more-wrap[data-id="' + data.target + '"]'
169
+ );
170
+ if (target) {
171
+ window.almInit(target);
172
+ }
173
+ } else {
174
+ // Target not specified
175
+ target = document.querySelector('.ajax-load-more-wrap');
176
+ if (target) {
177
+ window.almInit(target);
178
+ }
179
+ }
180
+
181
+ switch (type) {
182
+ case 'filter':
183
+ // Filters Complete (not the add-on)
184
+ if (typeof almFilterComplete === 'function') {
185
+ // Standard Filtering
186
+ almFilterComplete();
187
+ }
188
+ break;
189
+
190
+ case 'tab':
191
+ // Tabs Complete
192
+ if (typeof almTabsComplete === 'function') {
193
+ // Standard Filtering
194
+ almTabsComplete();
195
+ }
196
+ break;
197
+ }
198
+ };
core/src/js/modules/getButtonURL.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Get the next URL for Load More button
3
+ *
4
+ * @param {object} alm
5
+ * @since 5.4.0
6
+ */
7
+
8
+ const getButtonURL = (alm) => {
9
+ if (!alm || !alm.trigger) {
10
+ return false;
11
+ }
12
+ let button = alm.trigger.querySelector('button');
13
+ let url = button ? button.dataset.url : '';
14
+
15
+ return url ? url : '';
16
+ };
17
+ export default getButtonURL;
core/src/js/modules/getScrollPercentage.js ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * getScrollPercentage
3
+ * Get the scroll distance in pixels from a percentage
4
+ *
5
+ * @param {Object} alm
6
+ * @return {NUMBER} newdistance
7
+ * @since 5.2
8
+ */
9
+
10
+ let getScrollPercentage = (alm) => {
11
+ if(!alm){
12
+ return false;
13
+ }
14
+
15
+ let is_negative = (alm.scroll_distance_orig.toString().indexOf("-") === -1) ? false : true; // Is this a negative number
16
+ let raw_distance = alm.scroll_distance_orig.toString().replace("-", "").replace("%", ""); // Remove - and perc
17
+ let wh = alm.window.innerHeight; // window height
18
+
19
+ let height = Math.floor((wh/100) * parseInt(raw_distance)); // Do math to get distance
20
+
21
+ let newdistance = (is_negative) ? `-${height}` : height; // Set the distance
22
+ //console.log(parseInt(newdistance));
23
+
24
+ return parseInt(newdistance);
25
+ }
26
+ export default getScrollPercentage;
core/src/js/modules/insertScript.js ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import almDomParser from '../helpers/almDomParser';
2
+
3
+ /**
4
+ * insertScript
5
+ * Search nodes for <script/> tags and run scripts.
6
+ * Scripts cannot run with appendChild or innerHTML so this is necessary to function.
7
+ *
8
+ * @since 5.0
9
+ */
10
+ let insertScript = {
11
+
12
+ init: function(node){
13
+ if ( this.isScript(node) === true ) {
14
+ node.parentNode.replaceChild( this.clone(node) , node );
15
+ }
16
+ else {
17
+ let i = 0;
18
+ let children = node.childNodes;
19
+
20
+ if(children === undefined){
21
+ let parser = new DOMParser();
22
+ let data = parser.parseFromString(node, 'text/html');
23
+ if(data){
24
+ children = data.body.childNodes;
25
+ }
26
+ }
27
+ while ( i < children.length ) {
28
+ this.replace( children[i++] );
29
+ }
30
+ }
31
+ return node;
32
+ },
33
+
34
+ replace: function(node) {
35
+ if ( this.isScript(node) === true ) {
36
+ node.parentNode.replaceChild( this.clone(node) , node );
37
+ }
38
+ else {
39
+ let i = 0;
40
+ let children = node.childNodes;
41
+ while (i < children.length) {
42
+ this.replace( children[i++] );
43
+ }
44
+ }
45
+ return node;
46
+ },
47
+
48
+ isScript: function(node){
49
+ return node.tagName === 'SCRIPT';
50
+ },
51
+
52
+ clone: function(node){
53
+ let script = document.createElement("script");
54
+ script.text = node.innerHTML;
55
+ for( let i = node.attributes.length-1; i >= 0; i-- ) {
56
+ script.setAttribute( node.attributes[i].name, node.attributes[i].value );
57
+ }
58
+ return script;
59
+ }
60
+
61
+ }
62
+ export default insertScript;
core/src/js/modules/loadImage.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import srcsetPolyfill from '../helpers/srcsetPolyfill';
2
+ let imagesLoaded = require('imagesloaded');
3
+
4
+ /**
5
+ * Load the image with imagesLoaded
6
+ *
7
+ * @param {HTMLElement} container
8
+ * @param {HTMLElement} item
9
+ * @param {String} ua
10
+ */
11
+ const loadImage = (container, item, ua) => {
12
+ return new Promise((resolve) => {
13
+ imagesLoaded(item, function () {
14
+ // Add CSS transition
15
+ item.style.transition = 'all 0.4s ease';
16
+ // Append to container
17
+ container.appendChild(item);
18
+ // Run srcset fix
19
+ srcsetPolyfill(item, ua);
20
+ // Send await callback
21
+ resolve(true);
22
+ });
23
+ });
24
+ };
25
+ export default loadImage;
core/src/js/modules/loadItems.js ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import loadImage from './loadImage';
2
+ import setFocus from './setFocus';
3
+
4
+ /**
5
+ * Load all items
6
+ *
7
+ * @param {HTMLElement} container
8
+ * @param {HTMLElement} items
9
+ * @param {Object} alm
10
+ * @param {String} pageTitle
11
+ * @param {String} url
12
+ * @param {String} className
13
+ */
14
+ const loadItems = (container, items, alm, pageTitle, url = window.location, className = '') => {
15
+ return new Promise((resolve) => {
16
+ let total = items.length;
17
+ let index = 0;
18
+ let count = 1;
19
+
20
+ function loadItem() {
21
+ if (count <= total) {
22
+ (async function () {
23
+ items[index].style.opacity = 0;
24
+
25
+ // First item only
26
+ if (count == 1) {
27
+ items[index].classList.add(className);
28
+
29
+ // Set URL
30
+ items[index].dataset.url = url;
31
+
32
+ // Set page num
33
+ items[index].dataset.page = alm.page + 1;
34
+
35
+ // Set page title
36
+ items[index].dataset.pageTitle = pageTitle;
37
+ }
38
+
39
+ await loadImage(container, items[index], alm.ua);
40
+
41
+ count++;
42
+ index++;
43
+
44
+ loadItem();
45
+ })().catch((e) => {
46
+ console.log('There was an error loading the items');
47
+ });
48
+ } else {
49
+ // Delay for effect only
50
+ setTimeout(function () {
51
+ items.map(function (item) {
52
+ item.style.opacity = 1;
53
+ });
54
+ if (items[0]) {
55
+ setFocus(alm, items[0], null, false);
56
+ }
57
+ }, 50);
58
+
59
+ resolve(true);
60
+ }
61
+ }
62
+
63
+ loadItem();
64
+ });
65
+ };
66
+
67
+ export default loadItems;
core/src/js/modules/masonry.js ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import almFadeIn from './fadeIn';
2
+ import almAppendChildren from '../helpers/almAppendChildren';
3
+ import almDomParser from '../helpers/almDomParser';
4
+ import srcsetPolyfill from '../helpers/srcsetPolyfill';
5
+ import stripEmptyNodes from '../helpers/stripEmptyNodes';
6
+ import {
7
+ createMasonryFiltersPages,
8
+ createMasonryFiltersPage,
9
+ } from '../addons/filters';
10
+ import { createMasonrySEOPages, createMasonrySEOPage } from '../addons/seo';
11
+ import setFocus from './setFocus';
12
+ let imagesLoaded = require('imagesloaded');
13
+
14
+ /**
15
+ * almMasonry
16
+ * Function to trigger built-in Ajax Load More Masonry
17
+ *
18
+ * @param {object} alm
19
+ * @param {boolean} init
20
+ * @param {boolean} filtering
21
+ * @since 3.1
22
+ * @updated 5.0.2
23
+ */
24
+ let almMasonry = (alm, init, filtering) => {
25
+ return new Promise((resolve) => {
26
+ let container = alm.listing;
27
+ let html = alm.html;
28
+
29
+ let selector = alm.masonry_selector;
30
+ let columnWidth = alm.masonry_columnwidth;
31
+ let animation = alm.masonry_animation;
32
+ let horizontalOrder = alm.masonry_horizontalorder;
33
+ let speed = alm.speed;
34
+ let masonry_init = alm.masonry_init;
35
+
36
+ let duration = (speed + 100) / 1000 + 's'; // Add 100 for some delay
37
+ let hidden = 'scale(0.5)';
38
+ let visible = 'scale(1)';
39
+
40
+ if (animation === 'zoom-out') {
41
+ hidden = 'translateY(-20px) scale(1.25)';
42
+ visible = 'translateY(0) scale(1)';
43
+ }
44
+
45
+ if (animation === 'slide-up') {
46
+ hidden = 'translateY(50px)';
47
+ visible = 'translateY(0)';
48
+ }
49
+
50
+ if (animation === 'slide-down') {
51
+ hidden = 'translateY(-50px)';
52
+ visible = 'translateY(0)';
53
+ }
54
+
55
+ if (animation === 'none') {
56
+ hidden = 'translateY(0)';
57
+ visible = 'translateY(0)';
58
+ }
59
+
60
+ // columnWidth
61
+ if (columnWidth) {
62
+ if (!isNaN(columnWidth)) {
63
+ // Check if number
64
+ columnWidth = parseInt(columnWidth);
65
+ }
66
+ } else {
67
+ // No columnWidth, use the selector
68
+ columnWidth = selector;
69
+ }
70
+
71
+ // horizontalOrder
72
+ horizontalOrder = horizontalOrder === 'true' ? true : false;
73
+
74
+ if (!filtering) {
75
+ // First Run
76
+ if (masonry_init && init) {
77
+ srcsetPolyfill(container, alm.ua); // Run srcSet polyfill
78
+
79
+ imagesLoaded(container, function () {
80
+ let defaults = {
81
+ itemSelector: selector,
82
+ transitionDuration: duration,
83
+ columnWidth: columnWidth,
84
+ horizontalOrder: horizontalOrder,
85
+ hiddenStyle: {
86
+ transform: hidden,
87
+ opacity: 0,
88
+ },
89
+ visibleStyle: {
90
+ transform: visible,
91
+ opacity: 1,
92
+ },
93
+ };
94
+
95
+ // Get custom Masonry options (https://masonry.desandro.com/options.html)
96
+ let alm_masonry_vars = window.alm_masonry_vars;
97
+ if (alm_masonry_vars) {
98
+ Object.keys(alm_masonry_vars).forEach(function (key) {
99
+ // Loop object to create key:prop
100
+ defaults[key] = alm_masonry_vars[key];
101
+ });
102
+ }
103
+
104
+ let data = container.querySelectorAll(selector);
105
+
106
+ // Create Filters URL, if required
107
+ if (alm.addons.filters) {
108
+ data = createMasonryFiltersPages(
109
+ alm,
110
+ Array.prototype.slice.call(data)
111
+ );
112
+ }
113
+
114
+ // Create SEO URL, if required
115
+ if (alm.addons.seo) {
116
+ data = createMasonrySEOPages(
117
+ alm,
118
+ Array.prototype.slice.call(data)
119
+ );
120
+ }
121
+
122
+ // Init Masonry, delay to allow time for items to be added to the page
123
+ setTimeout(function () {
124
+ alm.msnry = new Masonry(container, defaults);
125
+
126
+ // Fade In
127
+ almFadeIn(container.parentNode, 125);
128
+
129
+ resolve(true);
130
+ }, 1);
131
+ });
132
+ }
133
+
134
+ // Standard / Append content
135
+ else {
136
+ // Loop all items and create array of node elements
137
+ let data = stripEmptyNodes(almDomParser(html, 'text/html'));
138
+
139
+ if (data) {
140
+ // Append elements listing
141
+ almAppendChildren(alm.listing, data, 'masonry');
142
+
143
+ // Run srcSet polyfill
144
+ srcsetPolyfill(container, alm.ua);
145
+
146
+ // imagesLoaded & append
147
+ imagesLoaded(container, function () {
148
+ alm.msnry.appended(data);
149
+
150
+ // Set Focus
151
+ setFocus(alm, data, data.length, false);
152
+
153
+ // Create Filters URL, if required
154
+ if (alm.addons.filters) {
155
+ createMasonryFiltersPage(alm, data[0]);
156
+ }
157
+
158
+ // Create SEO URL, if required
159
+ if (alm.addons.seo) {
160
+ createMasonrySEOPage(alm, data[0]);
161
+ }
162
+
163
+ resolve(true);
164
+ });
165
+ }
166
+ }
167
+ } else {
168
+ // Reset
169
+ container.parentNode.style.opacity = 0;
170
+ almMasonry(alm, true, false);
171
+ resolve(true);
172
+ }
173
+ });
174
+ };
175
+
176
+ export default almMasonry;
core/src/js/modules/noResults.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Set the results text if required.
3
+ *
4
+ * @param {*} target The target HTML element
5
+ * @param {*} html The HTML
6
+ * @since 5.1
7
+ */
8
+ let almNoResults = (target, html = '') => {
9
+ if(html === ''){
10
+ return false; // exit if empty
11
+ }
12
+
13
+ // Remove empty <p/> tags
14
+ html = html.replace(/(<p><\/p>)+/g, '');
15
+
16
+ // Append to DOM
17
+ target.innerHTML = html;
18
+ }
19
+
20
+ export default almNoResults;
core/src/js/modules/placeholder.js ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import almFadeIn from './fadeIn';
2
+ import almFadeOut from './fadeOut';
3
+
4
+ export function showPlaceholder(alm){
5
+ if(!alm || !alm.main || alm.addons.paging){
6
+ return false;
7
+ }
8
+ if(alm.placeholder){
9
+ alm.placeholder.style.display = 'block';
10
+ almFadeIn(alm.placeholder, 75);
11
+ }
12
+ }
13
+
14
+
15
+ export function hidePlaceholder(alm){
16
+ if(!alm || !alm.main || alm.addons.paging){
17
+ return false;
18
+ }
19
+ if(alm.placeholder){
20
+ almFadeOut(alm.placeholder, 75);
21
+ setTimeout(function(){
22
+ alm.placeholder.style.display = 'none';
23
+ }, 75);
24
+ }
25
+ }
core/src/js/modules/resultsText.js ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Set the results text if required.
3
+ *
4
+ * @param {object} alm Global alm object
5
+ * @param {string} type Type of results
6
+ * @since 5.1
7
+ */
8
+ export function almResultsText( alm, type = 'standard' ){
9
+ if(!alm.resultsText || alm.nested === 'true') return false;
10
+ let resultsType = (type === 'nextpage' || type === 'woocommerce') ? type : 'standard';
11
+
12
+ almGetResultsText(alm, resultsType);
13
+ }
14
+
15
+
16
+
17
+ /**
18
+ * Get values for showing results text.
19
+ *
20
+ * @param {Object} alm
21
+ * @param {String} type
22
+ * @since 4.1
23
+ */
24
+ export function almGetResultsText( alm, type = 'standard' ){
25
+
26
+ if(!alm.resultsText || !alm.localize || alm.nested === 'true'){
27
+ return false;
28
+ }
29
+
30
+ let page = 0;
31
+ let pages = 0;
32
+ let post_count = 0;
33
+ let total_posts = 0;
34
+ let preloaded = (alm.addons.preloaded === 'true') ? true : false;
35
+ let paging = (alm.addons.paging) ? true : false;
36
+ let posts_per_page = alm.orginal_posts_per_page;
37
+
38
+ switch (type) {
39
+
40
+ // Nextpage
41
+ case 'nextpage' :
42
+
43
+ page = parseInt(alm.localize.page);
44
+ post_count = page;
45
+ pages = parseInt(alm.localize.total_posts);
46
+ total_posts = parseInt(pages);
47
+ almRenderResultsText(alm.resultsText, page, pages, post_count, total_posts);
48
+
49
+ break;
50
+
51
+ // WooCommerce
52
+ case 'woocommerce' :
53
+ // Don't do anything
54
+ break;
55
+
56
+ default :
57
+
58
+ page = parseInt(alm.page) + 1;
59
+ pages = Math.ceil(alm.localize.total_posts / posts_per_page);
60
+ post_count = parseInt(alm.localize.post_count);
61
+ total_posts = parseInt(alm.localize.total_posts);
62
+
63
+ // Add 1 page if Preloaded
64
+ if(preloaded){
65
+ page = (paging) ? alm.page + 1 : page + 1;
66
+ }
67
+
68
+ almRenderResultsText(alm.resultsText, page, pages, post_count, total_posts);
69
+
70
+ }
71
+ }
72
+
73
+
74
+
75
+ /**
76
+ * Display `Showing {x} of {y} pages` text.
77
+ *
78
+ * @param {Object} alm
79
+ * @param {String} type
80
+ * @since 4.1
81
+ */
82
+ export function almInitResultsText( alm, type = 'standard' ){
83
+ if(!alm.resultsText || !alm.localize || alm.nested === 'true') return false;
84
+
85
+ let page = 0;
86
+ let pages = Math.ceil(alm.localize.total_posts / alm.orginal_posts_per_page);
87
+ let post_count = parseInt(alm.localize.post_count);
88
+ let total_posts = parseInt(alm.localize.total_posts);
89
+
90
+ switch (type) {
91
+
92
+ // Nextpage
93
+ case 'nextpage' :
94
+ page = alm.addons.nextpage_startpage;
95
+ post_count = page;
96
+ pages = total_posts;
97
+ almRenderResultsText(alm.resultsText, page, total_posts, post_count, total_posts);
98
+ break;
99
+
100
+ // Preloaded
101
+ case 'preloaded' :
102
+ page = (alm.addons.paging && alm.addons.seo) ? parseInt(alm.start_page) + 1 : parseInt(alm.page) + 1;
103
+ almRenderResultsText(alm.resultsText, page, pages, post_count, total_posts);
104
+ break;
105
+
106
+ // WooCommerce
107
+ case 'woocommerce' :
108
+ // Don't do anything
109
+ break;
110
+
111
+ default :
112
+
113
+ console.log('No results to set.');
114
+
115
+ }
116
+
117
+ }
118
+
119
+
120
+ /**
121
+ * Render `Showing {x} of {y} results` text.
122
+ *
123
+ * @param {Element} el
124
+ * @param {String} page
125
+ * @param {String} pages
126
+ * @param {String} post_count
127
+ * @param {String} total_posts
128
+ * @since 4.1
129
+ */
130
+ let almRenderResultsText = function( el, page, pages, post_count, total_posts ){
131
+
132
+ el.forEach(function(result){
133
+
134
+ pages = parseInt(pages);
135
+ let text = (pages > 0) ? alm_localize.results_text : alm_localize.no_results_text;
136
+
137
+ if(pages > 0){
138
+ text = text.replace('{num}', `<span class="alm-results-num">${page}</span>`); // Deprecated
139
+ text = text.replace('{page}', `<span class="alm-results-page">${page}</span>`);
140
+ text = text.replace('{total}', `<span class="alm-results-total">${pages}</span>`); // Deprecated
141
+ text = text.replace('{pages}', `<span class="alm-results-pages">${pages}</span>`);
142
+ text = text.replace('{post_count}', `<span class="alm-results-post_count">${post_count}</span>`)
143
+ text = text.replace('{total_posts}', `<span class="alm-results-total_posts">${total_posts}</span>`);
144
+ result.innerHTML = text;
145
+ } else {
146
+ result.innerHTML = text;
147
+ }
148
+
149
+ });
150
+ }
core/src/js/modules/setFocus.js ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * setFocus
3
+ * Set user focus to improve accessibility after load events
4
+ *
5
+ * @param {Object} alm
6
+ * @param {HTMLElement} preloaded
7
+ * @param {Number} total
8
+ * @param {Boolean} is_filtering
9
+ * @since 5.1
10
+ */
11
+
12
+ let setFocus = (alm, element = null, total = 0, is_filtering = false) => {
13
+ if (!alm_localize.a11y_focus) {
14
+ return false;
15
+ }
16
+
17
+ // WooCommerce Add-on
18
+ if (alm.addons.woocommerce || alm.addons.elementor) {
19
+ moveFocus(false, false, element, false, alm.isSafari);
20
+ return;
21
+ }
22
+
23
+ // Has Total
24
+ if (alm.transition_container && total > 0) {
25
+ if (alm.addons.paging) {
26
+ // Paging
27
+ moveFocus(alm.init, alm.addons.preloaded, alm.listing, is_filtering, alm.isSafari);
28
+ } else if (alm.addons.single_post || alm.addons.nextpage) {
29
+ // Single Posts OR Next Page, set `init` to false to trigger focus
30
+ moveFocus(false, alm.addons.preloaded, element, is_filtering, alm.isSafari);
31
+ } else {
32
+ // Standard ALM
33
+ moveFocus(alm.init, alm.addons.preloaded, element, is_filtering, alm.isSafari);
34
+ }
35
+ } else if (!alm.transition_container) {
36
+ // Table Layout, no transition container
37
+ moveFocus(alm.init, alm.addons.preloaded, element[0], is_filtering, alm.isSafari);
38
+ }
39
+ };
40
+ export default setFocus;
41
+
42
+ /**
43
+ * moveFocus
44
+ * Move user focus to alm-reveal div
45
+ *
46
+ * @param {Boolean} init
47
+ * @param {String} preloaded
48
+ * @param {HTMLElement} element
49
+ * @param {Boolean} is_filtering
50
+ * @param {Boolean} isSafari
51
+ * @since 5.1
52
+ */
53
+
54
+ let moveFocus = (init = true, preloaded = 'false', element, is_filtering = false, isSafari = false) => {
55
+ if (!is_filtering) {
56
+ if ((init || !element) && preloaded !== 'true') {
57
+ return false; // Exit if first run
58
+ }
59
+ }
60
+
61
+ // Check if element is an array.
62
+ // If `transition_container="false"`, `element` will be an array.
63
+ /*
64
+ let is_array = Array.isArray(element);
65
+ element = (is_array) ? element[0] : element;
66
+ */
67
+
68
+ // Set tabIndex and style on element
69
+ element.setAttribute('tabIndex', '-1');
70
+ element.style.outline = 'none';
71
+
72
+ // Get Parent container
73
+ // If `.alm-listing` set parent to element
74
+ let parent = !element.classList.contains('alm-listing') ? element.parentNode : element;
75
+
76
+ // Scroll Container
77
+ let scrollContainer = parent.dataset.scrollContainer;
78
+
79
+ // If scroll container, move it, not the window.
80
+ if (scrollContainer) {
81
+ let container = document.querySelector(scrollContainer);
82
+ if (container) {
83
+ //let left = container.scrollLeft;
84
+ //let top = container.scrollTop;
85
+ //element.focus();
86
+ //container.scrollLeft = left;
87
+ //container.scrollTop = top;
88
+ setTimeout(function () {
89
+ element.focus({ preventScroll: true });
90
+ }, 50);
91
+ }
92
+ }
93
+
94
+ // Move window
95
+ else {
96
+ setTimeout(function () {
97
+ element.focus({ preventScroll: true });
98
+ }, 50);
99
+
100
+ //let x = window.scrollX;
101
+ //let y = window.scrollY;
102
+
103
+ // Safari fix for window movement if Y = 0
104
+ //if(isSafari){
105
+ //window.scrollTo(x, y);
106
+ //y = (y === 0) ? 1 : y;
107
+ //}
108
+ //element.focus();
109
+ //window.scrollTo(x, y);
110
+ }
111
+ };
core/src/js/modules/setLocalizedVars.js ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as resultsText from './resultsText';
2
+
3
+ /**
4
+ * Set localized variables
5
+ *
6
+ * @param {object} alm Global alm object
7
+ * @since 4.1
8
+ */
9
+
10
+ let setLocalizedVars = function(alm){
11
+
12
+ return new Promise(resolve => {
13
+
14
+ let type = 'standard';
15
+
16
+ // Current Page `page`
17
+
18
+ // nextpage
19
+ if(alm.addons.nextpage){
20
+ type = 'nextpage';
21
+ if(alm.addons.paging){
22
+ alm.AjaxLoadMore.setLocalizedVar('page', parseInt(alm.page) + 1);
23
+ } else {
24
+ alm.AjaxLoadMore.setLocalizedVar('page', parseInt(alm.page) + parseInt(alm.addons.nextpage_startpage) + 1);
25
+ }
26
+ }
27
+ // woocommerce
28
+ else if(alm.addons.woocommerce){
29
+ type = 'woocommerce';
30
+ alm.AjaxLoadMore.setLocalizedVar('page', parseInt(alm.page) + 1);
31
+
32
+ } else {
33
+ alm.AjaxLoadMore.setLocalizedVar('page', parseInt(alm.page) + 1);
34
+
35
+ }
36
+
37
+ // Total Posts `total_posts`.
38
+ // Only update if !preloaded && !nextpage && !woocommerce
39
+ if(alm.addons.preloaded !== 'true' && !alm.addons.nextpage && !alm.addons.woocommerce){
40
+ alm.AjaxLoadMore.setLocalizedVar('total_posts', alm.totalposts);
41
+ }
42
+
43
+ // Viewing
44
+ alm.AjaxLoadMore.setLocalizedVar('post_count', almSetPostCount(alm));
45
+
46
+ // Set Results Text (if required)
47
+ resultsText.almResultsText(alm, type);
48
+
49
+ resolve(true);
50
+
51
+ });
52
+
53
+ }
54
+
55
+ export default setLocalizedVars;
56
+
57
+
58
+ /**
59
+ * almSetViewing
60
+ * Get total post_count
61
+ */
62
+ function almSetPostCount(alm){
63
+ let pc = parseInt(alm.posts);
64
+ let pa = parseInt(alm.addons.preloaded_amount);
65
+ let count = pc + pa;
66
+ count = (alm.start_page > 1) ? count - pa : count; // SEO
67
+ count = (alm.addons.filters_startpage > 1) ? count - pa : count; // Filters
68
+ count = (alm.addons.single_post) ? count + 1 : count; // Single Posts
69
+ count = (alm.addons.nextpage) ? count + 1 : count; // Next Page
70
+
71
+ return count;
72
+ }
core/src/js/modules/tableofcontents.js ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { almScroll, getOffset } from '../ajax-load-more';
2
+ import setFocus from './setFocus';
3
+
4
+ /**
5
+ * Create a numbered table of contents navigation
6
+ *
7
+ * @param {object} alm
8
+ * @param {boolean} init
9
+ * @since 5.2
10
+ */
11
+ export function tableOfContents(alm, init = false, from_preloaded = false) {
12
+ let totalPosts = alm.localize && alm.localize.post_count ? parseInt(alm.localize.post_count) : 0;
13
+ if (totalPosts == 0 && !alm.addons.single_post) {
14
+ // Exit if zero posts and not single posts
15
+ return false;
16
+ }
17
+
18
+ if (alm && alm.tableofcontents && alm.transition_container && alm.transition !== 'masonry') {
19
+ let offset = alm.tableofcontents.dataset.offset ? parseInt(alm.tableofcontents.dataset.offset) : 30;
20
+ let startPage = alm.start_page ? parseInt(alm.start_page) : 0;
21
+ let filterStartPage = alm.addons.filters_startpage ? parseInt(alm.addons.filters_startpage) : 0;
22
+ let nextpageStartPage = alm.addons.nextpage_startpage ? parseInt(alm.addons.nextpage_startpage) : 0;
23
+ let page = parseInt(alm.page);
24
+ let preloaded = alm.addons.preloaded === 'true' ? true : false;
25
+
26
+ // Exit if Paging or Next Page
27
+ if (alm.addons.paging || alm.addons.nextpage) {
28
+ return false;
29
+ }
30
+
31
+ // Init
32
+
33
+ if (init) {
34
+ setTimeout(function () {
35
+ // Paged results
36
+ if ((alm.addons.seo && startPage > 1) || (alm.addons.filters && filterStartPage > 1) || (alm.addons.nextpage && nextpageStartPage > 1)) {
37
+ // SEO
38
+ if (alm.addons.seo && startPage > 1) {
39
+ for (let i = 0; i < startPage; i++) {
40
+ createTOCButton(alm, i, offset);
41
+ }
42
+ }
43
+ // Filters
44
+ if (alm.addons.filters && filterStartPage > 1) {
45
+ for (let i = 0; i < filterStartPage; i++) {
46
+ createTOCButton(alm, i, offset);
47
+ }
48
+ }
49
+ // Nextpage
50
+ if (alm.addons.nextpage && nextpageStartPage > 1) {
51
+ for (let i = 0; i < nextpageStartPage; i++) {
52
+ createTOCButton(alm, i, offset);
53
+ }
54
+ }
55
+ } else {
56
+ if (!from_preloaded && preloaded) {
57
+ page = page + 1;
58
+ }
59
+ createTOCButton(alm, page, offset);
60
+ }
61
+ }, 100);
62
+ } else {
63
+ // Preloaded
64
+ if (preloaded) {
65
+ if (alm.addons.seo && startPage > 0) {
66
+ page = page;
67
+ } else if (alm.addons.filters && filterStartPage > 0) {
68
+ page = page;
69
+ } else {
70
+ page = page + 1;
71
+ }
72
+ }
73
+
74
+ createTOCButton(alm, page, offset);
75
+ }
76
+ }
77
+ }
78
+
79
+ // Clear table of contents
80
+ export function clearTOC() {
81
+ let toc = document.querySelector('.alm-toc');
82
+ if (toc) {
83
+ toc.innerHTML = '';
84
+ }
85
+ }
86
+
87
+ // Create Standard Page Button
88
+ function createTOCButton(alm, page, offset) {
89
+ if (!alm.tableofcontents) {
90
+ return false;
91
+ }
92
+
93
+ let button = document.createElement('button');
94
+ button.type = 'button';
95
+
96
+ page = parseInt(page) + 1;
97
+ button.innerHTML = getTOCLabel(alm, page);
98
+ button.dataset.page = alm.addons.single_post_target && alm.init ? page - 1 : page;
99
+ alm.tableofcontents.appendChild(button);
100
+
101
+ button.addEventListener('click', function (e) {
102
+ let page = this.dataset.page;
103
+ let target = document.querySelector(`.alm-reveal:nth-child(${page})`) || document.querySelector(`.alm-nextpage:nth-child(${page})`);
104
+
105
+ // Single Posts
106
+ if (alm.addons.single_post_target) {
107
+ target = document.querySelector(`.alm-reveal.alm-single-post[data-page="${page}"]`);
108
+ }
109
+
110
+ if (!target) {
111
+ return false;
112
+ }
113
+ let top = typeof getOffset === 'function' ? getOffset(target).top : target.offsetTop;
114
+ almScroll(top - offset);
115
+
116
+ // Set Focus for A11y
117
+ setTimeout(function () {
118
+ setFocus(alm, target, page, false);
119
+ }, 1000);
120
+ });
121
+ }
122
+
123
+ // Get Button Label
124
+ function getTOCLabel(alm, page) {
125
+ let label = page;
126
+
127
+ // Single Posts
128
+ if (alm.addons.single_post) {
129
+ let thePage = page - 1;
130
+ let element;
131
+ if (alm.addons.single_post_target) {
132
+ // Special functionality for Single Post with a loading target type
133
+ if (alm.init) {
134
+ thePage = thePage;
135
+ } else {
136
+ thePage = thePage + 1;
137
+ }
138
+ let posts = document.querySelectorAll(`.alm-reveal.alm-single-post`);
139
+ if (posts) {
140
+ element = posts[thePage];
141
+ }
142
+ } else {
143
+ element = document.querySelector(`.alm-reveal.alm-single-post[data-page=${page - 1}]`);
144
+ }
145
+ label = element ? element.dataset.title : label;
146
+ }
147
+
148
+ // Dynamic function name
149
+ let funcName = `almTOCLabel_${alm.id}`;
150
+ if (typeof window[funcName] === 'function') {
151
+ label = window[funcName](page, label);
152
+ }
153
+
154
+ return label;
155
+ }
core/src/js/vendor/imagesloaded/imagesloaded.pkgd.min.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ /*!
2
+ * imagesLoaded PACKAGED v4.1.4
3
+ * JavaScript is all like "You images are done yet or what?"
4
+ * MIT License
5
+ */
6
+ !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
core/src/scss/_listing.scss ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Generic alm-listing Styles
3
+ * @since 1.0.0
4
+ */
5
+ .alm-listing {
6
+ .alm-reveal {
7
+ outline: none;
8
+ &:after {
9
+ display: table;
10
+ clear: both;
11
+ height: 0;
12
+ width: 100%;
13
+ content: '';
14
+ }
15
+ }
16
+ }
17
+
18
+ .alm-listing {
19
+ margin: 0;
20
+ padding: 0;
21
+ .alm-reveal > li,
22
+ .alm-paging-content > li,
23
+ > li {
24
+ position: relative;
25
+ &.alm-item {
26
+ background: none;
27
+ margin: 0 0 30px;
28
+ padding: 0 0 0 80px;
29
+ position: relative;
30
+ list-style: none;
31
+ @media screen and (min-width: $sm) {
32
+ padding: 0 0 0 100px;
33
+ }
34
+ @media screen and (min-width: $md) {
35
+ padding: 0 0 0 135px;
36
+ }
37
+ @media screen and (min-width: $lg) {
38
+ padding: 0 0 0 160px;
39
+ }
40
+ h3 {
41
+ margin: 0;
42
+ }
43
+ p {
44
+ margin: 10px 0 0;
45
+ &.entry-meta {
46
+ opacity: 0.75;
47
+ }
48
+ }
49
+ img {
50
+ position: absolute;
51
+ left: 0;
52
+ top: 0;
53
+ border-radius: 2px;
54
+ max-width: 65px;
55
+ @media screen and (min-width: $sm) {
56
+ max-width: 85px;
57
+ }
58
+ @media screen and (min-width: $md) {
59
+ max-width: 115px;
60
+ }
61
+ @media screen and (min-width: $lg) {
62
+ max-width: 140px;
63
+ }
64
+ }
65
+ }
66
+ &.no-img {
67
+ padding: 0;
68
+ }
69
+ }
70
+ &.products {
71
+ li.product {
72
+ padding-left: inherit;
73
+ img {
74
+ position: static;
75
+ border-radius: inherit;
76
+ }
77
+ }
78
+ }
79
+ &.stylefree {
80
+ .alm-reveal > li,
81
+ .alm-paging-content > li,
82
+ > li {
83
+ padding: inherit;
84
+ margin: inherit;
85
+ img {
86
+ padding: inherit;
87
+ margin: inherit;
88
+ position: static;
89
+ border-radius: inherit;
90
+ }
91
+ }
92
+ }
93
+ }
94
+
95
+ // Right to left (rtl)
96
+ .alm-listing.rtl {
97
+ .alm-reveal > li,
98
+ .alm-paging-content > li {
99
+ padding: 0 170px 0 0;
100
+ text-align: right;
101
+ img {
102
+ left: auto;
103
+ right: 0;
104
+ }
105
+ }
106
+ &.products {
107
+ li.product {
108
+ padding-right: inherit;
109
+ }
110
+ }
111
+ }
112
+
113
+ // Masonry default styles
114
+ .alm-masonry {
115
+ display: block;
116
+ overflow: hidden;
117
+ clear: both;
118
+ }
119
+
120
+ // Placeholder default styles
121
+ .alm-placeholder {
122
+ opacity: 0;
123
+ transition: opacity 0.2s ease;
124
+ display: none;
125
+ }
126
+
127
+ // Horizontal Layout
128
+ .ajax-load-more-wrap {
129
+ &.alm-horizontal {
130
+ display: flex;
131
+ flex-wrap: nowrap;
132
+ width: 100%;
133
+ .alm-listing,
134
+ .alm-listing .alm-reveal {
135
+ display: flex;
136
+ flex-wrap: nowrap;
137
+ flex-direction: row;
138
+ > li.alm-item {
139
+ padding: 0;
140
+ text-align: center;
141
+ margin: 0 2px;
142
+ padding: 20px 20px 30px;
143
+ height: auto;
144
+ background-color: #fff;
145
+ border: 1px solid #efefef;
146
+ border-radius: 4px;
147
+ width: 300px;
148
+ img {
149
+ position: static;
150
+ border-radius: 100%;
151
+ max-width: 125px;
152
+ margin: 0 auto 15px;
153
+ border-radius: 4px;
154
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.075);
155
+ }
156
+ }
157
+ }
158
+ .alm-listing .alm-reveal:after {
159
+ display: none;
160
+ }
161
+ }
162
+ }
core/src/scss/_loaders.scss ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .alm-btn-wrap {
2
+ display: block;
3
+ text-align: center;
4
+ padding: 10px 0;
5
+ margin: 0 0 15px;
6
+ position: relative;
7
+ &:after {
8
+ display: table;
9
+ clear: both;
10
+ height: 0;
11
+ width: 100%;
12
+ content: '';
13
+ }
14
+ .alm-load-more-btn {
15
+ font-size: 15px;
16
+ font-weight: 500;
17
+ width: auto;
18
+ height: 43px;
19
+ line-height: 1;
20
+ background: #ed7070;
21
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
22
+ color: #fff;
23
+ border: none;
24
+ border-radius: 4px;
25
+ margin: 0;
26
+ padding: 0 20px;
27
+ display: inline-block;
28
+ position: relative;
29
+ transition: all 0.3s ease;
30
+ text-align: center;
31
+ text-decoration: none;
32
+ appearance: none;
33
+ user-select: none;
34
+ cursor: pointer;
35
+ &:hover,
36
+ &.loading {
37
+ background-color: #e06161;
38
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.09);
39
+ color: #fff;
40
+ text-decoration: none;
41
+ }
42
+ &:active {
43
+ box-shadow: none;
44
+ text-decoration: none;
45
+ }
46
+
47
+ /* Loading */
48
+ &.loading {
49
+ cursor: default;
50
+ outline: none;
51
+ padding-left: 44px;
52
+ }
53
+
54
+ /* Loaded / Done */
55
+ &.done {
56
+ cursor: default;
57
+ opacity: 0.15;
58
+ background-color: #ed7070;
59
+ outline: none !important;
60
+ box-shadow: none !important;
61
+ }
62
+
63
+ /* Loading Icon */
64
+ &:before,
65
+ &.done:before {
66
+ background: none;
67
+ width: 0;
68
+ }
69
+
70
+ /* Loading :before */
71
+ &.loading:before {
72
+ background: #fff url('../../img/ajax-loader.gif') no-repeat center center;
73
+ width: 30px;
74
+ height: 31px;
75
+ margin: 6px;
76
+ border-radius: 3px;
77
+ display: inline-block;
78
+ z-index: 0;
79
+ content: '';
80
+ position: absolute;
81
+ left: 0;
82
+ top: 0;
83
+ overflow: hidden;
84
+ transition: width 0.5s ease-in-out;
85
+ }
86
+ }
87
+
88
+ .alm-elementor-link {
89
+ display: block;
90
+ font-size: 13px;
91
+ margin: 0 0 15px;
92
+ @media screen and (min-width: $md) {
93
+ position: absolute;
94
+ left: 0;
95
+ top: 50%;
96
+ transform: translateY(-50%);
97
+ margin: 0;
98
+ }
99
+ }
100
+ }
101
+
102
+ /* white */
103
+ .ajax-load-more-wrap.white .alm-load-more-btn {
104
+ background-color: #fff;
105
+ color: #787878;
106
+ border: 1px solid #e0e0e0;
107
+ overflow: hidden;
108
+ transition: none;
109
+ outline: none;
110
+ &:focus,
111
+ &:hover,
112
+ &.loading {
113
+ background-color: #fff;
114
+ color: #333;
115
+ border-color: #aaaaaa;
116
+ }
117
+ &.done {
118
+ background-color: #fff;
119
+ color: #444;
120
+ border-color: #ccc;
121
+ }
122
+ &.loading {
123
+ color: rgba(255, 255, 255, 0) !important;
124
+ outline: none !important;
125
+ background-color: transparent;
126
+ border-color: transparent !important;
127
+ box-shadow: none !important;
128
+ padding-left: 20px;
129
+ &:before {
130
+ margin: 0;
131
+ left: 0;
132
+ top: 0;
133
+ width: 100%;
134
+ height: 100%;
135
+ background-color: transparent;
136
+ background-image: url('../../img/ajax-loader-lg.gif');
137
+ background-size: 25px 25px;
138
+ background-position: center center;
139
+ }
140
+ }
141
+ }
142
+
143
+ /* light grey */
144
+ .ajax-load-more-wrap.light-grey .alm-load-more-btn {
145
+ background-color: #efefef;
146
+ color: #787878;
147
+ border: 1px solid #e0e0e0;
148
+ overflow: hidden;
149
+ transition: all 0.075s ease;
150
+ outline: none;
151
+ &:focus,
152
+ &:hover,
153
+ &.loading,
154
+ &.done {
155
+ background-color: #f1f1f1;
156
+ color: #222;
157
+ border-color: #aaaaaa;
158
+ }
159
+ &.loading {
160
+ color: rgba(255, 255, 255, 0) !important;
161
+ outline: none !important;
162
+ background-color: transparent;
163
+ border-color: transparent !important;
164
+ box-shadow: none !important;
165
+ padding-left: 20px;
166
+ &:before {
167
+ margin: 0;
168
+ left: 0;
169
+ top: 0;
170
+ width: 100%;
171
+ height: 100%;
172
+ background-color: transparent;
173
+ background-image: url('../../img/ajax-loader-lg.gif');
174
+ background-size: 25px 25px;
175
+ background-position: center center;
176
+ }
177
+ }
178
+ }
179
+
180
+ /* Blue */
181
+ .ajax-load-more-wrap.blue .alm-load-more-btn {
182
+ background-color: #1b91ca;
183
+ &:hover,
184
+ &.loading,
185
+ &.done {
186
+ background-color: #1b84b7;
187
+ }
188
+ }
189
+
190
+ /* green */
191
+ .ajax-load-more-wrap.green .alm-load-more-btn {
192
+ background-color: #80ca7a;
193
+ &:hover,
194
+ &.loading,
195
+ &.done {
196
+ background-color: #81c17b;
197
+ }
198
+ }
199
+
200
+ /* purple */
201
+ .ajax-load-more-wrap.purple .alm-load-more-btn {
202
+ background-color: #b97eca;
203
+ &:hover,
204
+ &.loading,
205
+ &.done {
206
+ background-color: #a477b1;
207
+ }
208
+ }
209
+
210
+ /* grey */
211
+ .ajax-load-more-wrap.grey .alm-load-more-btn {
212
+ background-color: #a09e9e;
213
+ &:hover,
214
+ &.loading,
215
+ &.done {
216
+ background-color: #888;
217
+ }
218
+ }
219
+
220
+ /* Infinite */
221
+ .ajax-load-more-wrap.infinite {
222
+ .alm-load-more-btn {
223
+ width: 100%;
224
+ background-color: transparent !important;
225
+ background-position: center center;
226
+ background-repeat: no-repeat;
227
+ background-image: url('../../img/spinner.gif');
228
+ border: none !important;
229
+ opacity: 0;
230
+ transition: opacity 0.2s ease;
231
+ box-shadow: none !important;
232
+ overflow: hidden;
233
+ text-indent: -9999px;
234
+ cursor: default !important;
235
+ outline: none !important;
236
+ &:before {
237
+ display: none !important;
238
+ }
239
+ &:focus,
240
+ &:active {
241
+ outline: none;
242
+ }
243
+ &.done {
244
+ opacity: 0;
245
+ }
246
+ &.loading {
247
+ opacity: 1;
248
+ }
249
+ }
250
+ &.skype .alm-load-more-btn {
251
+ background-image: url('../../img/spinner-skype.gif');
252
+ }
253
+ &.ring .alm-load-more-btn {
254
+ background-image: url('../../img/spinner-ring.gif');
255
+ }
256
+ &.fading-blocks .alm-load-more-btn {
257
+ background-image: url('../../img/loader-fading-blocks.gif');
258
+ }
259
+ &.fading-circles .alm-load-more-btn {
260
+ background-image: url('../../img/loader-fading-circles.gif');
261
+ }
262
+ &.chasing-arrows .alm-load-more-btn {
263
+ background-image: url('../../img/spinner-chasing-arrows.gif');
264
+ }
265
+ }
266
+
267
+ /// Horizontal
268
+ .ajax-load-more-wrap.alm-horizontal {
269
+ .alm-btn-wrap {
270
+ display: flex;
271
+ align-items: center;
272
+ padding: 0;
273
+ margin: 0;
274
+ button {
275
+ margin: 0;
276
+ &.done {
277
+ display: none;
278
+ }
279
+ }
280
+ }
281
+ }
core/src/scss/_tableofcontents.scss ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .alm-toc{
2
+ display: flex;
3
+ width: auto;
4
+ padding: 10px 0;
5
+ button{
6
+ background: #f7f7f7;
7
+ border-radius: 4px;
8
+ transition: all 0.15s ease;
9
+ outline: none;
10
+ border: 1px solid #efefef;
11
+ box-shadow: none;
12
+ color: #454545;
13
+ cursor: pointer;
14
+ font-size: 14px;
15
+ font-weight: 500;
16
+ padding: 7px 10px;
17
+ line-height: 1;
18
+ margin: 0 5px 0 0;
19
+ height: auto;
20
+ &:hover,
21
+ &:focus{
22
+ border-color: #ccc;
23
+ color: #222;
24
+ }
25
+ &:hover{
26
+ text-decoration: underline;
27
+ }
28
+ &:focus{
29
+ box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
30
+ }
31
+ }
32
+ }
core/src/scss/_variables.scss ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ $sm: 480px;
2
+ $md: 768px;
3
+ $lg: 1024px;
core/src/scss/ajax-load-more.scss ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * Ajax Load More
3
+ * http://wordpress.org/plugins/ajax-load-more/
4
+ *
5
+ * Copyright 2015-2020 Connekt Media - https://connekthq.com
6
+ * Free to use under the GPLv2 license.
7
+ * http://www.gnu.org/licenses/gpl-2.0.html
8
+ *
9
+ * Author: Darren Cooney
10
+ * Twitter: @KaptonKaos
11
+ * Twitter: @ajaxloadmore
12
+ * Twitter: @connekthq
13
+ */
14
+
15
+ @import './variables';
16
+ @import './loaders';
17
+ @import './listing';
18
+ @import './tableofcontents';
lang/ajax-load-more.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Ajax Load More\n"
5
- "POT-Creation-Date: 2021-01-03 18:31-0500\n"
6
  "PO-Revision-Date: 2018-06-20 13:05-0500\n"
7
  "Last-Translator: Darren Cooney <darren@connekthq.com>\n"
8
  "Language-Team: \n"
@@ -107,7 +107,7 @@ msgid "Applying layout"
107
  msgstr ""
108
 
109
  #: admin/admin.php:502 admin/editor/editor-build.php:72
110
- #: admin/views/repeater-templates.php:446
111
  msgid "Template Updated"
112
  msgstr ""
113
 
@@ -256,7 +256,7 @@ msgstr ""
256
  msgid "Error Writing File"
257
  msgstr ""
258
 
259
- #: admin/admin.php:1198 admin/views/repeater-templates.php:387
260
  msgid "Something went wrong and the data could not be saved."
261
  msgstr ""
262
 
@@ -463,14 +463,14 @@ msgstr ""
463
  #: admin/includes/components/example-list.php:2
464
  #: admin/shortcode-builder/shortcode-builder.php:6
465
  #: admin/views/repeater-templates.php:134
466
- #: admin/views/repeater-templates.php:171
467
  msgid "Collapse All"
468
  msgstr ""
469
 
470
  #: admin/includes/components/example-list.php:2
471
  #: admin/shortcode-builder/shortcode-builder.php:7
472
  #: admin/views/repeater-templates.php:135
473
- #: admin/views/repeater-templates.php:172
474
  msgid "Expand All"
475
  msgstr ""
476
 
@@ -589,11 +589,6 @@ msgstr ""
589
  msgid "Did You Know?"
590
  msgstr ""
591
 
592
- #: admin/includes/cta/extend-theme-repeaters.php:23
593
- #: admin/includes/cta/pro-hero.php:25
594
- msgid "Upgrade Now"
595
- msgstr ""
596
-
597
  #: admin/includes/cta/extend.php:3
598
  msgid ""
599
  "Unlock additional templates with the <a href=\"https://connekthq.com/plugins/"
@@ -606,6 +601,10 @@ msgstr ""
606
  msgid "More Info"
607
  msgstr ""
608
 
 
 
 
 
609
  #: admin/includes/cta/resources.php:2
610
  msgid "Resources"
611
  msgstr ""
@@ -1845,7 +1844,7 @@ msgstr ""
1845
 
1846
  #: admin/shortcode-builder/shortcode-builder.php:66
1847
  #: admin/views/repeater-templates.php:151
1848
- #: admin/views/repeater-templates.php:501
1849
  msgid "Learn More"
1850
  msgstr ""
1851
 
@@ -2809,7 +2808,7 @@ msgid "The library of editable templates for use within your theme"
2809
  msgstr ""
2810
 
2811
  #: admin/views/repeater-templates.php:105
2812
- #: admin/views/repeater-templates.php:270
2813
  msgid "Location"
2814
  msgstr ""
2815
 
@@ -2823,23 +2822,23 @@ msgstr ""
2823
  msgid "Manage Settings"
2824
  msgstr ""
2825
 
2826
- #: admin/views/repeater-templates.php:209
2827
  msgid "Default Template"
2828
  msgstr ""
2829
 
2830
- #: admin/views/repeater-templates.php:218
2831
  msgid "Template Code:"
2832
  msgstr ""
2833
 
2834
- #: admin/views/repeater-templates.php:219
2835
  msgid "Enter the PHP and HTML markup for this template."
2836
  msgstr ""
2837
 
2838
- #: admin/views/repeater-templates.php:252
2839
  msgid "Save Template"
2840
  msgstr ""
2841
 
2842
- #: admin/views/repeater-templates.php:268
2843
  msgid ""
2844
  "It appears you are loading the <a href=\"https://connekthq.com/plugins/ajax-"
2845
  "load-more/docs/repeater-templates/#default-template\" target=\"_blank"
@@ -2848,7 +2847,7 @@ msgid ""
2848
  "your server."
2849
  msgstr ""
2850
 
2851
- #: admin/views/repeater-templates.php:279
2852
  msgid ""
2853
  "Repeater Templates editing has been disabled for this instance of Ajax Load "
2854
  "More. To enable the template editing, please remove the "
@@ -2856,19 +2855,19 @@ msgid ""
2856
  "config.php and then re-activate this plugin."
2857
  msgstr ""
2858
 
2859
- #: admin/views/repeater-templates.php:354
2860
  msgid "Saving template..."
2861
  msgstr ""
2862
 
2863
- #: admin/views/repeater-templates.php:425
2864
  msgid "Updating template..."
2865
  msgstr ""
2866
 
2867
- #: admin/views/repeater-templates.php:496
2868
  msgid "What's a Repeater Template?"
2869
  msgstr ""
2870
 
2871
- #: admin/views/repeater-templates.php:498
2872
  msgid ""
2873
  "A <a href=\"https://connekthq.com/plugins/ajax-load-more/docs/repeater-"
2874
  "templates/\" target=\"_blank\">Repeater Template</a> is a snippet of code "
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Ajax Load More\n"
5
+ "POT-Creation-Date: 2021-01-03 19:25-0500\n"
6
  "PO-Revision-Date: 2018-06-20 13:05-0500\n"
7
  "Last-Translator: Darren Cooney <darren@connekthq.com>\n"
8
  "Language-Team: \n"
107
  msgstr ""
108
 
109
  #: admin/admin.php:502 admin/editor/editor-build.php:72
110
+ #: admin/views/repeater-templates.php:447
111
  msgid "Template Updated"
112
  msgstr ""
113
 
256
  msgid "Error Writing File"
257
  msgstr ""
258
 
259
+ #: admin/admin.php:1198 admin/views/repeater-templates.php:388
260
  msgid "Something went wrong and the data could not be saved."
261
  msgstr ""
262
 
463
  #: admin/includes/components/example-list.php:2
464
  #: admin/shortcode-builder/shortcode-builder.php:6
465
  #: admin/views/repeater-templates.php:134
466
+ #: admin/views/repeater-templates.php:172
467
  msgid "Collapse All"
468
  msgstr ""
469
 
470
  #: admin/includes/components/example-list.php:2
471
  #: admin/shortcode-builder/shortcode-builder.php:7
472
  #: admin/views/repeater-templates.php:135
473
+ #: admin/views/repeater-templates.php:173
474
  msgid "Expand All"
475
  msgstr ""
476
 
589
  msgid "Did You Know?"
590
  msgstr ""
591
 
 
 
 
 
 
592
  #: admin/includes/cta/extend.php:3
593
  msgid ""
594
  "Unlock additional templates with the <a href=\"https://connekthq.com/plugins/"
601
  msgid "More Info"
602
  msgstr ""
603
 
604
+ #: admin/includes/cta/pro-hero.php:25
605
+ msgid "Upgrade Now"
606
+ msgstr ""
607
+
608
  #: admin/includes/cta/resources.php:2
609
  msgid "Resources"
610
  msgstr ""
1844
 
1845
  #: admin/shortcode-builder/shortcode-builder.php:66
1846
  #: admin/views/repeater-templates.php:151
1847
+ #: admin/views/repeater-templates.php:502
1848
  msgid "Learn More"
1849
  msgstr ""
1850
 
2808
  msgstr ""
2809
 
2810
  #: admin/views/repeater-templates.php:105
2811
+ #: admin/views/repeater-templates.php:271
2812
  msgid "Location"
2813
  msgstr ""
2814
 
2822
  msgid "Manage Settings"
2823
  msgstr ""
2824
 
2825
+ #: admin/views/repeater-templates.php:210
2826
  msgid "Default Template"
2827
  msgstr ""
2828
 
2829
+ #: admin/views/repeater-templates.php:219
2830
  msgid "Template Code:"
2831
  msgstr ""
2832
 
2833
+ #: admin/views/repeater-templates.php:220
2834
  msgid "Enter the PHP and HTML markup for this template."
2835
  msgstr ""
2836
 
2837
+ #: admin/views/repeater-templates.php:253
2838
  msgid "Save Template"
2839
  msgstr ""
2840
 
2841
+ #: admin/views/repeater-templates.php:269
2842
  msgid ""
2843
  "It appears you are loading the <a href=\"https://connekthq.com/plugins/ajax-"
2844
  "load-more/docs/repeater-templates/#default-template\" target=\"_blank"
2847
  "your server."
2848
  msgstr ""
2849
 
2850
+ #: admin/views/repeater-templates.php:280
2851
  msgid ""
2852
  "Repeater Templates editing has been disabled for this instance of Ajax Load "
2853
  "More. To enable the template editing, please remove the "
2855
  "config.php and then re-activate this plugin."
2856
  msgstr ""
2857
 
2858
+ #: admin/views/repeater-templates.php:355
2859
  msgid "Saving template..."
2860
  msgstr ""
2861
 
2862
+ #: admin/views/repeater-templates.php:426
2863
  msgid "Updating template..."
2864
  msgstr ""
2865
 
2866
+ #: admin/views/repeater-templates.php:497
2867
  msgid "What's a Repeater Template?"
2868
  msgstr ""
2869
 
2870
+ #: admin/views/repeater-templates.php:499
2871
  msgid ""
2872
  "A <a href=\"https://connekthq.com/plugins/ajax-load-more/docs/repeater-"
2873
  "templates/\" target=\"_blank\">Repeater Template</a> is a snippet of code "