Gentoo Archives: gentoo-commits

From: "John R. Graham" <john_r_graham@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/forums:styles commit in: AllanStyle-SUBSILVER/theme/, AllanStyle-SUBSILVER/, ...
Date: Sat, 04 May 2019 22:31:27
Message-Id: 1557009027.96d05d17f84365f69fbabf8ac4a9f38e7c52c2ec.john_r_graham@gentoo
1 commit: 96d05d17f84365f69fbabf8ac4a9f38e7c52c2ec
2 Author: John R. Graham <john_r_graham <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 4 20:18:48 2019 +0000
4 Commit: John R. Graham <john_r_graham <AT> gentoo <DOT> org>
5 CommitDate: Sat May 4 22:30:27 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/forums.git/commit/?id=96d05d17
7
8 Committing upstream AllanStyle-SUBSILVER_v.2.0.3
9
10 There's no visible upstream git repository but this was retrieved
11 from:
12 https://www.phpbb.com/customise/db/style/allan_style_subsilver/
13
14 Signed-off-by: John R. Graham <john_r_graham <AT> gentoo.org>
15
16 AllanStyle-SUBSILVER/license.txt | 339 +
17 AllanStyle-SUBSILVER/style.cfg | 32 +
18 AllanStyle-SUBSILVER/template/collapse.js | 68 +
19 AllanStyle-SUBSILVER/template/forumlist_body.html | 133 +
20 AllanStyle-SUBSILVER/template/index_body.html | 88 +
21 AllanStyle-SUBSILVER/template/jquery-ui.js | 15003 +++++++++++++++++++
22 AllanStyle-SUBSILVER/template/navbar_header.html | 228 +
23 AllanStyle-SUBSILVER/template/overall_footer.html | 96 +
24 AllanStyle-SUBSILVER/template/overall_header.html | 135 +
25 AllanStyle-SUBSILVER/template/viewtopic_body.html | 457 +
26 AllanStyle-SUBSILVER/theme/base.css | 115 +
27 AllanStyle-SUBSILVER/theme/bidi.css | 1090 ++
28 AllanStyle-SUBSILVER/theme/buttons.css | 198 +
29 AllanStyle-SUBSILVER/theme/colours.css | 1207 ++
30 AllanStyle-SUBSILVER/theme/common.css | 1297 ++
31 AllanStyle-SUBSILVER/theme/content.css | 906 ++
32 AllanStyle-SUBSILVER/theme/cp.css | 371 +
33 AllanStyle-SUBSILVER/theme/en/icon_user_online.gif | Bin 0 -> 423 bytes
34 AllanStyle-SUBSILVER/theme/en/stylesheet.css | 2 +
35 AllanStyle-SUBSILVER/theme/forms.css | 429 +
36 AllanStyle-SUBSILVER/theme/icons.css | 96 +
37 .../theme/images/announce_read.gif | Bin 0 -> 307 bytes
38 .../theme/images/announce_read_locked.gif | Bin 0 -> 304 bytes
39 .../theme/images/announce_read_locked_mine.gif | Bin 0 -> 324 bytes
40 .../theme/images/announce_read_mine.gif | Bin 0 -> 328 bytes
41 .../theme/images/announce_unread.gif | Bin 0 -> 289 bytes
42 .../theme/images/announce_unread_locked.gif | Bin 0 -> 292 bytes
43 .../theme/images/announce_unread_locked_mine.gif | Bin 0 -> 308 bytes
44 .../theme/images/announce_unread_mine.gif | Bin 0 -> 305 bytes
45 AllanStyle-SUBSILVER/theme/images/bg_header.gif | Bin 0 -> 928 bytes
46 AllanStyle-SUBSILVER/theme/images/bg_list.gif | Bin 0 -> 928 bytes
47 AllanStyle-SUBSILVER/theme/images/collapse-btn.png | Bin 0 -> 1269 bytes
48 AllanStyle-SUBSILVER/theme/images/forum_link.gif | Bin 0 -> 714 bytes
49 AllanStyle-SUBSILVER/theme/images/forum_read.gif | Bin 0 -> 677 bytes
50 .../theme/images/forum_read_locked.gif | Bin 0 -> 673 bytes
51 .../theme/images/forum_read_subforum.gif | Bin 0 -> 705 bytes
52 AllanStyle-SUBSILVER/theme/images/forum_unread.gif | Bin 0 -> 663 bytes
53 .../theme/images/forum_unread_locked.gif | Bin 0 -> 660 bytes
54 .../theme/images/forum_unread_subforum.gif | Bin 0 -> 688 bytes
55 .../theme/images/icon_download.gif | Bin 0 -> 198 bytes
56 AllanStyle-SUBSILVER/theme/images/icon_offline.gif | Bin 0 -> 322 bytes
57 AllanStyle-SUBSILVER/theme/images/icon_online.gif | Bin 0 -> 331 bytes
58 .../theme/images/icon_rate_bad.gif | Bin 0 -> 465 bytes
59 .../theme/images/icon_rate_good.gif | Bin 0 -> 462 bytes
60 .../theme/images/icons_contact.png | Bin 0 -> 8507 bytes
61 AllanStyle-SUBSILVER/theme/images/index.htm | 0
62 AllanStyle-SUBSILVER/theme/images/loading.gif | Bin 0 -> 1320 bytes
63 AllanStyle-SUBSILVER/theme/images/no_avatar.gif | Bin 0 -> 930 bytes
64 .../theme/images/plupload/done.gif | Bin 0 -> 1024 bytes
65 .../theme/images/plupload/error.gif | Bin 0 -> 994 bytes
66 .../theme/images/plupload/throbber.gif | Bin 0 -> 1922 bytes
67 AllanStyle-SUBSILVER/theme/images/quote.gif | Bin 0 -> 153 bytes
68 AllanStyle-SUBSILVER/theme/images/quote_rtl.gif | Bin 0 -> 154 bytes
69 AllanStyle-SUBSILVER/theme/images/site_logo.gif | Bin 0 -> 7019 bytes
70 AllanStyle-SUBSILVER/theme/images/sticky_read.gif | Bin 0 -> 344 bytes
71 .../theme/images/sticky_read_locked.gif | Bin 0 -> 338 bytes
72 .../theme/images/sticky_read_locked_mine.gif | Bin 0 -> 336 bytes
73 .../theme/images/sticky_read_mine.gif | Bin 0 -> 352 bytes
74 .../theme/images/sticky_unread.gif | Bin 0 -> 325 bytes
75 .../theme/images/sticky_unread_locked.gif | Bin 0 -> 324 bytes
76 .../theme/images/sticky_unread_locked_mine.gif | Bin 0 -> 336 bytes
77 .../theme/images/sticky_unread_mine.gif | Bin 0 -> 339 bytes
78 AllanStyle-SUBSILVER/theme/images/topic_moved.gif | Bin 0 -> 660 bytes
79 AllanStyle-SUBSILVER/theme/images/topic_read.gif | Bin 0 -> 344 bytes
80 .../theme/images/topic_read_hot.gif | Bin 0 -> 1902 bytes
81 .../theme/images/topic_read_hot_mine.gif | Bin 0 -> 1903 bytes
82 .../theme/images/topic_read_locked.gif | Bin 0 -> 333 bytes
83 .../theme/images/topic_read_locked_mine.gif | Bin 0 -> 337 bytes
84 .../theme/images/topic_read_mine.gif | Bin 0 -> 350 bytes
85 AllanStyle-SUBSILVER/theme/images/topic_unread.gif | Bin 0 -> 336 bytes
86 .../theme/images/topic_unread_hot.gif | Bin 0 -> 1888 bytes
87 .../theme/images/topic_unread_hot_mine.gif | Bin 0 -> 1895 bytes
88 .../theme/images/topic_unread_locked.gif | Bin 0 -> 459 bytes
89 .../theme/images/topic_unread_locked_mine.gif | Bin 0 -> 334 bytes
90 .../theme/images/topic_unread_mine.gif | Bin 0 -> 350 bytes
91 AllanStyle-SUBSILVER/theme/index.htm | 0
92 AllanStyle-SUBSILVER/theme/links.css | 199 +
93 AllanStyle-SUBSILVER/theme/normalize.css | 424 +
94 AllanStyle-SUBSILVER/theme/plupload.css | 86 +
95 AllanStyle-SUBSILVER/theme/print.css | 150 +
96 AllanStyle-SUBSILVER/theme/responsive.css | 615 +
97 AllanStyle-SUBSILVER/theme/ru/icon_user_online.gif | Bin 0 -> 427 bytes
98 AllanStyle-SUBSILVER/theme/ru/stylesheet.css | 2 +
99 AllanStyle-SUBSILVER/theme/stylesheet.css | 22 +
100 AllanStyle-SUBSILVER/theme/tweaks.css | 41 +
101 AllanStyle-SUBSILVER/theme/utilities.css | 66 +
102 86 files changed, 23895 insertions(+)
103
104 diff --git a/AllanStyle-SUBSILVER/license.txt b/AllanStyle-SUBSILVER/license.txt
105 new file mode 100644
106 index 000000000..ecbc05937
107 --- /dev/null
108 +++ b/AllanStyle-SUBSILVER/license.txt
109 @@ -0,0 +1,339 @@
110 + GNU GENERAL PUBLIC LICENSE
111 + Version 2, June 1991
112 +
113 + Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
114 + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
115 + Everyone is permitted to copy and distribute verbatim copies
116 + of this license document, but changing it is not allowed.
117 +
118 + Preamble
119 +
120 + The licenses for most software are designed to take away your
121 +freedom to share and change it. By contrast, the GNU General Public
122 +License is intended to guarantee your freedom to share and change free
123 +software--to make sure the software is free for all its users. This
124 +General Public License applies to most of the Free Software
125 +Foundation's software and to any other program whose authors commit to
126 +using it. (Some other Free Software Foundation software is covered by
127 +the GNU Lesser General Public License instead.) You can apply it to
128 +your programs, too.
129 +
130 + When we speak of free software, we are referring to freedom, not
131 +price. Our General Public Licenses are designed to make sure that you
132 +have the freedom to distribute copies of free software (and charge for
133 +this service if you wish), that you receive source code or can get it
134 +if you want it, that you can change the software or use pieces of it
135 +in new free programs; and that you know you can do these things.
136 +
137 + To protect your rights, we need to make restrictions that forbid
138 +anyone to deny you these rights or to ask you to surrender the rights.
139 +These restrictions translate to certain responsibilities for you if you
140 +distribute copies of the software, or if you modify it.
141 +
142 + For example, if you distribute copies of such a program, whether
143 +gratis or for a fee, you must give the recipients all the rights that
144 +you have. You must make sure that they, too, receive or can get the
145 +source code. And you must show them these terms so they know their
146 +rights.
147 +
148 + We protect your rights with two steps: (1) copyright the software, and
149 +(2) offer you this license which gives you legal permission to copy,
150 +distribute and/or modify the software.
151 +
152 + Also, for each author's protection and ours, we want to make certain
153 +that everyone understands that there is no warranty for this free
154 +software. If the software is modified by someone else and passed on, we
155 +want its recipients to know that what they have is not the original, so
156 +that any problems introduced by others will not reflect on the original
157 +authors' reputations.
158 +
159 + Finally, any free program is threatened constantly by software
160 +patents. We wish to avoid the danger that redistributors of a free
161 +program will individually obtain patent licenses, in effect making the
162 +program proprietary. To prevent this, we have made it clear that any
163 +patent must be licensed for everyone's free use or not licensed at all.
164 +
165 + The precise terms and conditions for copying, distribution and
166 +modification follow.
167 +
168 + GNU GENERAL PUBLIC LICENSE
169 + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
170 +
171 + 0. This License applies to any program or other work which contains
172 +a notice placed by the copyright holder saying it may be distributed
173 +under the terms of this General Public License. The "Program", below,
174 +refers to any such program or work, and a "work based on the Program"
175 +means either the Program or any derivative work under copyright law:
176 +that is to say, a work containing the Program or a portion of it,
177 +either verbatim or with modifications and/or translated into another
178 +language. (Hereinafter, translation is included without limitation in
179 +the term "modification".) Each licensee is addressed as "you".
180 +
181 +Activities other than copying, distribution and modification are not
182 +covered by this License; they are outside its scope. The act of
183 +running the Program is not restricted, and the output from the Program
184 +is covered only if its contents constitute a work based on the
185 +Program (independent of having been made by running the Program).
186 +Whether that is true depends on what the Program does.
187 +
188 + 1. You may copy and distribute verbatim copies of the Program's
189 +source code as you receive it, in any medium, provided that you
190 +conspicuously and appropriately publish on each copy an appropriate
191 +copyright notice and disclaimer of warranty; keep intact all the
192 +notices that refer to this License and to the absence of any warranty;
193 +and give any other recipients of the Program a copy of this License
194 +along with the Program.
195 +
196 +You may charge a fee for the physical act of transferring a copy, and
197 +you may at your option offer warranty protection in exchange for a fee.
198 +
199 + 2. You may modify your copy or copies of the Program or any portion
200 +of it, thus forming a work based on the Program, and copy and
201 +distribute such modifications or work under the terms of Section 1
202 +above, provided that you also meet all of these conditions:
203 +
204 + a) You must cause the modified files to carry prominent notices
205 + stating that you changed the files and the date of any change.
206 +
207 + b) You must cause any work that you distribute or publish, that in
208 + whole or in part contains or is derived from the Program or any
209 + part thereof, to be licensed as a whole at no charge to all third
210 + parties under the terms of this License.
211 +
212 + c) If the modified program normally reads commands interactively
213 + when run, you must cause it, when started running for such
214 + interactive use in the most ordinary way, to print or display an
215 + announcement including an appropriate copyright notice and a
216 + notice that there is no warranty (or else, saying that you provide
217 + a warranty) and that users may redistribute the program under
218 + these conditions, and telling the user how to view a copy of this
219 + License. (Exception: if the Program itself is interactive but
220 + does not normally print such an announcement, your work based on
221 + the Program is not required to print an announcement.)
222 +
223 +These requirements apply to the modified work as a whole. If
224 +identifiable sections of that work are not derived from the Program,
225 +and can be reasonably considered independent and separate works in
226 +themselves, then this License, and its terms, do not apply to those
227 +sections when you distribute them as separate works. But when you
228 +distribute the same sections as part of a whole which is a work based
229 +on the Program, the distribution of the whole must be on the terms of
230 +this License, whose permissions for other licensees extend to the
231 +entire whole, and thus to each and every part regardless of who wrote it.
232 +
233 +Thus, it is not the intent of this section to claim rights or contest
234 +your rights to work written entirely by you; rather, the intent is to
235 +exercise the right to control the distribution of derivative or
236 +collective works based on the Program.
237 +
238 +In addition, mere aggregation of another work not based on the Program
239 +with the Program (or with a work based on the Program) on a volume of
240 +a storage or distribution medium does not bring the other work under
241 +the scope of this License.
242 +
243 + 3. You may copy and distribute the Program (or a work based on it,
244 +under Section 2) in object code or executable form under the terms of
245 +Sections 1 and 2 above provided that you also do one of the following:
246 +
247 + a) Accompany it with the complete corresponding machine-readable
248 + source code, which must be distributed under the terms of Sections
249 + 1 and 2 above on a medium customarily used for software interchange; or,
250 +
251 + b) Accompany it with a written offer, valid for at least three
252 + years, to give any third party, for a charge no more than your
253 + cost of physically performing source distribution, a complete
254 + machine-readable copy of the corresponding source code, to be
255 + distributed under the terms of Sections 1 and 2 above on a medium
256 + customarily used for software interchange; or,
257 +
258 + c) Accompany it with the information you received as to the offer
259 + to distribute corresponding source code. (This alternative is
260 + allowed only for noncommercial distribution and only if you
261 + received the program in object code or executable form with such
262 + an offer, in accord with Subsection b above.)
263 +
264 +The source code for a work means the preferred form of the work for
265 +making modifications to it. For an executable work, complete source
266 +code means all the source code for all modules it contains, plus any
267 +associated interface definition files, plus the scripts used to
268 +control compilation and installation of the executable. However, as a
269 +special exception, the source code distributed need not include
270 +anything that is normally distributed (in either source or binary
271 +form) with the major components (compiler, kernel, and so on) of the
272 +operating system on which the executable runs, unless that component
273 +itself accompanies the executable.
274 +
275 +If distribution of executable or object code is made by offering
276 +access to copy from a designated place, then offering equivalent
277 +access to copy the source code from the same place counts as
278 +distribution of the source code, even though third parties are not
279 +compelled to copy the source along with the object code.
280 +
281 + 4. You may not copy, modify, sublicense, or distribute the Program
282 +except as expressly provided under this License. Any attempt
283 +otherwise to copy, modify, sublicense or distribute the Program is
284 +void, and will automatically terminate your rights under this License.
285 +However, parties who have received copies, or rights, from you under
286 +this License will not have their licenses terminated so long as such
287 +parties remain in full compliance.
288 +
289 + 5. You are not required to accept this License, since you have not
290 +signed it. However, nothing else grants you permission to modify or
291 +distribute the Program or its derivative works. These actions are
292 +prohibited by law if you do not accept this License. Therefore, by
293 +modifying or distributing the Program (or any work based on the
294 +Program), you indicate your acceptance of this License to do so, and
295 +all its terms and conditions for copying, distributing or modifying
296 +the Program or works based on it.
297 +
298 + 6. Each time you redistribute the Program (or any work based on the
299 +Program), the recipient automatically receives a license from the
300 +original licensor to copy, distribute or modify the Program subject to
301 +these terms and conditions. You may not impose any further
302 +restrictions on the recipients' exercise of the rights granted herein.
303 +You are not responsible for enforcing compliance by third parties to
304 +this License.
305 +
306 + 7. If, as a consequence of a court judgment or allegation of patent
307 +infringement or for any other reason (not limited to patent issues),
308 +conditions are imposed on you (whether by court order, agreement or
309 +otherwise) that contradict the conditions of this License, they do not
310 +excuse you from the conditions of this License. If you cannot
311 +distribute so as to satisfy simultaneously your obligations under this
312 +License and any other pertinent obligations, then as a consequence you
313 +may not distribute the Program at all. For example, if a patent
314 +license would not permit royalty-free redistribution of the Program by
315 +all those who receive copies directly or indirectly through you, then
316 +the only way you could satisfy both it and this License would be to
317 +refrain entirely from distribution of the Program.
318 +
319 +If any portion of this section is held invalid or unenforceable under
320 +any particular circumstance, the balance of the section is intended to
321 +apply and the section as a whole is intended to apply in other
322 +circumstances.
323 +
324 +It is not the purpose of this section to induce you to infringe any
325 +patents or other property right claims or to contest validity of any
326 +such claims; this section has the sole purpose of protecting the
327 +integrity of the free software distribution system, which is
328 +implemented by public license practices. Many people have made
329 +generous contributions to the wide range of software distributed
330 +through that system in reliance on consistent application of that
331 +system; it is up to the author/donor to decide if he or she is willing
332 +to distribute software through any other system and a licensee cannot
333 +impose that choice.
334 +
335 +This section is intended to make thoroughly clear what is believed to
336 +be a consequence of the rest of this License.
337 +
338 + 8. If the distribution and/or use of the Program is restricted in
339 +certain countries either by patents or by copyrighted interfaces, the
340 +original copyright holder who places the Program under this License
341 +may add an explicit geographical distribution limitation excluding
342 +those countries, so that distribution is permitted only in or among
343 +countries not thus excluded. In such case, this License incorporates
344 +the limitation as if written in the body of this License.
345 +
346 + 9. The Free Software Foundation may publish revised and/or new versions
347 +of the General Public License from time to time. Such new versions will
348 +be similar in spirit to the present version, but may differ in detail to
349 +address new problems or concerns.
350 +
351 +Each version is given a distinguishing version number. If the Program
352 +specifies a version number of this License which applies to it and "any
353 +later version", you have the option of following the terms and conditions
354 +either of that version or of any later version published by the Free
355 +Software Foundation. If the Program does not specify a version number of
356 +this License, you may choose any version ever published by the Free Software
357 +Foundation.
358 +
359 + 10. If you wish to incorporate parts of the Program into other free
360 +programs whose distribution conditions are different, write to the author
361 +to ask for permission. For software which is copyrighted by the Free
362 +Software Foundation, write to the Free Software Foundation; we sometimes
363 +make exceptions for this. Our decision will be guided by the two goals
364 +of preserving the free status of all derivatives of our free software and
365 +of promoting the sharing and reuse of software generally.
366 +
367 + NO WARRANTY
368 +
369 + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
370 +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
371 +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
372 +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
373 +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
374 +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
375 +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
376 +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
377 +REPAIR OR CORRECTION.
378 +
379 + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
380 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
381 +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
382 +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
383 +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
384 +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
385 +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
386 +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
387 +POSSIBILITY OF SUCH DAMAGES.
388 +
389 + END OF TERMS AND CONDITIONS
390 +
391 + How to Apply These Terms to Your New Programs
392 +
393 + If you develop a new program, and you want it to be of the greatest
394 +possible use to the public, the best way to achieve this is to make it
395 +free software which everyone can redistribute and change under these terms.
396 +
397 + To do so, attach the following notices to the program. It is safest
398 +to attach them to the start of each source file to most effectively
399 +convey the exclusion of warranty; and each file should have at least
400 +the "copyright" line and a pointer to where the full notice is found.
401 +
402 + <one line to give the program's name and a brief idea of what it does.>
403 + Copyright (C) <year> <name of author>
404 +
405 + This program is free software; you can redistribute it and/or modify
406 + it under the terms of the GNU General Public License as published by
407 + the Free Software Foundation; either version 2 of the License, or
408 + (at your option) any later version.
409 +
410 + This program is distributed in the hope that it will be useful,
411 + but WITHOUT ANY WARRANTY; without even the implied warranty of
412 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
413 + GNU General Public License for more details.
414 +
415 + You should have received a copy of the GNU General Public License along
416 + with this program; if not, write to the Free Software Foundation, Inc.,
417 + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
418 +
419 +Also add information on how to contact you by electronic and paper mail.
420 +
421 +If the program is interactive, make it output a short notice like this
422 +when it starts in an interactive mode:
423 +
424 + Gnomovision version 69, Copyright (C) year name of author
425 + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
426 + This is free software, and you are welcome to redistribute it
427 + under certain conditions; type `show c' for details.
428 +
429 +The hypothetical commands `show w' and `show c' should show the appropriate
430 +parts of the General Public License. Of course, the commands you use may
431 +be called something other than `show w' and `show c'; they could even be
432 +mouse-clicks or menu items--whatever suits your program.
433 +
434 +You should also get your employer (if you work as a programmer) or your
435 +school, if any, to sign a "copyright disclaimer" for the program, if
436 +necessary. Here is a sample; alter the names:
437 +
438 + Yoyodyne, Inc., hereby disclaims all copyright interest in the program
439 + `Gnomovision' (which makes passes at compilers) written by James Hacker.
440 +
441 + <signature of Ty Coon>, 1 April 1989
442 + Ty Coon, President of Vice
443 +
444 +This General Public License does not permit incorporating your program into
445 +proprietary programs. If your program is a subroutine library, you may
446 +consider it more useful to permit linking proprietary applications with the
447 +library. If this is what you want to do, use the GNU Lesser General
448 +Public License instead of this License.
449 \ No newline at end of file
450
451 diff --git a/AllanStyle-SUBSILVER/style.cfg b/AllanStyle-SUBSILVER/style.cfg
452 new file mode 100644
453 index 000000000..28bb9e2a5
454 --- /dev/null
455 +++ b/AllanStyle-SUBSILVER/style.cfg
456 @@ -0,0 +1,32 @@
457 +#
458 +# phpBB Style Configuration File
459 +#
460 +# This file is part of the phpBB Forum Software package.
461 +#
462 +# @copyright (c) phpBB Limited <https://www.phpbb.com>
463 +# @license GNU General Public License, version 2 (GPL-2.0)
464 +#
465 +# For full copyright and license information, please see
466 +# the docs/CREDITS.txt file.
467 +#
468 +# At the left is the name, please do not change this
469 +# At the right the value is entered
470 +#
471 +# Values get trimmed, if you want to add a space in front or at the end of
472 +# the value, then enclose the value with single or double quotes.
473 +# Single and double quotes do not need to be escaped.
474 +#
475 +#
476 +
477 +# General Information about this style
478 +name = AllanStyle-SUBSILVER
479 +copyright = © Allan Style, 2017 phpbb3.x-tk.ru
480 +style_version = 2.0.3
481 +phpbb_version = 3.2.2
482 +
483 +# Defining a different template bitfield
484 +# template_bitfield = //g=
485 +
486 +# Parent style
487 +# Set value to empty or to this style's name if this style does not have a parent style
488 +parent = prosilver
489
490 diff --git a/AllanStyle-SUBSILVER/template/collapse.js b/AllanStyle-SUBSILVER/template/collapse.js
491 new file mode 100644
492 index 000000000..5e6f0a4c6
493 --- /dev/null
494 +++ b/AllanStyle-SUBSILVER/template/collapse.js
495 @@ -0,0 +1,68 @@
496 +// <![CDATA[
497 +
498 +
499 + var sh_i = -1;
500 + var showhidden_triger = [];
501 +
502 +
503 + $(".topiclist.forums").each(function () {
504 + $(this).before(function () {
505 + if ($(this).hasClass('forums')) {
506 +
507 + sh_i = sh_i + 1;
508 + var cat_id = 'cat_' + sh_i;
509 +
510 + showhidden_triger[sh_i] = localStorage.getItem(cat_id);
511 + if (showhidden_triger[sh_i] == null) { showhidden_triger[sh_i] = 'true' };
512 + if (showhidden_triger[sh_i] == 'false') {
513 + return '<div class="trigger inactive" cat="' + cat_id +'"></div>';
514 + } else {
515 + return '<div class="trigger active" cat="' + cat_id +'"></div>';
516 + }
517 + }
518 + }).wrap('<div class="collapsethis" aria-hidden="false" />');
519 + });
520 +
521 +
522 +
523 + sh_i = 0;
524 +
525 +
526 + $(".collapsethis").each(function () {
527 + if (showhidden_triger[sh_i] == 'false') {
528 + $(this).attr('aria-hidden', 'true').hide();
529 + $(this).parents('div.forabg').css('opacity', '0.3');
530 + }
531 + sh_i = sh_i + 1;
532 + });
533 +
534 +
535 + $('.trigger').click(function () {
536 + var showhidden_triger_this = $(this).next().attr('aria-hidden');
537 + if (showhidden_triger_this == "false") {
538 + $(this).next().attr('aria-hidden', 'true').slideUp(500, 'easeInQuart', function() {
539 + $(this).parents('div.forabg').animate({
540 + opacity: '0.3'
541 + }, 1000)
542 + });
543 + $(this).removeClass('active').addClass('inactive');
544 + } else {
545 + $(this).parents('div.forabg').animate({
546 + opacity: '1.0'
547 + }, 50, function() {
548 + $('.trigger', this).next().attr('aria-hidden', 'false').slideDown(250, 'easeOutQuad')
549 + });
550 +
551 + $(this).removeClass('inactive').addClass('active').removeClass('hover');
552 + }
553 + localStorage.setItem($(this).attr('cat'), showhidden_triger_this);
554 + });
555 +
556 +
557 + $('div.forabg').on('mouseenter mouseleave', '.trigger.inactive', function(event) {
558 + var time = 200, opacity = event.type == 'mouseenter' ? '1.0' : (time = 0,'0.3');
559 + $(event.delegateTarget).stop(true).delay(time).animate({ opacity: opacity }, 300)
560 + })
561 +
562 +
563 +// ]]>
564 \ No newline at end of file
565
566 diff --git a/AllanStyle-SUBSILVER/template/forumlist_body.html b/AllanStyle-SUBSILVER/template/forumlist_body.html
567 new file mode 100644
568 index 000000000..c8717e558
569 --- /dev/null
570 +++ b/AllanStyle-SUBSILVER/template/forumlist_body.html
571 @@ -0,0 +1,133 @@
572 +
573 +<!-- BEGIN forumrow -->
574 + <!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT -->
575 + </ul>
576 +
577 + </div>
578 + </div>
579 + <!-- ENDIF -->
580 +
581 + <!-- EVENT forumlist_body_category_header_before -->
582 + <!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW or forumrow.S_NO_CAT -->
583 + <div class="forabg">
584 + <div class="inner">
585 + <ul class="topiclist">
586 + <li class="header">
587 + <!-- EVENT forumlist_body_category_header_row_prepend -->
588 + <dl class="row-item">
589 + <dt><div class="list-inner"><!-- IF forumrow.S_IS_CAT --><a href="{forumrow.U_VIEWFORUM}">{forumrow.FORUM_NAME}</a><!-- ELSE -->{L_FORUM}<!-- ENDIF --></div></dt>
590 + <dd class="topics">{L_TOPICS}</dd>
591 + <dd class="posts">{L_POSTS}</dd>
592 + <dd class="lastpost"><span>{L_LAST_POST}</span></dd>
593 + </dl>
594 + <!-- EVENT forumlist_body_category_header_row_append -->
595 + </li>
596 + </ul>
597 + <ul class="topiclist forums">
598 + <!-- ENDIF -->
599 + <!-- EVENT forumlist_body_category_header_after -->
600 +
601 + <!-- IF not forumrow.S_IS_CAT -->
602 + <!-- EVENT forumlist_body_forum_row_before -->
603 + <li class="row">
604 + <!-- EVENT forumlist_body_forum_row_prepend -->
605 + <dl class="row-item {forumrow.FORUM_IMG_STYLE}">
606 + <dt title="{forumrow.FORUM_FOLDER_IMG_ALT}">
607 + <!-- IF forumrow.S_UNREAD_FORUM --><a href="{forumrow.U_VIEWFORUM}" class="row-item-link"></a><!-- ENDIF -->
608 + <div class="list-inner">
609 + <!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED -->
610 + <!--
611 + <a class="feed-icon-forum" title="{L_FEED} - {forumrow.FORUM_NAME}" href="{U_FEED}?f={forumrow.FORUM_ID}">
612 + <i class="icon fa-rss-square fa-fw icon-orange" aria-hidden="true"></i><span class="sr-only">{L_FEED} - {forumrow.FORUM_NAME}</span>
613 + </a>
614 + -->
615 + <!-- ENDIF -->
616 + <!-- IF forumrow.FORUM_IMAGE -->
617 + <!-- EVENT forumlist_body_forum_image_before -->
618 + <span class="forum-image"><!-- EVENT forumlist_body_forum_image_prepend -->{forumrow.FORUM_IMAGE}<!-- EVENT forumlist_body_forum_image_append --></span>
619 + <!-- EVENT forumlist_body_forum_image_after -->
620 + <!-- ENDIF -->
621 + <a href="{forumrow.U_VIEWFORUM}" class="forumtitle">{forumrow.FORUM_NAME}</a>
622 + <!-- IF forumrow.FORUM_DESC --><br />{forumrow.FORUM_DESC}<!-- ENDIF -->
623 + <!-- IF forumrow.MODERATORS -->
624 + <br /><strong>{forumrow.L_MODERATOR_STR}{L_COLON}</strong> {forumrow.MODERATORS}
625 + <!-- ENDIF -->
626 + <!-- IF .forumrow.subforum and forumrow.S_LIST_SUBFORUMS -->
627 + <!-- EVENT forumlist_body_subforums_before -->
628 + <br /><strong>{forumrow.L_SUBFORUM_STR}{L_COLON}</strong>
629 + <!-- BEGIN subforum -->
630 + <!-- EVENT forumlist_body_subforum_link_prepend --><a href="{forumrow.subforum.U_SUBFORUM}" class="subforum<!-- IF forumrow.subforum.S_UNREAD --> unread<!-- ELSE --> read<!-- ENDIF -->" title="<!-- IF forumrow.subforum.S_UNREAD -->{L_UNREAD_POSTS}<!-- ELSE -->{L_NO_UNREAD_POSTS}<!-- ENDIF -->">
631 + <i class="icon <!-- IF forumrow.subforum.IS_LINK -->fa-external-link<!-- ELSE -->fa-file-o<!-- ENDIF --> fa-fw <!-- IF forumrow.subforum.S_UNREAD --> icon-red<!-- ELSE --> icon-blue<!-- ENDIF --> icon-md" aria-hidden="true"></i>{forumrow.subforum.SUBFORUM_NAME}</a><!-- IF not forumrow.subforum.S_LAST_ROW -->{L_COMMA_SEPARATOR}<!-- ENDIF --><!-- EVENT forumlist_body_subforum_link_append -->
632 + <!-- END subforum -->
633 + <!-- EVENT forumlist_body_subforums_after -->
634 + <!-- ENDIF -->
635 +
636 + <!-- IF not S_IS_BOT -->
637 + <div class="responsive-show" style="display: none;">
638 + <!-- IF forumrow.CLICKS -->
639 + {L_REDIRECTS}{L_COLON} <strong>{forumrow.CLICKS}</strong>
640 + <!-- ELSEIF not forumrow.S_IS_LINK and forumrow.TOPICS -->
641 + {L_TOPICS}{L_COLON} <strong>{forumrow.TOPICS}</strong>
642 + <!-- ENDIF -->
643 + </div>
644 + <!-- ENDIF -->
645 + </div>
646 + </dt>
647 + <!-- IF forumrow.CLICKS -->
648 + <dd class="redirect"><span>{L_REDIRECTS}{L_COLON} {forumrow.CLICKS}</span></dd>
649 + <!-- ELSEIF not forumrow.S_IS_LINK -->
650 + <dd class="topics">{forumrow.TOPICS} <dfn>{L_TOPICS}</dfn></dd>
651 + <dd class="posts">{forumrow.POSTS} <dfn>{L_POSTS}</dfn></dd>
652 + <dd class="lastpost">
653 + <span>
654 + <!-- IF forumrow.U_UNAPPROVED_TOPICS -->
655 + <a href="{forumrow.U_UNAPPROVED_TOPICS}" title="{L_TOPICS_UNAPPROVED}">
656 + <i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{L_TOPICS_UNAPPROVED}</span>
657 + </a>
658 + <!-- ELSEIF forumrow.U_UNAPPROVED_POSTS -->
659 + <a href="{forumrow.U_UNAPPROVED_POSTS}" title="{L_POSTS_UNAPPROVED_FORUM}">
660 + <i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{L_POSTS_UNAPPROVED_FORUM}</span>
661 + </a>
662 + <!-- ENDIF -->
663 + <!-- IF forumrow.LAST_POST_TIME -->
664 + <dfn>{L_LAST_POST}</dfn>
665 + <!-- IF forumrow.S_DISPLAY_SUBJECT -->
666 + <!-- EVENT forumlist_body_last_post_title_prepend -->
667 + <a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}" class="lastsubject">{forumrow.LAST_POST_SUBJECT_TRUNCATED}</a> <br />
668 + <!-- ENDIF -->
669 + {L_POST_BY_AUTHOR} {forumrow.LAST_POSTER_FULL}
670 + <!-- IF not S_IS_BOT -->
671 + <a href="{forumrow.U_LAST_POST}" title="{L_VIEW_LATEST_POST}">
672 + <i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{L_VIEW_LATEST_POST}</span>
673 + </a>
674 + <!-- ENDIF -->
675 + {forumrow.LAST_POST_TIME}
676 + <!-- ELSE -->
677 + {L_NO_POSTS}<br />&nbsp;
678 + <!-- ENDIF -->
679 + </span>
680 + </dd>
681 + <!-- ELSE -->
682 + <dd>&nbsp;</dd>
683 + <!-- ENDIF -->
684 + </dl>
685 + <!-- EVENT forumlist_body_forum_row_append -->
686 + </li>
687 + <!-- EVENT forumlist_body_forum_row_after -->
688 + <!-- ENDIF -->
689 +
690 + <!-- IF forumrow.S_LAST_ROW -->
691 + </ul>
692 +
693 + </div>
694 + </div>
695 + <!-- EVENT forumlist_body_last_row_after -->
696 + <!-- ENDIF -->
697 +
698 +<!-- BEGINELSE -->
699 + <div class="panel">
700 + <div class="inner">
701 + <strong>{L_NO_FORUMS}</strong>
702 + </div>
703 + </div>
704 +<!-- END forumrow -->
705
706 diff --git a/AllanStyle-SUBSILVER/template/index_body.html b/AllanStyle-SUBSILVER/template/index_body.html
707 new file mode 100644
708 index 000000000..1270841f6
709 --- /dev/null
710 +++ b/AllanStyle-SUBSILVER/template/index_body.html
711 @@ -0,0 +1,88 @@
712 +<!-- INCLUDE overall_header.html -->
713 +
714 +<p class="{S_CONTENT_FLOW_END} responsive-center time<!-- IF S_USER_LOGGED_IN --> rightside<!-- ENDIF -->"><!-- IF S_USER_LOGGED_IN -->{LAST_VISIT_DATE}<!-- ELSE -->{CURRENT_TIME}<!-- ENDIF --></p>
715 +<!-- IF S_USER_LOGGED_IN --><p class="responsive-center time">{CURRENT_TIME}</p><!-- ENDIF -->
716 +
717 +<!-- EVENT index_body_markforums_before -->
718 +<!-- IF U_MARK_FORUMS -->
719 + <div class="action-bar compact">
720 + <a href="{U_MARK_FORUMS}" class="mark-read rightside" accesskey="m" data-ajax="mark_forums_read">{L_MARK_FORUMS_READ}</a>
721 + </div>
722 +<!-- ENDIF -->
723 +<!-- EVENT index_body_markforums_after -->
724 +
725 +<!-- INCLUDE forumlist_body.html -->
726 +
727 +<!-- EVENT index_body_forumlist_body_after -->
728 +
729 +<div class="body-blok">
730 + <div class="body-blok-h3">
731 + <h3>{L_STATISTICS}</h3>
732 + </div>
733 + <div class="body-blok-info">
734 +
735 +<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
736 + <form method="post" action="{S_LOGIN_ACTION}" class="headerspace">
737 + <h3><a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a><!-- IF S_REGISTER_ENABLED -->&nbsp; &bull; &nbsp;<a href="{U_REGISTER}">{L_REGISTER}</a><!-- ENDIF --></h3>
738 + <fieldset class="quick-login">
739 + <label for="username"><span>{L_USERNAME}{L_COLON}</span> <input type="text" tabindex="1" name="username" id="username" size="10" class="inputbox" title="{L_USERNAME}" /></label>
740 + <label for="password"><span>{L_PASSWORD}{L_COLON}</span> <input type="password" tabindex="2" name="password" id="password" size="10" class="inputbox" title="{L_PASSWORD}" autocomplete="off" /></label>
741 + <!-- IF U_SEND_PASSWORD -->
742 + <a href="{U_SEND_PASSWORD}">{L_FORGOT_PASS}</a>
743 + <!-- ENDIF -->
744 + <!-- IF S_AUTOLOGIN_ENABLED -->
745 + <span class="responsive-hide">|</span> <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" tabindex="4" name="autologin" id="autologin" /></label>
746 + <!-- ENDIF -->
747 + <input type="submit" tabindex="5" name="login" value="{L_LOGIN}" class="button2" />
748 + {S_LOGIN_REDIRECT}
749 + </fieldset>
750 + </form>
751 +<!-- ENDIF -->
752 +
753 +<!-- EVENT index_body_stat_blocks_before -->
754 +
755 +<!-- IF S_DISPLAY_ONLINE_LIST -->
756 + <div class="stat-block online-list">
757 + <!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
758 + <p>
759 + <!-- EVENT index_body_block_online_prepend -->
760 + {TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br />
761 + <!-- IF U_VIEWONLINE -->
762 + <br />{LOGGED_IN_USER_LIST}
763 + <!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF -->
764 + <!-- ENDIF -->
765 + <!-- EVENT index_body_block_online_append -->
766 + </p>
767 + </div>
768 +<!-- ENDIF -->
769 +
770 +<!-- EVENT index_body_birthday_block_before -->
771 +
772 +<!-- IF S_DISPLAY_BIRTHDAY_LIST -->
773 + <div class="stat-block birthday-list">
774 + <h3>{L_BIRTHDAYS}</h3>
775 + <p>
776 + <!-- EVENT index_body_block_birthday_prepend -->
777 + <!-- IF .birthdays -->{L_CONGRATULATIONS}{L_COLON} <strong><!-- BEGIN birthdays -->{birthdays.USERNAME}<!-- IF birthdays.AGE !== '' --> ({birthdays.AGE})<!-- ENDIF --><!-- IF not birthdays.S_LAST_ROW -->, <!-- ENDIF --><!-- END birthdays --></strong><!-- ELSE -->{L_NO_BIRTHDAYS}<!-- ENDIF -->
778 + <!-- EVENT index_body_block_birthday_append -->
779 + </p>
780 + </div>
781 +<!-- ENDIF -->
782 +
783 +<!-- IF NEWEST_USER -->
784 + <div class="stat-block statistics">
785 + <h3>{L_STATISTICS}</h3>
786 + <p>
787 + <!-- EVENT index_body_block_stats_prepend -->
788 + {TOTAL_POSTS} &bull; {TOTAL_TOPICS} &bull; {TOTAL_USERS} &bull; {NEWEST_USER}
789 + <!-- EVENT index_body_block_stats_append -->
790 + </p>
791 + </div>
792 +<!-- ENDIF -->
793 +
794 +<!-- EVENT index_body_stat_blocks_after -->
795 +
796 + </div>
797 +</div>
798 +
799 +<!-- INCLUDE overall_footer.html -->
800
801 diff --git a/AllanStyle-SUBSILVER/template/jquery-ui.js b/AllanStyle-SUBSILVER/template/jquery-ui.js
802 new file mode 100644
803 index 000000000..5700b3a87
804 --- /dev/null
805 +++ b/AllanStyle-SUBSILVER/template/jquery-ui.js
806 @@ -0,0 +1,15003 @@
807 +/*! jQuery UI - v1.10.3 - 2013-05-03
808 +* http://jqueryui.com
809 +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
810 +* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
811 +(function( $, undefined ) {
812 +
813 +var uuid = 0,
814 + runiqueId = /^ui-id-\d+$/;
815 +
816 +// $.ui might exist from components with no dependencies, e.g., $.ui.position
817 +$.ui = $.ui || {};
818 +
819 +$.extend( $.ui, {
820 + version: "1.10.3",
821 +
822 + keyCode: {
823 + BACKSPACE: 8,
824 + COMMA: 188,
825 + DELETE: 46,
826 + DOWN: 40,
827 + END: 35,
828 + ENTER: 13,
829 + ESCAPE: 27,
830 + HOME: 36,
831 + LEFT: 37,
832 + NUMPAD_ADD: 107,
833 + NUMPAD_DECIMAL: 110,
834 + NUMPAD_DIVIDE: 111,
835 + NUMPAD_ENTER: 108,
836 + NUMPAD_MULTIPLY: 106,
837 + NUMPAD_SUBTRACT: 109,
838 + PAGE_DOWN: 34,
839 + PAGE_UP: 33,
840 + PERIOD: 190,
841 + RIGHT: 39,
842 + SPACE: 32,
843 + TAB: 9,
844 + UP: 38
845 + }
846 +});
847 +
848 +// plugins
849 +$.fn.extend({
850 + focus: (function( orig ) {
851 + return function( delay, fn ) {
852 + return typeof delay === "number" ?
853 + this.each(function() {
854 + var elem = this;
855 + setTimeout(function() {
856 + $( elem ).focus();
857 + if ( fn ) {
858 + fn.call( elem );
859 + }
860 + }, delay );
861 + }) :
862 + orig.apply( this, arguments );
863 + };
864 + })( $.fn.focus ),
865 +
866 + scrollParent: function() {
867 + var scrollParent;
868 + if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
869 + scrollParent = this.parents().filter(function() {
870 + return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
871 + }).eq(0);
872 + } else {
873 + scrollParent = this.parents().filter(function() {
874 + return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
875 + }).eq(0);
876 + }
877 +
878 + return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
879 + },
880 +
881 + zIndex: function( zIndex ) {
882 + if ( zIndex !== undefined ) {
883 + return this.css( "zIndex", zIndex );
884 + }
885 +
886 + if ( this.length ) {
887 + var elem = $( this[ 0 ] ), position, value;
888 + while ( elem.length && elem[ 0 ] !== document ) {
889 + // Ignore z-index if position is set to a value where z-index is ignored by the browser
890 + // This makes behavior of this function consistent across browsers
891 + // WebKit always returns auto if the element is positioned
892 + position = elem.css( "position" );
893 + if ( position === "absolute" || position === "relative" || position === "fixed" ) {
894 + // IE returns 0 when zIndex is not specified
895 + // other browsers return a string
896 + // we ignore the case of nested elements with an explicit value of 0
897 + // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
898 + value = parseInt( elem.css( "zIndex" ), 10 );
899 + if ( !isNaN( value ) && value !== 0 ) {
900 + return value;
901 + }
902 + }
903 + elem = elem.parent();
904 + }
905 + }
906 +
907 + return 0;
908 + },
909 +
910 + uniqueId: function() {
911 + return this.each(function() {
912 + if ( !this.id ) {
913 + this.id = "ui-id-" + (++uuid);
914 + }
915 + });
916 + },
917 +
918 + removeUniqueId: function() {
919 + return this.each(function() {
920 + if ( runiqueId.test( this.id ) ) {
921 + $( this ).removeAttr( "id" );
922 + }
923 + });
924 + }
925 +});
926 +
927 +// selectors
928 +function focusable( element, isTabIndexNotNaN ) {
929 + var map, mapName, img,
930 + nodeName = element.nodeName.toLowerCase();
931 + if ( "area" === nodeName ) {
932 + map = element.parentNode;
933 + mapName = map.name;
934 + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
935 + return false;
936 + }
937 + img = $( "img[usemap=#" + mapName + "]" )[0];
938 + return !!img && visible( img );
939 + }
940 + return ( /input|select|textarea|button|object/.test( nodeName ) ?
941 + !element.disabled :
942 + "a" === nodeName ?
943 + element.href || isTabIndexNotNaN :
944 + isTabIndexNotNaN) &&
945 + // the element and all of its ancestors must be visible
946 + visible( element );
947 +}
948 +
949 +function visible( element ) {
950 + return $.expr.filters.visible( element ) &&
951 + !$( element ).parents().addBack().filter(function() {
952 + return $.css( this, "visibility" ) === "hidden";
953 + }).length;
954 +}
955 +
956 +$.extend( $.expr[ ":" ], {
957 + data: $.expr.createPseudo ?
958 + $.expr.createPseudo(function( dataName ) {
959 + return function( elem ) {
960 + return !!$.data( elem, dataName );
961 + };
962 + }) :
963 + // support: jQuery <1.8
964 + function( elem, i, match ) {
965 + return !!$.data( elem, match[ 3 ] );
966 + },
967 +
968 + focusable: function( element ) {
969 + return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
970 + },
971 +
972 + tabbable: function( element ) {
973 + var tabIndex = $.attr( element, "tabindex" ),
974 + isTabIndexNaN = isNaN( tabIndex );
975 + return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
976 + }
977 +});
978 +
979 +// support: jQuery <1.8
980 +if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
981 + $.each( [ "Width", "Height" ], function( i, name ) {
982 + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
983 + type = name.toLowerCase(),
984 + orig = {
985 + innerWidth: $.fn.innerWidth,
986 + innerHeight: $.fn.innerHeight,
987 + outerWidth: $.fn.outerWidth,
988 + outerHeight: $.fn.outerHeight
989 + };
990 +
991 + function reduce( elem, size, border, margin ) {
992 + $.each( side, function() {
993 + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
994 + if ( border ) {
995 + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
996 + }
997 + if ( margin ) {
998 + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
999 + }
1000 + });
1001 + return size;
1002 + }
1003 +
1004 + $.fn[ "inner" + name ] = function( size ) {
1005 + if ( size === undefined ) {
1006 + return orig[ "inner" + name ].call( this );
1007 + }
1008 +
1009 + return this.each(function() {
1010 + $( this ).css( type, reduce( this, size ) + "px" );
1011 + });
1012 + };
1013 +
1014 + $.fn[ "outer" + name] = function( size, margin ) {
1015 + if ( typeof size !== "number" ) {
1016 + return orig[ "outer" + name ].call( this, size );
1017 + }
1018 +
1019 + return this.each(function() {
1020 + $( this).css( type, reduce( this, size, true, margin ) + "px" );
1021 + });
1022 + };
1023 + });
1024 +}
1025 +
1026 +// support: jQuery <1.8
1027 +if ( !$.fn.addBack ) {
1028 + $.fn.addBack = function( selector ) {
1029 + return this.add( selector == null ?
1030 + this.prevObject : this.prevObject.filter( selector )
1031 + );
1032 + };
1033 +}
1034 +
1035 +// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
1036 +if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
1037 + $.fn.removeData = (function( removeData ) {
1038 + return function( key ) {
1039 + if ( arguments.length ) {
1040 + return removeData.call( this, $.camelCase( key ) );
1041 + } else {
1042 + return removeData.call( this );
1043 + }
1044 + };
1045 + })( $.fn.removeData );
1046 +}
1047 +
1048 +
1049 +
1050 +
1051 +
1052 +// deprecated
1053 +$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
1054 +
1055 +$.support.selectstart = "onselectstart" in document.createElement( "div" );
1056 +$.fn.extend({
1057 + disableSelection: function() {
1058 + return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
1059 + ".ui-disableSelection", function( event ) {
1060 + event.preventDefault();
1061 + });
1062 + },
1063 +
1064 + enableSelection: function() {
1065 + return this.unbind( ".ui-disableSelection" );
1066 + }
1067 +});
1068 +
1069 +$.extend( $.ui, {
1070 + // $.ui.plugin is deprecated. Use $.widget() extensions instead.
1071 + plugin: {
1072 + add: function( module, option, set ) {
1073 + var i,
1074 + proto = $.ui[ module ].prototype;
1075 + for ( i in set ) {
1076 + proto.plugins[ i ] = proto.plugins[ i ] || [];
1077 + proto.plugins[ i ].push( [ option, set[ i ] ] );
1078 + }
1079 + },
1080 + call: function( instance, name, args ) {
1081 + var i,
1082 + set = instance.plugins[ name ];
1083 + if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
1084 + return;
1085 + }
1086 +
1087 + for ( i = 0; i < set.length; i++ ) {
1088 + if ( instance.options[ set[ i ][ 0 ] ] ) {
1089 + set[ i ][ 1 ].apply( instance.element, args );
1090 + }
1091 + }
1092 + }
1093 + },
1094 +
1095 + // only used by resizable
1096 + hasScroll: function( el, a ) {
1097 +
1098 + //If overflow is hidden, the element might have extra content, but the user wants to hide it
1099 + if ( $( el ).css( "overflow" ) === "hidden") {
1100 + return false;
1101 + }
1102 +
1103 + var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
1104 + has = false;
1105 +
1106 + if ( el[ scroll ] > 0 ) {
1107 + return true;
1108 + }
1109 +
1110 + // TODO: determine which cases actually cause this to happen
1111 + // if the element doesn't have the scroll set, see if it's possible to
1112 + // set the scroll
1113 + el[ scroll ] = 1;
1114 + has = ( el[ scroll ] > 0 );
1115 + el[ scroll ] = 0;
1116 + return has;
1117 + }
1118 +});
1119 +
1120 +})( jQuery );
1121 +
1122 +(function( $, undefined ) {
1123 +
1124 +var uuid = 0,
1125 + slice = Array.prototype.slice,
1126 + _cleanData = $.cleanData;
1127 +$.cleanData = function( elems ) {
1128 + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
1129 + try {
1130 + $( elem ).triggerHandler( "remove" );
1131 + // http://bugs.jquery.com/ticket/8235
1132 + } catch( e ) {}
1133 + }
1134 + _cleanData( elems );
1135 +};
1136 +
1137 +$.widget = function( name, base, prototype ) {
1138 + var fullName, existingConstructor, constructor, basePrototype,
1139 + // proxiedPrototype allows the provided prototype to remain unmodified
1140 + // so that it can be used as a mixin for multiple widgets (#8876)
1141 + proxiedPrototype = {},
1142 + namespace = name.split( "." )[ 0 ];
1143 +
1144 + name = name.split( "." )[ 1 ];
1145 + fullName = namespace + "-" + name;
1146 +
1147 + if ( !prototype ) {
1148 + prototype = base;
1149 + base = $.Widget;
1150 + }
1151 +
1152 + // create selector for plugin
1153 + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
1154 + return !!$.data( elem, fullName );
1155 + };
1156 +
1157 + $[ namespace ] = $[ namespace ] || {};
1158 + existingConstructor = $[ namespace ][ name ];
1159 + constructor = $[ namespace ][ name ] = function( options, element ) {
1160 + // allow instantiation without "new" keyword
1161 + if ( !this._createWidget ) {
1162 + return new constructor( options, element );
1163 + }
1164 +
1165 + // allow instantiation without initializing for simple inheritance
1166 + // must use "new" keyword (the code above always passes args)
1167 + if ( arguments.length ) {
1168 + this._createWidget( options, element );
1169 + }
1170 + };
1171 + // extend with the existing constructor to carry over any static properties
1172 + $.extend( constructor, existingConstructor, {
1173 + version: prototype.version,
1174 + // copy the object used to create the prototype in case we need to
1175 + // redefine the widget later
1176 + _proto: $.extend( {}, prototype ),
1177 + // track widgets that inherit from this widget in case this widget is
1178 + // redefined after a widget inherits from it
1179 + _childConstructors: []
1180 + });
1181 +
1182 + basePrototype = new base();
1183 + // we need to make the options hash a property directly on the new instance
1184 + // otherwise we'll modify the options hash on the prototype that we're
1185 + // inheriting from
1186 + basePrototype.options = $.widget.extend( {}, basePrototype.options );
1187 + $.each( prototype, function( prop, value ) {
1188 + if ( !$.isFunction( value ) ) {
1189 + proxiedPrototype[ prop ] = value;
1190 + return;
1191 + }
1192 + proxiedPrototype[ prop ] = (function() {
1193 + var _super = function() {
1194 + return base.prototype[ prop ].apply( this, arguments );
1195 + },
1196 + _superApply = function( args ) {
1197 + return base.prototype[ prop ].apply( this, args );
1198 + };
1199 + return function() {
1200 + var __super = this._super,
1201 + __superApply = this._superApply,
1202 + returnValue;
1203 +
1204 + this._super = _super;
1205 + this._superApply = _superApply;
1206 +
1207 + returnValue = value.apply( this, arguments );
1208 +
1209 + this._super = __super;
1210 + this._superApply = __superApply;
1211 +
1212 + return returnValue;
1213 + };
1214 + })();
1215 + });
1216 + constructor.prototype = $.widget.extend( basePrototype, {
1217 + // TODO: remove support for widgetEventPrefix
1218 + // always use the name + a colon as the prefix, e.g., draggable:start
1219 + // don't prefix for widgets that aren't DOM-based
1220 + widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
1221 + }, proxiedPrototype, {
1222 + constructor: constructor,
1223 + namespace: namespace,
1224 + widgetName: name,
1225 + widgetFullName: fullName
1226 + });
1227 +
1228 + // If this widget is being redefined then we need to find all widgets that
1229 + // are inheriting from it and redefine all of them so that they inherit from
1230 + // the new version of this widget. We're essentially trying to replace one
1231 + // level in the prototype chain.
1232 + if ( existingConstructor ) {
1233 + $.each( existingConstructor._childConstructors, function( i, child ) {
1234 + var childPrototype = child.prototype;
1235 +
1236 + // redefine the child widget using the same prototype that was
1237 + // originally used, but inherit from the new version of the base
1238 + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
1239 + });
1240 + // remove the list of existing child constructors from the old constructor
1241 + // so the old child constructors can be garbage collected
1242 + delete existingConstructor._childConstructors;
1243 + } else {
1244 + base._childConstructors.push( constructor );
1245 + }
1246 +
1247 + $.widget.bridge( name, constructor );
1248 +};
1249 +
1250 +$.widget.extend = function( target ) {
1251 + var input = slice.call( arguments, 1 ),
1252 + inputIndex = 0,
1253 + inputLength = input.length,
1254 + key,
1255 + value;
1256 + for ( ; inputIndex < inputLength; inputIndex++ ) {
1257 + for ( key in input[ inputIndex ] ) {
1258 + value = input[ inputIndex ][ key ];
1259 + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
1260 + // Clone objects
1261 + if ( $.isPlainObject( value ) ) {
1262 + target[ key ] = $.isPlainObject( target[ key ] ) ?
1263 + $.widget.extend( {}, target[ key ], value ) :
1264 + // Don't extend strings, arrays, etc. with objects
1265 + $.widget.extend( {}, value );
1266 + // Copy everything else by reference
1267 + } else {
1268 + target[ key ] = value;
1269 + }
1270 + }
1271 + }
1272 + }
1273 + return target;
1274 +};
1275 +
1276 +$.widget.bridge = function( name, object ) {
1277 + var fullName = object.prototype.widgetFullName || name;
1278 + $.fn[ name ] = function( options ) {
1279 + var isMethodCall = typeof options === "string",
1280 + args = slice.call( arguments, 1 ),
1281 + returnValue = this;
1282 +
1283 + // allow multiple hashes to be passed on init
1284 + options = !isMethodCall && args.length ?
1285 + $.widget.extend.apply( null, [ options ].concat(args) ) :
1286 + options;
1287 +
1288 + if ( isMethodCall ) {
1289 + this.each(function() {
1290 + var methodValue,
1291 + instance = $.data( this, fullName );
1292 + if ( !instance ) {
1293 + return $.error( "cannot call methods on " + name + " prior to initialization; " +
1294 + "attempted to call method '" + options + "'" );
1295 + }
1296 + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
1297 + return $.error( "no such method '" + options + "' for " + name + " widget instance" );
1298 + }
1299 + methodValue = instance[ options ].apply( instance, args );
1300 + if ( methodValue !== instance && methodValue !== undefined ) {
1301 + returnValue = methodValue && methodValue.jquery ?
1302 + returnValue.pushStack( methodValue.get() ) :
1303 + methodValue;
1304 + return false;
1305 + }
1306 + });
1307 + } else {
1308 + this.each(function() {
1309 + var instance = $.data( this, fullName );
1310 + if ( instance ) {
1311 + instance.option( options || {} )._init();
1312 + } else {
1313 + $.data( this, fullName, new object( options, this ) );
1314 + }
1315 + });
1316 + }
1317 +
1318 + return returnValue;
1319 + };
1320 +};
1321 +
1322 +$.Widget = function( /* options, element */ ) {};
1323 +$.Widget._childConstructors = [];
1324 +
1325 +$.Widget.prototype = {
1326 + widgetName: "widget",
1327 + widgetEventPrefix: "",
1328 + defaultElement: "<div>",
1329 + options: {
1330 + disabled: false,
1331 +
1332 + // callbacks
1333 + create: null
1334 + },
1335 + _createWidget: function( options, element ) {
1336 + element = $( element || this.defaultElement || this )[ 0 ];
1337 + this.element = $( element );
1338 + this.uuid = uuid++;
1339 + this.eventNamespace = "." + this.widgetName + this.uuid;
1340 + this.options = $.widget.extend( {},
1341 + this.options,
1342 + this._getCreateOptions(),
1343 + options );
1344 +
1345 + this.bindings = $();
1346 + this.hoverable = $();
1347 + this.focusable = $();
1348 +
1349 + if ( element !== this ) {
1350 + $.data( element, this.widgetFullName, this );
1351 + this._on( true, this.element, {
1352 + remove: function( event ) {
1353 + if ( event.target === element ) {
1354 + this.destroy();
1355 + }
1356 + }
1357 + });
1358 + this.document = $( element.style ?
1359 + // element within the document
1360 + element.ownerDocument :
1361 + // element is window or document
1362 + element.document || element );
1363 + this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
1364 + }
1365 +
1366 + this._create();
1367 + this._trigger( "create", null, this._getCreateEventData() );
1368 + this._init();
1369 + },
1370 + _getCreateOptions: $.noop,
1371 + _getCreateEventData: $.noop,
1372 + _create: $.noop,
1373 + _init: $.noop,
1374 +
1375 + destroy: function() {
1376 + this._destroy();
1377 + // we can probably remove the unbind calls in 2.0
1378 + // all event bindings should go through this._on()
1379 + this.element
1380 + .unbind( this.eventNamespace )
1381 + // 1.9 BC for #7810
1382 + // TODO remove dual storage
1383 + .removeData( this.widgetName )
1384 + .removeData( this.widgetFullName )
1385 + // support: jquery <1.6.3
1386 + // http://bugs.jquery.com/ticket/9413
1387 + .removeData( $.camelCase( this.widgetFullName ) );
1388 + this.widget()
1389 + .unbind( this.eventNamespace )
1390 + .removeAttr( "aria-disabled" )
1391 + .removeClass(
1392 + this.widgetFullName + "-disabled " +
1393 + "ui-state-disabled" );
1394 +
1395 + // clean up events and states
1396 + this.bindings.unbind( this.eventNamespace );
1397 + this.hoverable.removeClass( "ui-state-hover" );
1398 + this.focusable.removeClass( "ui-state-focus" );
1399 + },
1400 + _destroy: $.noop,
1401 +
1402 + widget: function() {
1403 + return this.element;
1404 + },
1405 +
1406 + option: function( key, value ) {
1407 + var options = key,
1408 + parts,
1409 + curOption,
1410 + i;
1411 +
1412 + if ( arguments.length === 0 ) {
1413 + // don't return a reference to the internal hash
1414 + return $.widget.extend( {}, this.options );
1415 + }
1416 +
1417 + if ( typeof key === "string" ) {
1418 + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
1419 + options = {};
1420 + parts = key.split( "." );
1421 + key = parts.shift();
1422 + if ( parts.length ) {
1423 + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
1424 + for ( i = 0; i < parts.length - 1; i++ ) {
1425 + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
1426 + curOption = curOption[ parts[ i ] ];
1427 + }
1428 + key = parts.pop();
1429 + if ( value === undefined ) {
1430 + return curOption[ key ] === undefined ? null : curOption[ key ];
1431 + }
1432 + curOption[ key ] = value;
1433 + } else {
1434 + if ( value === undefined ) {
1435 + return this.options[ key ] === undefined ? null : this.options[ key ];
1436 + }
1437 + options[ key ] = value;
1438 + }
1439 + }
1440 +
1441 + this._setOptions( options );
1442 +
1443 + return this;
1444 + },
1445 + _setOptions: function( options ) {
1446 + var key;
1447 +
1448 + for ( key in options ) {
1449 + this._setOption( key, options[ key ] );
1450 + }
1451 +
1452 + return this;
1453 + },
1454 + _setOption: function( key, value ) {
1455 + this.options[ key ] = value;
1456 +
1457 + if ( key === "disabled" ) {
1458 + this.widget()
1459 + .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
1460 + .attr( "aria-disabled", value );
1461 + this.hoverable.removeClass( "ui-state-hover" );
1462 + this.focusable.removeClass( "ui-state-focus" );
1463 + }
1464 +
1465 + return this;
1466 + },
1467 +
1468 + enable: function() {
1469 + return this._setOption( "disabled", false );
1470 + },
1471 + disable: function() {
1472 + return this._setOption( "disabled", true );
1473 + },
1474 +
1475 + _on: function( suppressDisabledCheck, element, handlers ) {
1476 + var delegateElement,
1477 + instance = this;
1478 +
1479 + // no suppressDisabledCheck flag, shuffle arguments
1480 + if ( typeof suppressDisabledCheck !== "boolean" ) {
1481 + handlers = element;
1482 + element = suppressDisabledCheck;
1483 + suppressDisabledCheck = false;
1484 + }
1485 +
1486 + // no element argument, shuffle and use this.element
1487 + if ( !handlers ) {
1488 + handlers = element;
1489 + element = this.element;
1490 + delegateElement = this.widget();
1491 + } else {
1492 + // accept selectors, DOM elements
1493 + element = delegateElement = $( element );
1494 + this.bindings = this.bindings.add( element );
1495 + }
1496 +
1497 + $.each( handlers, function( event, handler ) {
1498 + function handlerProxy() {
1499 + // allow widgets to customize the disabled handling
1500 + // - disabled as an array instead of boolean
1501 + // - disabled class as method for disabling individual parts
1502 + if ( !suppressDisabledCheck &&
1503 + ( instance.options.disabled === true ||
1504 + $( this ).hasClass( "ui-state-disabled" ) ) ) {
1505 + return;
1506 + }
1507 + return ( typeof handler === "string" ? instance[ handler ] : handler )
1508 + .apply( instance, arguments );
1509 + }
1510 +
1511 + // copy the guid so direct unbinding works
1512 + if ( typeof handler !== "string" ) {
1513 + handlerProxy.guid = handler.guid =
1514 + handler.guid || handlerProxy.guid || $.guid++;
1515 + }
1516 +
1517 + var match = event.match( /^(\w+)\s*(.*)$/ ),
1518 + eventName = match[1] + instance.eventNamespace,
1519 + selector = match[2];
1520 + if ( selector ) {
1521 + delegateElement.delegate( selector, eventName, handlerProxy );
1522 + } else {
1523 + element.bind( eventName, handlerProxy );
1524 + }
1525 + });
1526 + },
1527 +
1528 + _off: function( element, eventName ) {
1529 + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
1530 + element.unbind( eventName ).undelegate( eventName );
1531 + },
1532 +
1533 + _delay: function( handler, delay ) {
1534 + function handlerProxy() {
1535 + return ( typeof handler === "string" ? instance[ handler ] : handler )
1536 + .apply( instance, arguments );
1537 + }
1538 + var instance = this;
1539 + return setTimeout( handlerProxy, delay || 0 );
1540 + },
1541 +
1542 + _hoverable: function( element ) {
1543 + this.hoverable = this.hoverable.add( element );
1544 + this._on( element, {
1545 + mouseenter: function( event ) {
1546 + $( event.currentTarget ).addClass( "ui-state-hover" );
1547 + },
1548 + mouseleave: function( event ) {
1549 + $( event.currentTarget ).removeClass( "ui-state-hover" );
1550 + }
1551 + });
1552 + },
1553 +
1554 + _focusable: function( element ) {
1555 + this.focusable = this.focusable.add( element );
1556 + this._on( element, {
1557 + focusin: function( event ) {
1558 + $( event.currentTarget ).addClass( "ui-state-focus" );
1559 + },
1560 + focusout: function( event ) {
1561 + $( event.currentTarget ).removeClass( "ui-state-focus" );
1562 + }
1563 + });
1564 + },
1565 +
1566 + _trigger: function( type, event, data ) {
1567 + var prop, orig,
1568 + callback = this.options[ type ];
1569 +
1570 + data = data || {};
1571 + event = $.Event( event );
1572 + event.type = ( type === this.widgetEventPrefix ?
1573 + type :
1574 + this.widgetEventPrefix + type ).toLowerCase();
1575 + // the original event may come from any element
1576 + // so we need to reset the target on the new event
1577 + event.target = this.element[ 0 ];
1578 +
1579 + // copy original event properties over to the new event
1580 + orig = event.originalEvent;
1581 + if ( orig ) {
1582 + for ( prop in orig ) {
1583 + if ( !( prop in event ) ) {
1584 + event[ prop ] = orig[ prop ];
1585 + }
1586 + }
1587 + }
1588 +
1589 + this.element.trigger( event, data );
1590 + return !( $.isFunction( callback ) &&
1591 + callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
1592 + event.isDefaultPrevented() );
1593 + }
1594 +};
1595 +
1596 +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
1597 + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
1598 + if ( typeof options === "string" ) {
1599 + options = { effect: options };
1600 + }
1601 + var hasOptions,
1602 + effectName = !options ?
1603 + method :
1604 + options === true || typeof options === "number" ?
1605 + defaultEffect :
1606 + options.effect || defaultEffect;
1607 + options = options || {};
1608 + if ( typeof options === "number" ) {
1609 + options = { duration: options };
1610 + }
1611 + hasOptions = !$.isEmptyObject( options );
1612 + options.complete = callback;
1613 + if ( options.delay ) {
1614 + element.delay( options.delay );
1615 + }
1616 + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
1617 + element[ method ]( options );
1618 + } else if ( effectName !== method && element[ effectName ] ) {
1619 + element[ effectName ]( options.duration, options.easing, callback );
1620 + } else {
1621 + element.queue(function( next ) {
1622 + $( this )[ method ]();
1623 + if ( callback ) {
1624 + callback.call( element[ 0 ] );
1625 + }
1626 + next();
1627 + });
1628 + }
1629 + };
1630 +});
1631 +
1632 +})( jQuery );
1633 +
1634 +(function( $, undefined ) {
1635 +
1636 +var mouseHandled = false;
1637 +$( document ).mouseup( function() {
1638 + mouseHandled = false;
1639 +});
1640 +
1641 +$.widget("ui.mouse", {
1642 + version: "1.10.3",
1643 + options: {
1644 + cancel: "input,textarea,button,select,option",
1645 + distance: 1,
1646 + delay: 0
1647 + },
1648 + _mouseInit: function() {
1649 + var that = this;
1650 +
1651 + this.element
1652 + .bind("mousedown."+this.widgetName, function(event) {
1653 + return that._mouseDown(event);
1654 + })
1655 + .bind("click."+this.widgetName, function(event) {
1656 + if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
1657 + $.removeData(event.target, that.widgetName + ".preventClickEvent");
1658 + event.stopImmediatePropagation();
1659 + return false;
1660 + }
1661 + });
1662 +
1663 + this.started = false;
1664 + },
1665 +
1666 + // TODO: make sure destroying one instance of mouse doesn't mess with
1667 + // other instances of mouse
1668 + _mouseDestroy: function() {
1669 + this.element.unbind("."+this.widgetName);
1670 + if ( this._mouseMoveDelegate ) {
1671 + $(document)
1672 + .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
1673 + .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
1674 + }
1675 + },
1676 +
1677 + _mouseDown: function(event) {
1678 + // don't let more than one widget handle mouseStart
1679 + if( mouseHandled ) { return; }
1680 +
1681 + // we may have missed mouseup (out of window)
1682 + (this._mouseStarted && this._mouseUp(event));
1683 +
1684 + this._mouseDownEvent = event;
1685 +
1686 + var that = this,
1687 + btnIsLeft = (event.which === 1),
1688 + // event.target.nodeName works around a bug in IE 8 with
1689 + // disabled inputs (#7620)
1690 + elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
1691 + if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
1692 + return true;
1693 + }
1694 +
1695 + this.mouseDelayMet = !this.options.delay;
1696 + if (!this.mouseDelayMet) {
1697 + this._mouseDelayTimer = setTimeout(function() {
1698 + that.mouseDelayMet = true;
1699 + }, this.options.delay);
1700 + }
1701 +
1702 + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
1703 + this._mouseStarted = (this._mouseStart(event) !== false);
1704 + if (!this._mouseStarted) {
1705 + event.preventDefault();
1706 + return true;
1707 + }
1708 + }
1709 +
1710 + // Click event may never have fired (Gecko & Opera)
1711 + if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
1712 + $.removeData(event.target, this.widgetName + ".preventClickEvent");
1713 + }
1714 +
1715 + // these delegates are required to keep context
1716 + this._mouseMoveDelegate = function(event) {
1717 + return that._mouseMove(event);
1718 + };
1719 + this._mouseUpDelegate = function(event) {
1720 + return that._mouseUp(event);
1721 + };
1722 + $(document)
1723 + .bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
1724 + .bind("mouseup."+this.widgetName, this._mouseUpDelegate);
1725 +
1726 + event.preventDefault();
1727 +
1728 + mouseHandled = true;
1729 + return true;
1730 + },
1731 +
1732 + _mouseMove: function(event) {
1733 + // IE mouseup check - mouseup happened when mouse was out of window
1734 + if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
1735 + return this._mouseUp(event);
1736 + }
1737 +
1738 + if (this._mouseStarted) {
1739 + this._mouseDrag(event);
1740 + return event.preventDefault();
1741 + }
1742 +
1743 + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
1744 + this._mouseStarted =
1745 + (this._mouseStart(this._mouseDownEvent, event) !== false);
1746 + (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
1747 + }
1748 +
1749 + return !this._mouseStarted;
1750 + },
1751 +
1752 + _mouseUp: function(event) {
1753 + $(document)
1754 + .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
1755 + .unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
1756 +
1757 + if (this._mouseStarted) {
1758 + this._mouseStarted = false;
1759 +
1760 + if (event.target === this._mouseDownEvent.target) {
1761 + $.data(event.target, this.widgetName + ".preventClickEvent", true);
1762 + }
1763 +
1764 + this._mouseStop(event);
1765 + }
1766 +
1767 + return false;
1768 + },
1769 +
1770 + _mouseDistanceMet: function(event) {
1771 + return (Math.max(
1772 + Math.abs(this._mouseDownEvent.pageX - event.pageX),
1773 + Math.abs(this._mouseDownEvent.pageY - event.pageY)
1774 + ) >= this.options.distance
1775 + );
1776 + },
1777 +
1778 + _mouseDelayMet: function(/* event */) {
1779 + return this.mouseDelayMet;
1780 + },
1781 +
1782 + // These are placeholder methods, to be overriden by extending plugin
1783 + _mouseStart: function(/* event */) {},
1784 + _mouseDrag: function(/* event */) {},
1785 + _mouseStop: function(/* event */) {},
1786 + _mouseCapture: function(/* event */) { return true; }
1787 +});
1788 +
1789 +})(jQuery);
1790 +
1791 +(function( $, undefined ) {
1792 +
1793 +$.widget("ui.draggable", $.ui.mouse, {
1794 + version: "1.10.3",
1795 + widgetEventPrefix: "drag",
1796 + options: {
1797 + addClasses: true,
1798 + appendTo: "parent",
1799 + axis: false,
1800 + connectToSortable: false,
1801 + containment: false,
1802 + cursor: "auto",
1803 + cursorAt: false,
1804 + grid: false,
1805 + handle: false,
1806 + helper: "original",
1807 + iframeFix: false,
1808 + opacity: false,
1809 + refreshPositions: false,
1810 + revert: false,
1811 + revertDuration: 500,
1812 + scope: "default",
1813 + scroll: true,
1814 + scrollSensitivity: 20,
1815 + scrollSpeed: 20,
1816 + snap: false,
1817 + snapMode: "both",
1818 + snapTolerance: 20,
1819 + stack: false,
1820 + zIndex: false,
1821 +
1822 + // callbacks
1823 + drag: null,
1824 + start: null,
1825 + stop: null
1826 + },
1827 + _create: function() {
1828 +
1829 + if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
1830 + this.element[0].style.position = "relative";
1831 + }
1832 + if (this.options.addClasses){
1833 + this.element.addClass("ui-draggable");
1834 + }
1835 + if (this.options.disabled){
1836 + this.element.addClass("ui-draggable-disabled");
1837 + }
1838 +
1839 + this._mouseInit();
1840 +
1841 + },
1842 +
1843 + _destroy: function() {
1844 + this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
1845 + this._mouseDestroy();
1846 + },
1847 +
1848 + _mouseCapture: function(event) {
1849 +
1850 + var o = this.options;
1851 +
1852 + // among others, prevent a drag on a resizable-handle
1853 + if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
1854 + return false;
1855 + }
1856 +
1857 + //Quit if we're not on a valid handle
1858 + this.handle = this._getHandle(event);
1859 + if (!this.handle) {
1860 + return false;
1861 + }
1862 +
1863 + $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
1864 + $("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>")
1865 + .css({
1866 + width: this.offsetWidth+"px", height: this.offsetHeight+"px",
1867 + position: "absolute", opacity: "0.001", zIndex: 1000
1868 + })
1869 + .css($(this).offset())
1870 + .appendTo("body");
1871 + });
1872 +
1873 + return true;
1874 +
1875 + },
1876 +
1877 + _mouseStart: function(event) {
1878 +
1879 + var o = this.options;
1880 +
1881 + //Create and append the visible helper
1882 + this.helper = this._createHelper(event);
1883 +
1884 + this.helper.addClass("ui-draggable-dragging");
1885 +
1886 + //Cache the helper size
1887 + this._cacheHelperProportions();
1888 +
1889 + //If ddmanager is used for droppables, set the global draggable
1890 + if($.ui.ddmanager) {
1891 + $.ui.ddmanager.current = this;
1892 + }
1893 +
1894 + /*
1895 + * - Position generation -
1896 + * This block generates everything position related - it's the core of draggables.
1897 + */
1898 +
1899 + //Cache the margins of the original element
1900 + this._cacheMargins();
1901 +
1902 + //Store the helper's css position
1903 + this.cssPosition = this.helper.css( "position" );
1904 + this.scrollParent = this.helper.scrollParent();
1905 + this.offsetParent = this.helper.offsetParent();
1906 + this.offsetParentCssPosition = this.offsetParent.css( "position" );
1907 +
1908 + //The element's absolute position on the page minus margins
1909 + this.offset = this.positionAbs = this.element.offset();
1910 + this.offset = {
1911 + top: this.offset.top - this.margins.top,
1912 + left: this.offset.left - this.margins.left
1913 + };
1914 +
1915 + //Reset scroll cache
1916 + this.offset.scroll = false;
1917 +
1918 + $.extend(this.offset, {
1919 + click: { //Where the click happened, relative to the element
1920 + left: event.pageX - this.offset.left,
1921 + top: event.pageY - this.offset.top
1922 + },
1923 + parent: this._getParentOffset(),
1924 + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
1925 + });
1926 +
1927 + //Generate the original position
1928 + this.originalPosition = this.position = this._generatePosition(event);
1929 + this.originalPageX = event.pageX;
1930 + this.originalPageY = event.pageY;
1931 +
1932 + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
1933 + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
1934 +
1935 + //Set a containment if given in the options
1936 + this._setContainment();
1937 +
1938 + //Trigger event + callbacks
1939 + if(this._trigger("start", event) === false) {
1940 + this._clear();
1941 + return false;
1942 + }
1943 +
1944 + //Recache the helper size
1945 + this._cacheHelperProportions();
1946 +
1947 + //Prepare the droppable offsets
1948 + if ($.ui.ddmanager && !o.dropBehaviour) {
1949 + $.ui.ddmanager.prepareOffsets(this, event);
1950 + }
1951 +
1952 +
1953 + this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
1954 +
1955 + //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
1956 + if ( $.ui.ddmanager ) {
1957 + $.ui.ddmanager.dragStart(this, event);
1958 + }
1959 +
1960 + return true;
1961 + },
1962 +
1963 + _mouseDrag: function(event, noPropagation) {
1964 + // reset any necessary cached properties (see #5009)
1965 + if ( this.offsetParentCssPosition === "fixed" ) {
1966 + this.offset.parent = this._getParentOffset();
1967 + }
1968 +
1969 + //Compute the helpers position
1970 + this.position = this._generatePosition(event);
1971 + this.positionAbs = this._convertPositionTo("absolute");
1972 +
1973 + //Call plugins and callbacks and use the resulting position if something is returned
1974 + if (!noPropagation) {
1975 + var ui = this._uiHash();
1976 + if(this._trigger("drag", event, ui) === false) {
1977 + this._mouseUp({});
1978 + return false;
1979 + }
1980 + this.position = ui.position;
1981 + }
1982 +
1983 + if(!this.options.axis || this.options.axis !== "y") {
1984 + this.helper[0].style.left = this.position.left+"px";
1985 + }
1986 + if(!this.options.axis || this.options.axis !== "x") {
1987 + this.helper[0].style.top = this.position.top+"px";
1988 + }
1989 + if($.ui.ddmanager) {
1990 + $.ui.ddmanager.drag(this, event);
1991 + }
1992 +
1993 + return false;
1994 + },
1995 +
1996 + _mouseStop: function(event) {
1997 +
1998 + //If we are using droppables, inform the manager about the drop
1999 + var that = this,
2000 + dropped = false;
2001 + if ($.ui.ddmanager && !this.options.dropBehaviour) {
2002 + dropped = $.ui.ddmanager.drop(this, event);
2003 + }
2004 +
2005 + //if a drop comes from outside (a sortable)
2006 + if(this.dropped) {
2007 + dropped = this.dropped;
2008 + this.dropped = false;
2009 + }
2010 +
2011 + //if the original element is no longer in the DOM don't bother to continue (see #8269)
2012 + if ( this.options.helper === "original" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) {
2013 + return false;
2014 + }
2015 +
2016 + if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
2017 + $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
2018 + if(that._trigger("stop", event) !== false) {
2019 + that._clear();
2020 + }
2021 + });
2022 + } else {
2023 + if(this._trigger("stop", event) !== false) {
2024 + this._clear();
2025 + }
2026 + }
2027 +
2028 + return false;
2029 + },
2030 +
2031 + _mouseUp: function(event) {
2032 + //Remove frame helpers
2033 + $("div.ui-draggable-iframeFix").each(function() {
2034 + this.parentNode.removeChild(this);
2035 + });
2036 +
2037 + //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
2038 + if( $.ui.ddmanager ) {
2039 + $.ui.ddmanager.dragStop(this, event);
2040 + }
2041 +
2042 + return $.ui.mouse.prototype._mouseUp.call(this, event);
2043 + },
2044 +
2045 + cancel: function() {
2046 +
2047 + if(this.helper.is(".ui-draggable-dragging")) {
2048 + this._mouseUp({});
2049 + } else {
2050 + this._clear();
2051 + }
2052 +
2053 + return this;
2054 +
2055 + },
2056 +
2057 + _getHandle: function(event) {
2058 + return this.options.handle ?
2059 + !!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
2060 + true;
2061 + },
2062 +
2063 + _createHelper: function(event) {
2064 +
2065 + var o = this.options,
2066 + helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element);
2067 +
2068 + if(!helper.parents("body").length) {
2069 + helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
2070 + }
2071 +
2072 + if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
2073 + helper.css("position", "absolute");
2074 + }
2075 +
2076 + return helper;
2077 +
2078 + },
2079 +
2080 + _adjustOffsetFromHelper: function(obj) {
2081 + if (typeof obj === "string") {
2082 + obj = obj.split(" ");
2083 + }
2084 + if ($.isArray(obj)) {
2085 + obj = {left: +obj[0], top: +obj[1] || 0};
2086 + }
2087 + if ("left" in obj) {
2088 + this.offset.click.left = obj.left + this.margins.left;
2089 + }
2090 + if ("right" in obj) {
2091 + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
2092 + }
2093 + if ("top" in obj) {
2094 + this.offset.click.top = obj.top + this.margins.top;
2095 + }
2096 + if ("bottom" in obj) {
2097 + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
2098 + }
2099 + },
2100 +
2101 + _getParentOffset: function() {
2102 +
2103 + //Get the offsetParent and cache its position
2104 + var po = this.offsetParent.offset();
2105 +
2106 + // This is a special case where we need to modify a offset calculated on start, since the following happened:
2107 + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
2108 + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
2109 + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
2110 + if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
2111 + po.left += this.scrollParent.scrollLeft();
2112 + po.top += this.scrollParent.scrollTop();
2113 + }
2114 +
2115 + //This needs to be actually done for all browsers, since pageX/pageY includes this information
2116 + //Ugly IE fix
2117 + if((this.offsetParent[0] === document.body) ||
2118 + (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
2119 + po = { top: 0, left: 0 };
2120 + }
2121 +
2122 + return {
2123 + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
2124 + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
2125 + };
2126 +
2127 + },
2128 +
2129 + _getRelativeOffset: function() {
2130 +
2131 + if(this.cssPosition === "relative") {
2132 + var p = this.element.position();
2133 + return {
2134 + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
2135 + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
2136 + };
2137 + } else {
2138 + return { top: 0, left: 0 };
2139 + }
2140 +
2141 + },
2142 +
2143 + _cacheMargins: function() {
2144 + this.margins = {
2145 + left: (parseInt(this.element.css("marginLeft"),10) || 0),
2146 + top: (parseInt(this.element.css("marginTop"),10) || 0),
2147 + right: (parseInt(this.element.css("marginRight"),10) || 0),
2148 + bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
2149 + };
2150 + },
2151 +
2152 + _cacheHelperProportions: function() {
2153 + this.helperProportions = {
2154 + width: this.helper.outerWidth(),
2155 + height: this.helper.outerHeight()
2156 + };
2157 + },
2158 +
2159 + _setContainment: function() {
2160 +
2161 + var over, c, ce,
2162 + o = this.options;
2163 +
2164 + if ( !o.containment ) {
2165 + this.containment = null;
2166 + return;
2167 + }
2168 +
2169 + if ( o.containment === "window" ) {
2170 + this.containment = [
2171 + $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
2172 + $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
2173 + $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
2174 + $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
2175 + ];
2176 + return;
2177 + }
2178 +
2179 + if ( o.containment === "document") {
2180 + this.containment = [
2181 + 0,
2182 + 0,
2183 + $( document ).width() - this.helperProportions.width - this.margins.left,
2184 + ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
2185 + ];
2186 + return;
2187 + }
2188 +
2189 + if ( o.containment.constructor === Array ) {
2190 + this.containment = o.containment;
2191 + return;
2192 + }
2193 +
2194 + if ( o.containment === "parent" ) {
2195 + o.containment = this.helper[ 0 ].parentNode;
2196 + }
2197 +
2198 + c = $( o.containment );
2199 + ce = c[ 0 ];
2200 +
2201 + if( !ce ) {
2202 + return;
2203 + }
2204 +
2205 + over = c.css( "overflow" ) !== "hidden";
2206 +
2207 + this.containment = [
2208 + ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
2209 + ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ) ,
2210 + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right,
2211 + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top - this.margins.bottom
2212 + ];
2213 + this.relative_container = c;
2214 + },
2215 +
2216 + _convertPositionTo: function(d, pos) {
2217 +
2218 + if(!pos) {
2219 + pos = this.position;
2220 + }
2221 +
2222 + var mod = d === "absolute" ? 1 : -1,
2223 + scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent;
2224 +
2225 + //Cache the scroll
2226 + if (!this.offset.scroll) {
2227 + this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
2228 + }
2229 +
2230 + return {
2231 + top: (
2232 + pos.top + // The absolute mouse position
2233 + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
2234 + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
2235 + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod )
2236 + ),
2237 + left: (
2238 + pos.left + // The absolute mouse position
2239 + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
2240 + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
2241 + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )
2242 + )
2243 + };
2244 +
2245 + },
2246 +
2247 + _generatePosition: function(event) {
2248 +
2249 + var containment, co, top, left,
2250 + o = this.options,
2251 + scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent,
2252 + pageX = event.pageX,
2253 + pageY = event.pageY;
2254 +
2255 + //Cache the scroll
2256 + if (!this.offset.scroll) {
2257 + this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
2258 + }
2259 +
2260 + /*
2261 + * - Position constraining -
2262 + * Constrain the position to a mix of grid, containment.
2263 + */
2264 +
2265 + // If we are not dragging yet, we won't check for options
2266 + if ( this.originalPosition ) {
2267 + if ( this.containment ) {
2268 + if ( this.relative_container ){
2269 + co = this.relative_container.offset();
2270 + containment = [
2271 + this.containment[ 0 ] + co.left,
2272 + this.containment[ 1 ] + co.top,
2273 + this.containment[ 2 ] + co.left,
2274 + this.containment[ 3 ] + co.top
2275 + ];
2276 + }
2277 + else {
2278 + containment = this.containment;
2279 + }
2280 +
2281 + if(event.pageX - this.offset.click.left < containment[0]) {
2282 + pageX = containment[0] + this.offset.click.left;
2283 + }
2284 + if(event.pageY - this.offset.click.top < containment[1]) {
2285 + pageY = containment[1] + this.offset.click.top;
2286 + }
2287 + if(event.pageX - this.offset.click.left > containment[2]) {
2288 + pageX = containment[2] + this.offset.click.left;
2289 + }
2290 + if(event.pageY - this.offset.click.top > containment[3]) {
2291 + pageY = containment[3] + this.offset.click.top;
2292 + }
2293 + }
2294 +
2295 + if(o.grid) {
2296 + //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
2297 + top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
2298 + pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
2299 +
2300 + left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
2301 + pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
2302 + }
2303 +
2304 + }
2305 +
2306 + return {
2307 + top: (
2308 + pageY - // The absolute mouse position
2309 + this.offset.click.top - // Click offset (relative to the element)
2310 + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
2311 + this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
2312 + ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top )
2313 + ),
2314 + left: (
2315 + pageX - // The absolute mouse position
2316 + this.offset.click.left - // Click offset (relative to the element)
2317 + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
2318 + this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
2319 + ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left )
2320 + )
2321 + };
2322 +
2323 + },
2324 +
2325 + _clear: function() {
2326 + this.helper.removeClass("ui-draggable-dragging");
2327 + if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
2328 + this.helper.remove();
2329 + }
2330 + this.helper = null;
2331 + this.cancelHelperRemoval = false;
2332 + },
2333 +
2334 + // From now on bulk stuff - mainly helpers
2335 +
2336 + _trigger: function(type, event, ui) {
2337 + ui = ui || this._uiHash();
2338 + $.ui.plugin.call(this, type, [event, ui]);
2339 + //The absolute position has to be recalculated after plugins
2340 + if(type === "drag") {
2341 + this.positionAbs = this._convertPositionTo("absolute");
2342 + }
2343 + return $.Widget.prototype._trigger.call(this, type, event, ui);
2344 + },
2345 +
2346 + plugins: {},
2347 +
2348 + _uiHash: function() {
2349 + return {
2350 + helper: this.helper,
2351 + position: this.position,
2352 + originalPosition: this.originalPosition,
2353 + offset: this.positionAbs
2354 + };
2355 + }
2356 +
2357 +});
2358 +
2359 +$.ui.plugin.add("draggable", "connectToSortable", {
2360 + start: function(event, ui) {
2361 +
2362 + var inst = $(this).data("ui-draggable"), o = inst.options,
2363 + uiSortable = $.extend({}, ui, { item: inst.element });
2364 + inst.sortables = [];
2365 + $(o.connectToSortable).each(function() {
2366 + var sortable = $.data(this, "ui-sortable");
2367 + if (sortable && !sortable.options.disabled) {
2368 + inst.sortables.push({
2369 + instance: sortable,
2370 + shouldRevert: sortable.options.revert
2371 + });
2372 + sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
2373 + sortable._trigger("activate", event, uiSortable);
2374 + }
2375 + });
2376 +
2377 + },
2378 + stop: function(event, ui) {
2379 +
2380 + //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
2381 + var inst = $(this).data("ui-draggable"),
2382 + uiSortable = $.extend({}, ui, { item: inst.element });
2383 +
2384 + $.each(inst.sortables, function() {
2385 + if(this.instance.isOver) {
2386 +
2387 + this.instance.isOver = 0;
2388 +
2389 + inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
2390 + this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
2391 +
2392 + //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid"
2393 + if(this.shouldRevert) {
2394 + this.instance.options.revert = this.shouldRevert;
2395 + }
2396 +
2397 + //Trigger the stop of the sortable
2398 + this.instance._mouseStop(event);
2399 +
2400 + this.instance.options.helper = this.instance.options._helper;
2401 +
2402 + //If the helper has been the original item, restore properties in the sortable
2403 + if(inst.options.helper === "original") {
2404 + this.instance.currentItem.css({ top: "auto", left: "auto" });
2405 + }
2406 +
2407 + } else {
2408 + this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
2409 + this.instance._trigger("deactivate", event, uiSortable);
2410 + }
2411 +
2412 + });
2413 +
2414 + },
2415 + drag: function(event, ui) {
2416 +
2417 + var inst = $(this).data("ui-draggable"), that = this;
2418 +
2419 + $.each(inst.sortables, function() {
2420 +
2421 + var innermostIntersecting = false,
2422 + thisSortable = this;
2423 +
2424 + //Copy over some variables to allow calling the sortable's native _intersectsWith
2425 + this.instance.positionAbs = inst.positionAbs;
2426 + this.instance.helperProportions = inst.helperProportions;
2427 + this.instance.offset.click = inst.offset.click;
2428 +
2429 + if(this.instance._intersectsWith(this.instance.containerCache)) {
2430 + innermostIntersecting = true;
2431 + $.each(inst.sortables, function () {
2432 + this.instance.positionAbs = inst.positionAbs;
2433 + this.instance.helperProportions = inst.helperProportions;
2434 + this.instance.offset.click = inst.offset.click;
2435 + if (this !== thisSortable &&
2436 + this.instance._intersectsWith(this.instance.containerCache) &&
2437 + $.contains(thisSortable.instance.element[0], this.instance.element[0])
2438 + ) {
2439 + innermostIntersecting = false;
2440 + }
2441 + return innermostIntersecting;
2442 + });
2443 + }
2444 +
2445 +
2446 + if(innermostIntersecting) {
2447 + //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
2448 + if(!this.instance.isOver) {
2449 +
2450 + this.instance.isOver = 1;
2451 + //Now we fake the start of dragging for the sortable instance,
2452 + //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
2453 + //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
2454 + this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true);
2455 + this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
2456 + this.instance.options.helper = function() { return ui.helper[0]; };
2457 +
2458 + event.target = this.instance.currentItem[0];
2459 + this.instance._mouseCapture(event, true);
2460 + this.instance._mouseStart(event, true, true);
2461 +
2462 + //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
2463 + this.instance.offset.click.top = inst.offset.click.top;
2464 + this.instance.offset.click.left = inst.offset.click.left;
2465 + this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
2466 + this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
2467 +
2468 + inst._trigger("toSortable", event);
2469 + inst.dropped = this.instance.element; //draggable revert needs that
2470 + //hack so receive/update callbacks work (mostly)
2471 + inst.currentItem = inst.element;
2472 + this.instance.fromOutside = inst;
2473 +
2474 + }
2475 +
2476 + //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
2477 + if(this.instance.currentItem) {
2478 + this.instance._mouseDrag(event);
2479 + }
2480 +
2481 + } else {
2482 +
2483 + //If it doesn't intersect with the sortable, and it intersected before,
2484 + //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
2485 + if(this.instance.isOver) {
2486 +
2487 + this.instance.isOver = 0;
2488 + this.instance.cancelHelperRemoval = true;
2489 +
2490 + //Prevent reverting on this forced stop
2491 + this.instance.options.revert = false;
2492 +
2493 + // The out event needs to be triggered independently
2494 + this.instance._trigger("out", event, this.instance._uiHash(this.instance));
2495 +
2496 + this.instance._mouseStop(event, true);
2497 + this.instance.options.helper = this.instance.options._helper;
2498 +
2499 + //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
2500 + this.instance.currentItem.remove();
2501 + if(this.instance.placeholder) {
2502 + this.instance.placeholder.remove();
2503 + }
2504 +
2505 + inst._trigger("fromSortable", event);
2506 + inst.dropped = false; //draggable revert needs that
2507 + }
2508 +
2509 + }
2510 +
2511 + });
2512 +
2513 + }
2514 +});
2515 +
2516 +$.ui.plugin.add("draggable", "cursor", {
2517 + start: function() {
2518 + var t = $("body"), o = $(this).data("ui-draggable").options;
2519 + if (t.css("cursor")) {
2520 + o._cursor = t.css("cursor");
2521 + }
2522 + t.css("cursor", o.cursor);
2523 + },
2524 + stop: function() {
2525 + var o = $(this).data("ui-draggable").options;
2526 + if (o._cursor) {
2527 + $("body").css("cursor", o._cursor);
2528 + }
2529 + }
2530 +});
2531 +
2532 +$.ui.plugin.add("draggable", "opacity", {
2533 + start: function(event, ui) {
2534 + var t = $(ui.helper), o = $(this).data("ui-draggable").options;
2535 + if(t.css("opacity")) {
2536 + o._opacity = t.css("opacity");
2537 + }
2538 + t.css("opacity", o.opacity);
2539 + },
2540 + stop: function(event, ui) {
2541 + var o = $(this).data("ui-draggable").options;
2542 + if(o._opacity) {
2543 + $(ui.helper).css("opacity", o._opacity);
2544 + }
2545 + }
2546 +});
2547 +
2548 +$.ui.plugin.add("draggable", "scroll", {
2549 + start: function() {
2550 + var i = $(this).data("ui-draggable");
2551 + if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
2552 + i.overflowOffset = i.scrollParent.offset();
2553 + }
2554 + },
2555 + drag: function( event ) {
2556 +
2557 + var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
2558 +
2559 + if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
2560 +
2561 + if(!o.axis || o.axis !== "x") {
2562 + if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
2563 + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
2564 + } else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
2565 + i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
2566 + }
2567 + }
2568 +
2569 + if(!o.axis || o.axis !== "y") {
2570 + if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
2571 + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
2572 + } else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
2573 + i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
2574 + }
2575 + }
2576 +
2577 + } else {
2578 +
2579 + if(!o.axis || o.axis !== "x") {
2580 + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
2581 + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
2582 + } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
2583 + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
2584 + }
2585 + }
2586 +
2587 + if(!o.axis || o.axis !== "y") {
2588 + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
2589 + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
2590 + } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
2591 + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
2592 + }
2593 + }
2594 +
2595 + }
2596 +
2597 + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
2598 + $.ui.ddmanager.prepareOffsets(i, event);
2599 + }
2600 +
2601 + }
2602 +});
2603 +
2604 +$.ui.plugin.add("draggable", "snap", {
2605 + start: function() {
2606 +
2607 + var i = $(this).data("ui-draggable"),
2608 + o = i.options;
2609 +
2610 + i.snapElements = [];
2611 +
2612 + $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
2613 + var $t = $(this),
2614 + $o = $t.offset();
2615 + if(this !== i.element[0]) {
2616 + i.snapElements.push({
2617 + item: this,
2618 + width: $t.outerWidth(), height: $t.outerHeight(),
2619 + top: $o.top, left: $o.left
2620 + });
2621 + }
2622 + });
2623 +
2624 + },
2625 + drag: function(event, ui) {
2626 +
2627 + var ts, bs, ls, rs, l, r, t, b, i, first,
2628 + inst = $(this).data("ui-draggable"),
2629 + o = inst.options,
2630 + d = o.snapTolerance,
2631 + x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
2632 + y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
2633 +
2634 + for (i = inst.snapElements.length - 1; i >= 0; i--){
2635 +
2636 + l = inst.snapElements[i].left;
2637 + r = l + inst.snapElements[i].width;
2638 + t = inst.snapElements[i].top;
2639 + b = t + inst.snapElements[i].height;
2640 +
2641 + if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
2642 + if(inst.snapElements[i].snapping) {
2643 + (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
2644 + }
2645 + inst.snapElements[i].snapping = false;
2646 + continue;
2647 + }
2648 +
2649 + if(o.snapMode !== "inner") {
2650 + ts = Math.abs(t - y2) <= d;
2651 + bs = Math.abs(b - y1) <= d;
2652 + ls = Math.abs(l - x2) <= d;
2653 + rs = Math.abs(r - x1) <= d;
2654 + if(ts) {
2655 + ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
2656 + }
2657 + if(bs) {
2658 + ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
2659 + }
2660 + if(ls) {
2661 + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
2662 + }
2663 + if(rs) {
2664 + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
2665 + }
2666 + }
2667 +
2668 + first = (ts || bs || ls || rs);
2669 +
2670 + if(o.snapMode !== "outer") {
2671 + ts = Math.abs(t - y1) <= d;
2672 + bs = Math.abs(b - y2) <= d;
2673 + ls = Math.abs(l - x1) <= d;
2674 + rs = Math.abs(r - x2) <= d;
2675 + if(ts) {
2676 + ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
2677 + }
2678 + if(bs) {
2679 + ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
2680 + }
2681 + if(ls) {
2682 + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
2683 + }
2684 + if(rs) {
2685 + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
2686 + }
2687 + }
2688 +
2689 + if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
2690 + (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
2691 + }
2692 + inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
2693 +
2694 + }
2695 +
2696 + }
2697 +});
2698 +
2699 +$.ui.plugin.add("draggable", "stack", {
2700 + start: function() {
2701 + var min,
2702 + o = this.data("ui-draggable").options,
2703 + group = $.makeArray($(o.stack)).sort(function(a,b) {
2704 + return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
2705 + });
2706 +
2707 + if (!group.length) { return; }
2708 +
2709 + min = parseInt($(group[0]).css("zIndex"), 10) || 0;
2710 + $(group).each(function(i) {
2711 + $(this).css("zIndex", min + i);
2712 + });
2713 + this.css("zIndex", (min + group.length));
2714 + }
2715 +});
2716 +
2717 +$.ui.plugin.add("draggable", "zIndex", {
2718 + start: function(event, ui) {
2719 + var t = $(ui.helper), o = $(this).data("ui-draggable").options;
2720 + if(t.css("zIndex")) {
2721 + o._zIndex = t.css("zIndex");
2722 + }
2723 + t.css("zIndex", o.zIndex);
2724 + },
2725 + stop: function(event, ui) {
2726 + var o = $(this).data("ui-draggable").options;
2727 + if(o._zIndex) {
2728 + $(ui.helper).css("zIndex", o._zIndex);
2729 + }
2730 + }
2731 +});
2732 +
2733 +})(jQuery);
2734 +
2735 +(function( $, undefined ) {
2736 +
2737 +function isOverAxis( x, reference, size ) {
2738 + return ( x > reference ) && ( x < ( reference + size ) );
2739 +}
2740 +
2741 +$.widget("ui.droppable", {
2742 + version: "1.10.3",
2743 + widgetEventPrefix: "drop",
2744 + options: {
2745 + accept: "*",
2746 + activeClass: false,
2747 + addClasses: true,
2748 + greedy: false,
2749 + hoverClass: false,
2750 + scope: "default",
2751 + tolerance: "intersect",
2752 +
2753 + // callbacks
2754 + activate: null,
2755 + deactivate: null,
2756 + drop: null,
2757 + out: null,
2758 + over: null
2759 + },
2760 + _create: function() {
2761 +
2762 + var o = this.options,
2763 + accept = o.accept;
2764 +
2765 + this.isover = false;
2766 + this.isout = true;
2767 +
2768 + this.accept = $.isFunction(accept) ? accept : function(d) {
2769 + return d.is(accept);
2770 + };
2771 +
2772 + //Store the droppable's proportions
2773 + this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
2774 +
2775 + // Add the reference and positions to the manager
2776 + $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
2777 + $.ui.ddmanager.droppables[o.scope].push(this);
2778 +
2779 + (o.addClasses && this.element.addClass("ui-droppable"));
2780 +
2781 + },
2782 +
2783 + _destroy: function() {
2784 + var i = 0,
2785 + drop = $.ui.ddmanager.droppables[this.options.scope];
2786 +
2787 + for ( ; i < drop.length; i++ ) {
2788 + if ( drop[i] === this ) {
2789 + drop.splice(i, 1);
2790 + }
2791 + }
2792 +
2793 + this.element.removeClass("ui-droppable ui-droppable-disabled");
2794 + },
2795 +
2796 + _setOption: function(key, value) {
2797 +
2798 + if(key === "accept") {
2799 + this.accept = $.isFunction(value) ? value : function(d) {
2800 + return d.is(value);
2801 + };
2802 + }
2803 + $.Widget.prototype._setOption.apply(this, arguments);
2804 + },
2805 +
2806 + _activate: function(event) {
2807 + var draggable = $.ui.ddmanager.current;
2808 + if(this.options.activeClass) {
2809 + this.element.addClass(this.options.activeClass);
2810 + }
2811 + if(draggable){
2812 + this._trigger("activate", event, this.ui(draggable));
2813 + }
2814 + },
2815 +
2816 + _deactivate: function(event) {
2817 + var draggable = $.ui.ddmanager.current;
2818 + if(this.options.activeClass) {
2819 + this.element.removeClass(this.options.activeClass);
2820 + }
2821 + if(draggable){
2822 + this._trigger("deactivate", event, this.ui(draggable));
2823 + }
2824 + },
2825 +
2826 + _over: function(event) {
2827 +
2828 + var draggable = $.ui.ddmanager.current;
2829 +
2830 + // Bail if draggable and droppable are same element
2831 + if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
2832 + return;
2833 + }
2834 +
2835 + if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
2836 + if(this.options.hoverClass) {
2837 + this.element.addClass(this.options.hoverClass);
2838 + }
2839 + this._trigger("over", event, this.ui(draggable));
2840 + }
2841 +
2842 + },
2843 +
2844 + _out: function(event) {
2845 +
2846 + var draggable = $.ui.ddmanager.current;
2847 +
2848 + // Bail if draggable and droppable are same element
2849 + if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
2850 + return;
2851 + }
2852 +
2853 + if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
2854 + if(this.options.hoverClass) {
2855 + this.element.removeClass(this.options.hoverClass);
2856 + }
2857 + this._trigger("out", event, this.ui(draggable));
2858 + }
2859 +
2860 + },
2861 +
2862 + _drop: function(event,custom) {
2863 +
2864 + var draggable = custom || $.ui.ddmanager.current,
2865 + childrenIntersection = false;
2866 +
2867 + // Bail if draggable and droppable are same element
2868 + if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
2869 + return false;
2870 + }
2871 +
2872 + this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
2873 + var inst = $.data(this, "ui-droppable");
2874 + if(
2875 + inst.options.greedy &&
2876 + !inst.options.disabled &&
2877 + inst.options.scope === draggable.options.scope &&
2878 + inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
2879 + $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
2880 + ) { childrenIntersection = true; return false; }
2881 + });
2882 + if(childrenIntersection) {
2883 + return false;
2884 + }
2885 +
2886 + if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
2887 + if(this.options.activeClass) {
2888 + this.element.removeClass(this.options.activeClass);
2889 + }
2890 + if(this.options.hoverClass) {
2891 + this.element.removeClass(this.options.hoverClass);
2892 + }
2893 + this._trigger("drop", event, this.ui(draggable));
2894 + return this.element;
2895 + }
2896 +
2897 + return false;
2898 +
2899 + },
2900 +
2901 + ui: function(c) {
2902 + return {
2903 + draggable: (c.currentItem || c.element),
2904 + helper: c.helper,
2905 + position: c.position,
2906 + offset: c.positionAbs
2907 + };
2908 + }
2909 +
2910 +});
2911 +
2912 +$.ui.intersect = function(draggable, droppable, toleranceMode) {
2913 +
2914 + if (!droppable.offset) {
2915 + return false;
2916 + }
2917 +
2918 + var draggableLeft, draggableTop,
2919 + x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
2920 + y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
2921 + l = droppable.offset.left, r = l + droppable.proportions.width,
2922 + t = droppable.offset.top, b = t + droppable.proportions.height;
2923 +
2924 + switch (toleranceMode) {
2925 + case "fit":
2926 + return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
2927 + case "intersect":
2928 + return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
2929 + x2 - (draggable.helperProportions.width / 2) < r && // Left Half
2930 + t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
2931 + y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
2932 + case "pointer":
2933 + draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
2934 + draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
2935 + return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
2936 + case "touch":
2937 + return (
2938 + (y1 >= t && y1 <= b) || // Top edge touching
2939 + (y2 >= t && y2 <= b) || // Bottom edge touching
2940 + (y1 < t && y2 > b) // Surrounded vertically
2941 + ) && (
2942 + (x1 >= l && x1 <= r) || // Left edge touching
2943 + (x2 >= l && x2 <= r) || // Right edge touching
2944 + (x1 < l && x2 > r) // Surrounded horizontally
2945 + );
2946 + default:
2947 + return false;
2948 + }
2949 +
2950 +};
2951 +
2952 +/*
2953 + This manager tracks offsets of draggables and droppables
2954 +*/
2955 +$.ui.ddmanager = {
2956 + current: null,
2957 + droppables: { "default": [] },
2958 + prepareOffsets: function(t, event) {
2959 +
2960 + var i, j,
2961 + m = $.ui.ddmanager.droppables[t.options.scope] || [],
2962 + type = event ? event.type : null, // workaround for #2317
2963 + list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
2964 +
2965 + droppablesLoop: for (i = 0; i < m.length; i++) {
2966 +
2967 + //No disabled and non-accepted
2968 + if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
2969 + continue;
2970 + }
2971 +
2972 + // Filter out elements in the current dragged item
2973 + for (j=0; j < list.length; j++) {
2974 + if(list[j] === m[i].element[0]) {
2975 + m[i].proportions.height = 0;
2976 + continue droppablesLoop;
2977 + }
2978 + }
2979 +
2980 + m[i].visible = m[i].element.css("display") !== "none";
2981 + if(!m[i].visible) {
2982 + continue;
2983 + }
2984 +
2985 + //Activate the droppable if used directly from draggables
2986 + if(type === "mousedown") {
2987 + m[i]._activate.call(m[i], event);
2988 + }
2989 +
2990 + m[i].offset = m[i].element.offset();
2991 + m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
2992 +
2993 + }
2994 +
2995 + },
2996 + drop: function(draggable, event) {
2997 +
2998 + var dropped = false;
2999 + // Create a copy of the droppables in case the list changes during the drop (#9116)
3000 + $.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {
3001 +
3002 + if(!this.options) {
3003 + return;
3004 + }
3005 + if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
3006 + dropped = this._drop.call(this, event) || dropped;
3007 + }
3008 +
3009 + if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
3010 + this.isout = true;
3011 + this.isover = false;
3012 + this._deactivate.call(this, event);
3013 + }
3014 +
3015 + });
3016 + return dropped;
3017 +
3018 + },
3019 + dragStart: function( draggable, event ) {
3020 + //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
3021 + draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
3022 + if( !draggable.options.refreshPositions ) {
3023 + $.ui.ddmanager.prepareOffsets( draggable, event );
3024 + }
3025 + });
3026 + },
3027 + drag: function(draggable, event) {
3028 +
3029 + //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
3030 + if(draggable.options.refreshPositions) {
3031 + $.ui.ddmanager.prepareOffsets(draggable, event);
3032 + }
3033 +
3034 + //Run through all droppables and check their positions based on specific tolerance options
3035 + $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
3036 +
3037 + if(this.options.disabled || this.greedyChild || !this.visible) {
3038 + return;
3039 + }
3040 +
3041 + var parentInstance, scope, parent,
3042 + intersects = $.ui.intersect(draggable, this, this.options.tolerance),
3043 + c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
3044 + if(!c) {
3045 + return;
3046 + }
3047 +
3048 + if (this.options.greedy) {
3049 + // find droppable parents with same scope
3050 + scope = this.options.scope;
3051 + parent = this.element.parents(":data(ui-droppable)").filter(function () {
3052 + return $.data(this, "ui-droppable").options.scope === scope;
3053 + });
3054 +
3055 + if (parent.length) {
3056 + parentInstance = $.data(parent[0], "ui-droppable");
3057 + parentInstance.greedyChild = (c === "isover");
3058 + }
3059 + }
3060 +
3061 + // we just moved into a greedy child
3062 + if (parentInstance && c === "isover") {
3063 + parentInstance.isover = false;
3064 + parentInstance.isout = true;
3065 + parentInstance._out.call(parentInstance, event);
3066 + }
3067 +
3068 + this[c] = true;
3069 + this[c === "isout" ? "isover" : "isout"] = false;
3070 + this[c === "isover" ? "_over" : "_out"].call(this, event);
3071 +
3072 + // we just moved out of a greedy child
3073 + if (parentInstance && c === "isout") {
3074 + parentInstance.isout = false;
3075 + parentInstance.isover = true;
3076 + parentInstance._over.call(parentInstance, event);
3077 + }
3078 + });
3079 +
3080 + },
3081 + dragStop: function( draggable, event ) {
3082 + draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
3083 + //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
3084 + if( !draggable.options.refreshPositions ) {
3085 + $.ui.ddmanager.prepareOffsets( draggable, event );
3086 + }
3087 + }
3088 +};
3089 +
3090 +})(jQuery);
3091 +
3092 +(function( $, undefined ) {
3093 +
3094 +function num(v) {
3095 + return parseInt(v, 10) || 0;
3096 +}
3097 +
3098 +function isNumber(value) {
3099 + return !isNaN(parseInt(value, 10));
3100 +}
3101 +
3102 +$.widget("ui.resizable", $.ui.mouse, {
3103 + version: "1.10.3",
3104 + widgetEventPrefix: "resize",
3105 + options: {
3106 + alsoResize: false,
3107 + animate: false,
3108 + animateDuration: "slow",
3109 + animateEasing: "swing",
3110 + aspectRatio: false,
3111 + autoHide: false,
3112 + containment: false,
3113 + ghost: false,
3114 + grid: false,
3115 + handles: "e,s,se",
3116 + helper: false,
3117 + maxHeight: null,
3118 + maxWidth: null,
3119 + minHeight: 10,
3120 + minWidth: 10,
3121 + // See #7960
3122 + zIndex: 90,
3123 +
3124 + // callbacks
3125 + resize: null,
3126 + start: null,
3127 + stop: null
3128 + },
3129 + _create: function() {
3130 +
3131 + var n, i, handle, axis, hname,
3132 + that = this,
3133 + o = this.options;
3134 + this.element.addClass("ui-resizable");
3135 +
3136 + $.extend(this, {
3137 + _aspectRatio: !!(o.aspectRatio),
3138 + aspectRatio: o.aspectRatio,
3139 + originalElement: this.element,
3140 + _proportionallyResizeElements: [],
3141 + _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
3142 + });
3143 +
3144 + //Wrap the element if it cannot hold child nodes
3145 + if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
3146 +
3147 + //Create a wrapper element and set the wrapper to the new current internal element
3148 + this.element.wrap(
3149 + $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
3150 + position: this.element.css("position"),
3151 + width: this.element.outerWidth(),
3152 + height: this.element.outerHeight(),
3153 + top: this.element.css("top"),
3154 + left: this.element.css("left")
3155 + })
3156 + );
3157 +
3158 + //Overwrite the original this.element
3159 + this.element = this.element.parent().data(
3160 + "ui-resizable", this.element.data("ui-resizable")
3161 + );
3162 +
3163 + this.elementIsWrapper = true;
3164 +
3165 + //Move margins to the wrapper
3166 + this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
3167 + this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
3168 +
3169 + //Prevent Safari textarea resize
3170 + this.originalResizeStyle = this.originalElement.css("resize");
3171 + this.originalElement.css("resize", "none");
3172 +
3173 + //Push the actual element to our proportionallyResize internal array
3174 + this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" }));
3175 +
3176 + // avoid IE jump (hard set the margin)
3177 + this.originalElement.css({ margin: this.originalElement.css("margin") });
3178 +
3179 + // fix handlers offset
3180 + this._proportionallyResize();
3181 +
3182 + }
3183 +
3184 + this.handles = o.handles || (!$(".ui-resizable-handle", this.element).length ? "e,s,se" : { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" });
3185 + if(this.handles.constructor === String) {
3186 +
3187 + if ( this.handles === "all") {
3188 + this.handles = "n,e,s,w,se,sw,ne,nw";
3189 + }
3190 +
3191 + n = this.handles.split(",");
3192 + this.handles = {};
3193 +
3194 + for(i = 0; i < n.length; i++) {
3195 +
3196 + handle = $.trim(n[i]);
3197 + hname = "ui-resizable-"+handle;
3198 + axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
3199 +
3200 + // Apply zIndex to all handles - see #7960
3201 + axis.css({ zIndex: o.zIndex });
3202 +
3203 + //TODO : What's going on here?
3204 + if ("se" === handle) {
3205 + axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
3206 + }
3207 +
3208 + //Insert into internal handles object and append to element
3209 + this.handles[handle] = ".ui-resizable-"+handle;
3210 + this.element.append(axis);
3211 + }
3212 +
3213 + }
3214 +
3215 + this._renderAxis = function(target) {
3216 +
3217 + var i, axis, padPos, padWrapper;
3218 +
3219 + target = target || this.element;
3220 +
3221 + for(i in this.handles) {
3222 +
3223 + if(this.handles[i].constructor === String) {
3224 + this.handles[i] = $(this.handles[i], this.element).show();
3225 + }
3226 +
3227 + //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
3228 + if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
3229 +
3230 + axis = $(this.handles[i], this.element);
3231 +
3232 + //Checking the correct pad and border
3233 + padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
3234 +
3235 + //The padding type i have to apply...
3236 + padPos = [ "padding",
3237 + /ne|nw|n/.test(i) ? "Top" :
3238 + /se|sw|s/.test(i) ? "Bottom" :
3239 + /^e$/.test(i) ? "Right" : "Left" ].join("");
3240 +
3241 + target.css(padPos, padWrapper);
3242 +
3243 + this._proportionallyResize();
3244 +
3245 + }
3246 +
3247 + //TODO: What's that good for? There's not anything to be executed left
3248 + if(!$(this.handles[i]).length) {
3249 + continue;
3250 + }
3251 + }
3252 + };
3253 +
3254 + //TODO: make renderAxis a prototype function
3255 + this._renderAxis(this.element);
3256 +
3257 + this._handles = $(".ui-resizable-handle", this.element)
3258 + .disableSelection();
3259 +
3260 + //Matching axis name
3261 + this._handles.mouseover(function() {
3262 + if (!that.resizing) {
3263 + if (this.className) {
3264 + axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
3265 + }
3266 + //Axis, default = se
3267 + that.axis = axis && axis[1] ? axis[1] : "se";
3268 + }
3269 + });
3270 +
3271 + //If we want to auto hide the elements
3272 + if (o.autoHide) {
3273 + this._handles.hide();
3274 + $(this.element)
3275 + .addClass("ui-resizable-autohide")
3276 + .mouseenter(function() {
3277 + if (o.disabled) {
3278 + return;
3279 + }
3280 + $(this).removeClass("ui-resizable-autohide");
3281 + that._handles.show();
3282 + })
3283 + .mouseleave(function(){
3284 + if (o.disabled) {
3285 + return;
3286 + }
3287 + if (!that.resizing) {
3288 + $(this).addClass("ui-resizable-autohide");
3289 + that._handles.hide();
3290 + }
3291 + });
3292 + }
3293 +
3294 + //Initialize the mouse interaction
3295 + this._mouseInit();
3296 +
3297 + },
3298 +
3299 + _destroy: function() {
3300 +
3301 + this._mouseDestroy();
3302 +
3303 + var wrapper,
3304 + _destroy = function(exp) {
3305 + $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
3306 + .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove();
3307 + };
3308 +
3309 + //TODO: Unwrap at same DOM position
3310 + if (this.elementIsWrapper) {
3311 + _destroy(this.element);
3312 + wrapper = this.element;
3313 + this.originalElement.css({
3314 + position: wrapper.css("position"),
3315 + width: wrapper.outerWidth(),
3316 + height: wrapper.outerHeight(),
3317 + top: wrapper.css("top"),
3318 + left: wrapper.css("left")
3319 + }).insertAfter( wrapper );
3320 + wrapper.remove();
3321 + }
3322 +
3323 + this.originalElement.css("resize", this.originalResizeStyle);
3324 + _destroy(this.originalElement);
3325 +
3326 + return this;
3327 + },
3328 +
3329 + _mouseCapture: function(event) {
3330 + var i, handle,
3331 + capture = false;
3332 +
3333 + for (i in this.handles) {
3334 + handle = $(this.handles[i])[0];
3335 + if (handle === event.target || $.contains(handle, event.target)) {
3336 + capture = true;
3337 + }
3338 + }
3339 +
3340 + return !this.options.disabled && capture;
3341 + },
3342 +
3343 + _mouseStart: function(event) {
3344 +
3345 + var curleft, curtop, cursor,
3346 + o = this.options,
3347 + iniPos = this.element.position(),
3348 + el = this.element;
3349 +
3350 + this.resizing = true;
3351 +
3352 + // bugfix for http://dev.jquery.com/ticket/1749
3353 + if ( (/absolute/).test( el.css("position") ) ) {
3354 + el.css({ position: "absolute", top: el.css("top"), left: el.css("left") });
3355 + } else if (el.is(".ui-draggable")) {
3356 + el.css({ position: "absolute", top: iniPos.top, left: iniPos.left });
3357 + }
3358 +
3359 + this._renderProxy();
3360 +
3361 + curleft = num(this.helper.css("left"));
3362 + curtop = num(this.helper.css("top"));
3363 +
3364 + if (o.containment) {
3365 + curleft += $(o.containment).scrollLeft() || 0;
3366 + curtop += $(o.containment).scrollTop() || 0;
3367 + }
3368 +
3369 + //Store needed variables
3370 + this.offset = this.helper.offset();
3371 + this.position = { left: curleft, top: curtop };
3372 + this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
3373 + this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
3374 + this.originalPosition = { left: curleft, top: curtop };
3375 + this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
3376 + this.originalMousePosition = { left: event.pageX, top: event.pageY };
3377 +
3378 + //Aspect Ratio
3379 + this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
3380 +
3381 + cursor = $(".ui-resizable-" + this.axis).css("cursor");
3382 + $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor);
3383 +
3384 + el.addClass("ui-resizable-resizing");
3385 + this._propagate("start", event);
3386 + return true;
3387 + },
3388 +
3389 + _mouseDrag: function(event) {
3390 +
3391 + //Increase performance, avoid regex
3392 + var data,
3393 + el = this.helper, props = {},
3394 + smp = this.originalMousePosition,
3395 + a = this.axis,
3396 + prevTop = this.position.top,
3397 + prevLeft = this.position.left,
3398 + prevWidth = this.size.width,
3399 + prevHeight = this.size.height,
3400 + dx = (event.pageX-smp.left)||0,
3401 + dy = (event.pageY-smp.top)||0,
3402 + trigger = this._change[a];
3403 +
3404 + if (!trigger) {
3405 + return false;
3406 + }
3407 +
3408 + // Calculate the attrs that will be change
3409 + data = trigger.apply(this, [event, dx, dy]);
3410 +
3411 + // Put this in the mouseDrag handler since the user can start pressing shift while resizing
3412 + this._updateVirtualBoundaries(event.shiftKey);
3413 + if (this._aspectRatio || event.shiftKey) {
3414 + data = this._updateRatio(data, event);
3415 + }
3416 +
3417 + data = this._respectSize(data, event);
3418 +
3419 + this._updateCache(data);
3420 +
3421 + // plugins callbacks need to be called first
3422 + this._propagate("resize", event);
3423 +
3424 + if (this.position.top !== prevTop) {
3425 + props.top = this.position.top + "px";
3426 + }
3427 + if (this.position.left !== prevLeft) {
3428 + props.left = this.position.left + "px";
3429 + }
3430 + if (this.size.width !== prevWidth) {
3431 + props.width = this.size.width + "px";
3432 + }
3433 + if (this.size.height !== prevHeight) {
3434 + props.height = this.size.height + "px";
3435 + }
3436 + el.css(props);
3437 +
3438 + if (!this._helper && this._proportionallyResizeElements.length) {
3439 + this._proportionallyResize();
3440 + }
3441 +
3442 + // Call the user callback if the element was resized
3443 + if ( ! $.isEmptyObject(props) ) {
3444 + this._trigger("resize", event, this.ui());
3445 + }
3446 +
3447 + return false;
3448 + },
3449 +
3450 + _mouseStop: function(event) {
3451 +
3452 + this.resizing = false;
3453 + var pr, ista, soffseth, soffsetw, s, left, top,
3454 + o = this.options, that = this;
3455 +
3456 + if(this._helper) {
3457 +
3458 + pr = this._proportionallyResizeElements;
3459 + ista = pr.length && (/textarea/i).test(pr[0].nodeName);
3460 + soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height;
3461 + soffsetw = ista ? 0 : that.sizeDiff.width;
3462 +
3463 + s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) };
3464 + left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null;
3465 + top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
3466 +
3467 + if (!o.animate) {
3468 + this.element.css($.extend(s, { top: top, left: left }));
3469 + }
3470 +
3471 + that.helper.height(that.size.height);
3472 + that.helper.width(that.size.width);
3473 +
3474 + if (this._helper && !o.animate) {
3475 + this._proportionallyResize();
3476 + }
3477 + }
3478 +
3479 + $("body").css("cursor", "auto");
3480 +
3481 + this.element.removeClass("ui-resizable-resizing");
3482 +
3483 + this._propagate("stop", event);
3484 +
3485 + if (this._helper) {
3486 + this.helper.remove();
3487 + }
3488 +
3489 + return false;
3490 +
3491 + },
3492 +
3493 + _updateVirtualBoundaries: function(forceAspectRatio) {
3494 + var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
3495 + o = this.options;
3496 +
3497 + b = {
3498 + minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
3499 + maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
3500 + minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
3501 + maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
3502 + };
3503 +
3504 + if(this._aspectRatio || forceAspectRatio) {
3505 + // We want to create an enclosing box whose aspect ration is the requested one
3506 + // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
3507 + pMinWidth = b.minHeight * this.aspectRatio;
3508 + pMinHeight = b.minWidth / this.aspectRatio;
3509 + pMaxWidth = b.maxHeight * this.aspectRatio;
3510 + pMaxHeight = b.maxWidth / this.aspectRatio;
3511 +
3512 + if(pMinWidth > b.minWidth) {
3513 + b.minWidth = pMinWidth;
3514 + }
3515 + if(pMinHeight > b.minHeight) {
3516 + b.minHeight = pMinHeight;
3517 + }
3518 + if(pMaxWidth < b.maxWidth) {
3519 + b.maxWidth = pMaxWidth;
3520 + }
3521 + if(pMaxHeight < b.maxHeight) {
3522 + b.maxHeight = pMaxHeight;
3523 + }
3524 + }
3525 + this._vBoundaries = b;
3526 + },
3527 +
3528 + _updateCache: function(data) {
3529 + this.offset = this.helper.offset();
3530 + if (isNumber(data.left)) {
3531 + this.position.left = data.left;
3532 + }
3533 + if (isNumber(data.top)) {
3534 + this.position.top = data.top;
3535 + }
3536 + if (isNumber(data.height)) {
3537 + this.size.height = data.height;
3538 + }
3539 + if (isNumber(data.width)) {
3540 + this.size.width = data.width;
3541 + }
3542 + },
3543 +
3544 + _updateRatio: function( data ) {
3545 +
3546 + var cpos = this.position,
3547 + csize = this.size,
3548 + a = this.axis;
3549 +
3550 + if (isNumber(data.height)) {
3551 + data.width = (data.height * this.aspectRatio);
3552 + } else if (isNumber(data.width)) {
3553 + data.height = (data.width / this.aspectRatio);
3554 + }
3555 +
3556 + if (a === "sw") {
3557 + data.left = cpos.left + (csize.width - data.width);
3558 + data.top = null;
3559 + }
3560 + if (a === "nw") {
3561 + data.top = cpos.top + (csize.height - data.height);
3562 + data.left = cpos.left + (csize.width - data.width);
3563 + }
3564 +
3565 + return data;
3566 + },
3567 +
3568 + _respectSize: function( data ) {
3569 +
3570 + var o = this._vBoundaries,
3571 + a = this.axis,
3572 + ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
3573 + isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height),
3574 + dw = this.originalPosition.left + this.originalSize.width,
3575 + dh = this.position.top + this.size.height,
3576 + cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
3577 + if (isminw) {
3578 + data.width = o.minWidth;
3579 + }
3580 + if (isminh) {
3581 + data.height = o.minHeight;
3582 + }
3583 + if (ismaxw) {
3584 + data.width = o.maxWidth;
3585 + }
3586 + if (ismaxh) {
3587 + data.height = o.maxHeight;
3588 + }
3589 +
3590 + if (isminw && cw) {
3591 + data.left = dw - o.minWidth;
3592 + }
3593 + if (ismaxw && cw) {
3594 + data.left = dw - o.maxWidth;
3595 + }
3596 + if (isminh && ch) {
3597 + data.top = dh - o.minHeight;
3598 + }
3599 + if (ismaxh && ch) {
3600 + data.top = dh - o.maxHeight;
3601 + }
3602 +
3603 + // fixing jump error on top/left - bug #2330
3604 + if (!data.width && !data.height && !data.left && data.top) {
3605 + data.top = null;
3606 + } else if (!data.width && !data.height && !data.top && data.left) {
3607 + data.left = null;
3608 + }
3609 +
3610 + return data;
3611 + },
3612 +
3613 + _proportionallyResize: function() {
3614 +
3615 + if (!this._proportionallyResizeElements.length) {
3616 + return;
3617 + }
3618 +
3619 + var i, j, borders, paddings, prel,
3620 + element = this.helper || this.element;
3621 +
3622 + for ( i=0; i < this._proportionallyResizeElements.length; i++) {
3623 +
3624 + prel = this._proportionallyResizeElements[i];
3625 +
3626 + if (!this.borderDif) {
3627 + this.borderDif = [];
3628 + borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")];
3629 + paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")];
3630 +
3631 + for ( j = 0; j < borders.length; j++ ) {
3632 + this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 );
3633 + }
3634 + }
3635 +
3636 + prel.css({
3637 + height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
3638 + width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
3639 + });
3640 +
3641 + }
3642 +
3643 + },
3644 +
3645 + _renderProxy: function() {
3646 +
3647 + var el = this.element, o = this.options;
3648 + this.elementOffset = el.offset();
3649 +
3650 + if(this._helper) {
3651 +
3652 + this.helper = this.helper || $("<div style='overflow:hidden;'></div>");
3653 +
3654 + this.helper.addClass(this._helper).css({
3655 + width: this.element.outerWidth() - 1,
3656 + height: this.element.outerHeight() - 1,
3657 + position: "absolute",
3658 + left: this.elementOffset.left +"px",
3659 + top: this.elementOffset.top +"px",
3660 + zIndex: ++o.zIndex //TODO: Don't modify option
3661 + });
3662 +
3663 + this.helper
3664 + .appendTo("body")
3665 + .disableSelection();
3666 +
3667 + } else {
3668 + this.helper = this.element;
3669 + }
3670 +
3671 + },
3672 +
3673 + _change: {
3674 + e: function(event, dx) {
3675 + return { width: this.originalSize.width + dx };
3676 + },
3677 + w: function(event, dx) {
3678 + var cs = this.originalSize, sp = this.originalPosition;
3679 + return { left: sp.left + dx, width: cs.width - dx };
3680 + },
3681 + n: function(event, dx, dy) {
3682 + var cs = this.originalSize, sp = this.originalPosition;
3683 + return { top: sp.top + dy, height: cs.height - dy };
3684 + },
3685 + s: function(event, dx, dy) {
3686 + return { height: this.originalSize.height + dy };
3687 + },
3688 + se: function(event, dx, dy) {
3689 + return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
3690 + },
3691 + sw: function(event, dx, dy) {
3692 + return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
3693 + },
3694 + ne: function(event, dx, dy) {
3695 + return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
3696 + },
3697 + nw: function(event, dx, dy) {
3698 + return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
3699 + }
3700 + },
3701 +
3702 + _propagate: function(n, event) {
3703 + $.ui.plugin.call(this, n, [event, this.ui()]);
3704 + (n !== "resize" && this._trigger(n, event, this.ui()));
3705 + },
3706 +
3707 + plugins: {},
3708 +
3709 + ui: function() {
3710 + return {
3711 + originalElement: this.originalElement,
3712 + element: this.element,
3713 + helper: this.helper,
3714 + position: this.position,
3715 + size: this.size,
3716 + originalSize: this.originalSize,
3717 + originalPosition: this.originalPosition
3718 + };
3719 + }
3720 +
3721 +});
3722 +
3723 +/*
3724 + * Resizable Extensions
3725 + */
3726 +
3727 +$.ui.plugin.add("resizable", "animate", {
3728 +
3729 + stop: function( event ) {
3730 + var that = $(this).data("ui-resizable"),
3731 + o = that.options,
3732 + pr = that._proportionallyResizeElements,
3733 + ista = pr.length && (/textarea/i).test(pr[0].nodeName),
3734 + soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height,
3735 + soffsetw = ista ? 0 : that.sizeDiff.width,
3736 + style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
3737 + left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null,
3738 + top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
3739 +
3740 + that.element.animate(
3741 + $.extend(style, top && left ? { top: top, left: left } : {}), {
3742 + duration: o.animateDuration,
3743 + easing: o.animateEasing,
3744 + step: function() {
3745 +
3746 + var data = {
3747 + width: parseInt(that.element.css("width"), 10),
3748 + height: parseInt(that.element.css("height"), 10),
3749 + top: parseInt(that.element.css("top"), 10),
3750 + left: parseInt(that.element.css("left"), 10)
3751 + };
3752 +
3753 + if (pr && pr.length) {
3754 + $(pr[0]).css({ width: data.width, height: data.height });
3755 + }
3756 +
3757 + // propagating resize, and updating values for each animation step
3758 + that._updateCache(data);
3759 + that._propagate("resize", event);
3760 +
3761 + }
3762 + }
3763 + );
3764 + }
3765 +
3766 +});
3767 +
3768 +$.ui.plugin.add("resizable", "containment", {
3769 +
3770 + start: function() {
3771 + var element, p, co, ch, cw, width, height,
3772 + that = $(this).data("ui-resizable"),
3773 + o = that.options,
3774 + el = that.element,
3775 + oc = o.containment,
3776 + ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
3777 +
3778 + if (!ce) {
3779 + return;
3780 + }
3781 +
3782 + that.containerElement = $(ce);
3783 +
3784 + if (/document/.test(oc) || oc === document) {
3785 + that.containerOffset = { left: 0, top: 0 };
3786 + that.containerPosition = { left: 0, top: 0 };
3787 +
3788 + that.parentData = {
3789 + element: $(document), left: 0, top: 0,
3790 + width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
3791 + };
3792 + }
3793 +
3794 + // i'm a node, so compute top, left, right, bottom
3795 + else {
3796 + element = $(ce);
3797 + p = [];
3798 + $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
3799 +
3800 + that.containerOffset = element.offset();
3801 + that.containerPosition = element.position();
3802 + that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
3803 +
3804 + co = that.containerOffset;
3805 + ch = that.containerSize.height;
3806 + cw = that.containerSize.width;
3807 + width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw );
3808 + height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
3809 +
3810 + that.parentData = {
3811 + element: ce, left: co.left, top: co.top, width: width, height: height
3812 + };
3813 + }
3814 + },
3815 +
3816 + resize: function( event ) {
3817 + var woset, hoset, isParent, isOffsetRelative,
3818 + that = $(this).data("ui-resizable"),
3819 + o = that.options,
3820 + co = that.containerOffset, cp = that.position,
3821 + pRatio = that._aspectRatio || event.shiftKey,
3822 + cop = { top:0, left:0 }, ce = that.containerElement;
3823 +
3824 + if (ce[0] !== document && (/static/).test(ce.css("position"))) {
3825 + cop = co;
3826 + }
3827 +
3828 + if (cp.left < (that._helper ? co.left : 0)) {
3829 + that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
3830 + if (pRatio) {
3831 + that.size.height = that.size.width / that.aspectRatio;
3832 + }
3833 + that.position.left = o.helper ? co.left : 0;
3834 + }
3835 +
3836 + if (cp.top < (that._helper ? co.top : 0)) {
3837 + that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
3838 + if (pRatio) {
3839 + that.size.width = that.size.height * that.aspectRatio;
3840 + }
3841 + that.position.top = that._helper ? co.top : 0;
3842 + }
3843 +
3844 + that.offset.left = that.parentData.left+that.position.left;
3845 + that.offset.top = that.parentData.top+that.position.top;
3846 +
3847 + woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );
3848 + hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
3849 +
3850 + isParent = that.containerElement.get(0) === that.element.parent().get(0);
3851 + isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position"));
3852 +
3853 + if(isParent && isOffsetRelative) {
3854 + woset -= that.parentData.left;
3855 + }
3856 +
3857 + if (woset + that.size.width >= that.parentData.width) {
3858 + that.size.width = that.parentData.width - woset;
3859 + if (pRatio) {
3860 + that.size.height = that.size.width / that.aspectRatio;
3861 + }
3862 + }
3863 +
3864 + if (hoset + that.size.height >= that.parentData.height) {
3865 + that.size.height = that.parentData.height - hoset;
3866 + if (pRatio) {
3867 + that.size.width = that.size.height * that.aspectRatio;
3868 + }
3869 + }
3870 + },
3871 +
3872 + stop: function(){
3873 + var that = $(this).data("ui-resizable"),
3874 + o = that.options,
3875 + co = that.containerOffset,
3876 + cop = that.containerPosition,
3877 + ce = that.containerElement,
3878 + helper = $(that.helper),
3879 + ho = helper.offset(),
3880 + w = helper.outerWidth() - that.sizeDiff.width,
3881 + h = helper.outerHeight() - that.sizeDiff.height;
3882 +
3883 + if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) {
3884 + $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
3885 + }
3886 +
3887 + if (that._helper && !o.animate && (/static/).test(ce.css("position"))) {
3888 + $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
3889 + }
3890 +
3891 + }
3892 +});
3893 +
3894 +$.ui.plugin.add("resizable", "alsoResize", {
3895 +
3896 + start: function () {
3897 + var that = $(this).data("ui-resizable"),
3898 + o = that.options,
3899 + _store = function (exp) {
3900 + $(exp).each(function() {
3901 + var el = $(this);
3902 + el.data("ui-resizable-alsoresize", {
3903 + width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
3904 + left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
3905 + });
3906 + });
3907 + };
3908 +
3909 + if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) {
3910 + if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
3911 + else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
3912 + }else{
3913 + _store(o.alsoResize);
3914 + }
3915 + },
3916 +
3917 + resize: function (event, ui) {
3918 + var that = $(this).data("ui-resizable"),
3919 + o = that.options,
3920 + os = that.originalSize,
3921 + op = that.originalPosition,
3922 + delta = {
3923 + height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
3924 + top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
3925 + },
3926 +
3927 + _alsoResize = function (exp, c) {
3928 + $(exp).each(function() {
3929 + var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
3930 + css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
3931 +
3932 + $.each(css, function (i, prop) {
3933 + var sum = (start[prop]||0) + (delta[prop]||0);
3934 + if (sum && sum >= 0) {
3935 + style[prop] = sum || null;
3936 + }
3937 + });
3938 +
3939 + el.css(style);
3940 + });
3941 + };
3942 +
3943 + if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) {
3944 + $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
3945 + }else{
3946 + _alsoResize(o.alsoResize);
3947 + }
3948 + },
3949 +
3950 + stop: function () {
3951 + $(this).removeData("resizable-alsoresize");
3952 + }
3953 +});
3954 +
3955 +$.ui.plugin.add("resizable", "ghost", {
3956 +
3957 + start: function() {
3958 +
3959 + var that = $(this).data("ui-resizable"), o = that.options, cs = that.size;
3960 +
3961 + that.ghost = that.originalElement.clone();
3962 + that.ghost
3963 + .css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
3964 + .addClass("ui-resizable-ghost")
3965 + .addClass(typeof o.ghost === "string" ? o.ghost : "");
3966 +
3967 + that.ghost.appendTo(that.helper);
3968 +
3969 + },
3970 +
3971 + resize: function(){
3972 + var that = $(this).data("ui-resizable");
3973 + if (that.ghost) {
3974 + that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width });
3975 + }
3976 + },
3977 +
3978 + stop: function() {
3979 + var that = $(this).data("ui-resizable");
3980 + if (that.ghost && that.helper) {
3981 + that.helper.get(0).removeChild(that.ghost.get(0));
3982 + }
3983 + }
3984 +
3985 +});
3986 +
3987 +$.ui.plugin.add("resizable", "grid", {
3988 +
3989 + resize: function() {
3990 + var that = $(this).data("ui-resizable"),
3991 + o = that.options,
3992 + cs = that.size,
3993 + os = that.originalSize,
3994 + op = that.originalPosition,
3995 + a = that.axis,
3996 + grid = typeof o.grid === "number" ? [o.grid, o.grid] : o.grid,
3997 + gridX = (grid[0]||1),
3998 + gridY = (grid[1]||1),
3999 + ox = Math.round((cs.width - os.width) / gridX) * gridX,
4000 + oy = Math.round((cs.height - os.height) / gridY) * gridY,
4001 + newWidth = os.width + ox,
4002 + newHeight = os.height + oy,
4003 + isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
4004 + isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
4005 + isMinWidth = o.minWidth && (o.minWidth > newWidth),
4006 + isMinHeight = o.minHeight && (o.minHeight > newHeight);
4007 +
4008 + o.grid = grid;
4009 +
4010 + if (isMinWidth) {
4011 + newWidth = newWidth + gridX;
4012 + }
4013 + if (isMinHeight) {
4014 + newHeight = newHeight + gridY;
4015 + }
4016 + if (isMaxWidth) {
4017 + newWidth = newWidth - gridX;
4018 + }
4019 + if (isMaxHeight) {
4020 + newHeight = newHeight - gridY;
4021 + }
4022 +
4023 + if (/^(se|s|e)$/.test(a)) {
4024 + that.size.width = newWidth;
4025 + that.size.height = newHeight;
4026 + } else if (/^(ne)$/.test(a)) {
4027 + that.size.width = newWidth;
4028 + that.size.height = newHeight;
4029 + that.position.top = op.top - oy;
4030 + } else if (/^(sw)$/.test(a)) {
4031 + that.size.width = newWidth;
4032 + that.size.height = newHeight;
4033 + that.position.left = op.left - ox;
4034 + } else {
4035 + that.size.width = newWidth;
4036 + that.size.height = newHeight;
4037 + that.position.top = op.top - oy;
4038 + that.position.left = op.left - ox;
4039 + }
4040 + }
4041 +
4042 +});
4043 +
4044 +})(jQuery);
4045 +
4046 +(function( $, undefined ) {
4047 +
4048 +$.widget("ui.selectable", $.ui.mouse, {
4049 + version: "1.10.3",
4050 + options: {
4051 + appendTo: "body",
4052 + autoRefresh: true,
4053 + distance: 0,
4054 + filter: "*",
4055 + tolerance: "touch",
4056 +
4057 + // callbacks
4058 + selected: null,
4059 + selecting: null,
4060 + start: null,
4061 + stop: null,
4062 + unselected: null,
4063 + unselecting: null
4064 + },
4065 + _create: function() {
4066 + var selectees,
4067 + that = this;
4068 +
4069 + this.element.addClass("ui-selectable");
4070 +
4071 + this.dragged = false;
4072 +
4073 + // cache selectee children based on filter
4074 + this.refresh = function() {
4075 + selectees = $(that.options.filter, that.element[0]);
4076 + selectees.addClass("ui-selectee");
4077 + selectees.each(function() {
4078 + var $this = $(this),
4079 + pos = $this.offset();
4080 + $.data(this, "selectable-item", {
4081 + element: this,
4082 + $element: $this,
4083 + left: pos.left,
4084 + top: pos.top,
4085 + right: pos.left + $this.outerWidth(),
4086 + bottom: pos.top + $this.outerHeight(),
4087 + startselected: false,
4088 + selected: $this.hasClass("ui-selected"),
4089 + selecting: $this.hasClass("ui-selecting"),
4090 + unselecting: $this.hasClass("ui-unselecting")
4091 + });
4092 + });
4093 + };
4094 + this.refresh();
4095 +
4096 + this.selectees = selectees.addClass("ui-selectee");
4097 +
4098 + this._mouseInit();
4099 +
4100 + this.helper = $("<div class='ui-selectable-helper'></div>");
4101 + },
4102 +
4103 + _destroy: function() {
4104 + this.selectees
4105 + .removeClass("ui-selectee")
4106 + .removeData("selectable-item");
4107 + this.element
4108 + .removeClass("ui-selectable ui-selectable-disabled");
4109 + this._mouseDestroy();
4110 + },
4111 +
4112 + _mouseStart: function(event) {
4113 + var that = this,
4114 + options = this.options;
4115 +
4116 + this.opos = [event.pageX, event.pageY];
4117 +
4118 + if (this.options.disabled) {
4119 + return;
4120 + }
4121 +
4122 + this.selectees = $(options.filter, this.element[0]);
4123 +
4124 + this._trigger("start", event);
4125 +
4126 + $(options.appendTo).append(this.helper);
4127 + // position helper (lasso)
4128 + this.helper.css({
4129 + "left": event.pageX,
4130 + "top": event.pageY,
4131 + "width": 0,
4132 + "height": 0
4133 + });
4134 +
4135 + if (options.autoRefresh) {
4136 + this.refresh();
4137 + }
4138 +
4139 + this.selectees.filter(".ui-selected").each(function() {
4140 + var selectee = $.data(this, "selectable-item");
4141 + selectee.startselected = true;
4142 + if (!event.metaKey && !event.ctrlKey) {
4143 + selectee.$element.removeClass("ui-selected");
4144 + selectee.selected = false;
4145 + selectee.$element.addClass("ui-unselecting");
4146 + selectee.unselecting = true;
4147 + // selectable UNSELECTING callback
4148 + that._trigger("unselecting", event, {
4149 + unselecting: selectee.element
4150 + });
4151 + }
4152 + });
4153 +
4154 + $(event.target).parents().addBack().each(function() {
4155 + var doSelect,
4156 + selectee = $.data(this, "selectable-item");
4157 + if (selectee) {
4158 + doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
4159 + selectee.$element
4160 + .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
4161 + .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
4162 + selectee.unselecting = !doSelect;
4163 + selectee.selecting = doSelect;
4164 + selectee.selected = doSelect;
4165 + // selectable (UN)SELECTING callback
4166 + if (doSelect) {
4167 + that._trigger("selecting", event, {
4168 + selecting: selectee.element
4169 + });
4170 + } else {
4171 + that._trigger("unselecting", event, {
4172 + unselecting: selectee.element
4173 + });
4174 + }
4175 + return false;
4176 + }
4177 + });
4178 +
4179 + },
4180 +
4181 + _mouseDrag: function(event) {
4182 +
4183 + this.dragged = true;
4184 +
4185 + if (this.options.disabled) {
4186 + return;
4187 + }
4188 +
4189 + var tmp,
4190 + that = this,
4191 + options = this.options,
4192 + x1 = this.opos[0],
4193 + y1 = this.opos[1],
4194 + x2 = event.pageX,
4195 + y2 = event.pageY;
4196 +
4197 + if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
4198 + if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
4199 + this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
4200 +
4201 + this.selectees.each(function() {
4202 + var selectee = $.data(this, "selectable-item"),
4203 + hit = false;
4204 +
4205 + //prevent helper from being selected if appendTo: selectable
4206 + if (!selectee || selectee.element === that.element[0]) {
4207 + return;
4208 + }
4209 +
4210 + if (options.tolerance === "touch") {
4211 + hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
4212 + } else if (options.tolerance === "fit") {
4213 + hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
4214 + }
4215 +
4216 + if (hit) {
4217 + // SELECT
4218 + if (selectee.selected) {
4219 + selectee.$element.removeClass("ui-selected");
4220 + selectee.selected = false;
4221 + }
4222 + if (selectee.unselecting) {
4223 + selectee.$element.removeClass("ui-unselecting");
4224 + selectee.unselecting = false;
4225 + }
4226 + if (!selectee.selecting) {
4227 + selectee.$element.addClass("ui-selecting");
4228 + selectee.selecting = true;
4229 + // selectable SELECTING callback
4230 + that._trigger("selecting", event, {
4231 + selecting: selectee.element
4232 + });
4233 + }
4234 + } else {
4235 + // UNSELECT
4236 + if (selectee.selecting) {
4237 + if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
4238 + selectee.$element.removeClass("ui-selecting");
4239 + selectee.selecting = false;
4240 + selectee.$element.addClass("ui-selected");
4241 + selectee.selected = true;
4242 + } else {
4243 + selectee.$element.removeClass("ui-selecting");
4244 + selectee.selecting = false;
4245 + if (selectee.startselected) {
4246 + selectee.$element.addClass("ui-unselecting");
4247 + selectee.unselecting = true;
4248 + }
4249 + // selectable UNSELECTING callback
4250 + that._trigger("unselecting", event, {
4251 + unselecting: selectee.element
4252 + });
4253 + }
4254 + }
4255 + if (selectee.selected) {
4256 + if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
4257 + selectee.$element.removeClass("ui-selected");
4258 + selectee.selected = false;
4259 +
4260 + selectee.$element.addClass("ui-unselecting");
4261 + selectee.unselecting = true;
4262 + // selectable UNSELECTING callback
4263 + that._trigger("unselecting", event, {
4264 + unselecting: selectee.element
4265 + });
4266 + }
4267 + }
4268 + }
4269 + });
4270 +
4271 + return false;
4272 + },
4273 +
4274 + _mouseStop: function(event) {
4275 + var that = this;
4276 +
4277 + this.dragged = false;
4278 +
4279 + $(".ui-unselecting", this.element[0]).each(function() {
4280 + var selectee = $.data(this, "selectable-item");
4281 + selectee.$element.removeClass("ui-unselecting");
4282 + selectee.unselecting = false;
4283 + selectee.startselected = false;
4284 + that._trigger("unselected", event, {
4285 + unselected: selectee.element
4286 + });
4287 + });
4288 + $(".ui-selecting", this.element[0]).each(function() {
4289 + var selectee = $.data(this, "selectable-item");
4290 + selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
4291 + selectee.selecting = false;
4292 + selectee.selected = true;
4293 + selectee.startselected = true;
4294 + that._trigger("selected", event, {
4295 + selected: selectee.element
4296 + });
4297 + });
4298 + this._trigger("stop", event);
4299 +
4300 + this.helper.remove();
4301 +
4302 + return false;
4303 + }
4304 +
4305 +});
4306 +
4307 +})(jQuery);
4308 +
4309 +(function( $, undefined ) {
4310 +
4311 +/*jshint loopfunc: true */
4312 +
4313 +function isOverAxis( x, reference, size ) {
4314 + return ( x > reference ) && ( x < ( reference + size ) );
4315 +}
4316 +
4317 +function isFloating(item) {
4318 + return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
4319 +}
4320 +
4321 +$.widget("ui.sortable", $.ui.mouse, {
4322 + version: "1.10.3",
4323 + widgetEventPrefix: "sort",
4324 + ready: false,
4325 + options: {
4326 + appendTo: "parent",
4327 + axis: false,
4328 + connectWith: false,
4329 + containment: false,
4330 + cursor: "auto",
4331 + cursorAt: false,
4332 + dropOnEmpty: true,
4333 + forcePlaceholderSize: false,
4334 + forceHelperSize: false,
4335 + grid: false,
4336 + handle: false,
4337 + helper: "original",
4338 + items: "> *",
4339 + opacity: false,
4340 + placeholder: false,
4341 + revert: false,
4342 + scroll: true,
4343 + scrollSensitivity: 20,
4344 + scrollSpeed: 20,
4345 + scope: "default",
4346 + tolerance: "intersect",
4347 + zIndex: 1000,
4348 +
4349 + // callbacks
4350 + activate: null,
4351 + beforeStop: null,
4352 + change: null,
4353 + deactivate: null,
4354 + out: null,
4355 + over: null,
4356 + receive: null,
4357 + remove: null,
4358 + sort: null,
4359 + start: null,
4360 + stop: null,
4361 + update: null
4362 + },
4363 + _create: function() {
4364 +
4365 + var o = this.options;
4366 + this.containerCache = {};
4367 + this.element.addClass("ui-sortable");
4368 +
4369 + //Get the items
4370 + this.refresh();
4371 +
4372 + //Let's determine if the items are being displayed horizontally
4373 + this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false;
4374 +
4375 + //Let's determine the parent's offset
4376 + this.offset = this.element.offset();
4377 +
4378 + //Initialize mouse events for interaction
4379 + this._mouseInit();
4380 +
4381 + //We're ready to go
4382 + this.ready = true;
4383 +
4384 + },
4385 +
4386 + _destroy: function() {
4387 + this.element
4388 + .removeClass("ui-sortable ui-sortable-disabled");
4389 + this._mouseDestroy();
4390 +
4391 + for ( var i = this.items.length - 1; i >= 0; i-- ) {
4392 + this.items[i].item.removeData(this.widgetName + "-item");
4393 + }
4394 +
4395 + return this;
4396 + },
4397 +
4398 + _setOption: function(key, value){
4399 + if ( key === "disabled" ) {
4400 + this.options[ key ] = value;
4401 +
4402 + this.widget().toggleClass( "ui-sortable-disabled", !!value );
4403 + } else {
4404 + // Don't call widget base _setOption for disable as it adds ui-state-disabled class
4405 + $.Widget.prototype._setOption.apply(this, arguments);
4406 + }
4407 + },
4408 +
4409 + _mouseCapture: function(event, overrideHandle) {
4410 + var currentItem = null,
4411 + validHandle = false,
4412 + that = this;
4413 +
4414 + if (this.reverting) {
4415 + return false;
4416 + }
4417 +
4418 + if(this.options.disabled || this.options.type === "static") {
4419 + return false;
4420 + }
4421 +
4422 + //We have to refresh the items data once first
4423 + this._refreshItems(event);
4424 +
4425 + //Find out if the clicked node (or one of its parents) is a actual item in this.items
4426 + $(event.target).parents().each(function() {
4427 + if($.data(this, that.widgetName + "-item") === that) {
4428 + currentItem = $(this);
4429 + return false;
4430 + }
4431 + });
4432 + if($.data(event.target, that.widgetName + "-item") === that) {
4433 + currentItem = $(event.target);
4434 + }
4435 +
4436 + if(!currentItem) {
4437 + return false;
4438 + }
4439 + if(this.options.handle && !overrideHandle) {
4440 + $(this.options.handle, currentItem).find("*").addBack().each(function() {
4441 + if(this === event.target) {
4442 + validHandle = true;
4443 + }
4444 + });
4445 + if(!validHandle) {
4446 + return false;
4447 + }
4448 + }
4449 +
4450 + this.currentItem = currentItem;
4451 + this._removeCurrentsFromItems();
4452 + return true;
4453 +
4454 + },
4455 +
4456 + _mouseStart: function(event, overrideHandle, noActivation) {
4457 +
4458 + var i, body,
4459 + o = this.options;
4460 +
4461 + this.currentContainer = this;
4462 +
4463 + //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
4464 + this.refreshPositions();
4465 +
4466 + //Create and append the visible helper
4467 + this.helper = this._createHelper(event);
4468 +
4469 + //Cache the helper size
4470 + this._cacheHelperProportions();
4471 +
4472 + /*
4473 + * - Position generation -
4474 + * This block generates everything position related - it's the core of draggables.
4475 + */
4476 +
4477 + //Cache the margins of the original element
4478 + this._cacheMargins();
4479 +
4480 + //Get the next scrolling parent
4481 + this.scrollParent = this.helper.scrollParent();
4482 +
4483 + //The element's absolute position on the page minus margins
4484 + this.offset = this.currentItem.offset();
4485 + this.offset = {
4486 + top: this.offset.top - this.margins.top,
4487 + left: this.offset.left - this.margins.left
4488 + };
4489 +
4490 + $.extend(this.offset, {
4491 + click: { //Where the click happened, relative to the element
4492 + left: event.pageX - this.offset.left,
4493 + top: event.pageY - this.offset.top
4494 + },
4495 + parent: this._getParentOffset(),
4496 + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
4497 + });
4498 +
4499 + // Only after we got the offset, we can change the helper's position to absolute
4500 + // TODO: Still need to figure out a way to make relative sorting possible
4501 + this.helper.css("position", "absolute");
4502 + this.cssPosition = this.helper.css("position");
4503 +
4504 + //Generate the original position
4505 + this.originalPosition = this._generatePosition(event);
4506 + this.originalPageX = event.pageX;
4507 + this.originalPageY = event.pageY;
4508 +
4509 + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
4510 + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
4511 +
4512 + //Cache the former DOM position
4513 + this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
4514 +
4515 + //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
4516 + if(this.helper[0] !== this.currentItem[0]) {
4517 + this.currentItem.hide();
4518 + }
4519 +
4520 + //Create the placeholder
4521 + this._createPlaceholder();
4522 +
4523 + //Set a containment if given in the options
4524 + if(o.containment) {
4525 + this._setContainment();
4526 + }
4527 +
4528 + if( o.cursor && o.cursor !== "auto" ) { // cursor option
4529 + body = this.document.find( "body" );
4530 +
4531 + // support: IE
4532 + this.storedCursor = body.css( "cursor" );
4533 + body.css( "cursor", o.cursor );
4534 +
4535 + this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
4536 + }
4537 +
4538 + if(o.opacity) { // opacity option
4539 + if (this.helper.css("opacity")) {
4540 + this._storedOpacity = this.helper.css("opacity");
4541 + }
4542 + this.helper.css("opacity", o.opacity);
4543 + }
4544 +
4545 + if(o.zIndex) { // zIndex option
4546 + if (this.helper.css("zIndex")) {
4547 + this._storedZIndex = this.helper.css("zIndex");
4548 + }
4549 + this.helper.css("zIndex", o.zIndex);
4550 + }
4551 +
4552 + //Prepare scrolling
4553 + if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
4554 + this.overflowOffset = this.scrollParent.offset();
4555 + }
4556 +
4557 + //Call callbacks
4558 + this._trigger("start", event, this._uiHash());
4559 +
4560 + //Recache the helper size
4561 + if(!this._preserveHelperProportions) {
4562 + this._cacheHelperProportions();
4563 + }
4564 +
4565 +
4566 + //Post "activate" events to possible containers
4567 + if( !noActivation ) {
4568 + for ( i = this.containers.length - 1; i >= 0; i-- ) {
4569 + this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
4570 + }
4571 + }
4572 +
4573 + //Prepare possible droppables
4574 + if($.ui.ddmanager) {
4575 + $.ui.ddmanager.current = this;
4576 + }
4577 +
4578 + if ($.ui.ddmanager && !o.dropBehaviour) {
4579 + $.ui.ddmanager.prepareOffsets(this, event);
4580 + }
4581 +
4582 + this.dragging = true;
4583 +
4584 + this.helper.addClass("ui-sortable-helper");
4585 + this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
4586 + return true;
4587 +
4588 + },
4589 +
4590 + _mouseDrag: function(event) {
4591 + var i, item, itemElement, intersection,
4592 + o = this.options,
4593 + scrolled = false;
4594 +
4595 + //Compute the helpers position
4596 + this.position = this._generatePosition(event);
4597 + this.positionAbs = this._convertPositionTo("absolute");
4598 +
4599 + if (!this.lastPositionAbs) {
4600 + this.lastPositionAbs = this.positionAbs;
4601 + }
4602 +
4603 + //Do scrolling
4604 + if(this.options.scroll) {
4605 + if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
4606 +
4607 + if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
4608 + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
4609 + } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
4610 + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
4611 + }
4612 +
4613 + if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
4614 + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
4615 + } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
4616 + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
4617 + }
4618 +
4619 + } else {
4620 +
4621 + if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
4622 + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
4623 + } else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
4624 + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
4625 + }
4626 +
4627 + if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
4628 + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
4629 + } else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
4630 + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
4631 + }
4632 +
4633 + }
4634 +
4635 + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
4636 + $.ui.ddmanager.prepareOffsets(this, event);
4637 + }
4638 + }
4639 +
4640 + //Regenerate the absolute position used for position checks
4641 + this.positionAbs = this._convertPositionTo("absolute");
4642 +
4643 + //Set the helper position
4644 + if(!this.options.axis || this.options.axis !== "y") {
4645 + this.helper[0].style.left = this.position.left+"px";
4646 + }
4647 + if(!this.options.axis || this.options.axis !== "x") {
4648 + this.helper[0].style.top = this.position.top+"px";
4649 + }
4650 +
4651 + //Rearrange
4652 + for (i = this.items.length - 1; i >= 0; i--) {
4653 +
4654 + //Cache variables and intersection, continue if no intersection
4655 + item = this.items[i];
4656 + itemElement = item.item[0];
4657 + intersection = this._intersectsWithPointer(item);
4658 + if (!intersection) {
4659 + continue;
4660 + }
4661 +
4662 + // Only put the placeholder inside the current Container, skip all
4663 + // items form other containers. This works because when moving
4664 + // an item from one container to another the
4665 + // currentContainer is switched before the placeholder is moved.
4666 + //
4667 + // Without this moving items in "sub-sortables" can cause the placeholder to jitter
4668 + // beetween the outer and inner container.
4669 + if (item.instance !== this.currentContainer) {
4670 + continue;
4671 + }
4672 +
4673 + // cannot intersect with itself
4674 + // no useless actions that have been done before
4675 + // no action if the item moved is the parent of the item checked
4676 + if (itemElement !== this.currentItem[0] &&
4677 + this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
4678 + !$.contains(this.placeholder[0], itemElement) &&
4679 + (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
4680 + ) {
4681 +
4682 + this.direction = intersection === 1 ? "down" : "up";
4683 +
4684 + if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
4685 + this._rearrange(event, item);
4686 + } else {
4687 + break;
4688 + }
4689 +
4690 + this._trigger("change", event, this._uiHash());
4691 + break;
4692 + }
4693 + }
4694 +
4695 + //Post events to containers
4696 + this._contactContainers(event);
4697 +
4698 + //Interconnect with droppables
4699 + if($.ui.ddmanager) {
4700 + $.ui.ddmanager.drag(this, event);
4701 + }
4702 +
4703 + //Call callbacks
4704 + this._trigger("sort", event, this._uiHash());
4705 +
4706 + this.lastPositionAbs = this.positionAbs;
4707 + return false;
4708 +
4709 + },
4710 +
4711 + _mouseStop: function(event, noPropagation) {
4712 +
4713 + if(!event) {
4714 + return;
4715 + }
4716 +
4717 + //If we are using droppables, inform the manager about the drop
4718 + if ($.ui.ddmanager && !this.options.dropBehaviour) {
4719 + $.ui.ddmanager.drop(this, event);
4720 + }
4721 +
4722 + if(this.options.revert) {
4723 + var that = this,
4724 + cur = this.placeholder.offset(),
4725 + axis = this.options.axis,
4726 + animation = {};
4727 +
4728 + if ( !axis || axis === "x" ) {
4729 + animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
4730 + }
4731 + if ( !axis || axis === "y" ) {
4732 + animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
4733 + }
4734 + this.reverting = true;
4735 + $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
4736 + that._clear(event);
4737 + });
4738 + } else {
4739 + this._clear(event, noPropagation);
4740 + }
4741 +
4742 + return false;
4743 +
4744 + },
4745 +
4746 + cancel: function() {
4747 +
4748 + if(this.dragging) {
4749 +
4750 + this._mouseUp({ target: null });
4751 +
4752 + if(this.options.helper === "original") {
4753 + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
4754 + } else {
4755 + this.currentItem.show();
4756 + }
4757 +
4758 + //Post deactivating events to containers
4759 + for (var i = this.containers.length - 1; i >= 0; i--){
4760 + this.containers[i]._trigger("deactivate", null, this._uiHash(this));
4761 + if(this.containers[i].containerCache.over) {
4762 + this.containers[i]._trigger("out", null, this._uiHash(this));
4763 + this.containers[i].containerCache.over = 0;
4764 + }
4765 + }
4766 +
4767 + }
4768 +
4769 + if (this.placeholder) {
4770 + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
4771 + if(this.placeholder[0].parentNode) {
4772 + this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
4773 + }
4774 + if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
4775 + this.helper.remove();
4776 + }
4777 +
4778 + $.extend(this, {
4779 + helper: null,
4780 + dragging: false,
4781 + reverting: false,
4782 + _noFinalSort: null
4783 + });
4784 +
4785 + if(this.domPosition.prev) {
4786 + $(this.domPosition.prev).after(this.currentItem);
4787 + } else {
4788 + $(this.domPosition.parent).prepend(this.currentItem);
4789 + }
4790 + }
4791 +
4792 + return this;
4793 +
4794 + },
4795 +
4796 + serialize: function(o) {
4797 +
4798 + var items = this._getItemsAsjQuery(o && o.connected),
4799 + str = [];
4800 + o = o || {};
4801 +
4802 + $(items).each(function() {
4803 + var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
4804 + if (res) {
4805 + str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
4806 + }
4807 + });
4808 +
4809 + if(!str.length && o.key) {
4810 + str.push(o.key + "=");
4811 + }
4812 +
4813 + return str.join("&");
4814 +
4815 + },
4816 +
4817 + toArray: function(o) {
4818 +
4819 + var items = this._getItemsAsjQuery(o && o.connected),
4820 + ret = [];
4821 +
4822 + o = o || {};
4823 +
4824 + items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
4825 + return ret;
4826 +
4827 + },
4828 +
4829 + /* Be careful with the following core functions */
4830 + _intersectsWith: function(item) {
4831 +
4832 + var x1 = this.positionAbs.left,
4833 + x2 = x1 + this.helperProportions.width,
4834 + y1 = this.positionAbs.top,
4835 + y2 = y1 + this.helperProportions.height,
4836 + l = item.left,
4837 + r = l + item.width,
4838 + t = item.top,
4839 + b = t + item.height,
4840 + dyClick = this.offset.click.top,
4841 + dxClick = this.offset.click.left,
4842 + isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
4843 + isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
4844 + isOverElement = isOverElementHeight && isOverElementWidth;
4845 +
4846 + if ( this.options.tolerance === "pointer" ||
4847 + this.options.forcePointerForContainers ||
4848 + (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
4849 + ) {
4850 + return isOverElement;
4851 + } else {
4852 +
4853 + return (l < x1 + (this.helperProportions.width / 2) && // Right Half
4854 + x2 - (this.helperProportions.width / 2) < r && // Left Half
4855 + t < y1 + (this.helperProportions.height / 2) && // Bottom Half
4856 + y2 - (this.helperProportions.height / 2) < b ); // Top Half
4857 +
4858 + }
4859 + },
4860 +
4861 + _intersectsWithPointer: function(item) {
4862 +
4863 + var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
4864 + isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
4865 + isOverElement = isOverElementHeight && isOverElementWidth,
4866 + verticalDirection = this._getDragVerticalDirection(),
4867 + horizontalDirection = this._getDragHorizontalDirection();
4868 +
4869 + if (!isOverElement) {
4870 + return false;
4871 + }
4872 +
4873 + return this.floating ?
4874 + ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
4875 + : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
4876 +
4877 + },
4878 +
4879 + _intersectsWithSides: function(item) {
4880 +
4881 + var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
4882 + isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
4883 + verticalDirection = this._getDragVerticalDirection(),
4884 + horizontalDirection = this._getDragHorizontalDirection();
4885 +
4886 + if (this.floating && horizontalDirection) {
4887 + return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
4888 + } else {
4889 + return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
4890 + }
4891 +
4892 + },
4893 +
4894 + _getDragVerticalDirection: function() {
4895 + var delta = this.positionAbs.top - this.lastPositionAbs.top;
4896 + return delta !== 0 && (delta > 0 ? "down" : "up");
4897 + },
4898 +
4899 + _getDragHorizontalDirection: function() {
4900 + var delta = this.positionAbs.left - this.lastPositionAbs.left;
4901 + return delta !== 0 && (delta > 0 ? "right" : "left");
4902 + },
4903 +
4904 + refresh: function(event) {
4905 + this._refreshItems(event);
4906 + this.refreshPositions();
4907 + return this;
4908 + },
4909 +
4910 + _connectWith: function() {
4911 + var options = this.options;
4912 + return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
4913 + },
4914 +
4915 + _getItemsAsjQuery: function(connected) {
4916 +
4917 + var i, j, cur, inst,
4918 + items = [],
4919 + queries = [],
4920 + connectWith = this._connectWith();
4921 +
4922 + if(connectWith && connected) {
4923 + for (i = connectWith.length - 1; i >= 0; i--){
4924 + cur = $(connectWith[i]);
4925 + for ( j = cur.length - 1; j >= 0; j--){
4926 + inst = $.data(cur[j], this.widgetFullName);
4927 + if(inst && inst !== this && !inst.options.disabled) {
4928 + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
4929 + }
4930 + }
4931 + }
4932 + }
4933 +
4934 + queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
4935 +
4936 + for (i = queries.length - 1; i >= 0; i--){
4937 + queries[i][0].each(function() {
4938 + items.push(this);
4939 + });
4940 + }
4941 +
4942 + return $(items);
4943 +
4944 + },
4945 +
4946 + _removeCurrentsFromItems: function() {
4947 +
4948 + var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
4949 +
4950 + this.items = $.grep(this.items, function (item) {
4951 + for (var j=0; j < list.length; j++) {
4952 + if(list[j] === item.item[0]) {
4953 + return false;
4954 + }
4955 + }
4956 + return true;
4957 + });
4958 +
4959 + },
4960 +
4961 + _refreshItems: function(event) {
4962 +
4963 + this.items = [];
4964 + this.containers = [this];
4965 +
4966 + var i, j, cur, inst, targetData, _queries, item, queriesLength,
4967 + items = this.items,
4968 + queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
4969 + connectWith = this._connectWith();
4970 +
4971 + if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
4972 + for (i = connectWith.length - 1; i >= 0; i--){
4973 + cur = $(connectWith[i]);
4974 + for (j = cur.length - 1; j >= 0; j--){
4975 + inst = $.data(cur[j], this.widgetFullName);
4976 + if(inst && inst !== this && !inst.options.disabled) {
4977 + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
4978 + this.containers.push(inst);
4979 + }
4980 + }
4981 + }
4982 + }
4983 +
4984 + for (i = queries.length - 1; i >= 0; i--) {
4985 + targetData = queries[i][1];
4986 + _queries = queries[i][0];
4987 +
4988 + for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
4989 + item = $(_queries[j]);
4990 +
4991 + item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
4992 +
4993 + items.push({
4994 + item: item,
4995 + instance: targetData,
4996 + width: 0, height: 0,
4997 + left: 0, top: 0
4998 + });
4999 + }
5000 + }
5001 +
5002 + },
5003 +
5004 + refreshPositions: function(fast) {
5005 +
5006 + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
5007 + if(this.offsetParent && this.helper) {
5008 + this.offset.parent = this._getParentOffset();
5009 + }
5010 +
5011 + var i, item, t, p;
5012 +
5013 + for (i = this.items.length - 1; i >= 0; i--){
5014 + item = this.items[i];
5015 +
5016 + //We ignore calculating positions of all connected containers when we're not over them
5017 + if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
5018 + continue;
5019 + }
5020 +
5021 + t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
5022 +
5023 + if (!fast) {
5024 + item.width = t.outerWidth();
5025 + item.height = t.outerHeight();
5026 + }
5027 +
5028 + p = t.offset();
5029 + item.left = p.left;
5030 + item.top = p.top;
5031 + }
5032 +
5033 + if(this.options.custom && this.options.custom.refreshContainers) {
5034 + this.options.custom.refreshContainers.call(this);
5035 + } else {
5036 + for (i = this.containers.length - 1; i >= 0; i--){
5037 + p = this.containers[i].element.offset();
5038 + this.containers[i].containerCache.left = p.left;
5039 + this.containers[i].containerCache.top = p.top;
5040 + this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
5041 + this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
5042 + }
5043 + }
5044 +
5045 + return this;
5046 + },
5047 +
5048 + _createPlaceholder: function(that) {
5049 + that = that || this;
5050 + var className,
5051 + o = that.options;
5052 +
5053 + if(!o.placeholder || o.placeholder.constructor === String) {
5054 + className = o.placeholder;
5055 + o.placeholder = {
5056 + element: function() {
5057 +
5058 + var nodeName = that.currentItem[0].nodeName.toLowerCase(),
5059 + element = $( "<" + nodeName + ">", that.document[0] )
5060 + .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
5061 + .removeClass("ui-sortable-helper");
5062 +
5063 + if ( nodeName === "tr" ) {
5064 + that.currentItem.children().each(function() {
5065 + $( "<td>&#160;</td>", that.document[0] )
5066 + .attr( "colspan", $( this ).attr( "colspan" ) || 1 )
5067 + .appendTo( element );
5068 + });
5069 + } else if ( nodeName === "img" ) {
5070 + element.attr( "src", that.currentItem.attr( "src" ) );
5071 + }
5072 +
5073 + if ( !className ) {
5074 + element.css( "visibility", "hidden" );
5075 + }
5076 +
5077 + return element;
5078 + },
5079 + update: function(container, p) {
5080 +
5081 + // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
5082 + // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
5083 + if(className && !o.forcePlaceholderSize) {
5084 + return;
5085 + }
5086 +
5087 + //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
5088 + if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
5089 + if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
5090 + }
5091 + };
5092 + }
5093 +
5094 + //Create the placeholder
5095 + that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
5096 +
5097 + //Append it after the actual current item
5098 + that.currentItem.after(that.placeholder);
5099 +
5100 + //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
5101 + o.placeholder.update(that, that.placeholder);
5102 +
5103 + },
5104 +
5105 + _contactContainers: function(event) {
5106 + var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
5107 + innermostContainer = null,
5108 + innermostIndex = null;
5109 +
5110 + // get innermost container that intersects with item
5111 + for (i = this.containers.length - 1; i >= 0; i--) {
5112 +
5113 + // never consider a container that's located within the item itself
5114 + if($.contains(this.currentItem[0], this.containers[i].element[0])) {
5115 + continue;
5116 + }
5117 +
5118 + if(this._intersectsWith(this.containers[i].containerCache)) {
5119 +
5120 + // if we've already found a container and it's more "inner" than this, then continue
5121 + if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
5122 + continue;
5123 + }
5124 +
5125 + innermostContainer = this.containers[i];
5126 + innermostIndex = i;
5127 +
5128 + } else {
5129 + // container doesn't intersect. trigger "out" event if necessary
5130 + if(this.containers[i].containerCache.over) {
5131 + this.containers[i]._trigger("out", event, this._uiHash(this));
5132 + this.containers[i].containerCache.over = 0;
5133 + }
5134 + }
5135 +
5136 + }
5137 +
5138 + // if no intersecting containers found, return
5139 + if(!innermostContainer) {
5140 + return;
5141 + }
5142 +
5143 + // move the item into the container if it's not there already
5144 + if(this.containers.length === 1) {
5145 + if (!this.containers[innermostIndex].containerCache.over) {
5146 + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
5147 + this.containers[innermostIndex].containerCache.over = 1;
5148 + }
5149 + } else {
5150 +
5151 + //When entering a new container, we will find the item with the least distance and append our item near it
5152 + dist = 10000;
5153 + itemWithLeastDistance = null;
5154 + floating = innermostContainer.floating || isFloating(this.currentItem);
5155 + posProperty = floating ? "left" : "top";
5156 + sizeProperty = floating ? "width" : "height";
5157 + base = this.positionAbs[posProperty] + this.offset.click[posProperty];
5158 + for (j = this.items.length - 1; j >= 0; j--) {
5159 + if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
5160 + continue;
5161 + }
5162 + if(this.items[j].item[0] === this.currentItem[0]) {
5163 + continue;
5164 + }
5165 + if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
5166 + continue;
5167 + }
5168 + cur = this.items[j].item.offset()[posProperty];
5169 + nearBottom = false;
5170 + if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
5171 + nearBottom = true;
5172 + cur += this.items[j][sizeProperty];
5173 + }
5174 +
5175 + if(Math.abs(cur - base) < dist) {
5176 + dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
5177 + this.direction = nearBottom ? "up": "down";
5178 + }
5179 + }
5180 +
5181 + //Check if dropOnEmpty is enabled
5182 + if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
5183 + return;
5184 + }
5185 +
5186 + if(this.currentContainer === this.containers[innermostIndex]) {
5187 + return;
5188 + }
5189 +
5190 + itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
5191 + this._trigger("change", event, this._uiHash());
5192 + this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
5193 + this.currentContainer = this.containers[innermostIndex];
5194 +
5195 + //Update the placeholder
5196 + this.options.placeholder.update(this.currentContainer, this.placeholder);
5197 +
5198 + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
5199 + this.containers[innermostIndex].containerCache.over = 1;
5200 + }
5201 +
5202 +
5203 + },
5204 +
5205 + _createHelper: function(event) {
5206 +
5207 + var o = this.options,
5208 + helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
5209 +
5210 + //Add the helper to the DOM if that didn't happen already
5211 + if(!helper.parents("body").length) {
5212 + $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
5213 + }
5214 +
5215 + if(helper[0] === this.currentItem[0]) {
5216 + this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
5217 + }
5218 +
5219 + if(!helper[0].style.width || o.forceHelperSize) {
5220 + helper.width(this.currentItem.width());
5221 + }
5222 + if(!helper[0].style.height || o.forceHelperSize) {
5223 + helper.height(this.currentItem.height());
5224 + }
5225 +
5226 + return helper;
5227 +
5228 + },
5229 +
5230 + _adjustOffsetFromHelper: function(obj) {
5231 + if (typeof obj === "string") {
5232 + obj = obj.split(" ");
5233 + }
5234 + if ($.isArray(obj)) {
5235 + obj = {left: +obj[0], top: +obj[1] || 0};
5236 + }
5237 + if ("left" in obj) {
5238 + this.offset.click.left = obj.left + this.margins.left;
5239 + }
5240 + if ("right" in obj) {
5241 + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
5242 + }
5243 + if ("top" in obj) {
5244 + this.offset.click.top = obj.top + this.margins.top;
5245 + }
5246 + if ("bottom" in obj) {
5247 + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
5248 + }
5249 + },
5250 +
5251 + _getParentOffset: function() {
5252 +
5253 +
5254 + //Get the offsetParent and cache its position
5255 + this.offsetParent = this.helper.offsetParent();
5256 + var po = this.offsetParent.offset();
5257 +
5258 + // This is a special case where we need to modify a offset calculated on start, since the following happened:
5259 + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
5260 + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
5261 + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
5262 + if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
5263 + po.left += this.scrollParent.scrollLeft();
5264 + po.top += this.scrollParent.scrollTop();
5265 + }
5266 +
5267 + // This needs to be actually done for all browsers, since pageX/pageY includes this information
5268 + // with an ugly IE fix
5269 + if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
5270 + po = { top: 0, left: 0 };
5271 + }
5272 +
5273 + return {
5274 + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
5275 + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
5276 + };
5277 +
5278 + },
5279 +
5280 + _getRelativeOffset: function() {
5281 +
5282 + if(this.cssPosition === "relative") {
5283 + var p = this.currentItem.position();
5284 + return {
5285 + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
5286 + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
5287 + };
5288 + } else {
5289 + return { top: 0, left: 0 };
5290 + }
5291 +
5292 + },
5293 +
5294 + _cacheMargins: function() {
5295 + this.margins = {
5296 + left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
5297 + top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
5298 + };
5299 + },
5300 +
5301 + _cacheHelperProportions: function() {
5302 + this.helperProportions = {
5303 + width: this.helper.outerWidth(),
5304 + height: this.helper.outerHeight()
5305 + };
5306 + },
5307 +
5308 + _setContainment: function() {
5309 +
5310 + var ce, co, over,
5311 + o = this.options;
5312 + if(o.containment === "parent") {
5313 + o.containment = this.helper[0].parentNode;
5314 + }
5315 + if(o.containment === "document" || o.containment === "window") {
5316 + this.containment = [
5317 + 0 - this.offset.relative.left - this.offset.parent.left,
5318 + 0 - this.offset.relative.top - this.offset.parent.top,
5319 + $(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
5320 + ($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
5321 + ];
5322 + }
5323 +
5324 + if(!(/^(document|window|parent)$/).test(o.containment)) {
5325 + ce = $(o.containment)[0];
5326 + co = $(o.containment).offset();
5327 + over = ($(ce).css("overflow") !== "hidden");
5328 +
5329 + this.containment = [
5330 + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
5331 + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
5332 + co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
5333 + co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
5334 + ];
5335 + }
5336 +
5337 + },
5338 +
5339 + _convertPositionTo: function(d, pos) {
5340 +
5341 + if(!pos) {
5342 + pos = this.position;
5343 + }
5344 + var mod = d === "absolute" ? 1 : -1,
5345 + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
5346 + scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
5347 +
5348 + return {
5349 + top: (
5350 + pos.top + // The absolute mouse position
5351 + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
5352 + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
5353 + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
5354 + ),
5355 + left: (
5356 + pos.left + // The absolute mouse position
5357 + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
5358 + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
5359 + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
5360 + )
5361 + };
5362 +
5363 + },
5364 +
5365 + _generatePosition: function(event) {
5366 +
5367 + var top, left,
5368 + o = this.options,
5369 + pageX = event.pageX,
5370 + pageY = event.pageY,
5371 + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
5372 +
5373 + // This is another very weird special case that only happens for relative elements:
5374 + // 1. If the css position is relative
5375 + // 2. and the scroll parent is the document or similar to the offset parent
5376 + // we have to refresh the relative offset during the scroll so there are no jumps
5377 + if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
5378 + this.offset.relative = this._getRelativeOffset();
5379 + }
5380 +
5381 + /*
5382 + * - Position constraining -
5383 + * Constrain the position to a mix of grid, containment.
5384 + */
5385 +
5386 + if(this.originalPosition) { //If we are not dragging yet, we won't check for options
5387 +
5388 + if(this.containment) {
5389 + if(event.pageX - this.offset.click.left < this.containment[0]) {
5390 + pageX = this.containment[0] + this.offset.click.left;
5391 + }
5392 + if(event.pageY - this.offset.click.top < this.containment[1]) {
5393 + pageY = this.containment[1] + this.offset.click.top;
5394 + }
5395 + if(event.pageX - this.offset.click.left > this.containment[2]) {
5396 + pageX = this.containment[2] + this.offset.click.left;
5397 + }
5398 + if(event.pageY - this.offset.click.top > this.containment[3]) {
5399 + pageY = this.containment[3] + this.offset.click.top;
5400 + }
5401 + }
5402 +
5403 + if(o.grid) {
5404 + top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
5405 + pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
5406 +
5407 + left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
5408 + pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
5409 + }
5410 +
5411 + }
5412 +
5413 + return {
5414 + top: (
5415 + pageY - // The absolute mouse position
5416 + this.offset.click.top - // Click offset (relative to the element)
5417 + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
5418 + this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
5419 + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
5420 + ),
5421 + left: (
5422 + pageX - // The absolute mouse position
5423 + this.offset.click.left - // Click offset (relative to the element)
5424 + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
5425 + this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
5426 + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
5427 + )
5428 + };
5429 +
5430 + },
5431 +
5432 + _rearrange: function(event, i, a, hardRefresh) {
5433 +
5434 + a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
5435 +
5436 + //Various things done here to improve the performance:
5437 + // 1. we create a setTimeout, that calls refreshPositions
5438 + // 2. on the instance, we have a counter variable, that get's higher after every append
5439 + // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
5440 + // 4. this lets only the last addition to the timeout stack through
5441 + this.counter = this.counter ? ++this.counter : 1;
5442 + var counter = this.counter;
5443 +
5444 + this._delay(function() {
5445 + if(counter === this.counter) {
5446 + this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
5447 + }
5448 + });
5449 +
5450 + },
5451 +
5452 + _clear: function(event, noPropagation) {
5453 +
5454 + this.reverting = false;
5455 + // We delay all events that have to be triggered to after the point where the placeholder has been removed and
5456 + // everything else normalized again
5457 + var i,
5458 + delayedTriggers = [];
5459 +
5460 + // We first have to update the dom position of the actual currentItem
5461 + // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
5462 + if(!this._noFinalSort && this.currentItem.parent().length) {
5463 + this.placeholder.before(this.currentItem);
5464 + }
5465 + this._noFinalSort = null;
5466 +
5467 + if(this.helper[0] === this.currentItem[0]) {
5468 + for(i in this._storedCSS) {
5469 + if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
5470 + this._storedCSS[i] = "";
5471 + }
5472 + }
5473 + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
5474 + } else {
5475 + this.currentItem.show();
5476 + }
5477 +
5478 + if(this.fromOutside && !noPropagation) {
5479 + delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
5480 + }
5481 + if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
5482 + delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
5483 + }
5484 +
5485 + // Check if the items Container has Changed and trigger appropriate
5486 + // events.
5487 + if (this !== this.currentContainer) {
5488 + if(!noPropagation) {
5489 + delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
5490 + delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
5491 + delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
5492 + }
5493 + }
5494 +
5495 +
5496 + //Post events to containers
5497 + for (i = this.containers.length - 1; i >= 0; i--){
5498 + if(!noPropagation) {
5499 + delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
5500 + }
5501 + if(this.containers[i].containerCache.over) {
5502 + delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
5503 + this.containers[i].containerCache.over = 0;
5504 + }
5505 + }
5506 +
5507 + //Do what was originally in plugins
5508 + if ( this.storedCursor ) {
5509 + this.document.find( "body" ).css( "cursor", this.storedCursor );
5510 + this.storedStylesheet.remove();
5511 + }
5512 + if(this._storedOpacity) {
5513 + this.helper.css("opacity", this._storedOpacity);
5514 + }
5515 + if(this._storedZIndex) {
5516 + this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
5517 + }
5518 +
5519 + this.dragging = false;
5520 + if(this.cancelHelperRemoval) {
5521 + if(!noPropagation) {
5522 + this._trigger("beforeStop", event, this._uiHash());
5523 + for (i=0; i < delayedTriggers.length; i++) {
5524 + delayedTriggers[i].call(this, event);
5525 + } //Trigger all delayed events
5526 + this._trigger("stop", event, this._uiHash());
5527 + }
5528 +
5529 + this.fromOutside = false;
5530 + return false;
5531 + }
5532 +
5533 + if(!noPropagation) {
5534 + this._trigger("beforeStop", event, this._uiHash());
5535 + }
5536 +
5537 + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
5538 + this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
5539 +
5540 + if(this.helper[0] !== this.currentItem[0]) {
5541 + this.helper.remove();
5542 + }
5543 + this.helper = null;
5544 +
5545 + if(!noPropagation) {
5546 + for (i=0; i < delayedTriggers.length; i++) {
5547 + delayedTriggers[i].call(this, event);
5548 + } //Trigger all delayed events
5549 + this._trigger("stop", event, this._uiHash());
5550 + }
5551 +
5552 + this.fromOutside = false;
5553 + return true;
5554 +
5555 + },
5556 +
5557 + _trigger: function() {
5558 + if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
5559 + this.cancel();
5560 + }
5561 + },
5562 +
5563 + _uiHash: function(_inst) {
5564 + var inst = _inst || this;
5565 + return {
5566 + helper: inst.helper,
5567 + placeholder: inst.placeholder || $([]),
5568 + position: inst.position,
5569 + originalPosition: inst.originalPosition,
5570 + offset: inst.positionAbs,
5571 + item: inst.currentItem,
5572 + sender: _inst ? _inst.element : null
5573 + };
5574 + }
5575 +
5576 +});
5577 +
5578 +})(jQuery);
5579 +
5580 +(function($, undefined) {
5581 +
5582 +var dataSpace = "ui-effects-";
5583 +
5584 +$.effects = {
5585 + effect: {}
5586 +};
5587 +
5588 +/*!
5589 + * jQuery Color Animations v2.1.2
5590 + * https://github.com/jquery/jquery-color
5591 + *
5592 + * Copyright 2013 jQuery Foundation and other contributors
5593 + * Released under the MIT license.
5594 + * http://jquery.org/license
5595 + *
5596 + * Date: Wed Jan 16 08:47:09 2013 -0600
5597 + */
5598 +(function( jQuery, undefined ) {
5599 +
5600 + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
5601 +
5602 + // plusequals test for += 100 -= 100
5603 + rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
5604 + // a set of RE's that can match strings and generate color tuples.
5605 + stringParsers = [{
5606 + re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
5607 + parse: function( execResult ) {
5608 + return [
5609 + execResult[ 1 ],
5610 + execResult[ 2 ],
5611 + execResult[ 3 ],
5612 + execResult[ 4 ]
5613 + ];
5614 + }
5615 + }, {
5616 + re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
5617 + parse: function( execResult ) {
5618 + return [
5619 + execResult[ 1 ] * 2.55,
5620 + execResult[ 2 ] * 2.55,
5621 + execResult[ 3 ] * 2.55,
5622 + execResult[ 4 ]
5623 + ];
5624 + }
5625 + }, {
5626 + // this regex ignores A-F because it's compared against an already lowercased string
5627 + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
5628 + parse: function( execResult ) {
5629 + return [
5630 + parseInt( execResult[ 1 ], 16 ),
5631 + parseInt( execResult[ 2 ], 16 ),
5632 + parseInt( execResult[ 3 ], 16 )
5633 + ];
5634 + }
5635 + }, {
5636 + // this regex ignores A-F because it's compared against an already lowercased string
5637 + re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
5638 + parse: function( execResult ) {
5639 + return [
5640 + parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
5641 + parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
5642 + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
5643 + ];
5644 + }
5645 + }, {
5646 + re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
5647 + space: "hsla",
5648 + parse: function( execResult ) {
5649 + return [
5650 + execResult[ 1 ],
5651 + execResult[ 2 ] / 100,
5652 + execResult[ 3 ] / 100,
5653 + execResult[ 4 ]
5654 + ];
5655 + }
5656 + }],
5657 +
5658 + // jQuery.Color( )
5659 + color = jQuery.Color = function( color, green, blue, alpha ) {
5660 + return new jQuery.Color.fn.parse( color, green, blue, alpha );
5661 + },
5662 + spaces = {
5663 + rgba: {
5664 + props: {
5665 + red: {
5666 + idx: 0,
5667 + type: "byte"
5668 + },
5669 + green: {
5670 + idx: 1,
5671 + type: "byte"
5672 + },
5673 + blue: {
5674 + idx: 2,
5675 + type: "byte"
5676 + }
5677 + }
5678 + },
5679 +
5680 + hsla: {
5681 + props: {
5682 + hue: {
5683 + idx: 0,
5684 + type: "degrees"
5685 + },
5686 + saturation: {
5687 + idx: 1,
5688 + type: "percent"
5689 + },
5690 + lightness: {
5691 + idx: 2,
5692 + type: "percent"
5693 + }
5694 + }
5695 + }
5696 + },
5697 + propTypes = {
5698 + "byte": {
5699 + floor: true,
5700 + max: 255
5701 + },
5702 + "percent": {
5703 + max: 1
5704 + },
5705 + "degrees": {
5706 + mod: 360,
5707 + floor: true
5708 + }
5709 + },
5710 + support = color.support = {},
5711 +
5712 + // element for support tests
5713 + supportElem = jQuery( "<p>" )[ 0 ],
5714 +
5715 + // colors = jQuery.Color.names
5716 + colors,
5717 +
5718 + // local aliases of functions called often
5719 + each = jQuery.each;
5720 +
5721 +// determine rgba support immediately
5722 +supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
5723 +support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
5724 +
5725 +// define cache name and alpha properties
5726 +// for rgba and hsla spaces
5727 +each( spaces, function( spaceName, space ) {
5728 + space.cache = "_" + spaceName;
5729 + space.props.alpha = {
5730 + idx: 3,
5731 + type: "percent",
5732 + def: 1
5733 + };
5734 +});
5735 +
5736 +function clamp( value, prop, allowEmpty ) {
5737 + var type = propTypes[ prop.type ] || {};
5738 +
5739 + if ( value == null ) {
5740 + return (allowEmpty || !prop.def) ? null : prop.def;
5741 + }
5742 +
5743 + // ~~ is an short way of doing floor for positive numbers
5744 + value = type.floor ? ~~value : parseFloat( value );
5745 +
5746 + // IE will pass in empty strings as value for alpha,
5747 + // which will hit this case
5748 + if ( isNaN( value ) ) {
5749 + return prop.def;
5750 + }
5751 +
5752 + if ( type.mod ) {
5753 + // we add mod before modding to make sure that negatives values
5754 + // get converted properly: -10 -> 350
5755 + return (value + type.mod) % type.mod;
5756 + }
5757 +
5758 + // for now all property types without mod have min and max
5759 + return 0 > value ? 0 : type.max < value ? type.max : value;
5760 +}
5761 +
5762 +function stringParse( string ) {
5763 + var inst = color(),
5764 + rgba = inst._rgba = [];
5765 +
5766 + string = string.toLowerCase();
5767 +
5768 + each( stringParsers, function( i, parser ) {
5769 + var parsed,
5770 + match = parser.re.exec( string ),
5771 + values = match && parser.parse( match ),
5772 + spaceName = parser.space || "rgba";
5773 +
5774 + if ( values ) {
5775 + parsed = inst[ spaceName ]( values );
5776 +
5777 + // if this was an rgba parse the assignment might happen twice
5778 + // oh well....
5779 + inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
5780 + rgba = inst._rgba = parsed._rgba;
5781 +
5782 + // exit each( stringParsers ) here because we matched
5783 + return false;
5784 + }
5785 + });
5786 +
5787 + // Found a stringParser that handled it
5788 + if ( rgba.length ) {
5789 +
5790 + // if this came from a parsed string, force "transparent" when alpha is 0
5791 + // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
5792 + if ( rgba.join() === "0,0,0,0" ) {
5793 + jQuery.extend( rgba, colors.transparent );
5794 + }
5795 + return inst;
5796 + }
5797 +
5798 + // named colors
5799 + return colors[ string ];
5800 +}
5801 +
5802 +color.fn = jQuery.extend( color.prototype, {
5803 + parse: function( red, green, blue, alpha ) {
5804 + if ( red === undefined ) {
5805 + this._rgba = [ null, null, null, null ];
5806 + return this;
5807 + }
5808 + if ( red.jquery || red.nodeType ) {
5809 + red = jQuery( red ).css( green );
5810 + green = undefined;
5811 + }
5812 +
5813 + var inst = this,
5814 + type = jQuery.type( red ),
5815 + rgba = this._rgba = [];
5816 +
5817 + // more than 1 argument specified - assume ( red, green, blue, alpha )
5818 + if ( green !== undefined ) {
5819 + red = [ red, green, blue, alpha ];
5820 + type = "array";
5821 + }
5822 +
5823 + if ( type === "string" ) {
5824 + return this.parse( stringParse( red ) || colors._default );
5825 + }
5826 +
5827 + if ( type === "array" ) {
5828 + each( spaces.rgba.props, function( key, prop ) {
5829 + rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
5830 + });
5831 + return this;
5832 + }
5833 +
5834 + if ( type === "object" ) {
5835 + if ( red instanceof color ) {
5836 + each( spaces, function( spaceName, space ) {
5837 + if ( red[ space.cache ] ) {
5838 + inst[ space.cache ] = red[ space.cache ].slice();
5839 + }
5840 + });
5841 + } else {
5842 + each( spaces, function( spaceName, space ) {
5843 + var cache = space.cache;
5844 + each( space.props, function( key, prop ) {
5845 +
5846 + // if the cache doesn't exist, and we know how to convert
5847 + if ( !inst[ cache ] && space.to ) {
5848 +
5849 + // if the value was null, we don't need to copy it
5850 + // if the key was alpha, we don't need to copy it either
5851 + if ( key === "alpha" || red[ key ] == null ) {
5852 + return;
5853 + }
5854 + inst[ cache ] = space.to( inst._rgba );
5855 + }
5856 +
5857 + // this is the only case where we allow nulls for ALL properties.
5858 + // call clamp with alwaysAllowEmpty
5859 + inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
5860 + });
5861 +
5862 + // everything defined but alpha?
5863 + if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
5864 + // use the default of 1
5865 + inst[ cache ][ 3 ] = 1;
5866 + if ( space.from ) {
5867 + inst._rgba = space.from( inst[ cache ] );
5868 + }
5869 + }
5870 + });
5871 + }
5872 + return this;
5873 + }
5874 + },
5875 + is: function( compare ) {
5876 + var is = color( compare ),
5877 + same = true,
5878 + inst = this;
5879 +
5880 + each( spaces, function( _, space ) {
5881 + var localCache,
5882 + isCache = is[ space.cache ];
5883 + if (isCache) {
5884 + localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
5885 + each( space.props, function( _, prop ) {
5886 + if ( isCache[ prop.idx ] != null ) {
5887 + same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
5888 + return same;
5889 + }
5890 + });
5891 + }
5892 + return same;
5893 + });
5894 + return same;
5895 + },
5896 + _space: function() {
5897 + var used = [],
5898 + inst = this;
5899 + each( spaces, function( spaceName, space ) {
5900 + if ( inst[ space.cache ] ) {
5901 + used.push( spaceName );
5902 + }
5903 + });
5904 + return used.pop();
5905 + },
5906 + transition: function( other, distance ) {
5907 + var end = color( other ),
5908 + spaceName = end._space(),
5909 + space = spaces[ spaceName ],
5910 + startColor = this.alpha() === 0 ? color( "transparent" ) : this,
5911 + start = startColor[ space.cache ] || space.to( startColor._rgba ),
5912 + result = start.slice();
5913 +
5914 + end = end[ space.cache ];
5915 + each( space.props, function( key, prop ) {
5916 + var index = prop.idx,
5917 + startValue = start[ index ],
5918 + endValue = end[ index ],
5919 + type = propTypes[ prop.type ] || {};
5920 +
5921 + // if null, don't override start value
5922 + if ( endValue === null ) {
5923 + return;
5924 + }
5925 + // if null - use end
5926 + if ( startValue === null ) {
5927 + result[ index ] = endValue;
5928 + } else {
5929 + if ( type.mod ) {
5930 + if ( endValue - startValue > type.mod / 2 ) {
5931 + startValue += type.mod;
5932 + } else if ( startValue - endValue > type.mod / 2 ) {
5933 + startValue -= type.mod;
5934 + }
5935 + }
5936 + result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
5937 + }
5938 + });
5939 + return this[ spaceName ]( result );
5940 + },
5941 + blend: function( opaque ) {
5942 + // if we are already opaque - return ourself
5943 + if ( this._rgba[ 3 ] === 1 ) {
5944 + return this;
5945 + }
5946 +
5947 + var rgb = this._rgba.slice(),
5948 + a = rgb.pop(),
5949 + blend = color( opaque )._rgba;
5950 +
5951 + return color( jQuery.map( rgb, function( v, i ) {
5952 + return ( 1 - a ) * blend[ i ] + a * v;
5953 + }));
5954 + },
5955 + toRgbaString: function() {
5956 + var prefix = "rgba(",
5957 + rgba = jQuery.map( this._rgba, function( v, i ) {
5958 + return v == null ? ( i > 2 ? 1 : 0 ) : v;
5959 + });
5960 +
5961 + if ( rgba[ 3 ] === 1 ) {
5962 + rgba.pop();
5963 + prefix = "rgb(";
5964 + }
5965 +
5966 + return prefix + rgba.join() + ")";
5967 + },
5968 + toHslaString: function() {
5969 + var prefix = "hsla(",
5970 + hsla = jQuery.map( this.hsla(), function( v, i ) {
5971 + if ( v == null ) {
5972 + v = i > 2 ? 1 : 0;
5973 + }
5974 +
5975 + // catch 1 and 2
5976 + if ( i && i < 3 ) {
5977 + v = Math.round( v * 100 ) + "%";
5978 + }
5979 + return v;
5980 + });
5981 +
5982 + if ( hsla[ 3 ] === 1 ) {
5983 + hsla.pop();
5984 + prefix = "hsl(";
5985 + }
5986 + return prefix + hsla.join() + ")";
5987 + },
5988 + toHexString: function( includeAlpha ) {
5989 + var rgba = this._rgba.slice(),
5990 + alpha = rgba.pop();
5991 +
5992 + if ( includeAlpha ) {
5993 + rgba.push( ~~( alpha * 255 ) );
5994 + }
5995 +
5996 + return "#" + jQuery.map( rgba, function( v ) {
5997 +
5998 + // default to 0 when nulls exist
5999 + v = ( v || 0 ).toString( 16 );
6000 + return v.length === 1 ? "0" + v : v;
6001 + }).join("");
6002 + },
6003 + toString: function() {
6004 + return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
6005 + }
6006 +});
6007 +color.fn.parse.prototype = color.fn;
6008 +
6009 +// hsla conversions adapted from:
6010 +// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
6011 +
6012 +function hue2rgb( p, q, h ) {
6013 + h = ( h + 1 ) % 1;
6014 + if ( h * 6 < 1 ) {
6015 + return p + (q - p) * h * 6;
6016 + }
6017 + if ( h * 2 < 1) {
6018 + return q;
6019 + }
6020 + if ( h * 3 < 2 ) {
6021 + return p + (q - p) * ((2/3) - h) * 6;
6022 + }
6023 + return p;
6024 +}
6025 +
6026 +spaces.hsla.to = function ( rgba ) {
6027 + if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
6028 + return [ null, null, null, rgba[ 3 ] ];
6029 + }
6030 + var r = rgba[ 0 ] / 255,
6031 + g = rgba[ 1 ] / 255,
6032 + b = rgba[ 2 ] / 255,
6033 + a = rgba[ 3 ],
6034 + max = Math.max( r, g, b ),
6035 + min = Math.min( r, g, b ),
6036 + diff = max - min,
6037 + add = max + min,
6038 + l = add * 0.5,
6039 + h, s;
6040 +
6041 + if ( min === max ) {
6042 + h = 0;
6043 + } else if ( r === max ) {
6044 + h = ( 60 * ( g - b ) / diff ) + 360;
6045 + } else if ( g === max ) {
6046 + h = ( 60 * ( b - r ) / diff ) + 120;
6047 + } else {
6048 + h = ( 60 * ( r - g ) / diff ) + 240;
6049 + }
6050 +
6051 + // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
6052 + // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
6053 + if ( diff === 0 ) {
6054 + s = 0;
6055 + } else if ( l <= 0.5 ) {
6056 + s = diff / add;
6057 + } else {
6058 + s = diff / ( 2 - add );
6059 + }
6060 + return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
6061 +};
6062 +
6063 +spaces.hsla.from = function ( hsla ) {
6064 + if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
6065 + return [ null, null, null, hsla[ 3 ] ];
6066 + }
6067 + var h = hsla[ 0 ] / 360,
6068 + s = hsla[ 1 ],
6069 + l = hsla[ 2 ],
6070 + a = hsla[ 3 ],
6071 + q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
6072 + p = 2 * l - q;
6073 +
6074 + return [
6075 + Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
6076 + Math.round( hue2rgb( p, q, h ) * 255 ),
6077 + Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
6078 + a
6079 + ];
6080 +};
6081 +
6082 +
6083 +each( spaces, function( spaceName, space ) {
6084 + var props = space.props,
6085 + cache = space.cache,
6086 + to = space.to,
6087 + from = space.from;
6088 +
6089 + // makes rgba() and hsla()
6090 + color.fn[ spaceName ] = function( value ) {
6091 +
6092 + // generate a cache for this space if it doesn't exist
6093 + if ( to && !this[ cache ] ) {
6094 + this[ cache ] = to( this._rgba );
6095 + }
6096 + if ( value === undefined ) {
6097 + return this[ cache ].slice();
6098 + }
6099 +
6100 + var ret,
6101 + type = jQuery.type( value ),
6102 + arr = ( type === "array" || type === "object" ) ? value : arguments,
6103 + local = this[ cache ].slice();
6104 +
6105 + each( props, function( key, prop ) {
6106 + var val = arr[ type === "object" ? key : prop.idx ];
6107 + if ( val == null ) {
6108 + val = local[ prop.idx ];
6109 + }
6110 + local[ prop.idx ] = clamp( val, prop );
6111 + });
6112 +
6113 + if ( from ) {
6114 + ret = color( from( local ) );
6115 + ret[ cache ] = local;
6116 + return ret;
6117 + } else {
6118 + return color( local );
6119 + }
6120 + };
6121 +
6122 + // makes red() green() blue() alpha() hue() saturation() lightness()
6123 + each( props, function( key, prop ) {
6124 + // alpha is included in more than one space
6125 + if ( color.fn[ key ] ) {
6126 + return;
6127 + }
6128 + color.fn[ key ] = function( value ) {
6129 + var vtype = jQuery.type( value ),
6130 + fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
6131 + local = this[ fn ](),
6132 + cur = local[ prop.idx ],
6133 + match;
6134 +
6135 + if ( vtype === "undefined" ) {
6136 + return cur;
6137 + }
6138 +
6139 + if ( vtype === "function" ) {
6140 + value = value.call( this, cur );
6141 + vtype = jQuery.type( value );
6142 + }
6143 + if ( value == null && prop.empty ) {
6144 + return this;
6145 + }
6146 + if ( vtype === "string" ) {
6147 + match = rplusequals.exec( value );
6148 + if ( match ) {
6149 + value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
6150 + }
6151 + }
6152 + local[ prop.idx ] = value;
6153 + return this[ fn ]( local );
6154 + };
6155 + });
6156 +});
6157 +
6158 +// add cssHook and .fx.step function for each named hook.
6159 +// accept a space separated string of properties
6160 +color.hook = function( hook ) {
6161 + var hooks = hook.split( " " );
6162 + each( hooks, function( i, hook ) {
6163 + jQuery.cssHooks[ hook ] = {
6164 + set: function( elem, value ) {
6165 + var parsed, curElem,
6166 + backgroundColor = "";
6167 +
6168 + if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
6169 + value = color( parsed || value );
6170 + if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
6171 + curElem = hook === "backgroundColor" ? elem.parentNode : elem;
6172 + while (
6173 + (backgroundColor === "" || backgroundColor === "transparent") &&
6174 + curElem && curElem.style
6175 + ) {
6176 + try {
6177 + backgroundColor = jQuery.css( curElem, "backgroundColor" );
6178 + curElem = curElem.parentNode;
6179 + } catch ( e ) {
6180 + }
6181 + }
6182 +
6183 + value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
6184 + backgroundColor :
6185 + "_default" );
6186 + }
6187 +
6188 + value = value.toRgbaString();
6189 + }
6190 + try {
6191 + elem.style[ hook ] = value;
6192 + } catch( e ) {
6193 + // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
6194 + }
6195 + }
6196 + };
6197 + jQuery.fx.step[ hook ] = function( fx ) {
6198 + if ( !fx.colorInit ) {
6199 + fx.start = color( fx.elem, hook );
6200 + fx.end = color( fx.end );
6201 + fx.colorInit = true;
6202 + }
6203 + jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
6204 + };
6205 + });
6206 +
6207 +};
6208 +
6209 +color.hook( stepHooks );
6210 +
6211 +jQuery.cssHooks.borderColor = {
6212 + expand: function( value ) {
6213 + var expanded = {};
6214 +
6215 + each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
6216 + expanded[ "border" + part + "Color" ] = value;
6217 + });
6218 + return expanded;
6219 + }
6220 +};
6221 +
6222 +// Basic color names only.
6223 +// Usage of any of the other color names requires adding yourself or including
6224 +// jquery.color.svg-names.js.
6225 +colors = jQuery.Color.names = {
6226 + // 4.1. Basic color keywords
6227 + aqua: "#00ffff",
6228 + black: "#000000",
6229 + blue: "#0000ff",
6230 + fuchsia: "#ff00ff",
6231 + gray: "#808080",
6232 + green: "#008000",
6233 + lime: "#00ff00",
6234 + maroon: "#800000",
6235 + navy: "#000080",
6236 + olive: "#808000",
6237 + purple: "#800080",
6238 + red: "#ff0000",
6239 + silver: "#c0c0c0",
6240 + teal: "#008080",
6241 + white: "#ffffff",
6242 + yellow: "#ffff00",
6243 +
6244 + // 4.2.3. "transparent" color keyword
6245 + transparent: [ null, null, null, 0 ],
6246 +
6247 + _default: "#ffffff"
6248 +};
6249 +
6250 +})( jQuery );
6251 +
6252 +
6253 +/******************************************************************************/
6254 +/****************************** CLASS ANIMATIONS ******************************/
6255 +/******************************************************************************/
6256 +(function() {
6257 +
6258 +var classAnimationActions = [ "add", "remove", "toggle" ],
6259 + shorthandStyles = {
6260 + border: 1,
6261 + borderBottom: 1,
6262 + borderColor: 1,
6263 + borderLeft: 1,
6264 + borderRight: 1,
6265 + borderTop: 1,
6266 + borderWidth: 1,
6267 + margin: 1,
6268 + padding: 1
6269 + };
6270 +
6271 +$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
6272 + $.fx.step[ prop ] = function( fx ) {
6273 + if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
6274 + jQuery.style( fx.elem, prop, fx.end );
6275 + fx.setAttr = true;
6276 + }
6277 + };
6278 +});
6279 +
6280 +function getElementStyles( elem ) {
6281 + var key, len,
6282 + style = elem.ownerDocument.defaultView ?
6283 + elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
6284 + elem.currentStyle,
6285 + styles = {};
6286 +
6287 + if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
6288 + len = style.length;
6289 + while ( len-- ) {
6290 + key = style[ len ];
6291 + if ( typeof style[ key ] === "string" ) {
6292 + styles[ $.camelCase( key ) ] = style[ key ];
6293 + }
6294 + }
6295 + // support: Opera, IE <9
6296 + } else {
6297 + for ( key in style ) {
6298 + if ( typeof style[ key ] === "string" ) {
6299 + styles[ key ] = style[ key ];
6300 + }
6301 + }
6302 + }
6303 +
6304 + return styles;
6305 +}
6306 +
6307 +
6308 +function styleDifference( oldStyle, newStyle ) {
6309 + var diff = {},
6310 + name, value;
6311 +
6312 + for ( name in newStyle ) {
6313 + value = newStyle[ name ];
6314 + if ( oldStyle[ name ] !== value ) {
6315 + if ( !shorthandStyles[ name ] ) {
6316 + if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
6317 + diff[ name ] = value;
6318 + }
6319 + }
6320 + }
6321 + }
6322 +
6323 + return diff;
6324 +}
6325 +
6326 +// support: jQuery <1.8
6327 +if ( !$.fn.addBack ) {
6328 + $.fn.addBack = function( selector ) {
6329 + return this.add( selector == null ?
6330 + this.prevObject : this.prevObject.filter( selector )
6331 + );
6332 + };
6333 +}
6334 +
6335 +$.effects.animateClass = function( value, duration, easing, callback ) {
6336 + var o = $.speed( duration, easing, callback );
6337 +
6338 + return this.queue( function() {
6339 + var animated = $( this ),
6340 + baseClass = animated.attr( "class" ) || "",
6341 + applyClassChange,
6342 + allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
6343 +
6344 + // map the animated objects to store the original styles.
6345 + allAnimations = allAnimations.map(function() {
6346 + var el = $( this );
6347 + return {
6348 + el: el,
6349 + start: getElementStyles( this )
6350 + };
6351 + });
6352 +
6353 + // apply class change
6354 + applyClassChange = function() {
6355 + $.each( classAnimationActions, function(i, action) {
6356 + if ( value[ action ] ) {
6357 + animated[ action + "Class" ]( value[ action ] );
6358 + }
6359 + });
6360 + };
6361 + applyClassChange();
6362 +
6363 + // map all animated objects again - calculate new styles and diff
6364 + allAnimations = allAnimations.map(function() {
6365 + this.end = getElementStyles( this.el[ 0 ] );
6366 + this.diff = styleDifference( this.start, this.end );
6367 + return this;
6368 + });
6369 +
6370 + // apply original class
6371 + animated.attr( "class", baseClass );
6372 +
6373 + // map all animated objects again - this time collecting a promise
6374 + allAnimations = allAnimations.map(function() {
6375 + var styleInfo = this,
6376 + dfd = $.Deferred(),
6377 + opts = $.extend({}, o, {
6378 + queue: false,
6379 + complete: function() {
6380 + dfd.resolve( styleInfo );
6381 + }
6382 + });
6383 +
6384 + this.el.animate( this.diff, opts );
6385 + return dfd.promise();
6386 + });
6387 +
6388 + // once all animations have completed:
6389 + $.when.apply( $, allAnimations.get() ).done(function() {
6390 +
6391 + // set the final class
6392 + applyClassChange();
6393 +
6394 + // for each animated element,
6395 + // clear all css properties that were animated
6396 + $.each( arguments, function() {
6397 + var el = this.el;
6398 + $.each( this.diff, function(key) {
6399 + el.css( key, "" );
6400 + });
6401 + });
6402 +
6403 + // this is guarnteed to be there if you use jQuery.speed()
6404 + // it also handles dequeuing the next anim...
6405 + o.complete.call( animated[ 0 ] );
6406 + });
6407 + });
6408 +};
6409 +
6410 +$.fn.extend({
6411 + addClass: (function( orig ) {
6412 + return function( classNames, speed, easing, callback ) {
6413 + return speed ?
6414 + $.effects.animateClass.call( this,
6415 + { add: classNames }, speed, easing, callback ) :
6416 + orig.apply( this, arguments );
6417 + };
6418 + })( $.fn.addClass ),
6419 +
6420 + removeClass: (function( orig ) {
6421 + return function( classNames, speed, easing, callback ) {
6422 + return arguments.length > 1 ?
6423 + $.effects.animateClass.call( this,
6424 + { remove: classNames }, speed, easing, callback ) :
6425 + orig.apply( this, arguments );
6426 + };
6427 + })( $.fn.removeClass ),
6428 +
6429 + toggleClass: (function( orig ) {
6430 + return function( classNames, force, speed, easing, callback ) {
6431 + if ( typeof force === "boolean" || force === undefined ) {
6432 + if ( !speed ) {
6433 + // without speed parameter
6434 + return orig.apply( this, arguments );
6435 + } else {
6436 + return $.effects.animateClass.call( this,
6437 + (force ? { add: classNames } : { remove: classNames }),
6438 + speed, easing, callback );
6439 + }
6440 + } else {
6441 + // without force parameter
6442 + return $.effects.animateClass.call( this,
6443 + { toggle: classNames }, force, speed, easing );
6444 + }
6445 + };
6446 + })( $.fn.toggleClass ),
6447 +
6448 + switchClass: function( remove, add, speed, easing, callback) {
6449 + return $.effects.animateClass.call( this, {
6450 + add: add,
6451 + remove: remove
6452 + }, speed, easing, callback );
6453 + }
6454 +});
6455 +
6456 +})();
6457 +
6458 +/******************************************************************************/
6459 +/*********************************** EFFECTS **********************************/
6460 +/******************************************************************************/
6461 +
6462 +(function() {
6463 +
6464 +$.extend( $.effects, {
6465 + version: "1.10.3",
6466 +
6467 + // Saves a set of properties in a data storage
6468 + save: function( element, set ) {
6469 + for( var i=0; i < set.length; i++ ) {
6470 + if ( set[ i ] !== null ) {
6471 + element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
6472 + }
6473 + }
6474 + },
6475 +
6476 + // Restores a set of previously saved properties from a data storage
6477 + restore: function( element, set ) {
6478 + var val, i;
6479 + for( i=0; i < set.length; i++ ) {
6480 + if ( set[ i ] !== null ) {
6481 + val = element.data( dataSpace + set[ i ] );
6482 + // support: jQuery 1.6.2
6483 + // http://bugs.jquery.com/ticket/9917
6484 + // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
6485 + // We can't differentiate between "" and 0 here, so we just assume
6486 + // empty string since it's likely to be a more common value...
6487 + if ( val === undefined ) {
6488 + val = "";
6489 + }
6490 + element.css( set[ i ], val );
6491 + }
6492 + }
6493 + },
6494 +
6495 + setMode: function( el, mode ) {
6496 + if (mode === "toggle") {
6497 + mode = el.is( ":hidden" ) ? "show" : "hide";
6498 + }
6499 + return mode;
6500 + },
6501 +
6502 + // Translates a [top,left] array into a baseline value
6503 + // this should be a little more flexible in the future to handle a string & hash
6504 + getBaseline: function( origin, original ) {
6505 + var y, x;
6506 + switch ( origin[ 0 ] ) {
6507 + case "top": y = 0; break;
6508 + case "middle": y = 0.5; break;
6509 + case "bottom": y = 1; break;
6510 + default: y = origin[ 0 ] / original.height;
6511 + }
6512 + switch ( origin[ 1 ] ) {
6513 + case "left": x = 0; break;
6514 + case "center": x = 0.5; break;
6515 + case "right": x = 1; break;
6516 + default: x = origin[ 1 ] / original.width;
6517 + }
6518 + return {
6519 + x: x,
6520 + y: y
6521 + };
6522 + },
6523 +
6524 + // Wraps the element around a wrapper that copies position properties
6525 + createWrapper: function( element ) {
6526 +
6527 + // if the element is already wrapped, return it
6528 + if ( element.parent().is( ".ui-effects-wrapper" )) {
6529 + return element.parent();
6530 + }
6531 +
6532 + // wrap the element
6533 + var props = {
6534 + width: element.outerWidth(true),
6535 + height: element.outerHeight(true),
6536 + "float": element.css( "float" )
6537 + },
6538 + wrapper = $( "<div></div>" )
6539 + .addClass( "ui-effects-wrapper" )
6540 + .css({
6541 + fontSize: "100%",
6542 + background: "transparent",
6543 + border: "none",
6544 + margin: 0,
6545 + padding: 0
6546 + }),
6547 + // Store the size in case width/height are defined in % - Fixes #5245
6548 + size = {
6549 + width: element.width(),
6550 + height: element.height()
6551 + },
6552 + active = document.activeElement;
6553 +
6554 + // support: Firefox
6555 + // Firefox incorrectly exposes anonymous content
6556 + // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
6557 + try {
6558 + active.id;
6559 + } catch( e ) {
6560 + active = document.body;
6561 + }
6562 +
6563 + element.wrap( wrapper );
6564 +
6565 + // Fixes #7595 - Elements lose focus when wrapped.
6566 + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
6567 + $( active ).focus();
6568 + }
6569 +
6570 + wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
6571 +
6572 + // transfer positioning properties to the wrapper
6573 + if ( element.css( "position" ) === "static" ) {
6574 + wrapper.css({ position: "relative" });
6575 + element.css({ position: "relative" });
6576 + } else {
6577 + $.extend( props, {
6578 + position: element.css( "position" ),
6579 + zIndex: element.css( "z-index" )
6580 + });
6581 + $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
6582 + props[ pos ] = element.css( pos );
6583 + if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
6584 + props[ pos ] = "auto";
6585 + }
6586 + });
6587 + element.css({
6588 + position: "relative",
6589 + top: 0,
6590 + left: 0,
6591 + right: "auto",
6592 + bottom: "auto"
6593 + });
6594 + }
6595 + element.css(size);
6596 +
6597 + return wrapper.css( props ).show();
6598 + },
6599 +
6600 + removeWrapper: function( element ) {
6601 + var active = document.activeElement;
6602 +
6603 + if ( element.parent().is( ".ui-effects-wrapper" ) ) {
6604 + element.parent().replaceWith( element );
6605 +
6606 + // Fixes #7595 - Elements lose focus when wrapped.
6607 + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
6608 + $( active ).focus();
6609 + }
6610 + }
6611 +
6612 +
6613 + return element;
6614 + },
6615 +
6616 + setTransition: function( element, list, factor, value ) {
6617 + value = value || {};
6618 + $.each( list, function( i, x ) {
6619 + var unit = element.cssUnit( x );
6620 + if ( unit[ 0 ] > 0 ) {
6621 + value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
6622 + }
6623 + });
6624 + return value;
6625 + }
6626 +});
6627 +
6628 +// return an effect options object for the given parameters:
6629 +function _normalizeArguments( effect, options, speed, callback ) {
6630 +
6631 + // allow passing all options as the first parameter
6632 + if ( $.isPlainObject( effect ) ) {
6633 + options = effect;
6634 + effect = effect.effect;
6635 + }
6636 +
6637 + // convert to an object
6638 + effect = { effect: effect };
6639 +
6640 + // catch (effect, null, ...)
6641 + if ( options == null ) {
6642 + options = {};
6643 + }
6644 +
6645 + // catch (effect, callback)
6646 + if ( $.isFunction( options ) ) {
6647 + callback = options;
6648 + speed = null;
6649 + options = {};
6650 + }
6651 +
6652 + // catch (effect, speed, ?)
6653 + if ( typeof options === "number" || $.fx.speeds[ options ] ) {
6654 + callback = speed;
6655 + speed = options;
6656 + options = {};
6657 + }
6658 +
6659 + // catch (effect, options, callback)
6660 + if ( $.isFunction( speed ) ) {
6661 + callback = speed;
6662 + speed = null;
6663 + }
6664 +
6665 + // add options to effect
6666 + if ( options ) {
6667 + $.extend( effect, options );
6668 + }
6669 +
6670 + speed = speed || options.duration;
6671 + effect.duration = $.fx.off ? 0 :
6672 + typeof speed === "number" ? speed :
6673 + speed in $.fx.speeds ? $.fx.speeds[ speed ] :
6674 + $.fx.speeds._default;
6675 +
6676 + effect.complete = callback || options.complete;
6677 +
6678 + return effect;
6679 +}
6680 +
6681 +function standardAnimationOption( option ) {
6682 + // Valid standard speeds (nothing, number, named speed)
6683 + if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
6684 + return true;
6685 + }
6686 +
6687 + // Invalid strings - treat as "normal" speed
6688 + if ( typeof option === "string" && !$.effects.effect[ option ] ) {
6689 + return true;
6690 + }
6691 +
6692 + // Complete callback
6693 + if ( $.isFunction( option ) ) {
6694 + return true;
6695 + }
6696 +
6697 + // Options hash (but not naming an effect)
6698 + if ( typeof option === "object" && !option.effect ) {
6699 + return true;
6700 + }
6701 +
6702 + // Didn't match any standard API
6703 + return false;
6704 +}
6705 +
6706 +$.fn.extend({
6707 + effect: function( /* effect, options, speed, callback */ ) {
6708 + var args = _normalizeArguments.apply( this, arguments ),
6709 + mode = args.mode,
6710 + queue = args.queue,
6711 + effectMethod = $.effects.effect[ args.effect ];
6712 +
6713 + if ( $.fx.off || !effectMethod ) {
6714 + // delegate to the original method (e.g., .show()) if possible
6715 + if ( mode ) {
6716 + return this[ mode ]( args.duration, args.complete );
6717 + } else {
6718 + return this.each( function() {
6719 + if ( args.complete ) {
6720 + args.complete.call( this );
6721 + }
6722 + });
6723 + }
6724 + }
6725 +
6726 + function run( next ) {
6727 + var elem = $( this ),
6728 + complete = args.complete,
6729 + mode = args.mode;
6730 +
6731 + function done() {
6732 + if ( $.isFunction( complete ) ) {
6733 + complete.call( elem[0] );
6734 + }
6735 + if ( $.isFunction( next ) ) {
6736 + next();
6737 + }
6738 + }
6739 +
6740 + // If the element already has the correct final state, delegate to
6741 + // the core methods so the internal tracking of "olddisplay" works.
6742 + if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
6743 + elem[ mode ]();
6744 + done();
6745 + } else {
6746 + effectMethod.call( elem[0], args, done );
6747 + }
6748 + }
6749 +
6750 + return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
6751 + },
6752 +
6753 + show: (function( orig ) {
6754 + return function( option ) {
6755 + if ( standardAnimationOption( option ) ) {
6756 + return orig.apply( this, arguments );
6757 + } else {
6758 + var args = _normalizeArguments.apply( this, arguments );
6759 + args.mode = "show";
6760 + return this.effect.call( this, args );
6761 + }
6762 + };
6763 + })( $.fn.show ),
6764 +
6765 + hide: (function( orig ) {
6766 + return function( option ) {
6767 + if ( standardAnimationOption( option ) ) {
6768 + return orig.apply( this, arguments );
6769 + } else {
6770 + var args = _normalizeArguments.apply( this, arguments );
6771 + args.mode = "hide";
6772 + return this.effect.call( this, args );
6773 + }
6774 + };
6775 + })( $.fn.hide ),
6776 +
6777 + toggle: (function( orig ) {
6778 + return function( option ) {
6779 + if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
6780 + return orig.apply( this, arguments );
6781 + } else {
6782 + var args = _normalizeArguments.apply( this, arguments );
6783 + args.mode = "toggle";
6784 + return this.effect.call( this, args );
6785 + }
6786 + };
6787 + })( $.fn.toggle ),
6788 +
6789 + // helper functions
6790 + cssUnit: function(key) {
6791 + var style = this.css( key ),
6792 + val = [];
6793 +
6794 + $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
6795 + if ( style.indexOf( unit ) > 0 ) {
6796 + val = [ parseFloat( style ), unit ];
6797 + }
6798 + });
6799 + return val;
6800 + }
6801 +});
6802 +
6803 +})();
6804 +
6805 +/******************************************************************************/
6806 +/*********************************** EASING ***********************************/
6807 +/******************************************************************************/
6808 +
6809 +(function() {
6810 +
6811 +// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
6812 +
6813 +var baseEasings = {};
6814 +
6815 +$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
6816 + baseEasings[ name ] = function( p ) {
6817 + return Math.pow( p, i + 2 );
6818 + };
6819 +});
6820 +
6821 +$.extend( baseEasings, {
6822 + Sine: function ( p ) {
6823 + return 1 - Math.cos( p * Math.PI / 2 );
6824 + },
6825 + Circ: function ( p ) {
6826 + return 1 - Math.sqrt( 1 - p * p );
6827 + },
6828 + Elastic: function( p ) {
6829 + return p === 0 || p === 1 ? p :
6830 + -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
6831 + },
6832 + Back: function( p ) {
6833 + return p * p * ( 3 * p - 2 );
6834 + },
6835 + Bounce: function ( p ) {
6836 + var pow2,
6837 + bounce = 4;
6838 +
6839 + while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
6840 + return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
6841 + }
6842 +});
6843 +
6844 +$.each( baseEasings, function( name, easeIn ) {
6845 + $.easing[ "easeIn" + name ] = easeIn;
6846 + $.easing[ "easeOut" + name ] = function( p ) {
6847 + return 1 - easeIn( 1 - p );
6848 + };
6849 + $.easing[ "easeInOut" + name ] = function( p ) {
6850 + return p < 0.5 ?
6851 + easeIn( p * 2 ) / 2 :
6852 + 1 - easeIn( p * -2 + 2 ) / 2;
6853 + };
6854 +});
6855 +
6856 +})();
6857 +
6858 +})(jQuery);
6859 +
6860 +(function( $, undefined ) {
6861 +
6862 +var uid = 0,
6863 + hideProps = {},
6864 + showProps = {};
6865 +
6866 +hideProps.height = hideProps.paddingTop = hideProps.paddingBottom =
6867 + hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide";
6868 +showProps.height = showProps.paddingTop = showProps.paddingBottom =
6869 + showProps.borderTopWidth = showProps.borderBottomWidth = "show";
6870 +
6871 +$.widget( "ui.accordion", {
6872 + version: "1.10.3",
6873 + options: {
6874 + active: 0,
6875 + animate: {},
6876 + collapsible: false,
6877 + event: "click",
6878 + header: "> li > :first-child,> :not(li):even",
6879 + heightStyle: "auto",
6880 + icons: {
6881 + activeHeader: "ui-icon-triangle-1-s",
6882 + header: "ui-icon-triangle-1-e"
6883 + },
6884 +
6885 + // callbacks
6886 + activate: null,
6887 + beforeActivate: null
6888 + },
6889 +
6890 + _create: function() {
6891 + var options = this.options;
6892 + this.prevShow = this.prevHide = $();
6893 + this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
6894 + // ARIA
6895 + .attr( "role", "tablist" );
6896 +
6897 + // don't allow collapsible: false and active: false / null
6898 + if ( !options.collapsible && (options.active === false || options.active == null) ) {
6899 + options.active = 0;
6900 + }
6901 +
6902 + this._processPanels();
6903 + // handle negative values
6904 + if ( options.active < 0 ) {
6905 + options.active += this.headers.length;
6906 + }
6907 + this._refresh();
6908 + },
6909 +
6910 + _getCreateEventData: function() {
6911 + return {
6912 + header: this.active,
6913 + panel: !this.active.length ? $() : this.active.next(),
6914 + content: !this.active.length ? $() : this.active.next()
6915 + };
6916 + },
6917 +
6918 + _createIcons: function() {
6919 + var icons = this.options.icons;
6920 + if ( icons ) {
6921 + $( "<span>" )
6922 + .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
6923 + .prependTo( this.headers );
6924 + this.active.children( ".ui-accordion-header-icon" )
6925 + .removeClass( icons.header )
6926 + .addClass( icons.activeHeader );
6927 + this.headers.addClass( "ui-accordion-icons" );
6928 + }
6929 + },
6930 +
6931 + _destroyIcons: function() {
6932 + this.headers
6933 + .removeClass( "ui-accordion-icons" )
6934 + .children( ".ui-accordion-header-icon" )
6935 + .remove();
6936 + },
6937 +
6938 + _destroy: function() {
6939 + var contents;
6940 +
6941 + // clean up main element
6942 + this.element
6943 + .removeClass( "ui-accordion ui-widget ui-helper-reset" )
6944 + .removeAttr( "role" );
6945 +
6946 + // clean up headers
6947 + this.headers
6948 + .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
6949 + .removeAttr( "role" )
6950 + .removeAttr( "aria-selected" )
6951 + .removeAttr( "aria-controls" )
6952 + .removeAttr( "tabIndex" )
6953 + .each(function() {
6954 + if ( /^ui-accordion/.test( this.id ) ) {
6955 + this.removeAttribute( "id" );
6956 + }
6957 + });
6958 + this._destroyIcons();
6959 +
6960 + // clean up content panels
6961 + contents = this.headers.next()
6962 + .css( "display", "" )
6963 + .removeAttr( "role" )
6964 + .removeAttr( "aria-expanded" )
6965 + .removeAttr( "aria-hidden" )
6966 + .removeAttr( "aria-labelledby" )
6967 + .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
6968 + .each(function() {
6969 + if ( /^ui-accordion/.test( this.id ) ) {
6970 + this.removeAttribute( "id" );
6971 + }
6972 + });
6973 + if ( this.options.heightStyle !== "content" ) {
6974 + contents.css( "height", "" );
6975 + }
6976 + },
6977 +
6978 + _setOption: function( key, value ) {
6979 + if ( key === "active" ) {
6980 + // _activate() will handle invalid values and update this.options
6981 + this._activate( value );
6982 + return;
6983 + }
6984 +
6985 + if ( key === "event" ) {
6986 + if ( this.options.event ) {
6987 + this._off( this.headers, this.options.event );
6988 + }
6989 + this._setupEvents( value );
6990 + }
6991 +
6992 + this._super( key, value );
6993 +
6994 + // setting collapsible: false while collapsed; open first panel
6995 + if ( key === "collapsible" && !value && this.options.active === false ) {
6996 + this._activate( 0 );
6997 + }
6998 +
6999 + if ( key === "icons" ) {
7000 + this._destroyIcons();
7001 + if ( value ) {
7002 + this._createIcons();
7003 + }
7004 + }
7005 +
7006 + // #5332 - opacity doesn't cascade to positioned elements in IE
7007 + // so we need to add the disabled class to the headers and panels
7008 + if ( key === "disabled" ) {
7009 + this.headers.add( this.headers.next() )
7010 + .toggleClass( "ui-state-disabled", !!value );
7011 + }
7012 + },
7013 +
7014 + _keydown: function( event ) {
7015 + /*jshint maxcomplexity:15*/
7016 + if ( event.altKey || event.ctrlKey ) {
7017 + return;
7018 + }
7019 +
7020 + var keyCode = $.ui.keyCode,
7021 + length = this.headers.length,
7022 + currentIndex = this.headers.index( event.target ),
7023 + toFocus = false;
7024 +
7025 + switch ( event.keyCode ) {
7026 + case keyCode.RIGHT:
7027 + case keyCode.DOWN:
7028 + toFocus = this.headers[ ( currentIndex + 1 ) % length ];
7029 + break;
7030 + case keyCode.LEFT:
7031 + case keyCode.UP:
7032 + toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
7033 + break;
7034 + case keyCode.SPACE:
7035 + case keyCode.ENTER:
7036 + this._eventHandler( event );
7037 + break;
7038 + case keyCode.HOME:
7039 + toFocus = this.headers[ 0 ];
7040 + break;
7041 + case keyCode.END:
7042 + toFocus = this.headers[ length - 1 ];
7043 + break;
7044 + }
7045 +
7046 + if ( toFocus ) {
7047 + $( event.target ).attr( "tabIndex", -1 );
7048 + $( toFocus ).attr( "tabIndex", 0 );
7049 + toFocus.focus();
7050 + event.preventDefault();
7051 + }
7052 + },
7053 +
7054 + _panelKeyDown : function( event ) {
7055 + if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
7056 + $( event.currentTarget ).prev().focus();
7057 + }
7058 + },
7059 +
7060 + refresh: function() {
7061 + var options = this.options;
7062 + this._processPanels();
7063 +
7064 + // was collapsed or no panel
7065 + if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
7066 + options.active = false;
7067 + this.active = $();
7068 + // active false only when collapsible is true
7069 + } else if ( options.active === false ) {
7070 + this._activate( 0 );
7071 + // was active, but active panel is gone
7072 + } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
7073 + // all remaining panel are disabled
7074 + if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
7075 + options.active = false;
7076 + this.active = $();
7077 + // activate previous panel
7078 + } else {
7079 + this._activate( Math.max( 0, options.active - 1 ) );
7080 + }
7081 + // was active, active panel still exists
7082 + } else {
7083 + // make sure active index is correct
7084 + options.active = this.headers.index( this.active );
7085 + }
7086 +
7087 + this._destroyIcons();
7088 +
7089 + this._refresh();
7090 + },
7091 +
7092 + _processPanels: function() {
7093 + this.headers = this.element.find( this.options.header )
7094 + .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
7095 +
7096 + this.headers.next()
7097 + .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
7098 + .filter(":not(.ui-accordion-content-active)")
7099 + .hide();
7100 + },
7101 +
7102 + _refresh: function() {
7103 + var maxHeight,
7104 + options = this.options,
7105 + heightStyle = options.heightStyle,
7106 + parent = this.element.parent(),
7107 + accordionId = this.accordionId = "ui-accordion-" +
7108 + (this.element.attr( "id" ) || ++uid);
7109 +
7110 + this.active = this._findActive( options.active )
7111 + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
7112 + .removeClass( "ui-corner-all" );
7113 + this.active.next()
7114 + .addClass( "ui-accordion-content-active" )
7115 + .show();
7116 +
7117 + this.headers
7118 + .attr( "role", "tab" )
7119 + .each(function( i ) {
7120 + var header = $( this ),
7121 + headerId = header.attr( "id" ),
7122 + panel = header.next(),
7123 + panelId = panel.attr( "id" );
7124 + if ( !headerId ) {
7125 + headerId = accordionId + "-header-" + i;
7126 + header.attr( "id", headerId );
7127 + }
7128 + if ( !panelId ) {
7129 + panelId = accordionId + "-panel-" + i;
7130 + panel.attr( "id", panelId );
7131 + }
7132 + header.attr( "aria-controls", panelId );
7133 + panel.attr( "aria-labelledby", headerId );
7134 + })
7135 + .next()
7136 + .attr( "role", "tabpanel" );
7137 +
7138 + this.headers
7139 + .not( this.active )
7140 + .attr({
7141 + "aria-selected": "false",
7142 + tabIndex: -1
7143 + })
7144 + .next()
7145 + .attr({
7146 + "aria-expanded": "false",
7147 + "aria-hidden": "true"
7148 + })
7149 + .hide();
7150 +
7151 + // make sure at least one header is in the tab order
7152 + if ( !this.active.length ) {
7153 + this.headers.eq( 0 ).attr( "tabIndex", 0 );
7154 + } else {
7155 + this.active.attr({
7156 + "aria-selected": "true",
7157 + tabIndex: 0
7158 + })
7159 + .next()
7160 + .attr({
7161 + "aria-expanded": "true",
7162 + "aria-hidden": "false"
7163 + });
7164 + }
7165 +
7166 + this._createIcons();
7167 +
7168 + this._setupEvents( options.event );
7169 +
7170 + if ( heightStyle === "fill" ) {
7171 + maxHeight = parent.height();
7172 + this.element.siblings( ":visible" ).each(function() {
7173 + var elem = $( this ),
7174 + position = elem.css( "position" );
7175 +
7176 + if ( position === "absolute" || position === "fixed" ) {
7177 + return;
7178 + }
7179 + maxHeight -= elem.outerHeight( true );
7180 + });
7181 +
7182 + this.headers.each(function() {
7183 + maxHeight -= $( this ).outerHeight( true );
7184 + });
7185 +
7186 + this.headers.next()
7187 + .each(function() {
7188 + $( this ).height( Math.max( 0, maxHeight -
7189 + $( this ).innerHeight() + $( this ).height() ) );
7190 + })
7191 + .css( "overflow", "auto" );
7192 + } else if ( heightStyle === "auto" ) {
7193 + maxHeight = 0;
7194 + this.headers.next()
7195 + .each(function() {
7196 + maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
7197 + })
7198 + .height( maxHeight );
7199 + }
7200 + },
7201 +
7202 + _activate: function( index ) {
7203 + var active = this._findActive( index )[ 0 ];
7204 +
7205 + // trying to activate the already active panel
7206 + if ( active === this.active[ 0 ] ) {
7207 + return;
7208 + }
7209 +
7210 + // trying to collapse, simulate a click on the currently active header
7211 + active = active || this.active[ 0 ];
7212 +
7213 + this._eventHandler({
7214 + target: active,
7215 + currentTarget: active,
7216 + preventDefault: $.noop
7217 + });
7218 + },
7219 +
7220 + _findActive: function( selector ) {
7221 + return typeof selector === "number" ? this.headers.eq( selector ) : $();
7222 + },
7223 +
7224 + _setupEvents: function( event ) {
7225 + var events = {
7226 + keydown: "_keydown"
7227 + };
7228 + if ( event ) {
7229 + $.each( event.split(" "), function( index, eventName ) {
7230 + events[ eventName ] = "_eventHandler";
7231 + });
7232 + }
7233 +
7234 + this._off( this.headers.add( this.headers.next() ) );
7235 + this._on( this.headers, events );
7236 + this._on( this.headers.next(), { keydown: "_panelKeyDown" });
7237 + this._hoverable( this.headers );
7238 + this._focusable( this.headers );
7239 + },
7240 +
7241 + _eventHandler: function( event ) {
7242 + var options = this.options,
7243 + active = this.active,
7244 + clicked = $( event.currentTarget ),
7245 + clickedIsActive = clicked[ 0 ] === active[ 0 ],
7246 + collapsing = clickedIsActive && options.collapsible,
7247 + toShow = collapsing ? $() : clicked.next(),
7248 + toHide = active.next(),
7249 + eventData = {
7250 + oldHeader: active,
7251 + oldPanel: toHide,
7252 + newHeader: collapsing ? $() : clicked,
7253 + newPanel: toShow
7254 + };
7255 +
7256 + event.preventDefault();
7257 +
7258 + if (
7259 + // click on active header, but not collapsible
7260 + ( clickedIsActive && !options.collapsible ) ||
7261 + // allow canceling activation
7262 + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
7263 + return;
7264 + }
7265 +
7266 + options.active = collapsing ? false : this.headers.index( clicked );
7267 +
7268 + // when the call to ._toggle() comes after the class changes
7269 + // it causes a very odd bug in IE 8 (see #6720)
7270 + this.active = clickedIsActive ? $() : clicked;
7271 + this._toggle( eventData );
7272 +
7273 + // switch classes
7274 + // corner classes on the previously active header stay after the animation
7275 + active.removeClass( "ui-accordion-header-active ui-state-active" );
7276 + if ( options.icons ) {
7277 + active.children( ".ui-accordion-header-icon" )
7278 + .removeClass( options.icons.activeHeader )
7279 + .addClass( options.icons.header );
7280 + }
7281 +
7282 + if ( !clickedIsActive ) {
7283 + clicked
7284 + .removeClass( "ui-corner-all" )
7285 + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
7286 + if ( options.icons ) {
7287 + clicked.children( ".ui-accordion-header-icon" )
7288 + .removeClass( options.icons.header )
7289 + .addClass( options.icons.activeHeader );
7290 + }
7291 +
7292 + clicked
7293 + .next()
7294 + .addClass( "ui-accordion-content-active" );
7295 + }
7296 + },
7297 +
7298 + _toggle: function( data ) {
7299 + var toShow = data.newPanel,
7300 + toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
7301 +
7302 + // handle activating a panel during the animation for another activation
7303 + this.prevShow.add( this.prevHide ).stop( true, true );
7304 + this.prevShow = toShow;
7305 + this.prevHide = toHide;
7306 +
7307 + if ( this.options.animate ) {
7308 + this._animate( toShow, toHide, data );
7309 + } else {
7310 + toHide.hide();
7311 + toShow.show();
7312 + this._toggleComplete( data );
7313 + }
7314 +
7315 + toHide.attr({
7316 + "aria-expanded": "false",
7317 + "aria-hidden": "true"
7318 + });
7319 + toHide.prev().attr( "aria-selected", "false" );
7320 + // if we're switching panels, remove the old header from the tab order
7321 + // if we're opening from collapsed state, remove the previous header from the tab order
7322 + // if we're collapsing, then keep the collapsing header in the tab order
7323 + if ( toShow.length && toHide.length ) {
7324 + toHide.prev().attr( "tabIndex", -1 );
7325 + } else if ( toShow.length ) {
7326 + this.headers.filter(function() {
7327 + return $( this ).attr( "tabIndex" ) === 0;
7328 + })
7329 + .attr( "tabIndex", -1 );
7330 + }
7331 +
7332 + toShow
7333 + .attr({
7334 + "aria-expanded": "true",
7335 + "aria-hidden": "false"
7336 + })
7337 + .prev()
7338 + .attr({
7339 + "aria-selected": "true",
7340 + tabIndex: 0
7341 + });
7342 + },
7343 +
7344 + _animate: function( toShow, toHide, data ) {
7345 + var total, easing, duration,
7346 + that = this,
7347 + adjust = 0,
7348 + down = toShow.length &&
7349 + ( !toHide.length || ( toShow.index() < toHide.index() ) ),
7350 + animate = this.options.animate || {},
7351 + options = down && animate.down || animate,
7352 + complete = function() {
7353 + that._toggleComplete( data );
7354 + };
7355 +
7356 + if ( typeof options === "number" ) {
7357 + duration = options;
7358 + }
7359 + if ( typeof options === "string" ) {
7360 + easing = options;
7361 + }
7362 + // fall back from options to animation in case of partial down settings
7363 + easing = easing || options.easing || animate.easing;
7364 + duration = duration || options.duration || animate.duration;
7365 +
7366 + if ( !toHide.length ) {
7367 + return toShow.animate( showProps, duration, easing, complete );
7368 + }
7369 + if ( !toShow.length ) {
7370 + return toHide.animate( hideProps, duration, easing, complete );
7371 + }
7372 +
7373 + total = toShow.show().outerHeight();
7374 + toHide.animate( hideProps, {
7375 + duration: duration,
7376 + easing: easing,
7377 + step: function( now, fx ) {
7378 + fx.now = Math.round( now );
7379 + }
7380 + });
7381 + toShow
7382 + .hide()
7383 + .animate( showProps, {
7384 + duration: duration,
7385 + easing: easing,
7386 + complete: complete,
7387 + step: function( now, fx ) {
7388 + fx.now = Math.round( now );
7389 + if ( fx.prop !== "height" ) {
7390 + adjust += fx.now;
7391 + } else if ( that.options.heightStyle !== "content" ) {
7392 + fx.now = Math.round( total - toHide.outerHeight() - adjust );
7393 + adjust = 0;
7394 + }
7395 + }
7396 + });
7397 + },
7398 +
7399 + _toggleComplete: function( data ) {
7400 + var toHide = data.oldPanel;
7401 +
7402 + toHide
7403 + .removeClass( "ui-accordion-content-active" )
7404 + .prev()
7405 + .removeClass( "ui-corner-top" )
7406 + .addClass( "ui-corner-all" );
7407 +
7408 + // Work around for rendering bug in IE (#5421)
7409 + if ( toHide.length ) {
7410 + toHide.parent()[0].className = toHide.parent()[0].className;
7411 + }
7412 +
7413 + this._trigger( "activate", null, data );
7414 + }
7415 +});
7416 +
7417 +})( jQuery );
7418 +
7419 +(function( $, undefined ) {
7420 +
7421 +// used to prevent race conditions with remote data sources
7422 +var requestIndex = 0;
7423 +
7424 +$.widget( "ui.autocomplete", {
7425 + version: "1.10.3",
7426 + defaultElement: "<input>",
7427 + options: {
7428 + appendTo: null,
7429 + autoFocus: false,
7430 + delay: 300,
7431 + minLength: 1,
7432 + position: {
7433 + my: "left top",
7434 + at: "left bottom",
7435 + collision: "none"
7436 + },
7437 + source: null,
7438 +
7439 + // callbacks
7440 + change: null,
7441 + close: null,
7442 + focus: null,
7443 + open: null,
7444 + response: null,
7445 + search: null,
7446 + select: null
7447 + },
7448 +
7449 + pending: 0,
7450 +
7451 + _create: function() {
7452 + // Some browsers only repeat keydown events, not keypress events,
7453 + // so we use the suppressKeyPress flag to determine if we've already
7454 + // handled the keydown event. #7269
7455 + // Unfortunately the code for & in keypress is the same as the up arrow,
7456 + // so we use the suppressKeyPressRepeat flag to avoid handling keypress
7457 + // events when we know the keydown event was used to modify the
7458 + // search term. #7799
7459 + var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
7460 + nodeName = this.element[0].nodeName.toLowerCase(),
7461 + isTextarea = nodeName === "textarea",
7462 + isInput = nodeName === "input";
7463 +
7464 + this.isMultiLine =
7465 + // Textareas are always multi-line
7466 + isTextarea ? true :
7467 + // Inputs are always single-line, even if inside a contentEditable element
7468 + // IE also treats inputs as contentEditable
7469 + isInput ? false :
7470 + // All other element types are determined by whether or not they're contentEditable
7471 + this.element.prop( "isContentEditable" );
7472 +
7473 + this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
7474 + this.isNewMenu = true;
7475 +
7476 + this.element
7477 + .addClass( "ui-autocomplete-input" )
7478 + .attr( "autocomplete", "off" );
7479 +
7480 + this._on( this.element, {
7481 + keydown: function( event ) {
7482 + /*jshint maxcomplexity:15*/
7483 + if ( this.element.prop( "readOnly" ) ) {
7484 + suppressKeyPress = true;
7485 + suppressInput = true;
7486 + suppressKeyPressRepeat = true;
7487 + return;
7488 + }
7489 +
7490 + suppressKeyPress = false;
7491 + suppressInput = false;
7492 + suppressKeyPressRepeat = false;
7493 + var keyCode = $.ui.keyCode;
7494 + switch( event.keyCode ) {
7495 + case keyCode.PAGE_UP:
7496 + suppressKeyPress = true;
7497 + this._move( "previousPage", event );
7498 + break;
7499 + case keyCode.PAGE_DOWN:
7500 + suppressKeyPress = true;
7501 + this._move( "nextPage", event );
7502 + break;
7503 + case keyCode.UP:
7504 + suppressKeyPress = true;
7505 + this._keyEvent( "previous", event );
7506 + break;
7507 + case keyCode.DOWN:
7508 + suppressKeyPress = true;
7509 + this._keyEvent( "next", event );
7510 + break;
7511 + case keyCode.ENTER:
7512 + case keyCode.NUMPAD_ENTER:
7513 + // when menu is open and has focus
7514 + if ( this.menu.active ) {
7515 + // #6055 - Opera still allows the keypress to occur
7516 + // which causes forms to submit
7517 + suppressKeyPress = true;
7518 + event.preventDefault();
7519 + this.menu.select( event );
7520 + }
7521 + break;
7522 + case keyCode.TAB:
7523 + if ( this.menu.active ) {
7524 + this.menu.select( event );
7525 + }
7526 + break;
7527 + case keyCode.ESCAPE:
7528 + if ( this.menu.element.is( ":visible" ) ) {
7529 + this._value( this.term );
7530 + this.close( event );
7531 + // Different browsers have different default behavior for escape
7532 + // Single press can mean undo or clear
7533 + // Double press in IE means clear the whole form
7534 + event.preventDefault();
7535 + }
7536 + break;
7537 + default:
7538 + suppressKeyPressRepeat = true;
7539 + // search timeout should be triggered before the input value is changed
7540 + this._searchTimeout( event );
7541 + break;
7542 + }
7543 + },
7544 + keypress: function( event ) {
7545 + if ( suppressKeyPress ) {
7546 + suppressKeyPress = false;
7547 + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
7548 + event.preventDefault();
7549 + }
7550 + return;
7551 + }
7552 + if ( suppressKeyPressRepeat ) {
7553 + return;
7554 + }
7555 +
7556 + // replicate some key handlers to allow them to repeat in Firefox and Opera
7557 + var keyCode = $.ui.keyCode;
7558 + switch( event.keyCode ) {
7559 + case keyCode.PAGE_UP:
7560 + this._move( "previousPage", event );
7561 + break;
7562 + case keyCode.PAGE_DOWN:
7563 + this._move( "nextPage", event );
7564 + break;
7565 + case keyCode.UP:
7566 + this._keyEvent( "previous", event );
7567 + break;
7568 + case keyCode.DOWN:
7569 + this._keyEvent( "next", event );
7570 + break;
7571 + }
7572 + },
7573 + input: function( event ) {
7574 + if ( suppressInput ) {
7575 + suppressInput = false;
7576 + event.preventDefault();
7577 + return;
7578 + }
7579 + this._searchTimeout( event );
7580 + },
7581 + focus: function() {
7582 + this.selectedItem = null;
7583 + this.previous = this._value();
7584 + },
7585 + blur: function( event ) {
7586 + if ( this.cancelBlur ) {
7587 + delete this.cancelBlur;
7588 + return;
7589 + }
7590 +
7591 + clearTimeout( this.searching );
7592 + this.close( event );
7593 + this._change( event );
7594 + }
7595 + });
7596 +
7597 + this._initSource();
7598 + this.menu = $( "<ul>" )
7599 + .addClass( "ui-autocomplete ui-front" )
7600 + .appendTo( this._appendTo() )
7601 + .menu({
7602 + // disable ARIA support, the live region takes care of that
7603 + role: null
7604 + })
7605 + .hide()
7606 + .data( "ui-menu" );
7607 +
7608 + this._on( this.menu.element, {
7609 + mousedown: function( event ) {
7610 + // prevent moving focus out of the text field
7611 + event.preventDefault();
7612 +
7613 + // IE doesn't prevent moving focus even with event.preventDefault()
7614 + // so we set a flag to know when we should ignore the blur event
7615 + this.cancelBlur = true;
7616 + this._delay(function() {
7617 + delete this.cancelBlur;
7618 + });
7619 +
7620 + // clicking on the scrollbar causes focus to shift to the body
7621 + // but we can't detect a mouseup or a click immediately afterward
7622 + // so we have to track the next mousedown and close the menu if
7623 + // the user clicks somewhere outside of the autocomplete
7624 + var menuElement = this.menu.element[ 0 ];
7625 + if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
7626 + this._delay(function() {
7627 + var that = this;
7628 + this.document.one( "mousedown", function( event ) {
7629 + if ( event.target !== that.element[ 0 ] &&
7630 + event.target !== menuElement &&
7631 + !$.contains( menuElement, event.target ) ) {
7632 + that.close();
7633 + }
7634 + });
7635 + });
7636 + }
7637 + },
7638 + menufocus: function( event, ui ) {
7639 + // support: Firefox
7640 + // Prevent accidental activation of menu items in Firefox (#7024 #9118)
7641 + if ( this.isNewMenu ) {
7642 + this.isNewMenu = false;
7643 + if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
7644 + this.menu.blur();
7645 +
7646 + this.document.one( "mousemove", function() {
7647 + $( event.target ).trigger( event.originalEvent );
7648 + });
7649 +
7650 + return;
7651 + }
7652 + }
7653 +
7654 + var item = ui.item.data( "ui-autocomplete-item" );
7655 + if ( false !== this._trigger( "focus", event, { item: item } ) ) {
7656 + // use value to match what will end up in the input, if it was a key event
7657 + if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
7658 + this._value( item.value );
7659 + }
7660 + } else {
7661 + // Normally the input is populated with the item's value as the
7662 + // menu is navigated, causing screen readers to notice a change and
7663 + // announce the item. Since the focus event was canceled, this doesn't
7664 + // happen, so we update the live region so that screen readers can
7665 + // still notice the change and announce it.
7666 + this.liveRegion.text( item.value );
7667 + }
7668 + },
7669 + menuselect: function( event, ui ) {
7670 + var item = ui.item.data( "ui-autocomplete-item" ),
7671 + previous = this.previous;
7672 +
7673 + // only trigger when focus was lost (click on menu)
7674 + if ( this.element[0] !== this.document[0].activeElement ) {
7675 + this.element.focus();
7676 + this.previous = previous;
7677 + // #6109 - IE triggers two focus events and the second
7678 + // is asynchronous, so we need to reset the previous
7679 + // term synchronously and asynchronously :-(
7680 + this._delay(function() {
7681 + this.previous = previous;
7682 + this.selectedItem = item;
7683 + });
7684 + }
7685 +
7686 + if ( false !== this._trigger( "select", event, { item: item } ) ) {
7687 + this._value( item.value );
7688 + }
7689 + // reset the term after the select event
7690 + // this allows custom select handling to work properly
7691 + this.term = this._value();
7692 +
7693 + this.close( event );
7694 + this.selectedItem = item;
7695 + }
7696 + });
7697 +
7698 + this.liveRegion = $( "<span>", {
7699 + role: "status",
7700 + "aria-live": "polite"
7701 + })
7702 + .addClass( "ui-helper-hidden-accessible" )
7703 + .insertBefore( this.element );
7704 +
7705 + // turning off autocomplete prevents the browser from remembering the
7706 + // value when navigating through history, so we re-enable autocomplete
7707 + // if the page is unloaded before the widget is destroyed. #7790
7708 + this._on( this.window, {
7709 + beforeunload: function() {
7710 + this.element.removeAttr( "autocomplete" );
7711 + }
7712 + });
7713 + },
7714 +
7715 + _destroy: function() {
7716 + clearTimeout( this.searching );
7717 + this.element
7718 + .removeClass( "ui-autocomplete-input" )
7719 + .removeAttr( "autocomplete" );
7720 + this.menu.element.remove();
7721 + this.liveRegion.remove();
7722 + },
7723 +
7724 + _setOption: function( key, value ) {
7725 + this._super( key, value );
7726 + if ( key === "source" ) {
7727 + this._initSource();
7728 + }
7729 + if ( key === "appendTo" ) {
7730 + this.menu.element.appendTo( this._appendTo() );
7731 + }
7732 + if ( key === "disabled" && value && this.xhr ) {
7733 + this.xhr.abort();
7734 + }
7735 + },
7736 +
7737 + _appendTo: function() {
7738 + var element = this.options.appendTo;
7739 +
7740 + if ( element ) {
7741 + element = element.jquery || element.nodeType ?
7742 + $( element ) :
7743 + this.document.find( element ).eq( 0 );
7744 + }
7745 +
7746 + if ( !element ) {
7747 + element = this.element.closest( ".ui-front" );
7748 + }
7749 +
7750 + if ( !element.length ) {
7751 + element = this.document[0].body;
7752 + }
7753 +
7754 + return element;
7755 + },
7756 +
7757 + _initSource: function() {
7758 + var array, url,
7759 + that = this;
7760 + if ( $.isArray(this.options.source) ) {
7761 + array = this.options.source;
7762 + this.source = function( request, response ) {
7763 + response( $.ui.autocomplete.filter( array, request.term ) );
7764 + };
7765 + } else if ( typeof this.options.source === "string" ) {
7766 + url = this.options.source;
7767 + this.source = function( request, response ) {
7768 + if ( that.xhr ) {
7769 + that.xhr.abort();
7770 + }
7771 + that.xhr = $.ajax({
7772 + url: url,
7773 + data: request,
7774 + dataType: "json",
7775 + success: function( data ) {
7776 + response( data );
7777 + },
7778 + error: function() {
7779 + response( [] );
7780 + }
7781 + });
7782 + };
7783 + } else {
7784 + this.source = this.options.source;
7785 + }
7786 + },
7787 +
7788 + _searchTimeout: function( event ) {
7789 + clearTimeout( this.searching );
7790 + this.searching = this._delay(function() {
7791 + // only search if the value has changed
7792 + if ( this.term !== this._value() ) {
7793 + this.selectedItem = null;
7794 + this.search( null, event );
7795 + }
7796 + }, this.options.delay );
7797 + },
7798 +
7799 + search: function( value, event ) {
7800 + value = value != null ? value : this._value();
7801 +
7802 + // always save the actual value, not the one passed as an argument
7803 + this.term = this._value();
7804 +
7805 + if ( value.length < this.options.minLength ) {
7806 + return this.close( event );
7807 + }
7808 +
7809 + if ( this._trigger( "search", event ) === false ) {
7810 + return;
7811 + }
7812 +
7813 + return this._search( value );
7814 + },
7815 +
7816 + _search: function( value ) {
7817 + this.pending++;
7818 + this.element.addClass( "ui-autocomplete-loading" );
7819 + this.cancelSearch = false;
7820 +
7821 + this.source( { term: value }, this._response() );
7822 + },
7823 +
7824 + _response: function() {
7825 + var that = this,
7826 + index = ++requestIndex;
7827 +
7828 + return function( content ) {
7829 + if ( index === requestIndex ) {
7830 + that.__response( content );
7831 + }
7832 +
7833 + that.pending--;
7834 + if ( !that.pending ) {
7835 + that.element.removeClass( "ui-autocomplete-loading" );
7836 + }
7837 + };
7838 + },
7839 +
7840 + __response: function( content ) {
7841 + if ( content ) {
7842 + content = this._normalize( content );
7843 + }
7844 + this._trigger( "response", null, { content: content } );
7845 + if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
7846 + this._suggest( content );
7847 + this._trigger( "open" );
7848 + } else {
7849 + // use ._close() instead of .close() so we don't cancel future searches
7850 + this._close();
7851 + }
7852 + },
7853 +
7854 + close: function( event ) {
7855 + this.cancelSearch = true;
7856 + this._close( event );
7857 + },
7858 +
7859 + _close: function( event ) {
7860 + if ( this.menu.element.is( ":visible" ) ) {
7861 + this.menu.element.hide();
7862 + this.menu.blur();
7863 + this.isNewMenu = true;
7864 + this._trigger( "close", event );
7865 + }
7866 + },
7867 +
7868 + _change: function( event ) {
7869 + if ( this.previous !== this._value() ) {
7870 + this._trigger( "change", event, { item: this.selectedItem } );
7871 + }
7872 + },
7873 +
7874 + _normalize: function( items ) {
7875 + // assume all items have the right format when the first item is complete
7876 + if ( items.length && items[0].label && items[0].value ) {
7877 + return items;
7878 + }
7879 + return $.map( items, function( item ) {
7880 + if ( typeof item === "string" ) {
7881 + return {
7882 + label: item,
7883 + value: item
7884 + };
7885 + }
7886 + return $.extend({
7887 + label: item.label || item.value,
7888 + value: item.value || item.label
7889 + }, item );
7890 + });
7891 + },
7892 +
7893 + _suggest: function( items ) {
7894 + var ul = this.menu.element.empty();
7895 + this._renderMenu( ul, items );
7896 + this.isNewMenu = true;
7897 + this.menu.refresh();
7898 +
7899 + // size and position menu
7900 + ul.show();
7901 + this._resizeMenu();
7902 + ul.position( $.extend({
7903 + of: this.element
7904 + }, this.options.position ));
7905 +
7906 + if ( this.options.autoFocus ) {
7907 + this.menu.next();
7908 + }
7909 + },
7910 +
7911 + _resizeMenu: function() {
7912 + var ul = this.menu.element;
7913 + ul.outerWidth( Math.max(
7914 + // Firefox wraps long text (possibly a rounding bug)
7915 + // so we add 1px to avoid the wrapping (#7513)
7916 + ul.width( "" ).outerWidth() + 1,
7917 + this.element.outerWidth()
7918 + ) );
7919 + },
7920 +
7921 + _renderMenu: function( ul, items ) {
7922 + var that = this;
7923 + $.each( items, function( index, item ) {
7924 + that._renderItemData( ul, item );
7925 + });
7926 + },
7927 +
7928 + _renderItemData: function( ul, item ) {
7929 + return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
7930 + },
7931 +
7932 + _renderItem: function( ul, item ) {
7933 + return $( "<li>" )
7934 + .append( $( "<a>" ).text( item.label ) )
7935 + .appendTo( ul );
7936 + },
7937 +
7938 + _move: function( direction, event ) {
7939 + if ( !this.menu.element.is( ":visible" ) ) {
7940 + this.search( null, event );
7941 + return;
7942 + }
7943 + if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
7944 + this.menu.isLastItem() && /^next/.test( direction ) ) {
7945 + this._value( this.term );
7946 + this.menu.blur();
7947 + return;
7948 + }
7949 + this.menu[ direction ]( event );
7950 + },
7951 +
7952 + widget: function() {
7953 + return this.menu.element;
7954 + },
7955 +
7956 + _value: function() {
7957 + return this.valueMethod.apply( this.element, arguments );
7958 + },
7959 +
7960 + _keyEvent: function( keyEvent, event ) {
7961 + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
7962 + this._move( keyEvent, event );
7963 +
7964 + // prevents moving cursor to beginning/end of the text field in some browsers
7965 + event.preventDefault();
7966 + }
7967 + }
7968 +});
7969 +
7970 +$.extend( $.ui.autocomplete, {
7971 + escapeRegex: function( value ) {
7972 + return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
7973 + },
7974 + filter: function(array, term) {
7975 + var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
7976 + return $.grep( array, function(value) {
7977 + return matcher.test( value.label || value.value || value );
7978 + });
7979 + }
7980 +});
7981 +
7982 +
7983 +// live region extension, adding a `messages` option
7984 +// NOTE: This is an experimental API. We are still investigating
7985 +// a full solution for string manipulation and internationalization.
7986 +$.widget( "ui.autocomplete", $.ui.autocomplete, {
7987 + options: {
7988 + messages: {
7989 + noResults: "No search results.",
7990 + results: function( amount ) {
7991 + return amount + ( amount > 1 ? " results are" : " result is" ) +
7992 + " available, use up and down arrow keys to navigate.";
7993 + }
7994 + }
7995 + },
7996 +
7997 + __response: function( content ) {
7998 + var message;
7999 + this._superApply( arguments );
8000 + if ( this.options.disabled || this.cancelSearch ) {
8001 + return;
8002 + }
8003 + if ( content && content.length ) {
8004 + message = this.options.messages.results( content.length );
8005 + } else {
8006 + message = this.options.messages.noResults;
8007 + }
8008 + this.liveRegion.text( message );
8009 + }
8010 +});
8011 +
8012 +}( jQuery ));
8013 +
8014 +(function( $, undefined ) {
8015 +
8016 +var lastActive, startXPos, startYPos, clickDragged,
8017 + baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
8018 + stateClasses = "ui-state-hover ui-state-active ",
8019 + typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
8020 + formResetHandler = function() {
8021 + var form = $( this );
8022 + setTimeout(function() {
8023 + form.find( ":ui-button" ).button( "refresh" );
8024 + }, 1 );
8025 + },
8026 + radioGroup = function( radio ) {
8027 + var name = radio.name,
8028 + form = radio.form,
8029 + radios = $( [] );
8030 + if ( name ) {
8031 + name = name.replace( /'/g, "\\'" );
8032 + if ( form ) {
8033 + radios = $( form ).find( "[name='" + name + "']" );
8034 + } else {
8035 + radios = $( "[name='" + name + "']", radio.ownerDocument )
8036 + .filter(function() {
8037 + return !this.form;
8038 + });
8039 + }
8040 + }
8041 + return radios;
8042 + };
8043 +
8044 +$.widget( "ui.button", {
8045 + version: "1.10.3",
8046 + defaultElement: "<button>",
8047 + options: {
8048 + disabled: null,
8049 + text: true,
8050 + label: null,
8051 + icons: {
8052 + primary: null,
8053 + secondary: null
8054 + }
8055 + },
8056 + _create: function() {
8057 + this.element.closest( "form" )
8058 + .unbind( "reset" + this.eventNamespace )
8059 + .bind( "reset" + this.eventNamespace, formResetHandler );
8060 +
8061 + if ( typeof this.options.disabled !== "boolean" ) {
8062 + this.options.disabled = !!this.element.prop( "disabled" );
8063 + } else {
8064 + this.element.prop( "disabled", this.options.disabled );
8065 + }
8066 +
8067 + this._determineButtonType();
8068 + this.hasTitle = !!this.buttonElement.attr( "title" );
8069 +
8070 + var that = this,
8071 + options = this.options,
8072 + toggleButton = this.type === "checkbox" || this.type === "radio",
8073 + activeClass = !toggleButton ? "ui-state-active" : "",
8074 + focusClass = "ui-state-focus";
8075 +
8076 + if ( options.label === null ) {
8077 + options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
8078 + }
8079 +
8080 + this._hoverable( this.buttonElement );
8081 +
8082 + this.buttonElement
8083 + .addClass( baseClasses )
8084 + .attr( "role", "button" )
8085 + .bind( "mouseenter" + this.eventNamespace, function() {
8086 + if ( options.disabled ) {
8087 + return;
8088 + }
8089 + if ( this === lastActive ) {
8090 + $( this ).addClass( "ui-state-active" );
8091 + }
8092 + })
8093 + .bind( "mouseleave" + this.eventNamespace, function() {
8094 + if ( options.disabled ) {
8095 + return;
8096 + }
8097 + $( this ).removeClass( activeClass );
8098 + })
8099 + .bind( "click" + this.eventNamespace, function( event ) {
8100 + if ( options.disabled ) {
8101 + event.preventDefault();
8102 + event.stopImmediatePropagation();
8103 + }
8104 + });
8105 +
8106 + this.element
8107 + .bind( "focus" + this.eventNamespace, function() {
8108 + // no need to check disabled, focus won't be triggered anyway
8109 + that.buttonElement.addClass( focusClass );
8110 + })
8111 + .bind( "blur" + this.eventNamespace, function() {
8112 + that.buttonElement.removeClass( focusClass );
8113 + });
8114 +
8115 + if ( toggleButton ) {
8116 + this.element.bind( "change" + this.eventNamespace, function() {
8117 + if ( clickDragged ) {
8118 + return;
8119 + }
8120 + that.refresh();
8121 + });
8122 + // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
8123 + // prevents issue where button state changes but checkbox/radio checked state
8124 + // does not in Firefox (see ticket #6970)
8125 + this.buttonElement
8126 + .bind( "mousedown" + this.eventNamespace, function( event ) {
8127 + if ( options.disabled ) {
8128 + return;
8129 + }
8130 + clickDragged = false;
8131 + startXPos = event.pageX;
8132 + startYPos = event.pageY;
8133 + })
8134 + .bind( "mouseup" + this.eventNamespace, function( event ) {
8135 + if ( options.disabled ) {
8136 + return;
8137 + }
8138 + if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
8139 + clickDragged = true;
8140 + }
8141 + });
8142 + }
8143 +
8144 + if ( this.type === "checkbox" ) {
8145 + this.buttonElement.bind( "click" + this.eventNamespace, function() {
8146 + if ( options.disabled || clickDragged ) {
8147 + return false;
8148 + }
8149 + });
8150 + } else if ( this.type === "radio" ) {
8151 + this.buttonElement.bind( "click" + this.eventNamespace, function() {
8152 + if ( options.disabled || clickDragged ) {
8153 + return false;
8154 + }
8155 + $( this ).addClass( "ui-state-active" );
8156 + that.buttonElement.attr( "aria-pressed", "true" );
8157 +
8158 + var radio = that.element[ 0 ];
8159 + radioGroup( radio )
8160 + .not( radio )
8161 + .map(function() {
8162 + return $( this ).button( "widget" )[ 0 ];
8163 + })
8164 + .removeClass( "ui-state-active" )
8165 + .attr( "aria-pressed", "false" );
8166 + });
8167 + } else {
8168 + this.buttonElement
8169 + .bind( "mousedown" + this.eventNamespace, function() {
8170 + if ( options.disabled ) {
8171 + return false;
8172 + }
8173 + $( this ).addClass( "ui-state-active" );
8174 + lastActive = this;
8175 + that.document.one( "mouseup", function() {
8176 + lastActive = null;
8177 + });
8178 + })
8179 + .bind( "mouseup" + this.eventNamespace, function() {
8180 + if ( options.disabled ) {
8181 + return false;
8182 + }
8183 + $( this ).removeClass( "ui-state-active" );
8184 + })
8185 + .bind( "keydown" + this.eventNamespace, function(event) {
8186 + if ( options.disabled ) {
8187 + return false;
8188 + }
8189 + if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
8190 + $( this ).addClass( "ui-state-active" );
8191 + }
8192 + })
8193 + // see #8559, we bind to blur here in case the button element loses
8194 + // focus between keydown and keyup, it would be left in an "active" state
8195 + .bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
8196 + $( this ).removeClass( "ui-state-active" );
8197 + });
8198 +
8199 + if ( this.buttonElement.is("a") ) {
8200 + this.buttonElement.keyup(function(event) {
8201 + if ( event.keyCode === $.ui.keyCode.SPACE ) {
8202 + // TODO pass through original event correctly (just as 2nd argument doesn't work)
8203 + $( this ).click();
8204 + }
8205 + });
8206 + }
8207 + }
8208 +
8209 + // TODO: pull out $.Widget's handling for the disabled option into
8210 + // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
8211 + // be overridden by individual plugins
8212 + this._setOption( "disabled", options.disabled );
8213 + this._resetButton();
8214 + },
8215 +
8216 + _determineButtonType: function() {
8217 + var ancestor, labelSelector, checked;
8218 +
8219 + if ( this.element.is("[type=checkbox]") ) {
8220 + this.type = "checkbox";
8221 + } else if ( this.element.is("[type=radio]") ) {
8222 + this.type = "radio";
8223 + } else if ( this.element.is("input") ) {
8224 + this.type = "input";
8225 + } else {
8226 + this.type = "button";
8227 + }
8228 +
8229 + if ( this.type === "checkbox" || this.type === "radio" ) {
8230 + // we don't search against the document in case the element
8231 + // is disconnected from the DOM
8232 + ancestor = this.element.parents().last();
8233 + labelSelector = "label[for='" + this.element.attr("id") + "']";
8234 + this.buttonElement = ancestor.find( labelSelector );
8235 + if ( !this.buttonElement.length ) {
8236 + ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
8237 + this.buttonElement = ancestor.filter( labelSelector );
8238 + if ( !this.buttonElement.length ) {
8239 + this.buttonElement = ancestor.find( labelSelector );
8240 + }
8241 + }
8242 + this.element.addClass( "ui-helper-hidden-accessible" );
8243 +
8244 + checked = this.element.is( ":checked" );
8245 + if ( checked ) {
8246 + this.buttonElement.addClass( "ui-state-active" );
8247 + }
8248 + this.buttonElement.prop( "aria-pressed", checked );
8249 + } else {
8250 + this.buttonElement = this.element;
8251 + }
8252 + },
8253 +
8254 + widget: function() {
8255 + return this.buttonElement;
8256 + },
8257 +
8258 + _destroy: function() {
8259 + this.element
8260 + .removeClass( "ui-helper-hidden-accessible" );
8261 + this.buttonElement
8262 + .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
8263 + .removeAttr( "role" )
8264 + .removeAttr( "aria-pressed" )
8265 + .html( this.buttonElement.find(".ui-button-text").html() );
8266 +
8267 + if ( !this.hasTitle ) {
8268 + this.buttonElement.removeAttr( "title" );
8269 + }
8270 + },
8271 +
8272 + _setOption: function( key, value ) {
8273 + this._super( key, value );
8274 + if ( key === "disabled" ) {
8275 + if ( value ) {
8276 + this.element.prop( "disabled", true );
8277 + } else {
8278 + this.element.prop( "disabled", false );
8279 + }
8280 + return;
8281 + }
8282 + this._resetButton();
8283 + },
8284 +
8285 + refresh: function() {
8286 + //See #8237 & #8828
8287 + var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
8288 +
8289 + if ( isDisabled !== this.options.disabled ) {
8290 + this._setOption( "disabled", isDisabled );
8291 + }
8292 + if ( this.type === "radio" ) {
8293 + radioGroup( this.element[0] ).each(function() {
8294 + if ( $( this ).is( ":checked" ) ) {
8295 + $( this ).button( "widget" )
8296 + .addClass( "ui-state-active" )
8297 + .attr( "aria-pressed", "true" );
8298 + } else {
8299 + $( this ).button( "widget" )
8300 + .removeClass( "ui-state-active" )
8301 + .attr( "aria-pressed", "false" );
8302 + }
8303 + });
8304 + } else if ( this.type === "checkbox" ) {
8305 + if ( this.element.is( ":checked" ) ) {
8306 + this.buttonElement
8307 + .addClass( "ui-state-active" )
8308 + .attr( "aria-pressed", "true" );
8309 + } else {
8310 + this.buttonElement
8311 + .removeClass( "ui-state-active" )
8312 + .attr( "aria-pressed", "false" );
8313 + }
8314 + }
8315 + },
8316 +
8317 + _resetButton: function() {
8318 + if ( this.type === "input" ) {
8319 + if ( this.options.label ) {
8320 + this.element.val( this.options.label );
8321 + }
8322 + return;
8323 + }
8324 + var buttonElement = this.buttonElement.removeClass( typeClasses ),
8325 + buttonText = $( "<span></span>", this.document[0] )
8326 + .addClass( "ui-button-text" )
8327 + .html( this.options.label )
8328 + .appendTo( buttonElement.empty() )
8329 + .text(),
8330 + icons = this.options.icons,
8331 + multipleIcons = icons.primary && icons.secondary,
8332 + buttonClasses = [];
8333 +
8334 + if ( icons.primary || icons.secondary ) {
8335 + if ( this.options.text ) {
8336 + buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
8337 + }
8338 +
8339 + if ( icons.primary ) {
8340 + buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
8341 + }
8342 +
8343 + if ( icons.secondary ) {
8344 + buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
8345 + }
8346 +
8347 + if ( !this.options.text ) {
8348 + buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
8349 +
8350 + if ( !this.hasTitle ) {
8351 + buttonElement.attr( "title", $.trim( buttonText ) );
8352 + }
8353 + }
8354 + } else {
8355 + buttonClasses.push( "ui-button-text-only" );
8356 + }
8357 + buttonElement.addClass( buttonClasses.join( " " ) );
8358 + }
8359 +});
8360 +
8361 +$.widget( "ui.buttonset", {
8362 + version: "1.10.3",
8363 + options: {
8364 + items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
8365 + },
8366 +
8367 + _create: function() {
8368 + this.element.addClass( "ui-buttonset" );
8369 + },
8370 +
8371 + _init: function() {
8372 + this.refresh();
8373 + },
8374 +
8375 + _setOption: function( key, value ) {
8376 + if ( key === "disabled" ) {
8377 + this.buttons.button( "option", key, value );
8378 + }
8379 +
8380 + this._super( key, value );
8381 + },
8382 +
8383 + refresh: function() {
8384 + var rtl = this.element.css( "direction" ) === "rtl";
8385 +
8386 + this.buttons = this.element.find( this.options.items )
8387 + .filter( ":ui-button" )
8388 + .button( "refresh" )
8389 + .end()
8390 + .not( ":ui-button" )
8391 + .button()
8392 + .end()
8393 + .map(function() {
8394 + return $( this ).button( "widget" )[ 0 ];
8395 + })
8396 + .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
8397 + .filter( ":first" )
8398 + .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
8399 + .end()
8400 + .filter( ":last" )
8401 + .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
8402 + .end()
8403 + .end();
8404 + },
8405 +
8406 + _destroy: function() {
8407 + this.element.removeClass( "ui-buttonset" );
8408 + this.buttons
8409 + .map(function() {
8410 + return $( this ).button( "widget" )[ 0 ];
8411 + })
8412 + .removeClass( "ui-corner-left ui-corner-right" )
8413 + .end()
8414 + .button( "destroy" );
8415 + }
8416 +});
8417 +
8418 +}( jQuery ) );
8419 +
8420 +(function( $, undefined ) {
8421 +
8422 +$.extend($.ui, { datepicker: { version: "1.10.3" } });
8423 +
8424 +var PROP_NAME = "datepicker",
8425 + instActive;
8426 +
8427 +/* Date picker manager.
8428 + Use the singleton instance of this class, $.datepicker, to interact with the date picker.
8429 + Settings for (groups of) date pickers are maintained in an instance object,
8430 + allowing multiple different settings on the same page. */
8431 +
8432 +function Datepicker() {
8433 + this._curInst = null; // The current instance in use
8434 + this._keyEvent = false; // If the last event was a key event
8435 + this._disabledInputs = []; // List of date picker inputs that have been disabled
8436 + this._datepickerShowing = false; // True if the popup picker is showing , false if not
8437 + this._inDialog = false; // True if showing within a "dialog", false if not
8438 + this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
8439 + this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
8440 + this._appendClass = "ui-datepicker-append"; // The name of the append marker class
8441 + this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
8442 + this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
8443 + this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
8444 + this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
8445 + this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
8446 + this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
8447 + this.regional = []; // Available regional settings, indexed by language code
8448 + this.regional[""] = { // Default regional settings
8449 + closeText: "Done", // Display text for close link
8450 + prevText: "Prev", // Display text for previous month link
8451 + nextText: "Next", // Display text for next month link
8452 + currentText: "Today", // Display text for current month link
8453 + monthNames: ["January","February","March","April","May","June",
8454 + "July","August","September","October","November","December"], // Names of months for drop-down and formatting
8455 + monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting
8456 + dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting
8457 + dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting
8458 + dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday
8459 + weekHeader: "Wk", // Column header for week of the year
8460 + dateFormat: "mm/dd/yy", // See format options on parseDate
8461 + firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
8462 + isRTL: false, // True if right-to-left language, false if left-to-right
8463 + showMonthAfterYear: false, // True if the year select precedes month, false for month then year
8464 + yearSuffix: "" // Additional text to append to the year in the month headers
8465 + };
8466 + this._defaults = { // Global defaults for all the date picker instances
8467 + showOn: "focus", // "focus" for popup on focus,
8468 + // "button" for trigger button, or "both" for either
8469 + showAnim: "fadeIn", // Name of jQuery animation for popup
8470 + showOptions: {}, // Options for enhanced animations
8471 + defaultDate: null, // Used when field is blank: actual date,
8472 + // +/-number for offset from today, null for today
8473 + appendText: "", // Display text following the input box, e.g. showing the format
8474 + buttonText: "...", // Text for trigger button
8475 + buttonImage: "", // URL for trigger button image
8476 + buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
8477 + hideIfNoPrevNext: false, // True to hide next/previous month links
8478 + // if not applicable, false to just disable them
8479 + navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
8480 + gotoCurrent: false, // True if today link goes back to current selection instead
8481 + changeMonth: false, // True if month can be selected directly, false if only prev/next
8482 + changeYear: false, // True if year can be selected directly, false if only prev/next
8483 + yearRange: "c-10:c+10", // Range of years to display in drop-down,
8484 + // either relative to today's year (-nn:+nn), relative to currently displayed year
8485 + // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
8486 + showOtherMonths: false, // True to show dates in other months, false to leave blank
8487 + selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
8488 + showWeek: false, // True to show week of the year, false to not show it
8489 + calculateWeek: this.iso8601Week, // How to calculate the week of the year,
8490 + // takes a Date and returns the number of the week for it
8491 + shortYearCutoff: "+10", // Short year values < this are in the current century,
8492 + // > this are in the previous century,
8493 + // string value starting with "+" for current year + value
8494 + minDate: null, // The earliest selectable date, or null for no limit
8495 + maxDate: null, // The latest selectable date, or null for no limit
8496 + duration: "fast", // Duration of display/closure
8497 + beforeShowDay: null, // Function that takes a date and returns an array with
8498 + // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
8499 + // [2] = cell title (optional), e.g. $.datepicker.noWeekends
8500 + beforeShow: null, // Function that takes an input field and
8501 + // returns a set of custom settings for the date picker
8502 + onSelect: null, // Define a callback function when a date is selected
8503 + onChangeMonthYear: null, // Define a callback function when the month or year is changed
8504 + onClose: null, // Define a callback function when the datepicker is closed
8505 + numberOfMonths: 1, // Number of months to show at a time
8506 + showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
8507 + stepMonths: 1, // Number of months to step back/forward
8508 + stepBigMonths: 12, // Number of months to step back/forward for the big links
8509 + altField: "", // Selector for an alternate field to store selected dates into
8510 + altFormat: "", // The date format to use for the alternate field
8511 + constrainInput: true, // The input is constrained by the current date format
8512 + showButtonPanel: false, // True to show button panel, false to not show it
8513 + autoSize: false, // True to size the input for the date format, false to leave as is
8514 + disabled: false // The initial disabled state
8515 + };
8516 + $.extend(this._defaults, this.regional[""]);
8517 + this.dpDiv = bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
8518 +}
8519 +
8520 +$.extend(Datepicker.prototype, {
8521 + /* Class name added to elements to indicate already configured with a date picker. */
8522 + markerClassName: "hasDatepicker",
8523 +
8524 + //Keep track of the maximum number of rows displayed (see #7043)
8525 + maxRows: 4,
8526 +
8527 + // TODO rename to "widget" when switching to widget factory
8528 + _widgetDatepicker: function() {
8529 + return this.dpDiv;
8530 + },
8531 +
8532 + /* Override the default settings for all instances of the date picker.
8533 + * @param settings object - the new settings to use as defaults (anonymous object)
8534 + * @return the manager object
8535 + */
8536 + setDefaults: function(settings) {
8537 + extendRemove(this._defaults, settings || {});
8538 + return this;
8539 + },
8540 +
8541 + /* Attach the date picker to a jQuery selection.
8542 + * @param target element - the target input field or division or span
8543 + * @param settings object - the new settings to use for this date picker instance (anonymous)
8544 + */
8545 + _attachDatepicker: function(target, settings) {
8546 + var nodeName, inline, inst;
8547 + nodeName = target.nodeName.toLowerCase();
8548 + inline = (nodeName === "div" || nodeName === "span");
8549 + if (!target.id) {
8550 + this.uuid += 1;
8551 + target.id = "dp" + this.uuid;
8552 + }
8553 + inst = this._newInst($(target), inline);
8554 + inst.settings = $.extend({}, settings || {});
8555 + if (nodeName === "input") {
8556 + this._connectDatepicker(target, inst);
8557 + } else if (inline) {
8558 + this._inlineDatepicker(target, inst);
8559 + }
8560 + },
8561 +
8562 + /* Create a new instance object. */
8563 + _newInst: function(target, inline) {
8564 + var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars
8565 + return {id: id, input: target, // associated target
8566 + selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
8567 + drawMonth: 0, drawYear: 0, // month being drawn
8568 + inline: inline, // is datepicker inline or not
8569 + dpDiv: (!inline ? this.dpDiv : // presentation div
8570 + bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
8571 + },
8572 +
8573 + /* Attach the date picker to an input field. */
8574 + _connectDatepicker: function(target, inst) {
8575 + var input = $(target);
8576 + inst.append = $([]);
8577 + inst.trigger = $([]);
8578 + if (input.hasClass(this.markerClassName)) {
8579 + return;
8580 + }
8581 + this._attachments(input, inst);
8582 + input.addClass(this.markerClassName).keydown(this._doKeyDown).
8583 + keypress(this._doKeyPress).keyup(this._doKeyUp);
8584 + this._autoSize(inst);
8585 + $.data(target, PROP_NAME, inst);
8586 + //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
8587 + if( inst.settings.disabled ) {
8588 + this._disableDatepicker( target );
8589 + }
8590 + },
8591 +
8592 + /* Make attachments based on settings. */
8593 + _attachments: function(input, inst) {
8594 + var showOn, buttonText, buttonImage,
8595 + appendText = this._get(inst, "appendText"),
8596 + isRTL = this._get(inst, "isRTL");
8597 +
8598 + if (inst.append) {
8599 + inst.append.remove();
8600 + }
8601 + if (appendText) {
8602 + inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>");
8603 + input[isRTL ? "before" : "after"](inst.append);
8604 + }
8605 +
8606 + input.unbind("focus", this._showDatepicker);
8607 +
8608 + if (inst.trigger) {
8609 + inst.trigger.remove();
8610 + }
8611 +
8612 + showOn = this._get(inst, "showOn");
8613 + if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field
8614 + input.focus(this._showDatepicker);
8615 + }
8616 + if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked
8617 + buttonText = this._get(inst, "buttonText");
8618 + buttonImage = this._get(inst, "buttonImage");
8619 + inst.trigger = $(this._get(inst, "buttonImageOnly") ?
8620 + $("<img/>").addClass(this._triggerClass).
8621 + attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
8622 + $("<button type='button'></button>").addClass(this._triggerClass).
8623 + html(!buttonImage ? buttonText : $("<img/>").attr(
8624 + { src:buttonImage, alt:buttonText, title:buttonText })));
8625 + input[isRTL ? "before" : "after"](inst.trigger);
8626 + inst.trigger.click(function() {
8627 + if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {
8628 + $.datepicker._hideDatepicker();
8629 + } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {
8630 + $.datepicker._hideDatepicker();
8631 + $.datepicker._showDatepicker(input[0]);
8632 + } else {
8633 + $.datepicker._showDatepicker(input[0]);
8634 + }
8635 + return false;
8636 + });
8637 + }
8638 + },
8639 +
8640 + /* Apply the maximum length for the date format. */
8641 + _autoSize: function(inst) {
8642 + if (this._get(inst, "autoSize") && !inst.inline) {
8643 + var findMax, max, maxI, i,
8644 + date = new Date(2009, 12 - 1, 20), // Ensure double digits
8645 + dateFormat = this._get(inst, "dateFormat");
8646 +
8647 + if (dateFormat.match(/[DM]/)) {
8648 + findMax = function(names) {
8649 + max = 0;
8650 + maxI = 0;
8651 + for (i = 0; i < names.length; i++) {
8652 + if (names[i].length > max) {
8653 + max = names[i].length;
8654 + maxI = i;
8655 + }
8656 + }
8657 + return maxI;
8658 + };
8659 + date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
8660 + "monthNames" : "monthNamesShort"))));
8661 + date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
8662 + "dayNames" : "dayNamesShort"))) + 20 - date.getDay());
8663 + }
8664 + inst.input.attr("size", this._formatDate(inst, date).length);
8665 + }
8666 + },
8667 +
8668 + /* Attach an inline date picker to a div. */
8669 + _inlineDatepicker: function(target, inst) {
8670 + var divSpan = $(target);
8671 + if (divSpan.hasClass(this.markerClassName)) {
8672 + return;
8673 + }
8674 + divSpan.addClass(this.markerClassName).append(inst.dpDiv);
8675 + $.data(target, PROP_NAME, inst);
8676 + this._setDate(inst, this._getDefaultDate(inst), true);
8677 + this._updateDatepicker(inst);
8678 + this._updateAlternate(inst);
8679 + //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
8680 + if( inst.settings.disabled ) {
8681 + this._disableDatepicker( target );
8682 + }
8683 + // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
8684 + // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
8685 + inst.dpDiv.css( "display", "block" );
8686 + },
8687 +
8688 + /* Pop-up the date picker in a "dialog" box.
8689 + * @param input element - ignored
8690 + * @param date string or Date - the initial date to display
8691 + * @param onSelect function - the function to call when a date is selected
8692 + * @param settings object - update the dialog date picker instance's settings (anonymous object)
8693 + * @param pos int[2] - coordinates for the dialog's position within the screen or
8694 + * event - with x/y coordinates or
8695 + * leave empty for default (screen centre)
8696 + * @return the manager object
8697 + */
8698 + _dialogDatepicker: function(input, date, onSelect, settings, pos) {
8699 + var id, browserWidth, browserHeight, scrollX, scrollY,
8700 + inst = this._dialogInst; // internal instance
8701 +
8702 + if (!inst) {
8703 + this.uuid += 1;
8704 + id = "dp" + this.uuid;
8705 + this._dialogInput = $("<input type='text' id='" + id +
8706 + "' style='position: absolute; top: -100px; width: 0px;'/>");
8707 + this._dialogInput.keydown(this._doKeyDown);
8708 + $("body").append(this._dialogInput);
8709 + inst = this._dialogInst = this._newInst(this._dialogInput, false);
8710 + inst.settings = {};
8711 + $.data(this._dialogInput[0], PROP_NAME, inst);
8712 + }
8713 + extendRemove(inst.settings, settings || {});
8714 + date = (date && date.constructor === Date ? this._formatDate(inst, date) : date);
8715 + this._dialogInput.val(date);
8716 +
8717 + this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
8718 + if (!this._pos) {
8719 + browserWidth = document.documentElement.clientWidth;
8720 + browserHeight = document.documentElement.clientHeight;
8721 + scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
8722 + scrollY = document.documentElement.scrollTop || document.body.scrollTop;
8723 + this._pos = // should use actual width/height below
8724 + [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
8725 + }
8726 +
8727 + // move input on screen for focus, but hidden behind dialog
8728 + this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px");
8729 + inst.settings.onSelect = onSelect;
8730 + this._inDialog = true;
8731 + this.dpDiv.addClass(this._dialogClass);
8732 + this._showDatepicker(this._dialogInput[0]);
8733 + if ($.blockUI) {
8734 + $.blockUI(this.dpDiv);
8735 + }
8736 + $.data(this._dialogInput[0], PROP_NAME, inst);
8737 + return this;
8738 + },
8739 +
8740 + /* Detach a datepicker from its control.
8741 + * @param target element - the target input field or division or span
8742 + */
8743 + _destroyDatepicker: function(target) {
8744 + var nodeName,
8745 + $target = $(target),
8746 + inst = $.data(target, PROP_NAME);
8747 +
8748 + if (!$target.hasClass(this.markerClassName)) {
8749 + return;
8750 + }
8751 +
8752 + nodeName = target.nodeName.toLowerCase();
8753 + $.removeData(target, PROP_NAME);
8754 + if (nodeName === "input") {
8755 + inst.append.remove();
8756 + inst.trigger.remove();
8757 + $target.removeClass(this.markerClassName).
8758 + unbind("focus", this._showDatepicker).
8759 + unbind("keydown", this._doKeyDown).
8760 + unbind("keypress", this._doKeyPress).
8761 + unbind("keyup", this._doKeyUp);
8762 + } else if (nodeName === "div" || nodeName === "span") {
8763 + $target.removeClass(this.markerClassName).empty();
8764 + }
8765 + },
8766 +
8767 + /* Enable the date picker to a jQuery selection.
8768 + * @param target element - the target input field or division or span
8769 + */
8770 + _enableDatepicker: function(target) {
8771 + var nodeName, inline,
8772 + $target = $(target),
8773 + inst = $.data(target, PROP_NAME);
8774 +
8775 + if (!$target.hasClass(this.markerClassName)) {
8776 + return;
8777 + }
8778 +
8779 + nodeName = target.nodeName.toLowerCase();
8780 + if (nodeName === "input") {
8781 + target.disabled = false;
8782 + inst.trigger.filter("button").
8783 + each(function() { this.disabled = false; }).end().
8784 + filter("img").css({opacity: "1.0", cursor: ""});
8785 + } else if (nodeName === "div" || nodeName === "span") {
8786 + inline = $target.children("." + this._inlineClass);
8787 + inline.children().removeClass("ui-state-disabled");
8788 + inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
8789 + prop("disabled", false);
8790 + }
8791 + this._disabledInputs = $.map(this._disabledInputs,
8792 + function(value) { return (value === target ? null : value); }); // delete entry
8793 + },
8794 +
8795 + /* Disable the date picker to a jQuery selection.
8796 + * @param target element - the target input field or division or span
8797 + */
8798 + _disableDatepicker: function(target) {
8799 + var nodeName, inline,
8800 + $target = $(target),
8801 + inst = $.data(target, PROP_NAME);
8802 +
8803 + if (!$target.hasClass(this.markerClassName)) {
8804 + return;
8805 + }
8806 +
8807 + nodeName = target.nodeName.toLowerCase();
8808 + if (nodeName === "input") {
8809 + target.disabled = true;
8810 + inst.trigger.filter("button").
8811 + each(function() { this.disabled = true; }).end().
8812 + filter("img").css({opacity: "0.5", cursor: "default"});
8813 + } else if (nodeName === "div" || nodeName === "span") {
8814 + inline = $target.children("." + this._inlineClass);
8815 + inline.children().addClass("ui-state-disabled");
8816 + inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
8817 + prop("disabled", true);
8818 + }
8819 + this._disabledInputs = $.map(this._disabledInputs,
8820 + function(value) { return (value === target ? null : value); }); // delete entry
8821 + this._disabledInputs[this._disabledInputs.length] = target;
8822 + },
8823 +
8824 + /* Is the first field in a jQuery collection disabled as a datepicker?
8825 + * @param target element - the target input field or division or span
8826 + * @return boolean - true if disabled, false if enabled
8827 + */
8828 + _isDisabledDatepicker: function(target) {
8829 + if (!target) {
8830 + return false;
8831 + }
8832 + for (var i = 0; i < this._disabledInputs.length; i++) {
8833 + if (this._disabledInputs[i] === target) {
8834 + return true;
8835 + }
8836 + }
8837 + return false;
8838 + },
8839 +
8840 + /* Retrieve the instance data for the target control.
8841 + * @param target element - the target input field or division or span
8842 + * @return object - the associated instance data
8843 + * @throws error if a jQuery problem getting data
8844 + */
8845 + _getInst: function(target) {
8846 + try {
8847 + return $.data(target, PROP_NAME);
8848 + }
8849 + catch (err) {
8850 + throw "Missing instance data for this datepicker";
8851 + }
8852 + },
8853 +
8854 + /* Update or retrieve the settings for a date picker attached to an input field or division.
8855 + * @param target element - the target input field or division or span
8856 + * @param name object - the new settings to update or
8857 + * string - the name of the setting to change or retrieve,
8858 + * when retrieving also "all" for all instance settings or
8859 + * "defaults" for all global defaults
8860 + * @param value any - the new value for the setting
8861 + * (omit if above is an object or to retrieve a value)
8862 + */
8863 + _optionDatepicker: function(target, name, value) {
8864 + var settings, date, minDate, maxDate,
8865 + inst = this._getInst(target);
8866 +
8867 + if (arguments.length === 2 && typeof name === "string") {
8868 + return (name === "defaults" ? $.extend({}, $.datepicker._defaults) :
8869 + (inst ? (name === "all" ? $.extend({}, inst.settings) :
8870 + this._get(inst, name)) : null));
8871 + }
8872 +
8873 + settings = name || {};
8874 + if (typeof name === "string") {
8875 + settings = {};
8876 + settings[name] = value;
8877 + }
8878 +
8879 + if (inst) {
8880 + if (this._curInst === inst) {
8881 + this._hideDatepicker();
8882 + }
8883 +
8884 + date = this._getDateDatepicker(target, true);
8885 + minDate = this._getMinMaxDate(inst, "min");
8886 + maxDate = this._getMinMaxDate(inst, "max");
8887 + extendRemove(inst.settings, settings);
8888 + // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
8889 + if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {
8890 + inst.settings.minDate = this._formatDate(inst, minDate);
8891 + }
8892 + if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {
8893 + inst.settings.maxDate = this._formatDate(inst, maxDate);
8894 + }
8895 + if ( "disabled" in settings ) {
8896 + if ( settings.disabled ) {
8897 + this._disableDatepicker(target);
8898 + } else {
8899 + this._enableDatepicker(target);
8900 + }
8901 + }
8902 + this._attachments($(target), inst);
8903 + this._autoSize(inst);
8904 + this._setDate(inst, date);
8905 + this._updateAlternate(inst);
8906 + this._updateDatepicker(inst);
8907 + }
8908 + },
8909 +
8910 + // change method deprecated
8911 + _changeDatepicker: function(target, name, value) {
8912 + this._optionDatepicker(target, name, value);
8913 + },
8914 +
8915 + /* Redraw the date picker attached to an input field or division.
8916 + * @param target element - the target input field or division or span
8917 + */
8918 + _refreshDatepicker: function(target) {
8919 + var inst = this._getInst(target);
8920 + if (inst) {
8921 + this._updateDatepicker(inst);
8922 + }
8923 + },
8924 +
8925 + /* Set the dates for a jQuery selection.
8926 + * @param target element - the target input field or division or span
8927 + * @param date Date - the new date
8928 + */
8929 + _setDateDatepicker: function(target, date) {
8930 + var inst = this._getInst(target);
8931 + if (inst) {
8932 + this._setDate(inst, date);
8933 + this._updateDatepicker(inst);
8934 + this._updateAlternate(inst);
8935 + }
8936 + },
8937 +
8938 + /* Get the date(s) for the first entry in a jQuery selection.
8939 + * @param target element - the target input field or division or span
8940 + * @param noDefault boolean - true if no default date is to be used
8941 + * @return Date - the current date
8942 + */
8943 + _getDateDatepicker: function(target, noDefault) {
8944 + var inst = this._getInst(target);
8945 + if (inst && !inst.inline) {
8946 + this._setDateFromField(inst, noDefault);
8947 + }
8948 + return (inst ? this._getDate(inst) : null);
8949 + },
8950 +
8951 + /* Handle keystrokes. */
8952 + _doKeyDown: function(event) {
8953 + var onSelect, dateStr, sel,
8954 + inst = $.datepicker._getInst(event.target),
8955 + handled = true,
8956 + isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
8957 +
8958 + inst._keyEvent = true;
8959 + if ($.datepicker._datepickerShowing) {
8960 + switch (event.keyCode) {
8961 + case 9: $.datepicker._hideDatepicker();
8962 + handled = false;
8963 + break; // hide on tab out
8964 + case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." +
8965 + $.datepicker._currentClass + ")", inst.dpDiv);
8966 + if (sel[0]) {
8967 + $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
8968 + }
8969 +
8970 + onSelect = $.datepicker._get(inst, "onSelect");
8971 + if (onSelect) {
8972 + dateStr = $.datepicker._formatDate(inst);
8973 +
8974 + // trigger custom callback
8975 + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
8976 + } else {
8977 + $.datepicker._hideDatepicker();
8978 + }
8979 +
8980 + return false; // don't submit the form
8981 + case 27: $.datepicker._hideDatepicker();
8982 + break; // hide on escape
8983 + case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
8984 + -$.datepicker._get(inst, "stepBigMonths") :
8985 + -$.datepicker._get(inst, "stepMonths")), "M");
8986 + break; // previous month/year on page up/+ ctrl
8987 + case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
8988 + +$.datepicker._get(inst, "stepBigMonths") :
8989 + +$.datepicker._get(inst, "stepMonths")), "M");
8990 + break; // next month/year on page down/+ ctrl
8991 + case 35: if (event.ctrlKey || event.metaKey) {
8992 + $.datepicker._clearDate(event.target);
8993 + }
8994 + handled = event.ctrlKey || event.metaKey;
8995 + break; // clear on ctrl or command +end
8996 + case 36: if (event.ctrlKey || event.metaKey) {
8997 + $.datepicker._gotoToday(event.target);
8998 + }
8999 + handled = event.ctrlKey || event.metaKey;
9000 + break; // current on ctrl or command +home
9001 + case 37: if (event.ctrlKey || event.metaKey) {
9002 + $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D");
9003 + }
9004 + handled = event.ctrlKey || event.metaKey;
9005 + // -1 day on ctrl or command +left
9006 + if (event.originalEvent.altKey) {
9007 + $.datepicker._adjustDate(event.target, (event.ctrlKey ?
9008 + -$.datepicker._get(inst, "stepBigMonths") :
9009 + -$.datepicker._get(inst, "stepMonths")), "M");
9010 + }
9011 + // next month/year on alt +left on Mac
9012 + break;
9013 + case 38: if (event.ctrlKey || event.metaKey) {
9014 + $.datepicker._adjustDate(event.target, -7, "D");
9015 + }
9016 + handled = event.ctrlKey || event.metaKey;
9017 + break; // -1 week on ctrl or command +up
9018 + case 39: if (event.ctrlKey || event.metaKey) {
9019 + $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D");
9020 + }
9021 + handled = event.ctrlKey || event.metaKey;
9022 + // +1 day on ctrl or command +right
9023 + if (event.originalEvent.altKey) {
9024 + $.datepicker._adjustDate(event.target, (event.ctrlKey ?
9025 + +$.datepicker._get(inst, "stepBigMonths") :
9026 + +$.datepicker._get(inst, "stepMonths")), "M");
9027 + }
9028 + // next month/year on alt +right
9029 + break;
9030 + case 40: if (event.ctrlKey || event.metaKey) {
9031 + $.datepicker._adjustDate(event.target, +7, "D");
9032 + }
9033 + handled = event.ctrlKey || event.metaKey;
9034 + break; // +1 week on ctrl or command +down
9035 + default: handled = false;
9036 + }
9037 + } else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home
9038 + $.datepicker._showDatepicker(this);
9039 + } else {
9040 + handled = false;
9041 + }
9042 +
9043 + if (handled) {
9044 + event.preventDefault();
9045 + event.stopPropagation();
9046 + }
9047 + },
9048 +
9049 + /* Filter entered characters - based on date format. */
9050 + _doKeyPress: function(event) {
9051 + var chars, chr,
9052 + inst = $.datepicker._getInst(event.target);
9053 +
9054 + if ($.datepicker._get(inst, "constrainInput")) {
9055 + chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat"));
9056 + chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);
9057 + return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1);
9058 + }
9059 + },
9060 +
9061 + /* Synchronise manual entry and field/alternate field. */
9062 + _doKeyUp: function(event) {
9063 + var date,
9064 + inst = $.datepicker._getInst(event.target);
9065 +
9066 + if (inst.input.val() !== inst.lastVal) {
9067 + try {
9068 + date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
9069 + (inst.input ? inst.input.val() : null),
9070 + $.datepicker._getFormatConfig(inst));
9071 +
9072 + if (date) { // only if valid
9073 + $.datepicker._setDateFromField(inst);
9074 + $.datepicker._updateAlternate(inst);
9075 + $.datepicker._updateDatepicker(inst);
9076 + }
9077 + }
9078 + catch (err) {
9079 + }
9080 + }
9081 + return true;
9082 + },
9083 +
9084 + /* Pop-up the date picker for a given input field.
9085 + * If false returned from beforeShow event handler do not show.
9086 + * @param input element - the input field attached to the date picker or
9087 + * event - if triggered by focus
9088 + */
9089 + _showDatepicker: function(input) {
9090 + input = input.target || input;
9091 + if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
9092 + input = $("input", input.parentNode)[0];
9093 + }
9094 +
9095 + if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here
9096 + return;
9097 + }
9098 +
9099 + var inst, beforeShow, beforeShowSettings, isFixed,
9100 + offset, showAnim, duration;
9101 +
9102 + inst = $.datepicker._getInst(input);
9103 + if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
9104 + $.datepicker._curInst.dpDiv.stop(true, true);
9105 + if ( inst && $.datepicker._datepickerShowing ) {
9106 + $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
9107 + }
9108 + }
9109 +
9110 + beforeShow = $.datepicker._get(inst, "beforeShow");
9111 + beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
9112 + if(beforeShowSettings === false){
9113 + return;
9114 + }
9115 + extendRemove(inst.settings, beforeShowSettings);
9116 +
9117 + inst.lastVal = null;
9118 + $.datepicker._lastInput = input;
9119 + $.datepicker._setDateFromField(inst);
9120 +
9121 + if ($.datepicker._inDialog) { // hide cursor
9122 + input.value = "";
9123 + }
9124 + if (!$.datepicker._pos) { // position below input
9125 + $.datepicker._pos = $.datepicker._findPos(input);
9126 + $.datepicker._pos[1] += input.offsetHeight; // add the height
9127 + }
9128 +
9129 + isFixed = false;
9130 + $(input).parents().each(function() {
9131 + isFixed |= $(this).css("position") === "fixed";
9132 + return !isFixed;
9133 + });
9134 +
9135 + offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
9136 + $.datepicker._pos = null;
9137 + //to avoid flashes on Firefox
9138 + inst.dpDiv.empty();
9139 + // determine sizing offscreen
9140 + inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"});
9141 + $.datepicker._updateDatepicker(inst);
9142 + // fix width for dynamic number of date pickers
9143 + // and adjust position before showing
9144 + offset = $.datepicker._checkOffset(inst, offset, isFixed);
9145 + inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
9146 + "static" : (isFixed ? "fixed" : "absolute")), display: "none",
9147 + left: offset.left + "px", top: offset.top + "px"});
9148 +
9149 + if (!inst.inline) {
9150 + showAnim = $.datepicker._get(inst, "showAnim");
9151 + duration = $.datepicker._get(inst, "duration");
9152 + inst.dpDiv.zIndex($(input).zIndex()+1);
9153 + $.datepicker._datepickerShowing = true;
9154 +
9155 + if ( $.effects && $.effects.effect[ showAnim ] ) {
9156 + inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration);
9157 + } else {
9158 + inst.dpDiv[showAnim || "show"](showAnim ? duration : null);
9159 + }
9160 +
9161 + if ( $.datepicker._shouldFocusInput( inst ) ) {
9162 + inst.input.focus();
9163 + }
9164 +
9165 + $.datepicker._curInst = inst;
9166 + }
9167 + },
9168 +
9169 + /* Generate the date picker content. */
9170 + _updateDatepicker: function(inst) {
9171 + this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
9172 + instActive = inst; // for delegate hover events
9173 + inst.dpDiv.empty().append(this._generateHTML(inst));
9174 + this._attachHandlers(inst);
9175 + inst.dpDiv.find("." + this._dayOverClass + " a").mouseover();
9176 +
9177 + var origyearshtml,
9178 + numMonths = this._getNumberOfMonths(inst),
9179 + cols = numMonths[1],
9180 + width = 17;
9181 +
9182 + inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
9183 + if (cols > 1) {
9184 + inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em");
9185 + }
9186 + inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") +
9187 + "Class"]("ui-datepicker-multi");
9188 + inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
9189 + "Class"]("ui-datepicker-rtl");
9190 +
9191 + if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
9192 + inst.input.focus();
9193 + }
9194 +
9195 + // deffered render of the years select (to avoid flashes on Firefox)
9196 + if( inst.yearshtml ){
9197 + origyearshtml = inst.yearshtml;
9198 + setTimeout(function(){
9199 + //assure that inst.yearshtml didn't change.
9200 + if( origyearshtml === inst.yearshtml && inst.yearshtml ){
9201 + inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);
9202 + }
9203 + origyearshtml = inst.yearshtml = null;
9204 + }, 0);
9205 + }
9206 + },
9207 +
9208 + // #6694 - don't focus the input if it's already focused
9209 + // this breaks the change event in IE
9210 + // Support: IE and jQuery <1.9
9211 + _shouldFocusInput: function( inst ) {
9212 + return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
9213 + },
9214 +
9215 + /* Check positioning to remain on screen. */
9216 + _checkOffset: function(inst, offset, isFixed) {
9217 + var dpWidth = inst.dpDiv.outerWidth(),
9218 + dpHeight = inst.dpDiv.outerHeight(),
9219 + inputWidth = inst.input ? inst.input.outerWidth() : 0,
9220 + inputHeight = inst.input ? inst.input.outerHeight() : 0,
9221 + viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),
9222 + viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
9223 +
9224 + offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0);
9225 + offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;
9226 + offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
9227 +
9228 + // now check if datepicker is showing outside window viewport - move to a better place if so.
9229 + offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
9230 + Math.abs(offset.left + dpWidth - viewWidth) : 0);
9231 + offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
9232 + Math.abs(dpHeight + inputHeight) : 0);
9233 +
9234 + return offset;
9235 + },
9236 +
9237 + /* Find an object's position on the screen. */
9238 + _findPos: function(obj) {
9239 + var position,
9240 + inst = this._getInst(obj),
9241 + isRTL = this._get(inst, "isRTL");
9242 +
9243 + while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {
9244 + obj = obj[isRTL ? "previousSibling" : "nextSibling"];
9245 + }
9246 +
9247 + position = $(obj).offset();
9248 + return [position.left, position.top];
9249 + },
9250 +
9251 + /* Hide the date picker from view.
9252 + * @param input element - the input field attached to the date picker
9253 + */
9254 + _hideDatepicker: function(input) {
9255 + var showAnim, duration, postProcess, onClose,
9256 + inst = this._curInst;
9257 +
9258 + if (!inst || (input && inst !== $.data(input, PROP_NAME))) {
9259 + return;
9260 + }
9261 +
9262 + if (this._datepickerShowing) {
9263 + showAnim = this._get(inst, "showAnim");
9264 + duration = this._get(inst, "duration");
9265 + postProcess = function() {
9266 + $.datepicker._tidyDialog(inst);
9267 + };
9268 +
9269 + // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
9270 + if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
9271 + inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess);
9272 + } else {
9273 + inst.dpDiv[(showAnim === "slideDown" ? "slideUp" :
9274 + (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess);
9275 + }
9276 +
9277 + if (!showAnim) {
9278 + postProcess();
9279 + }
9280 + this._datepickerShowing = false;
9281 +
9282 + onClose = this._get(inst, "onClose");
9283 + if (onClose) {
9284 + onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]);
9285 + }
9286 +
9287 + this._lastInput = null;
9288 + if (this._inDialog) {
9289 + this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" });
9290 + if ($.blockUI) {
9291 + $.unblockUI();
9292 + $("body").append(this.dpDiv);
9293 + }
9294 + }
9295 + this._inDialog = false;
9296 + }
9297 + },
9298 +
9299 + /* Tidy up after a dialog display. */
9300 + _tidyDialog: function(inst) {
9301 + inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");
9302 + },
9303 +
9304 + /* Close date picker if clicked elsewhere. */
9305 + _checkExternalClick: function(event) {
9306 + if (!$.datepicker._curInst) {
9307 + return;
9308 + }
9309 +
9310 + var $target = $(event.target),
9311 + inst = $.datepicker._getInst($target[0]);
9312 +
9313 + if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
9314 + $target.parents("#" + $.datepicker._mainDivId).length === 0 &&
9315 + !$target.hasClass($.datepicker.markerClassName) &&
9316 + !$target.closest("." + $.datepicker._triggerClass).length &&
9317 + $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
9318 + ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {
9319 + $.datepicker._hideDatepicker();
9320 + }
9321 + },
9322 +
9323 + /* Adjust one of the date sub-fields. */
9324 + _adjustDate: function(id, offset, period) {
9325 + var target = $(id),
9326 + inst = this._getInst(target[0]);
9327 +
9328 + if (this._isDisabledDatepicker(target[0])) {
9329 + return;
9330 + }
9331 + this._adjustInstDate(inst, offset +
9332 + (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning
9333 + period);
9334 + this._updateDatepicker(inst);
9335 + },
9336 +
9337 + /* Action for current link. */
9338 + _gotoToday: function(id) {
9339 + var date,
9340 + target = $(id),
9341 + inst = this._getInst(target[0]);
9342 +
9343 + if (this._get(inst, "gotoCurrent") && inst.currentDay) {
9344 + inst.selectedDay = inst.currentDay;
9345 + inst.drawMonth = inst.selectedMonth = inst.currentMonth;
9346 + inst.drawYear = inst.selectedYear = inst.currentYear;
9347 + } else {
9348 + date = new Date();
9349 + inst.selectedDay = date.getDate();
9350 + inst.drawMonth = inst.selectedMonth = date.getMonth();
9351 + inst.drawYear = inst.selectedYear = date.getFullYear();
9352 + }
9353 + this._notifyChange(inst);
9354 + this._adjustDate(target);
9355 + },
9356 +
9357 + /* Action for selecting a new month/year. */
9358 + _selectMonthYear: function(id, select, period) {
9359 + var target = $(id),
9360 + inst = this._getInst(target[0]);
9361 +
9362 + inst["selected" + (period === "M" ? "Month" : "Year")] =
9363 + inst["draw" + (period === "M" ? "Month" : "Year")] =
9364 + parseInt(select.options[select.selectedIndex].value,10);
9365 +
9366 + this._notifyChange(inst);
9367 + this._adjustDate(target);
9368 + },
9369 +
9370 + /* Action for selecting a day. */
9371 + _selectDay: function(id, month, year, td) {
9372 + var inst,
9373 + target = $(id);
9374 +
9375 + if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
9376 + return;
9377 + }
9378 +
9379 + inst = this._getInst(target[0]);
9380 + inst.selectedDay = inst.currentDay = $("a", td).html();
9381 + inst.selectedMonth = inst.currentMonth = month;
9382 + inst.selectedYear = inst.currentYear = year;
9383 + this._selectDate(id, this._formatDate(inst,
9384 + inst.currentDay, inst.currentMonth, inst.currentYear));
9385 + },
9386 +
9387 + /* Erase the input field and hide the date picker. */
9388 + _clearDate: function(id) {
9389 + var target = $(id);
9390 + this._selectDate(target, "");
9391 + },
9392 +
9393 + /* Update the input field with the selected date. */
9394 + _selectDate: function(id, dateStr) {
9395 + var onSelect,
9396 + target = $(id),
9397 + inst = this._getInst(target[0]);
9398 +
9399 + dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
9400 + if (inst.input) {
9401 + inst.input.val(dateStr);
9402 + }
9403 + this._updateAlternate(inst);
9404 +
9405 + onSelect = this._get(inst, "onSelect");
9406 + if (onSelect) {
9407 + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
9408 + } else if (inst.input) {
9409 + inst.input.trigger("change"); // fire the change event
9410 + }
9411 +
9412 + if (inst.inline){
9413 + this._updateDatepicker(inst);
9414 + } else {
9415 + this._hideDatepicker();
9416 + this._lastInput = inst.input[0];
9417 + if (typeof(inst.input[0]) !== "object") {
9418 + inst.input.focus(); // restore focus
9419 + }
9420 + this._lastInput = null;
9421 + }
9422 + },
9423 +
9424 + /* Update any alternate field to synchronise with the main field. */
9425 + _updateAlternate: function(inst) {
9426 + var altFormat, date, dateStr,
9427 + altField = this._get(inst, "altField");
9428 +
9429 + if (altField) { // update alternate field too
9430 + altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
9431 + date = this._getDate(inst);
9432 + dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
9433 + $(altField).each(function() { $(this).val(dateStr); });
9434 + }
9435 + },
9436 +
9437 + /* Set as beforeShowDay function to prevent selection of weekends.
9438 + * @param date Date - the date to customise
9439 + * @return [boolean, string] - is this date selectable?, what is its CSS class?
9440 + */
9441 + noWeekends: function(date) {
9442 + var day = date.getDay();
9443 + return [(day > 0 && day < 6), ""];
9444 + },
9445 +
9446 + /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
9447 + * @param date Date - the date to get the week for
9448 + * @return number - the number of the week within the year that contains this date
9449 + */
9450 + iso8601Week: function(date) {
9451 + var time,
9452 + checkDate = new Date(date.getTime());
9453 +
9454 + // Find Thursday of this week starting on Monday
9455 + checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
9456 +
9457 + time = checkDate.getTime();
9458 + checkDate.setMonth(0); // Compare with Jan 1
9459 + checkDate.setDate(1);
9460 + return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
9461 + },
9462 +
9463 + /* Parse a string value into a date object.
9464 + * See formatDate below for the possible formats.
9465 + *
9466 + * @param format string - the expected format of the date
9467 + * @param value string - the date in the above format
9468 + * @param settings Object - attributes include:
9469 + * shortYearCutoff number - the cutoff year for determining the century (optional)
9470 + * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
9471 + * dayNames string[7] - names of the days from Sunday (optional)
9472 + * monthNamesShort string[12] - abbreviated names of the months (optional)
9473 + * monthNames string[12] - names of the months (optional)
9474 + * @return Date - the extracted date value or null if value is blank
9475 + */
9476 + parseDate: function (format, value, settings) {
9477 + if (format == null || value == null) {
9478 + throw "Invalid arguments";
9479 + }
9480 +
9481 + value = (typeof value === "object" ? value.toString() : value + "");
9482 + if (value === "") {
9483 + return null;
9484 + }
9485 +
9486 + var iFormat, dim, extra,
9487 + iValue = 0,
9488 + shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,
9489 + shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
9490 + new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),
9491 + dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
9492 + dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
9493 + monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
9494 + monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
9495 + year = -1,
9496 + month = -1,
9497 + day = -1,
9498 + doy = -1,
9499 + literal = false,
9500 + date,
9501 + // Check whether a format character is doubled
9502 + lookAhead = function(match) {
9503 + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
9504 + if (matches) {
9505 + iFormat++;
9506 + }
9507 + return matches;
9508 + },
9509 + // Extract a number from the string value
9510 + getNumber = function(match) {
9511 + var isDoubled = lookAhead(match),
9512 + size = (match === "@" ? 14 : (match === "!" ? 20 :
9513 + (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
9514 + digits = new RegExp("^\\d{1," + size + "}"),
9515 + num = value.substring(iValue).match(digits);
9516 + if (!num) {
9517 + throw "Missing number at position " + iValue;
9518 + }
9519 + iValue += num[0].length;
9520 + return parseInt(num[0], 10);
9521 + },
9522 + // Extract a name from the string value and convert to an index
9523 + getName = function(match, shortNames, longNames) {
9524 + var index = -1,
9525 + names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
9526 + return [ [k, v] ];
9527 + }).sort(function (a, b) {
9528 + return -(a[1].length - b[1].length);
9529 + });
9530 +
9531 + $.each(names, function (i, pair) {
9532 + var name = pair[1];
9533 + if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
9534 + index = pair[0];
9535 + iValue += name.length;
9536 + return false;
9537 + }
9538 + });
9539 + if (index !== -1) {
9540 + return index + 1;
9541 + } else {
9542 + throw "Unknown name at position " + iValue;
9543 + }
9544 + },
9545 + // Confirm that a literal character matches the string value
9546 + checkLiteral = function() {
9547 + if (value.charAt(iValue) !== format.charAt(iFormat)) {
9548 + throw "Unexpected literal at position " + iValue;
9549 + }
9550 + iValue++;
9551 + };
9552 +
9553 + for (iFormat = 0; iFormat < format.length; iFormat++) {
9554 + if (literal) {
9555 + if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
9556 + literal = false;
9557 + } else {
9558 + checkLiteral();
9559 + }
9560 + } else {
9561 + switch (format.charAt(iFormat)) {
9562 + case "d":
9563 + day = getNumber("d");
9564 + break;
9565 + case "D":
9566 + getName("D", dayNamesShort, dayNames);
9567 + break;
9568 + case "o":
9569 + doy = getNumber("o");
9570 + break;
9571 + case "m":
9572 + month = getNumber("m");
9573 + break;
9574 + case "M":
9575 + month = getName("M", monthNamesShort, monthNames);
9576 + break;
9577 + case "y":
9578 + year = getNumber("y");
9579 + break;
9580 + case "@":
9581 + date = new Date(getNumber("@"));
9582 + year = date.getFullYear();
9583 + month = date.getMonth() + 1;
9584 + day = date.getDate();
9585 + break;
9586 + case "!":
9587 + date = new Date((getNumber("!") - this._ticksTo1970) / 10000);
9588 + year = date.getFullYear();
9589 + month = date.getMonth() + 1;
9590 + day = date.getDate();
9591 + break;
9592 + case "'":
9593 + if (lookAhead("'")){
9594 + checkLiteral();
9595 + } else {
9596 + literal = true;
9597 + }
9598 + break;
9599 + default:
9600 + checkLiteral();
9601 + }
9602 + }
9603 + }
9604 +
9605 + if (iValue < value.length){
9606 + extra = value.substr(iValue);
9607 + if (!/^\s+/.test(extra)) {
9608 + throw "Extra/unparsed characters found in date: " + extra;
9609 + }
9610 + }
9611 +
9612 + if (year === -1) {
9613 + year = new Date().getFullYear();
9614 + } else if (year < 100) {
9615 + year += new Date().getFullYear() - new Date().getFullYear() % 100 +
9616 + (year <= shortYearCutoff ? 0 : -100);
9617 + }
9618 +
9619 + if (doy > -1) {
9620 + month = 1;
9621 + day = doy;
9622 + do {
9623 + dim = this._getDaysInMonth(year, month - 1);
9624 + if (day <= dim) {
9625 + break;
9626 + }
9627 + month++;
9628 + day -= dim;
9629 + } while (true);
9630 + }
9631 +
9632 + date = this._daylightSavingAdjust(new Date(year, month - 1, day));
9633 + if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
9634 + throw "Invalid date"; // E.g. 31/02/00
9635 + }
9636 + return date;
9637 + },
9638 +
9639 + /* Standard date formats. */
9640 + ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
9641 + COOKIE: "D, dd M yy",
9642 + ISO_8601: "yy-mm-dd",
9643 + RFC_822: "D, d M y",
9644 + RFC_850: "DD, dd-M-y",
9645 + RFC_1036: "D, d M y",
9646 + RFC_1123: "D, d M yy",
9647 + RFC_2822: "D, d M yy",
9648 + RSS: "D, d M y", // RFC 822
9649 + TICKS: "!",
9650 + TIMESTAMP: "@",
9651 + W3C: "yy-mm-dd", // ISO 8601
9652 +
9653 + _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
9654 + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
9655 +
9656 + /* Format a date object into a string value.
9657 + * The format can be combinations of the following:
9658 + * d - day of month (no leading zero)
9659 + * dd - day of month (two digit)
9660 + * o - day of year (no leading zeros)
9661 + * oo - day of year (three digit)
9662 + * D - day name short
9663 + * DD - day name long
9664 + * m - month of year (no leading zero)
9665 + * mm - month of year (two digit)
9666 + * M - month name short
9667 + * MM - month name long
9668 + * y - year (two digit)
9669 + * yy - year (four digit)
9670 + * @ - Unix timestamp (ms since 01/01/1970)
9671 + * ! - Windows ticks (100ns since 01/01/0001)
9672 + * "..." - literal text
9673 + * '' - single quote
9674 + *
9675 + * @param format string - the desired format of the date
9676 + * @param date Date - the date value to format
9677 + * @param settings Object - attributes include:
9678 + * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
9679 + * dayNames string[7] - names of the days from Sunday (optional)
9680 + * monthNamesShort string[12] - abbreviated names of the months (optional)
9681 + * monthNames string[12] - names of the months (optional)
9682 + * @return string - the date in the above format
9683 + */
9684 + formatDate: function (format, date, settings) {
9685 + if (!date) {
9686 + return "";
9687 + }
9688 +
9689 + var iFormat,
9690 + dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
9691 + dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
9692 + monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
9693 + monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
9694 + // Check whether a format character is doubled
9695 + lookAhead = function(match) {
9696 + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
9697 + if (matches) {
9698 + iFormat++;
9699 + }
9700 + return matches;
9701 + },
9702 + // Format a number, with leading zero if necessary
9703 + formatNumber = function(match, value, len) {
9704 + var num = "" + value;
9705 + if (lookAhead(match)) {
9706 + while (num.length < len) {
9707 + num = "0" + num;
9708 + }
9709 + }
9710 + return num;
9711 + },
9712 + // Format a name, short or long as requested
9713 + formatName = function(match, value, shortNames, longNames) {
9714 + return (lookAhead(match) ? longNames[value] : shortNames[value]);
9715 + },
9716 + output = "",
9717 + literal = false;
9718 +
9719 + if (date) {
9720 + for (iFormat = 0; iFormat < format.length; iFormat++) {
9721 + if (literal) {
9722 + if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
9723 + literal = false;
9724 + } else {
9725 + output += format.charAt(iFormat);
9726 + }
9727 + } else {
9728 + switch (format.charAt(iFormat)) {
9729 + case "d":
9730 + output += formatNumber("d", date.getDate(), 2);
9731 + break;
9732 + case "D":
9733 + output += formatName("D", date.getDay(), dayNamesShort, dayNames);
9734 + break;
9735 + case "o":
9736 + output += formatNumber("o",
9737 + Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
9738 + break;
9739 + case "m":
9740 + output += formatNumber("m", date.getMonth() + 1, 2);
9741 + break;
9742 + case "M":
9743 + output += formatName("M", date.getMonth(), monthNamesShort, monthNames);
9744 + break;
9745 + case "y":
9746 + output += (lookAhead("y") ? date.getFullYear() :
9747 + (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100);
9748 + break;
9749 + case "@":
9750 + output += date.getTime();
9751 + break;
9752 + case "!":
9753 + output += date.getTime() * 10000 + this._ticksTo1970;
9754 + break;
9755 + case "'":
9756 + if (lookAhead("'")) {
9757 + output += "'";
9758 + } else {
9759 + literal = true;
9760 + }
9761 + break;
9762 + default:
9763 + output += format.charAt(iFormat);
9764 + }
9765 + }
9766 + }
9767 + }
9768 + return output;
9769 + },
9770 +
9771 + /* Extract all possible characters from the date format. */
9772 + _possibleChars: function (format) {
9773 + var iFormat,
9774 + chars = "",
9775 + literal = false,
9776 + // Check whether a format character is doubled
9777 + lookAhead = function(match) {
9778 + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
9779 + if (matches) {
9780 + iFormat++;
9781 + }
9782 + return matches;
9783 + };
9784 +
9785 + for (iFormat = 0; iFormat < format.length; iFormat++) {
9786 + if (literal) {
9787 + if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
9788 + literal = false;
9789 + } else {
9790 + chars += format.charAt(iFormat);
9791 + }
9792 + } else {
9793 + switch (format.charAt(iFormat)) {
9794 + case "d": case "m": case "y": case "@":
9795 + chars += "0123456789";
9796 + break;
9797 + case "D": case "M":
9798 + return null; // Accept anything
9799 + case "'":
9800 + if (lookAhead("'")) {
9801 + chars += "'";
9802 + } else {
9803 + literal = true;
9804 + }
9805 + break;
9806 + default:
9807 + chars += format.charAt(iFormat);
9808 + }
9809 + }
9810 + }
9811 + return chars;
9812 + },
9813 +
9814 + /* Get a setting value, defaulting if necessary. */
9815 + _get: function(inst, name) {
9816 + return inst.settings[name] !== undefined ?
9817 + inst.settings[name] : this._defaults[name];
9818 + },
9819 +
9820 + /* Parse existing date and initialise date picker. */
9821 + _setDateFromField: function(inst, noDefault) {
9822 + if (inst.input.val() === inst.lastVal) {
9823 + return;
9824 + }
9825 +
9826 + var dateFormat = this._get(inst, "dateFormat"),
9827 + dates = inst.lastVal = inst.input ? inst.input.val() : null,
9828 + defaultDate = this._getDefaultDate(inst),
9829 + date = defaultDate,
9830 + settings = this._getFormatConfig(inst);
9831 +
9832 + try {
9833 + date = this.parseDate(dateFormat, dates, settings) || defaultDate;
9834 + } catch (event) {
9835 + dates = (noDefault ? "" : dates);
9836 + }
9837 + inst.selectedDay = date.getDate();
9838 + inst.drawMonth = inst.selectedMonth = date.getMonth();
9839 + inst.drawYear = inst.selectedYear = date.getFullYear();
9840 + inst.currentDay = (dates ? date.getDate() : 0);
9841 + inst.currentMonth = (dates ? date.getMonth() : 0);
9842 + inst.currentYear = (dates ? date.getFullYear() : 0);
9843 + this._adjustInstDate(inst);
9844 + },
9845 +
9846 + /* Retrieve the default date shown on opening. */
9847 + _getDefaultDate: function(inst) {
9848 + return this._restrictMinMax(inst,
9849 + this._determineDate(inst, this._get(inst, "defaultDate"), new Date()));
9850 + },
9851 +
9852 + /* A date may be specified as an exact value or a relative one. */
9853 + _determineDate: function(inst, date, defaultDate) {
9854 + var offsetNumeric = function(offset) {
9855 + var date = new Date();
9856 + date.setDate(date.getDate() + offset);
9857 + return date;
9858 + },
9859 + offsetString = function(offset) {
9860 + try {
9861 + return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
9862 + offset, $.datepicker._getFormatConfig(inst));
9863 + }
9864 + catch (e) {
9865 + // Ignore
9866 + }
9867 +
9868 + var date = (offset.toLowerCase().match(/^c/) ?
9869 + $.datepicker._getDate(inst) : null) || new Date(),
9870 + year = date.getFullYear(),
9871 + month = date.getMonth(),
9872 + day = date.getDate(),
9873 + pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
9874 + matches = pattern.exec(offset);
9875 +
9876 + while (matches) {
9877 + switch (matches[2] || "d") {
9878 + case "d" : case "D" :
9879 + day += parseInt(matches[1],10); break;
9880 + case "w" : case "W" :
9881 + day += parseInt(matches[1],10) * 7; break;
9882 + case "m" : case "M" :
9883 + month += parseInt(matches[1],10);
9884 + day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
9885 + break;
9886 + case "y": case "Y" :
9887 + year += parseInt(matches[1],10);
9888 + day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
9889 + break;
9890 + }
9891 + matches = pattern.exec(offset);
9892 + }
9893 + return new Date(year, month, day);
9894 + },
9895 + newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) :
9896 + (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
9897 +
9898 + newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate);
9899 + if (newDate) {
9900 + newDate.setHours(0);
9901 + newDate.setMinutes(0);
9902 + newDate.setSeconds(0);
9903 + newDate.setMilliseconds(0);
9904 + }
9905 + return this._daylightSavingAdjust(newDate);
9906 + },
9907 +
9908 + /* Handle switch to/from daylight saving.
9909 + * Hours may be non-zero on daylight saving cut-over:
9910 + * > 12 when midnight changeover, but then cannot generate
9911 + * midnight datetime, so jump to 1AM, otherwise reset.
9912 + * @param date (Date) the date to check
9913 + * @return (Date) the corrected date
9914 + */
9915 + _daylightSavingAdjust: function(date) {
9916 + if (!date) {
9917 + return null;
9918 + }
9919 + date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
9920 + return date;
9921 + },
9922 +
9923 + /* Set the date(s) directly. */
9924 + _setDate: function(inst, date, noChange) {
9925 + var clear = !date,
9926 + origMonth = inst.selectedMonth,
9927 + origYear = inst.selectedYear,
9928 + newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
9929 +
9930 + inst.selectedDay = inst.currentDay = newDate.getDate();
9931 + inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
9932 + inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
9933 + if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {
9934 + this._notifyChange(inst);
9935 + }
9936 + this._adjustInstDate(inst);
9937 + if (inst.input) {
9938 + inst.input.val(clear ? "" : this._formatDate(inst));
9939 + }
9940 + },
9941 +
9942 + /* Retrieve the date(s) directly. */
9943 + _getDate: function(inst) {
9944 + var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null :
9945 + this._daylightSavingAdjust(new Date(
9946 + inst.currentYear, inst.currentMonth, inst.currentDay)));
9947 + return startDate;
9948 + },
9949 +
9950 + /* Attach the onxxx handlers. These are declared statically so
9951 + * they work with static code transformers like Caja.
9952 + */
9953 + _attachHandlers: function(inst) {
9954 + var stepMonths = this._get(inst, "stepMonths"),
9955 + id = "#" + inst.id.replace( /\\\\/g, "\\" );
9956 + inst.dpDiv.find("[data-handler]").map(function () {
9957 + var handler = {
9958 + prev: function () {
9959 + $.datepicker._adjustDate(id, -stepMonths, "M");
9960 + },
9961 + next: function () {
9962 + $.datepicker._adjustDate(id, +stepMonths, "M");
9963 + },
9964 + hide: function () {
9965 + $.datepicker._hideDatepicker();
9966 + },
9967 + today: function () {
9968 + $.datepicker._gotoToday(id);
9969 + },
9970 + selectDay: function () {
9971 + $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
9972 + return false;
9973 + },
9974 + selectMonth: function () {
9975 + $.datepicker._selectMonthYear(id, this, "M");
9976 + return false;
9977 + },
9978 + selectYear: function () {
9979 + $.datepicker._selectMonthYear(id, this, "Y");
9980 + return false;
9981 + }
9982 + };
9983 + $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]);
9984 + });
9985 + },
9986 +
9987 + /* Generate the HTML for the current state of the date picker. */
9988 + _generateHTML: function(inst) {
9989 + var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
9990 + controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
9991 + monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
9992 + selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
9993 + cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
9994 + printDate, dRow, tbody, daySettings, otherMonth, unselectable,
9995 + tempDate = new Date(),
9996 + today = this._daylightSavingAdjust(
9997 + new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time
9998 + isRTL = this._get(inst, "isRTL"),
9999 + showButtonPanel = this._get(inst, "showButtonPanel"),
10000 + hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
10001 + navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"),
10002 + numMonths = this._getNumberOfMonths(inst),
10003 + showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
10004 + stepMonths = this._get(inst, "stepMonths"),
10005 + isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
10006 + currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
10007 + new Date(inst.currentYear, inst.currentMonth, inst.currentDay))),
10008 + minDate = this._getMinMaxDate(inst, "min"),
10009 + maxDate = this._getMinMaxDate(inst, "max"),
10010 + drawMonth = inst.drawMonth - showCurrentAtPos,
10011 + drawYear = inst.drawYear;
10012 +
10013 + if (drawMonth < 0) {
10014 + drawMonth += 12;
10015 + drawYear--;
10016 + }
10017 + if (maxDate) {
10018 + maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
10019 + maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
10020 + maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
10021 + while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
10022 + drawMonth--;
10023 + if (drawMonth < 0) {
10024 + drawMonth = 11;
10025 + drawYear--;
10026 + }
10027 + }
10028 + }
10029 + inst.drawMonth = drawMonth;
10030 + inst.drawYear = drawYear;
10031 +
10032 + prevText = this._get(inst, "prevText");
10033 + prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
10034 + this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
10035 + this._getFormatConfig(inst)));
10036 +
10037 + prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
10038 + "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
10039 + " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" :
10040 + (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>"));
10041 +
10042 + nextText = this._get(inst, "nextText");
10043 + nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
10044 + this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
10045 + this._getFormatConfig(inst)));
10046 +
10047 + next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
10048 + "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
10049 + " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" :
10050 + (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>"));
10051 +
10052 + currentText = this._get(inst, "currentText");
10053 + gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today);
10054 + currentText = (!navigationAsDateFormat ? currentText :
10055 + this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
10056 +
10057 + controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
10058 + this._get(inst, "closeText") + "</button>" : "");
10059 +
10060 + buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") +
10061 + (this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
10062 + ">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : "";
10063 +
10064 + firstDay = parseInt(this._get(inst, "firstDay"),10);
10065 + firstDay = (isNaN(firstDay) ? 0 : firstDay);
10066 +
10067 + showWeek = this._get(inst, "showWeek");
10068 + dayNames = this._get(inst, "dayNames");
10069 + dayNamesMin = this._get(inst, "dayNamesMin");
10070 + monthNames = this._get(inst, "monthNames");
10071 + monthNamesShort = this._get(inst, "monthNamesShort");
10072 + beforeShowDay = this._get(inst, "beforeShowDay");
10073 + showOtherMonths = this._get(inst, "showOtherMonths");
10074 + selectOtherMonths = this._get(inst, "selectOtherMonths");
10075 + defaultDate = this._getDefaultDate(inst);
10076 + html = "";
10077 + dow;
10078 + for (row = 0; row < numMonths[0]; row++) {
10079 + group = "";
10080 + this.maxRows = 4;
10081 + for (col = 0; col < numMonths[1]; col++) {
10082 + selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
10083 + cornerClass = " ui-corner-all";
10084 + calender = "";
10085 + if (isMultiMonth) {
10086 + calender += "<div class='ui-datepicker-group";
10087 + if (numMonths[1] > 1) {
10088 + switch (col) {
10089 + case 0: calender += " ui-datepicker-group-first";
10090 + cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
10091 + case numMonths[1]-1: calender += " ui-datepicker-group-last";
10092 + cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
10093 + default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
10094 + }
10095 + }
10096 + calender += "'>";
10097 + }
10098 + calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
10099 + (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") +
10100 + (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") +
10101 + this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
10102 + row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
10103 + "</div><table class='ui-datepicker-calendar'><thead>" +
10104 + "<tr>";
10105 + thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : "");
10106 + for (dow = 0; dow < 7; dow++) { // days of the week
10107 + day = (dow + firstDay) % 7;
10108 + thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +
10109 + "<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>";
10110 + }
10111 + calender += thead + "</tr></thead><tbody>";
10112 + daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
10113 + if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {
10114 + inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
10115 + }
10116 + leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
10117 + curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
10118 + numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
10119 + this.maxRows = numRows;
10120 + printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
10121 + for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
10122 + calender += "<tr>";
10123 + tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
10124 + this._get(inst, "calculateWeek")(printDate) + "</td>");
10125 + for (dow = 0; dow < 7; dow++) { // create date picker days
10126 + daySettings = (beforeShowDay ?
10127 + beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]);
10128 + otherMonth = (printDate.getMonth() !== drawMonth);
10129 + unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
10130 + (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
10131 + tbody += "<td class='" +
10132 + ((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends
10133 + (otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months
10134 + ((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key
10135 + (defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?
10136 + // or defaultDate is current printedDate and defaultDate is selectedDate
10137 + " " + this._dayOverClass : "") + // highlight selected day
10138 + (unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days
10139 + (otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates
10140 + (printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day
10141 + (printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different)
10142 + ((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "&#39;") + "'" : "") + // cell title
10143 + (unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions
10144 + (otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
10145 + (unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
10146 + (printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") +
10147 + (printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day
10148 + (otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months
10149 + "' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date
10150 + printDate.setDate(printDate.getDate() + 1);
10151 + printDate = this._daylightSavingAdjust(printDate);
10152 + }
10153 + calender += tbody + "</tr>";
10154 + }
10155 + drawMonth++;
10156 + if (drawMonth > 11) {
10157 + drawMonth = 0;
10158 + drawYear++;
10159 + }
10160 + calender += "</tbody></table>" + (isMultiMonth ? "</div>" +
10161 + ((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : "");
10162 + group += calender;
10163 + }
10164 + html += group;
10165 + }
10166 + html += buttonPanel;
10167 + inst._keyEvent = false;
10168 + return html;
10169 + },
10170 +
10171 + /* Generate the month and year header. */
10172 + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
10173 + secondary, monthNames, monthNamesShort) {
10174 +
10175 + var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
10176 + changeMonth = this._get(inst, "changeMonth"),
10177 + changeYear = this._get(inst, "changeYear"),
10178 + showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
10179 + html = "<div class='ui-datepicker-title'>",
10180 + monthHtml = "";
10181 +
10182 + // month selection
10183 + if (secondary || !changeMonth) {
10184 + monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>";
10185 + } else {
10186 + inMinYear = (minDate && minDate.getFullYear() === drawYear);
10187 + inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
10188 + monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
10189 + for ( month = 0; month < 12; month++) {
10190 + if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
10191 + monthHtml += "<option value='" + month + "'" +
10192 + (month === drawMonth ? " selected='selected'" : "") +
10193 + ">" + monthNamesShort[month] + "</option>";
10194 + }
10195 + }
10196 + monthHtml += "</select>";
10197 + }
10198 +
10199 + if (!showMonthAfterYear) {
10200 + html += monthHtml + (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "");
10201 + }
10202 +
10203 + // year selection
10204 + if ( !inst.yearshtml ) {
10205 + inst.yearshtml = "";
10206 + if (secondary || !changeYear) {
10207 + html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
10208 + } else {
10209 + // determine range of years to display
10210 + years = this._get(inst, "yearRange").split(":");
10211 + thisYear = new Date().getFullYear();
10212 + determineYear = function(value) {
10213 + var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) :
10214 + (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
10215 + parseInt(value, 10)));
10216 + return (isNaN(year) ? thisYear : year);
10217 + };
10218 + year = determineYear(years[0]);
10219 + endYear = Math.max(year, determineYear(years[1] || ""));
10220 + year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
10221 + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
10222 + inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
10223 + for (; year <= endYear; year++) {
10224 + inst.yearshtml += "<option value='" + year + "'" +
10225 + (year === drawYear ? " selected='selected'" : "") +
10226 + ">" + year + "</option>";
10227 + }
10228 + inst.yearshtml += "</select>";
10229 +
10230 + html += inst.yearshtml;
10231 + inst.yearshtml = null;
10232 + }
10233 + }
10234 +
10235 + html += this._get(inst, "yearSuffix");
10236 + if (showMonthAfterYear) {
10237 + html += (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "") + monthHtml;
10238 + }
10239 + html += "</div>"; // Close datepicker_header
10240 + return html;
10241 + },
10242 +
10243 + /* Adjust one of the date sub-fields. */
10244 + _adjustInstDate: function(inst, offset, period) {
10245 + var year = inst.drawYear + (period === "Y" ? offset : 0),
10246 + month = inst.drawMonth + (period === "M" ? offset : 0),
10247 + day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0),
10248 + date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));
10249 +
10250 + inst.selectedDay = date.getDate();
10251 + inst.drawMonth = inst.selectedMonth = date.getMonth();
10252 + inst.drawYear = inst.selectedYear = date.getFullYear();
10253 + if (period === "M" || period === "Y") {
10254 + this._notifyChange(inst);
10255 + }
10256 + },
10257 +
10258 + /* Ensure a date is within any min/max bounds. */
10259 + _restrictMinMax: function(inst, date) {
10260 + var minDate = this._getMinMaxDate(inst, "min"),
10261 + maxDate = this._getMinMaxDate(inst, "max"),
10262 + newDate = (minDate && date < minDate ? minDate : date);
10263 + return (maxDate && newDate > maxDate ? maxDate : newDate);
10264 + },
10265 +
10266 + /* Notify change of month/year. */
10267 + _notifyChange: function(inst) {
10268 + var onChange = this._get(inst, "onChangeMonthYear");
10269 + if (onChange) {
10270 + onChange.apply((inst.input ? inst.input[0] : null),
10271 + [inst.selectedYear, inst.selectedMonth + 1, inst]);
10272 + }
10273 + },
10274 +
10275 + /* Determine the number of months to show. */
10276 + _getNumberOfMonths: function(inst) {
10277 + var numMonths = this._get(inst, "numberOfMonths");
10278 + return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths));
10279 + },
10280 +
10281 + /* Determine the current maximum date - ensure no time components are set. */
10282 + _getMinMaxDate: function(inst, minMax) {
10283 + return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
10284 + },
10285 +
10286 + /* Find the number of days in a given month. */
10287 + _getDaysInMonth: function(year, month) {
10288 + return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
10289 + },
10290 +
10291 + /* Find the day of the week of the first of a month. */
10292 + _getFirstDayOfMonth: function(year, month) {
10293 + return new Date(year, month, 1).getDay();
10294 + },
10295 +
10296 + /* Determines if we should allow a "next/prev" month display change. */
10297 + _canAdjustMonth: function(inst, offset, curYear, curMonth) {
10298 + var numMonths = this._getNumberOfMonths(inst),
10299 + date = this._daylightSavingAdjust(new Date(curYear,
10300 + curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
10301 +
10302 + if (offset < 0) {
10303 + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
10304 + }
10305 + return this._isInRange(inst, date);
10306 + },
10307 +
10308 + /* Is the given date in the accepted range? */
10309 + _isInRange: function(inst, date) {
10310 + var yearSplit, currentYear,
10311 + minDate = this._getMinMaxDate(inst, "min"),
10312 + maxDate = this._getMinMaxDate(inst, "max"),
10313 + minYear = null,
10314 + maxYear = null,
10315 + years = this._get(inst, "yearRange");
10316 + if (years){
10317 + yearSplit = years.split(":");
10318 + currentYear = new Date().getFullYear();
10319 + minYear = parseInt(yearSplit[0], 10);
10320 + maxYear = parseInt(yearSplit[1], 10);
10321 + if ( yearSplit[0].match(/[+\-].*/) ) {
10322 + minYear += currentYear;
10323 + }
10324 + if ( yearSplit[1].match(/[+\-].*/) ) {
10325 + maxYear += currentYear;
10326 + }
10327 + }
10328 +
10329 + return ((!minDate || date.getTime() >= minDate.getTime()) &&
10330 + (!maxDate || date.getTime() <= maxDate.getTime()) &&
10331 + (!minYear || date.getFullYear() >= minYear) &&
10332 + (!maxYear || date.getFullYear() <= maxYear));
10333 + },
10334 +
10335 + /* Provide the configuration settings for formatting/parsing. */
10336 + _getFormatConfig: function(inst) {
10337 + var shortYearCutoff = this._get(inst, "shortYearCutoff");
10338 + shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff :
10339 + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
10340 + return {shortYearCutoff: shortYearCutoff,
10341 + dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"),
10342 + monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")};
10343 + },
10344 +
10345 + /* Format the given date for display. */
10346 + _formatDate: function(inst, day, month, year) {
10347 + if (!day) {
10348 + inst.currentDay = inst.selectedDay;
10349 + inst.currentMonth = inst.selectedMonth;
10350 + inst.currentYear = inst.selectedYear;
10351 + }
10352 + var date = (day ? (typeof day === "object" ? day :
10353 + this._daylightSavingAdjust(new Date(year, month, day))) :
10354 + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
10355 + return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst));
10356 + }
10357 +});
10358 +
10359 +/*
10360 + * Bind hover events for datepicker elements.
10361 + * Done via delegate so the binding only occurs once in the lifetime of the parent div.
10362 + * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
10363 + */
10364 +function bindHover(dpDiv) {
10365 + var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
10366 + return dpDiv.delegate(selector, "mouseout", function() {
10367 + $(this).removeClass("ui-state-hover");
10368 + if (this.className.indexOf("ui-datepicker-prev") !== -1) {
10369 + $(this).removeClass("ui-datepicker-prev-hover");
10370 + }
10371 + if (this.className.indexOf("ui-datepicker-next") !== -1) {
10372 + $(this).removeClass("ui-datepicker-next-hover");
10373 + }
10374 + })
10375 + .delegate(selector, "mouseover", function(){
10376 + if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
10377 + $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
10378 + $(this).addClass("ui-state-hover");
10379 + if (this.className.indexOf("ui-datepicker-prev") !== -1) {
10380 + $(this).addClass("ui-datepicker-prev-hover");
10381 + }
10382 + if (this.className.indexOf("ui-datepicker-next") !== -1) {
10383 + $(this).addClass("ui-datepicker-next-hover");
10384 + }
10385 + }
10386 + });
10387 +}
10388 +
10389 +/* jQuery extend now ignores nulls! */
10390 +function extendRemove(target, props) {
10391 + $.extend(target, props);
10392 + for (var name in props) {
10393 + if (props[name] == null) {
10394 + target[name] = props[name];
10395 + }
10396 + }
10397 + return target;
10398 +}
10399 +
10400 +/* Invoke the datepicker functionality.
10401 + @param options string - a command, optionally followed by additional parameters or
10402 + Object - settings for attaching new datepicker functionality
10403 + @return jQuery object */
10404 +$.fn.datepicker = function(options){
10405 +
10406 + /* Verify an empty collection wasn't passed - Fixes #6976 */
10407 + if ( !this.length ) {
10408 + return this;
10409 + }
10410 +
10411 + /* Initialise the date picker. */
10412 + if (!$.datepicker.initialized) {
10413 + $(document).mousedown($.datepicker._checkExternalClick);
10414 + $.datepicker.initialized = true;
10415 + }
10416 +
10417 + /* Append datepicker main container to body if not exist. */
10418 + if ($("#"+$.datepicker._mainDivId).length === 0) {
10419 + $("body").append($.datepicker.dpDiv);
10420 + }
10421 +
10422 + var otherArgs = Array.prototype.slice.call(arguments, 1);
10423 + if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) {
10424 + return $.datepicker["_" + options + "Datepicker"].
10425 + apply($.datepicker, [this[0]].concat(otherArgs));
10426 + }
10427 + if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") {
10428 + return $.datepicker["_" + options + "Datepicker"].
10429 + apply($.datepicker, [this[0]].concat(otherArgs));
10430 + }
10431 + return this.each(function() {
10432 + typeof options === "string" ?
10433 + $.datepicker["_" + options + "Datepicker"].
10434 + apply($.datepicker, [this].concat(otherArgs)) :
10435 + $.datepicker._attachDatepicker(this, options);
10436 + });
10437 +};
10438 +
10439 +$.datepicker = new Datepicker(); // singleton instance
10440 +$.datepicker.initialized = false;
10441 +$.datepicker.uuid = new Date().getTime();
10442 +$.datepicker.version = "1.10.3";
10443 +
10444 +})(jQuery);
10445 +
10446 +(function( $, undefined ) {
10447 +
10448 +var sizeRelatedOptions = {
10449 + buttons: true,
10450 + height: true,
10451 + maxHeight: true,
10452 + maxWidth: true,
10453 + minHeight: true,
10454 + minWidth: true,
10455 + width: true
10456 + },
10457 + resizableRelatedOptions = {
10458 + maxHeight: true,
10459 + maxWidth: true,
10460 + minHeight: true,
10461 + minWidth: true
10462 + };
10463 +
10464 +$.widget( "ui.dialog", {
10465 + version: "1.10.3",
10466 + options: {
10467 + appendTo: "body",
10468 + autoOpen: true,
10469 + buttons: [],
10470 + closeOnEscape: true,
10471 + closeText: "close",
10472 + dialogClass: "",
10473 + draggable: true,
10474 + hide: null,
10475 + height: "auto",
10476 + maxHeight: null,
10477 + maxWidth: null,
10478 + minHeight: 150,
10479 + minWidth: 150,
10480 + modal: false,
10481 + position: {
10482 + my: "center",
10483 + at: "center",
10484 + of: window,
10485 + collision: "fit",
10486 + // Ensure the titlebar is always visible
10487 + using: function( pos ) {
10488 + var topOffset = $( this ).css( pos ).offset().top;
10489 + if ( topOffset < 0 ) {
10490 + $( this ).css( "top", pos.top - topOffset );
10491 + }
10492 + }
10493 + },
10494 + resizable: true,
10495 + show: null,
10496 + title: null,
10497 + width: 300,
10498 +
10499 + // callbacks
10500 + beforeClose: null,
10501 + close: null,
10502 + drag: null,
10503 + dragStart: null,
10504 + dragStop: null,
10505 + focus: null,
10506 + open: null,
10507 + resize: null,
10508 + resizeStart: null,
10509 + resizeStop: null
10510 + },
10511 +
10512 + _create: function() {
10513 + this.originalCss = {
10514 + display: this.element[0].style.display,
10515 + width: this.element[0].style.width,
10516 + minHeight: this.element[0].style.minHeight,
10517 + maxHeight: this.element[0].style.maxHeight,
10518 + height: this.element[0].style.height
10519 + };
10520 + this.originalPosition = {
10521 + parent: this.element.parent(),
10522 + index: this.element.parent().children().index( this.element )
10523 + };
10524 + this.originalTitle = this.element.attr("title");
10525 + this.options.title = this.options.title || this.originalTitle;
10526 +
10527 + this._createWrapper();
10528 +
10529 + this.element
10530 + .show()
10531 + .removeAttr("title")
10532 + .addClass("ui-dialog-content ui-widget-content")
10533 + .appendTo( this.uiDialog );
10534 +
10535 + this._createTitlebar();
10536 + this._createButtonPane();
10537 +
10538 + if ( this.options.draggable && $.fn.draggable ) {
10539 + this._makeDraggable();
10540 + }
10541 + if ( this.options.resizable && $.fn.resizable ) {
10542 + this._makeResizable();
10543 + }
10544 +
10545 + this._isOpen = false;
10546 + },
10547 +
10548 + _init: function() {
10549 + if ( this.options.autoOpen ) {
10550 + this.open();
10551 + }
10552 + },
10553 +
10554 + _appendTo: function() {
10555 + var element = this.options.appendTo;
10556 + if ( element && (element.jquery || element.nodeType) ) {
10557 + return $( element );
10558 + }
10559 + return this.document.find( element || "body" ).eq( 0 );
10560 + },
10561 +
10562 + _destroy: function() {
10563 + var next,
10564 + originalPosition = this.originalPosition;
10565 +
10566 + this._destroyOverlay();
10567 +
10568 + this.element
10569 + .removeUniqueId()
10570 + .removeClass("ui-dialog-content ui-widget-content")
10571 + .css( this.originalCss )
10572 + // Without detaching first, the following becomes really slow
10573 + .detach();
10574 +
10575 + this.uiDialog.stop( true, true ).remove();
10576 +
10577 + if ( this.originalTitle ) {
10578 + this.element.attr( "title", this.originalTitle );
10579 + }
10580 +
10581 + next = originalPosition.parent.children().eq( originalPosition.index );
10582 + // Don't try to place the dialog next to itself (#8613)
10583 + if ( next.length && next[0] !== this.element[0] ) {
10584 + next.before( this.element );
10585 + } else {
10586 + originalPosition.parent.append( this.element );
10587 + }
10588 + },
10589 +
10590 + widget: function() {
10591 + return this.uiDialog;
10592 + },
10593 +
10594 + disable: $.noop,
10595 + enable: $.noop,
10596 +
10597 + close: function( event ) {
10598 + var that = this;
10599 +
10600 + if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
10601 + return;
10602 + }
10603 +
10604 + this._isOpen = false;
10605 + this._destroyOverlay();
10606 +
10607 + if ( !this.opener.filter(":focusable").focus().length ) {
10608 + // Hiding a focused element doesn't trigger blur in WebKit
10609 + // so in case we have nothing to focus on, explicitly blur the active element
10610 + // https://bugs.webkit.org/show_bug.cgi?id=47182
10611 + $( this.document[0].activeElement ).blur();
10612 + }
10613 +
10614 + this._hide( this.uiDialog, this.options.hide, function() {
10615 + that._trigger( "close", event );
10616 + });
10617 + },
10618 +
10619 + isOpen: function() {
10620 + return this._isOpen;
10621 + },
10622 +
10623 + moveToTop: function() {
10624 + this._moveToTop();
10625 + },
10626 +
10627 + _moveToTop: function( event, silent ) {
10628 + var moved = !!this.uiDialog.nextAll(":visible").insertBefore( this.uiDialog ).length;
10629 + if ( moved && !silent ) {
10630 + this._trigger( "focus", event );
10631 + }
10632 + return moved;
10633 + },
10634 +
10635 + open: function() {
10636 + var that = this;
10637 + if ( this._isOpen ) {
10638 + if ( this._moveToTop() ) {
10639 + this._focusTabbable();
10640 + }
10641 + return;
10642 + }
10643 +
10644 + this._isOpen = true;
10645 + this.opener = $( this.document[0].activeElement );
10646 +
10647 + this._size();
10648 + this._position();
10649 + this._createOverlay();
10650 + this._moveToTop( null, true );
10651 + this._show( this.uiDialog, this.options.show, function() {
10652 + that._focusTabbable();
10653 + that._trigger("focus");
10654 + });
10655 +
10656 + this._trigger("open");
10657 + },
10658 +
10659 + _focusTabbable: function() {
10660 + // Set focus to the first match:
10661 + // 1. First element inside the dialog matching [autofocus]
10662 + // 2. Tabbable element inside the content element
10663 + // 3. Tabbable element inside the buttonpane
10664 + // 4. The close button
10665 + // 5. The dialog itself
10666 + var hasFocus = this.element.find("[autofocus]");
10667 + if ( !hasFocus.length ) {
10668 + hasFocus = this.element.find(":tabbable");
10669 + }
10670 + if ( !hasFocus.length ) {
10671 + hasFocus = this.uiDialogButtonPane.find(":tabbable");
10672 + }
10673 + if ( !hasFocus.length ) {
10674 + hasFocus = this.uiDialogTitlebarClose.filter(":tabbable");
10675 + }
10676 + if ( !hasFocus.length ) {
10677 + hasFocus = this.uiDialog;
10678 + }
10679 + hasFocus.eq( 0 ).focus();
10680 + },
10681 +
10682 + _keepFocus: function( event ) {
10683 + function checkFocus() {
10684 + var activeElement = this.document[0].activeElement,
10685 + isActive = this.uiDialog[0] === activeElement ||
10686 + $.contains( this.uiDialog[0], activeElement );
10687 + if ( !isActive ) {
10688 + this._focusTabbable();
10689 + }
10690 + }
10691 + event.preventDefault();
10692 + checkFocus.call( this );
10693 + // support: IE
10694 + // IE <= 8 doesn't prevent moving focus even with event.preventDefault()
10695 + // so we check again later
10696 + this._delay( checkFocus );
10697 + },
10698 +
10699 + _createWrapper: function() {
10700 + this.uiDialog = $("<div>")
10701 + .addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " +
10702 + this.options.dialogClass )
10703 + .hide()
10704 + .attr({
10705 + // Setting tabIndex makes the div focusable
10706 + tabIndex: -1,
10707 + role: "dialog"
10708 + })
10709 + .appendTo( this._appendTo() );
10710 +
10711 + this._on( this.uiDialog, {
10712 + keydown: function( event ) {
10713 + if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
10714 + event.keyCode === $.ui.keyCode.ESCAPE ) {
10715 + event.preventDefault();
10716 + this.close( event );
10717 + return;
10718 + }
10719 +
10720 + // prevent tabbing out of dialogs
10721 + if ( event.keyCode !== $.ui.keyCode.TAB ) {
10722 + return;
10723 + }
10724 + var tabbables = this.uiDialog.find(":tabbable"),
10725 + first = tabbables.filter(":first"),
10726 + last = tabbables.filter(":last");
10727 +
10728 + if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {
10729 + first.focus( 1 );
10730 + event.preventDefault();
10731 + } else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {
10732 + last.focus( 1 );
10733 + event.preventDefault();
10734 + }
10735 + },
10736 + mousedown: function( event ) {
10737 + if ( this._moveToTop( event ) ) {
10738 + this._focusTabbable();
10739 + }
10740 + }
10741 + });
10742 +
10743 + // We assume that any existing aria-describedby attribute means
10744 + // that the dialog content is marked up properly
10745 + // otherwise we brute force the content as the description
10746 + if ( !this.element.find("[aria-describedby]").length ) {
10747 + this.uiDialog.attr({
10748 + "aria-describedby": this.element.uniqueId().attr("id")
10749 + });
10750 + }
10751 + },
10752 +
10753 + _createTitlebar: function() {
10754 + var uiDialogTitle;
10755 +
10756 + this.uiDialogTitlebar = $("<div>")
10757 + .addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix")
10758 + .prependTo( this.uiDialog );
10759 + this._on( this.uiDialogTitlebar, {
10760 + mousedown: function( event ) {
10761 + // Don't prevent click on close button (#8838)
10762 + // Focusing a dialog that is partially scrolled out of view
10763 + // causes the browser to scroll it into view, preventing the click event
10764 + if ( !$( event.target ).closest(".ui-dialog-titlebar-close") ) {
10765 + // Dialog isn't getting focus when dragging (#8063)
10766 + this.uiDialog.focus();
10767 + }
10768 + }
10769 + });
10770 +
10771 + this.uiDialogTitlebarClose = $("<button></button>")
10772 + .button({
10773 + label: this.options.closeText,
10774 + icons: {
10775 + primary: "ui-icon-closethick"
10776 + },
10777 + text: false
10778 + })
10779 + .addClass("ui-dialog-titlebar-close")
10780 + .appendTo( this.uiDialogTitlebar );
10781 + this._on( this.uiDialogTitlebarClose, {
10782 + click: function( event ) {
10783 + event.preventDefault();
10784 + this.close( event );
10785 + }
10786 + });
10787 +
10788 + uiDialogTitle = $("<span>")
10789 + .uniqueId()
10790 + .addClass("ui-dialog-title")
10791 + .prependTo( this.uiDialogTitlebar );
10792 + this._title( uiDialogTitle );
10793 +
10794 + this.uiDialog.attr({
10795 + "aria-labelledby": uiDialogTitle.attr("id")
10796 + });
10797 + },
10798 +
10799 + _title: function( title ) {
10800 + if ( !this.options.title ) {
10801 + title.html("&#160;");
10802 + }
10803 + title.text( this.options.title );
10804 + },
10805 +
10806 + _createButtonPane: function() {
10807 + this.uiDialogButtonPane = $("<div>")
10808 + .addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");
10809 +
10810 + this.uiButtonSet = $("<div>")
10811 + .addClass("ui-dialog-buttonset")
10812 + .appendTo( this.uiDialogButtonPane );
10813 +
10814 + this._createButtons();
10815 + },
10816 +
10817 + _createButtons: function() {
10818 + var that = this,
10819 + buttons = this.options.buttons;
10820 +
10821 + // if we already have a button pane, remove it
10822 + this.uiDialogButtonPane.remove();
10823 + this.uiButtonSet.empty();
10824 +
10825 + if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {
10826 + this.uiDialog.removeClass("ui-dialog-buttons");
10827 + return;
10828 + }
10829 +
10830 + $.each( buttons, function( name, props ) {
10831 + var click, buttonOptions;
10832 + props = $.isFunction( props ) ?
10833 + { click: props, text: name } :
10834 + props;
10835 + // Default to a non-submitting button
10836 + props = $.extend( { type: "button" }, props );
10837 + // Change the context for the click callback to be the main element
10838 + click = props.click;
10839 + props.click = function() {
10840 + click.apply( that.element[0], arguments );
10841 + };
10842 + buttonOptions = {
10843 + icons: props.icons,
10844 + text: props.showText
10845 + };
10846 + delete props.icons;
10847 + delete props.showText;
10848 + $( "<button></button>", props )
10849 + .button( buttonOptions )
10850 + .appendTo( that.uiButtonSet );
10851 + });
10852 + this.uiDialog.addClass("ui-dialog-buttons");
10853 + this.uiDialogButtonPane.appendTo( this.uiDialog );
10854 + },
10855 +
10856 + _makeDraggable: function() {
10857 + var that = this,
10858 + options = this.options;
10859 +
10860 + function filteredUi( ui ) {
10861 + return {
10862 + position: ui.position,
10863 + offset: ui.offset
10864 + };
10865 + }
10866 +
10867 + this.uiDialog.draggable({
10868 + cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
10869 + handle: ".ui-dialog-titlebar",
10870 + containment: "document",
10871 + start: function( event, ui ) {
10872 + $( this ).addClass("ui-dialog-dragging");
10873 + that._blockFrames();
10874 + that._trigger( "dragStart", event, filteredUi( ui ) );
10875 + },
10876 + drag: function( event, ui ) {
10877 + that._trigger( "drag", event, filteredUi( ui ) );
10878 + },
10879 + stop: function( event, ui ) {
10880 + options.position = [
10881 + ui.position.left - that.document.scrollLeft(),
10882 + ui.position.top - that.document.scrollTop()
10883 + ];
10884 + $( this ).removeClass("ui-dialog-dragging");
10885 + that._unblockFrames();
10886 + that._trigger( "dragStop", event, filteredUi( ui ) );
10887 + }
10888 + });
10889 + },
10890 +
10891 + _makeResizable: function() {
10892 + var that = this,
10893 + options = this.options,
10894 + handles = options.resizable,
10895 + // .ui-resizable has position: relative defined in the stylesheet
10896 + // but dialogs have to use absolute or fixed positioning
10897 + position = this.uiDialog.css("position"),
10898 + resizeHandles = typeof handles === "string" ?
10899 + handles :
10900 + "n,e,s,w,se,sw,ne,nw";
10901 +
10902 + function filteredUi( ui ) {
10903 + return {
10904 + originalPosition: ui.originalPosition,
10905 + originalSize: ui.originalSize,
10906 + position: ui.position,
10907 + size: ui.size
10908 + };
10909 + }
10910 +
10911 + this.uiDialog.resizable({
10912 + cancel: ".ui-dialog-content",
10913 + containment: "document",
10914 + alsoResize: this.element,
10915 + maxWidth: options.maxWidth,
10916 + maxHeight: options.maxHeight,
10917 + minWidth: options.minWidth,
10918 + minHeight: this._minHeight(),
10919 + handles: resizeHandles,
10920 + start: function( event, ui ) {
10921 + $( this ).addClass("ui-dialog-resizing");
10922 + that._blockFrames();
10923 + that._trigger( "resizeStart", event, filteredUi( ui ) );
10924 + },
10925 + resize: function( event, ui ) {
10926 + that._trigger( "resize", event, filteredUi( ui ) );
10927 + },
10928 + stop: function( event, ui ) {
10929 + options.height = $( this ).height();
10930 + options.width = $( this ).width();
10931 + $( this ).removeClass("ui-dialog-resizing");
10932 + that._unblockFrames();
10933 + that._trigger( "resizeStop", event, filteredUi( ui ) );
10934 + }
10935 + })
10936 + .css( "position", position );
10937 + },
10938 +
10939 + _minHeight: function() {
10940 + var options = this.options;
10941 +
10942 + return options.height === "auto" ?
10943 + options.minHeight :
10944 + Math.min( options.minHeight, options.height );
10945 + },
10946 +
10947 + _position: function() {
10948 + // Need to show the dialog to get the actual offset in the position plugin
10949 + var isVisible = this.uiDialog.is(":visible");
10950 + if ( !isVisible ) {
10951 + this.uiDialog.show();
10952 + }
10953 + this.uiDialog.position( this.options.position );
10954 + if ( !isVisible ) {
10955 + this.uiDialog.hide();
10956 + }
10957 + },
10958 +
10959 + _setOptions: function( options ) {
10960 + var that = this,
10961 + resize = false,
10962 + resizableOptions = {};
10963 +
10964 + $.each( options, function( key, value ) {
10965 + that._setOption( key, value );
10966 +
10967 + if ( key in sizeRelatedOptions ) {
10968 + resize = true;
10969 + }
10970 + if ( key in resizableRelatedOptions ) {
10971 + resizableOptions[ key ] = value;
10972 + }
10973 + });
10974 +
10975 + if ( resize ) {
10976 + this._size();
10977 + this._position();
10978 + }
10979 + if ( this.uiDialog.is(":data(ui-resizable)") ) {
10980 + this.uiDialog.resizable( "option", resizableOptions );
10981 + }
10982 + },
10983 +
10984 + _setOption: function( key, value ) {
10985 + /*jshint maxcomplexity:15*/
10986 + var isDraggable, isResizable,
10987 + uiDialog = this.uiDialog;
10988 +
10989 + if ( key === "dialogClass" ) {
10990 + uiDialog
10991 + .removeClass( this.options.dialogClass )
10992 + .addClass( value );
10993 + }
10994 +
10995 + if ( key === "disabled" ) {
10996 + return;
10997 + }
10998 +
10999 + this._super( key, value );
11000 +
11001 + if ( key === "appendTo" ) {
11002 + this.uiDialog.appendTo( this._appendTo() );
11003 + }
11004 +
11005 + if ( key === "buttons" ) {
11006 + this._createButtons();
11007 + }
11008 +
11009 + if ( key === "closeText" ) {
11010 + this.uiDialogTitlebarClose.button({
11011 + // Ensure that we always pass a string
11012 + label: "" + value
11013 + });
11014 + }
11015 +
11016 + if ( key === "draggable" ) {
11017 + isDraggable = uiDialog.is(":data(ui-draggable)");
11018 + if ( isDraggable && !value ) {
11019 + uiDialog.draggable("destroy");
11020 + }
11021 +
11022 + if ( !isDraggable && value ) {
11023 + this._makeDraggable();
11024 + }
11025 + }
11026 +
11027 + if ( key === "position" ) {
11028 + this._position();
11029 + }
11030 +
11031 + if ( key === "resizable" ) {
11032 + // currently resizable, becoming non-resizable
11033 + isResizable = uiDialog.is(":data(ui-resizable)");
11034 + if ( isResizable && !value ) {
11035 + uiDialog.resizable("destroy");
11036 + }
11037 +
11038 + // currently resizable, changing handles
11039 + if ( isResizable && typeof value === "string" ) {
11040 + uiDialog.resizable( "option", "handles", value );
11041 + }
11042 +
11043 + // currently non-resizable, becoming resizable
11044 + if ( !isResizable && value !== false ) {
11045 + this._makeResizable();
11046 + }
11047 + }
11048 +
11049 + if ( key === "title" ) {
11050 + this._title( this.uiDialogTitlebar.find(".ui-dialog-title") );
11051 + }
11052 + },
11053 +
11054 + _size: function() {
11055 + // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
11056 + // divs will both have width and height set, so we need to reset them
11057 + var nonContentHeight, minContentHeight, maxContentHeight,
11058 + options = this.options;
11059 +
11060 + // Reset content sizing
11061 + this.element.show().css({
11062 + width: "auto",
11063 + minHeight: 0,
11064 + maxHeight: "none",
11065 + height: 0
11066 + });
11067 +
11068 + if ( options.minWidth > options.width ) {
11069 + options.width = options.minWidth;
11070 + }
11071 +
11072 + // reset wrapper sizing
11073 + // determine the height of all the non-content elements
11074 + nonContentHeight = this.uiDialog.css({
11075 + height: "auto",
11076 + width: options.width
11077 + })
11078 + .outerHeight();
11079 + minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
11080 + maxContentHeight = typeof options.maxHeight === "number" ?
11081 + Math.max( 0, options.maxHeight - nonContentHeight ) :
11082 + "none";
11083 +
11084 + if ( options.height === "auto" ) {
11085 + this.element.css({
11086 + minHeight: minContentHeight,
11087 + maxHeight: maxContentHeight,
11088 + height: "auto"
11089 + });
11090 + } else {
11091 + this.element.height( Math.max( 0, options.height - nonContentHeight ) );
11092 + }
11093 +
11094 + if (this.uiDialog.is(":data(ui-resizable)") ) {
11095 + this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
11096 + }
11097 + },
11098 +
11099 + _blockFrames: function() {
11100 + this.iframeBlocks = this.document.find( "iframe" ).map(function() {
11101 + var iframe = $( this );
11102 +
11103 + return $( "<div>" )
11104 + .css({
11105 + position: "absolute",
11106 + width: iframe.outerWidth(),
11107 + height: iframe.outerHeight()
11108 + })
11109 + .appendTo( iframe.parent() )
11110 + .offset( iframe.offset() )[0];
11111 + });
11112 + },
11113 +
11114 + _unblockFrames: function() {
11115 + if ( this.iframeBlocks ) {
11116 + this.iframeBlocks.remove();
11117 + delete this.iframeBlocks;
11118 + }
11119 + },
11120 +
11121 + _allowInteraction: function( event ) {
11122 + if ( $( event.target ).closest(".ui-dialog").length ) {
11123 + return true;
11124 + }
11125 +
11126 + // TODO: Remove hack when datepicker implements
11127 + // the .ui-front logic (#8989)
11128 + return !!$( event.target ).closest(".ui-datepicker").length;
11129 + },
11130 +
11131 + _createOverlay: function() {
11132 + if ( !this.options.modal ) {
11133 + return;
11134 + }
11135 +
11136 + var that = this,
11137 + widgetFullName = this.widgetFullName;
11138 + if ( !$.ui.dialog.overlayInstances ) {
11139 + // Prevent use of anchors and inputs.
11140 + // We use a delay in case the overlay is created from an
11141 + // event that we're going to be cancelling. (#2804)
11142 + this._delay(function() {
11143 + // Handle .dialog().dialog("close") (#4065)
11144 + if ( $.ui.dialog.overlayInstances ) {
11145 + this.document.bind( "focusin.dialog", function( event ) {
11146 + if ( !that._allowInteraction( event ) ) {
11147 + event.preventDefault();
11148 + $(".ui-dialog:visible:last .ui-dialog-content")
11149 + .data( widgetFullName )._focusTabbable();
11150 + }
11151 + });
11152 + }
11153 + });
11154 + }
11155 +
11156 + this.overlay = $("<div>")
11157 + .addClass("ui-widget-overlay ui-front")
11158 + .appendTo( this._appendTo() );
11159 + this._on( this.overlay, {
11160 + mousedown: "_keepFocus"
11161 + });
11162 + $.ui.dialog.overlayInstances++;
11163 + },
11164 +
11165 + _destroyOverlay: function() {
11166 + if ( !this.options.modal ) {
11167 + return;
11168 + }
11169 +
11170 + if ( this.overlay ) {
11171 + $.ui.dialog.overlayInstances--;
11172 +
11173 + if ( !$.ui.dialog.overlayInstances ) {
11174 + this.document.unbind( "focusin.dialog" );
11175 + }
11176 + this.overlay.remove();
11177 + this.overlay = null;
11178 + }
11179 + }
11180 +});
11181 +
11182 +$.ui.dialog.overlayInstances = 0;
11183 +
11184 +// DEPRECATED
11185 +if ( $.uiBackCompat !== false ) {
11186 + // position option with array notation
11187 + // just override with old implementation
11188 + $.widget( "ui.dialog", $.ui.dialog, {
11189 + _position: function() {
11190 + var position = this.options.position,
11191 + myAt = [],
11192 + offset = [ 0, 0 ],
11193 + isVisible;
11194 +
11195 + if ( position ) {
11196 + if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
11197 + myAt = position.split ? position.split(" ") : [ position[0], position[1] ];
11198 + if ( myAt.length === 1 ) {
11199 + myAt[1] = myAt[0];
11200 + }
11201 +
11202 + $.each( [ "left", "top" ], function( i, offsetPosition ) {
11203 + if ( +myAt[ i ] === myAt[ i ] ) {
11204 + offset[ i ] = myAt[ i ];
11205 + myAt[ i ] = offsetPosition;
11206 + }
11207 + });
11208 +
11209 + position = {
11210 + my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +
11211 + myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),
11212 + at: myAt.join(" ")
11213 + };
11214 + }
11215 +
11216 + position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
11217 + } else {
11218 + position = $.ui.dialog.prototype.options.position;
11219 + }
11220 +
11221 + // need to show the dialog to get the actual offset in the position plugin
11222 + isVisible = this.uiDialog.is(":visible");
11223 + if ( !isVisible ) {
11224 + this.uiDialog.show();
11225 + }
11226 + this.uiDialog.position( position );
11227 + if ( !isVisible ) {
11228 + this.uiDialog.hide();
11229 + }
11230 + }
11231 + });
11232 +}
11233 +
11234 +}( jQuery ) );
11235 +
11236 +(function( $, undefined ) {
11237 +
11238 +var rvertical = /up|down|vertical/,
11239 + rpositivemotion = /up|left|vertical|horizontal/;
11240 +
11241 +$.effects.effect.blind = function( o, done ) {
11242 + // Create element
11243 + var el = $( this ),
11244 + props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
11245 + mode = $.effects.setMode( el, o.mode || "hide" ),
11246 + direction = o.direction || "up",
11247 + vertical = rvertical.test( direction ),
11248 + ref = vertical ? "height" : "width",
11249 + ref2 = vertical ? "top" : "left",
11250 + motion = rpositivemotion.test( direction ),
11251 + animation = {},
11252 + show = mode === "show",
11253 + wrapper, distance, margin;
11254 +
11255 + // if already wrapped, the wrapper's properties are my property. #6245
11256 + if ( el.parent().is( ".ui-effects-wrapper" ) ) {
11257 + $.effects.save( el.parent(), props );
11258 + } else {
11259 + $.effects.save( el, props );
11260 + }
11261 + el.show();
11262 + wrapper = $.effects.createWrapper( el ).css({
11263 + overflow: "hidden"
11264 + });
11265 +
11266 + distance = wrapper[ ref ]();
11267 + margin = parseFloat( wrapper.css( ref2 ) ) || 0;
11268 +
11269 + animation[ ref ] = show ? distance : 0;
11270 + if ( !motion ) {
11271 + el
11272 + .css( vertical ? "bottom" : "right", 0 )
11273 + .css( vertical ? "top" : "left", "auto" )
11274 + .css({ position: "absolute" });
11275 +
11276 + animation[ ref2 ] = show ? margin : distance + margin;
11277 + }
11278 +
11279 + // start at 0 if we are showing
11280 + if ( show ) {
11281 + wrapper.css( ref, 0 );
11282 + if ( ! motion ) {
11283 + wrapper.css( ref2, margin + distance );
11284 + }
11285 + }
11286 +
11287 + // Animate
11288 + wrapper.animate( animation, {
11289 + duration: o.duration,
11290 + easing: o.easing,
11291 + queue: false,
11292 + complete: function() {
11293 + if ( mode === "hide" ) {
11294 + el.hide();
11295 + }
11296 + $.effects.restore( el, props );
11297 + $.effects.removeWrapper( el );
11298 + done();
11299 + }
11300 + });
11301 +
11302 +};
11303 +
11304 +})(jQuery);
11305 +
11306 +(function( $, undefined ) {
11307 +
11308 +$.effects.effect.bounce = function( o, done ) {
11309 + var el = $( this ),
11310 + props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
11311 +
11312 + // defaults:
11313 + mode = $.effects.setMode( el, o.mode || "effect" ),
11314 + hide = mode === "hide",
11315 + show = mode === "show",
11316 + direction = o.direction || "up",
11317 + distance = o.distance,
11318 + times = o.times || 5,
11319 +
11320 + // number of internal animations
11321 + anims = times * 2 + ( show || hide ? 1 : 0 ),
11322 + speed = o.duration / anims,
11323 + easing = o.easing,
11324 +
11325 + // utility:
11326 + ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
11327 + motion = ( direction === "up" || direction === "left" ),
11328 + i,
11329 + upAnim,
11330 + downAnim,
11331 +
11332 + // we will need to re-assemble the queue to stack our animations in place
11333 + queue = el.queue(),
11334 + queuelen = queue.length;
11335 +
11336 + // Avoid touching opacity to prevent clearType and PNG issues in IE
11337 + if ( show || hide ) {
11338 + props.push( "opacity" );
11339 + }
11340 +
11341 + $.effects.save( el, props );
11342 + el.show();
11343 + $.effects.createWrapper( el ); // Create Wrapper
11344 +
11345 + // default distance for the BIGGEST bounce is the outer Distance / 3
11346 + if ( !distance ) {
11347 + distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
11348 + }
11349 +
11350 + if ( show ) {
11351 + downAnim = { opacity: 1 };
11352 + downAnim[ ref ] = 0;
11353 +
11354 + // if we are showing, force opacity 0 and set the initial position
11355 + // then do the "first" animation
11356 + el.css( "opacity", 0 )
11357 + .css( ref, motion ? -distance * 2 : distance * 2 )
11358 + .animate( downAnim, speed, easing );
11359 + }
11360 +
11361 + // start at the smallest distance if we are hiding
11362 + if ( hide ) {
11363 + distance = distance / Math.pow( 2, times - 1 );
11364 + }
11365 +
11366 + downAnim = {};
11367 + downAnim[ ref ] = 0;
11368 + // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
11369 + for ( i = 0; i < times; i++ ) {
11370 + upAnim = {};
11371 + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
11372 +
11373 + el.animate( upAnim, speed, easing )
11374 + .animate( downAnim, speed, easing );
11375 +
11376 + distance = hide ? distance * 2 : distance / 2;
11377 + }
11378 +
11379 + // Last Bounce when Hiding
11380 + if ( hide ) {
11381 + upAnim = { opacity: 0 };
11382 + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
11383 +
11384 + el.animate( upAnim, speed, easing );
11385 + }
11386 +
11387 + el.queue(function() {
11388 + if ( hide ) {
11389 + el.hide();
11390 + }
11391 + $.effects.restore( el, props );
11392 + $.effects.removeWrapper( el );
11393 + done();
11394 + });
11395 +
11396 + // inject all the animations we just queued to be first in line (after "inprogress")
11397 + if ( queuelen > 1) {
11398 + queue.splice.apply( queue,
11399 + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
11400 + }
11401 + el.dequeue();
11402 +
11403 +};
11404 +
11405 +})(jQuery);
11406 +
11407 +(function( $, undefined ) {
11408 +
11409 +$.effects.effect.clip = function( o, done ) {
11410 + // Create element
11411 + var el = $( this ),
11412 + props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
11413 + mode = $.effects.setMode( el, o.mode || "hide" ),
11414 + show = mode === "show",
11415 + direction = o.direction || "vertical",
11416 + vert = direction === "vertical",
11417 + size = vert ? "height" : "width",
11418 + position = vert ? "top" : "left",
11419 + animation = {},
11420 + wrapper, animate, distance;
11421 +
11422 + // Save & Show
11423 + $.effects.save( el, props );
11424 + el.show();
11425 +
11426 + // Create Wrapper
11427 + wrapper = $.effects.createWrapper( el ).css({
11428 + overflow: "hidden"
11429 + });
11430 + animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
11431 + distance = animate[ size ]();
11432 +
11433 + // Shift
11434 + if ( show ) {
11435 + animate.css( size, 0 );
11436 + animate.css( position, distance / 2 );
11437 + }
11438 +
11439 + // Create Animation Object:
11440 + animation[ size ] = show ? distance : 0;
11441 + animation[ position ] = show ? 0 : distance / 2;
11442 +
11443 + // Animate
11444 + animate.animate( animation, {
11445 + queue: false,
11446 + duration: o.duration,
11447 + easing: o.easing,
11448 + complete: function() {
11449 + if ( !show ) {
11450 + el.hide();
11451 + }
11452 + $.effects.restore( el, props );
11453 + $.effects.removeWrapper( el );
11454 + done();
11455 + }
11456 + });
11457 +
11458 +};
11459 +
11460 +})(jQuery);
11461 +
11462 +(function( $, undefined ) {
11463 +
11464 +$.effects.effect.drop = function( o, done ) {
11465 +
11466 + var el = $( this ),
11467 + props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
11468 + mode = $.effects.setMode( el, o.mode || "hide" ),
11469 + show = mode === "show",
11470 + direction = o.direction || "left",
11471 + ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
11472 + motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
11473 + animation = {
11474 + opacity: show ? 1 : 0
11475 + },
11476 + distance;
11477 +
11478 + // Adjust
11479 + $.effects.save( el, props );
11480 + el.show();
11481 + $.effects.createWrapper( el );
11482 +
11483 + distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;
11484 +
11485 + if ( show ) {
11486 + el
11487 + .css( "opacity", 0 )
11488 + .css( ref, motion === "pos" ? -distance : distance );
11489 + }
11490 +
11491 + // Animation
11492 + animation[ ref ] = ( show ?
11493 + ( motion === "pos" ? "+=" : "-=" ) :
11494 + ( motion === "pos" ? "-=" : "+=" ) ) +
11495 + distance;
11496 +
11497 + // Animate
11498 + el.animate( animation, {
11499 + queue: false,
11500 + duration: o.duration,
11501 + easing: o.easing,
11502 + complete: function() {
11503 + if ( mode === "hide" ) {
11504 + el.hide();
11505 + }
11506 + $.effects.restore( el, props );
11507 + $.effects.removeWrapper( el );
11508 + done();
11509 + }
11510 + });
11511 +};
11512 +
11513 +})(jQuery);
11514 +
11515 +(function( $, undefined ) {
11516 +
11517 +$.effects.effect.explode = function( o, done ) {
11518 +
11519 + var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
11520 + cells = rows,
11521 + el = $( this ),
11522 + mode = $.effects.setMode( el, o.mode || "hide" ),
11523 + show = mode === "show",
11524 +
11525 + // show and then visibility:hidden the element before calculating offset
11526 + offset = el.show().css( "visibility", "hidden" ).offset(),
11527 +
11528 + // width and height of a piece
11529 + width = Math.ceil( el.outerWidth() / cells ),
11530 + height = Math.ceil( el.outerHeight() / rows ),
11531 + pieces = [],
11532 +
11533 + // loop
11534 + i, j, left, top, mx, my;
11535 +
11536 + // children animate complete:
11537 + function childComplete() {
11538 + pieces.push( this );
11539 + if ( pieces.length === rows * cells ) {
11540 + animComplete();
11541 + }
11542 + }
11543 +
11544 + // clone the element for each row and cell.
11545 + for( i = 0; i < rows ; i++ ) { // ===>
11546 + top = offset.top + i * height;
11547 + my = i - ( rows - 1 ) / 2 ;
11548 +
11549 + for( j = 0; j < cells ; j++ ) { // |||
11550 + left = offset.left + j * width;
11551 + mx = j - ( cells - 1 ) / 2 ;
11552 +
11553 + // Create a clone of the now hidden main element that will be absolute positioned
11554 + // within a wrapper div off the -left and -top equal to size of our pieces
11555 + el
11556 + .clone()
11557 + .appendTo( "body" )
11558 + .wrap( "<div></div>" )
11559 + .css({
11560 + position: "absolute",
11561 + visibility: "visible",
11562 + left: -j * width,
11563 + top: -i * height
11564 + })
11565 +
11566 + // select the wrapper - make it overflow: hidden and absolute positioned based on
11567 + // where the original was located +left and +top equal to the size of pieces
11568 + .parent()
11569 + .addClass( "ui-effects-explode" )
11570 + .css({
11571 + position: "absolute",
11572 + overflow: "hidden",
11573 + width: width,
11574 + height: height,
11575 + left: left + ( show ? mx * width : 0 ),
11576 + top: top + ( show ? my * height : 0 ),
11577 + opacity: show ? 0 : 1
11578 + }).animate({
11579 + left: left + ( show ? 0 : mx * width ),
11580 + top: top + ( show ? 0 : my * height ),
11581 + opacity: show ? 1 : 0
11582 + }, o.duration || 500, o.easing, childComplete );
11583 + }
11584 + }
11585 +
11586 + function animComplete() {
11587 + el.css({
11588 + visibility: "visible"
11589 + });
11590 + $( pieces ).remove();
11591 + if ( !show ) {
11592 + el.hide();
11593 + }
11594 + done();
11595 + }
11596 +};
11597 +
11598 +})(jQuery);
11599 +
11600 +(function( $, undefined ) {
11601 +
11602 +$.effects.effect.fade = function( o, done ) {
11603 + var el = $( this ),
11604 + mode = $.effects.setMode( el, o.mode || "toggle" );
11605 +
11606 + el.animate({
11607 + opacity: mode
11608 + }, {
11609 + queue: false,
11610 + duration: o.duration,
11611 + easing: o.easing,
11612 + complete: done
11613 + });
11614 +};
11615 +
11616 +})( jQuery );
11617 +
11618 +(function( $, undefined ) {
11619 +
11620 +$.effects.effect.fold = function( o, done ) {
11621 +
11622 + // Create element
11623 + var el = $( this ),
11624 + props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
11625 + mode = $.effects.setMode( el, o.mode || "hide" ),
11626 + show = mode === "show",
11627 + hide = mode === "hide",
11628 + size = o.size || 15,
11629 + percent = /([0-9]+)%/.exec( size ),
11630 + horizFirst = !!o.horizFirst,
11631 + widthFirst = show !== horizFirst,
11632 + ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
11633 + duration = o.duration / 2,
11634 + wrapper, distance,
11635 + animation1 = {},
11636 + animation2 = {};
11637 +
11638 + $.effects.save( el, props );
11639 + el.show();
11640 +
11641 + // Create Wrapper
11642 + wrapper = $.effects.createWrapper( el ).css({
11643 + overflow: "hidden"
11644 + });
11645 + distance = widthFirst ?
11646 + [ wrapper.width(), wrapper.height() ] :
11647 + [ wrapper.height(), wrapper.width() ];
11648 +
11649 + if ( percent ) {
11650 + size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
11651 + }
11652 + if ( show ) {
11653 + wrapper.css( horizFirst ? {
11654 + height: 0,
11655 + width: size
11656 + } : {
11657 + height: size,
11658 + width: 0
11659 + });
11660 + }
11661 +
11662 + // Animation
11663 + animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
11664 + animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
11665 +
11666 + // Animate
11667 + wrapper
11668 + .animate( animation1, duration, o.easing )
11669 + .animate( animation2, duration, o.easing, function() {
11670 + if ( hide ) {
11671 + el.hide();
11672 + }
11673 + $.effects.restore( el, props );
11674 + $.effects.removeWrapper( el );
11675 + done();
11676 + });
11677 +
11678 +};
11679 +
11680 +})(jQuery);
11681 +
11682 +(function( $, undefined ) {
11683 +
11684 +$.effects.effect.highlight = function( o, done ) {
11685 + var elem = $( this ),
11686 + props = [ "backgroundImage", "backgroundColor", "opacity" ],
11687 + mode = $.effects.setMode( elem, o.mode || "show" ),
11688 + animation = {
11689 + backgroundColor: elem.css( "backgroundColor" )
11690 + };
11691 +
11692 + if (mode === "hide") {
11693 + animation.opacity = 0;
11694 + }
11695 +
11696 + $.effects.save( elem, props );
11697 +
11698 + elem
11699 + .show()
11700 + .css({
11701 + backgroundImage: "none",
11702 + backgroundColor: o.color || "#ffff99"
11703 + })
11704 + .animate( animation, {
11705 + queue: false,
11706 + duration: o.duration,
11707 + easing: o.easing,
11708 + complete: function() {
11709 + if ( mode === "hide" ) {
11710 + elem.hide();
11711 + }
11712 + $.effects.restore( elem, props );
11713 + done();
11714 + }
11715 + });
11716 +};
11717 +
11718 +})(jQuery);
11719 +
11720 +(function( $, undefined ) {
11721 +
11722 +$.effects.effect.pulsate = function( o, done ) {
11723 + var elem = $( this ),
11724 + mode = $.effects.setMode( elem, o.mode || "show" ),
11725 + show = mode === "show",
11726 + hide = mode === "hide",
11727 + showhide = ( show || mode === "hide" ),
11728 +
11729 + // showing or hiding leaves of the "last" animation
11730 + anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
11731 + duration = o.duration / anims,
11732 + animateTo = 0,
11733 + queue = elem.queue(),
11734 + queuelen = queue.length,
11735 + i;
11736 +
11737 + if ( show || !elem.is(":visible")) {
11738 + elem.css( "opacity", 0 ).show();
11739 + animateTo = 1;
11740 + }
11741 +
11742 + // anims - 1 opacity "toggles"
11743 + for ( i = 1; i < anims; i++ ) {
11744 + elem.animate({
11745 + opacity: animateTo
11746 + }, duration, o.easing );
11747 + animateTo = 1 - animateTo;
11748 + }
11749 +
11750 + elem.animate({
11751 + opacity: animateTo
11752 + }, duration, o.easing);
11753 +
11754 + elem.queue(function() {
11755 + if ( hide ) {
11756 + elem.hide();
11757 + }
11758 + done();
11759 + });
11760 +
11761 + // We just queued up "anims" animations, we need to put them next in the queue
11762 + if ( queuelen > 1 ) {
11763 + queue.splice.apply( queue,
11764 + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
11765 + }
11766 + elem.dequeue();
11767 +};
11768 +
11769 +})(jQuery);
11770 +
11771 +(function( $, undefined ) {
11772 +
11773 +$.effects.effect.puff = function( o, done ) {
11774 + var elem = $( this ),
11775 + mode = $.effects.setMode( elem, o.mode || "hide" ),
11776 + hide = mode === "hide",
11777 + percent = parseInt( o.percent, 10 ) || 150,
11778 + factor = percent / 100,
11779 + original = {
11780 + height: elem.height(),
11781 + width: elem.width(),
11782 + outerHeight: elem.outerHeight(),
11783 + outerWidth: elem.outerWidth()
11784 + };
11785 +
11786 + $.extend( o, {
11787 + effect: "scale",
11788 + queue: false,
11789 + fade: true,
11790 + mode: mode,
11791 + complete: done,
11792 + percent: hide ? percent : 100,
11793 + from: hide ?
11794 + original :
11795 + {
11796 + height: original.height * factor,
11797 + width: original.width * factor,
11798 + outerHeight: original.outerHeight * factor,
11799 + outerWidth: original.outerWidth * factor
11800 + }
11801 + });
11802 +
11803 + elem.effect( o );
11804 +};
11805 +
11806 +$.effects.effect.scale = function( o, done ) {
11807 +
11808 + // Create element
11809 + var el = $( this ),
11810 + options = $.extend( true, {}, o ),
11811 + mode = $.effects.setMode( el, o.mode || "effect" ),
11812 + percent = parseInt( o.percent, 10 ) ||
11813 + ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
11814 + direction = o.direction || "both",
11815 + origin = o.origin,
11816 + original = {
11817 + height: el.height(),
11818 + width: el.width(),
11819 + outerHeight: el.outerHeight(),
11820 + outerWidth: el.outerWidth()
11821 + },
11822 + factor = {
11823 + y: direction !== "horizontal" ? (percent / 100) : 1,
11824 + x: direction !== "vertical" ? (percent / 100) : 1
11825 + };
11826 +
11827 + // We are going to pass this effect to the size effect:
11828 + options.effect = "size";
11829 + options.queue = false;
11830 + options.complete = done;
11831 +
11832 + // Set default origin and restore for show/hide
11833 + if ( mode !== "effect" ) {
11834 + options.origin = origin || ["middle","center"];
11835 + options.restore = true;
11836 + }
11837 +
11838 + options.from = o.from || ( mode === "show" ? {
11839 + height: 0,
11840 + width: 0,
11841 + outerHeight: 0,
11842 + outerWidth: 0
11843 + } : original );
11844 + options.to = {
11845 + height: original.height * factor.y,
11846 + width: original.width * factor.x,
11847 + outerHeight: original.outerHeight * factor.y,
11848 + outerWidth: original.outerWidth * factor.x
11849 + };
11850 +
11851 + // Fade option to support puff
11852 + if ( options.fade ) {
11853 + if ( mode === "show" ) {
11854 + options.from.opacity = 0;
11855 + options.to.opacity = 1;
11856 + }
11857 + if ( mode === "hide" ) {
11858 + options.from.opacity = 1;
11859 + options.to.opacity = 0;
11860 + }
11861 + }
11862 +
11863 + // Animate
11864 + el.effect( options );
11865 +
11866 +};
11867 +
11868 +$.effects.effect.size = function( o, done ) {
11869 +
11870 + // Create element
11871 + var original, baseline, factor,
11872 + el = $( this ),
11873 + props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
11874 +
11875 + // Always restore
11876 + props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
11877 +
11878 + // Copy for children
11879 + props2 = [ "width", "height", "overflow" ],
11880 + cProps = [ "fontSize" ],
11881 + vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
11882 + hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
11883 +
11884 + // Set options
11885 + mode = $.effects.setMode( el, o.mode || "effect" ),
11886 + restore = o.restore || mode !== "effect",
11887 + scale = o.scale || "both",
11888 + origin = o.origin || [ "middle", "center" ],
11889 + position = el.css( "position" ),
11890 + props = restore ? props0 : props1,
11891 + zero = {
11892 + height: 0,
11893 + width: 0,
11894 + outerHeight: 0,
11895 + outerWidth: 0
11896 + };
11897 +
11898 + if ( mode === "show" ) {
11899 + el.show();
11900 + }
11901 + original = {
11902 + height: el.height(),
11903 + width: el.width(),
11904 + outerHeight: el.outerHeight(),
11905 + outerWidth: el.outerWidth()
11906 + };
11907 +
11908 + if ( o.mode === "toggle" && mode === "show" ) {
11909 + el.from = o.to || zero;
11910 + el.to = o.from || original;
11911 + } else {
11912 + el.from = o.from || ( mode === "show" ? zero : original );
11913 + el.to = o.to || ( mode === "hide" ? zero : original );
11914 + }
11915 +
11916 + // Set scaling factor
11917 + factor = {
11918 + from: {
11919 + y: el.from.height / original.height,
11920 + x: el.from.width / original.width
11921 + },
11922 + to: {
11923 + y: el.to.height / original.height,
11924 + x: el.to.width / original.width
11925 + }
11926 + };
11927 +
11928 + // Scale the css box
11929 + if ( scale === "box" || scale === "both" ) {
11930 +
11931 + // Vertical props scaling
11932 + if ( factor.from.y !== factor.to.y ) {
11933 + props = props.concat( vProps );
11934 + el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
11935 + el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
11936 + }
11937 +
11938 + // Horizontal props scaling
11939 + if ( factor.from.x !== factor.to.x ) {
11940 + props = props.concat( hProps );
11941 + el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
11942 + el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
11943 + }
11944 + }
11945 +
11946 + // Scale the content
11947 + if ( scale === "content" || scale === "both" ) {
11948 +
11949 + // Vertical props scaling
11950 + if ( factor.from.y !== factor.to.y ) {
11951 + props = props.concat( cProps ).concat( props2 );
11952 + el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
11953 + el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
11954 + }
11955 + }
11956 +
11957 + $.effects.save( el, props );
11958 + el.show();
11959 + $.effects.createWrapper( el );
11960 + el.css( "overflow", "hidden" ).css( el.from );
11961 +
11962 + // Adjust
11963 + if (origin) { // Calculate baseline shifts
11964 + baseline = $.effects.getBaseline( origin, original );
11965 + el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
11966 + el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
11967 + el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
11968 + el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
11969 + }
11970 + el.css( el.from ); // set top & left
11971 +
11972 + // Animate
11973 + if ( scale === "content" || scale === "both" ) { // Scale the children
11974 +
11975 + // Add margins/font-size
11976 + vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
11977 + hProps = hProps.concat([ "marginLeft", "marginRight" ]);
11978 + props2 = props0.concat(vProps).concat(hProps);
11979 +
11980 + el.find( "*[width]" ).each( function(){
11981 + var child = $( this ),
11982 + c_original = {
11983 + height: child.height(),
11984 + width: child.width(),
11985 + outerHeight: child.outerHeight(),
11986 + outerWidth: child.outerWidth()
11987 + };
11988 + if (restore) {
11989 + $.effects.save(child, props2);
11990 + }
11991 +
11992 + child.from = {
11993 + height: c_original.height * factor.from.y,
11994 + width: c_original.width * factor.from.x,
11995 + outerHeight: c_original.outerHeight * factor.from.y,
11996 + outerWidth: c_original.outerWidth * factor.from.x
11997 + };
11998 + child.to = {
11999 + height: c_original.height * factor.to.y,
12000 + width: c_original.width * factor.to.x,
12001 + outerHeight: c_original.height * factor.to.y,
12002 + outerWidth: c_original.width * factor.to.x
12003 + };
12004 +
12005 + // Vertical props scaling
12006 + if ( factor.from.y !== factor.to.y ) {
12007 + child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
12008 + child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
12009 + }
12010 +
12011 + // Horizontal props scaling
12012 + if ( factor.from.x !== factor.to.x ) {
12013 + child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
12014 + child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
12015 + }
12016 +
12017 + // Animate children
12018 + child.css( child.from );
12019 + child.animate( child.to, o.duration, o.easing, function() {
12020 +
12021 + // Restore children
12022 + if ( restore ) {
12023 + $.effects.restore( child, props2 );
12024 + }
12025 + });
12026 + });
12027 + }
12028 +
12029 + // Animate
12030 + el.animate( el.to, {
12031 + queue: false,
12032 + duration: o.duration,
12033 + easing: o.easing,
12034 + complete: function() {
12035 + if ( el.to.opacity === 0 ) {
12036 + el.css( "opacity", el.from.opacity );
12037 + }
12038 + if( mode === "hide" ) {
12039 + el.hide();
12040 + }
12041 + $.effects.restore( el, props );
12042 + if ( !restore ) {
12043 +
12044 + // we need to calculate our new positioning based on the scaling
12045 + if ( position === "static" ) {
12046 + el.css({
12047 + position: "relative",
12048 + top: el.to.top,
12049 + left: el.to.left
12050 + });
12051 + } else {
12052 + $.each([ "top", "left" ], function( idx, pos ) {
12053 + el.css( pos, function( _, str ) {
12054 + var val = parseInt( str, 10 ),
12055 + toRef = idx ? el.to.left : el.to.top;
12056 +
12057 + // if original was "auto", recalculate the new value from wrapper
12058 + if ( str === "auto" ) {
12059 + return toRef + "px";
12060 + }
12061 +
12062 + return val + toRef + "px";
12063 + });
12064 + });
12065 + }
12066 + }
12067 +
12068 + $.effects.removeWrapper( el );
12069 + done();
12070 + }
12071 + });
12072 +
12073 +};
12074 +
12075 +})(jQuery);
12076 +
12077 +(function( $, undefined ) {
12078 +
12079 +$.effects.effect.shake = function( o, done ) {
12080 +
12081 + var el = $( this ),
12082 + props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
12083 + mode = $.effects.setMode( el, o.mode || "effect" ),
12084 + direction = o.direction || "left",
12085 + distance = o.distance || 20,
12086 + times = o.times || 3,
12087 + anims = times * 2 + 1,
12088 + speed = Math.round(o.duration/anims),
12089 + ref = (direction === "up" || direction === "down") ? "top" : "left",
12090 + positiveMotion = (direction === "up" || direction === "left"),
12091 + animation = {},
12092 + animation1 = {},
12093 + animation2 = {},
12094 + i,
12095 +
12096 + // we will need to re-assemble the queue to stack our animations in place
12097 + queue = el.queue(),
12098 + queuelen = queue.length;
12099 +
12100 + $.effects.save( el, props );
12101 + el.show();
12102 + $.effects.createWrapper( el );
12103 +
12104 + // Animation
12105 + animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
12106 + animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
12107 + animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
12108 +
12109 + // Animate
12110 + el.animate( animation, speed, o.easing );
12111 +
12112 + // Shakes
12113 + for ( i = 1; i < times; i++ ) {
12114 + el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
12115 + }
12116 + el
12117 + .animate( animation1, speed, o.easing )
12118 + .animate( animation, speed / 2, o.easing )
12119 + .queue(function() {
12120 + if ( mode === "hide" ) {
12121 + el.hide();
12122 + }
12123 + $.effects.restore( el, props );
12124 + $.effects.removeWrapper( el );
12125 + done();
12126 + });
12127 +
12128 + // inject all the animations we just queued to be first in line (after "inprogress")
12129 + if ( queuelen > 1) {
12130 + queue.splice.apply( queue,
12131 + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
12132 + }
12133 + el.dequeue();
12134 +
12135 +};
12136 +
12137 +})(jQuery);
12138 +
12139 +(function( $, undefined ) {
12140 +
12141 +$.effects.effect.slide = function( o, done ) {
12142 +
12143 + // Create element
12144 + var el = $( this ),
12145 + props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
12146 + mode = $.effects.setMode( el, o.mode || "show" ),
12147 + show = mode === "show",
12148 + direction = o.direction || "left",
12149 + ref = (direction === "up" || direction === "down") ? "top" : "left",
12150 + positiveMotion = (direction === "up" || direction === "left"),
12151 + distance,
12152 + animation = {};
12153 +
12154 + // Adjust
12155 + $.effects.save( el, props );
12156 + el.show();
12157 + distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
12158 +
12159 + $.effects.createWrapper( el ).css({
12160 + overflow: "hidden"
12161 + });
12162 +
12163 + if ( show ) {
12164 + el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
12165 + }
12166 +
12167 + // Animation
12168 + animation[ ref ] = ( show ?
12169 + ( positiveMotion ? "+=" : "-=") :
12170 + ( positiveMotion ? "-=" : "+=")) +
12171 + distance;
12172 +
12173 + // Animate
12174 + el.animate( animation, {
12175 + queue: false,
12176 + duration: o.duration,
12177 + easing: o.easing,
12178 + complete: function() {
12179 + if ( mode === "hide" ) {
12180 + el.hide();
12181 + }
12182 + $.effects.restore( el, props );
12183 + $.effects.removeWrapper( el );
12184 + done();
12185 + }
12186 + });
12187 +};
12188 +
12189 +})(jQuery);
12190 +
12191 +(function( $, undefined ) {
12192 +
12193 +$.effects.effect.transfer = function( o, done ) {
12194 + var elem = $( this ),
12195 + target = $( o.to ),
12196 + targetFixed = target.css( "position" ) === "fixed",
12197 + body = $("body"),
12198 + fixTop = targetFixed ? body.scrollTop() : 0,
12199 + fixLeft = targetFixed ? body.scrollLeft() : 0,
12200 + endPosition = target.offset(),
12201 + animation = {
12202 + top: endPosition.top - fixTop ,
12203 + left: endPosition.left - fixLeft ,
12204 + height: target.innerHeight(),
12205 + width: target.innerWidth()
12206 + },
12207 + startPosition = elem.offset(),
12208 + transfer = $( "<div class='ui-effects-transfer'></div>" )
12209 + .appendTo( document.body )
12210 + .addClass( o.className )
12211 + .css({
12212 + top: startPosition.top - fixTop ,
12213 + left: startPosition.left - fixLeft ,
12214 + height: elem.innerHeight(),
12215 + width: elem.innerWidth(),
12216 + position: targetFixed ? "fixed" : "absolute"
12217 + })
12218 + .animate( animation, o.duration, o.easing, function() {
12219 + transfer.remove();
12220 + done();
12221 + });
12222 +};
12223 +
12224 +})(jQuery);
12225 +
12226 +(function( $, undefined ) {
12227 +
12228 +$.widget( "ui.menu", {
12229 + version: "1.10.3",
12230 + defaultElement: "<ul>",
12231 + delay: 300,
12232 + options: {
12233 + icons: {
12234 + submenu: "ui-icon-carat-1-e"
12235 + },
12236 + menus: "ul",
12237 + position: {
12238 + my: "left top",
12239 + at: "right top"
12240 + },
12241 + role: "menu",
12242 +
12243 + // callbacks
12244 + blur: null,
12245 + focus: null,
12246 + select: null
12247 + },
12248 +
12249 + _create: function() {
12250 + this.activeMenu = this.element;
12251 + // flag used to prevent firing of the click handler
12252 + // as the event bubbles up through nested menus
12253 + this.mouseHandled = false;
12254 + this.element
12255 + .uniqueId()
12256 + .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
12257 + .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
12258 + .attr({
12259 + role: this.options.role,
12260 + tabIndex: 0
12261 + })
12262 + // need to catch all clicks on disabled menu
12263 + // not possible through _on
12264 + .bind( "click" + this.eventNamespace, $.proxy(function( event ) {
12265 + if ( this.options.disabled ) {
12266 + event.preventDefault();
12267 + }
12268 + }, this ));
12269 +
12270 + if ( this.options.disabled ) {
12271 + this.element
12272 + .addClass( "ui-state-disabled" )
12273 + .attr( "aria-disabled", "true" );
12274 + }
12275 +
12276 + this._on({
12277 + // Prevent focus from sticking to links inside menu after clicking
12278 + // them (focus should always stay on UL during navigation).
12279 + "mousedown .ui-menu-item > a": function( event ) {
12280 + event.preventDefault();
12281 + },
12282 + "click .ui-state-disabled > a": function( event ) {
12283 + event.preventDefault();
12284 + },
12285 + "click .ui-menu-item:has(a)": function( event ) {
12286 + var target = $( event.target ).closest( ".ui-menu-item" );
12287 + if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
12288 + this.mouseHandled = true;
12289 +
12290 + this.select( event );
12291 + // Open submenu on click
12292 + if ( target.has( ".ui-menu" ).length ) {
12293 + this.expand( event );
12294 + } else if ( !this.element.is( ":focus" ) ) {
12295 + // Redirect focus to the menu
12296 + this.element.trigger( "focus", [ true ] );
12297 +
12298 + // If the active item is on the top level, let it stay active.
12299 + // Otherwise, blur the active item since it is no longer visible.
12300 + if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
12301 + clearTimeout( this.timer );
12302 + }
12303 + }
12304 + }
12305 + },
12306 + "mouseenter .ui-menu-item": function( event ) {
12307 + var target = $( event.currentTarget );
12308 + // Remove ui-state-active class from siblings of the newly focused menu item
12309 + // to avoid a jump caused by adjacent elements both having a class with a border
12310 + target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
12311 + this.focus( event, target );
12312 + },
12313 + mouseleave: "collapseAll",
12314 + "mouseleave .ui-menu": "collapseAll",
12315 + focus: function( event, keepActiveItem ) {
12316 + // If there's already an active item, keep it active
12317 + // If not, activate the first item
12318 + var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 );
12319 +
12320 + if ( !keepActiveItem ) {
12321 + this.focus( event, item );
12322 + }
12323 + },
12324 + blur: function( event ) {
12325 + this._delay(function() {
12326 + if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
12327 + this.collapseAll( event );
12328 + }
12329 + });
12330 + },
12331 + keydown: "_keydown"
12332 + });
12333 +
12334 + this.refresh();
12335 +
12336 + // Clicks outside of a menu collapse any open menus
12337 + this._on( this.document, {
12338 + click: function( event ) {
12339 + if ( !$( event.target ).closest( ".ui-menu" ).length ) {
12340 + this.collapseAll( event );
12341 + }
12342 +
12343 + // Reset the mouseHandled flag
12344 + this.mouseHandled = false;
12345 + }
12346 + });
12347 + },
12348 +
12349 + _destroy: function() {
12350 + // Destroy (sub)menus
12351 + this.element
12352 + .removeAttr( "aria-activedescendant" )
12353 + .find( ".ui-menu" ).addBack()
12354 + .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" )
12355 + .removeAttr( "role" )
12356 + .removeAttr( "tabIndex" )
12357 + .removeAttr( "aria-labelledby" )
12358 + .removeAttr( "aria-expanded" )
12359 + .removeAttr( "aria-hidden" )
12360 + .removeAttr( "aria-disabled" )
12361 + .removeUniqueId()
12362 + .show();
12363 +
12364 + // Destroy menu items
12365 + this.element.find( ".ui-menu-item" )
12366 + .removeClass( "ui-menu-item" )
12367 + .removeAttr( "role" )
12368 + .removeAttr( "aria-disabled" )
12369 + .children( "a" )
12370 + .removeUniqueId()
12371 + .removeClass( "ui-corner-all ui-state-hover" )
12372 + .removeAttr( "tabIndex" )
12373 + .removeAttr( "role" )
12374 + .removeAttr( "aria-haspopup" )
12375 + .children().each( function() {
12376 + var elem = $( this );
12377 + if ( elem.data( "ui-menu-submenu-carat" ) ) {
12378 + elem.remove();
12379 + }
12380 + });
12381 +
12382 + // Destroy menu dividers
12383 + this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
12384 + },
12385 +
12386 + _keydown: function( event ) {
12387 + /*jshint maxcomplexity:20*/
12388 + var match, prev, character, skip, regex,
12389 + preventDefault = true;
12390 +
12391 + function escape( value ) {
12392 + return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
12393 + }
12394 +
12395 + switch ( event.keyCode ) {
12396 + case $.ui.keyCode.PAGE_UP:
12397 + this.previousPage( event );
12398 + break;
12399 + case $.ui.keyCode.PAGE_DOWN:
12400 + this.nextPage( event );
12401 + break;
12402 + case $.ui.keyCode.HOME:
12403 + this._move( "first", "first", event );
12404 + break;
12405 + case $.ui.keyCode.END:
12406 + this._move( "last", "last", event );
12407 + break;
12408 + case $.ui.keyCode.UP:
12409 + this.previous( event );
12410 + break;
12411 + case $.ui.keyCode.DOWN:
12412 + this.next( event );
12413 + break;
12414 + case $.ui.keyCode.LEFT:
12415 + this.collapse( event );
12416 + break;
12417 + case $.ui.keyCode.RIGHT:
12418 + if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
12419 + this.expand( event );
12420 + }
12421 + break;
12422 + case $.ui.keyCode.ENTER:
12423 + case $.ui.keyCode.SPACE:
12424 + this._activate( event );
12425 + break;
12426 + case $.ui.keyCode.ESCAPE:
12427 + this.collapse( event );
12428 + break;
12429 + default:
12430 + preventDefault = false;
12431 + prev = this.previousFilter || "";
12432 + character = String.fromCharCode( event.keyCode );
12433 + skip = false;
12434 +
12435 + clearTimeout( this.filterTimer );
12436 +
12437 + if ( character === prev ) {
12438 + skip = true;
12439 + } else {
12440 + character = prev + character;
12441 + }
12442 +
12443 + regex = new RegExp( "^" + escape( character ), "i" );
12444 + match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
12445 + return regex.test( $( this ).children( "a" ).text() );
12446 + });
12447 + match = skip && match.index( this.active.next() ) !== -1 ?
12448 + this.active.nextAll( ".ui-menu-item" ) :
12449 + match;
12450 +
12451 + // If no matches on the current filter, reset to the last character pressed
12452 + // to move down the menu to the first item that starts with that character
12453 + if ( !match.length ) {
12454 + character = String.fromCharCode( event.keyCode );
12455 + regex = new RegExp( "^" + escape( character ), "i" );
12456 + match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
12457 + return regex.test( $( this ).children( "a" ).text() );
12458 + });
12459 + }
12460 +
12461 + if ( match.length ) {
12462 + this.focus( event, match );
12463 + if ( match.length > 1 ) {
12464 + this.previousFilter = character;
12465 + this.filterTimer = this._delay(function() {
12466 + delete this.previousFilter;
12467 + }, 1000 );
12468 + } else {
12469 + delete this.previousFilter;
12470 + }
12471 + } else {
12472 + delete this.previousFilter;
12473 + }
12474 + }
12475 +
12476 + if ( preventDefault ) {
12477 + event.preventDefault();
12478 + }
12479 + },
12480 +
12481 + _activate: function( event ) {
12482 + if ( !this.active.is( ".ui-state-disabled" ) ) {
12483 + if ( this.active.children( "a[aria-haspopup='true']" ).length ) {
12484 + this.expand( event );
12485 + } else {
12486 + this.select( event );
12487 + }
12488 + }
12489 + },
12490 +
12491 + refresh: function() {
12492 + var menus,
12493 + icon = this.options.icons.submenu,
12494 + submenus = this.element.find( this.options.menus );
12495 +
12496 + // Initialize nested menus
12497 + submenus.filter( ":not(.ui-menu)" )
12498 + .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
12499 + .hide()
12500 + .attr({
12501 + role: this.options.role,
12502 + "aria-hidden": "true",
12503 + "aria-expanded": "false"
12504 + })
12505 + .each(function() {
12506 + var menu = $( this ),
12507 + item = menu.prev( "a" ),
12508 + submenuCarat = $( "<span>" )
12509 + .addClass( "ui-menu-icon ui-icon " + icon )
12510 + .data( "ui-menu-submenu-carat", true );
12511 +
12512 + item
12513 + .attr( "aria-haspopup", "true" )
12514 + .prepend( submenuCarat );
12515 + menu.attr( "aria-labelledby", item.attr( "id" ) );
12516 + });
12517 +
12518 + menus = submenus.add( this.element );
12519 +
12520 + // Don't refresh list items that are already adapted
12521 + menus.children( ":not(.ui-menu-item):has(a)" )
12522 + .addClass( "ui-menu-item" )
12523 + .attr( "role", "presentation" )
12524 + .children( "a" )
12525 + .uniqueId()
12526 + .addClass( "ui-corner-all" )
12527 + .attr({
12528 + tabIndex: -1,
12529 + role: this._itemRole()
12530 + });
12531 +
12532 + // Initialize unlinked menu-items containing spaces and/or dashes only as dividers
12533 + menus.children( ":not(.ui-menu-item)" ).each(function() {
12534 + var item = $( this );
12535 + // hyphen, em dash, en dash
12536 + if ( !/[^\-\u2014\u2013\s]/.test( item.text() ) ) {
12537 + item.addClass( "ui-widget-content ui-menu-divider" );
12538 + }
12539 + });
12540 +
12541 + // Add aria-disabled attribute to any disabled menu item
12542 + menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
12543 +
12544 + // If the active item has been removed, blur the menu
12545 + if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
12546 + this.blur();
12547 + }
12548 + },
12549 +
12550 + _itemRole: function() {
12551 + return {
12552 + menu: "menuitem",
12553 + listbox: "option"
12554 + }[ this.options.role ];
12555 + },
12556 +
12557 + _setOption: function( key, value ) {
12558 + if ( key === "icons" ) {
12559 + this.element.find( ".ui-menu-icon" )
12560 + .removeClass( this.options.icons.submenu )
12561 + .addClass( value.submenu );
12562 + }
12563 + this._super( key, value );
12564 + },
12565 +
12566 + focus: function( event, item ) {
12567 + var nested, focused;
12568 + this.blur( event, event && event.type === "focus" );
12569 +
12570 + this._scrollIntoView( item );
12571 +
12572 + this.active = item.first();
12573 + focused = this.active.children( "a" ).addClass( "ui-state-focus" );
12574 + // Only update aria-activedescendant if there's a role
12575 + // otherwise we assume focus is managed elsewhere
12576 + if ( this.options.role ) {
12577 + this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
12578 + }
12579 +
12580 + // Highlight active parent menu item, if any
12581 + this.active
12582 + .parent()
12583 + .closest( ".ui-menu-item" )
12584 + .children( "a:first" )
12585 + .addClass( "ui-state-active" );
12586 +
12587 + if ( event && event.type === "keydown" ) {
12588 + this._close();
12589 + } else {
12590 + this.timer = this._delay(function() {
12591 + this._close();
12592 + }, this.delay );
12593 + }
12594 +
12595 + nested = item.children( ".ui-menu" );
12596 + if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
12597 + this._startOpening(nested);
12598 + }
12599 + this.activeMenu = item.parent();
12600 +
12601 + this._trigger( "focus", event, { item: item } );
12602 + },
12603 +
12604 + _scrollIntoView: function( item ) {
12605 + var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
12606 + if ( this._hasScroll() ) {
12607 + borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
12608 + paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
12609 + offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
12610 + scroll = this.activeMenu.scrollTop();
12611 + elementHeight = this.activeMenu.height();
12612 + itemHeight = item.height();
12613 +
12614 + if ( offset < 0 ) {
12615 + this.activeMenu.scrollTop( scroll + offset );
12616 + } else if ( offset + itemHeight > elementHeight ) {
12617 + this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
12618 + }
12619 + }
12620 + },
12621 +
12622 + blur: function( event, fromFocus ) {
12623 + if ( !fromFocus ) {
12624 + clearTimeout( this.timer );
12625 + }
12626 +
12627 + if ( !this.active ) {
12628 + return;
12629 + }
12630 +
12631 + this.active.children( "a" ).removeClass( "ui-state-focus" );
12632 + this.active = null;
12633 +
12634 + this._trigger( "blur", event, { item: this.active } );
12635 + },
12636 +
12637 + _startOpening: function( submenu ) {
12638 + clearTimeout( this.timer );
12639 +
12640 + // Don't open if already open fixes a Firefox bug that caused a .5 pixel
12641 + // shift in the submenu position when mousing over the carat icon
12642 + if ( submenu.attr( "aria-hidden" ) !== "true" ) {
12643 + return;
12644 + }
12645 +
12646 + this.timer = this._delay(function() {
12647 + this._close();
12648 + this._open( submenu );
12649 + }, this.delay );
12650 + },
12651 +
12652 + _open: function( submenu ) {
12653 + var position = $.extend({
12654 + of: this.active
12655 + }, this.options.position );
12656 +
12657 + clearTimeout( this.timer );
12658 + this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
12659 + .hide()
12660 + .attr( "aria-hidden", "true" );
12661 +
12662 + submenu
12663 + .show()
12664 + .removeAttr( "aria-hidden" )
12665 + .attr( "aria-expanded", "true" )
12666 + .position( position );
12667 + },
12668 +
12669 + collapseAll: function( event, all ) {
12670 + clearTimeout( this.timer );
12671 + this.timer = this._delay(function() {
12672 + // If we were passed an event, look for the submenu that contains the event
12673 + var currentMenu = all ? this.element :
12674 + $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
12675 +
12676 + // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
12677 + if ( !currentMenu.length ) {
12678 + currentMenu = this.element;
12679 + }
12680 +
12681 + this._close( currentMenu );
12682 +
12683 + this.blur( event );
12684 + this.activeMenu = currentMenu;
12685 + }, this.delay );
12686 + },
12687 +
12688 + // With no arguments, closes the currently active menu - if nothing is active
12689 + // it closes all menus. If passed an argument, it will search for menus BELOW
12690 + _close: function( startMenu ) {
12691 + if ( !startMenu ) {
12692 + startMenu = this.active ? this.active.parent() : this.element;
12693 + }
12694 +
12695 + startMenu
12696 + .find( ".ui-menu" )
12697 + .hide()
12698 + .attr( "aria-hidden", "true" )
12699 + .attr( "aria-expanded", "false" )
12700 + .end()
12701 + .find( "a.ui-state-active" )
12702 + .removeClass( "ui-state-active" );
12703 + },
12704 +
12705 + collapse: function( event ) {
12706 + var newItem = this.active &&
12707 + this.active.parent().closest( ".ui-menu-item", this.element );
12708 + if ( newItem && newItem.length ) {
12709 + this._close();
12710 + this.focus( event, newItem );
12711 + }
12712 + },
12713 +
12714 + expand: function( event ) {
12715 + var newItem = this.active &&
12716 + this.active
12717 + .children( ".ui-menu " )
12718 + .children( ".ui-menu-item" )
12719 + .first();
12720 +
12721 + if ( newItem && newItem.length ) {
12722 + this._open( newItem.parent() );
12723 +
12724 + // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
12725 + this._delay(function() {
12726 + this.focus( event, newItem );
12727 + });
12728 + }
12729 + },
12730 +
12731 + next: function( event ) {
12732 + this._move( "next", "first", event );
12733 + },
12734 +
12735 + previous: function( event ) {
12736 + this._move( "prev", "last", event );
12737 + },
12738 +
12739 + isFirstItem: function() {
12740 + return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
12741 + },
12742 +
12743 + isLastItem: function() {
12744 + return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
12745 + },
12746 +
12747 + _move: function( direction, filter, event ) {
12748 + var next;
12749 + if ( this.active ) {
12750 + if ( direction === "first" || direction === "last" ) {
12751 + next = this.active
12752 + [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
12753 + .eq( -1 );
12754 + } else {
12755 + next = this.active
12756 + [ direction + "All" ]( ".ui-menu-item" )
12757 + .eq( 0 );
12758 + }
12759 + }
12760 + if ( !next || !next.length || !this.active ) {
12761 + next = this.activeMenu.children( ".ui-menu-item" )[ filter ]();
12762 + }
12763 +
12764 + this.focus( event, next );
12765 + },
12766 +
12767 + nextPage: function( event ) {
12768 + var item, base, height;
12769 +
12770 + if ( !this.active ) {
12771 + this.next( event );
12772 + return;
12773 + }
12774 + if ( this.isLastItem() ) {
12775 + return;
12776 + }
12777 + if ( this._hasScroll() ) {
12778 + base = this.active.offset().top;
12779 + height = this.element.height();
12780 + this.active.nextAll( ".ui-menu-item" ).each(function() {
12781 + item = $( this );
12782 + return item.offset().top - base - height < 0;
12783 + });
12784 +
12785 + this.focus( event, item );
12786 + } else {
12787 + this.focus( event, this.activeMenu.children( ".ui-menu-item" )
12788 + [ !this.active ? "first" : "last" ]() );
12789 + }
12790 + },
12791 +
12792 + previousPage: function( event ) {
12793 + var item, base, height;
12794 + if ( !this.active ) {
12795 + this.next( event );
12796 + return;
12797 + }
12798 + if ( this.isFirstItem() ) {
12799 + return;
12800 + }
12801 + if ( this._hasScroll() ) {
12802 + base = this.active.offset().top;
12803 + height = this.element.height();
12804 + this.active.prevAll( ".ui-menu-item" ).each(function() {
12805 + item = $( this );
12806 + return item.offset().top - base + height > 0;
12807 + });
12808 +
12809 + this.focus( event, item );
12810 + } else {
12811 + this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() );
12812 + }
12813 + },
12814 +
12815 + _hasScroll: function() {
12816 + return this.element.outerHeight() < this.element.prop( "scrollHeight" );
12817 + },
12818 +
12819 + select: function( event ) {
12820 + // TODO: It should never be possible to not have an active item at this
12821 + // point, but the tests don't trigger mouseenter before click.
12822 + this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
12823 + var ui = { item: this.active };
12824 + if ( !this.active.has( ".ui-menu" ).length ) {
12825 + this.collapseAll( event, true );
12826 + }
12827 + this._trigger( "select", event, ui );
12828 + }
12829 +});
12830 +
12831 +}( jQuery ));
12832 +
12833 +(function( $, undefined ) {
12834 +
12835 +$.ui = $.ui || {};
12836 +
12837 +var cachedScrollbarWidth,
12838 + max = Math.max,
12839 + abs = Math.abs,
12840 + round = Math.round,
12841 + rhorizontal = /left|center|right/,
12842 + rvertical = /top|center|bottom/,
12843 + roffset = /[\+\-]\d+(\.[\d]+)?%?/,
12844 + rposition = /^\w+/,
12845 + rpercent = /%$/,
12846 + _position = $.fn.position;
12847 +
12848 +function getOffsets( offsets, width, height ) {
12849 + return [
12850 + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
12851 + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
12852 + ];
12853 +}
12854 +
12855 +function parseCss( element, property ) {
12856 + return parseInt( $.css( element, property ), 10 ) || 0;
12857 +}
12858 +
12859 +function getDimensions( elem ) {
12860 + var raw = elem[0];
12861 + if ( raw.nodeType === 9 ) {
12862 + return {
12863 + width: elem.width(),
12864 + height: elem.height(),
12865 + offset: { top: 0, left: 0 }
12866 + };
12867 + }
12868 + if ( $.isWindow( raw ) ) {
12869 + return {
12870 + width: elem.width(),
12871 + height: elem.height(),
12872 + offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
12873 + };
12874 + }
12875 + if ( raw.preventDefault ) {
12876 + return {
12877 + width: 0,
12878 + height: 0,
12879 + offset: { top: raw.pageY, left: raw.pageX }
12880 + };
12881 + }
12882 + return {
12883 + width: elem.outerWidth(),
12884 + height: elem.outerHeight(),
12885 + offset: elem.offset()
12886 + };
12887 +}
12888 +
12889 +$.position = {
12890 + scrollbarWidth: function() {
12891 + if ( cachedScrollbarWidth !== undefined ) {
12892 + return cachedScrollbarWidth;
12893 + }
12894 + var w1, w2,
12895 + div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
12896 + innerDiv = div.children()[0];
12897 +
12898 + $( "body" ).append( div );
12899 + w1 = innerDiv.offsetWidth;
12900 + div.css( "overflow", "scroll" );
12901 +
12902 + w2 = innerDiv.offsetWidth;
12903 +
12904 + if ( w1 === w2 ) {
12905 + w2 = div[0].clientWidth;
12906 + }
12907 +
12908 + div.remove();
12909 +
12910 + return (cachedScrollbarWidth = w1 - w2);
12911 + },
12912 + getScrollInfo: function( within ) {
12913 + var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
12914 + overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
12915 + hasOverflowX = overflowX === "scroll" ||
12916 + ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
12917 + hasOverflowY = overflowY === "scroll" ||
12918 + ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
12919 + return {
12920 + width: hasOverflowY ? $.position.scrollbarWidth() : 0,
12921 + height: hasOverflowX ? $.position.scrollbarWidth() : 0
12922 + };
12923 + },
12924 + getWithinInfo: function( element ) {
12925 + var withinElement = $( element || window ),
12926 + isWindow = $.isWindow( withinElement[0] );
12927 + return {
12928 + element: withinElement,
12929 + isWindow: isWindow,
12930 + offset: withinElement.offset() || { left: 0, top: 0 },
12931 + scrollLeft: withinElement.scrollLeft(),
12932 + scrollTop: withinElement.scrollTop(),
12933 + width: isWindow ? withinElement.width() : withinElement.outerWidth(),
12934 + height: isWindow ? withinElement.height() : withinElement.outerHeight()
12935 + };
12936 + }
12937 +};
12938 +
12939 +$.fn.position = function( options ) {
12940 + if ( !options || !options.of ) {
12941 + return _position.apply( this, arguments );
12942 + }
12943 +
12944 + // make a copy, we don't want to modify arguments
12945 + options = $.extend( {}, options );
12946 +
12947 + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
12948 + target = $( options.of ),
12949 + within = $.position.getWithinInfo( options.within ),
12950 + scrollInfo = $.position.getScrollInfo( within ),
12951 + collision = ( options.collision || "flip" ).split( " " ),
12952 + offsets = {};
12953 +
12954 + dimensions = getDimensions( target );
12955 + if ( target[0].preventDefault ) {
12956 + // force left top to allow flipping
12957 + options.at = "left top";
12958 + }
12959 + targetWidth = dimensions.width;
12960 + targetHeight = dimensions.height;
12961 + targetOffset = dimensions.offset;
12962 + // clone to reuse original targetOffset later
12963 + basePosition = $.extend( {}, targetOffset );
12964 +
12965 + // force my and at to have valid horizontal and vertical positions
12966 + // if a value is missing or invalid, it will be converted to center
12967 + $.each( [ "my", "at" ], function() {
12968 + var pos = ( options[ this ] || "" ).split( " " ),
12969 + horizontalOffset,
12970 + verticalOffset;
12971 +
12972 + if ( pos.length === 1) {
12973 + pos = rhorizontal.test( pos[ 0 ] ) ?
12974 + pos.concat( [ "center" ] ) :
12975 + rvertical.test( pos[ 0 ] ) ?
12976 + [ "center" ].concat( pos ) :
12977 + [ "center", "center" ];
12978 + }
12979 + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
12980 + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
12981 +
12982 + // calculate offsets
12983 + horizontalOffset = roffset.exec( pos[ 0 ] );
12984 + verticalOffset = roffset.exec( pos[ 1 ] );
12985 + offsets[ this ] = [
12986 + horizontalOffset ? horizontalOffset[ 0 ] : 0,
12987 + verticalOffset ? verticalOffset[ 0 ] : 0
12988 + ];
12989 +
12990 + // reduce to just the positions without the offsets
12991 + options[ this ] = [
12992 + rposition.exec( pos[ 0 ] )[ 0 ],
12993 + rposition.exec( pos[ 1 ] )[ 0 ]
12994 + ];
12995 + });
12996 +
12997 + // normalize collision option
12998 + if ( collision.length === 1 ) {
12999 + collision[ 1 ] = collision[ 0 ];
13000 + }
13001 +
13002 + if ( options.at[ 0 ] === "right" ) {
13003 + basePosition.left += targetWidth;
13004 + } else if ( options.at[ 0 ] === "center" ) {
13005 + basePosition.left += targetWidth / 2;
13006 + }
13007 +
13008 + if ( options.at[ 1 ] === "bottom" ) {
13009 + basePosition.top += targetHeight;
13010 + } else if ( options.at[ 1 ] === "center" ) {
13011 + basePosition.top += targetHeight / 2;
13012 + }
13013 +
13014 + atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
13015 + basePosition.left += atOffset[ 0 ];
13016 + basePosition.top += atOffset[ 1 ];
13017 +
13018 + return this.each(function() {
13019 + var collisionPosition, using,
13020 + elem = $( this ),
13021 + elemWidth = elem.outerWidth(),
13022 + elemHeight = elem.outerHeight(),
13023 + marginLeft = parseCss( this, "marginLeft" ),
13024 + marginTop = parseCss( this, "marginTop" ),
13025 + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
13026 + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
13027 + position = $.extend( {}, basePosition ),
13028 + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
13029 +
13030 + if ( options.my[ 0 ] === "right" ) {
13031 + position.left -= elemWidth;
13032 + } else if ( options.my[ 0 ] === "center" ) {
13033 + position.left -= elemWidth / 2;
13034 + }
13035 +
13036 + if ( options.my[ 1 ] === "bottom" ) {
13037 + position.top -= elemHeight;
13038 + } else if ( options.my[ 1 ] === "center" ) {
13039 + position.top -= elemHeight / 2;
13040 + }
13041 +
13042 + position.left += myOffset[ 0 ];
13043 + position.top += myOffset[ 1 ];
13044 +
13045 + // if the browser doesn't support fractions, then round for consistent results
13046 + if ( !$.support.offsetFractions ) {
13047 + position.left = round( position.left );
13048 + position.top = round( position.top );
13049 + }
13050 +
13051 + collisionPosition = {
13052 + marginLeft: marginLeft,
13053 + marginTop: marginTop
13054 + };
13055 +
13056 + $.each( [ "left", "top" ], function( i, dir ) {
13057 + if ( $.ui.position[ collision[ i ] ] ) {
13058 + $.ui.position[ collision[ i ] ][ dir ]( position, {
13059 + targetWidth: targetWidth,
13060 + targetHeight: targetHeight,
13061 + elemWidth: elemWidth,
13062 + elemHeight: elemHeight,
13063 + collisionPosition: collisionPosition,
13064 + collisionWidth: collisionWidth,
13065 + collisionHeight: collisionHeight,
13066 + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
13067 + my: options.my,
13068 + at: options.at,
13069 + within: within,
13070 + elem : elem
13071 + });
13072 + }
13073 + });
13074 +
13075 + if ( options.using ) {
13076 + // adds feedback as second argument to using callback, if present
13077 + using = function( props ) {
13078 + var left = targetOffset.left - position.left,
13079 + right = left + targetWidth - elemWidth,
13080 + top = targetOffset.top - position.top,
13081 + bottom = top + targetHeight - elemHeight,
13082 + feedback = {
13083 + target: {
13084 + element: target,
13085 + left: targetOffset.left,
13086 + top: targetOffset.top,
13087 + width: targetWidth,
13088 + height: targetHeight
13089 + },
13090 + element: {
13091 + element: elem,
13092 + left: position.left,
13093 + top: position.top,
13094 + width: elemWidth,
13095 + height: elemHeight
13096 + },
13097 + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
13098 + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
13099 + };
13100 + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
13101 + feedback.horizontal = "center";
13102 + }
13103 + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
13104 + feedback.vertical = "middle";
13105 + }
13106 + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
13107 + feedback.important = "horizontal";
13108 + } else {
13109 + feedback.important = "vertical";
13110 + }
13111 + options.using.call( this, props, feedback );
13112 + };
13113 + }
13114 +
13115 + elem.offset( $.extend( position, { using: using } ) );
13116 + });
13117 +};
13118 +
13119 +$.ui.position = {
13120 + fit: {
13121 + left: function( position, data ) {
13122 + var within = data.within,
13123 + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
13124 + outerWidth = within.width,
13125 + collisionPosLeft = position.left - data.collisionPosition.marginLeft,
13126 + overLeft = withinOffset - collisionPosLeft,
13127 + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
13128 + newOverRight;
13129 +
13130 + // element is wider than within
13131 + if ( data.collisionWidth > outerWidth ) {
13132 + // element is initially over the left side of within
13133 + if ( overLeft > 0 && overRight <= 0 ) {
13134 + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
13135 + position.left += overLeft - newOverRight;
13136 + // element is initially over right side of within
13137 + } else if ( overRight > 0 && overLeft <= 0 ) {
13138 + position.left = withinOffset;
13139 + // element is initially over both left and right sides of within
13140 + } else {
13141 + if ( overLeft > overRight ) {
13142 + position.left = withinOffset + outerWidth - data.collisionWidth;
13143 + } else {
13144 + position.left = withinOffset;
13145 + }
13146 + }
13147 + // too far left -> align with left edge
13148 + } else if ( overLeft > 0 ) {
13149 + position.left += overLeft;
13150 + // too far right -> align with right edge
13151 + } else if ( overRight > 0 ) {
13152 + position.left -= overRight;
13153 + // adjust based on position and margin
13154 + } else {
13155 + position.left = max( position.left - collisionPosLeft, position.left );
13156 + }
13157 + },
13158 + top: function( position, data ) {
13159 + var within = data.within,
13160 + withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
13161 + outerHeight = data.within.height,
13162 + collisionPosTop = position.top - data.collisionPosition.marginTop,
13163 + overTop = withinOffset - collisionPosTop,
13164 + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
13165 + newOverBottom;
13166 +
13167 + // element is taller than within
13168 + if ( data.collisionHeight > outerHeight ) {
13169 + // element is initially over the top of within
13170 + if ( overTop > 0 && overBottom <= 0 ) {
13171 + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
13172 + position.top += overTop - newOverBottom;
13173 + // element is initially over bottom of within
13174 + } else if ( overBottom > 0 && overTop <= 0 ) {
13175 + position.top = withinOffset;
13176 + // element is initially over both top and bottom of within
13177 + } else {
13178 + if ( overTop > overBottom ) {
13179 + position.top = withinOffset + outerHeight - data.collisionHeight;
13180 + } else {
13181 + position.top = withinOffset;
13182 + }
13183 + }
13184 + // too far up -> align with top
13185 + } else if ( overTop > 0 ) {
13186 + position.top += overTop;
13187 + // too far down -> align with bottom edge
13188 + } else if ( overBottom > 0 ) {
13189 + position.top -= overBottom;
13190 + // adjust based on position and margin
13191 + } else {
13192 + position.top = max( position.top - collisionPosTop, position.top );
13193 + }
13194 + }
13195 + },
13196 + flip: {
13197 + left: function( position, data ) {
13198 + var within = data.within,
13199 + withinOffset = within.offset.left + within.scrollLeft,
13200 + outerWidth = within.width,
13201 + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
13202 + collisionPosLeft = position.left - data.collisionPosition.marginLeft,
13203 + overLeft = collisionPosLeft - offsetLeft,
13204 + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
13205 + myOffset = data.my[ 0 ] === "left" ?
13206 + -data.elemWidth :
13207 + data.my[ 0 ] === "right" ?
13208 + data.elemWidth :
13209 + 0,
13210 + atOffset = data.at[ 0 ] === "left" ?
13211 + data.targetWidth :
13212 + data.at[ 0 ] === "right" ?
13213 + -data.targetWidth :
13214 + 0,
13215 + offset = -2 * data.offset[ 0 ],
13216 + newOverRight,
13217 + newOverLeft;
13218 +
13219 + if ( overLeft < 0 ) {
13220 + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
13221 + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
13222 + position.left += myOffset + atOffset + offset;
13223 + }
13224 + }
13225 + else if ( overRight > 0 ) {
13226 + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
13227 + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
13228 + position.left += myOffset + atOffset + offset;
13229 + }
13230 + }
13231 + },
13232 + top: function( position, data ) {
13233 + var within = data.within,
13234 + withinOffset = within.offset.top + within.scrollTop,
13235 + outerHeight = within.height,
13236 + offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
13237 + collisionPosTop = position.top - data.collisionPosition.marginTop,
13238 + overTop = collisionPosTop - offsetTop,
13239 + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
13240 + top = data.my[ 1 ] === "top",
13241 + myOffset = top ?
13242 + -data.elemHeight :
13243 + data.my[ 1 ] === "bottom" ?
13244 + data.elemHeight :
13245 + 0,
13246 + atOffset = data.at[ 1 ] === "top" ?
13247 + data.targetHeight :
13248 + data.at[ 1 ] === "bottom" ?
13249 + -data.targetHeight :
13250 + 0,
13251 + offset = -2 * data.offset[ 1 ],
13252 + newOverTop,
13253 + newOverBottom;
13254 + if ( overTop < 0 ) {
13255 + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
13256 + if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
13257 + position.top += myOffset + atOffset + offset;
13258 + }
13259 + }
13260 + else if ( overBottom > 0 ) {
13261 + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
13262 + if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
13263 + position.top += myOffset + atOffset + offset;
13264 + }
13265 + }
13266 + }
13267 + },
13268 + flipfit: {
13269 + left: function() {
13270 + $.ui.position.flip.left.apply( this, arguments );
13271 + $.ui.position.fit.left.apply( this, arguments );
13272 + },
13273 + top: function() {
13274 + $.ui.position.flip.top.apply( this, arguments );
13275 + $.ui.position.fit.top.apply( this, arguments );
13276 + }
13277 + }
13278 +};
13279 +
13280 +// fraction support test
13281 +(function () {
13282 + var testElement, testElementParent, testElementStyle, offsetLeft, i,
13283 + body = document.getElementsByTagName( "body" )[ 0 ],
13284 + div = document.createElement( "div" );
13285 +
13286 + //Create a "fake body" for testing based on method used in jQuery.support
13287 + testElement = document.createElement( body ? "div" : "body" );
13288 + testElementStyle = {
13289 + visibility: "hidden",
13290 + width: 0,
13291 + height: 0,
13292 + border: 0,
13293 + margin: 0,
13294 + background: "none"
13295 + };
13296 + if ( body ) {
13297 + $.extend( testElementStyle, {
13298 + position: "absolute",
13299 + left: "-1000px",
13300 + top: "-1000px"
13301 + });
13302 + }
13303 + for ( i in testElementStyle ) {
13304 + testElement.style[ i ] = testElementStyle[ i ];
13305 + }
13306 + testElement.appendChild( div );
13307 + testElementParent = body || document.documentElement;
13308 + testElementParent.insertBefore( testElement, testElementParent.firstChild );
13309 +
13310 + div.style.cssText = "position: absolute; left: 10.7432222px;";
13311 +
13312 + offsetLeft = $( div ).offset().left;
13313 + $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
13314 +
13315 + testElement.innerHTML = "";
13316 + testElementParent.removeChild( testElement );
13317 +})();
13318 +
13319 +}( jQuery ) );
13320 +
13321 +(function( $, undefined ) {
13322 +
13323 +$.widget( "ui.progressbar", {
13324 + version: "1.10.3",
13325 + options: {
13326 + max: 100,
13327 + value: 0,
13328 +
13329 + change: null,
13330 + complete: null
13331 + },
13332 +
13333 + min: 0,
13334 +
13335 + _create: function() {
13336 + // Constrain initial value
13337 + this.oldValue = this.options.value = this._constrainedValue();
13338 +
13339 + this.element
13340 + .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
13341 + .attr({
13342 + // Only set static values, aria-valuenow and aria-valuemax are
13343 + // set inside _refreshValue()
13344 + role: "progressbar",
13345 + "aria-valuemin": this.min
13346 + });
13347 +
13348 + this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
13349 + .appendTo( this.element );
13350 +
13351 + this._refreshValue();
13352 + },
13353 +
13354 + _destroy: function() {
13355 + this.element
13356 + .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
13357 + .removeAttr( "role" )
13358 + .removeAttr( "aria-valuemin" )
13359 + .removeAttr( "aria-valuemax" )
13360 + .removeAttr( "aria-valuenow" );
13361 +
13362 + this.valueDiv.remove();
13363 + },
13364 +
13365 + value: function( newValue ) {
13366 + if ( newValue === undefined ) {
13367 + return this.options.value;
13368 + }
13369 +
13370 + this.options.value = this._constrainedValue( newValue );
13371 + this._refreshValue();
13372 + },
13373 +
13374 + _constrainedValue: function( newValue ) {
13375 + if ( newValue === undefined ) {
13376 + newValue = this.options.value;
13377 + }
13378 +
13379 + this.indeterminate = newValue === false;
13380 +
13381 + // sanitize value
13382 + if ( typeof newValue !== "number" ) {
13383 + newValue = 0;
13384 + }
13385 +
13386 + return this.indeterminate ? false :
13387 + Math.min( this.options.max, Math.max( this.min, newValue ) );
13388 + },
13389 +
13390 + _setOptions: function( options ) {
13391 + // Ensure "value" option is set after other values (like max)
13392 + var value = options.value;
13393 + delete options.value;
13394 +
13395 + this._super( options );
13396 +
13397 + this.options.value = this._constrainedValue( value );
13398 + this._refreshValue();
13399 + },
13400 +
13401 + _setOption: function( key, value ) {
13402 + if ( key === "max" ) {
13403 + // Don't allow a max less than min
13404 + value = Math.max( this.min, value );
13405 + }
13406 +
13407 + this._super( key, value );
13408 + },
13409 +
13410 + _percentage: function() {
13411 + return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
13412 + },
13413 +
13414 + _refreshValue: function() {
13415 + var value = this.options.value,
13416 + percentage = this._percentage();
13417 +
13418 + this.valueDiv
13419 + .toggle( this.indeterminate || value > this.min )
13420 + .toggleClass( "ui-corner-right", value === this.options.max )
13421 + .width( percentage.toFixed(0) + "%" );
13422 +
13423 + this.element.toggleClass( "ui-progressbar-indeterminate", this.indeterminate );
13424 +
13425 + if ( this.indeterminate ) {
13426 + this.element.removeAttr( "aria-valuenow" );
13427 + if ( !this.overlayDiv ) {
13428 + this.overlayDiv = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv );
13429 + }
13430 + } else {
13431 + this.element.attr({
13432 + "aria-valuemax": this.options.max,
13433 + "aria-valuenow": value
13434 + });
13435 + if ( this.overlayDiv ) {
13436 + this.overlayDiv.remove();
13437 + this.overlayDiv = null;
13438 + }
13439 + }
13440 +
13441 + if ( this.oldValue !== value ) {
13442 + this.oldValue = value;
13443 + this._trigger( "change" );
13444 + }
13445 + if ( value === this.options.max ) {
13446 + this._trigger( "complete" );
13447 + }
13448 + }
13449 +});
13450 +
13451 +})( jQuery );
13452 +
13453 +(function( $, undefined ) {
13454 +
13455 +// number of pages in a slider
13456 +// (how many times can you page up/down to go through the whole range)
13457 +var numPages = 5;
13458 +
13459 +$.widget( "ui.slider", $.ui.mouse, {
13460 + version: "1.10.3",
13461 + widgetEventPrefix: "slide",
13462 +
13463 + options: {
13464 + animate: false,
13465 + distance: 0,
13466 + max: 100,
13467 + min: 0,
13468 + orientation: "horizontal",
13469 + range: false,
13470 + step: 1,
13471 + value: 0,
13472 + values: null,
13473 +
13474 + // callbacks
13475 + change: null,
13476 + slide: null,
13477 + start: null,
13478 + stop: null
13479 + },
13480 +
13481 + _create: function() {
13482 + this._keySliding = false;
13483 + this._mouseSliding = false;
13484 + this._animateOff = true;
13485 + this._handleIndex = null;
13486 + this._detectOrientation();
13487 + this._mouseInit();
13488 +
13489 + this.element
13490 + .addClass( "ui-slider" +
13491 + " ui-slider-" + this.orientation +
13492 + " ui-widget" +
13493 + " ui-widget-content" +
13494 + " ui-corner-all");
13495 +
13496 + this._refresh();
13497 + this._setOption( "disabled", this.options.disabled );
13498 +
13499 + this._animateOff = false;
13500 + },
13501 +
13502 + _refresh: function() {
13503 + this._createRange();
13504 + this._createHandles();
13505 + this._setupEvents();
13506 + this._refreshValue();
13507 + },
13508 +
13509 + _createHandles: function() {
13510 + var i, handleCount,
13511 + options = this.options,
13512 + existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
13513 + handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
13514 + handles = [];
13515 +
13516 + handleCount = ( options.values && options.values.length ) || 1;
13517 +
13518 + if ( existingHandles.length > handleCount ) {
13519 + existingHandles.slice( handleCount ).remove();
13520 + existingHandles = existingHandles.slice( 0, handleCount );
13521 + }
13522 +
13523 + for ( i = existingHandles.length; i < handleCount; i++ ) {
13524 + handles.push( handle );
13525 + }
13526 +
13527 + this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
13528 +
13529 + this.handle = this.handles.eq( 0 );
13530 +
13531 + this.handles.each(function( i ) {
13532 + $( this ).data( "ui-slider-handle-index", i );
13533 + });
13534 + },
13535 +
13536 + _createRange: function() {
13537 + var options = this.options,
13538 + classes = "";
13539 +
13540 + if ( options.range ) {
13541 + if ( options.range === true ) {
13542 + if ( !options.values ) {
13543 + options.values = [ this._valueMin(), this._valueMin() ];
13544 + } else if ( options.values.length && options.values.length !== 2 ) {
13545 + options.values = [ options.values[0], options.values[0] ];
13546 + } else if ( $.isArray( options.values ) ) {
13547 + options.values = options.values.slice(0);
13548 + }
13549 + }
13550 +
13551 + if ( !this.range || !this.range.length ) {
13552 + this.range = $( "<div></div>" )
13553 + .appendTo( this.element );
13554 +
13555 + classes = "ui-slider-range" +
13556 + // note: this isn't the most fittingly semantic framework class for this element,
13557 + // but worked best visually with a variety of themes
13558 + " ui-widget-header ui-corner-all";
13559 + } else {
13560 + this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
13561 + // Handle range switching from true to min/max
13562 + .css({
13563 + "left": "",
13564 + "bottom": ""
13565 + });
13566 + }
13567 +
13568 + this.range.addClass( classes +
13569 + ( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
13570 + } else {
13571 + this.range = $([]);
13572 + }
13573 + },
13574 +
13575 + _setupEvents: function() {
13576 + var elements = this.handles.add( this.range ).filter( "a" );
13577 + this._off( elements );
13578 + this._on( elements, this._handleEvents );
13579 + this._hoverable( elements );
13580 + this._focusable( elements );
13581 + },
13582 +
13583 + _destroy: function() {
13584 + this.handles.remove();
13585 + this.range.remove();
13586 +
13587 + this.element
13588 + .removeClass( "ui-slider" +
13589 + " ui-slider-horizontal" +
13590 + " ui-slider-vertical" +
13591 + " ui-widget" +
13592 + " ui-widget-content" +
13593 + " ui-corner-all" );
13594 +
13595 + this._mouseDestroy();
13596 + },
13597 +
13598 + _mouseCapture: function( event ) {
13599 + var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
13600 + that = this,
13601 + o = this.options;
13602 +
13603 + if ( o.disabled ) {
13604 + return false;
13605 + }
13606 +
13607 + this.elementSize = {
13608 + width: this.element.outerWidth(),
13609 + height: this.element.outerHeight()
13610 + };
13611 + this.elementOffset = this.element.offset();
13612 +
13613 + position = { x: event.pageX, y: event.pageY };
13614 + normValue = this._normValueFromMouse( position );
13615 + distance = this._valueMax() - this._valueMin() + 1;
13616 + this.handles.each(function( i ) {
13617 + var thisDistance = Math.abs( normValue - that.values(i) );
13618 + if (( distance > thisDistance ) ||
13619 + ( distance === thisDistance &&
13620 + (i === that._lastChangedValue || that.values(i) === o.min ))) {
13621 + distance = thisDistance;
13622 + closestHandle = $( this );
13623 + index = i;
13624 + }
13625 + });
13626 +
13627 + allowed = this._start( event, index );
13628 + if ( allowed === false ) {
13629 + return false;
13630 + }
13631 + this._mouseSliding = true;
13632 +
13633 + this._handleIndex = index;
13634 +
13635 + closestHandle
13636 + .addClass( "ui-state-active" )
13637 + .focus();
13638 +
13639 + offset = closestHandle.offset();
13640 + mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
13641 + this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
13642 + left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
13643 + top: event.pageY - offset.top -
13644 + ( closestHandle.height() / 2 ) -
13645 + ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
13646 + ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
13647 + ( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
13648 + };
13649 +
13650 + if ( !this.handles.hasClass( "ui-state-hover" ) ) {
13651 + this._slide( event, index, normValue );
13652 + }
13653 + this._animateOff = true;
13654 + return true;
13655 + },
13656 +
13657 + _mouseStart: function() {
13658 + return true;
13659 + },
13660 +
13661 + _mouseDrag: function( event ) {
13662 + var position = { x: event.pageX, y: event.pageY },
13663 + normValue = this._normValueFromMouse( position );
13664 +
13665 + this._slide( event, this._handleIndex, normValue );
13666 +
13667 + return false;
13668 + },
13669 +
13670 + _mouseStop: function( event ) {
13671 + this.handles.removeClass( "ui-state-active" );
13672 + this._mouseSliding = false;
13673 +
13674 + this._stop( event, this._handleIndex );
13675 + this._change( event, this._handleIndex );
13676 +
13677 + this._handleIndex = null;
13678 + this._clickOffset = null;
13679 + this._animateOff = false;
13680 +
13681 + return false;
13682 + },
13683 +
13684 + _detectOrientation: function() {
13685 + this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
13686 + },
13687 +
13688 + _normValueFromMouse: function( position ) {
13689 + var pixelTotal,
13690 + pixelMouse,
13691 + percentMouse,
13692 + valueTotal,
13693 + valueMouse;
13694 +
13695 + if ( this.orientation === "horizontal" ) {
13696 + pixelTotal = this.elementSize.width;
13697 + pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
13698 + } else {
13699 + pixelTotal = this.elementSize.height;
13700 + pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
13701 + }
13702 +
13703 + percentMouse = ( pixelMouse / pixelTotal );
13704 + if ( percentMouse > 1 ) {
13705 + percentMouse = 1;
13706 + }
13707 + if ( percentMouse < 0 ) {
13708 + percentMouse = 0;
13709 + }
13710 + if ( this.orientation === "vertical" ) {
13711 + percentMouse = 1 - percentMouse;
13712 + }
13713 +
13714 + valueTotal = this._valueMax() - this._valueMin();
13715 + valueMouse = this._valueMin() + percentMouse * valueTotal;
13716 +
13717 + return this._trimAlignValue( valueMouse );
13718 + },
13719 +
13720 + _start: function( event, index ) {
13721 + var uiHash = {
13722 + handle: this.handles[ index ],
13723 + value: this.value()
13724 + };
13725 + if ( this.options.values && this.options.values.length ) {
13726 + uiHash.value = this.values( index );
13727 + uiHash.values = this.values();
13728 + }
13729 + return this._trigger( "start", event, uiHash );
13730 + },
13731 +
13732 + _slide: function( event, index, newVal ) {
13733 + var otherVal,
13734 + newValues,
13735 + allowed;
13736 +
13737 + if ( this.options.values && this.options.values.length ) {
13738 + otherVal = this.values( index ? 0 : 1 );
13739 +
13740 + if ( ( this.options.values.length === 2 && this.options.range === true ) &&
13741 + ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
13742 + ) {
13743 + newVal = otherVal;
13744 + }
13745 +
13746 + if ( newVal !== this.values( index ) ) {
13747 + newValues = this.values();
13748 + newValues[ index ] = newVal;
13749 + // A slide can be canceled by returning false from the slide callback
13750 + allowed = this._trigger( "slide", event, {
13751 + handle: this.handles[ index ],
13752 + value: newVal,
13753 + values: newValues
13754 + } );
13755 + otherVal = this.values( index ? 0 : 1 );
13756 + if ( allowed !== false ) {
13757 + this.values( index, newVal, true );
13758 + }
13759 + }
13760 + } else {
13761 + if ( newVal !== this.value() ) {
13762 + // A slide can be canceled by returning false from the slide callback
13763 + allowed = this._trigger( "slide", event, {
13764 + handle: this.handles[ index ],
13765 + value: newVal
13766 + } );
13767 + if ( allowed !== false ) {
13768 + this.value( newVal );
13769 + }
13770 + }
13771 + }
13772 + },
13773 +
13774 + _stop: function( event, index ) {
13775 + var uiHash = {
13776 + handle: this.handles[ index ],
13777 + value: this.value()
13778 + };
13779 + if ( this.options.values && this.options.values.length ) {
13780 + uiHash.value = this.values( index );
13781 + uiHash.values = this.values();
13782 + }
13783 +
13784 + this._trigger( "stop", event, uiHash );
13785 + },
13786 +
13787 + _change: function( event, index ) {
13788 + if ( !this._keySliding && !this._mouseSliding ) {
13789 + var uiHash = {
13790 + handle: this.handles[ index ],
13791 + value: this.value()
13792 + };
13793 + if ( this.options.values && this.options.values.length ) {
13794 + uiHash.value = this.values( index );
13795 + uiHash.values = this.values();
13796 + }
13797 +
13798 + //store the last changed value index for reference when handles overlap
13799 + this._lastChangedValue = index;
13800 +
13801 + this._trigger( "change", event, uiHash );
13802 + }
13803 + },
13804 +
13805 + value: function( newValue ) {
13806 + if ( arguments.length ) {
13807 + this.options.value = this._trimAlignValue( newValue );
13808 + this._refreshValue();
13809 + this._change( null, 0 );
13810 + return;
13811 + }
13812 +
13813 + return this._value();
13814 + },
13815 +
13816 + values: function( index, newValue ) {
13817 + var vals,
13818 + newValues,
13819 + i;
13820 +
13821 + if ( arguments.length > 1 ) {
13822 + this.options.values[ index ] = this._trimAlignValue( newValue );
13823 + this._refreshValue();
13824 + this._change( null, index );
13825 + return;
13826 + }
13827 +
13828 + if ( arguments.length ) {
13829 + if ( $.isArray( arguments[ 0 ] ) ) {
13830 + vals = this.options.values;
13831 + newValues = arguments[ 0 ];
13832 + for ( i = 0; i < vals.length; i += 1 ) {
13833 + vals[ i ] = this._trimAlignValue( newValues[ i ] );
13834 + this._change( null, i );
13835 + }
13836 + this._refreshValue();
13837 + } else {
13838 + if ( this.options.values && this.options.values.length ) {
13839 + return this._values( index );
13840 + } else {
13841 + return this.value();
13842 + }
13843 + }
13844 + } else {
13845 + return this._values();
13846 + }
13847 + },
13848 +
13849 + _setOption: function( key, value ) {
13850 + var i,
13851 + valsLength = 0;
13852 +
13853 + if ( key === "range" && this.options.range === true ) {
13854 + if ( value === "min" ) {
13855 + this.options.value = this._values( 0 );
13856 + this.options.values = null;
13857 + } else if ( value === "max" ) {
13858 + this.options.value = this._values( this.options.values.length-1 );
13859 + this.options.values = null;
13860 + }
13861 + }
13862 +
13863 + if ( $.isArray( this.options.values ) ) {
13864 + valsLength = this.options.values.length;
13865 + }
13866 +
13867 + $.Widget.prototype._setOption.apply( this, arguments );
13868 +
13869 + switch ( key ) {
13870 + case "orientation":
13871 + this._detectOrientation();
13872 + this.element
13873 + .removeClass( "ui-slider-horizontal ui-slider-vertical" )
13874 + .addClass( "ui-slider-" + this.orientation );
13875 + this._refreshValue();
13876 + break;
13877 + case "value":
13878 + this._animateOff = true;
13879 + this._refreshValue();
13880 + this._change( null, 0 );
13881 + this._animateOff = false;
13882 + break;
13883 + case "values":
13884 + this._animateOff = true;
13885 + this._refreshValue();
13886 + for ( i = 0; i < valsLength; i += 1 ) {
13887 + this._change( null, i );
13888 + }
13889 + this._animateOff = false;
13890 + break;
13891 + case "min":
13892 + case "max":
13893 + this._animateOff = true;
13894 + this._refreshValue();
13895 + this._animateOff = false;
13896 + break;
13897 + case "range":
13898 + this._animateOff = true;
13899 + this._refresh();
13900 + this._animateOff = false;
13901 + break;
13902 + }
13903 + },
13904 +
13905 + //internal value getter
13906 + // _value() returns value trimmed by min and max, aligned by step
13907 + _value: function() {
13908 + var val = this.options.value;
13909 + val = this._trimAlignValue( val );
13910 +
13911 + return val;
13912 + },
13913 +
13914 + //internal values getter
13915 + // _values() returns array of values trimmed by min and max, aligned by step
13916 + // _values( index ) returns single value trimmed by min and max, aligned by step
13917 + _values: function( index ) {
13918 + var val,
13919 + vals,
13920 + i;
13921 +
13922 + if ( arguments.length ) {
13923 + val = this.options.values[ index ];
13924 + val = this._trimAlignValue( val );
13925 +
13926 + return val;
13927 + } else if ( this.options.values && this.options.values.length ) {
13928 + // .slice() creates a copy of the array
13929 + // this copy gets trimmed by min and max and then returned
13930 + vals = this.options.values.slice();
13931 + for ( i = 0; i < vals.length; i+= 1) {
13932 + vals[ i ] = this._trimAlignValue( vals[ i ] );
13933 + }
13934 +
13935 + return vals;
13936 + } else {
13937 + return [];
13938 + }
13939 + },
13940 +
13941 + // returns the step-aligned value that val is closest to, between (inclusive) min and max
13942 + _trimAlignValue: function( val ) {
13943 + if ( val <= this._valueMin() ) {
13944 + return this._valueMin();
13945 + }
13946 + if ( val >= this._valueMax() ) {
13947 + return this._valueMax();
13948 + }
13949 + var step = ( this.options.step > 0 ) ? this.options.step : 1,
13950 + valModStep = (val - this._valueMin()) % step,
13951 + alignValue = val - valModStep;
13952 +
13953 + if ( Math.abs(valModStep) * 2 >= step ) {
13954 + alignValue += ( valModStep > 0 ) ? step : ( -step );
13955 + }
13956 +
13957 + // Since JavaScript has problems with large floats, round
13958 + // the final value to 5 digits after the decimal point (see #4124)
13959 + return parseFloat( alignValue.toFixed(5) );
13960 + },
13961 +
13962 + _valueMin: function() {
13963 + return this.options.min;
13964 + },
13965 +
13966 + _valueMax: function() {
13967 + return this.options.max;
13968 + },
13969 +
13970 + _refreshValue: function() {
13971 + var lastValPercent, valPercent, value, valueMin, valueMax,
13972 + oRange = this.options.range,
13973 + o = this.options,
13974 + that = this,
13975 + animate = ( !this._animateOff ) ? o.animate : false,
13976 + _set = {};
13977 +
13978 + if ( this.options.values && this.options.values.length ) {
13979 + this.handles.each(function( i ) {
13980 + valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
13981 + _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
13982 + $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
13983 + if ( that.options.range === true ) {
13984 + if ( that.orientation === "horizontal" ) {
13985 + if ( i === 0 ) {
13986 + that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
13987 + }
13988 + if ( i === 1 ) {
13989 + that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
13990 + }
13991 + } else {
13992 + if ( i === 0 ) {
13993 + that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
13994 + }
13995 + if ( i === 1 ) {
13996 + that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
13997 + }
13998 + }
13999 + }
14000 + lastValPercent = valPercent;
14001 + });
14002 + } else {
14003 + value = this.value();
14004 + valueMin = this._valueMin();
14005 + valueMax = this._valueMax();
14006 + valPercent = ( valueMax !== valueMin ) ?
14007 + ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
14008 + 0;
14009 + _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
14010 + this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
14011 +
14012 + if ( oRange === "min" && this.orientation === "horizontal" ) {
14013 + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
14014 + }
14015 + if ( oRange === "max" && this.orientation === "horizontal" ) {
14016 + this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
14017 + }
14018 + if ( oRange === "min" && this.orientation === "vertical" ) {
14019 + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
14020 + }
14021 + if ( oRange === "max" && this.orientation === "vertical" ) {
14022 + this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
14023 + }
14024 + }
14025 + },
14026 +
14027 + _handleEvents: {
14028 + keydown: function( event ) {
14029 + /*jshint maxcomplexity:25*/
14030 + var allowed, curVal, newVal, step,
14031 + index = $( event.target ).data( "ui-slider-handle-index" );
14032 +
14033 + switch ( event.keyCode ) {
14034 + case $.ui.keyCode.HOME:
14035 + case $.ui.keyCode.END:
14036 + case $.ui.keyCode.PAGE_UP:
14037 + case $.ui.keyCode.PAGE_DOWN:
14038 + case $.ui.keyCode.UP:
14039 + case $.ui.keyCode.RIGHT:
14040 + case $.ui.keyCode.DOWN:
14041 + case $.ui.keyCode.LEFT:
14042 + event.preventDefault();
14043 + if ( !this._keySliding ) {
14044 + this._keySliding = true;
14045 + $( event.target ).addClass( "ui-state-active" );
14046 + allowed = this._start( event, index );
14047 + if ( allowed === false ) {
14048 + return;
14049 + }
14050 + }
14051 + break;
14052 + }
14053 +
14054 + step = this.options.step;
14055 + if ( this.options.values && this.options.values.length ) {
14056 + curVal = newVal = this.values( index );
14057 + } else {
14058 + curVal = newVal = this.value();
14059 + }
14060 +
14061 + switch ( event.keyCode ) {
14062 + case $.ui.keyCode.HOME:
14063 + newVal = this._valueMin();
14064 + break;
14065 + case $.ui.keyCode.END:
14066 + newVal = this._valueMax();
14067 + break;
14068 + case $.ui.keyCode.PAGE_UP:
14069 + newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
14070 + break;
14071 + case $.ui.keyCode.PAGE_DOWN:
14072 + newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
14073 + break;
14074 + case $.ui.keyCode.UP:
14075 + case $.ui.keyCode.RIGHT:
14076 + if ( curVal === this._valueMax() ) {
14077 + return;
14078 + }
14079 + newVal = this._trimAlignValue( curVal + step );
14080 + break;
14081 + case $.ui.keyCode.DOWN:
14082 + case $.ui.keyCode.LEFT:
14083 + if ( curVal === this._valueMin() ) {
14084 + return;
14085 + }
14086 + newVal = this._trimAlignValue( curVal - step );
14087 + break;
14088 + }
14089 +
14090 + this._slide( event, index, newVal );
14091 + },
14092 + click: function( event ) {
14093 + event.preventDefault();
14094 + },
14095 + keyup: function( event ) {
14096 + var index = $( event.target ).data( "ui-slider-handle-index" );
14097 +
14098 + if ( this._keySliding ) {
14099 + this._keySliding = false;
14100 + this._stop( event, index );
14101 + this._change( event, index );
14102 + $( event.target ).removeClass( "ui-state-active" );
14103 + }
14104 + }
14105 + }
14106 +
14107 +});
14108 +
14109 +}(jQuery));
14110 +
14111 +(function( $ ) {
14112 +
14113 +function modifier( fn ) {
14114 + return function() {
14115 + var previous = this.element.val();
14116 + fn.apply( this, arguments );
14117 + this._refresh();
14118 + if ( previous !== this.element.val() ) {
14119 + this._trigger( "change" );
14120 + }
14121 + };
14122 +}
14123 +
14124 +$.widget( "ui.spinner", {
14125 + version: "1.10.3",
14126 + defaultElement: "<input>",
14127 + widgetEventPrefix: "spin",
14128 + options: {
14129 + culture: null,
14130 + icons: {
14131 + down: "ui-icon-triangle-1-s",
14132 + up: "ui-icon-triangle-1-n"
14133 + },
14134 + incremental: true,
14135 + max: null,
14136 + min: null,
14137 + numberFormat: null,
14138 + page: 10,
14139 + step: 1,
14140 +
14141 + change: null,
14142 + spin: null,
14143 + start: null,
14144 + stop: null
14145 + },
14146 +
14147 + _create: function() {
14148 + // handle string values that need to be parsed
14149 + this._setOption( "max", this.options.max );
14150 + this._setOption( "min", this.options.min );
14151 + this._setOption( "step", this.options.step );
14152 +
14153 + // format the value, but don't constrain
14154 + this._value( this.element.val(), true );
14155 +
14156 + this._draw();
14157 + this._on( this._events );
14158 + this._refresh();
14159 +
14160 + // turning off autocomplete prevents the browser from remembering the
14161 + // value when navigating through history, so we re-enable autocomplete
14162 + // if the page is unloaded before the widget is destroyed. #7790
14163 + this._on( this.window, {
14164 + beforeunload: function() {
14165 + this.element.removeAttr( "autocomplete" );
14166 + }
14167 + });
14168 + },
14169 +
14170 + _getCreateOptions: function() {
14171 + var options = {},
14172 + element = this.element;
14173 +
14174 + $.each( [ "min", "max", "step" ], function( i, option ) {
14175 + var value = element.attr( option );
14176 + if ( value !== undefined && value.length ) {
14177 + options[ option ] = value;
14178 + }
14179 + });
14180 +
14181 + return options;
14182 + },
14183 +
14184 + _events: {
14185 + keydown: function( event ) {
14186 + if ( this._start( event ) && this._keydown( event ) ) {
14187 + event.preventDefault();
14188 + }
14189 + },
14190 + keyup: "_stop",
14191 + focus: function() {
14192 + this.previous = this.element.val();
14193 + },
14194 + blur: function( event ) {
14195 + if ( this.cancelBlur ) {
14196 + delete this.cancelBlur;
14197 + return;
14198 + }
14199 +
14200 + this._stop();
14201 + this._refresh();
14202 + if ( this.previous !== this.element.val() ) {
14203 + this._trigger( "change", event );
14204 + }
14205 + },
14206 + mousewheel: function( event, delta ) {
14207 + if ( !delta ) {
14208 + return;
14209 + }
14210 + if ( !this.spinning && !this._start( event ) ) {
14211 + return false;
14212 + }
14213 +
14214 + this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
14215 + clearTimeout( this.mousewheelTimer );
14216 + this.mousewheelTimer = this._delay(function() {
14217 + if ( this.spinning ) {
14218 + this._stop( event );
14219 + }
14220 + }, 100 );
14221 + event.preventDefault();
14222 + },
14223 + "mousedown .ui-spinner-button": function( event ) {
14224 + var previous;
14225 +
14226 + // We never want the buttons to have focus; whenever the user is
14227 + // interacting with the spinner, the focus should be on the input.
14228 + // If the input is focused then this.previous is properly set from
14229 + // when the input first received focus. If the input is not focused
14230 + // then we need to set this.previous based on the value before spinning.
14231 + previous = this.element[0] === this.document[0].activeElement ?
14232 + this.previous : this.element.val();
14233 + function checkFocus() {
14234 + var isActive = this.element[0] === this.document[0].activeElement;
14235 + if ( !isActive ) {
14236 + this.element.focus();
14237 + this.previous = previous;
14238 + // support: IE
14239 + // IE sets focus asynchronously, so we need to check if focus
14240 + // moved off of the input because the user clicked on the button.
14241 + this._delay(function() {
14242 + this.previous = previous;
14243 + });
14244 + }
14245 + }
14246 +
14247 + // ensure focus is on (or stays on) the text field
14248 + event.preventDefault();
14249 + checkFocus.call( this );
14250 +
14251 + // support: IE
14252 + // IE doesn't prevent moving focus even with event.preventDefault()
14253 + // so we set a flag to know when we should ignore the blur event
14254 + // and check (again) if focus moved off of the input.
14255 + this.cancelBlur = true;
14256 + this._delay(function() {
14257 + delete this.cancelBlur;
14258 + checkFocus.call( this );
14259 + });
14260 +
14261 + if ( this._start( event ) === false ) {
14262 + return;
14263 + }
14264 +
14265 + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
14266 + },
14267 + "mouseup .ui-spinner-button": "_stop",
14268 + "mouseenter .ui-spinner-button": function( event ) {
14269 + // button will add ui-state-active if mouse was down while mouseleave and kept down
14270 + if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
14271 + return;
14272 + }
14273 +
14274 + if ( this._start( event ) === false ) {
14275 + return false;
14276 + }
14277 + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
14278 + },
14279 + // TODO: do we really want to consider this a stop?
14280 + // shouldn't we just stop the repeater and wait until mouseup before
14281 + // we trigger the stop event?
14282 + "mouseleave .ui-spinner-button": "_stop"
14283 + },
14284 +
14285 + _draw: function() {
14286 + var uiSpinner = this.uiSpinner = this.element
14287 + .addClass( "ui-spinner-input" )
14288 + .attr( "autocomplete", "off" )
14289 + .wrap( this._uiSpinnerHtml() )
14290 + .parent()
14291 + // add buttons
14292 + .append( this._buttonHtml() );
14293 +
14294 + this.element.attr( "role", "spinbutton" );
14295 +
14296 + // button bindings
14297 + this.buttons = uiSpinner.find( ".ui-spinner-button" )
14298 + .attr( "tabIndex", -1 )
14299 + .button()
14300 + .removeClass( "ui-corner-all" );
14301 +
14302 + // IE 6 doesn't understand height: 50% for the buttons
14303 + // unless the wrapper has an explicit height
14304 + if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
14305 + uiSpinner.height() > 0 ) {
14306 + uiSpinner.height( uiSpinner.height() );
14307 + }
14308 +
14309 + // disable spinner if element was already disabled
14310 + if ( this.options.disabled ) {
14311 + this.disable();
14312 + }
14313 + },
14314 +
14315 + _keydown: function( event ) {
14316 + var options = this.options,
14317 + keyCode = $.ui.keyCode;
14318 +
14319 + switch ( event.keyCode ) {
14320 + case keyCode.UP:
14321 + this._repeat( null, 1, event );
14322 + return true;
14323 + case keyCode.DOWN:
14324 + this._repeat( null, -1, event );
14325 + return true;
14326 + case keyCode.PAGE_UP:
14327 + this._repeat( null, options.page, event );
14328 + return true;
14329 + case keyCode.PAGE_DOWN:
14330 + this._repeat( null, -options.page, event );
14331 + return true;
14332 + }
14333 +
14334 + return false;
14335 + },
14336 +
14337 + _uiSpinnerHtml: function() {
14338 + return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
14339 + },
14340 +
14341 + _buttonHtml: function() {
14342 + return "" +
14343 + "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
14344 + "<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
14345 + "</a>" +
14346 + "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
14347 + "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
14348 + "</a>";
14349 + },
14350 +
14351 + _start: function( event ) {
14352 + if ( !this.spinning && this._trigger( "start", event ) === false ) {
14353 + return false;
14354 + }
14355 +
14356 + if ( !this.counter ) {
14357 + this.counter = 1;
14358 + }
14359 + this.spinning = true;
14360 + return true;
14361 + },
14362 +
14363 + _repeat: function( i, steps, event ) {
14364 + i = i || 500;
14365 +
14366 + clearTimeout( this.timer );
14367 + this.timer = this._delay(function() {
14368 + this._repeat( 40, steps, event );
14369 + }, i );
14370 +
14371 + this._spin( steps * this.options.step, event );
14372 + },
14373 +
14374 + _spin: function( step, event ) {
14375 + var value = this.value() || 0;
14376 +
14377 + if ( !this.counter ) {
14378 + this.counter = 1;
14379 + }
14380 +
14381 + value = this._adjustValue( value + step * this._increment( this.counter ) );
14382 +
14383 + if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
14384 + this._value( value );
14385 + this.counter++;
14386 + }
14387 + },
14388 +
14389 + _increment: function( i ) {
14390 + var incremental = this.options.incremental;
14391 +
14392 + if ( incremental ) {
14393 + return $.isFunction( incremental ) ?
14394 + incremental( i ) :
14395 + Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );
14396 + }
14397 +
14398 + return 1;
14399 + },
14400 +
14401 + _precision: function() {
14402 + var precision = this._precisionOf( this.options.step );
14403 + if ( this.options.min !== null ) {
14404 + precision = Math.max( precision, this._precisionOf( this.options.min ) );
14405 + }
14406 + return precision;
14407 + },
14408 +
14409 + _precisionOf: function( num ) {
14410 + var str = num.toString(),
14411 + decimal = str.indexOf( "." );
14412 + return decimal === -1 ? 0 : str.length - decimal - 1;
14413 + },
14414 +
14415 + _adjustValue: function( value ) {
14416 + var base, aboveMin,
14417 + options = this.options;
14418 +
14419 + // make sure we're at a valid step
14420 + // - find out where we are relative to the base (min or 0)
14421 + base = options.min !== null ? options.min : 0;
14422 + aboveMin = value - base;
14423 + // - round to the nearest step
14424 + aboveMin = Math.round(aboveMin / options.step) * options.step;
14425 + // - rounding is based on 0, so adjust back to our base
14426 + value = base + aboveMin;
14427 +
14428 + // fix precision from bad JS floating point math
14429 + value = parseFloat( value.toFixed( this._precision() ) );
14430 +
14431 + // clamp the value
14432 + if ( options.max !== null && value > options.max) {
14433 + return options.max;
14434 + }
14435 + if ( options.min !== null && value < options.min ) {
14436 + return options.min;
14437 + }
14438 +
14439 + return value;
14440 + },
14441 +
14442 + _stop: function( event ) {
14443 + if ( !this.spinning ) {
14444 + return;
14445 + }
14446 +
14447 + clearTimeout( this.timer );
14448 + clearTimeout( this.mousewheelTimer );
14449 + this.counter = 0;
14450 + this.spinning = false;
14451 + this._trigger( "stop", event );
14452 + },
14453 +
14454 + _setOption: function( key, value ) {
14455 + if ( key === "culture" || key === "numberFormat" ) {
14456 + var prevValue = this._parse( this.element.val() );
14457 + this.options[ key ] = value;
14458 + this.element.val( this._format( prevValue ) );
14459 + return;
14460 + }
14461 +
14462 + if ( key === "max" || key === "min" || key === "step" ) {
14463 + if ( typeof value === "string" ) {
14464 + value = this._parse( value );
14465 + }
14466 + }
14467 + if ( key === "icons" ) {
14468 + this.buttons.first().find( ".ui-icon" )
14469 + .removeClass( this.options.icons.up )
14470 + .addClass( value.up );
14471 + this.buttons.last().find( ".ui-icon" )
14472 + .removeClass( this.options.icons.down )
14473 + .addClass( value.down );
14474 + }
14475 +
14476 + this._super( key, value );
14477 +
14478 + if ( key === "disabled" ) {
14479 + if ( value ) {
14480 + this.element.prop( "disabled", true );
14481 + this.buttons.button( "disable" );
14482 + } else {
14483 + this.element.prop( "disabled", false );
14484 + this.buttons.button( "enable" );
14485 + }
14486 + }
14487 + },
14488 +
14489 + _setOptions: modifier(function( options ) {
14490 + this._super( options );
14491 + this._value( this.element.val() );
14492 + }),
14493 +
14494 + _parse: function( val ) {
14495 + if ( typeof val === "string" && val !== "" ) {
14496 + val = window.Globalize && this.options.numberFormat ?
14497 + Globalize.parseFloat( val, 10, this.options.culture ) : +val;
14498 + }
14499 + return val === "" || isNaN( val ) ? null : val;
14500 + },
14501 +
14502 + _format: function( value ) {
14503 + if ( value === "" ) {
14504 + return "";
14505 + }
14506 + return window.Globalize && this.options.numberFormat ?
14507 + Globalize.format( value, this.options.numberFormat, this.options.culture ) :
14508 + value;
14509 + },
14510 +
14511 + _refresh: function() {
14512 + this.element.attr({
14513 + "aria-valuemin": this.options.min,
14514 + "aria-valuemax": this.options.max,
14515 + // TODO: what should we do with values that can't be parsed?
14516 + "aria-valuenow": this._parse( this.element.val() )
14517 + });
14518 + },
14519 +
14520 + // update the value without triggering change
14521 + _value: function( value, allowAny ) {
14522 + var parsed;
14523 + if ( value !== "" ) {
14524 + parsed = this._parse( value );
14525 + if ( parsed !== null ) {
14526 + if ( !allowAny ) {
14527 + parsed = this._adjustValue( parsed );
14528 + }
14529 + value = this._format( parsed );
14530 + }
14531 + }
14532 + this.element.val( value );
14533 + this._refresh();
14534 + },
14535 +
14536 + _destroy: function() {
14537 + this.element
14538 + .removeClass( "ui-spinner-input" )
14539 + .prop( "disabled", false )
14540 + .removeAttr( "autocomplete" )
14541 + .removeAttr( "role" )
14542 + .removeAttr( "aria-valuemin" )
14543 + .removeAttr( "aria-valuemax" )
14544 + .removeAttr( "aria-valuenow" );
14545 + this.uiSpinner.replaceWith( this.element );
14546 + },
14547 +
14548 + stepUp: modifier(function( steps ) {
14549 + this._stepUp( steps );
14550 + }),
14551 + _stepUp: function( steps ) {
14552 + if ( this._start() ) {
14553 + this._spin( (steps || 1) * this.options.step );
14554 + this._stop();
14555 + }
14556 + },
14557 +
14558 + stepDown: modifier(function( steps ) {
14559 + this._stepDown( steps );
14560 + }),
14561 + _stepDown: function( steps ) {
14562 + if ( this._start() ) {
14563 + this._spin( (steps || 1) * -this.options.step );
14564 + this._stop();
14565 + }
14566 + },
14567 +
14568 + pageUp: modifier(function( pages ) {
14569 + this._stepUp( (pages || 1) * this.options.page );
14570 + }),
14571 +
14572 + pageDown: modifier(function( pages ) {
14573 + this._stepDown( (pages || 1) * this.options.page );
14574 + }),
14575 +
14576 + value: function( newVal ) {
14577 + if ( !arguments.length ) {
14578 + return this._parse( this.element.val() );
14579 + }
14580 + modifier( this._value ).call( this, newVal );
14581 + },
14582 +
14583 + widget: function() {
14584 + return this.uiSpinner;
14585 + }
14586 +});
14587 +
14588 +}( jQuery ) );
14589 +
14590 +(function( $, undefined ) {
14591 +
14592 +var tabId = 0,
14593 + rhash = /#.*$/;
14594 +
14595 +function getNextTabId() {
14596 + return ++tabId;
14597 +}
14598 +
14599 +function isLocal( anchor ) {
14600 + return anchor.hash.length > 1 &&
14601 + decodeURIComponent( anchor.href.replace( rhash, "" ) ) ===
14602 + decodeURIComponent( location.href.replace( rhash, "" ) );
14603 +}
14604 +
14605 +$.widget( "ui.tabs", {
14606 + version: "1.10.3",
14607 + delay: 300,
14608 + options: {
14609 + active: null,
14610 + collapsible: false,
14611 + event: "click",
14612 + heightStyle: "content",
14613 + hide: null,
14614 + show: null,
14615 +
14616 + // callbacks
14617 + activate: null,
14618 + beforeActivate: null,
14619 + beforeLoad: null,
14620 + load: null
14621 + },
14622 +
14623 + _create: function() {
14624 + var that = this,
14625 + options = this.options;
14626 +
14627 + this.running = false;
14628 +
14629 + this.element
14630 + .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
14631 + .toggleClass( "ui-tabs-collapsible", options.collapsible )
14632 + // Prevent users from focusing disabled tabs via click
14633 + .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) {
14634 + if ( $( this ).is( ".ui-state-disabled" ) ) {
14635 + event.preventDefault();
14636 + }
14637 + })
14638 + // support: IE <9
14639 + // Preventing the default action in mousedown doesn't prevent IE
14640 + // from focusing the element, so if the anchor gets focused, blur.
14641 + // We don't have to worry about focusing the previously focused
14642 + // element since clicking on a non-focusable element should focus
14643 + // the body anyway.
14644 + .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
14645 + if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
14646 + this.blur();
14647 + }
14648 + });
14649 +
14650 + this._processTabs();
14651 + options.active = this._initialActive();
14652 +
14653 + // Take disabling tabs via class attribute from HTML
14654 + // into account and update option properly.
14655 + if ( $.isArray( options.disabled ) ) {
14656 + options.disabled = $.unique( options.disabled.concat(
14657 + $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
14658 + return that.tabs.index( li );
14659 + })
14660 + ) ).sort();
14661 + }
14662 +
14663 + // check for length avoids error when initializing empty list
14664 + if ( this.options.active !== false && this.anchors.length ) {
14665 + this.active = this._findActive( options.active );
14666 + } else {
14667 + this.active = $();
14668 + }
14669 +
14670 + this._refresh();
14671 +
14672 + if ( this.active.length ) {
14673 + this.load( options.active );
14674 + }
14675 + },
14676 +
14677 + _initialActive: function() {
14678 + var active = this.options.active,
14679 + collapsible = this.options.collapsible,
14680 + locationHash = location.hash.substring( 1 );
14681 +
14682 + if ( active === null ) {
14683 + // check the fragment identifier in the URL
14684 + if ( locationHash ) {
14685 + this.tabs.each(function( i, tab ) {
14686 + if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
14687 + active = i;
14688 + return false;
14689 + }
14690 + });
14691 + }
14692 +
14693 + // check for a tab marked active via a class
14694 + if ( active === null ) {
14695 + active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
14696 + }
14697 +
14698 + // no active tab, set to false
14699 + if ( active === null || active === -1 ) {
14700 + active = this.tabs.length ? 0 : false;
14701 + }
14702 + }
14703 +
14704 + // handle numbers: negative, out of range
14705 + if ( active !== false ) {
14706 + active = this.tabs.index( this.tabs.eq( active ) );
14707 + if ( active === -1 ) {
14708 + active = collapsible ? false : 0;
14709 + }
14710 + }
14711 +
14712 + // don't allow collapsible: false and active: false
14713 + if ( !collapsible && active === false && this.anchors.length ) {
14714 + active = 0;
14715 + }
14716 +
14717 + return active;
14718 + },
14719 +
14720 + _getCreateEventData: function() {
14721 + return {
14722 + tab: this.active,
14723 + panel: !this.active.length ? $() : this._getPanelForTab( this.active )
14724 + };
14725 + },
14726 +
14727 + _tabKeydown: function( event ) {
14728 + /*jshint maxcomplexity:15*/
14729 + var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
14730 + selectedIndex = this.tabs.index( focusedTab ),
14731 + goingForward = true;
14732 +
14733 + if ( this._handlePageNav( event ) ) {
14734 + return;
14735 + }
14736 +
14737 + switch ( event.keyCode ) {
14738 + case $.ui.keyCode.RIGHT:
14739 + case $.ui.keyCode.DOWN:
14740 + selectedIndex++;
14741 + break;
14742 + case $.ui.keyCode.UP:
14743 + case $.ui.keyCode.LEFT:
14744 + goingForward = false;
14745 + selectedIndex--;
14746 + break;
14747 + case $.ui.keyCode.END:
14748 + selectedIndex = this.anchors.length - 1;
14749 + break;
14750 + case $.ui.keyCode.HOME:
14751 + selectedIndex = 0;
14752 + break;
14753 + case $.ui.keyCode.SPACE:
14754 + // Activate only, no collapsing
14755 + event.preventDefault();
14756 + clearTimeout( this.activating );
14757 + this._activate( selectedIndex );
14758 + return;
14759 + case $.ui.keyCode.ENTER:
14760 + // Toggle (cancel delayed activation, allow collapsing)
14761 + event.preventDefault();
14762 + clearTimeout( this.activating );
14763 + // Determine if we should collapse or activate
14764 + this._activate( selectedIndex === this.options.active ? false : selectedIndex );
14765 + return;
14766 + default:
14767 + return;
14768 + }
14769 +
14770 + // Focus the appropriate tab, based on which key was pressed
14771 + event.preventDefault();
14772 + clearTimeout( this.activating );
14773 + selectedIndex = this._focusNextTab( selectedIndex, goingForward );
14774 +
14775 + // Navigating with control key will prevent automatic activation
14776 + if ( !event.ctrlKey ) {
14777 + // Update aria-selected immediately so that AT think the tab is already selected.
14778 + // Otherwise AT may confuse the user by stating that they need to activate the tab,
14779 + // but the tab will already be activated by the time the announcement finishes.
14780 + focusedTab.attr( "aria-selected", "false" );
14781 + this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
14782 +
14783 + this.activating = this._delay(function() {
14784 + this.option( "active", selectedIndex );
14785 + }, this.delay );
14786 + }
14787 + },
14788 +
14789 + _panelKeydown: function( event ) {
14790 + if ( this._handlePageNav( event ) ) {
14791 + return;
14792 + }
14793 +
14794 + // Ctrl+up moves focus to the current tab
14795 + if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
14796 + event.preventDefault();
14797 + this.active.focus();
14798 + }
14799 + },
14800 +
14801 + // Alt+page up/down moves focus to the previous/next tab (and activates)
14802 + _handlePageNav: function( event ) {
14803 + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
14804 + this._activate( this._focusNextTab( this.options.active - 1, false ) );
14805 + return true;
14806 + }
14807 + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
14808 + this._activate( this._focusNextTab( this.options.active + 1, true ) );
14809 + return true;
14810 + }
14811 + },
14812 +
14813 + _findNextTab: function( index, goingForward ) {
14814 + var lastTabIndex = this.tabs.length - 1;
14815 +
14816 + function constrain() {
14817 + if ( index > lastTabIndex ) {
14818 + index = 0;
14819 + }
14820 + if ( index < 0 ) {
14821 + index = lastTabIndex;
14822 + }
14823 + return index;
14824 + }
14825 +
14826 + while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
14827 + index = goingForward ? index + 1 : index - 1;
14828 + }
14829 +
14830 + return index;
14831 + },
14832 +
14833 + _focusNextTab: function( index, goingForward ) {
14834 + index = this._findNextTab( index, goingForward );
14835 + this.tabs.eq( index ).focus();
14836 + return index;
14837 + },
14838 +
14839 + _setOption: function( key, value ) {
14840 + if ( key === "active" ) {
14841 + // _activate() will handle invalid values and update this.options
14842 + this._activate( value );
14843 + return;
14844 + }
14845 +
14846 + if ( key === "disabled" ) {
14847 + // don't use the widget factory's disabled handling
14848 + this._setupDisabled( value );
14849 + return;
14850 + }
14851 +
14852 + this._super( key, value);
14853 +
14854 + if ( key === "collapsible" ) {
14855 + this.element.toggleClass( "ui-tabs-collapsible", value );
14856 + // Setting collapsible: false while collapsed; open first panel
14857 + if ( !value && this.options.active === false ) {
14858 + this._activate( 0 );
14859 + }
14860 + }
14861 +
14862 + if ( key === "event" ) {
14863 + this._setupEvents( value );
14864 + }
14865 +
14866 + if ( key === "heightStyle" ) {
14867 + this._setupHeightStyle( value );
14868 + }
14869 + },
14870 +
14871 + _tabId: function( tab ) {
14872 + return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId();
14873 + },
14874 +
14875 + _sanitizeSelector: function( hash ) {
14876 + return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
14877 + },
14878 +
14879 + refresh: function() {
14880 + var options = this.options,
14881 + lis = this.tablist.children( ":has(a[href])" );
14882 +
14883 + // get disabled tabs from class attribute from HTML
14884 + // this will get converted to a boolean if needed in _refresh()
14885 + options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
14886 + return lis.index( tab );
14887 + });
14888 +
14889 + this._processTabs();
14890 +
14891 + // was collapsed or no tabs
14892 + if ( options.active === false || !this.anchors.length ) {
14893 + options.active = false;
14894 + this.active = $();
14895 + // was active, but active tab is gone
14896 + } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
14897 + // all remaining tabs are disabled
14898 + if ( this.tabs.length === options.disabled.length ) {
14899 + options.active = false;
14900 + this.active = $();
14901 + // activate previous tab
14902 + } else {
14903 + this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
14904 + }
14905 + // was active, active tab still exists
14906 + } else {
14907 + // make sure active index is correct
14908 + options.active = this.tabs.index( this.active );
14909 + }
14910 +
14911 + this._refresh();
14912 + },
14913 +
14914 + _refresh: function() {
14915 + this._setupDisabled( this.options.disabled );
14916 + this._setupEvents( this.options.event );
14917 + this._setupHeightStyle( this.options.heightStyle );
14918 +
14919 + this.tabs.not( this.active ).attr({
14920 + "aria-selected": "false",
14921 + tabIndex: -1
14922 + });
14923 + this.panels.not( this._getPanelForTab( this.active ) )
14924 + .hide()
14925 + .attr({
14926 + "aria-expanded": "false",
14927 + "aria-hidden": "true"
14928 + });
14929 +
14930 + // Make sure one tab is in the tab order
14931 + if ( !this.active.length ) {
14932 + this.tabs.eq( 0 ).attr( "tabIndex", 0 );
14933 + } else {
14934 + this.active
14935 + .addClass( "ui-tabs-active ui-state-active" )
14936 + .attr({
14937 + "aria-selected": "true",
14938 + tabIndex: 0
14939 + });
14940 + this._getPanelForTab( this.active )
14941 + .show()
14942 + .attr({
14943 + "aria-expanded": "true",
14944 + "aria-hidden": "false"
14945 + });
14946 + }
14947 + },
14948 +
14949 + _processTabs: function() {
14950 + var that = this;
14951 +
14952 + this.tablist = this._getList()
14953 + .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
14954 + .attr( "role", "tablist" );
14955 +
14956 + this.tabs = this.tablist.find( "> li:has(a[href])" )
14957 + .addClass( "ui-state-default ui-corner-top" )
14958 + .attr({
14959 + role: "tab",
14960 + tabIndex: -1
14961 + });
14962 +
14963 + this.anchors = this.tabs.map(function() {
14964 + return $( "a", this )[ 0 ];
14965 + })
14966 + .addClass( "ui-tabs-anchor" )
14967 + .attr({
14968 + role: "presentation",
14969 + tabIndex: -1
14970 + });
14971 +
14972 + this.panels = $();
14973 +
14974 + this.anchors.each(function( i, anchor ) {
14975 + var selector, panel, panelId,
14976 + anchorId = $( anchor ).uniqueId().attr( "id" ),
14977 + tab = $( anchor ).closest( "li" ),
14978 + originalAriaControls = tab.attr( "aria-controls" );
14979 +
14980 + // inline tab
14981 + if ( isLocal( anchor ) ) {
14982 + selector = anchor.hash;
14983 + panel = that.element.find( that._sanitizeSelector( selector ) );
14984 + // remote tab
14985 + } else {
14986 + panelId = that._tabId( tab );
14987 + selector = "#" + panelId;
14988 + panel = that.element.find( selector );
14989 + if ( !panel.length ) {
14990 + panel = that._createPanel( panelId );
14991 + panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
14992 + }
14993 + panel.attr( "aria-live", "polite" );
14994 + }
14995 +
14996 + if ( panel.length) {
14997 + that.panels = that.panels.add( panel );
14998 + }
14999 + if ( originalAriaControls ) {
15000 + tab.data( "ui-tabs-aria-controls", originalAriaControls );
15001 + }
15002 + tab.attr({
15003 + "aria-controls": selector.substring( 1 ),
15004 + "aria-labelledby": anchorId
15005 + });
15006 + panel.attr( "aria-labelledby", anchorId );
15007 + });
15008 +
15009 + this.panels
15010 + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
15011 + .attr( "role", "tabpanel" );
15012 + },
15013 +
15014 + // allow overriding how to find the list for rare usage scenarios (#7715)
15015 + _getList: function() {
15016 + return this.element.find( "ol,ul" ).eq( 0 );
15017 + },
15018 +
15019 + _createPanel: function( id ) {
15020 + return $( "<div>" )
15021 + .attr( "id", id )
15022 + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
15023 + .data( "ui-tabs-destroy", true );
15024 + },
15025 +
15026 + _setupDisabled: function( disabled ) {
15027 + if ( $.isArray( disabled ) ) {
15028 + if ( !disabled.length ) {
15029 + disabled = false;
15030 + } else if ( disabled.length === this.anchors.length ) {
15031 + disabled = true;
15032 + }
15033 + }
15034 +
15035 + // disable tabs
15036 + for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
15037 + if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
15038 + $( li )
15039 + .addClass( "ui-state-disabled" )
15040 + .attr( "aria-disabled", "true" );
15041 + } else {
15042 + $( li )
15043 + .removeClass( "ui-state-disabled" )
15044 + .removeAttr( "aria-disabled" );
15045 + }
15046 + }
15047 +
15048 + this.options.disabled = disabled;
15049 + },
15050 +
15051 + _setupEvents: function( event ) {
15052 + var events = {
15053 + click: function( event ) {
15054 + event.preventDefault();
15055 + }
15056 + };
15057 + if ( event ) {
15058 + $.each( event.split(" "), function( index, eventName ) {
15059 + events[ eventName ] = "_eventHandler";
15060 + });
15061 + }
15062 +
15063 + this._off( this.anchors.add( this.tabs ).add( this.panels ) );
15064 + this._on( this.anchors, events );
15065 + this._on( this.tabs, { keydown: "_tabKeydown" } );
15066 + this._on( this.panels, { keydown: "_panelKeydown" } );
15067 +
15068 + this._focusable( this.tabs );
15069 + this._hoverable( this.tabs );
15070 + },
15071 +
15072 + _setupHeightStyle: function( heightStyle ) {
15073 + var maxHeight,
15074 + parent = this.element.parent();
15075 +
15076 + if ( heightStyle === "fill" ) {
15077 + maxHeight = parent.height();
15078 + maxHeight -= this.element.outerHeight() - this.element.height();
15079 +
15080 + this.element.siblings( ":visible" ).each(function() {
15081 + var elem = $( this ),
15082 + position = elem.css( "position" );
15083 +
15084 + if ( position === "absolute" || position === "fixed" ) {
15085 + return;
15086 + }
15087 + maxHeight -= elem.outerHeight( true );
15088 + });
15089 +
15090 + this.element.children().not( this.panels ).each(function() {
15091 + maxHeight -= $( this ).outerHeight( true );
15092 + });
15093 +
15094 + this.panels.each(function() {
15095 + $( this ).height( Math.max( 0, maxHeight -
15096 + $( this ).innerHeight() + $( this ).height() ) );
15097 + })
15098 + .css( "overflow", "auto" );
15099 + } else if ( heightStyle === "auto" ) {
15100 + maxHeight = 0;
15101 + this.panels.each(function() {
15102 + maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
15103 + }).height( maxHeight );
15104 + }
15105 + },
15106 +
15107 + _eventHandler: function( event ) {
15108 + var options = this.options,
15109 + active = this.active,
15110 + anchor = $( event.currentTarget ),
15111 + tab = anchor.closest( "li" ),
15112 + clickedIsActive = tab[ 0 ] === active[ 0 ],
15113 + collapsing = clickedIsActive && options.collapsible,
15114 + toShow = collapsing ? $() : this._getPanelForTab( tab ),
15115 + toHide = !active.length ? $() : this._getPanelForTab( active ),
15116 + eventData = {
15117 + oldTab: active,
15118 + oldPanel: toHide,
15119 + newTab: collapsing ? $() : tab,
15120 + newPanel: toShow
15121 + };
15122 +
15123 + event.preventDefault();
15124 +
15125 + if ( tab.hasClass( "ui-state-disabled" ) ||
15126 + // tab is already loading
15127 + tab.hasClass( "ui-tabs-loading" ) ||
15128 + // can't switch durning an animation
15129 + this.running ||
15130 + // click on active header, but not collapsible
15131 + ( clickedIsActive && !options.collapsible ) ||
15132 + // allow canceling activation
15133 + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
15134 + return;
15135 + }
15136 +
15137 + options.active = collapsing ? false : this.tabs.index( tab );
15138 +
15139 + this.active = clickedIsActive ? $() : tab;
15140 + if ( this.xhr ) {
15141 + this.xhr.abort();
15142 + }
15143 +
15144 + if ( !toHide.length && !toShow.length ) {
15145 + $.error( "jQuery UI Tabs: Mismatching fragment identifier." );
15146 + }
15147 +
15148 + if ( toShow.length ) {
15149 + this.load( this.tabs.index( tab ), event );
15150 + }
15151 + this._toggle( event, eventData );
15152 + },
15153 +
15154 + // handles show/hide for selecting tabs
15155 + _toggle: function( event, eventData ) {
15156 + var that = this,
15157 + toShow = eventData.newPanel,
15158 + toHide = eventData.oldPanel;
15159 +
15160 + this.running = true;
15161 +
15162 + function complete() {
15163 + that.running = false;
15164 + that._trigger( "activate", event, eventData );
15165 + }
15166 +
15167 + function show() {
15168 + eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
15169 +
15170 + if ( toShow.length && that.options.show ) {
15171 + that._show( toShow, that.options.show, complete );
15172 + } else {
15173 + toShow.show();
15174 + complete();
15175 + }
15176 + }
15177 +
15178 + // start out by hiding, then showing, then completing
15179 + if ( toHide.length && this.options.hide ) {
15180 + this._hide( toHide, this.options.hide, function() {
15181 + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
15182 + show();
15183 + });
15184 + } else {
15185 + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
15186 + toHide.hide();
15187 + show();
15188 + }
15189 +
15190 + toHide.attr({
15191 + "aria-expanded": "false",
15192 + "aria-hidden": "true"
15193 + });
15194 + eventData.oldTab.attr( "aria-selected", "false" );
15195 + // If we're switching tabs, remove the old tab from the tab order.
15196 + // If we're opening from collapsed state, remove the previous tab from the tab order.
15197 + // If we're collapsing, then keep the collapsing tab in the tab order.
15198 + if ( toShow.length && toHide.length ) {
15199 + eventData.oldTab.attr( "tabIndex", -1 );
15200 + } else if ( toShow.length ) {
15201 + this.tabs.filter(function() {
15202 + return $( this ).attr( "tabIndex" ) === 0;
15203 + })
15204 + .attr( "tabIndex", -1 );
15205 + }
15206 +
15207 + toShow.attr({
15208 + "aria-expanded": "true",
15209 + "aria-hidden": "false"
15210 + });
15211 + eventData.newTab.attr({
15212 + "aria-selected": "true",
15213 + tabIndex: 0
15214 + });
15215 + },
15216 +
15217 + _activate: function( index ) {
15218 + var anchor,
15219 + active = this._findActive( index );
15220 +
15221 + // trying to activate the already active panel
15222 + if ( active[ 0 ] === this.active[ 0 ] ) {
15223 + return;
15224 + }
15225 +
15226 + // trying to collapse, simulate a click on the current active header
15227 + if ( !active.length ) {
15228 + active = this.active;
15229 + }
15230 +
15231 + anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
15232 + this._eventHandler({
15233 + target: anchor,
15234 + currentTarget: anchor,
15235 + preventDefault: $.noop
15236 + });
15237 + },
15238 +
15239 + _findActive: function( index ) {
15240 + return index === false ? $() : this.tabs.eq( index );
15241 + },
15242 +
15243 + _getIndex: function( index ) {
15244 + // meta-function to give users option to provide a href string instead of a numerical index.
15245 + if ( typeof index === "string" ) {
15246 + index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
15247 + }
15248 +
15249 + return index;
15250 + },
15251 +
15252 + _destroy: function() {
15253 + if ( this.xhr ) {
15254 + this.xhr.abort();
15255 + }
15256 +
15257 + this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
15258 +
15259 + this.tablist
15260 + .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
15261 + .removeAttr( "role" );
15262 +
15263 + this.anchors
15264 + .removeClass( "ui-tabs-anchor" )
15265 + .removeAttr( "role" )
15266 + .removeAttr( "tabIndex" )
15267 + .removeUniqueId();
15268 +
15269 + this.tabs.add( this.panels ).each(function() {
15270 + if ( $.data( this, "ui-tabs-destroy" ) ) {
15271 + $( this ).remove();
15272 + } else {
15273 + $( this )
15274 + .removeClass( "ui-state-default ui-state-active ui-state-disabled " +
15275 + "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
15276 + .removeAttr( "tabIndex" )
15277 + .removeAttr( "aria-live" )
15278 + .removeAttr( "aria-busy" )
15279 + .removeAttr( "aria-selected" )
15280 + .removeAttr( "aria-labelledby" )
15281 + .removeAttr( "aria-hidden" )
15282 + .removeAttr( "aria-expanded" )
15283 + .removeAttr( "role" );
15284 + }
15285 + });
15286 +
15287 + this.tabs.each(function() {
15288 + var li = $( this ),
15289 + prev = li.data( "ui-tabs-aria-controls" );
15290 + if ( prev ) {
15291 + li
15292 + .attr( "aria-controls", prev )
15293 + .removeData( "ui-tabs-aria-controls" );
15294 + } else {
15295 + li.removeAttr( "aria-controls" );
15296 + }
15297 + });
15298 +
15299 + this.panels.show();
15300 +
15301 + if ( this.options.heightStyle !== "content" ) {
15302 + this.panels.css( "height", "" );
15303 + }
15304 + },
15305 +
15306 + enable: function( index ) {
15307 + var disabled = this.options.disabled;
15308 + if ( disabled === false ) {
15309 + return;
15310 + }
15311 +
15312 + if ( index === undefined ) {
15313 + disabled = false;
15314 + } else {
15315 + index = this._getIndex( index );
15316 + if ( $.isArray( disabled ) ) {
15317 + disabled = $.map( disabled, function( num ) {
15318 + return num !== index ? num : null;
15319 + });
15320 + } else {
15321 + disabled = $.map( this.tabs, function( li, num ) {
15322 + return num !== index ? num : null;
15323 + });
15324 + }
15325 + }
15326 + this._setupDisabled( disabled );
15327 + },
15328 +
15329 + disable: function( index ) {
15330 + var disabled = this.options.disabled;
15331 + if ( disabled === true ) {
15332 + return;
15333 + }
15334 +
15335 + if ( index === undefined ) {
15336 + disabled = true;
15337 + } else {
15338 + index = this._getIndex( index );
15339 + if ( $.inArray( index, disabled ) !== -1 ) {
15340 + return;
15341 + }
15342 + if ( $.isArray( disabled ) ) {
15343 + disabled = $.merge( [ index ], disabled ).sort();
15344 + } else {
15345 + disabled = [ index ];
15346 + }
15347 + }
15348 + this._setupDisabled( disabled );
15349 + },
15350 +
15351 + load: function( index, event ) {
15352 + index = this._getIndex( index );
15353 + var that = this,
15354 + tab = this.tabs.eq( index ),
15355 + anchor = tab.find( ".ui-tabs-anchor" ),
15356 + panel = this._getPanelForTab( tab ),
15357 + eventData = {
15358 + tab: tab,
15359 + panel: panel
15360 + };
15361 +
15362 + // not remote
15363 + if ( isLocal( anchor[ 0 ] ) ) {
15364 + return;
15365 + }
15366 +
15367 + this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
15368 +
15369 + // support: jQuery <1.8
15370 + // jQuery <1.8 returns false if the request is canceled in beforeSend,
15371 + // but as of 1.8, $.ajax() always returns a jqXHR object.
15372 + if ( this.xhr && this.xhr.statusText !== "canceled" ) {
15373 + tab.addClass( "ui-tabs-loading" );
15374 + panel.attr( "aria-busy", "true" );
15375 +
15376 + this.xhr
15377 + .success(function( response ) {
15378 + // support: jQuery <1.8
15379 + // http://bugs.jquery.com/ticket/11778
15380 + setTimeout(function() {
15381 + panel.html( response );
15382 + that._trigger( "load", event, eventData );
15383 + }, 1 );
15384 + })
15385 + .complete(function( jqXHR, status ) {
15386 + // support: jQuery <1.8
15387 + // http://bugs.jquery.com/ticket/11778
15388 + setTimeout(function() {
15389 + if ( status === "abort" ) {
15390 + that.panels.stop( false, true );
15391 + }
15392 +
15393 + tab.removeClass( "ui-tabs-loading" );
15394 + panel.removeAttr( "aria-busy" );
15395 +
15396 + if ( jqXHR === that.xhr ) {
15397 + delete that.xhr;
15398 + }
15399 + }, 1 );
15400 + });
15401 + }
15402 + },
15403 +
15404 + _ajaxSettings: function( anchor, event, eventData ) {
15405 + var that = this;
15406 + return {
15407 + url: anchor.attr( "href" ),
15408 + beforeSend: function( jqXHR, settings ) {
15409 + return that._trigger( "beforeLoad", event,
15410 + $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
15411 + }
15412 + };
15413 + },
15414 +
15415 + _getPanelForTab: function( tab ) {
15416 + var id = $( tab ).attr( "aria-controls" );
15417 + return this.element.find( this._sanitizeSelector( "#" + id ) );
15418 + }
15419 +});
15420 +
15421 +})( jQuery );
15422 +
15423 +(function( $ ) {
15424 +
15425 +var increments = 0;
15426 +
15427 +function addDescribedBy( elem, id ) {
15428 + var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
15429 + describedby.push( id );
15430 + elem
15431 + .data( "ui-tooltip-id", id )
15432 + .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
15433 +}
15434 +
15435 +function removeDescribedBy( elem ) {
15436 + var id = elem.data( "ui-tooltip-id" ),
15437 + describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
15438 + index = $.inArray( id, describedby );
15439 + if ( index !== -1 ) {
15440 + describedby.splice( index, 1 );
15441 + }
15442 +
15443 + elem.removeData( "ui-tooltip-id" );
15444 + describedby = $.trim( describedby.join( " " ) );
15445 + if ( describedby ) {
15446 + elem.attr( "aria-describedby", describedby );
15447 + } else {
15448 + elem.removeAttr( "aria-describedby" );
15449 + }
15450 +}
15451 +
15452 +$.widget( "ui.tooltip", {
15453 + version: "1.10.3",
15454 + options: {
15455 + content: function() {
15456 + // support: IE<9, Opera in jQuery <1.7
15457 + // .text() can't accept undefined, so coerce to a string
15458 + var title = $( this ).attr( "title" ) || "";
15459 + // Escape title, since we're going from an attribute to raw HTML
15460 + return $( "<a>" ).text( title ).html();
15461 + },
15462 + hide: true,
15463 + // Disabled elements have inconsistent behavior across browsers (#8661)
15464 + items: "[title]:not([disabled])",
15465 + position: {
15466 + my: "left top+15",
15467 + at: "left bottom",
15468 + collision: "flipfit flip"
15469 + },
15470 + show: true,
15471 + tooltipClass: null,
15472 + track: false,
15473 +
15474 + // callbacks
15475 + close: null,
15476 + open: null
15477 + },
15478 +
15479 + _create: function() {
15480 + this._on({
15481 + mouseover: "open",
15482 + focusin: "open"
15483 + });
15484 +
15485 + // IDs of generated tooltips, needed for destroy
15486 + this.tooltips = {};
15487 + // IDs of parent tooltips where we removed the title attribute
15488 + this.parents = {};
15489 +
15490 + if ( this.options.disabled ) {
15491 + this._disable();
15492 + }
15493 + },
15494 +
15495 + _setOption: function( key, value ) {
15496 + var that = this;
15497 +
15498 + if ( key === "disabled" ) {
15499 + this[ value ? "_disable" : "_enable" ]();
15500 + this.options[ key ] = value;
15501 + // disable element style changes
15502 + return;
15503 + }
15504 +
15505 + this._super( key, value );
15506 +
15507 + if ( key === "content" ) {
15508 + $.each( this.tooltips, function( id, element ) {
15509 + that._updateContent( element );
15510 + });
15511 + }
15512 + },
15513 +
15514 + _disable: function() {
15515 + var that = this;
15516 +
15517 + // close open tooltips
15518 + $.each( this.tooltips, function( id, element ) {
15519 + var event = $.Event( "blur" );
15520 + event.target = event.currentTarget = element[0];
15521 + that.close( event, true );
15522 + });
15523 +
15524 + // remove title attributes to prevent native tooltips
15525 + this.element.find( this.options.items ).addBack().each(function() {
15526 + var element = $( this );
15527 + if ( element.is( "[title]" ) ) {
15528 + element
15529 + .data( "ui-tooltip-title", element.attr( "title" ) )
15530 + .attr( "title", "" );
15531 + }
15532 + });
15533 + },
15534 +
15535 + _enable: function() {
15536 + // restore title attributes
15537 + this.element.find( this.options.items ).addBack().each(function() {
15538 + var element = $( this );
15539 + if ( element.data( "ui-tooltip-title" ) ) {
15540 + element.attr( "title", element.data( "ui-tooltip-title" ) );
15541 + }
15542 + });
15543 + },
15544 +
15545 + open: function( event ) {
15546 + var that = this,
15547 + target = $( event ? event.target : this.element )
15548 + // we need closest here due to mouseover bubbling,
15549 + // but always pointing at the same event target
15550 + .closest( this.options.items );
15551 +
15552 + // No element to show a tooltip for or the tooltip is already open
15553 + if ( !target.length || target.data( "ui-tooltip-id" ) ) {
15554 + return;
15555 + }
15556 +
15557 + if ( target.attr( "title" ) ) {
15558 + target.data( "ui-tooltip-title", target.attr( "title" ) );
15559 + }
15560 +
15561 + target.data( "ui-tooltip-open", true );
15562 +
15563 + // kill parent tooltips, custom or native, for hover
15564 + if ( event && event.type === "mouseover" ) {
15565 + target.parents().each(function() {
15566 + var parent = $( this ),
15567 + blurEvent;
15568 + if ( parent.data( "ui-tooltip-open" ) ) {
15569 + blurEvent = $.Event( "blur" );
15570 + blurEvent.target = blurEvent.currentTarget = this;
15571 + that.close( blurEvent, true );
15572 + }
15573 + if ( parent.attr( "title" ) ) {
15574 + parent.uniqueId();
15575 + that.parents[ this.id ] = {
15576 + element: this,
15577 + title: parent.attr( "title" )
15578 + };
15579 + parent.attr( "title", "" );
15580 + }
15581 + });
15582 + }
15583 +
15584 + this._updateContent( target, event );
15585 + },
15586 +
15587 + _updateContent: function( target, event ) {
15588 + var content,
15589 + contentOption = this.options.content,
15590 + that = this,
15591 + eventType = event ? event.type : null;
15592 +
15593 + if ( typeof contentOption === "string" ) {
15594 + return this._open( event, target, contentOption );
15595 + }
15596 +
15597 + content = contentOption.call( target[0], function( response ) {
15598 + // ignore async response if tooltip was closed already
15599 + if ( !target.data( "ui-tooltip-open" ) ) {
15600 + return;
15601 + }
15602 + // IE may instantly serve a cached response for ajax requests
15603 + // delay this call to _open so the other call to _open runs first
15604 + that._delay(function() {
15605 + // jQuery creates a special event for focusin when it doesn't
15606 + // exist natively. To improve performance, the native event
15607 + // object is reused and the type is changed. Therefore, we can't
15608 + // rely on the type being correct after the event finished
15609 + // bubbling, so we set it back to the previous value. (#8740)
15610 + if ( event ) {
15611 + event.type = eventType;
15612 + }
15613 + this._open( event, target, response );
15614 + });
15615 + });
15616 + if ( content ) {
15617 + this._open( event, target, content );
15618 + }
15619 + },
15620 +
15621 + _open: function( event, target, content ) {
15622 + var tooltip, events, delayedShow,
15623 + positionOption = $.extend( {}, this.options.position );
15624 +
15625 + if ( !content ) {
15626 + return;
15627 + }
15628 +
15629 + // Content can be updated multiple times. If the tooltip already
15630 + // exists, then just update the content and bail.
15631 + tooltip = this._find( target );
15632 + if ( tooltip.length ) {
15633 + tooltip.find( ".ui-tooltip-content" ).html( content );
15634 + return;
15635 + }
15636 +
15637 + // if we have a title, clear it to prevent the native tooltip
15638 + // we have to check first to avoid defining a title if none exists
15639 + // (we don't want to cause an element to start matching [title])
15640 + //
15641 + // We use removeAttr only for key events, to allow IE to export the correct
15642 + // accessible attributes. For mouse events, set to empty string to avoid
15643 + // native tooltip showing up (happens only when removing inside mouseover).
15644 + if ( target.is( "[title]" ) ) {
15645 + if ( event && event.type === "mouseover" ) {
15646 + target.attr( "title", "" );
15647 + } else {
15648 + target.removeAttr( "title" );
15649 + }
15650 + }
15651 +
15652 + tooltip = this._tooltip( target );
15653 + addDescribedBy( target, tooltip.attr( "id" ) );
15654 + tooltip.find( ".ui-tooltip-content" ).html( content );
15655 +
15656 + function position( event ) {
15657 + positionOption.of = event;
15658 + if ( tooltip.is( ":hidden" ) ) {
15659 + return;
15660 + }
15661 + tooltip.position( positionOption );
15662 + }
15663 + if ( this.options.track && event && /^mouse/.test( event.type ) ) {
15664 + this._on( this.document, {
15665 + mousemove: position
15666 + });
15667 + // trigger once to override element-relative positioning
15668 + position( event );
15669 + } else {
15670 + tooltip.position( $.extend({
15671 + of: target
15672 + }, this.options.position ) );
15673 + }
15674 +
15675 + tooltip.hide();
15676 +
15677 + this._show( tooltip, this.options.show );
15678 + // Handle tracking tooltips that are shown with a delay (#8644). As soon
15679 + // as the tooltip is visible, position the tooltip using the most recent
15680 + // event.
15681 + if ( this.options.show && this.options.show.delay ) {
15682 + delayedShow = this.delayedShow = setInterval(function() {
15683 + if ( tooltip.is( ":visible" ) ) {
15684 + position( positionOption.of );
15685 + clearInterval( delayedShow );
15686 + }
15687 + }, $.fx.interval );
15688 + }
15689 +
15690 + this._trigger( "open", event, { tooltip: tooltip } );
15691 +
15692 + events = {
15693 + keyup: function( event ) {
15694 + if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
15695 + var fakeEvent = $.Event(event);
15696 + fakeEvent.currentTarget = target[0];
15697 + this.close( fakeEvent, true );
15698 + }
15699 + },
15700 + remove: function() {
15701 + this._removeTooltip( tooltip );
15702 + }
15703 + };
15704 + if ( !event || event.type === "mouseover" ) {
15705 + events.mouseleave = "close";
15706 + }
15707 + if ( !event || event.type === "focusin" ) {
15708 + events.focusout = "close";
15709 + }
15710 + this._on( true, target, events );
15711 + },
15712 +
15713 + close: function( event ) {
15714 + var that = this,
15715 + target = $( event ? event.currentTarget : this.element ),
15716 + tooltip = this._find( target );
15717 +
15718 + // disabling closes the tooltip, so we need to track when we're closing
15719 + // to avoid an infinite loop in case the tooltip becomes disabled on close
15720 + if ( this.closing ) {
15721 + return;
15722 + }
15723 +
15724 + // Clear the interval for delayed tracking tooltips
15725 + clearInterval( this.delayedShow );
15726 +
15727 + // only set title if we had one before (see comment in _open())
15728 + if ( target.data( "ui-tooltip-title" ) ) {
15729 + target.attr( "title", target.data( "ui-tooltip-title" ) );
15730 + }
15731 +
15732 + removeDescribedBy( target );
15733 +
15734 + tooltip.stop( true );
15735 + this._hide( tooltip, this.options.hide, function() {
15736 + that._removeTooltip( $( this ) );
15737 + });
15738 +
15739 + target.removeData( "ui-tooltip-open" );
15740 + this._off( target, "mouseleave focusout keyup" );
15741 + // Remove 'remove' binding only on delegated targets
15742 + if ( target[0] !== this.element[0] ) {
15743 + this._off( target, "remove" );
15744 + }
15745 + this._off( this.document, "mousemove" );
15746 +
15747 + if ( event && event.type === "mouseleave" ) {
15748 + $.each( this.parents, function( id, parent ) {
15749 + $( parent.element ).attr( "title", parent.title );
15750 + delete that.parents[ id ];
15751 + });
15752 + }
15753 +
15754 + this.closing = true;
15755 + this._trigger( "close", event, { tooltip: tooltip } );
15756 + this.closing = false;
15757 + },
15758 +
15759 + _tooltip: function( element ) {
15760 + var id = "ui-tooltip-" + increments++,
15761 + tooltip = $( "<div>" )
15762 + .attr({
15763 + id: id,
15764 + role: "tooltip"
15765 + })
15766 + .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
15767 + ( this.options.tooltipClass || "" ) );
15768 + $( "<div>" )
15769 + .addClass( "ui-tooltip-content" )
15770 + .appendTo( tooltip );
15771 + tooltip.appendTo( this.document[0].body );
15772 + this.tooltips[ id ] = element;
15773 + return tooltip;
15774 + },
15775 +
15776 + _find: function( target ) {
15777 + var id = target.data( "ui-tooltip-id" );
15778 + return id ? $( "#" + id ) : $();
15779 + },
15780 +
15781 + _removeTooltip: function( tooltip ) {
15782 + tooltip.remove();
15783 + delete this.tooltips[ tooltip.attr( "id" ) ];
15784 + },
15785 +
15786 + _destroy: function() {
15787 + var that = this;
15788 +
15789 + // close open tooltips
15790 + $.each( this.tooltips, function( id, element ) {
15791 + // Delegate to close method to handle common cleanup
15792 + var event = $.Event( "blur" );
15793 + event.target = event.currentTarget = element[0];
15794 + that.close( event, true );
15795 +
15796 + // Remove immediately; destroying an open tooltip doesn't use the
15797 + // hide animation
15798 + $( "#" + id ).remove();
15799 +
15800 + // Restore the title
15801 + if ( element.data( "ui-tooltip-title" ) ) {
15802 + element.attr( "title", element.data( "ui-tooltip-title" ) );
15803 + element.removeData( "ui-tooltip-title" );
15804 + }
15805 + });
15806 + }
15807 +});
15808 +
15809 +}( jQuery ) );
15810 \ No newline at end of file
15811
15812 diff --git a/AllanStyle-SUBSILVER/template/navbar_header.html b/AllanStyle-SUBSILVER/template/navbar_header.html
15813 new file mode 100644
15814 index 000000000..fbc93c14e
15815 --- /dev/null
15816 +++ b/AllanStyle-SUBSILVER/template/navbar_header.html
15817 @@ -0,0 +1,228 @@
15818 +<div class="navbar-top" role="navigation">
15819 + <div class="inner">
15820 +
15821 + <ul id="nav-main" class="nav-main linklist" role="menubar">
15822 +
15823 + <li id="quick-links" class="quick-links dropdown-container responsive-menu<!-- IF not S_DISPLAY_QUICK_LINKS and not S_DISPLAY_SEARCH --> hidden<!-- ENDIF -->" data-skip-responsive="true">
15824 + <a href="#" class="dropdown-trigger">
15825 + <i class="icon fa-bars fa-fw" aria-hidden="true"></i><span>{L_QUICK_LINKS}</span>
15826 + </a>
15827 + <div class="dropdown">
15828 + <div class="pointer"><div class="pointer-inner"></div></div>
15829 + <ul class="dropdown-contents" role="menu">
15830 + <!-- EVENT navbar_header_quick_links_before -->
15831 +
15832 + <!-- IF S_DISPLAY_SEARCH -->
15833 + <li class="separator"></li>
15834 + <!-- IF S_REGISTERED_USER -->
15835 + <li>
15836 + <a href="{U_SEARCH_SELF}" role="menuitem">
15837 + <i class="icon fa-file-o fa-fw icon-gray" aria-hidden="true"></i><span>{L_SEARCH_SELF}</span>
15838 + </a>
15839 + </li>
15840 + <!-- ENDIF -->
15841 + <!-- IF S_USER_LOGGED_IN -->
15842 + <li>
15843 + <a href="{U_SEARCH_NEW}" role="menuitem">
15844 + <i class="icon fa-file-o fa-fw icon-red" aria-hidden="true"></i><span>{L_SEARCH_NEW}</span>
15845 + </a>
15846 + </li>
15847 + <!-- ENDIF -->
15848 + <!-- IF S_LOAD_UNREADS -->
15849 + <li>
15850 + <a href="{U_SEARCH_UNREAD}" role="menuitem">
15851 + <i class="icon fa-file-o fa-fw icon-red" aria-hidden="true"></i><span>{L_SEARCH_UNREAD}</span>
15852 + </a>
15853 + </li>
15854 + <!-- ENDIF -->
15855 + <li>
15856 + <a href="{U_SEARCH_UNANSWERED}" role="menuitem">
15857 + <i class="icon fa-file-o fa-fw icon-gray" aria-hidden="true"></i><span>{L_SEARCH_UNANSWERED}</span>
15858 + </a>
15859 + </li>
15860 + <li>
15861 + <a href="{U_SEARCH_ACTIVE_TOPICS}" role="menuitem">
15862 + <i class="icon fa-file-o fa-fw icon-blue" aria-hidden="true"></i><span>{L_SEARCH_ACTIVE_TOPICS}</span>
15863 + </a>
15864 + </li>
15865 + <li class="separator"></li>
15866 + <li>
15867 + <a href="{U_SEARCH}" role="menuitem">
15868 + <i class="icon fa-search fa-fw" aria-hidden="true"></i><span>{L_SEARCH}</span>
15869 + </a>
15870 + </li>
15871 + <!-- ENDIF -->
15872 +
15873 + <!-- IF not S_IS_BOT and (S_DISPLAY_MEMBERLIST or U_TEAM) -->
15874 + <li class="separator"></li>
15875 + <!-- IF S_DISPLAY_MEMBERLIST -->
15876 + <li>
15877 + <a href="{U_MEMBERLIST}" role="menuitem">
15878 + <i class="icon fa-group fa-fw" aria-hidden="true"></i><span>{L_MEMBERLIST}</span>
15879 + </a>
15880 + </li>
15881 + <!-- ENDIF -->
15882 + <!-- IF U_TEAM -->
15883 + <li>
15884 + <a href="{U_TEAM}" role="menuitem">
15885 + <i class="icon fa-shield fa-fw" aria-hidden="true"></i><span>{L_THE_TEAM}</span>
15886 + </a>
15887 + </li>
15888 + <!-- ENDIF -->
15889 + <!-- ENDIF -->
15890 + <li class="separator"></li>
15891 +
15892 + <!-- EVENT navbar_header_quick_links_after -->
15893 + </ul>
15894 + </div>
15895 + </li>
15896 +
15897 + <!-- EVENT overall_header_navigation_prepend -->
15898 + <li <!-- IF not S_USER_LOGGED_IN -->data-skip-responsive="true"<!-- ELSE -->data-last-responsive="true"<!-- ENDIF -->>
15899 + <a href="{U_FAQ}" rel="help" title="{L_FAQ_EXPLAIN}" role="menuitem">
15900 + <i class="icon fa-question-circle fa-fw" aria-hidden="true"></i><span>{L_FAQ}</span>
15901 + </a>
15902 + </li>
15903 + <!-- EVENT overall_header_navigation_append -->
15904 + <!-- IF U_ACP -->
15905 + <li data-last-responsive="true">
15906 + <a href="{U_ACP}" title="{L_ACP}" role="menuitem">
15907 + <i class="icon fa-cogs fa-fw" aria-hidden="true"></i><span>{L_ACP_SHORT}</span>
15908 + </a>
15909 + </li>
15910 + <!-- ENDIF -->
15911 + <!-- IF U_MCP -->
15912 + <li data-last-responsive="true">
15913 + <a href="{U_MCP}" title="{L_MCP}" role="menuitem">
15914 + <i class="icon fa-gavel fa-fw" aria-hidden="true"></i><span>{L_MCP_SHORT}</span>
15915 + </a>
15916 + </li>
15917 + <!-- ENDIF -->
15918 +
15919 + <!-- IF S_REGISTERED_USER -->
15920 + <!-- EVENT navbar_header_user_profile_prepend -->
15921 + <li id="username_logged_in" class="rightside <!-- IF CURRENT_USER_AVATAR --> no-bulletin<!-- ENDIF -->" data-skip-responsive="true">
15922 + <!-- EVENT navbar_header_username_prepend -->
15923 + <div class="header-profile dropdown-container">
15924 + <a href="{U_PROFILE}" class="header-avatar dropdown-trigger"><!-- IF CURRENT_USER_AVATAR -->{CURRENT_USER_AVATAR} <!-- ENDIF --> {CURRENT_USERNAME_SIMPLE}</a>
15925 + <div class="dropdown">
15926 + <div class="pointer"><div class="pointer-inner"></div></div>
15927 + <ul class="dropdown-contents" role="menu">
15928 + <!-- IF U_RESTORE_PERMISSIONS -->
15929 + <li>
15930 + <a href="{U_RESTORE_PERMISSIONS}">
15931 + <i class="icon fa-refresh fa-fw" aria-hidden="true"></i><span>{L_RESTORE_PERMISSIONS}</span>
15932 + </a>
15933 + </li>
15934 + <!-- ENDIF -->
15935 +
15936 + <!-- EVENT navbar_header_profile_list_before -->
15937 +
15938 + <li>
15939 + <a href="{U_PROFILE}" title="{L_PROFILE}" role="menuitem">
15940 + <i class="icon fa-sliders fa-fw" aria-hidden="true"></i><span>{L_PROFILE}</span>
15941 + </a>
15942 + </li>
15943 + <li>
15944 + <a href="{U_USER_PROFILE}" title="{L_READ_PROFILE}" role="menuitem">
15945 + <i class="icon fa-user fa-fw" aria-hidden="true"></i><span>{L_READ_PROFILE}</span>
15946 + </a>
15947 + </li>
15948 +
15949 + <!-- EVENT navbar_header_profile_list_after -->
15950 +
15951 + <li class="separator"></li>
15952 + <li>
15953 + <a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
15954 + <i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>{L_LOGIN_LOGOUT}</span>
15955 + </a>
15956 + </li>
15957 + </ul>
15958 + </div>
15959 + </div>
15960 + <!-- EVENT navbar_header_username_append -->
15961 + </li>
15962 + <!-- IF S_DISPLAY_PM -->
15963 + <li class="rightside" data-skip-responsive="true">
15964 + <a href="{U_PRIVATEMSGS}" role="menuitem">
15965 + <i class="icon fa-inbox fa-fw" aria-hidden="true"></i><span>{L_PRIVATE_MESSAGES} </span><strong class="badge<!-- IF not PRIVATE_MESSAGE_COUNT --> hidden<!-- ENDIF -->">{PRIVATE_MESSAGE_COUNT}</strong>
15966 + </a>
15967 + </li>
15968 + <!-- ENDIF -->
15969 + <!-- IF S_NOTIFICATIONS_DISPLAY -->
15970 + <li class="dropdown-container dropdown-{S_CONTENT_FLOW_END} rightside" data-skip-responsive="true">
15971 + <a href="{U_VIEW_ALL_NOTIFICATIONS}" id="notification_list_button" class="dropdown-trigger">
15972 + <i class="icon fa-bell fa-fw" aria-hidden="true"></i><span>{L_NOTIFICATIONS} </span><strong class="badge<!-- IF not NOTIFICATIONS_COUNT --> hidden<!-- ENDIF -->">{NOTIFICATIONS_COUNT}</strong>
15973 + </a>
15974 + <!-- INCLUDE notification_dropdown.html -->
15975 + </li>
15976 + <!-- ENDIF -->
15977 + <!-- EVENT navbar_header_user_profile_append -->
15978 + <!-- ELSE -->
15979 + <li class="rightside" data-skip-responsive="true">
15980 + <a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x" role="menuitem">
15981 + <i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>{L_LOGIN_LOGOUT}</span>
15982 + </a>
15983 + </li>
15984 + <!-- IF S_REGISTER_ENABLED and not (S_SHOW_COPPA or S_REGISTRATION) -->
15985 + <li class="rightside" data-skip-responsive="true">
15986 + <a href="{U_REGISTER}" role="menuitem">
15987 + <i class="icon fa-pencil-square-o fa-fw" aria-hidden="true"></i><span>{L_REGISTER}</span>
15988 + </a>
15989 + </li>
15990 + <!-- ENDIF -->
15991 + <!-- EVENT navbar_header_logged_out_content -->
15992 + <!-- ENDIF -->
15993 + </ul>
15994 +
15995 + </div>
15996 +</div>
15997 +
15998 +<div class="navbar" role="navigation">
15999 + <div class="inner">
16000 +
16001 + <ul id="nav-breadcrumbs" class="nav-breadcrumbs linklist navlinks" role="menubar">
16002 + <!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
16003 + <!-- EVENT overall_header_breadcrumbs_before -->
16004 + <li class="breadcrumbs">
16005 + <!-- IF U_SITE_HOME -->
16006 + <span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemprop="url" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="title">{L_SITE_HOME}</span></a></span>
16007 + <!-- ENDIF -->
16008 + <!-- EVENT overall_header_breadcrumb_prepend -->
16009 + <span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemprop="url" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="title">{L_INDEX}</span></a></span>
16010 +
16011 + <!-- BEGIN navlinks -->
16012 + <!-- EVENT overall_header_navlink_prepend -->
16013 + <span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{navlinks.U_VIEW_FORUM}" itemprop="url"><span itemprop="title">{navlinks.FORUM_NAME}</span></a></span>
16014 + <!-- EVENT overall_header_navlink_append -->
16015 + <!-- END navlinks -->
16016 + <!-- EVENT overall_header_breadcrumb_append -->
16017 + </li>
16018 + <!-- EVENT overall_header_breadcrumbs_after -->
16019 +
16020 + <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
16021 + <li class="rightside responsive-search">
16022 + <a href="{U_SEARCH}" title="{L_SEARCH_ADV_EXPLAIN}" role="menuitem">
16023 + <i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH}</span>
16024 + </a>
16025 + </li>
16026 + <!-- ENDIF -->
16027 + </ul>
16028 +
16029 + </div>
16030 +</div>
16031 +
16032 +<!-- IF S_DISPLAY_SEARCH -->
16033 +<div class="navbar-top-link">
16034 + <div class="inner">
16035 + <ul>
16036 + <li class="navbar-top-link-left"><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a></li>
16037 + <li class="navbar-top-link-left"><a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
16038 +
16039 + <!-- IF S_REGISTERED_USER --><li class="navbar-top-link-right"><a href="{U_SEARCH_SELF}" role="menuitem">{L_SEARCH_SELF}</a></li><!-- ENDIF -->
16040 + <!-- IF S_USER_LOGGED_IN --><li class="navbar-top-link-right"><a href="{U_SEARCH_NEW}" role="menuitem">{L_SEARCH_NEW}</a></li><!-- ENDIF -->
16041 + <!-- IF S_LOAD_UNREADS --><li class="navbar-top-link-right"><a href="{U_SEARCH_UNREAD}" role="menuitem">{L_SEARCH_UNREAD}</a></li><!-- ENDIF -->
16042 + </ul>
16043 + </div>
16044 +</div>
16045 +<!-- ENDIF -->
16046
16047 diff --git a/AllanStyle-SUBSILVER/template/overall_footer.html b/AllanStyle-SUBSILVER/template/overall_footer.html
16048 new file mode 100644
16049 index 000000000..8388d72b6
16050 --- /dev/null
16051 +++ b/AllanStyle-SUBSILVER/template/overall_footer.html
16052 @@ -0,0 +1,96 @@
16053 + <!-- EVENT overall_footer_content_after -->
16054 + </div>
16055 +
16056 +<!-- EVENT overall_footer_page_body_after -->
16057 +
16058 +<div id="page-footer" class="page-footer" role="contentinfo">
16059 + <!-- INCLUDE navbar_footer.html -->
16060 +
16061 + <div class="copyright">
16062 + <!-- EVENT overall_footer_copyright_prepend -->
16063 + <!-- WARNING NO DELETE -->Style developer by <a href="http://tricolor.x-tk.ru/">support forum tricolor</a>, <!-- END WARNING NO DELETE -->{CREDIT_LINE}
16064 + <!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
16065 + <!-- EVENT overall_footer_copyright_append -->
16066 + <!-- IF DEBUG_OUTPUT --><br />{DEBUG_OUTPUT}<!-- ENDIF -->
16067 + <!-- IF U_ACP --><br /><strong><a href="{U_ACP}">{L_ACP}</a></strong><!-- ENDIF -->
16068 + </div>
16069 +
16070 + <div id="darkenwrapper" class="darkenwrapper" data-ajax-error-title="{L_AJAX_ERROR_TITLE}" data-ajax-error-text="{L_AJAX_ERROR_TEXT}" data-ajax-error-text-abort="{L_AJAX_ERROR_TEXT_ABORT}" data-ajax-error-text-timeout="{L_AJAX_ERROR_TEXT_TIMEOUT}" data-ajax-error-text-parsererror="{L_AJAX_ERROR_TEXT_PARSERERROR}">
16071 + <div id="darken" class="darken">&nbsp;</div>
16072 + </div>
16073 +
16074 + <div id="phpbb_alert" class="phpbb_alert" data-l-err="{L_ERROR}" data-l-timeout-processing-req="{L_TIMEOUT_PROCESSING_REQ}">
16075 + <a href="#" class="alert_close">
16076 + <i class="icon fa-times-circle fa-fw" aria-hidden="true"></i>
16077 + </a>
16078 + <h3 class="alert_title">&nbsp;</h3><p class="alert_text"></p>
16079 + </div>
16080 + <div id="phpbb_confirm" class="phpbb_alert">
16081 + <a href="#" class="alert_close">
16082 + <i class="icon fa-times-circle fa-fw" aria-hidden="true"></i>
16083 + </a>
16084 + <div class="alert_text"></div>
16085 + </div>
16086 +</div>
16087 +
16088 +</div>
16089 +
16090 +<div>
16091 + <a id="bottom" class="anchor" accesskey="z"></a>
16092 + <!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
16093 +</div>
16094 +
16095 +<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
16096 +<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF -->
16097 +<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
16098 +<!-- INCLUDEJS forum_fn.js -->
16099 +<!-- INCLUDEJS ajax.js -->
16100 +<!-- INCLUDEJS jquery-ui.js -->
16101 +<!-- INCLUDEJS collapse.js -->
16102 +<!-- IF S_ALLOW_CDN -->
16103 + <script type="text/javascript">
16104 + (function($){
16105 + var $fa_cdn = $('head').find('link[rel="stylesheet"]').first(),
16106 + $span = $('<span class="fa" style="display:none"></span>').appendTo('body');
16107 + if ($span.css('fontFamily') !== 'FontAwesome' ) {
16108 + $fa_cdn.after('<link href="{T_ASSETS_PATH}/css/font-awesome.min.css" rel="stylesheet">');
16109 + $fa_cdn.remove();
16110 + }
16111 + $span.remove();
16112 + })(jQuery);
16113 + </script>
16114 +<!-- ENDIF -->
16115 +
16116 +<!-- IF S_COOKIE_NOTICE -->
16117 + <script src="{T_ASSETS_PATH}/cookieconsent/cookieconsent.min.js?assets_version={T_ASSETS_VERSION}"></script>
16118 + <script>
16119 + window.addEventListener("load", function(){
16120 + window.cookieconsent.initialise({
16121 + "palette": {
16122 + "popup": {
16123 + "background": "#0F538A"
16124 + },
16125 + "button": {
16126 + "background": "#E5E5E5"
16127 + }
16128 + },
16129 + "theme": "classic",
16130 + "content": {
16131 + "message": "{LA_COOKIE_CONSENT_MSG}",
16132 + "dismiss": "{LA_COOKIE_CONSENT_OK}",
16133 + "link": "{LA_COOKIE_CONSENT_INFO}",
16134 + "href": "{LA_COOKIE_CONSENT_HREF}"
16135 + }
16136 + })});
16137 + </script>
16138 +<!-- ENDIF -->
16139 +
16140 +<!-- EVENT overall_footer_after -->
16141 +
16142 +<!-- IF S_PLUPLOAD --><!-- INCLUDE plupload.html --><!-- ENDIF -->
16143 +{$SCRIPTS}
16144 +
16145 +<!-- EVENT overall_footer_body_after -->
16146 +
16147 +</body>
16148 +</html>
16149
16150 diff --git a/AllanStyle-SUBSILVER/template/overall_header.html b/AllanStyle-SUBSILVER/template/overall_header.html
16151 new file mode 100644
16152 index 000000000..eb262db80
16153 --- /dev/null
16154 +++ b/AllanStyle-SUBSILVER/template/overall_header.html
16155 @@ -0,0 +1,135 @@
16156 +<!DOCTYPE html>
16157 +<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
16158 +<head>
16159 +<meta charset="utf-8" />
16160 +<meta http-equiv="X-UA-Compatible" content="IE=edge">
16161 +<meta name="viewport" content="width=device-width, initial-scale=1" />
16162 +{META}
16163 +<title><!-- IF UNREAD_NOTIFICATIONS_COUNT -->({UNREAD_NOTIFICATIONS_COUNT}) <!-- ENDIF --><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title>
16164 +
16165 +<!-- IF S_ENABLE_FEEDS -->
16166 + <!-- IF S_ENABLE_FEEDS_OVERALL --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{{ path('phpbb_feed_index') }}"><!-- ENDIF -->
16167 + <!-- IF S_ENABLE_FEEDS_NEWS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{{ path('phpbb_feed_news') }}"><!-- ENDIF -->
16168 + <!-- IF S_ENABLE_FEEDS_FORUMS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{{ path('phpbb_feed_forums') }}"><!-- ENDIF -->
16169 + <!-- IF S_ENABLE_FEEDS_TOPICS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_NEW}" href="{{ path('phpbb_feed_topics') }}"><!-- ENDIF -->
16170 + <!-- IF S_ENABLE_FEEDS_TOPICS_ACTIVE --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_ACTIVE}" href="{{ path('phpbb_feed_topics_active') }}"><!-- ENDIF -->
16171 + <!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{{ path('phpbb_feed_forum', { forum_id : S_FORUM_ID } ) }}"><!-- ENDIF -->
16172 + <!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{{ path('phpbb_feed_topic', { topic_id : S_TOPIC_ID } ) }}"><!-- ENDIF -->
16173 + <!-- EVENT overall_header_feeds -->
16174 +<!-- ENDIF -->
16175 +
16176 +<!-- IF U_CANONICAL -->
16177 + <link rel="canonical" href="{U_CANONICAL}">
16178 +<!-- ENDIF -->
16179 +
16180 +<!--
16181 + phpBB style name: Allan Style - SUBSILVER
16182 + Based on style: prosilver (this is the default phpBB3 style)
16183 + Based on style: subsilver2 (this is the default phpBB3 style)
16184 + Original author: Tom Beddard ( http://www.subBlue.com/ )
16185 + Modified by: Allan ( http://x-tk.ru/ )
16186 +-->
16187 +
16188 +<!-- IF S_ALLOW_CDN -->
16189 +<script>
16190 + WebFontConfig = {
16191 + google: {
16192 + families: ['Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&subset=cyrillic,cyrillic-ext,greek,greek-ext,latin-ext,vietnamese']
16193 + }
16194 + };
16195 +
16196 + (function(d) {
16197 + var wf = d.createElement('script'), s = d.scripts[0];
16198 + wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js';
16199 + wf.async = true;
16200 + s.parentNode.insertBefore(wf, s);
16201 + })(document);
16202 +</script>
16203 +<!-- ENDIF -->
16204 +<link href="{T_FONT_AWESOME_LINK}" rel="stylesheet">
16205 +<link href="{T_STYLESHEET_LINK}" rel="stylesheet">
16206 +<link href="{T_STYLESHEET_LANG_LINK}" rel="stylesheet">
16207 +
16208 +<!-- IF S_CONTENT_DIRECTION eq 'rtl' -->
16209 + <link href="{T_THEME_PATH}/bidi.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
16210 +<!-- ENDIF -->
16211 +
16212 +<!-- IF S_PLUPLOAD -->
16213 + <link href="{T_THEME_PATH}/plupload.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
16214 +<!-- ENDIF -->
16215 +
16216 +<!-- IF S_COOKIE_NOTICE -->
16217 + <link href="{T_ASSETS_PATH}/cookieconsent/cookieconsent.min.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
16218 +<!-- ENDIF -->
16219 +
16220 +<!--[if lte IE 9]>
16221 + <link href="{T_THEME_PATH}/tweaks.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet">
16222 +<![endif]-->
16223 +
16224 +<!-- EVENT overall_header_head_append -->
16225 +
16226 +{$STYLESHEETS}
16227 +
16228 +<!-- EVENT overall_header_stylesheets_after -->
16229 +
16230 +</head>
16231 +<body id="phpbb" class="nojs notouch section-{SCRIPT_NAME} {S_CONTENT_DIRECTION} {BODY_CLASS}">
16232 +
16233 +<div id="header-subsilver">
16234 + <a id="top" class="top-anchor" accesskey="t"></a>
16235 + <div class="headerbar" role="banner">
16236 + <!-- EVENT overall_header_headerbar_before -->
16237 + <div class="inner">
16238 +
16239 + <div id="site-description" class="site-description">
16240 + <a id="logo" class="logo" href="<!-- IF U_SITE_HOME -->{U_SITE_HOME}<!-- ELSE -->{U_INDEX}<!-- ENDIF -->" title="<!-- IF U_SITE_HOME -->{L_SITE_HOME}<!-- ELSE -->{L_INDEX}<!-- ENDIF -->"><span class="site_logo"></span></a>
16241 + <h1>{SITENAME}</h1>
16242 + <p>{SITE_DESCRIPTION}</p>
16243 + <p class="skiplink"><a href="#start_here">{L_SKIP}</a></p>
16244 + </div>
16245 +
16246 + <!-- EVENT overall_header_searchbox_before -->
16247 + <!-- IF S_DISPLAY_SEARCH and not S_IN_SEARCH -->
16248 + <div id="search-box" class="search-box search-header" role="search">
16249 + <form action="{U_SEARCH}" method="get" id="search">
16250 + <fieldset>
16251 + <input name="keywords" id="keywords" type="search" maxlength="128" title="{L_SEARCH_KEYWORDS}" class="inputbox search tiny" size="20" value="{SEARCH_WORDS}" placeholder="{L_SEARCH_MINI}" />
16252 + <button class="button button-search" type="submit" title="{L_SEARCH}">
16253 + <i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH}</span>
16254 + </button>
16255 + <a href="{U_SEARCH}" class="button button-search-end" title="{L_SEARCH_ADV}">
16256 + <i class="icon fa-cog fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH_ADV}</span>
16257 + </a>
16258 + {S_SEARCH_HIDDEN_FIELDS}
16259 + </fieldset>
16260 + </form>
16261 + </div>
16262 + <!-- ENDIF -->
16263 + <!-- EVENT overall_header_searchbox_after -->
16264 +
16265 + </div>
16266 + <!-- EVENT overall_header_headerbar_after -->
16267 + </div>
16268 +</div>
16269 +
16270 +<!-- EVENT overall_header_body_before -->
16271 +
16272 +<div id="wrap" class="wrap">
16273 + <div id="page-header">
16274 + <!-- EVENT overall_header_navbar_before -->
16275 + <!-- INCLUDE navbar_header.html -->
16276 + </div>
16277 +
16278 + <!-- EVENT overall_header_page_body_before -->
16279 +
16280 + <a id="start_here" class="anchor"></a>
16281 + <div id="page-body" class="page-body" role="main">
16282 + <!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN and (U_MCP or U_ACP) -->
16283 + <div id="information" class="rules">
16284 + <div class="inner">
16285 + <strong>{L_INFORMATION}{L_COLON}</strong> {L_BOARD_DISABLED}
16286 + </div>
16287 + </div>
16288 + <!-- ENDIF -->
16289 +
16290 + <!-- EVENT overall_header_content_before -->
16291
16292 diff --git a/AllanStyle-SUBSILVER/template/viewtopic_body.html b/AllanStyle-SUBSILVER/template/viewtopic_body.html
16293 new file mode 100644
16294 index 000000000..c1ea47d62
16295 --- /dev/null
16296 +++ b/AllanStyle-SUBSILVER/template/viewtopic_body.html
16297 @@ -0,0 +1,457 @@
16298 +<!-- INCLUDE overall_header.html -->
16299 +
16300 +<!-- EVENT viewtopic_topic_title_before -->
16301 +<h2 class="topic-title"><!-- EVENT viewtopic_topic_title_prepend --><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- EVENT viewtopic_topic_title_append --></h2>
16302 +<!-- EVENT viewtopic_topic_title_after -->
16303 +<!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body -->
16304 +<!-- IF FORUM_DESC --><div style="display: none !important;">{FORUM_DESC}<br /></div><!-- ENDIF -->
16305 +
16306 +<!-- IF MODERATORS -->
16307 +<p>
16308 + <strong><!-- IF S_SINGLE_MODERATOR -->{L_MODERATOR}<!-- ELSE -->{L_MODERATORS}<!-- ENDIF -->{L_COLON}</strong> {MODERATORS}
16309 +</p>
16310 +<!-- ENDIF -->
16311 +
16312 +<!-- IF S_FORUM_RULES -->
16313 + <div class="rules<!-- IF U_FORUM_RULES --> rules-link<!-- ENDIF -->">
16314 + <div class="inner">
16315 +
16316 + <!-- IF U_FORUM_RULES -->
16317 + <a href="{U_FORUM_RULES}">{L_FORUM_RULES}</a>
16318 + <!-- ELSE -->
16319 + <strong>{L_FORUM_RULES}</strong><br />
16320 + {FORUM_RULES}
16321 + <!-- ENDIF -->
16322 +
16323 + </div>
16324 + </div>
16325 +<!-- ENDIF -->
16326 +
16327 +<div class="action-bar bar-top">
16328 + <!-- EVENT viewtopic_buttons_top_before -->
16329 +
16330 + <!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
16331 + <a href="{U_POST_REPLY_TOPIC}" class="button" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->">
16332 + <!-- IF S_IS_LOCKED -->
16333 + <span>{L_BUTTON_TOPIC_LOCKED}</span> <i class="icon fa-lock fa-fw" aria-hidden="true"></i>
16334 + <!-- ELSE -->
16335 + <span>{L_BUTTON_POST_REPLY}</span> <i class="icon fa-reply fa-fw" aria-hidden="true"></i>
16336 + <!-- ENDIF -->
16337 + </a>
16338 + <!-- ENDIF -->
16339 +
16340 + <!-- EVENT viewtopic_buttons_top_after -->
16341 + <!-- INCLUDE viewtopic_topic_tools.html -->
16342 + <!-- EVENT viewtopic_dropdown_top_custom -->
16343 +
16344 + <!-- IF S_DISPLAY_SEARCHBOX -->
16345 + <div class="search-box" role="search">
16346 + <form method="get" id="topic-search" action="{S_SEARCHBOX_ACTION}">
16347 + <fieldset>
16348 + <input class="inputbox search tiny" type="search" name="keywords" id="search_keywords" size="20" placeholder="{L_SEARCH_TOPIC}" />
16349 + <button class="button button-search" type="submit" title="{L_SEARCH}">
16350 + <i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH}</span>
16351 + </button>
16352 + <a href="{U_SEARCH}" class="button button-search-end" title="{L_SEARCH_ADV}">
16353 + <i class="icon fa-cog fa-fw" aria-hidden="true"></i><span class="sr-only">{L_SEARCH_ADV}</span>
16354 + </a>
16355 + {S_SEARCH_LOCAL_HIDDEN_FIELDS}
16356 + </fieldset>
16357 + </form>
16358 + </div>
16359 + <!-- ENDIF -->
16360 +
16361 + <!-- IF .pagination or TOTAL_POSTS -->
16362 + <div class="pagination">
16363 + <!-- IF U_VIEW_UNREAD_POST and not S_IS_BOT --><a href="{U_VIEW_UNREAD_POST}" class="mark">{L_VIEW_UNREAD_POST}</a> &bull; <!-- ENDIF -->{TOTAL_POSTS}
16364 + <!-- IF .pagination -->
16365 + <!-- INCLUDE pagination.html -->
16366 + <!-- ELSE -->
16367 + &bull; {PAGE_NUMBER}
16368 + <!-- ENDIF -->
16369 + </div>
16370 + <!-- ENDIF -->
16371 + <!-- EVENT viewtopic_body_pagination_top_after -->
16372 +</div>
16373 +
16374 +<!-- EVENT viewtopic_body_poll_before -->
16375 +
16376 +<!-- IF S_HAS_POLL -->
16377 + <form method="post" action="{S_POLL_ACTION}" data-ajax="vote_poll" class="topic_poll">
16378 +
16379 + <div class="panel">
16380 + <div class="inner">
16381 +
16382 + <div class="content">
16383 + <h2 class="poll-title"><!-- EVENT viewtopic_body_poll_question_prepend -->{POLL_QUESTION}<!-- EVENT viewtopic_body_poll_question_append --></h2>
16384 + <p class="author">{L_POLL_LENGTH}<!-- IF S_CAN_VOTE and L_POLL_LENGTH --><br /><!-- ENDIF --><!-- IF S_CAN_VOTE --><span class="poll_max_votes">{L_MAX_VOTES}</span><!-- ENDIF --></p>
16385 +
16386 + <fieldset class="polls">
16387 + <!-- BEGIN poll_option -->
16388 + <!-- EVENT viewtopic_body_poll_option_before -->
16389 + <dl class="<!-- IF poll_option.POLL_OPTION_VOTED -->voted<!-- ENDIF --><!-- IF poll_option.POLL_OPTION_MOST_VOTES --> most-votes<!-- ENDIF -->"<!-- IF poll_option.POLL_OPTION_VOTED --> title="{L_POLL_VOTED_OPTION}"<!-- ENDIF --> data-alt-text="{L_POLL_VOTED_OPTION}" data-poll-option-id="{poll_option.POLL_OPTION_ID}">
16390 + <dt><!-- IF S_CAN_VOTE --><label for="vote_{poll_option.POLL_OPTION_ID}">{poll_option.POLL_OPTION_CAPTION}</label><!-- ELSE -->{poll_option.POLL_OPTION_CAPTION}<!-- ENDIF --></dt>
16391 + <!-- IF S_CAN_VOTE --><dd style="width: auto;" class="poll_option_select"><!-- IF S_IS_MULTI_CHOICE --><input type="checkbox" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ELSE --><input type="radio" name="vote_id[]" id="vote_{poll_option.POLL_OPTION_ID}" value="{poll_option.POLL_OPTION_ID}"<!-- IF poll_option.POLL_OPTION_VOTED --> checked="checked"<!-- ENDIF --> /><!-- ENDIF --></dd><!-- ENDIF -->
16392 + <dd class="resultbar<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><div class="<!-- IF poll_option.POLL_OPTION_PCT < 20 -->pollbar1<!-- ELSEIF poll_option.POLL_OPTION_PCT < 40 -->pollbar2<!-- ELSEIF poll_option.POLL_OPTION_PCT < 60 -->pollbar3<!-- ELSEIF poll_option.POLL_OPTION_PCT < 80 -->pollbar4<!-- ELSE -->pollbar5<!-- ENDIF -->" style="width:{poll_option.POLL_OPTION_PERCENT_REL};">{poll_option.POLL_OPTION_RESULT}</div></dd>
16393 + <dd class="poll_option_percent<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->"><!-- IF poll_option.POLL_OPTION_RESULT == 0 -->{L_NO_VOTES}<!-- ELSE -->{poll_option.POLL_OPTION_PERCENT}<!-- ENDIF --></dd>
16394 + </dl>
16395 + <!-- EVENT viewtopic_body_poll_option_after -->
16396 + <!-- END poll_option -->
16397 +
16398 + <dl class="poll_total_votes<!-- IF not S_DISPLAY_RESULTS --> hidden<!-- ENDIF -->">
16399 + <dt>&nbsp;</dt>
16400 + <dd class="resultbar">{L_TOTAL_VOTES}{L_COLON} <span class="poll_total_vote_cnt">{TOTAL_VOTES}</span></dd>
16401 + </dl>
16402 +
16403 + <!-- IF S_CAN_VOTE -->
16404 + <dl style="border-top: none;" class="poll_vote">
16405 + <dt>&nbsp;</dt>
16406 + <dd class="resultbar"><input type="submit" name="update" value="{L_SUBMIT_VOTE}" class="button1" /></dd>
16407 + </dl>
16408 + <!-- ENDIF -->
16409 +
16410 + <!-- IF not S_DISPLAY_RESULTS -->
16411 + <dl style="border-top: none;" class="poll_view_results">
16412 + <dt>&nbsp;</dt>
16413 + <dd class="resultbar"><a href="{U_VIEW_RESULTS}">{L_VIEW_RESULTS}</a></dd>
16414 + </dl>
16415 + <!-- ENDIF -->
16416 + </fieldset>
16417 + <div class="vote-submitted hidden">{L_VOTE_SUBMITTED}</div>
16418 + </div>
16419 +
16420 + </div>
16421 + {S_FORM_TOKEN}
16422 + {S_HIDDEN_FIELDS}
16423 + </div>
16424 +
16425 + </form>
16426 + <hr />
16427 +<!-- ENDIF -->
16428 +
16429 +<!-- EVENT viewtopic_body_poll_after -->
16430 +
16431 +<div id="subsilver-nav-topic">
16432 + <div class="inner"><div class="post has-profile">
16433 + <div class="leftsided postbody subsilver-topic-title">{L_MESSAGE}</div>
16434 + <div class="leftsided postprofile subsilver-topic-author">{L_AUTHOR}</div>
16435 + </div></div>
16436 +</div>
16437 +
16438 +<!-- BEGIN postrow -->
16439 + <!-- EVENT viewtopic_body_postrow_post_before -->
16440 + <!-- IF postrow.S_FIRST_UNREAD -->
16441 + <a id="unread" class="anchor"<!-- IF S_UNREAD_VIEW --> data-url="{postrow.U_MINI_POST}"<!-- ENDIF -->></a>
16442 + <!-- ENDIF -->
16443 + <div id="p{postrow.POST_ID}" class="post has-profile <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF postrow.S_UNREAD_POST --> unreadpost<!-- ENDIF --><!-- IF postrow.S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF postrow.S_POST_DELETED --> deleted<!-- ENDIF --><!-- IF postrow.S_ONLINE and not postrow.S_POST_HIDDEN --> online<!-- ENDIF --><!-- IF postrow.POSTER_WARNINGS --> warned<!-- ENDIF -->">
16444 + <div class="inner">
16445 +
16446 + <dl class="postprofile" id="profile{postrow.POST_ID}"<!-- IF postrow.S_POST_HIDDEN --> style="display: none;"<!-- ENDIF -->>
16447 + <dt class="<!-- IF postrow.RANK_TITLE or postrow.RANK_IMG -->has-profile-rank<!-- ELSE -->no-profile-rank<!-- ENDIF --> <!-- IF postrow.POSTER_AVATAR -->has-avatar<!-- ELSE -->no-avatar<!-- ENDIF -->">
16448 + <div class="avatar-container">
16449 + <!-- EVENT viewtopic_body_avatar_before -->
16450 + <!-- IF postrow.POSTER_AVATAR -->
16451 + <!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}" class="avatar">{postrow.POSTER_AVATAR}</a><!-- ELSE --><span class="avatar">{postrow.POSTER_AVATAR}</span><!-- ENDIF -->
16452 + <!-- ENDIF -->
16453 + <!-- EVENT viewtopic_body_avatar_after -->
16454 + </div>
16455 + <!-- EVENT viewtopic_body_post_author_before -->
16456 + <!-- IF not postrow.U_POST_AUTHOR --><strong>{postrow.POST_AUTHOR_FULL}</strong><!-- ELSE -->{postrow.POST_AUTHOR_FULL}<!-- ENDIF -->
16457 + <!-- EVENT viewtopic_body_post_author_after -->
16458 + </dt>
16459 +
16460 + <!-- EVENT viewtopic_body_postrow_rank_before -->
16461 + <!-- IF postrow.RANK_TITLE or postrow.RANK_IMG --><dd class="profile-rank">{postrow.RANK_TITLE}<!-- IF postrow.RANK_TITLE and postrow.RANK_IMG --><br /><!-- ENDIF -->{postrow.RANK_IMG}</dd><!-- ENDIF -->
16462 + <!-- EVENT viewtopic_body_postrow_rank_after -->
16463 +
16464 + <!-- IF postrow.POSTER_POSTS != '' --><dd class="profile-posts"><strong>{L_POSTS}{L_COLON}</strong> <!-- IF postrow.U_SEARCH !== '' --><a href="{postrow.U_SEARCH}"><!-- ENDIF -->{postrow.POSTER_POSTS}<!-- IF postrow.U_SEARCH !== '' --></a><!-- ENDIF --></dd><!-- ENDIF -->
16465 + <!-- IF postrow.POSTER_JOINED --><dd class="profile-joined"><strong>{L_JOINED}{L_COLON}</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
16466 + <!-- IF postrow.POSTER_WARNINGS --><dd class="profile-warnings"><strong>{L_WARNINGS}{L_COLON}</strong> {postrow.POSTER_WARNINGS}</dd><!-- ENDIF -->
16467 +
16468 + <!-- IF postrow.S_PROFILE_FIELD1 -->
16469 + <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
16470 + <dd><strong>{postrow.PROFILE_FIELD1_NAME}{L_COLON}</strong> {postrow.PROFILE_FIELD1_VALUE}</dd>
16471 + <!-- ENDIF -->
16472 +
16473 + <!-- EVENT viewtopic_body_postrow_custom_fields_before -->
16474 + <!-- BEGIN custom_fields -->
16475 + <!-- IF not postrow.custom_fields.S_PROFILE_CONTACT -->
16476 + <dd class="profile-custom-field profile-{postrow.custom_fields.PROFILE_FIELD_IDENT}"><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}{L_COLON}</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
16477 + <!-- ENDIF -->
16478 + <!-- END custom_fields -->
16479 + <!-- EVENT viewtopic_body_postrow_custom_fields_after -->
16480 +
16481 + <!-- EVENT viewtopic_body_contact_fields_before -->
16482 + <!-- IF not S_IS_BOT and .postrow.contact -->
16483 + <dd class="profile-contact">
16484 + <strong>{L_CONTACT}{L_COLON}</strong>
16485 + <div class="dropdown-container dropdown-left">
16486 + <a href="#" class="dropdown-trigger" title="{postrow.CONTACT_USER}">
16487 + <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">{postrow.CONTACT_USER}</span>
16488 + </a>
16489 + <div class="dropdown">
16490 + <div class="pointer"><div class="pointer-inner"></div></div>
16491 + <div class="dropdown-contents contact-icons">
16492 + <!-- BEGIN contact -->
16493 + {% set REMAINDER = postrow.contact.S_ROW_COUNT % 4 %}
16494 + <!-- DEFINE $S_LAST_CELL = ((REMAINDER eq 3) or (postrow.contact.S_LAST_ROW and postrow.contact.S_NUM_ROWS < 4)) -->
16495 + <!-- IF REMAINDER eq 0 -->
16496 + <div>
16497 + <!-- ENDIF -->
16498 + <a href="<!-- IF postrow.contact.U_CONTACT -->{postrow.contact.U_CONTACT}<!-- ELSE -->{postrow.U_POST_AUTHOR}<!-- ENDIF -->" title="{postrow.contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF postrow.contact.ID eq 'jabber' --> onclick="popup(this.href, 750, 320); return false;"<!-- ENDIF -->>
16499 + <span class="contact-icon {postrow.contact.ID}-icon">{postrow.contact.NAME}</span>
16500 + </a>
16501 + <!-- IF REMAINDER eq 3 or postrow.contact.S_LAST_ROW -->
16502 + </div>
16503 + <!-- ENDIF -->
16504 + <!-- END contact -->
16505 + </div>
16506 + </div>
16507 + </div>
16508 + </dd>
16509 + <!-- ENDIF -->
16510 + <!-- EVENT viewtopic_body_contact_fields_after -->
16511 +
16512 + </dl>
16513 +
16514 + <div class="postbody">
16515 + <!-- IF postrow.S_POST_HIDDEN -->
16516 + <!-- IF postrow.S_POST_DELETED -->
16517 + <div class="ignore" id="post_hidden{postrow.POST_ID}">
16518 + {postrow.L_POST_DELETED_MESSAGE}<br />
16519 + {postrow.L_POST_DISPLAY}
16520 + </div>
16521 + <!-- ELSEIF postrow.S_IGNORE_POST -->
16522 + <div class="ignore" id="post_hidden{postrow.POST_ID}">
16523 + {postrow.L_IGNORE_POST}<br />
16524 + {postrow.L_POST_DISPLAY}
16525 + </div>
16526 + <!-- ENDIF -->
16527 + <!-- ENDIF -->
16528 + <div id="post_content{postrow.POST_ID}"<!-- IF postrow.S_POST_HIDDEN --> style="display: none;"<!-- ENDIF -->>
16529 +
16530 + <!-- EVENT viewtopic_body_post_subject_before -->
16531 + <h3 <!-- IF postrow.S_FIRST_ROW -->class="first"<!-- ENDIF -->><!-- IF postrow.POST_ICON_IMG --><img src="{T_ICONS_PATH}{postrow.POST_ICON_IMG}" width="{postrow.POST_ICON_IMG_WIDTH}" height="{postrow.POST_ICON_IMG_HEIGHT}" alt="{postrow.POST_ICON_IMG_ALT}" title="{postrow.POST_ICON_IMG_ALT}" /> <!-- ENDIF --><a href="#p{postrow.POST_ID}">{postrow.POST_SUBJECT}</a></h3>
16532 +
16533 + <!-- DEFINE $SHOW_POST_BUTTONS = (postrow.U_EDIT or postrow.U_DELETE or postrow.U_REPORT or postrow.U_WARN or postrow.U_INFO or postrow.U_QUOTE) -->
16534 + <!-- EVENT viewtopic_body_post_buttons_list_before -->
16535 + <!-- IF not S_IS_BOT -->
16536 + <!-- IF $SHOW_POST_BUTTONS -->
16537 + <ul class="post-buttons">
16538 + <!-- EVENT viewtopic_body_post_buttons_before -->
16539 + <!-- IF postrow.U_EDIT -->
16540 + <li>
16541 + <a href="{postrow.U_EDIT}" title="{L_EDIT_POST}" class="button button-icon-only">
16542 + <i class="icon fa-pencil fa-fw" aria-hidden="true"></i><span class="sr-only">{L_BUTTON_EDIT}</span>
16543 + </a>
16544 + </li>
16545 + <!-- ENDIF -->
16546 + <!-- IF postrow.U_DELETE -->
16547 + <li>
16548 + <a href="{postrow.U_DELETE}" title="{L_DELETE_POST}" class="button button-icon-only">
16549 + <i class="icon fa-times fa-fw" aria-hidden="true"></i><span class="sr-only">{L_DELETE_POST}</span>
16550 + </a>
16551 + </li>
16552 + <!-- ENDIF -->
16553 + <!-- IF postrow.U_REPORT -->
16554 + <li>
16555 + <a href="{postrow.U_REPORT}" title="{L_REPORT_POST}" class="button button-icon-only">
16556 + <i class="icon fa-exclamation fa-fw" aria-hidden="true"></i><span class="sr-only">{L_REPORT_POST}</span>
16557 + </a>
16558 + </li>
16559 + <!-- ENDIF -->
16560 + <!-- IF postrow.U_WARN -->
16561 + <li>
16562 + <a href="{postrow.U_WARN}" title="{L_WARN_USER}" class="button button-icon-only">
16563 + <i class="icon fa-exclamation-triangle fa-fw" aria-hidden="true"></i><span class="sr-only">{L_WARN_USER}</span>
16564 + </a>
16565 + </li>
16566 + <!-- ENDIF -->
16567 + <!-- IF postrow.U_INFO -->
16568 + <li>
16569 + <a href="{postrow.U_INFO}" title="{L_INFORMATION}" class="button button-icon-only">
16570 + <i class="icon fa-info fa-fw" aria-hidden="true"></i><span class="sr-only">{L_INFORMATION}</span>
16571 + </a>
16572 + </li>
16573 + <!-- ENDIF -->
16574 + <!-- IF postrow.U_QUOTE -->
16575 + <li>
16576 + <a href="{postrow.U_QUOTE}" title="{L_REPLY_WITH_QUOTE}" class="button button-icon-only">
16577 + <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">{L_QUOTE}</span>
16578 + </a>
16579 + </li>
16580 + <!-- ENDIF -->
16581 + <!-- EVENT viewtopic_body_post_buttons_after -->
16582 + </ul>
16583 + <!-- ENDIF -->
16584 + <!-- ENDIF -->
16585 + <!-- EVENT viewtopic_body_post_buttons_list_after -->
16586 +
16587 + <!-- EVENT viewtopic_body_postrow_post_details_before -->
16588 + <p class="author"><span class="posti"><a href="{postrow.U_MINI_POST}" onclick="prompt('{L_MESSAGE} #{postrow.POST_NUMBER}',this.href); return false;">#{postrow.POST_NUMBER}</a></span>
16589 + <!-- IF S_IS_BOT -->
16590 + <span><i class="icon fa-file fa-fw <!-- IF postrow.S_UNREAD_POST -->icon-red<!-- ELSE -->icon-lightgray<!-- ENDIF --> icon-md" aria-hidden="true"></i><span class="sr-only">{postrow.MINI_POST}</span></span>
16591 + <!-- ELSE -->
16592 + <a class="unread" href="{postrow.U_MINI_POST}" title="{postrow.MINI_POST}">
16593 + <i class="icon fa-file fa-fw <!-- IF postrow.S_UNREAD_POST -->icon-red<!-- ELSE -->icon-lightgray<!-- ENDIF --> icon-md" aria-hidden="true"></i><span class="sr-only">{postrow.MINI_POST}</span>
16594 + </a>
16595 + <!-- ENDIF -->
16596 + <span class="responsive-hide">{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> &raquo; </span>{postrow.POST_DATE}
16597 + </p>
16598 + <!-- EVENT viewtopic_body_postrow_post_details_after -->
16599 +
16600 + <!-- IF postrow.S_POST_UNAPPROVED -->
16601 + <form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}">
16602 + <p class="post-notice unapproved">
16603 + <span><i class="icon fa-question icon-red fa-fw" aria-hidden="true"></i></span>
16604 + <strong>{L_POST_UNAPPROVED_ACTION}</strong>
16605 + <input class="button2" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" />
16606 + <input class="button1" type="submit" value="{L_APPROVE}" name="action[approve]" />
16607 + <input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
16608 + {S_FORM_TOKEN}
16609 + </p>
16610 + </form>
16611 + <!-- ELSEIF postrow.S_POST_DELETED -->
16612 + <form method="post" class="mcp_approve" action="{postrow.U_APPROVE_ACTION}">
16613 + <p class="post-notice deleted">
16614 + <strong>{L_POST_DELETED_ACTION}</strong>
16615 + <!-- IF postrow.S_DELETE_PERMANENT -->
16616 + <input class="button2" type="submit" value="{L_DELETE}" name="action[delete]" />
16617 + <!-- ENDIF -->
16618 + <input class="button1" type="submit" value="{L_RESTORE}" name="action[restore]" />
16619 + <input type="hidden" name="post_id_list[]" value="{postrow.POST_ID}" />
16620 + {S_FORM_TOKEN}
16621 + </p>
16622 + </form>
16623 + <!-- ENDIF -->
16624 +
16625 + <!-- IF postrow.S_POST_REPORTED -->
16626 + <p class="post-notice reported">
16627 + <a href="{postrow.U_MCP_REPORT}"><i class="icon fa-exclamation fa-fw icon-red" aria-hidden="true"></i><strong>{L_POST_REPORTED}</strong></a>
16628 + </p>
16629 + <!-- ENDIF -->
16630 +
16631 + <div class="content">{postrow.MESSAGE}</div>
16632 +
16633 + <!-- IF postrow.S_HAS_ATTACHMENTS -->
16634 + <dl class="attachbox">
16635 + <dt>
16636 + {L_ATTACHMENTS}
16637 + </dt>
16638 + <!-- BEGIN attachment -->
16639 + <dd>{postrow.attachment.DISPLAY_ATTACHMENT}</dd>
16640 + <!-- END attachment -->
16641 + </dl>
16642 + <!-- ENDIF -->
16643 +
16644 + <!-- EVENT viewtopic_body_postrow_post_notices_before -->
16645 + <!-- IF postrow.S_DISPLAY_NOTICE --><div class="rules">{L_DOWNLOAD_NOTICE}</div><!-- ENDIF -->
16646 + <!-- IF postrow.DELETED_MESSAGE or postrow.DELETE_REASON -->
16647 + <div class="notice post_deleted_msg">
16648 + {postrow.DELETED_MESSAGE}
16649 + <!-- IF postrow.DELETE_REASON --><br /><strong>{L_REASON}{L_COLON}</strong> <em>{postrow.DELETE_REASON}</em><!-- ENDIF -->
16650 + </div>
16651 + <!-- ELSEIF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
16652 + <div class="notice">
16653 + {postrow.EDITED_MESSAGE}
16654 + <!-- IF postrow.EDIT_REASON --><br /><strong>{L_REASON}{L_COLON}</strong> <em>{postrow.EDIT_REASON}</em><!-- ENDIF -->
16655 + </div>
16656 + <!-- ENDIF -->
16657 +
16658 + <!-- IF postrow.BUMPED_MESSAGE --><div class="notice"><br /><br />{postrow.BUMPED_MESSAGE}</div><!-- ENDIF -->
16659 + <!-- EVENT viewtopic_body_postrow_post_notices_after -->
16660 + <!-- IF postrow.SIGNATURE --><div id="sig{postrow.POST_ID}" class="signature">{postrow.SIGNATURE}</div><!-- ENDIF -->
16661 +
16662 + <!-- EVENT viewtopic_body_postrow_post_content_footer -->
16663 + </div>
16664 +
16665 + </div>
16666 +
16667 + <!-- EVENT viewtopic_body_postrow_back2top_before -->
16668 + <div class="back2top">
16669 + <!-- EVENT viewtopic_body_postrow_back2top_prepend -->
16670 + <a href="#top" class="top" title="{L_BACK_TO_TOP}">
16671 + <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i>
16672 + <span class="sr-only">{L_BACK_TO_TOP}</span>
16673 + </a>
16674 + <!-- EVENT viewtopic_body_postrow_back2top_append -->
16675 + </div>
16676 + <!-- EVENT viewtopic_body_postrow_back2top_after -->
16677 +
16678 + </div>
16679 + </div>
16680 +
16681 + <hr class="divider" />
16682 + <!-- EVENT viewtopic_body_postrow_post_after -->
16683 +<!-- END postrow -->
16684 +
16685 +<!-- IF S_QUICK_REPLY -->
16686 + <!-- INCLUDE quickreply_editor.html -->
16687 +<!-- ENDIF -->
16688 +
16689 +<!-- EVENT viewtopic_body_topic_actions_before -->
16690 + <div class="action-bar bar-bottom">
16691 + <!-- EVENT viewtopic_buttons_bottom_before -->
16692 +
16693 + <!-- IF not S_IS_BOT and S_DISPLAY_REPLY_INFO -->
16694 + <a href="{U_POST_REPLY_TOPIC}" class="button" title="<!-- IF S_IS_LOCKED -->{L_TOPIC_LOCKED}<!-- ELSE -->{L_POST_REPLY}<!-- ENDIF -->">
16695 + <!-- IF S_IS_LOCKED -->
16696 + <span>{L_BUTTON_TOPIC_LOCKED}</span> <i class="icon fa-lock fa-fw" aria-hidden="true"></i>
16697 + <!-- ELSE -->
16698 + <span>{L_BUTTON_POST_REPLY}</span> <i class="icon fa-reply fa-fw" aria-hidden="true"></i>
16699 + <!-- ENDIF -->
16700 + </a>
16701 + <!-- ENDIF -->
16702 + <!-- EVENT viewtopic_buttons_bottom_after -->
16703 +
16704 + <!-- INCLUDE viewtopic_topic_tools.html -->
16705 +
16706 + <!-- IF (S_NUM_POSTS > 1 or .pagination) and not S_IS_BOT -->
16707 + <form method="post" action="{S_TOPIC_ACTION}">
16708 + <!-- INCLUDE display_options.html -->
16709 + </form>
16710 + <!-- ENDIF -->
16711 +
16712 + <!-- IF .quickmod -->
16713 + <div class="quickmod dropdown-container dropdown-container-left dropdown-up dropdown-{S_CONTENT_FLOW_END} dropdown-button-control" id="quickmod">
16714 + <span title="{L_QUICK_MOD}" class="button button-secondary dropdown-trigger dropdown-select">
16715 + <i class="icon fa-gavel fa-fw" aria-hidden="true"></i><span class="sr-only">{L_QUICK_MOD}</span>
16716 + <span class="caret"><i class="icon fa-sort-down fa-fw" aria-hidden="true"></i></span>
16717 + </span>
16718 + <div class="dropdown">
16719 + <div class="pointer"><div class="pointer-inner"></div></div>
16720 + <ul class="dropdown-contents">
16721 + <!-- BEGIN quickmod -->
16722 + <!-- DEFINE $QUICKMOD_AJAX = (quickmod.VALUE in ['lock', 'unlock', 'delete_topic', 'restore_topic', 'make_normal', 'make_sticky', 'make_announce', 'make_global']) -->
16723 + <li><a href="{quickmod.LINK}"<!-- IF $QUICKMOD_AJAX --> data-ajax="true" data-refresh="true"<!-- ENDIF -->>{quickmod.TITLE}</a></li>
16724 + <!-- END quickmod -->
16725 + </ul>
16726 + </div>
16727 + </div>
16728 + <!-- ENDIF -->
16729 +
16730 + <!-- EVENT viewtopic_dropdown_bottom_custom -->
16731 +
16732 + <!-- IF .pagination or TOTAL_POSTS -->
16733 + <div class="pagination">
16734 + {TOTAL_POSTS}
16735 + <!-- IF .pagination -->
16736 + <!-- INCLUDE pagination.html -->
16737 + <!-- ELSE -->
16738 + &bull; {PAGE_NUMBER}
16739 + <!-- ENDIF -->
16740 + </div>
16741 + <!-- ENDIF -->
16742 +</div>
16743 +
16744 +<!-- EVENT viewtopic_body_footer_before -->
16745 +<!-- INCLUDE jumpbox.html -->
16746 +
16747 +<!-- IF S_DISPLAY_ONLINE_LIST and U_VIEWONLINE -->
16748 + <div class="stat-block online-list">
16749 + <h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3>
16750 + <p>{LOGGED_IN_USER_LIST}</p>
16751 + </div>
16752 +<!-- ENDIF -->
16753 +
16754 +<!-- INCLUDE overall_footer.html -->
16755
16756 diff --git a/AllanStyle-SUBSILVER/theme/base.css b/AllanStyle-SUBSILVER/theme/base.css
16757 new file mode 100644
16758 index 000000000..98c57d926
16759 --- /dev/null
16760 +++ b/AllanStyle-SUBSILVER/theme/base.css
16761 @@ -0,0 +1,115 @@
16762 +/* --------------------------------------------------------------
16763 + $Base
16764 +-------------------------------------------------------------- */
16765 +
16766 +/** {
16767 + -webkit-box-sizing: border-box;
16768 + -moz-box-sizing: border-box;
16769 + box-sizing: border-box;
16770 +}
16771 +*:before,
16772 +*:after {
16773 + -webkit-box-sizing: border-box;
16774 + -moz-box-sizing: border-box;
16775 + box-sizing: border-box;
16776 +}*/
16777 +
16778 +/* Define your base font-size here; most elements will inherit this. _NO__DOTCOMMA__AFTER__*/
16779 +html {
16780 + font-size: 1em; /* Assuming 16px... */
16781 + line-height: 1.5; /* 24px (This is now our magic number; all subsequent margin-bottoms and line-heights want to be a multiple of this number in order to maintain vertical rhythm.) _NO__DOTCOMMA__AFTER__*/
16782 + -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
16783 +}
16784 +
16785 +body {
16786 + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
16787 + color: #333333;
16788 + background-color: #ffffff;
16789 +}
16790 +
16791 +input,
16792 +button,
16793 +select,
16794 +textarea {
16795 + font-family: inherit;
16796 + font-size: inherit;
16797 + line-height: inherit;
16798 +}
16799 +
16800 +figure { margin: 0 }
16801 +img { vertical-align: middle }
16802 +
16803 +hr {
16804 + margin-top: 20px;
16805 + margin-bottom: 20px;
16806 + border: 0;
16807 + border-top: 1px solid #e5e5e5;
16808 +}
16809 +
16810 +a {
16811 + color: #428bca;
16812 + text-decoration: none;
16813 +}
16814 +
16815 +a:hover,
16816 +a:focus,
16817 +a:active {
16818 + color: #2a6496;
16819 + text-decoration: underline;
16820 +}
16821 +
16822 +blockquote,
16823 +dl,
16824 +dd,
16825 +h1,
16826 +h2,
16827 +h3,
16828 +h4,
16829 +h5,
16830 +h6,
16831 +figure,
16832 +p,
16833 +pre { margin: 0 }
16834 +button {
16835 + background: transparent;
16836 + border: 0;
16837 + padding: 0;
16838 +}
16839 +
16840 +/**
16841 + * Work around a Firefox/IE bug where the transparent `button` background
16842 + * results in a loss of the default `button` focus styles.
16843 + */
16844 +button:focus {
16845 + outline: 1px dotted;
16846 + outline: 5px auto -webkit-focus-ring-color;
16847 +}
16848 +
16849 +fieldset {
16850 + border: 0;
16851 + margin: 0;
16852 + padding: 0;
16853 +}
16854 +
16855 +iframe { border: 0 }
16856 +ol,
16857 +ul {
16858 + list-style: none;
16859 + margin: 0;
16860 + padding: 0;
16861 +}
16862 +
16863 +/**
16864 + * Suppress the focus outline on links that cannot be accessed via keyboard.
16865 + * This prevents an unwanted focus outline from appearing around elements that
16866 + * might still respond to pointer events.
16867 + */
16868 +[tabindex="-1"]:focus { outline: none !important }
16869 +
16870 +/**
16871 + * Remove double underline from recent version of firefox
16872 + */
16873 +abbr[title] {
16874 + text-decoration: none;
16875 +}
16876 +
16877
16878 diff --git a/AllanStyle-SUBSILVER/theme/bidi.css b/AllanStyle-SUBSILVER/theme/bidi.css
16879 new file mode 100644
16880 index 000000000..79b769b1e
16881 --- /dev/null
16882 +++ b/AllanStyle-SUBSILVER/theme/bidi.css
16883 @@ -0,0 +1,1090 @@
16884 +/* RTL definitions
16885 +---------------------------------------- */
16886 +
16887 +/**
16888 +* common.css
16889 +*/
16890 +.rtl h1 {
16891 + margin-right: 0;
16892 + margin-left: 200px;
16893 +}
16894 +
16895 +.rtl p.right {
16896 + text-align: left;
16897 +}
16898 +
16899 +.rtl p.jumpbox-return {
16900 + float: right;
16901 +}
16902 +
16903 +.rtl div.rules ul {
16904 + margin-left: 0;
16905 + margin-right: 20px;
16906 +}
16907 +
16908 +/* Main blocks
16909 +---------------------------------------- */
16910 +.rtl .icon {
16911 + padding-right: 0;
16912 + padding-left: 2px;
16913 +}
16914 +
16915 +.rtl .logo {
16916 + float: right;
16917 + padding: 10px 10px 0 13px;
16918 +}
16919 +
16920 +/* Site Description
16921 +--------------------------------------------- */
16922 +.rtl .site-description {
16923 + float: right;
16924 +}
16925 +
16926 +.rtl .site-description h1 {
16927 + margin-left: 0;
16928 +}
16929 +
16930 +/* Round cornered boxes and backgrounds
16931 +---------------------------------------- */
16932 +.rtl .post {
16933 + background-position: 0 0;
16934 +}
16935 +
16936 +/* Horizontal lists
16937 +----------------------------------------*/
16938 +.rtl ul.linklist > li {
16939 + float: right;
16940 + margin-right: 0;
16941 + margin-left: 7px;
16942 +}
16943 +
16944 +.rtl ul.linklist > li.rightside, .rtl p.rightside, .rtl a.rightside {
16945 + float: left;
16946 + margin-right: 7px;
16947 + margin-left: 0;
16948 + text-align: left;
16949 +}
16950 +
16951 +.rtl ul.leftside > li, .rtl ul.rightside > li {
16952 + float: left;
16953 +}
16954 +
16955 +.rtl ul.leftside {
16956 + float: right;
16957 + margin-left: 5px;
16958 + margin-right: 0;
16959 + text-align: right;
16960 +}
16961 +
16962 +.rtl ul.rightside {
16963 + float: left;
16964 + margin-left: -5px;
16965 + margin-right: 5px;
16966 + text-align: left;
16967 +}
16968 +
16969 +/* Bulletin icons for list items
16970 +----------------------------------------*/
16971 +.rtl ul.linklist.bulletin > li:before {
16972 + padding-left: 4px;
16973 + padding-right: 0;
16974 +}
16975 +
16976 +/* Dropdown menu
16977 +---------------------------------------- */
16978 +.rtl .dropdown-container.topic-tools, .rtl .dropdown-container-left {
16979 + float: right;
16980 +}
16981 +
16982 +.rtl .dropdown li {
16983 + text-align: right;
16984 +}
16985 +
16986 +.rtl .dropdown-contents > li {
16987 + padding-left: 15px;
16988 + padding-right: 0;
16989 +}
16990 +
16991 +.rtl .dropdown-nonscroll > li {
16992 + padding-left: 0;
16993 +}
16994 +
16995 +.rtl .dropdown li li {
16996 + padding-left: 0;
16997 + padding-right: 18px;
16998 +}
16999 +
17000 +.rtl .dropdown-extended .header {
17001 + text-align: right;
17002 +}
17003 +
17004 +.rtl .dropdown-extended .header .header_settings, .rtl .dropdown-container-right {
17005 + float: left;
17006 +}
17007 +
17008 +.rtl .jumpbox .dropdown-contents a {
17009 + margin-right: 0;
17010 + margin-left: 20px;
17011 +}
17012 +
17013 +/* Notifications
17014 +-----------------------------------------*/
17015 +.rtl .notification_list ul li img {
17016 + float: right;
17017 + margin-left: 5px;
17018 + margin-right: 0;
17019 +}
17020 +
17021 +.rtl .notification_list div.notifications {
17022 + margin-left: 0;
17023 + margin-right: 50px;
17024 +}
17025 +
17026 +.rtl .notification_text {
17027 + margin-left: 0;
17028 + margin-right: 58px;
17029 +}
17030 +
17031 +.rtl .notification_list p.notification-time {
17032 + text-align: left;
17033 +}
17034 +
17035 +/* Responsive breadcrumbs
17036 +----------------------------------------*/
17037 +.rtl .breadcrumbs .crumb {
17038 + float: right;
17039 +}
17040 +
17041 +/* Table styles
17042 +----------------------------------------*/
17043 +.rtl table.table1 thead th {
17044 + padding: 0 3px 4px 0;
17045 +}
17046 +
17047 +.rtl table.table1 thead th span {
17048 + padding-left: 0;
17049 + padding-right: 7px;
17050 +}
17051 +
17052 +.rtl table.table1 tbody th {
17053 + text-align: right;
17054 +}
17055 +
17056 +/* Specific column styles */
17057 +.rtl table.table1 .name { text-align: right; }
17058 +.rtl table.table1 .joined { text-align: right; }
17059 +.rtl table.table1 .active { text-align: right; }
17060 +.rtl table.table1 .info { text-align: right; }
17061 +.rtl table.table1 thead .autocol { padding-left: 0; padding-right: 1em; }
17062 +
17063 +.rtl table.table1 span.rank-img {
17064 + float: left;
17065 +}
17066 +
17067 +.rtl table.info tbody th {
17068 + text-align: left;
17069 +}
17070 +
17071 +.rtl .forumbg table.table1 {
17072 + margin: 0 -1px -1px -2px;
17073 +}
17074 +
17075 +/* Misc layout styles
17076 +---------------------------------------- */
17077 +/* column[1-2] styles are containers for two column layouts */
17078 +.rtl .column1 {
17079 + float: right;
17080 + clear: right;
17081 +}
17082 +
17083 +.rtl .column2 {
17084 + float: left;
17085 + clear: left;
17086 +}
17087 +
17088 +/* General classes for placing floating blocks */
17089 +.rtl .left-box {
17090 + float: right;
17091 + text-align: right;
17092 +}
17093 +
17094 +.rtl .right-box {
17095 + float: left;
17096 + text-align: left;
17097 +}
17098 +
17099 +.rtl dl.details dt {
17100 + float: right;
17101 + clear: right;
17102 + text-align: left;
17103 +}
17104 +
17105 +.rtl dl.details dd {
17106 + margin-right: 0;
17107 + margin-left: 0;
17108 + padding-right: 5px;
17109 + padding-left: 0;
17110 + float: right;
17111 +}
17112 +
17113 +*:first-child+html dl.details dd {
17114 + margin-right: 30%;
17115 + float: none;
17116 +}
17117 +
17118 +* html dl.details dd {
17119 + margin-right: 30%;
17120 + float: none;
17121 +}
17122 +
17123 +/* Pagination
17124 +---------------------------------------- */
17125 +.rtl .page-number {
17126 + float: left;
17127 +}
17128 +
17129 +.rtl .pagination {
17130 + text-align: left;
17131 + float: left;
17132 +}
17133 +
17134 +.rtl .pagination > ul {
17135 + margin-left: 0;
17136 + margin-right: 5px;
17137 +}
17138 +
17139 +/* Pagination in viewforum for multipage topics */
17140 +.rtl .row .pagination {
17141 + background-position: 100% 50%;
17142 + float: left;
17143 + padding-left: 0;
17144 + padding-right: 15px;
17145 +}
17146 +
17147 +.rtl .row .pagination > ul {
17148 + margin: 0;
17149 +}
17150 +
17151 +.rtl .pagination span {
17152 + direction: ltr;
17153 +}
17154 +
17155 +.pagination li.page-jump {
17156 + margin-left: 5px;
17157 + margin-right: 0;
17158 +}
17159 +
17160 +/* Action Bar styles
17161 +---------------------------------------- */
17162 +.rtl .action-bar .button {
17163 + margin-right: 0;
17164 + float: right;
17165 +}
17166 +
17167 +.rtl .action-bar > .button {
17168 + margin-left: 5px;
17169 + float: right;
17170 +}
17171 +
17172 +.rtl .action-bar .dropdown-button-control .button {
17173 + margin-left: 5px;
17174 +}
17175 +
17176 +
17177 +/* Miscellaneous styles
17178 +---------------------------------------- */
17179 +.rtl .quick-links {
17180 + margin-left: 7px;
17181 + margin-right: 0;
17182 +}
17183 +
17184 +.rtl .header-avatar span:after {
17185 + float: left;
17186 + padding-left: 0;
17187 + padding-right: 2px;
17188 +}
17189 +
17190 +.rtl .member-search {
17191 + float: right;
17192 +}
17193 +
17194 +/**
17195 +* links.css
17196 +*/
17197 +
17198 +/* Links adjustment to correctly display an order of rtl/ltr mixed content */
17199 +.rtl a {
17200 + direction: rtl;
17201 + unicode-bidi: embed;
17202 +}
17203 +
17204 +li.breadcrumbs span:first-child > a {
17205 + padding-left: 0;
17206 +}
17207 +
17208 +/* Notification mark read link */
17209 +.rtl .dropdown-extended a.mark_read {
17210 + border-radius: 0 3px 3px 0;
17211 + left: 0;
17212 + right: auto;
17213 +}
17214 +
17215 +.rtl .back2top .top {
17216 + float: left;
17217 + margin-left: -10px;
17218 +}
17219 +
17220 +.rtl .skiplink {
17221 + /* invisible skip link, used for accessibility */
17222 + left: 0;
17223 + right: -999px;
17224 +}
17225 +
17226 +.rtl a.feed-icon-forum {
17227 + float: left;
17228 +}
17229 +
17230 +/**
17231 +* content.css
17232 +*/
17233 +.rtl ul.topiclist dt, .rtl li.header dt {
17234 + float: right;
17235 + margin-right: 0;
17236 + margin-left: -440px;
17237 +}
17238 +
17239 +.rtl ul.topiclist.missing-column dt {
17240 + margin-right: 0;
17241 + margin-left: -345px;
17242 +}
17243 +
17244 +.rtl ul.topiclist.two-long-columns dt {
17245 + margin-right: 0;
17246 + margin-left: -250px;
17247 +}
17248 +
17249 +.rtl ul.topiclist.two-columns dt {
17250 + margin-right: 0;
17251 + margin-left: -80px;
17252 +}
17253 +
17254 +.rtl ul.topiclist dt .list-inner {
17255 + margin-right: 0;
17256 + margin-left: 440px;
17257 +}
17258 +
17259 +.rtl ul.topiclist.missing-column dt .list-inner {
17260 + margin-right: 0;
17261 + margin-left: 330px;
17262 +}
17263 +
17264 +.rtl ul.topiclist.two-long-columns dt .list-inner {
17265 + margin-right: 0;
17266 + margin-left: 250px;
17267 +}
17268 +
17269 +.rtl ul.topiclist.two-columns dt .list-inner {
17270 + margin-right: 0;
17271 + margin-left: 80px;
17272 +}
17273 +
17274 +.rtl ul.topiclist dd {
17275 + float: right;
17276 + border-right-width: 1px;
17277 + border-right-style: solid;
17278 + border-left: none;
17279 +}
17280 +
17281 +.rtl ul.topiclist dfn {
17282 + left: auto;
17283 + right: -999px;
17284 +}
17285 +
17286 +.rtl ul.topiclist li.row dt a.subforum {
17287 + padding-right: 12px;
17288 + background-position: right;
17289 + position: static;
17290 +}
17291 +
17292 +.rtl .forum-image {
17293 + float: right;
17294 + margin-right: 0;
17295 + margin-left: 5px;
17296 +}
17297 +
17298 +.rtl li.header dt, .rtl li.header dd {
17299 + border-right-width: 0;
17300 +}
17301 +
17302 +.rtl li.header dd {
17303 + padding-left: 0;
17304 + padding-right: 1px;
17305 +}
17306 +
17307 +.rtl dl.row-item{
17308 + background-position: 99.5% 50%;
17309 +}
17310 +
17311 +.rtl li.header dl.row-item dt .list-inner {
17312 + /* Tweak for headers alignment when folder icon used */
17313 + padding-right: 0;
17314 + padding-left: 50px;
17315 +}
17316 +
17317 +.rtl dl.row-item dt {
17318 + background-position: 99.5% 95%; /* Position of topic icon */
17319 +}
17320 +
17321 +.rtl dl.row-item dt .list-inner {
17322 + padding-left: 5px;
17323 + padding-right: 45px; /* Space for folder icon */
17324 +}
17325 +
17326 +.rtl dl a.row-item-link { /* topic row icon links */
17327 + display: inline-block;
17328 + left: auto;
17329 + right: 0;
17330 + margin-left: 0;
17331 + margin-right: 2px;
17332 +}
17333 +
17334 +.rtl dd.lastpost > span, .rtl ul.topiclist dd.info > span, .rtl ul.topiclist dd.time > span, .rtl dd.redirect > span, .rtl dd.moderation > span {
17335 + padding-left: 0;
17336 + padding-right: 5px;
17337 +}
17338 +
17339 +/* Post body styles
17340 +----------------------------------------*/
17341 +.rtl .date {
17342 + float: left;
17343 +}
17344 +
17345 +.rtl .postbody, .rtl .postbody h3 {
17346 + float: right;
17347 +}
17348 +
17349 +.rtl .has-profile .postbody h3 {
17350 + margin-right: 0;
17351 + margin-left: 180px;
17352 +}
17353 +
17354 +.rtl p.post-notice {
17355 + padding-left: 5px;
17356 +}
17357 +
17358 +.rtl p.post-notice:before {
17359 + left: auto;
17360 + right: 0;
17361 +}
17362 +
17363 +/* Topic review panel
17364 +----------------------------------------*/
17365 +.rtl .topicreview {
17366 + padding-right: 0;
17367 + padding-left: 5px;
17368 +}
17369 +
17370 +/* Content container styles
17371 +----------------------------------------*/
17372 +.rtl .content ul, .rtl .content ol {
17373 + margin-right: 3em;
17374 + margin-left: 0;
17375 +}
17376 +
17377 +.rtl .signature {
17378 + clear: right;
17379 +}
17380 +
17381 +.rtl .notice {
17382 + clear: right;
17383 +}
17384 +
17385 +/* Jump to post link for now */
17386 +.rtl ul.searchresults {
17387 + text-align: left;
17388 +}
17389 +
17390 +/* BB Code styles
17391 +----------------------------------------*/
17392 +/* Quote block */
17393 +.rtl blockquote {
17394 + margin: 0.5em 25px 0 1px;
17395 +}
17396 +
17397 +.rtl blockquote blockquote {
17398 + /* Nested quotes */
17399 + margin: 0.5em 15px 0 1px;
17400 +}
17401 +
17402 +.rtl blockquote cite {
17403 + /* Username/source of quoter */
17404 + margin-left: 0;
17405 +}
17406 +
17407 +.rtl blockquote cite:before, .rtl .uncited:before {
17408 + padding-left: 5px;
17409 +}
17410 +
17411 +.rtl blockquote .codebox {
17412 + margin-right: 0;
17413 +}
17414 +
17415 +.rtl code {
17416 + direction: ltr;
17417 +}
17418 +
17419 +/* Attachments
17420 +----------------------------------------*/
17421 +.rtl .attachbox {
17422 + float: right;
17423 + margin: 5px 0 5px 5px;
17424 + clear: right;
17425 +}
17426 +
17427 +.rtl .attachbox dd {
17428 + clear: right;
17429 +}
17430 +
17431 +.rtl .attachbox p {
17432 + clear: right;
17433 +}
17434 +
17435 +.rtl .attachbox p.stats {
17436 + clear: right;
17437 +}
17438 +
17439 +/* Post poll styles
17440 +----------------------------------------*/
17441 +.rtl fieldset.polls dt {
17442 + text-align: right;
17443 + float: right;
17444 + border-left: none;
17445 +}
17446 +
17447 +.rtl fieldset.polls dd {
17448 + float: right;
17449 + border-right: none;
17450 + margin-right: 0;
17451 +}
17452 +
17453 +.rtl fieldset.polls dd div {
17454 + text-align: left;
17455 +}
17456 +
17457 +.rtl .pollbar1, .rtl .pollbar2, .rtl .pollbar3, .rtl .pollbar4, .rtl .pollbar5 {
17458 + border-left-width: 1px;
17459 + border-left-style: solid;
17460 + border-right: none;
17461 +}
17462 +
17463 +/* Poster profile block
17464 +----------------------------------------*/
17465 +.rtl .postprofile {
17466 + border-width: 0 1px 0 0;
17467 + float: left;
17468 +/* text-align: right; */
17469 +}
17470 +
17471 +.rtl .pm .postprofile {
17472 + border-right-width: 1px;
17473 + border-right-style: solid;
17474 + border-left: none;
17475 +}
17476 +
17477 +.rtl .postprofile dd, .rtl .postprofile dt {
17478 + margin-left: 0;
17479 + margin-right: 8px;
17480 +}
17481 +
17482 +.rtl .postprofile .avatar {
17483 + float: right;
17484 +}
17485 +
17486 +.rtl .online {
17487 + background-position: 0 0;
17488 +}
17489 +
17490 +.rtl dl.pmlist dd {
17491 + margin-right: 61% !important;
17492 + margin-left: 0 !important;
17493 +}
17494 +
17495 +/**
17496 +* buttons.css
17497 +*/
17498 +
17499 +.rtl .caret {
17500 + border-right: 1px solid;
17501 + border-right-color: inherit;
17502 + border-left: none;
17503 + right: 6px;
17504 +}
17505 +
17506 +/* Post control buttons
17507 +--------------------------------------------- */
17508 +.rtl .post-buttons {
17509 + float: left;
17510 +}
17511 +
17512 +.rtl .has-profile .post-buttons {
17513 + left: 0;
17514 + right: auto;
17515 +}
17516 +
17517 +.rtl .post-buttons li {
17518 + float: right;
17519 +}
17520 +
17521 +/* Poster contact icons
17522 + ----------------------------------------*/
17523 +.rtl .contact-icons a {
17524 + border-left-width: 1px;
17525 + border-left-style: dotted;
17526 + border-right: none;
17527 + float: right;
17528 +}
17529 +
17530 +.rtl .contact-icons .last-cell {
17531 + border-left: none;
17532 +}
17533 +
17534 +/**
17535 +* cp.css
17536 +*/
17537 +/* Control Panel Styles
17538 +---------------------------------------- */
17539 +
17540 +
17541 +/* Main CP box
17542 +----------------------------------------*/
17543 +.rtl .cp-menu {
17544 + float: right;
17545 +}
17546 +
17547 +.rtl .cp-main {
17548 + float: right;
17549 +}
17550 +
17551 +.rtl .cp-main .panel ol {
17552 + margin-right: 2em;
17553 + margin-left: 0;
17554 +}
17555 +
17556 +.rtl .cp-main .buttons {
17557 + margin-right: 0;
17558 + margin-left: 0;
17559 +}
17560 +
17561 +.tabs-container h2 {
17562 + float: right;
17563 +}
17564 +
17565 +/* CP tabbed menu
17566 +----------------------------------------*/
17567 +.rtl .tabs {
17568 + margin-left: 0;
17569 + margin-right: 7px;
17570 +}
17571 +
17572 +.rtl .tabs .tab {
17573 + float: right;
17574 +}
17575 +
17576 +.rtl .tabs .tab > a {
17577 + margin-left: 1px;
17578 + margin-right: 0;
17579 +}
17580 +
17581 +/* Mini tabbed menu used in MCP
17582 +----------------------------------------*/
17583 +.rtl .minitabs {
17584 + float: left;
17585 + margin-right: 0;
17586 + margin-left: 7px;
17587 +}
17588 +
17589 +.rtl .minitabs .tab {
17590 + float: left;
17591 +}
17592 +
17593 +.rtl .minitabs .tab > a {
17594 + margin-right: 2px;
17595 + margin-left: 0;
17596 +}
17597 +
17598 +/* Responsive tabs
17599 +----------------------------------------*/
17600 +.rtl .tabs .dropdown {
17601 + margin-left: -2px;
17602 +}
17603 +
17604 +.rtl .tabs .dropdown li {
17605 + text-align: left;
17606 +}
17607 +
17608 +.rtl .minitabs .dropdown {
17609 + margin-left: -4px;
17610 +}
17611 +
17612 +.rtl .minitabs .dropdown li {
17613 + text-align: right;
17614 +}
17615 +
17616 +/* Responsive *CP navigation
17617 +----------------------------------------*/
17618 +@media only screen and (max-width: 900px), only screen and (max-device-width: 900px)
17619 +{
17620 + .rtl .cp-menu, .rtl .navigation, .rtl .cp-main {
17621 + float: none;
17622 + }
17623 +}
17624 +
17625 +/* UCP navigation menu
17626 +----------------------------------------*/
17627 +
17628 +/* Preferences pane layout
17629 +----------------------------------------*/
17630 +.rtl .cp-main h2 {
17631 + margin-left: 0;
17632 + margin-right: 10px;
17633 +}
17634 +
17635 +/* Friends list */
17636 +.rtl .cp-mini {
17637 + margin: 10px 5px 10px 15px;
17638 +}
17639 +
17640 +/* PM Styles
17641 +----------------------------------------*/
17642 +
17643 +/* PM panel adjustments */
17644 +.rtl .reply-all a.right {
17645 + background-position: 5% 60%;
17646 +}
17647 +
17648 +.rtl .reply-all a.right:hover {
17649 + background-position: 3% 60%;
17650 +}
17651 +
17652 +.rtl .reply-all {
17653 + padding-left: 5px;
17654 +}
17655 +
17656 +/* Defined rules list for PM options */
17657 +.rtl ol.def-rules {
17658 + padding-right: 0;
17659 +}
17660 +
17661 +/* PM marking colours */
17662 +.rtl .pm-legend {
17663 + border-right-width: 10px;
17664 + border-right-style: solid;
17665 + border-left-width: 0;
17666 + padding-left: 0;
17667 + padding-right: 3px;
17668 +}
17669 +
17670 +/* Avatar gallery */
17671 +.rtl .gallery label {
17672 + float: right;
17673 +}
17674 +
17675 +/* Responsive *CP navigation
17676 +----------------------------------------*/
17677 +@media only screen and (max-width: 900px), only screen and (max-device-width: 900px)
17678 +{
17679 + .rtl .cp-menu, .rtl .navigation, .rtl .cp-main {
17680 + float: none;
17681 + }
17682 +}
17683 +
17684 +/**
17685 +* forms.css
17686 +*/
17687 +
17688 +/* General form styles
17689 +----------------------------------------*/
17690 +
17691 +.rtl option {
17692 + padding-right: 0;
17693 + padding-left: 1em;
17694 +}
17695 +
17696 +.rtl label {
17697 + padding-right: 0;
17698 + padding-left: 5px;
17699 +}
17700 +
17701 +/* Definition list layout for forms
17702 +---------------------------------------- */
17703 +.rtl fieldset dt {
17704 + float: right;
17705 + text-align: right;
17706 +}
17707 +
17708 +.rtl fieldset dd {
17709 + margin-left: 0;
17710 + margin-right: 41%;
17711 +}
17712 +
17713 +/* Specific layout 1 */
17714 +.rtl fieldset.fields1 dt {
17715 + border-left-width: 0;
17716 + border-right-width: 1px;
17717 +}
17718 +
17719 +.rtl fieldset.fields1 dd {
17720 + margin-right: 15em;
17721 + margin-left: 0;
17722 + border-right-width: 0;
17723 + border-left-width: 1px;
17724 +}
17725 +
17726 +/* Specific layout 2 */
17727 +.rtl fieldset.fields2 dt {
17728 + border-right-width: 1px;
17729 + border-left-width: 0;
17730 +}
17731 +
17732 +.rtl fieldset.fields2 dd {
17733 + margin-right: 16em;
17734 + margin-left: 0;
17735 + border-left-width: 1px;
17736 + border-right-width: 0;
17737 +}
17738 +
17739 +/* Form elements */
17740 +.rtl dt label {
17741 + text-align: right;
17742 +}
17743 +
17744 +.rtl dd input, .rtl dd textarea {
17745 + margin-left: 3px;
17746 + margin-right: 0;
17747 +}
17748 +
17749 +/* Quick-login on index page */
17750 +.rtl fieldset.quick-login input.inputbox {
17751 + margin-left: 5px;
17752 + margin-right: 0;
17753 +}
17754 +
17755 +.rtl fieldset.quick-login label {
17756 + padding-left: 2px;
17757 + padding-right: 0;
17758 +}
17759 +
17760 +/* Display options on viewtopic/viewforum pages */
17761 +.rtl fieldset.display-options label {
17762 + padding-left: 2px;
17763 + padding-right: 0;
17764 +}
17765 +
17766 +.rtl .dropdown fieldset.display-options label {
17767 + text-align: left;
17768 +}
17769 +
17770 +/* Display actions for ucp and mcp pages */
17771 +.rtl fieldset.display-actions {
17772 + text-align: left;
17773 + padding-left: 1em;
17774 + padding-right: 0;
17775 +}
17776 +
17777 +.rtl fieldset.display-actions label {
17778 + padding-left: 2px;
17779 + padding-right: 0;
17780 +}
17781 +
17782 +/* MCP forum selection*/
17783 +.rtl fieldset.forum-selection {
17784 + float: left;
17785 +}
17786 +
17787 +.rtl fieldset.forum-selection2 {
17788 + float: left;
17789 +}
17790 +
17791 +/* Posting page styles
17792 +----------------------------------------*/
17793 +
17794 +/* Emoticons panel */
17795 +.rtl .smiley-box {
17796 + float: left;
17797 +}
17798 +
17799 +/* Search box
17800 +---------------------------------------- */
17801 +
17802 +/* Topic and forum Search */
17803 +.rtl .search-box {
17804 + float: right;
17805 +}
17806 +
17807 +.rtl .search-box .inputbox {
17808 + border-left-width: 0;
17809 + border-right-width: 1px;
17810 + border-radius: 0 4px 4px 0;
17811 + float: right;
17812 + padding: 3px;
17813 +}
17814 +
17815 +.rtl .button-search,
17816 +.button-search-end {
17817 + float: right;
17818 +}
17819 +
17820 +.rtl .button-search-end {
17821 + border-radius: 4px 0 0 4px;
17822 + border-left-width: 1px;
17823 + border-right-width: 0;
17824 +}
17825 +
17826 +.rtl .search-header .button-search-end {
17827 + border: 0;
17828 + border-radius: 4px 0 0 4px;
17829 +}
17830 +
17831 +.rtl .search-header {
17832 + float: left;
17833 + margin-right: 0;
17834 + margin-left: 5px;
17835 +}
17836 +
17837 +/* Form button styles
17838 +---------------------------------------- */
17839 +
17840 +/** Reference: Bug #27155 */
17841 +.rtl .wrap, .rtl .headerbar, .rtl .site-description, .rtl .navbar {
17842 + position: relative;
17843 +}
17844 +
17845 +/**
17846 +* plupload.css
17847 +*/
17848 +
17849 +.rtl .attach-controls {
17850 + float: left;
17851 +}
17852 +
17853 +/**
17854 +* responsive.css
17855 +*/
17856 +@media only screen and (max-width: 700px), only screen and (max-device-width: 700px)
17857 +{
17858 + /* .topiclist lists
17859 + ----------------------------------------*/
17860 + .rtl ul.topiclist li.header dt, .rtl ul.topiclist li.header dt .list-inner {
17861 + margin-left: 0 !important;
17862 + padding-left: 0;
17863 + }
17864 +
17865 + .rtl ul.topiclist dt, .rtl ul.topiclist dt .list-inner,
17866 + .rtl ul.topiclist.missing-column dt, .rtl ul.topiclist.missing-column dt .list-inner,
17867 + .rtl ul.topiclist.two-long-columns dt, .rtl ul.topiclist.two-long-columns dt .list-inner,
17868 + .rtl ul.topiclist.two-columns dt, .rtl ul.topiclist.two-columns dt .list-inner {
17869 + margin-left: 0;
17870 + }
17871 +
17872 + .rtl ul.topiclist dt .list-inner.with-mark {
17873 + padding-left: 34px;
17874 + }
17875 +
17876 + /* Forums and topics lists
17877 + ----------------------------------------*/
17878 + .rtl ul.topiclist.forums dt {
17879 + margin-left: -250px;
17880 + }
17881 + .rtl ul.topiclist.forums dt .list-inner {
17882 + margin-left: 250px;
17883 + }
17884 +
17885 + .rtl ul.topiclist dd.mark {
17886 + left: 5px;
17887 + right: auto;
17888 + text-align: right;
17889 + }
17890 +
17891 + .rtl table.responsive.show-header thead, .rtl table.responsive.show-header th:first-child {
17892 + text-align: right !important;
17893 + }
17894 +
17895 + .rtl table.responsive td {
17896 + text-align: right !important;
17897 + }
17898 +
17899 + /* User profile
17900 + ----------------------------------------*/
17901 + .rtl .column1, .rtl .column2, .rtl .left-box.profile-details {
17902 + float: none;
17903 + }
17904 +
17905 + /* Post
17906 + ----------------------------------------*/
17907 + .rtl .postprofile, .rtl .postbody, .rtl .search .postbody {
17908 + float: none;
17909 + }
17910 +
17911 + .rtl .post .postprofile {
17912 + border-width: 0 0 1px 0;
17913 + }
17914 +
17915 + .rtl .postprofile dt, .rtl .postprofile dd.profile-rank, .rtl .search .postprofile dd {
17916 + margin: 0;
17917 + }
17918 +
17919 + .rtl .postprofile .avatar {
17920 + margin-left: 5px;
17921 + margin-right: 0;
17922 + }
17923 +
17924 + .rtl .has-profile .post-buttons {
17925 + left: 20px;
17926 + }
17927 +
17928 + /* Forms
17929 + ----------------------------------------*/
17930 + .rtl fieldset dt, .rtl fieldset.fields1 dt, .rtl fieldset.fields2 dt {
17931 + float: none;
17932 + }
17933 +
17934 + .rtl fieldset dd, .rtl fieldset.fields1 dd, .rtl fieldset.fields2 dd {
17935 + margin-right: 20px;
17936 + }
17937 +}
17938 +
17939 +@media only screen and (max-width: 550px), only screen and (max-device-width: 550px)
17940 +{
17941 + /* .topiclist lists
17942 + ----------------------------------------*/
17943 + .rtl ul.topiclist.forums dt {
17944 + margin-left: 0;
17945 + }
17946 +
17947 + .rtl ul.topiclist.forums dt .list-inner {
17948 + margin-left: 0;
17949 + }
17950 +}
17951 +
17952 +@media only screen and (max-width: 500px), only screen and (max-device-width: 500px)
17953 +{
17954 + .rtl dl.details dt, .rtl dl.details dd {
17955 + float: none;
17956 + text-align: right;
17957 + }
17958 +
17959 + .rtl dl.details dd {
17960 + margin-left: 0;
17961 + margin-right: 20px;
17962 + }
17963 +
17964 + .captcha-panel dd.captcha {
17965 + margin-right: 0;
17966 + }
17967 +
17968 + .rtl p.responsive-center {
17969 + float: none;
17970 + text-align: center;
17971 + margin-bottom: 5px;
17972 + }
17973 +}
17974
17975 diff --git a/AllanStyle-SUBSILVER/theme/buttons.css b/AllanStyle-SUBSILVER/theme/buttons.css
17976 new file mode 100644
17977 index 000000000..a16bbf1ee
17978 --- /dev/null
17979 +++ b/AllanStyle-SUBSILVER/theme/buttons.css
17980 @@ -0,0 +1,198 @@
17981 +/* Button Styles
17982 +---------------------------------------- */
17983 +
17984 +.button {
17985 + display: inline-block;
17986 + padding: 2px 8px;
17987 + font-size: 13px;
17988 + font-weight: normal;
17989 + font-family: "Open Sans", "Droid Sans", Verdana, Arial, Helvetica;
17990 + line-height: 1.4;
17991 + text-align: center;
17992 + white-space: nowrap;
17993 + vertical-align: middle;
17994 + -ms-touch-action: manipulation;
17995 + touch-action: manipulation;
17996 + cursor: pointer;
17997 + -webkit-user-select: none;
17998 + -moz-user-select: none;
17999 + -ms-user-select: none;
18000 + user-select: none;
18001 + border: 1px solid transparent;
18002 + border-radius: 4px;
18003 +}
18004 +
18005 +.button:focus,
18006 +.button:hover {
18007 + text-decoration: none;
18008 + outline: none;
18009 +}
18010 +
18011 +.caret {
18012 + border-left: 1px solid;
18013 + position: relative;
18014 + right: -6px;
18015 +}
18016 +
18017 +.caret i {
18018 + vertical-align: top;
18019 +}
18020 +
18021 +/* Posting page styles
18022 +----------------------------------------*/
18023 +.button-search,
18024 +.button-search-end {
18025 + float: left;
18026 + border-radius: 0;
18027 + margin: 0;
18028 + padding: 2px 5px;
18029 +}
18030 +
18031 +.button-search-end {
18032 + border-left-width: 0;
18033 + border-radius: 0 4px 4px 0;
18034 +}
18035 +
18036 +.search-header .button-search,
18037 +.search-header .button-search-end {
18038 + border-top-width: 0;
18039 + border-bottom-width: 0;
18040 + padding: 3px 5px;
18041 +}
18042 +
18043 +.search-header .button-search-end {
18044 + border-right-width: 0;
18045 +}
18046 +
18047 +.button-icon-only {
18048 + padding-left: 3px;
18049 + padding-right: 3px;
18050 +}
18051 +
18052 +/* Poster contact icons
18053 +----------------------------------------*/
18054 +.contact-icons.dropdown-contents {
18055 + min-width: 0;
18056 + padding: 0;
18057 + font-size: 0;
18058 +}
18059 +
18060 +.contact-icon {
18061 + background-repeat: no-repeat;
18062 + display: block;
18063 + height: 16px;
18064 + width: 16px;
18065 +}
18066 +.contact-icons a {
18067 + border-bottom: 1px dotted;
18068 + border-right: 1px dotted;
18069 + display: block;
18070 + float: left;
18071 + padding: 8px;
18072 +}
18073 +
18074 +.contact-icons .last-cell {
18075 + border-right: none;
18076 +}
18077 +
18078 +.contact-icons div:last-child a {
18079 + border-bottom: none;
18080 +}
18081 +
18082 +.contact-icons div {
18083 + clear: left;
18084 +}
18085 +
18086 +/* Post control buttons
18087 +--------------------------------------------- */
18088 +.post-buttons {
18089 + float: right;
18090 + list-style: none;
18091 + margin-top: 2px;
18092 +}
18093 +
18094 +.has-profile .post-buttons {
18095 + float: none;
18096 + position: absolute;
18097 + margin: 0;
18098 + right: 0;
18099 + top: 5px;
18100 +}
18101 +
18102 +.post-buttons > li {
18103 + float: left;
18104 + margin-right: 3px;
18105 +}
18106 +
18107 +.post-buttons .button, .format-buttons .button {
18108 + padding-left: 3px;
18109 + padding-right: 3px;
18110 +}
18111 +
18112 +.hastouch .post-buttons {
18113 + margin-right: 10px;
18114 +}
18115 +
18116 +.post-buttons .button span {
18117 + font-size: 0;
18118 +}
18119 +
18120 +/* Responsive buttons in post body */
18121 +.post-buttons .dropdown {
18122 + top: 18px;
18123 +}
18124 +
18125 +.post-buttons .dropdown a {
18126 + display: block;
18127 + font-size: 1.2em;
18128 + text-align: right;
18129 +}
18130 +
18131 +.hasjs .postbody .post-buttons {
18132 + max-width: 40%;
18133 +}
18134 +
18135 +/* Browser-specific tweaks */
18136 +button::-moz-focus-inner {
18137 + padding: 0;
18138 + border: 0
18139 +}
18140 +
18141 +/* Deprecated as of version 3.2
18142 +-------------------------------------------------*/
18143 +.small-icon {
18144 + background-position: 0 50%;
18145 + background-repeat: no-repeat;
18146 + background-image: none;
18147 +}
18148 +
18149 +.dropdown .small-icon {
18150 + background-position: 5px 50%;
18151 + padding: 5px;
18152 +}
18153 +
18154 +.small-icon > a {
18155 + padding: 0 0 0 18px;
18156 +}
18157 +
18158 +ul.linklist.bulletin > li.small-icon:before {
18159 + display: none;
18160 +}
18161 +
18162 +.dropdown .small-icon > a {
18163 + display: block;
18164 +}
18165 +
18166 +.rtl .small-icon {
18167 + background-position: 100% 50%;
18168 +}
18169 +
18170 +.rtl .small-icon > a {
18171 + padding-left: 0;
18172 + padding-right: 19px;
18173 +}
18174 +
18175 +/* Allan Style */
18176 +.button {text-shadow: none;}
18177 +.post-buttons > li {opacity: 0.6;}
18178 +.post-buttons > li:hover {opacity: 1;}
18179
18180 diff --git a/AllanStyle-SUBSILVER/theme/colours.css b/AllanStyle-SUBSILVER/theme/colours.css
18181 new file mode 100644
18182 index 000000000..dd3c23c76
18183 --- /dev/null
18184 +++ b/AllanStyle-SUBSILVER/theme/colours.css
18185 @@ -0,0 +1,1207 @@
18186 +/*
18187 +--------------------------------------------------------------
18188 +Colours and backgrounds for common.css
18189 +-------------------------------------------------------------- */
18190 +
18191 +html, body {
18192 + color: #000000;
18193 + background-color: #FFFFFF;
18194 +}
18195 +
18196 +h1 {
18197 + color: #000000;
18198 +}
18199 +
18200 +h2 {
18201 + color: #28313F;
18202 +}
18203 +
18204 +h3 {
18205 + border-bottom-color: #CCCCCC;
18206 + color: #115098;
18207 +}
18208 +
18209 +hr {
18210 + border-color: #FFFFFF;
18211 + border-top-color: #CCCCCC;
18212 +}
18213 +
18214 +/*
18215 +--------------------------------------------------------------
18216 +Colours and backgrounds for links.css
18217 +-------------------------------------------------------------- */
18218 +
18219 +a { color: #105289;}
18220 +a:hover { color: #004768; }
18221 +a.exlinks { color: #105289 !important; }
18222 +
18223 +/* Links on gradient backgrounds */
18224 +.forumbg .header a, .forabg .header a, th a {
18225 + color: #105289;
18226 +}
18227 +
18228 +.forumbg .header a:hover, .forabg .header a:hover, th a:hover {
18229 + color: #004768;
18230 +}
18231 +
18232 +/* Notification mark read link */
18233 +.dropdown-extended a.mark_read {
18234 + background-color: #FFFFFF;
18235 +}
18236 +
18237 +/* Post body links */
18238 +.postlink {
18239 + border-bottom-color: #105289;
18240 + color: #105289;
18241 +}
18242 +
18243 +.postlink:visited {
18244 + border-bottom-color: #005075;
18245 + color: #005075;
18246 +}
18247 +
18248 +.postlink:hover {
18249 + background-color: #CED7DB;
18250 + color: #004768;
18251 +}
18252 +
18253 +.signature a, .signature a:hover {
18254 + background-color: transparent;
18255 +}
18256 +
18257 +/* Back to top of page */
18258 +.top i {
18259 + color: #999999;
18260 +}
18261 +
18262 +/* Arrow links */
18263 +.arrow-left:hover, .arrow-right:hover {
18264 + color: #368AD2;
18265 +}
18266 +
18267 +/* Round cornered boxes and backgrounds
18268 +---------------------------------------- */
18269 +#header-subsilver{
18270 + background-color: #d9dfe4;
18271 + border-bottom: 1px solid #4787a7;
18272 +}
18273 +
18274 +.wrap {
18275 + background-color: #FFF;
18276 + border-color: #E6E9ED;
18277 +}
18278 +
18279 +.headerbar {
18280 + color: #333333;
18281 +}
18282 +
18283 +.forumbg, .forabg {
18284 + background-color: #ececec;
18285 + background-image: url("./images/bg_list.gif");
18286 +}
18287 +
18288 +.navbar {
18289 + background-color: #ececec;
18290 +}
18291 +
18292 +.navbar, .forabg, .forumbg, .panel, .post, .responsive {
18293 + border: 1px solid #a9b8c2;
18294 +}
18295 +
18296 +.panel {
18297 + background-color: #ececec;
18298 + color: #28313F;
18299 +}
18300 +
18301 +.post:target .content {
18302 + color: #000000;
18303 +}
18304 +
18305 +.post:target h3 a {
18306 + color: #000000;
18307 +}
18308 +
18309 +.bg1 {
18310 + background-color: #ececec;
18311 +}
18312 +
18313 +table.zebra-list tr:nth-child(odd) td, ul.zebra-list li:nth-child(odd) {
18314 + background-color: #ececec;
18315 +}
18316 +
18317 +.bg2 {
18318 + background-color: #E5E8EA;
18319 +}
18320 +
18321 +table.zebra-list tr:nth-child(even) td, ul.zebra-list li:nth-child(even) {
18322 + background-color: #E5E8EA;
18323 +}
18324 +
18325 +.bg3 {
18326 + background-color: #ececec;
18327 +}
18328 +
18329 +.ucprowbg {
18330 + background-color: #E5E8EA;
18331 +}
18332 +
18333 +.fieldsbg {
18334 + background-color: #E7E8EA;
18335 +}
18336 +
18337 +.site_logo {
18338 + background-image: url("./images/site_logo.gif");
18339 +}
18340 +
18341 +.body-blok {
18342 + background-color: #ececec;
18343 + border: 1px solid #a9b8c2;
18344 +}
18345 +
18346 +.body-blok-h3 h3 {
18347 + background-image: url("./images/bg_list.gif");
18348 + border-bottom-color: #a9b8c2;
18349 +}
18350 +
18351 +.body-blok-info h3 {
18352 + border-bottom-color: #a9b8c2;
18353 +}
18354 +
18355 +/* Table styles
18356 +----------------------------------------*/
18357 +table.table1 thead th {
18358 + color: #333333;
18359 +}
18360 +
18361 +table.table1 tbody tr {
18362 + border-color: #BFC1CF;
18363 +}
18364 +
18365 +table.table1 tbody tr:hover, table.table1 tbody tr.hover {
18366 + background-color: #DEE3E5;
18367 + color: #000;
18368 +}
18369 +
18370 +table.table1 td {
18371 + color: #536482;
18372 +}
18373 +
18374 +table.table1 tbody td {
18375 + border-top-color: #a9b8c2;
18376 +}
18377 +
18378 +table.table1 tbody td.posts {
18379 + border-left: 1px solid #a9b8c2;
18380 + border-right: 1px solid #a9b8c2;
18381 +}
18382 +
18383 +table.table1 tbody td.info {
18384 + border-right: 1px solid #a9b8c2;
18385 +}
18386 +
18387 +table.table1 tbody th {
18388 + border-bottom-color: #a9b8c2;
18389 + color: #333333;
18390 +}
18391 +
18392 +table.info tbody th {
18393 + color: #000000;
18394 +}
18395 +
18396 +/* Misc layout styles
18397 +---------------------------------------- */
18398 +dl.details dt {
18399 + color: #000000;
18400 +}
18401 +
18402 +dl.details dd {
18403 + color: #536482;
18404 +}
18405 +
18406 +.sep {
18407 + color: #1198D9;
18408 +}
18409 +
18410 +/* Icon styles
18411 +---------------------------------------- */
18412 +.icon.icon-blue, a:hover .icon.icon-blue {
18413 + color: #196db5;
18414 +}
18415 +
18416 +.icon.icon-green, a:hover .icon.icon-green{
18417 + color: #1b9A1B;
18418 +}
18419 +
18420 +.icon.icon-red, a:hover .icon.icon-red{
18421 + color: #BC2A4D;
18422 +}
18423 +
18424 +.icon.icon-orange, a:hover .icon.icon-orange{
18425 + color: #FF6600;
18426 +}
18427 +
18428 +.icon.icon-bluegray, a:hover .icon.icon-bluegray{
18429 + color: #536482;
18430 +}
18431 +
18432 +.icon.icon-gray, a:hover .icon.icon-gray{
18433 + color: #777777;
18434 +}
18435 +
18436 +.icon.icon-lightgray, a:hover .icon.icon-lightgray{
18437 + color: #999999;
18438 +}
18439 +
18440 +.icon.icon-black, a:hover .icon.icon-black{
18441 + color: #333333;
18442 +}
18443 +
18444 +.alert_close .icon:before {
18445 + background-color: #FFFFFF;
18446 +}
18447 +
18448 +/* Jumpbox */
18449 +.jumpbox .dropdown li {
18450 + border-top-color: #CCCCCC;
18451 +}
18452 +
18453 +.jumpbox-cat-link {
18454 + background-color: #d2d5d7;
18455 + border-top-color: #0076B1;
18456 + color: #373737;
18457 +}
18458 +
18459 +.jumpbox-cat-link:hover {
18460 + background-color: #c7cacc;
18461 + border-top-color: #12A3EB;
18462 + color: #000000;
18463 +}
18464 +
18465 +.jumpbox-forum-link {
18466 + background-color: #ececec;
18467 +}
18468 +
18469 +.jumpbox-forum-link:hover {
18470 + background-color: #DEE3E5;
18471 +}
18472 +
18473 +.jumpbox .dropdown .pointer-inner {
18474 + border-color: #E1EBF2 transparent;
18475 +}
18476 +
18477 +.jumpbox-sub-link {
18478 + background-color: #ececec;
18479 +}
18480 +
18481 +.jumpbox-sub-link:hover {
18482 + background-color: #DEE3E5;
18483 +}
18484 +
18485 +/* Miscellaneous styles
18486 +---------------------------------------- */
18487 +
18488 +.copyright {
18489 + color: #555555;
18490 +}
18491 +
18492 +.error {
18493 + color: #BC2A4D;
18494 +}
18495 +
18496 +.reported {
18497 + background-color: #F7ECEF;
18498 +}
18499 +
18500 +li.reported:hover {
18501 + background-color: #ECD5D8 !important;
18502 +}
18503 +.sticky, .announce {
18504 + /* you can add a background for stickies and announcements*/
18505 +}
18506 +
18507 +div.rules {
18508 + background-color: #ECD5D8;
18509 + color: #BC2A4D;
18510 +}
18511 +
18512 +p.post-notice {
18513 + background-color: #ECD5D8;
18514 + background-image: none;
18515 +}
18516 +
18517 +/*
18518 +--------------------------------------------------------------
18519 +Colours and backgrounds for content.css
18520 +-------------------------------------------------------------- */
18521 +
18522 +ul.forums {
18523 + background-color: #ececec;
18524 +}
18525 +
18526 +ul.topiclist li {
18527 + color: #4C5D77;
18528 +}
18529 +
18530 +ul.topiclist dd {
18531 + border-left-color: #a9b8c2;
18532 +}
18533 +
18534 +.rtl ul.topiclist dd {
18535 + border-right-color: #a9b8c2;
18536 + border-left-color: transparent;
18537 +}
18538 +
18539 +li.row {
18540 + border-top-color: #a9b8c2;
18541 +}
18542 +
18543 +li.row strong {
18544 + color: #000000;
18545 +}
18546 +
18547 +li.row:hover {
18548 + background-color: #DEE3E5;
18549 +}
18550 +
18551 +li.row:hover dd {
18552 + border-left-color: #a9b8c2;
18553 +}
18554 +
18555 +.rtl li.row:hover dd {
18556 + border-right-color: #a9b8c2;
18557 + border-left-color: transparent;
18558 +}
18559 +
18560 +li.header dt, li.header dd {
18561 + color: #4c5d77;
18562 +}
18563 +
18564 +/* Post body styles
18565 +----------------------------------------*/
18566 +.postbody {
18567 + color: #333333;
18568 +}
18569 +
18570 +/* Content container styles
18571 +----------------------------------------*/
18572 +.content {
18573 + color: #333333;
18574 +}
18575 +
18576 +.content h2, .panel h2 {
18577 + color: #115098;
18578 + border-bottom-color: #a9b8c2;
18579 +}
18580 +
18581 +dl.faq dt {
18582 + color: #333333;
18583 +}
18584 +
18585 +.posthilit {
18586 + background-color: #F3BFCC;
18587 + color: #BC2A4D;
18588 +}
18589 +
18590 +.announce, .unreadpost {
18591 + /* Highlight the announcements & unread posts box */
18592 +}
18593 +
18594 +/* Post signature */
18595 +.signature {
18596 + border-top-color: #a9b8c2;
18597 +}
18598 +
18599 +/* Post noticies */
18600 +.notice {
18601 + border-top-color: #a9b8c2;
18602 +}
18603 +
18604 +/* BB Code styles
18605 +----------------------------------------*/
18606 +/* Quote block */
18607 +blockquote {
18608 + background-color: #EBEADD;
18609 + background-image: url("./images/quote.gif");
18610 + border-color:#DBDBCE;
18611 +}
18612 +
18613 +.rtl blockquote {
18614 + background-image: url("./images/quote_rtl.gif");
18615 +}
18616 +
18617 +blockquote blockquote {
18618 + /* Nested quotes */
18619 + background-color:#EFEED9;
18620 +}
18621 +
18622 +blockquote blockquote blockquote {
18623 + /* Nested quotes */
18624 + background-color: #EBEADD;
18625 +}
18626 +
18627 +/* Code block */
18628 +.codebox {
18629 + background-color: #FFFFFF;
18630 + border-color: #C9D2D8;
18631 +}
18632 +
18633 +.codebox p {
18634 + border-bottom-color: #CCCCCC;
18635 +}
18636 +
18637 +.codebox code {
18638 + color: #2E8B57;
18639 +}
18640 +
18641 +.syntaxbg { color: #FFFFFF; }
18642 +.syntaxcomment { color: #FF8000; }
18643 +.syntaxdefault { color: #0000BB; }
18644 +.syntaxhtml { color: #000000; }
18645 +.syntaxkeyword { color: #007700; }
18646 +.syntaxstring { color: #DD0000; }
18647 +
18648 +/* Attachments
18649 +----------------------------------------*/
18650 +.attachbox {
18651 + background-color: #FFFFFF;
18652 + border-color: #C9D2D8;
18653 +}
18654 +
18655 +.pm-message .attachbox {
18656 + background-color: #F2F3F3;
18657 +}
18658 +
18659 +.attachbox dd {
18660 + border-top-color: #C9D2D8;
18661 +}
18662 +
18663 +.attachbox p {
18664 + color: #666666;
18665 +}
18666 +
18667 +.attachbox p.stats {
18668 + color: #666666;
18669 +}
18670 +
18671 +.attach-image img {
18672 + border-color: #999999;
18673 +}
18674 +
18675 +/* Inline image thumbnails */
18676 +
18677 +dl.file dd {
18678 + color: #666666;
18679 +}
18680 +
18681 +dl.thumbnail img {
18682 + border-color: #666666;
18683 + background-color: #FFFFFF;
18684 +}
18685 +
18686 +dl.thumbnail dd {
18687 + color: #666666;
18688 +}
18689 +
18690 +dl.thumbnail dt a:hover {
18691 + background-color: #EEEEEE;
18692 +}
18693 +
18694 +dl.thumbnail dt a:hover img {
18695 + border-color: #368AD2;
18696 +}
18697 +
18698 +/* Post poll styles
18699 +----------------------------------------*/
18700 +
18701 +fieldset.polls dl {
18702 + border-top-color: #DCDEE2;
18703 + color: #666666;
18704 +}
18705 +
18706 +fieldset.polls dl.voted {
18707 + color: #000000;
18708 +}
18709 +
18710 +fieldset.polls dd div {
18711 + color: #FFFFFF;
18712 +}
18713 +
18714 +.rtl .pollbar1, .rtl .pollbar2, .rtl .pollbar3, .rtl .pollbar4, .rtl .pollbar5 {
18715 + border-right-color: transparent;
18716 +}
18717 +
18718 +.pollbar1 {
18719 + background-color: #AA2346;
18720 + border-bottom-color: #74162C;
18721 + border-right-color: #74162C;
18722 +}
18723 +
18724 +.rtl .pollbar1 {
18725 + border-left-color: #74162C;
18726 +}
18727 +
18728 +.pollbar2 {
18729 + background-color: #BE1E4A;
18730 + border-bottom-color: #8C1C38;
18731 + border-right-color: #8C1C38;
18732 +}
18733 +
18734 +.rtl .pollbar2 {
18735 + border-left-color: #8C1C38;
18736 +}
18737 +
18738 +.pollbar3 {
18739 + background-color: #D11A4E;
18740 + border-bottom-color: #AA2346;
18741 + border-right-color: #AA2346;
18742 +}
18743 +
18744 +.rtl .pollbar3 {
18745 + border-left-color: #AA2346;
18746 +}
18747 +
18748 +.pollbar4 {
18749 + background-color: #E41653;
18750 + border-bottom-color: #BE1E4A;
18751 + border-right-color: #BE1E4A;
18752 +}
18753 +
18754 +.rtl .pollbar4 {
18755 + border-left-color: #BE1E4A;
18756 +}
18757 +
18758 +.pollbar5 {
18759 + background-color: #F81157;
18760 + border-bottom-color: #D11A4E;
18761 + border-right-color: #D11A4E;
18762 +}
18763 +
18764 +.rtl .pollbar5 {
18765 + border-left-color: #D11A4E;
18766 +}
18767 +
18768 +/* Poster profile block
18769 +----------------------------------------*/
18770 +#subsilver-nav-topic {
18771 + background-color: #d3d9de;
18772 + background-image: url("./images/bg_list.gif");
18773 + color: black;
18774 +}
18775 +
18776 +.leftsided .postprofile {
18777 + border-right: 1px solid #d5dbe0 !important;
18778 +}
18779 +
18780 +.postprofile .avatar img {
18781 + background-color: white;
18782 + border: 1px solid #d3d9de;
18783 + box-shadow: 0 0 7px gray;
18784 +}
18785 +
18786 +.postprofile {
18787 + color: #666666;
18788 + border-color: #d5dbe0;
18789 +}
18790 +
18791 +.pm .postprofile {
18792 + border-color: #d5dbe0;
18793 +}
18794 +
18795 +.postprofile strong {
18796 + color: #000000;
18797 +}
18798 +
18799 +.online {
18800 + background-image: url("./en/icon_user_online.gif");
18801 +}
18802 +
18803 +dd.profile-warnings {
18804 + color: #BC2A4D;
18805 +}
18806 +
18807 +/*
18808 +--------------------------------------------------------------
18809 +Colours and backgrounds for buttons.css
18810 +-------------------------------------------------------------- */
18811 +.button {
18812 + border-color: #C7C3BF;
18813 + background-color: #E9E9E9; /* Old browsers */ /* FF3.6+ */
18814 + background-image: -webkit-linear-gradient(top, #FFFFFF 0%, #E9E9E9 100%);
18815 + background-image: linear-gradient(to bottom, #FFFFFF 0%,#E9E9E9 100%); /* W3C */
18816 + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#E9E9E9',GradientType=0 ); /* IE6-9 */
18817 + box-shadow: 0 0 0 1px #FFFFFF inset;
18818 + -webkit-box-shadow: 0 0 0 1px #FFFFFF inset;
18819 + color: #2a6496;
18820 +}
18821 +
18822 +.button:hover,
18823 +.button:focus {
18824 + border-color: #0A8ED0;
18825 + background-color: #FFFFFF; /* Old browsers */ /* FF3.6+ */
18826 + background-image: -webkit-linear-gradient(top, #E9E9E9 0%, #FFFFFF 100%);
18827 + background-image: linear-gradient(to bottom, #E9E9E9 0%,#FFFFFF 100%); /* W3C */
18828 + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#E9E9E9', endColorstr='#FFFFFF',GradientType=0 ); /* IE6-9 */
18829 + text-shadow: 1px 1px 0 #FFFFFF, -1px -1px 0 #FFFFFF, -1px -1px 0 rgba(188, 42, 77, 0.2);
18830 + color: #D31141;
18831 +}
18832 +
18833 +
18834 +.button .icon,
18835 +.button-secondary {
18836 + color: #8f8f8f;
18837 +}
18838 +
18839 +.button-secondary:focus,
18840 +.button-secondary:hover,
18841 +.button:focus .icon,
18842 +.button:hover .icon {
18843 + color: #0A8ED0;
18844 +}
18845 +
18846 +.button-search:hover,
18847 +.button-search-end:hover {
18848 + border-color: #C7C3BF;
18849 +}
18850 +
18851 +.caret { border-color: #DADADA; }
18852 +.caret { border-color: #C7C3BF; }
18853 +
18854 +.contact-icons a { border-color: #DCDCDC; }
18855 +.contact-icons a:hover { background-color: #F2F6F9; }
18856 +
18857 +/* Pagination
18858 +---------------------------------------- */
18859 +
18860 +.pagination li a {
18861 + background: #ECEDEE;
18862 + filter: none;
18863 + border-color: #B4BAC0;
18864 + box-shadow: none;
18865 + -webkit-box-shadow: none;
18866 + color: #5C758C;
18867 +}
18868 +
18869 +.pagination li.ellipsis span {
18870 + background: transparent;
18871 + color: #000000;
18872 +}
18873 +
18874 +.pagination li.active span {
18875 + background: #4692BF;
18876 + border-color: #4692BF;
18877 + color: #FFFFFF;
18878 +}
18879 +
18880 +.pagination li a:hover, .pagination li a:hover .icon, .pagination .dropdown-visible a.dropdown-trigger, .nojs .pagination .dropdown-container:hover a.dropdown-trigger {
18881 + background: #368AD2;
18882 + border-color: #368AD2;
18883 + filter: none;
18884 + color: #FFFFFF;
18885 + text-shadow: none;
18886 +}
18887 +
18888 +/* Search box
18889 +--------------------------------------------- */
18890 +
18891 +.search-box .inputbox,
18892 +.search-box .inputbox:hover,
18893 +.search-box .inputbox:focus {
18894 + border-color: #C7C3BF;
18895 +}
18896 +
18897 +.search-header {
18898 + box-shadow: 0 0 50px #999999;
18899 +}
18900 +
18901 +/* Icon images
18902 +---------------------------------------- */
18903 +
18904 +.contact-icon { background-image: url("./images/icons_contact.png"); }
18905 +
18906 +/* Profile & navigation icons */
18907 +.pm-icon { background-position: 0 0; }
18908 +.email-icon { background-position: -21px 0; }
18909 +.jabber-icon { background-position: -80px 0; }
18910 +.phpbb_icq-icon { background-position: -61px 0 ; }
18911 +.phpbb_wlm-icon { background-position: -182px 0; }
18912 +.phpbb_aol-icon { background-position: -244px 0; }
18913 +.phpbb_website-icon { background-position: -40px 0; }
18914 +.phpbb_youtube-icon { background-position: -98px 0; }
18915 +.phpbb_facebook-icon { background-position: -119px 0; }
18916 +.phpbb_googleplus-icon { background-position: -140px 0; }
18917 +.phpbb_skype-icon { background-position: -161px 0; }
18918 +.phpbb_twitter-icon { background-position: -203px 0; }
18919 +.phpbb_yahoo-icon { background-position: -224px 0; }
18920 +
18921 +/* Forum icons & Topic icons */
18922 +.global_read { background-image: url("./images/announce_read.gif"); }
18923 +.global_read_mine { background-image: url("./images/announce_read_mine.gif"); }
18924 +.global_read_locked { background-image: url("./images/announce_read_locked.gif"); }
18925 +.global_read_locked_mine { background-image: url("./images/announce_read_locked_mine.gif"); }
18926 +.global_unread { background-image: url("./images/announce_unread.gif"); }
18927 +.global_unread_mine { background-image: url("./images/announce_unread_mine.gif"); }
18928 +.global_unread_locked { background-image: url("./images/announce_unread_locked.gif"); }
18929 +.global_unread_locked_mine { background-image: url("./images/announce_unread_locked_mine.gif"); }
18930 +
18931 +.announce_read { background-image: url("./images/announce_read.gif"); }
18932 +.announce_read_mine { background-image: url("./images/announce_read_mine.gif"); }
18933 +.announce_read_locked { background-image: url("./images/announce_read_locked.gif"); }
18934 +.announce_read_locked_mine { background-image: url("./images/announce_read_locked_mine.gif"); }
18935 +.announce_unread { background-image: url("./images/announce_unread.gif"); }
18936 +.announce_unread_mine { background-image: url("./images/announce_unread_mine.gif"); }
18937 +.announce_unread_locked { background-image: url("./images/announce_unread_locked.gif"); }
18938 +.announce_unread_locked_mine { background-image: url("./images/announce_unread_locked_mine.gif"); }
18939 +
18940 +.forum_link { background-image: url("./images/forum_link.gif"); }
18941 +.forum_read { background-image: url("./images/forum_read.gif"); }
18942 +.forum_read_locked { background-image: url("./images/forum_read_locked.gif"); }
18943 +.forum_read_subforum { background-image: url("./images/forum_read_subforum.gif"); }
18944 +.forum_unread { background-image: url("./images/forum_unread.gif"); }
18945 +.forum_unread_locked { background-image: url("./images/forum_unread_locked.gif"); }
18946 +.forum_unread_subforum { background-image: url("./images/forum_unread_subforum.gif"); }
18947 +
18948 +.sticky_read { background-image: url("./images/sticky_read.gif"); }
18949 +.sticky_read_mine { background-image: url("./images/sticky_read_mine.gif"); }
18950 +.sticky_read_locked { background-image: url("./images/sticky_read_locked.gif"); }
18951 +.sticky_read_locked_mine { background-image: url("./images/sticky_read_locked_mine.gif"); }
18952 +.sticky_unread { background-image: url("./images/sticky_unread.gif"); }
18953 +.sticky_unread_mine { background-image: url("./images/sticky_unread_mine.gif"); }
18954 +.sticky_unread_locked { background-image: url("./images/sticky_unread_locked.gif"); }
18955 +.sticky_unread_locked_mine { background-image: url("./images/sticky_unread_locked_mine.gif"); }
18956 +
18957 +.topic_moved { background-image: url("./images/topic_moved.gif"); }
18958 +.pm_read,
18959 +.topic_read { background-image: url("./images/topic_read.gif"); }
18960 +.topic_read_mine { background-image: url("./images/topic_read_mine.gif"); }
18961 +.topic_read_hot { background-image: url("./images/topic_read_hot.gif"); }
18962 +.topic_read_hot_mine { background-image: url("./images/topic_read_hot_mine.gif"); }
18963 +.topic_read_locked { background-image: url("./images/topic_read_locked.gif"); }
18964 +.topic_read_locked_mine { background-image: url("./images/topic_read_locked_mine.gif"); }
18965 +.pm_unread,
18966 +.topic_unread { background-image: url("./images/topic_unread.gif"); }
18967 +.topic_unread_mine { background-image: url("./images/topic_unread_mine.gif"); }
18968 +.topic_unread_hot { background-image: url("./images/topic_unread_hot.gif"); }
18969 +.topic_unread_hot_mine { background-image: url("./images/topic_unread_hot_mine.gif"); }
18970 +.topic_unread_locked { background-image: url("./images/topic_unread_locked.gif"); }
18971 +.topic_unread_locked_mine { background-image: url("./images/topic_unread_locked_mine.gif"); }
18972 +
18973 +
18974 +/*
18975 +--------------------------------------------------------------
18976 +Colours and backgrounds for cp.css
18977 +-------------------------------------------------------------- */
18978 +
18979 +/* Main CP box
18980 +----------------------------------------*/
18981 +
18982 +.panel-container h3, .panel-container hr, .cp-menu hr {
18983 + border-color: #A4B3BF;
18984 +}
18985 +
18986 +.panel-container .panel li.row {
18987 + border-bottom-color: #B5C1CB;
18988 + border-top-color: #F9F9F9;
18989 +}
18990 +
18991 +ul.cplist {
18992 + border-top-color: #a9b8c2;
18993 +}
18994 +
18995 +.panel-container .panel li.header dd, .panel-container .panel li.header dt {
18996 + color: #000000;
18997 +}
18998 +
18999 +.panel-container table.table1 thead th {
19000 + color: #333333;
19001 + border-bottom-color: #333333;
19002 +}
19003 +
19004 +.cp-main .pm-message {
19005 + border-color: #DBDEE2;
19006 + background-color: #FFFFFF;
19007 +}
19008 +
19009 +/* CP tabbed menu
19010 +----------------------------------------*/
19011 +.tabs .tab > a {
19012 + background: #ececec;
19013 + color: #536482;
19014 + border: 1px solid #a9b8c2;
19015 +}
19016 +
19017 +.tabs .tab > a:hover {
19018 + background: #DEE3E5;
19019 + color: #005491;
19020 +}
19021 +
19022 +.tabs .activetab > a,
19023 +.tabs .activetab > a:hover {
19024 + background-color: #ced7db; /* Old browsers */ /* FF3.6+ */
19025 + background-image: -webkit-linear-gradient(top, #ececec 0%, #ced7db 100%);
19026 + background-image: linear-gradient(to bottom, #ececec 0%,#ced7db 100%); /* W3C */
19027 + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ececec', endColorstr='#ced7db',GradientType=0 ); /* IE6-9 */
19028 + border-color: #a9b8c2;
19029 + box-shadow: 0 1px 1px #F2F9FF inset;
19030 + color: #333333;
19031 +}
19032 +
19033 +.tabs .activetab > a:hover {
19034 + color: #000000;
19035 +}
19036 +
19037 +/* Mini tabbed menu used in MCP
19038 +----------------------------------------*/
19039 +.minitabs .tab > a {
19040 + background-color: #E1EBF2;
19041 +}
19042 +
19043 +.minitabs .activetab > a,
19044 +.minitabs .activetab > a:hover {
19045 + background-color: #F9F9F9;
19046 + color: #333333;
19047 +}
19048 +
19049 +/* Responsive tabs
19050 +----------------------------------------*/
19051 +.responsive-tab .responsive-tab-link:before {
19052 + border-color: #536482;
19053 +}
19054 +
19055 +.responsive-tab .responsive-tab-link:hover:before {
19056 + border-color: #D31141;
19057 +}
19058 +
19059 +/* UCP navigation menu
19060 +----------------------------------------*/
19061 +
19062 +/* Link styles for the sub-section links */
19063 +.navigation a {
19064 + color: #000;
19065 + background: #cbd5db; /* Old browsers */ /* FF3.6+ */
19066 + background: -webkit-linear-gradient(left, #cbd5db 50%, #ececec 100%);
19067 + background: linear-gradient(to right, #cbd5db 50%,#ececec 100%); /* W3C */
19068 + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cbd5db', endColorstr='#ececec',GradientType=1 ); /* IE6-9 */
19069 +}
19070 +
19071 +.rtl .navigation a {
19072 + background: #cbd5db; /* Old browsers */ /* FF3.6+ */
19073 + background: -webkit-linear-gradient(left, #cbd5db 50%, #ececec 100%);
19074 + background: linear-gradient(to right, #cbd5db 50%,#ececec 100%); /* W3C */
19075 + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#cbd5db', endColorstr='#ececec',GradientType=1 ); /* IE6-9 */
19076 +}
19077 +
19078 +.navigation a:hover {
19079 + background: #C7D2D8;
19080 + color: #BC2A4D;
19081 + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
19082 +}
19083 +
19084 +.navigation .active-subsection a {
19085 + background: #FFFFFF;
19086 + color: #004A7F;
19087 + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
19088 +}
19089 +
19090 +.navigation .active-subsection a:hover {
19091 + color: #004A7F;
19092 +}
19093 +
19094 +@media only screen and (max-width: 900px), only screen and (max-device-width: 900px)
19095 +{
19096 + #navigation a, .rtl #navigation a {
19097 + background: #cbd5db;
19098 + }
19099 +}
19100 +
19101 +/* Preferences pane layout
19102 +----------------------------------------*/
19103 +.panel-container h2 {
19104 + color: #333333;
19105 +}
19106 +
19107 +.panel-container .panel {
19108 + background-color: #F9F9F9;
19109 +}
19110 +
19111 +.cp-main .pm {
19112 + background-color: #FFFFFF;
19113 +}
19114 +
19115 +/* Friends list */
19116 +.cp-mini {
19117 + background-color: #FFFFFF;
19118 + border: 1px solid #a9b8c2;
19119 +}
19120 +
19121 +dl.mini dt {
19122 + color: #425067;
19123 + border-bottom: 1px solid #a9b8c2;
19124 +}
19125 +
19126 +/* PM Styles
19127 +----------------------------------------*/
19128 +/* PM Message history */
19129 +.current {
19130 + color: #000000 !important;
19131 +}
19132 +
19133 +/* PM marking colours */
19134 +.pmlist li.pm_message_reported_colour, .pm_message_reported_colour {
19135 + border-left-color: #BC2A4D;
19136 + border-right-color: #BC2A4D;
19137 +}
19138 +
19139 +.pmlist li.pm_marked_colour, .pm_marked_colour {
19140 + border-color: #FF6600;
19141 +}
19142 +
19143 +.pmlist li.pm_replied_colour, .pm_replied_colour {
19144 + border-color: #A9B8C2;
19145 +}
19146 +
19147 +.pmlist li.pm_friend_colour, .pm_friend_colour {
19148 + border-color: #5D8FBD;
19149 +}
19150 +
19151 +.pmlist li.pm_foe_colour, .pm_foe_colour {
19152 + border-color: #000000;
19153 +}
19154 +
19155 +/* Avatar gallery */
19156 +.gallery label {
19157 + background: #FFFFFF;
19158 + border-color: #CCC;
19159 +}
19160 +
19161 +.gallery label:hover {
19162 + background-color: #EEE;
19163 +}
19164 +
19165 +/*
19166 +--------------------------------------------------------------
19167 +Colours and backgrounds for forms.css
19168 +-------------------------------------------------------------- */
19169 +
19170 +/* General form styles
19171 +----------------------------------------*/
19172 +select {
19173 + border-color: #666666;
19174 + background-color: #FAFAFA;
19175 + color: #000;
19176 +}
19177 +
19178 +label {
19179 + color: #425067;
19180 +}
19181 +
19182 +option.disabled-option {
19183 + color: graytext;
19184 +}
19185 +
19186 +/* Definition list layout for forms
19187 +---------------------------------------- */
19188 +dd label {
19189 + color: #333;
19190 +}
19191 +
19192 +fieldset.fields1 {
19193 + background-color: transparent;
19194 +}
19195 +
19196 +/* Hover effects */
19197 +fieldset dl:hover dt label {
19198 + color: #000000;
19199 +}
19200 +
19201 +fieldset.fields2 dl:hover dt label {
19202 + color: inherit;
19203 +}
19204 +
19205 +/* Quick-login on index page */
19206 +fieldset.quick-login input.inputbox {
19207 + background-color: #F2F3F3;
19208 +}
19209 +
19210 +/* Posting page styles
19211 +----------------------------------------*/
19212 +
19213 +.message-box textarea {
19214 + color: #333333;
19215 +}
19216 +
19217 +.message-box textarea.drag-n-drop {
19218 + outline-color: rgba(102, 102, 102, 0.5);
19219 +}
19220 +
19221 +.message-box textarea.drag-n-drop-highlight {
19222 + outline-color: rgba(17, 163, 234, 0.5);
19223 +}
19224 +
19225 +/* Input field styles
19226 +---------------------------------------- */
19227 +.inputbox {
19228 + background-color: #f5f5f5;
19229 + border-color: #B4BAC0;
19230 + color: #333333;
19231 +}
19232 +
19233 +.inputbox:-moz-placeholder {
19234 + color: #333333;
19235 +}
19236 +
19237 +.inputbox::-webkit-input-placeholder {
19238 + color: #333333;
19239 +}
19240 +
19241 +.inputbox:hover {
19242 + border-color: #11A3EA;
19243 +}
19244 +
19245 +.inputbox:focus {
19246 + border-color: #11A3EA;
19247 +}
19248 +
19249 +.inputbox:focus:-moz-placeholder {
19250 + color: transparent;
19251 +}
19252 +
19253 +.inputbox:focus::-webkit-input-placeholder {
19254 + color: transparent;
19255 +}
19256 +
19257 +
19258 +/* Form button styles
19259 +---------------------------------------- */
19260 +
19261 +a.button1, input.button1, input.button3, a.button2, input.button2 {
19262 + color: #000;
19263 + background-color: #EFEFEF; /* Old browsers */ /* FF3.6+ */
19264 + background-image: -webkit-linear-gradient(top, #D2D2D2 0%, #EFEFEF 100%);
19265 + background-image: linear-gradient(to bottom, #D2D2D2 0%,#EFEFEF 100%); /* W3C */
19266 + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#D2D2D2', endColorstr='#EFEFEF',GradientType=0 ); /* IE6-9 */
19267 +}
19268 +
19269 +a.button1, input.button1 {
19270 + border-color: #666666;
19271 +}
19272 +
19273 +input.button3 {
19274 + background-image: none;
19275 +}
19276 +
19277 +/* Alternative button */
19278 +a.button2, input.button2, input.button3 {
19279 + border-color: #666666;
19280 +}
19281 +
19282 +/* <a> button in the style of the form buttons */
19283 +a.button1, a.button2 {
19284 + color: #000000;
19285 +}
19286 +
19287 +/* Hover states */
19288 +a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover {
19289 + border-color: #D31141;
19290 + color: #D31141;
19291 + background-color: #D2D2D2; /* Old browsers */ /* FF3.6+ */
19292 + background-image: -webkit-linear-gradient(top, #EFEFEF 0%, #D2D2D2 100%);
19293 + background-image: linear-gradient(to bottom, #EFEFEF 0%,#D2D2D2 100%); /* W3C */
19294 + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#EFEFEF', endColorstr='#D2D2D2',GradientType=0 ); /* IE6-9 */
19295 +}
19296 +
19297 +/* Focus states */
19298 +input.button1:focus, input.button2:focus, input.button3:focus {
19299 + border-color: #11A3EA;
19300 + color: #0F4987;
19301 +}
19302 +
19303 +input.disabled {
19304 + color: #666666;
19305 +}
19306 +
19307 +/* jQuery popups
19308 +---------------------------------------- */
19309 +.phpbb_alert {
19310 + background-color: #FFFFFF;
19311 + border-color: #999999;
19312 +}
19313 +.darken {
19314 + background-color: #000000;
19315 +}
19316 +
19317 +.loading_indicator {
19318 + background-color: #000000;
19319 + background-image: url("./images/loading.gif");
19320 +}
19321 +
19322 +.dropdown-extended ul li {
19323 + border-top-color: #B9B9B9;
19324 +}
19325 +
19326 +.dropdown-extended ul li:hover {
19327 + background-color: #e5e8ea;
19328 + color: #000000;
19329 +}
19330 +
19331 +.dropdown-extended .header, .dropdown-extended .footer {
19332 + border-color: #B9B9B9;
19333 + color: #000000;
19334 +}
19335 +
19336 +.dropdown-extended .footer {
19337 + border-top-style: solid;
19338 + border-top-width: 1px;
19339 +}
19340 +
19341 +.dropdown-extended .header {
19342 + background-color: #F1F8FF; /* Old browsers */ /* FF3.6+ */
19343 + background-image: -webkit-linear-gradient(top, #F1F8FF 0%, #e5e8ea 100%);
19344 + background-image: linear-gradient(to bottom, #F1F8FF 0%,#e5e8ea 100%); /* W3C */
19345 + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F1F8FF', endColorstr='#e5e8ea',GradientType=0 ); /* IE6-9 */
19346 +}
19347 +
19348 +.dropdown .pointer {
19349 + border-color: #B9B9B9 transparent;
19350 +}
19351 +
19352 +.dropdown .pointer-inner {
19353 + border-color: #FFF transparent;
19354 +}
19355 +
19356 +.dropdown-extended .pointer-inner {
19357 + border-color: #F1F8FF transparent;
19358 +}
19359 +
19360 +.dropdown .dropdown-contents {
19361 + background: #fff;
19362 + border-color: #B9B9B9;
19363 + box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.2);
19364 +}
19365 +
19366 +.dropdown-up .dropdown-contents {
19367 + box-shadow: 1px 0 5px rgba(0, 0, 0, 0.2);
19368 +}
19369 +
19370 +.dropdown li, .dropdown li li {
19371 + border-color: #DCDCDC;
19372 +}
19373 +
19374 +.dropdown li.separator {
19375 + border-color: #DCDCDC;
19376 +}
19377 +
19378 +/* Notifications
19379 +---------------------------------------- */
19380 +
19381 +.notification_list p.notification-time {
19382 + color: #4C5D77;
19383 +}
19384 +
19385 +li.notification-reported strong, li.notification-disapproved strong {
19386 + color: #D31141;
19387 +}
19388 +
19389 +.badge {
19390 + background-color: #D31141;
19391 + color: #ffffff;
19392 +}
19393
19394 diff --git a/AllanStyle-SUBSILVER/theme/common.css b/AllanStyle-SUBSILVER/theme/common.css
19395 new file mode 100644
19396 index 000000000..917f6e1f8
19397 --- /dev/null
19398 +++ b/AllanStyle-SUBSILVER/theme/common.css
19399 @@ -0,0 +1,1297 @@
19400 +/* General Markup Styles
19401 +---------------------------------------- */
19402 +html {
19403 + font-size: 100%;
19404 + /* Always show a scrollbar for short pages - stops the jump when the scrollbar appears. non-IE browsers */
19405 + height: 101%;
19406 +}
19407 +
19408 +body {
19409 + font-family: Verdana, Helvetica, Arial, sans-serif;
19410 + font-size: 10px;
19411 + line-height: normal;
19412 + margin: 0;
19413 + padding: 0;
19414 + word-wrap: break-word;
19415 + -webkit-print-color-adjust: exact;
19416 +}
19417 +
19418 +h1 {
19419 + /* Forum name */
19420 + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
19421 + margin-right: 200px;
19422 + margin-top: 15px;
19423 + font-weight: bold;
19424 + font-size: 2em;
19425 +}
19426 +
19427 +h2 {
19428 + /* Forum header titles */
19429 + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
19430 + font-weight: normal;
19431 + font-size: 2em;
19432 + margin: 0.8em 0 0.2em 0;
19433 + text-align: center;
19434 +}
19435 +
19436 +h2.solo {
19437 + margin-bottom: 1em;
19438 +}
19439 +
19440 +h3 {
19441 + /* Sub-headers (also used as post headers, but defined later) */
19442 + font-family: Arial, Helvetica, sans-serif;
19443 + font-weight: bold;
19444 + text-transform: uppercase;
19445 + border-bottom: 1px solid transparent;
19446 + margin-bottom: 3px;
19447 + padding-bottom: 2px;
19448 + font-size: 1.05em;
19449 + margin-top: 20px;
19450 +}
19451 +
19452 +h4 {
19453 + /* Forum and topic list titles */
19454 + font-family: "Trebuchet MS", Verdana, Helvetica, Arial, Sans-serif;
19455 + font-size: 1.3em;
19456 +}
19457 +
19458 +p {
19459 + line-height: 1.3em;
19460 + font-size: 1.1em;
19461 + margin-bottom: 0.5em;
19462 +}
19463 +
19464 +img {
19465 + border-width: 0;
19466 +}
19467 +
19468 +hr {
19469 + border: 0 solid transparent;
19470 + border-top-width: 1px;
19471 + height: 1px;
19472 + margin: 5px 0;
19473 + display: block;
19474 + clear: both;
19475 +}
19476 +
19477 +hr.dashed {
19478 + border-top-style: dashed;
19479 + margin: 10px 0;
19480 +}
19481 +
19482 +hr.divider {
19483 + display: none;
19484 +}
19485 +
19486 +p.right {
19487 + text-align: right;
19488 +}
19489 +
19490 +p.jumpbox-return {
19491 + margin-top: 10px;
19492 + margin-bottom: 0;
19493 + float: left;
19494 +}
19495 +
19496 +b, strong {
19497 + font-weight: bold;
19498 +}
19499 +
19500 +.text-strong {
19501 + font-weight: bold;
19502 +}
19503 +
19504 +i, em {
19505 + font-style: italic;
19506 +}
19507 +
19508 +.text-italics {
19509 + font-style: italic;
19510 +}
19511 +
19512 +u {
19513 + text-decoration: underline;
19514 +}
19515 +
19516 +ul {
19517 + list-style-type: disc;
19518 +}
19519 +
19520 +ol {
19521 + list-style-type: decimal;
19522 +}
19523 +
19524 +li {
19525 + display: list-item;
19526 +}
19527 +
19528 +ul ul, ol ul {
19529 + list-style-type: circle;
19530 +}
19531 +
19532 +ol ol ul, ol ul ul, ul ol ul, ul ul ul {
19533 + list-style-type: square;
19534 +}
19535 +
19536 +a:hover { text-decoration: underline; }
19537 +
19538 +/* Main blocks
19539 +---------------------------------------- */
19540 +#header-subsilver {
19541 + padding: 0 5px;
19542 +}
19543 +
19544 +.wrap {
19545 + margin: 0 auto;
19546 + max-width: 100%;
19547 + min-width: 625px;
19548 + padding: 0 20px 20px;
19549 +}
19550 +
19551 +.page-body {
19552 + margin: 4px 0;
19553 + clear: both;
19554 +}
19555 +
19556 +.page-footer {
19557 + clear: both;
19558 +}
19559 +
19560 +.page-footer h3 {
19561 + margin-top: 20px;
19562 +}
19563 +
19564 +.logo {
19565 + float: left;
19566 + width: auto;
19567 + padding: 0 13px;
19568 +}
19569 +
19570 +.logo:hover {
19571 + text-decoration: none;
19572 +}
19573 +
19574 +.site_logo {
19575 + display: inline-block;
19576 + width: 170px;
19577 + height: 94px;
19578 +}
19579 +
19580 +/* Site description and logo */
19581 +.site-description {
19582 + float: left;
19583 + width: 65%;
19584 +}
19585 +
19586 +.site-description h1 {
19587 + margin-right: 0;
19588 +}
19589 +
19590 +/* Round cornered boxes and backgrounds
19591 +---------------------------------------- */
19592 +.headerbar {
19593 + margin: 0 auto;
19594 + max-width: 100%;
19595 + padding: 5px 20px;
19596 +}
19597 +
19598 +.navbar-top, .navbar {
19599 + padding: 0 5px;
19600 +}
19601 +
19602 +.trigger {
19603 + background: url("./images/collapse-btn.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0);
19604 + cursor: pointer;
19605 + float: right;
19606 + height: 17px;
19607 + margin-top: -22px;
19608 + position: relative;
19609 + width: 30px;
19610 + z-index: 1;
19611 +}
19612 +
19613 +.forabg, .forumbg {
19614 + background: transparent none repeat-x 0 0;
19615 + margin-bottom: 4px;
19616 + padding: 0;
19617 + clear: both;
19618 +}
19619 +
19620 +.panel {
19621 + margin-bottom: 4px;
19622 + padding: 5px 10px;
19623 +}
19624 +
19625 +.post {
19626 + padding: 5px 10px;
19627 + margin-bottom: 4px;
19628 + background-repeat: no-repeat;
19629 + background-position: 100% 0;
19630 + position: relative;
19631 +}
19632 +
19633 +.rowbg {
19634 + margin: 5px 5px 2px 5px;
19635 +}
19636 +
19637 +.navbar-top-link { display: block; padding: 2px 0; }
19638 +.navbar-top-link ul { list-style: none; width: 100%; font-size: 1.1em; }
19639 +.navbar-top-link-left { float: left; padding-right: 10px; }
19640 +.navbar-top-link-right { float: right; padding-left: 10px; }
19641 +
19642 +.body-blok {
19643 + margin: 2px 0 1px;
19644 +}
19645 +.body-blok-h3 h3 {
19646 + margin: 0 !important;
19647 + padding: 6px 10px;
19648 + text-align: center;
19649 + text-transform: uppercase;
19650 +}
19651 +
19652 +.body-blok-info {
19653 + padding: 0 10px 5px;
19654 +}
19655 +
19656 +/* Horizontal lists
19657 +----------------------------------------*/
19658 +.navbar ul.linklist {
19659 + padding: 2px 0;
19660 + list-style-type: none;
19661 +}
19662 +
19663 +ul.linklist {
19664 + display: block;
19665 + margin: 0;
19666 +}
19667 +
19668 +.cp-main .panel {
19669 + padding: 5px 10px;
19670 +}
19671 +
19672 +ul.linklist > li {
19673 + float: left;
19674 + font-size: 1.1em;
19675 + line-height: 2.2em;
19676 + list-style-type: none;
19677 + margin-right: 7px;
19678 + width: auto;
19679 +}
19680 +
19681 +ul.linklist > li.rightside, p.rightside, a.rightside {
19682 + float: right;
19683 + margin-right: 0;
19684 + margin-left: 7px;
19685 + text-align: right;
19686 +}
19687 +
19688 +ul.leftside {
19689 + float: left;
19690 + margin-left: 0;
19691 + margin-right: 5px;
19692 + text-align: left;
19693 +}
19694 +
19695 +ul.rightside {
19696 + float: right;
19697 + margin-left: 5px;
19698 + margin-right: -5px;
19699 + text-align: right;
19700 +}
19701 +
19702 +ul.linklist li.responsive-menu {
19703 + position: relative;
19704 + margin: 0 5px 0 0;
19705 +}
19706 +
19707 +.hasjs ul.linklist.leftside, .hasjs ul.linklist.rightside {
19708 + max-width: 48%;
19709 +}
19710 +
19711 +.hasjs ul.linklist.fullwidth {
19712 + max-width: none;
19713 +}
19714 +
19715 +li.responsive-menu.dropdown-right .dropdown {
19716 + left: -9px;
19717 +}
19718 +
19719 +li.responsive-menu.dropdown-left .dropdown {
19720 + right: -6px;
19721 +}
19722 +
19723 +ul.linklist .dropdown {
19724 + top: 22px;
19725 +}
19726 +
19727 +ul.linklist .dropdown-up .dropdown {
19728 + bottom: 18px;
19729 + top: auto;
19730 +}
19731 +
19732 +/* Bulletin icons for list items
19733 +----------------------------------------*/
19734 +ul.linklist.bulletin > li:before {
19735 + display: inline-block;
19736 + content: "\2022";
19737 + font-size: inherit;
19738 + line-height: inherit;
19739 + padding-right: 4px;
19740 +}
19741 +
19742 +ul.linklist.bulletin > li:first-child:before,
19743 +ul.linklist.bulletin > li.rightside:last-child:before {
19744 + content: none;
19745 +}
19746 +
19747 +ul.linklist.bulletin > li.no-bulletin:before {
19748 + content: none;
19749 +}
19750 +
19751 +.responsive-menu:before {
19752 + display: none !important;
19753 +}
19754 +
19755 +/* Profile in overall_header.html */
19756 +.header-profile {
19757 + display: inline-block;
19758 + vertical-align: top;
19759 +}
19760 +
19761 +a.header-avatar,
19762 +a.header-avatar:hover {
19763 + text-decoration: none;
19764 +}
19765 +
19766 +a.header-avatar img {
19767 + margin-bottom: 2px;
19768 + max-height: 20px;
19769 + vertical-align: middle;
19770 + width: auto;
19771 +}
19772 +
19773 +a.header-avatar span:after {
19774 + content: '\f0dd';
19775 + display: inline-block;
19776 + font: normal normal normal 14px/1 FontAwesome;
19777 + padding-left: 6px;
19778 + padding-top: 2px;
19779 + vertical-align: top;
19780 +}
19781 +
19782 +/* Dropdown menu
19783 +----------------------------------------*/
19784 +.dropdown-container {
19785 + position: relative;
19786 +}
19787 +
19788 +.dropdown-container-right {
19789 + float: right;
19790 +}
19791 +
19792 +.dropdown-container-left {
19793 + float: left;
19794 +}
19795 +
19796 +.nojs .dropdown-container:hover .dropdown {
19797 + display: block !important;
19798 +}
19799 +
19800 +.dropdown {
19801 + display: none;
19802 + position: absolute;
19803 + left: 0;
19804 + top: 1.2em;
19805 + z-index: 2;
19806 + border: 1px solid transparent;
19807 + border-radius: 5px;
19808 + padding: 9px 0 0;
19809 + margin-right: -500px;
19810 +}
19811 +
19812 +.dropdown.live-search {
19813 + top: auto;
19814 +}
19815 +
19816 +.dropdown-container.topic-tools {
19817 + float: left;
19818 +}
19819 +
19820 +.dropdown-up .dropdown {
19821 + top: auto;
19822 + bottom: 1.2em;
19823 + padding: 0 0 9px;
19824 +}
19825 +
19826 +.dropdown-left .dropdown, .nojs .rightside .dropdown {
19827 + left: auto;
19828 + right: 0;
19829 + margin-left: -500px;
19830 + margin-right: 0;
19831 +}
19832 +
19833 +.dropdown-button-control .dropdown {
19834 + top: 24px;
19835 +}
19836 +
19837 +.dropdown-button-control.dropdown-up .dropdown {
19838 + top: auto;
19839 + bottom: 24px;
19840 +}
19841 +
19842 +.dropdown .pointer, .dropdown .pointer-inner {
19843 + position: absolute;
19844 + width: 0;
19845 + height: 0;
19846 + border-top-width: 0;
19847 + border-bottom: 10px solid transparent;
19848 + border-left: 10px dashed transparent;
19849 + border-right: 10px dashed transparent;
19850 + -webkit-transform: rotate(360deg); /* better anti-aliasing in webkit */
19851 + display: block;
19852 +}
19853 +
19854 +.dropdown-up .pointer, .dropdown-up .pointer-inner {
19855 + border-bottom-width: 0;
19856 + border-top: 10px solid transparent;
19857 +}
19858 +
19859 +.dropdown .pointer {
19860 + right: auto;
19861 + left: 10px;
19862 + top: -1px;
19863 + z-index: 3;
19864 +}
19865 +
19866 +.dropdown-up .pointer {
19867 + bottom: -1px;
19868 + top: auto;
19869 +}
19870 +
19871 +.dropdown-left .dropdown .pointer, .nojs .rightside .dropdown .pointer {
19872 + left: auto;
19873 + right: 10px;
19874 +}
19875 +
19876 +.dropdown .pointer-inner {
19877 + top: auto;
19878 + bottom: -11px;
19879 + left: -10px;
19880 +}
19881 +
19882 +.dropdown-up .pointer-inner {
19883 + bottom: auto;
19884 + top: -11px;
19885 +}
19886 +
19887 +.dropdown .dropdown-contents {
19888 + z-index: 2;
19889 + overflow: hidden;
19890 + overflow-y: auto;
19891 + border: 1px solid transparent;
19892 + border-radius: 5px;
19893 + padding: 5px;
19894 + position: relative;
19895 + max-height: 300px;
19896 +}
19897 +
19898 +.dropdown-contents a {
19899 + display: block;
19900 + padding: 5px;
19901 +}
19902 +
19903 +.jumpbox {
19904 + margin: 5px 0;
19905 +}
19906 +
19907 +.jumpbox .dropdown li {
19908 + border-top: 1px solid transparent;
19909 +}
19910 +
19911 +.jumpbox .dropdown-select {
19912 + margin: 0;
19913 +}
19914 +
19915 +.jumpbox .dropdown-contents {
19916 + padding: 0;
19917 + text-decoration: none;
19918 +}
19919 +
19920 +.jumpbox .dropdown-contents li {
19921 + padding: 0;
19922 +}
19923 +
19924 +.jumpbox .dropdown-contents a {
19925 + margin-right: 20px;
19926 + padding: 5px 10px;
19927 + text-decoration: none;
19928 + width: 100%;
19929 +}
19930 +
19931 +.jumpbox .spacer {
19932 + display: inline-block;
19933 + width: 0px;
19934 +}
19935 +
19936 +.jumpbox .spacer + .spacer {
19937 + width: 20px;
19938 +}
19939 +
19940 +.dropdown-contents a {
19941 + display: block;
19942 + padding: 5px;
19943 +}
19944 +
19945 +.jumpbox .dropdown-select {
19946 + margin: 0;
19947 +}
19948 +
19949 +.jumpbox .dropdown-contents a {
19950 + text-decoration: none;
19951 +}
19952 +
19953 +.dropdown li {
19954 + display: list-item;
19955 + border-top: 1px dotted transparent;
19956 + float: none !important;
19957 + line-height: normal !important;
19958 + font-size: 1em !important;
19959 + list-style: none;
19960 + margin: 0;
19961 + white-space: nowrap;
19962 + text-align: left;
19963 +}
19964 +
19965 +.dropdown-contents > li {
19966 + padding-right: 15px;
19967 +}
19968 +
19969 +.dropdown-nonscroll > li {
19970 + padding-right: 0;
19971 +}
19972 +
19973 +.dropdown li:first-child, .dropdown li.separator + li, .dropdown li li {
19974 + border-top: 0;
19975 +}
19976 +
19977 +.dropdown li li:first-child {
19978 + margin-top: 4px;
19979 +}
19980 +
19981 +.dropdown li li:last-child {
19982 + padding-bottom: 0;
19983 +}
19984 +
19985 +.dropdown li li {
19986 + border-top: 1px dotted transparent;
19987 + padding-left: 18px;
19988 +}
19989 +
19990 +.wrap .dropdown li, .dropdown.wrap li, .dropdown-extended li {
19991 + white-space: normal;
19992 +}
19993 +
19994 +.dropdown li.separator {
19995 + border-top: 1px solid transparent;
19996 + padding: 0;
19997 +}
19998 +
19999 +.dropdown li.separator:first-child, .dropdown li.separator:last-child {
20000 + display: none !important;
20001 +}
20002 +
20003 +/* Responsive breadcrumbs
20004 +----------------------------------------*/
20005 +.breadcrumbs .crumb {
20006 + float: left;
20007 + font-weight: bold;
20008 + word-wrap: normal;
20009 +}
20010 +
20011 +.breadcrumbs .crumb:before {
20012 + content: '\2039';
20013 + font-weight: bold;
20014 + padding: 0 0.5em;
20015 +}
20016 +
20017 +.breadcrumbs .crumb:first-child:before {
20018 + content: none;
20019 +}
20020 +
20021 +.breadcrumbs .crumb a {
20022 + white-space: nowrap;
20023 + text-overflow: ellipsis;
20024 + vertical-align: bottom;
20025 + overflow: hidden;
20026 +}
20027 +
20028 +.breadcrumbs.wrapped .crumb a { letter-spacing: -.3px; }
20029 +.breadcrumbs.wrapped .crumb.wrapped-medium a { letter-spacing: -.4px; }
20030 +.breadcrumbs.wrapped .crumb.wrapped-tiny a { letter-spacing: -.5px; }
20031 +
20032 +.breadcrumbs .crumb.wrapped-max a { max-width: 120px; }
20033 +.breadcrumbs .crumb.wrapped-wide a { max-width: 100px; }
20034 +.breadcrumbs .crumb.wrapped-medium a { max-width: 80px; }
20035 +.breadcrumbs .crumb.wrapped-small a { max-width: 60px; }
20036 +.breadcrumbs .crumb.wrapped-tiny a { max-width: 40px; }
20037 +
20038 +/* Table styles
20039 +----------------------------------------*/
20040 +table.table1 {
20041 + width: 100%;
20042 +}
20043 +
20044 +.ucp-main table.table1 {
20045 + padding: 2px;
20046 +}
20047 +
20048 +table.table1 thead th {
20049 + font-weight: normal;
20050 + text-transform: uppercase;
20051 + line-height: 1.3em;
20052 + font-size: 1em;
20053 + padding: 7px 0 8px 5px;
20054 + white-space: nowrap;
20055 +}
20056 +
20057 +table.table1 thead th span {
20058 + padding-left: 7px;
20059 +}
20060 +
20061 +table.table1 tbody tr {
20062 + border: 1px solid transparent;
20063 +}
20064 +
20065 +table.table1 td {
20066 + font-size: 1.1em;
20067 +}
20068 +
20069 +table.table1 tbody td {
20070 + padding: 5px;
20071 + border-top: 1px solid transparent;
20072 +}
20073 +
20074 +table.table1 tbody th {
20075 + padding: 5px;
20076 + border-bottom: 1px solid transparent;
20077 + text-align: left;
20078 +}
20079 +
20080 +/* Specific column styles */
20081 +table.table1 .name { text-align: left; }
20082 +table.table1 .center { text-align: center; }
20083 +table.table1 .reportby { width: 15%; }
20084 +table.table1 .posts { text-align: center; width: 7%; }
20085 +table.table1 .joined { text-align: left; width: 15%; }
20086 +table.table1 .active { text-align: left; width: 15%; }
20087 +table.table1 .mark { text-align: center; width: 7%; }
20088 +table.table1 .info { text-align: left; width: 30%; }
20089 +table.table1 .info div { width: 100%; white-space: normal; overflow: hidden; }
20090 +table.table1 .autocol { line-height: 2em; white-space: nowrap; }
20091 +table.table1 thead .autocol { padding-left: 1em; }
20092 +
20093 +table.table1 span.rank-img {
20094 + float: right;
20095 + width: auto;
20096 +}
20097 +
20098 +table.info td {
20099 + padding: 3px;
20100 +}
20101 +
20102 +table.info tbody th {
20103 + padding: 3px;
20104 + text-align: right;
20105 + vertical-align: top;
20106 + font-weight: normal;
20107 +}
20108 +
20109 +.forumbg table.table1 {
20110 + margin: 0;
20111 +}
20112 +
20113 +.forumbg-table > .inner {
20114 + margin: 0 -1px;
20115 +}
20116 +
20117 +.color_palette_placeholder table {
20118 + border-collapse: separate;
20119 + border-spacing: 1px;
20120 +}
20121 +
20122 +/* Misc layout styles
20123 +---------------------------------------- */
20124 +/* column[1-2] styles are containers for two column layouts */
20125 +.column1 {
20126 + float: left;
20127 + clear: left;
20128 + width: 49%;
20129 +}
20130 +
20131 +.column2 {
20132 + float: right;
20133 + clear: right;
20134 + width: 49%;
20135 +}
20136 +
20137 +/* General classes for placing floating blocks */
20138 +.left-box {
20139 + float: left;
20140 + width: auto;
20141 + text-align: left;
20142 + max-width: 100%;
20143 +}
20144 +
20145 +.left-box.profile-details {
20146 + width: 80%;
20147 +}
20148 +
20149 +.right-box {
20150 + float: right;
20151 + width: auto;
20152 + text-align: right;
20153 + max-width: 100%;
20154 +}
20155 +
20156 +dl.details {
20157 + /*font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;*/
20158 + font-size: 1.1em;
20159 +}
20160 +
20161 +dl.details dt {
20162 + float: left;
20163 + clear: left;
20164 + width: 30%;
20165 + text-align: right;
20166 + display: block;
20167 +}
20168 +
20169 +dl.details dd {
20170 + margin-left: 0;
20171 + padding-left: 5px;
20172 + margin-bottom: 5px;
20173 + float: left;
20174 + width: 65%;
20175 + overflow: hidden;
20176 + text-overflow: ellipsis;
20177 +}
20178 +
20179 +.clearfix, fieldset dl, ul.topiclist dl, dl.polls {
20180 + overflow: hidden;
20181 +}
20182 +
20183 +fieldset.fields1 ul.recipients {
20184 + list-style-type: none;
20185 + line-height: 1.8;
20186 + max-height: 150px;
20187 + overflow-y: auto;
20188 +}
20189 +
20190 +fieldset.fields1 dd.recipients {
20191 + clear: left;
20192 + margin-left: 1em;
20193 +}
20194 +
20195 +fieldset.fields1 ul.recipients input.button2{
20196 + font-size: 0.8em;
20197 + margin-right: 0;
20198 + padding: 0;
20199 +}
20200 +
20201 +fieldset.fields1 dl.pmlist > dt {
20202 + width: auto !important;
20203 +}
20204 +
20205 +fieldset.fields1 dl.pmlist dd.recipients {
20206 + margin-left: 0 !important;
20207 +}
20208 +
20209 +/* Action-bars (container for post/reply buttons, pagination, etc.)
20210 +---------------------------------------- */
20211 +.action-bar {
20212 + font-size: 11px;
20213 + margin: 4px 0;
20214 +}
20215 +
20216 +.forabg + .action-bar {
20217 + margin-top: 2em;
20218 +}
20219 +
20220 +.action-bar .button {
20221 + margin-right: 5px;
20222 + float: left;
20223 +}
20224 +
20225 +.action-bar .button-search {
20226 + margin-right: 0;
20227 +}
20228 +
20229 +/* Pagination
20230 +---------------------------------------- */
20231 +.pagination {
20232 + float: right;
20233 + text-align: right;
20234 + width: auto;
20235 +}
20236 +
20237 +.action-bar.bar-bottom .pagination {
20238 + margin-top: 0;
20239 +}
20240 +
20241 +.action-bar .pagination .button {
20242 + margin-right: 0;
20243 + float: none;
20244 +}
20245 +
20246 +.pagination > ul {
20247 + display: inline-block;
20248 + list-style: none !important;
20249 + margin-left: 5px;
20250 +}
20251 +
20252 +.pagination > ul > li {
20253 + display: inline-block !important;
20254 + padding: 0;
20255 + font-size: 100%;
20256 + line-height: normal;
20257 + vertical-align: middle;
20258 +}
20259 +
20260 +.pagination li a, .pagination li span {
20261 + padding: 2px 5px;
20262 +}
20263 +
20264 +.pagination li.active span {
20265 + display: inline-block;
20266 + font-size: 13px;
20267 + font-weight: normal;
20268 + font-family: "Open Sans", "Droid Sans", Verdana, Arial, Helvetica;
20269 + line-height: 1.4;
20270 + text-align: center;
20271 + white-space: nowrap;
20272 + vertical-align: middle;
20273 + border: 1px solid transparent;
20274 +}
20275 +
20276 +.pagination li.ellipsis span {
20277 + border: none;
20278 + padding: 0;
20279 +}
20280 +
20281 +.pagination li.page-jump {
20282 + margin-right: 5px;
20283 +}
20284 +
20285 +.pagination li.page-jump a {
20286 + padding: 0 8px;
20287 +}
20288 +
20289 +.pagination li.page-jump a i {
20290 + font-size: 21px;
20291 +}
20292 +
20293 +.pagination .arrow a {
20294 + padding: 2px 0;
20295 +}
20296 +
20297 +/* The alignment ".row .pagination" and "author, date, title of the forum" */
20298 +ul.topiclist li.row .responsive-hide {
20299 + float: left;
20300 +}
20301 +
20302 +/* Pagination in viewforum for multipage topics */
20303 +.row .pagination {
20304 + display: block;
20305 + margin-bottom: 0.2em;
20306 + margin-top: 0.2em;
20307 +}
20308 +
20309 +.row .pagination > ul {
20310 + margin: 0;
20311 +}
20312 +
20313 +.row .pagination li a, .row .pagination li span {
20314 + padding: 1px 3px;
20315 + font-size: 9px;
20316 +}
20317 +
20318 +.topic-poster {
20319 + float: left;
20320 + padding-right: 0.5em;
20321 + margin-top: 0.3em;
20322 +}
20323 +
20324 +/* jQuery popups
20325 +---------------------------------------- */
20326 +.phpbb_alert {
20327 + border: 1px solid transparent;
20328 + display: none;
20329 + left: 0;
20330 + padding: 0 25px 20px 25px;
20331 + position: fixed;
20332 + right: 0;
20333 + top: 150px;
20334 + z-index: 50;
20335 + width: 620px;
20336 + margin: 0 auto;
20337 +}
20338 +
20339 +@media only screen and (max-height: 500px), only screen and (max-device-width: 500px)
20340 +{
20341 + .phpbb_alert {
20342 + top: 25px;
20343 + }
20344 +}
20345 +
20346 +.phpbb_alert .alert_close {
20347 + float: right;
20348 + margin-right: -36px;
20349 + margin-top: -8px;
20350 +}
20351 +
20352 +.phpbb_alert p {
20353 + margin: 8px 0;
20354 + padding-bottom: 8px;
20355 +}
20356 +
20357 +.phpbb_alert label {
20358 + display: block;
20359 + margin: 8px 0;
20360 + padding-bottom: 8px;
20361 +}
20362 +
20363 +.phpbb_alert div.alert_text > p,
20364 +.phpbb_alert div.alert_text > label,
20365 +.phpbb_alert div.alert_text > select,
20366 +.phpbb_alert div.alert_text > textarea,
20367 +.phpbb_alert div.alert_text > input {
20368 + font-size: 1.1em;
20369 +}
20370 +
20371 +.darkenwrapper {
20372 + display: none;
20373 + position: relative;
20374 + z-index: 44;
20375 +}
20376 +
20377 +.darken {
20378 + position: fixed;
20379 + left: 0;
20380 + top: 0;
20381 + width: 100%;
20382 + height: 100%;
20383 + opacity: 0.5;
20384 + z-index: 45;
20385 +}
20386 +
20387 +.loading_indicator {
20388 + background: center center no-repeat;
20389 + border-radius: 5px;
20390 + display: none;
20391 + opacity: 0.8;
20392 + margin-top: -50px;
20393 + margin-left: -50px;
20394 + height: 50px;
20395 + width: 50px;
20396 + position: fixed;
20397 + left: 50%;
20398 + top: 50%;
20399 + z-index: 51;
20400 +}
20401 +
20402 +/* Miscellaneous styles
20403 +---------------------------------------- */
20404 +.copyright {
20405 + padding: 1px 5px 5px;
20406 + text-align: center;
20407 +}
20408 +
20409 +.small {
20410 + font-size: 0.9em !important;
20411 +}
20412 +
20413 +.titlespace {
20414 + margin-bottom: 15px;
20415 +}
20416 +
20417 +.headerspace {
20418 + margin-top: 20px;
20419 +}
20420 +
20421 +.error {
20422 + font-weight: bold;
20423 + font-size: 1em;
20424 +}
20425 +
20426 +div.rules {
20427 + margin: 10px 0;
20428 + font-size: 1.1em;
20429 + padding: 5px 10px;
20430 +}
20431 +
20432 +div.rules ul, div.rules ol {
20433 + margin-left: 20px;
20434 +}
20435 +
20436 +p.post-notice {
20437 + position: relative;
20438 + padding: 5px;
20439 + min-height: 14px;
20440 + margin-bottom: 1em;
20441 +}
20442 +
20443 +form > p.post-notice strong {
20444 + line-height: 20px;
20445 +}
20446 +
20447 +.stat-block {
20448 + clear: both;
20449 +}
20450 +
20451 +.top-anchor {
20452 + display: block;
20453 + position: absolute;
20454 + top: -20px;
20455 +}
20456 +
20457 +.clear {
20458 + display: block;
20459 + clear: both;
20460 + font-size: 1px;
20461 + line-height: 1px;
20462 + background: transparent;
20463 +}
20464 +
20465 +/* Inner box-model clearing */
20466 +.inner:after,
20467 +ul.linklist:after,
20468 +.action-bar:after,
20469 +.notification_text:after,
20470 +.tabs-container:after,
20471 +.tabs > ul:after,
20472 +.minitabs > ul:after,
20473 +.postprofile .avatar-container:after {
20474 + clear: both;
20475 + content: '';
20476 + display: block;
20477 +}
20478 +
20479 +.emoji {
20480 + min-height: 18px;
20481 + min-width: 18px;
20482 + height: 1em;
20483 + width: 1em;
20484 +}
20485 +
20486 +.smilies {
20487 + vertical-align: text-bottom;
20488 +}
20489 +
20490 +.icon-notification {
20491 + position: relative;
20492 +}
20493 +
20494 +.member-search {
20495 + float: left;
20496 + margin: 0;
20497 + padding: 6px 10px;
20498 +}
20499 +
20500 +.member-search strong {
20501 + font-size: 0.95em;
20502 +}
20503 +
20504 +.dropdown-extended {
20505 + display: none;
20506 + z-index: 1;
20507 +}
20508 +
20509 +.dropdown-extended ul {
20510 + max-height: 350px;
20511 + overflow-y: auto;
20512 + overflow-x: hidden;
20513 + clear: both;
20514 +}
20515 +
20516 +.dropdown-extended ul li {
20517 + padding: 0;
20518 + margin: 0 !important;
20519 + float: none;
20520 + border-top: 1px solid;
20521 + list-style-type: none;
20522 + font-size: 0.95em;
20523 + clear: both;
20524 + position: relative;
20525 +}
20526 +
20527 +.dropdown-extended ul li:first-child {
20528 + border-top: none;
20529 +}
20530 +
20531 +.dropdown-extended ul li.no_notifications {
20532 + padding: 10px;
20533 +}
20534 +
20535 +.dropdown-extended .dropdown-contents {
20536 + max-height: none;
20537 + padding: 0;
20538 + position: absolute;
20539 + width: 340px;
20540 +}
20541 +
20542 +.nojs .dropdown-extended .dropdown-contents {
20543 + position: relative;
20544 +}
20545 +
20546 +.dropdown-extended .header {
20547 + padding: 0 10px;
20548 + font-family: Arial, "Helvetica Neue", Helvetica, Arial, sans-serif;
20549 + font-weight: bold;
20550 + text-align: left;
20551 + text-shadow: 1px 1px 1px white;
20552 + text-transform: uppercase;
20553 + line-height: 3em;
20554 + border-bottom: 1px solid;
20555 + border-radius: 5px 5px 0 0;
20556 +}
20557 +
20558 +.dropdown-extended .header .header_settings {
20559 + float: right;
20560 + font-weight: normal;
20561 + text-transform: none;
20562 +}
20563 +
20564 +.dropdown-extended .header .header_settings a {
20565 + display: inline-block;
20566 + padding: 0 5px;
20567 +}
20568 +
20569 +.dropdown-extended .header:after {
20570 + content: '';
20571 + display: table;
20572 + clear: both;
20573 +}
20574 +
20575 +.dropdown-extended .footer {
20576 + text-align: center;
20577 + font-size: 1.1em;
20578 +}
20579 +
20580 +.dropdown-extended ul li a, .dropdown-extended ul li.no-url {
20581 + padding: 8px;
20582 +}
20583 +
20584 +.dropdown-extended .footer > a {
20585 + padding: 5px 0;
20586 +}
20587 +
20588 +.dropdown-extended ul li a, .notification_list dt > a, .dropdown-extended .footer > a {
20589 + display: block;
20590 + text-decoration: none;
20591 +}
20592 +
20593 +.notification_list ul li img {
20594 + float: left;
20595 + max-height: 50px;
20596 + max-width: 50px;
20597 + width: auto !important;
20598 + height: auto !important;
20599 + margin-right: 5px;
20600 +}
20601 +
20602 +.notification_list ul li p {
20603 + margin-bottom: 4px;
20604 + font-size: 1em;
20605 +}
20606 +
20607 +.notification_list p.notification-reference,
20608 +.notification_list p.notification-location,
20609 +.notification_list li a p.notification-reason {
20610 + overflow: hidden;
20611 + text-overflow: ellipsis;
20612 + white-space: nowrap;
20613 +}
20614 +
20615 +.notification_list p.notification-time {
20616 + font-size: 0.9em;
20617 + margin: 0;
20618 + text-align: right;
20619 +}
20620 +
20621 +.notification_list div.notifications {
20622 + margin-left: 50px;
20623 + padding: 5px;
20624 +}
20625 +
20626 +.notification_list div.notifications a {
20627 + display: block;
20628 +}
20629 +
20630 +.notification_list p.notifications_title {
20631 + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
20632 + font-size: 1.2em !important;
20633 +}
20634 +
20635 +.notification_list p.notifications_title strong {
20636 + font-weight: bold;
20637 +}
20638 +
20639 +.notification_list p.notifications_time {
20640 + font-size: 0.9em !important;
20641 +}
20642 +
20643 +.notification_text {
20644 + margin-left: 58px;
20645 +}
20646 +
20647 +.badge {
20648 + border-radius: 10px;
20649 + opacity: 0.8;
20650 + text-align: center;
20651 + white-space: nowrap;
20652 + font-size: 10px;
20653 + line-height: 1;
20654 + float: right;
20655 + display: inline-block;
20656 + margin-left: 3px;
20657 + vertical-align: baseline;
20658 + position: relative;
20659 + top: 3px;
20660 + padding: 4px 6px;
20661 +}
20662 +
20663 +.badge.hidden {
20664 + display: none;
20665 +}
20666 +
20667 +/* Navbar specific list items
20668 +----------------------------------------*/
20669 +
20670 +.linklist .quick-links {
20671 + margin: 0 7px 0 0;
20672 +}
20673 +
20674 +.linklist.compact .rightside > a > span {
20675 + display: none;
20676 +}
20677 +
20678 +.dropdown-page-jump .dropdown {
20679 + top: 20px;
20680 +}
20681 +
20682 +.dropdown-page-jump.dropdown-up .dropdown {
20683 + bottom: 20px;
20684 +}
20685 +
20686 +.dropdown-page-jump input.tiny {
20687 + width: 50px;
20688 +}
20689 +
20690 +.dropdown .clone.hidden + li.separator {
20691 + display: none;
20692 +}
20693 +
20694 +.dropdown .clone.hidden + li {
20695 + border-top: none;
20696 +}
20697
20698 diff --git a/AllanStyle-SUBSILVER/theme/content.css b/AllanStyle-SUBSILVER/theme/content.css
20699 new file mode 100644
20700 index 000000000..a1243f371
20701 --- /dev/null
20702 +++ b/AllanStyle-SUBSILVER/theme/content.css
20703 @@ -0,0 +1,906 @@
20704 +/* Content Styles
20705 +---------------------------------------- */
20706 +
20707 +ul.topiclist {
20708 + display: block;
20709 + list-style-type: none;
20710 + margin: 0;
20711 +}
20712 +
20713 +ul.topiclist li {
20714 + display: block;
20715 + list-style-type: none;
20716 + margin: 0;
20717 +}
20718 +
20719 +ul.topiclist dl {
20720 + position: relative;
20721 +}
20722 +
20723 +ul.topiclist li.row dl {
20724 + padding: 2px 0;
20725 +}
20726 +
20727 +ul.topiclist dt, ul.topiclist dd {
20728 + display: block;
20729 + float: left;
20730 +}
20731 +
20732 +ul.topiclist dt {
20733 + width: 100%;
20734 + margin-right: -440px;
20735 + font-size: 1.1em;
20736 +}
20737 +
20738 +ul.topiclist.missing-column dt {
20739 + margin-right: -345px;
20740 +}
20741 +
20742 +ul.topiclist.two-long-columns dt {
20743 + margin-right: -250px;
20744 +}
20745 +
20746 +ul.topiclist.two-columns dt {
20747 + margin-right: -80px;
20748 +}
20749 +
20750 +ul.topiclist dt .list-inner {
20751 + margin-right: 440px;
20752 + padding-left: 5px;
20753 + padding-right: 5px;
20754 +}
20755 +
20756 +ul.topiclist.missing-column dt .list-inner {
20757 + margin-right: 345px;
20758 +}
20759 +
20760 +ul.topiclist.two-long-columns dt .list-inner {
20761 + margin-right: 250px;
20762 +}
20763 +
20764 +ul.topiclist.two-columns dt .list-inner {
20765 + margin-right: 80px;
20766 +}
20767 +
20768 +ul.topiclist dd {
20769 + border-left: 1px solid transparent;
20770 + padding: 4px 0;
20771 + -webkit-box-sizing: border-box;
20772 + -moz-box-sizing: border-box;
20773 + box-sizing: border-box;
20774 +}
20775 +
20776 +ul.topiclist dfn {
20777 + /* Labels for post/view counts */
20778 + position: absolute;
20779 + left: -999px;
20780 + width: 990px;
20781 +}
20782 +
20783 +.forum-image {
20784 + float: left;
20785 + padding-top: 5px;
20786 + margin-right: 5px;
20787 +}
20788 +
20789 +li.row {
20790 + border-top: 1px solid transparent;
20791 + border-bottom: 1px solid transparent;
20792 +}
20793 +
20794 +li.row strong {
20795 + font-weight: normal;
20796 +}
20797 +
20798 +li.header dt, li.header dd {
20799 + line-height: 1em;
20800 + border-left-width: 0;
20801 + margin: 7px 0 5px 0;
20802 + padding-top: 2px;
20803 + padding-bottom: 2px;
20804 + font-size: 1em;
20805 + font-family: Arial, Helvetica, sans-serif;
20806 + text-align: center;
20807 + font-weight: bold;
20808 +}
20809 +
20810 +li.header dt {
20811 + font-weight: bold;
20812 + width: 100%;
20813 + margin-right: -440px;
20814 +}
20815 +
20816 +li.header dt .list-inner {
20817 + margin-right: 440px;
20818 +}
20819 +
20820 +li.header dd {
20821 + padding-left: 1px;
20822 + -webkit-box-sizing: border-box;
20823 + -moz-box-sizing: border-box;
20824 + box-sizing: border-box;
20825 +}
20826 +
20827 +li.header dl.row-item dt, li.header dl.row-item dd {
20828 + min-height: 0;
20829 +}
20830 +
20831 +li.header dl.row-item dt .list-inner {
20832 + /* Tweak for headers alignment when folder icon used */
20833 + padding-left: 0;
20834 + padding-right: 50px;
20835 +}
20836 +
20837 +/* Forum list column styles */
20838 +dl.row-item {
20839 + background-position: 10px 50%; /* Position of folder icon */
20840 + background-repeat: no-repeat;
20841 +}
20842 +
20843 +dl.row-item dt {
20844 + background-repeat: no-repeat;
20845 + background-position: 5px 95%; /* Position of topic icon */
20846 +}
20847 +
20848 +.topiclist.forums li.row dl.row-item dt .list-inner{
20849 + padding-left: 63px; /* Space for folder icon */
20850 +}
20851 +
20852 +.topiclist.topics li.row dl.row-item dt .list-inner {
20853 + padding-left: 40px; /* Space for topic icon */
20854 +}
20855 +
20856 +dl.row-item dt .list-inner {
20857 + padding-left: 40px; /* Space for topic icon */
20858 +}
20859 +
20860 +dl.row-item dt, dl.row-item dd {
20861 + min-height: 35px;
20862 +}
20863 +
20864 +dl.row-item dt a {
20865 + display: inline;
20866 +}
20867 +
20868 +dl a.row-item-link { /* topic row icon links */
20869 + display: block;
20870 + width: 30px;
20871 + height: 30px;
20872 + padding: 0;
20873 + position: absolute;
20874 + top: 50%;
20875 + left: 0;
20876 + margin-top: -15px;
20877 + margin-left: 9px;
20878 +}
20879 +
20880 +dd.posts, dd.topics, dd.views, dd.extra, dd.mark {
20881 + width: 80px;
20882 + text-align: center;
20883 + line-height: 2.2em;
20884 + font-size: 1.2em;
20885 +}
20886 +
20887 +dd.posts, dd.topics, dd.views {
20888 + width: 95px;
20889 +}
20890 +
20891 +/* List in forum description */
20892 +dl.row-item dt ol,
20893 +dl.row-item dt ul {
20894 + list-style-position: inside;
20895 + margin-left: 1em;
20896 +}
20897 +
20898 +dl.row-item dt li {
20899 + display: list-item;
20900 + list-style-type: inherit;
20901 +}
20902 +
20903 +dd.lastpost, dd.redirect, dd.moderation, dd.time, dd.info {
20904 + width: 250px;
20905 + font-size: 1.1em;
20906 +}
20907 +
20908 +dd.redirect {
20909 + line-height: 2.5em;
20910 +}
20911 +
20912 +dd.time {
20913 + line-height: 200%;
20914 +}
20915 +
20916 +dd.lastpost > span, ul.topiclist dd.info > span, ul.topiclist dd.time > span, dd.redirect > span, dd.moderation > span {
20917 + display: block;
20918 + padding-left: 5px;
20919 +}
20920 +
20921 +dd.extra, dd.mark {
20922 + line-height: 200%;
20923 +}
20924 +
20925 +dd.option {
20926 + width: 125px;
20927 + line-height: 200%;
20928 + text-align: center;
20929 + font-size: 1.1em;
20930 +}
20931 +
20932 +/* Post body styles
20933 +----------------------------------------*/
20934 +.postbody {
20935 + padding: 0;
20936 + line-height: 1.48em;
20937 + width: 76%;
20938 + float: left;
20939 + position: relative;
20940 +}
20941 +
20942 +.postbody .ignore {
20943 + font-size: 1.1em;
20944 +}
20945 +
20946 +.postbody h3.first {
20947 + /* The first post on the page uses this */
20948 + font-size: 1.7em;
20949 +}
20950 +
20951 +.postbody h3 {
20952 + /* Postbody requires a different h3 format - so change it here */
20953 + float: left;
20954 + font-size: 1.5em;
20955 + padding: 2px 0 0 0;
20956 + margin-top: 0 !important;
20957 + margin-bottom: 0.3em !important;
20958 + text-transform: none;
20959 + border: none;
20960 + font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
20961 + line-height: 125%;
20962 +}
20963 +
20964 +.postbody h3 img {
20965 + vertical-align: bottom;
20966 +}
20967 +
20968 +.has-profile .postbody h3 {
20969 + /* If there is a post-profile, we position the post-buttons differently */
20970 + float: none !important;
20971 + margin-right: 180px;
20972 +}
20973 +
20974 +.postbody .content {
20975 + font-size: 1.3em;
20976 + overflow-x: auto;
20977 +}
20978 +
20979 +.postbody img.postimage {
20980 + max-width: 100%;
20981 + -webkit-box-sizing: border-box;
20982 + -moz-box-sizing: border-box;
20983 + box-sizing: border-box;
20984 +}
20985 +
20986 +.search .postbody {
20987 + width: 68%
20988 +}
20989 +
20990 +/* Topic review panel
20991 +----------------------------------------*/
20992 +.panel .review {
20993 + margin-top: 2em;
20994 +}
20995 +
20996 +.topicreview {
20997 + padding-right: 5px;
20998 + overflow: auto;
20999 + height: 300px;
21000 +}
21001 +
21002 +.topicreview .postbody {
21003 + width: auto;
21004 + float: none;
21005 + margin: 0;
21006 + height: auto;
21007 +}
21008 +
21009 +.topicreview .post {
21010 + height: auto;
21011 +}
21012 +
21013 +.topicreview h2 {
21014 + border-bottom-width: 0;
21015 +}
21016 +
21017 +.post-ignore .postbody {
21018 + display: none;
21019 +}
21020 +
21021 +/* MCP Post details
21022 +----------------------------------------*/
21023 +.post_details {
21024 + /* This will only work in IE7+, plus the others */
21025 + overflow: auto;
21026 + max-height: 300px;
21027 +}
21028 +
21029 +/* Content container styles
21030 +----------------------------------------*/
21031 +.content {
21032 + clear: both;
21033 + min-height: 3em;
21034 + overflow: hidden;
21035 + line-height: 1.4em;
21036 + font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
21037 + font-size: 1em;
21038 + padding-bottom: 1px;
21039 +}
21040 +
21041 +.content h2, .panel h2 {
21042 + font-weight: normal;
21043 + border-bottom: 1px solid transparent;
21044 + font-size: 1.6em;
21045 + margin-top: 0.5em;
21046 + margin-bottom: 0.5em;
21047 + padding-bottom: 0.5em;
21048 +}
21049 +
21050 +.panel h3 {
21051 + margin: 0.5em 0;
21052 +}
21053 +
21054 +.panel p {
21055 + font-size: 1.2em;
21056 + margin-bottom: 1em;
21057 + line-height: 1.4em;
21058 +}
21059 +
21060 +.content p {
21061 + font-family: "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
21062 + font-size: 1.2em;
21063 + margin-bottom: 1em;
21064 + line-height: 1.4em;
21065 +}
21066 +
21067 +dl.faq {
21068 + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
21069 + font-size: 1.1em;
21070 + margin-top: 1em;
21071 + margin-bottom: 2em;
21072 + line-height: 1.4em;
21073 +}
21074 +
21075 +dl.faq dt {
21076 + font-weight: bold;
21077 +}
21078 +
21079 +.content dl.faq {
21080 + font-size: 1.2em;
21081 + margin-bottom: 0.5em;
21082 +}
21083 +
21084 +.content li {
21085 + list-style-type: inherit;
21086 +}
21087 +
21088 +.content ul, .content ol {
21089 + margin: 0.8em 0 0.9em 3em;
21090 +}
21091 +
21092 +.posthilit {
21093 + padding: 0 2px 1px 2px;
21094 +}
21095 +
21096 +/* Post author */
21097 +p.author {
21098 + margin-bottom: 0.6em;
21099 + padding: 0 0 5px 0;
21100 + font-family: Verdana, Helvetica, Arial, sans-serif;
21101 + font-size: 1em;
21102 + line-height: 1.2em;
21103 + clear: both;
21104 +}
21105 +
21106 +/* Post signature */
21107 +.signature {
21108 + margin-top: 1.5em;
21109 + padding-top: 0.2em;
21110 + font-size: 1.1em;
21111 + border-top: 1px solid transparent;
21112 + clear: left;
21113 + line-height: 140%;
21114 + overflow: hidden;
21115 + width: 100%;
21116 + opacity: 0.6;
21117 +}
21118 +
21119 +.signature:hover {
21120 + opacity: 1.0;
21121 +}
21122 +
21123 +.signature.standalone {
21124 + border-top-width: 0;
21125 + margin-top: 0;
21126 +}
21127 +
21128 +dd .signature {
21129 + margin: 0;
21130 + padding: 0;
21131 + clear: none;
21132 + border: none;
21133 +}
21134 +
21135 +.signature li {
21136 + list-style-type: inherit;
21137 +}
21138 +
21139 +.signature ul, .signature ol {
21140 + margin: 0.8em 0 0.9em 3em;
21141 +}
21142 +
21143 +/* Post noticies */
21144 +.notice {
21145 + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
21146 + width: auto;
21147 + margin-top: 1.5em;
21148 + padding-top: 0.2em;
21149 + font-size: 1em;
21150 + border-top: 1px dashed transparent;
21151 + clear: left;
21152 + line-height: 130%;
21153 +}
21154 +
21155 +/* Jump to post link for now */
21156 +ul.searchresults {
21157 + list-style: none;
21158 + text-align: right;
21159 + clear: both;
21160 +}
21161 +
21162 +/* BB Code styles
21163 +----------------------------------------*/
21164 +/* Quote block */
21165 +blockquote {
21166 + background: transparent none 6px 8px no-repeat;
21167 + border: 1px solid transparent;
21168 + font-size: 0.95em;
21169 + margin: 1em 1px 1em 25px;
21170 + overflow: hidden;
21171 + padding: 5px;
21172 +}
21173 +
21174 +blockquote blockquote {
21175 + /* Nested quotes */
21176 + font-size: 1em;
21177 + margin: 1em 1px 1em 15px;
21178 +}
21179 +
21180 +blockquote cite {
21181 + /* Username/source of quoter */
21182 + font-style: normal;
21183 + font-weight: bold;
21184 + margin-left: 20px;
21185 + display: block;
21186 + font-size: 0.9em;
21187 +}
21188 +
21189 +blockquote cite cite {
21190 + font-size: 1em;
21191 +}
21192 +
21193 +blockquote.uncited {
21194 + padding-top: 25px;
21195 +}
21196 +
21197 +blockquote cite > div {
21198 + float: right;
21199 + font-weight: normal;
21200 +}
21201 +
21202 +.postbody .content li blockquote {
21203 + overflow: inherit;
21204 + margin-left: 0;
21205 +}
21206 +
21207 +/* Code block */
21208 +.codebox {
21209 + padding: 3px;
21210 + border: 1px solid transparent;
21211 + font-size: 1em;
21212 + margin: 1em 0 1.2em 0;
21213 +}
21214 +
21215 +.codebox p {
21216 + text-transform: uppercase;
21217 + border-bottom: 1px solid transparent;
21218 + margin-bottom: 3px;
21219 + font-size: 0.8em !important;
21220 + font-weight: bold;
21221 + display: block;
21222 +}
21223 +
21224 +blockquote .codebox {
21225 + margin-left: 0;
21226 +}
21227 +
21228 +.codebox code {
21229 + overflow: auto;
21230 + display: block;
21231 + height: auto;
21232 + max-height: 200px;
21233 + padding-top: 5px;
21234 + font: 0.9em Monaco, "Andale Mono","Courier New", Courier, monospace;
21235 + line-height: 1.3em;
21236 + margin: 2px 0;
21237 +}
21238 +
21239 +/* Attachments
21240 +----------------------------------------*/
21241 +.attachbox {
21242 + float: left;
21243 + width: auto;
21244 + max-width: 100%;
21245 + margin: 5px 5px 5px 0;
21246 + padding: 6px;
21247 + border: 1px dashed transparent;
21248 + clear: left;
21249 + -webkit-box-sizing: border-box;
21250 + -moz-box-sizing: border-box;
21251 + box-sizing: border-box;
21252 +}
21253 +
21254 +.attachbox dt {
21255 + font-family: Arial, Helvetica, sans-serif;
21256 + text-transform: uppercase;
21257 +}
21258 +
21259 +.attachbox dd {
21260 + margin-top: 4px;
21261 + padding-top: 4px;
21262 + clear: left;
21263 + border-top: 1px solid transparent;
21264 + overflow-x: auto;
21265 +}
21266 +
21267 +.attachbox dd dd {
21268 + border: none;
21269 +}
21270 +
21271 +.attachbox p {
21272 + line-height: 110%;
21273 + font-weight: normal;
21274 + clear: left;
21275 +}
21276 +
21277 +.attachbox p.stats
21278 +{
21279 + line-height: 110%;
21280 + font-weight: normal;
21281 + clear: left;
21282 +}
21283 +
21284 +.attach-image {
21285 + margin: 3px 0;
21286 + max-width: 100%;
21287 +}
21288 +
21289 +.attach-image img {
21290 + border: 1px solid transparent;
21291 +/* cursor: move; */
21292 + cursor: default;
21293 +}
21294 +
21295 +/* Inline image thumbnails */
21296 +div.inline-attachment dl.thumbnail, div.inline-attachment dl.file {
21297 + display: block;
21298 + margin-bottom: 4px;
21299 +}
21300 +
21301 +div.inline-attachment p {
21302 + font-size: 100%;
21303 +}
21304 +
21305 +dl.file {
21306 + font-family: Verdana, Arial, Helvetica, sans-serif;
21307 + display: block;
21308 +}
21309 +
21310 +dl.file dt {
21311 + text-transform: none;
21312 + margin: 0;
21313 + padding: 0;
21314 + font-weight: bold;
21315 + font-family: Verdana, Arial, Helvetica, sans-serif;
21316 +}
21317 +
21318 +dl.file dd {
21319 + margin: 0;
21320 + padding: 0;
21321 +}
21322 +
21323 +dl.thumbnail img {
21324 + padding: 3px;
21325 + border: 1px solid transparent;
21326 + box-sizing: border-box;
21327 +}
21328 +
21329 +dl.thumbnail dd {
21330 + font-style: italic;
21331 + font-family: Verdana, Arial, Helvetica, sans-serif;
21332 +}
21333 +
21334 +.attachbox dl.thumbnail dd {
21335 + font-size: 100%;
21336 +}
21337 +
21338 +dl.thumbnail dt a:hover img {
21339 + border: 1px solid transparent;
21340 +}
21341 +
21342 +/* Post poll styles
21343 +----------------------------------------*/
21344 +fieldset.polls {
21345 + font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
21346 +}
21347 +
21348 +fieldset.polls dl {
21349 + margin-top: 5px;
21350 + border-top: 1px solid transparent;
21351 + padding: 5px 0 0 0;
21352 + line-height: 120%;
21353 +}
21354 +
21355 +fieldset.polls dl.voted {
21356 + font-weight: bold;
21357 +}
21358 +
21359 +fieldset.polls dt {
21360 + text-align: left;
21361 + float: left;
21362 + display: block;
21363 + width: 30%;
21364 + border-right: none;
21365 + padding: 0;
21366 + margin: 0;
21367 + font-size: 1.1em;
21368 +}
21369 +
21370 +fieldset.polls dd {
21371 + float: left;
21372 + width: 10%;
21373 + border-left: none;
21374 + padding: 0 5px;
21375 + margin-left: 0;
21376 + font-size: 1.1em;
21377 +}
21378 +
21379 +fieldset.polls dd.resultbar {
21380 + width: 50%;
21381 +}
21382 +
21383 +fieldset.polls dd input {
21384 + margin: 2px 0;
21385 +}
21386 +
21387 +fieldset.polls dd div {
21388 + text-align: right;
21389 + font-family: Arial, Helvetica, sans-serif;
21390 + font-weight: bold;
21391 + padding: 2px 2px 0 2px;
21392 + overflow: visible;
21393 + min-width: 8px;
21394 +}
21395 +
21396 +.pollbar1, .pollbar2, .pollbar3, .pollbar4, .pollbar5 {
21397 + border-bottom: 1px solid transparent;
21398 + border-right: 1px solid transparent;
21399 +}
21400 +
21401 +.vote-submitted {
21402 + font-size: 1.2em;
21403 + font-weight: bold;
21404 + text-align: center;
21405 +}
21406 +
21407 +/* Poster profile block
21408 +----------------------------------------*/
21409 +#subsilver-nav-topic {
21410 + display: block;
21411 + font-weight: bold;
21412 + line-height: 16px;
21413 + margin: 3px auto 0;
21414 + padding: 3px 10px;
21415 +}
21416 +
21417 +#subsilver-nav-topic .post.has-profile {
21418 + border: none;
21419 +}
21420 +
21421 +.postprofile.subsilver-topic-author {
21422 + border: none;
21423 + margin: 0;
21424 + min-height: 0;
21425 + text-align: center;
21426 + width: 22%;
21427 +}
21428 +
21429 +.leftsided.postprofile.subsilver-topic-author {
21430 + border: none !important;
21431 + width: 20%;
21432 +}
21433 +
21434 +.subsilver-topic-title {
21435 + display: block;
21436 + margin: 0;
21437 + text-align: center;
21438 + width: 77%;
21439 +}
21440 +
21441 +.leftsided.subsilver-topic-title {
21442 + width: 77%;
21443 +}
21444 +
21445 +.postprofile {
21446 + margin: 5px 0 10px 0;
21447 + min-height: 80px;
21448 + border: 1px solid transparent;
21449 + border-width: 0 0 0 1px;
21450 + width: 22%;
21451 + float: right;
21452 + display: inline;
21453 +}
21454 +
21455 +.postprofile dd, .postprofile dt {
21456 + line-height: 1.2em;
21457 + margin-left: 8px;
21458 +}
21459 +
21460 +.postprofile dd {
21461 + overflow: hidden;
21462 + text-overflow: ellipsis;
21463 +}
21464 +
21465 +.postprofile strong {
21466 + font-weight: normal;
21467 +}
21468 +
21469 +.postprofile dt.no-profile-rank, .postprofile dd.profile-rank, .postprofile .search-result-date {
21470 + margin-bottom: 10px;
21471 +}
21472 +
21473 +/* Post-profile avatars */
21474 +.postprofile .has-avatar .avatar-container {
21475 + margin-bottom: 3px;
21476 + overflow: hidden;
21477 +}
21478 +
21479 +.postprofile .avatar {
21480 + display: block;
21481 + float: left;
21482 + max-width: 100%;
21483 +}
21484 +
21485 +.postprofile .avatar img {
21486 + display: block;
21487 + height: auto !important;
21488 + max-width: 100%;
21489 + border-radius: 7px;
21490 + margin: 0;
21491 + opacity: 0.9;
21492 + padding: 0;
21493 +}
21494 +
21495 +.avatar-container {
21496 + max-width: 130px;
21497 + padding: 7px;
21498 +}
21499 +
21500 +.postprofile .profile-posts a {
21501 + font-weight: normal;
21502 +}
21503 +
21504 +dd.profile-warnings {
21505 + font-weight: bold;
21506 +}
21507 +
21508 +dd.profile-contact {
21509 + overflow: visible;
21510 +}
21511 +
21512 +.profile-contact .dropdown-container {
21513 + display: inline-block;
21514 +}
21515 +
21516 +.profile-contact .icon_contact {
21517 + vertical-align: middle;
21518 +}
21519 +
21520 +.profile-contact .dropdown {
21521 + margin-right: -14px;
21522 +}
21523 +
21524 +.online {
21525 + background-image: none;
21526 + background-position: 100% 0;
21527 + background-repeat: no-repeat;
21528 +}
21529 +
21530 +/* Poster profile used by search*/
21531 +.search .postprofile {
21532 + width: 30%;
21533 +}
21534 +
21535 +/* Profile used on view-profile */
21536 +.profile-avatar img {
21537 + max-width: 100%;
21538 +}
21539 +
21540 +/* pm list in compose message if mass pm is enabled */
21541 +dl.pmlist dt {
21542 + width: 60% !important;
21543 +}
21544 +
21545 +dl.pmlist dt textarea {
21546 + width: 95%;
21547 +}
21548 +
21549 +dl.pmlist dd {
21550 + margin-left: 61% !important;
21551 + margin-bottom: 2px;
21552 +}
21553 +
21554 +.action-bar div.dl_links {
21555 + padding: 10px 0 0 10px;
21556 +}
21557 +
21558 +div.dl_links {
21559 + display: inline-block;
21560 + text-transform: none;
21561 +}
21562 +
21563 +.dl_links strong {
21564 + font-weight: bold;
21565 +}
21566 +
21567 +.dl_links ul {
21568 + list-style-type: none;
21569 + margin: 0;
21570 + display: inline-block;
21571 +}
21572 +
21573 +.dl_links li {
21574 + display: inline-block;
21575 +}
21576 +
21577 +.attachment-filename {
21578 + width: 100%;
21579 +}
21580 +
21581 +.ellipsis-text {
21582 + display: inline-block;
21583 + overflow: hidden;
21584 + text-overflow: ellipsis;
21585 + white-space: nowrap;
21586 +}
21587 +
21588 +table.fixed-width-table {
21589 + table-layout: fixed;
21590 +}
21591 +
21592 +/* Show scrollbars for items with overflow on iOS devices
21593 +----------------------------------------*/
21594 +.postbody .content::-webkit-scrollbar, .topicreview::-webkit-scrollbar, .post_details::-webkit-scrollbar, .codebox code::-webkit-scrollbar, .attachbox dd::-webkit-scrollbar, .attach-image::-webkit-scrollbar, .dropdown-extended ul::-webkit-scrollbar {
21595 + width: 8px;
21596 + height: 8px;
21597 + -webkit-appearance: none;
21598 + background: rgba(0, 0, 0, .1);
21599 + border-radius: 3px;
21600 +}
21601 +
21602 +.postbody .content::-webkit-scrollbar-thumb, .topicreview::-webkit-scrollbar-thumb, .post_details::-webkit-scrollbar-thumb, .codebox code::-webkit-scrollbar-thumb, .attachbox dd::-webkit-scrollbar-thumb, .attach-image::-webkit-scrollbar-thumb, .dropdown-extended ul::-webkit-scrollbar-thumb {
21603 + background: rgba(0, 0, 0, .3);
21604 + border-radius: 3px;
21605 +}
21606 +
21607 +#memberlist tr.inactive, #team tr.inactive {
21608 + font-style: italic;
21609 +}
21610
21611 diff --git a/AllanStyle-SUBSILVER/theme/cp.css b/AllanStyle-SUBSILVER/theme/cp.css
21612 new file mode 100644
21613 index 000000000..0dfe97051
21614 --- /dev/null
21615 +++ b/AllanStyle-SUBSILVER/theme/cp.css
21616 @@ -0,0 +1,371 @@
21617 +/* Control Panel Styles
21618 +---------------------------------------- */
21619 +
21620 +
21621 +/* Main CP box
21622 +----------------------------------------*/
21623 +.cp-menu {
21624 + float:left;
21625 + width: 19%;
21626 + margin-top: 1em;
21627 + margin-bottom: 5px;
21628 +}
21629 +
21630 +.cp-main {
21631 + float: left;
21632 + width: 81%;
21633 +}
21634 +
21635 +.cp-main .content {
21636 + padding: 0;
21637 +}
21638 +
21639 +.panel-container .panel p {
21640 + font-size: 1.1em;
21641 +}
21642 +
21643 +.panel-container .panel ol {
21644 + margin-left: 2em;
21645 + font-size: 1.1em;
21646 +}
21647 +
21648 +.panel-container .panel li.row {
21649 + border-bottom: 1px solid transparent;
21650 + border-top: 1px solid transparent;
21651 +}
21652 +
21653 +ul.cplist {
21654 + margin-bottom: 5px;
21655 + border-top: 1px solid transparent;
21656 +}
21657 +
21658 +.panel-container .panel li.header dd, .panel-container .panel li.header dt {
21659 + margin-bottom: 2px;
21660 +}
21661 +
21662 +.panel-container table.table1 {
21663 + margin-bottom: 1em;
21664 +}
21665 +
21666 +.panel-container table.table1 thead th {
21667 + font-weight: bold;
21668 + border-bottom: 1px solid transparent;
21669 + padding: 5px;
21670 +}
21671 +
21672 +.panel-container table.table1 tbody th {
21673 + font-style: italic;
21674 + background-color: transparent !important;
21675 + border-bottom: none;
21676 +}
21677 +
21678 +.cp-main .pm-message {
21679 + border: 1px solid transparent;
21680 + margin: 10px 0;
21681 + width: auto;
21682 + float: none;
21683 +}
21684 +
21685 +.pm-message h2 {
21686 + padding-bottom: 5px;
21687 +}
21688 +
21689 +.cp-main .postbody h3, .cp-main .box2 h3 {
21690 + margin-top: 0;
21691 +}
21692 +
21693 +.panel-container .postbody p.author {
21694 + font-size: 1.1em;
21695 +}
21696 +
21697 +.cp-main .buttons {
21698 + margin-left: 0;
21699 +}
21700 +
21701 +.cp-main ul.linklist {
21702 + margin: 0;
21703 +}
21704 +
21705 +/* MCP Specific tweaks */
21706 +.mcp-main .postbody {
21707 + width: 100%;
21708 +}
21709 +
21710 +.tabs-container h2 {
21711 + float: left;
21712 + margin-bottom: 0px;
21713 +}
21714 +
21715 +/* CP tabs shared
21716 +----------------------------------------*/
21717 +.tabs, .minitabs {
21718 + line-height: normal;
21719 +}
21720 +
21721 +.tabs > ul, .minitabs > ul {
21722 + list-style: none;
21723 + margin: 0;
21724 + padding: 0;
21725 + position: relative;
21726 +}
21727 +
21728 +.tabs .tab, .minitabs .tab {
21729 + display: block;
21730 + float: left;
21731 + font-size: 1em;
21732 + font-weight: bold;
21733 + line-height: 1.4em;
21734 +}
21735 +
21736 +.tabs .tab > a, .minitabs .tab > a {
21737 + display: block;
21738 + padding: 5px 9px;
21739 + position: relative;
21740 + text-decoration: none;
21741 + white-space: nowrap;
21742 + cursor: pointer;
21743 +}
21744 +
21745 +/* CP tabbed menu
21746 +----------------------------------------*/
21747 +.tabs {
21748 + margin: 20px 0 0 7px;
21749 +}
21750 +
21751 +.tabs .tab > a {
21752 + border: 1px solid transparent;
21753 + border-radius: 4px 4px 0 0;
21754 + margin: 1px 1px 0 0;
21755 +}
21756 +
21757 +.tabs .activetab > a {
21758 + margin-top: 0;
21759 + padding-bottom: 7px;
21760 +}
21761 +
21762 +/* Mini tabbed menu used in MCP
21763 +----------------------------------------*/
21764 +.minitabs {
21765 + float: right;
21766 + margin: 15px 7px 0 0;
21767 + max-width: 50%;
21768 +}
21769 +
21770 +.minitabs .tab {
21771 + float: right;
21772 +}
21773 +
21774 +.minitabs .tab > a {
21775 + border-radius: 5px 5px 0 0;
21776 + margin-left: 2px;
21777 +}
21778 +
21779 +.minitabs .tab > a:hover {
21780 + text-decoration: none;
21781 +}
21782 +
21783 +/* Responsive tabs
21784 +----------------------------------------*/
21785 +.responsive-tab {
21786 + position: relative;
21787 +}
21788 +
21789 +.responsive-tab > a.responsive-tab-link {
21790 + display: block;
21791 + font-size: 1.6em;
21792 + position: relative;
21793 + width: 16px;
21794 + line-height: 0.9em;
21795 + text-decoration: none;
21796 +}
21797 +
21798 +.responsive-tab .responsive-tab-link:before {
21799 + content: '';
21800 + position: absolute;
21801 + left: 10px;
21802 + top: 7px;
21803 + height: .125em;
21804 + width: 14px;
21805 + border-bottom: 0.125em solid transparent;
21806 + border-top: 0.375em double transparent;
21807 +}
21808 +
21809 +.tabs .dropdown, .minitabs .dropdown {
21810 + top: 20px;
21811 + margin-right: -2px;
21812 + font-size: 1.1em;
21813 + font-weight: normal;
21814 +}
21815 +
21816 +.minitabs .dropdown {
21817 + margin-right: -4px;
21818 +}
21819 +
21820 +.tabs .dropdown-up .dropdown, .minitabs .dropdown-up .dropdown {
21821 + bottom: 20px;
21822 + top: auto;
21823 +}
21824 +
21825 +.tabs .dropdown li {
21826 + text-align: right;
21827 +}
21828 +
21829 +.minitabs .dropdown li {
21830 + text-align: left;
21831 +}
21832 +
21833 +/* UCP navigation menu
21834 +----------------------------------------*/
21835 +/* Container for sub-navigation list */
21836 +.navigation {
21837 + width: 100%;
21838 + padding-top: 36px;
21839 +}
21840 +
21841 +.navigation ul {
21842 + list-style: none;
21843 +}
21844 +
21845 +/* Default list state */
21846 +.navigation li {
21847 + display: inline;
21848 + font-weight: bold;
21849 + margin: 1px 0;
21850 + padding: 0;
21851 +}
21852 +
21853 +/* Link styles for the sub-section links */
21854 +.navigation a {
21855 + display: block;
21856 + padding: 5px;
21857 + margin: 1px 0;
21858 + text-decoration: none;
21859 +}
21860 +
21861 +.navigation a:hover {
21862 + text-decoration: none;
21863 +}
21864 +
21865 +/* Preferences pane layout
21866 +----------------------------------------*/
21867 +.cp-main h2 {
21868 + border-bottom: none;
21869 + padding: 0;
21870 + margin-left: 10px;
21871 +}
21872 +
21873 +/* Friends list */
21874 +.cp-mini {
21875 + margin: 10px 15px 10px 5px;
21876 + max-height: 200px;
21877 + overflow-y: auto;
21878 + padding: 5px 10px;
21879 +}
21880 +
21881 +dl.mini dt {
21882 + font-weight: bold;
21883 +}
21884 +
21885 +dl.mini dd {
21886 + padding-top: 4px;
21887 +}
21888 +
21889 +.friend-online {
21890 + font-weight: bold;
21891 +}
21892 +
21893 +.friend-offline {
21894 + font-style: italic;
21895 +}
21896 +
21897 +/* PM Styles
21898 +----------------------------------------*/
21899 +/* Defined rules list for PM options */
21900 +ol.def-rules {
21901 + padding-left: 0;
21902 +}
21903 +
21904 +ol.def-rules li {
21905 + line-height: 180%;
21906 + padding: 1px;
21907 +}
21908 +
21909 +/* PM marking colours */
21910 +.pmlist li.bg1 {
21911 + padding: 0 3px;
21912 +}
21913 +
21914 +.pmlist li.bg2 {
21915 + padding: 0 3px;
21916 +}
21917 +
21918 +.pmlist li.pm_message_reported_colour, .pm_message_reported_colour {
21919 + border-left-color: transparent;
21920 + border-right-color: transparent;
21921 +}
21922 +
21923 +.pmlist li.pm_marked_colour, .pm_marked_colour,
21924 +.pmlist li.pm_replied_colour, .pm_replied_colour,
21925 +.pmlist li.pm_friend_colour, .pm_friend_colour,
21926 +.pmlist li.pm_foe_colour, .pm_foe_colour {
21927 + padding: 0;
21928 + border: solid 3px transparent;
21929 + border-width: 0 3px;
21930 +}
21931 +
21932 +.pm-legend {
21933 + border-left-width: 10px;
21934 + border-left-style: solid;
21935 + border-right-width: 0;
21936 + margin-bottom: 3px;
21937 + padding-left: 3px;
21938 +}
21939 +
21940 +/* Avatar gallery */
21941 +.gallery label {
21942 + position: relative;
21943 + float: left;
21944 + margin: 10px;
21945 + padding: 5px;
21946 + width: auto;
21947 + border: 1px solid transparent;
21948 + text-align: center;
21949 +}
21950 +
21951 +/* Responsive *CP navigation
21952 +----------------------------------------*/
21953 +@media only screen and (max-width: 900px), only screen and (max-device-width: 900px)
21954 +{
21955 + .nojs .tabs a span, .nojs .minitabs a span {
21956 + max-width: 40px;
21957 + overflow: hidden;
21958 + text-overflow: ellipsis;
21959 + letter-spacing: -.5px;
21960 + }
21961 +
21962 + .cp-menu, .navigation, .cp-main {
21963 + float: none;
21964 + width: auto;
21965 + margin: 0;
21966 + }
21967 +
21968 + .navigation {
21969 + padding: 0;
21970 + margin: 0 auto;
21971 + max-width: 320px;
21972 + }
21973 +
21974 + .navigation a {
21975 + background-image: none;
21976 + }
21977 +
21978 + .navigation li:first-child a {
21979 + border-top-left-radius: 5px;
21980 + border-top-right-radius: 5px;
21981 + }
21982 +
21983 + .navigation li:last-child a {
21984 + border-bottom-left-radius: 5px;
21985 + border-bottom-right-radius: 5px;
21986 + }
21987 +}
21988
21989 diff --git a/AllanStyle-SUBSILVER/theme/en/icon_user_online.gif b/AllanStyle-SUBSILVER/theme/en/icon_user_online.gif
21990 new file mode 100644
21991 index 000000000..6b571ffce
21992 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/en/icon_user_online.gif differ
21993
21994 diff --git a/AllanStyle-SUBSILVER/theme/en/stylesheet.css b/AllanStyle-SUBSILVER/theme/en/stylesheet.css
21995 new file mode 100644
21996 index 000000000..604b29948
21997 --- /dev/null
21998 +++ b/AllanStyle-SUBSILVER/theme/en/stylesheet.css
21999 @@ -0,0 +1,2 @@
22000 +/* Online image */
22001 +.online { background-image: url("./icon_user_online.gif"); }
22002
22003 diff --git a/AllanStyle-SUBSILVER/theme/forms.css b/AllanStyle-SUBSILVER/theme/forms.css
22004 new file mode 100644
22005 index 000000000..e8efbc604
22006 --- /dev/null
22007 +++ b/AllanStyle-SUBSILVER/theme/forms.css
22008 @@ -0,0 +1,429 @@
22009 +/* Form Styles
22010 +---------------------------------------- */
22011 +
22012 +/* General form styles
22013 +----------------------------------------*/
22014 +fieldset {
22015 + border-width: 0;
22016 + font-family: Verdana, Helvetica, Arial, sans-serif;
22017 + font-size: 1.1em;
22018 +}
22019 +
22020 +input {
22021 + font-weight: normal;
22022 + vertical-align: middle;
22023 + padding: 0 3px;
22024 + font-size: 1em;
22025 + font-family: Verdana, Helvetica, Arial, sans-serif;
22026 +}
22027 +
22028 +select {
22029 + font-family: Verdana, Helvetica, Arial, sans-serif;
22030 + font-weight: normal;
22031 + cursor: pointer;
22032 + vertical-align: middle;
22033 + border: 1px solid transparent;
22034 + padding: 1px;
22035 + font-size: 1em;
22036 +}
22037 +
22038 +select:focus {
22039 + outline-style: none;
22040 +}
22041 +
22042 +option {
22043 + padding-right: 1em;
22044 +}
22045 +
22046 +select optgroup option {
22047 + padding-right: 1em;
22048 + font-family: Verdana, Helvetica, Arial, sans-serif;
22049 +}
22050 +
22051 +textarea {
22052 + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
22053 + width: 60%;
22054 + padding: 2px;
22055 + font-size: 1em;
22056 + line-height: 1.4em;
22057 +}
22058 +
22059 +label {
22060 + cursor: default;
22061 + padding-right: 5px;
22062 +}
22063 +
22064 +label input {
22065 + vertical-align: middle;
22066 +}
22067 +
22068 +label img {
22069 + vertical-align: middle;
22070 +}
22071 +
22072 +/* Definition list layout for forms
22073 +---------------------------------------- */
22074 +fieldset dl {
22075 + padding: 4px 0;
22076 +}
22077 +
22078 +fieldset dt {
22079 + float: left;
22080 + width: 40%;
22081 + text-align: left;
22082 + display: block;
22083 +}
22084 +
22085 +fieldset dd {
22086 + margin-left: 41%;
22087 + vertical-align: top;
22088 + margin-bottom: 3px;
22089 +}
22090 +
22091 +/* Specific layout 1 */
22092 +fieldset.fields1 dt {
22093 + width: 15em;
22094 + border-right-width: 0;
22095 +}
22096 +
22097 +fieldset.fields1 dd {
22098 + margin-left: 15em;
22099 + border-left-width: 0;
22100 +}
22101 +
22102 +fieldset.fields1 div {
22103 + margin-bottom: 3px;
22104 +}
22105 +
22106 +/* Set it back to 0px for the reCaptcha divs: PHPBB3-9587 */
22107 +fieldset.fields1 .live-search div {
22108 + margin-bottom: 0;
22109 +}
22110 +
22111 +/* Specific layout 2 */
22112 +fieldset.fields2 dt {
22113 + width: 15em;
22114 + border-right-width: 0;
22115 +}
22116 +
22117 +fieldset.fields2 dd {
22118 + margin-left: 16em;
22119 + border-left-width: 0;
22120 +}
22121 +
22122 +/* Form elements */
22123 +dt label {
22124 + font-weight: bold;
22125 + text-align: left;
22126 +}
22127 +
22128 +dd label {
22129 + white-space: nowrap;
22130 +}
22131 +
22132 +dd input, dd textarea {
22133 + margin-right: 3px;
22134 +}
22135 +
22136 +dd select {
22137 + width: auto;
22138 +}
22139 +
22140 +dd select[multiple] {
22141 + width: 100%;
22142 +}
22143 +
22144 +dd textarea {
22145 + width: 85%;
22146 +}
22147 +
22148 +/* Hover effects */
22149 +.timezone {
22150 + width: 95%;
22151 +}
22152 +
22153 +/* Browser-specific tweaks */
22154 +button::-moz-focus-inner {
22155 + padding: 0;
22156 + border: 0
22157 +}
22158 +
22159 +/* Quick-login on index page */
22160 +fieldset.quick-login {
22161 + margin-top: 5px;
22162 +}
22163 +
22164 +fieldset.quick-login input {
22165 + width: auto;
22166 +}
22167 +
22168 +fieldset.quick-login input.inputbox {
22169 + width: 15%;
22170 + vertical-align: middle;
22171 + margin-right: 5px;
22172 +}
22173 +
22174 +fieldset.quick-login label {
22175 + white-space: nowrap;
22176 + padding-right: 2px;
22177 +}
22178 +
22179 +/* Display options on viewtopic/viewforum pages */
22180 +fieldset.display-options {
22181 + text-align: center;
22182 + margin: 3px 0 5px 0;
22183 +}
22184 +
22185 +fieldset.display-options label {
22186 + white-space: nowrap;
22187 + padding-right: 2px;
22188 +}
22189 +
22190 +fieldset.display-options a {
22191 + margin-top: 3px;
22192 +}
22193 +
22194 +.dropdown fieldset.display-options {
22195 + font-size: 1em;
22196 + margin: 0;
22197 + padding: 0;
22198 +}
22199 +
22200 +.dropdown fieldset.display-options label {
22201 + display: block;
22202 + margin: 4px;
22203 + padding: 0;
22204 + text-align: right;
22205 + white-space: nowrap;
22206 +}
22207 +
22208 +.dropdown fieldset.display-options select {
22209 + min-width: 120px;
22210 +}
22211 +
22212 +/* Display actions for ucp and mcp pages */
22213 +fieldset.display-actions {
22214 + text-align: right;
22215 + line-height: 2em;
22216 + white-space: nowrap;
22217 + padding-right: 1em;
22218 +}
22219 +
22220 +fieldset.display-actions label {
22221 + white-space: nowrap;
22222 + padding-right: 2px;
22223 +}
22224 +
22225 +fieldset.sort-options {
22226 + line-height: 2em;
22227 +}
22228 +
22229 +/* MCP forum selection*/
22230 +fieldset.forum-selection {
22231 + margin: 5px 0 3px 0;
22232 + float: right;
22233 +}
22234 +
22235 +fieldset.forum-selection2 {
22236 + margin: 13px 0 3px 0;
22237 + float: right;
22238 +}
22239 +
22240 +/* Submit button fieldset */
22241 +fieldset.submit-buttons {
22242 + text-align: center;
22243 + vertical-align: middle;
22244 + margin: 5px 0;
22245 +}
22246 +
22247 +fieldset.submit-buttons input {
22248 + vertical-align: middle;
22249 +}
22250 +
22251 +/* Posting page styles
22252 +----------------------------------------*/
22253 +
22254 +/* Buttons used in the editor */
22255 +.format-buttons {
22256 + margin: 15px 0 2px 0;
22257 +}
22258 +
22259 +.format-buttons input, .format-buttons select {
22260 + vertical-align: middle;
22261 +}
22262 +
22263 +/* Main message box */
22264 +.message-box {
22265 + width: 80%;
22266 +}
22267 +
22268 +.message-box textarea {
22269 + font-family: "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif;
22270 + width: 450px;
22271 + height: 270px;
22272 + min-width: 100%;
22273 + max-width: 100%;
22274 + font-size: 1.2em;
22275 + resize: vertical;
22276 + outline: 3px dashed transparent;
22277 + outline-offset: -4px;
22278 + -webkit-transition: all .5s ease;
22279 + -moz-transition: all .5s ease;
22280 + -ms-transition: all .5s ease;
22281 + -o-transition: all .5s ease;
22282 + transition: all .5s ease;
22283 +}
22284 +
22285 +/* Emoticons panel */
22286 +.smiley-box {
22287 + width: 18%;
22288 + float: right;
22289 +}
22290 +
22291 +.smiley-box img {
22292 + margin: 3px;
22293 +}
22294 +
22295 +/* Input field styles
22296 +---------------------------------------- */
22297 +.inputbox {
22298 + border: 1px solid transparent;
22299 + padding: 2px;
22300 +}
22301 +
22302 +.inputbox:hover, .inputbox:focus {
22303 + border: 1px solid transparent;
22304 + outline-style: none;
22305 +}
22306 +
22307 +input.inputbox { width: 85%; }
22308 +input.medium { width: 50%; }
22309 +input.narrow { width: 25%; }
22310 +input.tiny { width: 150px; }
22311 +
22312 +textarea.inputbox {
22313 + width: 85%;
22314 +}
22315 +
22316 +.autowidth {
22317 + width: auto !important;
22318 +}
22319 +
22320 +input[type="number"] {
22321 + -moz-padding-end: inherit;
22322 +}
22323 +
22324 +input[type="search"] {
22325 + -webkit-appearance: textfield;
22326 + -webkit-box-sizing: content-box;
22327 +}
22328 +
22329 +input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-results-button, input[type="search"]::-webkit-search-results-decoration {
22330 + display: none;
22331 +}
22332 +
22333 +input[type="search"]::-webkit-search-cancel-button {
22334 + cursor: pointer;
22335 +}
22336 +
22337 +/* Form button styles
22338 +---------------------------------------- */
22339 +input.button1, input.button2 {
22340 + font-size: 1em;
22341 +}
22342 +
22343 +a.button1, input.button1, input.button3, a.button2, input.button2 {
22344 + width: auto !important;
22345 + padding-top: 1px;
22346 + padding-bottom: 1px;
22347 + font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
22348 + background: transparent none repeat-x top left;
22349 + line-height: 1.5;
22350 +}
22351 +
22352 +a.button1, input.button1 {
22353 + font-weight: bold;
22354 + border: 1px solid transparent;
22355 +}
22356 +
22357 +input.button3 {
22358 + padding: 0;
22359 + margin: 0;
22360 + line-height: 5px;
22361 + height: 12px;
22362 + background-image: none;
22363 + font-variant: small-caps;
22364 +}
22365 +
22366 +input[type="button"], input[type="submit"], input[type="reset"], input[type="checkbox"], input[type="radio"] {
22367 + cursor: pointer;
22368 +}
22369 +
22370 +/* Alternative button */
22371 +a.button2, input.button2, input.button3 {
22372 + border: 1px solid transparent;
22373 +}
22374 +
22375 +/* <a> button in the style of the form buttons */
22376 +a.button1, a.button2 {
22377 + text-decoration: none;
22378 + padding: 0 3px;
22379 + vertical-align: text-bottom;
22380 +}
22381 +
22382 +/* Hover states */
22383 +a.button1:hover, input.button1:hover, a.button2:hover, input.button2:hover, input.button3:hover {
22384 + border: 1px solid transparent;
22385 +}
22386 +
22387 +input.disabled {
22388 + font-weight: normal;
22389 +}
22390 +
22391 +/* Focus states */
22392 +input.button1:focus, input.button2:focus, input.button3:focus {
22393 + outline-style: none;
22394 +}
22395 +
22396 +/* Topic and forum Search */
22397 +.search-box {
22398 + float: left;
22399 +}
22400 +
22401 +.search-box .inputbox {
22402 + background-image: none;
22403 + border-right-width: 0;
22404 + border-radius: 4px 0 0 4px;
22405 + float: left;
22406 + height: 24px;
22407 + padding: 3px;
22408 + -webkit-box-sizing: border-box;
22409 + -moz-box-sizing: border-box;
22410 + box-sizing: border-box;
22411 +}
22412 +
22413 +/* Search box (header)
22414 +--------------------------------------------- */
22415 +.search-header {
22416 + border-radius: 4px;
22417 + display: block;
22418 + float: right;
22419 + margin-right: 5px;
22420 + margin-top: 30px;
22421 +}
22422 +
22423 +.search-header .inputbox { border: 0; }
22424 +
22425 +.navbar .linklist > li.responsive-search { display: none; }
22426 +
22427 +input.search {
22428 + background-image: none;
22429 + background-repeat: no-repeat;
22430 + background-position: left 1px;
22431 + padding-left: 17px;
22432 +}
22433 +
22434 +.full { width: 95%; }
22435 +.medium { width: 50%;}
22436 +.narrow { width: 25%;}
22437 +.tiny { width: 10%;}
22438
22439 diff --git a/AllanStyle-SUBSILVER/theme/icons.css b/AllanStyle-SUBSILVER/theme/icons.css
22440 new file mode 100644
22441 index 000000000..6643f12d0
22442 --- /dev/null
22443 +++ b/AllanStyle-SUBSILVER/theme/icons.css
22444 @@ -0,0 +1,96 @@
22445 +/* --------------------------------------------------------------
22446 + $Icons
22447 +-------------------------------------------------------------- */
22448 +
22449 +/* Global module setup
22450 +--------------------------------*/
22451 +
22452 +/* Renamed version of .fa class for agnostic useage of icon fonts.
22453 + * Just change the name of the font after the 14/1 to the name of
22454 + * the font you wish to use.
22455 + */
22456 +.icon, .button .icon, blockquote cite:before, .uncited:before {
22457 + display: inline-block;
22458 + font-weight: normal;
22459 + font-style: normal;
22460 + font-variant: normal;
22461 + font-family: FontAwesome;
22462 + font-size: 14px;
22463 + line-height: 1;
22464 + text-rendering: auto; /* optimizelegibility throws things off #1094 */
22465 + -webkit-font-smoothing: antialiased;
22466 + -moz-osx-font-smoothing: grayscale;
22467 +}
22468 +
22469 +.icon:before { padding-right: 2px; }
22470 +
22471 +.button .icon:before {
22472 + padding-right: 0;
22473 +}
22474 +
22475 +/* Icon size classes - Default size is 14px, use these for small variations */
22476 +
22477 +.icon.icon-xl {
22478 + font-size: 20px;
22479 +}
22480 +
22481 +.icon.icon-lg {
22482 + font-size: 16px;
22483 +}
22484 +
22485 +.icon.icon-md {
22486 + font-size: 10px;
22487 +}
22488 +
22489 +.icon.icon-sm {
22490 + font-size: 8px;
22491 +}
22492 +
22493 +/* icon modifiers */
22494 +.icon-tiny {
22495 + width: 12px;
22496 + transform: scale(0.65, 0.75);
22497 + vertical-align: text-bottom;
22498 + font-size: 16px;
22499 +}
22500 +
22501 +.arrow-left .icon {
22502 + float: left;
22503 +}
22504 +
22505 +.arrow-left:hover .icon {
22506 + margin-left: -5px;
22507 + margin-right: 5px;
22508 +}
22509 +
22510 +.arrow-right .icon {
22511 + float: right;
22512 +}
22513 +
22514 +.arrow-right:hover .icon {
22515 + margin-left: 5px;
22516 + margin-right: -5px;
22517 +}
22518 +
22519 +.post-buttons .dropdown-contents .icon {
22520 + float: right;
22521 + margin-left: 5px;
22522 +}
22523 +
22524 +.alert_close .icon:before {
22525 + padding: 0;
22526 + border-radius: 50%;
22527 + width: 11px;
22528 + display: block;
22529 + line-height: .9;
22530 + height: 12px;
22531 +}
22532 +
22533 +blockquote cite:before, .uncited:before {
22534 + content: '\f10d'; /* Font Awesome quote-left */
22535 +}
22536 +
22537 +.rtl blockquote cite:before, .rtl .uncited:before {
22538 + content: '\f10e'; /* Font Awesome quote-right */
22539 +}
22540 +
22541
22542 diff --git a/AllanStyle-SUBSILVER/theme/images/announce_read.gif b/AllanStyle-SUBSILVER/theme/images/announce_read.gif
22543 new file mode 100644
22544 index 000000000..0589feb14
22545 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/announce_read.gif differ
22546
22547 diff --git a/AllanStyle-SUBSILVER/theme/images/announce_read_locked.gif b/AllanStyle-SUBSILVER/theme/images/announce_read_locked.gif
22548 new file mode 100644
22549 index 000000000..a738616e0
22550 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/announce_read_locked.gif differ
22551
22552 diff --git a/AllanStyle-SUBSILVER/theme/images/announce_read_locked_mine.gif b/AllanStyle-SUBSILVER/theme/images/announce_read_locked_mine.gif
22553 new file mode 100644
22554 index 000000000..f7ffe7f8d
22555 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/announce_read_locked_mine.gif differ
22556
22557 diff --git a/AllanStyle-SUBSILVER/theme/images/announce_read_mine.gif b/AllanStyle-SUBSILVER/theme/images/announce_read_mine.gif
22558 new file mode 100644
22559 index 000000000..636d35386
22560 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/announce_read_mine.gif differ
22561
22562 diff --git a/AllanStyle-SUBSILVER/theme/images/announce_unread.gif b/AllanStyle-SUBSILVER/theme/images/announce_unread.gif
22563 new file mode 100644
22564 index 000000000..56b2702b1
22565 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/announce_unread.gif differ
22566
22567 diff --git a/AllanStyle-SUBSILVER/theme/images/announce_unread_locked.gif b/AllanStyle-SUBSILVER/theme/images/announce_unread_locked.gif
22568 new file mode 100644
22569 index 000000000..37033da65
22570 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/announce_unread_locked.gif differ
22571
22572 diff --git a/AllanStyle-SUBSILVER/theme/images/announce_unread_locked_mine.gif b/AllanStyle-SUBSILVER/theme/images/announce_unread_locked_mine.gif
22573 new file mode 100644
22574 index 000000000..d91f2520c
22575 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/announce_unread_locked_mine.gif differ
22576
22577 diff --git a/AllanStyle-SUBSILVER/theme/images/announce_unread_mine.gif b/AllanStyle-SUBSILVER/theme/images/announce_unread_mine.gif
22578 new file mode 100644
22579 index 000000000..e1dd23a0b
22580 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/announce_unread_mine.gif differ
22581
22582 diff --git a/AllanStyle-SUBSILVER/theme/images/bg_header.gif b/AllanStyle-SUBSILVER/theme/images/bg_header.gif
22583 new file mode 100644
22584 index 000000000..486d03527
22585 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/bg_header.gif differ
22586
22587 diff --git a/AllanStyle-SUBSILVER/theme/images/bg_list.gif b/AllanStyle-SUBSILVER/theme/images/bg_list.gif
22588 new file mode 100644
22589 index 000000000..486d03527
22590 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/bg_list.gif differ
22591
22592 diff --git a/AllanStyle-SUBSILVER/theme/images/collapse-btn.png b/AllanStyle-SUBSILVER/theme/images/collapse-btn.png
22593 new file mode 100644
22594 index 000000000..da4e07dcc
22595 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/collapse-btn.png differ
22596
22597 diff --git a/AllanStyle-SUBSILVER/theme/images/forum_link.gif b/AllanStyle-SUBSILVER/theme/images/forum_link.gif
22598 new file mode 100644
22599 index 000000000..d5e86d47d
22600 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/forum_link.gif differ
22601
22602 diff --git a/AllanStyle-SUBSILVER/theme/images/forum_read.gif b/AllanStyle-SUBSILVER/theme/images/forum_read.gif
22603 new file mode 100644
22604 index 000000000..9b2bc47c6
22605 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/forum_read.gif differ
22606
22607 diff --git a/AllanStyle-SUBSILVER/theme/images/forum_read_locked.gif b/AllanStyle-SUBSILVER/theme/images/forum_read_locked.gif
22608 new file mode 100644
22609 index 000000000..436f3d21c
22610 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/forum_read_locked.gif differ
22611
22612 diff --git a/AllanStyle-SUBSILVER/theme/images/forum_read_subforum.gif b/AllanStyle-SUBSILVER/theme/images/forum_read_subforum.gif
22613 new file mode 100644
22614 index 000000000..9179303e7
22615 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/forum_read_subforum.gif differ
22616
22617 diff --git a/AllanStyle-SUBSILVER/theme/images/forum_unread.gif b/AllanStyle-SUBSILVER/theme/images/forum_unread.gif
22618 new file mode 100644
22619 index 000000000..5eec565b3
22620 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/forum_unread.gif differ
22621
22622 diff --git a/AllanStyle-SUBSILVER/theme/images/forum_unread_locked.gif b/AllanStyle-SUBSILVER/theme/images/forum_unread_locked.gif
22623 new file mode 100644
22624 index 000000000..58a79c376
22625 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/forum_unread_locked.gif differ
22626
22627 diff --git a/AllanStyle-SUBSILVER/theme/images/forum_unread_subforum.gif b/AllanStyle-SUBSILVER/theme/images/forum_unread_subforum.gif
22628 new file mode 100644
22629 index 000000000..af3c93b1a
22630 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/forum_unread_subforum.gif differ
22631
22632 diff --git a/AllanStyle-SUBSILVER/theme/images/icon_download.gif b/AllanStyle-SUBSILVER/theme/images/icon_download.gif
22633 new file mode 100644
22634 index 000000000..70cd61caf
22635 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/icon_download.gif differ
22636
22637 diff --git a/AllanStyle-SUBSILVER/theme/images/icon_offline.gif b/AllanStyle-SUBSILVER/theme/images/icon_offline.gif
22638 new file mode 100644
22639 index 000000000..5dc4212e9
22640 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/icon_offline.gif differ
22641
22642 diff --git a/AllanStyle-SUBSILVER/theme/images/icon_online.gif b/AllanStyle-SUBSILVER/theme/images/icon_online.gif
22643 new file mode 100644
22644 index 000000000..d0d202dde
22645 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/icon_online.gif differ
22646
22647 diff --git a/AllanStyle-SUBSILVER/theme/images/icon_rate_bad.gif b/AllanStyle-SUBSILVER/theme/images/icon_rate_bad.gif
22648 new file mode 100644
22649 index 000000000..790188940
22650 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/icon_rate_bad.gif differ
22651
22652 diff --git a/AllanStyle-SUBSILVER/theme/images/icon_rate_good.gif b/AllanStyle-SUBSILVER/theme/images/icon_rate_good.gif
22653 new file mode 100644
22654 index 000000000..6d23034d7
22655 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/icon_rate_good.gif differ
22656
22657 diff --git a/AllanStyle-SUBSILVER/theme/images/icons_contact.png b/AllanStyle-SUBSILVER/theme/images/icons_contact.png
22658 new file mode 100644
22659 index 000000000..f84abd36a
22660 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/icons_contact.png differ
22661
22662 diff --git a/AllanStyle-SUBSILVER/theme/images/index.htm b/AllanStyle-SUBSILVER/theme/images/index.htm
22663 new file mode 100644
22664 index 000000000..e69de29bb
22665
22666 diff --git a/AllanStyle-SUBSILVER/theme/images/loading.gif b/AllanStyle-SUBSILVER/theme/images/loading.gif
22667 new file mode 100644
22668 index 000000000..e1ed0883e
22669 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/loading.gif differ
22670
22671 diff --git a/AllanStyle-SUBSILVER/theme/images/no_avatar.gif b/AllanStyle-SUBSILVER/theme/images/no_avatar.gif
22672 new file mode 100644
22673 index 000000000..ad73330e7
22674 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/no_avatar.gif differ
22675
22676 diff --git a/AllanStyle-SUBSILVER/theme/images/plupload/done.gif b/AllanStyle-SUBSILVER/theme/images/plupload/done.gif
22677 new file mode 100644
22678 index 000000000..29f3ed7c9
22679 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/plupload/done.gif differ
22680
22681 diff --git a/AllanStyle-SUBSILVER/theme/images/plupload/error.gif b/AllanStyle-SUBSILVER/theme/images/plupload/error.gif
22682 new file mode 100644
22683 index 000000000..4682b6300
22684 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/plupload/error.gif differ
22685
22686 diff --git a/AllanStyle-SUBSILVER/theme/images/plupload/throbber.gif b/AllanStyle-SUBSILVER/theme/images/plupload/throbber.gif
22687 new file mode 100644
22688 index 000000000..4ae8b16a5
22689 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/plupload/throbber.gif differ
22690
22691 diff --git a/AllanStyle-SUBSILVER/theme/images/quote.gif b/AllanStyle-SUBSILVER/theme/images/quote.gif
22692 new file mode 100644
22693 index 000000000..d1992273e
22694 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/quote.gif differ
22695
22696 diff --git a/AllanStyle-SUBSILVER/theme/images/quote_rtl.gif b/AllanStyle-SUBSILVER/theme/images/quote_rtl.gif
22697 new file mode 100644
22698 index 000000000..ac719cf28
22699 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/quote_rtl.gif differ
22700
22701 diff --git a/AllanStyle-SUBSILVER/theme/images/site_logo.gif b/AllanStyle-SUBSILVER/theme/images/site_logo.gif
22702 new file mode 100644
22703 index 000000000..d72f7a7eb
22704 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/site_logo.gif differ
22705
22706 diff --git a/AllanStyle-SUBSILVER/theme/images/sticky_read.gif b/AllanStyle-SUBSILVER/theme/images/sticky_read.gif
22707 new file mode 100644
22708 index 000000000..09861a996
22709 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/sticky_read.gif differ
22710
22711 diff --git a/AllanStyle-SUBSILVER/theme/images/sticky_read_locked.gif b/AllanStyle-SUBSILVER/theme/images/sticky_read_locked.gif
22712 new file mode 100644
22713 index 000000000..24bca303d
22714 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/sticky_read_locked.gif differ
22715
22716 diff --git a/AllanStyle-SUBSILVER/theme/images/sticky_read_locked_mine.gif b/AllanStyle-SUBSILVER/theme/images/sticky_read_locked_mine.gif
22717 new file mode 100644
22718 index 000000000..3fd04ec3a
22719 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/sticky_read_locked_mine.gif differ
22720
22721 diff --git a/AllanStyle-SUBSILVER/theme/images/sticky_read_mine.gif b/AllanStyle-SUBSILVER/theme/images/sticky_read_mine.gif
22722 new file mode 100644
22723 index 000000000..381634c36
22724 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/sticky_read_mine.gif differ
22725
22726 diff --git a/AllanStyle-SUBSILVER/theme/images/sticky_unread.gif b/AllanStyle-SUBSILVER/theme/images/sticky_unread.gif
22727 new file mode 100644
22728 index 000000000..dd2e36654
22729 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/sticky_unread.gif differ
22730
22731 diff --git a/AllanStyle-SUBSILVER/theme/images/sticky_unread_locked.gif b/AllanStyle-SUBSILVER/theme/images/sticky_unread_locked.gif
22732 new file mode 100644
22733 index 000000000..608f4822e
22734 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/sticky_unread_locked.gif differ
22735
22736 diff --git a/AllanStyle-SUBSILVER/theme/images/sticky_unread_locked_mine.gif b/AllanStyle-SUBSILVER/theme/images/sticky_unread_locked_mine.gif
22737 new file mode 100644
22738 index 000000000..fe5e11531
22739 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/sticky_unread_locked_mine.gif differ
22740
22741 diff --git a/AllanStyle-SUBSILVER/theme/images/sticky_unread_mine.gif b/AllanStyle-SUBSILVER/theme/images/sticky_unread_mine.gif
22742 new file mode 100644
22743 index 000000000..b5fc3b362
22744 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/sticky_unread_mine.gif differ
22745
22746 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_moved.gif b/AllanStyle-SUBSILVER/theme/images/topic_moved.gif
22747 new file mode 100644
22748 index 000000000..fe758f02c
22749 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_moved.gif differ
22750
22751 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_read.gif b/AllanStyle-SUBSILVER/theme/images/topic_read.gif
22752 new file mode 100644
22753 index 000000000..c16bfa75d
22754 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_read.gif differ
22755
22756 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_read_hot.gif b/AllanStyle-SUBSILVER/theme/images/topic_read_hot.gif
22757 new file mode 100644
22758 index 000000000..a7a7e8fc7
22759 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_read_hot.gif differ
22760
22761 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_read_hot_mine.gif b/AllanStyle-SUBSILVER/theme/images/topic_read_hot_mine.gif
22762 new file mode 100644
22763 index 000000000..853452a74
22764 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_read_hot_mine.gif differ
22765
22766 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_read_locked.gif b/AllanStyle-SUBSILVER/theme/images/topic_read_locked.gif
22767 new file mode 100644
22768 index 000000000..10eb77697
22769 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_read_locked.gif differ
22770
22771 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_read_locked_mine.gif b/AllanStyle-SUBSILVER/theme/images/topic_read_locked_mine.gif
22772 new file mode 100644
22773 index 000000000..3f24928b4
22774 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_read_locked_mine.gif differ
22775
22776 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_read_mine.gif b/AllanStyle-SUBSILVER/theme/images/topic_read_mine.gif
22777 new file mode 100644
22778 index 000000000..560927aa0
22779 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_read_mine.gif differ
22780
22781 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_unread.gif b/AllanStyle-SUBSILVER/theme/images/topic_unread.gif
22782 new file mode 100644
22783 index 000000000..4e56157dc
22784 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_unread.gif differ
22785
22786 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_unread_hot.gif b/AllanStyle-SUBSILVER/theme/images/topic_unread_hot.gif
22787 new file mode 100644
22788 index 000000000..ceef4919d
22789 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_unread_hot.gif differ
22790
22791 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_unread_hot_mine.gif b/AllanStyle-SUBSILVER/theme/images/topic_unread_hot_mine.gif
22792 new file mode 100644
22793 index 000000000..1c748f708
22794 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_unread_hot_mine.gif differ
22795
22796 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_unread_locked.gif b/AllanStyle-SUBSILVER/theme/images/topic_unread_locked.gif
22797 new file mode 100644
22798 index 000000000..720e21028
22799 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_unread_locked.gif differ
22800
22801 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_unread_locked_mine.gif b/AllanStyle-SUBSILVER/theme/images/topic_unread_locked_mine.gif
22802 new file mode 100644
22803 index 000000000..90873431e
22804 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_unread_locked_mine.gif differ
22805
22806 diff --git a/AllanStyle-SUBSILVER/theme/images/topic_unread_mine.gif b/AllanStyle-SUBSILVER/theme/images/topic_unread_mine.gif
22807 new file mode 100644
22808 index 000000000..34fd2ec17
22809 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/images/topic_unread_mine.gif differ
22810
22811 diff --git a/AllanStyle-SUBSILVER/theme/index.htm b/AllanStyle-SUBSILVER/theme/index.htm
22812 new file mode 100644
22813 index 000000000..e69de29bb
22814
22815 diff --git a/AllanStyle-SUBSILVER/theme/links.css b/AllanStyle-SUBSILVER/theme/links.css
22816 new file mode 100644
22817 index 000000000..6a61e9a26
22818 --- /dev/null
22819 +++ b/AllanStyle-SUBSILVER/theme/links.css
22820 @@ -0,0 +1,199 @@
22821 +/* Link Styles
22822 +---------------------------------------- */
22823 +
22824 +/* Links adjustment to correctly display an order of rtl/ltr mixed content */
22825 +a {
22826 + direction: ltr;
22827 + unicode-bidi: embed;
22828 + text-decoration: none;
22829 + /* we use links inline more often then not so to address several bugs with
22830 + IE and some other browsers we render all links as inlineblock by default */
22831 + display: inline-block;
22832 +
22833 +}
22834 +
22835 +/* Coloured usernames */
22836 +.username-coloured {
22837 + font-weight: bold;
22838 + display: inline !important;
22839 + padding: 0 !important;
22840 +}
22841 +
22842 +/* Links on gradient backgrounds */
22843 +.forumbg .header a, .forabg .header a, th a {
22844 + text-decoration: none;
22845 +}
22846 +
22847 +.forumbg .header a:hover, .forabg .header a:hover, th a:hover {
22848 + text-decoration: underline;
22849 +}
22850 +
22851 +/* Notification mark read link */
22852 +.dropdown-extended a.mark_read {
22853 + background-position: center center;
22854 + background-repeat: no-repeat;
22855 + border-radius: 3px 0 0 3px;
22856 + display: none;
22857 + margin-top: -20px;
22858 + position: absolute;
22859 + z-index: 2;
22860 + right: 0;
22861 + top: 50%;
22862 + -webkit-box-sizing: border-box;
22863 + -moz-box-sizing: border-box;
22864 + box-sizing: border-box;
22865 +}
22866 +
22867 +.dropdown-extended li:hover a.mark_read {
22868 + display: block;
22869 +}
22870 +
22871 +.dropdown-extended a.mark_read:hover {
22872 + width: 50px;
22873 +}
22874 +
22875 +.jumpbox-cat-link,
22876 +.jumpbox-forum-link { font-weight: bold; }
22877 +
22878 +
22879 +/* Links for forum/topic lists */
22880 +a.forumtitle {
22881 + font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif;
22882 + font-size: 1.2em;
22883 + font-weight: bold;
22884 + text-decoration: none;
22885 +}
22886 +
22887 +a.forumtitle:hover {
22888 + text-decoration: underline;
22889 +}
22890 +
22891 +a.topictitle {
22892 + font-family: "Trebuchet MS", Helvetica, Arial, Sans-serif;
22893 + font-size: 1.2em;
22894 + font-weight: bold;
22895 + text-decoration: none;
22896 + display: inline;
22897 +}
22898 +
22899 +a.topictitle:hover {
22900 + text-decoration: underline;
22901 +}
22902 +
22903 +a.lastsubject {
22904 + font-weight: bold;
22905 + text-decoration: none;
22906 +}
22907 +
22908 +a.lastsubject:hover {
22909 + text-decoration: underline;
22910 +}
22911 +
22912 +.row-item a:hover {
22913 + text-decoration: none
22914 +}
22915 +
22916 +.row-item .topictitle:hover,
22917 +.row-item .subforum:hover,
22918 +.row-item .username:hover,
22919 +.row-item .username-coloured:hover {
22920 + text-decoration: underline;
22921 +}
22922 +
22923 +/* Post body links */
22924 +.postlink {
22925 + text-decoration: none;
22926 + border-bottom: 1px solid transparent;
22927 + padding-bottom: 0;
22928 +}
22929 +
22930 +.postlink:hover {
22931 + text-decoration: none;
22932 +}
22933 +
22934 +.signature a, .signature a:hover {
22935 + border: none;
22936 + text-decoration: underline;
22937 +}
22938 +
22939 +/* Profile links */
22940 +.postprofile a, .postprofile dt.author a {
22941 + font-weight: bold;
22942 + text-decoration: none;
22943 +}
22944 +
22945 +.postprofile a:hover, .postprofile dt.author a:hover {
22946 + text-decoration: underline;
22947 +}
22948 +
22949 +/* Profile searchresults */
22950 +.search .postprofile a {
22951 + text-decoration: none;
22952 + font-weight: normal;
22953 +}
22954 +
22955 +.search .postprofile a:hover {
22956 + text-decoration: underline;
22957 +}
22958 +
22959 +.top {
22960 + font-size: 12px;
22961 + text-decoration: none;
22962 + margin-top: 10px;
22963 +}
22964 +
22965 +/* Back to top of page */
22966 +.back2top {
22967 + clear: both;
22968 +}
22969 +
22970 +.back2top .top {
22971 + float: right;
22972 + margin-right: -10px;
22973 + margin-top: 0;
22974 +}
22975 +
22976 +/* Arrow links */
22977 +
22978 +.arrow-up {
22979 + padding-left: 10px;
22980 + text-decoration: none;
22981 + border-bottom-width: 0;
22982 +}
22983 +
22984 +.arrow-up:hover {
22985 +
22986 +}
22987 +
22988 +.arrow-down {
22989 + padding-right: 10px;
22990 +}
22991 +
22992 +.arrow-down:hover {
22993 +
22994 +}
22995 +
22996 +.arrow-left:hover {
22997 + text-decoration: none;
22998 +}
22999 +
23000 +.arrow-right:hover {
23001 + text-decoration: none;
23002 +}
23003 +
23004 +/* invisible skip link, used for accessibility */
23005 +.skiplink {
23006 + position: absolute;
23007 + left: -999px;
23008 + width: 990px;
23009 +}
23010 +
23011 +/* Feed icon in forumlist_body.html */
23012 +a.feed-icon-forum {
23013 + float: right;
23014 + margin: 3px;
23015 +}
23016 +
23017 +a.anchor {
23018 + display: block;
23019 +}
23020
23021 diff --git a/AllanStyle-SUBSILVER/theme/normalize.css b/AllanStyle-SUBSILVER/theme/normalize.css
23022 new file mode 100644
23023 index 000000000..23d84492c
23024 --- /dev/null
23025 +++ b/AllanStyle-SUBSILVER/theme/normalize.css
23026 @@ -0,0 +1,424 @@
23027 +/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
23028 +
23029 +/**
23030 + * 1. Set default font family to sans-serif.
23031 + * 2. Prevent iOS and IE text size adjust after device orientation change,
23032 + * without disabling user zoom.
23033 + */
23034 +
23035 +html {
23036 + font-family: sans-serif; /* 1 */
23037 + -ms-text-size-adjust: 100%; /* 2 */
23038 + -webkit-text-size-adjust: 100%; /* 2 */
23039 +}
23040 +
23041 +/**
23042 + * Remove default margin.
23043 + */
23044 +
23045 +body {
23046 + margin: 0;
23047 +}
23048 +
23049 +/* HTML5 display definitions
23050 + ========================================================================== */
23051 +
23052 +/**
23053 + * Correct `block` display not defined for any HTML5 element in IE 8/9.
23054 + * Correct `block` display not defined for `details` or `summary` in IE 10/11
23055 + * and Firefox.
23056 + * Correct `block` display not defined for `main` in IE 11.
23057 + */
23058 +
23059 +article,
23060 +aside,
23061 +details,
23062 +figcaption,
23063 +figure,
23064 +footer,
23065 +header,
23066 +hgroup,
23067 +main,
23068 +menu,
23069 +nav,
23070 +section,
23071 +summary {
23072 + display: block;
23073 +}
23074 +
23075 +/**
23076 + * 1. Correct `inline-block` display not defined in IE 8/9.
23077 + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
23078 + */
23079 +
23080 +audio,
23081 +canvas,
23082 +progress,
23083 +video {
23084 + display: inline-block; /* 1 */
23085 + vertical-align: baseline; /* 2 */
23086 +}
23087 +
23088 +/**
23089 + * Prevent modern browsers from displaying `audio` without controls.
23090 + * Remove excess height in iOS 5 devices.
23091 + */
23092 +
23093 +audio:not([controls]) {
23094 + display: none;
23095 + height: 0;
23096 +}
23097 +
23098 +/**
23099 + * Address `[hidden]` styling not present in IE 8/9/10.
23100 + * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
23101 + */
23102 +
23103 +[hidden],
23104 +template {
23105 + display: none;
23106 +}
23107 +
23108 +/* Links
23109 + ========================================================================== */
23110 +
23111 +/**
23112 + * Remove the gray background color from active links in IE 10.
23113 + */
23114 +
23115 +a {
23116 + background-color: transparent;
23117 +}
23118 +
23119 +/**
23120 + * Improve readability of focused elements when they are also in an
23121 + * active/hover state.
23122 + */
23123 +
23124 +a:active,
23125 +a:hover {
23126 + outline: 0;
23127 +}
23128 +
23129 +/* Text-level semantics
23130 + ========================================================================== */
23131 +
23132 +/**
23133 + * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
23134 + */
23135 +
23136 +abbr[title] {
23137 + border-bottom: 1px dotted;
23138 +}
23139 +
23140 +/**
23141 + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
23142 + */
23143 +
23144 +b,
23145 +strong {
23146 + font-weight: bold;
23147 +}
23148 +
23149 +/**
23150 + * Address styling not present in Safari and Chrome.
23151 + */
23152 +
23153 +dfn {
23154 + font-style: italic;
23155 +}
23156 +
23157 +/**
23158 + * Address variable `h1` font-size and margin within `section` and `article`
23159 + * contexts in Firefox 4+, Safari, and Chrome.
23160 + */
23161 +
23162 +h1 {
23163 + font-size: 2em;
23164 + margin: 0.67em 0;
23165 +}
23166 +
23167 +/**
23168 + * Address styling not present in IE 8/9.
23169 + */
23170 +
23171 +mark {
23172 + background: #ff0;
23173 + color: #000;
23174 +}
23175 +
23176 +/**
23177 + * Address inconsistent and variable font size in all browsers.
23178 + */
23179 +
23180 +small {
23181 + font-size: 80%;
23182 +}
23183 +
23184 +/**
23185 + * Prevent `sub` and `sup` affecting `line-height` in all browsers.
23186 + */
23187 +
23188 +sub,
23189 +sup {
23190 + font-size: 75%;
23191 + line-height: 0;
23192 + position: relative;
23193 + vertical-align: baseline;
23194 +}
23195 +
23196 +sup {
23197 + top: -0.5em;
23198 +}
23199 +
23200 +sub {
23201 + bottom: -0.25em;
23202 +}
23203 +
23204 +/* Embedded content
23205 + ========================================================================== */
23206 +
23207 +/**
23208 + * Remove border when inside `a` element in IE 8/9/10.
23209 + */
23210 +
23211 +img {
23212 + border: 0;
23213 +}
23214 +
23215 +/**
23216 + * Correct overflow not hidden in IE 9/10/11.
23217 + */
23218 +
23219 +svg:not(:root) {
23220 + overflow: hidden;
23221 +}
23222 +
23223 +/* Grouping content
23224 + ========================================================================== */
23225 +
23226 +/**
23227 + * Address margin not present in IE 8/9 and Safari.
23228 + */
23229 +
23230 +figure {
23231 + margin: 1em 40px;
23232 +}
23233 +
23234 +/**
23235 + * Address differences between Firefox and other browsers.
23236 + */
23237 +
23238 +hr {
23239 + box-sizing: content-box;
23240 + height: 0;
23241 +}
23242 +
23243 +/**
23244 + * Contain overflow in all browsers.
23245 + */
23246 +
23247 +pre {
23248 + overflow: auto;
23249 +}
23250 +
23251 +/**
23252 + * Address odd `em`-unit font size rendering in all browsers.
23253 + */
23254 +
23255 +code,
23256 +kbd,
23257 +pre,
23258 +samp {
23259 + font-family: monospace, monospace;
23260 + font-size: 1em;
23261 +}
23262 +
23263 +/* Forms
23264 + ========================================================================== */
23265 +
23266 +/**
23267 + * Known limitation: by default, Chrome and Safari on OS X allow very limited
23268 + * styling of `select`, unless a `border` property is set.
23269 + */
23270 +
23271 +/**
23272 + * 1. Correct color not being inherited.
23273 + * Known issue: affects color of disabled elements.
23274 + * 2. Correct font properties not being inherited.
23275 + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
23276 + */
23277 +
23278 +button,
23279 +input,
23280 +optgroup,
23281 +select,
23282 +textarea {
23283 + color: inherit; /* 1 */
23284 + font: inherit; /* 2 */
23285 + margin: 0; /* 3 */
23286 +}
23287 +
23288 +/**
23289 + * Address `overflow` set to `hidden` in IE 8/9/10/11.
23290 + */
23291 +
23292 +button {
23293 + overflow: visible;
23294 +}
23295 +
23296 +/**
23297 + * Address inconsistent `text-transform` inheritance for `button` and `select`.
23298 + * All other form control elements do not inherit `text-transform` values.
23299 + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
23300 + * Correct `select` style inheritance in Firefox.
23301 + */
23302 +
23303 +button,
23304 +select {
23305 + text-transform: none;
23306 +}
23307 +
23308 +/**
23309 + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
23310 + * and `video` controls.
23311 + * 2. Correct inability to style clickable `input` types in iOS.
23312 + * 3. Improve usability and consistency of cursor style between image-type
23313 + * `input` and others.
23314 + */
23315 +
23316 +button,
23317 +html input[type="button"], /* 1 */
23318 +input[type="reset"],
23319 +input[type="submit"] {
23320 + -webkit-appearance: button; /* 2 */
23321 + cursor: pointer; /* 3 */
23322 +}
23323 +
23324 +/**
23325 + * Re-set default cursor for disabled elements.
23326 + */
23327 +
23328 +button[disabled],
23329 +html input[disabled] {
23330 + cursor: default;
23331 +}
23332 +
23333 +/**
23334 + * Remove inner padding and border in Firefox 4+.
23335 + */
23336 +
23337 +button::-moz-focus-inner,
23338 +input::-moz-focus-inner {
23339 + border: 0;
23340 + padding: 0;
23341 +}
23342 +
23343 +/**
23344 + * Address Firefox 4+ setting `line-height` on `input` using `!important` in
23345 + * the UA stylesheet.
23346 + */
23347 +
23348 +input {
23349 + line-height: normal;
23350 +}
23351 +
23352 +/**
23353 + * It's recommended that you don't attempt to style these elements.
23354 + * Firefox's implementation doesn't respect box-sizing, padding, or width.
23355 + *
23356 + * 1. Address box sizing set to `content-box` in IE 8/9/10.
23357 + * 2. Remove excess padding in IE 8/9/10.
23358 + */
23359 +
23360 +input[type="checkbox"],
23361 +input[type="radio"] {
23362 + box-sizing: border-box; /* 1 */
23363 + padding: 0; /* 2 */
23364 +}
23365 +
23366 +/**
23367 + * Fix the cursor style for Chrome's increment/decrement buttons. For certain
23368 + * `font-size` values of the `input`, it causes the cursor style of the
23369 + * decrement button to change from `default` to `text`.
23370 + */
23371 +
23372 +input[type="number"]::-webkit-inner-spin-button,
23373 +input[type="number"]::-webkit-outer-spin-button {
23374 + height: auto;
23375 +}
23376 +
23377 +/**
23378 + * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
23379 + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
23380 + */
23381 +
23382 +input[type="search"] {
23383 + -webkit-appearance: textfield; /* 1 */
23384 + box-sizing: content-box; /* 2 */
23385 +}
23386 +
23387 +/**
23388 + * Remove inner padding and search cancel button in Safari and Chrome on OS X.
23389 + * Safari (but not Chrome) clips the cancel button when the search input has
23390 + * padding (and `textfield` appearance).
23391 + */
23392 +
23393 +input[type="search"]::-webkit-search-cancel-button,
23394 +input[type="search"]::-webkit-search-decoration {
23395 + -webkit-appearance: none;
23396 +}
23397 +
23398 +/**
23399 + * Define consistent border, margin, and padding.
23400 + */
23401 +
23402 +fieldset {
23403 + border: 1px solid #c0c0c0;
23404 + margin: 0 2px;
23405 + padding: 0.35em 0.625em 0.75em;
23406 +}
23407 +
23408 +/**
23409 + * 1. Correct `color` not being inherited in IE 8/9/10/11.
23410 + * 2. Remove padding so people aren't caught out if they zero out fieldsets.
23411 + */
23412 +
23413 +legend {
23414 + border: 0; /* 1 */
23415 + padding: 0; /* 2 */
23416 +}
23417 +
23418 +/**
23419 + * Remove default vertical scrollbar in IE 8/9/10/11.
23420 + */
23421 +
23422 +textarea {
23423 + overflow: auto;
23424 +}
23425 +
23426 +/**
23427 + * Don't inherit the `font-weight` (applied by a rule above).
23428 + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
23429 + */
23430 +
23431 +optgroup {
23432 + font-weight: bold;
23433 +}
23434 +
23435 +/* Tables
23436 + ========================================================================== */
23437 +
23438 +/**
23439 + * Remove most spacing between table cells.
23440 + */
23441 +
23442 +table {
23443 + border-collapse: collapse;
23444 + border-spacing: 0;
23445 +}
23446 +
23447 +td,
23448 +th {
23449 + padding: 0;
23450 +}
23451
23452 diff --git a/AllanStyle-SUBSILVER/theme/plupload.css b/AllanStyle-SUBSILVER/theme/plupload.css
23453 new file mode 100644
23454 index 000000000..f46680396
23455 --- /dev/null
23456 +++ b/AllanStyle-SUBSILVER/theme/plupload.css
23457 @@ -0,0 +1,86 @@
23458 +.attach-panel-multi {
23459 + display: none;
23460 + margin-bottom: 1em;
23461 +}
23462 +
23463 +.file-list td {
23464 + vertical-align: middle;
23465 +}
23466 +
23467 +.attach-name {
23468 + width: 50%;
23469 +}
23470 +
23471 +.attach-comment {
23472 + width: 30%;
23473 +}
23474 +
23475 +.attach-comment .inputbox {
23476 + resize: vertical;
23477 + width: 100%;
23478 +}
23479 +
23480 +.attach-filesize {
23481 + width: 15%;
23482 +}
23483 +
23484 +.attach-status {
23485 + width: 5%;
23486 +}
23487 +
23488 +.attach-filesize, .attach-status {
23489 + text-align: center;
23490 +}
23491 +
23492 +.attach-controls {
23493 + display: inline-block;
23494 + float: right;
23495 +}
23496 +
23497 +.nojs .file-inline-bbcode {
23498 + display: none;
23499 +}
23500 +
23501 +.file-total-progress {
23502 + height: 2px;
23503 + display: block;
23504 + position: relative;
23505 + margin: 4px -10px -6px -10px;
23506 +}
23507 +
23508 +.file-progress {
23509 + background-color: #CCCCCC;
23510 + display:inline-block;
23511 + height: 8px;
23512 + width: 50px;
23513 +}
23514 +
23515 +.file-progress-bar, .file-total-progress-bar {
23516 + background-color: green;
23517 + display: block;
23518 + height: 100%;
23519 + width: 0;
23520 +}
23521 +
23522 +.file-status.file-working {
23523 + background: url('./images/plupload/throbber.gif');
23524 +}
23525 +
23526 +.file-status.file-uploaded {
23527 + background: url('./images/plupload/done.gif');
23528 +}
23529 +
23530 +.file-status.file-error {
23531 + background: url('./images/plupload/error.gif');
23532 +}
23533 +
23534 +.file-status {
23535 + display: inline-block;
23536 + height: 16px;
23537 + width: 16px;
23538 +}
23539 +
23540 +.file-name {
23541 + max-width: 65%;
23542 + vertical-align: bottom;
23543 +}
23544
23545 diff --git a/AllanStyle-SUBSILVER/theme/print.css b/AllanStyle-SUBSILVER/theme/print.css
23546 new file mode 100644
23547 index 000000000..944527977
23548 --- /dev/null
23549 +++ b/AllanStyle-SUBSILVER/theme/print.css
23550 @@ -0,0 +1,150 @@
23551 +/* Print Style Sheet
23552 +---------------------------------------- */
23553 +
23554 +
23555 +/* Lots still TODO here! */
23556 +
23557 +/* General markup styles */
23558 +* {
23559 + padding: 0;
23560 + margin: 0;
23561 +}
23562 +
23563 +body {
23564 + font: 11pt Verdana, Arial, Helvetica, sans-serif;
23565 + color:#000000;
23566 +}
23567 +
23568 +a:link { color: #000000; text-decoration: none; }
23569 +a:visited { color: #000000; text-decoration: none; }
23570 +a:active { color: #000000; text-decoration: none; }
23571 +
23572 +img, .noprint, .navbar, .box1, .divider, .signature { display: none; }
23573 +/* Display smilies (Bug #47265) */
23574 +.content img {
23575 + display: inline;
23576 +}
23577 +
23578 +/* Container for the main body */
23579 +.wrap {
23580 + margin: 0 2em;
23581 +}
23582 +
23583 +p { font-size: 85%; }
23584 +.copyright { font-size: 75%; }
23585 +.page-number { float:right; width: auto; text-align: right; font-size: 75%; }
23586 +
23587 +h1, h2, h3, h1 a, h2 a, h3 a {
23588 + font-family: "Trebuchet MS",georgia,Verdana,Sans-serif;
23589 + color: #000000;
23590 + background: none;
23591 + text-decoration: none;
23592 + font-weight: bold;
23593 +}
23594 +
23595 +h1 { font-size: 20pt; }
23596 +h2 { font-size: 16pt; margin-top: 1em; }
23597 +h3 { font-size: 14pt; margin-top: 1em; }
23598 +
23599 +.content {
23600 + font-size: 11pt;
23601 + line-height: 14pt;
23602 + margin-bottom: 1em;
23603 + font-family: "Lucida Grande", "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
23604 + overflow: hidden;
23605 +}
23606 +
23607 +/* CSS2 Print tip from: http://www.alistapart.com/articles/goingtoprint/ */
23608 +.postbody a:link, .postbody a:visited, .postbody a:hover, .postbody a:active {
23609 + text-decoration: underline;
23610 + padding: 0.1em 0.2em;
23611 + margin: -0.1em -0.2em;
23612 + color: #666;
23613 + background: none;
23614 + font-size: 100%;
23615 +}
23616 +
23617 +html>body .postbody a:link:after, html>body .postbody a:visited:after {
23618 + content: " (" attr(href) ") ";
23619 + font-size: 90%;
23620 + text-decoration: none;
23621 +}
23622 +
23623 +hr {
23624 + height: 1px;
23625 + background-color: #999999;
23626 + border-width: 0;
23627 +}
23628 +
23629 +.author {
23630 + font-family: Verdana, Arial, Helvetica, sans-serif;
23631 + font-size: 75%;
23632 + margin-bottom: 0.6em;
23633 +}
23634 +
23635 +.date {
23636 + font-family: Verdana, Arial, Helvetica, sans-serif;
23637 + float: right;
23638 + position: relative;
23639 + text-align: right;
23640 + font-size: 75%;
23641 +}
23642 +
23643 +/* Dont want to print url for names or titles in content area */
23644 +.postbody .author a:link, .postbody .author a:visited,
23645 +html>body .postbody .author a:link:after,
23646 +html>body .postbody .author a:visited:after,
23647 +.postquote .quote-by a:link, .postquote .quote-by a:visited,
23648 +html>body .postquote .quote-by a:link:after,
23649 +html>body .postquote .quote-by a:visited:after,
23650 +html>body .postbody h1 a:link:after, html>body .postbody h2 a:link:after {
23651 + text-decoration: none;
23652 + content: "";
23653 +}
23654 +
23655 +/* Poster profile */
23656 +.postprofile { display: none; }
23657 +.grip-show { display:none; }
23658 +
23659 +/* Quote */
23660 +.postquote, blockquote {
23661 + font-size: 85%;
23662 + margin: 1em 18% 1em 4%;
23663 + padding: 0.5em;
23664 + position: relative;
23665 + line-height: 1.5em;
23666 + border: 1px #999999 solid;
23667 +}
23668 +
23669 +.postquote img { display: none; }
23670 +.postquote span { display: block; }
23671 +.postquote span .postquote { font-size: 100%; }
23672 +.quote-by, blockquote cite {
23673 + color: black;
23674 + display : block;
23675 + font-weight: bold;
23676 +}
23677 +
23678 +/* List */
23679 +ol, ul {
23680 + margin-left: 15pt
23681 +}
23682 +
23683 +/* Misc page elements */
23684 +div.spacer { clear: both; }
23685 +
23686 +code { display: block; }
23687 +
23688 +/* Accessibility tweaks: Mozilla.org */
23689 +.skip_link { display: none; }
23690 +
23691 +.codebox p { display: none; }
23692 +
23693 +/* stylelint-disable declaration-property-unit-whitelist */
23694 +.emoji {
23695 + min-height: 18px;
23696 + min-width: 18px;
23697 + height: 1em;
23698 + width: 1em;
23699 +}
23700 +/* stylelint-enable declaration-property-unit-whitelist */
23701
23702 diff --git a/AllanStyle-SUBSILVER/theme/responsive.css b/AllanStyle-SUBSILVER/theme/responsive.css
23703 new file mode 100644
23704 index 000000000..c9946679d
23705 --- /dev/null
23706 +++ b/AllanStyle-SUBSILVER/theme/responsive.css
23707 @@ -0,0 +1,615 @@
23708 +/* Responsive Design
23709 +---------------------------------------- */
23710 +
23711 +@media (max-width: 320px) {
23712 + select, .inputbox {
23713 + max-width: 240px;
23714 + }
23715 +}
23716 +
23717 +/* Notifications list
23718 +----------------------------------------*/
23719 +@media (max-width: 350px) {
23720 + .dropdown-extended .dropdown-contents {
23721 + width: auto;
23722 + }
23723 +}
23724 +
23725 +@media (max-width: 430px) {
23726 + .action-bar .search-box .inputbox {
23727 + width: 120px;
23728 + }
23729 +
23730 + .section-viewtopic .search-box .inputbox {
23731 + width: 57px;
23732 + }
23733 +
23734 + .action-bar .search-box .inputbox ::-moz-placeholder {
23735 + content: "Search...";
23736 + }
23737 +
23738 + .action-bar .search-box .inputbox :-ms-input-placeholder {
23739 + content: "Search...";
23740 + }
23741 +
23742 + .action-bar .search-box .inputbox ::-webkit-input-placeholder {
23743 + content: "Search...";
23744 + }
23745 +}
23746 +
23747 +@media (max-width: 500px) {
23748 + dd label {
23749 + white-space: normal;
23750 + }
23751 +
23752 + select, .inputbox {
23753 + max-width: 260px;
23754 + }
23755 +
23756 + .captcha-panel dd.captcha {
23757 + margin-left: 0;
23758 + }
23759 +
23760 + .captcha-panel dd.captcha-image img {
23761 + width: 100%;
23762 + }
23763 +
23764 + dl.details dt, dl.details dd {
23765 + width: auto;
23766 + float: none;
23767 + text-align: left;
23768 + }
23769 +
23770 + dl.details dd {
23771 + margin-left: 20px;
23772 + }
23773 +
23774 + p.responsive-center {
23775 + float: none;
23776 + text-align: center;
23777 + margin-bottom: 5px;
23778 + }
23779 +
23780 + .action-bar > div {
23781 + margin-bottom: 5px;
23782 + }
23783 +
23784 + .action-bar > .pagination {
23785 + float: none;
23786 + clear: both;
23787 + padding-bottom: 1px;
23788 + text-align: center;
23789 + }
23790 +
23791 + .action-bar > .pagination li.page-jump {
23792 + margin: 0 2px;
23793 + }
23794 +
23795 + p.jumpbox-return {
23796 + display: none;
23797 + }
23798 +
23799 + .display-options > label:nth-child(1) {
23800 + display: block;
23801 + margin-bottom: 5px;
23802 + }
23803 +
23804 + .attach-controls {
23805 + margin-top: 5px;
23806 + width: 100%;
23807 + }
23808 +
23809 + .quick-links .dropdown-trigger span {
23810 + display: none;
23811 + }
23812 +}
23813 +
23814 +@media (max-width: 550px) {
23815 + ul.topiclist.forums dt {
23816 + margin-right: 0;
23817 + }
23818 +
23819 + ul.topiclist.forums dt .list-inner {
23820 + margin-right: 0;
23821 + }
23822 +
23823 + ul.topiclist.forums dd.lastpost {
23824 + display: none;
23825 + }
23826 +}
23827 +
23828 +@media (max-width: 700px) {
23829 + .responsive-hide { display: none !important; }
23830 + .responsive-show { display: block !important; }
23831 + .responsive-show-inline { display: inline !important; }
23832 + .responsive-show-inline-block { display: inline-block !important; }
23833 + .wrap {padding: 0;}
23834 + #subsilver-nav-topic {display: none;}
23835 +
23836 + /* Content wrappers
23837 + ----------------------------------------*/
23838 + html {
23839 + height: auto;
23840 + }
23841 +
23842 + body {
23843 + padding: 0;
23844 + }
23845 +
23846 + .wrap {
23847 + border: none;
23848 + border-radius: 0;
23849 + margin: 0;
23850 + min-width: 290px;
23851 + padding: 0 5px;
23852 + }
23853 +
23854 + /* Common block wrappers
23855 + ----------------------------------------*/
23856 + .headerbar, .navbar, .forabg, .forumbg, .post, .panel, .body-blok {
23857 + border-radius: 0;
23858 + margin-left: -5px;
23859 + margin-right: -5px;
23860 + }
23861 +
23862 + .cp-main .forabg, .cp-main .forumdb, .cp-main .post, .cp-main .panel {
23863 + border-radius: 7px;
23864 + }
23865 +
23866 + /* Logo block
23867 + ----------------------------------------*/
23868 + .site-description {
23869 + float: none;
23870 + width: auto;
23871 + text-align: center;
23872 + }
23873 +
23874 + .logo {
23875 + /* change display value to inline-block to show logo */
23876 + display: none;
23877 + float: none;
23878 + padding: 10px;
23879 + }
23880 +
23881 + .site-description h1, .site-description p {
23882 + text-align: inherit;
23883 + float: none;
23884 + margin: 5px;
23885 + line-height: 1.2em;
23886 + overflow: hidden;
23887 + text-overflow: ellipsis;
23888 + }
23889 +
23890 + .site-description p, .search-header {
23891 + display: none;
23892 + }
23893 +
23894 + /* Navigation
23895 + ----------------------------------------*/
23896 + .headerbar + .navbar {
23897 + margin-top: -5px;
23898 + }
23899 +
23900 + /* Search
23901 + ----------------------------------------*/
23902 + .responsive-search { display: block !important; }
23903 +
23904 + /* .topiclist lists
23905 + ----------------------------------------*/
23906 + li.header dt {
23907 + text-align: center;
23908 + text-transform: none;
23909 + line-height: 1em;
23910 + font-size: 1.2em;
23911 + padding-bottom: 4px;
23912 + }
23913 +
23914 + ul.topiclist li.header dt, ul.topiclist li.header dt .list-inner {
23915 + margin-right: 0 !important;
23916 + padding-right: 0;
23917 + }
23918 +
23919 + ul.topiclist li.header dd {
23920 + display: none !important;
23921 + }
23922 +
23923 + ul.topiclist dt, ul.topiclist dt .list-inner,
23924 + ul.topiclist.missing-column dt, ul.topiclist.missing-column dt .list-inner,
23925 + ul.topiclist.two-long-columns dt, ul.topiclist.two-long-columns dt .list-inner,
23926 + ul.topiclist.two-columns dt, ul.topiclist.two-columns dt .list-inner {
23927 + margin-right: 0;
23928 + }
23929 +
23930 + ul.topiclist dt .list-inner.with-mark {
23931 + padding-right: 34px;
23932 + }
23933 +
23934 + ul.topiclist dt .list-inner {
23935 + min-height: 28px;
23936 + }
23937 +
23938 + ul.topiclist li.header dt .list-inner {
23939 + min-height: 0;
23940 + }
23941 +
23942 + ul.topiclist dd {
23943 + display: none;
23944 + }
23945 + ul.topiclist dd.mark {
23946 + display: block;
23947 + }
23948 +
23949 + /* Forums and topics lists
23950 + ----------------------------------------*/
23951 + ul.topiclist.forums dt {
23952 + margin-right: -250px;
23953 + }
23954 +
23955 + ul.topiclist dd.mark {
23956 + display: block;
23957 + position: absolute;
23958 + right: 5px;
23959 + top: 0;
23960 + margin: 0;
23961 + width: auto;
23962 + min-width: 0;
23963 + text-align: left;
23964 + }
23965 +
23966 + ul.topiclist.forums dd.topics dfn, ul.topiclist.topics dd.posts dfn {
23967 + position: relative;
23968 + left: 0;
23969 + width: auto;
23970 + display: inline;
23971 + font-weight: normal;
23972 + }
23973 +
23974 + li.row .responsive-show strong {
23975 + font-weight: bold;
23976 + color: inherit;
23977 + }
23978 +
23979 + ul.topiclist li.row dt a.subforum {
23980 + vertical-align: bottom;
23981 + overflow: hidden;
23982 + text-overflow: ellipsis;
23983 + max-width: 100px;
23984 + }
23985 +
23986 + /* Pagination
23987 + ----------------------------------------*/
23988 + .pagination > ul {
23989 + margin: 5px 0 0;
23990 + }
23991 +
23992 + .row .pagination {
23993 + margin-top: 2px;
23994 + margin-bottom: 2px;
23995 + }
23996 +
23997 + .row .pagination .ellipsis + li {
23998 + display: none !important;
23999 + }
24000 +
24001 + /* Responsive tables
24002 + ----------------------------------------*/
24003 + table.responsive, table.responsive tbody, table.responsive tr, table.responsive td {
24004 + display: block;
24005 + }
24006 +
24007 + table.responsive thead, table.responsive th {
24008 + display: none;
24009 + }
24010 +
24011 + table.responsive.show-header thead, table.responsive.show-header th:first-child {
24012 + display: block;
24013 + width: auto !important;
24014 + text-align: left !important;
24015 + }
24016 +
24017 + table.responsive.show-header th:first-child span.rank-img {
24018 + display: none;
24019 + }
24020 +
24021 + table.responsive tr {
24022 + margin: 2px 0;
24023 + }
24024 +
24025 + table.responsive td {
24026 + width: auto !important;
24027 + text-align: left !important;
24028 + padding: 4px;
24029 + }
24030 +
24031 + table.responsive td.empty {
24032 + display: none !important;
24033 + }
24034 +
24035 + table.responsive td > dfn {
24036 + display: inline-block !important;
24037 + }
24038 +
24039 + table.responsive td > dfn:after {
24040 + content: ':';
24041 + padding-right: 5px;
24042 + }
24043 +
24044 + table.responsive span.rank-img {
24045 + float: none;
24046 + padding-right: 5px;
24047 + }
24048 +
24049 + table.responsive.memberlist td:first-child input[type="checkbox"] {
24050 + float: right;
24051 + }
24052 +
24053 + /* Forms
24054 + ----------------------------------------*/
24055 + fieldset dt, fieldset.fields1 dt, fieldset.fields2 dt {
24056 + width: auto;
24057 + float: none;
24058 + }
24059 +
24060 + fieldset dd, fieldset.fields1 dd, fieldset.fields2 dd {
24061 + margin-left: 20px;
24062 + }
24063 +
24064 + textarea, dd textarea, .message-box textarea {
24065 + width: 100%;
24066 + -moz-box-sizing: border-box;
24067 + box-sizing: border-box;
24068 + }
24069 +
24070 + dl.pmlist dt {
24071 + width: auto !important;
24072 + margin-bottom: 5px;
24073 + }
24074 +
24075 + dl.pmlist dd {
24076 + display: inline-block;
24077 + margin-left: 0 !important;
24078 + }
24079 +
24080 + dl.pmlist dd:first-of-type {
24081 + padding-left: 20px;
24082 + }
24083 +
24084 + .smiley-box, .message-box {
24085 + float: none;
24086 + width: auto;
24087 + }
24088 +
24089 + .smiley-box {
24090 + margin-top: 5px;
24091 + }
24092 +
24093 + .bbcode-status {
24094 + display: none;
24095 + }
24096 +
24097 + .colour-palette, .colour-palette tbody, .colour-palette tr {
24098 + display: block;
24099 + }
24100 +
24101 + .colour-palette td {
24102 + display: inline-block;
24103 + margin-right: 2px;
24104 + }
24105 +
24106 + .horizontal-palette td:nth-child(2n), .vertical-palette tr:nth-child(2n) {
24107 + display: none;
24108 + }
24109 +
24110 + fieldset.quick-login label {
24111 + display: block;
24112 + margin-bottom: 5px;
24113 + white-space: normal;
24114 + }
24115 +
24116 + fieldset.quick-login label > span {
24117 + display: inline-block;
24118 + min-width: 100px;
24119 + }
24120 +
24121 + fieldset.quick-login input.inputbox {
24122 + width: 85%;
24123 + max-width: 300px;
24124 + margin-left: 20px;
24125 + }
24126 +
24127 + fieldset.quick-login label[for="autologin"] {
24128 + display: inline-block;
24129 + text-align: right;
24130 + min-width: 50%;
24131 + }
24132 +
24133 + /* User profile
24134 + ----------------------------------------*/
24135 + .column1, .column2, .left-box.profile-details {
24136 + float: none;
24137 + width: auto;
24138 + }
24139 +
24140 + /* Polls
24141 + ----------------------------------------*/
24142 + fieldset.polls dt {
24143 + width: 90%;
24144 + }
24145 +
24146 + fieldset.polls dd.resultbar {
24147 + padding-left: 20px;
24148 + }
24149 +
24150 + fieldset.polls dd.poll_option_percent {
24151 + width: 20%;
24152 + }
24153 +
24154 + fieldset.polls dd.resultbar, fieldset.polls dd.poll_option_percent {
24155 + margin-top: 5px;
24156 + }
24157 +
24158 + /* Post
24159 + ----------------------------------------*/
24160 + .postbody {
24161 + position: inherit;
24162 + }
24163 +
24164 + .postprofile, .postbody, .search .postbody {
24165 + display: block;
24166 + width: auto;
24167 + float: none;
24168 + padding: 0;
24169 + min-height: 0;
24170 + }
24171 +
24172 + .post .postprofile {
24173 + width: auto;
24174 + border-width: 0 0 1px 0;
24175 + padding-bottom: 5px;
24176 + margin: 0;
24177 + margin-bottom: 5px;
24178 + min-height: 40px;
24179 + overflow: hidden;
24180 + }
24181 +
24182 + .postprofile dd {
24183 + display: none;
24184 + }
24185 +
24186 + .postprofile dt, .postprofile dd.profile-rank, .search .postprofile dd {
24187 + display: block;
24188 + margin: 0;
24189 + }
24190 +
24191 + .postprofile .has-avatar .avatar-container {
24192 + margin: 0;
24193 + overflow: inherit;
24194 + }
24195 +
24196 + .postprofile .avatar-container:after {
24197 + clear: none;
24198 + }
24199 +
24200 + .postprofile .avatar {
24201 + margin-right: 5px;
24202 + }
24203 +
24204 + .postprofile .avatar img {
24205 + width: auto !important;
24206 + height: auto !important;
24207 + max-height: 32px;
24208 + }
24209 +
24210 + .has-profile .postbody h3 {
24211 + margin-left: 0 !important;
24212 + margin-right: 0 !important;
24213 + }
24214 +
24215 + .has-profile .post-buttons {
24216 + right: 30px;
24217 + top: 15px;
24218 + }
24219 +
24220 + .online {
24221 + background-size: 40px;
24222 + }
24223 +
24224 + /* Misc stuff
24225 + ----------------------------------------*/
24226 + h2 {
24227 + margin-top: .5em;
24228 + }
24229 +
24230 + p {
24231 + margin-bottom: .5em;
24232 + overflow: hidden;
24233 + }
24234 +
24235 + p.rightside {
24236 + margin-bottom: 0;
24237 + }
24238 +
24239 + fieldset.display-options label {
24240 + display: block;
24241 + clear: both;
24242 + margin-bottom: 5px;
24243 + }
24244 +
24245 + dl.mini dd.pm-legend {
24246 + float: left;
24247 + min-width: 200px;
24248 + }
24249 +
24250 + .topicreview {
24251 + margin: 0 -5px;
24252 + padding: 0 5px;
24253 + }
24254 +
24255 + fieldset.display-actions {
24256 + white-space: normal;
24257 + }
24258 +
24259 + .phpbb_alert {
24260 + width: auto;
24261 + margin: 0 5px;
24262 + }
24263 +
24264 + .attach-comment dfn {
24265 + width: 100%;
24266 + }
24267 +
24268 + .trigger {
24269 + margin-top: -24px;
24270 + }
24271 +
24272 + table.table1 tbody td.posts {
24273 + border-left: none;
24274 + border-right: none;
24275 + }
24276 +
24277 + table.table1 tbody td.info {
24278 + border-right: none;
24279 + }
24280 +}
24281 +
24282 +@media (min-width: 700px) {
24283 + .postbody { width: 70%; }
24284 +}
24285 +
24286 +@media (min-width: 850px) {
24287 + .postbody { width: 76%; }
24288 +}
24289 +
24290 +@media (max-width: 850px) {
24291 + .postprofile { width: 28%; }
24292 +
24293 +
24294 +}
24295 +
24296 +@media (min-width: 701px) and (max-width: 950px) {
24297 + .row .pagination {
24298 + margin-top: 2px;
24299 + margin-bottom: 2px;
24300 + }
24301 +
24302 + ul.topiclist dt {
24303 + margin-right: -410px;
24304 + }
24305 +
24306 + ul.topiclist dt .list-inner {
24307 + margin-right: 410px;
24308 + }
24309 +
24310 + dd.posts, dd.topics, dd.views {
24311 + width: 80px;
24312 + }
24313 +}
24314 +
24315 +@media (max-width: 992px) {
24316 + .row .pagination {
24317 + text-align: left;
24318 + float: left;
24319 + margin-top: 4px;
24320 + margin-bottom: 4px;
24321 + }
24322 +}
24323
24324 diff --git a/AllanStyle-SUBSILVER/theme/ru/icon_user_online.gif b/AllanStyle-SUBSILVER/theme/ru/icon_user_online.gif
24325 new file mode 100644
24326 index 000000000..d2637cca0
24327 Binary files /dev/null and b/AllanStyle-SUBSILVER/theme/ru/icon_user_online.gif differ
24328
24329 diff --git a/AllanStyle-SUBSILVER/theme/ru/stylesheet.css b/AllanStyle-SUBSILVER/theme/ru/stylesheet.css
24330 new file mode 100644
24331 index 000000000..604b29948
24332 --- /dev/null
24333 +++ b/AllanStyle-SUBSILVER/theme/ru/stylesheet.css
24334 @@ -0,0 +1,2 @@
24335 +/* Online image */
24336 +.online { background-image: url("./icon_user_online.gif"); }
24337
24338 diff --git a/AllanStyle-SUBSILVER/theme/stylesheet.css b/AllanStyle-SUBSILVER/theme/stylesheet.css
24339 new file mode 100644
24340 index 000000000..75237f7e8
24341 --- /dev/null
24342 +++ b/AllanStyle-SUBSILVER/theme/stylesheet.css
24343 @@ -0,0 +1,22 @@
24344 +/* phpBB3 Style Sheet
24345 + --------------------------------------------------------------
24346 + Style name: Allan Style - SUBSILVER
24347 + Based on style: prosilver (the default phpBB 3.2.x style)
24348 + Original author: Tom Beddard ( http://www.subblue.com/ )
24349 + Modified by: phpBB Limited ( https://www.phpbb.com/ )
24350 + Modified by: http://x-tk.ru/
24351 + --------------------------------------------------------------
24352 +*/
24353 +
24354 +@import url("normalize.css?v=3.2");
24355 +@import url("base.css?v=3.2");
24356 +@import url("utilities.css?v=3.2");
24357 +@import url("common.css?v=3.2");
24358 +@import url("links.css?v=3.2");
24359 +@import url("content.css?v=3.2");
24360 +@import url("buttons.css?v=3.2");
24361 +@import url("cp.css?v=3.2");
24362 +@import url("forms.css?v=3.2");
24363 +@import url("icons.css?v=3.2");
24364 +@import url("colours.css?v=3.2");
24365 +@import url("responsive.css?v=3.2");
24366
24367 diff --git a/AllanStyle-SUBSILVER/theme/tweaks.css b/AllanStyle-SUBSILVER/theme/tweaks.css
24368 new file mode 100644
24369 index 000000000..ba82551f8
24370 --- /dev/null
24371 +++ b/AllanStyle-SUBSILVER/theme/tweaks.css
24372 @@ -0,0 +1,41 @@
24373 +/* Style Sheet Tweaks
24374 +
24375 +These style definitions are IE 8 & 9 only.
24376 +They are required due to the poor CSS support in IE browsers.
24377 +------------------------------------------------------------------------------*/
24378 +
24379 +/* IE 8 Tweaks (value)\9 equates to IE <= 8
24380 +------------------------------------------------------------------------------*/
24381 +
24382 +/* Clear float fix */
24383 +.inner, ul.linklist { zoom: 1\9; }
24384 +
24385 +/* Align checkboxes/radio buttons nicely */
24386 +dd label input { vertical-align: text-bottom\9; }
24387 +
24388 +/* Fixes header-avatar aspect-ratio */
24389 +.header-avatar img { height: 20px\9; }
24390 +
24391 +/* IE8 often can't handle max-width in %, so we use px instead */
24392 +.postprofile .avatar img { max-width: 150px\9; }
24393 +
24394 +
24395 +/* IE 9 Tweaks
24396 +------------------------------------------------------------------------------*/
24397 +
24398 +/* Border-radius bleed fix in IE9 */
24399 +.search-header, .search-header .inputbox, .search-header a.button {
24400 + border-radius: 0;
24401 +}
24402 +
24403 +.headerbar, .forumbg {
24404 + background-image: url("./images/bg_header.gif");
24405 +}
24406 +
24407 +.forabg {
24408 + background-image: url("./images/bg_list.gif");
24409 +}
24410 +
24411 +.tabs .tab > a {
24412 + border-radius: 0;
24413 +}
24414
24415 diff --git a/AllanStyle-SUBSILVER/theme/utilities.css b/AllanStyle-SUBSILVER/theme/utilities.css
24416 new file mode 100644
24417 index 000000000..cbb8127d1
24418 --- /dev/null
24419 +++ b/AllanStyle-SUBSILVER/theme/utilities.css
24420 @@ -0,0 +1,66 @@
24421 +/* --------------------------------------------------------------
24422 + $Utilities
24423 +-------------------------------------------------------------- */
24424 +
24425 +.sr-only {
24426 + position: absolute;
24427 + width: 1px;
24428 + height: 1px;
24429 + margin: -1px;
24430 + padding: 0;
24431 + overflow: hidden;
24432 + clip: rect(0, 0, 0, 0);
24433 + border: 0;
24434 +}
24435 +
24436 +.sr-only-focusable:active,
24437 +.sr-only-focusable:focus {
24438 + position: static;
24439 + width: auto;
24440 + height: auto;
24441 + margin: 0;
24442 + overflow: visible;
24443 + clip: auto;
24444 +}
24445 +
24446 +.clearfix:before,
24447 +.clearfix:after,
24448 +.container:before,
24449 +.container:after,
24450 +.container-fluid:before,
24451 +.container-fluid:after,
24452 +.row:before,
24453 +.row:after {
24454 + content: " ";
24455 + display: table;
24456 +}
24457 +.clearfix:after,
24458 +.container:after,
24459 +.container-fluid:after,
24460 +.row:after { clear: both }
24461 +
24462 +.center-block {
24463 + display: block;
24464 + margin-left: auto;
24465 + margin-right: auto;
24466 +}
24467 +
24468 +.pull-right { float: right !important }
24469 +.pull-left { float: left !important }
24470 +.hide { display: none !important }
24471 +.show { display: block !important }
24472 +.invisible { visibility: hidden }
24473 +
24474 +.text-hide {
24475 + font: 0/0 a;
24476 + color: transparent;
24477 + text-shadow: none;
24478 + background-color: transparent;
24479 + border: 0;
24480 +}
24481 +
24482 +.hidden {
24483 + display: none ;
24484 +}
24485 +
24486 +.affix { position: fixed }