Version Description
- Fix some bugs
- Adjust styles
Download this release
Release Info
Developer | PT Guy |
Plugin | Content Views – Post Grid & List for WordPress |
Version | 1.0.1 |
Comparing to | |
See all releases |
Version 1.0.1
- .htaccess +3 -0
- LICENSE.txt +339 -0
- README.txt +137 -0
- admin/assets/css/admin.css +185 -0
- admin/assets/css/menu.css +14 -0
- admin/assets/css/wp.css +18 -0
- admin/assets/css/wp38.css +25 -0
- admin/assets/images/icon.png +0 -0
- admin/assets/js/admin.js +683 -0
- admin/content-views-admin.php +402 -0
- admin/includes/options.php +395 -0
- admin/views/admin.php +35 -0
- admin/views/list.php +14 -0
- admin/views/view.php +542 -0
- assets/bootstrap-paginator/bootstrap-paginator.min.js +18 -0
- assets/bootstrap/css/bootstrap.min.css +7 -0
- assets/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- assets/bootstrap/fonts/glyphicons-halflings-regular.svg +229 -0
- assets/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- assets/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- assets/bootstrap/js/bootstrap.min.js +7 -0
- assets/ie-fix/html5shiv.min.js +1 -0
- assets/ie-fix/respond.js +224 -0
- assets/select2/select2-bootstrap.min.css +1 -0
- assets/select2/select2-spinner.gif +0 -0
- assets/select2/select2.min.css +1 -0
- assets/select2/select2.min.js +22 -0
- assets/select2/select2.png +0 -0
- content-views.php +91 -0
- includes/assets.php +197 -0
- includes/defines.php +36 -0
- includes/functions.php +984 -0
- includes/hooks.php +119 -0
- includes/html-viewtype.php +272 -0
- includes/html.php +828 -0
- includes/settings.php +734 -0
- includes/update.php +19 -0
- includes/values.php +447 -0
- languages/plugin-name.pot +31 -0
- public/assets/css/assets.css +1 -0
- public/assets/css/public.css +194 -0
- public/assets/js/assets.js +1 -0
- public/assets/js/public.js +217 -0
- public/content-views.php +322 -0
- public/templates/_view_type_/css/main.css +10 -0
- public/templates/_view_type_/html/main.php +42 -0
- public/templates/_view_type_/js/main.js +10 -0
- public/templates/collapsible/html/main.php +66 -0
- public/templates/grid/html/main.php +40 -0
- public/templates/readme.txt +19 -0
- public/templates/scrollable/html/main.php +31 -0
- uninstall.php +21 -0
.htaccess
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# Disable Indexing
|
3 |
+
Options -Indexes
|
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
ADDED
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Content Views - Query and display posts, pages without coding ===
|
2 |
+
Contributors: pt-guy
|
3 |
+
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JGUF974QBRKQE
|
4 |
+
Tags: post, posts, page, pages, query, queries, search, display, show, shortcode, thumbnail, title, content, excerpt, meta, date, author, term, taxonomy, grid, scrollable, collapsible, list, slide, layout, ui
|
5 |
+
Requires at least: 3.3
|
6 |
+
Tested up to: 3.9.1
|
7 |
+
Stable tag: 1.0.1
|
8 |
+
License: GPLv2 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
+
|
11 |
+
Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
[Content Views](http://www.wordpressquery.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Visit Content Views website") is a WordPress plugin helps you to query and display posts, pages in different kind of **responsive** layouts (grid, scrollable list, collapsible list), in very 3 simple steps:
|
16 |
+
|
17 |
+
* Step 1 : Select criteria to query posts, pages
|
18 |
+
* Step 2 : Select layout which you want to display your queried entries
|
19 |
+
* Step 3 : Paste shortcode **[pt_view id="UNIQUE_ID"]** to editor of a post, page or a Text widget where you want to show your desired content. If you are a developer, you can **`<?php echo do_shortcode('[pt_view id="UNIQUE_ID"]'); ?>`** in theme of your WordPress site. (Please check FAQ to know how to get UNIQUE_ID of View)
|
20 |
+
|
21 |
+
= And here is your power with this plugin: =
|
22 |
+
|
23 |
+
**in Step 1, you can:**
|
24 |
+
|
25 |
+
* query & display a single post, page
|
26 |
+
* query & display multiple posts, pages
|
27 |
+
* query posts, pages written by, not written by any authors
|
28 |
+
* query posts, pages associate with, don't associate with tags, categories
|
29 |
+
* query posts, pages in any status (publish, draft, private...)
|
30 |
+
* sort posts, pages by Id, Title, Created date, Modified date in ascending, descending order
|
31 |
+
* query posts, pages which contain a specific keyword
|
32 |
+
|
33 |
+
**in Step 2, you can:**
|
34 |
+
|
35 |
+
* Select a layout to show queried posts, pages: Grid, Collapsible List, Scrollable List. More awesome layouts are available in **[Content Views PRO](http://www.wordpressquery.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Content Views Pro plugin")**
|
36 |
+
* Choose a layout format of each item (item is the output of a post, page at frontend): 1 column, 2 columns
|
37 |
+
* Select fields to show (thumbnail, title, content, meta fields)
|
38 |
+
* Select size of thumbnail
|
39 |
+
* Show full content, or an excerpt with specific length
|
40 |
+
* Select meta fields to show (date, author, term [categories, tags], comment count)
|
41 |
+
* Enable/Disable pagination
|
42 |
+
* Open an item in new tab, current tab
|
43 |
+
|
44 |
+
Also, you can import/export 'View' to use in other WordPress sites (Please check **FAQ** tab to know what is 'View')
|
45 |
+
|
46 |
+
|
47 |
+
= More amazing features: =
|
48 |
+
|
49 |
+
* Be able to query custom post types (Woocommerce products, FAQ...)
|
50 |
+
* Advanced output & settings of Grid, Collapsible List, Scrollable List layout
|
51 |
+
* Additional layouts: Pinterest, Timeline
|
52 |
+
* Drag & drop to change display order of fields (thumbnail, title, content, meta fields)
|
53 |
+
* Customize Font settings
|
54 |
+
* More Pagination options
|
55 |
+
* And much more...
|
56 |
+
|
57 |
+
are available in **[Content Views PRO](http://www.wordpressquery.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Content Views Pro plugin")**
|
58 |
+
|
59 |
+
|
60 |
+
== Installation ==
|
61 |
+
|
62 |
+
= Using The WordPress Dashboard =
|
63 |
+
|
64 |
+
1. Navigate to the 'Add New' in the plugins dashboard
|
65 |
+
2. Search for 'Content Views'
|
66 |
+
3. Click 'Install Now'
|
67 |
+
4. Activate the plugin on the Plugin dashboard
|
68 |
+
|
69 |
+
= Uploading in WordPress Dashboard =
|
70 |
+
|
71 |
+
1. Navigate to the 'Add New' in the plugins dashboard
|
72 |
+
2. Navigate to the 'Upload' area
|
73 |
+
3. Select `pt-content-views.zip` from your computer
|
74 |
+
4. Click 'Install Now'
|
75 |
+
5. Activate the plugin in the Plugin dashboard
|
76 |
+
|
77 |
+
= Using FTP =
|
78 |
+
|
79 |
+
1. Download `pt-content-views.zip`
|
80 |
+
2. Extract the `pt-content-views` directory to your computer
|
81 |
+
3. Upload the `pt-content-views` directory to the `/wp-content/plugins/` directory
|
82 |
+
4. Activate the plugin in the Plugin dashboard
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
== Frequently Asked Questions ==
|
87 |
+
|
88 |
+
= How can I start? =
|
89 |
+
|
90 |
+
In left menu of your Admin dashboard, click Content View Settings > Add View
|
91 |
+
|
92 |
+
= What is 'View'? =
|
93 |
+
|
94 |
+
'View' is a custom post type which Content Views uses to store all settings to query & display your posts
|
95 |
+
|
96 |
+
= How can I see all my Views? =
|
97 |
+
|
98 |
+
In left menu of your Admin dashboard, click Content View Settings > All Views
|
99 |
+
|
100 |
+
= How can I edit a View? =
|
101 |
+
|
102 |
+
Firstly, you should go to "All Views" page (please check above question). Then click on Title of View you want to edit. You will be forwarded to editing page of View.
|
103 |
+
|
104 |
+
= How to get UNIQUE_ID of View? =
|
105 |
+
|
106 |
+
You can get View ID in URL of editing page of View (please check above question). The url has following format: http://your_domain/wp-admin/admin.php?page=content-views-add&id=UNIQUE_ID
|
107 |
+
|
108 |
+
= How many Views I can create? =
|
109 |
+
|
110 |
+
You can create Unlimited Views, in Unlimited websites
|
111 |
+
|
112 |
+
|
113 |
+
== Screenshots ==
|
114 |
+
|
115 |
+
1. Content Views plugin overview
|
116 |
+
2. Display Setting form to customize output of queried posts at frontend
|
117 |
+
3. Query and display in Grid layout (Show Title, Thumbnail)
|
118 |
+
4. Query and display in Grid layout (Show Title, Thumbnail, Content, Meta fields), with Pagination
|
119 |
+
5. Query and display in Collapsible List
|
120 |
+
6. Query and display in Scrollable List
|
121 |
+
|
122 |
+
|
123 |
+
|
124 |
+
== Changelog ==
|
125 |
+
|
126 |
+
= 1.0.1 =
|
127 |
+
* Fix some bugs
|
128 |
+
* Adjust styles
|
129 |
+
|
130 |
+
= 1.0.0 =
|
131 |
+
* Initial release
|
132 |
+
|
133 |
+
|
134 |
+
|
135 |
+
== Upgrade Notice ==
|
136 |
+
|
137 |
+
Fix some bugs. Adjust styles.
|
admin/assets/css/admin.css
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Common styles for WP admin
|
3 |
+
*
|
4 |
+
* @package PT_Content_Views_Admin
|
5 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
6 |
+
* @license GPL-2.0+
|
7 |
+
* @link http://example.com
|
8 |
+
* @copyright 2014 Palace Of Themes
|
9 |
+
*/
|
10 |
+
|
11 |
+
/* Overwrite WP */
|
12 |
+
.update-nag {
|
13 |
+
display: none;
|
14 |
+
}
|
15 |
+
|
16 |
+
/* Fix small error when use Bootstrap */
|
17 |
+
html {
|
18 |
+
background: none;
|
19 |
+
}
|
20 |
+
|
21 |
+
.wp-color-result {
|
22 |
+
height: 24px;
|
23 |
+
}
|
24 |
+
|
25 |
+
.pt-wrap .font-color .input-group {
|
26 |
+
width: 100px;
|
27 |
+
float: left;
|
28 |
+
margin-right: 20px;
|
29 |
+
}
|
30 |
+
|
31 |
+
.pt-wrap select {
|
32 |
+
height: 34px !important;
|
33 |
+
}
|
34 |
+
|
35 |
+
.pt-wrap .text-muted {
|
36 |
+
clear: both;
|
37 |
+
margin: 4px 0;
|
38 |
+
float: left;
|
39 |
+
}
|
40 |
+
|
41 |
+
/* Overwrite Bootstrap */
|
42 |
+
.form-control:focus {
|
43 |
+
border-color: #66afe9 !important;
|
44 |
+
outline: 0;
|
45 |
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6) !important;
|
46 |
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6) !important;
|
47 |
+
}
|
48 |
+
|
49 |
+
.form-horizontal .control-label {
|
50 |
+
text-align: left !important;
|
51 |
+
}
|
52 |
+
|
53 |
+
.nav-tabs a {
|
54 |
+
font-weight: 600;
|
55 |
+
font-size: 1.3em;
|
56 |
+
}
|
57 |
+
|
58 |
+
/* Other settings */
|
59 |
+
.hide {
|
60 |
+
display: none;
|
61 |
+
}
|
62 |
+
|
63 |
+
#pt-cv-form-view *, .preview-wrapper label {
|
64 |
+
font-size: 14px;
|
65 |
+
}
|
66 |
+
|
67 |
+
.pt-wrap h2 {
|
68 |
+
margin-bottom: 20px;
|
69 |
+
}
|
70 |
+
|
71 |
+
.pt-wrap .tab-content {
|
72 |
+
margin-top: 20px;
|
73 |
+
}
|
74 |
+
|
75 |
+
.pt-wrap .form-group.pt-form-group {
|
76 |
+
margin-bottom: 5px;
|
77 |
+
}
|
78 |
+
|
79 |
+
.pt-cv-color {
|
80 |
+
width: 100px !important;
|
81 |
+
}
|
82 |
+
|
83 |
+
/* Group type */
|
84 |
+
.panel-group .pt-cv-group {
|
85 |
+
margin-top: 10px;
|
86 |
+
}
|
87 |
+
|
88 |
+
.pt-cv-group .form-group {
|
89 |
+
margin-bottom: 6px;
|
90 |
+
}
|
91 |
+
|
92 |
+
.pt-cv-group .panel-body {
|
93 |
+
padding: 10px 15px;
|
94 |
+
}
|
95 |
+
|
96 |
+
.pt-cv-group .control-label {
|
97 |
+
font-weight: 400;
|
98 |
+
}
|
99 |
+
|
100 |
+
.pt-cv-group .checkbox,
|
101 |
+
.pt-cv-w50 .pt-form-group {
|
102 |
+
width: 50%;
|
103 |
+
float: left;
|
104 |
+
}
|
105 |
+
|
106 |
+
.pt-cv-group .radio {
|
107 |
+
/* width: 33%;
|
108 |
+
float: left;
|
109 |
+
margin-bottom: 10px !important;*/
|
110 |
+
}
|
111 |
+
|
112 |
+
.pt-cv-group .radio img {
|
113 |
+
height: 100px;
|
114 |
+
}
|
115 |
+
|
116 |
+
.pt-cv-group .checkbox {
|
117 |
+
background: none;
|
118 |
+
}
|
119 |
+
|
120 |
+
.pt-cv-no-panel {
|
121 |
+
margin-top: 0px;
|
122 |
+
}
|
123 |
+
|
124 |
+
.pt-cv-text {
|
125 |
+
margin-top: 7px;
|
126 |
+
}
|
127 |
+
|
128 |
+
.pt-wrap .input-group {
|
129 |
+
width: 200px;
|
130 |
+
}
|
131 |
+
|
132 |
+
/* Accordion */
|
133 |
+
.pt-cv-group .pt-accordion .panel-heading {
|
134 |
+
cursor: pointer;
|
135 |
+
padding-left: 30px;
|
136 |
+
}
|
137 |
+
|
138 |
+
.pt-cv-group .clickable {
|
139 |
+
cursor: pointer;
|
140 |
+
}
|
141 |
+
|
142 |
+
.pt-cv-group .panel-heading span {
|
143 |
+
margin-top: -20px;
|
144 |
+
font-size: 15px;
|
145 |
+
}
|
146 |
+
|
147 |
+
.pt-cv-group-activate .panel-body {
|
148 |
+
background: #FFCFCF;
|
149 |
+
}
|
150 |
+
|
151 |
+
/* Preview */
|
152 |
+
#pt-cv-preview-box {
|
153 |
+
margin-bottom: 5px;
|
154 |
+
height: 300px;
|
155 |
+
padding: 20px;
|
156 |
+
position: relative;
|
157 |
+
overflow-y: scroll;
|
158 |
+
overflow-x: hidden;
|
159 |
+
}
|
160 |
+
|
161 |
+
#pt-cv-preview-box + .text-muted {
|
162 |
+
margin-top: 8px;
|
163 |
+
}
|
164 |
+
|
165 |
+
#pt-cv-show-preview {
|
166 |
+
position: fixed;
|
167 |
+
right: 20px;
|
168 |
+
bottom: 140px;
|
169 |
+
z-index: 1001;
|
170 |
+
}
|
171 |
+
|
172 |
+
/* Field dislay */
|
173 |
+
.pt-cv-bg-none {
|
174 |
+
background: #fff;
|
175 |
+
}
|
176 |
+
|
177 |
+
/* Sortable */
|
178 |
+
.pt-wrap .ui-sortable {
|
179 |
+
background: #FFF9D7;
|
180 |
+
}
|
181 |
+
|
182 |
+
/* Custom css for Settings Group/Option */
|
183 |
+
#pt-cv-group-excerpt-settings {
|
184 |
+
margin-bottom: 20px;
|
185 |
+
}
|
admin/assets/css/menu.css
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Overwrite WP style : make the icon look clear on WP admin menu
|
3 |
+
*
|
4 |
+
* @package PT_Content_Views_Admin
|
5 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
6 |
+
* @license GPL-2.0+
|
7 |
+
* @link http://example.com
|
8 |
+
* @copyright 2014 Palace Of Themes
|
9 |
+
*/
|
10 |
+
|
11 |
+
#adminmenu #toplevel_page_content-views .menu-icon-generic div.wp-menu-image:before {
|
12 |
+
background: url(../images/icon.png) no-repeat 0 7px;
|
13 |
+
content: '' !important;
|
14 |
+
}
|
admin/assets/css/wp.css
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Fix css error for Wordpress <= 3.7
|
3 |
+
*
|
4 |
+
* @package PT_Content_Views_Admin
|
5 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
6 |
+
* @license GPL-2.0+
|
7 |
+
* @link http://example.com
|
8 |
+
* @copyright 2014 Palace Of Themes
|
9 |
+
*/
|
10 |
+
|
11 |
+
.pt-wrap label input[type=radio],
|
12 |
+
.pt-wrap label input[type=checkbox] {
|
13 |
+
margin-top: 4px !important;
|
14 |
+
}
|
15 |
+
|
16 |
+
/* Screen Resolutions */
|
17 |
+
@media screen and (max-width: 782px) {
|
18 |
+
}
|
admin/assets/css/wp38.css
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Fix css error for Wordpress 3.8
|
3 |
+
*
|
4 |
+
* @package PT_Content_Views_Admin
|
5 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
6 |
+
* @license GPL-2.0+
|
7 |
+
* @link http://example.com
|
8 |
+
* @copyright 2014 Palace Of Themes
|
9 |
+
*/
|
10 |
+
|
11 |
+
.pt-wrap input[type=radio], input[type=checkbox] {
|
12 |
+
margin-top: 2px !important;
|
13 |
+
}
|
14 |
+
|
15 |
+
/* Screen Resolutions */
|
16 |
+
@media screen and (max-width: 782px) {
|
17 |
+
.pt-wrap label {
|
18 |
+
margin-left: 6px;
|
19 |
+
}
|
20 |
+
|
21 |
+
.pt-wrap label input[type=radio],
|
22 |
+
.pt-wrap label input[type=checkbox] {
|
23 |
+
margin-top: -2px !important;
|
24 |
+
}
|
25 |
+
}
|
admin/assets/images/icon.png
ADDED
Binary file
|
admin/assets/js/admin.js
ADDED
@@ -0,0 +1,683 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Main script file for WP admin
|
3 |
+
*
|
4 |
+
* @package PT_Content_Views_Admin
|
5 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
6 |
+
* @license GPL-2.0+
|
7 |
+
* @link http://example.com
|
8 |
+
* @copyright 2014 Palace Of Themes
|
9 |
+
*/
|
10 |
+
|
11 |
+
( function ($) {
|
12 |
+
"use strict";
|
13 |
+
|
14 |
+
$.PT_CV_Admin = $.PT_CV_Admin || { };
|
15 |
+
|
16 |
+
$.PT_CV_Admin = function (options) {
|
17 |
+
this.options = options;
|
18 |
+
this.options.onload = 1;
|
19 |
+
this.options.scroll_time = 500;
|
20 |
+
this.options.can_preview = 1;
|
21 |
+
};
|
22 |
+
|
23 |
+
$.PT_CV_Admin.prototype = {
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Toggle panel when click Show/Hide icon on Heading
|
27 |
+
*
|
28 |
+
* @param {type} $selector
|
29 |
+
* @returns {undefined}
|
30 |
+
*/
|
31 |
+
_toggle_panel : function ($selector) {
|
32 |
+
$('body').on('click', $selector, function (e) {
|
33 |
+
var $heading = $(this);
|
34 |
+
var $span = $heading.find('span.clickable');
|
35 |
+
var time = 100;
|
36 |
+
|
37 |
+
if (!$span.hasClass('panel-collapsed')) {
|
38 |
+
$heading.next('.panel-body').slideUp(time);
|
39 |
+
$span.addClass('panel-collapsed');
|
40 |
+
$span.find('i').removeClass('glyphicon-minus').addClass('glyphicon-plus');
|
41 |
+
} else {
|
42 |
+
$heading.next('.panel-body').slideDown(time);
|
43 |
+
$span.removeClass('panel-collapsed');
|
44 |
+
$span.find('i').removeClass('glyphicon-plus').addClass('glyphicon-minus');
|
45 |
+
}
|
46 |
+
});
|
47 |
+
},
|
48 |
+
/**
|
49 |
+
* Toggle Taxonomy Relation setting on page load & on change
|
50 |
+
*
|
51 |
+
* @returns void
|
52 |
+
*/
|
53 |
+
_toggle_taxonomy_relation : function () {
|
54 |
+
var $self = this;
|
55 |
+
var _prefix = $self.options._prefix;
|
56 |
+
|
57 |
+
var $taxonomy_relation = $('.' + _prefix + 'taxonomy-relation').parent().parent('.form-group');
|
58 |
+
|
59 |
+
// Taxonomies Settings wrapper div
|
60 |
+
var $wrap_taxonomies = $('#' + _prefix + 'group-taxonomy');
|
61 |
+
|
62 |
+
// Get Taxonomy checkbox item
|
63 |
+
var taxonomy_item = '.' + _prefix + 'taxonomy-item';
|
64 |
+
|
65 |
+
// Run on page load
|
66 |
+
$self._do_toggle_taxonomy_relation($taxonomy_relation, $wrap_taxonomies);
|
67 |
+
|
68 |
+
// Run on change
|
69 |
+
$(taxonomy_item).change(function () {
|
70 |
+
$self._do_toggle_taxonomy_relation($taxonomy_relation, $wrap_taxonomies);
|
71 |
+
});
|
72 |
+
},
|
73 |
+
/**
|
74 |
+
* Toggle Taxonomy Relation setting by number of selected taxonomies
|
75 |
+
*
|
76 |
+
* @returns void
|
77 |
+
*/
|
78 |
+
_do_toggle_taxonomy_relation: function ($taxonomy_relation, $wrap_taxonomies) {
|
79 |
+
// If there is no taxonomies
|
80 |
+
if ($wrap_taxonomies.find('.pt-params .checkbox').filter(function () {
|
81 |
+
return !$(this).hasClass('hidden') && $(this).find('input:checked').length;
|
82 |
+
}).length > 1) {
|
83 |
+
$taxonomy_relation.removeClass('hidden');
|
84 |
+
} else {
|
85 |
+
$taxonomy_relation.addClass('hidden');
|
86 |
+
}
|
87 |
+
},
|
88 |
+
/**
|
89 |
+
* Color picker element
|
90 |
+
*
|
91 |
+
* @param {type} picker_el
|
92 |
+
* @returns {undefined}
|
93 |
+
*/
|
94 |
+
_color_picker : function (picker_el) {
|
95 |
+
$(picker_el).click(function (e) {
|
96 |
+
var colorPicker = $(this).next('div');
|
97 |
+
var input = $(this);
|
98 |
+
$(colorPicker).farbtastic(input);
|
99 |
+
colorPicker.show();
|
100 |
+
e.preventDefault();
|
101 |
+
$(document).mousedown(function () {
|
102 |
+
$(colorPicker).hide();
|
103 |
+
});
|
104 |
+
});
|
105 |
+
},
|
106 |
+
/**
|
107 |
+
* Get field value, depends on field type & its parent is show/hide
|
108 |
+
*
|
109 |
+
* @param {type} el : string to selector
|
110 |
+
* @returns {undefined}
|
111 |
+
*/
|
112 |
+
_get_field_val : function (el) {
|
113 |
+
var $this = $(el);
|
114 |
+
var value = $(el).val();
|
115 |
+
|
116 |
+
if ($this.is(':checkbox') || $this.is(':radio')) {
|
117 |
+
value = $(el + ':checked').val();
|
118 |
+
}
|
119 |
+
|
120 |
+
return value;
|
121 |
+
},
|
122 |
+
/**
|
123 |
+
* Do toggle all dependency groups
|
124 |
+
*
|
125 |
+
* @param {type} $toggle_data_js_
|
126 |
+
* @returns {undefined}
|
127 |
+
*/
|
128 |
+
dependence_do_all : function ($toggle_data_js_) {
|
129 |
+
var $self = this;
|
130 |
+
var _prefix = $self.options._prefix;
|
131 |
+
var $toggle_data_js = $.parseJSON($toggle_data_js_);
|
132 |
+
$.each($toggle_data_js, function (idx, obj) {
|
133 |
+
// Obj_sub: an object contains (dependence_id, operator, expect_val)
|
134 |
+
$.each(obj, function (key, obj_sub) {
|
135 |
+
// Get name of depended element (which other elements depend on it)
|
136 |
+
var el_name = _prefix + key;
|
137 |
+
|
138 |
+
var el = "[name='" + el_name + "']";
|
139 |
+
|
140 |
+
// Run on page load
|
141 |
+
$self._dependence_group($self._get_field_val(el), obj_sub);
|
142 |
+
|
143 |
+
// Run on change
|
144 |
+
$(el).change(function () {
|
145 |
+
$self._dependence_group($self._get_field_val(el), obj_sub);
|
146 |
+
});
|
147 |
+
});
|
148 |
+
});
|
149 |
+
},
|
150 |
+
/**
|
151 |
+
* Toggle each dependency group
|
152 |
+
* @param {type} this_val : current value of depended element (which other elements depend on it)
|
153 |
+
* @param {type} obj_sub : an object contains (dependence_id, expect_val, operator)
|
154 |
+
* @returns {undefined}
|
155 |
+
*/
|
156 |
+
_dependence_group : function (this_val, obj_sub) {
|
157 |
+
var $self = this;
|
158 |
+
$.each(obj_sub, function (key, data) {
|
159 |
+
$self._dependence_element(data[0], this_val, data[2], data[1]);
|
160 |
+
});
|
161 |
+
},
|
162 |
+
/**
|
163 |
+
* Toggle each dependency element
|
164 |
+
*
|
165 |
+
* @param {type} dependence_id : id of group A which depends on an element B
|
166 |
+
* @param {type} this_val : current value of B
|
167 |
+
* @param {type} operator : operator to comparing A's value & B's value : =, >, < ...
|
168 |
+
* @param {type} expect_val : expect value of B to show A group
|
169 |
+
* @returns {undefined}
|
170 |
+
*/
|
171 |
+
_dependence_element : function (dependence_id, this_val, operator, expect_val) {
|
172 |
+
|
173 |
+
var dependence_el = $("#" + dependence_id);
|
174 |
+
var pass = 0;
|
175 |
+
switch (operator) {
|
176 |
+
case "=":
|
177 |
+
{
|
178 |
+
if (typeof expect_val === 'string')
|
179 |
+
expect_val = [expect_val];
|
180 |
+
pass = ( $.inArray(this_val, expect_val) >= 0 );
|
181 |
+
}
|
182 |
+
break;
|
183 |
+
case "!=":
|
184 |
+
{
|
185 |
+
if (typeof expect_val === 'string')
|
186 |
+
expect_val = [expect_val];
|
187 |
+
pass = ( $.inArray(this_val, expect_val) < 0 );
|
188 |
+
}
|
189 |
+
break;
|
190 |
+
default :
|
191 |
+
if (typeof expect_val !== 'array')
|
192 |
+
pass = eval("this_val " + operator + " expect_val");
|
193 |
+
break;
|
194 |
+
|
195 |
+
}
|
196 |
+
var action = '';
|
197 |
+
var result = 0;
|
198 |
+
if (pass) {
|
199 |
+
dependence_el.removeClass('hidden');
|
200 |
+
|
201 |
+
action = 'remove';
|
202 |
+
result = !dependence_el.hasClass('hidden');
|
203 |
+
} else {
|
204 |
+
dependence_el.addClass('hidden');
|
205 |
+
|
206 |
+
action = 'add';
|
207 |
+
result = dependence_el.hasClass('hidden');
|
208 |
+
}
|
209 |
+
|
210 |
+
// Log if something is wrong
|
211 |
+
if (!result)
|
212 |
+
console.log(dependence_id, this_val, operator, expect_val, action);
|
213 |
+
},
|
214 |
+
/**
|
215 |
+
* Toggle a group inside Panel group when check/uncheck a checkbox inside checboxes list
|
216 |
+
*
|
217 |
+
* @param {type} selector
|
218 |
+
* @param {type} id_prefix
|
219 |
+
* @returns {undefined}
|
220 |
+
*/
|
221 |
+
toggle_group : function (selector, id_prefix) {
|
222 |
+
var $self = this;
|
223 |
+
// Run on page load
|
224 |
+
$(selector).each(function () {
|
225 |
+
$self._toggle_each_group($(this), id_prefix);
|
226 |
+
});
|
227 |
+
// Run on change
|
228 |
+
$(selector).each(function () {
|
229 |
+
$(this).change(function () {
|
230 |
+
$self._toggle_each_group($(this), id_prefix);
|
231 |
+
});
|
232 |
+
});
|
233 |
+
},
|
234 |
+
/**
|
235 |
+
* Toggle group depends on selector value
|
236 |
+
*
|
237 |
+
* @param {type} $this
|
238 |
+
* @param {type} id_prefix
|
239 |
+
* @returns {undefined}
|
240 |
+
*/
|
241 |
+
_toggle_each_group : function ($this, id_prefix) {
|
242 |
+
var $self = this;
|
243 |
+
var _prefix = $self.options._prefix;
|
244 |
+
if ($this.is('select') || ( ( $this.is(':checkbox') || $this.is(':radio') ) && $this.is(':checked') )) {
|
245 |
+
// Get id of element A which needs to toggle
|
246 |
+
var toggle_id = '#' + id_prefix + $this.val();
|
247 |
+
|
248 |
+
// Get siblings groups of A
|
249 |
+
var other_groups = $(toggle_id).parent().children('.' + _prefix + 'group').not(toggle_id);
|
250 |
+
|
251 |
+
if ($(toggle_id).hasClass(_prefix + 'only-one')) {
|
252 |
+
// Hide other group in a same Panel group
|
253 |
+
other_groups.addClass('hidden');
|
254 |
+
} else {
|
255 |
+
}
|
256 |
+
|
257 |
+
// Show group
|
258 |
+
$(toggle_id).removeClass('hidden');
|
259 |
+
|
260 |
+
// Show the content
|
261 |
+
$(toggle_id).find('.panel-body').show();
|
262 |
+
|
263 |
+
// Scroll to
|
264 |
+
if (!$self.options.onload && !$(toggle_id).hasClass(_prefix + 'no-animation') && $(toggle_id).offset()) {
|
265 |
+
$('html, body').animate({
|
266 |
+
scrollTop: $(toggle_id).offset().top - 20
|
267 |
+
}, $self.options.scroll_time);
|
268 |
+
}
|
269 |
+
|
270 |
+
// Highlight color
|
271 |
+
var activate_group = _prefix + 'group-activate';
|
272 |
+
$(toggle_id).addClass(activate_group);
|
273 |
+
|
274 |
+
// Remove highlight color
|
275 |
+
setTimeout(function () {
|
276 |
+
$(toggle_id).removeClass(activate_group);
|
277 |
+
}, 800);
|
278 |
+
|
279 |
+
} else {
|
280 |
+
$('#' + id_prefix + $this.val()).addClass('hidden');
|
281 |
+
}
|
282 |
+
},
|
283 |
+
/**
|
284 |
+
* Custom function for 'Content Type'
|
285 |
+
*
|
286 |
+
* @returns {undefined}
|
287 |
+
*/
|
288 |
+
_content_type : function () {
|
289 |
+
var $self = this;
|
290 |
+
var _prefix = $self.options._prefix;
|
291 |
+
|
292 |
+
// Taxonomies Settings wrapper div
|
293 |
+
var $wrap_taxonomies = $('#' + _prefix + 'group-taxonomy');
|
294 |
+
|
295 |
+
// Order Advanced Settings box
|
296 |
+
var $order_advance_settings = $('#' + _prefix + 'group-order #' + _prefix + 'group-advanced');
|
297 |
+
|
298 |
+
// Append <div> : "There is no taxonomy for selected content type" before description of Taxonomies
|
299 |
+
var no_taxonomy_id = _prefix + 'no-taxonomy';
|
300 |
+
var no_taxonomy_class = _prefix + 'text';
|
301 |
+
$wrap_taxonomies.find('.text-muted').first().before('<div id="' + no_taxonomy_id + '" class="' + no_taxonomy_class + '">' + PT_CV_ADMIN.text.no_taxonomy + '</div>');
|
302 |
+
var no_taxonomy = $('#' + no_taxonomy_id);
|
303 |
+
|
304 |
+
// Hide all Taxonomies at beginning
|
305 |
+
var fn_taxonomy_hide = function (taxonomies) {
|
306 |
+
taxonomies.each(function () {
|
307 |
+
$(this).parents('.checkbox').addClass('hidden');
|
308 |
+
});
|
309 |
+
// Hide no taxonomy div
|
310 |
+
no_taxonomy.addClass('hidden');
|
311 |
+
|
312 |
+
// Hide Order Advanced Settings box
|
313 |
+
$order_advance_settings.addClass('hidden');
|
314 |
+
|
315 |
+
// Hide Terms group
|
316 |
+
$('.panel-group.terms').find('.' + _prefix + 'group').addClass('hidden');
|
317 |
+
};
|
318 |
+
var $taxonomies = $('.' + _prefix + 'taxonomy-item');
|
319 |
+
fn_taxonomy_hide($taxonomies);
|
320 |
+
|
321 |
+
// Create function to handle
|
322 |
+
var fn_content_type = function (this_val, is_change) {
|
323 |
+
if ( typeof this_val === 'undefined' ) {
|
324 |
+
return;
|
325 |
+
}
|
326 |
+
|
327 |
+
if (is_change) {
|
328 |
+
// Uncheck all checkbox of taxonomies
|
329 |
+
$taxonomies.attr('checked', false);
|
330 |
+
|
331 |
+
// Toggle Taxonomy Relation setting
|
332 |
+
var $taxonomy_relation = $('.' + _prefix + 'taxonomy-relation').parent().parent('.form-group');
|
333 |
+
$self._do_toggle_taxonomy_relation($taxonomy_relation, $wrap_taxonomies);
|
334 |
+
}
|
335 |
+
|
336 |
+
// Show taxonomies which theirs value have this format {this_val}_
|
337 |
+
if (this_val !== '') {
|
338 |
+
fn_taxonomy_hide($taxonomies);
|
339 |
+
$taxonomies.filter(function () {
|
340 |
+
var val = $(this).val();
|
341 |
+
return val.substr(0, this_val.length) === this_val;
|
342 |
+
}).parents('.checkbox').removeClass('hidden');
|
343 |
+
}
|
344 |
+
|
345 |
+
// Show Category if Content Type = Post
|
346 |
+
if (this_val === 'post') {
|
347 |
+
$taxonomies.filter(function () {
|
348 |
+
var val = $(this).val();
|
349 |
+
return val === 'category';
|
350 |
+
}).parents('.checkbox').removeClass('hidden');
|
351 |
+
}
|
352 |
+
|
353 |
+
// Show there is no taxonomies
|
354 |
+
if ($wrap_taxonomies.find('.pt-params .checkbox').filter(function () {
|
355 |
+
return !$(this).hasClass('hidden');
|
356 |
+
}).length === 0) {
|
357 |
+
// Show no taxonomy div
|
358 |
+
no_taxonomy.removeClass('hidden');
|
359 |
+
}
|
360 |
+
|
361 |
+
// Show Order Advanced Settings box if Content type = product
|
362 |
+
if (this_val === 'product') {
|
363 |
+
$order_advance_settings.removeClass('hidden');
|
364 |
+
}
|
365 |
+
|
366 |
+
};
|
367 |
+
|
368 |
+
// Get "Content Type" input object
|
369 |
+
var content_type = '[name="' + _prefix + 'content-type' + '"]';
|
370 |
+
|
371 |
+
// Run on page load
|
372 |
+
fn_content_type($(content_type + ':checked').val());
|
373 |
+
|
374 |
+
// Run on change
|
375 |
+
$(content_type).change(function () {
|
376 |
+
fn_content_type($(content_type + ':checked').val(), 1);
|
377 |
+
});
|
378 |
+
},
|
379 |
+
/**
|
380 |
+
* Preview handle
|
381 |
+
*
|
382 |
+
* @param string _nonce
|
383 |
+
* @returns {undefined}
|
384 |
+
*/
|
385 |
+
preview : function (_nonce) {
|
386 |
+
var $self = this;
|
387 |
+
var _prefix = $self.options._prefix;
|
388 |
+
|
389 |
+
// Store previous offset top position
|
390 |
+
var offset_top;
|
391 |
+
|
392 |
+
$('#' + _prefix + 'show-preview').click(function (e) {
|
393 |
+
e.preventDefault();
|
394 |
+
|
395 |
+
var $this_btn = $(this);
|
396 |
+
|
397 |
+
// Get Preview box
|
398 |
+
var $preview = $('#' + _prefix + 'preview-box');
|
399 |
+
|
400 |
+
// Show/hide Preview box
|
401 |
+
if ($self.options.can_preview) {
|
402 |
+
$preview.addClass('in');
|
403 |
+
} else {
|
404 |
+
$preview.removeClass('in');
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Send request
|
409 |
+
*/
|
410 |
+
if ($self.options.can_preview) {
|
411 |
+
|
412 |
+
// Get settings data
|
413 |
+
var data = $('#' + _prefix + 'form-view').serialize();
|
414 |
+
|
415 |
+
// Call handle function
|
416 |
+
$self._preview_request($preview, data, _nonce, $this_btn);
|
417 |
+
}
|
418 |
+
|
419 |
+
/**
|
420 |
+
* Animation
|
421 |
+
*/
|
422 |
+
// Scroll to preview box if want to show it
|
423 |
+
if ($self.options.can_preview) {
|
424 |
+
// Get current offset top to go back later
|
425 |
+
offset_top = $(document).scrollTop();
|
426 |
+
|
427 |
+
// Scroll to preview box
|
428 |
+
$('html, body').animate({
|
429 |
+
scrollTop: $preview.offset().top - 100
|
430 |
+
}, $self.options.scroll_time);
|
431 |
+
} else {
|
432 |
+
// Scroll to previous position
|
433 |
+
$('html, body').animate({
|
434 |
+
scrollTop: offset_top
|
435 |
+
}, $self.options.scroll_time);
|
436 |
+
|
437 |
+
// Toggle text of this button
|
438 |
+
$this_btn.html(PT_CV_ADMIN.btn.preview.show);
|
439 |
+
|
440 |
+
// Enable preview
|
441 |
+
$self.options.can_preview = 1;
|
442 |
+
}
|
443 |
+
});
|
444 |
+
},
|
445 |
+
/**
|
446 |
+
* Send preview Ajax request
|
447 |
+
*
|
448 |
+
* @param object preview_box The jqurey object
|
449 |
+
* @param string _data
|
450 |
+
* @param string _nonce The generated nonce
|
451 |
+
* @param object $this_btn The Show/Hide preview button
|
452 |
+
* @returns void
|
453 |
+
*/
|
454 |
+
_preview_request : function (preview_box, _data, _nonce, $this_btn) {
|
455 |
+
var $self = this;
|
456 |
+
var _prefix = $self.options._prefix;
|
457 |
+
|
458 |
+
// Setup data
|
459 |
+
var data = {
|
460 |
+
action : 'preview_request',
|
461 |
+
data : _data,
|
462 |
+
ajax_nonce: _nonce
|
463 |
+
};
|
464 |
+
|
465 |
+
// Sent POST request
|
466 |
+
$.ajax({
|
467 |
+
type : "POST",
|
468 |
+
url : ajaxurl,
|
469 |
+
data : data,
|
470 |
+
beforeSend: function () {
|
471 |
+
// Show loading icon
|
472 |
+
preview_box.next().toggleClass('hidden');
|
473 |
+
},
|
474 |
+
}).done(function (response) {
|
475 |
+
// Hide loading icon
|
476 |
+
preview_box.next().toggleClass('hidden');
|
477 |
+
|
478 |
+
// Update content of Preview box
|
479 |
+
preview_box.html(response);
|
480 |
+
|
481 |
+
// Toggle text of this button
|
482 |
+
$this_btn.html(PT_CV_ADMIN.btn.preview.hide);
|
483 |
+
|
484 |
+
// Disable preview
|
485 |
+
$self.options.can_preview = 0;
|
486 |
+
|
487 |
+
// Trigger action, to recall function such as pagination, pinterest render layout...
|
488 |
+
$('body').trigger(_prefix + 'custom-trigger');
|
489 |
+
});
|
490 |
+
},
|
491 |
+
/**
|
492 |
+
* Toggle 'Thumbnail settings'
|
493 |
+
*
|
494 |
+
* @returns {undefined}
|
495 |
+
*/
|
496 |
+
_thumbnail_settings : function () {
|
497 |
+
var _prefix = this.options._prefix;
|
498 |
+
var _thumbnail_setting_state = 1;
|
499 |
+
|
500 |
+
/**
|
501 |
+
* Toggle 'Thumbnail settings' when change 'Layout format'
|
502 |
+
*
|
503 |
+
* @param this_val Layout format value
|
504 |
+
* @returns void
|
505 |
+
*/
|
506 |
+
|
507 |
+
var fn_thumbnail_setting = function (this_val) {
|
508 |
+
|
509 |
+
var $thumbnail_wrapper = $('.' + _prefix + 'thumbnail-setting').parent();
|
510 |
+
if (this_val === '2-col') {
|
511 |
+
_thumbnail_setting_state = $thumbnail_wrapper.hasClass('hidden') ? 0 : 1;
|
512 |
+
$thumbnail_wrapper.removeClass('hidden');
|
513 |
+
} else if (this_val === '1-col') {
|
514 |
+
if (_thumbnail_setting_state) {
|
515 |
+
$thumbnail_wrapper.removeClass('hidden');
|
516 |
+
} else {
|
517 |
+
$thumbnail_wrapper.addClass('hidden');
|
518 |
+
}
|
519 |
+
}
|
520 |
+
};
|
521 |
+
|
522 |
+
var layout_format = '[name="' + _prefix + 'layout-format' + '"]';
|
523 |
+
|
524 |
+
// Run on page load
|
525 |
+
fn_thumbnail_setting($(layout_format + ':checked').val());
|
526 |
+
|
527 |
+
// Run on change
|
528 |
+
$(layout_format).change(function () {
|
529 |
+
fn_thumbnail_setting($(layout_format + ':checked').val());
|
530 |
+
});
|
531 |
+
|
532 |
+
/**
|
533 |
+
* Toggle 'Thumbnail settings' when change 'View type'
|
534 |
+
*/
|
535 |
+
|
536 |
+
var fn_view_type = function (this_val, layout_format) {
|
537 |
+
var expect_val = [ 'scrollable', 'pinterest', 'timeline' ];
|
538 |
+
|
539 |
+
// 'View type' = Pinterest | Timeline
|
540 |
+
if ($.inArray(this_val, expect_val) >= 0) {
|
541 |
+
// Trigger select 1-col
|
542 |
+
$(layout_format + '[value="1-col"]').trigger('click');
|
543 |
+
// Disable 2-col
|
544 |
+
$(layout_format + '[value="2-col"]').attr('disabled', true);
|
545 |
+
} else {
|
546 |
+
// Enable 2-col
|
547 |
+
$(layout_format + '[value="2-col"]').attr('disabled', false);
|
548 |
+
}
|
549 |
+
};
|
550 |
+
|
551 |
+
var view_type = '[name="' + _prefix + 'view-type' + '"]';
|
552 |
+
|
553 |
+
// Run on page load
|
554 |
+
fn_view_type($(view_type + ':checked').val(), layout_format);
|
555 |
+
|
556 |
+
// Run on change
|
557 |
+
$(view_type).change(function () {
|
558 |
+
fn_view_type($(view_type + ':checked').val(), layout_format);
|
559 |
+
});
|
560 |
+
},
|
561 |
+
/**
|
562 |
+
* Disable pagination in some cases
|
563 |
+
*
|
564 |
+
* @param string _prefix
|
565 |
+
* @returns {undefined}
|
566 |
+
*/
|
567 |
+
_pagination_disable : function () {
|
568 |
+
var _prefix = this.options._prefix;
|
569 |
+
|
570 |
+
var fn_selector = function (this_val) {
|
571 |
+
var layout_format_el = '[name="' + _prefix + 'layout-format' + '"]';
|
572 |
+
|
573 |
+
var expect_val = ['grid', 'collapsible'];
|
574 |
+
if ($.inArray(this_val, expect_val) < 0) {
|
575 |
+
// Disable "2 columns" option
|
576 |
+
$(layout_format_el + '[value="2-col"]').attr('disabled', true);
|
577 |
+
$(layout_format_el + '[value="2-col"]').attr('checked', false);
|
578 |
+
|
579 |
+
// Auto select "1 column" option
|
580 |
+
$(layout_format_el + '[value="1-col"]').attr('checked', true);
|
581 |
+
} else {
|
582 |
+
// Enable "2 columns" option
|
583 |
+
$(layout_format_el + '[value="2-col"]').removeAttr('disabled');
|
584 |
+
$(layout_format_el + '[value="2-col"]').removeAttr('checked');
|
585 |
+
}
|
586 |
+
};
|
587 |
+
|
588 |
+
var selector = '[name="' + _prefix + 'view-type' + '"]';
|
589 |
+
|
590 |
+
// Run on page load
|
591 |
+
fn_selector($(selector + ':checked').val());
|
592 |
+
|
593 |
+
// Run on change
|
594 |
+
$(selector).change(function () {
|
595 |
+
fn_selector($(selector + ':checked').val());
|
596 |
+
});
|
597 |
+
},
|
598 |
+
/**
|
599 |
+
* Custom js for elements
|
600 |
+
* @returns {undefined}
|
601 |
+
*/
|
602 |
+
custom : function () {
|
603 |
+
|
604 |
+
var $self = this;
|
605 |
+
var _prefix = $self.options._prefix;
|
606 |
+
|
607 |
+
// Bind on change input after page load
|
608 |
+
$('input, select, textarea', '.pt-wrap .tab-content').change(function () {
|
609 |
+
$self.options.onload = 0;
|
610 |
+
|
611 |
+
// Toggle text of this button
|
612 |
+
$('#' + _prefix + 'show-preview').html(PT_CV_ADMIN.btn.preview.update);
|
613 |
+
|
614 |
+
// Enable preview
|
615 |
+
$self.options.can_preview = 1;
|
616 |
+
});
|
617 |
+
|
618 |
+
// Custom JS for Content Type
|
619 |
+
$self._content_type();
|
620 |
+
|
621 |
+
// Toggle Taxonomy Relation
|
622 |
+
$self._toggle_taxonomy_relation();
|
623 |
+
|
624 |
+
// Toggle panel of 'Advanced filters'
|
625 |
+
$self._toggle_panel('.' + _prefix + 'group .panel-heading');
|
626 |
+
|
627 |
+
// Color picker
|
628 |
+
$self._color_picker('.' + _prefix + 'color');
|
629 |
+
|
630 |
+
// 'Thumbnail settings' toggle
|
631 |
+
$self._thumbnail_settings();
|
632 |
+
|
633 |
+
// Select 2
|
634 |
+
$('.' + _prefix + 'select2').select2();
|
635 |
+
|
636 |
+
// Change class of panel inside panel
|
637 |
+
$('.' + _prefix + 'group .panel .panel').each(function () {
|
638 |
+
$(this).removeClass('panel-primary').addClass('panel-info');
|
639 |
+
});
|
640 |
+
|
641 |
+
// Set custom style for 'Thumbnail position' box
|
642 |
+
$('.' + _prefix + 'bg-none').parent().css({'background-color': '#fff', 'padding-bottom': '10px'});
|
643 |
+
$('.' + _prefix + 'bg-none').parent().addClass('unsortable');
|
644 |
+
|
645 |
+
// Disable pagination
|
646 |
+
$self._pagination_disable();
|
647 |
+
|
648 |
+
// Prevent click on Links but title
|
649 |
+
$('#pt-cv-preview-box').on('click', 'a', function (e) {
|
650 |
+
e.preventDefault();
|
651 |
+
|
652 |
+
// alert(PT_CV_ADMIN.text.prevent_click);
|
653 |
+
});
|
654 |
+
},
|
655 |
+
|
656 |
+
/**
|
657 |
+
* Do handy toggle for Excerpt settings
|
658 |
+
*
|
659 |
+
* @returns {undefined}
|
660 |
+
*/
|
661 |
+
handy_toggle_excerpt_settings: function () {
|
662 |
+
var _prefix = this.options._prefix;
|
663 |
+
|
664 |
+
var _this_toggle = function (show_content) {
|
665 |
+
if (!show_content) {
|
666 |
+
$('#' + _prefix + 'group-excerpt-settings').addClass('hidden');
|
667 |
+
} else {
|
668 |
+
$('#' + _prefix + 'group-excerpt-settings').removeClass('hidden');
|
669 |
+
}
|
670 |
+
};
|
671 |
+
|
672 |
+
var selector = '[name="' + _prefix + 'show-field-content' + '"]';
|
673 |
+
|
674 |
+
// Run on page load
|
675 |
+
_this_toggle($(selector).is(':checked'));
|
676 |
+
|
677 |
+
// Run on change
|
678 |
+
$(selector).change(function () {
|
679 |
+
_this_toggle($(selector).is(':checked'));
|
680 |
+
});
|
681 |
+
}
|
682 |
+
};
|
683 |
+
}(jQuery) );
|
admin/content-views-admin.php
ADDED
@@ -0,0 +1,402 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Content Views Admin
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views_Admin
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
class PT_Content_Views_Admin {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Instance of this class.
|
16 |
+
*
|
17 |
+
* @since 1.0.0
|
18 |
+
*
|
19 |
+
* @var object
|
20 |
+
*/
|
21 |
+
protected static $instance = null;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Slug of the plugin screen.
|
25 |
+
*
|
26 |
+
* @since 1.0.0
|
27 |
+
*
|
28 |
+
* @var string
|
29 |
+
*/
|
30 |
+
protected $plugin_screen_hook_suffix = null;
|
31 |
+
|
32 |
+
// Slugs for sub menu pages
|
33 |
+
protected $plugin_sub_screen_hook_suffix = null;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Initialize the plugin by loading admin scripts & styles and adding a
|
37 |
+
* settings page and menu.
|
38 |
+
*
|
39 |
+
* @since 1.0.0
|
40 |
+
*/
|
41 |
+
private function __construct() {
|
42 |
+
|
43 |
+
/*
|
44 |
+
* @TODO :
|
45 |
+
*
|
46 |
+
* - Uncomment following lines if the admin class should only be available for super admins
|
47 |
+
*/
|
48 |
+
/* if( ! is_super_admin() ) {
|
49 |
+
return;
|
50 |
+
} */
|
51 |
+
|
52 |
+
/*
|
53 |
+
* Call $plugin_slug from public plugin class.
|
54 |
+
*/
|
55 |
+
$plugin = PT_Content_Views::get_instance();
|
56 |
+
$this->plugin_slug = $plugin->get_plugin_slug();
|
57 |
+
|
58 |
+
// Fix redirect error
|
59 |
+
add_action( 'init', array( $this, 'do_output_buffer' ) );
|
60 |
+
|
61 |
+
// Redirect to "Add View" page when click "Add new" link in "All Views" page
|
62 |
+
add_action( 'admin_init', array( $this, 'redirect_add_new' ) );
|
63 |
+
|
64 |
+
// Load admin style sheet and JavaScript.
|
65 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
|
66 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
|
67 |
+
add_action( 'admin_print_footer_scripts', array( $this, 'print_footer_scripts' ) );
|
68 |
+
|
69 |
+
// Add the options page and menu item.
|
70 |
+
add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
|
71 |
+
|
72 |
+
// Add an action link pointing to the options page.
|
73 |
+
$plugin_basename = plugin_basename( plugin_dir_path( __DIR__ ) . $this->plugin_slug . '.php' );
|
74 |
+
add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'filter_add_action_links' ) );
|
75 |
+
|
76 |
+
// Filter link of actions in All Views page
|
77 |
+
add_filter( 'post_row_actions', array( $this, 'filter_post_row_actions' ), 10, 2 );
|
78 |
+
|
79 |
+
// Filter link of Title in All Views page
|
80 |
+
add_filter( 'get_edit_post_link', array( $this, 'filter_get_edit_post_link' ), 10, 3 );
|
81 |
+
|
82 |
+
// Ajax action
|
83 |
+
$action = 'preview_request';
|
84 |
+
add_action( 'wp_ajax_' . $action, array( 'PT_CV_Functions', 'ajax_callback_' . $action ) );
|
85 |
+
|
86 |
+
// Output assets content at footer of page
|
87 |
+
add_action( PT_CV_PREFIX_ . 'preview_footer', array( 'PT_CV_Html', 'assets_of_view_types' ) );
|
88 |
+
|
89 |
+
// Custom hooks for both preview & frontend
|
90 |
+
PT_CV_Hooks::init();
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Return an instance of this class.
|
95 |
+
*
|
96 |
+
* @since 1.0.0
|
97 |
+
*
|
98 |
+
* @return object A single instance of this class.
|
99 |
+
*/
|
100 |
+
public static function get_instance() {
|
101 |
+
|
102 |
+
/*
|
103 |
+
* @TODO :
|
104 |
+
*
|
105 |
+
* - Uncomment following lines if the admin class should only be available for super admins
|
106 |
+
*/
|
107 |
+
/* if( ! is_super_admin() ) {
|
108 |
+
return;
|
109 |
+
} */
|
110 |
+
|
111 |
+
// If the single instance hasn't been set, set it now.
|
112 |
+
if ( null == self::$instance ) {
|
113 |
+
self::$instance = new self;
|
114 |
+
}
|
115 |
+
|
116 |
+
return self::$instance;
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Output buffering
|
121 |
+
*/
|
122 |
+
public function do_output_buffer() {
|
123 |
+
ob_start();
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Redirect to "Add View" page when click "Add new" link in "All Views" page
|
128 |
+
*/
|
129 |
+
public function redirect_add_new() {
|
130 |
+
global $pagenow;
|
131 |
+
if ( $pagenow === 'post-new.php' ) {
|
132 |
+
$post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : '';
|
133 |
+
if ( $post_type === PT_CV_POST_TYPE ) {
|
134 |
+
wp_redirect( admin_url( 'admin.php?page=' . $this->plugin_slug . '-add' ), 301 );
|
135 |
+
exit;
|
136 |
+
}
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Register and enqueue admin-specific style sheet.
|
142 |
+
*
|
143 |
+
* @since 1.0.0
|
144 |
+
*
|
145 |
+
* @return null Return early if no settings page is registered.
|
146 |
+
*/
|
147 |
+
public function enqueue_admin_styles() {
|
148 |
+
|
149 |
+
if ( ! isset( $this->plugin_screen_hook_suffix ) ) {
|
150 |
+
return;
|
151 |
+
}
|
152 |
+
|
153 |
+
// Load every Admin pages
|
154 |
+
PT_CV_Asset::enqueue(
|
155 |
+
'admin-menu', 'style', array(
|
156 |
+
'src' => plugins_url( 'assets/css/menu.css', __FILE__ ),
|
157 |
+
)
|
158 |
+
);
|
159 |
+
|
160 |
+
$screen = get_current_screen();
|
161 |
+
if ( $this->plugin_screen_hook_suffix == $screen->id || in_array( $screen->id, $this->plugin_sub_screen_hook_suffix ) ) {
|
162 |
+
|
163 |
+
// WP assets
|
164 |
+
wp_enqueue_style( 'thickbox' );
|
165 |
+
wp_enqueue_style( 'media-upload' );
|
166 |
+
wp_enqueue_style( 'farbtastic' );
|
167 |
+
|
168 |
+
// Main admin style
|
169 |
+
PT_CV_Asset::enqueue(
|
170 |
+
'admin', 'style', array(
|
171 |
+
'src' => plugins_url( 'assets/css/admin.css', __FILE__ ),
|
172 |
+
)
|
173 |
+
);
|
174 |
+
|
175 |
+
// Fix style of WP
|
176 |
+
global $wp_version;
|
177 |
+
if ( version_compare( $wp_version, '3.8.0' ) >= 0 ) {
|
178 |
+
PT_CV_Asset::enqueue(
|
179 |
+
'admin-fix', 'style', array(
|
180 |
+
'src' => plugins_url( 'assets/css/wp38.css', __FILE__ ),
|
181 |
+
'ver' => $wp_version,
|
182 |
+
)
|
183 |
+
);
|
184 |
+
} else {
|
185 |
+
PT_CV_Asset::enqueue(
|
186 |
+
'admin-fix', 'style', array(
|
187 |
+
'src' => plugins_url( 'assets/css/wp.css', __FILE__ ),
|
188 |
+
'ver' => $wp_version,
|
189 |
+
)
|
190 |
+
);
|
191 |
+
}
|
192 |
+
|
193 |
+
// For Preview
|
194 |
+
PT_CV_Html::frontend_styles();
|
195 |
+
|
196 |
+
// Main scripts
|
197 |
+
PT_CV_Asset::enqueue( 'select2', 'style' );
|
198 |
+
PT_CV_Asset::enqueue( 'select2-bootstrap', 'style' );
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Register and enqueue admin-specific JavaScript.
|
204 |
+
*
|
205 |
+
* @since 1.0.0
|
206 |
+
*
|
207 |
+
* @return null Return early if no settings page is registered.
|
208 |
+
*/
|
209 |
+
public function enqueue_admin_scripts() {
|
210 |
+
|
211 |
+
if ( ! isset( $this->plugin_screen_hook_suffix ) ) {
|
212 |
+
return;
|
213 |
+
}
|
214 |
+
|
215 |
+
$screen = get_current_screen();
|
216 |
+
if ( $this->plugin_screen_hook_suffix == $screen->id || in_array( $screen->id, $this->plugin_sub_screen_hook_suffix ) ) {
|
217 |
+
|
218 |
+
// WP assets
|
219 |
+
wp_enqueue_script( 'farbtastic' );
|
220 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
221 |
+
|
222 |
+
// Main admin script
|
223 |
+
PT_CV_Asset::enqueue(
|
224 |
+
'admin', 'script', array(
|
225 |
+
'src' => plugins_url( 'assets/js/admin.js', __FILE__ ),
|
226 |
+
'deps' => array( 'jquery' ),
|
227 |
+
)
|
228 |
+
);
|
229 |
+
|
230 |
+
// Localize strings
|
231 |
+
PT_CV_Asset::localize_script(
|
232 |
+
'admin', PT_CV_PREFIX_UPPER . 'ADMIN', array(
|
233 |
+
'text' => array(
|
234 |
+
'no_taxonomy' => __( 'There is no taxonomy for selected content type', PT_CV_DOMAIN ),
|
235 |
+
'pagination_disable' => __( 'Pagination is disabled when Limit = -1', PT_CV_DOMAIN ),
|
236 |
+
'prevent_click' => __( 'Opening a link is prevented in preview box', PT_CV_DOMAIN ),
|
237 |
+
),
|
238 |
+
'btn' => array(
|
239 |
+
'preview' => array(
|
240 |
+
'show' => __( 'Show Preview', PT_CV_DOMAIN ),
|
241 |
+
'hide' => __( 'Hide Preview', PT_CV_DOMAIN ),
|
242 |
+
'update' => __( 'Update Preview', PT_CV_DOMAIN ),
|
243 |
+
),
|
244 |
+
),
|
245 |
+
)
|
246 |
+
);
|
247 |
+
|
248 |
+
// For Preview
|
249 |
+
PT_CV_Html::frontend_scripts();
|
250 |
+
|
251 |
+
PT_CV_Asset::enqueue( 'select2' );
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Print script at footer of WP admin
|
257 |
+
*/
|
258 |
+
public function print_footer_scripts() {
|
259 |
+
if ( ! isset( $this->plugin_screen_hook_suffix ) ) {
|
260 |
+
return;
|
261 |
+
}
|
262 |
+
|
263 |
+
$screen = get_current_screen();
|
264 |
+
if ( $this->plugin_screen_hook_suffix == $screen->id || in_array( $screen->id, $this->plugin_sub_screen_hook_suffix ) ) {
|
265 |
+
PT_Options_Framework::print_js();
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* Register the administration menu for this plugin into the WordPress Dashboard menu.
|
271 |
+
*
|
272 |
+
* @since 1.0.0
|
273 |
+
*/
|
274 |
+
public function add_plugin_admin_menu() {
|
275 |
+
|
276 |
+
/*
|
277 |
+
* Add a settings page for this plugin to the Settings menu.
|
278 |
+
*/
|
279 |
+
$this->plugin_screen_hook_suffix = add_menu_page(
|
280 |
+
__( 'Content View Settings', $this->plugin_slug ),
|
281 |
+
__( 'Content View Settings', $this->plugin_slug ),
|
282 |
+
'manage_options',
|
283 |
+
$this->plugin_slug,
|
284 |
+
array( $this, 'display_plugin_admin_page' ),
|
285 |
+
'',
|
286 |
+
'45.6'
|
287 |
+
);
|
288 |
+
|
289 |
+
$this->plugin_sub_screen_hook_suffix[] = PT_CV_Functions::menu_add_sub(
|
290 |
+
$this->plugin_slug,
|
291 |
+
__( 'All Content Views', $this->plugin_slug ),
|
292 |
+
__( 'All Views', $this->plugin_slug ),
|
293 |
+
'list',
|
294 |
+
__CLASS__
|
295 |
+
);
|
296 |
+
|
297 |
+
$this->plugin_sub_screen_hook_suffix[] = PT_CV_Functions::menu_add_sub(
|
298 |
+
$this->plugin_slug,
|
299 |
+
__( 'Add New View', $this->plugin_slug ),
|
300 |
+
__( 'Add New', $this->plugin_slug ),
|
301 |
+
'add',
|
302 |
+
__CLASS__
|
303 |
+
);
|
304 |
+
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Render the settings page for this plugin.
|
309 |
+
*
|
310 |
+
* @since 1.0.0
|
311 |
+
*/
|
312 |
+
public function display_plugin_admin_page() {
|
313 |
+
include_once( 'views/admin.php' );
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* List all Views page
|
318 |
+
*/
|
319 |
+
public function display_sub_page_list() {
|
320 |
+
include_once( 'views/list.php' );
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Add/Edit View page
|
325 |
+
*/
|
326 |
+
public function display_sub_page_add() {
|
327 |
+
include_once( 'views/view.php' );
|
328 |
+
}
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Add settings action link to the plugins page, doesn't work in Multiple site
|
332 |
+
*
|
333 |
+
* @since 1.0.0
|
334 |
+
*/
|
335 |
+
public function filter_add_action_links( $links ) {
|
336 |
+
|
337 |
+
return array_merge(
|
338 |
+
array(
|
339 |
+
'settings' => '<a href="' . admin_url( 'admin.php?page=' . $this->plugin_slug ) . '">' . __( 'Settings', $this->plugin_slug ) . '</a>',
|
340 |
+
'add' => '<a href="' . admin_url( 'admin.php?page=' . $this->plugin_slug . '-add' ) . '">' . __( 'Add View', $this->plugin_slug ) . '</a>',
|
341 |
+
),
|
342 |
+
$links
|
343 |
+
);
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Filter link of actions in All Views page
|
348 |
+
*
|
349 |
+
* @param array $actions Array of actions link
|
350 |
+
* @param object $post The post
|
351 |
+
*
|
352 |
+
* @return array
|
353 |
+
*/
|
354 |
+
public function filter_post_row_actions( $actions, $post ) {
|
355 |
+
|
356 |
+
// Get current post type
|
357 |
+
$post_type = PT_CV_Functions::admin_current_post_type();
|
358 |
+
|
359 |
+
if ( $post_type != PT_CV_POST_TYPE ) {
|
360 |
+
return $actions;
|
361 |
+
}
|
362 |
+
|
363 |
+
// Remove Quick edit link
|
364 |
+
unset( $actions['inline hide-if-no-js'] );
|
365 |
+
|
366 |
+
// Remove View link
|
367 |
+
unset( $actions['view'] );
|
368 |
+
|
369 |
+
// Update Edit link
|
370 |
+
|
371 |
+
// Get View id
|
372 |
+
$view_id = get_post_meta( $post->ID, PT_CV_META_ID, true );
|
373 |
+
|
374 |
+
if ( ! empty( $view_id ) ) {
|
375 |
+
$edit_link = PT_CV_Functions::view_link( $view_id );
|
376 |
+
$actions['edit'] = '<a href="' . esc_url( $edit_link ) . '" title="' . esc_attr( __( 'Edit this item' ) ) . '">' . __( 'Edit' ) . '</a>';
|
377 |
+
}
|
378 |
+
|
379 |
+
return $actions;
|
380 |
+
}
|
381 |
+
|
382 |
+
/**
|
383 |
+
* Filter link of Title in All Views page
|
384 |
+
*/
|
385 |
+
public function filter_get_edit_post_link( $edit_link, $post_id, $context ) {
|
386 |
+
|
387 |
+
// Get current post type
|
388 |
+
$post_type = PT_CV_Functions::admin_current_post_type();
|
389 |
+
|
390 |
+
if ( $post_type != PT_CV_POST_TYPE ) {
|
391 |
+
return $edit_link;
|
392 |
+
}
|
393 |
+
|
394 |
+
// Get View id
|
395 |
+
$view_id = get_post_meta( $post_id, PT_CV_META_ID, true );
|
396 |
+
|
397 |
+
$edit_link = PT_CV_Functions::view_link( $view_id );
|
398 |
+
|
399 |
+
return $edit_link;
|
400 |
+
}
|
401 |
+
|
402 |
+
}
|
admin/includes/options.php
ADDED
@@ -0,0 +1,395 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Options framework
|
4 |
+
*
|
5 |
+
* Contain all functions to display setting options on page
|
6 |
+
*
|
7 |
+
* @package PT_Options_Framework
|
8 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
9 |
+
* @license GPL-2.0+
|
10 |
+
* @link http://example.com
|
11 |
+
* @copyright 2014 Palace Of Themes
|
12 |
+
*/
|
13 |
+
|
14 |
+
if ( ! class_exists( 'PT_Options_Framework' ) ) {
|
15 |
+
|
16 |
+
class PT_Options_Framework {
|
17 |
+
|
18 |
+
private static $dependence_info; // Store dependency information of options
|
19 |
+
|
20 |
+
public function __construct() {
|
21 |
+
}
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Check dependence information & generate random id for dependency elements
|
25 |
+
*
|
26 |
+
* @param array $param Array of parameters of a setting option
|
27 |
+
* @param array $dependence_ Global dependence array
|
28 |
+
*
|
29 |
+
* @return string|null
|
30 |
+
*/
|
31 |
+
public static function _dependence_check( $param, &$dependence_ ) {
|
32 |
+
if ( isset( $param['dependence'] ) ) {
|
33 |
+
// Depend array: 3 params in order : name (of param this param depends), value (of param this param depends), operator
|
34 |
+
$dependence = (array) $param['dependence'];
|
35 |
+
$random_id = PT_CV_PREFIX . 'dependence_' . PT_CV_Functions::string_random();
|
36 |
+
|
37 |
+
// Single dependency relationship
|
38 |
+
if ( ! is_array( $dependence[0] ) ) {
|
39 |
+
self::_dependence_assign( $dependence, $random_id, $dependence_ );
|
40 |
+
} else {
|
41 |
+
// Multiple dependency relationships
|
42 |
+
foreach ( $dependence as $dp ) {
|
43 |
+
self::_dependence_assign( $dp, $random_id, $dependence_ );
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
return $random_id;
|
48 |
+
}
|
49 |
+
|
50 |
+
return NULL;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Assign dependency relationship
|
55 |
+
*
|
56 |
+
* @param array $dependence Array of dependence attributes
|
57 |
+
* @param string $random_id Random string
|
58 |
+
* @param array $dependence_ Global dependence array
|
59 |
+
*/
|
60 |
+
public static function _dependence_assign( $dependence, $random_id, &$dependence_ ) {
|
61 |
+
$dependence_[$dependence[0]][] = array( $random_id, $dependence[1], isset( $dependence[2] ) ? $dependence[2] : '=' );
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Settings for group of options
|
66 |
+
*
|
67 |
+
* @param array $options List of setting options
|
68 |
+
* @param array $data Stored data of settings
|
69 |
+
*
|
70 |
+
* @return string
|
71 |
+
*/
|
72 |
+
public static function do_settings( $options, $data = array() ) {
|
73 |
+
$result = $dependence_ = array();
|
74 |
+
if ( ! $options ) {
|
75 |
+
return '';
|
76 |
+
}
|
77 |
+
|
78 |
+
foreach ( $options as $group ) {
|
79 |
+
$result[] = self::group( $group, $data, $dependence_ );
|
80 |
+
}
|
81 |
+
if ( $dependence_ ) {
|
82 |
+
self::$dependence_info[] = $dependence_;
|
83 |
+
}
|
84 |
+
|
85 |
+
return implode( '', $result );
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Group of options
|
90 |
+
*
|
91 |
+
* @param array $group
|
92 |
+
* @param array $data Stored data of settings
|
93 |
+
* @param array $dependence_ Global dependence array
|
94 |
+
*
|
95 |
+
* @return string
|
96 |
+
*/
|
97 |
+
public static function group( $group, $data, &$dependence_ ) {
|
98 |
+
if ( empty( $group['label'] ) && empty( $group['params'] ) ) {
|
99 |
+
return '';
|
100 |
+
}
|
101 |
+
|
102 |
+
$extra_setting = isset( $group['extra_setting'] ) ? $group['extra_setting'] : array();
|
103 |
+
$label = self::label( $group['label'], $extra_setting );
|
104 |
+
$params = self::params( $group['params'], $data, $extra_setting );
|
105 |
+
$random_id = self::_dependence_check( $group, $dependence_ );
|
106 |
+
$id = $class = '';
|
107 |
+
if ( $random_id ) {
|
108 |
+
$id = "id='$random_id'";
|
109 |
+
$class = 'hidden';
|
110 |
+
}
|
111 |
+
|
112 |
+
return "<div class='form-group pt-form-group $class' $id>$label $params</div>";
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Label
|
117 |
+
*
|
118 |
+
* @param string $label Text for label
|
119 |
+
*/
|
120 |
+
public static function label( $label = array(), $extra_setting = array() ) {
|
121 |
+
$for = isset( $label['for'] ) ? "for='{$label['for']}'" : '';
|
122 |
+
$width = 12 - ( isset( $extra_setting['params']['width'] ) ? intval( $extra_setting['params']['width'] ) : 10 );
|
123 |
+
if ( $width ) {
|
124 |
+
$html = "<label $for class='col-sm-$width control-label'>" . __( $label['text'], PT_CV_DOMAIN ) . '</label>';
|
125 |
+
} else {
|
126 |
+
$html = '';
|
127 |
+
}
|
128 |
+
|
129 |
+
return $html;
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Print params next to label
|
134 |
+
*
|
135 |
+
* @param string $params Array of setting options in a group
|
136 |
+
*/
|
137 |
+
public static function params( $params, $data, $extra_setting ) {
|
138 |
+
$params_html = array();
|
139 |
+
foreach ( (array) $params as $param ) {
|
140 |
+
$params_html[] = self::field_type( (array) $param, $data ) . "\n";
|
141 |
+
}
|
142 |
+
$html = implode( '', $params_html );
|
143 |
+
$param_wrap_class = isset( $extra_setting['params']['wrap-class'] ) ? esc_attr( $extra_setting['params']['wrap-class'] ) : '';
|
144 |
+
$param_wrap_id = isset( $extra_setting['params']['wrap-id'] ) ? "id='" . esc_attr( $extra_setting['params']['wrap-id'] ) . "'" : '';
|
145 |
+
$width = isset( $extra_setting['params']['width'] ) ? intval( $extra_setting['params']['width'] ) : 10;
|
146 |
+
|
147 |
+
return "<div class='col-sm-$width pt-params $param_wrap_class' $param_wrap_id>$html</div>";
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Get value of field
|
152 |
+
*
|
153 |
+
* @param array $data Stored data of settings
|
154 |
+
* @param array $param Array of parameters of a setting option
|
155 |
+
*
|
156 |
+
* @return string
|
157 |
+
*/
|
158 |
+
public static function field_value( $data, $param, $name ) {
|
159 |
+
// Get name without []
|
160 |
+
$single_name = rtrim( $name, '[]' );
|
161 |
+
|
162 |
+
// Get value of field
|
163 |
+
if ( $data ) {
|
164 |
+
$value = isset( $data[$single_name] ) ? $data[$single_name] : '';
|
165 |
+
} else {
|
166 |
+
$value = isset( $param['std'] ) ? $param['std'] : '';
|
167 |
+
}
|
168 |
+
|
169 |
+
return $value;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Print HTML code of field type: input, select, textarea...
|
174 |
+
*
|
175 |
+
* @param array $param Array of parameters of a setting option
|
176 |
+
*
|
177 |
+
* @return string
|
178 |
+
*/
|
179 |
+
public static function field_type( $param, $data ) {
|
180 |
+
if ( ! $param || ! isset( $param['type'] ) ) {
|
181 |
+
return '';
|
182 |
+
}
|
183 |
+
$html = $extend = '';
|
184 |
+
$class = 'form-control ' . ( isset( $param['class'] ) ? ' ' . PT_CV_PREFIX . $param['class'] : '' );
|
185 |
+
|
186 |
+
$type = esc_attr( $param['type'] );
|
187 |
+
$name = ! empty( $param['name'] ) ? PT_CV_PREFIX . esc_attr( $param['name'] ) : '';
|
188 |
+
$id = ! empty( $param['id'] ) ? "id='" . PT_CV_PREFIX . esc_attr( $param['id'] ) . "'" : '';
|
189 |
+
$value = self::field_value( $data, $param, $name );
|
190 |
+
$description = isset( $param['desc'] ) ? esc_html__( $param['desc'], PT_CV_DOMAIN ) : '';
|
191 |
+
|
192 |
+
// Add extra information of option type
|
193 |
+
switch ( $type ) {
|
194 |
+
case 'number':
|
195 |
+
$min = ! empty( $param['min'] ) ? intval( $param['min'] ) : 1;
|
196 |
+
$extend = 'min="' . $min . '"';
|
197 |
+
break;
|
198 |
+
case 'color':
|
199 |
+
$class .= ' ' . PT_CV_PREFIX . 'color';
|
200 |
+
break;
|
201 |
+
case 'checkbox':
|
202 |
+
case 'radio':
|
203 |
+
// Remove form-control class in checkbox, radio
|
204 |
+
$class = str_replace( 'form-control', '', $class );
|
205 |
+
break;
|
206 |
+
}
|
207 |
+
|
208 |
+
$class = esc_attr( $class );
|
209 |
+
|
210 |
+
// Show HTML of option type
|
211 |
+
switch ( $type ) {
|
212 |
+
case 'group':
|
213 |
+
$html .= self::do_settings( $param['params'], $data );
|
214 |
+
break;
|
215 |
+
case 'text':
|
216 |
+
case 'email':
|
217 |
+
case 'password':
|
218 |
+
case 'number':
|
219 |
+
case 'url':
|
220 |
+
$placeholder = ! empty( $param['placeholder'] ) ? $param['placeholder'] : '';
|
221 |
+
$append_text = ! empty( $param['append_text'] ) ? $param['append_text'] : '';
|
222 |
+
|
223 |
+
$input = "<input type='$type' name='$name' value='$value' class='$class' $id $extend placeholder='$placeholder'>";
|
224 |
+
if ( empty( $append_text ) ) {
|
225 |
+
$html .= $input;
|
226 |
+
} else {
|
227 |
+
$html .= "<div class='input-group'>$input<span class='input-group-addon'>$append_text</span></div>";
|
228 |
+
}
|
229 |
+
break;
|
230 |
+
case 'color':
|
231 |
+
$html .= "<input type='text' name='$name' value='$value' class='$class' $id $extend style='background-color:$value;'>";
|
232 |
+
$html .= "<div class='" . PT_CV_PREFIX . "colorpicker' style='z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;'></div><br>";
|
233 |
+
break;
|
234 |
+
case 'textarea':
|
235 |
+
$html .= "<textarea name='$name' class='$class' $id $extend>$value</textarea>";
|
236 |
+
break;
|
237 |
+
case 'checkbox':
|
238 |
+
case 'radio':
|
239 |
+
if ( ! isset( $param['options'] ) ) {
|
240 |
+
break;
|
241 |
+
}
|
242 |
+
|
243 |
+
$settings = isset( $param['settings'] ) ? $param['settings'] : array();
|
244 |
+
foreach ( $param['options'] as $key => $text ) {
|
245 |
+
// Append Html to $text, such as image...
|
246 |
+
if ( $settings ) {
|
247 |
+
$append = isset( $settings['text-append'] ) ? $settings['text-append'] : '';
|
248 |
+
if ( $append == 'image' ) {
|
249 |
+
$path = isset( $settings['path'] ) ? $settings['path'] : '';
|
250 |
+
if ( $path ) {
|
251 |
+
$text .= "<br> <img src='" . plugins_url( $path . "/$key.png", PT_CV_FILE ) . "' />";
|
252 |
+
}
|
253 |
+
}
|
254 |
+
}
|
255 |
+
|
256 |
+
$checked = ( in_array( $key, (array) $value ) || ( $value == 'all' ) ) ? 'checked' : '';
|
257 |
+
$html .= "<div class='$type'><label><input type='$type' name='$name' value='$key' class='$class' $checked $id $extend>$text</label></div>";
|
258 |
+
}
|
259 |
+
|
260 |
+
break;
|
261 |
+
case 'select':
|
262 |
+
if ( ! isset( $param['options'] ) ) {
|
263 |
+
break;
|
264 |
+
}
|
265 |
+
|
266 |
+
$options = '';
|
267 |
+
foreach ( $param['options'] as $key => $text ) {
|
268 |
+
$selected = ( in_array( $key, (array) $value ) || ( $value == 'all' ) ) ? 'selected' : '';
|
269 |
+
$option_class = isset( $param['option_class_prefix'] ) ? sprintf( "class='%s'", $param['option_class_prefix'] . esc_attr( sanitize_title( $key ) ) ) : '';
|
270 |
+
$options .= "<option value='$key' $selected $option_class>$text</option>";
|
271 |
+
}
|
272 |
+
if ( empty( $options ) ) {
|
273 |
+
$html .= "<div class='" . PT_CV_PREFIX . "text'>" . __( 'There is no option', PT_CV_DOMAIN ) . '</div>';
|
274 |
+
} else {
|
275 |
+
$multiple = '';
|
276 |
+
if ( ( isset( $param['multiple'] ) && $param['multiple'] == '1' ) || $value == 'all' ) {
|
277 |
+
$multiple = 'multiple';
|
278 |
+
// Auto add [] to name of select
|
279 |
+
$name .= substr( $name, - 2 ) == '[]' ? '' : '[]';
|
280 |
+
}
|
281 |
+
$html .= "<select name='$name' class='$class' $multiple $id $extend>$options</select>";
|
282 |
+
}
|
283 |
+
break;
|
284 |
+
case 'font_color':
|
285 |
+
$html .= "<div class='form-inline font-color'>";
|
286 |
+
$font = self::field_type( $param['options']['font'], $data );
|
287 |
+
$html .= "<div class='input-group'>$font<span class='input-group-addon'>px</span></div>";
|
288 |
+
$color = self::field_type( $param['options']['color'], $data );
|
289 |
+
$html .= "<div class='form-group'>$color</div>";
|
290 |
+
$html .= '</div>';
|
291 |
+
break;
|
292 |
+
case 'html':
|
293 |
+
if ( isset( $param['content'] ) ) {
|
294 |
+
$html .= $param['content'];
|
295 |
+
}
|
296 |
+
break;
|
297 |
+
case 'panel_group':
|
298 |
+
// In format: key => array of params
|
299 |
+
$parent_id = PT_CV_Functions::string_random( true );
|
300 |
+
$settings = isset( $param['settings'] ) ? $param['settings'] : array();
|
301 |
+
foreach ( $param['params'] as $key => $param_group ) {
|
302 |
+
$html .= self::sub_panel_group( $key, $param_group, $data, $parent_id, $settings );
|
303 |
+
}
|
304 |
+
break;
|
305 |
+
default:
|
306 |
+
break;
|
307 |
+
}
|
308 |
+
|
309 |
+
if ( ! empty( $description ) ) {
|
310 |
+
$description = str_replace( '[--br--]', '<br>', $description );
|
311 |
+
$html .= "<p class='text-muted'>$description</p>";
|
312 |
+
}
|
313 |
+
|
314 |
+
return $html;
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* HTML for group of params inside Panel group
|
319 |
+
*
|
320 |
+
* @param string $key
|
321 |
+
* @param array $param_group Array of setting options in a group
|
322 |
+
* @param array $data Stored data of settings
|
323 |
+
* @param string $parent_id
|
324 |
+
* @param bool $settings : array of custom settings
|
325 |
+
*
|
326 |
+
* @return string
|
327 |
+
*/
|
328 |
+
static function sub_panel_group( $key, $param_group, $data, $parent_id, $settings = array() ) {
|
329 |
+
|
330 |
+
// Content for body
|
331 |
+
$content = self::do_settings( $param_group, $data );
|
332 |
+
// Class for wrapper
|
333 |
+
$class = PT_CV_Html::html_group_class();
|
334 |
+
$class .= ( isset( $settings['show_all'] ) ? '' : ' hidden' );
|
335 |
+
$class .= ( isset( $settings['show_only_one'] ) ? ' ' . PT_CV_PREFIX . 'only-one' : '' );
|
336 |
+
$class .= ( isset( $settings['no_panel'] ) ? ' ' . PT_CV_PREFIX . 'no-panel' : '' );
|
337 |
+
$class .= ( isset( $settings['no_animation'] ) ? ' ' . PT_CV_PREFIX . 'no-animation' : '' );
|
338 |
+
// Id for wrapper
|
339 |
+
$id = PT_CV_Html::html_group_id( $key );
|
340 |
+
|
341 |
+
if ( ! isset( $settings['no_panel'] ) ) {
|
342 |
+
// Heading text
|
343 |
+
$heading = ( isset( $settings['nice_name'] ) && isset( $settings['nice_name'][$key] ) ) ? $settings['nice_name'][$key] : PT_CV_Functions::string_slug_to_text( $key );
|
344 |
+
$heading = __( $heading, PT_CV_DOMAIN ) . ' ' . __( 'Settings', PT_CV_DOMAIN );
|
345 |
+
$html = PT_CV_Html::html_collapse_one( $parent_id, $id . '-child', $heading, $content, true );
|
346 |
+
} else {
|
347 |
+
$html = $content;
|
348 |
+
}
|
349 |
+
|
350 |
+
return "<div class='$class' id='$id'>$html</div>";
|
351 |
+
}
|
352 |
+
|
353 |
+
/**
|
354 |
+
* Print inline js
|
355 |
+
*/
|
356 |
+
public static function print_js() {
|
357 |
+
$toggle_data_js = json_encode( self::$dependence_info );
|
358 |
+
?>
|
359 |
+
<script>
|
360 |
+
(function ($) {
|
361 |
+
"use strict";
|
362 |
+
|
363 |
+
$(function () {
|
364 |
+
var _prefix = '<?php echo esc_js( PT_CV_PREFIX ); ?>';
|
365 |
+
var $pt_cv_admin_js = new $.PT_CV_Admin({_prefix: _prefix});
|
366 |
+
var group_prefix = '<?php echo esc_js( PT_CV_Html::html_group_class() ); ?>' + '-';
|
367 |
+
|
368 |
+
// Preview actions
|
369 |
+
$pt_cv_admin_js.preview('<?php echo balanceTags( wp_create_nonce( PT_CV_PREFIX_ . 'ajax_nonce' ) );?>');
|
370 |
+
|
371 |
+
// Custom js
|
372 |
+
$pt_cv_admin_js.custom();
|
373 |
+
|
374 |
+
// Toggle Panel group of 'Advance Settings'
|
375 |
+
$pt_cv_admin_js.toggle_group('.' + _prefix + 'advanced-settings-item', group_prefix);
|
376 |
+
// Toggle Panel group of 'Terms' (in "Taxonomy Settings")
|
377 |
+
$pt_cv_admin_js.toggle_group('.' + _prefix + 'taxonomy-item', group_prefix);
|
378 |
+
// Toggle Panel group of 'Advanced Order by'
|
379 |
+
$pt_cv_admin_js.toggle_group('[name="' + _prefix + 'content-type' + '"]', group_prefix);
|
380 |
+
// Toggle Panel group of 'View type settings'
|
381 |
+
$pt_cv_admin_js.toggle_group('[name="' + _prefix + 'view-type' + '"]', group_prefix);
|
382 |
+
|
383 |
+
// Toggle dependence
|
384 |
+
$pt_cv_admin_js.dependence_do_all('<?php echo balanceTags( $toggle_data_js ); ?>');
|
385 |
+
|
386 |
+
$pt_cv_admin_js.handy_toggle_excerpt_settings();
|
387 |
+
});
|
388 |
+
}(jQuery));
|
389 |
+
</script>
|
390 |
+
<?php
|
391 |
+
}
|
392 |
+
|
393 |
+
}
|
394 |
+
|
395 |
+
}
|
admin/views/admin.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Setting page
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
?>
|
12 |
+
|
13 |
+
<div class="wrap">
|
14 |
+
|
15 |
+
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
16 |
+
|
17 |
+
<?php
|
18 |
+
|
19 |
+
ob_start();
|
20 |
+
?>
|
21 |
+
<p><br>Thank you for using Content Views!</p>
|
22 |
+
<p>You are using <strong>Free</strong> version: <?php echo PT_CV_Functions::plugin_info( PT_CV_FILE, 'Version' ); ?></p>
|
23 |
+
<p>More awesome features are available at <a href="http://wordpressquery.com" target="_blank">Wordpress Query</a>.</p>
|
24 |
+
<p><br>Enjoy with Content Views!</p>
|
25 |
+
<p>---<br>
|
26 |
+
Plugin developed by PT guy.<br>
|
27 |
+
Copyright © 2014</p>
|
28 |
+
<?php
|
29 |
+
$text = ob_get_clean();
|
30 |
+
|
31 |
+
$settings = apply_filters( PT_CV_PREFIX_ . 'page_settings', $text );
|
32 |
+
|
33 |
+
echo $settings;
|
34 |
+
?>
|
35 |
+
</div>
|
admin/views/list.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* List all Content Views
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Redirect to edit.php page of Content Views post type
|
13 |
+
wp_redirect( admin_url( 'edit.php?post_type=' . PT_CV_POST_TYPE ) );
|
14 |
+
exit;
|
admin/views/view.php
ADDED
@@ -0,0 +1,542 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Add / Edit Content Views
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Check if using Wordpress version 3.7 or higher
|
13 |
+
$version_gt_37 = PT_CV_Functions::wp_version_compare( '3.7' );
|
14 |
+
|
15 |
+
$settings = array();
|
16 |
+
|
17 |
+
// Id of current view
|
18 |
+
$id = 0;
|
19 |
+
|
20 |
+
// Check if this is edit View page
|
21 |
+
if ( ! empty ( $_GET['id'] ) ) {
|
22 |
+
|
23 |
+
$id = esc_sql( $_GET['id'] );
|
24 |
+
|
25 |
+
if ( $id ) {
|
26 |
+
|
27 |
+
// Get View settings
|
28 |
+
$settings = PT_CV_Functions::view_get_settings( $id );
|
29 |
+
}
|
30 |
+
}
|
31 |
+
|
32 |
+
// Store settings
|
33 |
+
session_start();
|
34 |
+
$_SESSION[PT_CV_PREFIX . 'settings'] = $settings;
|
35 |
+
|
36 |
+
// Submit handle
|
37 |
+
PT_CV_Functions::view_submit();
|
38 |
+
|
39 |
+
?>
|
40 |
+
|
41 |
+
<div class="wrap form-horizontal pt-wrap">
|
42 |
+
|
43 |
+
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
44 |
+
|
45 |
+
<div class="preview-wrapper">
|
46 |
+
<?php
|
47 |
+
// Preview
|
48 |
+
$options = array(
|
49 |
+
array(
|
50 |
+
'label' => array(
|
51 |
+
'text' => __( 'Preview', PT_CV_DOMAIN ),
|
52 |
+
),
|
53 |
+
'params' => array(
|
54 |
+
array(
|
55 |
+
'type' => 'html',
|
56 |
+
'name' => 'preview',
|
57 |
+
'content' => PT_CV_Html::html_preview_box(),
|
58 |
+
'desc' => __( 'Click "Show Preview" or "Update Preview" button to show, "Hide Preview" button to hide the output', PT_CV_DOMAIN ),
|
59 |
+
),
|
60 |
+
),
|
61 |
+
),
|
62 |
+
);
|
63 |
+
echo balanceTags( PT_Options_Framework::do_settings( $options, $settings ) );
|
64 |
+
?>
|
65 |
+
</div>
|
66 |
+
|
67 |
+
<!-- Show Preview -->
|
68 |
+
<a class="btn btn-success" id="<?php echo esc_attr( PT_CV_PREFIX ); ?>show-preview"><?php _e( 'Show Preview', PT_CV_DOMAIN ); ?></a>
|
69 |
+
|
70 |
+
<br>
|
71 |
+
|
72 |
+
<!-- Settings form -->
|
73 |
+
<form action="" method="POST" id="<?php echo esc_attr( PT_CV_PREFIX . 'form-view' ); ?>">
|
74 |
+
|
75 |
+
<?php
|
76 |
+
// Add nonce field
|
77 |
+
wp_nonce_field( PT_CV_PREFIX_ . 'view_submit', PT_CV_PREFIX_ . 'form_nonce' );
|
78 |
+
|
79 |
+
?>
|
80 |
+
<!-- add hidden field -->
|
81 |
+
<input type="hidden" name="<?php echo esc_attr( PT_CV_PREFIX . 'post-id' ); ?>" value="<?php echo esc_attr( PT_CV_Functions::post_id_from_meta_id( $id ) ); ?>" />
|
82 |
+
<input type="hidden" name="<?php echo esc_attr( PT_CV_PREFIX . 'view-id' ); ?>" value="<?php echo esc_attr( $id ); ?>" />
|
83 |
+
|
84 |
+
<?php
|
85 |
+
// View title
|
86 |
+
$options = array(
|
87 |
+
array(
|
88 |
+
'label' => array(
|
89 |
+
'text' => __( 'View title', PT_CV_DOMAIN ),
|
90 |
+
),
|
91 |
+
'params' => array(
|
92 |
+
array(
|
93 |
+
'type' => 'text',
|
94 |
+
'name' => 'view-title',
|
95 |
+
'std' => '',
|
96 |
+
'desc' => __( 'Enter a name to identify your views easily', PT_CV_DOMAIN ),
|
97 |
+
),
|
98 |
+
),
|
99 |
+
),
|
100 |
+
);
|
101 |
+
echo balanceTags( PT_Options_Framework::do_settings( $options, $settings ) );
|
102 |
+
?>
|
103 |
+
<br>
|
104 |
+
|
105 |
+
<!-- Save -->
|
106 |
+
<input type="submit" class="btn btn-primary pull-right <?php echo esc_attr( PT_CV_PREFIX ); ?>save-view" value="<?php _e( 'Save', PT_CV_DOMAIN ); ?>">
|
107 |
+
|
108 |
+
<!-- Nav tabs -->
|
109 |
+
<ul class="nav nav-tabs">
|
110 |
+
<li class="active">
|
111 |
+
<a href="#<?php echo esc_attr( PT_CV_PREFIX ); ?>filter-settings" data-toggle="tab"><?php _e( 'Filter Settings', PT_CV_DOMAIN ); ?></a>
|
112 |
+
</li>
|
113 |
+
<li>
|
114 |
+
<a href="#<?php echo esc_attr( PT_CV_PREFIX ); ?>display-settings" data-toggle="tab"><?php _e( 'Display Settings', PT_CV_DOMAIN ); ?></a>
|
115 |
+
</li>
|
116 |
+
</ul>
|
117 |
+
|
118 |
+
<!-- Tab panes -->
|
119 |
+
<div class="tab-content">
|
120 |
+
<!-- Filter Settings -->
|
121 |
+
<div class="tab-pane active" id="<?php echo esc_attr( PT_CV_PREFIX ); ?>filter-settings">
|
122 |
+
<?php
|
123 |
+
$options = array(
|
124 |
+
array(
|
125 |
+
'label' => array(
|
126 |
+
'text' => __( 'Content type', PT_CV_DOMAIN ),
|
127 |
+
),
|
128 |
+
'params' => array(
|
129 |
+
array(
|
130 |
+
'type' => 'radio',
|
131 |
+
'name' => 'content-type',
|
132 |
+
'options' => PT_CV_Values::post_types(),
|
133 |
+
'std' => 'post',
|
134 |
+
),
|
135 |
+
),
|
136 |
+
),
|
137 |
+
|
138 |
+
// Common Filters
|
139 |
+
array(
|
140 |
+
'label' => array(
|
141 |
+
'text' => __( 'Common filters', PT_CV_DOMAIN ),
|
142 |
+
),
|
143 |
+
'extra_setting' => array(
|
144 |
+
'params' => array(
|
145 |
+
'wrap-class' => PT_CV_Html::html_group_class(),
|
146 |
+
),
|
147 |
+
),
|
148 |
+
'params' => array(
|
149 |
+
array(
|
150 |
+
'type' => 'group',
|
151 |
+
'params' => array(
|
152 |
+
|
153 |
+
// Includes
|
154 |
+
array(
|
155 |
+
'label' => array(
|
156 |
+
'text' => __( 'In list', PT_CV_DOMAIN ),
|
157 |
+
),
|
158 |
+
'params' => array(
|
159 |
+
array(
|
160 |
+
'type' => 'text',
|
161 |
+
'name' => 'post__in',
|
162 |
+
'std' => '',
|
163 |
+
'desc' => __( 'List of ids (comma-separated values) of posts to retrieve', PT_CV_DOMAIN ),
|
164 |
+
),
|
165 |
+
),
|
166 |
+
),
|
167 |
+
|
168 |
+
// Excludes
|
169 |
+
array(
|
170 |
+
'label' => array(
|
171 |
+
'text' => __( 'Excludes', PT_CV_DOMAIN ),
|
172 |
+
),
|
173 |
+
'params' => array(
|
174 |
+
array(
|
175 |
+
'type' => 'text',
|
176 |
+
'name' => 'post__not_in',
|
177 |
+
'std' => '',
|
178 |
+
'desc' => __( 'List of ids (comma-separated values) of posts to exclude from view', PT_CV_DOMAIN ),
|
179 |
+
),
|
180 |
+
),
|
181 |
+
),
|
182 |
+
|
183 |
+
// Limit
|
184 |
+
array(
|
185 |
+
'label' => array(
|
186 |
+
'text' => __( 'Limit', PT_CV_DOMAIN ),
|
187 |
+
),
|
188 |
+
'params' => array(
|
189 |
+
array(
|
190 |
+
'type' => 'number',
|
191 |
+
'name' => 'limit',
|
192 |
+
'std' => '10',
|
193 |
+
'min' => '1',
|
194 |
+
'desc' => __( 'The number of posts to show. Leaving it blank to show all found posts (which match all settings)', PT_CV_DOMAIN ),
|
195 |
+
),
|
196 |
+
),
|
197 |
+
),
|
198 |
+
),
|
199 |
+
),
|
200 |
+
),
|
201 |
+
), // End Common Filters
|
202 |
+
|
203 |
+
// Advanced Filters
|
204 |
+
array(
|
205 |
+
'label' => array(
|
206 |
+
'text' => __( 'Advanced filters', PT_CV_DOMAIN ),
|
207 |
+
),
|
208 |
+
'extra_setting' => array(
|
209 |
+
'params' => array(
|
210 |
+
'wrap-class' => PT_CV_Html::html_group_class(),
|
211 |
+
'wrap-id' => PT_CV_Html::html_group_id( 'advanced-params' ),
|
212 |
+
),
|
213 |
+
),
|
214 |
+
'params' => array(
|
215 |
+
array(
|
216 |
+
'type' => 'group',
|
217 |
+
'params' => array(
|
218 |
+
array(
|
219 |
+
'label' => array(
|
220 |
+
'text' => __( '', PT_CV_DOMAIN ),
|
221 |
+
),
|
222 |
+
'extra_setting' => array(
|
223 |
+
'params' => array(
|
224 |
+
'width' => 12,
|
225 |
+
),
|
226 |
+
),
|
227 |
+
'params' => array(
|
228 |
+
array(
|
229 |
+
'type' => 'checkbox',
|
230 |
+
'name' => 'advanced-settings[]',
|
231 |
+
'options' => PT_CV_Values::advanced_settings(),
|
232 |
+
'std' => '',
|
233 |
+
'class' => 'advanced-settings-item',
|
234 |
+
),
|
235 |
+
),
|
236 |
+
),
|
237 |
+
),
|
238 |
+
),
|
239 |
+
),
|
240 |
+
), // End Advanced Filters
|
241 |
+
|
242 |
+
// Settings of Advanced Filters options
|
243 |
+
array(
|
244 |
+
'label' => array(
|
245 |
+
'text' => '',
|
246 |
+
),
|
247 |
+
'extra_setting' => array(
|
248 |
+
'params' => array(
|
249 |
+
'wrap-class' => PT_CV_Html::html_panel_group_class(),
|
250 |
+
'wrap-id' => PT_CV_Html::html_panel_group_id( PT_CV_Functions::string_random() ),
|
251 |
+
),
|
252 |
+
),
|
253 |
+
'params' => array(
|
254 |
+
array(
|
255 |
+
'type' => 'panel_group',
|
256 |
+
'params' => array(
|
257 |
+
|
258 |
+
// Author Settings
|
259 |
+
'author' => array(
|
260 |
+
array(
|
261 |
+
'label' => array(
|
262 |
+
'text' => __( 'Written by', PT_CV_DOMAIN ),
|
263 |
+
),
|
264 |
+
'params' => array(
|
265 |
+
array(
|
266 |
+
'type' => 'select',
|
267 |
+
'name' => 'author__in[]',
|
268 |
+
'options' => PT_CV_Values::user_list(),
|
269 |
+
'std' => '',
|
270 |
+
'class' => 'select2',
|
271 |
+
'multiple' => $version_gt_37 ? '1' : '0',
|
272 |
+
),
|
273 |
+
),
|
274 |
+
),
|
275 |
+
$version_gt_37 ?
|
276 |
+
array(
|
277 |
+
'label' => array(
|
278 |
+
'text' => __( 'Not written by', PT_CV_DOMAIN ),
|
279 |
+
),
|
280 |
+
'params' => array(
|
281 |
+
array(
|
282 |
+
'type' => 'select',
|
283 |
+
'name' => 'author__not_in[]',
|
284 |
+
'options' => PT_CV_Values::user_list(),
|
285 |
+
'std' => '',
|
286 |
+
'class' => 'select2',
|
287 |
+
'multiple' => $version_gt_37 ? '1' : '0',
|
288 |
+
),
|
289 |
+
),
|
290 |
+
) : array(),
|
291 |
+
), // End Author Settings
|
292 |
+
|
293 |
+
// Taxonomies Settings
|
294 |
+
'taxonomy' => array(
|
295 |
+
|
296 |
+
// Taxonomies list
|
297 |
+
array(
|
298 |
+
'label' => array(
|
299 |
+
'text' => __( 'Taxonomies', PT_CV_DOMAIN ),
|
300 |
+
),
|
301 |
+
'params' => array(
|
302 |
+
array(
|
303 |
+
'type' => 'checkbox',
|
304 |
+
'name' => 'taxonomy[]',
|
305 |
+
'options' => PT_CV_Values::taxonomy_list(),
|
306 |
+
'std' => '',
|
307 |
+
'class' => 'taxonomy-item',
|
308 |
+
'desc' => __( 'Select checkbox of taxonomies to filter their terms', PT_CV_DOMAIN ),
|
309 |
+
),
|
310 |
+
),
|
311 |
+
),
|
312 |
+
|
313 |
+
// Terms list
|
314 |
+
array(
|
315 |
+
'label' => array(
|
316 |
+
'text' => __( 'Terms', PT_CV_DOMAIN ),
|
317 |
+
),
|
318 |
+
'extra_setting' => array(
|
319 |
+
'params' => array(
|
320 |
+
'wrap-class' => PT_CV_Html::html_panel_group_class() . ' terms',
|
321 |
+
'wrap-id' => PT_CV_Html::html_panel_group_id( PT_CV_Functions::string_random() ),
|
322 |
+
),
|
323 |
+
),
|
324 |
+
'params' => array(
|
325 |
+
array(
|
326 |
+
'type' => 'panel_group',
|
327 |
+
'settings' => array(
|
328 |
+
'nice_name' => PT_CV_Values::taxonomy_list(),
|
329 |
+
),
|
330 |
+
'params' => PT_CV_Settings::terms_of_taxonomies(),
|
331 |
+
),
|
332 |
+
),
|
333 |
+
),
|
334 |
+
|
335 |
+
// Relation of taxonomies
|
336 |
+
array(
|
337 |
+
'label' => array(
|
338 |
+
'text' => __( 'Relation', PT_CV_DOMAIN ),
|
339 |
+
),
|
340 |
+
'params' => array(
|
341 |
+
array(
|
342 |
+
'type' => 'select',
|
343 |
+
'name' => 'taxonomy-relation',
|
344 |
+
'options' => PT_CV_Values::taxonomy_relation(),
|
345 |
+
'std' => PT_CV_Functions::array_get_first_key( PT_CV_Values::taxonomy_relation() ),
|
346 |
+
'class' => 'taxonomy-relation',
|
347 |
+
'desc' => __( 'Select AND to show posts which match ALL settings of selected taxonomies[--br--]Select OR to show posts which match settings of at least one selected taxonomy', PT_CV_DOMAIN ),
|
348 |
+
),
|
349 |
+
),
|
350 |
+
),
|
351 |
+
), // End Taxonomies Settings
|
352 |
+
|
353 |
+
// Order by Settings
|
354 |
+
'order' => array(
|
355 |
+
array(
|
356 |
+
'label' => array(
|
357 |
+
'text' => __( 'Order by', PT_CV_DOMAIN ),
|
358 |
+
),
|
359 |
+
'extra_setting' => array(
|
360 |
+
'params' => array(
|
361 |
+
'width' => 12,
|
362 |
+
),
|
363 |
+
),
|
364 |
+
'params' => array(
|
365 |
+
array(
|
366 |
+
'type' => 'panel_group',
|
367 |
+
'settings' => array(
|
368 |
+
'show_all' => 1,
|
369 |
+
),
|
370 |
+
'params' => PT_CV_Settings::orderby(),
|
371 |
+
),
|
372 |
+
),
|
373 |
+
),
|
374 |
+
), // End Order by Settings
|
375 |
+
|
376 |
+
// Status Settings
|
377 |
+
'status' => array(
|
378 |
+
array(
|
379 |
+
'label' => array(
|
380 |
+
'text' => __( 'Status', PT_CV_DOMAIN ),
|
381 |
+
),
|
382 |
+
'params' => array(
|
383 |
+
array(
|
384 |
+
'type' => 'select',
|
385 |
+
'name' => 'post_status',
|
386 |
+
'options' => PT_CV_Values::post_statuses(),
|
387 |
+
'std' => 'publish',
|
388 |
+
'class' => 'select2',
|
389 |
+
'multiple' => '1',
|
390 |
+
'desc' => __( 'Select status of posts', PT_CV_DOMAIN ),
|
391 |
+
),
|
392 |
+
),
|
393 |
+
),
|
394 |
+
), // End Status Settings
|
395 |
+
|
396 |
+
// Keyword Settings
|
397 |
+
'search' => array(
|
398 |
+
array(
|
399 |
+
'label' => array(
|
400 |
+
'text' => __( 'Keyword', PT_CV_DOMAIN ),
|
401 |
+
),
|
402 |
+
'params' => array(
|
403 |
+
array(
|
404 |
+
'type' => 'text',
|
405 |
+
'name' => 's',
|
406 |
+
'std' => '',
|
407 |
+
'desc' => __( 'Enter the keyword to searching for posts', PT_CV_DOMAIN ),
|
408 |
+
),
|
409 |
+
),
|
410 |
+
),
|
411 |
+
), // End Keyword Settings
|
412 |
+
),
|
413 |
+
),
|
414 |
+
),
|
415 |
+
),
|
416 |
+
);
|
417 |
+
echo balanceTags( PT_Options_Framework::do_settings( $options, $settings ) );
|
418 |
+
?>
|
419 |
+
</div>
|
420 |
+
<!-- end Filter Settings -->
|
421 |
+
|
422 |
+
<!-- Display Settings -->
|
423 |
+
<div class="tab-pane" id="<?php echo esc_attr( PT_CV_PREFIX ); ?>display-settings">
|
424 |
+
<?php
|
425 |
+
$options = array(
|
426 |
+
|
427 |
+
// View Type
|
428 |
+
array(
|
429 |
+
'label' => array(
|
430 |
+
'text' => __( 'View type', PT_CV_DOMAIN ),
|
431 |
+
),
|
432 |
+
'params' => array(
|
433 |
+
array(
|
434 |
+
'type' => 'radio',
|
435 |
+
'name' => 'view-type',
|
436 |
+
'options' => PT_CV_Values::view_type(),
|
437 |
+
'std' => PT_CV_Functions::array_get_first_key( PT_CV_Values::view_type() ),
|
438 |
+
),
|
439 |
+
),
|
440 |
+
),
|
441 |
+
|
442 |
+
// View settings
|
443 |
+
array(
|
444 |
+
'label' => array(
|
445 |
+
'text' => __( 'View type settings', PT_CV_DOMAIN ),
|
446 |
+
),
|
447 |
+
'params' => array(
|
448 |
+
array(
|
449 |
+
'type' => 'panel_group',
|
450 |
+
'settings' => array(
|
451 |
+
'no_panel' => 1,
|
452 |
+
'no_animation' => 1,
|
453 |
+
'show_only_one' => 1,
|
454 |
+
),
|
455 |
+
'params' => PT_CV_Values::view_type_settings(),
|
456 |
+
),
|
457 |
+
),
|
458 |
+
),
|
459 |
+
|
460 |
+
// Layout format of output item
|
461 |
+
array(
|
462 |
+
'label' => array(
|
463 |
+
'text' => __( 'Layout format of an output item', PT_CV_DOMAIN ),
|
464 |
+
),
|
465 |
+
'params' => array(
|
466 |
+
array(
|
467 |
+
'type' => 'radio',
|
468 |
+
'name' => 'layout-format',
|
469 |
+
'options' => PT_CV_Values::layout_format(),
|
470 |
+
'std' => PT_CV_Functions::array_get_first_key( PT_CV_Values::layout_format() ),
|
471 |
+
),
|
472 |
+
),
|
473 |
+
),
|
474 |
+
|
475 |
+
// Fields settings
|
476 |
+
array(
|
477 |
+
'label' => array(
|
478 |
+
'text' => __( 'Fields settings', PT_CV_DOMAIN ),
|
479 |
+
),
|
480 |
+
'extra_setting' => array(
|
481 |
+
'params' => array(
|
482 |
+
'wrap-class' => PT_CV_Html::html_group_class(),
|
483 |
+
),
|
484 |
+
),
|
485 |
+
'params' => array(
|
486 |
+
array(
|
487 |
+
'type' => 'group',
|
488 |
+
'params' => PT_CV_Settings::field_settings(),
|
489 |
+
),
|
490 |
+
),
|
491 |
+
),
|
492 |
+
|
493 |
+
// Pagination settings
|
494 |
+
array(
|
495 |
+
'label' => array(
|
496 |
+
'text' => __( 'Pagination settings', PT_CV_DOMAIN ),
|
497 |
+
),
|
498 |
+
'extra_setting' => array(
|
499 |
+
'params' => array(
|
500 |
+
'wrap-class' => PT_CV_Html::html_group_class(),
|
501 |
+
),
|
502 |
+
),
|
503 |
+
'params' => array(
|
504 |
+
array(
|
505 |
+
'type' => 'group',
|
506 |
+
'params' => PT_CV_Settings::settings_pagination(),
|
507 |
+
),
|
508 |
+
),
|
509 |
+
),
|
510 |
+
|
511 |
+
// Other settings
|
512 |
+
array(
|
513 |
+
'label' => array(
|
514 |
+
'text' => __( 'Other settings', PT_CV_DOMAIN ),
|
515 |
+
),
|
516 |
+
'extra_setting' => array(
|
517 |
+
'params' => array(
|
518 |
+
'wrap-class' => PT_CV_Html::html_group_class(),
|
519 |
+
),
|
520 |
+
),
|
521 |
+
'params' => array(
|
522 |
+
array(
|
523 |
+
'type' => 'group',
|
524 |
+
'params' => PT_CV_Settings::settings_other(),
|
525 |
+
),
|
526 |
+
),
|
527 |
+
),
|
528 |
+
|
529 |
+
);
|
530 |
+
echo balanceTags( PT_Options_Framework::do_settings( $options, $settings ) );
|
531 |
+
?>
|
532 |
+
</div>
|
533 |
+
<!-- end Display Settings -->
|
534 |
+
|
535 |
+
</div>
|
536 |
+
|
537 |
+
<div class="clearfix"></div>
|
538 |
+
<hr>
|
539 |
+
<!-- Save -->
|
540 |
+
<input type="submit" class="btn btn-primary pull-right <?php echo esc_attr( PT_CV_PREFIX ); ?>save-view" value="<?php _e( 'Save', PT_CV_DOMAIN ); ?>">
|
541 |
+
</form>
|
542 |
+
</div>
|
assets/bootstrap-paginator/bootstrap-paginator.min.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* bootstrap-paginator.js v0.5
|
3 |
+
* --
|
4 |
+
* Copyright 2013 Yun Lai <lyonlai1984@gmail.com>
|
5 |
+
* --
|
6 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
7 |
+
* you may not use this file except in compliance with the License.
|
8 |
+
* You may obtain a copy of the License at
|
9 |
+
*
|
10 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
11 |
+
*
|
12 |
+
* Unless required by applicable law or agreed to in writing, software
|
13 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
14 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15 |
+
* See the License for the specific language governing permissions and
|
16 |
+
* limitations under the License.
|
17 |
+
*/
|
18 |
+
(function(c){var b=function(e,d){this.init(e,d)},a=null;b.prototype={init:function(f,e){this.$element=c(f);var d=(e&&e.bootstrapMajorVersion)?e.bootstrapMajorVersion:c.fn.bootstrapPaginator.defaults.bootstrapMajorVersion,g=this.$element.attr("id");if(d===2&&!this.$element.is("div")){throw"in Bootstrap version 2 the pagination must be a div element. Or if you are using Bootstrap pagination 3. Please specify it in bootstrapMajorVersion in the option"}else{if(d>2&&!this.$element.is("ul")){throw"in Bootstrap version 3 the pagination root item must be an ul element."}}this.currentPage=1;this.lastPage=1;this.setOptions(e);this.initialized=true},setOptions:function(d){this.options=c.extend({},(this.options||c.fn.bootstrapPaginator.defaults),d);this.totalPages=parseInt(this.options.totalPages,10);this.numberOfPages=parseInt(this.options.numberOfPages,10);if(d&&typeof(d.currentPage)!=="undefined"){this.setCurrentPage(d.currentPage)}this.listen();this.render();if(!this.initialized&&this.lastPage!==this.currentPage){this.$element.trigger("page-changed",[this.lastPage,this.currentPage])}},listen:function(){this.$element.off("page-clicked");this.$element.off("page-changed");if(typeof(this.options.onPageClicked)==="function"){this.$element.bind("page-clicked",this.options.onPageClicked)}if(typeof(this.options.onPageChanged)==="function"){this.$element.on("page-changed",this.options.onPageChanged)}this.$element.bind("page-clicked",this.onPageClicked)},destroy:function(){this.$element.off("page-clicked");this.$element.off("page-changed");this.$element.removeData("bootstrapPaginator");this.$element.empty()},show:function(d){this.setCurrentPage(d);this.render();if(this.lastPage!==this.currentPage){this.$element.trigger("page-changed",[this.lastPage,this.currentPage])}},showNext:function(){var d=this.getPages();if(d.next){this.show(d.next)}},showPrevious:function(){var d=this.getPages();if(d.prev){this.show(d.prev)}},showFirst:function(){var d=this.getPages();if(d.first){this.show(d.first)}},showLast:function(){var d=this.getPages();if(d.last){this.show(d.last)}},onPageItemClicked:function(e){var d=e.data.type,f=e.data.page;this.$element.trigger("page-clicked",[e,d,f])},onPageClicked:function(f,d,e,g){var h=c(f.currentTarget);switch(e){case"first":h.bootstrapPaginator("showFirst");break;case"prev":h.bootstrapPaginator("showPrevious");break;case"next":h.bootstrapPaginator("showNext");break;case"last":h.bootstrapPaginator("showLast");break;case"page":h.bootstrapPaginator("show",g);break}},render:function(){var o=this.getValueFromOption(this.options.containerClass,this.$element),q=this.options.size||"normal",l=this.options.alignment||"left",e=this.getPages(),k=this.options.bootstrapMajorVersion===2?c("<ul></ul>"):this.$element,m=this.options.bootstrapMajorVersion===2?this.getValueFromOption(this.options.listContainerClass,k):null,j=null,f=null,h=null,n=null,d=null,g=0;this.$element.prop("class","");this.$element.addClass("pagination");switch(q.toLowerCase()){case"large":case"small":case"mini":this.$element.addClass(c.fn.bootstrapPaginator.sizeArray[this.options.bootstrapMajorVersion][q.toLowerCase()]);break;default:break}if(this.options.bootstrapMajorVersion===2){switch(l.toLowerCase()){case"center":this.$element.addClass("pagination-centered");break;case"right":this.$element.addClass("pagination-right");break;default:break}}this.$element.addClass(o);this.$element.empty();if(this.options.bootstrapMajorVersion===2){this.$element.append(k);k.addClass(m)}this.pageRef=[];if(e.first){j=this.buildPageItem("first",e.first);if(j){k.append(j)}}if(e.prev){f=this.buildPageItem("prev",e.prev);if(f){k.append(f)}}for(g=0;g<e.length;g=g+1){d=this.buildPageItem("page",e[g]);if(d){k.append(d)}}if(e.next){h=this.buildPageItem("next",e.next);if(h){k.append(h)}}if(e.last){n=this.buildPageItem("last",e.last);if(n){k.append(n)}}},buildPageItem:function(i,g){var j=c("<li></li>"),e=c("<a></a>"),l="",k="",d=this.options.itemContainerClass(i,g,this.currentPage),f=this.getValueFromOption(this.options.itemContentClass,i,g,this.currentPage),h=null;switch(i){case"first":if(!this.getValueFromOption(this.options.shouldShowPage,i,g,this.currentPage)){return}l=this.options.itemTexts(i,g,this.currentPage);k=this.options.tooltipTitles(i,g,this.currentPage);break;case"last":if(!this.getValueFromOption(this.options.shouldShowPage,i,g,this.currentPage)){return}l=this.options.itemTexts(i,g,this.currentPage);k=this.options.tooltipTitles(i,g,this.currentPage);break;case"prev":if(!this.getValueFromOption(this.options.shouldShowPage,i,g,this.currentPage)){return}l=this.options.itemTexts(i,g,this.currentPage);k=this.options.tooltipTitles(i,g,this.currentPage);break;case"next":if(!this.getValueFromOption(this.options.shouldShowPage,i,g,this.currentPage)){return}l=this.options.itemTexts(i,g,this.currentPage);k=this.options.tooltipTitles(i,g,this.currentPage);break;case"page":if(!this.getValueFromOption(this.options.shouldShowPage,i,g,this.currentPage)){return}l=this.options.itemTexts(i,g,this.currentPage);k=this.options.tooltipTitles(i,g,this.currentPage);break}j.addClass(d).append(e);e.addClass(f).html(l).on("click",null,{type:i,page:g},c.proxy(this.onPageItemClicked,this));if(this.options.pageUrl){e.attr("href",this.getValueFromOption(this.options.pageUrl,i,g,this.currentPage))}if(this.options.useBootstrapTooltip){h=c.extend({},this.options.bootstrapTooltipOptions,{title:k});e.tooltip(h)}else{e.attr("title",k)}return j},setCurrentPage:function(d){if(d>this.totalPages||d<1){throw"Page out of range"}this.lastPage=this.currentPage;this.currentPage=parseInt(d,10)},getPages:function(){var g=this.totalPages,h=(this.currentPage%this.numberOfPages===0)?(parseInt(this.currentPage/this.numberOfPages,10)-1)*this.numberOfPages+1:parseInt(this.currentPage/this.numberOfPages,10)*this.numberOfPages+1,e=[],f=0,d=0;h=h<1?1:h;for(f=h,d=0;d<this.numberOfPages&&f<=g;f=f+1,d=d+1){e.push(f)}e.first=1;if(this.currentPage>1){e.prev=this.currentPage-1}else{e.prev=1}if(this.currentPage<g){e.next=this.currentPage+1}else{e.next=g}e.last=g;e.current=this.currentPage;e.total=g;e.numberOfPages=this.options.numberOfPages;return e},getValueFromOption:function(f){var d=null,e=Array.prototype.slice.call(arguments,1);if(typeof f==="function"){d=f.apply(this,e)}else{d=f}return d}};a=c.fn.bootstrapPaginator;c.fn.bootstrapPaginator=function(f){var e=arguments,d=null;c(this).each(function(h,i){var k=c(i),j=k.data("bootstrapPaginator"),g=(typeof f!=="object")?null:f;if(!j){j=new b(this,g);k=c(j.$element);k.data("bootstrapPaginator",j);return}if(typeof f==="string"){if(j[f]){d=j[f].apply(j,Array.prototype.slice.call(e,1))}else{throw"Method "+f+" does not exist"}}else{d=j.setOptions(f)}});return d};c.fn.bootstrapPaginator.sizeArray={"2":{large:"pagination-large",small:"pagination-small",mini:"pagination-mini"},"3":{large:"pagination-lg",small:"pagination-sm",mini:""}};c.fn.bootstrapPaginator.defaults={containerClass:"",size:"normal",alignment:"left",bootstrapMajorVersion:2,listContainerClass:"",itemContainerClass:function(d,e,f){return(e===f)?"active":""},itemContentClass:function(d,e,f){return""},currentPage:1,numberOfPages:5,totalPages:1,pageUrl:function(d,e,f){return null},onPageClicked:null,onPageChanged:null,useBootstrapTooltip:false,shouldShowPage:function(e,f,g){var d=true;switch(e){case"first":d=(g!==1);break;case"prev":d=(g!==1);break;case"next":d=(g!==this.totalPages);break;case"last":d=(g!==this.totalPages);break;case"page":d=true;break}return d},itemTexts:function(d,e,f){switch(d){case"first":return"«";case"prev":return"‹";case"next":return"›";case"last":return"»";case"page":return e}},tooltipTitles:function(d,e,f){switch(d){case"first":return"Go to first page";case"prev":return"Go to previous page";case"next":return"Go to next page";case"last":return"Go to last page";case"page":return(e===f)?"Current page is "+e:"Go to page "+e}},bootstrapTooltipOptions:{animation:true,html:true,placement:"top",selector:false,title:"",container:false}};c.fn.bootstrapPaginator.Constructor=b}(window.jQuery));
|
assets/bootstrap/css/bootstrap.min.css
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Bootstrap v3.1.1 (http://getbootstrap.com)
|
3 |
+
* Copyright 2011-2014 Twitter, Inc.
|
4 |
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5 |
+
*/
|
6 |
+
|
7 |
+
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}@media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff !important}.navbar{display:none}.table td,.table th{background-color:#fff !important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#999}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:200;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-muted{color:#999}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:bold}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#999}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;white-space:nowrap;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25)}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:0}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:0}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:0}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:0}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:0}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:0}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:0}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:0}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type="search"]{-webkit-appearance:none}input[type="date"]{line-height:34px}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.radio label,.checkbox label{display:inline;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],.radio[disabled],.radio-inline[disabled],.checkbox[disabled],.checkbox-inline[disabled],fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"],fieldset[disabled] .radio,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.has-feedback .form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.has-error .form-control-feedback{color:#a94442}.form-control-static{margin-bottom:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:none;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .control-label,.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}.form-horizontal .form-control-static{padding-top:7px}@media (min-width:768px){.form-horizontal .control-label{text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.btn-default:active,.btn-default.active,.open .dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open .dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{color:#fff;background-color:#47a447;border-color:#398439}.btn-success:active,.btn-success.active,.open .dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.btn-info:active,.btn-info.active,.open .dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open .dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open .dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{color:#428bca;font-weight:normal;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#999;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%;padding-left:0;padding-right:0}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:none}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}[data-toggle="buttons"]>.btn>input[type="radio"],[data-toggle="buttons"]>.btn>input[type="checkbox"]{display:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:normal;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{max-height:340px;overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block !important;height:auto !important;padding-bottom:0;overflow:visible !important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:none}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left !important}.navbar-right{float:right !important}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);margin-top:8px;margin-bottom:8px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{float:none;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#e7e7e7;color:#555}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#080808;color:#fff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#999}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;line-height:1.42857143;text-decoration:none;color:#428bca;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;background-color:#fff;border-color:#ddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;background-color:#fff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#999}.label-default[href]:hover,.label-default[href]:focus{background-color:#808080}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;color:#fff;line-height:1;vertical-align:baseline;white-space:nowrap;text-align:center;background-color:#999;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable{padding-right:35px}.alert-dismissable .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0%;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active,a.list-group-item.active:hover,a.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading,a.list-group-item.active:hover .list-group-item-heading,a.list-group-item.active:focus .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text,a.list-group-item.active:hover .list-group-item-text,a.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px;overflow:hidden}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse .panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse .panel-body{border-top-color:#ddd}.panel-default>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse .panel-body{border-top-color:#428bca}.panel-primary>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse .panel-body{border-top-color:#d6e9c6}.panel-success>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse .panel-body{border-top-color:#bce8f1}.panel-info>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse .panel-body{border-top-color:#faebcc}.panel-warning>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse .panel-body{border-top-color:#ebccd1}.panel-danger>.panel-footer+.panel-collapse .panel-body{border-bottom-color:#ebccd1}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform 0.3s ease-out;-moz-transition:-moz-transform 0.3s ease-out;-o-transition:-o-transform 0.3s ease-out;transition:transform 0.3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);transform:translate(0, 0)}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);background-clip:padding-box;outline:none}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;right:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);white-space:normal}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,0.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,0.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:.5;filter:alpha(opacity=50);font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-control.left{background-image:-webkit-linear-gradient(left, color-stop(rgba(0,0,0,0.5) 0), color-stop(rgba(0,0,0,0.0001) 100%));background-image:linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left, color-stop(rgba(0,0,0,0.0001) 0), color-stop(rgba(0,0,0,0.5) 100%));background-image:linear-gradient(to right, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:none;color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #fff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#fff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important;visibility:hidden !important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none !important}@media (max-width:767px){.visible-xs{display:block !important}table.visible-xs{display:table}tr.visible-xs{display:table-row !important}th.visible-xs,td.visible-xs{display:table-cell !important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block !important}table.visible-sm{display:table}tr.visible-sm{display:table-row !important}th.visible-sm,td.visible-sm{display:table-cell !important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block !important}table.visible-md{display:table}tr.visible-md{display:table-row !important}th.visible-md,td.visible-md{display:table-cell !important}}@media (min-width:1200px){.visible-lg{display:block !important}table.visible-lg{display:table}tr.visible-lg{display:table-row !important}th.visible-lg,td.visible-lg{display:table-cell !important}}@media (max-width:767px){.hidden-xs{display:none !important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none !important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none !important}}@media (min-width:1200px){.hidden-lg{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:block !important}table.visible-print{display:table}tr.visible-print{display:table-row !important}th.visible-print,td.visible-print{display:table-cell !important}}@media print{.hidden-print{display:none !important}}
|
assets/bootstrap/fonts/glyphicons-halflings-regular.eot
ADDED
Binary file
|
assets/bootstrap/fonts/glyphicons-halflings-regular.svg
ADDED
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3 |
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4 |
+
<metadata></metadata>
|
5 |
+
<defs>
|
6 |
+
<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
|
7 |
+
<font-face units-per-em="1200" ascent="960" descent="-240" />
|
8 |
+
<missing-glyph horiz-adv-x="500" />
|
9 |
+
<glyph />
|
10 |
+
<glyph />
|
11 |
+
<glyph unicode="
" />
|
12 |
+
<glyph unicode=" " />
|
13 |
+
<glyph unicode="*" d="M100 500v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259z" />
|
14 |
+
<glyph unicode="+" d="M0 400v300h400v400h300v-400h400v-300h-400v-400h-300v400h-400z" />
|
15 |
+
<glyph unicode=" " />
|
16 |
+
<glyph unicode=" " horiz-adv-x="652" />
|
17 |
+
<glyph unicode=" " horiz-adv-x="1304" />
|
18 |
+
<glyph unicode=" " horiz-adv-x="652" />
|
19 |
+
<glyph unicode=" " horiz-adv-x="1304" />
|
20 |
+
<glyph unicode=" " horiz-adv-x="434" />
|
21 |
+
<glyph unicode=" " horiz-adv-x="326" />
|
22 |
+
<glyph unicode=" " horiz-adv-x="217" />
|
23 |
+
<glyph unicode=" " horiz-adv-x="217" />
|
24 |
+
<glyph unicode=" " horiz-adv-x="163" />
|
25 |
+
<glyph unicode=" " horiz-adv-x="260" />
|
26 |
+
<glyph unicode=" " horiz-adv-x="72" />
|
27 |
+
<glyph unicode=" " horiz-adv-x="260" />
|
28 |
+
<glyph unicode=" " horiz-adv-x="326" />
|
29 |
+
<glyph unicode="€" d="M100 500l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-62.5 -32t-65.5 -67t-50.5 -107h379l-100 -100h-300q-6 -46 -6 -100h406l-100 -100 h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-205 0 -324 158q-36 46 -69 131.5t-45 205.5h-217z" />
|
30 |
+
<glyph unicode="−" d="M200 400h900v300h-900v-300z" />
|
31 |
+
<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" />
|
32 |
+
<glyph unicode="☁" d="M-14 494q0 -80 56.5 -137t135.5 -57h750q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5z" />
|
33 |
+
<glyph unicode="✉" d="M0 100l400 400l200 -200l200 200l400 -400h-1200zM0 300v600l300 -300zM0 1100l600 -603l600 603h-1200zM900 600l300 300v-600z" />
|
34 |
+
<glyph unicode="✏" d="M-13 -13l333 112l-223 223zM187 403l214 -214l614 614l-214 214zM887 1103l214 -214l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13z" />
|
35 |
+
<glyph unicode="" d="M0 1200h1200l-500 -550v-550h300v-100h-800v100h300v550z" />
|
36 |
+
<glyph unicode="" d="M14 84q18 -55 86 -75.5t147 5.5q65 21 109 69t44 90v606l600 155v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q18 -55 86 -75.5t147 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7 q-79 -25 -122.5 -82t-25.5 -112z" />
|
37 |
+
<glyph unicode="" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" />
|
38 |
+
<glyph unicode="" d="M100 784q0 64 28 123t73 100.5t104.5 64t119 20.5t120 -38.5t104.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5 t-94 124.5t-33.5 117.5z" />
|
39 |
+
<glyph unicode="" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1z" />
|
40 |
+
<glyph unicode="" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1zM237 700l196 -142l-73 -226l192 140l195 -141l-74 229l193 140h-235l-77 211l-78 -211h-239z" />
|
41 |
+
<glyph unicode="" d="M0 0v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100l400 -257v-143h-1200z" />
|
42 |
+
<glyph unicode="" d="M0 0v1100h1200v-1100h-1200zM100 100h100v100h-100v-100zM100 300h100v100h-100v-100zM100 500h100v100h-100v-100zM100 700h100v100h-100v-100zM100 900h100v100h-100v-100zM300 100h600v400h-600v-400zM300 600h600v400h-600v-400zM1000 100h100v100h-100v-100z M1000 300h100v100h-100v-100zM1000 500h100v100h-100v-100zM1000 700h100v100h-100v-100zM1000 900h100v100h-100v-100z" />
|
43 |
+
<glyph unicode="" d="M0 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM0 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5zM600 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM600 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5z" />
|
44 |
+
<glyph unicode="" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 450v200q0 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5z" />
|
45 |
+
<glyph unicode="" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5 t-14.5 -35.5v-200zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5z" />
|
46 |
+
<glyph unicode="" d="M29 454l419 -420l818 820l-212 212l-607 -607l-206 207z" />
|
47 |
+
<glyph unicode="" d="M106 318l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282l-212 -212l-282 282l-282 -282z" />
|
48 |
+
<glyph unicode="" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233zM300 600v200h100v100h200v-100h100v-200h-100v-100h-200v100h-100z" />
|
49 |
+
<glyph unicode="" d="M23 694q0 200 142 342t342 142t342 -142t142 -342q0 -141 -78 -262l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 601h400v200h-400v-200z" />
|
50 |
+
<glyph unicode="" d="M23 600q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5 zM500 750q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400z" />
|
51 |
+
<glyph unicode="" d="M100 1h200v300h-200v-300zM400 1v500h200v-500h-200zM700 1v800h200v-800h-200zM1000 1v1200h200v-1200h-200z" />
|
52 |
+
<glyph unicode="" d="M26 601q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39l5 -2l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38 l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73zM385 601 q0 88 63 151t152 63t152 -63t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152z" />
|
53 |
+
<glyph unicode="" d="M100 1025v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18zM200 100v800h900v-800q0 -41 -29.5 -71t-70.5 -30h-700q-41 0 -70.5 30 t-29.5 71zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM500 1100h300v100h-300v-100zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" />
|
54 |
+
<glyph unicode="" d="M1 601l656 644l644 -644h-200v-600h-300v400h-300v-400h-300v600h-200z" />
|
55 |
+
<glyph unicode="" d="M100 25v1150q0 11 7 18t18 7h475v-500h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18zM700 800v300l300 -300h-300z" />
|
56 |
+
<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 500v400h100 v-300h200v-100h-300z" />
|
57 |
+
<glyph unicode="" d="M-100 0l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538l-41 400h-242l-40 -400h-539zM488 500h224l-27 300h-170z" />
|
58 |
+
<glyph unicode="" d="M0 0v400h490l-290 300h200v500h300v-500h200l-290 -300h490v-400h-1100zM813 200h175v100h-175v-100z" />
|
59 |
+
<glyph unicode="" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM188 600q0 -170 121 -291t291 -121t291 121t121 291t-121 291t-291 121 t-291 -121t-121 -291zM350 600h150v300h200v-300h150l-250 -300z" />
|
60 |
+
<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM350 600l250 300 l250 -300h-150v-300h-200v300h-150z" />
|
61 |
+
<glyph unicode="" d="M0 25v475l200 700h800l199 -700l1 -475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18zM200 500h200l50 -200h300l50 200h200l-97 500h-606z" />
|
62 |
+
<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 397v401 l297 -200z" />
|
63 |
+
<glyph unicode="" d="M23 600q0 -118 45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123t123 184t45.5 224.5h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123 t-123 -184t-45.5 -224.5z" />
|
64 |
+
<glyph unicode="" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150zM100 0v400h400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122z" />
|
65 |
+
<glyph unicode="" d="M100 0h1100v1200h-1100v-1200zM200 100v900h900v-900h-900zM300 200v100h100v-100h-100zM300 400v100h100v-100h-100zM300 600v100h100v-100h-100zM300 800v100h100v-100h-100zM500 200h500v100h-500v-100zM500 400v100h500v-100h-500zM500 600v100h500v-100h-500z M500 800v100h500v-100h-500z" />
|
66 |
+
<glyph unicode="" d="M0 100v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" />
|
67 |
+
<glyph unicode="" d="M100 0v1100h100v-1100h-100zM300 400q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500z" />
|
68 |
+
<glyph unicode="" d="M0 275q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5 t-49.5 -227v-300zM200 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14zM800 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14z" />
|
69 |
+
<glyph unicode="" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM688 459l141 141l-141 141l71 71l141 -141l141 141l71 -71l-141 -141l141 -141l-71 -71l-141 141l-141 -141z" />
|
70 |
+
<glyph unicode="" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" />
|
71 |
+
<glyph unicode="" d="M0 401v400h300l300 200v-800l-300 200h-300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 110 86 248q0 145 -93 257zM889 951l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8l81 -66l6 8q142 178 142 405q0 230 -144 408l-6 8z" />
|
72 |
+
<glyph unicode="" d="M0 0h500v500h-200v100h-100v-100h-200v-500zM0 600h100v100h400v100h100v100h-100v300h-500v-600zM100 100v300h300v-300h-300zM100 800v300h300v-300h-300zM200 200v100h100v-100h-100zM200 900h100v100h-100v-100zM500 500v100h300v-300h200v-100h-100v-100h-200v100 h-100v100h100v200h-200zM600 0v100h100v-100h-100zM600 1000h100v-300h200v-300h300v200h-200v100h200v500h-600v-200zM800 800v300h300v-300h-300zM900 0v100h300v-100h-300zM900 900v100h100v-100h-100zM1100 200v100h100v-100h-100z" />
|
73 |
+
<glyph unicode="" d="M0 200h100v1000h-100v-1000zM100 0v100h300v-100h-300zM200 200v1000h100v-1000h-100zM500 0v91h100v-91h-100zM500 200v1000h200v-1000h-200zM700 0v91h100v-91h-100zM800 200v1000h100v-1000h-100zM900 0v91h200v-91h-200zM1000 200v1000h200v-1000h-200z" />
|
74 |
+
<glyph unicode="" d="M0 700l1 475q0 10 7.5 17.5t17.5 7.5h474l700 -700l-500 -500zM148 953q0 -42 29 -71q30 -30 71.5 -30t71.5 30q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71z" />
|
75 |
+
<glyph unicode="" d="M1 700l1 475q0 11 7 18t18 7h474l700 -700l-500 -500zM148 953q0 -42 30 -71q29 -30 71 -30t71 30q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71zM701 1200h100l700 -700l-500 -500l-50 50l450 450z" />
|
76 |
+
<glyph unicode="" d="M100 0v1025l175 175h925v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900z" />
|
77 |
+
<glyph unicode="" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" />
|
78 |
+
<glyph unicode="" d="M0 100v700h200l100 -200h600l100 200h200v-700h-200v200h-800v-200h-200zM253 829l40 -124h592l62 124l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18zM281 24l38 152q2 10 11.5 17t19.5 7h500q10 0 19.5 -7t11.5 -17l38 -152q2 -10 -3.5 -17t-15.5 -7h-600 q-10 0 -15.5 7t-3.5 17z" />
|
79 |
+
<glyph unicode="" d="M0 200q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600z M356 500q0 100 72 172t172 72t172 -72t72 -172t-72 -172t-172 -72t-172 72t-72 172zM494 500q0 -44 31 -75t75 -31t75 31t31 75t-31 75t-75 31t-75 -31t-31 -75zM900 700v100h100v-100h-100z" />
|
80 |
+
<glyph unicode="" d="M53 0h365v66q-41 0 -72 11t-49 38t1 71l92 234h391l82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66zM416 521l178 457l46 -140l116 -317h-340 z" />
|
81 |
+
<glyph unicode="" d="M100 0v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21t-29 14t-49 14.5v71l471 -1q120 0 213 -88t93 -228q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129q0 -84 -59 -156.5t-142 -111 t-162 -38.5h-500zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400zM400 700h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5v-379z" />
|
82 |
+
<glyph unicode="" d="M200 0v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500z" />
|
83 |
+
<glyph unicode="" d="M-75 200h75v800h-75l125 167l125 -167h-75v-800h75l-125 -167zM300 900v300h150h700h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49z " />
|
84 |
+
<glyph unicode="" d="M33 51l167 125v-75h800v75l167 -125l-167 -125v75h-800v-75zM100 901v300h150h700h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50z" />
|
85 |
+
<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 350q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM0 650q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 950q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
|
86 |
+
<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 650q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM200 350q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM200 950q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" />
|
87 |
+
<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600 q-21 0 -35.5 15t-14.5 35z" />
|
88 |
+
<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" />
|
89 |
+
<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" />
|
90 |
+
<glyph unicode="" d="M-101 500v100h201v75l166 -125l-166 -125v75h-201zM300 0h100v1100h-100v-1100zM500 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35 v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 650q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100 q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100z" />
|
91 |
+
<glyph unicode="" d="M1 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 650 q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM801 0v1100h100v-1100 h-100zM934 550l167 -125v75h200v100h-200v75z" />
|
92 |
+
<glyph unicode="" d="M0 275v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53zM900 600l300 300v-600z" />
|
93 |
+
<glyph unicode="" d="M0 44v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31zM100 263l247 182l298 -131l-74 156l293 318l236 -288v500h-1000v-737zM208 750q0 56 39 95t95 39t95 -39t39 -95t-39 -95t-95 -39t-95 39t-39 95z " />
|
94 |
+
<glyph unicode="" d="M148 745q0 124 60.5 231.5t165 172t226.5 64.5q123 0 227 -63t164.5 -169.5t60.5 -229.5t-73 -272q-73 -114 -166.5 -237t-150.5 -189l-57 -66q-10 9 -27 26t-66.5 70.5t-96 109t-104 135.5t-100.5 155q-63 139 -63 262zM342 772q0 -107 75.5 -182.5t181.5 -75.5 q107 0 182.5 75.5t75.5 182.5t-75.5 182t-182.5 75t-182 -75.5t-75 -181.5z" />
|
95 |
+
<glyph unicode="" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM173 600q0 -177 125.5 -302t301.5 -125v854q-176 0 -301.5 -125 t-125.5 -302z" />
|
96 |
+
<glyph unicode="" d="M117 406q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 139t-64 210zM243 414q14 -82 59.5 -136 t136.5 -80l16 98q-7 6 -18 17t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156z" />
|
97 |
+
<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125l200 200v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM436 341l161 50l412 412l-114 113l-405 -405zM995 1015l113 -113l113 113l-21 85l-92 28z" />
|
98 |
+
<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5 zM423 524q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5z" />
|
99 |
+
<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q61 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM342 632l283 -284l567 567l-137 137l-430 -431l-146 147z" />
|
100 |
+
<glyph unicode="" d="M0 603l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296l-300 -300v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198z" />
|
101 |
+
<glyph unicode="" d="M200 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
|
102 |
+
<glyph unicode="" d="M0 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" />
|
103 |
+
<glyph unicode="" d="M136 550l564 550v-487l500 487v-1100l-500 488v-488z" />
|
104 |
+
<glyph unicode="" d="M200 0l900 550l-900 550v-1100z" />
|
105 |
+
<glyph unicode="" d="M200 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800zM600 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
|
106 |
+
<glyph unicode="" d="M200 150q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" />
|
107 |
+
<glyph unicode="" d="M0 0v1100l500 -487v487l564 -550l-564 -550v488z" />
|
108 |
+
<glyph unicode="" d="M0 0v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488z" />
|
109 |
+
<glyph unicode="" d="M300 0v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438z" />
|
110 |
+
<glyph unicode="" d="M100 250v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5zM100 500h1100l-550 564z" />
|
111 |
+
<glyph unicode="" d="M185 599l592 -592l240 240l-353 353l353 353l-240 240z" />
|
112 |
+
<glyph unicode="" d="M272 194l353 353l-353 353l241 240l572 -571l21 -22l-1 -1v-1l-592 -591z" />
|
113 |
+
<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h200v-200h200v200h200v200h-200v200h-200v-200h-200v-200z" />
|
114 |
+
<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h600v200h-600v-200z" />
|
115 |
+
<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM246 459l213 -213l141 142l141 -142l213 213l-142 141l142 141l-213 212l-141 -141l-141 142l-212 -213l141 -141 z" />
|
116 |
+
<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM270 551l276 -277l411 411l-175 174l-236 -236l-102 102z" />
|
117 |
+
<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM364 700h143q4 0 11.5 -1t11 -1t6.5 3t3 9t1 11t3.5 8.5t3.5 6t5.5 4t6.5 2.5t9 1.5t9 0.5h11.5h12.5 q19 0 30 -10t11 -26q0 -22 -4 -28t-27 -22q-5 -1 -12.5 -3t-27 -13.5t-34 -27t-26.5 -46t-11 -68.5h200q5 3 14 8t31.5 25.5t39.5 45.5t31 69t14 94q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3q-50 0 -90.5 -12t-75 -38.5t-53.5 -74.5t-19 -114zM500 300h200v100h-200 v-100z" />
|
118 |
+
<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM400 300h400v100h-100v300h-300v-100h100v-200h-100v-100zM500 800h200v100h-200v-100z" />
|
119 |
+
<glyph unicode="" d="M0 500v200h195q31 125 98.5 199.5t206.5 100.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h203v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194zM290 500q24 -73 79.5 -127.5t130.5 -78.5v206h200v-206 q149 48 201 206h-201v200h200q-25 74 -75.5 127t-124.5 77v-204h-200v203q-75 -23 -130 -77t-79 -126h209v-200h-210z" />
|
120 |
+
<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM356 465l135 135 l-135 135l109 109l135 -135l135 135l109 -109l-135 -135l135 -135l-109 -109l-135 135l-135 -135z" />
|
121 |
+
<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM322 537l141 141 l87 -87l204 205l142 -142l-346 -345z" />
|
122 |
+
<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -115 62 -215l568 567q-100 62 -216 62q-171 0 -292.5 -121.5t-121.5 -292.5zM391 245q97 -59 209 -59q171 0 292.5 121.5t121.5 292.5 q0 112 -59 209z" />
|
123 |
+
<glyph unicode="" d="M0 547l600 453v-300h600v-300h-600v-301z" />
|
124 |
+
<glyph unicode="" d="M0 400v300h600v300l600 -453l-600 -448v301h-600z" />
|
125 |
+
<glyph unicode="" d="M204 600l450 600l444 -600h-298v-600h-300v600h-296z" />
|
126 |
+
<glyph unicode="" d="M104 600h296v600h300v-600h298l-449 -600z" />
|
127 |
+
<glyph unicode="" d="M0 200q6 132 41 238.5t103.5 193t184 138t271.5 59.5v271l600 -453l-600 -448v301q-95 -2 -183 -20t-170 -52t-147 -92.5t-100 -135.5z" />
|
128 |
+
<glyph unicode="" d="M0 0v400l129 -129l294 294l142 -142l-294 -294l129 -129h-400zM635 777l142 -142l294 294l129 -129v400h-400l129 -129z" />
|
129 |
+
<glyph unicode="" d="M34 176l295 295l-129 129h400v-400l-129 130l-295 -295zM600 600v400l129 -129l295 295l142 -141l-295 -295l129 -130h-400z" />
|
130 |
+
<glyph unicode="" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM456 851l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5 t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5h-207q-21 0 -33 -14.5t-8 -34.5zM500 300h200v100h-200v-100z" />
|
131 |
+
<glyph unicode="" d="M0 800h100v-200h400v300h200v-300h400v200h100v100h-111q1 1 1 6.5t-1.5 15t-3.5 17.5l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6 h-111v-100zM100 0h400v400h-400v-400zM200 900q-3 0 14 48t36 96l18 47l213 -191h-281zM700 0v400h400v-400h-400zM731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269z" />
|
132 |
+
<glyph unicode="" d="M0 -22v143l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55z M238.5 300.5q19.5 -6.5 86.5 76.5q55 66 367 234q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5z" />
|
133 |
+
<glyph unicode="" d="M111 408q0 -33 5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-5 -33 -20.5 -69.5t-37.5 -80.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5t30.5 2.5 t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5q2 -12 8 -41.5t8 -43t6 -39.5 t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85z" />
|
134 |
+
<glyph unicode="" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30l26 -40l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5 t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30zM120 600q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5t123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54 q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l105 105q-37 24 -75 72t-57 84l-20 36z" />
|
135 |
+
<glyph unicode="" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43zM120 600q210 -282 393 -336l37 141q-107 18 -178.5 101.5t-71.5 193.5 q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l47 47l23 87q-30 28 -59 69t-44 68l-14 26zM780 161l38 145q22 15 44.5 34t46 44t40.5 44t41 50.5t33.5 43.5t33 44t24.5 34q-97 127 -140 175l39 146q67 -54 131.5 -125.5t87.5 -103.5t36 -52l26 -40l-26 -40 q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5t-124 -100t-146.5 -79z" />
|
136 |
+
<glyph unicode="" d="M-97.5 34q13.5 -34 50.5 -34h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 34 -48 36.5t-48 -29.5l-642 -1066q-21 -32 -7.5 -66zM155 200l445 723l445 -723h-345v100h-200v-100h-345zM500 600l100 -300l100 300v100h-200v-100z" />
|
137 |
+
<glyph unicode="" d="M100 262v41q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -20 -13 -28.5t-32 0.5l-94 78h-222l-94 -78q-19 -9 -32 -0.5t-13 28.5 v64q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5z" />
|
138 |
+
<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100v-750zM0 900h1100v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 100v100h100v-100h-100zM100 300v100h100v-100h-100z M100 500v100h100v-100h-100zM300 100v100h100v-100h-100zM300 300v100h100v-100h-100zM300 500v100h100v-100h-100zM500 100v100h100v-100h-100zM500 300v100h100v-100h-100zM500 500v100h100v-100h-100zM700 100v100h100v-100h-100zM700 300v100h100v-100h-100zM700 500 v100h100v-100h-100zM900 100v100h100v-100h-100zM900 300v100h100v-100h-100zM900 500v100h100v-100h-100z" />
|
139 |
+
<glyph unicode="" d="M0 200v200h259l600 600h241v198l300 -295l-300 -300v197h-159l-600 -600h-341zM0 800h259l122 -122l141 142l-181 180h-341v-200zM678 381l141 142l122 -123h159v198l300 -295l-300 -300v197h-241z" />
|
140 |
+
<glyph unicode="" d="M0 400v600q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5z" />
|
141 |
+
<glyph unicode="" d="M100 600v200h300v-250q0 -113 6 -145q17 -92 102 -117q39 -11 92 -11q37 0 66.5 5.5t50 15.5t36 24t24 31.5t14 37.5t7 42t2.5 45t0 47v25v250h300v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5t-89 96.5 t-58 109.5t-31.5 116t-15 104t-3 83zM100 900v300h300v-300h-300zM800 900v300h300v-300h-300z" />
|
142 |
+
<glyph unicode="" d="M-30 411l227 -227l352 353l353 -353l226 227l-578 579z" />
|
143 |
+
<glyph unicode="" d="M70 797l580 -579l578 579l-226 227l-353 -353l-352 353z" />
|
144 |
+
<glyph unicode="" d="M-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196zM402 1000l215 -200h381v-400h-198l299 -283l299 283h-200v600h-796z" />
|
145 |
+
<glyph unicode="" d="M18 939q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-300v-50q0 -20 -14.5 -35t-35.5 -15 t-35.5 15t-14.5 35v50h-50q-21 0 -35.5 15t-14.5 35q0 21 14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43z" />
|
146 |
+
<glyph unicode="" d="M0 0v800h1200v-800h-1200zM0 900v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-100h-1200z" />
|
147 |
+
<glyph unicode="" d="M1 0l300 700h1200l-300 -700h-1200zM1 400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000z" />
|
148 |
+
<glyph unicode="" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" />
|
149 |
+
<glyph unicode="" d="M0 600l300 298v-198h600v198l300 -298l-300 -297v197h-600v-197z" />
|
150 |
+
<glyph unicode="" d="M0 100v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM800 100h100v100h-100v-100z M1000 100h100v100h-100v-100z" />
|
151 |
+
<glyph unicode="" d="M-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5zM100 500v250v8v8v7t0.5 7t1.5 5.5t2 5t3 4t4.5 3.5t6 1.5t7.5 0.5h200l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35 q-55 337 -55 351zM1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35z" />
|
152 |
+
<glyph unicode="" d="M74 350q0 21 13.5 35.5t33.5 14.5h18l117 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94q20 0 29 -10.5t3 -29.5q-18 -36 -18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-8 -3 -23 -8.5 t-65 -20t-103 -25t-132.5 -19.5t-158.5 -9q-125 0 -245.5 20.5t-178.5 40.5l-58 20q-18 7 -31 27.5t-13 40.5zM497 110q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6t-103 6z" />
|
153 |
+
<glyph unicode="" d="M21 445l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180l-155 180l-45 -233l-224 78l78 -225l-233 -44l179 -156z" />
|
154 |
+
<glyph unicode="" d="M0 200h200v600h-200v-600zM300 275q0 -75 100 -75h61q124 -100 139 -100h250q46 0 83 57l238 344q29 31 29 74v100q0 44 -30.5 84.5t-69.5 40.5h-328q28 118 28 125v150q0 44 -30.5 84.5t-69.5 40.5h-50q-27 0 -51 -20t-38 -48l-96 -198l-145 -196q-20 -26 -20 -63v-400z M400 300v375l150 213l100 212h50v-175l-50 -225h450v-125l-250 -375h-214l-136 100h-100z" />
|
155 |
+
<glyph unicode="" d="M0 400v600h200v-600h-200zM300 525v400q0 75 100 75h61q124 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5h-50q-27 0 -51 20t-38 48l-96 198l-145 196 q-20 26 -20 63zM400 525l150 -212l100 -213h50v175l-50 225h450v125l-250 375h-214l-136 -100h-100v-375z" />
|
156 |
+
<glyph unicode="" d="M8 200v600h200v-600h-200zM308 275v525q0 17 14 35.5t28 28.5l14 9l362 230q14 6 25 6q17 0 29 -12l109 -112q14 -14 14 -34q0 -18 -11 -32l-85 -121h302q85 0 138.5 -38t53.5 -110t-54.5 -111t-138.5 -39h-107l-130 -339q-7 -22 -20.5 -41.5t-28.5 -19.5h-341 q-7 0 -90 81t-83 94zM408 289l100 -89h293l131 339q6 21 19.5 41t28.5 20h203q16 0 25 15t9 36q0 20 -9 34.5t-25 14.5h-457h-6.5h-7.5t-6.5 0.5t-6 1t-5 1.5t-5.5 2.5t-4 4t-4 5.5q-5 12 -5 20q0 14 10 27l147 183l-86 83l-339 -236v-503z" />
|
157 |
+
<glyph unicode="" d="M-101 651q0 72 54 110t139 38l302 -1l-85 121q-11 16 -11 32q0 21 14 34l109 113q13 12 29 12q11 0 25 -6l365 -230q7 -4 17 -10.5t26.5 -26t16.5 -36.5v-526q0 -13 -86 -93.5t-94 -80.5h-341q-16 0 -29.5 20t-19.5 41l-130 339h-107q-84 0 -139 39t-55 111zM-1 601h222 q15 0 28.5 -20.5t19.5 -40.5l131 -339h293l107 89v502l-343 237l-87 -83l145 -184q10 -11 10 -26q0 -11 -5 -20q-1 -3 -3.5 -5.5l-4 -4t-5 -2.5t-5.5 -1.5t-6.5 -1t-6.5 -0.5h-7.5h-6.5h-476v-100zM1000 201v600h200v-600h-200z" />
|
158 |
+
<glyph unicode="" d="M97 719l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53zM172 739l83 86l183 -146 q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6.5v7.5v6.5v456q0 22 25 31t50 -0.5t25 -30.5v-202q0 -16 20 -29.5t41 -19.5l339 -130v-294l-89 -100h-503zM400 0v200h600v-200h-600z" />
|
159 |
+
<glyph unicode="" d="M2 585q-16 -31 6 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85q0 -51 -0.5 -153.5t-0.5 -148.5q0 -84 38.5 -138t110.5 -54t111 55t39 139v106l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15zM77 565l236 339h503 l89 -100v-294l-340 -130q-20 -6 -40 -20t-20 -29v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146zM305 1104v200h600v-200h-600z" />
|
160 |
+
<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM298 701l2 -201h300l-2 -194l402 294l-402 298v-197h-300z" />
|
161 |
+
<glyph unicode="" d="M0 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t231.5 47.5q122 0 232.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-218 -217.5t-300 -80t-299.5 80t-217.5 217.5t-80 299.5zM200 600l402 -294l-2 194h300l2 201h-300v197z" />
|
162 |
+
<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600h200v-300h200v300h200l-300 400z" />
|
163 |
+
<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600l300 -400l300 400h-200v300h-200v-300h-200z" />
|
164 |
+
<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM254 780q-8 -33 5.5 -92.5t7.5 -87.5q0 -9 17 -44t16 -60 q12 0 23 -5.5t23 -15t20 -13.5q24 -12 108 -42q22 -8 53 -31.5t59.5 -38.5t57.5 -11q8 -18 -15 -55t-20 -57q42 -71 87 -80q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q104 -3 221 112q30 29 47 47t34.5 49t20.5 62q-14 9 -37 9.5t-36 7.5q-14 7 -49 15t-52 19q-9 0 -39.5 -0.5 t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5t5.5 57.5 q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5t34 21.5q-6 18 10 37q8 0 23.5 -1.5t24.5 -1.5t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 39 2 44q31 -13 58 -14.5t39 3.5l11 4q7 36 -16.5 53.5t-64.5 28.5t-56 23q-19 -3 -37 0 q-15 -12 -36.5 -21t-34.5 -12t-44 -8t-39 -6q-15 -3 -45.5 0.5t-45.5 -2.5q-21 -7 -52 -26.5t-34 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -90.5t-29.5 -79.5zM518 916q3 12 16 30t16 25q10 -10 18.5 -10t14 6t14.5 14.5t16 12.5q0 -24 17 -66.5t17 -43.5 q-9 2 -31 5t-36 5t-32 8t-30 14zM692 1003h1h-1z" />
|
165 |
+
<glyph unicode="" d="M0 164.5q0 21.5 15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138l145 -232l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5z" />
|
166 |
+
<glyph unicode="" horiz-adv-x="1220" d="M0 196v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 596v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5zM0 996v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM600 596h500v100h-500v-100zM800 196h300v100h-300v-100zM900 996h200v100h-200v-100z" />
|
167 |
+
<glyph unicode="" d="M100 1100v100h1000v-100h-1000zM150 1000h900l-350 -500v-300l-200 -200v500z" />
|
168 |
+
<glyph unicode="" d="M0 200v200h1200v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500z M500 1000h200v100h-200v-100z" />
|
169 |
+
<glyph unicode="" d="M0 0v400l129 -129l200 200l142 -142l-200 -200l129 -129h-400zM0 800l129 129l200 -200l142 142l-200 200l129 129h-400v-400zM729 329l142 142l200 -200l129 129v-400h-400l129 129zM729 871l200 200l-129 129h400v-400l-129 129l-200 -200z" />
|
170 |
+
<glyph unicode="" d="M0 596q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 596q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM291 655 q0 23 15.5 38.5t38.5 15.5t39 -16t16 -38q0 -23 -16 -39t-39 -16q-22 0 -38 16t-16 39zM400 850q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5zM514 609q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5 q22 0 38 -16t16 -39t-16 -39t-38 -16q-14 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5zM800 655q0 22 16 38t39 16t38.5 -15.5t15.5 -38.5t-16 -39t-38 -16q-23 0 -39 16t-16 39z" />
|
171 |
+
<glyph unicode="" d="M-40 375q-13 -95 35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -78.5 -16.5t-67.5 -51.5l-389 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23 q38 0 53 -36q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256l7 -7l69 -60 l517 511q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-40 -24 -111 -95l-512 -512q-68 -68 -81 -163z" />
|
172 |
+
<glyph unicode="" d="M80 784q0 131 98.5 229.5t230.5 98.5q143 0 241 -129q103 129 246 129q129 0 226 -98.5t97 -229.5q0 -46 -17.5 -91t-61 -99t-77 -89.5t-104.5 -105.5q-197 -191 -293 -322l-17 -23l-16 23q-43 58 -100 122.5t-92 99.5t-101 100q-71 70 -104.5 105.5t-77 89.5t-61 99 t-17.5 91zM250 784q0 -27 30.5 -70t61.5 -75.5t95 -94.5l22 -22q93 -90 190 -201q82 92 195 203l12 12q64 62 97.5 97t64.5 79t31 72q0 71 -48 119.5t-105 48.5q-74 0 -132 -83l-118 -171l-114 174q-51 80 -123 80q-60 0 -109.5 -49.5t-49.5 -118.5z" />
|
173 |
+
<glyph unicode="" d="M57 353q0 -95 66 -159l141 -142q68 -66 159 -66q93 0 159 66l283 283q66 66 66 159t-66 159l-141 141q-8 9 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159zM269 706q0 -93 66 -159l141 -141q7 -7 19 -17l105 105 l-212 212l389 389l247 -247l-95 -96l18 -17q47 -49 77 -100l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159z" />
|
174 |
+
<glyph unicode="" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM300 300h600v700h-600v-700zM496 150q0 -43 30.5 -73.5t73.5 -30.5t73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-73.5 -30.5t-30.5 -73.5z" />
|
175 |
+
<glyph unicode="" d="M0 0l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207z" />
|
176 |
+
<glyph unicode="" d="M295 433h139q5 -77 48.5 -126.5t117.5 -64.5v335q-6 1 -15.5 4t-11.5 3q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5 v-307l64 -14q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5zM466 889q0 -29 8 -51t16.5 -34t29.5 -22.5t31 -13.5t38 -10q7 -2 11 -3v274q-61 -8 -97.5 -37.5t-36.5 -102.5 zM700 237q170 18 170 151q0 64 -44 99.5t-126 60.5v-311z" />
|
177 |
+
<glyph unicode="" d="M100 600v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -28 16.5 -69.5t28 -62.5t41.5 -72h241v-100h-197q8 -50 -2.5 -115 t-31.5 -94q-41 -59 -99 -113q35 11 84 18t70 7q33 1 103 -16t103 -17q76 0 136 30l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221z" />
|
178 |
+
<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM602 900l298 300l298 -300h-198v-900h-200v900h-198z" />
|
179 |
+
<glyph unicode="" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v200h100v-100h200v-100h-300zM700 400v100h300v-200h-99v-100h-100v100h99v100h-200zM700 700v500h300v-500h-100v100h-100v-100h-100zM801 900h100v200h-100v-200z" />
|
180 |
+
<glyph unicode="" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v500h300v-500h-100v100h-100v-100h-100zM700 700v200h100v-100h200v-100h-300zM700 1100v100h300v-200h-99v-100h-100v100h99v100h-200zM801 200h100v200h-100v-200z" />
|
181 |
+
<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 100v400h300v-500h-100v100h-200zM800 1100v100h200v-500h-100v400h-100zM901 200h100v200h-100v-200z" />
|
182 |
+
<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 400v100h200v-500h-100v400h-100zM800 800v400h300v-500h-100v100h-200zM901 900h100v200h-100v-200z" />
|
183 |
+
<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h500v-200h-500zM700 400v200h400v-200h-400zM700 700v200h300v-200h-300zM700 1000v200h200v-200h-200z" />
|
184 |
+
<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h200v-200h-200zM700 400v200h300v-200h-300zM700 700v200h400v-200h-400zM700 1000v200h500v-200h-500z" />
|
185 |
+
<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500z" />
|
186 |
+
<glyph unicode="" d="M0 400v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-163 0 -281.5 117.5t-118.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM400 300l333 250l-333 250v-500z" />
|
187 |
+
<glyph unicode="" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 700l250 -333l250 333h-500z" />
|
188 |
+
<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 400h500l-250 333z" />
|
189 |
+
<glyph unicode="" d="M0 400v300h300v200l400 -350l-400 -350v200h-300zM500 0v200h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-500v200h400q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-400z" />
|
190 |
+
<glyph unicode="" d="M217 519q8 -19 31 -19h302q-155 -438 -160 -458q-5 -21 4 -32l9 -8h9q14 0 26 15q11 13 274.5 321.5t264.5 308.5q14 19 5 36q-8 17 -31 17l-301 -1q1 4 78 219.5t79 227.5q2 15 -5 27l-9 9h-9q-15 0 -25 -16q-4 -6 -98 -111.5t-228.5 -257t-209.5 -237.5q-16 -19 -6 -41 z" />
|
191 |
+
<glyph unicode="" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q47 0 100 15v185h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h500v185q-14 4 -114 7.5t-193 5.5l-93 2q-165 0 -282.5 -117.5t-117.5 -282.5v-300zM600 400v300h300v200l400 -350l-400 -350v200h-300z " />
|
192 |
+
<glyph unicode="" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q163 0 281.5 117.5t118.5 282.5v98l-78 73l-122 -123v-148q0 -41 -29.5 -70.5t-70.5 -29.5h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h156l118 122l-74 78h-100q-165 0 -282.5 -117.5t-117.5 -282.5 v-300zM496 709l353 342l-149 149h500v-500l-149 149l-342 -353z" />
|
193 |
+
<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM406 600 q0 80 57 137t137 57t137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137z" />
|
194 |
+
<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 800l445 -500l450 500h-295v400h-300v-400h-300zM900 150h100v50h-100v-50z" />
|
195 |
+
<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 700h300v-300h300v300h295l-445 500zM900 150h100v50h-100v-50z" />
|
196 |
+
<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 705l305 -305l596 596l-154 155l-442 -442l-150 151zM900 150h100v50h-100v-50z" />
|
197 |
+
<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 988l97 -98l212 213l-97 97zM200 400l697 1l3 699l-250 -239l-149 149l-212 -212l149 -149zM900 150h100v50h-100v-50z" />
|
198 |
+
<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM200 612l212 -212l98 97l-213 212zM300 1200l239 -250l-149 -149l212 -212l149 148l249 -237l-1 697zM900 150h100v50h-100v-50z" />
|
199 |
+
<glyph unicode="" d="M23 415l1177 784v-1079l-475 272l-310 -393v416h-392zM494 210l672 938l-672 -712v-226z" />
|
200 |
+
<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-850q0 -21 -15 -35.5t-35 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200z" />
|
201 |
+
<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-218l-276 -275l-120 120l-126 -127h-378v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM581 306l123 123l120 -120l353 352l123 -123l-475 -476zM600 1000h100v200h-100v-200z" />
|
202 |
+
<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-269l-103 -103l-170 170l-298 -298h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200zM700 133l170 170l-170 170l127 127l170 -170l170 170l127 -128l-170 -169l170 -170 l-127 -127l-170 170l-170 -170z" />
|
203 |
+
<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-300h-400v-200h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300l300 -300l300 300h-200v300h-200v-300h-200zM600 1000v200h100v-200h-100z" />
|
204 |
+
<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-402l-200 200l-298 -298h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300h200v-300h200v300h200l-300 300zM600 1000v200h100v-200h-100z" />
|
205 |
+
<glyph unicode="" d="M0 250q0 -21 14.5 -35.5t35.5 -14.5h1100q21 0 35.5 14.5t14.5 35.5v550h-1200v-550zM0 900h1200v150q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 300v200h400v-200h-400z" />
|
206 |
+
<glyph unicode="" d="M0 400l300 298v-198h400v-200h-400v-198zM100 800v200h100v-200h-100zM300 800v200h100v-200h-100zM500 800v200h400v198l300 -298l-300 -298v198h-400zM800 300v200h100v-200h-100zM1000 300h100v200h-100v-200z" />
|
207 |
+
<glyph unicode="" d="M100 700v400l50 100l50 -100v-300h100v300l50 100l50 -100v-300h100v300l50 100l50 -100v-400l-100 -203v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447zM800 597q0 -29 10.5 -55.5t25 -43t29 -28.5t25.5 -18l10 -5v-397q0 -21 14.5 -35.5 t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v1106q0 31 -18 40.5t-44 -7.5l-276 -116q-25 -17 -43.5 -51.5t-18.5 -65.5v-359z" />
|
208 |
+
<glyph unicode="" d="M100 0h400v56q-75 0 -87.5 6t-12.5 44v394h500v-394q0 -38 -12.5 -44t-87.5 -6v-56h400v56q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v888q0 22 25 34.5t50 13.5l25 2v56h-400v-56q75 0 87.5 -6t12.5 -44v-394h-500v394q0 38 12.5 44t87.5 6v56h-400v-56q4 0 11 -0.5 t24 -3t30 -7t24 -15t11 -24.5v-888q0 -22 -25 -34.5t-50 -13.5l-25 -2v-56z" />
|
209 |
+
<glyph unicode="" d="M0 300q0 -41 29.5 -70.5t70.5 -29.5h300q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-300q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM100 100h400l200 200h105l295 98v-298h-425l-100 -100h-375zM100 300v200h300v-200h-300zM100 600v200h300v-200h-300z M100 1000h400l200 -200v-98l295 98h105v200h-425l-100 100h-375zM700 402v163l400 133v-163z" />
|
210 |
+
<glyph unicode="" d="M16.5 974.5q0.5 -21.5 16 -90t46.5 -140t104 -177.5t175 -208q103 -103 207.5 -176t180 -103.5t137 -47t92.5 -16.5l31 1l163 162q17 18 13.5 41t-22.5 37l-192 136q-19 14 -45 12t-42 -19l-118 -118q-142 101 -268 227t-227 268l118 118q17 17 20 41.5t-11 44.5 l-139 194q-14 19 -36.5 22t-40.5 -14l-162 -162q-1 -11 -0.5 -32.5z" />
|
211 |
+
<glyph unicode="" d="M0 50v212q0 20 10.5 45.5t24.5 39.5l365 303v50q0 4 1 10.5t12 22.5t30 28.5t60 23t97 10.5t97 -10t60 -23.5t30 -27.5t12 -24l1 -10v-50l365 -303q14 -14 24.5 -39.5t10.5 -45.5v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-20 0 -35 14.5t-15 35.5zM0 712 q0 -21 14.5 -33.5t34.5 -8.5l202 33q20 4 34.5 21t14.5 38v146q141 24 300 24t300 -24v-146q0 -21 14.5 -38t34.5 -21l202 -33q20 -4 34.5 8.5t14.5 33.5v200q-6 8 -19 20.5t-63 45t-112 57t-171 45t-235 20.5q-92 0 -175 -10.5t-141.5 -27t-108.5 -36.5t-81.5 -40 t-53.5 -36.5t-31 -27.5l-9 -10v-200z" />
|
212 |
+
<glyph unicode="" d="M100 0v100h1100v-100h-1100zM175 200h950l-125 150v250l100 100v400h-100v-200h-100v200h-200v-200h-100v200h-200v-200h-100v200h-100v-400l100 -100v-250z" />
|
213 |
+
<glyph unicode="" d="M100 0h300v400q0 41 -29.5 70.5t-70.5 29.5h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-400zM500 0v1000q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-1000h-300zM900 0v700q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-700h-300z" />
|
214 |
+
<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
|
215 |
+
<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h100v200h100v-200h100v500h-100v-200h-100v200h-100v-500zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" />
|
216 |
+
<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v100h-200v300h200v100h-300v-500zM600 300h300v100h-200v300h200v100h-300v-500z" />
|
217 |
+
<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 550l300 -150v300zM600 400l300 150l-300 150v-300z" />
|
218 |
+
<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300v500h700v-500h-700zM300 400h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130v-300zM575 549 q0 -65 27 -107t68 -42h130v300h-130q-38 0 -66.5 -43t-28.5 -108z" />
|
219 |
+
<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
|
220 |
+
<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v400h-200v100h-100v-500zM301 400v200h100v-200h-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" />
|
221 |
+
<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 700v100h300v-300h-99v-100h-100v100h99v200h-200zM201 300v100h100v-100h-100zM601 300v100h100v-100h-100z M700 700v100h200v-500h-100v400h-100z" />
|
222 |
+
<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 500v200 l100 100h300v-100h-300v-200h300v-100h-300z" />
|
223 |
+
<glyph unicode="" d="M0 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 400v400h300 l100 -100v-100h-100v100h-200v-100h200v-100h-200v-100h-100zM700 400v100h100v-100h-100z" />
|
224 |
+
<glyph unicode="" d="M-14 494q0 -80 56.5 -137t135.5 -57h222v300h400v-300h128q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200h200v300h200v-300h200 l-300 -300z" />
|
225 |
+
<glyph unicode="" d="M-14 494q0 -80 56.5 -137t135.5 -57h8l414 414l403 -403q94 26 154.5 104.5t60.5 178.5q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200l300 300 l300 -300h-200v-300h-200v300h-200z" />
|
226 |
+
<glyph unicode="" d="M100 200h400v-155l-75 -45h350l-75 45v155h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170z" />
|
227 |
+
<glyph unicode="" d="M121 700q0 -53 28.5 -97t75.5 -65q-4 -16 -4 -38q0 -74 52.5 -126.5t126.5 -52.5q56 0 100 30v-306l-75 -45h350l-75 45v306q46 -30 100 -30q74 0 126.5 52.5t52.5 126.5q0 24 -9 55q50 32 79.5 83t29.5 112q0 90 -61.5 155.5t-150.5 71.5q-26 89 -99.5 145.5 t-167.5 56.5q-116 0 -197.5 -81.5t-81.5 -197.5q0 -4 1 -11.5t1 -11.5q-14 2 -23 2q-74 0 -126.5 -52.5t-52.5 -126.5z" />
|
228 |
+
</font>
|
229 |
+
</defs></svg>
|
assets/bootstrap/fonts/glyphicons-halflings-regular.ttf
ADDED
Binary file
|
assets/bootstrap/fonts/glyphicons-halflings-regular.woff
ADDED
Binary file
|
assets/bootstrap/js/bootstrap.min.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* Bootstrap v3.1.1 (http://getbootstrap.com)
|
3 |
+
* Copyright 2011-2014 Twitter, Inc.
|
4 |
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
5 |
+
*/
|
6 |
+
|
7 |
+
+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed.bs.alert").remove()}var c=a(this),d=c.attr("data-target");d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));var e=a(d);b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close.bs.alert"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.one(a.support.transition.end,f).emulateTransitionEnd(150):f()};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){b=="loadingText"?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");c.prop("type")=="radio"&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f=typeof c=="object"&&c;e||d.data("bs.button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();if(b>this.$items.length-1||b<0)return;return this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){if(this.sliding)return;return this.slide("next")},b.prototype.prev=function(){if(this.sliding)return;return this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});this.$element.trigger(j);if(j.isDefaultPrevented())return;return this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(d.css("transition-duration").slice(0,-1)*1e3)):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),typeof c=="object"&&c),g=typeof c=="string"?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),typeof c=="number"?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),c.data()),g=c.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=c.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){function e(d){a(b).remove(),a(c).each(function(){var b=f(a(this)),c={relatedTarget:this};if(!b.hasClass("open"))return;b.trigger(d=a.Event("hide.bs.dropdown",c));if(d.isDefaultPrevented())return;b.removeClass("open").trigger("hidden.bs.dropdown",c)})}function f(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}"use strict";var b=".dropdown-backdrop",c="[data-toggle=dropdown]",d=function(b){a(b).on("click.bs.dropdown",this.toggle)};d.prototype.toggle=function(b){var c=a(this);if(c.is(".disabled, :disabled"))return;var d=f(c),g=d.hasClass("open");e();if(!g){"ontouchstart"in document.documentElement&&!d.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",e);var h={relatedTarget:this};d.trigger(b=a.Event("show.bs.dropdown",h));if(b.isDefaultPrevented())return;d.toggleClass("open").trigger("shown.bs.dropdown",h),c.focus()}return!1},d.prototype.keydown=function(b){if(!/(38|40|27)/.test(b.keyCode))return;var d=a(this);b.preventDefault(),b.stopPropagation();if(d.is(".disabled, :disabled"))return;var e=f(d),g=e.hasClass("open");if(!g||g&&b.keyCode==27)return b.which==27&&e.find(c).focus(),d.click();var h=" li:not(.divider):visible a",i=e.find("[role=menu]"+h+", [role=listbox]"+h);if(!i.length)return;var j=i.index(i.filter(":focus"));b.keyCode==38&&j>0&&j--,b.keyCode==40&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),e=c.data("bs.dropdown");e||c.data("bs.dropdown",e=new d(this)),typeof b=="string"&&e[b].call(c)})},a.fn.dropdown.Constructor=d,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",e).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",c,d.prototype.toggle).on("keydown.bs.dropdown.data-api",c+", [role=menu], [role=listbox]",d.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d);if(this.isShown||d.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)})},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]!==a.target&&!this.$element.has(a.target).length&&this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){a.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){if(a.target!==a.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),typeof c=="object"&&c);f||e.data("bs.modal",f=new b(this,g)),typeof c=="string"?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);var e=this.options.trigger.split(" ");for(var f=e.length;f--;){var g=e[f];if(g=="click")this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if(g!="manual"){var h=g=="hover"?"mouseenter":"focusin",i=g=="hover"?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="in";if(!c.options.delay||!c.options.delay.show)return c.show();c.timeout=setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(c.timeout),c.hoverState="out";if(!c.options.delay||!c.options.delay.hide)return c.hide();c.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e=typeof this.options.placement=="function"?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n=this.options.container=="body"?window.innerWidth:k.outerWidth(),o=this.options.container=="body"?window.innerHeight:k.outerHeight(),p=this.options.container=="body"?0:k.offset().left;e=e=="bottom"&&h.top+h.height+j-m>o?"top":e=="top"&&h.top-m-j<0?"bottom":e=="right"&&h.right+i>n?"left":e=="left"&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;c=="top"&&k!=g&&(d=!0,b.top=b.top+g-k);if(/bottom|top/.test(c)){var l=0;b.left<0&&(l=b.left*-2,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function e(){b.hoverState!="in"&&c.detach(),b.$element.trigger("hidden.bs."+b.type)}var b=this,c=this.tip(),d=a.Event("hide.bs."+this.type);this.$element.trigger(d);if(d.isDefaultPrevented())return;return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?c.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),this.hoverState=null,this},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},typeof b.getBoundingClientRect=="function"?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return a=="bottom"?{top:b.top+b.height,left:b.left+b.width/2-c/2}:a=="top"?{top:b.top-d,left:b.left+b.width/2-c/2}:a=="left"?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f=typeof c=="object"&&c;if(!e&&c=="destroy")return;e||d.data("bs.tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?typeof c=="string"?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||(typeof b.content=="function"?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f=typeof c=="object"&&c;if(!e&&c=="destroy")return;e||d.data("bs.popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});b.trigger(f);if(f.isDefaultPrevented())return;var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})},b.prototype.activate=function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g).emulateTransitionEnd(150):g(),e.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;this.affixed=="top"&&(e.top+=d),typeof f!="object"&&(h=g=f),typeof g=="function"&&(g=f.top(this.$element)),typeof h=="function"&&(h=f.bottom(this.$element));var i=this.unpin!=null&&d+this.unpin<=e.top?!1:h!=null&&e.top+this.$element.height()>=c-h?"bottom":g!=null&&d<=g?"top":!1;if(this.affixed===i)return;this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k);if(k.isDefaultPrevented())return;this.affixed=i,this.unpin=i=="bottom"?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),i=="bottom"&&this.$element.offset({top:c-h-this.$element.height()})};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f=typeof c=="object"&&c;e||d.data("bs.affix",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in"))return;var b=a.Event("show.bs.collapse");this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])},b.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in"))return;var b=a.Event("hide.bs.collapse");this.$element.trigger(b);if(b.isDefaultPrevented())return;var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!a.support.transition)return d.call(this);this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350)},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),typeof c=="object"&&c);!e&&f.toggle&&c=="show"&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":c.data(),i=c.attr("data-parent"),j=i&&a(i);if(!g||!g.transitioning)j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(c).addClass("collapsed"),c[f.hasClass("in")?"addClass":"removeClass"]("collapsed");f.collapse(h)})}(jQuery),+function(a){function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(c).is("body")?a(window):a(c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}"use strict",b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);var c=this,d=this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},b.prototype.process=function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,c=b-this.$scrollElement.height(),d=this.offsets,e=this.targets,f=this.activeTarget,g;if(a>=c)return f!=(g=e.last()[0])&&this.activate(g);if(f&&a<=d[0])return f!=(g=e[0])&&this.activate(g);for(g=d.length;g--;)f!=e[g]&&a>=d[g]&&(!d[g+1]||a<=d[g+1])&&this.activate(e[g])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f=typeof c=="object"&&c;e||d.data("bs.scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(a.style[c]!==undefined)return{end:b[c]};return!1}"use strict",a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery)
|
assets/ie-fix/html5shiv.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(k,m){var g="3.7.0";var d=k.html5||{};var h=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;var c=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;var q;var i="_html5shiv";var a=0;var o={};var e;(function(){try{var t=m.createElement("a");t.innerHTML="<xyz></xyz>";q=("hidden" in t);e=t.childNodes.length==1||(function(){(m.createElement)("a");var v=m.createDocumentFragment();return(typeof v.cloneNode=="undefined"||typeof v.createDocumentFragment=="undefined"||typeof v.createElement=="undefined")}())}catch(u){q=true;e=true}}());function f(t,v){var w=t.createElement("p"),u=t.getElementsByTagName("head")[0]||t.documentElement;w.innerHTML="x<style>"+v+"</style>";return u.insertBefore(w.lastChild,u.firstChild)}function l(){var t=j.elements;return typeof t=="string"?t.split(" "):t}function p(t){var u=o[t[i]];if(!u){u={};a++;t[i]=a;o[a]=u}return u}function n(w,t,v){if(!t){t=m}if(e){return t.createElement(w)}if(!v){v=p(t)}var u;if(v.cache[w]){u=v.cache[w].cloneNode()}else{if(c.test(w)){u=(v.cache[w]=v.createElem(w)).cloneNode()}else{u=v.createElem(w)}}return u.canHaveChildren&&!h.test(w)?v.frag.appendChild(u):u}function r(v,x){if(!v){v=m}if(e){return v.createDocumentFragment()}x=x||p(v);var y=x.frag.cloneNode(),w=0,u=l(),t=u.length;for(;w<t;w++){y.createElement(u[w])}return y}function s(t,u){if(!u.cache){u.cache={};u.createElem=t.createElement;u.createFrag=t.createDocumentFragment;u.frag=u.createFrag()}t.createElement=function(v){if(!j.shivMethods){return u.createElem(v)}return n(v,t,u)};t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/[\w\-]+/g,function(v){u.createElem(v);u.frag.createElement(v);return'c("'+v+'")'})+");return n}")(j,u.frag)}function b(t){if(!t){t=m}var u=p(t);if(j.shivCSS&&!q&&!u.hasCSS){u.hasCSS=!!f(t,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")}if(!e){s(t,u)}return t}var j={elements:d.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:g,shivCSS:(d.shivCSS!==false),supportsUnknownElements:e,shivMethods:(d.shivMethods!==false),type:"default",shivDocument:b,createElement:n,createDocumentFragment:r};k.html5=j;b(m)}(this,document));
|
assets/ie-fix/respond.js
ADDED
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
2 |
+
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
3 |
+
(function(w) {
|
4 |
+
"use strict";
|
5 |
+
w.matchMedia = w.matchMedia || function(doc, undefined) {
|
6 |
+
var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div");
|
7 |
+
div.id = "mq-test-1";
|
8 |
+
div.style.cssText = "position:absolute;top:-100em";
|
9 |
+
fakeBody.style.background = "none";
|
10 |
+
fakeBody.appendChild(div);
|
11 |
+
return function(q) {
|
12 |
+
div.innerHTML = '­<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>';
|
13 |
+
docElem.insertBefore(fakeBody, refNode);
|
14 |
+
bool = div.offsetWidth === 42;
|
15 |
+
docElem.removeChild(fakeBody);
|
16 |
+
return {
|
17 |
+
matches: bool,
|
18 |
+
media: q
|
19 |
+
};
|
20 |
+
};
|
21 |
+
}(w.document);
|
22 |
+
})(this);
|
23 |
+
|
24 |
+
/*! Respond.js v1.4.0: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */
|
25 |
+
(function(w) {
|
26 |
+
"use strict";
|
27 |
+
var respond = {};
|
28 |
+
w.respond = respond;
|
29 |
+
respond.update = function() {};
|
30 |
+
var requestQueue = [], xmlHttp = function() {
|
31 |
+
var xmlhttpmethod = false;
|
32 |
+
try {
|
33 |
+
xmlhttpmethod = new w.XMLHttpRequest();
|
34 |
+
} catch (e) {
|
35 |
+
xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP");
|
36 |
+
}
|
37 |
+
return function() {
|
38 |
+
return xmlhttpmethod;
|
39 |
+
};
|
40 |
+
}(), ajax = function(url, callback) {
|
41 |
+
var req = xmlHttp();
|
42 |
+
if (!req) {
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
req.open("GET", url, true);
|
46 |
+
req.onreadystatechange = function() {
|
47 |
+
if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
callback(req.responseText);
|
51 |
+
};
|
52 |
+
if (req.readyState === 4) {
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
req.send(null);
|
56 |
+
};
|
57 |
+
respond.ajax = ajax;
|
58 |
+
respond.queue = requestQueue;
|
59 |
+
respond.regex = {
|
60 |
+
media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
|
61 |
+
keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
|
62 |
+
urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
|
63 |
+
findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
|
64 |
+
only: /(only\s+)?([a-zA-Z]+)\s?/,
|
65 |
+
minw: /\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,
|
66 |
+
maxw: /\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/
|
67 |
+
};
|
68 |
+
respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches;
|
69 |
+
if (respond.mediaQueriesSupported) {
|
70 |
+
return;
|
71 |
+
}
|
72 |
+
var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() {
|
73 |
+
var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;
|
74 |
+
div.style.cssText = "position:absolute;font-size:1em;width:1em";
|
75 |
+
if (!body) {
|
76 |
+
body = fakeUsed = doc.createElement("body");
|
77 |
+
body.style.background = "none";
|
78 |
+
}
|
79 |
+
docElem.style.fontSize = "100%";
|
80 |
+
body.style.fontSize = "100%";
|
81 |
+
body.appendChild(div);
|
82 |
+
if (fakeUsed) {
|
83 |
+
docElem.insertBefore(body, docElem.firstChild);
|
84 |
+
}
|
85 |
+
ret = div.offsetWidth;
|
86 |
+
if (fakeUsed) {
|
87 |
+
docElem.removeChild(body);
|
88 |
+
} else {
|
89 |
+
body.removeChild(div);
|
90 |
+
}
|
91 |
+
docElem.style.fontSize = originalHTMLFontSize;
|
92 |
+
if (originalBodyFontSize) {
|
93 |
+
body.style.fontSize = originalBodyFontSize;
|
94 |
+
}
|
95 |
+
ret = eminpx = parseFloat(ret);
|
96 |
+
return ret;
|
97 |
+
}, applyMedia = function(fromResize) {
|
98 |
+
var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();
|
99 |
+
if (fromResize && lastCall && now - lastCall < resizeThrottle) {
|
100 |
+
w.clearTimeout(resizeDefer);
|
101 |
+
resizeDefer = w.setTimeout(applyMedia, resizeThrottle);
|
102 |
+
return;
|
103 |
+
} else {
|
104 |
+
lastCall = now;
|
105 |
+
}
|
106 |
+
for (var i in mediastyles) {
|
107 |
+
if (mediastyles.hasOwnProperty(i)) {
|
108 |
+
var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em";
|
109 |
+
if (!!min) {
|
110 |
+
min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
|
111 |
+
}
|
112 |
+
if (!!max) {
|
113 |
+
max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
|
114 |
+
}
|
115 |
+
if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {
|
116 |
+
if (!styleBlocks[thisstyle.media]) {
|
117 |
+
styleBlocks[thisstyle.media] = [];
|
118 |
+
}
|
119 |
+
styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
for (var j in appendedEls) {
|
124 |
+
if (appendedEls.hasOwnProperty(j)) {
|
125 |
+
if (appendedEls[j] && appendedEls[j].parentNode === head) {
|
126 |
+
head.removeChild(appendedEls[j]);
|
127 |
+
}
|
128 |
+
}
|
129 |
+
}
|
130 |
+
appendedEls.length = 0;
|
131 |
+
for (var k in styleBlocks) {
|
132 |
+
if (styleBlocks.hasOwnProperty(k)) {
|
133 |
+
var ss = doc.createElement("style"), css = styleBlocks[k].join("\n");
|
134 |
+
ss.type = "text/css";
|
135 |
+
ss.media = k;
|
136 |
+
head.insertBefore(ss, lastLink.nextSibling);
|
137 |
+
if (ss.styleSheet) {
|
138 |
+
ss.styleSheet.cssText = css;
|
139 |
+
} else {
|
140 |
+
ss.appendChild(doc.createTextNode(css));
|
141 |
+
}
|
142 |
+
appendedEls.push(ss);
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}, translate = function(styles, href, media) {
|
146 |
+
var qs = styles.replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0;
|
147 |
+
href = href.substring(0, href.lastIndexOf("/"));
|
148 |
+
var repUrls = function(css) {
|
149 |
+
return css.replace(respond.regex.urls, "$1" + href + "$2$3");
|
150 |
+
}, useMedia = !ql && media;
|
151 |
+
if (href.length) {
|
152 |
+
href += "/";
|
153 |
+
}
|
154 |
+
if (useMedia) {
|
155 |
+
ql = 1;
|
156 |
+
}
|
157 |
+
for (var i = 0; i < ql; i++) {
|
158 |
+
var fullq, thisq, eachq, eql;
|
159 |
+
if (useMedia) {
|
160 |
+
fullq = media;
|
161 |
+
rules.push(repUrls(styles));
|
162 |
+
} else {
|
163 |
+
fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;
|
164 |
+
rules.push(RegExp.$2 && repUrls(RegExp.$2));
|
165 |
+
}
|
166 |
+
eachq = fullq.split(",");
|
167 |
+
eql = eachq.length;
|
168 |
+
for (var j = 0; j < eql; j++) {
|
169 |
+
thisq = eachq[j];
|
170 |
+
mediastyles.push({
|
171 |
+
media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all",
|
172 |
+
rules: rules.length - 1,
|
173 |
+
hasquery: thisq.indexOf("(") > -1,
|
174 |
+
minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
|
175 |
+
maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
|
176 |
+
});
|
177 |
+
}
|
178 |
+
}
|
179 |
+
applyMedia();
|
180 |
+
}, makeRequests = function() {
|
181 |
+
if (requestQueue.length) {
|
182 |
+
var thisRequest = requestQueue.shift();
|
183 |
+
ajax(thisRequest.href, function(styles) {
|
184 |
+
translate(styles, thisRequest.href, thisRequest.media);
|
185 |
+
parsedSheets[thisRequest.href] = true;
|
186 |
+
w.setTimeout(function() {
|
187 |
+
makeRequests();
|
188 |
+
}, 0);
|
189 |
+
});
|
190 |
+
}
|
191 |
+
}, ripCSS = function() {
|
192 |
+
for (var i = 0; i < links.length; i++) {
|
193 |
+
var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
|
194 |
+
if (!!href && isCSS && !parsedSheets[href]) {
|
195 |
+
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
|
196 |
+
translate(sheet.styleSheet.rawCssText, href, media);
|
197 |
+
parsedSheets[href] = true;
|
198 |
+
} else {
|
199 |
+
if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) {
|
200 |
+
if (href.substring(0, 2) === "//") {
|
201 |
+
href = w.location.protocol + href;
|
202 |
+
}
|
203 |
+
requestQueue.push({
|
204 |
+
href: href,
|
205 |
+
media: media
|
206 |
+
});
|
207 |
+
}
|
208 |
+
}
|
209 |
+
}
|
210 |
+
}
|
211 |
+
makeRequests();
|
212 |
+
};
|
213 |
+
ripCSS();
|
214 |
+
respond.update = ripCSS;
|
215 |
+
respond.getEmValue = getEmValue;
|
216 |
+
function callMedia() {
|
217 |
+
applyMedia(true);
|
218 |
+
}
|
219 |
+
if (w.addEventListener) {
|
220 |
+
w.addEventListener("resize", callMedia, false);
|
221 |
+
} else if (w.attachEvent) {
|
222 |
+
w.attachEvent("onresize", callMedia);
|
223 |
+
}
|
224 |
+
})(this);
|
assets/select2/select2-bootstrap.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.form-control .select2-choice{border:0;border-radius:2px}.form-control .select2-choice .select2-arrow{border-radius:0 2px 2px 0}.form-control.select2-container{height:auto!important;padding:0}.form-control.select2-container.select2-dropdown-open{border-color:#5897fb;border-radius:3px 3px 0 0}.form-control .select2-container.select2-dropdown-open .select2-choices{border-radius:3px 3px 0 0}.form-control.select2-container .select2-choices{border:0!important;border-radius:3px}.control-group.warning .select2-container .select2-choice,.control-group.warning .select2-container .select2-choices,.control-group.warning .select2-container-active .select2-choice,.control-group.warning .select2-container-active .select2-choices,.control-group.warning .select2-dropdown-open.select2-drop-above .select2-choice,.control-group.warning .select2-dropdown-open.select2-drop-above .select2-choices,.control-group.warning .select2-container-multi.select2-container-active .select2-choices{border:1px solid #c09853!important}.control-group.warning .select2-container .select2-choice div{border-left:1px solid #c09853!important;background:#fcf8e3!important}.control-group.error .select2-container .select2-choice,.control-group.error .select2-container .select2-choices,.control-group.error .select2-container-active .select2-choice,.control-group.error .select2-container-active .select2-choices,.control-group.error .select2-dropdown-open.select2-drop-above .select2-choice,.control-group.error .select2-dropdown-open.select2-drop-above .select2-choices,.control-group.error .select2-container-multi.select2-container-active .select2-choices{border:1px solid #b94a48!important}.control-group.error .select2-container .select2-choice div{border-left:1px solid #b94a48!important;background:#f2dede!important}.control-group.info .select2-container .select2-choice,.control-group.info .select2-container .select2-choices,.control-group.info .select2-container-active .select2-choice,.control-group.info .select2-container-active .select2-choices,.control-group.info .select2-dropdown-open.select2-drop-above .select2-choice,.control-group.info .select2-dropdown-open.select2-drop-above .select2-choices,.control-group.info .select2-container-multi.select2-container-active .select2-choices{border:1px solid #3a87ad!important}.control-group.info .select2-container .select2-choice div{border-left:1px solid #3a87ad!important;background:#d9edf7!important}.control-group.success .select2-container .select2-choice,.control-group.success .select2-container .select2-choices,.control-group.success .select2-container-active .select2-choice,.control-group.success .select2-container-active .select2-choices,.control-group.success .select2-dropdown-open.select2-drop-above .select2-choice,.control-group.success .select2-dropdown-open.select2-drop-above .select2-choices,.control-group.success .select2-container-multi.select2-container-active .select2-choices{border:1px solid #468847!important}.control-group.success .select2-container .select2-choice div{border-left:1px solid #468847!important;background:#dff0d8!important}
|
assets/select2/select2-spinner.gif
ADDED
Binary file
|
assets/select2/select2.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.select2-container{margin:0;position:relative;display:inline-block;zoom:1;*display:inline;vertical-align:middle}.select2-container,.select2-drop,.select2-search,.select2-search input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.select2-container .select2-choice{display:block;height:26px;padding:0 0 0 8px;overflow:hidden;position:relative;border:1px solid #aaa;white-space:nowrap;line-height:26px;color:#444;text-decoration:none;border-radius:4px;background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(0.5,#fff));background-image:-webkit-linear-gradient(center bottom,#eee 0,#fff 50%);background-image:-moz-linear-gradient(center bottom,#eee 0,#fff 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#fff 0,#eee 50%)}.select2-container.select2-drop-above .select2-choice{border-bottom-color:#aaa;border-radius:0 0 4px 4px;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#eee),color-stop(0.9,#fff));background-image:-webkit-linear-gradient(center bottom,#eee 0,#fff 90%);background-image:-moz-linear-gradient(center bottom,#eee 0,#fff 90%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',endColorstr='#eeeeee',GradientType=0);background-image:linear-gradient(top,#eee 0,#fff 90%)}.select2-container.select2-allowclear .select2-choice .select2-chosen{margin-right:42px}.select2-container .select2-choice>.select2-chosen{margin-right:26px;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.select2-container .select2-choice abbr{display:none;width:12px;height:12px;position:absolute;right:24px;top:8px;font-size:1px;text-decoration:none;border:0;background:url('select2.png') right top no-repeat;cursor:pointer;outline:0}.select2-container.select2-allowclear .select2-choice abbr{display:inline-block}.select2-container .select2-choice abbr:hover{background-position:right -11px;cursor:pointer}.select2-drop-mask{border:0;margin:0;padding:0;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:9998;background-color:#fff;filter:alpha(opacity=0)}.select2-drop{width:100%;margin-top:-1px;position:absolute;z-index:9999;top:100%;background:#fff;color:#000;border:1px solid #aaa;border-top:0;border-radius:0 0 4px 4px;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15)}.select2-drop-auto-width{border-top:1px solid #aaa;width:auto}.select2-drop-auto-width .select2-search{padding-top:4px}.select2-drop.select2-drop-above{margin-top:1px;border-top:1px solid #aaa;border-bottom:0;border-radius:4px 4px 0 0;-webkit-box-shadow:0 -4px 5px rgba(0,0,0,.15);box-shadow:0 -4px 5px rgba(0,0,0,.15)}.select2-drop-active{border:1px solid #5897fb;border-top:0}.select2-drop.select2-drop-above.select2-drop-active{border-top:1px solid #5897fb}.select2-container .select2-choice .select2-arrow{display:inline-block;width:18px;height:100%;position:absolute;right:0;top:0;border-left:1px solid #aaa;border-radius:0 4px 4px 0;background-clip:padding-box;background:#ccc;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#ccc),color-stop(0.6,#eee));background-image:-webkit-linear-gradient(center bottom,#ccc 0,#eee 60%);background-image:-moz-linear-gradient(center bottom,#ccc 0,#eee 60%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#cccccc',GradientType=0);background-image:linear-gradient(top,#ccc 0,#eee 60%)}.select2-container .select2-choice .select2-arrow b{display:block;width:100%;height:100%;background:url('select2.png') no-repeat 0 1px}.select2-search{display:inline-block;width:100%;min-height:26px;margin:0;padding-left:4px;padding-right:4px;position:relative;z-index:10000;white-space:nowrap}.select2-search input{width:100%;height:auto!important;min-height:26px;padding:4px 20px 4px 5px;margin:0;outline:0;font-family:sans-serif;font-size:1em;border:1px solid #aaa;border-radius:0;-webkit-box-shadow:none;box-shadow:none;background:#fff url('select2.png') no-repeat 100% -22px;background:url('select2.png') no-repeat 100% -22px,-webkit-gradient(linear,left bottom,left top,color-stop(0.85,#fff),color-stop(0.99,#eee));background:url('select2.png') no-repeat 100% -22px,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url('select2.png') no-repeat 100% -22px,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url('select2.png') no-repeat 100% -22px,linear-gradient(top,#fff 85%,#eee 99%)}.select2-drop.select2-drop-above .select2-search input{margin-top:4px}.select2-search input.select2-active{background:#fff url('select2-spinner.gif') no-repeat 100%;background:url('select2-spinner.gif') no-repeat 100%,-webkit-gradient(linear,left bottom,left top,color-stop(0.85,#fff),color-stop(0.99,#eee));background:url('select2-spinner.gif') no-repeat 100%,-webkit-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url('select2-spinner.gif') no-repeat 100%,-moz-linear-gradient(center bottom,#fff 85%,#eee 99%);background:url('select2-spinner.gif') no-repeat 100%,linear-gradient(top,#fff 85%,#eee 99%)}.select2-container-active .select2-choice,.select2-container-active .select2-choices{border:1px solid #5897fb;outline:0;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.select2-dropdown-open .select2-choice{border-bottom-color:transparent;-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset;border-bottom-left-radius:0;border-bottom-right-radius:0;background-color:#eee;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0,#fff),color-stop(0.5,#eee));background-image:-webkit-linear-gradient(center bottom,#fff 0,#eee 50%);background-image:-moz-linear-gradient(center bottom,#fff 0,#eee 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#ffffff',GradientType=0);background-image:linear-gradient(top,#fff 0,#eee 50%)}.select2-dropdown-open.select2-drop-above .select2-choice,.select2-dropdown-open.select2-drop-above .select2-choices{border:1px solid #5897fb;border-top-color:transparent;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(0.5,#eee));background-image:-webkit-linear-gradient(center top,#fff 0,#eee 50%);background-image:-moz-linear-gradient(center top,#fff 0,#eee 50%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#ffffff',GradientType=0);background-image:linear-gradient(bottom,#fff 0,#eee 50%)}.select2-dropdown-open .select2-choice .select2-arrow{background:transparent;border-left:none;filter:none}.select2-dropdown-open .select2-choice .select2-arrow b{background-position:-18px 1px}.select2-results{max-height:200px;padding:0 0 0 4px;margin:4px 4px 4px 0;position:relative;overflow-x:hidden;overflow-y:auto;-webkit-tap-highlight-color:rgba(0,0,0,0)}.select2-results ul.select2-result-sub{margin:0;padding-left:0}.select2-results ul.select2-result-sub>li .select2-result-label{padding-left:20px}.select2-results ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:40px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:60px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:80px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:100px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:110px}.select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub>li .select2-result-label{padding-left:120px}.select2-results li{list-style:none;display:list-item;background-image:none}.select2-results li.select2-result-with-children>.select2-result-label{font-weight:bold}.select2-results .select2-result-label{padding:3px 7px 4px;margin:0;cursor:pointer;min-height:1em;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.select2-results .select2-highlighted{background:#3875d7;color:#fff}.select2-results li em{background:#feffde;font-style:normal}.select2-results .select2-highlighted em{background:transparent}.select2-results .select2-highlighted ul{background:#fff;color:#000}.select2-results .select2-no-results,.select2-results .select2-searching,.select2-results .select2-selection-limit{background:#f4f4f4;display:list-item}.select2-results .select2-disabled.select2-highlighted{color:#666;background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-disabled{background:#f4f4f4;display:list-item;cursor:default}.select2-results .select2-selected{display:none}.select2-more-results.select2-active{background:#f4f4f4 url('select2-spinner.gif') no-repeat 100%}.select2-more-results{background:#f4f4f4;display:list-item}.select2-container.select2-container-disabled .select2-choice{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container.select2-container-disabled .select2-choice .select2-arrow{background-color:#f4f4f4;background-image:none;border-left:0}.select2-container.select2-container-disabled .select2-choice abbr{display:none}.select2-container-multi .select2-choices{height:auto!important;height:1%;margin:0;padding:0;position:relative;border:1px solid #aaa;cursor:text;overflow:hidden;background-color:#fff;background-image:-webkit-gradient(linear,0% 0,0% 100%,color-stop(1%,#eee),color-stop(15%,#fff));background-image:-webkit-linear-gradient(top,#eee 1%,#fff 15%);background-image:-moz-linear-gradient(top,#eee 1%,#fff 15%);background-image:linear-gradient(top,#eee 1%,#fff 15%)}.select2-locked{padding:3px 5px 3px 5px!important}.select2-container-multi .select2-choices{min-height:26px}.select2-container-multi.select2-container-active .select2-choices{border:1px solid #5897fb;outline:0;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.select2-container-multi .select2-choices li{float:left;list-style:none}.select2-container-multi .select2-choices .select2-search-field{margin:0;padding:0;white-space:nowrap}.select2-container-multi .select2-choices .select2-search-field input{padding:5px;margin:1px 0;font-family:sans-serif;font-size:100%;color:#666;outline:0;border:0;-webkit-box-shadow:none;box-shadow:none;background:transparent!important}.select2-container-multi .select2-choices .select2-search-field input.select2-active{background:#fff url('select2-spinner.gif') no-repeat 100%!important}.select2-default{color:#999!important}.select2-container-multi .select2-choices .select2-search-choice{padding:3px 5px 3px 18px;margin:3px 0 3px 5px;position:relative;line-height:13px;color:#333;cursor:default;border:1px solid #aaa;border-radius:3px;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,0.05);background-clip:padding-box;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#e4e4e4;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee',endColorstr='#f4f4f4',GradientType=0);background-image:-webkit-gradient(linear,0% 0,0% 100%,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),color-stop(100%,#eee));background-image:-webkit-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:-moz-linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-image:linear-gradient(top,#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%)}.select2-container-multi .select2-choices .select2-search-choice .select2-chosen{cursor:default}.select2-container-multi .select2-choices .select2-search-choice-focus{background:#d4d4d4}.select2-search-choice-close{display:block;width:12px;height:13px;position:absolute;right:3px;top:4px;font-size:1px;outline:0;background:url('select2.png') right top no-repeat}.select2-container-multi .select2-search-choice-close{left:3px}.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover{background-position:right -11px}.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close{background-position:right -11px}.select2-container-multi.select2-container-disabled .select2-choices{background-color:#f4f4f4;background-image:none;border:1px solid #ddd;cursor:default}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice{padding:3px 5px 3px 5px;border:1px solid #ddd;background-image:none;background-color:#f4f4f4}.select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close{display:none;background:0}.select2-result-selectable .select2-match,.select2-result-unselectable .select2-match{text-decoration:underline}.select2-offscreen,.select2-offscreen:focus{clip:rect(0 0 0 0)!important;width:1px!important;height:1px!important;border:0!important;margin:0!important;padding:0!important;overflow:hidden!important;position:absolute!important;outline:0!important;left:0!important;top:0!important}.select2-display-none{display:none}.select2-measure-scrollbar{position:absolute;top:-10000px;left:-10000px;width:100px;height:100px;overflow:scroll}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:1.25dppx){.select2-search input,.select2-search-choice-close,.select2-container .select2-choice abbr,.select2-container .select2-choice .select2-arrow b{background-image:url('select2x2.png')!important;background-repeat:no-repeat!important;background-size:60px 40px!important}.select2-search input{background-position:100% -21px!important}}
|
assets/select2/select2.min.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Copyright 2012 Igor Vaynberg
|
3 |
+
|
4 |
+
Version: 3.4.5 Timestamp: Mon Nov 4 08:22:42 PST 2013
|
5 |
+
|
6 |
+
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
|
7 |
+
General Public License version 2 (the "GPL License"). You may choose either license to govern your
|
8 |
+
use of this software only upon the condition that you accept all of the terms of either the Apache
|
9 |
+
License or the GPL License.
|
10 |
+
|
11 |
+
You may obtain a copy of the Apache License and the GPL License at:
|
12 |
+
|
13 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
14 |
+
http://www.gnu.org/licenses/gpl-2.0.html
|
15 |
+
|
16 |
+
Unless required by applicable law or agreed to in writing, software distributed under the Apache License
|
17 |
+
or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
18 |
+
either express or implied. See the Apache License and the GPL License for the specific language governing
|
19 |
+
permissions and limitations under the Apache License and the GPL License.
|
20 |
+
*/
|
21 |
+
!function(a){"undefined"==typeof a.fn.each2&&a.extend(a.fn,{each2:function(b){for(var c=a([0]),d=-1,e=this.length;++d<e&&(c.context=c[0]=this[d])&&b.call(c[0],d,c)!==!1;);return this}})}(jQuery),function(a,b){"use strict";function n(a){var b,c,d,e;if(!a||a.length<1)return a;for(b="",c=0,d=a.length;d>c;c++)e=a.charAt(c),b+=m[e]||e;return b}function o(a,b){for(var c=0,d=b.length;d>c;c+=1)if(q(a,b[c]))return c;return-1}function p(){var b=a(l);b.appendTo("body");var c={width:b.width()-b[0].clientWidth,height:b.height()-b[0].clientHeight};return b.remove(),c}function q(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 r(b,c){var d,e,f;if(null===b||b.length<1)return[];for(d=b.split(c),e=0,f=d.length;f>e;e+=1)d[e]=a.trim(d[e]);return d}function s(a){return a.outerWidth(!1)-a.width()}function t(c){var d="keyup-change-value";c.on("keydown",function(){a.data(c,d)===b&&a.data(c,d,c.val())}),c.on("keyup",function(){var e=a.data(c,d);e!==b&&c.val()!==e&&(a.removeData(c,d),c.trigger("keyup-change"))})}function u(c){c.on("mousemove",function(c){var d=i;(d===b||d.x!==c.pageX||d.y!==c.pageY)&&a(c.target).trigger("mousemove-filtered",c)})}function v(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 w(a){var c,b=!1;return function(){return b===!1&&(c=a(),b=!0),c}}function x(a,b){var c=v(a,function(a){b.trigger("scroll-debounced",a)});b.on("scroll",function(a){o(a.target,b.get())>=0&&c(a)})}function y(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 z(b){b=a(b)[0];var c=0,d=0;if("selectionStart"in b)c=b.selectionStart,d=b.selectionEnd-c;else if("selection"in document){b.focus();var e=document.selection.createRange();d=document.selection.createRange().text.length,e.moveStart("character",-b.value.length),c=e.text.length-d}return{offset:c,length:d}}function A(a){a.preventDefault(),a.stopPropagation()}function B(a){a.preventDefault(),a.stopImmediatePropagation()}function C(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 D(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(g))})),b.attr("class",f.join(" "))}function E(a,b,c,d){var e=n(a.toUpperCase()).indexOf(n(b.toUpperCase())),f=b.length;return 0>e?(c.push(d(a)),void 0):(c.push(d(a.substring(0,e))),c.push("<span class='select2-match'>"),c.push(d(a.substring(e,e+f))),c.push("</span>"),c.push(d(a.substring(e+f,a.length))),void 0)}function F(a){var b={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})}function G(c){var d,e=null,f=c.quietMillis||100,g=c.url,h=this;return function(i){window.clearTimeout(d),d=window.setTimeout(function(){var d=c.data,f=g,j=c.transport||a.fn.select2.ajaxDefaults.transport,k={type:c.type||"GET",cache:c.cache||!1,jsonpCallback:c.jsonpCallback||b,dataType:c.dataType||"json"},l=a.extend({},a.fn.select2.ajaxDefaults.params,k);d=d?d.call(h,i.term,i.page,i.context):null,f="function"==typeof f?f.call(h,i.term,i.page,i.context):f,e&&e.abort(),c.params&&(a.isFunction(c.params)?a.extend(l,c.params.call(h)):a.extend(l,c.params)),a.extend(l,{url:f,dataType:c.dataType,data:d,success:function(a){var b=c.results(a,i.page);i.callback(b)}}),e=j.call(h,l)},f)}}function H(b){var d,e,c=b,f=function(a){return""+a.text};a.isArray(c)&&(e=c,c={results:e}),a.isFunction(c)===!1&&(e=c,c=function(){return e});var g=c();return g.text&&(f=g.text,a.isFunction(f)||(d=g.text,f=function(a){return a[d]})),function(b){var g,d=b.term,e={results:[]};return""===d?(b.callback(c()),void 0):(g=function(c,e){var h,i;if(c=c[0],c.children){h={};for(i in c)c.hasOwnProperty(i)&&(h[i]=c[i]);h.children=[],a(c.children).each2(function(a,b){g(b,h.children)}),(h.children.length||b.matcher(d,f(h),c))&&e.push(h)}else b.matcher(d,f(c),c)&&e.push(c)},a(c().results).each2(function(a,b){g(b,e.results)}),b.callback(e),void 0)}}function I(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 J(b,c){if(a.isFunction(b))return!0;if(!b)return!1;throw new Error(c+" must be a function or a falsy value")}function K(b){return a.isFunction(b)?b():b}function L(b){var c=0;return a.each(b,function(a,b){b.children?c+=L(b.children):c++}),c}function M(a,c,d,e){var h,i,j,k,l,f=a,g=!1;if(!e.createSearchChoice||!e.tokenSeparators||e.tokenSeparators.length<1)return b;for(;;){for(i=-1,j=0,k=e.tokenSeparators.length;k>j&&(l=e.tokenSeparators[j],i=a.indexOf(l),!(i>=0));j++);if(0>i)break;if(h=a.substring(0,i),a=a.substring(i+l.length),h.length>0&&(h=e.createSearchChoice.call(this,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(q(e.id(h),e.id(c[j]))){g=!0;break}g||d(h)}}return f!==a?a:void 0}function N(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,j,k,i={x:0,y:0},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}},l="<div class='select2-measure-scrollbar'></div>",m={"\u24b6":"A","\uff21":"A","\xc0":"A","\xc1":"A","\xc2":"A","\u1ea6":"A","\u1ea4":"A","\u1eaa":"A","\u1ea8":"A","\xc3":"A","\u0100":"A","\u0102":"A","\u1eb0":"A","\u1eae":"A","\u1eb4":"A","\u1eb2":"A","\u0226":"A","\u01e0":"A","\xc4":"A","\u01de":"A","\u1ea2":"A","\xc5":"A","\u01fa":"A","\u01cd":"A","\u0200":"A","\u0202":"A","\u1ea0":"A","\u1eac":"A","\u1eb6":"A","\u1e00":"A","\u0104":"A","\u023a":"A","\u2c6f":"A","\ua732":"AA","\xc6":"AE","\u01fc":"AE","\u01e2":"AE","\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u24b7":"B","\uff22":"B","\u1e02":"B","\u1e04":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24b8":"C","\uff23":"C","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\xc7":"C","\u1e08":"C","\u0187":"C","\u023b":"C","\ua73e":"C","\u24b9":"D","\uff24":"D","\u1e0a":"D","\u010e":"D","\u1e0c":"D","\u1e10":"D","\u1e12":"D","\u1e0e":"D","\u0110":"D","\u018b":"D","\u018a":"D","\u0189":"D","\ua779":"D","\u01f1":"DZ","\u01c4":"DZ","\u01f2":"Dz","\u01c5":"Dz","\u24ba":"E","\uff25":"E","\xc8":"E","\xc9":"E","\xca":"E","\u1ec0":"E","\u1ebe":"E","\u1ec4":"E","\u1ec2":"E","\u1ebc":"E","\u0112":"E","\u1e14":"E","\u1e16":"E","\u0114":"E","\u0116":"E","\xcb":"E","\u1eba":"E","\u011a":"E","\u0204":"E","\u0206":"E","\u1eb8":"E","\u1ec6":"E","\u0228":"E","\u1e1c":"E","\u0118":"E","\u1e18":"E","\u1e1a":"E","\u0190":"E","\u018e":"E","\u24bb":"F","\uff26":"F","\u1e1e":"F","\u0191":"F","\ua77b":"F","\u24bc":"G","\uff27":"G","\u01f4":"G","\u011c":"G","\u1e20":"G","\u011e":"G","\u0120":"G","\u01e6":"G","\u0122":"G","\u01e4":"G","\u0193":"G","\ua7a0":"G","\ua77d":"G","\ua77e":"G","\u24bd":"H","\uff28":"H","\u0124":"H","\u1e22":"H","\u1e26":"H","\u021e":"H","\u1e24":"H","\u1e28":"H","\u1e2a":"H","\u0126":"H","\u2c67":"H","\u2c75":"H","\ua78d":"H","\u24be":"I","\uff29":"I","\xcc":"I","\xcd":"I","\xce":"I","\u0128":"I","\u012a":"I","\u012c":"I","\u0130":"I","\xcf":"I","\u1e2e":"I","\u1ec8":"I","\u01cf":"I","\u0208":"I","\u020a":"I","\u1eca":"I","\u012e":"I","\u1e2c":"I","\u0197":"I","\u24bf":"J","\uff2a":"J","\u0134":"J","\u0248":"J","\u24c0":"K","\uff2b":"K","\u1e30":"K","\u01e8":"K","\u1e32":"K","\u0136":"K","\u1e34":"K","\u0198":"K","\u2c69":"K","\ua740":"K","\ua742":"K","\ua744":"K","\ua7a2":"K","\u24c1":"L","\uff2c":"L","\u013f":"L","\u0139":"L","\u013d":"L","\u1e36":"L","\u1e38":"L","\u013b":"L","\u1e3c":"L","\u1e3a":"L","\u0141":"L","\u023d":"L","\u2c62":"L","\u2c60":"L","\ua748":"L","\ua746":"L","\ua780":"L","\u01c7":"LJ","\u01c8":"Lj","\u24c2":"M","\uff2d":"M","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u019c":"M","\u24c3":"N","\uff2e":"N","\u01f8":"N","\u0143":"N","\xd1":"N","\u1e44":"N","\u0147":"N","\u1e46":"N","\u0145":"N","\u1e4a":"N","\u1e48":"N","\u0220":"N","\u019d":"N","\ua790":"N","\ua7a4":"N","\u01ca":"NJ","\u01cb":"Nj","\u24c4":"O","\uff2f":"O","\xd2":"O","\xd3":"O","\xd4":"O","\u1ed2":"O","\u1ed0":"O","\u1ed6":"O","\u1ed4":"O","\xd5":"O","\u1e4c":"O","\u022c":"O","\u1e4e":"O","\u014c":"O","\u1e50":"O","\u1e52":"O","\u014e":"O","\u022e":"O","\u0230":"O","\xd6":"O","\u022a":"O","\u1ece":"O","\u0150":"O","\u01d1":"O","\u020c":"O","\u020e":"O","\u01a0":"O","\u1edc":"O","\u1eda":"O","\u1ee0":"O","\u1ede":"O","\u1ee2":"O","\u1ecc":"O","\u1ed8":"O","\u01ea":"O","\u01ec":"O","\xd8":"O","\u01fe":"O","\u0186":"O","\u019f":"O","\ua74a":"O","\ua74c":"O","\u01a2":"OI","\ua74e":"OO","\u0222":"OU","\u24c5":"P","\uff30":"P","\u1e54":"P","\u1e56":"P","\u01a4":"P","\u2c63":"P","\ua750":"P","\ua752":"P","\ua754":"P","\u24c6":"Q","\uff31":"Q","\ua756":"Q","\ua758":"Q","\u024a":"Q","\u24c7":"R","\uff32":"R","\u0154":"R","\u1e58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1e5a":"R","\u1e5c":"R","\u0156":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua75a":"R","\ua7a6":"R","\ua782":"R","\u24c8":"S","\uff33":"S","\u1e9e":"S","\u015a":"S","\u1e64":"S","\u015c":"S","\u1e60":"S","\u0160":"S","\u1e66":"S","\u1e62":"S","\u1e68":"S","\u0218":"S","\u015e":"S","\u2c7e":"S","\ua7a8":"S","\ua784":"S","\u24c9":"T","\uff34":"T","\u1e6a":"T","\u0164":"T","\u1e6c":"T","\u021a":"T","\u0162":"T","\u1e70":"T","\u1e6e":"T","\u0166":"T","\u01ac":"T","\u01ae":"T","\u023e":"T","\ua786":"T","\ua728":"TZ","\u24ca":"U","\uff35":"U","\xd9":"U","\xda":"U","\xdb":"U","\u0168":"U","\u1e78":"U","\u016a":"U","\u1e7a":"U","\u016c":"U","\xdc":"U","\u01db":"U","\u01d7":"U","\u01d5":"U","\u01d9":"U","\u1ee6":"U","\u016e":"U","\u0170":"U","\u01d3":"U","\u0214":"U","\u0216":"U","\u01af":"U","\u1eea":"U","\u1ee8":"U","\u1eee":"U","\u1eec":"U","\u1ef0":"U","\u1ee4":"U","\u1e72":"U","\u0172":"U","\u1e76":"U","\u1e74":"U","\u0244":"U","\u24cb":"V","\uff36":"V","\u1e7c":"V","\u1e7e":"V","\u01b2":"V","\ua75e":"V","\u0245":"V","\ua760":"VY","\u24cc":"W","\uff37":"W","\u1e80":"W","\u1e82":"W","\u0174":"W","\u1e86":"W","\u1e84":"W","\u1e88":"W","\u2c72":"W","\u24cd":"X","\uff38":"X","\u1e8a":"X","\u1e8c":"X","\u24ce":"Y","\uff39":"Y","\u1ef2":"Y","\xdd":"Y","\u0176":"Y","\u1ef8":"Y","\u0232":"Y","\u1e8e":"Y","\u0178":"Y","\u1ef6":"Y","\u1ef4":"Y","\u01b3":"Y","\u024e":"Y","\u1efe":"Y","\u24cf":"Z","\uff3a":"Z","\u0179":"Z","\u1e90":"Z","\u017b":"Z","\u017d":"Z","\u1e92":"Z","\u1e94":"Z","\u01b5":"Z","\u0224":"Z","\u2c7f":"Z","\u2c6b":"Z","\ua762":"Z","\u24d0":"a","\uff41":"a","\u1e9a":"a","\xe0":"a","\xe1":"a","\xe2":"a","\u1ea7":"a","\u1ea5":"a","\u1eab":"a","\u1ea9":"a","\xe3":"a","\u0101":"a","\u0103":"a","\u1eb1":"a","\u1eaf":"a","\u1eb5":"a","\u1eb3":"a","\u0227":"a","\u01e1":"a","\xe4":"a","\u01df":"a","\u1ea3":"a","\xe5":"a","\u01fb":"a","\u01ce":"a","\u0201":"a","\u0203":"a","\u1ea1":"a","\u1ead":"a","\u1eb7":"a","\u1e01":"a","\u0105":"a","\u2c65":"a","\u0250":"a","\ua733":"aa","\xe6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u24d1":"b","\uff42":"b","\u1e03":"b","\u1e05":"b","\u1e07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24d2":"c","\uff43":"c","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\xe7":"c","\u1e09":"c","\u0188":"c","\u023c":"c","\ua73f":"c","\u2184":"c","\u24d3":"d","\uff44":"d","\u1e0b":"d","\u010f":"d","\u1e0d":"d","\u1e11":"d","\u1e13":"d","\u1e0f":"d","\u0111":"d","\u018c":"d","\u0256":"d","\u0257":"d","\ua77a":"d","\u01f3":"dz","\u01c6":"dz","\u24d4":"e","\uff45":"e","\xe8":"e","\xe9":"e","\xea":"e","\u1ec1":"e","\u1ebf":"e","\u1ec5":"e","\u1ec3":"e","\u1ebd":"e","\u0113":"e","\u1e15":"e","\u1e17":"e","\u0115":"e","\u0117":"e","\xeb":"e","\u1ebb":"e","\u011b":"e","\u0205":"e","\u0207":"e","\u1eb9":"e","\u1ec7":"e","\u0229":"e","\u1e1d":"e","\u0119":"e","\u1e19":"e","\u1e1b":"e","\u0247":"e","\u025b":"e","\u01dd":"e","\u24d5":"f","\uff46":"f","\u1e1f":"f","\u0192":"f","\ua77c":"f","\u24d6":"g","\uff47":"g","\u01f5":"g","\u011d":"g","\u1e21":"g","\u011f":"g","\u0121":"g","\u01e7":"g","\u0123":"g","\u01e5":"g","\u0260":"g","\ua7a1":"g","\u1d79":"g","\ua77f":"g","\u24d7":"h","\uff48":"h","\u0125":"h","\u1e23":"h","\u1e27":"h","\u021f":"h","\u1e25":"h","\u1e29":"h","\u1e2b":"h","\u1e96":"h","\u0127":"h","\u2c68":"h","\u2c76":"h","\u0265":"h","\u0195":"hv","\u24d8":"i","\uff49":"i","\xec":"i","\xed":"i","\xee":"i","\u0129":"i","\u012b":"i","\u012d":"i","\xef":"i","\u1e2f":"i","\u1ec9":"i","\u01d0":"i","\u0209":"i","\u020b":"i","\u1ecb":"i","\u012f":"i","\u1e2d":"i","\u0268":"i","\u0131":"i","\u24d9":"j","\uff4a":"j","\u0135":"j","\u01f0":"j","\u0249":"j","\u24da":"k","\uff4b":"k","\u1e31":"k","\u01e9":"k","\u1e33":"k","\u0137":"k","\u1e35":"k","\u0199":"k","\u2c6a":"k","\ua741":"k","\ua743":"k","\ua745":"k","\ua7a3":"k","\u24db":"l","\uff4c":"l","\u0140":"l","\u013a":"l","\u013e":"l","\u1e37":"l","\u1e39":"l","\u013c":"l","\u1e3d":"l","\u1e3b":"l","\u017f":"l","\u0142":"l","\u019a":"l","\u026b":"l","\u2c61":"l","\ua749":"l","\ua781":"l","\ua747":"l","\u01c9":"lj","\u24dc":"m","\uff4d":"m","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u026f":"m","\u24dd":"n","\uff4e":"n","\u01f9":"n","\u0144":"n","\xf1":"n","\u1e45":"n","\u0148":"n","\u1e47":"n","\u0146":"n","\u1e4b":"n","\u1e49":"n","\u019e":"n","\u0272":"n","\u0149":"n","\ua791":"n","\ua7a5":"n","\u01cc":"nj","\u24de":"o","\uff4f":"o","\xf2":"o","\xf3":"o","\xf4":"o","\u1ed3":"o","\u1ed1":"o","\u1ed7":"o","\u1ed5":"o","\xf5":"o","\u1e4d":"o","\u022d":"o","\u1e4f":"o","\u014d":"o","\u1e51":"o","\u1e53":"o","\u014f":"o","\u022f":"o","\u0231":"o","\xf6":"o","\u022b":"o","\u1ecf":"o","\u0151":"o","\u01d2":"o","\u020d":"o","\u020f":"o","\u01a1":"o","\u1edd":"o","\u1edb":"o","\u1ee1":"o","\u1edf":"o","\u1ee3":"o","\u1ecd":"o","\u1ed9":"o","\u01eb":"o","\u01ed":"o","\xf8":"o","\u01ff":"o","\u0254":"o","\ua74b":"o","\ua74d":"o","\u0275":"o","\u01a3":"oi","\u0223":"ou","\ua74f":"oo","\u24df":"p","\uff50":"p","\u1e55":"p","\u1e57":"p","\u01a5":"p","\u1d7d":"p","\ua751":"p","\ua753":"p","\ua755":"p","\u24e0":"q","\uff51":"q","\u024b":"q","\ua757":"q","\ua759":"q","\u24e1":"r","\uff52":"r","\u0155":"r","\u1e59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1e5b":"r","\u1e5d":"r","\u0157":"r","\u1e5f":"r","\u024d":"r","\u027d":"r","\ua75b":"r","\ua7a7":"r","\ua783":"r","\u24e2":"s","\uff53":"s","\xdf":"s","\u015b":"s","\u1e65":"s","\u015d":"s","\u1e61":"s","\u0161":"s","\u1e67":"s","\u1e63":"s","\u1e69":"s","\u0219":"s","\u015f":"s","\u023f":"s","\ua7a9":"s","\ua785":"s","\u1e9b":"s","\u24e3":"t","\uff54":"t","\u1e6b":"t","\u1e97":"t","\u0165":"t","\u1e6d":"t","\u021b":"t","\u0163":"t","\u1e71":"t","\u1e6f":"t","\u0167":"t","\u01ad":"t","\u0288":"t","\u2c66":"t","\ua787":"t","\ua729":"tz","\u24e4":"u","\uff55":"u","\xf9":"u","\xfa":"u","\xfb":"u","\u0169":"u","\u1e79":"u","\u016b":"u","\u1e7b":"u","\u016d":"u","\xfc":"u","\u01dc":"u","\u01d8":"u","\u01d6":"u","\u01da":"u","\u1ee7":"u","\u016f":"u","\u0171":"u","\u01d4":"u","\u0215":"u","\u0217":"u","\u01b0":"u","\u1eeb":"u","\u1ee9":"u","\u1eef":"u","\u1eed":"u","\u1ef1":"u","\u1ee5":"u","\u1e73":"u","\u0173":"u","\u1e77":"u","\u1e75":"u","\u0289":"u","\u24e5":"v","\uff56":"v","\u1e7d":"v","\u1e7f":"v","\u028b":"v","\ua75f":"v","\u028c":"v","\ua761":"vy","\u24e6":"w","\uff57":"w","\u1e81":"w","\u1e83":"w","\u0175":"w","\u1e87":"w","\u1e85":"w","\u1e98":"w","\u1e89":"w","\u2c73":"w","\u24e7":"x","\uff58":"x","\u1e8b":"x","\u1e8d":"x","\u24e8":"y","\uff59":"y","\u1ef3":"y","\xfd":"y","\u0177":"y","\u1ef9":"y","\u0233":"y","\u1e8f":"y","\xff":"y","\u1ef7":"y","\u1e99":"y","\u1ef5":"y","\u01b4":"y","\u024f":"y","\u1eff":"y","\u24e9":"z","\uff5a":"z","\u017a":"z","\u1e91":"z","\u017c":"z","\u017e":"z","\u1e93":"z","\u1e95":"z","\u01b6":"z","\u0225":"z","\u0240":"z","\u2c6c":"z","\ua763":"z"};j=a(document),g=function(){var a=1;return function(){return a++}}(),j.on("mousemove",function(a){i.x=a.pageX,i.y=a.pageY}),d=N(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")&&c.element.data("select2").destroy(),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=w(function(){return c.element.closest("body")}),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",c.element.attr("style")),this.container.css(K(c.containerCss)),this.container.addClass(K(c.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",A),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(c.dropdownCssClass)),this.dropdown.data("select2",this),this.dropdown.on("click",A),this.results=d=this.container.find(f),this.search=e=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",A),u(this.results),this.dropdown.on("mousemove-filtered touchstart touchmove touchend",f,this.bind(this.highlightUnderEvent)),x(80,this.results),this.dropdown.on("scroll-debounced",f,this.bind(this.loadMoreIfNeeded)),a(this.container).on("change",".select2-input",function(a){a.stopPropagation()}),a(this.dropdown).on("change",".select2-input",function(a){a.stopPropagation()}),a.fn.mousewheel&&d.mousewheel(function(a,b,c,e){var f=d.scrollTop();e>0&&0>=f-e?(d.scrollTop(0),A(a)):0>e&&d.get(0).scrollHeight-d.scrollTop()+e<=d.height()&&(d.scrollTop(d.get(0).scrollHeight-d.height()),A(a))}),t(e),e.on("keyup-change input paste",this.bind(this.updateResults)),e.on("focus",function(){e.addClass("select2-focused")}),e.on("blur",function(){e.removeClass("select2-focused")}),this.dropdown.on("mouseup",f,this.bind(function(b){a(b.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(b),this.selectHighlighted(b))})),this.dropdown.on("click mouseup mousedown",function(a){a.stopPropagation()}),a.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==c.maximumInputLength&&this.search.attr("maxlength",c.maximumInputLength);var h=c.element.prop("disabled");h===b&&(h=!1),this.enable(!h);var i=c.element.prop("readonly");i===b&&(i=!1),this.readonly(i),k=k||p(),this.autofocus=c.element.prop("autofocus"),c.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.nextSearchTerm=b},destroy:function(){var a=this.opts.element,c=a.data("select2");this.close(),this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),c!==b&&(c.container.remove(),c.dropdown.remove(),a.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?a.attr({tabindex:this.elementTabIndex}):a.removeAttr("tabindex"),a.show())},optionToData:function(a){return a.is("option")?{id:a.prop("value"),text:a.text(),element:a.get(),css:a.attr("class"),disabled:a.prop("disabled"),locked:q(a.attr("locked"),"locked")||q(a.data("locked"),!0)}:a.is("optgroup")?{text:a.attr("label"),children:[],element:a.get(),css:a.attr("class")}:void 0},prepareOpts:function(c){var d,e,f,g,h=this;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 new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),c=a.extend({},{populateResults:function(d,e,f){var g,i=this.opts.id;g=function(d,e,j){var k,l,m,n,o,p,q,r,s,t;for(d=c.sortResults(d,e,f),k=0,l=d.length;l>k;k+=1)m=d[k],o=m.disabled===!0,n=!o&&i(m)!==b,p=m.children&&m.children.length>0,q=a("<li></li>"),q.addClass("select2-results-dept-"+j),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(h.opts.formatResultCssClass(m)),r=a(document.createElement("div")),r.addClass("select2-result-label"),t=c.formatResult(m,r,f,h.opts.escapeMarkup),t!==b&&r.html(t),q.append(r),p&&(s=a("<ul></ul>"),s.addClass("select2-result-sub"),g(m.children,s,j+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(a){var f,g,i,c={results:[],more:!1},e=a.term;i=function(b,c){var d;b.is("option")?a.matcher(e,b.text(),b)&&c.push(h.optionToData(b)):b.is("optgroup")&&(d=h.optionToData(b),b.children().each2(function(a,b){i(b,d.children)}),d.children.length>0&&c.push(d))},f=d.children(),this.getPlaceholder()!==b&&f.length>0&&(g=this.getPlaceholderOption(),g&&(f=f.not(g))),f.each2(function(a,b){i(b,c.results)}),a.callback(c)}),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=G.call(c.element,c.ajax)):"data"in c?c.query=H(c.data):"tags"in c&&(c.query=I(c.tags),c.createSearchChoice===b&&(c.createSearchChoice=function(b){return{id:a.trim(b),text:a.trim(b)}}),c.initSelection===b&&(c.initSelection=function(b,d){var e=[];a(r(b.val(),c.separator)).each(function(){var b={id:this,text:this},d=c.tags;a.isFunction(d)&&(d=d()),a(d).each(function(){return q(this.id,b.id)?(b=this,!1):void 0}),e.push(b)}),d(e)}))),"function"!=typeof c.query)throw"query function not defined for Select2 "+c.element.attr("id");return c},monitorSource:function(){var c,d,a=this.opts.element;a.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),c=this.bind(function(){var c=a.prop("disabled");c===b&&(c=!1),this.enable(!c);var d=a.prop("readonly");d===b&&(d=!1),this.readonly(d),D(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(K(this.opts.containerCssClass)),D(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(K(this.opts.dropdownCssClass))}),a.on("propertychange.select2",c),this.mutationCallback===b&&(this.mutationCallback=function(a){a.forEach(c)}),d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,d!==b&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new d(this.mutationCallback),this.propertyObserver.observe(a.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(b){var c=a.Event("select2-selecting",{val:this.id(b),object:b});return this.opts.element.trigger(c),!c.isDefaultPrevented()},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()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var a=this._enabled&&!this._readonly,b=!a;return a===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",b),this.close(),this.enabledInterface=a,!0)},enable:function(a){a===b&&(a=!0),this._enabled!==a&&(this._enabled=a,this.opts.element.prop("disabled",!a),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(a){return a===b&&(a=!1),this._readonly===a?!1:(this._readonly=a,this.opts.element.prop("readonly",a),this.enableInterface(),!0)},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t,u,v,w,x,b=this.dropdown,c=this.container.offset(),d=this.container.outerHeight(!1),e=this.container.outerWidth(!1),f=b.outerHeight(!1),g=a(window),h=g.width(),i=g.height(),j=g.scrollLeft()+h,l=g.scrollTop()+i,m=c.top+d,n=c.left,o=l>=m+f,p=c.top-f>=this.body().scrollTop(),q=b.outerWidth(!1),r=j>=n+q,s=b.hasClass("select2-drop-above");s?(u=!0,!p&&o&&(v=!0,u=!1)):(u=!1,!o&&p&&(v=!0,u=!0)),v&&(b.hide(),c=this.container.offset(),d=this.container.outerHeight(!1),e=this.container.outerWidth(!1),f=b.outerHeight(!1),j=g.scrollLeft()+h,l=g.scrollTop()+i,m=c.top+d,n=c.left,q=b.outerWidth(!1),r=j>=n+q,b.show()),this.opts.dropdownAutoWidth?(x=a(".select2-results",b)[0],b.addClass("select2-drop-auto-width"),b.css("width",""),q=b.outerWidth(!1)+(x.scrollHeight===x.clientHeight?0:k.width),q>e?e=q:q=e,r=j>=n+q):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body().css("position")&&(t=this.body().offset(),m-=t.top,n-=t.left),r||(n=c.left+e-q),w={left:n,width:e},u?(w.bottom=i-c.top,w.top="auto",this.container.addClass("select2-drop-above"),b.addClass("select2-drop-above")):(w.top=m,w.bottom="auto",this.container.removeClass("select2-drop-above"),b.removeClass("select2-drop-above")),w=a.extend(w,K(this.opts.dropdownCss)),b.css(w)},shouldOpen:function(){var b;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(b=a.Event("select2-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()?(this.opening(),!0):!1},opening:function(){var f,b=this.containerId,c="scroll."+b,d="resize."+b,e="orientationchange."+b;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),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.on("mousedown touchstart click",function(b){var d,c=a("#select2-drop");c.length>0&&(d=c.data("select2"),d.opts.selectOnBlur&&d.selectHighlighted({noFocus:!0}),d.close({focus:!0}),b.preventDefault(),b.stopPropagation())})),this.dropdown.prev()[0]!==f[0]&&this.dropdown.before(f),a("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),f.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var g=this;this.container.parents().add(window).each(function(){a(this).on(d+" "+c+" "+e,function(){g.positionDropdown()})})},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).off(c).off(d).off(e)}),this.clearDropdownAlignmentPreference(),a("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger(a.Event("select2-close"))}},externalSearch:function(a){this.open(),this.search.val(a),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return K(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var c,d,e,f,g,h,i,b=this.results;if(d=this.highlight(),!(0>d)){if(0==d)return b.scrollTop(0),void 0;c=this.findHighlightableChoices().find(".select2-result-label"),e=a(c[d]),f=e.offset().top+e.outerHeight(!0),d===c.length-1&&(i=b.find("li.select2-more-results"),i.length>0&&(f=i.offset().top+i.outerHeight(!0))),g=b.offset().top+b.outerHeight(!0),f>g&&b.scrollTop(b.scrollTop()+(f-g)),h=e.offset().top-b.offset().top,0>h&&"none"!=e.css("display")&&b.scrollTop(b.scrollTop()+h)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled, .select2-selected)")},moveHighlight:function(b){for(var c=this.findHighlightableChoices(),d=this.highlight();d>-1&&d<c.length;){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(b){var d,e,c=this.findHighlightableChoices();return 0===arguments.length?o(c.filter(".select2-highlighted")[0],c.get()):(b>=c.length&&(b=c.length-1),0>b&&(b=0),this.removeHighlight(),d=a(c[b]),d.addClass("select2-highlighted"),this.ensureHighlightVisible(),e=d.data("select2-data"),e&&this.opts.element.trigger({type:"select2-highlight",val:this.id(e),choice:e}),void 0)},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},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.removeHighlight()},loadMoreIfNeeded:function(){var c,a=this.results,b=a.find("li.select2-more-results"),d=this.resultsPage+1,e=this,f=this.search.val(),g=this.context;0!==b.length&&(c=b.offset().top-a.offset().top-a.height(),c<=this.opts.loadMorePadding&&(b.addClass("select2-active"),this.opts.query({element:this.opts.element,term:f,page:d,context:g,matcher:this.opts.matcher,callback:this.bind(function(c){e.opened()&&(e.opts.populateResults.call(this,a,c.results,{term:f,page:d,context:g}),e.postprocessResults(c,!1,!1),c.more===!0?(b.detach().appendTo(a).text(e.opts.formatLoadMore(d+1)),window.setTimeout(function(){e.loadMoreIfNeeded()},10)):b.remove(),e.positionDropdown(),e.resultsPage=d,e.context=c.context,this.opts.element.trigger({type:"select2-loaded",items:c}))})})))},tokenize:function(){},updateResults:function(c){function m(){d.removeClass("select2-active"),h.positionDropdown()}function n(a){e.html(a),m()}var g,i,l,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||!q(j,k))&&(a.data(this.container,"select2-last-term",j),c===!0||this.showSearchInput!==!1&&this.opened())){l=++this.queryCount;var o=this.getMaximumSelectionSize();if(o>=1&&(g=this.data(),a.isArray(g)&&g.length>=o&&J(f.formatSelectionTooBig,"formatSelectionTooBig")))return n("<li class='select2-selection-limit'>"+f.formatSelectionTooBig(o)+"</li>"),void 0;if(d.val().length<f.minimumInputLength)return J(f.formatInputTooShort,"formatInputTooShort")?n("<li class='select2-no-results'>"+f.formatInputTooShort(d.val(),f.minimumInputLength)+"</li>"):n(""),c&&this.showSearch&&this.showSearch(!0),void 0;
|
22 |
+
if(f.maximumInputLength&&d.val().length>f.maximumInputLength)return J(f.formatInputTooLong,"formatInputTooLong")?n("<li class='select2-no-results'>"+f.formatInputTooLong(d.val(),f.maximumInputLength)+"</li>"):n(""),void 0;f.formatSearching&&0===this.findHighlightableChoices().length&&n("<li class='select2-searching'>"+f.formatSearching()+"</li>"),d.addClass("select2-active"),this.removeHighlight(),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;if(l==this.queryCount){if(!this.opened())return this.search.removeClass("select2-active"),void 0;if(this.context=g.context===b?null:g.context,this.opts.createSearchChoice&&""!==d.val()&&(i=this.opts.createSearchChoice.call(h,d.val(),g.results),i!==b&&null!==i&&h.id(i)!==b&&null!==h.id(i)&&0===a(g.results).filter(function(){return q(h.id(this),h.id(i))}).length&&g.results.unshift(i)),0===g.results.length&&J(f.formatNoMatches,"formatNoMatches"))return n("<li class='select2-no-results'>"+f.formatNoMatches(d.val())+"</li>"),void 0;e.empty(),h.opts.populateResults.call(this,e,g.results,{term:d.val(),page:this.resultsPage,context:null}),g.more===!0&&J(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:"select2-loaded",items:g})}})})}},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(){y(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)):a&&a.noFocus&&this.close()},getPlaceholder:function(){var a;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((a=this.getPlaceholderOption())!==b?a.text():b)},getPlaceholderOption:function(){if(this.select){var a=this.select.children("option").first();if(this.opts.placeholderOption!==b)return"first"===this.opts.placeholderOption&&a||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===a.text()&&""===a.val())return a}},initContainerWidth:function(){function c(){var c,d,e,f,g,h;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(h=d[f].replace(/\s/g,""),e=h.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),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=N(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 class='select2-chosen'> </span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow'><b></b></span>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var c,d,e;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.search.focus(),c=this.search.get(0),c.createTextRange?(d=c.createTextRange(),d.collapse(!1),d.select()):c.setSelectionRange&&(e=this.search.val().length,c.setSelectionRange(e,e)),""===this.search.val()&&this.nextSearchTerm!=b&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger(a.Event("select2-open"))},close:function(a){this.opened()&&(this.parent.close.apply(this,arguments),a=a||{focus:!0},this.focusser.removeAttr("disabled"),a.focus&&this.focusser.focus())},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()},destroy:function(){a("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments)},initContainer:function(){var b,d=this.container,e=this.dropdown;this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=b=d.find(".select2-choice"),this.focusser=d.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.focusser.attr("tabindex",this.elementTabIndex),this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){if(a.which===c.PAGE_UP||a.which===c.PAGE_DOWN)return A(a),void 0;switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),A(a),void 0;case c.ENTER:return this.selectHighlighted(),A(a),void 0;case c.TAB:return this.selectHighlighted({noFocus:!0}),void 0;case c.ESC:return this.cancel(a),A(a),void 0}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body().get(0)&&window.setTimeout(this.bind(function(){this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()&&a.which!==c.TAB&&!c.isControl(a)&&!c.isFunctionKey(a)&&a.which!==c.ESC){if(this.opts.openOnEnter===!1&&a.which===c.ENTER)return A(a),void 0;if(a.which==c.DOWN||a.which==c.UP||a.which==c.ENTER&&this.opts.openOnEnter){if(a.altKey||a.ctrlKey||a.shiftKey||a.metaKey)return;return this.open(),A(a),void 0}return a.which==c.DELETE||a.which==c.BACKSPACE?(this.opts.allowClear&&this.clear(),A(a),void 0):void 0}})),t(this.focusser),this.focusser.on("keyup-change input",this.bind(function(a){if(this.opts.minimumResultsForSearch>=0){if(a.stopPropagation(),this.opened())return;this.open()}})),b.on("mousedown","abbr",this.bind(function(a){this.isInterfaceEnabled()&&(this.clear(),B(a),this.close(),this.selection.focus())})),b.on("mousedown",this.bind(function(b){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),A(b)})),e.on("mousedown",this.bind(function(){this.search.focus()})),b.on("focus",this.bind(function(a){A(a)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger(a.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(b){var c=this.selection.data("select2-data");if(c){var d=a.Event("select2-clearing");if(this.opts.element.trigger(d),d.isDefaultPrevented())return;var e=this.getPlaceholderOption();this.opts.element.val(e?e.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),b!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(c),choice:c}),this.triggerChange({removed:c}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),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())})}},isPlaceholderOptionSelected:function(){var a;return this.getPlaceholder()?(a=this.getPlaceholderOption())!==b&&a.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===b||null===this.opts.element.val():!1},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=a.find("option").filter(function(){return this.selected});b(c.optionToData(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=q(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.getPlaceholderOption()===b?b:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var a=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&a!==b){if(this.select&&this.getPlaceholderOption()===b)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(a)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(a,b,c){var d=0,e=this;if(this.findHighlightableChoices().each2(function(a,b){return q(e.id(b.data("select2-data")),e.opts.element.val())?(d=a,!1):void 0}),c!==!1&&(b===!0&&d>=0?this.highlight(d):this.highlight(0)),b===!0){var g=this.opts.minimumResultsForSearch;g>=0&&this.showSearch(L(a.results)>=g)}},showSearch:function(b){this.showSearchInput!==b&&(this.showSearchInput=b,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!b),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!b),a(this.dropdown,this.container).toggleClass("select2-with-searchbox",b))},onSelect:function(a,b){if(this.triggerSelect(a)){var c=this.opts.element.val(),d=this.data();this.opts.element.val(this.id(a)),this.updateSelection(a),this.opts.element.trigger({type:"select2-selected",val:this.id(a),choice:a}),this.nextSearchTerm=this.opts.nextSearchTerm(a,this.search.val()),this.close(),b&&b.noFocus||this.focusser.focus(),q(c,this.id(a))||this.triggerChange({added:a,removed:d})}},updateSelection:function(a){var d,e,c=this.selection.find(".select2-chosen");this.selection.data("select2-data",a),c.empty(),null!==a&&(d=this.opts.formatSelection(a,c,this.opts.escapeMarkup)),d!==b&&c.append(d),e=this.opts.formatSelectionCssClass(a,c),e!==b&&c.addClass(e),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==b&&this.container.addClass("select2-allowclear")},val:function(){var a,c=!1,d=null,e=this,f=this.data();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("option").filter(function(){return this.selected}).each2(function(a,b){return d=e.optionToData(b),!1}),this.updateSelection(d),this.setPlaceholder(),c&&this.triggerChange({added:d,removed:f});else{if(!a&&0!==a)return this.clear(c),void 0;if(this.opts.initSelection===b)throw new Error("cannot call val() if initSelection() is not defined");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({added:a,removed:f})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(a){var c,d=!1;return 0===arguments.length?(c=this.selection.data("select2-data"),c==b&&(c=null),c):(arguments.length>1&&(d=arguments[1]),a?(c=this.data(),this.opts.element.val(a?this.id(a):""),this.updateSelection(a),d&&this.triggerChange({added:a,removed:c})):this.clear(d),void 0)}}),f=N(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' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return b},prepareOpts:function(){var b=this.parent.prepareOpts.apply(this,arguments),c=this;return"select"===b.element.get(0).tagName.toLowerCase()?b.initSelection=function(a,b){var d=[];a.find("option").filter(function(){return this.selected}).each2(function(a,b){d.push(c.optionToData(b))}),b(d)}:"data"in b&&(b.initSelection=b.initSelection||function(c,d){var e=r(c.val(),b.separator),f=[];b.query({matcher:function(c,d,g){var h=a.grep(e,function(a){return q(a,b.id(g))}).length;return h&&f.push(g),h},callback:a.isFunction(d)?function(){for(var a=[],c=0;c<e.length;c++)for(var g=e[c],h=0;h<f.length;h++){var i=f[h];if(q(g,b.id(i))){a.push(i),f.splice(h,1);break}}d(a)}:a.noop})}),b},selectChoice:function(a){var b=this.container.find(".select2-search-choice-focus");b.length&&a&&a[0]==b[0]||(b.length&&this.opts.element.trigger("choice-deselected",b),b.removeClass("select2-search-choice-focus"),a&&a.length&&(this.close(),a.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",a)))},destroy:function(){a("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments)},initContainer:function(){var d,b=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=d=this.container.find(b);var e=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){e.search[0].focus(),e.selectChoice(a(this))}),this.search.attr("id","s2id_autogen"+g()),a("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(a){if(this.isInterfaceEnabled()){++this.keydowns;var b=d.find(".select2-search-choice-focus"),e=b.prev(".select2-search-choice:not(.select2-locked)"),f=b.next(".select2-search-choice:not(.select2-locked)"),g=z(this.search);if(b.length&&(a.which==c.LEFT||a.which==c.RIGHT||a.which==c.BACKSPACE||a.which==c.DELETE||a.which==c.ENTER)){var h=b;return a.which==c.LEFT&&e.length?h=e:a.which==c.RIGHT?h=f.length?f:null:a.which===c.BACKSPACE?(this.unselect(b.first()),this.search.width(10),h=e.length?e:f):a.which==c.DELETE?(this.unselect(b.first()),this.search.width(10),h=f.length?f:null):a.which==c.ENTER&&(h=null),this.selectChoice(h),A(a),h&&h.length||this.open(),void 0}if((a.which===c.BACKSPACE&&1==this.keydowns||a.which==c.LEFT)&&0==g.offset&&!g.length)return this.selectChoice(d.find(".select2-search-choice:not(.select2-locked)").last()),A(a),void 0;if(this.selectChoice(null),this.opened())switch(a.which){case c.UP:case c.DOWN:return this.moveHighlight(a.which===c.UP?-1:1),A(a),void 0;case c.ENTER:return this.selectHighlighted(),A(a),void 0;case c.TAB:return this.selectHighlighted({noFocus:!0}),this.close(),void 0;case c.ESC:return this.cancel(a),A(a),void 0}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)&&A(a),a.which===c.ENTER&&A(a)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(b){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),b.stopImmediatePropagation(),this.opts.element.trigger(a.Event("select2-blur"))})),this.container.on("click",b,this.bind(function(b){this.isInterfaceEnabled()&&(a(b.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.open(),this.focusSearch(),b.preventDefault()))})),this.container.on("focus",b,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger(a.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},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(),c=this.getMaxSearchWidth();a!==b&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(a).addClass("select2-default"),this.search.width(c>0?c:this.container.css("width"))):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.updateResults(!0),this.search.focus(),this.opts.element.trigger(a.Event("select2-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(){o(e.id(this),c)<0&&(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.call(this,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.triggerSelect(a)&&(this.addSelectedChoice(a),this.opts.element.trigger({type:"selected",val:this.id(a),choice:a}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(a,!1,this.opts.closeOnSelect===!0),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,k,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"),this.opts.escapeMarkup),j!=b&&g.find("div").replaceWith("<div>"+j+"</div>"),k=this.opts.formatSelectionCssClass(c,g.find("div")),k!=b&&g.addClass(k),d&&g.find(".select2-search-choice-close").on("mousedown",A).on("click dblclick",this.bind(function(b){this.isInterfaceEnabled()&&(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(),A(b))})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(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(b){var d,e,c=this.getVal();if(b=b.closest(".select2-search-choice"),0===b.length)throw"Invalid argument: "+b+". Must be .select2-search-choice";if(d=b.data("select2-data")){for(;(e=o(this.id(d),c))>=0;)c.splice(e,1),this.setVal(c),this.select&&this.postprocessResults();var f=a.Event("select2-removing");f.val=this.id(d),f.choice=d,this.opts.element.trigger(f),f.isDefaultPrevented()||(b.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(d),choice:d}),this.triggerChange({removed:d}))}},postprocessResults:function(a,b,c){var d=this.getVal(),e=this.results.find(".select2-result"),f=this.results.find(".select2-result-with-children"),g=this;e.each2(function(a,b){var c=g.id(b.data("select2-data"));o(c,d)>=0&&(b.addClass("select2-selected"),b.find(".select2-result-selectable").addClass("select2-selected"))}),f.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()&&c!==!1&&g.highlight(0),!this.opts.createSearchChoice&&!e.filter(".select2-result:not(.select2-selected)").length>0&&(!a||a&&!a.more&&0===this.results.find(".select2-no-results").length)&&J(g.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+g.opts.formatNoMatches(g.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-s(this.search)},resizeSearch:function(){var a,b,c,d,e,f=s(this.search);a=C(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(Math.floor(e))},getVal:function(){var a;return this.select?(a=this.select.val(),null===a?[]:a):(a=this.opts.element.val(),r(a,this.opts.separator))},setVal:function(b){var c;this.select?this.select.val(b):(c=[],a(b).each(function(){o(this,c)<0&&c.push(this)}),this.opts.element.val(0===c.length?"":c.join(this.opts.separator)))},buildChangeDetails:function(a,b){for(var b=b.slice(0),a=a.slice(0),c=0;c<b.length;c++)for(var d=0;d<a.length;d++)q(this.opts.id(b[c]),this.opts.id(a[d]))&&(b.splice(c,1),c>0&&c--,a.splice(d,1),d--);return{added:b,removed:a}},val:function(c,d){var e,f=this;if(0===arguments.length)return this.getVal();if(e=this.data(),e.length||(e=[]),!c&&0!==c)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),d&&this.triggerChange({added:this.data(),removed:e}),void 0;if(this.setVal(c),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),d&&this.triggerChange(this.buildChangeDetails(e,this.data()));else{if(this.opts.initSelection===b)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(b){var c=a.map(b,f.id);f.setVal(c),f.updateSelection(b),f.clearSearch(),d&&f.triggerChange(f.buildChangeDetails(e,f.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new 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(b,c){var e,f,d=this;return 0===arguments.length?this.selection.find(".select2-search-choice").map(function(){return a(this).data("select2-data")}).get():(f=this.data(),b||(b=[]),e=a.map(b,function(a){return d.opts.id(a)}),this.setVal(e),this.updateSelection(b),this.clearSearch(),c&&this.triggerChange(this.buildChangeDetails(f,this.data())),void 0)}}),a.fn.select2=function(){var d,g,h,i,j,c=Array.prototype.slice.call(arguments,0),k=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],l=["opened","isFocused","container","dropdown"],m=["val","data"],n={search:"externalSearch"};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()?j=d.element.prop("multiple"):(j=d.multiple||!1,"tags"in d&&(d.multiple=j=!0)),g=j?new f:new e,g.init(d);else{if("string"!=typeof c[0])throw"Invalid arguments to select2 plugin: "+c;if(o(c[0],k)<0)throw"Unknown method: "+c[0];if(i=b,g=a(this).data("select2"),g===b)return;if(h=c[0],"container"===h?i=g.container:"dropdown"===h?i=g.dropdown:(n[h]&&(h=n[h]),i=g[h].apply(g,c.slice(1))),o(c[0],l)>=0||o(c[0],m)&&1==c.length)return!1}}),i===b?this:i},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 E(a.text,c.term,e,d),e.join("")},formatSelection:function(a,c,d){return a?d(a.text):b},sortResults:function(a){return a},formatResultCssClass:function(){return b},formatSelectionCssClass: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 n(""+b).toUpperCase().indexOf(n(""+a).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:F,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(a){return a},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return b}},a.fn.select2.ajaxDefaults={transport:a.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:G,local:H,tags:I},util:{debounce:v,markMatch:E,escapeMarkup:F,stripDiacritics:n},"class":{"abstract":d,single:e,multi:f}}}}(jQuery);
|
assets/select2/select2.png
ADDED
Binary file
|
content-views.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package PT_Content_Views
|
4 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
5 |
+
* @license GPL-2.0+
|
6 |
+
* @link http://example.com
|
7 |
+
* @copyright 2014 Palace Of Themes
|
8 |
+
*
|
9 |
+
* @wordpress-plugin
|
10 |
+
* Plugin Name: Content Views
|
11 |
+
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
12 |
+
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
13 |
+
* Version: 1.0.1
|
14 |
+
* Author: Palace Of Themes
|
15 |
+
* Author URI: http://profiles.wordpress.org/pt-guy
|
16 |
+
* Text Domain: content-views
|
17 |
+
* License: GPL-2.0+
|
18 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
19 |
+
* Domain Path: /languages
|
20 |
+
* GitHub Plugin URI: https://github.com/<owner>/<repo>
|
21 |
+
*/
|
22 |
+
|
23 |
+
// If this file is called directly, abort.
|
24 |
+
if ( ! defined( 'WPINC' ) ) {
|
25 |
+
die;
|
26 |
+
}
|
27 |
+
/*
|
28 |
+
* Define Constant
|
29 |
+
*/
|
30 |
+
define( 'PT_CV_VERSION', '1.0.1' );
|
31 |
+
define( 'PT_CV_FILE', __FILE__ );
|
32 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/defines.php' );
|
33 |
+
|
34 |
+
/*
|
35 |
+
* Include other library files (name ASC)
|
36 |
+
*/
|
37 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/assets.php' );
|
38 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/functions.php' );
|
39 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/hooks.php' );
|
40 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/html-viewtype.php' );
|
41 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/html.php' );
|
42 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/settings.php' );
|
43 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/update.php' );
|
44 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/values.php' );
|
45 |
+
|
46 |
+
/*----------------------------------------------------------------------------*
|
47 |
+
* Public-Facing Functionality
|
48 |
+
*----------------------------------------------------------------------------*/
|
49 |
+
|
50 |
+
/*
|
51 |
+
* the plugin's class file
|
52 |
+
*/
|
53 |
+
include_once( plugin_dir_path( __FILE__ ) . 'public/content-views.php' );
|
54 |
+
|
55 |
+
/*
|
56 |
+
* Register hooks that are fired when the plugin is activated or deactivated.
|
57 |
+
* When the plugin is deleted, the uninstall.php file is loaded.
|
58 |
+
*/
|
59 |
+
register_activation_hook( __FILE__, array( 'PT_Content_Views', 'activate' ) );
|
60 |
+
register_deactivation_hook( __FILE__, array( 'PT_Content_Views', 'deactivate' ) );
|
61 |
+
|
62 |
+
add_action( 'plugins_loaded', array( 'PT_Content_Views', 'get_instance' ) );
|
63 |
+
|
64 |
+
/*----------------------------------------------------------------------------*
|
65 |
+
* Dashboard and Administrative Functionality
|
66 |
+
*----------------------------------------------------------------------------*/
|
67 |
+
|
68 |
+
/*
|
69 |
+
* the plugin's admin file
|
70 |
+
*/
|
71 |
+
if ( is_admin() ) {
|
72 |
+
|
73 |
+
// Require Admin side functions
|
74 |
+
include_once( plugin_dir_path( __FILE__ ) . 'admin/content-views-admin.php' );
|
75 |
+
add_action( 'plugins_loaded', array( 'PT_Content_Views_Admin', 'get_instance' ) );
|
76 |
+
|
77 |
+
// Require PT Options framework
|
78 |
+
include_once( plugin_dir_path( __FILE__ ) . 'admin/includes/options.php' );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Common settings
|
83 |
+
*/
|
84 |
+
// Support for post thumbnails
|
85 |
+
add_theme_support( 'post-thumbnails' );
|
86 |
+
|
87 |
+
// Enable shortcode in content
|
88 |
+
add_filter( 'the_content', 'do_shortcode', 11 );
|
89 |
+
|
90 |
+
// Enable shortcodes in text widgets.
|
91 |
+
add_filter( 'widget_text', 'do_shortcode' );
|
includes/assets.php
ADDED
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Asset management
|
4 |
+
*
|
5 |
+
* Register, enqueue, localize asset functions
|
6 |
+
*
|
7 |
+
* @package PT_Content_Views
|
8 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
9 |
+
* @license GPL-2.0+
|
10 |
+
* @link http://example.com
|
11 |
+
* @copyright 2014 Palace Of Themes
|
12 |
+
*/
|
13 |
+
|
14 |
+
if ( ! class_exists( 'PT_CV_Asset' ) ) {
|
15 |
+
|
16 |
+
/**
|
17 |
+
* @name PT_CV_Asset
|
18 |
+
* @todo Register, enqueue, localize asset functions
|
19 |
+
*/
|
20 |
+
class PT_CV_Asset {
|
21 |
+
|
22 |
+
// Prefix for handle of all assets
|
23 |
+
static $prefix = PT_CV_PREFIX;
|
24 |
+
// Array of style & script
|
25 |
+
static $assets = array();
|
26 |
+
/**
|
27 |
+
* version of assets
|
28 |
+
* if an asset doesn't have configed version, it will get plugin version as asset version
|
29 |
+
*/
|
30 |
+
static $version = array(
|
31 |
+
'bootstrap' => '3.1.1',
|
32 |
+
'bootstrap-paginator' => '0.5',
|
33 |
+
'select2' => '3.4.5',
|
34 |
+
'select2-bootstrap' => '3.4.5',
|
35 |
+
);
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Register assets to enqueue later
|
39 |
+
*/
|
40 |
+
static function register() {
|
41 |
+
self::$assets['style'] = self::style();
|
42 |
+
self::$assets['script'] = self::script();
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Enqueue registered assets
|
47 |
+
*
|
48 |
+
* @param string $name Asset slug name
|
49 |
+
* @param string $type Asset type (css/js)
|
50 |
+
* @param array $data Asset data (url, depends, version...)
|
51 |
+
* @param string $prefix Prefix string for asset
|
52 |
+
*/
|
53 |
+
static function enqueue( $name, $type = 'script', $data = '', $prefix = '' ) {
|
54 |
+
|
55 |
+
// If asset is registered, get handle information $data
|
56 |
+
if ( array_key_exists( $name, self::$assets[$type] ) ) {
|
57 |
+
$data = self::$assets[$type][$name];
|
58 |
+
}
|
59 |
+
|
60 |
+
// Do action
|
61 |
+
self::action( $name, $data, $type, 'enqueue', $prefix );
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Styles list
|
66 |
+
*
|
67 |
+
* @return array
|
68 |
+
*/
|
69 |
+
static function style() {
|
70 |
+
return array(
|
71 |
+
'bootstrap' => array(
|
72 |
+
'src' => plugins_url( 'assets/bootstrap/css/bootstrap.min.css', PT_CV_FILE ),
|
73 |
+
),
|
74 |
+
'select2' => array(
|
75 |
+
'src' => plugins_url( 'assets/select2/select2.min.css', PT_CV_FILE ),
|
76 |
+
),
|
77 |
+
'select2-bootstrap' => array(
|
78 |
+
'src' => plugins_url( 'assets/select2/select2-bootstrap.min.css', PT_CV_FILE ),
|
79 |
+
),
|
80 |
+
);
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Scripts list
|
85 |
+
*
|
86 |
+
* @return array
|
87 |
+
*/
|
88 |
+
static function script() {
|
89 |
+
return array(
|
90 |
+
'bootstrap' => array(
|
91 |
+
'src' => plugins_url( 'assets/bootstrap/js/bootstrap.min.js', PT_CV_FILE ),
|
92 |
+
'deps' => array( 'jquery' ),
|
93 |
+
),
|
94 |
+
'bootstrap-paginator' => array(
|
95 |
+
'src' => plugins_url( 'assets/bootstrap-paginator/bootstrap-paginator.min.js', PT_CV_FILE ),
|
96 |
+
'deps' => array( PT_CV_PREFIX . 'bootstrap' . '-' . 'script' ),
|
97 |
+
),
|
98 |
+
'select2' => array(
|
99 |
+
'src' => plugins_url( 'assets/select2/select2.min.js', PT_CV_FILE ),
|
100 |
+
'deps' => array( 'jquery' ),
|
101 |
+
),
|
102 |
+
);
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Get version of handle
|
107 |
+
*
|
108 |
+
* @param string $name Asset slug name
|
109 |
+
* @param array $data Asset data (url, depends, version...)
|
110 |
+
*
|
111 |
+
* @return string
|
112 |
+
*/
|
113 |
+
static function get_version( $name, $data ) {
|
114 |
+
|
115 |
+
if ( isset( $data['ver'] ) ) {
|
116 |
+
return $data['ver'];
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( array_key_exists( $name, self::$version ) ) {
|
120 |
+
return self::$version[$name];
|
121 |
+
}
|
122 |
+
|
123 |
+
return PT_CV_Functions::plugin_info( PT_CV_FILE, 'Version' );
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Register / Enqueue a style / script
|
128 |
+
*
|
129 |
+
* @param string $name Asset slug name
|
130 |
+
* @param string $data Asset information
|
131 |
+
* @param string $type Asset type (css/js)
|
132 |
+
* @param string $action Action to executing: enqueue / register
|
133 |
+
* @param string $prefix Prefix string for asset
|
134 |
+
*/
|
135 |
+
static function action( $name, $data, $type, $action, $prefix ) {
|
136 |
+
$prefix_ = ! empty( $prefix ) ? $prefix : self::$prefix;
|
137 |
+
$handle = $prefix_ . $name . '-' . $type;
|
138 |
+
$src = isset( $data['src'] ) ? $data['src'] : '';
|
139 |
+
$deps = isset( $data['deps'] ) ? $data['deps'] : '';
|
140 |
+
$ver = self::get_version( $name, $data );
|
141 |
+
|
142 |
+
if ( $type == 'style' ) {
|
143 |
+
$last_param = isset( $data['media'] ) ? $data['media'] : 'all';
|
144 |
+
} else {
|
145 |
+
// Auto enqueue script in footer
|
146 |
+
$last_param = isset( $data['in_footer'] ) ? $data['in_footer'] : true;
|
147 |
+
}
|
148 |
+
$function = "wp_{$action}_{$type}";
|
149 |
+
if ( function_exists( $function ) ) {
|
150 |
+
$function( $handle, $src, $deps, $ver, $last_param );
|
151 |
+
}
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Localize script
|
156 |
+
*
|
157 |
+
* @param string $name Asset slug name
|
158 |
+
* @param string $object_name The name of the variable which will contain the data
|
159 |
+
* @param string $translation_array Array of translation strings
|
160 |
+
* @param string $prefix Prefix string for asset
|
161 |
+
*/
|
162 |
+
static function localize_script( $name, $object_name, $translation_array, $prefix = '' ) {
|
163 |
+
$type = 'script';
|
164 |
+
$prefix_ = ! empty( $prefix ) ? $prefix : self::$prefix;
|
165 |
+
$handle = $prefix_ . $name . '-' . $type;
|
166 |
+
|
167 |
+
wp_localize_script( $handle, $object_name, $translation_array );
|
168 |
+
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Include asset files directly in page
|
172 |
+
*
|
173 |
+
* @param string $name Asset slug name
|
174 |
+
* @param string $scr The link to asset file
|
175 |
+
* @param string $type Asset type (css/js)
|
176 |
+
* @param string $prefix Prefix string for asset
|
177 |
+
*/
|
178 |
+
static function include_inline( $name, $src, $type, $prefix = '' ) {
|
179 |
+
$prefix_ = ! empty( $prefix ) ? $prefix : self::$prefix;
|
180 |
+
$handle = $prefix_ . $name . '-' . $type;
|
181 |
+
|
182 |
+
switch ( $type ) {
|
183 |
+
case 'js':
|
184 |
+
printf( "<script type='text/javascript' src='%s'></script>", $src );
|
185 |
+
break;
|
186 |
+
|
187 |
+
case 'css':
|
188 |
+
printf( "<link rel='stylesheet' id='%s' href='%s' type='text/css' media='all' />", esc_attr( $handle ), esc_url( $src ) );
|
189 |
+
break;
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
// Call to run
|
197 |
+
PT_CV_Asset::register();
|
includes/defines.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Defines common constant
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
define( 'PT_CV_DOMAIN', 'content-views' );
|
13 |
+
define( 'PT_CV_PREFIX', 'pt-cv-' );
|
14 |
+
define( 'PT_CV_PREFIX_', 'pt_cv_' );
|
15 |
+
define( 'PT_CV_PREFIX_UPPER', 'PT_CV_' );
|
16 |
+
|
17 |
+
// Custom post type
|
18 |
+
define( 'PT_CV_POST_TYPE', 'pt_view' );
|
19 |
+
|
20 |
+
// Options
|
21 |
+
define( 'PT_CV_OPTION_VERSION', PT_CV_PREFIX_ . 'version' );
|
22 |
+
define( 'PT_CV_OPTION_NAME', PT_CV_PREFIX_ . 'options' );
|
23 |
+
|
24 |
+
// Custom fields
|
25 |
+
define( 'PT_CV_META_ID', '_' . PT_CV_PREFIX_ . 'id' );
|
26 |
+
define( 'PT_CV_META_SETTINGS', '_' . PT_CV_PREFIX_ . 'settings' );
|
27 |
+
define( 'PT_CV_META_VIEW_COUNT', '_' . PT_CV_PREFIX_ . 'view_count' );
|
28 |
+
|
29 |
+
// Public assets directory
|
30 |
+
define( 'PT_CV_PUBLIC_ASSETS', plugin_dir_path( PT_CV_FILE ) . 'public/assets/' );
|
31 |
+
|
32 |
+
// Public assets uri
|
33 |
+
define( 'PT_CV_PUBLIC_ASSETS_URI', plugins_url( 'public/assets/', PT_CV_FILE ) );
|
34 |
+
|
35 |
+
// View type directory (HTML + CSS + JS)
|
36 |
+
define( 'PT_CV_VIEW_TYPE_OUTPUT', plugin_dir_path( PT_CV_FILE ) . 'public/templates/' );
|
includes/functions.php
ADDED
@@ -0,0 +1,984 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Contain main functions to work with plugin, post, custom fields...
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! function_exists( 'get_plugin_data' ) ) {
|
13 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
14 |
+
}
|
15 |
+
if ( ! class_exists( 'PT_CV_Functions' ) ) {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* @name PT_CV_Functions
|
19 |
+
* @todo Utility functions
|
20 |
+
*/
|
21 |
+
class PT_CV_Functions {
|
22 |
+
|
23 |
+
static $prev_random_string = '';
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Compare current Wordpress version with a version
|
27 |
+
*
|
28 |
+
* @global string $wp_version
|
29 |
+
* @param string $version_to_compare
|
30 |
+
* @param string $operator
|
31 |
+
* @return boolean
|
32 |
+
*/
|
33 |
+
static function wp_version_compare( $version_to_compare, $operator = '>=' ) {
|
34 |
+
if ( empty( $version_to_compare ) ) {
|
35 |
+
return true;
|
36 |
+
}
|
37 |
+
|
38 |
+
global $wp_version;
|
39 |
+
// Check if using Wordpress version 3.7 or higher
|
40 |
+
return version_compare( $wp_version, $version_to_compare, $operator );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Get plugin info
|
45 |
+
*
|
46 |
+
* @param string $file Absolute path to the plugin file
|
47 |
+
* @param string $data Field of plugin data want to get
|
48 |
+
*
|
49 |
+
* @return array | null
|
50 |
+
*/
|
51 |
+
static function plugin_info( $file, $data = '' ) {
|
52 |
+
$plugin_data = get_plugin_data( $file );
|
53 |
+
|
54 |
+
return isset( $plugin_data[$data] ) ? $plugin_data[$data] : NULL;
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Add sub menu page
|
59 |
+
*
|
60 |
+
* @param string $parent_slug Slug of parent menu
|
61 |
+
* @param string $page_title Title of page
|
62 |
+
* @param string $menu_title Title of menu
|
63 |
+
* @param string $sub_page Slug of sub menu
|
64 |
+
* @param string $class Class name which contains function to output content of page created by this menu
|
65 |
+
*/
|
66 |
+
static function menu_add_sub( $parent_slug, $page_title, $menu_title, $sub_page, $class ) {
|
67 |
+
return add_submenu_page(
|
68 |
+
$parent_slug, $page_title, $menu_title, 'manage_options', $parent_slug . '-' . $sub_page, array( $class, 'display_sub_page_' . $sub_page )
|
69 |
+
);
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Get current post type in Admin
|
74 |
+
*
|
75 |
+
* @global type $post
|
76 |
+
* @global type $typenow
|
77 |
+
* @global type $current_screen
|
78 |
+
* @return type
|
79 |
+
*/
|
80 |
+
static function admin_current_post_type() {
|
81 |
+
global $post, $typenow, $current_screen;
|
82 |
+
|
83 |
+
//we have a post so we can just get the post type from that
|
84 |
+
if ( $post && $post->post_type ) {
|
85 |
+
return $post->post_type;
|
86 |
+
} //check the global $typenow - set in admin.php
|
87 |
+
elseif ( $typenow ) {
|
88 |
+
return $typenow;
|
89 |
+
} //check the global $current_screen object - set in sceen.php
|
90 |
+
elseif ( $current_screen && isset( $current_screen->post_type ) ) {
|
91 |
+
return $current_screen->post_type;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Include content of file
|
97 |
+
*
|
98 |
+
* @param string $file_path Absolute path of file
|
99 |
+
*
|
100 |
+
* @return NULL | string Content of file
|
101 |
+
*/
|
102 |
+
static function file_include_content( $file_path ) {
|
103 |
+
$content = NULL;
|
104 |
+
|
105 |
+
if ( file_exists( $file_path ) ) {
|
106 |
+
ob_start();
|
107 |
+
include_once $file_path;
|
108 |
+
$content = ob_get_clean();
|
109 |
+
}
|
110 |
+
|
111 |
+
return $content;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Generate random string
|
116 |
+
*
|
117 |
+
* @param bool $prev_return Return previous generated string
|
118 |
+
*
|
119 |
+
* @return string
|
120 |
+
*/
|
121 |
+
static function string_random( $prev_return = false ) {
|
122 |
+
if ( $prev_return ) {
|
123 |
+
return PT_CV_Functions::$prev_random_string;
|
124 |
+
}
|
125 |
+
PT_CV_Functions::$prev_random_string = substr( md5( rand() ), 0, 10 );
|
126 |
+
|
127 |
+
return PT_CV_Functions::$prev_random_string;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Create array from string, use explode function
|
132 |
+
*
|
133 |
+
* @param string $string String to explode
|
134 |
+
* @param string $delimiter Delimiter to explode string
|
135 |
+
*
|
136 |
+
* @return array
|
137 |
+
*/
|
138 |
+
static function string_to_array( $string, $delimiter = ',' ) {
|
139 |
+
return is_array( $string ) ? $string : (array) explode( $delimiter, (string) str_replace( ' ', '', $string ) );
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Slug to nice String
|
144 |
+
*
|
145 |
+
* @param string $slug Slug string
|
146 |
+
*
|
147 |
+
* @return string
|
148 |
+
*/
|
149 |
+
static function string_slug_to_text( $slug ) {
|
150 |
+
$slug = preg_replace( '/[^a-z]+/', ' ', $slug );
|
151 |
+
|
152 |
+
return ucwords( $slug );
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Get thumbnail dimensions
|
157 |
+
*
|
158 |
+
* @param array $fargs The settings of thumbnail
|
159 |
+
*
|
160 |
+
* @return array
|
161 |
+
*/
|
162 |
+
static function field_thumbnail_dimensions( $fargs ) {
|
163 |
+
$size = $fargs['size'];
|
164 |
+
|
165 |
+
return (array) explode( '×', str_replace( ' ', '', $size ) );
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Get value of a setting from global settings array
|
170 |
+
*
|
171 |
+
* @param string $field The full name of setting to get value
|
172 |
+
* @param array $array_to_get Array to get values of wanted setting
|
173 |
+
* @param type | null $assign The value to assign if setting is not found
|
174 |
+
*/
|
175 |
+
static function setting_value( $field, $array_to_get, $assign = NULL ) {
|
176 |
+
return isset( $array_to_get[$field] ) ? $array_to_get[$field] : $assign;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Get values of settings from global settings array
|
181 |
+
*
|
182 |
+
* @param array $fields Array of setting fields to get value
|
183 |
+
* @param array $array_to_save Array to save values of wanted setting fields
|
184 |
+
* @param array $array_to_get Array to get values of wanted setting fields
|
185 |
+
* @param string $prefix Prefix string to looking for fields in $array_to_get
|
186 |
+
*/
|
187 |
+
static function settings_values( $fields, &$array_to_save, $array_to_get, $prefix ) {
|
188 |
+
foreach ( $fields as $tsetting ) {
|
189 |
+
$array_to_save[$tsetting] = PT_CV_Functions::setting_value( $prefix . $tsetting, $array_to_get );
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Get names of options for a setting group (setting name started by a prefix)
|
195 |
+
*
|
196 |
+
* @param string $prefix The prefix in name of settings
|
197 |
+
* @param array $options The options array (contain full paramaters of settings)
|
198 |
+
*/
|
199 |
+
static function settings_keys( $prefix, $options ) {
|
200 |
+
$result = array();
|
201 |
+
foreach ( $options as $option ) {
|
202 |
+
if ( $option['params'] ) {
|
203 |
+
foreach ( $option['params'] as $params ) {
|
204 |
+
// If name of setting match with prefix string, got it name
|
205 |
+
if ( isset( $params['name'] ) && substr( $params['name'], 0, strlen( $prefix ) ) === $prefix ) {
|
206 |
+
$result[] = substr( $params['name'], strlen( $prefix ) );
|
207 |
+
}
|
208 |
+
}
|
209 |
+
}
|
210 |
+
}
|
211 |
+
|
212 |
+
return $result;
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Get value of some setting options by prefix
|
217 |
+
*
|
218 |
+
* @param string $prefix The prefix in name of setting options
|
219 |
+
* @param type $settings_ The settings array
|
220 |
+
*/
|
221 |
+
static function settings_values_by_prefix( $prefix, $settings_ ) {
|
222 |
+
$result = array();
|
223 |
+
|
224 |
+
foreach ( $settings_ as $name => $value ) {
|
225 |
+
// If name of setting match with prefix string, got it name
|
226 |
+
if ( substr( $name, 0, strlen( $prefix ) ) === $prefix ) {
|
227 |
+
$result[substr( $name, strlen( $prefix ) )] = $value;
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
return $result;
|
232 |
+
}
|
233 |
+
|
234 |
+
/**
|
235 |
+
* Get terms list of a post
|
236 |
+
*
|
237 |
+
* @param object $post The post object
|
238 |
+
*
|
239 |
+
* @return string
|
240 |
+
*/
|
241 |
+
static function post_terms( $post ) {
|
242 |
+
// List of HTML link to terms
|
243 |
+
$links = array();
|
244 |
+
|
245 |
+
// Get list of taxonomies
|
246 |
+
$taxonomies = get_taxonomies( '', 'names' );
|
247 |
+
|
248 |
+
// Get lists of terms of this post
|
249 |
+
$terms = wp_get_object_terms( $post->ID, $taxonomies );
|
250 |
+
|
251 |
+
foreach ( $terms as $term ) {
|
252 |
+
$links[] = sprintf(
|
253 |
+
'<a href="%1$s" title="%2$s %3$s">%3$s</a>',
|
254 |
+
esc_url( get_term_link( $term, $term->taxonomy ) ),
|
255 |
+
__( 'View all posts in', PT_CV_DOMAIN ),
|
256 |
+
$term->name
|
257 |
+
);
|
258 |
+
}
|
259 |
+
|
260 |
+
return implode( ', ', $links );
|
261 |
+
}
|
262 |
+
|
263 |
+
/**
|
264 |
+
* Update post view count
|
265 |
+
*
|
266 |
+
* @param string $post_id ID of post
|
267 |
+
*/
|
268 |
+
static function post_update_view_count( $post_id ) {
|
269 |
+
$meta_key = PT_CV_META_VIEW_COUNT;
|
270 |
+
$count = get_post_meta( $post_id, $meta_key, true );
|
271 |
+
if ( ! $count ) {
|
272 |
+
$count = 0;
|
273 |
+
}
|
274 |
+
$count ++;
|
275 |
+
update_post_meta( $post_id, $meta_key, $count );
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Get post view count
|
280 |
+
*
|
281 |
+
* @param string $post_id ID of post
|
282 |
+
*/
|
283 |
+
static function post_get_view_count( $post_id ) {
|
284 |
+
$meta_key = PT_CV_META_VIEW_COUNT;
|
285 |
+
$count = get_post_meta( $post_id, $meta_key, true );
|
286 |
+
if ( ! $count ) {
|
287 |
+
$count = 1;
|
288 |
+
}
|
289 |
+
|
290 |
+
return _n( 'view', 'views', $count, PT_CV_DOMAIN );
|
291 |
+
}
|
292 |
+
|
293 |
+
/**
|
294 |
+
* Insert new post
|
295 |
+
*
|
296 |
+
* @param string $arr Array of post data
|
297 |
+
*/
|
298 |
+
static function post_insert( $arr ) {
|
299 |
+
if ( ! $arr ) {
|
300 |
+
return;
|
301 |
+
}
|
302 |
+
// Create post object
|
303 |
+
$my_post = array(
|
304 |
+
'ID' => (int) $arr['ID'],
|
305 |
+
'post_type' => PT_CV_POST_TYPE,
|
306 |
+
'post_content' => '',
|
307 |
+
'post_title' => ! empty( $arr['title'] ) ? $arr['title'] : __( '(no title)', PT_CV_DOMAIN ),
|
308 |
+
'post_status' => 'publish',
|
309 |
+
);
|
310 |
+
|
311 |
+
// Insert the post into the database
|
312 |
+
return wp_insert_post( $my_post );
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Get View id in post table, from "id" meta key value
|
317 |
+
*
|
318 |
+
* @param string $meta_id ID of custom field
|
319 |
+
*/
|
320 |
+
static function post_id_from_meta_id( $meta_id ) {
|
321 |
+
|
322 |
+
$post_id = 0;
|
323 |
+
if ( ! $meta_id ) {
|
324 |
+
return $post_id;
|
325 |
+
}
|
326 |
+
|
327 |
+
// Query view which has view id = $meta_id
|
328 |
+
$pt_query = new WP_Query(
|
329 |
+
array(
|
330 |
+
'post_type' => PT_CV_POST_TYPE,
|
331 |
+
'post_status' => 'publish',
|
332 |
+
'meta_key' => PT_CV_META_ID,
|
333 |
+
'meta_value' => $meta_id,
|
334 |
+
)
|
335 |
+
);
|
336 |
+
if ( $pt_query->have_posts() ) :
|
337 |
+
while ( $pt_query->have_posts() ):
|
338 |
+
$pt_query->the_post();
|
339 |
+
$post_id = get_the_ID();
|
340 |
+
endwhile;
|
341 |
+
endif;
|
342 |
+
|
343 |
+
return $post_id;
|
344 |
+
}
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Get first key of array
|
348 |
+
*
|
349 |
+
* @param array $args Array data
|
350 |
+
*
|
351 |
+
* @return string
|
352 |
+
*/
|
353 |
+
static function array_get_first_key( $args ) {
|
354 |
+
return current( array_keys( $args ) );
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Check valid request
|
359 |
+
*
|
360 |
+
* @param string $nonce_name Name of nonce field
|
361 |
+
* @param string $action_name name of action relates to nonce field
|
362 |
+
*/
|
363 |
+
static function _nonce_check( $nonce_name, $action_name ) {
|
364 |
+
$nonce_name = PT_CV_PREFIX_ . $nonce_name;
|
365 |
+
if ( ! isset( $_POST[$nonce_name] ) || ! wp_verify_nonce( $_POST[$nonce_name], PT_CV_PREFIX_ . $action_name ) ) {
|
366 |
+
print esc_html( __( 'Sorry, your nonce did not verify.', PT_CV_DOMAIN ) );
|
367 |
+
exit;
|
368 |
+
}
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Get view data
|
373 |
+
*
|
374 |
+
* @param string $meta_id ID of custom field
|
375 |
+
*
|
376 |
+
* @return array
|
377 |
+
*/
|
378 |
+
static function view_get_settings( $meta_id ) {
|
379 |
+
if ( ! $meta_id ) {
|
380 |
+
return;
|
381 |
+
}
|
382 |
+
|
383 |
+
$post_id = PT_CV_Functions::post_id_from_meta_id( $meta_id );
|
384 |
+
|
385 |
+
// Get view settings
|
386 |
+
if ( $post_id ) {
|
387 |
+
$view_settings = get_post_meta( $post_id, PT_CV_META_SETTINGS, true );
|
388 |
+
return unserialize( base64_decode( $view_settings ) );
|
389 |
+
}
|
390 |
+
|
391 |
+
return array();
|
392 |
+
}
|
393 |
+
|
394 |
+
/**
|
395 |
+
* Process view $settings array, return HTML output
|
396 |
+
*
|
397 |
+
* @param string $id The current view id
|
398 |
+
* @param array $settings The settings array
|
399 |
+
* @param array $pargs The pagination settings array
|
400 |
+
*
|
401 |
+
* @return string HTML output of Content View
|
402 |
+
*/
|
403 |
+
static function view_process_settings( $id, $settings, $pargs = array() ) {
|
404 |
+
if ( ! $settings ) {
|
405 |
+
return '';
|
406 |
+
}
|
407 |
+
|
408 |
+
// Escaped value appropriate for use in a SQL query
|
409 |
+
$settings_ = array();
|
410 |
+
foreach ( $settings as $key => $value ) {
|
411 |
+
$settings_[$key] = esc_sql( $value );
|
412 |
+
}
|
413 |
+
|
414 |
+
// Get content type
|
415 |
+
$content_type = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'content-type', $settings_ );
|
416 |
+
|
417 |
+
/**
|
418 |
+
* Get Query parameters
|
419 |
+
* Set default values
|
420 |
+
*/
|
421 |
+
$args = $default_args = array(
|
422 |
+
'post_type' => $content_type,
|
423 |
+
'post_status' => 'publish',
|
424 |
+
'ignore_sticky_posts' => 1,
|
425 |
+
);
|
426 |
+
|
427 |
+
// Post in
|
428 |
+
if ( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'post__in', $settings_ ) ) {
|
429 |
+
$post_in = PT_CV_Functions::string_to_array( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'post__in', $settings_ ) );
|
430 |
+
$args['post__in'] = array_map( 'intval', array_filter( $post_in ) );
|
431 |
+
}
|
432 |
+
|
433 |
+
// Post not in
|
434 |
+
if ( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'post__not_in', $settings_ ) ) {
|
435 |
+
$post_not_in = PT_CV_Functions::string_to_array( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'post__not_in', $settings_ ) );
|
436 |
+
$args['post__not_in'] = array_map( 'intval', array_filter( $post_not_in ) );
|
437 |
+
}
|
438 |
+
|
439 |
+
// Advance settings
|
440 |
+
PT_CV_Functions::view_get_advanced_settings( $settings_, $args, $content_type );
|
441 |
+
|
442 |
+
/**
|
443 |
+
* Get Display parameters
|
444 |
+
*/
|
445 |
+
$dargs = array();
|
446 |
+
|
447 |
+
// Get view type
|
448 |
+
$view_type = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'view-type', $settings_ );
|
449 |
+
|
450 |
+
$dargs['view-type'] = $view_type;
|
451 |
+
|
452 |
+
// Field settings of a item
|
453 |
+
PT_CV_Functions::view_get_display_settings( $settings_, $dargs );
|
454 |
+
|
455 |
+
// Pagination settings
|
456 |
+
PT_CV_Functions::view_get_pagination_settings( $settings_, $dargs, $args, $pargs );
|
457 |
+
|
458 |
+
// Other settings
|
459 |
+
PT_CV_Functions::view_get_other_settings( $settings_, $dargs );
|
460 |
+
|
461 |
+
// View type settings
|
462 |
+
$dargs['view-type-settings'] = PT_CV_Functions::settings_values_by_prefix( PT_CV_PREFIX . $view_type . '-', $settings_ );
|
463 |
+
|
464 |
+
$dargs = apply_filters( PT_CV_PREFIX_ . 'all_display_settings', $dargs, $settings_ );
|
465 |
+
|
466 |
+
// Validate settings before processing, if some required parameters are missing, show error and exit
|
467 |
+
$error = apply_filters( PT_CV_PREFIX_ . 'validate_settings', array(), $dargs, $args );
|
468 |
+
|
469 |
+
// Return error message
|
470 |
+
if ( $error ) {
|
471 |
+
return ( implode( '</p><p>', $error ) );
|
472 |
+
}
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Output Items
|
476 |
+
*/
|
477 |
+
|
478 |
+
// Store HTML output of each item
|
479 |
+
$content_items = array();
|
480 |
+
|
481 |
+
// The Query
|
482 |
+
$pt_query = new WP_Query( $args );
|
483 |
+
|
484 |
+
// The Loop
|
485 |
+
if ( $pt_query->have_posts() ) {
|
486 |
+
while ( $pt_query->have_posts() ) {
|
487 |
+
$pt_query->the_post();
|
488 |
+
global $post;
|
489 |
+
|
490 |
+
// Output HTML for this item
|
491 |
+
$content_items[] = PT_CV_Html::view_type_output( $view_type, $dargs, $post );
|
492 |
+
}
|
493 |
+
} else {
|
494 |
+
// Get no post found class
|
495 |
+
$_class = apply_filters( PT_CV_PREFIX_ . 'content_no_post_found_class', 'alert alert-warning' );
|
496 |
+
|
497 |
+
// Get no post found text
|
498 |
+
$_text = apply_filters( PT_CV_PREFIX_ . 'content_no_post_found_text', __( 'No post found', PT_CV_DOMAIN ) );
|
499 |
+
|
500 |
+
// Output HTML
|
501 |
+
$content_items[] = sprintf( '<div class="%1$s">%2$s</div>', esc_attr( $_class ), balanceTags( $_text ) );
|
502 |
+
}
|
503 |
+
|
504 |
+
// Restore original Post Data
|
505 |
+
wp_reset_postdata();
|
506 |
+
|
507 |
+
/**
|
508 |
+
* Output Pagination
|
509 |
+
*/
|
510 |
+
$current_page = ( isset( $pargs['page'] ) && $pargs['page'] > 1 ) ? $pargs['page'] : 1;
|
511 |
+
$html = PT_CV_Html::content_items_wrap( $content_items, $dargs, $current_page, $args['posts_per_page'] );
|
512 |
+
|
513 |
+
// Append Pagination HTML if this is first page, or not Ajax calling
|
514 |
+
if ( $args['posts_per_page'] > 0 && $current_page === 1 ) {
|
515 |
+
// Total number of items
|
516 |
+
$total_items = ( $args['limit'] > 0 && $pt_query->found_posts > $args['limit'] ) ? $args['limit'] : $pt_query->found_posts;
|
517 |
+
|
518 |
+
// Total number of pages
|
519 |
+
$max_num_pages = ceil( $total_items / $args['posts_per_page'] );
|
520 |
+
$html .= "\n" . PT_CV_Html::pagination_output( $max_num_pages, $dargs, $id );
|
521 |
+
}
|
522 |
+
|
523 |
+
return $html;
|
524 |
+
}
|
525 |
+
|
526 |
+
/**
|
527 |
+
* Get Advance settings
|
528 |
+
*
|
529 |
+
* @param array $settings_ The settings array
|
530 |
+
* @param array $args The parameters array
|
531 |
+
* @param string $content_type The content type
|
532 |
+
*/
|
533 |
+
static function view_get_advanced_settings( $settings_, &$args, $content_type ) {
|
534 |
+
|
535 |
+
$advanced_settings = (array) PT_CV_Functions::setting_value( PT_CV_PREFIX . 'advanced-settings', $settings_ );
|
536 |
+
if ( $advanced_settings ) {
|
537 |
+
foreach ( $advanced_settings as $setting ) {
|
538 |
+
switch ( $setting ) {
|
539 |
+
|
540 |
+
// Author
|
541 |
+
case 'author':
|
542 |
+
$author_in = PT_CV_Functions::string_to_array( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'author__in', $settings_ ) );
|
543 |
+
|
544 |
+
// Check if using Wordpress version 3.7 or higher
|
545 |
+
$version_gt_37 = PT_CV_Functions::wp_version_compare( '3.7' );
|
546 |
+
|
547 |
+
if ( $version_gt_37 ) {
|
548 |
+
$author_not_in = PT_CV_Functions::string_to_array( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'author__not_in', $settings_ ) );
|
549 |
+
|
550 |
+
// Author in
|
551 |
+
if ( ! empty( $author_in[0] ) ) {
|
552 |
+
$args = array_merge(
|
553 |
+
$args, array(
|
554 |
+
'author__in' => array_map( 'intval', $author_in ),
|
555 |
+
)
|
556 |
+
);
|
557 |
+
}
|
558 |
+
|
559 |
+
// Author not in
|
560 |
+
if ( ! empty( $author_not_in[0] ) ) {
|
561 |
+
$args = array_merge(
|
562 |
+
$args, array(
|
563 |
+
'author__not_in' => array_map( 'intval', $author_not_in ),
|
564 |
+
)
|
565 |
+
);
|
566 |
+
}
|
567 |
+
} else {
|
568 |
+
// Author = ID
|
569 |
+
if ( ! empty( $author_in[0] ) ) {
|
570 |
+
$args = array_merge(
|
571 |
+
$args, array(
|
572 |
+
'author' => intval( $author_in[0] ),
|
573 |
+
)
|
574 |
+
);
|
575 |
+
}
|
576 |
+
}
|
577 |
+
|
578 |
+
break;
|
579 |
+
|
580 |
+
// Status
|
581 |
+
case 'status':
|
582 |
+
$args = array_merge(
|
583 |
+
$args, array(
|
584 |
+
'post_status' => PT_CV_Functions::string_to_array( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'post_status', $settings_, 'publish' ) ),
|
585 |
+
)
|
586 |
+
);
|
587 |
+
break;
|
588 |
+
|
589 |
+
// Search
|
590 |
+
case 'search':
|
591 |
+
if ( PT_CV_Functions::setting_value( PT_CV_PREFIX . 's', $settings_ ) ) {
|
592 |
+
$args = array_merge(
|
593 |
+
$args, array(
|
594 |
+
's' => PT_CV_Functions::setting_value( PT_CV_PREFIX . 's', $settings_ ),
|
595 |
+
)
|
596 |
+
);
|
597 |
+
}
|
598 |
+
break;
|
599 |
+
|
600 |
+
// Taxonomy
|
601 |
+
case 'taxonomy':
|
602 |
+
// No taxonomy found
|
603 |
+
if ( ! PT_CV_Functions::setting_value( PT_CV_PREFIX . 'taxonomy', $settings_ ) ) {
|
604 |
+
break;
|
605 |
+
}
|
606 |
+
|
607 |
+
// All settings of taxonomies
|
608 |
+
$taxonomy_setting = array();
|
609 |
+
|
610 |
+
// Selected taxonomies
|
611 |
+
$taxonomies = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'taxonomy', $settings_ );
|
612 |
+
|
613 |
+
// Get Terms & criterias (In, Not in)
|
614 |
+
foreach ( $taxonomies as $taxonomy ) {
|
615 |
+
|
616 |
+
// If found setting for taxonomy
|
617 |
+
if ( PT_CV_Functions::setting_value( PT_CV_PREFIX . $taxonomy . '__in', $settings_ ) ) {
|
618 |
+
$taxonomy_setting[] = array(
|
619 |
+
'taxonomy' => $taxonomy,
|
620 |
+
'field' => 'slug',
|
621 |
+
'terms' => (array) PT_CV_Functions::setting_value( PT_CV_PREFIX . $taxonomy . '__in', $settings_ ),
|
622 |
+
);
|
623 |
+
}
|
624 |
+
if ( PT_CV_Functions::setting_value( PT_CV_PREFIX . $taxonomy . '__not_in', $settings_ ) ) {
|
625 |
+
$taxonomy_setting[] = array(
|
626 |
+
'taxonomy' => $taxonomy,
|
627 |
+
'field' => 'slug',
|
628 |
+
'terms' => (array) PT_CV_Functions::setting_value( PT_CV_PREFIX . $taxonomy . '__not_in', $settings_ ),
|
629 |
+
'operator' => 'NOT IN',
|
630 |
+
);
|
631 |
+
}
|
632 |
+
}
|
633 |
+
|
634 |
+
// Get Taxonomy relation if there are more than 1 selected taxonomies | set In & Not in of a taxonomy
|
635 |
+
if ( count( $taxonomies ) > 1 || count( $taxonomy_setting ) > 1 ) {
|
636 |
+
$taxonomy_setting['relation'] = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'taxonomy-relation', $settings_, 'AND' );
|
637 |
+
}
|
638 |
+
|
639 |
+
// Filter taxonomy with Custom post types
|
640 |
+
$taxonomy_setting_ = apply_filters( PT_CV_PREFIX_ . 'taxonomy_setting', $taxonomy_setting );
|
641 |
+
|
642 |
+
$args = array_merge( $args, array( 'tax_query' => $taxonomy_setting_ ) );
|
643 |
+
break;
|
644 |
+
|
645 |
+
// Order
|
646 |
+
case 'order':
|
647 |
+
|
648 |
+
$order_settings = array();
|
649 |
+
|
650 |
+
// Advanced order by
|
651 |
+
if ( PT_CV_Functions::setting_value( PT_CV_PREFIX . $content_type . '-orderby', $settings_ ) ) {
|
652 |
+
|
653 |
+
// Get meta key to order by
|
654 |
+
$meta_key = PT_CV_Functions::setting_value( PT_CV_PREFIX . $content_type . '-orderby', $settings_ );
|
655 |
+
|
656 |
+
// Use 'meta_value_num' for numeric values
|
657 |
+
$meta_numeric_values = apply_filters( PT_CV_PREFIX_ . 'meta_numeric_values', array() );
|
658 |
+
$meta_orderby = in_array( $meta_key, $meta_numeric_values ) ? 'meta_value_num' : 'meta_value';
|
659 |
+
$order_settings = array(
|
660 |
+
'meta_key' => $meta_key,
|
661 |
+
'orderby' => $meta_orderby,
|
662 |
+
'order' => PT_CV_Functions::setting_value( PT_CV_PREFIX . 'advanced-order', $settings_ ),
|
663 |
+
);
|
664 |
+
|
665 |
+
} else {
|
666 |
+
// Common order by
|
667 |
+
|
668 |
+
$orderby = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'orderby', $settings_ );
|
669 |
+
$order_by_options = array_keys( PT_CV_Values::post_regular_orderby() );
|
670 |
+
if ( in_array( $orderby, $order_by_options ) ) {
|
671 |
+
$order_settings = array(
|
672 |
+
'orderby' => $orderby,
|
673 |
+
'order' => PT_CV_Functions::setting_value( PT_CV_PREFIX . 'order', $settings_ )
|
674 |
+
);
|
675 |
+
}
|
676 |
+
}
|
677 |
+
|
678 |
+
$args = array_merge( $args, $order_settings );
|
679 |
+
break;
|
680 |
+
|
681 |
+
default:
|
682 |
+
break;
|
683 |
+
}
|
684 |
+
}
|
685 |
+
}
|
686 |
+
}
|
687 |
+
|
688 |
+
/**
|
689 |
+
* Get Fields settings
|
690 |
+
*
|
691 |
+
* @param array $settings_ The settings array
|
692 |
+
* @param array $dargs The settings array of Fields
|
693 |
+
*/
|
694 |
+
static function view_get_display_settings( $settings_, &$dargs ) {
|
695 |
+
|
696 |
+
$view_type = $dargs['view-type'];
|
697 |
+
|
698 |
+
/**
|
699 |
+
* Layout format
|
700 |
+
*/
|
701 |
+
$dargs['layout-format'] = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'layout-format', $settings_ );
|
702 |
+
|
703 |
+
/**
|
704 |
+
* Columns count & Rows count
|
705 |
+
*/
|
706 |
+
$dargs['number-columns'] = PT_CV_Functions::setting_value( PT_CV_PREFIX . $view_type . '-' . 'number-columns', $settings_, 1 );
|
707 |
+
$dargs['number-rows'] = PT_CV_Functions::setting_value( PT_CV_PREFIX . $view_type . '-' . 'number-rows', $settings_, 1 );
|
708 |
+
|
709 |
+
/**
|
710 |
+
* Fields settings
|
711 |
+
*/
|
712 |
+
$cfields_settings = PT_CV_Functions::settings_values_by_prefix( PT_CV_PREFIX . 'show-field-', $settings_ );
|
713 |
+
$cfields = (array) array_keys( (array) $cfields_settings );
|
714 |
+
foreach ( $cfields as $field ) {
|
715 |
+
// If show this field
|
716 |
+
if ( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'show-field-' . $field, $settings_ ) ) {
|
717 |
+
// Add this field to display fields list
|
718 |
+
$dargs['fields'][] = $field;
|
719 |
+
|
720 |
+
// Get field settings
|
721 |
+
switch ( $field ) {
|
722 |
+
|
723 |
+
// Get thumbnail settings
|
724 |
+
case 'thumbnail':
|
725 |
+
|
726 |
+
$field_setting = array();
|
727 |
+
|
728 |
+
$fields = array( 'position', 'size', 'style' );
|
729 |
+
$prefix = PT_CV_PREFIX . 'field-thumbnail-';
|
730 |
+
PT_CV_Functions::settings_values( $fields, $field_setting, $settings_, $prefix );
|
731 |
+
|
732 |
+
$dargs['field-settings'][$field] = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_setting_values', $field_setting, $settings_, $prefix );
|
733 |
+
|
734 |
+
break;
|
735 |
+
|
736 |
+
// Get meta fields settings
|
737 |
+
case 'meta-fields':
|
738 |
+
|
739 |
+
$field_setting = array();
|
740 |
+
|
741 |
+
$prefix = PT_CV_PREFIX . 'meta-fields-';
|
742 |
+
$meta_fields_settings = PT_CV_Functions::settings_values_by_prefix( PT_CV_PREFIX . 'meta-fields-', $settings_ );
|
743 |
+
$fields = (array) array_keys( (array) $meta_fields_settings );
|
744 |
+
|
745 |
+
PT_CV_Functions::settings_values( $fields, $field_setting, $settings_, $prefix );
|
746 |
+
|
747 |
+
$dargs['field-settings'][$field] = apply_filters( PT_CV_PREFIX_ . 'field_meta_fields_setting_values', $field_setting, $settings_, $prefix );
|
748 |
+
|
749 |
+
break;
|
750 |
+
|
751 |
+
// Get content settings
|
752 |
+
case 'content':
|
753 |
+
|
754 |
+
$field_setting = array();
|
755 |
+
|
756 |
+
$prefix = PT_CV_PREFIX . 'field-content-';
|
757 |
+
$fields = PT_CV_Functions::settings_keys( 'field-content-', PT_CV_Settings::field_settings() );
|
758 |
+
PT_CV_Functions::settings_values( $fields, $field_setting, $settings_, $prefix );
|
759 |
+
|
760 |
+
if ( $field_setting['show'] == 'excerpt' ) {
|
761 |
+
$field_setting = array_merge( $field_setting, PT_CV_Functions::settings_values_by_prefix( PT_CV_PREFIX . 'field-excerpt-', $settings_ ) );
|
762 |
+
}
|
763 |
+
|
764 |
+
$dargs['field-settings'][$field] = apply_filters( PT_CV_PREFIX_ . 'field_content_setting_values', $field_setting, $settings_, $prefix );
|
765 |
+
|
766 |
+
break;
|
767 |
+
|
768 |
+
default:
|
769 |
+
break;
|
770 |
+
}
|
771 |
+
}
|
772 |
+
}
|
773 |
+
}
|
774 |
+
|
775 |
+
/**
|
776 |
+
* Get Pagination settings
|
777 |
+
*
|
778 |
+
* @param array $settings_ The settings array
|
779 |
+
* @param array $dargs The settings array of Fields
|
780 |
+
* @param array $args The parameters array
|
781 |
+
* @param array $pargs The pagination settings array
|
782 |
+
*/
|
783 |
+
static function view_get_pagination_settings( $settings_, &$dargs, &$args, $pargs ) {
|
784 |
+
|
785 |
+
// Get Limit value
|
786 |
+
$limit = (int) PT_CV_Functions::setting_value( PT_CV_PREFIX . 'limit', $settings_ );
|
787 |
+
$args['limit'] = $args['posts_per_page'] = empty( $limit ) ? - 1 : $limit;
|
788 |
+
|
789 |
+
// Get pagination enable/disable
|
790 |
+
$pagination = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'enable-pagination', $settings_ );
|
791 |
+
if ( $pagination ) {
|
792 |
+
$field_setting = array();
|
793 |
+
|
794 |
+
$prefix = PT_CV_PREFIX . 'pagination-';
|
795 |
+
$fields = PT_CV_Functions::settings_keys( 'pagination-', PT_CV_Settings::settings_pagination() );
|
796 |
+
PT_CV_Functions::settings_values( $fields, $field_setting, $settings_, $prefix );
|
797 |
+
|
798 |
+
$dargs['pagination-settings'] = apply_filters( PT_CV_PREFIX_ . 'pagination_settings', $field_setting );
|
799 |
+
|
800 |
+
// If Items per page is set, get its value
|
801 |
+
$posts_per_page = isset( $dargs['pagination-settings']['items-per-page'] ) ? (int) $dargs['pagination-settings']['items-per-page'] : $limit;
|
802 |
+
|
803 |
+
if ( $limit != - 1 && $posts_per_page > $limit ) {
|
804 |
+
$posts_per_page = $limit;
|
805 |
+
}
|
806 |
+
|
807 |
+
// Set 'posts_per_page' parameter
|
808 |
+
$args['posts_per_page'] = $posts_per_page;
|
809 |
+
|
810 |
+
// Get offset
|
811 |
+
if ( isset( $pargs['page'] ) ) {
|
812 |
+
$offset = $posts_per_page * ( (int) $pargs['page'] - 1 );
|
813 |
+
|
814 |
+
// Reaching out of limit
|
815 |
+
if ( $offset > $limit ) {
|
816 |
+
return '';
|
817 |
+
}
|
818 |
+
|
819 |
+
// Set 'offset' parameter
|
820 |
+
$args['offset'] = $offset;
|
821 |
+
}
|
822 |
+
}
|
823 |
+
}
|
824 |
+
|
825 |
+
/**
|
826 |
+
* Get Other settings
|
827 |
+
*
|
828 |
+
* @param array $settings_ The settings array
|
829 |
+
* @param array $dargs The settings array of Fields
|
830 |
+
*/
|
831 |
+
static function view_get_other_settings( $settings_, &$dargs ) {
|
832 |
+
$field_setting = array();
|
833 |
+
|
834 |
+
$prefix = PT_CV_PREFIX . 'other-';
|
835 |
+
$fields = PT_CV_Functions::settings_keys( 'other-', PT_CV_Settings::settings_other() );
|
836 |
+
PT_CV_Functions::settings_values( $fields, $field_setting, $settings_, $prefix );
|
837 |
+
|
838 |
+
$dargs['other-settings'] = apply_filters( PT_CV_PREFIX_ . 'other_settings', $field_setting, $settings_ );
|
839 |
+
}
|
840 |
+
|
841 |
+
/**
|
842 |
+
* Process data when submit form add/edit view
|
843 |
+
*
|
844 |
+
* @return void
|
845 |
+
*/
|
846 |
+
static function view_submit() {
|
847 |
+
if ( empty( $_POST ) ) {
|
848 |
+
return;
|
849 |
+
}
|
850 |
+
|
851 |
+
PT_CV_Functions::_nonce_check( 'form_nonce', 'view_submit' );
|
852 |
+
|
853 |
+
/**
|
854 |
+
* INSERT VIEW
|
855 |
+
*/
|
856 |
+
// View title
|
857 |
+
$title = esc_sql( $_POST[PT_CV_PREFIX . 'view-title'] );
|
858 |
+
|
859 |
+
// Current post id ( 0 if new view )
|
860 |
+
$cur_post_id = esc_sql( $_POST[PT_CV_PREFIX . 'post-id'] );
|
861 |
+
|
862 |
+
// Insert/update post
|
863 |
+
$post_id = PT_CV_Functions::post_insert( array( 'ID' => $cur_post_id, 'title' => $title ) );
|
864 |
+
|
865 |
+
/**
|
866 |
+
* ADD/UPDATE CUSTOM FIELDS
|
867 |
+
*/
|
868 |
+
// Get current view id, = 0 if it is new view
|
869 |
+
$cur_view_id = esc_sql( $_POST[PT_CV_PREFIX . 'view-id'] );
|
870 |
+
$view_id = empty( $cur_view_id ) ? PT_CV_Functions::string_random() : $cur_view_id;
|
871 |
+
update_post_meta( $post_id, PT_CV_META_ID, $view_id );
|
872 |
+
update_post_meta( $post_id, PT_CV_META_SETTINGS, base64_encode( serialize( $_POST ) ) );
|
873 |
+
|
874 |
+
/**
|
875 |
+
* redirect to edit page
|
876 |
+
*/
|
877 |
+
$edit_link = PT_CV_Functions::view_link( $view_id );
|
878 |
+
wp_redirect( $edit_link );
|
879 |
+
exit;
|
880 |
+
}
|
881 |
+
|
882 |
+
/**
|
883 |
+
* Add shortcode
|
884 |
+
*
|
885 |
+
* @param array $atts Array of setting parameters for shortcode
|
886 |
+
* @param string $content Content of shortcode
|
887 |
+
*/
|
888 |
+
static function view_output( $atts, $content = '' ) {
|
889 |
+
$atts = shortcode_atts(
|
890 |
+
array(
|
891 |
+
'id' => 0,
|
892 |
+
),
|
893 |
+
$atts
|
894 |
+
);
|
895 |
+
|
896 |
+
// View meta id
|
897 |
+
$id = esc_sql( $atts['id'] );
|
898 |
+
|
899 |
+
// Get View settings
|
900 |
+
$settings = PT_CV_Functions::view_get_settings( $id );
|
901 |
+
|
902 |
+
// Show View output
|
903 |
+
return balanceTags( PT_CV_Functions::view_process_settings( $id, $settings ) );
|
904 |
+
}
|
905 |
+
|
906 |
+
/**
|
907 |
+
* Generate link to View page: Add view/ Edit view
|
908 |
+
*
|
909 |
+
* @param string $view_id The view id
|
910 |
+
*
|
911 |
+
* @return string
|
912 |
+
*/
|
913 |
+
public static function view_link( $view_id ) {
|
914 |
+
|
915 |
+
$edit_link = admin_url( 'admin.php?page=' . PT_CV_DOMAIN . '-add' );
|
916 |
+
if ( ! empty( $view_id ) ) {
|
917 |
+
$query_args = array( 'id' => $view_id );
|
918 |
+
$edit_link = add_query_arg( $query_args, $edit_link );
|
919 |
+
}
|
920 |
+
|
921 |
+
return $edit_link;
|
922 |
+
}
|
923 |
+
|
924 |
+
/**
|
925 |
+
* Callback function for ajax Preview action 'preview_request'
|
926 |
+
*/
|
927 |
+
static function ajax_callback_preview_request() {
|
928 |
+
|
929 |
+
// Validate request
|
930 |
+
check_ajax_referer( PT_CV_PREFIX_ . 'ajax_nonce', 'ajax_nonce' );
|
931 |
+
|
932 |
+
do_action( PT_CV_PREFIX_ . 'preview_header' );
|
933 |
+
|
934 |
+
// Request handle
|
935 |
+
$settings = array();
|
936 |
+
parse_str( $_POST['data'], $settings );
|
937 |
+
|
938 |
+
// Store settings
|
939 |
+
session_start();
|
940 |
+
$_SESSION[PT_CV_PREFIX . 'settings'] = $settings;
|
941 |
+
|
942 |
+
// Show View output
|
943 |
+
echo balanceTags( PT_CV_Functions::view_process_settings( null, $settings ) );
|
944 |
+
|
945 |
+
do_action( PT_CV_PREFIX_ . 'preview_footer' );
|
946 |
+
// Must exit
|
947 |
+
die;
|
948 |
+
}
|
949 |
+
|
950 |
+
/**
|
951 |
+
* Callback function for ajax Pagination action 'pagination_request'
|
952 |
+
*/
|
953 |
+
static function ajax_callback_pagination_request() {
|
954 |
+
|
955 |
+
// Validate request
|
956 |
+
check_ajax_referer( PT_CV_PREFIX_ . 'ajax_nonce', 'ajax_nonce' );
|
957 |
+
|
958 |
+
// View meta id
|
959 |
+
$id = esc_sql( $_POST['id'] );
|
960 |
+
|
961 |
+
if ( empty( $id ) ) {
|
962 |
+
// Get saved $settings
|
963 |
+
session_start();
|
964 |
+
if ( isset( $_SESSION[PT_CV_PREFIX . 'settings'] ) ) {
|
965 |
+
$settings = $_SESSION[PT_CV_PREFIX . 'settings'];
|
966 |
+
} else {
|
967 |
+
$settings = '';
|
968 |
+
}
|
969 |
+
} else {
|
970 |
+
// Get View settings
|
971 |
+
$settings = PT_CV_Functions::view_get_settings( $id );
|
972 |
+
}
|
973 |
+
// Pagination settings
|
974 |
+
$pargs = array( 'page' => (int) esc_sql( $_POST['page'] ) );
|
975 |
+
|
976 |
+
// Show View output
|
977 |
+
echo balanceTags( PT_CV_Functions::view_process_settings( $id, $settings, $pargs ) );
|
978 |
+
|
979 |
+
// Must exit
|
980 |
+
die;
|
981 |
+
}
|
982 |
+
}
|
983 |
+
|
984 |
+
}
|
includes/hooks.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Custom filters/actions
|
5 |
+
*
|
6 |
+
* @package PT_Content_Views
|
7 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @link http://example.com
|
10 |
+
* @copyright 2014 Palace Of Themes
|
11 |
+
*/
|
12 |
+
if ( ! class_exists( 'PT_CV_Hooks' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @name PT_CV_Hooks
|
16 |
+
*/
|
17 |
+
class PT_CV_Hooks {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Add custom filters/actions
|
21 |
+
*/
|
22 |
+
static function init() {
|
23 |
+
// Filter Output
|
24 |
+
add_filter( PT_CV_PREFIX_ . 'validate_settings', array( __CLASS__, 'filter_validate_settings' ), 10, 3 );
|
25 |
+
|
26 |
+
// Do action
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Validate settings filter
|
31 |
+
*
|
32 |
+
* @param string $error The error message
|
33 |
+
* @param array $dargs The Display parameters array
|
34 |
+
* @param array $args The Query parameters array
|
35 |
+
*/
|
36 |
+
public static function filter_validate_settings( $errors, $dargs, $args ) {
|
37 |
+
|
38 |
+
// echo "<pre>";
|
39 |
+
// var_dump( 'query args', $args );
|
40 |
+
// echo "</pre>";
|
41 |
+
////
|
42 |
+
// echo "<pre>";
|
43 |
+
// var_dump( 'display args', $dargs );
|
44 |
+
// echo "</pre>";
|
45 |
+
|
46 |
+
// Prefix string for error message
|
47 |
+
$messages = array(
|
48 |
+
'field' => array(
|
49 |
+
'select' => __( 'Please select an option in : ', PT_CV_DOMAIN ),
|
50 |
+
'text' => __( 'Please set value in : ', PT_CV_DOMAIN ),
|
51 |
+
),
|
52 |
+
'tab' => array(
|
53 |
+
'filter' => __( 'Filter Settings', PT_CV_DOMAIN ),
|
54 |
+
'display' => __( 'Display Settings', PT_CV_DOMAIN ),
|
55 |
+
),
|
56 |
+
);
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Validate Query parameters
|
60 |
+
*/
|
61 |
+
|
62 |
+
// Post type
|
63 |
+
if ( empty( $args['post_type'] ) ) {
|
64 |
+
$errors[] = $messages['field']['select'] . $messages['tab']['filter'] . ' > ' . __( 'Content type', PT_CV_DOMAIN );
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Validate common Display parameters
|
69 |
+
*/
|
70 |
+
|
71 |
+
// View type
|
72 |
+
if ( empty( $dargs['view-type'] ) ) {
|
73 |
+
$errors[] = $messages['field']['select'] . $messages['tab']['display'] . ' > ' . __( 'View type', PT_CV_DOMAIN );
|
74 |
+
}
|
75 |
+
|
76 |
+
// Layout format
|
77 |
+
if ( empty( $dargs['layout-format'] ) ) {
|
78 |
+
$errors[] = $messages['field']['select'] . $messages['tab']['display'] . ' > ' . __( 'Layout format of an output item', PT_CV_DOMAIN );
|
79 |
+
}
|
80 |
+
|
81 |
+
// Field settings
|
82 |
+
if ( ! isset( $dargs['fields'] ) ) {
|
83 |
+
$errors[] = $messages['field']['select'] . $messages['tab']['display'] . ' > ' . __( 'Fields settings', PT_CV_DOMAIN ) . ' > ' . __( 'Fields display', PT_CV_DOMAIN );
|
84 |
+
}
|
85 |
+
|
86 |
+
// Excerpt length
|
87 |
+
$fargs = isset( $dargs['field-settings'] ) ? $dargs['field-settings'] : array();
|
88 |
+
if ( isset( $fargs['content'] ) && $fargs['content']['show'] === 'excerpt' ) {
|
89 |
+
if ( empty( $fargs['content']['length'] ) ) {
|
90 |
+
$errors[] = $messages['field']['text'] . $messages['tab']['display'] . ' > ' . __( 'Fields settings', PT_CV_DOMAIN ) . ' > ' . __( 'Content settings', PT_CV_DOMAIN ) . __( 'Excerpt length', PT_CV_DOMAIN );
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
// Item per page
|
95 |
+
if ( isset( $dargs['pagination-settings'] ) ) {
|
96 |
+
if ( empty( $dargs['pagination-settings']['items-per-page'] ) ) {
|
97 |
+
$errors[] = $messages['field']['text'] . $messages['tab']['display'] . ' > ' . __( 'Pagination settings', PT_CV_DOMAIN ) . ' > ' . __( 'Items per page', PT_CV_DOMAIN );
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Validate Display parameters of view types
|
103 |
+
*/
|
104 |
+
if ( ! empty( $dargs['view-type'] ) ) {
|
105 |
+
switch ( $dargs['view-type'] ) {
|
106 |
+
case 'grid':
|
107 |
+
if ( empty( $dargs['number-columns'] ) ) {
|
108 |
+
$errors[] = $messages['field']['text'] . $messages['tab']['display'] . ' > ' . __( 'View type settings', PT_CV_DOMAIN ) . ' > ' . __( 'Items per row', PT_CV_DOMAIN );
|
109 |
+
}
|
110 |
+
break;
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
return array_filter( $errors );
|
115 |
+
}
|
116 |
+
|
117 |
+
}
|
118 |
+
|
119 |
+
}
|
includes/html-viewtype.php
ADDED
@@ -0,0 +1,272 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* HTML output for specific View types
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! class_exists( 'PT_CV_Html_ViewType' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @name PT_CV_Html_ViewType
|
16 |
+
* @todo List of functions relates to View type output
|
17 |
+
*/
|
18 |
+
class PT_CV_Html_ViewType {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Wrap content of Grid type
|
22 |
+
*
|
23 |
+
* @param array $content_items The array of Raw HTML output (is not wrapped) of each item
|
24 |
+
* @param array $dargs The array of Display settings
|
25 |
+
* @param array $content The output array
|
26 |
+
*
|
27 |
+
* @return array Array of rows, each row contains columns
|
28 |
+
*/
|
29 |
+
static function grid_wrapper( $content_items, $dargs, &$content ) {
|
30 |
+
|
31 |
+
// -- Get column span
|
32 |
+
$columns = ( (int) $dargs['number-columns'] < count( $content_items ) ) ? (int) $dargs['number-columns'] : count( $content_items );
|
33 |
+
|
34 |
+
if ( ! $columns ) {
|
35 |
+
$columns = 1;
|
36 |
+
}
|
37 |
+
|
38 |
+
$span_width_last = $span_width = (int) ( 12 / $columns );
|
39 |
+
|
40 |
+
// Get span for the last column on row
|
41 |
+
if ( 12 % $columns ) {
|
42 |
+
$span_width_last = $span_width + ( 12 % $columns );
|
43 |
+
}
|
44 |
+
|
45 |
+
// Get span class
|
46 |
+
$span_class = apply_filters( PT_CV_PREFIX_ . 'span_class', 'col-md-' );
|
47 |
+
|
48 |
+
// -- Row output
|
49 |
+
|
50 |
+
// Get wrapper class of a row
|
51 |
+
$row_classes = apply_filters( PT_CV_PREFIX_ . 'row_class', array( 'row', PT_CV_PREFIX . 'row' ) );
|
52 |
+
$row_class = implode( ' ', $row_classes );
|
53 |
+
|
54 |
+
// Split items to rows
|
55 |
+
$columns_item = array_chunk( $content_items, $columns );
|
56 |
+
|
57 |
+
// Get HTML of each row
|
58 |
+
foreach ( $columns_item as $items_per_row ) {
|
59 |
+
$row_html = array();
|
60 |
+
|
61 |
+
foreach ( $items_per_row as $idx => $content_item ) {
|
62 |
+
$_span_width = ( $idx == count( $items_per_row ) - 1 ) ? $span_width_last : $span_width;
|
63 |
+
|
64 |
+
// Wrap content of item
|
65 |
+
$row_html[] = PT_CV_Html::content_item_wrap( $content_item, $span_class . $_span_width, $dargs );
|
66 |
+
}
|
67 |
+
|
68 |
+
$content[] = sprintf( '<div class="%1$s">%2$s</div>', esc_attr( $row_class ), implode( "\n", $row_html ) );
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Wrap content of Collapsible List type
|
74 |
+
*
|
75 |
+
* @param array $content_items The array of Raw HTML output (is not wrapped) of each item
|
76 |
+
* @param array $dargs The array of Display settings
|
77 |
+
* @param array $content The output array
|
78 |
+
*
|
79 |
+
* @return string Collapsible list, wrapped in a "panel-group" div
|
80 |
+
*/
|
81 |
+
static function collapsible_wrapper( $content_items, $dargs, &$content ) {
|
82 |
+
|
83 |
+
// Generate random id for the wrapper of Collapsible list
|
84 |
+
$random_id = PT_CV_Functions::string_random();
|
85 |
+
|
86 |
+
$collapsible_list = array();
|
87 |
+
foreach ( $content_items as $idx => $content_item ) {
|
88 |
+
// Replace class in body of collapsible item, to show one (now is the first item)
|
89 |
+
$class = ( $idx == 0 ) ? 'in' : '';
|
90 |
+
$content_item = str_replace( PT_CV_PREFIX_UPPER . 'CLASS', $class, $content_item );
|
91 |
+
|
92 |
+
// Replace id in {data-parent="#ID"} of each item by generated id
|
93 |
+
$collapsible_list[] = str_replace( PT_CV_PREFIX_UPPER . 'ID', $random_id, $content_item );
|
94 |
+
}
|
95 |
+
|
96 |
+
// Data attribute
|
97 |
+
$open_multiple = ( isset( $dargs['view-type-settings']['open-multiple'] ) && $dargs['view-type-settings']['open-multiple'] == 'yes' ) ? 'data-multiple-open="yes"' : '';
|
98 |
+
|
99 |
+
// Collapsible wrapper class
|
100 |
+
$wrapper_class = apply_filters( PT_CV_PREFIX_ . 'wrapper_collapsible_class', 'panel-group' );
|
101 |
+
|
102 |
+
$output = sprintf( '<div class="%s" id="%s" %s>%s</div>', esc_attr( $wrapper_class ), esc_attr( $random_id ), $open_multiple, balanceTags( implode( "\n", $collapsible_list ) ) );
|
103 |
+
|
104 |
+
$content[] = $output;
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Wrap content of Scrollable list
|
109 |
+
*
|
110 |
+
* @param array $content_items The array of Raw HTML output (is not wrapped) of each item
|
111 |
+
* @param array $dargs The array of Display settings
|
112 |
+
* @param array $content The output array
|
113 |
+
*
|
114 |
+
* @return array Array of rows, each row contains columns
|
115 |
+
*/
|
116 |
+
static function scrollable_wrapper( $content_items, $dargs, &$content ) {
|
117 |
+
|
118 |
+
// ID for the wrapper of scrollable list
|
119 |
+
$wrapper_id = PT_CV_Functions::string_random();
|
120 |
+
|
121 |
+
// Store all output of Scrollale list (indicators, content, controls)
|
122 |
+
$scrollable_html = array();
|
123 |
+
|
124 |
+
$scrollable_content_data = self::scrollable_content( $content_items, $dargs );
|
125 |
+
$count_slides = $scrollable_content_data['count_slides'];
|
126 |
+
$scrollable_content = $scrollable_content_data['scrollable_content'];
|
127 |
+
|
128 |
+
// Js code
|
129 |
+
$interval = apply_filters( PT_CV_PREFIX_ . 'scrollable_interval', 'false', $dargs );
|
130 |
+
$js = "$('#$wrapper_id').carousel({ interval : $interval })";
|
131 |
+
|
132 |
+
$scrollable_html[] = PT_CV_Html::inline_script( $js );
|
133 |
+
|
134 |
+
// Indicator html
|
135 |
+
$show_indicator = isset( $dargs['view-type-settings']['indicator'] ) ? $dargs['view-type-settings']['indicator'] : 'yes';
|
136 |
+
$scrollable_html[] = self::scrollable_indicator( ( $show_indicator == 'yes' ) ? 1 : 0, $wrapper_id, $count_slides );
|
137 |
+
|
138 |
+
// Content html
|
139 |
+
$scrollable_html[] = $scrollable_content;
|
140 |
+
|
141 |
+
// Control html
|
142 |
+
$show_navigation = isset( $dargs['view-type-settings']['navigation'] ) ? $dargs['view-type-settings']['navigation'] : 'yes';
|
143 |
+
$scrollable_html[] = self::scrollable_control( ( $show_navigation == 'yes' ) ? 1 : 0, $wrapper_id );
|
144 |
+
|
145 |
+
// Get wrapper class scrollable
|
146 |
+
$scrollable_class = apply_filters( PT_CV_PREFIX_ . 'scrollable_class', 'carousel slide' );
|
147 |
+
$content[] = sprintf( '<div id="%s" class="%s" data-ride="carousel">%s</div>', esc_attr( $wrapper_id ), esc_attr( $scrollable_class ), implode( "\n", $scrollable_html ) );
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* HTML output of item in Scrollable List
|
152 |
+
*
|
153 |
+
* @param array $content_items The array of Raw HTML output (is not wrapped) of each item
|
154 |
+
* @param array $dargs The array of Display settings
|
155 |
+
*
|
156 |
+
* @return array
|
157 |
+
*/
|
158 |
+
static function scrollable_content( $content_items, $dargs ) {
|
159 |
+
// Store content of a Scrollable list
|
160 |
+
$scrollable_content = array();
|
161 |
+
|
162 |
+
// -- Get column span
|
163 |
+
$columns = ( (int) $dargs['number-columns'] < count( $content_items ) ) ? (int) $dargs['number-columns'] : count( $content_items );
|
164 |
+
$rows = ( $dargs['number-rows'] ) ? (int) $dargs['number-rows'] : 1;
|
165 |
+
|
166 |
+
$span_width_last = $span_width = (int) ( 12 / $columns );
|
167 |
+
|
168 |
+
// Get span for the last column on row
|
169 |
+
if ( 12 % $columns ) {
|
170 |
+
$span_width_last = $span_width + ( 12 % $columns );
|
171 |
+
}
|
172 |
+
|
173 |
+
// Get span class
|
174 |
+
$span_class = apply_filters( PT_CV_PREFIX_ . 'span_class', 'col-md-' );
|
175 |
+
|
176 |
+
// -- Row output
|
177 |
+
|
178 |
+
// Get wrapper class of a scrollable slide
|
179 |
+
$slide_class = apply_filters( PT_CV_PREFIX_ . 'scrollable_slide_class', 'item' );
|
180 |
+
|
181 |
+
// Get wrapper class of a row
|
182 |
+
$row_classes = apply_filters( PT_CV_PREFIX_ . 'row_class', array( 'row', PT_CV_PREFIX . 'row' ) );
|
183 |
+
$row_class = implode( ' ', array_filter( $row_classes ) );
|
184 |
+
|
185 |
+
// Split items to slide
|
186 |
+
$slides_item = array_chunk( $content_items, $columns * $rows );
|
187 |
+
|
188 |
+
foreach ( $slides_item as $s_idx => $slide ) {
|
189 |
+
// Store content of a slide
|
190 |
+
$slide_html = array();
|
191 |
+
|
192 |
+
// Split items to rows
|
193 |
+
$columns_item = array_chunk( $slide, $columns );
|
194 |
+
|
195 |
+
// Get HTML of each row
|
196 |
+
foreach ( $columns_item as $items_per_row ) {
|
197 |
+
$row_html = array();
|
198 |
+
|
199 |
+
foreach ( $items_per_row as $idx => $content_item ) {
|
200 |
+
$_span_width = ( $idx == count( $items_per_row ) - 1 ) ? $span_width_last : $span_width;
|
201 |
+
|
202 |
+
// Wrap content of item
|
203 |
+
$row_html[] = PT_CV_Html::content_item_wrap( $content_item, $span_class . $_span_width );
|
204 |
+
}
|
205 |
+
|
206 |
+
$slide_html[] = sprintf( '<div class="%1$s">%2$s</div>', esc_attr( $row_class ), implode( "\n", $row_html ) );
|
207 |
+
}
|
208 |
+
|
209 |
+
// Show first slide
|
210 |
+
$this_class = $slide_class . ( ( $s_idx == 0 ) ? ' active' : '' );
|
211 |
+
$scrollable_content[] = sprintf( '<div class="%1$s">%2$s</div>', esc_attr( $this_class ), implode( "\n", $slide_html ) );
|
212 |
+
}
|
213 |
+
|
214 |
+
// Get class of wrapper of content of scrollable list
|
215 |
+
$content_class = apply_filters( PT_CV_PREFIX_ . 'scrollable_content_class', 'carousel-inner' );
|
216 |
+
$content = sprintf( '<div class="%s">%s</div>', esc_attr( $content_class ), implode( "\n", $scrollable_content ) );
|
217 |
+
|
218 |
+
return array(
|
219 |
+
'scrollable_content' => $content,
|
220 |
+
'count_slides' => count( $slides_item ),
|
221 |
+
);
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* HTML output of Indicators in Scrollable
|
226 |
+
*
|
227 |
+
* @param bool $show Whether or not to show this element
|
228 |
+
* @param string $wrapper_id The ID of wrapper of scrollable list
|
229 |
+
* @param int $count_slides The amount of items
|
230 |
+
*/
|
231 |
+
static function scrollable_indicator( $show, $wrapper_id, $count_slides ) {
|
232 |
+
if ( ! $show ) {
|
233 |
+
return '';
|
234 |
+
}
|
235 |
+
|
236 |
+
$li = array();
|
237 |
+
for ( $index = 0; $index < $count_slides; $index ++ ) {
|
238 |
+
$class = ( $index == 0 ) ? 'active' : '';
|
239 |
+
$li[] = sprintf( '<li data-target="#%s" data-slide-to="%s" class="%s"></li>', esc_attr( $wrapper_id ), esc_attr( $index ), $class );
|
240 |
+
}
|
241 |
+
|
242 |
+
$output = '<ol class="carousel-indicators">' . implode( "\n", $li ) . '</ol>';
|
243 |
+
|
244 |
+
return $output;
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* HTML output of Controls in Scrollable
|
249 |
+
*
|
250 |
+
* @param bool $show Whether or not to show this element
|
251 |
+
* @param string $wrapper_id The ID of wrapper of scrollable list
|
252 |
+
*/
|
253 |
+
static function scrollable_control( $show, $wrapper_id ) {
|
254 |
+
if ( ! $show ) {
|
255 |
+
return '';
|
256 |
+
}
|
257 |
+
|
258 |
+
$output = sprintf(
|
259 |
+
'<a class="left carousel-control" href="#%1$s" data-slide="prev">
|
260 |
+
<span class="glyphicon glyphicon-chevron-left"></span>
|
261 |
+
</a>
|
262 |
+
<a class="right carousel-control" href="#%1$s" data-slide="next">
|
263 |
+
<span class="glyphicon glyphicon-chevron-right"></span>
|
264 |
+
</a>',
|
265 |
+
esc_attr( $wrapper_id )
|
266 |
+
);
|
267 |
+
|
268 |
+
return $output;
|
269 |
+
}
|
270 |
+
}
|
271 |
+
|
272 |
+
}
|
includes/html.php
ADDED
@@ -0,0 +1,828 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* HTML output, class, id generating
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! class_exists( 'PT_CV_Html' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @name PT_CV_Html
|
16 |
+
* @todo related HTML functions: Define HTML layout, Set class name...
|
17 |
+
*/
|
18 |
+
class PT_CV_Html {
|
19 |
+
|
20 |
+
// Store directory of selected view_types
|
21 |
+
static $view_type_dir = array();
|
22 |
+
// Store all selected styles
|
23 |
+
static $style = array();
|
24 |
+
|
25 |
+
/**
|
26 |
+
* return class for Panel (Group of) group of params
|
27 |
+
*
|
28 |
+
* @return string
|
29 |
+
*/
|
30 |
+
static function html_panel_group_class() {
|
31 |
+
return 'panel-group';
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Return ID for Panel (Group of) group of params
|
36 |
+
*
|
37 |
+
* @param string $id Unique id of element
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
static function html_panel_group_id( $id ) {
|
42 |
+
return 'panel-group-' . $id;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Return class for no animation elements
|
47 |
+
*
|
48 |
+
* @return string
|
49 |
+
*/
|
50 |
+
static function html_no_animation_class() {
|
51 |
+
return PT_CV_PREFIX . 'no-animation';
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Return class for group of params
|
56 |
+
*
|
57 |
+
* @return string
|
58 |
+
*/
|
59 |
+
static function html_group_class() {
|
60 |
+
return PT_CV_PREFIX . 'group';
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Return ID for group of params
|
65 |
+
*
|
66 |
+
* @param string $id Unique id of element
|
67 |
+
*
|
68 |
+
* @return string
|
69 |
+
*/
|
70 |
+
static function html_group_id( $id ) {
|
71 |
+
return self::html_group_class() . '-' . $id;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Collapse HTML
|
76 |
+
*
|
77 |
+
* @param string $parent_id Id of parent element
|
78 |
+
* @param string $id Unique id of element
|
79 |
+
* @param string $heading Heading text
|
80 |
+
* @param string $content Content
|
81 |
+
* @param bool $show Show/hide the content
|
82 |
+
*/
|
83 |
+
static function html_collapse_one( $parent_id, $id, $heading, $content = '', $show = true ) {
|
84 |
+
$class = $show ? 'in' : '';
|
85 |
+
ob_start();
|
86 |
+
?>
|
87 |
+
<div class="panel panel-primary pt-accordion">
|
88 |
+
<div class="panel-heading">
|
89 |
+
<h4 class="panel-title" title="<?php _e( 'Click to toggle', PT_CV_DOMAIN ); ?>">
|
90 |
+
<a class="pt-accordion-a" data-parent="#<?php echo esc_attr( $parent_id ); ?>" href="#<?php echo esc_attr( $id ); ?>">
|
91 |
+
<?php echo balanceTags( $heading ); ?>
|
92 |
+
</a>
|
93 |
+
</h4>
|
94 |
+
<span class="pull-right clickable"><i class="glyphicon glyphicon-minus"></i></span>
|
95 |
+
</div>
|
96 |
+
<div id="<?php echo esc_attr( $id ); ?>" class="panel-body <?php echo esc_attr( $class ); ?>">
|
97 |
+
<div class="panel-body">
|
98 |
+
<?php echo balanceTags( $content ); ?>
|
99 |
+
</div>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
<?php
|
103 |
+
return ob_get_clean();
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* HTML content of Preview box
|
108 |
+
*/
|
109 |
+
static function html_preview_box() {
|
110 |
+
ob_start();
|
111 |
+
?>
|
112 |
+
<div class="panel panel-default collapse" id="<?php echo esc_attr( PT_CV_PREFIX ); ?>preview-box"></div>
|
113 |
+
<div class="text-center hidden" style="position: absolute; left: 50%; top: 160px;">
|
114 |
+
<?php echo balanceTags( self::html_loading_img() ); ?>
|
115 |
+
</div>
|
116 |
+
<?php
|
117 |
+
return ob_get_clean();
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Show loading image
|
122 |
+
*
|
123 |
+
* @param type $dimension
|
124 |
+
*
|
125 |
+
* @return type
|
126 |
+
*/
|
127 |
+
static function html_loading_img( $dimension = 16, $class = '' ) {
|
128 |
+
$img = sprintf( '<img width="%1$s" height="%1$s" class="%2$s" alt="%3$s" src="%4$s" /><div class="clear %5$s"></div>', esc_attr( $dimension ), esc_attr( $class ), __( 'loading', PT_CV_DOMAIN ), 'data:image/gif;base64,R0lGODlhEAAQAPIAAP///wAAAMLCwkJCQgAAAGJiYoKCgpKSkiH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAAACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wCRHZnFVdmgHu2nFwlWCI3WGc3TSWhUFGxTAUkGCbtgENBMJAEJsxgMLWzpEAACH5BAkKAAAALAAAAAAQABAAAAMyCLrc/jDKSatlQtScKdceCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA==', PT_CV_PREFIX . 'clear-pagination' );
|
129 |
+
|
130 |
+
return apply_filters( PT_CV_PREFIX_ . 'loading_image', $img );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Html output for button
|
135 |
+
*
|
136 |
+
* @param string $style Bootstrap type of button
|
137 |
+
* @param string $text Text of button
|
138 |
+
* @param string $class Class of button
|
139 |
+
* @param string $size Size of button
|
140 |
+
*
|
141 |
+
* @return string
|
142 |
+
*/
|
143 |
+
static function html_button( $style, $text = 'Button', $class = '', $size = '' ) {
|
144 |
+
return sprintf( '<button type="button" class="btn btn-%s %s %s">%s</button>', $style, $class, $size, $text );
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Html output for a link, but style as button
|
149 |
+
*
|
150 |
+
* @param string $link Value for href attribute of link
|
151 |
+
* @param string $style Bootstrap type of button
|
152 |
+
* @param string $text Text of button
|
153 |
+
* @param string $class Class of button
|
154 |
+
* @param string $size Size of button
|
155 |
+
*
|
156 |
+
* @return string
|
157 |
+
*/
|
158 |
+
static function link_button( $link, $style, $text = 'Button', $class = '', $size = '' ) {
|
159 |
+
return sprintf( '<a href="%s" class="btn btn-%s %s %s">%s</a>', $link, $style, $class, $size, $text );
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Get Output HTML of a View type
|
164 |
+
*
|
165 |
+
* @param string $view_type The view type (grid, collapse...)
|
166 |
+
* @param array $dargs The array of Display settings
|
167 |
+
* @param object $post The post object
|
168 |
+
* @param string $style The style of view type (main, style2...)
|
169 |
+
*/
|
170 |
+
static function view_type_output( $view_type, $dargs, $post, $style = 'main' ) {
|
171 |
+
$content = NULL;
|
172 |
+
|
173 |
+
if ( empty( $view_type ) ) {
|
174 |
+
return $content;
|
175 |
+
}
|
176 |
+
|
177 |
+
// Get view type directory
|
178 |
+
$view_type_dir = apply_filters( PT_CV_PREFIX_ . 'view_type_dir', PT_CV_VIEW_TYPE_OUTPUT, $view_type ) . $view_type;
|
179 |
+
|
180 |
+
// Get asset directory
|
181 |
+
$view_type_assets_dir = apply_filters( PT_CV_PREFIX_ . 'view_type_asset', $view_type_dir, $view_type );
|
182 |
+
|
183 |
+
if ( is_dir( $view_type_dir ) ) {
|
184 |
+
// Store view type & asset information
|
185 |
+
self::$view_type_dir[] = $view_type_assets_dir;
|
186 |
+
self::$style[] = $style;
|
187 |
+
|
188 |
+
// Generate HTML output of all content fields
|
189 |
+
$fields_html = array();
|
190 |
+
foreach ( $dargs['fields'] as $field_name ) {
|
191 |
+
// Get settings of fields
|
192 |
+
$fargs = isset( $dargs['field-settings'] ) ? $dargs['field-settings'] : array();
|
193 |
+
|
194 |
+
$fargs['layout-format'] = $dargs['layout-format'];
|
195 |
+
|
196 |
+
// Get HTML output of field
|
197 |
+
$fields_html[$field_name] = self::field_item_html( $field_name, $post, $fargs, $dargs );
|
198 |
+
}
|
199 |
+
|
200 |
+
// Get HTML content of view type, with specific style
|
201 |
+
$file_path = $view_type_dir . '/' . 'html' . '/' . $style . '.' . 'php';
|
202 |
+
|
203 |
+
if ( file_exists( $file_path ) ) {
|
204 |
+
ob_start();
|
205 |
+
// Include, not include_once
|
206 |
+
include $file_path;
|
207 |
+
$content = ob_get_clean();
|
208 |
+
}
|
209 |
+
}
|
210 |
+
|
211 |
+
return $content;
|
212 |
+
}
|
213 |
+
|
214 |
+
/**
|
215 |
+
* Wrap content of a item
|
216 |
+
*
|
217 |
+
* @param array $html_item The HTML output of a item
|
218 |
+
* @param string $class The extra wrapper class of a item, such as col span
|
219 |
+
* @param array $dargs The array of Display settings
|
220 |
+
*
|
221 |
+
* @return string Full HTML output of a item
|
222 |
+
*/
|
223 |
+
static function content_item_wrap( $html_item, $class = '', $dargs = array() ) {
|
224 |
+
if ( empty( $html_item ) ) {
|
225 |
+
return '';
|
226 |
+
}
|
227 |
+
if ( $dargs ) {
|
228 |
+
// If only show Title
|
229 |
+
if ( isset( $dargs['fields'] ) && count( (array) $dargs['fields'] ) == 1 && $dargs['fields'][0] === 'title' ) {
|
230 |
+
$class .= ' ' . PT_CV_PREFIX . 'only-title';
|
231 |
+
}
|
232 |
+
}
|
233 |
+
// Get wrapper class of a item
|
234 |
+
$item_class = apply_filters( PT_CV_PREFIX_ . 'content_item_class', array( $class, PT_CV_PREFIX . 'content-item' ) );
|
235 |
+
|
236 |
+
$result = sprintf( '<div class="%1$s">%2$s</div>', esc_attr( implode( ' ', $item_class ) ), balanceTags( $html_item ) );
|
237 |
+
|
238 |
+
return $result;
|
239 |
+
}
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Wrap content of all items
|
243 |
+
*
|
244 |
+
* @param array $content_items The array of Raw HTML output (is not wrapped) of each item
|
245 |
+
* @param array $dargs The array of Display settings
|
246 |
+
* @param int $current_page The current page
|
247 |
+
* @param int $post_per_page The number of posts per page
|
248 |
+
*
|
249 |
+
* @return string Full HTML output for Content View
|
250 |
+
*/
|
251 |
+
static function content_items_wrap( $content_items, $dargs, $current_page, $post_per_page ) {
|
252 |
+
if ( empty( $content_items ) ) {
|
253 |
+
return '';
|
254 |
+
}
|
255 |
+
|
256 |
+
$content = array();
|
257 |
+
|
258 |
+
$view_type = $dargs['view-type'];
|
259 |
+
|
260 |
+
// Separate items by row, column
|
261 |
+
switch ( $view_type ) {
|
262 |
+
|
263 |
+
// Grid
|
264 |
+
case 'grid':
|
265 |
+
|
266 |
+
PT_CV_Html_ViewType::grid_wrapper( $content_items, $dargs, $content );
|
267 |
+
|
268 |
+
break;
|
269 |
+
|
270 |
+
// Collapsible List
|
271 |
+
case 'collapsible':
|
272 |
+
|
273 |
+
PT_CV_Html_ViewType::collapsible_wrapper( $content_items, $dargs, $content );
|
274 |
+
|
275 |
+
break;
|
276 |
+
|
277 |
+
// Scrollable List
|
278 |
+
case 'scrollable':
|
279 |
+
|
280 |
+
PT_CV_Html_ViewType::scrollable_wrapper( $content_items, $dargs, $content );
|
281 |
+
|
282 |
+
break;
|
283 |
+
|
284 |
+
default :
|
285 |
+
foreach ( $content_items as $content_item ) {
|
286 |
+
// Wrap content of item
|
287 |
+
$content[] = PT_CV_Html::content_item_wrap( $content_item );
|
288 |
+
}
|
289 |
+
|
290 |
+
$content = apply_filters( PT_CV_PREFIX_ . 'content_items_wrap', $content, $content_items, $dargs, $current_page, $post_per_page );
|
291 |
+
|
292 |
+
break;
|
293 |
+
}
|
294 |
+
|
295 |
+
// Join content
|
296 |
+
$content_list = balanceTags( implode( "\n", $content ) );
|
297 |
+
|
298 |
+
// Custom attribute of a page
|
299 |
+
$page_attr_ = apply_filters( PT_CV_PREFIX_ . 'page_attr', '', $view_type, $dargs, $content_items );
|
300 |
+
$page_attr = strip_tags( $page_attr_ );
|
301 |
+
|
302 |
+
// Wrap items in 'page' wrapper
|
303 |
+
$wrap_in_page = apply_filters( PT_CV_PREFIX_ . 'wrap_in_page', true, $dargs );
|
304 |
+
if ( $wrap_in_page ) {
|
305 |
+
// Wrap in page wrapper
|
306 |
+
$html = sprintf( '<div id="%s" class="%s" %s>%s</div>', esc_attr( PT_CV_PREFIX . 'page' . '-' . $current_page ), esc_attr( PT_CV_PREFIX . 'page' ), $page_attr, $content_list );
|
307 |
+
// Remove page attribute value
|
308 |
+
$page_attr = '';
|
309 |
+
} else {
|
310 |
+
$html = $content_list;
|
311 |
+
}
|
312 |
+
|
313 |
+
// If is first page, wrap content in 'view' wrapper
|
314 |
+
if ( $current_page === 1 ) {
|
315 |
+
// Get wrapper class of a view
|
316 |
+
$view_class = apply_filters( PT_CV_PREFIX_ . 'view_class', array( PT_CV_PREFIX . 'view', PT_CV_PREFIX . $view_type ) );
|
317 |
+
|
318 |
+
// ID for the wrapper
|
319 |
+
$view_id = PT_CV_PREFIX . 'view-' . PT_CV_Functions::string_random();
|
320 |
+
|
321 |
+
$output = sprintf( '<div class="%s" id="%s" %s>%s</div>', esc_attr( implode( ' ', array_filter( $view_class ) ) ), esc_attr( $view_id ), $page_attr, $html );
|
322 |
+
|
323 |
+
do_action( PT_CV_PREFIX_ . 'store_view_data', $view_id, $dargs );
|
324 |
+
} else {
|
325 |
+
$output = $html;
|
326 |
+
}
|
327 |
+
|
328 |
+
return $output;
|
329 |
+
}
|
330 |
+
|
331 |
+
/**
|
332 |
+
* HTML output of a field (thumbnail, title, content, meta fields...)
|
333 |
+
*
|
334 |
+
* @param string $field_name The name of field
|
335 |
+
* @param object $post The post object
|
336 |
+
* @param array $fargs The array of Field settings
|
337 |
+
* @param array $dargs The settings array of Fields
|
338 |
+
*
|
339 |
+
* @return string
|
340 |
+
*/
|
341 |
+
static function field_item_html( $field_name, $post, $fargs, $dargs ) {
|
342 |
+
if ( empty( $field_name ) ) {
|
343 |
+
return '';
|
344 |
+
}
|
345 |
+
|
346 |
+
$html = '';
|
347 |
+
|
348 |
+
// Get other settings
|
349 |
+
$oargs = isset( $dargs['other-settings'] ) ? $dargs['other-settings'] : array();
|
350 |
+
|
351 |
+
switch ( $field_name ) {
|
352 |
+
|
353 |
+
// Thumbnail
|
354 |
+
case 'thumbnail':
|
355 |
+
|
356 |
+
if ( empty( $fargs['thumbnail'] ) ) {
|
357 |
+
break;
|
358 |
+
}
|
359 |
+
|
360 |
+
$html = self::_field_thumbnail( $post, $fargs, $dargs );
|
361 |
+
|
362 |
+
break;
|
363 |
+
|
364 |
+
// Title
|
365 |
+
case 'title':
|
366 |
+
|
367 |
+
// Get title class
|
368 |
+
$title_class = apply_filters( PT_CV_PREFIX_ . 'field_title_class', PT_CV_PREFIX . 'title' );
|
369 |
+
|
370 |
+
// Get title tag
|
371 |
+
$tag = apply_filters( PT_CV_PREFIX_ . 'field_title_tag', 'h4' );
|
372 |
+
|
373 |
+
// Get post title
|
374 |
+
$title = get_the_title( $post );
|
375 |
+
if ( empty( $title ) ) {
|
376 |
+
$title = __( '(no title)', PT_CV_DOMAIN );
|
377 |
+
}
|
378 |
+
|
379 |
+
$html = sprintf(
|
380 |
+
'<%1$s class="%2$s">%3$s</%1$s>',
|
381 |
+
$tag, esc_attr( $title_class ), self::_field_href( $oargs, $post, $title )
|
382 |
+
);
|
383 |
+
|
384 |
+
break;
|
385 |
+
|
386 |
+
// Content
|
387 |
+
case 'content':
|
388 |
+
|
389 |
+
if ( empty( $fargs['content'] ) ) {
|
390 |
+
break;
|
391 |
+
}
|
392 |
+
|
393 |
+
// Sets up global post data
|
394 |
+
setup_postdata( $post );
|
395 |
+
|
396 |
+
// Get content class
|
397 |
+
$content_class = apply_filters( PT_CV_PREFIX_ . 'field_content_class', PT_CV_PREFIX . 'content' );
|
398 |
+
|
399 |
+
// Get content tag (div/p/span...)
|
400 |
+
$tag = apply_filters( PT_CV_PREFIX_ . 'field_content_tag', 'div' );
|
401 |
+
|
402 |
+
// Get full content/exceprt
|
403 |
+
$content = '';
|
404 |
+
switch ( $fargs['content']['show'] ) {
|
405 |
+
case 'excerpt':
|
406 |
+
$length = (int) $fargs['content']['length'];
|
407 |
+
$readmore = '<br />' . PT_CV_Html::link_button( get_permalink(), 'success', __( 'Read More' ), PT_CV_PREFIX . 'readmore', 'btn-sm' );
|
408 |
+
$content = wp_trim_words( get_the_content(), $length, ' ...' . apply_filters( PT_CV_PREFIX_ . 'field_content_readmore', $readmore, $fargs['content'], get_permalink() ) );
|
409 |
+
break;
|
410 |
+
|
411 |
+
case 'full':
|
412 |
+
ob_start();
|
413 |
+
the_content();
|
414 |
+
$content = ob_get_clean();
|
415 |
+
|
416 |
+
break;
|
417 |
+
}
|
418 |
+
|
419 |
+
$html = sprintf(
|
420 |
+
'<%1$s class="%2$s">%3$s</%1$s>',
|
421 |
+
$tag, esc_attr( $content_class ), balanceTags( $content )
|
422 |
+
);
|
423 |
+
|
424 |
+
break;
|
425 |
+
|
426 |
+
// Meta fields
|
427 |
+
case 'meta-fields':
|
428 |
+
|
429 |
+
if ( empty( $fargs['meta-fields'] ) ) {
|
430 |
+
break;
|
431 |
+
}
|
432 |
+
|
433 |
+
$html = self::_field_meta( $post, $fargs['meta-fields'], $dargs );
|
434 |
+
|
435 |
+
break;
|
436 |
+
}
|
437 |
+
|
438 |
+
return $html;
|
439 |
+
}
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Output link to item
|
443 |
+
*
|
444 |
+
* @param array $oargs The other settings
|
445 |
+
* @param object $post The post object
|
446 |
+
* @param string $content The HTML of <a> tag
|
447 |
+
*/
|
448 |
+
static function _field_href( $oargs, $post, $content ) {
|
449 |
+
|
450 |
+
// Open in
|
451 |
+
$open_in = isset( $oargs['open-in'] ) ? $oargs['open-in'] : '_blank';
|
452 |
+
|
453 |
+
// Class of href
|
454 |
+
$href_class = apply_filters( PT_CV_PREFIX_ . 'field_href_class', array( $open_in ), $oargs );
|
455 |
+
|
456 |
+
// Custom data
|
457 |
+
$custom_attr = apply_filters( PT_CV_PREFIX_ . 'field_href_attrs', array(), $open_in, $oargs );
|
458 |
+
|
459 |
+
$html = sprintf(
|
460 |
+
'<a href="%s" class="%s" target="%s" %s>%s</a>',
|
461 |
+
get_permalink( $post->ID ), implode( ' ', array_filter( $href_class ) ), $open_in, implode( ' ', array_filter( $custom_attr ) ), balanceTags( $content )
|
462 |
+
);
|
463 |
+
|
464 |
+
return $html;
|
465 |
+
}
|
466 |
+
|
467 |
+
/**
|
468 |
+
* HTML output of thumbnail field
|
469 |
+
*
|
470 |
+
* @param object $post The post object
|
471 |
+
* @param array $fargs The settings of this field
|
472 |
+
* @param array $dargs The settings array
|
473 |
+
*
|
474 |
+
* @return string
|
475 |
+
*/
|
476 |
+
static function _field_thumbnail( $post, $fargs, $dargs ) {
|
477 |
+
|
478 |
+
// Get layout format
|
479 |
+
$layout_format = $fargs['layout-format'];
|
480 |
+
|
481 |
+
// Get thumbnail settings
|
482 |
+
$fargs = $fargs['thumbnail'];
|
483 |
+
|
484 |
+
$html = '';
|
485 |
+
|
486 |
+
// Get post ID
|
487 |
+
$post_id = $post->ID;
|
488 |
+
|
489 |
+
// Custom args for get_the_post_thumbnail function
|
490 |
+
$thumbnail_class = array();
|
491 |
+
$thumbnail_class[] = PT_CV_PREFIX . 'thumbnail';
|
492 |
+
$thumbnail_class[] = isset( $fargs['style'] ) ? $fargs['style'] : '';
|
493 |
+
if ( $layout_format === '2-col' ) {
|
494 |
+
$thumbnail_class[] = isset( $fargs['position'] ) ? 'pull-' . $fargs['position'] : 'pull-left';
|
495 |
+
}
|
496 |
+
$gargs = array(
|
497 |
+
'class' => apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_class', implode( ' ', array_filter( $thumbnail_class ) ) ),
|
498 |
+
);
|
499 |
+
|
500 |
+
// Get thumbnail dimensions
|
501 |
+
$dimensions = PT_CV_Functions::field_thumbnail_dimensions( $fargs );
|
502 |
+
|
503 |
+
// Check if has thumbnail ( has_post_thumbnail doesn't works )
|
504 |
+
$has_thumbnail = get_the_post_thumbnail( $post_id );
|
505 |
+
if ( ! empty( $has_thumbnail ) ) {
|
506 |
+
$thumbnail_size = (array) apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_dimension_output', $dimensions, $fargs );
|
507 |
+
$thumbnail_size = count( $thumbnail_size ) > 1 ? $thumbnail_size : $thumbnail_size[0];
|
508 |
+
$html = get_the_post_thumbnail( $post_id, $thumbnail_size, $gargs );
|
509 |
+
} else {
|
510 |
+
$html = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_not_found', $html, $post, $dimensions, $gargs );
|
511 |
+
}
|
512 |
+
|
513 |
+
// If title is not shown, add link to thumbnail
|
514 |
+
if ( ! in_array( 'title', $dargs['fields'] ) ) {
|
515 |
+
$oargs = isset( $dargs['other-settings'] ) ? $dargs['other-settings'] : array();
|
516 |
+
$html = self::_field_href( $oargs, $post, $html );
|
517 |
+
}
|
518 |
+
|
519 |
+
return $html;
|
520 |
+
}
|
521 |
+
|
522 |
+
/**
|
523 |
+
* HTML output of meta fields group
|
524 |
+
*
|
525 |
+
* @param object $post The post object
|
526 |
+
* @param array $fargs The settings of this field
|
527 |
+
* @param array $dargs The settings array of Fields
|
528 |
+
*
|
529 |
+
* @return string
|
530 |
+
*/
|
531 |
+
static function _field_meta( $post, $fargs, $dargs ) {
|
532 |
+
|
533 |
+
$html = array();
|
534 |
+
|
535 |
+
// Sets up global post data
|
536 |
+
setup_postdata( $post );
|
537 |
+
|
538 |
+
foreach ( $fargs as $meta => $val ) {
|
539 |
+
if ( ! $val ) {
|
540 |
+
continue;
|
541 |
+
}
|
542 |
+
|
543 |
+
switch ( $meta ) {
|
544 |
+
case 'date':
|
545 |
+
// Get date wrapper class
|
546 |
+
$date_class = apply_filters( PT_CV_PREFIX_ . 'field_meta_date_class', 'entry-date' );
|
547 |
+
|
548 |
+
$html['date'] = sprintf( '<span class="%1$s"><time datetime="%2$s">%3$s</time></span>', esc_html( $date_class ), esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) );
|
549 |
+
break;
|
550 |
+
|
551 |
+
case 'taxonomy':
|
552 |
+
|
553 |
+
// Get terms wrapper class
|
554 |
+
$term_class = apply_filters( PT_CV_PREFIX_ . 'field_meta_terms_class', 'terms' );
|
555 |
+
|
556 |
+
$terms = PT_CV_Functions::post_terms( $post );
|
557 |
+
if ( ! empty( $terms ) ) {
|
558 |
+
$html['taxonomy'] = sprintf( '<span class="%s">%s %s</span>', esc_attr( $term_class ), __( 'in', PT_CV_DOMAIN ), balanceTags( $terms ) );
|
559 |
+
}
|
560 |
+
break;
|
561 |
+
|
562 |
+
case 'comment':
|
563 |
+
if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
|
564 |
+
// Get comment wrapper class
|
565 |
+
$comment_class = apply_filters( PT_CV_PREFIX_ . 'field_meta_comment_class', 'comments-link' );
|
566 |
+
|
567 |
+
ob_start();
|
568 |
+
?>
|
569 |
+
<span class="<?php echo esc_attr( $comment_class ); ?>"><?php comments_popup_link( __( 'Leave a comment', PT_CV_DOMAIN ), __( '1 Comment', PT_CV_DOMAIN ), __( '% Comments', PT_CV_DOMAIN ) ); ?></span>
|
570 |
+
<?php
|
571 |
+
$html['comment'] = ob_get_clean();
|
572 |
+
endif;
|
573 |
+
break;
|
574 |
+
|
575 |
+
case 'author':
|
576 |
+
|
577 |
+
// Get author wrapper class
|
578 |
+
$author_class = apply_filters( PT_CV_PREFIX_ . 'field_meta_author_class', 'author' );
|
579 |
+
|
580 |
+
$author_html = sprintf( '<span class="%s">%s <a href="%s" rel="author">%s</a></span>', esc_attr( $author_class ), __( 'by', PT_CV_DOMAIN ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() );
|
581 |
+
$html['author'] = apply_filters( PT_CV_PREFIX_ . 'field_meta_author_html', $author_html, $post, $dargs );
|
582 |
+
break;
|
583 |
+
|
584 |
+
default:
|
585 |
+
break;
|
586 |
+
}
|
587 |
+
}
|
588 |
+
|
589 |
+
// Merge fields, or let them as seperate items in array
|
590 |
+
$merge_fields = apply_filters( PT_CV_PREFIX_ . 'field_meta_merge_fields', true, $dargs );
|
591 |
+
|
592 |
+
if ( $merge_fields ) {
|
593 |
+
$result = PT_CV_Html::_field_meta_wrap( $html );
|
594 |
+
} else {
|
595 |
+
$result = $html;
|
596 |
+
}
|
597 |
+
|
598 |
+
return $result;
|
599 |
+
}
|
600 |
+
|
601 |
+
/**
|
602 |
+
* Wrap meta fields in a wrapper
|
603 |
+
*
|
604 |
+
* @param array $meta_html Array of meta fields to wrapping
|
605 |
+
* @param string $seperator Seperator string when join meta fields
|
606 |
+
*
|
607 |
+
* @return string
|
608 |
+
*/
|
609 |
+
static function _field_meta_wrap( $meta_html, $seperator = NULL ) {
|
610 |
+
|
611 |
+
$seperator = isset( $seperator ) ? $seperator : apply_filters( PT_CV_PREFIX_ . 'field_meta_seperator', ' / ' );
|
612 |
+
|
613 |
+
// Get meta fields class
|
614 |
+
$meta_fields_class = apply_filters( PT_CV_PREFIX_ . 'field_meta_fields_class', PT_CV_PREFIX . 'meta-fields' );
|
615 |
+
|
616 |
+
// Get meta fields tag
|
617 |
+
$tag = apply_filters( PT_CV_PREFIX_ . 'field_meta_fields_tag', 'div' );
|
618 |
+
|
619 |
+
// Define wrapper
|
620 |
+
$wrapper = sprintf(
|
621 |
+
'<%1$s class="%2$s">%3$s</%1$s>',
|
622 |
+
$tag, esc_attr( $meta_fields_class ), '%s'
|
623 |
+
);
|
624 |
+
|
625 |
+
// Join fields
|
626 |
+
$meta_html = implode( $seperator, (array) $meta_html );
|
627 |
+
|
628 |
+
// Wrap
|
629 |
+
$html = sprintf( $wrapper, balanceTags( $meta_html ) );
|
630 |
+
|
631 |
+
return $html;
|
632 |
+
}
|
633 |
+
|
634 |
+
/**
|
635 |
+
* Output pagination
|
636 |
+
*
|
637 |
+
* @param type $max_num_pages The total of pages
|
638 |
+
* @param array $dargs The settings array of Fields
|
639 |
+
* @param string $view_id The current view id
|
640 |
+
*
|
641 |
+
* @return type
|
642 |
+
*/
|
643 |
+
static function pagination_output( $max_num_pages, $dargs, $view_id ) {
|
644 |
+
|
645 |
+
if ( ! $max_num_pages || (int) $max_num_pages === 1 ) {
|
646 |
+
return '';
|
647 |
+
}
|
648 |
+
|
649 |
+
$output = '';
|
650 |
+
|
651 |
+
$style = isset( $dargs['pagination-settings']['style'] ) ? $dargs['pagination-settings']['style'] : 'regular';
|
652 |
+
if ( $style == 'regular' ) {
|
653 |
+
$output = sprintf( '<ul class="%s" data-totalpages="%s" data-id="%s"></ul>', PT_CV_PREFIX . 'pagination', esc_attr( $max_num_pages ), esc_attr( $view_id ) );
|
654 |
+
} else {
|
655 |
+
$output = apply_filters( PT_CV_PREFIX_ . 'btn_more_html', $output, $max_num_pages, $view_id );
|
656 |
+
}
|
657 |
+
|
658 |
+
// Add loading icon
|
659 |
+
$output .= self::html_loading_img( 12, PT_CV_PREFIX . 'spinner' );
|
660 |
+
|
661 |
+
return $output;
|
662 |
+
}
|
663 |
+
|
664 |
+
/**
|
665 |
+
* Get assets content of all selected view types in a page
|
666 |
+
* by merging css files to public/assets/css/public.css, js files to public/assets/js/public.js
|
667 |
+
*/
|
668 |
+
static function assets_of_view_types() {
|
669 |
+
$assets = array( 'css', 'js' );
|
670 |
+
$assets_output = $assets_files = array();
|
671 |
+
|
672 |
+
// Get content of asset files in directory of view type
|
673 |
+
foreach ( self::$view_type_dir as $idx => $view_type_dir ) {
|
674 |
+
// Get selected style of current view type
|
675 |
+
$style = self::$style[$idx];
|
676 |
+
|
677 |
+
// With each type of asset (css, js), looking for suit file of selected style
|
678 |
+
foreach ( $assets as $type ) {
|
679 |
+
$file_path = $view_type_dir . '/' . $type . '/' . $style . '.' . $type;
|
680 |
+
$assets_output[$type][] = PT_CV_Functions::file_include_content( $file_path );
|
681 |
+
}
|
682 |
+
}
|
683 |
+
|
684 |
+
// Merge content of asset files
|
685 |
+
if ( $assets_output ) {
|
686 |
+
foreach ( $assets as $type ) {
|
687 |
+
|
688 |
+
$asset_file = $type . '/' . 'assets' . '.' . $type;
|
689 |
+
|
690 |
+
// Write to file
|
691 |
+
$file_path = PT_CV_PUBLIC_ASSETS . $asset_file;
|
692 |
+
|
693 |
+
if ( file_exists( $file_path ) ) {
|
694 |
+
$fp = @fopen( $file_path, 'w' );
|
695 |
+
fwrite( $fp, implode( "\n", $assets_output[$type] ) );
|
696 |
+
fclose( $fp );
|
697 |
+
}
|
698 |
+
|
699 |
+
$assets_files[$type] = PT_CV_PUBLIC_ASSETS_URI . $asset_file;
|
700 |
+
}
|
701 |
+
}
|
702 |
+
|
703 |
+
if ( is_admin() ) {
|
704 |
+
// Include assets file in Preview
|
705 |
+
foreach ( $assets_files as $type => $src ) {
|
706 |
+
PT_CV_Asset::include_inline( 'preview', $src, $type );
|
707 |
+
}
|
708 |
+
} else {
|
709 |
+
// Enqueue merged asset contents
|
710 |
+
foreach ( $assets_files as $type => $src ) {
|
711 |
+
|
712 |
+
$type = ( $type == 'js' ) ? 'script' : 'style';
|
713 |
+
$function = "wp_enqueue_{$type}";
|
714 |
+
|
715 |
+
if ( function_exists( $function ) ) {
|
716 |
+
$function( PT_CV_PREFIX . $type, $src );
|
717 |
+
}
|
718 |
+
}
|
719 |
+
}
|
720 |
+
|
721 |
+
// Output font style for views
|
722 |
+
do_action( PT_CV_PREFIX_ . 'print_view_style' );
|
723 |
+
}
|
724 |
+
|
725 |
+
/**
|
726 |
+
* Scripts for Preview & WP frontend
|
727 |
+
*/
|
728 |
+
static function frontend_scripts() {
|
729 |
+
// Load bootstrap js
|
730 |
+
PT_CV_Asset::enqueue( 'bootstrap' );
|
731 |
+
|
732 |
+
// Load bootstrap paginator
|
733 |
+
PT_CV_Asset::enqueue( 'bootstrap-paginator' );
|
734 |
+
|
735 |
+
// Public script
|
736 |
+
PT_CV_Asset::enqueue(
|
737 |
+
'public', 'script', array(
|
738 |
+
'src' => plugins_url( 'public/assets/js/public.js', PT_CV_FILE ),
|
739 |
+
'deps' => array( 'jquery' ),
|
740 |
+
)
|
741 |
+
);
|
742 |
+
|
743 |
+
// Localize for Public script
|
744 |
+
PT_CV_Asset::localize_script(
|
745 |
+
'public', PT_CV_PREFIX_UPPER . 'PUBLIC', array(
|
746 |
+
'is_admin' => is_admin() ? 1 : 0,
|
747 |
+
'_prefix' => PT_CV_PREFIX,
|
748 |
+
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
749 |
+
'_nonce' => wp_create_nonce( PT_CV_PREFIX_ . 'ajax_nonce' ),
|
750 |
+
)
|
751 |
+
);
|
752 |
+
}
|
753 |
+
|
754 |
+
/**
|
755 |
+
* Styles for Preview & WP frontend
|
756 |
+
*/
|
757 |
+
static function frontend_styles() {
|
758 |
+
PT_CV_Asset::enqueue( 'bootstrap', 'style' );
|
759 |
+
|
760 |
+
PT_CV_Asset::enqueue(
|
761 |
+
'public', 'style', array(
|
762 |
+
'src' => plugins_url( 'public/assets/css/public.css', PT_CV_FILE ),
|
763 |
+
)
|
764 |
+
);
|
765 |
+
|
766 |
+
// Fix bootstrap error in IE
|
767 |
+
global $is_IE;
|
768 |
+
if ( $is_IE ) {
|
769 |
+
PT_CV_Asset::enqueue(
|
770 |
+
'html5shiv', 'script', array(
|
771 |
+
'src' => plugins_url( 'assets/ie-fix/html5shiv.min.js', PT_CV_FILE ),
|
772 |
+
'ver' => '3.7.0',
|
773 |
+
)
|
774 |
+
);
|
775 |
+
PT_CV_Asset::enqueue(
|
776 |
+
'respond', 'script', array(
|
777 |
+
'src' => plugins_url( 'assets/ie-fix/respond.js', PT_CV_FILE ),
|
778 |
+
'ver' => '1.4.2',
|
779 |
+
)
|
780 |
+
);
|
781 |
+
}
|
782 |
+
}
|
783 |
+
|
784 |
+
/**
|
785 |
+
* Print inline js code
|
786 |
+
*
|
787 |
+
* @param string $js The js code
|
788 |
+
*
|
789 |
+
* @return string
|
790 |
+
*/
|
791 |
+
static function inline_script( $js ) {
|
792 |
+
// Generate random id for script tag
|
793 |
+
$random_id = PT_CV_Functions::string_random();
|
794 |
+
|
795 |
+
ob_start();
|
796 |
+
?>
|
797 |
+
<script type="text/javascript" id="<?php echo esc_attr( PT_CV_PREFIX . 'inline-script-' . $random_id ); ?>">
|
798 |
+
(function ($) {
|
799 |
+
$(function () { <?php echo balanceTags( $js ); ?>
|
800 |
+
});
|
801 |
+
}(jQuery));
|
802 |
+
</script>
|
803 |
+
<?php
|
804 |
+
return ob_get_clean();
|
805 |
+
}
|
806 |
+
|
807 |
+
/**
|
808 |
+
* Print inline css code
|
809 |
+
*
|
810 |
+
* @param string $css The css code
|
811 |
+
*
|
812 |
+
* @return string
|
813 |
+
*/
|
814 |
+
static function inline_style( $css ) {
|
815 |
+
// Generate random id for style tag
|
816 |
+
$random_id = PT_CV_Functions::string_random();
|
817 |
+
|
818 |
+
ob_start();
|
819 |
+
?>
|
820 |
+
<style type="text/css" id="<?php echo esc_attr( PT_CV_PREFIX . 'inline-style-' . $random_id ); ?>">
|
821 |
+
<?php echo balanceTags( $css ); ?>
|
822 |
+
</style>
|
823 |
+
<?php
|
824 |
+
return ob_get_clean();
|
825 |
+
}
|
826 |
+
}
|
827 |
+
|
828 |
+
}
|
includes/settings.php
ADDED
@@ -0,0 +1,734 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Define settings for options
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! class_exists( 'PT_CV_Settings' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @name PT_CV_Settings
|
16 |
+
* @todo Define settings for options
|
17 |
+
*/
|
18 |
+
class PT_CV_Settings {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get collection : Taxonomies => Terms
|
22 |
+
*
|
23 |
+
* @param string $taxonomies Array of taxonomies
|
24 |
+
* @param array $args Array of query parameters
|
25 |
+
*/
|
26 |
+
static function terms_of_taxonomies( $taxonomies = array(), $args = array() ) {
|
27 |
+
$terms_of_taxonomies = $result = array();
|
28 |
+
// Get taxonomies
|
29 |
+
$taxonomies = PT_CV_Values::taxonomy_list();
|
30 |
+
// Get slug list of taxonomies
|
31 |
+
$taxonomies_slug = array_keys( $taxonomies );
|
32 |
+
|
33 |
+
foreach ( $taxonomies_slug as $taxonomy_slug ) {
|
34 |
+
PT_CV_Values::term_of_taxonomy( $taxonomy_slug, $terms_of_taxonomies, $args );
|
35 |
+
}
|
36 |
+
|
37 |
+
foreach ( $terms_of_taxonomies as $taxonomy_slug => $terms ) {
|
38 |
+
|
39 |
+
$result[$taxonomy_slug] = array(
|
40 |
+
// In
|
41 |
+
array(
|
42 |
+
'label' => array(
|
43 |
+
'text' => __( 'In ', PT_CV_DOMAIN ),
|
44 |
+
//'text' => __( 'In ', PT_CV_DOMAIN ) . $taxonomies[$taxonomy_slug],
|
45 |
+
),
|
46 |
+
'params' => array(
|
47 |
+
array(
|
48 |
+
'type' => 'select',
|
49 |
+
'name' => $taxonomy_slug . '__in[]',
|
50 |
+
'options' => $terms,
|
51 |
+
'std' => '',
|
52 |
+
'class' => 'select2',
|
53 |
+
'multiple' => '1',
|
54 |
+
),
|
55 |
+
),
|
56 |
+
),
|
57 |
+
// Not In
|
58 |
+
array(
|
59 |
+
'label' => array(
|
60 |
+
'text' => __( 'Not in ', PT_CV_DOMAIN ),
|
61 |
+
//'text' => __( 'Not in ', PT_CV_DOMAIN ) . $taxonomies[$taxonomy_slug],
|
62 |
+
),
|
63 |
+
'params' => array(
|
64 |
+
array(
|
65 |
+
'type' => 'select',
|
66 |
+
'name' => $taxonomy_slug . '__not_in[]',
|
67 |
+
'options' => $terms,
|
68 |
+
'std' => '',
|
69 |
+
'class' => 'select2',
|
70 |
+
'multiple' => '1',
|
71 |
+
),
|
72 |
+
),
|
73 |
+
),
|
74 |
+
);
|
75 |
+
}
|
76 |
+
|
77 |
+
return $result;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Order by options
|
82 |
+
*
|
83 |
+
* @return array
|
84 |
+
*/
|
85 |
+
static function orderby() {
|
86 |
+
$result = array();
|
87 |
+
|
88 |
+
$result['common'] = array(
|
89 |
+
// Order By
|
90 |
+
array(
|
91 |
+
'label' => array(
|
92 |
+
'text' => __( 'Order by', PT_CV_DOMAIN ),
|
93 |
+
),
|
94 |
+
'params' => array(
|
95 |
+
array(
|
96 |
+
'type' => 'select',
|
97 |
+
'name' => 'orderby',
|
98 |
+
'options' => PT_CV_Values::post_regular_orderby(),
|
99 |
+
'std' => '',
|
100 |
+
),
|
101 |
+
),
|
102 |
+
),
|
103 |
+
// Order
|
104 |
+
array(
|
105 |
+
'label' => array(
|
106 |
+
'text' => __( 'Order', PT_CV_DOMAIN ),
|
107 |
+
),
|
108 |
+
'params' => array(
|
109 |
+
array(
|
110 |
+
'type' => 'radio',
|
111 |
+
'name' => 'order',
|
112 |
+
'options' => PT_CV_Values::orders(),
|
113 |
+
'std' => 'asc',
|
114 |
+
),
|
115 |
+
),
|
116 |
+
),
|
117 |
+
);
|
118 |
+
|
119 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'orderby', $result );
|
120 |
+
|
121 |
+
return $result;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Pagination settings
|
126 |
+
*
|
127 |
+
* @return array
|
128 |
+
*/
|
129 |
+
static function settings_pagination() {
|
130 |
+
|
131 |
+
$prefix = 'pagination-';
|
132 |
+
|
133 |
+
$result = array(
|
134 |
+
|
135 |
+
// Pagination
|
136 |
+
array(
|
137 |
+
'label' => array(
|
138 |
+
'text' => __( 'Pagination', PT_CV_DOMAIN ),
|
139 |
+
),
|
140 |
+
'params' => array(
|
141 |
+
array(
|
142 |
+
'type' => 'checkbox',
|
143 |
+
'name' => 'enable-pagination',
|
144 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Enable', PT_CV_DOMAIN ) ),
|
145 |
+
'std' => '',
|
146 |
+
),
|
147 |
+
),
|
148 |
+
),
|
149 |
+
|
150 |
+
// Items per page
|
151 |
+
array(
|
152 |
+
'label' => array(
|
153 |
+
'text' => __( 'Items per page', PT_CV_DOMAIN ),
|
154 |
+
),
|
155 |
+
'params' => array(
|
156 |
+
array(
|
157 |
+
'type' => 'number',
|
158 |
+
'name' => $prefix . 'items-per-page',
|
159 |
+
'std' => '10',
|
160 |
+
'placeholder' => 'e.g. 10',
|
161 |
+
'desc' => __( 'The number of items per page', PT_CV_DOMAIN ),
|
162 |
+
),
|
163 |
+
),
|
164 |
+
'dependence' => array( 'enable-pagination', 'yes' ),
|
165 |
+
),
|
166 |
+
|
167 |
+
// Pagination Style
|
168 |
+
array(
|
169 |
+
'label' => array(
|
170 |
+
'text' => __( 'Pagination style', PT_CV_DOMAIN ),
|
171 |
+
),
|
172 |
+
'params' => array(
|
173 |
+
array(
|
174 |
+
'type' => 'radio',
|
175 |
+
'name' => $prefix . 'style',
|
176 |
+
'options' => PT_CV_Values::pagination_styles(),
|
177 |
+
'std' => PT_CV_Functions::array_get_first_key( PT_CV_Values::pagination_styles() ),
|
178 |
+
),
|
179 |
+
),
|
180 |
+
'dependence' => array( 'enable-pagination', 'yes' ),
|
181 |
+
),
|
182 |
+
);
|
183 |
+
|
184 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'settings_pagination', $result );
|
185 |
+
|
186 |
+
return $result;
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Other settings for All View Type
|
191 |
+
*/
|
192 |
+
static function settings_other() {
|
193 |
+
|
194 |
+
$prefix = 'other-';
|
195 |
+
|
196 |
+
$result = array(
|
197 |
+
// Open an item in
|
198 |
+
array(
|
199 |
+
'label' => array(
|
200 |
+
'text' => __( 'Open item in', PT_CV_DOMAIN ),
|
201 |
+
),
|
202 |
+
'params' => array(
|
203 |
+
array(
|
204 |
+
'type' => 'radio',
|
205 |
+
'name' => $prefix . 'open-in',
|
206 |
+
'options' => PT_CV_Values::open_in(),
|
207 |
+
'std' => PT_CV_Functions::array_get_first_key( PT_CV_Values::open_in() ),
|
208 |
+
'desc' => __( 'How to open an item when click on Title (if "Show Title" is checked) or Thumbnail (if only check "Show Thumbnail")', PT_CV_DOMAIN ),
|
209 |
+
),
|
210 |
+
),
|
211 |
+
),
|
212 |
+
);
|
213 |
+
|
214 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'settings_other', $result, $prefix );
|
215 |
+
|
216 |
+
return $result;
|
217 |
+
}
|
218 |
+
|
219 |
+
/**
|
220 |
+
* Fields settings
|
221 |
+
*/
|
222 |
+
static function field_settings() {
|
223 |
+
|
224 |
+
$prefix = 'field-';
|
225 |
+
$prefix2 = 'show-' . $prefix;
|
226 |
+
|
227 |
+
$result = array(
|
228 |
+
|
229 |
+
// Fields display
|
230 |
+
array(
|
231 |
+
'label' => array(
|
232 |
+
'text' => __( 'Fields display', PT_CV_DOMAIN ),
|
233 |
+
),
|
234 |
+
'extra_setting' => array(
|
235 |
+
'params' => array(
|
236 |
+
'wrap-class' => PT_CV_Html::html_group_class(),
|
237 |
+
),
|
238 |
+
),
|
239 |
+
'params' => array(
|
240 |
+
array(
|
241 |
+
'type' => 'group',
|
242 |
+
'params' => PT_CV_Settings::field_display_settings(),
|
243 |
+
),
|
244 |
+
),
|
245 |
+
),
|
246 |
+
|
247 |
+
// Thumbnail settings
|
248 |
+
array(
|
249 |
+
'label' => array(
|
250 |
+
'text' => __( 'Thumbnail settings', PT_CV_DOMAIN ),
|
251 |
+
),
|
252 |
+
'extra_setting' => array(
|
253 |
+
'params' => array(
|
254 |
+
'wrap-class' => PT_CV_Html::html_group_class() . ' ' . PT_CV_PREFIX . 'thumbnail-setting',
|
255 |
+
),
|
256 |
+
),
|
257 |
+
'params' => array(
|
258 |
+
array(
|
259 |
+
'type' => 'group',
|
260 |
+
'params' => PT_CV_Settings::field_thumbnail_settings( $prefix ),
|
261 |
+
),
|
262 |
+
),
|
263 |
+
'dependence' => array( $prefix2 . 'thumbnail', 'yes' ),
|
264 |
+
),
|
265 |
+
|
266 |
+
// Meta fields settings
|
267 |
+
array(
|
268 |
+
'label' => array(
|
269 |
+
'text' => __( 'Meta fields settings', PT_CV_DOMAIN ),
|
270 |
+
),
|
271 |
+
'extra_setting' => array(
|
272 |
+
'params' => array(
|
273 |
+
'wrap-class' => PT_CV_Html::html_group_class() . ' ' . PT_CV_PREFIX . 'meta-fields-settings',
|
274 |
+
),
|
275 |
+
),
|
276 |
+
'params' => array(
|
277 |
+
array(
|
278 |
+
'type' => 'group',
|
279 |
+
'params' => PT_CV_Settings::field_meta_fields( 'meta-fields-' ),
|
280 |
+
'desc' => apply_filters( PT_CV_PREFIX_ . 'settings_sort_text', '' ),
|
281 |
+
),
|
282 |
+
),
|
283 |
+
'dependence' => array( $prefix2 . 'meta-fields', 'yes' ),
|
284 |
+
),
|
285 |
+
|
286 |
+
// Content settings
|
287 |
+
array(
|
288 |
+
'label' => array(
|
289 |
+
'text' => __( 'Content settings', PT_CV_DOMAIN ),
|
290 |
+
),
|
291 |
+
'params' => array(
|
292 |
+
array(
|
293 |
+
'type' => 'radio',
|
294 |
+
'name' => $prefix . 'content-show',
|
295 |
+
'options' => array(
|
296 |
+
'full' => __( 'Show Full Content', PT_CV_DOMAIN ),
|
297 |
+
'excerpt' => __( 'Show Excerpt', PT_CV_DOMAIN ),
|
298 |
+
),
|
299 |
+
'std' => 'excerpt',
|
300 |
+
),
|
301 |
+
),
|
302 |
+
'dependence' => array( $prefix2 . 'content', 'yes' ),
|
303 |
+
),
|
304 |
+
|
305 |
+
// Excerpt settings
|
306 |
+
array(
|
307 |
+
'label' => array(
|
308 |
+
'text' => __( '', PT_CV_DOMAIN ),
|
309 |
+
),
|
310 |
+
'extra_setting' => array(
|
311 |
+
'params' => array(
|
312 |
+
'wrap-id' => PT_CV_Html::html_group_id( 'excerpt-settings' ),
|
313 |
+
),
|
314 |
+
),
|
315 |
+
'params' => array(
|
316 |
+
array(
|
317 |
+
'type' => 'group',
|
318 |
+
'params' => apply_filters(
|
319 |
+
PT_CV_PREFIX_ . 'excerpt_settings',
|
320 |
+
array(
|
321 |
+
// Excerpt length
|
322 |
+
array(
|
323 |
+
'label' => array(
|
324 |
+
'text' => __( 'Excerpt length', PT_CV_DOMAIN ),
|
325 |
+
),
|
326 |
+
'extra_setting' => array(
|
327 |
+
'params' => array(
|
328 |
+
'width' => 9,
|
329 |
+
),
|
330 |
+
),
|
331 |
+
'params' => array(
|
332 |
+
array(
|
333 |
+
'type' => 'number',
|
334 |
+
'name' => $prefix . 'excerpt-length',
|
335 |
+
'std' => '20',
|
336 |
+
'placeholder' => 'e.g. 20',
|
337 |
+
'desc' => __( 'The number of words in excerpt', PT_CV_DOMAIN ),
|
338 |
+
),
|
339 |
+
),
|
340 |
+
),
|
341 |
+
),
|
342 |
+
$prefix . 'excerpt-'
|
343 |
+
),
|
344 |
+
),
|
345 |
+
),
|
346 |
+
'dependence' => array( array( $prefix . 'content-show', 'excerpt' ) ),
|
347 |
+
),
|
348 |
+
);
|
349 |
+
|
350 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'field_settings', $result, $prefix2 );
|
351 |
+
|
352 |
+
return $result;
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Fields display
|
357 |
+
*
|
358 |
+
* @return array
|
359 |
+
*/
|
360 |
+
static function field_display_settings() {
|
361 |
+
|
362 |
+
$field_display_settings = array(
|
363 |
+
array(
|
364 |
+
'label' => array(
|
365 |
+
'text' => __( '', PT_CV_DOMAIN ),
|
366 |
+
),
|
367 |
+
'extra_setting' => array(
|
368 |
+
'params' => array(
|
369 |
+
'width' => 12,
|
370 |
+
'wrap-class' => PT_CV_PREFIX . 'field-display',
|
371 |
+
),
|
372 |
+
),
|
373 |
+
'params' => array(
|
374 |
+
array(
|
375 |
+
'type' => 'group',
|
376 |
+
'params' => PT_CV_Settings::field_display(),
|
377 |
+
'desc' => apply_filters( PT_CV_PREFIX_ . 'settings_sort_text', '' ),
|
378 |
+
),
|
379 |
+
),
|
380 |
+
),
|
381 |
+
);
|
382 |
+
|
383 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'field_display_settings', $field_display_settings );
|
384 |
+
|
385 |
+
return $result;
|
386 |
+
}
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Options to check/uncheck to display fields
|
390 |
+
*
|
391 |
+
* @return array
|
392 |
+
*/
|
393 |
+
static function field_display() {
|
394 |
+
|
395 |
+
$prefix = 'show-field-';
|
396 |
+
|
397 |
+
$result = array(
|
398 |
+
|
399 |
+
// Thumbnail position
|
400 |
+
array(
|
401 |
+
'label' => array(
|
402 |
+
'text' => __( 'Thumbnail position', PT_CV_DOMAIN ),
|
403 |
+
),
|
404 |
+
'extra_setting' => array(
|
405 |
+
'params' => array(
|
406 |
+
'width' => 9,
|
407 |
+
'wrap-class' => PT_CV_PREFIX . 'bg-none',
|
408 |
+
),
|
409 |
+
),
|
410 |
+
'params' => array(
|
411 |
+
array(
|
412 |
+
'type' => 'select',
|
413 |
+
'name' => 'field-' . 'thumbnail-position',
|
414 |
+
'options' => PT_CV_Values::thumbnail_position(),
|
415 |
+
'std' => PT_CV_Functions::array_get_first_key( PT_CV_Values::thumbnail_position() ),
|
416 |
+
),
|
417 |
+
),
|
418 |
+
'dependence' => array( 'layout-format', '2-col' ),
|
419 |
+
),
|
420 |
+
|
421 |
+
// Show Thumbnail
|
422 |
+
array(
|
423 |
+
'label' => array(
|
424 |
+
'text' => __( '', PT_CV_DOMAIN ),
|
425 |
+
),
|
426 |
+
'extra_setting' => array(
|
427 |
+
'params' => array(
|
428 |
+
'width' => 12,
|
429 |
+
),
|
430 |
+
),
|
431 |
+
'params' => array(
|
432 |
+
array(
|
433 |
+
'type' => 'checkbox',
|
434 |
+
'name' => $prefix . 'thumbnail',
|
435 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Thumbnail', PT_CV_DOMAIN ) ),
|
436 |
+
'std' => 'yes',
|
437 |
+
),
|
438 |
+
),
|
439 |
+
'dependence' => array( 'layout-format', '1-col' ),
|
440 |
+
),
|
441 |
+
|
442 |
+
// Show Title
|
443 |
+
array(
|
444 |
+
'label' => array(
|
445 |
+
'text' => __( '', PT_CV_DOMAIN ),
|
446 |
+
),
|
447 |
+
'extra_setting' => array(
|
448 |
+
'params' => array(
|
449 |
+
'width' => 12,
|
450 |
+
),
|
451 |
+
),
|
452 |
+
'params' => array(
|
453 |
+
array(
|
454 |
+
'type' => 'checkbox',
|
455 |
+
'name' => $prefix . 'title',
|
456 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Title', PT_CV_DOMAIN ) ),
|
457 |
+
'std' => 'yes',
|
458 |
+
),
|
459 |
+
),
|
460 |
+
),
|
461 |
+
|
462 |
+
// Show Content
|
463 |
+
array(
|
464 |
+
'label' => array(
|
465 |
+
'text' => __( '', PT_CV_DOMAIN ),
|
466 |
+
),
|
467 |
+
'extra_setting' => array(
|
468 |
+
'params' => array(
|
469 |
+
'width' => 12,
|
470 |
+
),
|
471 |
+
),
|
472 |
+
'params' => array(
|
473 |
+
array(
|
474 |
+
'type' => 'checkbox',
|
475 |
+
'name' => $prefix . 'content',
|
476 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Content', PT_CV_DOMAIN ) ),
|
477 |
+
'std' => 'yes',
|
478 |
+
),
|
479 |
+
),
|
480 |
+
),
|
481 |
+
|
482 |
+
// Show Meta fields
|
483 |
+
array(
|
484 |
+
'label' => array(
|
485 |
+
'text' => __( '', PT_CV_DOMAIN ),
|
486 |
+
),
|
487 |
+
'extra_setting' => array(
|
488 |
+
'params' => array(
|
489 |
+
'width' => 12,
|
490 |
+
),
|
491 |
+
),
|
492 |
+
'params' => array(
|
493 |
+
array(
|
494 |
+
'type' => 'checkbox',
|
495 |
+
'name' => $prefix . 'meta-fields',
|
496 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Meta Fields', PT_CV_DOMAIN ) ),
|
497 |
+
'std' => 'yes',
|
498 |
+
),
|
499 |
+
),
|
500 |
+
),
|
501 |
+
);
|
502 |
+
|
503 |
+
// Add/remove params
|
504 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'field_display', $result );
|
505 |
+
|
506 |
+
// Sort array of params by saved order
|
507 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'settings_sort', $result, PT_CV_PREFIX . $prefix );
|
508 |
+
|
509 |
+
return $result;
|
510 |
+
}
|
511 |
+
|
512 |
+
/**
|
513 |
+
* Setting options for Field = Thumbnail
|
514 |
+
*/
|
515 |
+
static function field_thumbnail_settings( $prefix ) {
|
516 |
+
|
517 |
+
$result = array(
|
518 |
+
// Size
|
519 |
+
array(
|
520 |
+
'label' => array(
|
521 |
+
'text' => __( 'Thumbnail size', PT_CV_DOMAIN ),
|
522 |
+
),
|
523 |
+
'extra_setting' => array(
|
524 |
+
'params' => array(
|
525 |
+
'width' => 9,
|
526 |
+
),
|
527 |
+
),
|
528 |
+
'params' => array(
|
529 |
+
array(
|
530 |
+
'type' => 'select',
|
531 |
+
'name' => $prefix . 'thumbnail-size',
|
532 |
+
'options' => PT_CV_Values::field_thumbnail_sizes(),
|
533 |
+
'std' => 'medium',
|
534 |
+
),
|
535 |
+
),
|
536 |
+
),
|
537 |
+
);
|
538 |
+
|
539 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_settings', $result, $prefix );
|
540 |
+
|
541 |
+
return $result;
|
542 |
+
}
|
543 |
+
|
544 |
+
/**
|
545 |
+
* Show settings of other fields
|
546 |
+
*/
|
547 |
+
static function field_meta_fields( $prefix ) {
|
548 |
+
|
549 |
+
$result = array(
|
550 |
+
|
551 |
+
// Date
|
552 |
+
array(
|
553 |
+
'label' => array(
|
554 |
+
'text' => '',
|
555 |
+
),
|
556 |
+
'extra_setting' => array(
|
557 |
+
'params' => array(
|
558 |
+
'width' => 12,
|
559 |
+
),
|
560 |
+
),
|
561 |
+
'params' => array(
|
562 |
+
array(
|
563 |
+
'type' => 'checkbox',
|
564 |
+
'name' => $prefix . 'date',
|
565 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Date', PT_CV_DOMAIN ) ),
|
566 |
+
'std' => 'yes',
|
567 |
+
),
|
568 |
+
),
|
569 |
+
),
|
570 |
+
|
571 |
+
// Author
|
572 |
+
array(
|
573 |
+
'label' => array(
|
574 |
+
'text' => '',
|
575 |
+
),
|
576 |
+
'extra_setting' => array(
|
577 |
+
'params' => array(
|
578 |
+
'width' => 12,
|
579 |
+
),
|
580 |
+
),
|
581 |
+
'params' => array(
|
582 |
+
array(
|
583 |
+
'type' => 'checkbox',
|
584 |
+
'name' => $prefix . 'author',
|
585 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Author', PT_CV_DOMAIN ) ),
|
586 |
+
'std' => 'yes',
|
587 |
+
),
|
588 |
+
),
|
589 |
+
),
|
590 |
+
|
591 |
+
// Taxonomy
|
592 |
+
array(
|
593 |
+
'label' => array(
|
594 |
+
'text' => '',
|
595 |
+
),
|
596 |
+
'extra_setting' => array(
|
597 |
+
'params' => array(
|
598 |
+
'width' => 12,
|
599 |
+
),
|
600 |
+
),
|
601 |
+
'params' => array(
|
602 |
+
array(
|
603 |
+
'type' => 'checkbox',
|
604 |
+
'name' => $prefix . 'taxonomy',
|
605 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Terms (categories, post tags...)', PT_CV_DOMAIN ) ),
|
606 |
+
'std' => 'yes',
|
607 |
+
),
|
608 |
+
),
|
609 |
+
'dependence' => array( 'content-type', 'page', '!=' ),
|
610 |
+
),
|
611 |
+
|
612 |
+
// Comment
|
613 |
+
array(
|
614 |
+
'label' => array(
|
615 |
+
'text' => '',
|
616 |
+
),
|
617 |
+
'extra_setting' => array(
|
618 |
+
'params' => array(
|
619 |
+
'width' => 12,
|
620 |
+
),
|
621 |
+
),
|
622 |
+
'params' => array(
|
623 |
+
array(
|
624 |
+
'type' => 'checkbox',
|
625 |
+
'name' => $prefix . 'comment',
|
626 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Comment Count', PT_CV_DOMAIN ) ),
|
627 |
+
'std' => 'yes',
|
628 |
+
),
|
629 |
+
),
|
630 |
+
),
|
631 |
+
|
632 |
+
);
|
633 |
+
|
634 |
+
// Sort array of params by saved order
|
635 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'settings_sort', $result, PT_CV_PREFIX . $prefix );
|
636 |
+
|
637 |
+
return $result;
|
638 |
+
}
|
639 |
+
|
640 |
+
/**
|
641 |
+
* Settings of View Type = Grid
|
642 |
+
*
|
643 |
+
* @return array
|
644 |
+
*/
|
645 |
+
static function view_type_settings_grid() {
|
646 |
+
|
647 |
+
$prefix = 'grid-';
|
648 |
+
|
649 |
+
$result = array(
|
650 |
+
// Number of columns
|
651 |
+
array(
|
652 |
+
'label' => array(
|
653 |
+
'text' => __( 'Items per row', PT_CV_DOMAIN ),
|
654 |
+
),
|
655 |
+
'params' => array(
|
656 |
+
array(
|
657 |
+
'type' => 'number',
|
658 |
+
'name' => $prefix . 'number-columns',
|
659 |
+
'std' => '2',
|
660 |
+
'desc' => __( 'The number of items on each row of grid', PT_CV_DOMAIN ),
|
661 |
+
),
|
662 |
+
),
|
663 |
+
'dependence' => array( 'view-type', 'grid' ),
|
664 |
+
),
|
665 |
+
);
|
666 |
+
|
667 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'view_type_settings_grid', $result );
|
668 |
+
|
669 |
+
return $result;
|
670 |
+
}
|
671 |
+
|
672 |
+
/**
|
673 |
+
* Settings of View Type = Collapsible
|
674 |
+
*
|
675 |
+
* @return array
|
676 |
+
*/
|
677 |
+
static function view_type_settings_collapsible() {
|
678 |
+
|
679 |
+
$prefix = 'collapsible-';
|
680 |
+
|
681 |
+
$result = array(
|
682 |
+
PT_CV_Settings::setting_no_option(),
|
683 |
+
);
|
684 |
+
|
685 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'view_type_settings_collapsible', $result );
|
686 |
+
|
687 |
+
return $result;
|
688 |
+
}
|
689 |
+
|
690 |
+
/**
|
691 |
+
* Settings of View Type = Scrollable
|
692 |
+
*
|
693 |
+
* @return array
|
694 |
+
*/
|
695 |
+
static function view_type_settings_scrollable() {
|
696 |
+
|
697 |
+
$prefix = 'scrollable-';
|
698 |
+
|
699 |
+
$result = array(
|
700 |
+
PT_CV_Settings::setting_no_option(),
|
701 |
+
);
|
702 |
+
|
703 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'view_type_settings_scrollable', $result );
|
704 |
+
|
705 |
+
return $result;
|
706 |
+
}
|
707 |
+
|
708 |
+
/**
|
709 |
+
* Setting with no option
|
710 |
+
*
|
711 |
+
* @return array
|
712 |
+
*/
|
713 |
+
static function setting_no_option() {
|
714 |
+
|
715 |
+
return array(
|
716 |
+
'label' => array(
|
717 |
+
'text' => __( '', PT_CV_DOMAIN ),
|
718 |
+
),
|
719 |
+
'extra_setting' => array(
|
720 |
+
'params' => array(
|
721 |
+
'width' => 12,
|
722 |
+
),
|
723 |
+
),
|
724 |
+
'params' => array(
|
725 |
+
array(
|
726 |
+
'type' => 'html',
|
727 |
+
'content' => "<div class='" . PT_CV_PREFIX . "text'>" . __( 'There is no option', PT_CV_DOMAIN ) . '</div>',
|
728 |
+
),
|
729 |
+
),
|
730 |
+
);
|
731 |
+
}
|
732 |
+
}
|
733 |
+
|
734 |
+
}
|
includes/update.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Check update, do update
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Compare stored version and current version
|
13 |
+
$stored_version = get_option( PT_CV_OPTION_VERSION );
|
14 |
+
if ( $stored_version && version_compare( $stored_version, PT_CV_VERSION, '<' ) ) {
|
15 |
+
// Do update
|
16 |
+
|
17 |
+
// Update version
|
18 |
+
update_option( PT_CV_OPTION_VERSION, PT_CV_VERSION );
|
19 |
+
}
|
includes/values.php
ADDED
@@ -0,0 +1,447 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Define values for input, select...
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
if ( ! class_exists( 'PT_CV_Values' ) ) {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @name PT_CV_Values
|
16 |
+
* @todo Define values for input, select...
|
17 |
+
*/
|
18 |
+
class PT_CV_Values {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Get Post Types
|
22 |
+
*
|
23 |
+
* @param array $args Array of query parameters
|
24 |
+
* @param string $excludes_ Array of slug of post types want to exclude from result
|
25 |
+
*
|
26 |
+
* @return array
|
27 |
+
*/
|
28 |
+
static function post_types( $args = array(), $excludes_ = array() ) {
|
29 |
+
$excludes = array_merge( array( 'attachment' ), $excludes_ );
|
30 |
+
$result = array();
|
31 |
+
$args = array_merge( array( 'public' => true, 'show_ui' => true, '_builtin' => true ), $args );
|
32 |
+
$args = apply_filters( PT_CV_PREFIX_ . 'post_types', $args );
|
33 |
+
$post_types = get_post_types( $args, 'objects' );
|
34 |
+
|
35 |
+
foreach ( $post_types as $post_type ) {
|
36 |
+
if ( in_array( $post_type->name, $excludes ) ) {
|
37 |
+
continue;
|
38 |
+
}
|
39 |
+
$result[$post_type->name] = __( $post_type->labels->singular_name, PT_CV_DOMAIN );
|
40 |
+
}
|
41 |
+
|
42 |
+
return $result;
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get list of taxonomies
|
47 |
+
*
|
48 |
+
* @param array $args Array of query parameters
|
49 |
+
*
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
+
static function taxonomy_list( $args = array() ) {
|
53 |
+
$result = array();
|
54 |
+
$args = array_merge( array( 'public' => true, 'show_ui' => true, '_builtin' => true ), $args );
|
55 |
+
$args = apply_filters( PT_CV_PREFIX_ . 'taxonomy_list', $args );
|
56 |
+
$taxonomies = get_taxonomies( $args, 'objects' );
|
57 |
+
|
58 |
+
foreach ( $taxonomies as $taxonomy ) {
|
59 |
+
$result[$taxonomy->name] = __( $taxonomy->labels->singular_name, PT_CV_DOMAIN );
|
60 |
+
}
|
61 |
+
|
62 |
+
return $result;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* The logical relationship between taxonomies
|
67 |
+
*
|
68 |
+
* @return array
|
69 |
+
*/
|
70 |
+
static function taxonomy_relation() {
|
71 |
+
return array(
|
72 |
+
'AND' => __( 'AND', PT_CV_DOMAIN ),
|
73 |
+
'OR' => __( 'OR', PT_CV_DOMAIN ),
|
74 |
+
);
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Get taxonomies of Post type
|
79 |
+
*
|
80 |
+
* @param string $object Name of the post type, or a post object
|
81 |
+
* @param string $output The type of output to return, either taxonomy 'names' or 'objects'
|
82 |
+
*
|
83 |
+
* @return array
|
84 |
+
*/
|
85 |
+
static function taxonomy_by_post_type( $object, $output = 'names' ) {
|
86 |
+
$data = get_object_taxonomies( $object, $output );
|
87 |
+
$result = array();
|
88 |
+
|
89 |
+
foreach ( (array) $data as $taxonomy ) {
|
90 |
+
$result[$taxonomy] = self::taxonomy_info( $taxonomy, 'singular_name' );
|
91 |
+
}
|
92 |
+
|
93 |
+
return $result;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Get taxonomy information
|
98 |
+
*
|
99 |
+
* @param string $taxonomy The name of the taxonomy
|
100 |
+
* @param string $info Field of metadata want to retrieve
|
101 |
+
*
|
102 |
+
* @return string | array
|
103 |
+
*/
|
104 |
+
static function taxonomy_info( $taxonomy, $info ) {
|
105 |
+
$data = get_taxonomy( $taxonomy );
|
106 |
+
|
107 |
+
if ( isset( $data->$info ) ) {
|
108 |
+
$result = $data->$info;
|
109 |
+
} else {
|
110 |
+
if ( isset( $data->labels->$info ) ) {
|
111 |
+
$result = __( $data->labels->$info, PT_CV_DOMAIN );
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
return isset( $result ) ? $result : NULL;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Get terms of one/many taxonomies
|
120 |
+
*
|
121 |
+
* @param string $taxonomy The name of the taxonomy
|
122 |
+
* @param string $terms_of_taxonomies Array of terms of taxonomies
|
123 |
+
* @param array $args Array of query parameters
|
124 |
+
*/
|
125 |
+
static function term_of_taxonomy( $taxonomy, &$terms_of_taxonomies, $args = array() ) {
|
126 |
+
|
127 |
+
$args = array_merge( array( 'hide_empty' => false ), $args );
|
128 |
+
$terms = get_terms( array( $taxonomy ), $args );
|
129 |
+
if ( ! isset( $terms_of_taxonomies[$taxonomy] ) ) {
|
130 |
+
$terms_of_taxonomies[$taxonomy] = array();
|
131 |
+
}
|
132 |
+
$term_slug_name = array();
|
133 |
+
foreach ( $terms as $term ) {
|
134 |
+
$term_slug_name[$term->slug] = $term->name;
|
135 |
+
}
|
136 |
+
$terms_of_taxonomies[$taxonomy] = array_merge( $terms_of_taxonomies[$taxonomy], $term_slug_name );
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Yes no options
|
141 |
+
*
|
142 |
+
* @return array
|
143 |
+
*/
|
144 |
+
static function yes_no( $key = '', $value = '' ) {
|
145 |
+
$result = array(
|
146 |
+
'yes' => __( 'Yes', PT_CV_DOMAIN ),
|
147 |
+
'no' => __( 'No', PT_CV_DOMAIN ),
|
148 |
+
);
|
149 |
+
if ( ! empty( $key ) ) {
|
150 |
+
return array( $key => empty( $value ) ? $result[$key] : $value );
|
151 |
+
}
|
152 |
+
|
153 |
+
return $result;
|
154 |
+
}
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Show Hide options
|
158 |
+
*
|
159 |
+
* @return array
|
160 |
+
*/
|
161 |
+
static function show_hide() {
|
162 |
+
return array(
|
163 |
+
'show' => __( 'Show', PT_CV_DOMAIN ),
|
164 |
+
'hide' => __( 'Hide', PT_CV_DOMAIN ),
|
165 |
+
);
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Paging styles
|
170 |
+
*
|
171 |
+
* @return array
|
172 |
+
*/
|
173 |
+
static function pagination_styles() {
|
174 |
+
$result = array(
|
175 |
+
'regular' => __( 'Regular pagination', PT_CV_DOMAIN ),
|
176 |
+
);
|
177 |
+
|
178 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'pagination_styles', $result );
|
179 |
+
|
180 |
+
return $result;
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Order options
|
185 |
+
*
|
186 |
+
* @return array
|
187 |
+
*/
|
188 |
+
static function orders() {
|
189 |
+
return array(
|
190 |
+
'asc' => __( 'ASC', PT_CV_DOMAIN ),
|
191 |
+
'desc' => __( 'DESC', PT_CV_DOMAIN ),
|
192 |
+
);
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* List post status
|
197 |
+
*/
|
198 |
+
static function post_statuses() {
|
199 |
+
return array(
|
200 |
+
'publish' => __( 'Publish', PT_CV_DOMAIN ),
|
201 |
+
'pending' => __( 'Pending', PT_CV_DOMAIN ),
|
202 |
+
'draft' => __( 'Draft', PT_CV_DOMAIN ),
|
203 |
+
'auto-draft' => __( 'Auto draft', PT_CV_DOMAIN ),
|
204 |
+
'future' => __( 'Future', PT_CV_DOMAIN ),
|
205 |
+
'private' => __( 'Private', PT_CV_DOMAIN ),
|
206 |
+
'inherit' => __( 'Inherit', PT_CV_DOMAIN ),
|
207 |
+
'trash' => __( 'Trash', PT_CV_DOMAIN ),
|
208 |
+
);
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Advanced settings options
|
213 |
+
*
|
214 |
+
* @return array
|
215 |
+
*/
|
216 |
+
static function advanced_settings() {
|
217 |
+
return array(
|
218 |
+
'author' => __( 'Author', PT_CV_DOMAIN ),
|
219 |
+
'status' => __( 'Status', PT_CV_DOMAIN ),
|
220 |
+
'taxonomy' => __( 'Taxonomy', PT_CV_DOMAIN ),
|
221 |
+
'search' => __( 'Search', PT_CV_DOMAIN ),
|
222 |
+
'order' => __( 'Order & Orderby', PT_CV_DOMAIN ),
|
223 |
+
);
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Show WP author dropdown list by WP wp_dropdown_users functions
|
228 |
+
*
|
229 |
+
* @return array
|
230 |
+
*/
|
231 |
+
static function post_author( $name = 'author', $data = array() ) {
|
232 |
+
$field_name = PT_CV_PREFIX . $name;
|
233 |
+
$selected = isset( $data[$field_name] ) ? $data[$field_name] : '';
|
234 |
+
|
235 |
+
return wp_dropdown_users( array( 'name' => $field_name, 'selected' => $selected, 'class' => 'form-control', 'show_option_none' => __( '— Select —', PT_CV_DOMAIN ), 'echo' => false ) );
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
* Show WP author dropdown list
|
240 |
+
*
|
241 |
+
* @return array
|
242 |
+
*/
|
243 |
+
static function user_list() {
|
244 |
+
|
245 |
+
$result = array();
|
246 |
+
$show = 'display_name';
|
247 |
+
|
248 |
+
$args = array(
|
249 |
+
'fields' => array( 'ID', $show ),
|
250 |
+
'orderby' => 'display_name',
|
251 |
+
'order' => 'ASC',
|
252 |
+
);
|
253 |
+
|
254 |
+
$users = get_users( $args );
|
255 |
+
foreach ( (array) $users as $user ) {
|
256 |
+
$user->ID = (int) $user->ID;
|
257 |
+
$display = ! empty( $user->$show ) ? $user->$show : '(' . $user->user_login . ')';
|
258 |
+
|
259 |
+
$result[$user->ID] = esc_html( $display );
|
260 |
+
}
|
261 |
+
|
262 |
+
return $result;
|
263 |
+
}
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Get available filters for Order by Content item
|
267 |
+
*/
|
268 |
+
static function post_regular_orderby() {
|
269 |
+
$regular_orderby = array(
|
270 |
+
'' => __( '— Select —', PT_CV_DOMAIN ),
|
271 |
+
'ID' => __( 'ID', PT_CV_DOMAIN ),
|
272 |
+
'title' => __( 'Title', PT_CV_DOMAIN ),
|
273 |
+
'date' => __( 'Created date', PT_CV_DOMAIN ),
|
274 |
+
'modified' => __( 'Modified date', PT_CV_DOMAIN ),
|
275 |
+
);
|
276 |
+
|
277 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'regular_orderby', $regular_orderby );
|
278 |
+
|
279 |
+
return $result;
|
280 |
+
}
|
281 |
+
|
282 |
+
/**
|
283 |
+
* View type options
|
284 |
+
*
|
285 |
+
* @return array
|
286 |
+
*/
|
287 |
+
static function view_type() {
|
288 |
+
|
289 |
+
$view_type = array(
|
290 |
+
'grid' => __( 'Grid', PT_CV_DOMAIN ),
|
291 |
+
'collapsible' => __( 'Collapsible List', PT_CV_DOMAIN ),
|
292 |
+
'scrollable' => __( 'Scrollable List', PT_CV_DOMAIN ),
|
293 |
+
);
|
294 |
+
|
295 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'view_type', $view_type );
|
296 |
+
|
297 |
+
return $result;
|
298 |
+
}
|
299 |
+
|
300 |
+
/**
|
301 |
+
* Settings of All View Types
|
302 |
+
*
|
303 |
+
* @return array
|
304 |
+
*/
|
305 |
+
static function view_type_settings() {
|
306 |
+
|
307 |
+
$view_type_settings = array();
|
308 |
+
|
309 |
+
// Settings of Grid type
|
310 |
+
$view_type_settings['grid'] = PT_CV_Settings::view_type_settings_grid();
|
311 |
+
|
312 |
+
// Settings of Collapsible type
|
313 |
+
$view_type_settings['collapsible'] = PT_CV_Settings::view_type_settings_collapsible();
|
314 |
+
|
315 |
+
// Settings of Scrollable type
|
316 |
+
$view_type_settings['scrollable'] = PT_CV_Settings::view_type_settings_scrollable();
|
317 |
+
|
318 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'view_type_settings', $view_type_settings );
|
319 |
+
|
320 |
+
return $result;
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Layout format options
|
325 |
+
*
|
326 |
+
* @return array
|
327 |
+
*/
|
328 |
+
static function layout_format() {
|
329 |
+
|
330 |
+
$result = array(
|
331 |
+
'1-col' => __( '1 column — All fields inside an output item are shown in one column', PT_CV_DOMAIN ),
|
332 |
+
'2-col' => __( '2 columns — Show thumbnail on the left/right side of other fields', PT_CV_DOMAIN ),
|
333 |
+
);
|
334 |
+
|
335 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'layout_format', $result );
|
336 |
+
|
337 |
+
return $result;
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Open in options
|
342 |
+
*/
|
343 |
+
static function open_in() {
|
344 |
+
|
345 |
+
$open_in = array(
|
346 |
+
'_blank' => __( 'New tab', PT_CV_DOMAIN ),
|
347 |
+
'_self' => __( 'Current tab', PT_CV_DOMAIN ),
|
348 |
+
|
349 |
+
);
|
350 |
+
|
351 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'open_in', $open_in );
|
352 |
+
|
353 |
+
return $result;
|
354 |
+
}
|
355 |
+
|
356 |
+
/**
|
357 |
+
* Get all thumbnail sizes
|
358 |
+
*/
|
359 |
+
static function field_thumbnail_sizes() {
|
360 |
+
// All available thumbnail sizes
|
361 |
+
global $_wp_additional_image_sizes;
|
362 |
+
|
363 |
+
$result = $sizes_to_sort = $dimensions_to_sort = array();
|
364 |
+
|
365 |
+
foreach ( get_intermediate_image_sizes() as $size_name ) {
|
366 |
+
if ( in_array( $size_name, array( 'thumbnail', 'medium', 'large' ) ) ) {
|
367 |
+
$this_size = array();
|
368 |
+
$this_size[] = get_option( $size_name . '_size_w' );
|
369 |
+
$this_size[] = get_option( $size_name . '_size_h' );
|
370 |
+
|
371 |
+
// Add official sizes to result
|
372 |
+
$result[$size_name] = ucfirst( $size_name ) . ' (' . implode( ' × ', $this_size ) . ')';
|
373 |
+
} else {
|
374 |
+
if ( isset( $_wp_additional_image_sizes ) && isset( $_wp_additional_image_sizes[$size_name] ) ) {
|
375 |
+
|
376 |
+
$this_size = array();
|
377 |
+
$this_size['width'] = $_wp_additional_image_sizes[$size_name]['width'];
|
378 |
+
$this_size['height'] = $_wp_additional_image_sizes[$size_name]['height'];
|
379 |
+
|
380 |
+
// Calculate sizes value for sorting
|
381 |
+
$sizes_value = intval( $this_size['width'] ) * intval( $this_size['height'] ) + rand( 1, 10 );
|
382 |
+
|
383 |
+
$dimensions_to_sort[$sizes_value] = $size_name;
|
384 |
+
} else {
|
385 |
+
$this_size = array( 0, 0 );
|
386 |
+
}
|
387 |
+
|
388 |
+
$sizes_to_sort[$size_name] = ucfirst( preg_replace( '/[\-_]/', ' ', $size_name ) ) . ' (' . implode( ' × ', $this_size ) . ')';
|
389 |
+
}
|
390 |
+
}
|
391 |
+
// Add full sizes
|
392 |
+
$result['full'] = __( 'Original resolution (But resize automatically to fit its container)', PT_CV_DOMAIN );
|
393 |
+
|
394 |
+
// Sort custom sizes by index (width * height)
|
395 |
+
krsort( $dimensions_to_sort );
|
396 |
+
|
397 |
+
// Get array element in ASC sorted order
|
398 |
+
foreach ( array_reverse( $dimensions_to_sort ) as $size_name ) {
|
399 |
+
$result[$size_name] = $sizes_to_sort[$size_name];
|
400 |
+
}
|
401 |
+
|
402 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_sizes', $result );
|
403 |
+
|
404 |
+
return $result;
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Tab Position
|
409 |
+
*
|
410 |
+
* @return array
|
411 |
+
*/
|
412 |
+
static function tab_position() {
|
413 |
+
|
414 |
+
$tab_position = array(
|
415 |
+
'top' => __( 'Top', PT_CV_DOMAIN ),
|
416 |
+
'left' => __( 'Left', PT_CV_DOMAIN ),
|
417 |
+
'bottom' => __( 'Bottom', PT_CV_DOMAIN ),
|
418 |
+
'right' => __( 'Right', PT_CV_DOMAIN ),
|
419 |
+
);
|
420 |
+
|
421 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'tab_position', $tab_position );
|
422 |
+
|
423 |
+
return $result;
|
424 |
+
|
425 |
+
}
|
426 |
+
|
427 |
+
/**
|
428 |
+
* Thumbnail Position
|
429 |
+
*
|
430 |
+
* @return array
|
431 |
+
*/
|
432 |
+
static function thumbnail_position() {
|
433 |
+
|
434 |
+
$thumbnail_position = array(
|
435 |
+
'left' => __( 'Left', PT_CV_DOMAIN ),
|
436 |
+
'right' => __( 'Right', PT_CV_DOMAIN ),
|
437 |
+
);
|
438 |
+
|
439 |
+
$result = apply_filters( PT_CV_PREFIX_ . 'thumbnail_position', $thumbnail_position );
|
440 |
+
|
441 |
+
return $result;
|
442 |
+
|
443 |
+
}
|
444 |
+
|
445 |
+
}
|
446 |
+
|
447 |
+
}
|
languages/plugin-name.pot
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2013 TODO
|
2 |
+
# This file is distributed under the same license as the TODO package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: TODO 1.0.0\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/plugins/pt-content-views\n"
|
7 |
+
"POT-Creation-Date: 2013-05-10 11:23:19+00:00\n"
|
8 |
+
"PO-Revision-Date: 2013-05-10 10:37-0500\n"
|
9 |
+
"Last-Translator: FULL NAME <email@example.com>\n"
|
10 |
+
"Language-Team: LANGUAGE <translations@example.com >\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"X-Generator: Poedit 1.5.7\n"
|
15 |
+
"X-Poedit-KeywordsList: __;_e;_n;_x;esc_html_e;esc_html__;esc_attr_e;"
|
16 |
+
"esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2\n"
|
17 |
+
"X-Poedit-Basepath: ../\n"
|
18 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
#: class-pt-content-views-admin.php:170
|
22 |
+
msgid "Page Title"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
#: class-pt-content-views-admin.php:171
|
26 |
+
msgid "Menu Text"
|
27 |
+
msgstr ""
|
28 |
+
|
29 |
+
#: class-pt-content-views-admin.php:197
|
30 |
+
msgid "Settings"
|
31 |
+
msgstr ""
|
public/assets/css/assets.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
/* Do not paste code here, this page used to show code generated automatically */
|
public/assets/css/public.css
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* This stylesheet is used to style the public-facing components of the plugin. */
|
2 |
+
|
3 |
+
.pt-cv-view {
|
4 |
+
position: relative;
|
5 |
+
margin-bottom: 50px;
|
6 |
+
clear: both;
|
7 |
+
}
|
8 |
+
|
9 |
+
/* Common */
|
10 |
+
.pt-cv-page {
|
11 |
+
position: relative;
|
12 |
+
}
|
13 |
+
|
14 |
+
/* Link */
|
15 |
+
.pt-cv-view a {
|
16 |
+
color: #000;
|
17 |
+
text-decoration: none !important;
|
18 |
+
}
|
19 |
+
|
20 |
+
.pt-cv-view a:hover, .pt-cv-view .panel-heading:hover a {
|
21 |
+
color: #ff3c1f;
|
22 |
+
}
|
23 |
+
|
24 |
+
/* Read more */
|
25 |
+
.pt-cv-readmore {
|
26 |
+
color: #fff !important;
|
27 |
+
margin: 10px 0;
|
28 |
+
}
|
29 |
+
|
30 |
+
/* An Item */
|
31 |
+
.pt-cv-content-item {
|
32 |
+
margin-bottom: 1.875em;
|
33 |
+
position: relative;
|
34 |
+
overflow: hidden;
|
35 |
+
}
|
36 |
+
|
37 |
+
/* For the output which shows only Title */
|
38 |
+
.pt-cv-only-title {
|
39 |
+
margin-bottom: 0;
|
40 |
+
}
|
41 |
+
|
42 |
+
/* Title */
|
43 |
+
.pt-cv-title {
|
44 |
+
margin-top: 0;
|
45 |
+
font-size: 20px;
|
46 |
+
}
|
47 |
+
|
48 |
+
.pt-cv-title a {
|
49 |
+
font-weight: 600;
|
50 |
+
}
|
51 |
+
|
52 |
+
/* Thumbnail */
|
53 |
+
.pt-cv-thumbnail {
|
54 |
+
max-width: 100% !important;
|
55 |
+
margin-bottom: 15px;
|
56 |
+
}
|
57 |
+
|
58 |
+
.pt-cv-thumbnail.pull-left {
|
59 |
+
margin-right: 10px;
|
60 |
+
}
|
61 |
+
|
62 |
+
.pt-cv-thumbnail.pull-right {
|
63 |
+
margin-left: 10px;
|
64 |
+
}
|
65 |
+
|
66 |
+
.pt-cv-no-image {
|
67 |
+
min-width: 80px;
|
68 |
+
min-height: 80px;
|
69 |
+
}
|
70 |
+
|
71 |
+
/* Content */
|
72 |
+
.pt-cv-content, .pt-cv-content * {
|
73 |
+
font-size: 14px;
|
74 |
+
zoom: 1;
|
75 |
+
line-height: 1.6em;
|
76 |
+
}
|
77 |
+
|
78 |
+
/* Meta fields */
|
79 |
+
.pt-cv-meta-fields {
|
80 |
+
font-size: 13px;
|
81 |
+
margin-top: 15px;
|
82 |
+
padding-bottom: 15px;
|
83 |
+
}
|
84 |
+
|
85 |
+
.pt-cv-meta-fields * {
|
86 |
+
color: rgba(0, 0, 0, .5);
|
87 |
+
}
|
88 |
+
|
89 |
+
.pt-cv-meta-fields a {
|
90 |
+
color: #41b7d8;
|
91 |
+
}
|
92 |
+
|
93 |
+
/* Pagination */
|
94 |
+
.pt-cv-view + .pagination {
|
95 |
+
float: left;
|
96 |
+
margin: 0 auto !important;
|
97 |
+
}
|
98 |
+
.pt-cv-spinner {
|
99 |
+
display: inline-block;
|
100 |
+
opacity: 0;
|
101 |
+
filter: alpha(opacity=0);
|
102 |
+
color: #0470ec;
|
103 |
+
|
104 |
+
margin-top: 12px;
|
105 |
+
margin-left: 10px;
|
106 |
+
|
107 |
+
-webkit-transition: opacity 0.25s, width 0.25s;
|
108 |
+
-moz-transition: opacity 0.25s, width 0.25s;
|
109 |
+
-o-transition: opacity 0.25s, width 0.25s;
|
110 |
+
transition: opacity 0.25s, width 0.25s;
|
111 |
+
}
|
112 |
+
|
113 |
+
.pt-cv-spinner.active {
|
114 |
+
opacity: 1;
|
115 |
+
filter: alpha(opacity=100);
|
116 |
+
}
|
117 |
+
.pt-cv-clear-pagination {
|
118 |
+
margin-bottom: 50px;
|
119 |
+
}
|
120 |
+
|
121 |
+
/* View type : Collapsible List */
|
122 |
+
.pt-cv-collapsible .panel-heading {
|
123 |
+
padding: 0;
|
124 |
+
}
|
125 |
+
|
126 |
+
.pt-cv-collapsible .panel-heading a {
|
127 |
+
display: block;
|
128 |
+
padding: 10px 15px;
|
129 |
+
}
|
130 |
+
|
131 |
+
/* View type : Scrollable List */
|
132 |
+
|
133 |
+
/* Caption */
|
134 |
+
.pt-cv-view .carousel-caption {
|
135 |
+
text-align: left;
|
136 |
+
left: 0;
|
137 |
+
right: 15px;
|
138 |
+
bottom: 15px;
|
139 |
+
}
|
140 |
+
|
141 |
+
.pt-cv-view .carousel-caption * {
|
142 |
+
text-shadow: none;
|
143 |
+
}
|
144 |
+
|
145 |
+
/* Caption with image */
|
146 |
+
.pt-cv-cap-w-img {
|
147 |
+
background: rgba(0, 0, 0, 0.6);
|
148 |
+
text-shadow: 0px 1px 1px #000;
|
149 |
+
left: 15px !important;
|
150 |
+
padding-left: 10px;
|
151 |
+
}
|
152 |
+
|
153 |
+
.pt-cv-cap-w-img * {
|
154 |
+
color: #fff;
|
155 |
+
}
|
156 |
+
|
157 |
+
.pt-cv-cap-w-img .pt-cv-title a {
|
158 |
+
color: #fff !important;
|
159 |
+
}
|
160 |
+
|
161 |
+
/* Caption without image */
|
162 |
+
.pt-cv-cap-wo-img {
|
163 |
+
position: relative;
|
164 |
+
}
|
165 |
+
|
166 |
+
.pt-cv-cap-wo-img * {
|
167 |
+
color: #000;
|
168 |
+
}
|
169 |
+
|
170 |
+
/* Control */
|
171 |
+
.pt-cv-view .carousel-control {
|
172 |
+
background-image: none !important;
|
173 |
+
z-index: 1000;
|
174 |
+
height: 30px;
|
175 |
+
width: 40px;
|
176 |
+
bottom: 0;
|
177 |
+
top: auto;
|
178 |
+
}
|
179 |
+
|
180 |
+
/* Indicator */
|
181 |
+
.pt-cv-view .carousel-indicators {
|
182 |
+
bottom: 0;
|
183 |
+
margin-bottom: 4px;
|
184 |
+
}
|
185 |
+
|
186 |
+
.pt-cv-view .carousel-indicators li {
|
187 |
+
background: #cecece;
|
188 |
+
border: 1px solid #cecece;
|
189 |
+
}
|
190 |
+
|
191 |
+
.pt-cv-view .carousel-indicators li.active {
|
192 |
+
background: #428bca;
|
193 |
+
border: 1px solid #428bca;
|
194 |
+
}
|
public/assets/js/assets.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
/* Do not paste code here, this page used to show code generated automatically */
|
public/assets/js/public.js
ADDED
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
$.PT_CV_Public = $.PT_CV_Public || { };
|
5 |
+
|
6 |
+
$.PT_CV_Public = function (options) {
|
7 |
+
this.options = options;
|
8 |
+
|
9 |
+
this.pagination();
|
10 |
+
this.openin_window();
|
11 |
+
};
|
12 |
+
|
13 |
+
$.PT_CV_Public.prototype = {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Bootstrap pagination
|
17 |
+
* @returns {undefined}
|
18 |
+
*/
|
19 |
+
pagination: function () {
|
20 |
+
var $self = this;
|
21 |
+
var _prefix = PT_CV_PUBLIC._prefix;
|
22 |
+
|
23 |
+
// Bootstrap paginator
|
24 |
+
$('.' + _prefix + 'pagination').each(function () {
|
25 |
+
var this_ = $(this);
|
26 |
+
var total_pages = $(this).attr('data-totalpages');
|
27 |
+
$(this).bootstrapPaginator({
|
28 |
+
bootstrapMajorVersion: 3,
|
29 |
+
totalPages : total_pages,
|
30 |
+
shouldShowPage : function (type, page, current) {
|
31 |
+
if (total_pages < 10) {
|
32 |
+
switch (type) {
|
33 |
+
case "first":
|
34 |
+
case "last":
|
35 |
+
return false;
|
36 |
+
default:
|
37 |
+
return true;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
},
|
41 |
+
// When changing page
|
42 |
+
onPageClicked : function (e, originalEvent, type, page) {
|
43 |
+
var selected_page = page;
|
44 |
+
|
45 |
+
$self._setup_pagination(this_, selected_page, function () {
|
46 |
+
$self.doing = 0;
|
47 |
+
});
|
48 |
+
}
|
49 |
+
});
|
50 |
+
});
|
51 |
+
},
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get parameters to process pagination
|
55 |
+
*
|
56 |
+
* @param object this_
|
57 |
+
* @param int selected_page
|
58 |
+
* @param function callback
|
59 |
+
* @returns {undefined}
|
60 |
+
*/
|
61 |
+
_setup_pagination: function (this_, selected_page, callback) {
|
62 |
+
var $self = this;
|
63 |
+
var _prefix = PT_CV_PUBLIC._prefix;
|
64 |
+
|
65 |
+
// Prevent duplicate processing
|
66 |
+
if ($self.doing) {
|
67 |
+
return;
|
68 |
+
} else {
|
69 |
+
$self.doing = 1;
|
70 |
+
}
|
71 |
+
|
72 |
+
var view_id = this_.attr('data-id');
|
73 |
+
var spinner = this_.next('.' + _prefix + 'spinner');
|
74 |
+
var pages_holder = this_.prev('.' + _prefix + 'view');
|
75 |
+
|
76 |
+
// For Timeline
|
77 |
+
if ( pages_holder.hasClass(_prefix + 'timeline') ) {
|
78 |
+
pages_holder = pages_holder.children('.tl-items');
|
79 |
+
}
|
80 |
+
|
81 |
+
$self._get_page(view_id, selected_page, spinner, pages_holder, callback);
|
82 |
+
},
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Get wrapper of selected page
|
86 |
+
*
|
87 |
+
* @param string view_id The id of view
|
88 |
+
* @param int selected_page The page to show
|
89 |
+
* @param object spinner The jquery object of loading element
|
90 |
+
* @param string pages_holder The selector expression of wrapper of pages
|
91 |
+
* @param null|function callback The callback function
|
92 |
+
* @returns void
|
93 |
+
*/
|
94 |
+
_get_page: function (view_id, selected_page, spinner, pages_holder, callback) {
|
95 |
+
|
96 |
+
var $self = this;
|
97 |
+
|
98 |
+
var page_existed = $self._active_page(selected_page, pages_holder, callback);
|
99 |
+
|
100 |
+
if (page_existed) {
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
+
// Setup data
|
105 |
+
var data = {
|
106 |
+
action : 'pagination_request',
|
107 |
+
id : view_id,
|
108 |
+
page : selected_page,
|
109 |
+
ajax_nonce: PT_CV_PUBLIC._nonce
|
110 |
+
};
|
111 |
+
|
112 |
+
// Sent POST request
|
113 |
+
$.ajax({
|
114 |
+
type : "POST",
|
115 |
+
url : PT_CV_PUBLIC.ajaxurl,
|
116 |
+
data : data,
|
117 |
+
beforeSend: function () {
|
118 |
+
// Show loading icon
|
119 |
+
spinner.toggleClass('active');
|
120 |
+
}
|
121 |
+
}).done(function (response) {
|
122 |
+
// Hide loading icon
|
123 |
+
spinner.toggleClass('active');
|
124 |
+
|
125 |
+
// Update content of Preview box
|
126 |
+
pages_holder.append(response);
|
127 |
+
|
128 |
+
// Active current page
|
129 |
+
$self._active_page(selected_page, pages_holder, callback);
|
130 |
+
});
|
131 |
+
},
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Show content of selected page
|
135 |
+
*
|
136 |
+
* @param int selected_page The page to show
|
137 |
+
* @param string pages_holder The selector expression of wrapper of pages
|
138 |
+
* @param null|function callback The callback function
|
139 |
+
* @returns bool
|
140 |
+
*/
|
141 |
+
_active_page: function (selected_page, pages_holder, callback) {
|
142 |
+
var _prefix = PT_CV_PUBLIC._prefix;
|
143 |
+
var page_existed = false;
|
144 |
+
var page_selector = '#' + _prefix + 'page' + '-' + parseInt(selected_page);
|
145 |
+
|
146 |
+
if (pages_holder.children(page_selector).length) {
|
147 |
+
page_existed = true;
|
148 |
+
|
149 |
+
// Hide all pages
|
150 |
+
pages_holder.children().hide();
|
151 |
+
|
152 |
+
// Show this page
|
153 |
+
pages_holder.children(page_selector).show();
|
154 |
+
|
155 |
+
// Scroll to this page
|
156 |
+
$('html, body').animate({
|
157 |
+
scrollTop: pages_holder.children(page_selector).offset().top - 160
|
158 |
+
}, 1000);
|
159 |
+
}
|
160 |
+
|
161 |
+
if (callback && typeof callback === 'function') {
|
162 |
+
callback();
|
163 |
+
}
|
164 |
+
|
165 |
+
// Trigger to make Pinterest layout works when do pagination
|
166 |
+
if ($('.' + _prefix + 'pinterest').length && PT_CV_PUBLIC.is_admin) {
|
167 |
+
$('body').trigger(_prefix + 'custom-trigger');
|
168 |
+
}
|
169 |
+
|
170 |
+
// Trigger action after pagination finished
|
171 |
+
$('body').trigger(_prefix + 'pagination-finished');
|
172 |
+
|
173 |
+
return page_existed;
|
174 |
+
},
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Open in new window
|
178 |
+
*
|
179 |
+
* @returns {undefined}
|
180 |
+
*/
|
181 |
+
openin_window: function () {
|
182 |
+
var _prefix = PT_CV_PUBLIC._prefix;
|
183 |
+
|
184 |
+
$('body').on('click', '.' + _prefix + 'window', function (e) {
|
185 |
+
e.preventDefault();
|
186 |
+
|
187 |
+
var this_ = $(this);
|
188 |
+
|
189 |
+
var href = this_.attr('href');
|
190 |
+
var width = this_.attr('data-width');
|
191 |
+
var height = this_.attr('data-height');
|
192 |
+
var left = (window.screen.width / 2) - (width / 2);
|
193 |
+
var top = (window.screen.height / 2) - (height / 2);
|
194 |
+
|
195 |
+
var settings = 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, ';
|
196 |
+
window.open(href, "_blank", settings + ' top=' + top + ', left=' + left + ', width=' + width + ', height=' + height);
|
197 |
+
});
|
198 |
+
}
|
199 |
+
};
|
200 |
+
|
201 |
+
$(function () {
|
202 |
+
|
203 |
+
var _prefix = PT_CV_PUBLIC._prefix;
|
204 |
+
|
205 |
+
// Run at page load
|
206 |
+
var $pt_cv_public_js = new $.PT_CV_Public({_prefix: _prefix});
|
207 |
+
|
208 |
+
// Trigger in Admin, for Preview
|
209 |
+
if (PT_CV_PUBLIC.is_admin) {
|
210 |
+
$('body').bind(_prefix + 'custom-trigger', function () {
|
211 |
+
$pt_cv_public_js.pagination();
|
212 |
+
});
|
213 |
+
}
|
214 |
+
|
215 |
+
});
|
216 |
+
|
217 |
+
}(jQuery));
|
public/content-views.php
ADDED
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Content Views for Public
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
class PT_Content_Views {
|
12 |
+
|
13 |
+
/**
|
14 |
+
* The variable name is used as the text domain when internationalizing strings
|
15 |
+
* of text. Its value should match the Text Domain file header in the main
|
16 |
+
* plugin file.
|
17 |
+
*
|
18 |
+
* @since 1.0.0
|
19 |
+
*
|
20 |
+
* @var string
|
21 |
+
*/
|
22 |
+
protected $plugin_slug = PT_CV_DOMAIN;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Instance of this class.
|
26 |
+
*
|
27 |
+
* @since 1.0.0
|
28 |
+
*
|
29 |
+
* @var object
|
30 |
+
*/
|
31 |
+
protected static $instance = null;
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Initialize the plugin by setting localization and loading public scripts
|
35 |
+
* and styles.
|
36 |
+
*
|
37 |
+
* @since 1.0.0
|
38 |
+
*/
|
39 |
+
private function __construct() {
|
40 |
+
|
41 |
+
// Load plugin text domain
|
42 |
+
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
43 |
+
|
44 |
+
// Register content
|
45 |
+
add_action( 'init', array( $this, 'content_register' ) );
|
46 |
+
|
47 |
+
// Activate plugin when new blog is added
|
48 |
+
add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
|
49 |
+
|
50 |
+
// Load public-facing style sheet and JavaScript.
|
51 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
|
52 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
53 |
+
|
54 |
+
// Update view count of post
|
55 |
+
add_action( 'wp_head', array( &$this, 'update_view_count' ) );
|
56 |
+
|
57 |
+
// Output assets content at footer of page
|
58 |
+
add_action( 'wp_footer', array( 'PT_CV_Html', 'assets_of_view_types' ) );
|
59 |
+
|
60 |
+
// Ajax action
|
61 |
+
$action = 'pagination_request';
|
62 |
+
add_action( 'wp_ajax_' . $action, array( 'PT_CV_Functions', 'ajax_callback_' . $action ) );
|
63 |
+
|
64 |
+
// Custom hooks for both preview & frontend
|
65 |
+
PT_CV_Hooks::init();
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Return the plugin slug.
|
70 |
+
*
|
71 |
+
* @since 1.0.0
|
72 |
+
*
|
73 |
+
* @return Plugin slug variable.
|
74 |
+
*/
|
75 |
+
public function get_plugin_slug() {
|
76 |
+
return $this->plugin_slug;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Return an instance of this class.
|
81 |
+
*
|
82 |
+
* @since 1.0.0
|
83 |
+
*
|
84 |
+
* @return object A single instance of this class.
|
85 |
+
*/
|
86 |
+
public static function get_instance() {
|
87 |
+
|
88 |
+
// If the single instance hasn't been set, set it now.
|
89 |
+
if ( null == self::$instance ) {
|
90 |
+
self::$instance = new self;
|
91 |
+
}
|
92 |
+
|
93 |
+
return self::$instance;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Fired when the plugin is activated.
|
98 |
+
*
|
99 |
+
* @since 1.0.0
|
100 |
+
*
|
101 |
+
* @param boolean $network_wide True if WPMU superadmin uses
|
102 |
+
* "Network Activate" action, false if
|
103 |
+
* WPMU is disabled or plugin is
|
104 |
+
* activated on an individual blog.
|
105 |
+
*/
|
106 |
+
public static function activate( $network_wide ) {
|
107 |
+
|
108 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
109 |
+
|
110 |
+
if ( $network_wide ) {
|
111 |
+
|
112 |
+
// Get all blog ids
|
113 |
+
$blog_ids = self::get_blog_ids();
|
114 |
+
|
115 |
+
foreach ( $blog_ids as $blog_id ) {
|
116 |
+
|
117 |
+
switch_to_blog( $blog_id );
|
118 |
+
self::single_activate();
|
119 |
+
}
|
120 |
+
|
121 |
+
restore_current_blog();
|
122 |
+
} else {
|
123 |
+
self::single_activate();
|
124 |
+
}
|
125 |
+
} else {
|
126 |
+
self::single_activate();
|
127 |
+
}
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Fired when the plugin is deactivated.
|
132 |
+
*
|
133 |
+
* @since 1.0.0
|
134 |
+
*
|
135 |
+
* @param boolean $network_wide True if WPMU superadmin uses
|
136 |
+
* "Network Deactivate" action, false if
|
137 |
+
* WPMU is disabled or plugin is
|
138 |
+
* deactivated on an individual blog.
|
139 |
+
*/
|
140 |
+
public static function deactivate( $network_wide ) {
|
141 |
+
|
142 |
+
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
|
143 |
+
|
144 |
+
if ( $network_wide ) {
|
145 |
+
|
146 |
+
// Get all blog ids
|
147 |
+
$blog_ids = self::get_blog_ids();
|
148 |
+
|
149 |
+
foreach ( $blog_ids as $blog_id ) {
|
150 |
+
|
151 |
+
switch_to_blog( $blog_id );
|
152 |
+
self::single_deactivate();
|
153 |
+
}
|
154 |
+
|
155 |
+
restore_current_blog();
|
156 |
+
} else {
|
157 |
+
self::single_deactivate();
|
158 |
+
}
|
159 |
+
} else {
|
160 |
+
self::single_deactivate();
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Fired when a new site is activated with a WPMU environment.
|
166 |
+
*
|
167 |
+
* @since 1.0.0
|
168 |
+
*
|
169 |
+
* @param int $blog_id ID of the new blog.
|
170 |
+
*/
|
171 |
+
public function activate_new_site( $blog_id ) {
|
172 |
+
|
173 |
+
if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
|
174 |
+
return;
|
175 |
+
}
|
176 |
+
|
177 |
+
switch_to_blog( $blog_id );
|
178 |
+
self::single_activate();
|
179 |
+
restore_current_blog();
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Get all blog ids of blogs in the current network that are:
|
184 |
+
* - not archived
|
185 |
+
* - not spam
|
186 |
+
* - not deleted
|
187 |
+
*
|
188 |
+
* @since 1.0.0
|
189 |
+
*
|
190 |
+
* @return array|false The blog ids, false if no matches.
|
191 |
+
*/
|
192 |
+
private static function get_blog_ids() {
|
193 |
+
|
194 |
+
global $wpdb;
|
195 |
+
|
196 |
+
// Get an array of blog ids
|
197 |
+
$sql = "SELECT blog_id FROM $wpdb->blogs
|
198 |
+
WHERE archived = '0' AND spam = '0'
|
199 |
+
AND deleted = '0'";
|
200 |
+
|
201 |
+
return $wpdb->get_col( $sql );
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Fired for each blog when the plugin is activated.
|
206 |
+
*
|
207 |
+
* @since 1.0.0
|
208 |
+
*/
|
209 |
+
private static function single_activate() {
|
210 |
+
update_option( PT_CV_OPTION_VERSION, PT_CV_VERSION );
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Fired for each blog when the plugin is deactivated.
|
215 |
+
*
|
216 |
+
* @since 1.0.0
|
217 |
+
*/
|
218 |
+
private static function single_deactivate() {
|
219 |
+
delete_option( PT_CV_OPTION_VERSION );
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
* Load the plugin text domain for translation.
|
224 |
+
*
|
225 |
+
* @since 1.0.0
|
226 |
+
*/
|
227 |
+
public function load_plugin_textdomain() {
|
228 |
+
|
229 |
+
$domain = $this->plugin_slug;
|
230 |
+
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
|
231 |
+
|
232 |
+
load_textdomain( $domain, trailingslashit( WP_LANG_DIR ) . $domain . '/' . $domain . '-' . $locale . '.mo' );
|
233 |
+
load_plugin_textdomain( $domain, FALSE, basename( plugin_dir_path( dirname( __FILE__ ) ) ) . '/languages/' );
|
234 |
+
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Content register: Create custom post type
|
239 |
+
*/
|
240 |
+
public function content_register() {
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Register custom post type : View
|
244 |
+
*/
|
245 |
+
$labels = array(
|
246 |
+
'name' => _x( 'Views', 'post type general name', PT_CV_DOMAIN ),
|
247 |
+
'singular_name' => _x( 'View', 'post type singular name', PT_CV_DOMAIN ),
|
248 |
+
'menu_name' => _x( 'Views', 'admin menu', PT_CV_DOMAIN ),
|
249 |
+
'name_admin_bar' => _x( 'View', 'add new on admin bar', PT_CV_DOMAIN ),
|
250 |
+
'add_new' => _x( 'Add New', PT_CV_POST_TYPE, PT_CV_DOMAIN ),
|
251 |
+
'add_new_item' => __( 'Add New View', PT_CV_DOMAIN ),
|
252 |
+
'new_item' => __( 'New View', PT_CV_DOMAIN ),
|
253 |
+
'edit_item' => __( 'Edit View', PT_CV_DOMAIN ),
|
254 |
+
'view_item' => __( 'View View', PT_CV_DOMAIN ),
|
255 |
+
'all_items' => __( 'All Views', PT_CV_DOMAIN ),
|
256 |
+
'search_items' => __( 'Search Views', PT_CV_DOMAIN ),
|
257 |
+
'parent_item_colon' => __( 'Parent Views:', PT_CV_DOMAIN ),
|
258 |
+
'not_found' => __( 'No views found.', PT_CV_DOMAIN ),
|
259 |
+
'not_found_in_trash' => __( 'No views found in Trash.', PT_CV_DOMAIN ),
|
260 |
+
);
|
261 |
+
|
262 |
+
$args = array(
|
263 |
+
'labels' => $labels,
|
264 |
+
'public' => true,
|
265 |
+
'publicly_queryable' => true,
|
266 |
+
|
267 |
+
// Hide in menu, but can see All Views page
|
268 |
+
'show_ui' => false,
|
269 |
+
'show_in_menu' => false,
|
270 |
+
|
271 |
+
'query_var' => true,
|
272 |
+
'rewrite' => array( 'slug' => PT_CV_POST_TYPE ),
|
273 |
+
'capability_type' => 'post',
|
274 |
+
'has_archive' => true,
|
275 |
+
'hierarchical' => false,
|
276 |
+
'menu_position' => null,
|
277 |
+
'supports' => array( 'title', 'author', 'custom-fields' ),
|
278 |
+
);
|
279 |
+
|
280 |
+
register_post_type( PT_CV_POST_TYPE, $args );
|
281 |
+
|
282 |
+
/**
|
283 |
+
* Add shortcode
|
284 |
+
*/
|
285 |
+
add_shortcode( PT_CV_POST_TYPE, array( 'PT_CV_Functions', 'view_output' ) );
|
286 |
+
}
|
287 |
+
|
288 |
+
/**
|
289 |
+
* Register and enqueue public-facing style sheet.
|
290 |
+
*
|
291 |
+
* @since 1.0.0
|
292 |
+
*/
|
293 |
+
public function enqueue_styles() {
|
294 |
+
PT_CV_Html::frontend_styles();
|
295 |
+
}
|
296 |
+
|
297 |
+
/**
|
298 |
+
* Register and enqueues public-facing JavaScript files.
|
299 |
+
*
|
300 |
+
* @since 1.0.0
|
301 |
+
*/
|
302 |
+
public function enqueue_scripts() {
|
303 |
+
PT_CV_Html::frontend_scripts();
|
304 |
+
}
|
305 |
+
|
306 |
+
/**
|
307 |
+
* Update view count
|
308 |
+
*
|
309 |
+
* @global type $post
|
310 |
+
* @return void
|
311 |
+
*/
|
312 |
+
public function update_view_count() {
|
313 |
+
global $post;
|
314 |
+
if ( ! isset( $post ) || ! is_object( $post ) ) {
|
315 |
+
return;
|
316 |
+
}
|
317 |
+
if ( is_single( $post->ID ) ) {
|
318 |
+
PT_CV_Functions::post_update_view_count( $post->ID );
|
319 |
+
}
|
320 |
+
}
|
321 |
+
|
322 |
+
}
|
public/templates/_view_type_/css/main.css
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Style Name: View type
|
3 |
+
*
|
4 |
+
* @package PT_Content_Views_Admin
|
5 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
6 |
+
* @license GPL-2.0+
|
7 |
+
* @link http://example.com
|
8 |
+
* @copyright 2014 Palace Of Themes
|
9 |
+
*/
|
10 |
+
|
public/templates/_view_type_/html/main.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Layout Name: View type
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views_Admin
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
$html = array();
|
13 |
+
|
14 |
+
$layout = $dargs['layout-format'];
|
15 |
+
|
16 |
+
// Prevent the case: there are 2 columns but have not setting for thumbnail position
|
17 |
+
if ( $layout == '2-col' && ! isset( $dargs['field-settings']['thumbnail'] ) ) {
|
18 |
+
$layout = '1-col';
|
19 |
+
}
|
20 |
+
|
21 |
+
switch ( $layout ) {
|
22 |
+
case '1-col':
|
23 |
+
foreach ( $fields_html as $field_html ) {
|
24 |
+
$html[] = $field_html;
|
25 |
+
}
|
26 |
+
break;
|
27 |
+
case '2-col':
|
28 |
+
|
29 |
+
// Thumbnail html
|
30 |
+
$thumbnail_html = $fields_html['thumbnail'];
|
31 |
+
|
32 |
+
// Other fields html
|
33 |
+
unset( $fields_html['thumbnail'] );
|
34 |
+
$others_html = implode( "\n", $fields_html );
|
35 |
+
|
36 |
+
$html[] = $thumbnail_html;
|
37 |
+
$html[] = $others_html;
|
38 |
+
|
39 |
+
break;
|
40 |
+
}
|
41 |
+
|
42 |
+
echo balanceTags( implode( "\n", $html ) );
|
public/templates/_view_type_/js/main.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Script Name: View type
|
3 |
+
*
|
4 |
+
* @package PT_Content_Views_Admin
|
5 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
6 |
+
* @license GPL-2.0+
|
7 |
+
* @link http://example.com
|
8 |
+
* @copyright 2014 Palace Of Themes
|
9 |
+
*/
|
10 |
+
|
public/templates/collapsible/html/main.php
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Layout Name: Collapsible List
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views_Admin
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
$html = array();
|
13 |
+
|
14 |
+
$layout = $dargs['layout-format'];
|
15 |
+
|
16 |
+
// Prevent the case: there are 2 columns but have not setting for thumbnail position
|
17 |
+
if ( $layout == '2-col' && ! isset( $dargs['field-settings']['thumbnail'] ) ) {
|
18 |
+
$layout = '1-col';
|
19 |
+
}
|
20 |
+
|
21 |
+
// Get title
|
22 |
+
$heading = isset( $fields_html['title'] ) ? $fields_html['title'] : '';
|
23 |
+
unset( $fields_html['title'] );
|
24 |
+
|
25 |
+
switch ( $layout ) {
|
26 |
+
case '1-col':
|
27 |
+
foreach ( $fields_html as $field_html ) {
|
28 |
+
$html[] = $field_html;
|
29 |
+
}
|
30 |
+
break;
|
31 |
+
case '2-col':
|
32 |
+
|
33 |
+
// Thumbnail html
|
34 |
+
$thumbnail_html = $fields_html['thumbnail'];
|
35 |
+
|
36 |
+
// Other fields html
|
37 |
+
unset( $fields_html['thumbnail'] );
|
38 |
+
$others_html = implode( "\n", $fields_html );
|
39 |
+
|
40 |
+
$html[] = $thumbnail_html;
|
41 |
+
$html[] = $others_html;
|
42 |
+
|
43 |
+
break;
|
44 |
+
}
|
45 |
+
|
46 |
+
$random_id = PT_CV_Functions::string_random();
|
47 |
+
?>
|
48 |
+
<div class="panel panel-default">
|
49 |
+
<div class="panel-heading">
|
50 |
+
<a class="panel-title" data-toggle="collapse" data-parent="#<?php echo esc_attr( PT_CV_PREFIX_UPPER . 'ID' ); ?>" href="#<?php echo esc_attr( $random_id ); ?>">
|
51 |
+
<?php echo balanceTags( strip_tags( $heading ) ); ?>
|
52 |
+
</a>
|
53 |
+
<?php
|
54 |
+
// Custom toggle icon
|
55 |
+
$toggle_icon = apply_filters( PT_CV_PREFIX_ . 'scrollable_toggle_icon', '' );
|
56 |
+
echo balanceTags( $toggle_icon );
|
57 |
+
?>
|
58 |
+
</div>
|
59 |
+
<div id="<?php echo esc_attr( $random_id ); ?>" class="panel-collapse collapse <?php echo esc_attr( PT_CV_PREFIX_UPPER . 'CLASS' ); ?>">
|
60 |
+
<div class="panel-body">
|
61 |
+
<?php
|
62 |
+
echo balanceTags( implode( "\n", $html ) );
|
63 |
+
?>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
</div>
|
public/templates/grid/html/main.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Layout Name: Grid
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views_Admin
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
$html = array();
|
13 |
+
|
14 |
+
$layout = $dargs['layout-format'];
|
15 |
+
|
16 |
+
// Prevent the case: there are 2 columns but have not setting for thumbnail position
|
17 |
+
if ( $layout == '2-col' && ! isset( $dargs['field-settings']['thumbnail'] ) ) {
|
18 |
+
$layout = '1-col';
|
19 |
+
}
|
20 |
+
|
21 |
+
switch ( $layout ) {
|
22 |
+
case '1-col':
|
23 |
+
foreach ( $fields_html as $field_html ) {
|
24 |
+
$html[] = $field_html;
|
25 |
+
}
|
26 |
+
break;
|
27 |
+
case '2-col':
|
28 |
+
|
29 |
+
// Thumbnail html
|
30 |
+
$html[] = $fields_html['thumbnail'];
|
31 |
+
|
32 |
+
// Other fields html
|
33 |
+
unset( $fields_html['thumbnail'] );
|
34 |
+
$others_html = implode( "\n", $fields_html );
|
35 |
+
$html[] = $others_html;
|
36 |
+
|
37 |
+
break;
|
38 |
+
}
|
39 |
+
|
40 |
+
echo balanceTags( implode( "\n", $html ) );
|
public/templates/readme.txt
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
== Description ==
|
3 |
+
This folder contains HTML output of View types:
|
4 |
+
Grid
|
5 |
+
Collapsible List
|
6 |
+
Tab
|
7 |
+
...
|
8 |
+
|
9 |
+
Folder structure:
|
10 |
+
name_of_view_type
|
11 |
+
html
|
12 |
+
main.php : HTML layout - Style 1
|
13 |
+
style2.php : HTML layout - Style 2
|
14 |
+
css
|
15 |
+
main.css : stylesheet - Style 1
|
16 |
+
style2.css : stylesheet - Style 2
|
17 |
+
js
|
18 |
+
main.js : script - Style 1
|
19 |
+
script2.js : script - Style 2
|
public/templates/scrollable/html/main.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Layout Name: Scrollable List
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views_Admin
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
$html = array();
|
13 |
+
|
14 |
+
$ex_cap_cls = PT_CV_PREFIX . 'cap-w-img';;
|
15 |
+
|
16 |
+
if ( ! empty( $fields_html['thumbnail'] ) ) {
|
17 |
+
// Thumbnail html
|
18 |
+
$html[] = $fields_html['thumbnail'];
|
19 |
+
unset( $fields_html['thumbnail'] );
|
20 |
+
} else {
|
21 |
+
$ex_cap_cls = PT_CV_PREFIX . 'cap-wo-img';
|
22 |
+
}
|
23 |
+
|
24 |
+
// Other fields html
|
25 |
+
$others_html = implode( "\n", $fields_html );
|
26 |
+
|
27 |
+
// Get wrapper class of caption
|
28 |
+
$caption_class = apply_filters( PT_CV_PREFIX_ . 'scrollable_caption_class', array( 'carousel-caption', $ex_cap_cls ) );
|
29 |
+
$html[] = sprintf( '<div class="%s">%s</div>', esc_attr( implode( ' ', array_filter( $caption_class ) ) ), balanceTags( $others_html ) );
|
30 |
+
|
31 |
+
echo balanceTags( implode( "\n", $html ) );
|
uninstall.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Uninstall the plugin
|
4 |
+
*
|
5 |
+
* @package PT_Content_Views
|
6 |
+
* @author Palace Of Themes <palaceofthemes@gmail.com>
|
7 |
+
* @license GPL-2.0+
|
8 |
+
* @link http://example.com
|
9 |
+
* @copyright 2014 Palace Of Themes
|
10 |
+
*/
|
11 |
+
|
12 |
+
// If uninstall not called from WordPress, then exit
|
13 |
+
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
// Include library files
|
18 |
+
include_once( plugin_dir_path( __FILE__ ) . 'includes/defines.php' );
|
19 |
+
|
20 |
+
// Delete all posts of PT View post type ?
|
21 |
+
|