All-in-One Event Calendar - Version 1.0.4

Version Description

Download this release

Release Info

Developer theseed
Plugin Icon 128x128 All-in-One Event Calendar
Version 1.0.4
Comparing to
See all releases

Code changes from version 1.0.3 to 1.0.4

COPYING.txt ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ <one line to give the program's name and a brief idea of what it does.>
635
+ Copyright (C) <year> <name of author>
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ <program> Copyright (C) <year> <name of author>
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <http://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <http://www.gnu.org/philosophy/why-not-lgpl.html>.
all-in-one-event-calendar.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: All-in-One Event Calendar Plugin
4
  * Plugin URI: http://theseedstudio.com/software/all-in-one-event-calendar-wordpress/
5
  * Description: An events calendar system with month and agenda calendar views, color-coded categories, recurring events, and import/export of iCalendar (.ics) feeds.
6
- * Version: 1.0.3
7
  * Author: The Seed Studio
8
  * Author URI: http://theseedstudio.com/
9
  */
@@ -117,20 +117,16 @@ define( 'AI1EC_FAKE_CATEGORY_ID', -4113473042 ); // Numeric-only 1337-speak of A
117
  $ai1ec_script_url = get_option( 'home' ) . '/?plugin=' . AI1EC_PLUGIN_NAME;
118
  define( 'AI1EC_SCRIPT_URL', $ai1ec_script_url );
119
 
120
- // ==================================================
121
- // = Convert https/http to ical in AI1EC_SCRIPT_URL =
122
- // ==================================================
123
- $tmp = '';
124
- if( strpos( AI1EC_SCRIPT_URL, 'https' ) === false ) {
125
- $tmp = str_replace( 'http', 'webcal', AI1EC_SCRIPT_URL );
126
- } else {
127
- $tmp = str_replace( 'https', 'webcal', AI1EC_SCRIPT_URL );
128
- }
129
 
130
  // ==============
131
  // = EXPORT URL =
132
  // ==============
133
- define( 'AI1EC_EXPORT_URL', $tmp . '&controller=ai1ec_exporter_controller&action=export_events' );
134
 
135
  // ====================================
136
  // = Include iCal parsers and helpers =
3
  * Plugin Name: All-in-One Event Calendar Plugin
4
  * Plugin URI: http://theseedstudio.com/software/all-in-one-event-calendar-wordpress/
5
  * Description: An events calendar system with month and agenda calendar views, color-coded categories, recurring events, and import/export of iCalendar (.ics) feeds.
6
+ * Version: 1.0.4
7
  * Author: The Seed Studio
8
  * Author URI: http://theseedstudio.com/
9
  */
117
  $ai1ec_script_url = get_option( 'home' ) . '/?plugin=' . AI1EC_PLUGIN_NAME;
118
  define( 'AI1EC_SCRIPT_URL', $ai1ec_script_url );
119
 
120
+ // ====================================================
121
+ // = Convert http:// to webcal:// in AI1EC_SCRIPT_URL =
122
+ // = (webcal:// protocol does not support https://) =
123
+ // ====================================================
124
+ $tmp = str_replace( 'http://', 'webcal://', AI1EC_SCRIPT_URL );
 
 
 
 
125
 
126
  // ==============
127
  // = EXPORT URL =
128
  // ==============
129
+ define( 'AI1EC_EXPORT_URL', "$tmp&controller=ai1ec_exporter_controller&action=export_events" );
130
 
131
  // ====================================
132
  // = Include iCal parsers and helpers =
app/controller/class-ai1ec-exporter-controller.php CHANGED
@@ -75,8 +75,10 @@ class Ai1ec_Exporter_Controller {
75
  $ai1ec_exporter_helper->insert_event_in_calendar( $event, $c );
76
  }
77
  $str = $c->createCalendar();
 
 
78
  echo $str;
79
- exit();
80
  }
81
  }
82
  // END class
75
  $ai1ec_exporter_helper->insert_event_in_calendar( $event, $c );
76
  }
77
  $str = $c->createCalendar();
78
+
79
+ header( 'Content-type: text/calendar' );
80
  echo $str;
81
+ exit;
82
  }
83
  }
84
  // END class
app/view/box_general_settings.php CHANGED
@@ -26,7 +26,7 @@
26
 
27
  <label for="show_create_event_button">
28
  <input class="checkbox" name="show_create_event_button" id="show_create_event_button" type="checkbox" value="1" <?php echo $show_create_event_button ?> />
29
- <?php _e( 'Show <strong>Post Your Event</strong> button to privileged users', AI1EC_PLUGIN_NAME ) ?>
30
  </label>
31
  <br class="clear" />
32
 
26
 
27
  <label for="show_create_event_button">
28
  <input class="checkbox" name="show_create_event_button" id="show_create_event_button" type="checkbox" value="1" <?php echo $show_create_event_button ?> />
29
+ <?php _e( 'Show <strong>Post Your Event</strong> button above the calendar to privileged users', AI1EC_PLUGIN_NAME ) ?>
30
  </label>
31
  <br class="clear" />
32
 
app/view/box_the_seed_studio.php CHANGED
@@ -37,5 +37,12 @@
37
  <li><a href="https://twitter.com/intent/user?screen_name=the_seed_studio" target="_blank"><?php _e( 'Follow us on Twitter', AI1EC_PLUGIN_NAME ) ?></a></li>
38
  </ol>
39
  </p>
 
 
 
 
 
 
 
40
  </div>
41
  <br class="clear" />
37
  <li><a href="https://twitter.com/intent/user?screen_name=the_seed_studio" target="_blank"><?php _e( 'Follow us on Twitter', AI1EC_PLUGIN_NAME ) ?></a></li>
38
  </ol>
39
  </p>
40
+
41
+ <h2><?php _e( 'Donate', AI1EC_PLUGIN_NAME ) ?></h2>
42
+
43
+ <p><?php _e( 'If you would like to help support development of this plugin, then by all means...', AI1EC_PLUGIN_NAME ) ?></p>
44
+ <p class="ai1ec-donate">
45
+ <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=9JJMUW48W2ED8" target="_blank" /><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" alt="PayPal - The safer, easier way to pay online!" /></a>
46
+ </p>
47
  </div>
48
  <br class="clear" />
app/view/event-map.php CHANGED
@@ -1,8 +1,8 @@
1
  <div class="ai1ec-gmap-container">
2
  <div id="ai1ec-gmap-canvas"></div>
3
  <input type="hidden" id="ai1ec-gmap-address" value="<?php echo esc_attr( $address ) ?>" />
 
 
 
 
4
  </div>
5
- <a class="ai1ec-gmap-link ai1ec-button"
6
- href="<?php echo $gmap_url_link ?>" target="_blank">
7
- <?php _e( 'View Full-Size Map »', AI1EC_PLUGIN_NAME ) ?>
8
- </a>
1
  <div class="ai1ec-gmap-container">
2
  <div id="ai1ec-gmap-canvas"></div>
3
  <input type="hidden" id="ai1ec-gmap-address" value="<?php echo esc_attr( $address ) ?>" />
4
+ <a class="ai1ec-gmap-link ai1ec-button"
5
+ href="<?php echo $gmap_url_link ?>" target="_blank">
6
+ <?php _e( 'View Full-Size Map »', AI1EC_PLUGIN_NAME ) ?>
7
+ </a>
8
  </div>
 
 
 
 
css/add_new_event.css CHANGED
@@ -1 +1,244 @@
1
- #ai1ec_event{overflow:hidden}.ai1ec-form{width:100%;margin-bottom:1em}.ai1ec-form td.ai1ec-first{width:8.5em}.ai1ec-form label{font-size:9pt}.ai1ec-form td{line-height:1.5em}.ai1ec-section-title{text-transform:uppercase;border-bottom:1px solid #eee;padding-bottom:.4em;color:#aaa;clear:both}.ai1ec_hidden{display:none}.ai1ec_week_days_list,.ai1ec_month_days_list,.ai1ec_yearly_months_list{margin:0;padding:0;list-style:none}.ai1ec_week_days_list li,.ai1ec_month_days_list li,.ai1ec_yearly_months_list li{float:left;padding:.3em 0;width:2.2em;border:1px solid #dfdfdf;border-radius:.4em;-moz-border-radius:.4em;-webkit-border-radius:.4em;margin-right:.2em;background-color:#fff;text-align:center}.ai1ec_yearly_months_list li{width:2.5em!important;padding:.5em 0!important}.ai1ec_week_days_list li:hover,.ai1ec_month_days_list li:hover,.ai1ec_yearly_months_list li:hover{cursor:pointer}.ai1ec_selected{background-color:#e2e2e2!important}.ai1ec-date-input{width:7em}.ai1ec-time-input{width:5.5em}#ai1ec_venue,#ai1ec_address,#ai1ec_cost,#ai1ec_contact_name,#ai1ec_contact_phone,#ai1ec_contact_email{width:100%;max-width:20em}.ai1ec-form.ai1ec-location-form{float:left;width:33em}#side-info-column .ai1ec-form.ai1ec-location-form{float:none;width:100%}.ac_results img{float:left;margin:.2em .7em .2em .2em}.ai1ec_box_map{float:right;margin-bottom:1em;position:absolute;visibility:hidden;border:1px solid #ddd}.ai1ec_box_map.ai1ec_box_map_visible{position:static;visibility:visible}#ai1ec_map_canvas{width:264px;height:15em}.ai1ec_bottom_publish{min-width:80px;text-align:center}.calendricalDatePopup,.calendricalTimePopup{z-index:2}.calendricalDatePopup{background:white;border:solid 1px #999;padding:2px;text-align:center;width:200px}.calendricalDatePopup table{border-collapse:collapse;width:200px}.calendricalDatePopup table .monthCell{padding:2px 0}.calendricalDatePopup table .monthCell a{display:block;float:left;line-height:20px}.calendricalDatePopup table .monthCell .prevMonth,.calendricalDatePopup table .monthCell .nextMonth{width:24px}.calendricalDatePopup table .monthCell .monthName{width:150px}.calendricalDatePopup table a{text-decoration:none!important;padding:0}.calendricalDatePopup table th{text-align:center}.calendricalDatePopup table td{text-align:center;font-size:12px;padding:0;font-family:inherit}.calendricalDatePopup table td a{display:block;color:black;padding:2px 3px}.calendricalDatePopup table td a:hover{background:#ccf;border:0;padding:2px 3px}.calendricalDatePopup table td.today a{background:#f8f8c0}.calendricalDatePopup table td.selected a{background:#ccf}.calendricalDatePopup table td.today_selected a{background:#f8f8c0;border:solid 1px #dd6;padding:1px 2px}.calendricalDatePopup table td.nonMonth a{color:#999}.calendricalTimePopup{background:white;border:solid 1px #999;width:110px;height:130px;overflow:auto}.calendricalTimePopup ul{margin:0!important;padding:0!important}.calendricalTimePopup ul li{list-style:none!important;padding:0!important;margin:0}.calendricalTimePopup ul li a,.calendricalTimePopup ul li a:visited{text-indent:10px;padding:4px;display:block;color:black;text-decoration:none!important}.calendricalTimePopup ul li a:hover,.calendricalTimePopup ul li.selected a{background:#ccf}.calendricalEndTimePopup{width:200px}.ai1ec-slider{background:#eee;height:.4em;position:relative;cursor:pointer;border:1px solid #ccc;width:8.8em;margin:.7em .25em 0 0;float:left;clear:right;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}.ai1ec-progress{height:.5em;background-color:#c5ff00;display:none}.ai1ec-handle{background:#fff;height:1em;width:1em;top:-0.5em;margin-top:1px;position:absolute;z-index:0;display:block;border:1px solid #ccc;cursor:move;border-radius:.25em;-moz-border-radius:.25em;-webkit-border-radius:.25em;box-shadow:0 2px 5px rgba(0,0,0,0.15);-moz-box-shadow:0 2px 5px rgba(0,0,0,0.15);-webkit-box-shadow:0 2px 5px rgba(0,0,0,0.15)}.ai1ec-range{text-align:center;width:3em;border:1px solid #dfdfdf;background:#fff;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* General form attributes */
2
+ #ai1ec_event {
3
+ overflow: hidden;
4
+ }
5
+ .ai1ec-form {
6
+ width: 100%;
7
+ margin-bottom: 1em;
8
+ }
9
+ .ai1ec-form td.ai1ec-first {
10
+ width: 8.5em;
11
+ }
12
+ .ai1ec-form label {
13
+ font-size: 9pt;
14
+ }
15
+ .ai1ec-form td {
16
+ line-height: 1.5em;
17
+ }
18
+ .ai1ec-section-title {
19
+ text-transform: uppercase;
20
+ border-bottom: 1px solid #eee;
21
+ padding-bottom: 0.4em;
22
+ color: #aaa;
23
+ clear: both;
24
+ }
25
+
26
+ /* Recurrence fields */
27
+ .ai1ec_hidden {
28
+ display: none;
29
+ }
30
+ .ai1ec_week_days_list, .ai1ec_month_days_list, .ai1ec_yearly_months_list {
31
+ margin: 0;
32
+ padding: 0;
33
+ list-style: none;
34
+ }
35
+ .ai1ec_week_days_list li, .ai1ec_month_days_list li, .ai1ec_yearly_months_list li {
36
+ float: left;
37
+ padding: 0.3em 0px;
38
+ width: 2.2em;
39
+ border: 1px solid #DFDFDF;
40
+ border-radius: 0.4em;
41
+ -moz-border-radius: 0.4em;
42
+ -webkit-border-radius: 0.4em;
43
+ margin-right: 0.2em;
44
+ background-color: #fff;
45
+ text-align: center;
46
+ }
47
+ .ai1ec_yearly_months_list li {
48
+ width: 2.5em !important;
49
+ padding: 0.5em 0 !important;
50
+ }
51
+
52
+ .ai1ec_week_days_list li:hover, .ai1ec_month_days_list li:hover, .ai1ec_yearly_months_list li:hover {
53
+ cursor: pointer;
54
+ }
55
+
56
+ .ai1ec_selected {
57
+ background-color: #e2e2e2 !important;
58
+ }
59
+
60
+ /* Event post fields */
61
+ .ai1ec-date-input {
62
+ width: 7em;
63
+ }
64
+ .ai1ec-time-input {
65
+ width: 5.5em;
66
+ }
67
+ #ai1ec_venue, #ai1ec_address, #ai1ec_cost,
68
+ #ai1ec_contact_name, #ai1ec_contact_phone, #ai1ec_contact_email {
69
+ width: 100%;
70
+ max-width: 20em;
71
+ }
72
+ .ai1ec-form.ai1ec-location-form {
73
+ float: left;
74
+ width: 33em;
75
+ }
76
+ #side-info-column .ai1ec-form.ai1ec-location-form {
77
+ float: none;
78
+ width: 100%;
79
+ }
80
+
81
+ /* Address autocomplete */
82
+ .ac_results img {
83
+ float: left;
84
+ margin: 0.2em 0.7em 0.2em 0.2em;
85
+ }
86
+
87
+ /* Google map */
88
+ .ai1ec_box_map {
89
+ float: right;
90
+ margin-bottom: 1em;
91
+ /* These are needed for proper map initialization: */
92
+ position: absolute;
93
+ visibility: hidden;
94
+ border: 1px solid #ddd;
95
+ }
96
+ .ai1ec_box_map.ai1ec_box_map_visible {
97
+ position: static;
98
+ visibility: visible;
99
+ }
100
+ #ai1ec_map_canvas {
101
+ width: 264px;
102
+ height: 15em;
103
+ }
104
+ /* Bottom publish button */
105
+ .ai1ec_bottom_publish {
106
+ min-width: 80px;
107
+ text-align: center;
108
+ }
109
+
110
+ /* CSS for Calendrical */
111
+ .calendricalDatePopup, .calendricalTimePopup {
112
+ z-index: 2;
113
+ }
114
+ .calendricalDatePopup {
115
+ background: white;
116
+ border: solid 1px #999999;
117
+ padding: 2px;
118
+ text-align: center;
119
+ width: 200px; }
120
+ .calendricalDatePopup table {
121
+ border-collapse: collapse;
122
+ width: 200px; }
123
+ .calendricalDatePopup table .monthCell {
124
+ padding: 2px 0; }
125
+ .calendricalDatePopup table .monthCell a {
126
+ display: block;
127
+ float: left;
128
+ line-height: 20px; }
129
+ .calendricalDatePopup table .monthCell .prevMonth, .calendricalDatePopup table .monthCell .nextMonth {
130
+ width: 24px; }
131
+ .calendricalDatePopup table .monthCell .monthName {
132
+ width: 150px; }
133
+ .calendricalDatePopup table a {
134
+ text-decoration: none !important; padding: 0; }
135
+ .calendricalDatePopup table th {
136
+ text-align: center; }
137
+ .calendricalDatePopup table td {
138
+ text-align: center;
139
+ font-size: 12px;
140
+ padding: 0;
141
+ font-family: inherit; }
142
+ .calendricalDatePopup table td a {
143
+ display: block;
144
+ color: black;
145
+ padding: 2px 3px; }
146
+ .calendricalDatePopup table td a:hover {
147
+ background: #ccccff;
148
+ border: none;
149
+ padding: 2px 3px; }
150
+ .calendricalDatePopup table td.today a {
151
+ background: #f8f8c0; }
152
+ .calendricalDatePopup table td.selected a {
153
+ background: #ccccff; }
154
+ .calendricalDatePopup table td.today_selected a {
155
+ background: #f8f8c0;
156
+ border: solid 1px #dddd66;
157
+ padding: 1px 2px; }
158
+ .calendricalDatePopup table td.nonMonth a {
159
+ color: #999999; }
160
+
161
+ .calendricalTimePopup {
162
+ background: white;
163
+ border: solid 1px #999999;
164
+ width: 110px;
165
+ height: 130px;
166
+ overflow: auto; }
167
+ .calendricalTimePopup ul {
168
+ margin: 0 !important;
169
+ padding: 0 !important; }
170
+ .calendricalTimePopup ul li {
171
+ list-style: none !important;
172
+ padding: 0 !important;
173
+ margin: 0; }
174
+ .calendricalTimePopup ul li a, .calendricalTimePopup ul li a:visited {
175
+ text-indent: 10px;
176
+ padding: 4px;
177
+ display: block;
178
+ color: black;
179
+ text-decoration: none !important; }
180
+ .calendricalTimePopup ul li a:hover, .calendricalTimePopup ul li.selected a {
181
+ background: #ccccff; }
182
+
183
+ .calendricalEndTimePopup {
184
+ width: 200px; }
185
+
186
+
187
+ /**
188
+ * Range input rules (from jQuery Tools)
189
+ **/
190
+
191
+ /* slider root element */
192
+ .ai1ec-slider {
193
+ background:#eee;
194
+ height:0.4em;
195
+ position:relative;
196
+ cursor:pointer;
197
+ border:1px solid #ccc;
198
+ width:8.8em;
199
+ margin: 0.7em 0.25em 0 0;
200
+ float:left;
201
+ clear:right;
202
+ border-radius:3px;
203
+ -moz-border-radius:3px;
204
+ -webkit-border-radius:3px;
205
+ }
206
+ /* progress bar (enabled with progress: true) */
207
+ .ai1ec-progress {
208
+ height: 0.5em;
209
+ background-color:#C5FF00;
210
+ display:none;
211
+ }
212
+ /* drag handle */
213
+ .ai1ec-handle {
214
+ background:#fff;
215
+ height:1em;
216
+ width:1em;
217
+ top:-0.5em;
218
+ margin-top: 1px;
219
+ position:absolute;
220
+ z-index: 0;
221
+ display:block;
222
+ border:1px solid #ccc;
223
+ cursor:move;
224
+ border-radius: 0.25em;
225
+ -moz-border-radius:0.25em;
226
+ -webkit-border-radius:0.25em;
227
+ box-shadow: 0 2px 5px rgba(0,0,0,0.15);
228
+ -moz-box-shadow: 0 2px 5px rgba(0,0,0,0.15);
229
+ -webkit-box-shadow: 0 2px 5px rgba(0,0,0,0.15);
230
+ }
231
+ /* the input field */
232
+ .ai1ec-range {
233
+ text-align:center;
234
+ width:3em;
235
+ border: 1px solid #dfdfdf;
236
+ background: #fff;
237
+ border-radius: 4px;
238
+ -moz-border-radius: 4px;
239
+ -webkit-border-radius: 4px;
240
+ -moz-box-sizing: border-box;
241
+ -webkit-box-sizing: border-box;
242
+ -ms-box-sizing: border-box;
243
+ box-sizing: border-box;
244
+ }
css/calendar.css CHANGED
@@ -1 +1,645 @@
1
- .ai1ec-container{font-size:13pt!important}.ai1ec-container small{margin:0!important}.ai1ec-action-month #ai1ec-view-month,.ai1ec-action-agenda #ai1ec-view-agenda{color:#000;background:#ddd;background:-o-linear-gradient(#ccc,#eee);background:-ms-linear-gradient(#ccc,#eee);background:-moz-linear-gradient(#ccc,#eee);background:-webkit-gradient(linear,0% 0,0% 100%,from(#ccc),to(#eee));background:-webkit-linear-gradient(#ccc,#eee)}#ai1ec-calendar-view-container{position:relative;clear:both;margin-bottom:.2em}table.ai1ec-calendar-toolbar{width:100%;border:0!important;margin:0!important}.ai1ec-calendar-toolbar td{text-align:center;width:1em;vertical-align:middle;border:0!important;padding:0!important;white-space:nowrap;background:none!important}.ai1ec-calendar-toolbar td:last-child{text-align:right}.ai1ec-calendar-toolbar td:first-child{text-align:left}.ai1ec-loading{position:absolute;z-index:9;top:0;left:0;width:100%;height:100%;background:#fff url(../img/ajax-loader.gif) no-repeat center center;display:none}ul.ai1ec-view-tabs{margin:0 0 .2em!important;padding:0!important;display:inline-block}.ai1ec-view-tabs li{list-style:none!important;float:left;margin:.1em 0!important;padding:0!important}.ai1ec-view-tabs a{line-height:25px!important;padding:.2em .5em}.ai1ec-view-tabs a img{border:0!important;padding:0!important;margin:0!important;float:none!important;position:static!important;vertical-align:middle;background:none!important}.ai1ec-filters-container{display:inline-block}.ai1ec-filters-container .ai1ec-button{margin:0}.ai1ec-filter-selector-container{position:relative;display:inline-block;text-align:left;white-space:normal}.ai1ec-filter-selector{display:none;position:absolute;z-index:10;right:0;top:100%;overflow:auto;max-width:20em;max-height:30em;background:#fff;border:1px solid #ddd;box-shadow:1px 5px 8px rgba(0,0,0,0.08);-o-box-shadow:1px 5px 8px rgba(0,0,0,0.08);-ms-box-shadow:1px 5px 8px rgba(0,0,0,0.08);-moz-box-shadow:1px 5px 8px rgba(0,0,0,0.08);-webkit-box-shadow:1px 5px 8px rgba(0,0,0,0.08);padding:.1em}.ai1ec-filter-selector ul{margin:0!important;padding:0!important}.ai1ec-filter-selector li{list-style:none}.ai1ec-filter-selector .ai1ec-category,.ai1ec-filter-selector .ai1ec-tag{font-size:8pt!important}.ai1ec-clear-filters{display:none;font-size:11pt!important;font-weight:normal;color:#7a86d9!important;cursor:pointer;text-decoration:none!important}.ai1ec-clear-filters:hover{color:#000!important}h2.ai1ec-calendar-title{float:left;font-size:1.15em!important;line-height:1.3em!important;margin:0 0 .2em!important}.ai1ec-title-buttons{margin:0 .5em}.ai1ec-title-buttons .ai1ec-button{font-size:8pt!important;margin:.3em .1em}.ai1ec-today #ai1ec-today{display:none}ul.ai1ec-pagination{margin:0 0 .3em!important;padding:0!important;float:right}a.ai1ec-pagination{margin:0 0 .3em!important}.ai1ec-pagination li{list-style:none!important;padding:0!important;float:left}.ai1ec-action-month .ai1ec-pagination a{width:7em}.ai1ec-action-agenda a.ai1ec-pagination{float:right;width:9em}#ai1ec-prev-year,#ai1ec-next-year{width:4em}table.ai1ec-month-view{border-collapse:collapse;border:1px solid #ddd!important;margin:0!important;background:#fff;table-layout:fixed;clear:both;width:100%}.ai1ec-month-view td{border:1px solid #ddd!important;vertical-align:top;background:none!important}.ai1ec-month-view td.ai1ec-empty{background:#f8f8f8!important}.ai1ec-month-view th{padding:.2em!important;border-bottom:1px solid #ddd;font:bold 9pt Tahoma,Geneva,sans-serif!important;text-align:center!important;background:#f2f2f2!important;border:none!important;color:#999!important;text-shadow:0 1px 0 #fff;-o-text-shadow:0 1px 0 #fff;-ms-text-shadow:0 1px 0 #fff;-moz-text-shadow:0 1px 0 #fff;-webkit-text-shadow:0 1px 0 #fff}.ai1ec-month-view td{padding:0!important;text-align:left}.ai1ec-month-view .ai1ec-day{position:relative;min-height:5em}.ai1ec-month-view .ai1ec-today{background:#ffd;background:rgba(255,255,128,0.3)}.ai1ec-month-view .ai1ec-date{text-align:right;font-size:10pt;line-height:12pt;padding:0 .4em;background:#eaf4ff;font:8pt Tahoma,Geneva,sans-serif;color:#666;text-shadow:0 1px 0 #fff;-o-text-shadow:0 1px 0 #fff;-ms-text-shadow:0 1px 0 #fff;-moz-text-shadow:0 1px 0 #fff;-webkit-text-shadow:0 1px 0 #fff}.ai1ec-month-view a.ai1ec-event-container{position:relative;font:9pt Tahoma,Geneva,sans-serif!important;text-decoration:none!important;display:block;border:none!important}.ai1ec-month-view .ai1ec-event{border-radius:.3em;-o-border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em;margin:1px 1px 0 1px;padding:0 0 1px 2px;white-space:nowrap;overflow:hidden;color:#568!important}.ai1ec-month-view .ai1ec-allday .ai1ec-event{background:#568;color:#fff!important}.ai1ec-month-view .ai1ec-category-colors{float:right;font-size:1.2em;margin-top:1px}.ai1ec-month-view .ai1ec-event-popup,.ai1ec-month-view .ai1ec-event-summary{border:2px solid #d4c4b0;box-shadow:1px 5px 8px rgba(0,0,0,0.08);-o-box-shadow:1px 5px 8px rgba(0,0,0,0.08);-ms-box-shadow:1px 5px 8px rgba(0,0,0,0.08);-moz-box-shadow:1px 5px 8px rgba(0,0,0,0.08);-webkit-box-shadow:1px 5px 8px rgba(0,0,0,0.08);background:#fff}.ai1ec-month-view .ai1ec-event-popup{position:absolute;z-index:5;display:none;white-space:nowrap;color:#000!important;top:-4px;left:-2px;min-width:100%;border-radius:0 .3em .3em 0;-o-border-radius:0 .3em .3em 0;-moz-border-radius:0 .3em .3em 0;-webkit-border-radius:0 .3em .3em 0}.ai1ec-month-view .ai1ec-event-popup.ai1ec-shifted-right{border-radius:.3em 0 0 .3em;-o-border-radius:.3em 0 0 .3em;-ms-border-radius:.3em 0 0 .3em;-moz-border-radius:.3em 0 0 .3em;-webkit-border-radius:.3em 0 0 .3em}.ai1ec-month-view .ai1ec-event-popup-bg{position:relative;left:-2px;margin-right:-1px;padding:2px 2px 2px 5px;background:#fff}.ai1ec-month-view .ai1ec-shifted-right .ai1ec-event-popup-bg{left:1px;padding:2px 5px 2px 2px}.ai1ec-month-view .ai1ec-event-summary,.ai1ec-month-view .ai1ec-event-summary p{font-size:.95em!important}.ai1ec-month-view .ai1ec-event-summary p{line-height:1.4em!important}.ai1ec-month-view .ai1ec-event-summary{position:absolute;overflow:hidden;top:-2px;white-space:normal;right:100%;width:13em;padding:2px 4px 3px;border-radius:.3em 0 .3em .3em;-o-border-radius:.3em 0 .3em .3em;-ms-border-radius:.3em 0 .3em .3em;-moz-border-radius:.3em 0 .3em .3em;-webkit-border-radius:.3em 0 .3em .3em;background:linear-gradient(#fff 1.5em,#fdfadc);background:-o-linear-gradient(#fff 1.5em,#fdfadc);background:-ms-linear-gradient(#fff 1.5em,#fdfadc);background:-moz-linear-gradient(#fff 1.5em,#fdfadc);background:-webkit-gradient(linear,0% 1.5em,0% 100%,from(#fff),to(#fdfadc));background:-webkit-linear-gradient(#fff 1.5em,#fdfadc);color:#6d5e4a}.ai1ec-month-view .ai1ec-shifted-right .ai1ec-event-summary{left:100%;border-radius:0 .3em .3em .3em;-o-border-radius:0 .3em .3em .3em;-moz-border-radius:0 .3em .3em .3em;-webkit-border-radius:0 .3em .3em .3em}.ai1ec-month-view .ai1ec-event-summary p{margin:0 0 .3em!important;padding:0!important}.ai1ec-month-view .ai1ec-event-time{font-size:8pt;font-weight:bold}.ai1ec-month-view .ai1ec-read-more{text-align:center;font-size:8pt;color:#aaa;color:rgba(0,0,0,0.4)}ol.ai1ec-agenda-view{clear:both;overflow:hidden;margin:0!important;padding:0!important}.ai1ec-agenda-view .ai1ec-no-results{font-size:10pt!important;font-style:italic}ol.ai1ec-date-events{overflow:hidden;margin:0 .75em 0 0!important;padding:0!important}ol.ai1ec-agenda-view>li,ol.ai1ec-date-events>li{list-style:none!important}.ai1ec-agenda-view .ai1ec-date{overflow:hidden;margin:0!important;padding:0!important;border-top:1px solid #f2f2f2;border-bottom:1px solid #fff;background:#f8f8f8;background:-o-linear-gradient(#f2f2f2 1em,#fff);background:-ms-linear-gradient(#f2f2f2 1em,#fff);background:-moz-linear-gradient(#f2f2f2 1em,#fff);background:-webkit-gradient(linear,0 1em,0 100%,from(#f2f2f2),to(#fff));background:-webkit-linear-gradient(#f2f2f2 1em,#fff)}.ai1ec-agenda-view .ai1ec-date.ai1ec-today{border-top:1px solid #eec;border-bottom:1px solid #fff;background:#ffd;background:-o-linear-gradient(#f8f8ce 1em,#fff);background:-ms-linear-gradient(#f8f8ce 1em,#fff);background:-moz-linear-gradient(#f8f8ce 1em,#fff);background:-webkit-gradient(linear,0 1em,0 100%,from(#f8f8ce),to(#fff));background:-webkit-linear-gradient(#f8f8ce 1em,#fff);background:-o-linear-gradient(#f8f8ce 1em,#fff)}.ai1ec-agenda-view h3.ai1ec-date-title{width:4em;float:left;margin:0 .75em .5em!important;font:10pt/1.1em Tahoma,Geneva,sans-serif!important;color:#444;text-shadow:0 1px 0 #fff;-o-text-shadow:0 1px 0 #fff;-ms-text-shadow:0 1px 0 #fff;-moz-text-shadow:0 1px 0 #fff;-webkit-text-shadow:0 1px 0 #fff;line-height:1.1em;text-align:center;border:2px solid #7e9dbd;border-radius:0 0 5px 5px;-o-border-radius:0 0 .5em .5em;-moz-border-radius:0 0 .5em .5em;-webkit-border-radius:0 0 .5em .5em;box-shadow:0 2px 2px rgba(0,0,0,0.08);-o-box-shadow:0 2px 2px rgba(0,0,0,0.08);-ms-box-shadow:0 2px 2px rgba(0,0,0,0.08);-moz-box-shadow:0 2px 2px rgba(0,0,0,0.08);-webkit-box-shadow:0 2px 2px rgba(0,0,0,0.08);background:#fff;background:-o-linear-gradient(#fff 1em,#eee);background:-ms-linear-gradient(#fff 1em,#eee);background:-moz-linear-gradient(#fff 1em,#eee);background:-webkit-gradient(linear,0% 1em,0% 100%,from(#fff),to(#eee));background:-webkit-linear-gradient(#fff 1em,#eee)}.ai1ec-agenda-view .ai1ec-month{text-shadow:0 -1px 0 #000;-o-text-shadow:0 -1px 0 #000;-ms-text-shadow:0 -1px 0 #000;-moz-text-shadow:0 -1px 0 #000;-webkit-text-shadow:0 -1px 0 #000;background:#7e9dbd;font-size:.8em!important;padding:.1em;text-transform:uppercase;letter-spacing:.2em;color:#fff}.ai1ec-agenda-view .ai1ec-day{font-size:2.2em!important;padding:.3em 0 .2em!important}.ai1ec-agenda-view .ai1ec-weekday{font-size:.8em!important;line-height:1.5em}.ai1ec-agenda-view .ai1ec-event{position:relative;clear:right;overflow:hidden;font-size:10pt;text-decoration:none;padding:.1em .3em!important;margin:.5em 0!important;background:#fff;border:1px solid #ddd;border-radius:.5em;-o-border-radius:.5em;-moz-border-radius:.5em;-webkit-border-radius:.5em}.ai1ec-agenda-view .ai1ec-event.ai1ec-expanded{border:2px solid #d4c4b0;box-shadow:1px 5px 8px rgba(0,0,0,0.08);-o-box-shadow:1px 5px 8px rgba(0,0,0,0.08);-ms-box-shadow:1px 5px 8px rgba(0,0,0,0.08);-moz-box-shadow:1px 5px 8px rgba(0,0,0,0.08);-webkit-box-shadow:1px 5px 8px rgba(0,0,0,0.08)}.ai1ec-agenda-view .ai1ec-event-click{font-family:Tahoma,Geneva,sans-serif!important;cursor:pointer;line-height:1.3em;color:#568;text-shadow:0 1px 0 #fff;-o-text-shadow:0 1px 0 #fff;-ms-text-shadow:0 1px 0 #fff;-moz-text-shadow:0 1px 0 #fff;-webkit-text-shadow:0 1px 0 #fff}.ai1ec-agenda-view .ai1ec-event-time{float:left;margin-right:.5em;min-height:1em;font-weight:bold;line-height:1.3em}.ai1ec-agenda-view .ai1ec-event-title{margin:0 0 0 8em;font-size:10pt!important;font-weight:normal}.ai1ec-agenda-view .ai1ec-event.ai1ec-allday{padding:0!important}.ai1ec-agenda-view .ai1ec-allday-label{font-size:8pt!important;color:#b9c0ce;padding-left:.2em}.ai1ec-agenda-view .ai1ec-allday .ai1ec-event-click{color:#fff;background:#568;padding:.1em .4em;border-radius:.3em;-o-border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em;text-shadow:none;-o-text-shadow:none;-ms-text-shadow:none;-moz-text-shadow:none;-webkit-text-shadow:none}.ai1ec-agenda-view .ai1ec-allday .ai1ec-event-time{color:#fff}.ai1ec-agenda-view .ai1ec-allday .ai1ec-event-title{margin:0}.ai1ec-agenda-view .ai1ec-event-expand{float:right;margin-left:.5em;visibility:hidden;font-size:9pt!important}.ai1ec-agenda-view .ai1ec-event:hover,.ai1ec-agenda-view .ai1ec-event.ai1ec-expanded:hover{border-color:#aaa}.ai1ec-agenda-view .ai1ec-event:hover .ai1ec-event-click{color:#000}.ai1ec-agenda-view .ai1ec-allday:hover .ai1ec-event-click{color:#fff;background:#3b475f}.ai1ec-agenda-view .ai1ec-event-click:hover>.ai1ec-event-expand{visibility:visible}.ai1ec-agenda-view .ai1ec-category-colors{float:left;font-size:.9em;margin:.2em .2em 0 -0.2em}.ai1ec-agenda-view .ai1ec-category-colors .ai1ec-category-color{border:1px solid rgba(255,255,255,0.7)}.ai1ec-agenda-view .ai1ec-event-summary{display:none}.ai1ec-agenda-view .ai1ec-event-summary .ai1ec-event-title{margin:.1em 0;font-size:11pt!important;line-height:1.1em}.ai1ec-agenda-view .ai1ec-event-summary .ai1ec-event-time{width:auto;float:none;font-size:9pt!important;line-height:1.5em}.ai1ec-agenda-view .ai1ec-event-summary .ai1ec-event-click{border-bottom:1px solid #ddd}.ai1ec-agenda-view .ai1ec-allday .ai1ec-event-summary .ai1ec-event-click{border-bottom:1px solid #ddd;border-radius:.3em .3em 0 0;-o-border-radius:.3em .3em 0 0;-moz-border-radius:.3em .3em 0 0;-webkit-border-radius:.3em .3em 0 0}.ai1ec-agenda-view .ai1ec-categories,.ai1ec-agenda-view .ai1ec-tags{font-size:8pt!important}.ai1ec-agenda-view .ai1ec-event-description{clear:both;overflow:hidden;padding:0 0 3.6em;max-height:20em}.ai1ec-agenda-view .ai1ec-event-description,.ai1ec-agenda-view .ai1ec-event-description p{font-size:9pt!important;line-height:1.5em!important}.ai1ec-agenda-view .ai1ec-event-description p{margin:.5em 0 .75em!important;padding:0!important}.ai1ec-agenda-view .ai1ec-allday .ai1ec-event-description{position:relative;overflow:hidden;padding:0 .4em 3.5em}.ai1ec-agenda-view .ai1ec-event-description .ai1ec-label{font-size:8pt!important;font-weight:normal}.ai1ec-agenda-view .ai1ec-event-overlay{position:absolute;z-index:5;bottom:0;left:0;right:0;padding:.4em .5em .4em .2em;border-radius:0 0 .5em .5em;-o-border-radius:0 0 .5em .5em;-moz-border-radius:0 0 .5em .5em;-webkit-border-radius:0 0 .5em .5em;background:rgba(255,255,255,0.75);background:-o-linear-gradient(rgba(255,255,255,0.75),#fdfadc);background:-ms-linear-gradient(rgba(255,255,255,0.75),#fdfadc);background:-moz-linear-gradient(rgba(255,255,255,0.75),#fdfadc);background:-webkit-gradient(linear,0 0,0 100%,from(rgba(255,255,255,0.75)),to(#fdfadc));background:-webkit-linear-gradient(rgba(255,255,255,0.75),#fdfadc)}.ai1ec-agenda-view .ai1ec-read-more{float:right;margin:.6em 0 .2em}.ai1ec-subscribe{clear:both}.ai1ec-subscribe-filtered{display:none}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ai1ec-container {
2
+ font-size: 13pt !important;
3
+ }
4
+ /* Some plugins mangle styling of standard HTML tags, fix them here */
5
+ .ai1ec-container small {
6
+ margin: 0 !important;
7
+ }
8
+
9
+ /* Active buttons */
10
+ .ai1ec-action-month #ai1ec-view-month,
11
+ .ai1ec-action-agenda #ai1ec-view-agenda {
12
+ color: #000;
13
+ background: #ddd;
14
+ background: -o-linear-gradient( #ccc, #eee );
15
+ background: -ms-linear-gradient( #ccc, #eee );
16
+ background: -moz-linear-gradient( #ccc, #eee );
17
+ background: -webkit-gradient( linear, 0% 0%, 0% 100%, from(#ccc), to(#eee) );
18
+ background: -webkit-linear-gradient( #ccc, #eee );
19
+ }
20
+
21
+ /* View container */
22
+ #ai1ec-calendar-view-container {
23
+ position: relative;
24
+ clear: both;
25
+ margin-bottom: 0.2em;
26
+ }
27
+ table.ai1ec-calendar-toolbar {
28
+ width: 100%;
29
+ border: 0 !important;
30
+ margin: 0 !important;
31
+ }
32
+ .ai1ec-calendar-toolbar td {
33
+ text-align: center;
34
+ width: 1em;
35
+ vertical-align: middle;
36
+ border: 0 !important;
37
+ padding: 0 !important;
38
+ white-space: nowrap;
39
+ background: none !important;
40
+ }
41
+ .ai1ec-calendar-toolbar td:last-child {
42
+ text-align: right;
43
+ }
44
+ .ai1ec-calendar-toolbar td:first-child {
45
+ text-align: left;
46
+ }
47
+ .ai1ec-loading {
48
+ position: absolute;
49
+ z-index: 9;
50
+ top: 0;
51
+ left: 0;
52
+ width: 100%;
53
+ height: 100%;
54
+ background: #fff url( ../img/ajax-loader.gif ) no-repeat center center;
55
+ display: none;
56
+ }
57
+
58
+ /* View tabs */
59
+ ul.ai1ec-view-tabs {
60
+ margin: 0 0 0.2em !important;
61
+ padding: 0 !important;
62
+ display: inline-block;
63
+ }
64
+ .ai1ec-view-tabs li {
65
+ list-style: none !important;
66
+ float: left;
67
+ margin: 0.1em 0 !important;
68
+ padding: 0 !important;
69
+ }
70
+ .ai1ec-view-tabs a {
71
+ line-height: 25px !important;
72
+ padding: 0.2em 0.5em;
73
+ }
74
+ .ai1ec-view-tabs a img {
75
+ border: 0 !important;
76
+ padding: 0 !important;
77
+ margin: 0 !important;
78
+ float: none !important;
79
+ position: static !important;
80
+ vertical-align: middle;
81
+ background: none !important;
82
+ }
83
+
84
+ /* View filters */
85
+ .ai1ec-filters-container {
86
+ display: inline-block;
87
+ }
88
+ .ai1ec-filters-container .ai1ec-button {
89
+ margin: 0;
90
+ }
91
+ .ai1ec-filter-selector-container {
92
+ position: relative;
93
+ display: inline-block;
94
+ text-align: left;
95
+ white-space: normal;
96
+ }
97
+ .ai1ec-filter-selector {
98
+ display: none;
99
+ position: absolute;
100
+ z-index: 10;
101
+ right: 0;
102
+ top: 100%;
103
+ overflow: auto;
104
+ max-width: 20em;
105
+ max-height: 30em;
106
+ background: #fff;
107
+ border: 1px solid #ddd;
108
+ box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
109
+ -o-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
110
+ -ms-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
111
+ -moz-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
112
+ -webkit-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
113
+ padding: 0.1em;
114
+ }
115
+ .ai1ec-filter-selector ul {
116
+ margin: 0 !important;
117
+ padding: 0 !important;
118
+ }
119
+ .ai1ec-filter-selector li {
120
+ list-style: none;
121
+ }
122
+ .ai1ec-filter-selector .ai1ec-category,
123
+ .ai1ec-filter-selector .ai1ec-tag {
124
+ font-size: 8pt !important;
125
+ }
126
+ .ai1ec-clear-filters {
127
+ display: none;
128
+ font-size: 11pt !important;
129
+ font-weight: normal;
130
+ color: #7A86D9 !important;
131
+ cursor: pointer;
132
+ text-decoration: none !important;
133
+ }
134
+ .ai1ec-clear-filters:hover {
135
+ color: #000 !important;
136
+ }
137
+
138
+ /* Titles */
139
+ h2.ai1ec-calendar-title {
140
+ float: left;
141
+ font-size: 1.15em !important;
142
+ line-height: 1.3em !important;
143
+ margin: 0 0 0.2em !important;
144
+ }
145
+
146
+ /* Today button and others beside it */
147
+ .ai1ec-title-buttons {
148
+ margin: 0 0.5em;
149
+ }
150
+ .ai1ec-title-buttons .ai1ec-button {
151
+ font-size: 8pt !important;
152
+ margin: 0.3em 0.1em;
153
+ }
154
+ .ai1ec-today #ai1ec-today {
155
+ display: none;
156
+ }
157
+
158
+ /* View pagination */
159
+ ul.ai1ec-pagination {
160
+ margin: 0 0 0.3em !important;
161
+ padding: 0 !important;
162
+ float: right;
163
+ }
164
+ a.ai1ec-pagination {
165
+ margin: 0 0 0.3em !important;
166
+ }
167
+ .ai1ec-pagination li {
168
+ list-style: none !important;
169
+ padding: 0 !important;
170
+ float: left;
171
+ }
172
+ .ai1ec-action-month .ai1ec-pagination a {
173
+ width: 7em;
174
+ }
175
+ .ai1ec-action-agenda a.ai1ec-pagination {
176
+ float: right;
177
+ width: 9em;
178
+ }
179
+ #ai1ec-prev-year, #ai1ec-next-year {
180
+ width: 4em;
181
+ }
182
+
183
+ /* Month table */
184
+ table.ai1ec-month-view {
185
+ border-collapse: collapse;
186
+ border: 1px solid #ddd !important;
187
+ margin: 0 !important;
188
+ background: #fff;
189
+ table-layout: fixed;
190
+ clear: both;
191
+ width: 100%;
192
+ }
193
+ .ai1ec-month-view td {
194
+ border: 1px solid #ddd !important;
195
+ vertical-align: top;
196
+ background: none !important;
197
+ }
198
+ .ai1ec-month-view td.ai1ec-empty {
199
+ background: #f8f8f8 !important;
200
+ }
201
+ .ai1ec-month-view th {
202
+ padding: 0.2em !important;
203
+ border-bottom: 1px solid #ddd;
204
+ font: bold 9pt Tahoma, Geneva, sans-serif !important;
205
+ text-align: center !important;
206
+ background: #f2f2f2 !important;
207
+ border: none !important;
208
+ color: #999 !important;
209
+ text-shadow: 0 1px 0 #fff;
210
+ -o-text-shadow: 0 1px 0 #fff;
211
+ -ms-text-shadow: 0 1px 0 #fff;
212
+ -moz-text-shadow: 0 1px 0 #fff;
213
+ -webkit-text-shadow: 0 1px 0 #fff;
214
+ }
215
+ .ai1ec-month-view td {
216
+ padding: 0 !important;
217
+ text-align: left;
218
+ }
219
+ .ai1ec-month-view .ai1ec-day {
220
+ position: relative;
221
+ min-height: 5em;
222
+ }
223
+ .ai1ec-month-view .ai1ec-today {
224
+ background: #ffd;
225
+ background: rgba(255,255,128,0.3);
226
+ }
227
+ .ai1ec-month-view .ai1ec-date {
228
+ text-align: right;
229
+ font-size: 10pt;
230
+ line-height: 12pt;
231
+ padding: 0 0.4em;
232
+ background: #eaf4ff;
233
+ font: 8pt Tahoma, Geneva, sans-serif;
234
+ color: #666;
235
+ text-shadow: 0 1px 0 #fff;
236
+ -o-text-shadow: 0 1px 0 #fff;
237
+ -ms-text-shadow: 0 1px 0 #fff;
238
+ -moz-text-shadow: 0 1px 0 #fff;
239
+ -webkit-text-shadow: 0 1px 0 #fff;
240
+ }
241
+
242
+ /* Event summaries in month view, including popups */
243
+ .ai1ec-month-view a.ai1ec-event-container {
244
+ position: relative;
245
+ font: 9pt Tahoma, Geneva, sans-serif !important;
246
+ text-decoration: none !important;
247
+ display: block;
248
+ border: none !important;
249
+ }
250
+ .ai1ec-month-view .ai1ec-event {
251
+ border-radius: 0.3em;
252
+ -o-border-radius: 0.3em;
253
+ -moz-border-radius: 0.3em;
254
+ -webkit-border-radius: 0.3em;
255
+ margin: 1px 1px 0 1px;
256
+ padding: 0 0 1px 2px;
257
+ white-space: nowrap;
258
+ overflow: hidden;
259
+ color: #568 !important;
260
+ }
261
+ .ai1ec-month-view .ai1ec-allday .ai1ec-event {
262
+ background: #568;
263
+ color: #fff !important;
264
+ }
265
+ .ai1ec-month-view .ai1ec-category-colors {
266
+ float: right;
267
+ font-size: 1.2em;
268
+ margin-top: 1px;
269
+ }
270
+ .ai1ec-month-view .ai1ec-event-popup,
271
+ .ai1ec-month-view .ai1ec-event-summary {
272
+ border: 2px solid #d4c4b0;
273
+ box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
274
+ -o-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
275
+ -ms-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
276
+ -moz-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
277
+ -webkit-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
278
+ background: #fff;
279
+ }
280
+ .ai1ec-month-view .ai1ec-event-popup {
281
+ position: absolute;
282
+ z-index: 5;
283
+ display: none;
284
+ white-space: nowrap;
285
+ color: #000 !important;
286
+ top: -4px;
287
+ left: -2px;
288
+ min-width: 100%;
289
+ border-radius: 0 0.3em 0.3em 0;
290
+ -o-border-radius: 0 0.3em 0.3em 0;
291
+ -moz-border-radius: 0 0.3em 0.3em 0;
292
+ -webkit-border-radius: 0 0.3em 0.3em 0;
293
+ }
294
+ .ai1ec-month-view .ai1ec-event-popup.ai1ec-shifted-right {
295
+ border-radius: 0.3em 0 0 0.3em;
296
+ -o-border-radius: 0.3em 0 0 0.3em;
297
+ -ms-border-radius: 0.3em 0 0 0.3em;
298
+ -moz-border-radius: 0.3em 0 0 0.3em;
299
+ -webkit-border-radius: 0.3em 0 0 0.3em;
300
+ }
301
+ .ai1ec-month-view .ai1ec-event-popup-bg {
302
+ position: relative;
303
+ left: -2px;
304
+ margin-right: -1px;
305
+ padding: 2px 2px 2px 5px;
306
+ background: #fff;
307
+ }
308
+ .ai1ec-month-view .ai1ec-shifted-right .ai1ec-event-popup-bg {
309
+ left: 1px;
310
+ padding: 2px 5px 2px 2px;
311
+ }
312
+ .ai1ec-month-view .ai1ec-event-summary,
313
+ .ai1ec-month-view .ai1ec-event-summary p {
314
+ font-size: 0.95em !important;
315
+ }
316
+ .ai1ec-month-view .ai1ec-event-summary p {
317
+ line-height: 1.4em !important;
318
+ }
319
+ .ai1ec-month-view .ai1ec-event-summary {
320
+ position: absolute;
321
+ overflow: hidden;
322
+ top: -2px;
323
+ white-space: normal;
324
+ right: 100%;
325
+ width: 13em;
326
+ padding: 2px 4px 3px;
327
+ border-radius: 0.3em 0 0.3em 0.3em;
328
+ -o-border-radius: 0.3em 0 0.3em 0.3em;
329
+ -ms-border-radius: 0.3em 0 0.3em 0.3em;
330
+ -moz-border-radius: 0.3em 0 0.3em 0.3em;
331
+ -webkit-border-radius: 0.3em 0 0.3em 0.3em;
332
+ background: linear-gradient( #fff 1.5em, #fdfadc );
333
+ background: -o-linear-gradient( #fff 1.5em, #fdfadc );
334
+ background: -ms-linear-gradient( #fff 1.5em, #fdfadc );
335
+ background: -moz-linear-gradient( #fff 1.5em, #fdfadc );
336
+ background: -webkit-gradient( linear, 0% 1.5em, 0% 100%, from(#fff), to(#fdfadc) );
337
+ background: -webkit-linear-gradient( #fff 1.5em, #fdfadc );
338
+ color: #6d5e4a;
339
+ }
340
+ .ai1ec-month-view .ai1ec-shifted-right .ai1ec-event-summary {
341
+ left: 100%;
342
+ border-radius: 0 0.3em 0.3em 0.3em;
343
+ -o-border-radius: 0 0.3em 0.3em 0.3em;
344
+ -moz-border-radius: 0 0.3em 0.3em 0.3em;
345
+ -webkit-border-radius: 0 0.3em 0.3em 0.3em;
346
+ }
347
+ .ai1ec-month-view .ai1ec-event-summary p {
348
+ margin: 0 0 0.3em !important;
349
+ padding: 0 !important;
350
+ }
351
+ .ai1ec-month-view .ai1ec-event-time {
352
+ font-size: 8pt;
353
+ font-weight: bold;
354
+ }
355
+ .ai1ec-month-view .ai1ec-read-more {
356
+ text-align: center;
357
+ font-size: 8pt;
358
+ color: #aaa;
359
+ color: rgba(0,0,0,0.4);
360
+ }
361
+
362
+ /* Agenda view */
363
+ ol.ai1ec-agenda-view {
364
+ clear: both;
365
+ overflow: hidden;
366
+ margin: 0 !important;
367
+ padding: 0 !important;
368
+ }
369
+ .ai1ec-agenda-view .ai1ec-no-results {
370
+ font-size: 10pt !important;
371
+ font-style: italic;
372
+ }
373
+ ol.ai1ec-date-events {
374
+ overflow: hidden;
375
+ margin: 0 0.75em 0 0 !important;
376
+ padding: 0 !important;
377
+ }
378
+ ol.ai1ec-agenda-view > li, ol.ai1ec-date-events > li {
379
+ list-style: none !important;
380
+ }
381
+ .ai1ec-agenda-view .ai1ec-date {
382
+ overflow: hidden;
383
+ margin: 0 !important;
384
+ padding: 0 !important;
385
+ border-top: 1px solid #f2f2f2;
386
+ border-bottom: 1px solid #fff;
387
+ background: #f8f8f8;
388
+ background: -o-linear-gradient( #f2f2f2 1em, #fff );
389
+ background: -ms-linear-gradient( #f2f2f2 1em, #fff );
390
+ background: -moz-linear-gradient( #f2f2f2 1em, #fff );
391
+ background: -webkit-gradient( linear, 0 1em, 0 100%, from(#f2f2f2), to(#fff) );
392
+ background: -webkit-linear-gradient( #f2f2f2 1em, #fff );
393
+ }
394
+ .ai1ec-agenda-view .ai1ec-date.ai1ec-today {
395
+ border-top: 1px solid #eec;
396
+ border-bottom: 1px solid #fff;
397
+ background: #ffd;
398
+ background: -o-linear-gradient( #f8f8ce 1em, #fff );
399
+ background: -ms-linear-gradient( #f8f8ce 1em, #fff );
400
+ background: -moz-linear-gradient( #f8f8ce 1em, #fff );
401
+ background: -webkit-gradient( linear, 0 1em, 0 100%, from(#f8f8ce), to(#fff) );
402
+ background: -webkit-linear-gradient( #f8f8ce 1em, #fff );
403
+ background: -o-linear-gradient( #f8f8ce 1em, #fff );
404
+ }
405
+ .ai1ec-agenda-view h3.ai1ec-date-title {
406
+ width: 4em;
407
+ float: left;
408
+ margin: 0 0.75em 0.5em !important;
409
+ font: 10pt/1.1em Tahoma, Geneva, sans-serif !important;
410
+ color: #444;
411
+ text-shadow: 0 1px 0 #fff;
412
+ -o-text-shadow: 0 1px 0 #fff;
413
+ -ms-text-shadow: 0 1px 0 #fff;
414
+ -moz-text-shadow: 0 1px 0 #fff;
415
+ -webkit-text-shadow: 0 1px 0 #fff;
416
+ line-height: 1.1em;
417
+ text-align: center;
418
+ border: 2px solid #7e9dbd;
419
+ border-radius: 0 0 5px 5px;
420
+ -o-border-radius: 0 0 0.5em 0.5em;
421
+ -moz-border-radius: 0 0 0.5em 0.5em;
422
+ -webkit-border-radius: 0 0 0.5em 0.5em;
423
+ box-shadow: 0 2px 2px rgba(0,0,0,0.08);
424
+ -o-box-shadow: 0 2px 2px rgba(0,0,0,0.08);
425
+ -ms-box-shadow: 0 2px 2px rgba(0,0,0,0.08);
426
+ -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.08);
427
+ -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.08);
428
+ background: #fff;
429
+ background: -o-linear-gradient( #fff 1em, #eee );
430
+ background: -ms-linear-gradient( #fff 1em, #eee );
431
+ background: -moz-linear-gradient( #fff 1em, #eee );
432
+ background: -webkit-gradient( linear, 0% 1em, 0% 100%, from(#fff), to(#eee) );
433
+ background: -webkit-linear-gradient( #fff 1em, #eee );
434
+ }
435
+ .ai1ec-agenda-view .ai1ec-month {
436
+ text-shadow: 0 -1px 0 #000;
437
+ -o-text-shadow: 0 -1px 0 #000;
438
+ -ms-text-shadow: 0 -1px 0 #000;
439
+ -moz-text-shadow: 0 -1px 0 #000;
440
+ -webkit-text-shadow: 0 -1px 0 #000;
441
+ background: #7e9dbd;
442
+ font-size: 0.8em !important;
443
+ padding: 0.1em;
444
+ text-transform: uppercase;
445
+ letter-spacing: 0.2em;
446
+ color: #fff;
447
+ }
448
+ .ai1ec-agenda-view .ai1ec-day {
449
+ font-size: 2.2em !important;
450
+ padding: 0.3em 0 0.2em !important;
451
+ }
452
+ .ai1ec-agenda-view .ai1ec-weekday {
453
+ font-size: 0.8em !important;
454
+ line-height: 1.5em;
455
+ }
456
+
457
+ /* Agenda view events */
458
+ .ai1ec-agenda-view .ai1ec-event {
459
+ position: relative;
460
+ clear: right;
461
+ overflow: hidden;
462
+ font-size: 10pt;
463
+ text-decoration: none;
464
+ padding: 0.1em 0.3em !important;
465
+ margin: 0.5em 0 !important;
466
+ background: #fff;
467
+ border: 1px solid #ddd;
468
+ border-radius: 0.5em;
469
+ -o-border-radius: 0.5em;
470
+ -moz-border-radius: 0.5em;
471
+ -webkit-border-radius: 0.5em;
472
+ }
473
+ .ai1ec-agenda-view .ai1ec-event.ai1ec-expanded {
474
+ border: 2px solid #D4C4B0;
475
+ box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
476
+ -o-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
477
+ -ms-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
478
+ -moz-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
479
+ -webkit-box-shadow: 1px 5px 8px rgba(0,0,0,0.08);
480
+ }
481
+ .ai1ec-agenda-view .ai1ec-event-click {
482
+ font-family: Tahoma, Geneva, sans-serif !important;
483
+ cursor: pointer;
484
+ line-height: 1.3em;
485
+ color: #568;
486
+ text-shadow: 0 1px 0 #fff;
487
+ -o-text-shadow: 0 1px 0 #fff;
488
+ -ms-text-shadow: 0 1px 0 #fff;
489
+ -moz-text-shadow: 0 1px 0 #fff;
490
+ -webkit-text-shadow: 0 1px 0 #fff;
491
+ }
492
+ .ai1ec-agenda-view .ai1ec-event-time {
493
+ float: left;
494
+ margin-right: 0.5em;
495
+ min-height: 1em;
496
+ font-weight: bold;
497
+ line-height: 1.3em;
498
+ }
499
+ .ai1ec-agenda-view .ai1ec-event-title {
500
+ margin: 0 0 0 8em;
501
+ font-size: 10pt !important;
502
+ font-weight: normal;
503
+ }
504
+ .ai1ec-agenda-view .ai1ec-event.ai1ec-allday {
505
+ padding: 0 !important;
506
+ }
507
+ .ai1ec-agenda-view .ai1ec-allday-label {
508
+ font-size: 8pt !important;
509
+ color: #b9c0ce;
510
+ padding-left: 0.2em;
511
+ }
512
+ .ai1ec-agenda-view .ai1ec-allday .ai1ec-event-click {
513
+ color: #fff;
514
+ background: #568;
515
+ padding: 0.1em 0.4em;
516
+ border-radius: 0.3em;
517
+ -o-border-radius: 0.3em;
518
+ -moz-border-radius: 0.3em;
519
+ -webkit-border-radius: 0.3em;
520
+ text-shadow: none;
521
+ -o-text-shadow: none;
522
+ -ms-text-shadow: none;
523
+ -moz-text-shadow: none;
524
+ -webkit-text-shadow: none;
525
+ }
526
+ .ai1ec-agenda-view .ai1ec-allday .ai1ec-event-time {
527
+ color: #fff;
528
+ }
529
+ .ai1ec-agenda-view .ai1ec-allday .ai1ec-event-title {
530
+ margin: 0;
531
+ }
532
+ .ai1ec-agenda-view .ai1ec-event-expand {
533
+ float: right;
534
+ margin-left: 0.5em;
535
+ visibility: hidden;
536
+ font-size: 9pt !important;
537
+ }
538
+ .ai1ec-agenda-view .ai1ec-event:hover,
539
+ .ai1ec-agenda-view .ai1ec-event.ai1ec-expanded:hover {
540
+ border-color: #aaa;
541
+ }
542
+ .ai1ec-agenda-view .ai1ec-event:hover .ai1ec-event-click {
543
+ color: #000;
544
+ }
545
+ .ai1ec-agenda-view .ai1ec-allday:hover .ai1ec-event-click {
546
+ color: #fff;
547
+ background: #3b475f;
548
+ }
549
+ .ai1ec-agenda-view .ai1ec-event-click:hover > .ai1ec-event-expand {
550
+ visibility: visible;
551
+ }
552
+ .ai1ec-agenda-view .ai1ec-category-colors {
553
+ float: left;
554
+ font-size: 0.9em;
555
+ margin: 0.2em 0.2em 0 -0.2em;
556
+ }
557
+ .ai1ec-agenda-view .ai1ec-category-colors .ai1ec-category-color {
558
+ border: 1px solid rgba(255,255,255,0.7);
559
+ }
560
+
561
+ /* Agenda view expanded events */
562
+ .ai1ec-agenda-view .ai1ec-event-summary {
563
+ display: none;
564
+ }
565
+ .ai1ec-agenda-view .ai1ec-event-summary .ai1ec-event-title {
566
+ margin: 0.1em 0;
567
+ font-size: 11pt !important;
568
+ line-height: 1.1em;
569
+ }
570
+ .ai1ec-agenda-view .ai1ec-event-summary .ai1ec-event-time {
571
+ width: auto;
572
+ float: none;
573
+ font-size: 9pt !important;
574
+ line-height: 1.5em;
575
+ }
576
+ .ai1ec-agenda-view .ai1ec-event-summary .ai1ec-event-click {
577
+ border-bottom: 1px solid #ddd;
578
+ }
579
+ .ai1ec-agenda-view .ai1ec-allday .ai1ec-event-summary .ai1ec-event-click {
580
+ border-bottom: 1px solid #ddd;
581
+ border-radius: 0.3em 0.3em 0 0;
582
+ -o-border-radius: 0.3em 0.3em 0 0;
583
+ -moz-border-radius: 0.3em 0.3em 0 0;
584
+ -webkit-border-radius: 0.3em 0.3em 0 0;
585
+ }
586
+ .ai1ec-agenda-view .ai1ec-categories,
587
+ .ai1ec-agenda-view .ai1ec-tags {
588
+ font-size: 8pt !important;
589
+ }
590
+ .ai1ec-agenda-view .ai1ec-event-description {
591
+ clear: both;
592
+ overflow: hidden;
593
+ padding: 0 0 3.6em;
594
+ max-height: 20em;
595
+ }
596
+ .ai1ec-agenda-view .ai1ec-event-description,
597
+ .ai1ec-agenda-view .ai1ec-event-description p {
598
+ font-size: 9pt !important;
599
+ line-height: 1.5em !important;
600
+ }
601
+ .ai1ec-agenda-view .ai1ec-event-description p {
602
+ margin: 0.5em 0 0.75em !important;
603
+ padding: 0 !important;
604
+ }
605
+ .ai1ec-agenda-view .ai1ec-allday .ai1ec-event-description {
606
+ position: relative;
607
+ overflow: hidden;
608
+ padding: 0 0.4em 3.5em;
609
+ }
610
+ .ai1ec-agenda-view .ai1ec-event-description .ai1ec-label {
611
+ font-size: 8pt !important;
612
+ font-weight: normal;
613
+ }
614
+
615
+ /* Agenda event overlay/read more */
616
+ .ai1ec-agenda-view .ai1ec-event-overlay {
617
+ position: absolute;
618
+ z-index: 5;
619
+ bottom: 0;
620
+ left: 0;
621
+ right: 0;
622
+ padding: 0.4em 0.5em 0.4em 0.2em;
623
+ border-radius: 0 0 0.5em 0.5em;
624
+ -o-border-radius: 0 0 0.5em 0.5em;
625
+ -moz-border-radius: 0 0 0.5em 0.5em;
626
+ -webkit-border-radius: 0 0 0.5em 0.5em;
627
+ background: rgba(255,255,255,0.75);
628
+ background: -o-linear-gradient( rgba(255,255,255,0.75), #FDFADC );
629
+ background: -ms-linear-gradient( rgba(255,255,255,0.75), #FDFADC );
630
+ background: -moz-linear-gradient( rgba(255,255,255,0.75), #FDFADC );
631
+ background: -webkit-gradient( linear, 0 0, 0 100%, from(rgba(255,255,255,0.75)), to(#FDFADC) );
632
+ background: -webkit-linear-gradient( rgba(255,255,255,0.75), #FDFADC );
633
+ }
634
+ .ai1ec-agenda-view .ai1ec-read-more {
635
+ float: right;
636
+ margin: 0.6em 0 0.2em;
637
+ }
638
+
639
+ /* Subscribe */
640
+ .ai1ec-subscribe {
641
+ clear: both;
642
+ }
643
+ .ai1ec-subscribe-filtered {
644
+ display: none;
645
+ }
css/colorpicker.css CHANGED
@@ -1 +1,270 @@
1
- #tag-color{width:39px;height:24px;background:url(../img/color-picker.png);cursor:pointer}#tag-color:hover{background-position:0 -24px}#tag-color-background{position:relative;top:3px;left:3px;width:20px;height:18px;background:transparent}ul.colorpicker-list{padding:.1em}.colorpicker-list li{float:left;width:13px;height:13px;margin:1px;cursor:pointer;border-radius:2px;-o-border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px}.select-more-colors{width:73px!important;line-height:22px;height:22px!important;border-color:#fff!important;margin:2px 1px 2px 1px!important;text-align:center;font-family:Tahoma,Verdana,Arial,Helvetica;font-size:11px}li.select-more-colors:hover{border-color:#0a246a!important;background:#b6bdd2!important}.color-1{background:#60a!important}.color-2{background:#807!important}.color-3{background:#920!important}.color-4{background:#a60!important}.color-5{background:#990!important}.color-6{background:#080!important}.color-7{background:#077!important}.color-8{background:#00a!important}.color-9{background:#000!important}.color-10{background:#444!important}.color-11{background:#85e!important}.color-12{background:#d5d!important}.color-13{background:#d43!important}.color-14{background:#d90!important}.color-15{background:#bb0!important}.color-16{background:#2b0!important}.color-17{background:#0ba!important}.color-18{background:#26d!important}.color-19{background:#777!important}.color-20{background:#aaa!important}.colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../img/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none;z-index:2}.colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:#f00;overflow:hidden;cursor:crosshair}.colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../img/colorpicker_overlay.png)}.colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../img/colorpicker_select.gif);margin:-5px 0 0 -5px}.colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}.colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../img/colorpicker_indic.gif) left top;margin:-4px 0 0 0;left:0}.colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:#f00}.colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:#f00}.colorpicker input{background-color:transparent!important;border:1px solid transparent;border-color:transparent!important;border-radius:0!important;box-sizing:content-box!important;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;margin:0;padding:0;height:11px}.colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../img/colorpicker_hex.png) top;left:212px;top:142px}.colorpicker_hex input{right:6px}.colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}.colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}.colorpicker_rgb_r{background-image:url(../img/colorpicker_rgb_r.png);top:52px;left:212px}.colorpicker_rgb_g{background-image:url(../img/colorpicker_rgb_g.png);top:82px;left:212px}.colorpicker_rgb_b{background-image:url(../img/colorpicker_rgb_b.png);top:112px;left:212px}.colorpicker_hsb_h{background-image:url(../img/colorpicker_hsb_h.png);top:52px;left:282px}.colorpicker_hsb_s{background-image:url(../img/colorpicker_hsb_s.png);top:82px;left:282px}.colorpicker_hsb_b{background-image:url(../img/colorpicker_hsb_b.png);top:112px;left:282px}.colorpicker_submit{position:absolute;width:50px;height:22px;background:url(../img/colorpicker_submit.png) top;left:290px;top:142px;overflow:hidden}.colorpicker_focus{background-position:center}.colorpicker_hex.colorpicker_focus{background-position:bottom}.colorpicker_submit.colorpicker_focus{background-position:bottom}.colorpicker_slider{background-position:bottom}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #tag-color {
2
+ width: 39px;
3
+ height: 24px;
4
+ background: url( ../img/color-picker.png );
5
+ cursor: pointer;
6
+ }
7
+ #tag-color:hover {
8
+ background-position: 0px -24px;
9
+ }
10
+ #tag-color-background {
11
+ position: relative;
12
+ top: 3px;
13
+ left: 3px;
14
+ width: 20px;
15
+ height: 18px;
16
+ background: transparent;
17
+ }
18
+ ul.colorpicker-list {
19
+ padding: 0.1em;
20
+ }
21
+ .colorpicker-list li {
22
+ float: left;
23
+ width: 13px;
24
+ height: 13px;
25
+ margin: 1px;
26
+ cursor: pointer;
27
+ border-radius: 2px;
28
+ -o-border-radius: 2px;
29
+ -moz-border-radius: 2px;
30
+ -webkit-border-radius: 2px;
31
+ }
32
+ .select-more-colors {
33
+ width: 73px !important;
34
+ line-height: 22px;
35
+ height: 22px !important;
36
+ border-color: #fff !important;
37
+ margin: 2px 1px 2px 1px !important;
38
+ text-align: center;
39
+ font-family: Tahoma,Verdana,Arial,Helvetica;
40
+ font-size: 11px;
41
+ }
42
+ li.select-more-colors:hover {
43
+ border-color: #0A246A !important;
44
+ background: #B6BDD2 !important;
45
+ }
46
+ .color-1 {
47
+ background: #60a !important;
48
+ }
49
+ .color-2 {
50
+ background: #807 !important;
51
+ }
52
+ .color-3 {
53
+ background: #920 !important;
54
+ }
55
+ .color-4 {
56
+ background: #a60 !important;
57
+ }
58
+ .color-5 {
59
+ background: #990 !important;
60
+ }
61
+ .color-6 {
62
+ background: #080 !important;
63
+ }
64
+ .color-7 {
65
+ background: #077 !important;
66
+ }
67
+ .color-8 {
68
+ background: #00a !important;
69
+ }
70
+ .color-9 {
71
+ background: #000 !important;
72
+ }
73
+ .color-10 {
74
+ background: #444 !important;
75
+ }
76
+ .color-11 {
77
+ background: #85e !important;
78
+ }
79
+ .color-12 {
80
+ background: #d5d !important;
81
+ }
82
+ .color-13 {
83
+ background: #d43 !important;
84
+ }
85
+ .color-14 {
86
+ background: #d90 !important;
87
+ }
88
+ .color-15 {
89
+ background: #bb0 !important;
90
+ }
91
+ .color-16 {
92
+ background: #2b0 !important;
93
+ }
94
+ .color-17 {
95
+ background: #0ba !important;
96
+ }
97
+ .color-18 {
98
+ background: #26d !important;
99
+ }
100
+ .color-19 {
101
+ background: #777 !important;
102
+ }
103
+ .color-20 {
104
+ background: #aaa !important;
105
+ }
106
+ .colorpicker {
107
+ width: 356px;
108
+ height: 176px;
109
+ overflow: hidden;
110
+ position: absolute;
111
+ background: url(../img/colorpicker_background.png);
112
+ font-family: Arial, Helvetica, sans-serif;
113
+ display: none;
114
+ z-index: 2;
115
+ }
116
+ .colorpicker_color {
117
+ width: 150px;
118
+ height: 150px;
119
+ left: 14px;
120
+ top: 13px;
121
+ position: absolute;
122
+ background: #f00;
123
+ overflow: hidden;
124
+ cursor: crosshair;
125
+ }
126
+ .colorpicker_color div {
127
+ position: absolute;
128
+ top: 0;
129
+ left: 0;
130
+ width: 150px;
131
+ height: 150px;
132
+ background: url(../img/colorpicker_overlay.png);
133
+ }
134
+ .colorpicker_color div div {
135
+ position: absolute;
136
+ top: 0;
137
+ left: 0;
138
+ width: 11px;
139
+ height: 11px;
140
+ overflow: hidden;
141
+ background: url(../img/colorpicker_select.gif);
142
+ margin: -5px 0 0 -5px;
143
+ }
144
+ .colorpicker_hue {
145
+ position: absolute;
146
+ top: 13px;
147
+ left: 171px;
148
+ width: 35px;
149
+ height: 150px;
150
+ cursor: n-resize;
151
+ }
152
+ .colorpicker_hue div {
153
+ position: absolute;
154
+ width: 35px;
155
+ height: 9px;
156
+ overflow: hidden;
157
+ background: url(../img/colorpicker_indic.gif) left top;
158
+ margin: -4px 0 0 0;
159
+ left: 0px;
160
+ }
161
+ .colorpicker_new_color {
162
+ position: absolute;
163
+ width: 60px;
164
+ height: 30px;
165
+ left: 213px;
166
+ top: 13px;
167
+ background: #f00;
168
+ }
169
+ .colorpicker_current_color {
170
+ position: absolute;
171
+ width: 60px;
172
+ height: 30px;
173
+ left: 283px;
174
+ top: 13px;
175
+ background: #f00;
176
+ }
177
+ .colorpicker input {
178
+ background-color: transparent !important;
179
+ border: 1px solid transparent;
180
+ border-color: transparent !important;
181
+ border-radius: 0 !important;
182
+ box-sizing: content-box !important;
183
+ position: absolute;
184
+ font-size: 10px;
185
+ font-family: Arial, Helvetica, sans-serif;
186
+ color: #898989;
187
+ top: 4px;
188
+ right: 11px;
189
+ text-align: right;
190
+ margin: 0;
191
+ padding: 0;
192
+ height: 11px;
193
+ }
194
+ .colorpicker_hex {
195
+ position: absolute;
196
+ width: 72px;
197
+ height: 22px;
198
+ background: url(../img/colorpicker_hex.png) top;
199
+ left: 212px;
200
+ top: 142px;
201
+ }
202
+ .colorpicker_hex input {
203
+ right: 6px;
204
+ }
205
+ .colorpicker_field {
206
+ height: 22px;
207
+ width: 62px;
208
+ background-position: top;
209
+ position: absolute;
210
+ }
211
+ .colorpicker_field span {
212
+ position: absolute;
213
+ width: 12px;
214
+ height: 22px;
215
+ overflow: hidden;
216
+ top: 0;
217
+ right: 0;
218
+ cursor: n-resize;
219
+ }
220
+ .colorpicker_rgb_r {
221
+ background-image: url(../img/colorpicker_rgb_r.png);
222
+ top: 52px;
223
+ left: 212px;
224
+ }
225
+ .colorpicker_rgb_g {
226
+ background-image: url(../img/colorpicker_rgb_g.png);
227
+ top: 82px;
228
+ left: 212px;
229
+ }
230
+ .colorpicker_rgb_b {
231
+ background-image: url(../img/colorpicker_rgb_b.png);
232
+ top: 112px;
233
+ left: 212px;
234
+ }
235
+ .colorpicker_hsb_h {
236
+ background-image: url(../img/colorpicker_hsb_h.png);
237
+ top: 52px;
238
+ left: 282px;
239
+ }
240
+ .colorpicker_hsb_s {
241
+ background-image: url(../img/colorpicker_hsb_s.png);
242
+ top: 82px;
243
+ left: 282px;
244
+ }
245
+ .colorpicker_hsb_b {
246
+ background-image: url(../img/colorpicker_hsb_b.png);
247
+ top: 112px;
248
+ left: 282px;
249
+ }
250
+ .colorpicker_submit {
251
+ position: absolute;
252
+ width: 50px;
253
+ height: 22px;
254
+ background: url(../img/colorpicker_submit.png) top;
255
+ left: 290px;
256
+ top: 142px;
257
+ overflow: hidden;
258
+ }
259
+ .colorpicker_focus {
260
+ background-position: center;
261
+ }
262
+ .colorpicker_hex.colorpicker_focus {
263
+ background-position: bottom;
264
+ }
265
+ .colorpicker_submit.colorpicker_focus {
266
+ background-position: bottom;
267
+ }
268
+ .colorpicker_slider {
269
+ background-position: bottom;
270
+ }
css/event.css CHANGED
@@ -1 +1,175 @@
1
- table.ai1ec-full-event{border:none!important;border-collapse:collapse!important;width:100%;margin-bottom:.5em!important}.ai1ec-full-event td{font-size:10pt!important}.ai1ec-full-event th,.ai1ec-full-event td{line-height:14pt!important;padding:.3em .5em!important;border:none!important;vertical-align:top}.ai1ec-multi-event th,.ai1ec-multi-event td{padding:.3em .5em!important}.ai1ec-full-event th.ai1ec-empty,.ai1ec-full-event td.ai1ec-empty{padding:0!important}.ai1ec-full-event th{width:6em;font-size:9pt!important;font-family:sans-serif!important;font-weight:bold;color:#888!important;text-align:right;text-shadow:0 1px 0 #fff;-moz-text-shadow:0 1px 0 #fff;-webkit-text-shadow:0 1px 0 #fff;background:-moz-linear-gradient(right,#fff,#ececec 1em,#f8f8f8);background:-webkit-gradient(linear,0 0,100% 0,from(#f8f8f8),to(#ececec));background:-webkit-linear-gradient(right,#fff,#ececec 1em,#f8f8f8);background:-o-linear-gradient(right,#fff,#ececec 1em,#f8f8f8)}.ai1ec-full-event .ai1ec-time{line-height:16pt!important;vertical-align:middle}.ai1ec-multi-event .ai1ec-time{line-height:15pt!important}.ai1ec-full-event td.ai1ec-time{font-weight:bold;font-size:11pt!important}.ai1ec-multi-event td.ai1ec-time{font-size:10pt!important}.ai1ec-full-event .ai1ec-allday-label{font-size:10pt!important;color:#bbb;padding-left:.2em}.ai1ec-multi-event .ai1ec-allday-label{font-size:9pt!important}.ai1ec-full-event .ai1ec-calendar-link{float:right;margin:-0.1em 0}.ai1ec-multi-event .ai1ec-calendar-link{font-size:8pt!important}.ai1ec-full-event td.ai1ec-location{min-width:30%}.ai1ec-full-event td.ai1ec-map{text-align:right;vertical-align:bottom}.ai1ec-full-event td.ai1ec-map.ai1ec-has-map{width:55%;text-align:left}.ai1ec-full-event .ai1ec-gmap-container{border:1px solid #ddd;margin-bottom:.3em}.ai1ec-full-event #ai1ec-gmap-canvas{min-width:18em;width:100%;height:12em}.ai1ec-full-event .ai1ec-gmap-link{float:right}.ai1ec-multi-event .ai1ec-gmap-link{font-size:8pt!important;margin:-0.2em 0}.ai1ec-full-event #ai1ec-gmap-canvas input{margin:0!important}.ai1ec-full-event .ai1ec-contact a{white-space:nowrap}.ai1ec-full-event td.ai1ec-tags,.ai1ec-full-event td.ai1ec-categories{padding:.1em .2em!important}.ai1ec-full-event .ai1ec-category{float:left}.ai1ec-multi-event .ai1ec-category{font:8pt Tahoma,Geneva,sans-serif!important}.ai1ec-full-event .ai1ec-tag{font-size:.9em!important}.ai1ec-event-footer{clear:left;font-size:.9em!important;font-style:italic}.ai1ec-ics-icon{background:url(../img/ics-icon.png) no-repeat right;padding-right:15px}.ai1ec-excerpt{margin-bottom:.5em;font-size:10pt!important;line-height:1.6em;overflow:hidden}.ai1ec-excerpt>div{padding-left:7.2em}.ai1ec-excerpt label{padding:0 .6em!important;background:-moz-linear-gradient(right,#fff,#ececec 1em,#f8f8f8);background:-webkit-gradient(linear,0 0,100% 0,from(#f8f8f8),to(#ececec));background:-webkit-linear-gradient(right,#fff,#ececec 1em,#f8f8f8);background:-o-linear-gradient(right,#fff,#ececec 1em,#f8f8f8);text-align:right;text-shadow:0 1px 0 #fff;-moz-text-shadow:0 1px 0 #fff;-webkit-text-shadow:0 1px 0 #fff;clear:left;float:left;width:6em;margin-left:-7.2em}.ai1ec-excerpt .ai1ec-time{font-weight:bold}.ai1ec-excerpt .ai1ec-event-link{float:right;font-size:8pt!important}.ai1ec-excerpt .ai1ec-allday-label{font-size:9pt!important;color:#bbb;padding-left:.2em}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* General table attributes */
2
+ table.ai1ec-full-event {
3
+ border: none !important;
4
+ border-collapse: collapse !important;
5
+ width: 100%;
6
+ margin-bottom: 0.5em !important;
7
+ }
8
+ .ai1ec-full-event td {
9
+ font-size: 10pt !important;
10
+ }
11
+ .ai1ec-full-event th, .ai1ec-full-event td {
12
+ line-height: 14pt !important;
13
+ padding: 0.3em 0.5em !important;
14
+ border: none !important;
15
+ vertical-align: top;
16
+ }
17
+ .ai1ec-multi-event th, .ai1ec-multi-event td {
18
+ padding: 0.3em 0.5em !important;
19
+ }
20
+ .ai1ec-full-event th.ai1ec-empty, .ai1ec-full-event td.ai1ec-empty {
21
+ padding: 0 !important;
22
+ }
23
+ .ai1ec-full-event th {
24
+ width: 6em;
25
+ font-size: 9pt !important;
26
+ font-family: sans-serif !important;
27
+ font-weight: bold;
28
+ color: #888 !important;
29
+ text-align: right;
30
+ text-shadow: 0 1px 0 #fff;
31
+ -moz-text-shadow: 0 1px 0 #fff;
32
+ -webkit-text-shadow: 0 1px 0 #fff;
33
+ background: -moz-linear-gradient( right, #fff, #ececec 1em, #f8f8f8 );
34
+ background: -webkit-gradient( linear, 0 0, 100% 0, from(#f8f8f8), to(#ececec) );
35
+ background: -webkit-linear-gradient( right, #fff, #ececec 1em, #f8f8f8 );
36
+ background: -o-linear-gradient( right, #fff, #ececec 1em, #f8f8f8 );
37
+ }
38
+
39
+ /* Event time(s) */
40
+ .ai1ec-full-event .ai1ec-time {
41
+ line-height: 16pt !important;
42
+ vertical-align: middle;
43
+ }
44
+ .ai1ec-multi-event .ai1ec-time {
45
+ line-height: 15pt !important;
46
+ }
47
+ .ai1ec-full-event td.ai1ec-time {
48
+ font-weight: bold;
49
+ font-size: 11pt !important;
50
+ }
51
+ .ai1ec-multi-event td.ai1ec-time {
52
+ font-size: 10pt !important;
53
+ }
54
+ .ai1ec-full-event .ai1ec-allday-label {
55
+ font-size: 10pt !important;
56
+ color: #bbb;
57
+ padding-left: 0.2em;
58
+ }
59
+ .ai1ec-multi-event .ai1ec-allday-label {
60
+ font-size: 9pt !important;
61
+ }
62
+
63
+ /* Calendar link */
64
+ .ai1ec-full-event .ai1ec-calendar-link {
65
+ float: right;
66
+ margin: -0.1em 0;
67
+ }
68
+ .ai1ec-multi-event .ai1ec-calendar-link {
69
+ font-size: 8pt !important;
70
+ }
71
+
72
+ /* Location & map */
73
+ .ai1ec-full-event td.ai1ec-location {
74
+ min-width: 30%;
75
+ }
76
+ .ai1ec-full-event td.ai1ec-map {
77
+ text-align: right;
78
+ vertical-align: bottom;
79
+ }
80
+ .ai1ec-full-event td.ai1ec-map.ai1ec-has-map {
81
+ width: 55%;
82
+ text-align: left;
83
+ }
84
+ .ai1ec-full-event .ai1ec-gmap-container {
85
+ border: 1px solid #ddd;
86
+ margin-bottom: 0.3em;
87
+ position: relative;
88
+ }
89
+ .ai1ec-full-event #ai1ec-gmap-canvas {
90
+ min-width: 18em;
91
+ width: 100%;
92
+ height: 12em;
93
+ }
94
+ .ai1ec-full-event .ai1ec-gmap-link {
95
+ position: absolute;
96
+ margin: 0;
97
+ font-size: 0.8em !important;
98
+ bottom: 0;
99
+ right: 0;
100
+ }
101
+ .ai1ec-multi-event .ai1ec-gmap-link {
102
+ font-size: 8pt !important;
103
+ margin: -0.2em 0;
104
+ }
105
+ .ai1ec-full-event #ai1ec-gmap-canvas input {
106
+ margin: 0 !important;
107
+ }
108
+
109
+ /* Contact info */
110
+ .ai1ec-full-event .ai1ec-contact a {
111
+ white-space: nowrap;
112
+ }
113
+
114
+ /* Categories and tags */
115
+ .ai1ec-full-event td.ai1ec-tags, .ai1ec-full-event td.ai1ec-categories {
116
+ padding: 0.1em 0.2em !important;
117
+ }
118
+ .ai1ec-full-event .ai1ec-category {
119
+ float: left;
120
+ }
121
+ .ai1ec-multi-event .ai1ec-category {
122
+ font: 8pt Tahoma, Geneva, sans-serif !important;
123
+ }
124
+ .ai1ec-full-event .ai1ec-tag {
125
+ font-size: 0.9em !important;
126
+ }
127
+
128
+ /* Footer */
129
+ .ai1ec-event-footer {
130
+ clear: left;
131
+ font-size: 0.9em !important;
132
+ font-style: italic;
133
+ }
134
+ .ai1ec-ics-icon {
135
+ background: url(../img/ics-icon.png) no-repeat right;
136
+ padding-right: 15px;
137
+ }
138
+
139
+ /* Excerpts */
140
+ .ai1ec-excerpt {
141
+ margin-bottom: 0.5em;
142
+ font-size: 10pt !important;
143
+ line-height: 1.6em;
144
+ overflow: hidden;
145
+ }
146
+ .ai1ec-excerpt > div {
147
+ padding-left: 7.2em;
148
+ }
149
+ .ai1ec-excerpt label {
150
+ padding: 0 0.6em !important;
151
+ background: -moz-linear-gradient( right, #fff, #ececec 1em, #f8f8f8 );
152
+ background: -webkit-gradient( linear, 0 0, 100% 0, from(#f8f8f8), to(#ececec) );
153
+ background: -webkit-linear-gradient( right, #fff, #ececec 1em, #f8f8f8 );
154
+ background: -o-linear-gradient( right, #fff, #ececec 1em, #f8f8f8 );
155
+ text-align: right;
156
+ text-shadow: 0 1px 0 #fff;
157
+ -moz-text-shadow: 0 1px 0 #fff;
158
+ -webkit-text-shadow: 0 1px 0 #fff;
159
+ clear: left;
160
+ float: left;
161
+ width: 6em;
162
+ margin-left: -7.2em;
163
+ }
164
+ .ai1ec-excerpt .ai1ec-time {
165
+ font-weight: bold;
166
+ }
167
+ .ai1ec-excerpt .ai1ec-event-link {
168
+ float: right;
169
+ font-size: 8pt !important;
170
+ }
171
+ .ai1ec-excerpt .ai1ec-allday-label {
172
+ font-size: 9pt !important;
173
+ color: #bbb;
174
+ padding-left: 0.2em;
175
+ }
css/general.css CHANGED
@@ -1 +1,165 @@
1
- a.ai1ec-button{cursor:pointer;font:10pt/1.1em Tahoma,Geneva,sans-serif!important;text-decoration:none!important;color:#666!important;text-shadow:0 1px 0 #fff;-moz-text-shadow:0 1px 0 #fff;-webkit-text-shadow:0 1px 0 #fff;padding:.4em .5em;margin:.1em;background:#eee;background:-moz-linear-gradient(#f8f8f8,#ddd);background:-webkit-gradient(linear,0% 0,0% 100%,from(#f8f8f8),to(#ddd));background:-webkit-linear-gradient(#f8f8f8,#ddd);background:-o-linear-gradient(#f8f8f8,#ddd);box-shadow:0 2px 2px rgba(0,0,0,0.08);-moz-box-shadow:0 2px 2px rgba(0,0,0,0.08);-webkit-box-shadow:0 2px 2px rgba(0,0,0,0.08);border-radius:.4em;-moz-border-radius:.4em;-webkit-border-radius:.4em;text-align:center;border:1px solid #ccc;border-width:1px;display:inline-block;white-space:nowrap}a.ai1ec-button:hover{color:#444!important;background:#ddd;background:-moz-linear-gradient(#eee,#ccc);background:-webkit-gradient(linear,0% 0,0% 100%,from(#eee),to(#ccc));background:-webkit-linear-gradient(#eee,#ccc);background:-o-linear-gradient(#eee,#ccc)}a.ai1ec-button.ai1ec-selected{color:#000!important;border-color:#909ce0;background:#dde6f8;background:-moz-linear-gradient(#edf6ff,#c5d4f3);background:-webkit-gradient(linear,0% 0,0% 100%,from(#edf6ff),to(#c5d4f3));background:-webkit-linear-gradient(#edf6ff,#c5d4f3);background:-o-linear-gradient(#edf6ff,#c5d4f3)}a.ai1ec-button.ai1ec-active{color:#000!important;background:#ddd;background:-moz-linear-gradient(#ccc,#eee);background:-webkit-gradient(linear,0% 0,0% 100%,from(#ccc),to(#eee));background:-webkit-linear-gradient(#ccc,#eee);background:-o-linear-gradient(#ccc,#eee)}a.ai1ec-button.ai1ec-active.ai1ec-selected{background:#dde6f8;background:-moz-linear-gradient(#c5d4f3,#edf6ff);background:-webkit-gradient(linear,0% 0,0% 100%,from(#c5d4f3),to(#edf6ff));background:-webkit-linear-gradient(#c5d4f3,#edf6ff);background:-o-linear-gradient(#c5d4f3,#edf6ff)}li>a.ai1ec-button{display:block;margin:0;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;border-left-width:0}li:first-child>a.ai1ec-button{border-radius:.4em 0 0 .4em;-moz-border-radius:.4em 0 0 .4em;-webkit-border-radius:.4em 0 0 .4em;border-left-width:1px}li:last-child>a.ai1ec-button{border-radius:0 .4em .4em 0;-moz-border-radius:0 .4em .4em 0;-webkit-border-radius:0 .4em .4em 0}li:first-child:last-child>a.ai1ec-button{border-radius:.4em;-moz-border-radius:.4em;-webkit-border-radius:.4em}label.ai1ec-label{padding:0 .2em;font-family:Tahoma,Geneva,sans-serif!important;font-size:9pt!important;font-weight:bold;color:#888!important}.ai1ec-category{cursor:pointer;font:.9em Tahoma,Geneva,sans-serif!important;border:1px solid #dcdcdc;text-shadow:0 1px 0 #fff;-moz-text-shadow:0 1px 0 #fff;-webkit-text-shadow:0 1px 0 #fff;padding:2pt 3pt!important;margin:.2em!important;text-decoration:none!important;text-transform:uppercase;letter-spacing:1pt;white-space:nowrap;color:#666!important;background:#f0f0f0;border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em}.ai1ec-category:hover{color:#222!important;background:#dcdcdc}.ai1ec-category.ai1ec-selected{background:#c5d4f3;border-color:#7a86d9}.ai1ec-tag{color:#568!important;font-family:Tahoma,Geneva,sans-serif!important;line-height:1.3em!important;cursor:pointer;white-space:nowrap;margin:.1em .2em;padding:.1em .2em;border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em;display:inline-block}.ai1ec-tag:hover{color:#000!important;text-decoration:underline}.ai1ec-tag.ai1ec-selected{background:#cddbf5}.ai1ec-category-color{display:inline-block;width:.9em;height:.9em;margin:0 1px;border-radius:.2em;-o-border-radius:.2em;-moz-border-radius:.2em;-webkit-border-radius:.2em}.ai1ec-subscribe-google img{float:left;margin:-10px .5em -8px 0;padding:0!important;border:none!important;background:none!important}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* General button styling */
2
+ a.ai1ec-button {
3
+ cursor: pointer;
4
+ font: 10pt/1.1em Tahoma, Geneva, sans-serif !important;
5
+ text-decoration: none !important;
6
+ color: #666 !important;
7
+ text-shadow: 0 1px 0 #fff;
8
+ -moz-text-shadow: 0 1px 0 #fff;
9
+ -webkit-text-shadow: 0 1px 0 #fff;
10
+ padding: 0.4em 0.5em;
11
+ margin: 0.1em;
12
+ background: #eee;
13
+ background: -moz-linear-gradient( #f8f8f8, #ddd );
14
+ background: -webkit-gradient( linear, 0% 0%, 0% 100%, from(#f8f8f8), to(#ddd) );
15
+ background: -webkit-linear-gradient( #f8f8f8, #ddd );
16
+ background: -o-linear-gradient( #f8f8f8, #ddd );
17
+ box-shadow: 0 2px 2px rgba(0,0,0,0.08);
18
+ -moz-box-shadow: 0 2px 2px rgba(0,0,0,0.08);
19
+ -webkit-box-shadow: 0 2px 2px rgba(0,0,0,0.08);
20
+ border-radius: 0.4em;
21
+ -moz-border-radius: 0.4em;
22
+ -webkit-border-radius: 0.4em;
23
+ text-align: center;
24
+ border: 1px solid #ccc;
25
+ border-width: 1px;
26
+ display: inline-block;
27
+ white-space: nowrap;
28
+ }
29
+ a.ai1ec-button:hover {
30
+ color: #444 !important;
31
+ background: #ddd;
32
+ background: -moz-linear-gradient( #eee, #ccc );
33
+ background: -webkit-gradient( linear, 0% 0%, 0% 100%, from(#eee), to(#ccc) );
34
+ background: -webkit-linear-gradient( #eee, #ccc );
35
+ background: -o-linear-gradient( #eee, #ccc );
36
+ }
37
+ a.ai1ec-button.ai1ec-selected {
38
+ color: #000 !important;
39
+ border-color: #909CE0;
40
+ background: #DDE6F8;
41
+ background: -moz-linear-gradient( #eDf6Ff, #C5D4F3 );
42
+ background: -webkit-gradient( linear, 0% 0%, 0% 100%, from(#eDf6Ff), to(#C5D4F3) );
43
+ background: -webkit-linear-gradient( #eDf6Ff, #C5D4F3 );
44
+ background: -o-linear-gradient( #eDf6Ff, #C5D4F3 );
45
+ }
46
+ a.ai1ec-button.ai1ec-active {
47
+ color: #000 !important;
48
+ background: #ddd;
49
+ background: -moz-linear-gradient( #ccc, #eee );
50
+ background: -webkit-gradient( linear, 0% 0%, 0% 100%, from(#ccc), to(#eee) );
51
+ background: -webkit-linear-gradient( #ccc, #eee );
52
+ background: -o-linear-gradient( #ccc, #eee );
53
+ }
54
+ a.ai1ec-button.ai1ec-active.ai1ec-selected {
55
+ background: #DDE6F8;
56
+ background: -moz-linear-gradient( #C5D4F3, #eDf6Ff );
57
+ background: -webkit-gradient( linear, 0% 0%, 0% 100%, from(#C5D4F3), to(#eDf6Ff) );
58
+ background: -webkit-linear-gradient( #C5D4F3, #eDf6Ff );
59
+ background: -o-linear-gradient( #C5D4F3, #eDf6Ff );
60
+ }
61
+ li > a.ai1ec-button {
62
+ display: block;
63
+ margin: 0;
64
+ border-radius: 0;
65
+ -moz-border-radius: 0;
66
+ -webkit-border-radius: 0;
67
+ border-left-width: 0;
68
+ }
69
+ li:first-child > a.ai1ec-button {
70
+ border-radius: 0.4em 0 0 0.4em;
71
+ -moz-border-radius: 0.4em 0 0 0.4em;
72
+ -webkit-border-radius: 0.4em 0 0 0.4em;
73
+ border-left-width: 1px;
74
+ }
75
+ li:last-child > a.ai1ec-button {
76
+ border-radius: 0 0.4em 0.4em 0;
77
+ -moz-border-radius: 0 0.4em 0.4em 0;
78
+ -webkit-border-radius: 0 0.4em 0.4em 0;
79
+ }
80
+ li:first-child:last-child > a.ai1ec-button {
81
+ border-radius: 0.4em;
82
+ -moz-border-radius: 0.4em;
83
+ -webkit-border-radius: 0.4em;
84
+ }
85
+
86
+ /* Label styling */
87
+ label.ai1ec-label {
88
+ padding: 0 0.2em;
89
+ font-family: Tahoma, Geneva, sans-serif !important;
90
+ font-size: 9pt !important;
91
+ font-weight: bold;
92
+ color: #888 !important;
93
+ }
94
+
95
+ /* Categories */
96
+ .ai1ec-category {
97
+ cursor: pointer;
98
+ font: 0.9em Tahoma, Geneva, sans-serif !important;
99
+ border: 1px solid #dcdcdc;
100
+ text-shadow: 0 1px 0 #fff;
101
+ -moz-text-shadow: 0 1px 0 #fff;
102
+ -webkit-text-shadow: 0 1px 0 #fff;
103
+ padding: 2pt 3pt !important;
104
+ margin: 0.2em !important;
105
+ text-decoration: none !important;
106
+ text-transform: uppercase;
107
+ letter-spacing: 1pt;
108
+ white-space: nowrap;
109
+ color: #666 !important;
110
+ background: #f0f0f0;
111
+ border-radius: 0.3em;
112
+ -moz-border-radius: 0.3em;
113
+ -webkit-border-radius: 0.3em;
114
+ }
115
+ .ai1ec-category:hover {
116
+ color: #222 !important;
117
+ background: #dcdcdc;
118
+ }
119
+ .ai1ec-category.ai1ec-selected {
120
+ background: #C5D4F3;
121
+ border-color: #7A86D9;
122
+ }
123
+
124
+ /* Tags */
125
+ .ai1ec-tag {
126
+ color: #568 !important;
127
+ font-family: Tahoma, Geneva, sans-serif !important;
128
+ line-height: 1.3em !important;
129
+ cursor: pointer;
130
+ white-space: nowrap;
131
+ margin: 0.1em 0.2em;
132
+ padding: 0.1em 0.2em;
133
+ border-radius: 0.3em;
134
+ -moz-border-radius: 0.3em;
135
+ -webkit-border-radius: 0.3em;
136
+ display: inline-block;
137
+ }
138
+ .ai1ec-tag:hover {
139
+ color: #000 !important;
140
+ text-decoration: underline;
141
+ }
142
+ .ai1ec-tag.ai1ec-selected {
143
+ background: #CDDBF5;
144
+ }
145
+
146
+ /* Category color */
147
+ .ai1ec-category-color {
148
+ display: inline-block;
149
+ width: 0.9em;
150
+ height: 0.9em;
151
+ margin: 0 1px;
152
+ border-radius: 0.2em;
153
+ -o-border-radius: 0.2em;
154
+ -moz-border-radius: 0.2em;
155
+ -webkit-border-radius: 0.2em;
156
+ }
157
+
158
+ /* Subscribe buttons */
159
+ .ai1ec-subscribe-google img {
160
+ float: left;
161
+ margin: -10px 0.5em -8px 0;
162
+ padding: 0 !important;
163
+ border: none !important;
164
+ background: none !important;
165
+ }
css/jquery.autocomplete.css CHANGED
@@ -1 +1,48 @@
1
- .ac_results{padding:0;border:1px solid black;background-color:white;overflow:hidden;z-index:99999}.ac_results ul{width:100%;list-style-position:outside;list-style:none;padding:0;margin:0}.ac_results li{margin:0;padding:2px 5px;cursor:default;display:block;font:menu;font-size:12px;line-height:16px;overflow:hidden}.ac_loading{background:white url('../img/indicator.gif') right center no-repeat}.ac_odd{background-color:#eee}.ac_over{background-color:#0a246a;color:white}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .ac_results {
2
+ padding: 0px;
3
+ border: 1px solid black;
4
+ background-color: white;
5
+ overflow: hidden;
6
+ z-index: 99999;
7
+ }
8
+
9
+ .ac_results ul {
10
+ width: 100%;
11
+ list-style-position: outside;
12
+ list-style: none;
13
+ padding: 0;
14
+ margin: 0;
15
+ }
16
+
17
+ .ac_results li {
18
+ margin: 0px;
19
+ padding: 2px 5px;
20
+ cursor: default;
21
+ display: block;
22
+ /*
23
+ if width will be 100% horizontal scrollbar will apear
24
+ when scroll mode will be used
25
+ */
26
+ /*width: 100%;*/
27
+ font: menu;
28
+ font-size: 12px;
29
+ /*
30
+ it is very important, if line-height not setted or setted
31
+ in relative units scroll will be broken in firefox
32
+ */
33
+ line-height: 16px;
34
+ overflow: hidden;
35
+ }
36
+
37
+ .ac_loading {
38
+ background: white url( '../img/indicator.gif' ) right center no-repeat;
39
+ }
40
+
41
+ .ac_odd {
42
+ background-color: #eee;
43
+ }
44
+
45
+ .ac_over {
46
+ background-color: #0A246A;
47
+ color: white;
48
+ }
css/selector.css CHANGED
@@ -1 +1,3 @@
1
- <?php echo $selector ?>{visibility:hidden}
 
 
1
+ <?php echo $selector ?> {
2
+ visibility: hidden;
3
+ }
css/settings.css CHANGED
@@ -1 +1,174 @@
1
- #the-seed-studio-settings div.inside{background:#fff;margin:0!important;padding:6px 0 8px}#the-seed-studio-settings a{font-weight:bold}.ai1ec_feed_h4{margin-bottom:5px}.column-1-ai1ec{float:left;width:54%}.column-2-ai1ec{float:right;width:45%}.column-3-ai1ec{float:left;width:100%}.ai1ec-plugin-branding{padding:0 20px 0 20px}.ai1ec-plugin-logo{position:relative;margin-left:-15px}.ai1ec-support-button{float:right;width:280px;text-align:center;margin:1em 0 1em 1em}.ai1ec-support-button a{font-size:24px;color:#fff;text-decoration:none;text-transform:uppercase;text-align:center;display:block;padding:10px 30px 10px 30px;margin:0 auto;border-radius:10px;-o-border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;text-shadow:-1px -1px 1px rgba(0,0,0,.2);-o-text-shadow:-1px -1px 1px rgba(0,0,0,.2);-moz-text-shadow:-1px -1px 1px rgba(0,0,0,.2);-webkit-text-shadow:-1px -1px 1px rgba(0,0,0,.2);box-shadow:0 .3em .3em rgba(0,0,0,0.2);-o-box-shadow:0 .3em .3em rgba(0,0,0,0.2);-moz-box-shadow:0 .3em .3em rgba(0,0,0,0.2);-webkit-box-shadow:0 .3em .3em rgba(0,0,0,0.2);border:1px solid #fff}.ai1ec-support-button a:link,.ai1ec-support-button a:visited{background:#88b633;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#91bb35',endColorstr='#548a26');background:linear-gradient(#91bb35,#548a26);background:-o-linear-gradient(#91bb35,#548a26);background:-moz-linear-gradient(#91bb35,#548a26);background:-webkit-gradient(linear,left top,left bottom,from(#91bb35),to(#548a26));background:-webkit-linear-gradient(#91bb35,#548a26)}.ai1ec-support-button a:hover{color:#fff;background:#88b633;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d2e7a2',endColorstr='#91bb35');background:linear-gradient(#d2e7a2,#91bb35);background:-o-linear-gradient(#d2e7a2,#91bb35);background:-moz-linear-gradient(#d2e7a2,#91bb35);background:-webkit-gradient(linear,left top,left bottom,from(#d2e7a2),to(#91bb35));background:-webkit-linear-gradient(#d2e7a2,#91bb35)}.ai1ec-support-button a span{display:block;padding-top:2px;font-size:.5em;color:#e5f3ca;text-align:center;text-transform:lowercase}#general-settings{line-height:1.7em}#general-settings div.inside label{float:left;clear:left;margin:.25em 0}#general-settings .checkbox{float:left;margin:.5em .5em 0 0}#general-settings div.description{clear:left;font-size:.95em;line-height:1.5em;margin-bottom:1em}label.textinput{width:230px}.ai1ec-follow-fan{padding:10px 0 10px 0;margin:10px 0 0 0;border-top:1px solid #ccc;border-bottom:1px solid #ccc}.facebook-like-top{float:left}#ai1ec_feed_url,.ai1ec-feed-url{width:100%}.ai1ec-feed-category,.ai1ec-feed-tags{float:left;overflow:hidden;line-height:2em}.ai1ec-feed-category strong,.ai1ec-feed-tags strong{margin:0 1em 0 .2em}#ai1ec_feed_category,#ai1ec_feed_tags{width:15em}#ai1ec_feed_category{margin-right:.5em}.ai1ec-feed-container{background:#eee;border:1px solid #ddd;padding:.3em .5em;border-radius:.5em;-moz-border-radius:.5em;-webkit-border-radius:.5em;overflow:hidden;position:relative;margin:1em 0 0}.ai1ec-feed-container .ajax-loading{clear:left;display:block}.ai1ec_feed_h4{margin:.5em 0}#ai1ec_add_new_ics,.ai1ec_delete_ics{clear:left}#ai1ec_add_new_ics,.ai1ec_delete_ics,.ai1ec_update_ics,.ai1ec_flush_ics{float:right}#ai1ec_save_settings{clear:left;display:block}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #the-seed-studio-settings div.inside {
2
+ background: #fff;
3
+ margin: 0 !important;
4
+ padding: 6px 0 8px;
5
+ }
6
+ #the-seed-studio-settings a {
7
+ font-weight: bold;
8
+ }
9
+ .ai1ec_feed_h4 {
10
+ margin-bottom: 5px;
11
+ }
12
+ .column-1-ai1ec {
13
+ float: left;
14
+ width: 54%;
15
+ }
16
+ .column-2-ai1ec {
17
+ float: right;
18
+ width: 45%;
19
+ }
20
+ .column-3-ai1ec {
21
+ float: left;
22
+ width: 100%;
23
+ }
24
+ .ai1ec-plugin-branding {
25
+ padding: 0 20px 0 20px;
26
+ }
27
+ .ai1ec-plugin-logo {
28
+ position: relative;
29
+ margin-left: -15px;
30
+ }
31
+
32
+ .ai1ec-support-button {
33
+ float:right;
34
+ width:280px;
35
+ text-align: center;
36
+ margin: 1em 0 1em 1em;
37
+ }
38
+ .ai1ec-support-button a {
39
+ font-size: 24px;
40
+ font-weight: normal !important;
41
+ color:#fff;
42
+ text-decoration: none;
43
+ text-transform: uppercase;
44
+ text-align: center;
45
+ display: block;
46
+ padding: 10px 30px 10px 30px;
47
+ margin: 0 auto;
48
+ border-radius: 10px;
49
+ -o-border-radius: 10px;
50
+ -moz-border-radius: 10px;
51
+ -webkit-border-radius:10px;
52
+ text-shadow: -1px -1px 1px rgba(0,0,0,.2);
53
+ -o-text-shadow: -1px -1px 1px rgba(0,0,0,.2);
54
+ -moz-text-shadow: -1px -1px 1px rgba(0,0,0,.2);
55
+ -webkit-text-shadow: -1px -1px 1px rgba(0,0,0,.2);
56
+ box-shadow: 0 0.3em 0.3em rgba(0,0,0,0.2);
57
+ -o-box-shadow: 0 0.3em 0.3em rgba(0,0,0,0.2);
58
+ -moz-box-shadow: 0 0.3em 0.3em rgba(0,0,0,0.2);
59
+ -webkit-box-shadow: 0 0.3em 0.3em rgba(0,0,0,0.2);
60
+ border:1px solid #fff;
61
+ }
62
+ .ai1ec-support-button a:link, .ai1ec-support-button a:visited {
63
+ background: #88b633;
64
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#91bb35', endColorstr='#548a26');
65
+ background: linear-gradient(#91bb35, #548a26);
66
+ background: -o-linear-gradient(#91bb35, #548a26);
67
+ background: -moz-linear-gradient(#91bb35, #548a26);
68
+ background: -webkit-gradient(linear, left top, left bottom, from(#91bb35), to(#548a26));
69
+ background: -webkit-linear-gradient(#91bb35, #548a26);
70
+ }
71
+
72
+ .ai1ec-support-button a:hover {
73
+ color: #fff;
74
+ background: #88b633;
75
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d2e7a2', endColorstr='#91bb35');
76
+ background: linear-gradient(#d2e7a2, #91bb35);
77
+ background: -o-linear-gradient(#d2e7a2, #91bb35);
78
+ background: -moz-linear-gradient(#d2e7a2, #91bb35);
79
+ background: -webkit-gradient(linear, left top, left bottom, from(#d2e7a2), to(#91bb35));
80
+ background: -webkit-linear-gradient(#d2e7a2, #91bb35);
81
+ }
82
+
83
+ .ai1ec-support-button a span {
84
+ display: block;
85
+ padding-top:2px;
86
+ font-size: .5em;
87
+ color:#e5f3ca;
88
+ text-align: center;
89
+ text-transform: lowercase;
90
+ }
91
+
92
+ #general-settings {
93
+ line-height: 1.7em;
94
+ }
95
+ #general-settings div.inside label {
96
+ float: left;
97
+ clear: left;
98
+ margin: 0.25em 0;
99
+ }
100
+ #general-settings .checkbox {
101
+ float: left;
102
+ margin: 0.5em 0.5em 0 0;
103
+ }
104
+ #general-settings div.description {
105
+ clear: left;
106
+ font-size: 0.95em;
107
+ line-height: 1.5em;
108
+ margin-bottom: 1em;
109
+ }
110
+ label.textinput {
111
+ width: 230px;
112
+ }
113
+
114
+ .ai1ec-follow-fan {
115
+ padding:10px 0 10px 0;
116
+ margin: 10px 0 0 0;
117
+ border-top: 1px solid #ccc;
118
+ border-bottom: 1px solid #ccc;
119
+ }
120
+ .facebook-like-top {
121
+ float: left;
122
+ }
123
+
124
+ /* ICS Feeds */
125
+ #ai1ec_feed_url,
126
+ .ai1ec-feed-url {
127
+ width: 100%;
128
+ }
129
+ .ai1ec-feed-category, .ai1ec-feed-tags {
130
+ float: left;
131
+ overflow: hidden;
132
+ line-height: 2em;
133
+ }
134
+ .ai1ec-feed-category strong, .ai1ec-feed-tags strong {
135
+ margin: 0 1em 0 0.2em;
136
+ }
137
+ #ai1ec_feed_category, #ai1ec_feed_tags {
138
+ width: 15em;
139
+ }
140
+ #ai1ec_feed_category {
141
+ margin-right: 0.5em;
142
+ }
143
+ .ai1ec-feed-container {
144
+ background: #eee;
145
+ border: 1px solid #ddd;
146
+ padding: 0.3em 0.5em;
147
+ border-radius: 0.5em;
148
+ -moz-border-radius: 0.5em;
149
+ -webkit-border-radius: 0.5em;
150
+ overflow: hidden;
151
+ position: relative;
152
+ margin: 1em 0 0;
153
+ }
154
+ .ai1ec-feed-container .ajax-loading {
155
+ clear: left;
156
+ display: block;
157
+ }
158
+ .ai1ec_feed_h4 {
159
+ margin: 0.5em 0;
160
+ }
161
+ #ai1ec_add_new_ics, .ai1ec_delete_ics {
162
+ clear: left;
163
+ }
164
+ #ai1ec_add_new_ics, .ai1ec_delete_ics, .ai1ec_update_ics, .ai1ec_flush_ics {
165
+ float: right;
166
+ }
167
+ #ai1ec_save_settings {
168
+ clear: left;
169
+ display: block;
170
+ }
171
+
172
+ .ai1ec-donate {
173
+ text-align: center;
174
+ }
js/add_new_event.js CHANGED
@@ -1 +1,435 @@
1
- jQuery(function(f){if(f("#ai1ec_event").length){element_selector(".ai1ec_week_days_list > li","ai1ec_selected","ai1ec_weekday_value","#ai1ec_weekly_days");element_selector(".ai1ec_month_days_list > li","ai1ec_selected","ai1ec_monthday_value","#ai1ec_monthly_days");element_selector(".ai1ec_yearly_months_list > li","ai1ec_selected","ai1ec_yearmonth_value","#ai1ec_yearly_months");var a=new Date(ai1ec_add_new_event.now*1000);var g={allday:"#ai1ec_all_day_event",start_date_input:"#ai1ec_start-date-input",start_time_input:"#ai1ec_start-time-input",start_time:"#ai1ec_start-time",end_date_input:"#ai1ec_end-date-input",end_time_input:"#ai1ec_end-time-input",end_time:"#ai1ec_end-time",now:a};f.timespan(g);g={start_date_input:"#ai1ec_until-date-input",start_time:"#ai1ec_until-time",now:a};f.inputdate(g);f("#ai1ec_count").rangeinput({css:{input:"ai1ec-range",slider:"ai1ec-slider",progress:"ai1ec-progress",handle:"ai1ec-handle"}});var k=new google.maps.Geocoder();var j=new google.maps.LatLng(9.965,-83.327);var h={zoom:0,mapTypeId:google.maps.MapTypeId.ROADMAP,center:j};var e=new google.maps.Map(f("#ai1ec_map_canvas").get(0),h);var d=new google.maps.Marker({map:e});function l(w){e.setCenter(w.geometry.location);e.setZoom(15);d.setPosition(w.geometry.location);f("#ai1ec_address").val(w.formatted_address);var v="";var u="";var q="";var o="";var t=0;var p=0;for(var r=0;r<w.address_components.length;r++){switch(w.address_components[r].types[0]){case"street_number":v=w.address_components[r].long_name;break;case"route":u=w.address_components[r].long_name;break;case"locality":q=w.address_components[r].long_name;break;case"administrative_area_level_1":province=w.address_components[r].long_name;break;case"postal_code":t=w.address_components[r].long_name;break;case"country":p=w.address_components[r].long_name;break}}var s=v.length>0?v+" ":"";s+=u.length>0?u:"";t=t!=0?t:"";f("#ai1ec_city").val(q);f("#ai1ec_province").val(province);f("#ai1ec_postal_code").val(t);f("#ai1ec_country").val(p)}f("#ai1ec_address").geo_autocomplete(new google.maps.Geocoder,{selectFirst:false,minChars:3,cacheLength:50,width:300,scroll:true,scrollHeight:330}).result(function(o,p){if(p){l(p)}}).change(function(){if(f(this).val().length>0){var o=f(this).val();k.geocode({address:o},function(q,p){if(p==google.maps.GeocoderStatus.OK){l(q[0])}})}}).change();f("#ai1ec_google_map").click(function(){if(f(this).is(":checked")){f(".ai1ec_box_map").addClass("ai1ec_box_map_visible").hide().slideDown("fast")}else{f(".ai1ec_box_map").slideUp("fast")}});f("#ai1ec_repeat").change(function(){var o=f("#ai1ec_repeat option:selected").val();switch(o){case" ":i();break;default:c();break}});f("#ai1ec_end").change(m);function c(){f("#ai1ec_end_holder").fadeIn();m()}function i(){b();f("#ai1ec_end_holder").fadeOut()}function m(){var o=f("#ai1ec_end option:selected").val();switch(o){case"0":b();break;case"1":if(f("#ai1ec_count_holder").css("display")=="none"){b();f("#ai1ec_count_holder").fadeIn()}break;case"2":if(f("#ai1ec_until_holder").css("display")=="none"){b();f("#ai1ec_until_holder").fadeIn()}break}}function b(){f("#ai1ec_count_holder, #ai1ec_until_holder").hide()}if(f("#ai1ec_bottom_publish").length>0){f("#ai1ec_bottom_publish").click(function(){f("#publish").trigger("click")})}}if(f("#ai1ec_add_new_ics").length){f("#ai1ec_add_new_ics").click(function(){var q=f(this);var o=f("#ai1ec_feed_url");if(!n(o.val())){o.css("border-color","#FF0000").focus()}else{q.attr("disabled",true);o.css("border-color","#DFDFDF");var p={action:"ai1ec_add_ics",feed_url:o.val(),feed_category:f("#ai1ec_feed_category option:selected").val(),feed_tags:f("#ai1ec_feed_tags").val()};f.getJSON(ajaxurl,p,function(r){q.removeAttr("disabled");if(r.error){alert(r.message)}else{o.val("");f("#ai1ec-feeds-after").after(r.message)}})}});f(".ai1ec_delete_ics").live("click",function(){var r=f(this);r.attr("disabled",true);var q=r.closest(".ai1ec-feed-container");var p=r.siblings(".ai1ec_feed_id").val();var o={action:"ai1ec_delete_ics",ics_id:p};f.getJSON(ajaxurl,o,function(s){r.removeAttr("disabled");if(s.error){alert(s.message)}else{q.remove()}})});f(".ai1ec_flush_ics").live("click",function(){var q=f(this);q.attr("disabled",true);var p=q.siblings(".ai1ec_feed_id").val();q.siblings(".ajax-loading").css("visibility","visible");var o={action:"ai1ec_flush_ics",ics_id:p};f.getJSON(ajaxurl,o,function(r){if(r.error){alert(r.message)}else{q.fadeOut()}q.siblings(".ajax-loading").css("visibility","hidden")})});f(".ai1ec_update_ics").live("click",function(){var q=f(this);q.attr("disabled",true);var p=q.siblings(".ai1ec_feed_id").val();q.siblings(".ajax-loading").css("visibility","visible");var o={action:"ai1ec_update_ics",ics_id:p};f.getJSON(ajaxurl,o,function(r){if(r.error){alert(r.message)}else{q.siblings(".ai1ec_flush_ics").remove();if(r.count){q.after('<input type="button" class="button ai1ec_flush_ics" value="'+r.flush_label+'" />')}}q.attr("disabled",false).siblings(".ajax-loading").css("visibility","hidden")})});function n(o){var p=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return p.test(o)}}});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery( function( $ ){
2
+
3
+ /**
4
+ * Event post creation/edit form
5
+ */
6
+ if( $('#ai1ec_event' ).length )
7
+ {
8
+ // Selector for repeat weekly
9
+ element_selector( '.ai1ec_week_days_list > li', 'ai1ec_selected', 'ai1ec_weekday_value', '#ai1ec_weekly_days' );
10
+
11
+ // Selector for repeat monthly
12
+ element_selector( '.ai1ec_month_days_list > li', 'ai1ec_selected', 'ai1ec_monthday_value', '#ai1ec_monthly_days' );
13
+
14
+ // Selector for repeat yearly
15
+ element_selector( '.ai1ec_yearly_months_list > li', 'ai1ec_selected', 'ai1ec_yearmonth_value', '#ai1ec_yearly_months' );
16
+
17
+ var now = new Date( ai1ec_add_new_event.now * 1000 );
18
+
19
+ /**
20
+ * Timespan plugin setup
21
+ */
22
+
23
+ // Initialize timespan plugin on our date/time inputs.
24
+ var data = {
25
+ allday: '#ai1ec_all_day_event',
26
+ start_date_input: '#ai1ec_start-date-input',
27
+ start_time_input: '#ai1ec_start-time-input',
28
+ start_time: '#ai1ec_start-time',
29
+ end_date_input: '#ai1ec_end-date-input',
30
+ end_time_input: '#ai1ec_end-time-input',
31
+ end_time: '#ai1ec_end-time',
32
+ now: now
33
+ }
34
+ $.timespan( data );
35
+
36
+ // Initialize inputdate plugin on our "until" date input.
37
+ data = {
38
+ start_date_input: '#ai1ec_until-date-input',
39
+ start_time: '#ai1ec_until-time',
40
+ now: now
41
+ }
42
+ $.inputdate( data );
43
+
44
+ // Initialize count range slider
45
+ $( '#ai1ec_count' ).rangeinput( {
46
+ css: {
47
+ input: 'ai1ec-range',
48
+ slider: 'ai1ec-slider',
49
+ progress: 'ai1ec-progress',
50
+ handle: 'ai1ec-handle'
51
+ }
52
+ } );
53
+
54
+ /**
55
+ * Google map setup
56
+ */
57
+
58
+ // If the user is updating an event, initialize the map to the event
59
+ // location, otherwise if the user is creating a new event initialize
60
+ // the map to the whole world
61
+ var ai1ec_geocoder = new google.maps.Geocoder();
62
+ //world = map.setCenter(new GLatLng(9.965, -83.327), 1);
63
+ //africa = map.setCenter(new GLatLng(-3, 27), 3);
64
+ //europe = map.setCenter(new GLatLng(47, 19), 3);
65
+ //asia = map.setCenter(new GLatLng(32, 130), 3);
66
+ //south pacific = map.setCenter(new GLatLng(-24, 134), 3);
67
+ //north america = map.setCenter(new GLatLng(50, -114), 3);
68
+ //latin america = map.setCenter(new GLatLng(-20, -70), 3);
69
+ var ai1ec_default_location = new google.maps.LatLng( 9.965, -83.327 );
70
+ var ai1ec_myOptions = {
71
+ zoom: 0,
72
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
73
+ center: ai1ec_default_location
74
+ };
75
+ var ai1ec_map = new google.maps.Map( $( '#ai1ec_map_canvas' ).get(0), ai1ec_myOptions );
76
+ var ai1ec_marker = new google.maps.Marker({ map: ai1ec_map });
77
+
78
+ /**
79
+ * Given a location, update the address field with a reformatted version,
80
+ * update hidden location fields with address data, and center map on
81
+ * new location.
82
+ *
83
+ * @param object result single result of a Google geocode() call
84
+ */
85
+ function ai1ec_update_address( result )
86
+ {
87
+ ai1ec_map.setCenter( result.geometry.location );
88
+ ai1ec_map.setZoom( 15 );
89
+ ai1ec_marker.setPosition( result.geometry.location );
90
+ $( '#ai1ec_address' ).val( result.formatted_address );
91
+
92
+ var street_number = '';
93
+ var street_name = '';
94
+ var city = '';
95
+ var state = '';
96
+ var postal_code = 0;
97
+ var country = 0;
98
+ for( var i = 0; i < result.address_components.length; i++ ) {
99
+ switch( result.address_components[i].types[0] ) {
100
+ case 'street_number':
101
+ street_number = result.address_components[i].long_name;
102
+ break;
103
+ case 'route':
104
+ street_name = result.address_components[i].long_name;
105
+ break;
106
+ case 'locality':
107
+ city = result.address_components[i].long_name;
108
+ break;
109
+ case 'administrative_area_level_1':
110
+ province = result.address_components[i].long_name;
111
+ break;
112
+ case 'postal_code':
113
+ postal_code = result.address_components[i].long_name;
114
+ break;
115
+ case 'country':
116
+ country = result.address_components[i].long_name;
117
+ break;
118
+ }
119
+ }
120
+ // Combine street number with street address
121
+ var address = street_number.length > 0 ? street_number + ' ' : '';
122
+ address += street_name.length > 0 ? street_name : '';
123
+ // Clean up postal code if necessary
124
+ postal_code = postal_code != 0 ? postal_code : '';
125
+
126
+ $( '#ai1ec_city' ).val( city );
127
+ $( '#ai1ec_province' ).val( province );
128
+ $( '#ai1ec_postal_code' ).val( postal_code );
129
+ $( '#ai1ec_country' ).val( country );
130
+ }
131
+
132
+ $( '#ai1ec_address' )
133
+ /**
134
+ * Initialize geo_autocomplete plugin
135
+ */
136
+ .geo_autocomplete(
137
+ new google.maps.Geocoder,
138
+ {
139
+ selectFirst: false,
140
+ minChars: 3,
141
+ cacheLength: 50,
142
+ width: 300,
143
+ scroll: true,
144
+ scrollHeight: 330
145
+ }
146
+ ).result(
147
+ function( _event, _data ) {
148
+ if( _data ) {
149
+ ai1ec_update_address( _data );
150
+ }
151
+ }
152
+ )
153
+ /**
154
+ * Each time user changes address field, reformat field and update map
155
+ */
156
+ .change(
157
+ function() {
158
+ // Position map based on provided address value
159
+ if( $( this ).val().length > 0 ) {
160
+ var address = $( this ).val();
161
+
162
+ ai1ec_geocoder.geocode(
163
+ {
164
+ 'address': address
165
+ },
166
+ function( results, status ) {
167
+ if( status == google.maps.GeocoderStatus.OK ) {
168
+ ai1ec_update_address( results[0] );
169
+ }
170
+ }
171
+ );
172
+ }
173
+ }
174
+ )
175
+ // Now trigger the event on load to initialize map
176
+ .change();
177
+
178
+ // Toggle the visibility of google map on checkbox click
179
+ $( '#ai1ec_google_map' ).click( function() {
180
+ if( $( this ).is( ':checked' ) ) {
181
+ // show the map
182
+ $( '.ai1ec_box_map' )
183
+ .addClass( 'ai1ec_box_map_visible')
184
+ .hide()
185
+ .slideDown( 'fast' );
186
+ } else {
187
+ // hide the map
188
+ $( '.ai1ec_box_map' ).slideUp( 'fast' );
189
+ }
190
+ });
191
+
192
+ // ===========================
193
+ // = Repeat dropdown clicked =
194
+ // ===========================
195
+ $( '#ai1ec_repeat' ).change( function() {
196
+ // hide all helper elements
197
+
198
+ var selected = $( '#ai1ec_repeat option:selected' ).val();
199
+ switch( selected ) {
200
+ // =============================
201
+ // = None selected, hide repeating fields =
202
+ // =============================
203
+ case ' ':
204
+ hide_all_repeat_fields();
205
+ break;
206
+
207
+ // =====================
208
+ // = Repeating event, show repeating fields =
209
+ // =====================
210
+ default:
211
+ show_all_repeat_fields();
212
+ break;
213
+ }
214
+ });
215
+ // ========================
216
+ // = End dropdown clicked =
217
+ // ========================
218
+ $( '#ai1ec_end' ).change( show_end_fields );
219
+
220
+ /**
221
+ * Show/hide elements that show selectors for repeating events
222
+ */
223
+ function show_all_repeat_fields() {
224
+ $( '#ai1ec_end_holder' ).fadeIn();
225
+ show_end_fields();
226
+ }
227
+ function hide_all_repeat_fields() {
228
+ hide_all_end_fields();
229
+ $( '#ai1ec_end_holder' ).fadeOut();
230
+ }
231
+ /**
232
+ * Show/hide elements that show selectors for ending until/after events
233
+ */
234
+ function show_end_fields() {
235
+ var selected = $( '#ai1ec_end option:selected' ).val();
236
+ switch( selected ) {
237
+ // Never selected, hide end fields
238
+ case '0':
239
+ hide_all_end_fields();
240
+ break;
241
+ // After selected
242
+ case '1':
243
+ if( $( '#ai1ec_count_holder' ).css( 'display' ) == 'none' ) {
244
+ hide_all_end_fields();
245
+ $( '#ai1ec_count_holder' ).fadeIn();
246
+ }
247
+ break;
248
+ // On date selected
249
+ case '2':
250
+ if( $( '#ai1ec_until_holder' ).css( 'display' ) == 'none' ) {
251
+ hide_all_end_fields();
252
+ $( '#ai1ec_until_holder' ).fadeIn();
253
+ }
254
+ break;
255
+ }
256
+ }
257
+ function hide_all_end_fields() {
258
+ $( '#ai1ec_count_holder, #ai1ec_until_holder' ).hide();
259
+ }
260
+ /**
261
+ * Bottom publish button click event handler
262
+ */
263
+ if( $( '#ai1ec_bottom_publish' ).length > 0 ) {
264
+ $( '#ai1ec_bottom_publish' ).click( function() {
265
+ $( '#publish' ).trigger( 'click' );
266
+ });
267
+ }
268
+ }
269
+
270
+ /**
271
+ * ICS feeds
272
+ */
273
+
274
+ if( $( '#ai1ec_add_new_ics' ).length )
275
+ {
276
+ /**
277
+ * Click event handler for + Add new subscription button
278
+ * checks to see if the feed url is valid url
279
+ * and makes an ajax call with the feed details
280
+ */
281
+ $( '#ai1ec_add_new_ics' ).click( function() {
282
+ var $button = $( this );
283
+ var $url = $( '#ai1ec_feed_url' );
284
+ if( ! isUrl( $url.val() ) ) {
285
+ // color the feed url input field in red
286
+ $url.css( 'border-color', '#FF0000' ).focus();
287
+ } else {
288
+ // disable the add button for now
289
+ $button.attr( 'disabled', true );
290
+ // restore feed url color if it has been changed
291
+ $url.css( 'border-color', '#DFDFDF' );
292
+ // create the data to send
293
+ var data = {
294
+ action: 'ai1ec_add_ics',
295
+ feed_url: $url.val(),
296
+ feed_category: $( '#ai1ec_feed_category option:selected' ).val(),
297
+ feed_tags: $( '#ai1ec_feed_tags' ).val()
298
+ };
299
+ // make an ajax call to save the new feed
300
+ $.getJSON( ajaxurl, data,
301
+ function( response ) {
302
+ // restore add button
303
+ $button.removeAttr( 'disabled' );
304
+ if( response.error ) {
305
+ // tell the user there is an error
306
+ // TODO: Use other method of notification
307
+ alert( response.message );
308
+ } else {
309
+ $url.val( '' );
310
+ // Add the feed to the settings screen
311
+ $( '#ai1ec-feeds-after' ).after( response.message );
312
+ }
313
+ }
314
+ );
315
+ }
316
+
317
+ });
318
+
319
+ /**
320
+ * Click event handler for X Delete button
321
+ * that deletes the feed by sending the feed_id via ajax
322
+ */
323
+ $( '.ai1ec_delete_ics' ).live( 'click', function() {
324
+ // store clicked button for later use
325
+ var $button = $( this );
326
+ // disable the delete button
327
+ $button.attr( 'disabled', true );
328
+ // table row to delete
329
+ var $feed_row = $button.closest( '.ai1ec-feed-container' );
330
+ // get the selected feed id
331
+ var ics_id = $button.siblings( '.ai1ec_feed_id' ).val();
332
+ // create the data to send
333
+ var data = {
334
+ action: 'ai1ec_delete_ics',
335
+ ics_id: ics_id
336
+ };
337
+ // remove the feed from the database
338
+ $.getJSON( ajaxurl, data,
339
+ function( response ) {
340
+ // restore the delete button
341
+ $button.removeAttr( 'disabled' );
342
+ if( response.error ) {
343
+ // tell the user there is an error
344
+ alert( response.message );
345
+ } else {
346
+ // remove the feed from the settings screen
347
+ $feed_row.remove();
348
+ }
349
+ }
350
+ );
351
+ });
352
+
353
+ /**
354
+ * Click event handler for Flush events button
355
+ * that deletes all event posts that came from that feed by sending the feed_id via ajax
356
+ */
357
+ $( '.ai1ec_flush_ics' ).live( 'click', function() {
358
+ // store clicked button for later use
359
+ var $button = $( this );
360
+ // disable the flush button
361
+ $button.attr( 'disabled', true );
362
+ // get the selected feed id
363
+ var ics_id = $button.siblings( '.ai1ec_feed_id' ).val();
364
+ $button.siblings( '.ajax-loading' ).css( 'visibility', 'visible' );
365
+ // create the data to send
366
+ var data = {
367
+ action: 'ai1ec_flush_ics',
368
+ ics_id: ics_id
369
+ };
370
+ // remove the feed from the database
371
+ $.getJSON( ajaxurl, data,
372
+ function( response ) {
373
+ if( response.error ) {
374
+ // tell the user there is an error
375
+ alert( response.message );
376
+ } else {
377
+ $button.fadeOut();
378
+ }
379
+ $button.siblings( '.ajax-loading' ).css( 'visibility', 'hidden' );
380
+ }
381
+ );
382
+ });
383
+
384
+ /**
385
+ * Click event handler for Update events button
386
+ * that imports events from that feed by sending the feed_id via ajax
387
+ */
388
+ $( '.ai1ec_update_ics' ).live( 'click', function() {
389
+ // store clicked button for later use
390
+ var $button = $( this );
391
+ // disable the update button
392
+ $button.attr( 'disabled', true );
393
+ // get the selected feed id
394
+ var ics_id = $button.siblings( '.ai1ec_feed_id' ).val();
395
+ $button.siblings( '.ajax-loading' ).css( 'visibility', 'visible' );
396
+ // create the data to send
397
+ var data = {
398
+ action: 'ai1ec_update_ics',
399
+ ics_id: ics_id
400
+ };
401
+ // remove the feed from the database
402
+ $.getJSON( ajaxurl, data,
403
+ function( response ) {
404
+ if( response.error ) {
405
+ // tell the user there is an error
406
+ alert( response.message );
407
+ } else {
408
+ $button.siblings( '.ai1ec_flush_ics' ).remove();
409
+ // If events were imported, create new flush button
410
+ if( response.count )
411
+ $button.after(
412
+ '<input type="button" class="button ai1ec_flush_ics" value="' +
413
+ response.flush_label + '" />' );
414
+ }
415
+ $button
416
+ .attr( 'disabled', false )
417
+ .siblings( '.ajax-loading' ).css( 'visibility', 'hidden' );
418
+ }
419
+ );
420
+ });
421
+
422
+ /**
423
+ * isUrl checks to see if the passed parameter is a valid url
424
+ * and returns true on access and false on failure
425
+ *
426
+ * @param String s String to validate
427
+ *
428
+ * @return boolean True if the string is a valid url, false otherwise
429
+ */
430
+ function isUrl( s ) {
431
+ var regexp = /(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/
432
+ return regexp.test(s);
433
+ };
434
+ }
435
+ });
js/calendar.js CHANGED
@@ -1 +1,433 @@
1
- jQuery(document).ready(function(i){if(ai1ec_calendar.selector!=undefined&&ai1ec_calendar.selector!=""&&i(ai1ec_calendar.selector).length==1){var n=i(":header:contains("+ai1ec_calendar.title+"):first");if(!n.length){n=i('<h1 class="page-title"></h1>');n.text(ai1ec_calendar.title)}var c=i("#ai1ec-container").detach().before(n);i(ai1ec_calendar.selector).empty().append(c).hide().css("visibility","visible").fadeIn("fast")}var h="";var l;var f=i("body").attr("class");if(f==undefined){f=""}if(f.match(/\s?\bai1ec-[\w-]+\b/)==null){f+=" "+ai1ec_calendar.body_class;i("body").attr("class",f)}function d(){var q=document.location.hash;var p=convertEntities(ai1ec_calendar.default_hash);if(h!=q&&(q!=""||h!=p)){var r=q;if(!r){r=p}j(r)}}setInterval(d,300);function j(p){i("#ai1ec-calendar-view-loading").fadeTo("fast",0.7,function(){var q=p.substring(1);i.getJSON(ai1ec_calendar.ajaxurl,q,function(t){var s=i("body").attr("class");s=s.replace(/\s?\bai1ec-[\w-]+\b/g,"");s+=" "+t.body_class;i("body").attr("class",s);var u=i("#ai1ec-calendar-view-container");u.height(u.height());var r=i("#ai1ec-calendar-view").html(t.html).height();u.animate({height:r},{complete:function(){u.height("auto")}});i("#ai1ec-calendar-view-loading").fadeOut("fast");o()})});h=p}i("a.ai1ec-load-view").live("click",function(){j(i(this).attr("href"))});function b(){var r=i(this).prev();if(!r.data("ai1ec_offset")){r.css("visibility","hidden").show();var q=i("#ai1ec-calendar-view-container");var u=r.width();var t=r.offset();var s=q.offset();var p=s.left+q.width();if(t.left+u>p){r.offset({left:p-u,top:t.top})}if(i(".ai1ec-event-summary",r).offset().left<s.left){r.addClass("ai1ec-shifted-right")}r.hide().css("visibility","visible");r.data("ai1ec_offset",true)}r.fadeIn(100,function(){if(!i(this).data("ai1ec_mouseinside")){i(this).each(e)}})}function e(){i(this).fadeOut(100,function(){i(this).parent().css({zIndex:"auto"})}).data("ai1ec_mouseinside",false)}i(".ai1ec-month-view .ai1ec-event").live("mouseenter",b);i(".ai1ec-month-view .ai1ec-event-popup").live("mouseleave",e).live("mousemove",function(){i(this).data("ai1ec_mouseinside",true)});if(i(".ai1ec-month-view").length){i(window).blur(function(){i(".ai1ec-event-popup:visible").each(e)})}function m(){i(this).hide().parent().addClass("ai1ec-expanded").end().prev().show().find(".ai1ec-event-description").hide().slideDown("fast")}function g(){i(this).next().slideUp("fast",function(){i(this).parent().parent().removeClass("ai1ec-expanded").end().hide().next().show()})}i(".ai1ec-agenda-view .ai1ec-event > .ai1ec-event-click").live("click",m);i(".ai1ec-agenda-view .ai1ec-event-summary > .ai1ec-event-click").live("click",g);i(".ai1ec-action-agenda #ai1ec-expand-all").live("click",function(){i(".ai1ec-event > .ai1ec-event-click:visible").click()});i(".ai1ec-action-agenda #ai1ec-collapse-all").live("click",function(){i(".ai1ec-event-summary > .ai1ec-event-click:visible").click()});element_selector(".ai1ec-category-filter-selector li","ai1ec-selected","ai1ec-categories","#ai1ec-selected-categories");element_selector(".ai1ec-tag-filter-selector li","ai1ec-selected","ai1ec-tags","#ai1ec-selected-tags");i(".ai1ec-dropdown").click(function(){i(".ai1ec-filter-selector").css("zIndex",10);var p=i(this).siblings(".ai1ec-filter-selector").css("zIndex",11);if(i(this).hasClass("ai1ec-active")){i(this).removeClass("ai1ec-active");p.slideUp(150)}else{i(this).addClass("ai1ec-active");p.slideDown(150)}});function k(){var s=new Array();selected_cats=i(".ai1ec-filters-container .ai1ec-dropdown.ai1ec-selected + #ai1ec-selected-categories").val();if(selected_cats){s.push(selected_cats);selected_cats="&ai1ec_cat_ids="+selected_cats}else{selected_cats=""}selected_tags=i(".ai1ec-filters-container .ai1ec-dropdown.ai1ec-selected + #ai1ec-selected-tags").val();if(selected_tags){s.push(selected_tags);selected_tags="&ai1ec_tag_ids="+selected_tags}else{selected_tags=""}s=s.join();var p;if(s.length){p=convertEntities(ai1ec_calendar.export_url)+selected_cats+selected_tags;i(".ai1ec-subscribe-filtered").fadeIn("fast")}else{p=convertEntities(ai1ec_calendar.export_url);i(".ai1ec-subscribe-filtered").fadeOut("fast")}i(".ai1ec-subscribe").attr("href",p);i(".ai1ec-subscribe-google").attr("href","http://www.google.com/calendar/render?cid="+escape(p.replace("webcal://","http://")));var r={action:"ai1ec_term_filter",ai1ec_post_ids:l,ai1ec_term_ids:s};var q=i("#ai1ec-calendar-view-loading").delay(500).fadeTo("fast",0.7);i.getJSON(ai1ec_calendar.ajaxurl,r,function(u){q.clearQueue().fadeOut("fast");var t=new Array();i.each(u.matching_ids,function(v,w){t.push(".ai1ec-event-id-"+w)});i(t.join()).fadeIn("fast");t=new Array();i.each(u.unmatching_ids,function(v,w){t.push(".ai1ec-event-id-"+w)});i(t.join()).fadeOut("fast")})}function a(){i(".ai1ec-filter-selector-container").each(function(){if(i("li.ai1ec-selected",this).length){i(".ai1ec-dropdown",this).addClass("ai1ec-selected")}else{i(".ai1ec-dropdown",this).removeClass("ai1ec-selected")}});if(i(".ai1ec-filters-container .ai1ec-selected").length){i(".ai1ec-clear-filters").fadeIn("fast")}else{i(".ai1ec-clear-filters").fadeOut("fast")}k()}i(".ai1ec-filter-selector li").click(a);i(".ai1ec-clear-filters").click(function(){i(".ai1ec-filter-selector-container li").removeClass("ai1ec-selected");a()});function o(){l=new Array();i(".ai1ec-post-id").each(function(){l.push(this.value)});l=l.join();if(i(".ai1ec-active-event:first").length){i(".ai1ec-month-view .ai1ec-active-event:first").each(function(){i(this).each(b).prev().data("ai1ec_mouseinside",true)});i(".ai1ec-agenda-view .ai1ec-active-event:first > .ai1ec-event-click").each(m);i.scrollTo(".ai1ec-active-event:first",1000,{offset:{left:0,top:-window.innerHeight/2+100}})}if(i(".ai1ec-dropdown.ai1ec-selected").length){i(".ai1ec-month-view .ai1ec-event-container, .ai1ec-agenda-view .ai1ec-event").hide();k()}}if(i("#ai1ec-selected-categories").val()!=""||i("#ai1ec-selected-tags").val()!=""){a()}o()});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery( document ).ready( function( $ ) {
2
+
3
+ // =====================================
4
+ // = Calendar CSS selector replacement =
5
+ // =====================================
6
+
7
+ if( ai1ec_calendar.selector != undefined && ai1ec_calendar.selector != '' &&
8
+ $( ai1ec_calendar.selector ).length == 1 )
9
+ {
10
+ // Try to find an <h#> element containing the title
11
+ var $title = $( ":header:contains(" + ai1ec_calendar.title + "):first" );
12
+ // If none found, create one
13
+ if( ! $title.length ) {
14
+ $title = $( '<h1 class="page-title"></h1>' );
15
+ $title.text( ai1ec_calendar.title ); // Do it this way to automatically generate HTML entities
16
+ }
17
+
18
+ var $calendar = $( '#ai1ec-container' )
19
+ .detach()
20
+ .before( $title );
21
+
22
+ $( ai1ec_calendar.selector )
23
+ .empty()
24
+ .append( $calendar )
25
+ .hide()
26
+ .css( 'visibility', 'visible' )
27
+ .fadeIn( 'fast' );
28
+ }
29
+
30
+ // =================================
31
+ // = General script initialization =
32
+ // =================================
33
+
34
+ // Variable storing currently displayed view
35
+ var current_hash = '';
36
+ // An array caching the IDs of all event posts in the currently active view
37
+ var post_ids;
38
+
39
+ // Check whether appropriate classes have been added to <body> (some themes
40
+ // don't respect the WP body_class() function). If not, add them, or our app
41
+ // won't function properly.
42
+ var classes = $('body').attr( 'class' );
43
+ if( classes == undefined ) classes = '';
44
+ if( classes.match( /\s?\bai1ec-[\w-]+\b/ ) == null ) {
45
+ // Add action body class(es)
46
+ classes += ' ' + ai1ec_calendar.body_class;
47
+ $('body').attr( 'class', classes );
48
+ }
49
+
50
+ /**
51
+ * Function used to update view if user has clicked back/forward in the
52
+ * browser.
53
+ */
54
+ function check_hash() {
55
+ var live_hash = document.location.hash;
56
+ var default_hash = convertEntities( ai1ec_calendar.default_hash );
57
+ // If current_hash doesn't match live hash, and the document's live hash
58
+ // isn't empty, or if it is, the current_hash isn't equivalent to empty
59
+ // (i.e., default hash), the page needs to be updated.
60
+ if( current_hash != live_hash &&
61
+ ( live_hash != '' || current_hash != default_hash ) ) {
62
+ // If hash is empty, resort to original requested action
63
+ var hash = live_hash;
64
+ if( ! hash )
65
+ hash = default_hash;
66
+ load_view( hash );
67
+ }
68
+ }
69
+
70
+ // Monitor browser navigation between different URL #hash values
71
+ setInterval( check_hash, 300 );
72
+
73
+ /**
74
+ * Load a calendar view represented by the given hash value.
75
+ */
76
+ function load_view( hash ) {
77
+
78
+ // Display loader
79
+ $('#ai1ec-calendar-view-loading').fadeTo( 'fast', 0.7,
80
+ // After loader is visible, fetch new content
81
+ function() {
82
+ var query = hash.substring( 1 );
83
+
84
+ // Fetch AJAX result
85
+ $.getJSON( ai1ec_calendar.ajaxurl, query, function( data )
86
+ {
87
+ // Replace action body class with new one
88
+ var classes = $('body').attr( 'class' );
89
+ classes = classes.replace( /\s?\bai1ec-[\w-]+\b/g, '' );
90
+ classes += ' ' + data.body_class;
91
+ $('body').attr( 'class', classes );
92
+
93
+ // Animate vertical height of container between HTML replacement
94
+ var $container = $('#ai1ec-calendar-view-container');
95
+ $container.height( $container.height() );
96
+ var new_height =
97
+ $('#ai1ec-calendar-view')
98
+ .html( data.html )
99
+ .height();
100
+ $container.animate( { height: new_height }, { complete: function() {
101
+ // Restore height to automatic upon animation completion for
102
+ // proper page layout.
103
+ $container.height( 'auto' );
104
+ } } );
105
+
106
+ // Hide loader
107
+ $('#ai1ec-calendar-view-loading').fadeOut( 'fast' );
108
+
109
+ // Do any general view initialization after loading
110
+ initialize_view();
111
+ }
112
+ );
113
+ } );
114
+
115
+ // Update stored hash
116
+ current_hash = hash;
117
+ }
118
+
119
+ // Register navigation click handlers
120
+ $('a.ai1ec-load-view').live( 'click', function() {
121
+ // Load requested view
122
+ load_view( $(this).attr( 'href' ) );
123
+ } );
124
+
125
+ // *** Month view ***
126
+
127
+ /**
128
+ * Callback for mouseenter event on .ai1ec-event element
129
+ */
130
+ function show_popup() {
131
+ var $popup = $(this).prev();
132
+
133
+ // If not already done, position popup so that it does not exceed
134
+ // right/left bounds of container.
135
+ if( ! $popup.data( 'ai1ec_offset' ) ) {
136
+ // Keep popup hidden but positionable
137
+ $popup.css( 'visibility', 'hidden' ).show();
138
+
139
+ var $container = $('#ai1ec-calendar-view-container');
140
+ var popup_width = $popup.width();
141
+ var popup_offset = $popup.offset();
142
+ var container_offset = $container.offset();
143
+ var container_x2 = container_offset.left + $container.width();
144
+
145
+ // Respect right-side bounds
146
+ if( popup_offset.left + popup_width > container_x2 )
147
+ $popup.offset( { left: container_x2 - popup_width, top: popup_offset.top } );
148
+ // Respect leflt-side bounds
149
+ if( $( '.ai1ec-event-summary', $popup ).offset().left < container_offset.left )
150
+ $popup.addClass( 'ai1ec-shifted-right' );
151
+
152
+ // Restore popup to 'display: none'
153
+ $popup.hide().css( 'visibility', 'visible' );
154
+ // Flag the object so we don't calculate twice.
155
+ $popup.data( 'ai1ec_offset', true );
156
+ }
157
+
158
+ // Display popup
159
+ $popup
160
+ .fadeIn( 100, function() {
161
+ // Special case - check if the mouse cursor is still in the pop-up.
162
+ if( ! $(this).data( 'ai1ec_mouseinside' ) )
163
+ $(this).each( hide_popup );
164
+ } );
165
+ }
166
+ function hide_popup() {
167
+ $(this)
168
+ .fadeOut( 100, function() { $(this).parent().css( { zIndex: 'auto' } ); } )
169
+ .data( 'ai1ec_mouseinside', false );
170
+ }
171
+
172
+ // Register popup hover handlers for month view
173
+ $('.ai1ec-month-view .ai1ec-event')
174
+ .live( 'mouseenter', show_popup );
175
+ $('.ai1ec-month-view .ai1ec-event-popup')
176
+ .live( 'mouseleave', hide_popup )
177
+ .live( 'mousemove', function() {
178
+ // Track whether popup contains mouse cursor
179
+ $(this).data( 'ai1ec_mouseinside', true );
180
+ } );
181
+ // Hide any popups that were visible when the window lost focus
182
+ if( $('.ai1ec-month-view').length ) {
183
+ $(window).blur( function() {
184
+ $('.ai1ec-event-popup:visible').each( hide_popup );
185
+ } );
186
+ }
187
+
188
+ // *** Agenda view ***
189
+
190
+ /**
191
+ * Callbacks for event expansion, collapse.
192
+ */
193
+ function expand_event() {
194
+ $( this ) // ...-click block
195
+ .hide()
196
+ .parent() // event block
197
+ .addClass( 'ai1ec-expanded' )
198
+ .end()
199
+ .prev() // summary block
200
+ .show()
201
+ .find( '.ai1ec-event-description' ) // description block
202
+ .hide()
203
+ .slideDown( 'fast' );
204
+ }
205
+ function collapse_event() {
206
+ $(this) // inner ...-click block
207
+ .next() // description block
208
+ .slideUp( 'fast', function() {
209
+ $(this).parent() // summary block
210
+ .parent() // event block
211
+ .removeClass( 'ai1ec-expanded' )
212
+ .end()
213
+ .hide() // summary block again
214
+ .next() // original ...-click block
215
+ .show();
216
+ }
217
+ );
218
+ }
219
+
220
+ // Register click handlers for event title
221
+ $('.ai1ec-agenda-view .ai1ec-event > .ai1ec-event-click')
222
+ .live( 'click', expand_event );
223
+ $('.ai1ec-agenda-view .ai1ec-event-summary > .ai1ec-event-click')
224
+ .live( 'click', collapse_event );
225
+
226
+ // Register click handlers for expand/collapse all buttons
227
+ $('.ai1ec-action-agenda #ai1ec-expand-all').live( 'click', function() {
228
+ $('.ai1ec-event > .ai1ec-event-click:visible').click();
229
+ } );
230
+ $('.ai1ec-action-agenda #ai1ec-collapse-all').live( 'click', function() {
231
+ $('.ai1ec-event-summary > .ai1ec-event-click:visible').click();
232
+ } );
233
+
234
+ // *** All views ***
235
+
236
+ /**
237
+ * Category/tag filters
238
+ */
239
+
240
+ element_selector(
241
+ '.ai1ec-category-filter-selector li',
242
+ 'ai1ec-selected',
243
+ 'ai1ec-categories',
244
+ '#ai1ec-selected-categories' );
245
+ element_selector(
246
+ '.ai1ec-tag-filter-selector li',
247
+ 'ai1ec-selected',
248
+ 'ai1ec-tags',
249
+ '#ai1ec-selected-tags' );
250
+
251
+ // Category/tag drop-down click actions
252
+ $('.ai1ec-dropdown').click( function()
253
+ {
254
+ // Bring this selector to the front
255
+ $('.ai1ec-filter-selector').css( 'zIndex', 10 );
256
+ var $this_selector =
257
+ $(this).siblings( '.ai1ec-filter-selector' )
258
+ .css( 'zIndex', 11 );
259
+
260
+ // Slide it down or up
261
+ if( $(this).hasClass( 'ai1ec-active' ) ) {
262
+ $(this).removeClass( 'ai1ec-active' );
263
+ $this_selector.slideUp( 150 );
264
+ } else {
265
+ $(this).addClass( 'ai1ec-active' );
266
+ $this_selector.slideDown( 150 );
267
+ }
268
+ }
269
+ );
270
+
271
+ // Category/tag filtering actions
272
+
273
+ /**
274
+ * Applies the active category/tag filters to the current view.
275
+ * (Shows/hides events as necessary.)
276
+ */
277
+ function apply_filters()
278
+ {
279
+ // Submit the selected term IDs via AJAX and filter the visible list of
280
+ // post IDs. Only include filter selectors that have a selection.
281
+ var selected_ids = new Array();
282
+
283
+ selected_cats =
284
+ $('.ai1ec-filters-container .ai1ec-dropdown.ai1ec-selected + #ai1ec-selected-categories').val();
285
+ if( selected_cats ) {
286
+ selected_ids.push( selected_cats );
287
+ selected_cats = '&ai1ec_cat_ids=' + selected_cats;
288
+ } else {
289
+ selected_cats = '';
290
+ }
291
+
292
+ selected_tags =
293
+ $('.ai1ec-filters-container .ai1ec-dropdown.ai1ec-selected + #ai1ec-selected-tags').val();
294
+ if( selected_tags ) {
295
+ selected_ids.push( selected_tags );
296
+ selected_tags = '&ai1ec_tag_ids=' + selected_tags;
297
+ } else {
298
+ selected_tags = '';
299
+ }
300
+
301
+ selected_ids = selected_ids.join();
302
+
303
+ // Modify export URL
304
+ var export_url;
305
+ if( selected_ids.length ) {
306
+ export_url = convertEntities( ai1ec_calendar.export_url ) + selected_cats + selected_tags;
307
+ $( '.ai1ec-subscribe-filtered' ).fadeIn( 'fast' );
308
+ } else {
309
+ export_url = convertEntities( ai1ec_calendar.export_url );
310
+ $( '.ai1ec-subscribe-filtered' ).fadeOut( 'fast' );
311
+ }
312
+ $( '.ai1ec-subscribe' ).attr( 'href', export_url );
313
+ $( '.ai1ec-subscribe-google' ).attr( 'href',
314
+ 'http://www.google.com/calendar/render?cid=' + escape( export_url.replace( 'webcal://', 'http://' ) ) );
315
+
316
+ var query = {
317
+ 'action': 'ai1ec_term_filter',
318
+ 'ai1ec_post_ids': post_ids,
319
+ 'ai1ec_term_ids': selected_ids
320
+ };
321
+
322
+ // Delay loading animation so that it doesn't appear if the AJAX turnover
323
+ // is quick enough
324
+ var $loading = $('#ai1ec-calendar-view-loading')
325
+ .delay( 500 )
326
+ .fadeTo( 'fast', 0.7 );
327
+
328
+ $.getJSON( ai1ec_calendar.ajaxurl, query, function( data )
329
+ {
330
+ // Cancel loading animation or fade out if faded in.
331
+ $loading.clearQueue().fadeOut( 'fast' );
332
+
333
+ // Fade in events that should be displayed (or leave them visible)
334
+ var jq_selector = new Array(); // Build our jQuery selector string
335
+ $.each( data.matching_ids, function( i, val ) {
336
+ jq_selector.push( '.ai1ec-event-id-' + val );
337
+ } );
338
+ $( jq_selector.join() ).fadeIn( 'fast' );
339
+
340
+ // Fade out events that should be hidden (or leave them hidden)
341
+ jq_selector = new Array();
342
+ $.each( data.unmatching_ids, function( i, val ) {
343
+ jq_selector.push( '.ai1ec-event-id-' + val );
344
+ } );
345
+ $( jq_selector.join() ).fadeOut( 'fast' );
346
+ }
347
+ );
348
+ }
349
+
350
+ /**
351
+ * Updates the filter dropdowns and clear button based on whether filters
352
+ * are selected.
353
+ */
354
+ function update_filter_selectors() {
355
+ // Highlight this dropdown as "selected" if and only if any of its terms
356
+ // have been selected.
357
+ $( '.ai1ec-filter-selector-container' ).each( function() {
358
+ if( $( 'li.ai1ec-selected', this ).length ) {
359
+ $( '.ai1ec-dropdown', this ).addClass( 'ai1ec-selected' );
360
+ } else {
361
+ $( '.ai1ec-dropdown', this ).removeClass( 'ai1ec-selected' );
362
+ }
363
+ } );
364
+
365
+ if( $('.ai1ec-filters-container .ai1ec-selected').length )
366
+ $('.ai1ec-clear-filters').fadeIn( 'fast' );
367
+ else
368
+ $('.ai1ec-clear-filters').fadeOut( 'fast' );
369
+
370
+ apply_filters();
371
+ }
372
+
373
+ $('.ai1ec-filter-selector li').click( update_filter_selectors );
374
+
375
+ $('.ai1ec-clear-filters').click( function() {
376
+ $('.ai1ec-filter-selector-container li').removeClass( 'ai1ec-selected' );
377
+ update_filter_selectors();
378
+ } );
379
+
380
+ /**
381
+ * function initialize_view
382
+ *
383
+ * General initialization function to execute whenever any view is loaded
384
+ * (this is also called at the end of load_view()).
385
+ */
386
+ function initialize_view()
387
+ {
388
+ // Cache the current list of post IDs
389
+ post_ids = new Array();
390
+ $( '.ai1ec-post-id' ).each( function() {
391
+ post_ids.push( this.value );
392
+ } );
393
+ post_ids = post_ids.join(); // Store IDs as comma-separated values
394
+
395
+ // ===========================
396
+ // = Pop up the active event =
397
+ // ===========================
398
+ if( $( '.ai1ec-active-event:first' ).length ) {
399
+ // Pop up any active event in month view
400
+ $( '.ai1ec-month-view .ai1ec-active-event:first' ).each( function() {
401
+ $(this)
402
+ .each( show_popup )
403
+ .prev() // .ai1ec-popup
404
+ .data( 'ai1ec_mouseinside', true ); // To keep pop-up from vanishing
405
+ } );
406
+ // Expand any active event in agenda view
407
+ $( '.ai1ec-agenda-view .ai1ec-active-event:first > .ai1ec-event-click' ).each( expand_event );
408
+ // Bring the active event into focus
409
+ $.scrollTo( '.ai1ec-active-event:first', 1000,
410
+ {
411
+ offset: {
412
+ left: 0,
413
+ top: -window.innerHeight / 2 + 100
414
+ }
415
+ }
416
+ );
417
+ }
418
+
419
+ // Apply category/tag filters if any; hide all events by default, then fade
420
+ // in filtered ones.
421
+ if( $('.ai1ec-dropdown.ai1ec-selected').length ) {
422
+ $('.ai1ec-month-view .ai1ec-event-container, .ai1ec-agenda-view .ai1ec-event').hide();
423
+ apply_filters();
424
+ }
425
+ }
426
+
427
+ // If there are preselected tag/cat IDs, update the filter UI
428
+ if( $('#ai1ec-selected-categories').val() != '' ||
429
+ $('#ai1ec-selected-tags').val() != '' )
430
+ update_filter_selectors();
431
+ initialize_view();
432
+
433
+ } );
js/colorpicker.js CHANGED
@@ -1 +1,586 @@
1
- (function(b){var a=function(){var S={},c,N=65,t,P='<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',B={eventName:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},color:"ff0000",livePreview:true,flat:false},J=function(T,V){var U=j(T);b(V).data("colorpicker").fields.eq(1).val(U.r).end().eq(2).val(U.g).end().eq(3).val(U.b).end()},u=function(T,U){b(U).data("colorpicker").fields.eq(4).val(T.h).end().eq(5).val(T.s).end().eq(6).val(T.b).end()},g=function(T,U){b(U).data("colorpicker").fields.eq(0).val(R(T)).end()},l=function(T,U){b(U).data("colorpicker").selector.css("backgroundColor","#"+R({h:T.h,s:100,b:100}));b(U).data("colorpicker").selectorIndic.css({left:parseInt(150*T.s/100,10),top:parseInt(150*(100-T.b)/100,10)})},G=function(T,U){b(U).data("colorpicker").hue.css("top",parseInt(150-150*T.h/360,10))},h=function(T,U){b(U).data("colorpicker").currentColor.css("backgroundColor","#"+R(T))},E=function(T,U){b(U).data("colorpicker").newColor.css("backgroundColor","#"+R(T))},n=function(T){var V=T.charCode||T.keyCode||-1;if((V>N&&V<=90)||V==32){return false}var U=b(this).parent().parent();if(U.data("colorpicker").livePreview===true){e.apply(this)}},e=function(U){var V=b(this).parent().parent(),T;if(this.parentNode.className.indexOf("_hex")>0){V.data("colorpicker").color=T=m(y(this.value))}else{if(this.parentNode.className.indexOf("_hsb")>0){V.data("colorpicker").color=T=f({h:parseInt(V.data("colorpicker").fields.eq(4).val(),10),s:parseInt(V.data("colorpicker").fields.eq(5).val(),10),b:parseInt(V.data("colorpicker").fields.eq(6).val(),10)})}else{V.data("colorpicker").color=T=i(M({r:parseInt(V.data("colorpicker").fields.eq(1).val(),10),g:parseInt(V.data("colorpicker").fields.eq(2).val(),10),b:parseInt(V.data("colorpicker").fields.eq(3).val(),10)}))}}if(U){J(T,V.get(0));g(T,V.get(0));u(T,V.get(0))}l(T,V.get(0));G(T,V.get(0));E(T,V.get(0));V.data("colorpicker").onChange.apply(V,[T,R(T),j(T)])},o=function(T){var U=b(this).parent().parent();U.data("colorpicker").fields.parent().removeClass("colorpicker_focus")},K=function(){N=this.parentNode.className.indexOf("_hex")>0?70:65;b(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus");b(this).parent().addClass("colorpicker_focus")},I=function(T){var V=b(this).parent().find("input").focus();var U={el:b(this).parent().addClass("colorpicker_slider"),max:this.parentNode.className.indexOf("_hsb_h")>0?360:(this.parentNode.className.indexOf("_hsb")>0?100:255),y:T.pageY,field:V,val:parseInt(V.val(),10),preview:b(this).parent().parent().data("colorpicker").livePreview};b(document).bind("mouseup",U,s);b(document).bind("mousemove",U,L)},L=function(T){T.data.field.val(Math.max(0,Math.min(T.data.max,parseInt(T.data.val+T.pageY-T.data.y,10))));if(T.data.preview){e.apply(T.data.field.get(0),[true])}return false},s=function(T){e.apply(T.data.field.get(0),[true]);T.data.el.removeClass("colorpicker_slider").find("input").focus();b(document).unbind("mouseup",s);b(document).unbind("mousemove",L);return false},w=function(T){var U={cal:b(this).parent(),y:b(this).offset().top};U.preview=U.cal.data("colorpicker").livePreview;b(document).bind("mouseup",U,r);b(document).bind("mousemove",U,k)},k=function(T){e.apply(T.data.cal.data("colorpicker").fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,(T.pageY-T.data.y))))/150,10)).get(0),[T.data.preview]);return false},r=function(T){J(T.data.cal.data("colorpicker").color,T.data.cal.get(0));g(T.data.cal.data("colorpicker").color,T.data.cal.get(0));b(document).unbind("mouseup",r);b(document).unbind("mousemove",k);return false},x=function(T){var U={cal:b(this).parent(),pos:b(this).offset()};U.preview=U.cal.data("colorpicker").livePreview;b(document).bind("mouseup",U,A);b(document).bind("mousemove",U,q)},q=function(T){e.apply(T.data.cal.data("colorpicker").fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,(T.pageY-T.data.pos.top))))/150,10)).end().eq(5).val(parseInt(100*(Math.max(0,Math.min(150,(T.pageX-T.data.pos.left))))/150,10)).get(0),[T.data.preview]);return false},A=function(T){J(T.data.cal.data("colorpicker").color,T.data.cal.get(0));g(T.data.cal.data("colorpicker").color,T.data.cal.get(0));b(document).unbind("mouseup",A);b(document).unbind("mousemove",q);return false},v=function(T){b(this).addClass("colorpicker_focus")},Q=function(T){b(this).removeClass("colorpicker_focus")},p=function(U){var V=b(this).parent();var T=V.data("colorpicker").color;V.data("colorpicker").origColor=T;h(T,V.get(0));V.data("colorpicker").onSubmit(T,R(T),j(T),V.data("colorpicker").el)},D=function(U){var Y=b("#"+b(this).data("colorpickerId"));Y.data("colorpicker").onBeforeShow.apply(this,[Y.get(0)]);var Z=b(this).offset();var X=z();var T=b("#tag-color").offset();var W=(T.top)+b("#tag-color").height();var V=(T.left+1);Y.css({left:V+"px",top:W+"px"});if(Y.data("colorpicker").onShow.apply(this,[Y.get(0)])!=false){Y.show()}b(document).bind("mousedown",{cal:Y},O);return false},O=function(T){if(!H(T.data.cal.get(0),T.target,T.data.cal.get(0))){if(T.data.cal.data("colorpicker").onHide.apply(this,[T.data.cal.get(0)])!=false){T.data.cal.hide()}b(document).unbind("mousedown",O)}},H=function(V,U,T){if(V==U){return true}if(V.contains){return V.contains(U)}if(V.compareDocumentPosition){return !!(V.compareDocumentPosition(U)&16)}var W=U.parentNode;while(W&&W!=T){if(W==V){return true}W=W.parentNode}return false},z=function(){var T=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(T?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(T?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(T?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(T?document.documentElement.clientHeight:document.body.clientHeight)}},f=function(T){return{h:Math.min(360,Math.max(0,T.h)),s:Math.min(100,Math.max(0,T.s)),b:Math.min(100,Math.max(0,T.b))}},M=function(T){return{r:Math.min(255,Math.max(0,T.r)),g:Math.min(255,Math.max(0,T.g)),b:Math.min(255,Math.max(0,T.b))}},y=function(V){var T=6-V.length;if(T>0){var W=[];for(var U=0;U<T;U++){W.push("0")}W.push(V);V=W.join("")}return V},d=function(T){var T=parseInt(((T.indexOf("#")>-1)?T.substring(1):T),16);return{r:T>>16,g:(T&65280)>>8,b:(T&255)}},m=function(T){return i(d(T))},i=function(V){var U={h:0,s:0,b:0};var W=Math.min(V.r,V.g,V.b);var T=Math.max(V.r,V.g,V.b);var X=T-W;U.b=T;if(T!=0){}U.s=T!=0?255*X/T:0;if(U.s!=0){if(V.r==T){U.h=(V.g-V.b)/X}else{if(V.g==T){U.h=2+(V.b-V.r)/X}else{U.h=4+(V.r-V.g)/X}}}else{U.h=-1}U.h*=60;if(U.h<0){U.h+=360}U.s*=100/255;U.b*=100/255;return U},j=function(T){var V={};var Z=Math.round(T.h);var Y=Math.round(T.s*255/100);var U=Math.round(T.b*255/100);if(Y==0){V.r=V.g=V.b=U}else{var aa=U;var X=(255-Y)*U/255;var W=(aa-X)*(Z%60)/60;if(Z==360){Z=0}if(Z<60){V.r=aa;V.b=X;V.g=X+W}else{if(Z<120){V.g=aa;V.b=X;V.r=aa-W}else{if(Z<180){V.g=aa;V.r=X;V.b=X+W}else{if(Z<240){V.b=aa;V.r=X;V.g=aa-W}else{if(Z<300){V.b=aa;V.g=X;V.r=X+W}else{if(Z<360){V.r=aa;V.g=X;V.b=aa-W}else{V.r=0;V.g=0;V.b=0}}}}}}}return{r:Math.round(V.r),g:Math.round(V.g),b:Math.round(V.b)}},C=function(T){var U=[T.r.toString(16),T.g.toString(16),T.b.toString(16)];b.each(U,function(V,W){if(W.length==1){U[V]="0"+W}});return U.join("")},R=function(T){return C(j(T))},F=function(){var U=b(this).parent();var T=U.data("colorpicker").origColor;U.data("colorpicker").color=T;J(T,U.get(0));g(T,U.get(0));u(T,U.get(0));l(T,U.get(0));G(T,U.get(0));E(T,U.get(0))};return{init:function(T){T=b.extend({},B,T||{});if(typeof T.color=="string"){T.color=m(T.color)}else{if(T.color.r!=undefined&&T.color.g!=undefined&&T.color.b!=undefined){T.color=i(T.color)}else{if(T.color.h!=undefined&&T.color.s!=undefined&&T.color.b!=undefined){T.color=f(T.color)}else{return this}}}return this.each(function(){if(!b(this).data("colorpickerId")){var U=b.extend({},T);U.origColor=T.color;var W="collorpicker_"+parseInt(Math.random()*1000);b(this).data("colorpickerId",W);var V=b(P).attr("id",W);if(U.flat){V.appendTo(this).show()}else{V.appendTo(document.body)}U.fields=V.find("input").bind("keyup",n).bind("change",e).bind("blur",o).bind("focus",K);V.find("span").bind("mousedown",I).end().find(">div.colorpicker_current_color").bind("click",F);U.selector=V.find("div.colorpicker_color").bind("mousedown",x);U.selectorIndic=U.selector.find("div div");U.el=this;U.hue=V.find("div.colorpicker_hue div");V.find("div.colorpicker_hue").bind("mousedown",w);U.newColor=V.find("div.colorpicker_new_color");U.currentColor=V.find("div.colorpicker_current_color");V.data("colorpicker",U);V.find("div.colorpicker_submit").bind("mouseenter",v).bind("mouseleave",Q).bind("click",p);J(U.color,V.get(0));u(U.color,V.get(0));g(U.color,V.get(0));G(U.color,V.get(0));l(U.color,V.get(0));h(U.color,V.get(0));E(U.color,V.get(0));if(U.flat){V.css({position:"relative",display:"block"})}else{b(this).bind(U.eventName,D)}}})},showPicker:function(){return this.each(function(){if(b(this).data("colorpickerId")){D.apply(this)}})},hidePicker:function(){return this.each(function(){if(b(this).data("colorpickerId")){b("#"+b(this).data("colorpickerId")).hide()}})},setColor:function(T){if(typeof T=="string"){T=m(T)}else{if(T.r!=undefined&&T.g!=undefined&&T.b!=undefined){T=i(T)}else{if(T.h!=undefined&&T.s!=undefined&&T.b!=undefined){T=f(T)}else{return this}}}return this.each(function(){if(b(this).data("colorpickerId")){var U=b("#"+b(this).data("colorpickerId"));U.data("colorpicker").color=T;U.data("colorpicker").origColor=T;J(T,U.get(0));u(T,U.get(0));g(T,U.get(0));G(T,U.get(0));l(T,U.get(0));h(T,U.get(0));E(T,U.get(0))}})}}}();b.fn.extend({ColorPicker:a.init,ColorPickerHide:a.hidePicker,ColorPickerShow:a.showPicker,ColorPickerSetColor:a.setColor})})(jQuery);jQuery(function(e){e("#tag-color").click(function(){var g=e("#tag-color").offset();var k=g.top+e("#tag-color").height();var j=g.left+1;var i=e("<ul></ul>");var h=e('<li style="color: #60a;" class="color-1"></li><li style="color: #807;" class="color-2"></li><li style="color: #920;" class="color-3"></li><li style="color: #a60;" class="color-4"></li><li style="color: #990;" class="color-5"></li><li style="color: #080;" class="color-6"></li><li style="color: #077;" class="color-7"></li><li style="color: #00a;" class="color-8"></li><li style="color: #000;" class="color-9"></li><li style="color: #444;" class="color-10"></li><li style="color: #85e;" class="color-11"></li><li style="color: #d5d;" class="color-12"></li><li style="color: #d43;" class="color-13"></li><li style="color: #d90;" class="color-14"></li><li style="color: #bb0;" class="color-15"></li><li style="color: #2b0;" class="color-16"></li><li style="color: #0ba;" class="color-17"></li><li style="color: #26d;" class="color-18"></li><li style="color: #777;" class="color-19"></li><li style="color: #aaa;" class="color-20"></li>');var f=e('<li class="select-more-colors">More colors</li>');e(f).ColorPicker({onSubmit:function(l,o,m,n){e("#tag-color-background").css("background-color","#"+o);e("#tag-color-value").val("#"+o);e(n).ColorPickerHide();i.remove()},onBeforeShow:function(){i.hide();e(document).unbind("mousedown",a);var l=e("#tag-color-value").val();l=l.length>0?l:"#ffffff";e(this).ColorPickerSetColor(l)}});h.click(function(){e("#tag-color-background").css("background-color",e(this).css("color"));e("#tag-color-value").val(c(e(this).css("color")));i.remove()});i.append(h).append(f);i.appendTo("body").css({position:"absolute",top:k+"px",left:j+"px",width:"75px",height:"85px","z-index":1,background:"#fff",border:"1px solid #ccc"}).addClass("colorpicker-list");e(document).bind("mousedown",{ls:i},a)});var c=function(f){f=f.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);return"#"+d(f[1])+d(f[2])+d(f[3])};var d=function(f){return("0"+parseInt(f).toString(16)).slice(-2)};var a=function(f){if(!b(f.data.ls.get(0),f.target,f.data.ls.get(0))){e(f.data.ls.get(0)).remove();e(document).unbind("mousedown",a)}};var b=function(h,g,f){if(h==g){return true}if(h.contains){return h.contains(g)}if(h.compareDocumentPosition){return !!(h.compareDocumentPosition(g)&16)}var i=g.parentNode;while(i&&i!=f){if(i==h){return true}i=i.parentNode}return false}});
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ * Color picker
4
+ * Author: Stefan Petre www.eyecon.ro
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses
7
+ *
8
+ */
9
+ (function ($) {
10
+ var ColorPicker = function () {
11
+ var
12
+ ids = {},
13
+ inAction,
14
+ charMin = 65,
15
+ visible,
16
+ tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
17
+ defaults = {
18
+ eventName: 'click',
19
+ onShow: function () {},
20
+ onBeforeShow: function(){},
21
+ onHide: function () {},
22
+ onChange: function () {},
23
+ onSubmit: function () {},
24
+ color: 'ff0000',
25
+ livePreview: true,
26
+ flat: false
27
+ },
28
+ fillRGBFields = function (hsb, cal) {
29
+ var rgb = HSBToRGB(hsb);
30
+ $(cal).data('colorpicker').fields
31
+ .eq(1).val(rgb.r).end()
32
+ .eq(2).val(rgb.g).end()
33
+ .eq(3).val(rgb.b).end();
34
+ },
35
+ fillHSBFields = function (hsb, cal) {
36
+ $(cal).data('colorpicker').fields
37
+ .eq(4).val(hsb.h).end()
38
+ .eq(5).val(hsb.s).end()
39
+ .eq(6).val(hsb.b).end();
40
+ },
41
+ fillHexFields = function (hsb, cal) {
42
+ $(cal).data('colorpicker').fields
43
+ .eq(0).val(HSBToHex(hsb)).end();
44
+ },
45
+ setSelector = function (hsb, cal) {
46
+ $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
47
+ $(cal).data('colorpicker').selectorIndic.css({
48
+ left: parseInt(150 * hsb.s/100, 10),
49
+ top: parseInt(150 * (100-hsb.b)/100, 10)
50
+ });
51
+ },
52
+ setHue = function (hsb, cal) {
53
+ $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
54
+ },
55
+ setCurrentColor = function (hsb, cal) {
56
+ $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
57
+ },
58
+ setNewColor = function (hsb, cal) {
59
+ $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
60
+ },
61
+ keyDown = function (ev) {
62
+ var pressedKey = ev.charCode || ev.keyCode || -1;
63
+ if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
64
+ return false;
65
+ }
66
+ var cal = $(this).parent().parent();
67
+ if (cal.data('colorpicker').livePreview === true) {
68
+ change.apply(this);
69
+ }
70
+ },
71
+ change = function (ev) {
72
+ var cal = $(this).parent().parent(), col;
73
+ if (this.parentNode.className.indexOf('_hex') > 0) {
74
+ cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
75
+ } else if (this.parentNode.className.indexOf('_hsb') > 0) {
76
+ cal.data('colorpicker').color = col = fixHSB({
77
+ h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
78
+ s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
79
+ b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
80
+ });
81
+ } else {
82
+ cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
83
+ r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
84
+ g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
85
+ b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
86
+ }));
87
+ }
88
+ if (ev) {
89
+ fillRGBFields(col, cal.get(0));
90
+ fillHexFields(col, cal.get(0));
91
+ fillHSBFields(col, cal.get(0));
92
+ }
93
+ setSelector(col, cal.get(0));
94
+ setHue(col, cal.get(0));
95
+ setNewColor(col, cal.get(0));
96
+ cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
97
+ },
98
+ blur = function (ev) {
99
+ var cal = $(this).parent().parent();
100
+ cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
101
+ },
102
+ focus = function () {
103
+ charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
104
+ $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
105
+ $(this).parent().addClass('colorpicker_focus');
106
+ },
107
+ downIncrement = function (ev) {
108
+ var field = $(this).parent().find('input').focus();
109
+ var current = {
110
+ el: $(this).parent().addClass('colorpicker_slider'),
111
+ max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
112
+ y: ev.pageY,
113
+ field: field,
114
+ val: parseInt(field.val(), 10),
115
+ preview: $(this).parent().parent().data('colorpicker').livePreview
116
+ };
117
+ $(document).bind('mouseup', current, upIncrement);
118
+ $(document).bind('mousemove', current, moveIncrement);
119
+ },
120
+ moveIncrement = function (ev) {
121
+ ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
122
+ if (ev.data.preview) {
123
+ change.apply(ev.data.field.get(0), [true]);
124
+ }
125
+ return false;
126
+ },
127
+ upIncrement = function (ev) {
128
+ change.apply(ev.data.field.get(0), [true]);
129
+ ev.data.el.removeClass('colorpicker_slider').find('input').focus();
130
+ $(document).unbind('mouseup', upIncrement);
131
+ $(document).unbind('mousemove', moveIncrement);
132
+ return false;
133
+ },
134
+ downHue = function (ev) {
135
+ var current = {
136
+ cal: $(this).parent(),
137
+ y: $(this).offset().top
138
+ };
139
+ current.preview = current.cal.data('colorpicker').livePreview;
140
+ $(document).bind('mouseup', current, upHue);
141
+ $(document).bind('mousemove', current, moveHue);
142
+ },
143
+ moveHue = function (ev) {
144
+ change.apply(
145
+ ev.data.cal.data('colorpicker')
146
+ .fields
147
+ .eq(4)
148
+ .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
149
+ .get(0),
150
+ [ev.data.preview]
151
+ );
152
+ return false;
153
+ },
154
+ upHue = function (ev) {
155
+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
156
+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
157
+ $(document).unbind('mouseup', upHue);
158
+ $(document).unbind('mousemove', moveHue);
159
+ return false;
160
+ },
161
+ downSelector = function (ev) {
162
+ var current = {
163
+ cal: $(this).parent(),
164
+ pos: $(this).offset()
165
+ };
166
+ current.preview = current.cal.data('colorpicker').livePreview;
167
+ $(document).bind('mouseup', current, upSelector);
168
+ $(document).bind('mousemove', current, moveSelector);
169
+ },
170
+ moveSelector = function (ev) {
171
+ change.apply(
172
+ ev.data.cal.data('colorpicker')
173
+ .fields
174
+ .eq(6)
175
+ .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
176
+ .end()
177
+ .eq(5)
178
+ .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
179
+ .get(0),
180
+ [ev.data.preview]
181
+ );
182
+ return false;
183
+ },
184
+ upSelector = function (ev) {
185
+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
186
+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
187
+ $(document).unbind('mouseup', upSelector);
188
+ $(document).unbind('mousemove', moveSelector);
189
+ return false;
190
+ },
191
+ enterSubmit = function (ev) {
192
+ $(this).addClass('colorpicker_focus');
193
+ },
194
+ leaveSubmit = function (ev) {
195
+ $(this).removeClass('colorpicker_focus');
196
+ },
197
+ clickSubmit = function (ev) {
198
+ var cal = $(this).parent();
199
+ var col = cal.data('colorpicker').color;
200
+ cal.data('colorpicker').origColor = col;
201
+ setCurrentColor(col, cal.get(0));
202
+ cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
203
+ },
204
+ show = function (ev) {
205
+ var cal = $('#' + $(this).data('colorpickerId'));
206
+ cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
207
+ var pos = $(this).offset();
208
+ var viewPort = getViewport();
209
+ var fs_offset = $( '#tag-color' ).offset();
210
+ var top = (fs_offset.top) + $( '#tag-color' ).height() ;
211
+ var left = (fs_offset.left + 1);
212
+ cal.css({left: left + 'px', top: top + 'px'});
213
+ if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
214
+ cal.show();
215
+ }
216
+ $(document).bind('mousedown', {cal: cal}, hide);
217
+ return false;
218
+ },
219
+ hide = function (ev) {
220
+ if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
221
+ if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
222
+ ev.data.cal.hide();
223
+ }
224
+ $(document).unbind('mousedown', hide);
225
+ }
226
+ },
227
+ isChildOf = function(parentEl, el, container) {
228
+ if (parentEl == el) {
229
+ return true;
230
+ }
231
+ if (parentEl.contains) {
232
+ return parentEl.contains(el);
233
+ }
234
+ if ( parentEl.compareDocumentPosition ) {
235
+ return !!(parentEl.compareDocumentPosition(el) & 16);
236
+ }
237
+ var prEl = el.parentNode;
238
+ while(prEl && prEl != container) {
239
+ if (prEl == parentEl)
240
+ return true;
241
+ prEl = prEl.parentNode;
242
+ }
243
+ return false;
244
+ },
245
+ getViewport = function () {
246
+ var m = document.compatMode == 'CSS1Compat';
247
+ return {
248
+ l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
249
+ t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
250
+ w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
251
+ h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
252
+ };
253
+ },
254
+ fixHSB = function (hsb) {
255
+ return {
256
+ h: Math.min(360, Math.max(0, hsb.h)),
257
+ s: Math.min(100, Math.max(0, hsb.s)),
258
+ b: Math.min(100, Math.max(0, hsb.b))
259
+ };
260
+ },
261
+ fixRGB = function (rgb) {
262
+ return {
263
+ r: Math.min(255, Math.max(0, rgb.r)),
264
+ g: Math.min(255, Math.max(0, rgb.g)),
265
+ b: Math.min(255, Math.max(0, rgb.b))
266
+ };
267
+ },
268
+ fixHex = function (hex) {
269
+ var len = 6 - hex.length;
270
+ if (len > 0) {
271
+ var o = [];
272
+ for (var i=0; i<len; i++) {
273
+ o.push('0');
274
+ }
275
+ o.push(hex);
276
+ hex = o.join('');
277
+ }
278
+ return hex;
279
+ },
280
+ HexToRGB = function (hex) {
281
+ var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
282
+ return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
283
+ },
284
+ HexToHSB = function (hex) {
285
+ return RGBToHSB(HexToRGB(hex));
286
+ },
287
+ RGBToHSB = function (rgb) {
288
+ var hsb = {
289
+ h: 0,
290
+ s: 0,
291
+ b: 0
292
+ };
293
+ var min = Math.min(rgb.r, rgb.g, rgb.b);
294
+ var max = Math.max(rgb.r, rgb.g, rgb.b);
295
+ var delta = max - min;
296
+ hsb.b = max;
297
+ if (max != 0) {
298
+
299
+ }
300
+ hsb.s = max != 0 ? 255 * delta / max : 0;
301
+ if (hsb.s != 0) {
302
+ if (rgb.r == max) {
303
+ hsb.h = (rgb.g - rgb.b) / delta;
304
+ } else if (rgb.g == max) {
305
+ hsb.h = 2 + (rgb.b - rgb.r) / delta;
306
+ } else {
307
+ hsb.h = 4 + (rgb.r - rgb.g) / delta;
308
+ }
309
+ } else {
310
+ hsb.h = -1;
311
+ }
312
+ hsb.h *= 60;
313
+ if (hsb.h < 0) {
314
+ hsb.h += 360;
315
+ }
316
+ hsb.s *= 100/255;
317
+ hsb.b *= 100/255;
318
+ return hsb;
319
+ },
320
+ HSBToRGB = function (hsb) {
321
+ var rgb = {};
322
+ var h = Math.round(hsb.h);
323
+ var s = Math.round(hsb.s*255/100);
324
+ var v = Math.round(hsb.b*255/100);
325
+ if(s == 0) {
326
+ rgb.r = rgb.g = rgb.b = v;
327
+ } else {
328
+ var t1 = v;
329
+ var t2 = (255-s)*v/255;
330
+ var t3 = (t1-t2)*(h%60)/60;
331
+ if(h==360) h = 0;
332
+ if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
333
+ else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
334
+ else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
335
+ else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
336
+ else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
337
+ else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
338
+ else {rgb.r=0; rgb.g=0; rgb.b=0}
339
+ }
340
+ return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
341
+ },
342
+ RGBToHex = function (rgb) {
343
+ var hex = [
344
+ rgb.r.toString(16),
345
+ rgb.g.toString(16),
346
+ rgb.b.toString(16)
347
+ ];
348
+ $.each(hex, function (nr, val) {
349
+ if (val.length == 1) {
350
+ hex[nr] = '0' + val;
351
+ }
352
+ });
353
+ return hex.join('');
354
+ },
355
+ HSBToHex = function (hsb) {
356
+ return RGBToHex(HSBToRGB(hsb));
357
+ },
358
+ restoreOriginal = function () {
359
+ var cal = $(this).parent();
360
+ var col = cal.data('colorpicker').origColor;
361
+ cal.data('colorpicker').color = col;
362
+ fillRGBFields(col, cal.get(0));
363
+ fillHexFields(col, cal.get(0));
364
+ fillHSBFields(col, cal.get(0));
365
+ setSelector(col, cal.get(0));
366
+ setHue(col, cal.get(0));
367
+ setNewColor(col, cal.get(0));
368
+ };
369
+ return {
370
+ init: function (opt) {
371
+ opt = $.extend({}, defaults, opt||{});
372
+ if (typeof opt.color == 'string') {
373
+ opt.color = HexToHSB(opt.color);
374
+ } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
375
+ opt.color = RGBToHSB(opt.color);
376
+ } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
377
+ opt.color = fixHSB(opt.color);
378
+ } else {
379
+ return this;
380
+ }
381
+ return this.each(function () {
382
+ if (!$(this).data('colorpickerId')) {
383
+ var options = $.extend({}, opt);
384
+ options.origColor = opt.color;
385
+ var id = 'collorpicker_' + parseInt(Math.random() * 1000);
386
+ $(this).data('colorpickerId', id);
387
+ var cal = $(tpl).attr('id', id);
388
+ if (options.flat) {
389
+ cal.appendTo(this).show();
390
+ } else {
391
+ cal.appendTo(document.body);
392
+ }
393
+ options.fields = cal
394
+ .find('input')
395
+ .bind('keyup', keyDown)
396
+ .bind('change', change)
397
+ .bind('blur', blur)
398
+ .bind('focus', focus);
399
+ cal
400
+ .find('span').bind('mousedown', downIncrement).end()
401
+ .find('>div.colorpicker_current_color').bind('click', restoreOriginal);
402
+ options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
403
+ options.selectorIndic = options.selector.find('div div');
404
+ options.el = this;
405
+ options.hue = cal.find('div.colorpicker_hue div');
406
+ cal.find('div.colorpicker_hue').bind('mousedown', downHue);
407
+ options.newColor = cal.find('div.colorpicker_new_color');
408
+ options.currentColor = cal.find('div.colorpicker_current_color');
409
+ cal.data('colorpicker', options);
410
+ cal.find('div.colorpicker_submit')
411
+ .bind('mouseenter', enterSubmit)
412
+ .bind('mouseleave', leaveSubmit)
413
+ .bind('click', clickSubmit);
414
+ fillRGBFields(options.color, cal.get(0));
415
+ fillHSBFields(options.color, cal.get(0));
416
+ fillHexFields(options.color, cal.get(0));
417
+ setHue(options.color, cal.get(0));
418
+ setSelector(options.color, cal.get(0));
419
+ setCurrentColor(options.color, cal.get(0));
420
+ setNewColor(options.color, cal.get(0));
421
+ if (options.flat) {
422
+ cal.css({
423
+ position: 'relative',
424
+ display: 'block'
425
+ });
426
+ } else {
427
+ $(this).bind(options.eventName, show);
428
+ }
429
+ }
430
+ });
431
+ },
432
+ showPicker: function() {
433
+ return this.each( function () {
434
+ if ($(this).data('colorpickerId')) {
435
+ show.apply(this);
436
+ }
437
+ });
438
+ },
439
+ hidePicker: function() {
440
+ return this.each( function () {
441
+ if ($(this).data('colorpickerId')) {
442
+ $('#' + $(this).data('colorpickerId')).hide();
443
+ }
444
+ });
445
+ },
446
+ setColor: function(col) {
447
+ if (typeof col == 'string') {
448
+ col = HexToHSB(col);
449
+ } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
450
+ col = RGBToHSB(col);
451
+ } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
452
+ col = fixHSB(col);
453
+ } else {
454
+ return this;
455
+ }
456
+ return this.each(function(){
457
+ if ($(this).data('colorpickerId')) {
458
+ var cal = $('#' + $(this).data('colorpickerId'));
459
+ cal.data('colorpicker').color = col;
460
+ cal.data('colorpicker').origColor = col;
461
+ fillRGBFields(col, cal.get(0));
462
+ fillHSBFields(col, cal.get(0));
463
+ fillHexFields(col, cal.get(0));
464
+ setHue(col, cal.get(0));
465
+ setSelector(col, cal.get(0));
466
+ setCurrentColor(col, cal.get(0));
467
+ setNewColor(col, cal.get(0));
468
+ }
469
+ });
470
+ }
471
+ };
472
+ }();
473
+ $.fn.extend({
474
+ ColorPicker: ColorPicker.init,
475
+ ColorPickerHide: ColorPicker.hidePicker,
476
+ ColorPickerShow: ColorPicker.showPicker,
477
+ ColorPickerSetColor: ColorPicker.setColor
478
+ });
479
+ })(jQuery)
480
+
481
+ jQuery( function( $ ) {
482
+ $( '#tag-color' ).click( function() {
483
+ var fs_offset = $( '#tag-color' ).offset();
484
+ var top = fs_offset.top + $( '#tag-color' ).height() ;
485
+ var left = fs_offset.left + 1;
486
+ var ul_el = $( '<ul></ul>');
487
+ var li_els = $(
488
+ '<li style="color: #60a;" class="color-1"></li>' + // 1
489
+ '<li style="color: #807;" class="color-2"></li>' + // 2
490
+ '<li style="color: #920;" class="color-3"></li>' + // 3
491
+ '<li style="color: #a60;" class="color-4"></li>' + // 4
492
+ '<li style="color: #990;" class="color-5"></li>' + // 5
493
+ '<li style="color: #080;" class="color-6"></li>' + // 6
494
+ '<li style="color: #077;" class="color-7"></li>' + // 7
495
+ '<li style="color: #00a;" class="color-8"></li>' + // 8
496
+ '<li style="color: #000;" class="color-9"></li>' + // 9
497
+ '<li style="color: #444;" class="color-10"></li>' + // 10
498
+ '<li style="color: #85e;" class="color-11"></li>' + // 11
499
+ '<li style="color: #d5d;" class="color-12"></li>' + // 12
500
+ '<li style="color: #d43;" class="color-13"></li>' + // 13
501
+ '<li style="color: #d90;" class="color-14"></li>' + // 14
502
+ '<li style="color: #bb0;" class="color-15"></li>' + // 15
503
+ '<li style="color: #2b0;" class="color-16"></li>' + // 16
504
+ '<li style="color: #0ba;" class="color-17"></li>' + // 17
505
+ '<li style="color: #26d;" class="color-18"></li>' + // 18
506
+ '<li style="color: #777;" class="color-19"></li>' + // 19
507
+ '<li style="color: #aaa;" class="color-20"></li>' // 20
508
+ );
509
+ var more_color = $( '<li class="select-more-colors">More colors</li>' );
510
+ $( more_color ).ColorPicker({
511
+ onSubmit: function( hsb, hex, rgb, el ) {
512
+ $( '#tag-color-background' ).css( 'background-color', '#' + hex );
513
+ $( '#tag-color-value' ).val( '#' + hex );
514
+ $(el).ColorPickerHide();
515
+ ul_el.remove();
516
+ },
517
+ onBeforeShow: function () {
518
+ ul_el.hide();
519
+ $( document ).unbind( 'mousedown', hide_color_selector );
520
+ var color = $( '#tag-color-value' ).val();
521
+ color = color.length > 0 ? color : '#ffffff';
522
+ $( this ).ColorPickerSetColor( color );
523
+ }
524
+ });
525
+ // Add click event for each font style
526
+ li_els.click( function() {
527
+ $( '#tag-color-background' ).css( 'background-color', $(this).css( 'color' ) );
528
+ $( '#tag-color-value' ).val( rgb2hex( $(this).css( 'color' ) ) );
529
+
530
+ ul_el.remove();
531
+ });
532
+
533
+ // append li elements to the ul holder
534
+ ul_el.append( li_els ).append( more_color );
535
+
536
+ // append ul holder to the body
537
+ ul_el
538
+ .appendTo( 'body' )
539
+ .css( {
540
+ position: 'absolute',
541
+ top: top + 'px',
542
+ left: left + 'px',
543
+ width: '75px',
544
+ height: '85px',
545
+ 'z-index': 1,
546
+ background: '#fff',
547
+ border: '1px solid #ccc'
548
+ })
549
+ .addClass( 'colorpicker-list' );
550
+ $( document ).bind( 'mousedown', {ls: ul_el}, hide_color_selector );
551
+ });
552
+
553
+ var rgb2hex = function( rgb ) {
554
+ rgb = rgb.match( /^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/ );
555
+ return "#" + hex( rgb[1] ) + hex( rgb[2] ) + hex( rgb[3] );
556
+ };
557
+
558
+ var hex = function( x ) {
559
+ return ( "0" + parseInt( x ).toString( 16 ) ).slice( -2 );
560
+ };
561
+
562
+ var hide_color_selector = function( ev ) {
563
+ if( ! is_child_of( ev.data.ls.get( 0 ), ev.target, ev.data.ls.get( 0 ) ) ) {
564
+ $( ev.data.ls.get(0) ).remove();
565
+ $( document ).unbind( 'mousedown', hide_color_selector );
566
+ }
567
+ };
568
+ var is_child_of = function( parentEl, el, container ) {
569
+ if( parentEl == el )
570
+ return true;
571
+
572
+ if( parentEl.contains )
573
+ return parentEl.contains( el );
574
+
575
+ if( parentEl.compareDocumentPosition )
576
+ return !!(parentEl.compareDocumentPosition(el) & 16);
577
+
578
+ var prEl = el.parentNode;
579
+ while( prEl && prEl != container ) {
580
+ if( prEl == parentEl )
581
+ return true;
582
+ prEl = prEl.parentNode;
583
+ }
584
+ return false;
585
+ };
586
+ });
js/element-selector.js CHANGED
@@ -1 +1,51 @@
1
- function element_selector(a,c,g,b){var f=jQuery;f(a).click(function(){var h=new Array();if(f(this).hasClass(c)){f(this).removeClass(c)}else{f(this).addClass(c)}f(a+"."+c).each(function(){var i=f(this).find('input[name="'+g+'"]:first').val();h.push(i)});f(b).val(h.join())});var d=f(b).val();if(d!=undefined&&d!=""){var e=d.split(",");f(e).each(function(h,j){e[h]='input[name="'+g+'"][value="'+j+'"]'});e=e.join();f(a).has(e).addClass(c)}};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * This function will assign a click event on the passed jQuery selector.
3
+ * On each click, the function will toggle the CSS class selected_class. Then
4
+ * the function will go over each element contained by the DOM selector and look
5
+ * for an <input> field with name=hidden_data_el in each element that has the
6
+ * selected_class. Of these matching <input>s, their values will be joined by
7
+ * "," and the joined value stored in hidden_input (another hidden input field).
8
+ *
9
+ * If when this function is called, the hidden_input's value is not empty, this
10
+ * function will attempt to preselect any elements matching that value.
11
+ *
12
+ * @param string selector Container that has the <input name=hidden_data_el /> to toggle class
13
+ * @param string selected_class Selected element class
14
+ * @param string hidden_data_el Name of input element storing selected element's value
15
+ * @param string hidden_input jQuery selector for input that stores all selected values
16
+ */
17
+ function element_selector( selector, selected_class, hidden_data_el, hidden_input )
18
+ {
19
+ var $ = jQuery;
20
+
21
+ // Register click event
22
+ $( selector ).click( function() {
23
+ var data = new Array();
24
+ if( $( this ).hasClass( selected_class ) ) {
25
+ // Element deselected, remove class
26
+ $( this ).removeClass( selected_class );
27
+ } else {
28
+ // Element selected, add class
29
+ $( this ).addClass( selected_class );
30
+ }
31
+ $( selector + '.' + selected_class ).each( function() {
32
+ var item_val = $( this ).find( 'input[name="' + hidden_data_el + '"]:first' ).val();
33
+ data.push( item_val );
34
+ } );
35
+ $( hidden_input ).val( data.join() );
36
+ } );
37
+
38
+ // Check if hidden input has a preinitialized value
39
+ var initial_val = $( hidden_input ).val();
40
+ if( initial_val != undefined && initial_val != '' ) {
41
+ var data = initial_val.split( ',' );
42
+ // Turn each element of data into a jQuery selector
43
+ $( data ).each( function( i, val ) {
44
+ data[i] = 'input[name="' + hidden_data_el + '"][value="' + val + '"]';
45
+ } );
46
+ // Concatenate data into one long jQuery selector
47
+ data = data.join();
48
+ // Assign the selected_class to all matching elements
49
+ $( selector ).has( data ).addClass( selected_class );
50
+ }
51
+ }
js/event.js CHANGED
@@ -1 +1,44 @@
1
- function ai1ec_load_map(){var b={zoom:14,mapTypeId:google.maps.MapTypeId.ROADMAP};var d=new google.maps.Map(document.getElementById("ai1ec-gmap-canvas"),b);var a=new google.maps.Marker({map:d});var c=new google.maps.Geocoder();c.geocode({address:document.getElementById("ai1ec-gmap-address").value,},function(f,e){if(e==google.maps.GeocoderStatus.OK){d.setCenter(f[0].geometry.location);a.setPosition(f[0].geometry.location)}})}var orig_onload=window.onload;window.onload=function(){if(typeof(orig_onload)=="function"){orig_onload()}if(document.getElementById("ai1ec-gmap-canvas")){var a=document.createElement("script");a.type="text/javascript";a.src="http://maps.google.com/maps/api/js?sensor=false&callback=ai1ec_load_map";document.body.appendChild(a)}};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Callback for map initialization, called by the Google Maps API script after
3
+ * it has been loaded.
4
+ */
5
+ function ai1ec_load_map()
6
+ {
7
+ var options = {
8
+ zoom: 14,
9
+ mapTypeId: google.maps.MapTypeId.ROADMAP
10
+ };
11
+ var map = new google.maps.Map( document.getElementById( 'ai1ec-gmap-canvas' ), options );
12
+ var marker = new google.maps.Marker({ map: map });
13
+ var geocoder = new google.maps.Geocoder();
14
+
15
+ geocoder.geocode(
16
+ {
17
+ 'address': document.getElementById( 'ai1ec-gmap-address' ).value,
18
+ },
19
+ function( results, status ) {
20
+ if( status == google.maps.GeocoderStatus.OK ) {
21
+ map.setCenter( results[0].geometry.location );
22
+ marker.setPosition( results[0].geometry.location );
23
+ }
24
+ }
25
+ );
26
+ }
27
+
28
+ // jQuery-less onready
29
+ var orig_onload = window.onload;
30
+ window.onload = function()
31
+ {
32
+ if( typeof( orig_onload ) == 'function' )
33
+ orig_onload();
34
+
35
+ // Check if map container exists, and if so, load map into it
36
+ if( document.getElementById( 'ai1ec-gmap-canvas' ) ) {
37
+ // Include Google Maps API to display embedded map, triggering callback
38
+ // when script has loaded.
39
+ var script = document.createElement( 'script' );
40
+ script.type = 'text/javascript';
41
+ script.src = 'http://maps.google.com/maps/api/js?sensor=false&callback=ai1ec_load_map';
42
+ document.body.appendChild( script );
43
+ }
44
+ }
js/geo_autocomplete.js CHANGED
@@ -1 +1,68 @@
1
- (function(a){a.fn.extend({geo_autocomplete:function(c,b){options=a.extend({},a.Autocompleter.defaults,{geocoder:c,mapwidth:100,mapheight:100,maptype:"terrain",mapkey:"ABQIAAAAbnvDoAoYOSW2iqoXiGTpYBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQNumU68AwGqjbSNF9YO8NokKst8w",mapsensor:false,parse:function(d,f,e){var g=[];if(d&&f&&f=="OK"){a.each(d,function(j,i){if(i.geometry&&i.geometry.viewport){var h=i.formatted_address.split(",");var k=h[0];a.each(h,function(m,l){if(l.toLowerCase().indexOf(e.toLowerCase())!=-1){k=a.trim(l);return false}});g.push({data:i,value:k,result:k})}})}return g},formatItem:function(f,h,e,d){var i="http://maps.google.com/maps/api/staticmap?visible="+f.geometry.viewport.getSouthWest().toUrlValue()+"|"+f.geometry.viewport.getNorthEast().toUrlValue()+"&size="+options.mapwidth+"x"+options.mapheight+"&maptype="+options.maptype+"&key="+options.mapkey+"&sensor="+(options.mapsensor?"true":"false");var g=f.formatted_address.replace(/,/gi,",<br/>");return'<img src="'+i+'" width="'+options.mapwidth+'" height="'+options.mapheight+'" /> '+g+'<br clear="both"/>'}},b);options.highlight=options.highlight||function(d){return d};options.formatMatch=options.formatMatch||options.formatItem;return this.each(function(){new a.Autocompleter(this,options)})}})})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery geo_autocomplete plugin 1.0
3
+ *
4
+ * Copyright (c) 2009 Bob Hitching
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ * Requires jQuery Autocomplete plugin by J�rn Zaefferer - see http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
11
+ * jquery.autocomplete.js requires a minor modification for geo_autocomplete to work, as shown in /lib/jquery.autocomplete_geomod.js
12
+ *
13
+ */
14
+ ;(function($) {
15
+
16
+ $.fn.extend({
17
+ geo_autocomplete: function(_geocoder, _options) {
18
+ options = $.extend({}, $.Autocompleter.defaults, {
19
+ geocoder: _geocoder,
20
+ mapwidth: 100,
21
+ mapheight: 100,
22
+ maptype: 'terrain',
23
+ mapkey: 'ABQIAAAAbnvDoAoYOSW2iqoXiGTpYBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQNumU68AwGqjbSNF9YO8NokKst8w', // localhost
24
+ mapsensor: false,
25
+ parse: function(_results, _status, _query) {
26
+ var _parsed = [];
27
+ if (_results && _status && _status == 'OK') {
28
+ $.each(_results, function(_key, _result) {
29
+ if (_result.geometry && _result.geometry.viewport) {
30
+ // place is first matching segment, or first segment
31
+ var _place_parts = _result.formatted_address.split(',');
32
+ var _place = _place_parts[0];
33
+ $.each(_place_parts, function(_key, _part) {
34
+ if (_part.toLowerCase().indexOf(_query.toLowerCase()) != -1) {
35
+ _place = $.trim(_part);
36
+ return false; // break
37
+ }
38
+ });
39
+ _parsed.push({
40
+ data: _result,
41
+ value: _place,
42
+ result: _place
43
+ });
44
+ }
45
+ });
46
+ }
47
+ return _parsed;
48
+ },
49
+ formatItem: function(_data, _i, _n, _value) {
50
+ var _src = 'http://maps.google.com/maps/api/staticmap?visible=' + _data.geometry.viewport.getSouthWest().toUrlValue() + '|' + _data.geometry.viewport.getNorthEast().toUrlValue() + '&size=' + options.mapwidth + 'x' + options.mapheight + '&maptype=' + options.maptype + '&key=' + options.mapkey + '&sensor=' + (options.mapsensor ? 'true' : 'false');
51
+ var _place = _data.formatted_address.replace(/,/gi, ',<br/>');
52
+ return '<img src="' + _src + '" width="' + options.mapwidth + '" height="' + options.mapheight + '" /> ' + _place + '<br clear="both"/>';
53
+ }
54
+ }, _options);
55
+
56
+ // if highlight is set to false, replace it with a do-nothing function
57
+ options.highlight = options.highlight || function(value) { return value; };
58
+
59
+ // if the formatMatch option is not specified, then use formatItem for backwards compatibility
60
+ options.formatMatch = options.formatMatch || options.formatItem;
61
+
62
+ return this.each(function() {
63
+ new $.Autocompleter(this, options);
64
+ });
65
+ }
66
+ });
67
+
68
+ })(jQuery);
js/jquery.autocomplete_geomod.js CHANGED
@@ -1 +1,821 @@
1
- (function(a){a.fn.extend({autocomplete:function(b,c){var d=typeof b=="string";c=a.extend({},a.Autocompleter.defaults,{url:d?b:null,data:d?null:b,delay:d?a.Autocompleter.defaults.delay:10,max:c&&!c.scroll?10:150},c);c.highlight=c.highlight||function(e){return e};c.formatMatch=c.formatMatch||c.formatItem;return this.each(function(){new a.Autocompleter(this,c)})},result:function(b){return this.bind("result",b)},search:function(b){return this.trigger("search",[b])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(b){return this.trigger("setOptions",[b])},unautocomplete:function(){return this.trigger("unautocomplete")}});a.Autocompleter=function(l,g){var c={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8};var b=a(l).attr("autocomplete","off").addClass(g.inputClass);var j;var p="";var m=a.Autocompleter.Cache(g);var e=0;var u;var x={mouseDownOnSelect:false};var r=a.Autocompleter.Select(g,l,d,x);var w;a.browser.opera&&a(l.form).bind("submit.autocomplete",function(){if(w){w=false;return false}});b.bind((a.browser.opera?"keypress":"keydown")+".autocomplete",function(y){e=1;u=y.keyCode;switch(y.keyCode){case c.UP:y.preventDefault();if(r.visible()){r.prev()}else{t(0,true)}break;case c.DOWN:y.preventDefault();if(r.visible()){r.next()}else{t(0,true)}break;case c.PAGEUP:y.preventDefault();if(r.visible()){r.pageUp()}else{t(0,true)}break;case c.PAGEDOWN:y.preventDefault();if(r.visible()){r.pageDown()}else{t(0,true)}break;case g.multiple&&a.trim(g.multipleSeparator)==","&&c.COMMA:case c.TAB:case c.RETURN:if(d()){y.preventDefault();w=true;return false}break;case c.ESC:r.hide();break;default:clearTimeout(j);j=setTimeout(t,g.delay);break}}).focus(function(){e++}).blur(function(){e=0;if(!x.mouseDownOnSelect){s()}}).click(function(){if(e++>1&&!r.visible()){t(0,true)}}).bind("search",function(){var y=(arguments.length>1)?arguments[1]:null;function z(D,C){var A;if(C&&C.length){for(var B=0;B<C.length;B++){if(C[B].result.toLowerCase()==D.toLowerCase()){A=C[B];break}}}if(typeof y=="function"){y(A)}else{b.trigger("result",A&&[A.data,A.value])}}a.each(h(b.val()),function(A,B){f(B,z,z)})}).bind("flushCache",function(){m.flush()}).bind("setOptions",function(){a.extend(g,arguments[1]);if("data" in arguments[1]){m.populate()}}).bind("unautocomplete",function(){r.unbind();b.unbind();a(l.form).unbind(".autocomplete")});function d(){var B=r.selected();if(!B){return false}var y=B.result;p=y;if(g.multiple){var E=h(b.val());if(E.length>1){var A=g.multipleSeparator.length;var D=a(l).selection().start;var C,z=0;a.each(E,function(F,G){z+=G.length;if(D<=z){C=F;return false}z+=A});E[C]=y;y=E.join(g.multipleSeparator)}y+=g.multipleSeparator}b.val(y);v();b.trigger("result",[B.data,B.value]);return true}function t(A,z){if(u==c.DEL){r.hide();return}var y=b.val();if(!z&&y==p){return}p=y;y=i(y);if(y.length>=g.minChars){b.addClass(g.loadingClass);if(!g.matchCase){y=y.toLowerCase()}f(y,k,v)}else{n();r.hide()}}function h(y){if(!y){return[""]}if(!g.multiple){return[a.trim(y)]}return a.map(y.split(g.multipleSeparator),function(z){return a.trim(y).length?a.trim(z):null})}function i(y){if(!g.multiple){return y}var A=h(y);if(A.length==1){return A[0]}var z=a(l).selection().start;if(z==y.length){A=h(y)}else{A=h(y.replace(y.substring(z),""))}return A[A.length-1]}function q(y,z){if(g.autoFill&&(i(b.val()).toLowerCase()==y.toLowerCase())&&u!=c.BACKSPACE){b.val(b.val()+z.substring(i(p).length));a(l).selection(p.length,p.length+z.length)}}function s(){clearTimeout(j);j=setTimeout(v,200)}function v(){var y=r.visible();r.hide();clearTimeout(j);n();if(g.mustMatch){b.search(function(z){if(!z){if(g.multiple){var A=h(b.val()).slice(0,-1);b.val(A.join(g.multipleSeparator)+(A.length?g.multipleSeparator:""))}else{b.val("");b.trigger("result",null)}}})}}function k(z,y){if(y&&y.length&&e){n();r.display(y,z);q(z,y[0].value);r.show()}else{v()}}function f(A,C,z){if(!g.matchCase){A=A.toLowerCase()}var B=m.load(A);if(B&&B.length){C(A,B)}else{if(g.geocoder){var y=i(A);g.geocoder.geocode({address:y},function(E,G){var F=g.parse(E,G,y);m.add(A,F);C(A,F)})}else{if((typeof g.url=="string")&&(g.url.length>0)){var D={timestamp:+new Date()};a.each(g.extraParams,function(E,F){D[E]=typeof F=="function"?F():F});a.ajax({mode:"abort",port:"autocomplete"+l.name,dataType:g.dataType,url:g.url,data:a.extend({q:i(A),limit:g.max},D),success:function(F){var E=g.parse&&g.parse(F)||o(F);m.add(A,E);C(A,E)}})}else{r.emptyList();z(A)}}}}function o(B){var y=[];var A=B.split("\n");for(var z=0;z<A.length;z++){var C=a.trim(A[z]);if(C){C=C.split("|");y[y.length]={data:C,value:C[0],result:g.formatResult&&g.formatResult(C,C[0])||C[0]}}}return y}function n(){b.removeClass(g.loadingClass)}};a.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:false,matchSubset:true,matchContains:false,cacheLength:10,max:100,mustMatch:false,extraParams:{},selectFirst:true,formatItem:function(b){return b[0]},formatMatch:null,autoFill:false,width:0,multiple:false,multipleSeparator:", ",highlight:function(c,b){return c.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+b.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:true,scrollHeight:180};a.Autocompleter.Cache=function(c){var f={};var d=0;function h(l,k){if(!c.matchCase){l=l.toLowerCase()}var j=l.indexOf(k);if(c.matchContains=="word"){j=l.toLowerCase().search("\\b"+k.toLowerCase())}if(j==-1){return false}return j==0||c.matchContains}function g(j,i){if(d>c.cacheLength){b()}if(!f[j]){d++}f[j]=i}function e(){if(!c.data){return false}var k={},j=0;if(!c.url){c.cacheLength=1}k[""]=[];for(var m=0,l=c.data.length;m<l;m++){var p=c.data[m];p=(typeof p=="string")?[p]:p;var o=c.formatMatch(p,m+1,c.data.length);if(o===false){continue}var n=o.charAt(0).toLowerCase();if(!k[n]){k[n]=[]}var q={value:o,data:p,result:c.formatResult&&c.formatResult(p)||o};k[n].push(q);if(j++<c.max){k[""].push(q)}}a.each(k,function(r,s){c.cacheLength++;g(r,s)})}setTimeout(e,25);function b(){f={};d=0}return{flush:b,add:g,populate:e,load:function(n){if(!c.cacheLength||!d){return null}if(!c.url&&c.matchContains){var m=[];for(var j in f){if(j.length>0){var o=f[j];a.each(o,function(p,k){if(h(k.value,n)){m.push(k)}})}}return m}else{if(f[n]){return f[n]}else{if(c.matchSubset){for(var l=n.length-1;l>=c.minChars;l--){var o=f[n.substr(0,l)];if(o){var m=[];a.each(o,function(p,k){if(h(k.value,n)){m[m.length]=k}});return m}}}}}return null}}};a.Autocompleter.Select=function(e,j,l,p){var i={ACTIVE:"ac_over"};var k,f=-1,r,m="",s=true,c,o;function n(){if(!s){return}c=a("<div/>").hide().addClass(e.resultsClass).css("position","absolute").appendTo(document.body);o=a("<ul/>").appendTo(c).mouseover(function(t){if(q(t).nodeName&&q(t).nodeName.toUpperCase()=="LI"){f=a("li",o).removeClass(i.ACTIVE).index(q(t));a(q(t)).addClass(i.ACTIVE)}}).click(function(t){a(q(t)).addClass(i.ACTIVE);l();j.focus();return false}).mousedown(function(){p.mouseDownOnSelect=true}).mouseup(function(){p.mouseDownOnSelect=false});if(e.width>0){c.css("width",e.width)}s=false}function q(u){var t=u.target;while(t&&t.tagName!="LI"){t=t.parentNode}if(!t){return[]}return t}function h(t){k.slice(f,f+1).removeClass(i.ACTIVE);g(t);var v=k.slice(f,f+1).addClass(i.ACTIVE);if(e.scroll){var u=0;k.slice(0,f).each(function(){u+=this.offsetHeight});if((u+v[0].offsetHeight-o.scrollTop())>o[0].clientHeight){o.scrollTop(u+v[0].offsetHeight-o.innerHeight())}else{if(u<o.scrollTop()){o.scrollTop(u)}}}}function g(t){f+=t;if(f<0){f=k.size()-1}else{if(f>=k.size()){f=0}}}function b(t){return e.max&&e.max<t?e.max:t}function d(){o.empty();var u=b(r.length);for(var v=0;v<u;v++){if(!r[v]){continue}var w=e.formatItem(r[v].data,v+1,u,r[v].value,m);if(w===false){continue}var t=a("<li/>").html(e.highlight(w,m)).addClass(v%2==0?"ac_even":"ac_odd").appendTo(o)[0];a.data(t,"ac_data",r[v])}k=o.find("li");if(e.selectFirst){k.slice(0,1).addClass(i.ACTIVE);f=0}if(a.fn.bgiframe){o.bgiframe()}}return{display:function(u,t){n();r=u;m=t;d()},next:function(){h(1)},prev:function(){h(-1)},pageUp:function(){if(f!=0&&f-8<0){h(-f)}else{h(-8)}},pageDown:function(){if(f!=k.size()-1&&f+8>k.size()){h(k.size()-1-f)}else{h(8)}},hide:function(){c&&c.hide();k&&k.removeClass(i.ACTIVE);f=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(k.filter("."+i.ACTIVE)[0]||e.selectFirst&&k[0])},show:function(){var v=a(j).offset();c.css({width:typeof e.width=="string"||e.width>0?e.width:a(j).width(),top:v.top+j.offsetHeight,left:v.left}).show();if(e.scroll){o.scrollTop(0);o.css({maxHeight:e.scrollHeight,overflow:"auto"});if(a.browser.msie&&typeof document.body.style.maxHeight==="undefined"){var t=0;k.each(function(){t+=this.offsetHeight});var u=t>e.scrollHeight;o.css("height",u?e.scrollHeight:t);if(!u){k.width(o.width()-parseInt(k.css("padding-left"))-parseInt(k.css("padding-right")))}}}},selected:function(){var t=k&&k.filter("."+i.ACTIVE).removeClass(i.ACTIVE);return t&&t.length&&a.data(t[0],"ac_data")},emptyList:function(){o&&o.empty()},unbind:function(){c&&c.remove()}}};a.fn.selection=function(i,b){if(i!==undefined){return this.each(function(){if(this.createTextRange){var j=this.createTextRange();if(b===undefined||i==b){j.move("character",i);j.select()}else{j.collapse(true);j.moveStart("character",i);j.moveEnd("character",b);j.select()}}else{if(this.setSelectionRange){this.setSelectionRange(i,b)}else{if(this.selectionStart){this.selectionStart=i;this.selectionEnd=b}}}})}var g=this[0];if(g.createTextRange){var c=document.selection.createRange(),h=g.value,f="<->",d=c.text.length;c.text=f;var e=g.value.indexOf(f);g.value=h;this.selection(e,e+d);return{start:e,end:e+d}}else{if(g.selectionStart!==undefined){return{start:g.selectionStart,end:g.selectionEnd}}}}})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery Autocomplete plugin 1.1
3
+ *
4
+ * Copyright (c) 2009 Jörn Zaefferer
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ * Revision: $Id: jquery.autocomplete.js 15 2009-08-22 10:30:27Z joern.zaefferer $
11
+ */
12
+
13
+ ;(function($) {
14
+
15
+ $.fn.extend({
16
+ autocomplete: function(urlOrData, options) {
17
+ var isUrl = typeof urlOrData == "string";
18
+ options = $.extend({}, $.Autocompleter.defaults, {
19
+ url: isUrl ? urlOrData : null,
20
+ data: isUrl ? null : urlOrData,
21
+ delay: isUrl ? $.Autocompleter.defaults.delay : 10,
22
+ max: options && !options.scroll ? 10 : 150
23
+ }, options);
24
+
25
+ // if highlight is set to false, replace it with a do-nothing function
26
+ options.highlight = options.highlight || function(value) { return value; };
27
+
28
+ // if the formatMatch option is not specified, then use formatItem for backwards compatibility
29
+ options.formatMatch = options.formatMatch || options.formatItem;
30
+
31
+ return this.each(function() {
32
+ new $.Autocompleter(this, options);
33
+ });
34
+ },
35
+ result: function(handler) {
36
+ return this.bind("result", handler);
37
+ },
38
+ search: function(handler) {
39
+ return this.trigger("search", [handler]);
40
+ },
41
+ flushCache: function() {
42
+ return this.trigger("flushCache");
43
+ },
44
+ setOptions: function(options){
45
+ return this.trigger("setOptions", [options]);
46
+ },
47
+ unautocomplete: function() {
48
+ return this.trigger("unautocomplete");
49
+ }
50
+ });
51
+
52
+ $.Autocompleter = function(input, options) {
53
+
54
+ var KEY = {
55
+ UP: 38,
56
+ DOWN: 40,
57
+ DEL: 46,
58
+ TAB: 9,
59
+ RETURN: 13,
60
+ ESC: 27,
61
+ COMMA: 188,
62
+ PAGEUP: 33,
63
+ PAGEDOWN: 34,
64
+ BACKSPACE: 8
65
+ };
66
+
67
+ // Create $ object for input element
68
+ var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
69
+
70
+ var timeout;
71
+ var previousValue = "";
72
+ var cache = $.Autocompleter.Cache(options);
73
+ var hasFocus = 0;
74
+ var lastKeyPressCode;
75
+ var config = {
76
+ mouseDownOnSelect: false
77
+ };
78
+ var select = $.Autocompleter.Select(options, input, selectCurrent, config);
79
+
80
+ var blockSubmit;
81
+
82
+ // prevent form submit in opera when selecting with return key
83
+ $.browser.opera && $(input.form).bind("submit.autocomplete", function() {
84
+ if (blockSubmit) {
85
+ blockSubmit = false;
86
+ return false;
87
+ }
88
+ });
89
+
90
+ // only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
91
+ $input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
92
+ // a keypress means the input has focus
93
+ // avoids issue where input had focus before the autocomplete was applied
94
+ hasFocus = 1;
95
+ // track last key pressed
96
+ lastKeyPressCode = event.keyCode;
97
+ switch(event.keyCode) {
98
+
99
+ case KEY.UP:
100
+ event.preventDefault();
101
+ if ( select.visible() ) {
102
+ select.prev();
103
+ } else {
104
+ onChange(0, true);
105
+ }
106
+ break;
107
+
108
+ case KEY.DOWN:
109
+ event.preventDefault();
110
+ if ( select.visible() ) {
111
+ select.next();
112
+ } else {
113
+ onChange(0, true);
114
+ }
115
+ break;
116
+
117
+ case KEY.PAGEUP:
118
+ event.preventDefault();
119
+ if ( select.visible() ) {
120
+ select.pageUp();
121
+ } else {
122
+ onChange(0, true);
123
+ }
124
+ break;
125
+
126
+ case KEY.PAGEDOWN:
127
+ event.preventDefault();
128
+ if ( select.visible() ) {
129
+ select.pageDown();
130
+ } else {
131
+ onChange(0, true);
132
+ }
133
+ break;
134
+
135
+ // matches also semicolon
136
+ case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
137
+ case KEY.TAB:
138
+ case KEY.RETURN:
139
+ if( selectCurrent() ) {
140
+ // stop default to prevent a form submit, Opera needs special handling
141
+ event.preventDefault();
142
+ blockSubmit = true;
143
+ return false;
144
+ }
145
+ break;
146
+
147
+ case KEY.ESC:
148
+ select.hide();
149
+ break;
150
+
151
+ default:
152
+ clearTimeout(timeout);
153
+ timeout = setTimeout(onChange, options.delay);
154
+ break;
155
+ }
156
+ }).focus(function(){
157
+ // track whether the field has focus, we shouldn't process any
158
+ // results if the field no longer has focus
159
+ hasFocus++;
160
+ }).blur(function() {
161
+ hasFocus = 0;
162
+ if (!config.mouseDownOnSelect) {
163
+ hideResults();
164
+ }
165
+ }).click(function() {
166
+ // show select when clicking in a focused field
167
+ if ( hasFocus++ > 1 && !select.visible() ) {
168
+ onChange(0, true);
169
+ }
170
+ }).bind("search", function() {
171
+ // TODO why not just specifying both arguments?
172
+ var fn = (arguments.length > 1) ? arguments[1] : null;
173
+ function findValueCallback(q, data) {
174
+ var result;
175
+ if( data && data.length ) {
176
+ for (var i=0; i < data.length; i++) {
177
+ if( data[i].result.toLowerCase() == q.toLowerCase() ) {
178
+ result = data[i];
179
+ break;
180
+ }
181
+ }
182
+ }
183
+ if( typeof fn == "function" ) fn(result);
184
+ else $input.trigger("result", result && [result.data, result.value]);
185
+ }
186
+ $.each(trimWords($input.val()), function(i, value) {
187
+ request(value, findValueCallback, findValueCallback);
188
+ });
189
+ }).bind("flushCache", function() {
190
+ cache.flush();
191
+ }).bind("setOptions", function() {
192
+ $.extend(options, arguments[1]);
193
+ // if we've updated the data, repopulate
194
+ if ( "data" in arguments[1] )
195
+ cache.populate();
196
+ }).bind("unautocomplete", function() {
197
+ select.unbind();
198
+ $input.unbind();
199
+ $(input.form).unbind(".autocomplete");
200
+ });
201
+
202
+
203
+ function selectCurrent() {
204
+ var selected = select.selected();
205
+ if( !selected )
206
+ return false;
207
+
208
+ var v = selected.result;
209
+ previousValue = v;
210
+
211
+ if ( options.multiple ) {
212
+ var words = trimWords($input.val());
213
+ if ( words.length > 1 ) {
214
+ var seperator = options.multipleSeparator.length;
215
+ var cursorAt = $(input).selection().start;
216
+ var wordAt, progress = 0;
217
+ $.each(words, function(i, word) {
218
+ progress += word.length;
219
+ if (cursorAt <= progress) {
220
+ wordAt = i;
221
+ return false;
222
+ }
223
+ progress += seperator;
224
+ });
225
+ words[wordAt] = v;
226
+ // TODO this should set the cursor to the right position, but it gets overriden somewhere
227
+ //$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
228
+ v = words.join( options.multipleSeparator );
229
+ }
230
+ v += options.multipleSeparator;
231
+ }
232
+
233
+ $input.val(v);
234
+ hideResultsNow();
235
+ $input.trigger("result", [selected.data, selected.value]);
236
+ return true;
237
+ }
238
+
239
+ function onChange(crap, skipPrevCheck) {
240
+ if( lastKeyPressCode == KEY.DEL ) {
241
+ select.hide();
242
+ return;
243
+ }
244
+
245
+ var currentValue = $input.val();
246
+
247
+ if ( !skipPrevCheck && currentValue == previousValue )
248
+ return;
249
+
250
+ previousValue = currentValue;
251
+
252
+ currentValue = lastWord(currentValue);
253
+ if ( currentValue.length >= options.minChars) {
254
+ $input.addClass(options.loadingClass);
255
+ if (!options.matchCase)
256
+ currentValue = currentValue.toLowerCase();
257
+ request(currentValue, receiveData, hideResultsNow);
258
+ } else {
259
+ stopLoading();
260
+ select.hide();
261
+ }
262
+ };
263
+
264
+ function trimWords(value) {
265
+ if (!value)
266
+ return [""];
267
+ if (!options.multiple)
268
+ return [$.trim(value)];
269
+ return $.map(value.split(options.multipleSeparator), function(word) {
270
+ return $.trim(value).length ? $.trim(word) : null;
271
+ });
272
+ }
273
+
274
+ function lastWord(value) {
275
+ if ( !options.multiple )
276
+ return value;
277
+ var words = trimWords(value);
278
+ if (words.length == 1)
279
+ return words[0];
280
+ var cursorAt = $(input).selection().start;
281
+ if (cursorAt == value.length) {
282
+ words = trimWords(value)
283
+ } else {
284
+ words = trimWords(value.replace(value.substring(cursorAt), ""));
285
+ }
286
+ return words[words.length - 1];
287
+ }
288
+
289
+ // fills in the input box w/the first match (assumed to be the best match)
290
+ // q: the term entered
291
+ // sValue: the first matching result
292
+ function autoFill(q, sValue){
293
+ // autofill in the complete box w/the first match as long as the user hasn't entered in more data
294
+ // if the last user key pressed was backspace, don't autofill
295
+ if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
296
+ // fill in the value (keep the case the user has typed)
297
+ $input.val($input.val() + sValue.substring(lastWord(previousValue).length));
298
+ // select the portion of the value not typed by the user (so the next character will erase)
299
+ $(input).selection(previousValue.length, previousValue.length + sValue.length);
300
+ }
301
+ };
302
+
303
+ function hideResults() {
304
+ clearTimeout(timeout);
305
+ timeout = setTimeout(hideResultsNow, 200);
306
+ };
307
+
308
+ function hideResultsNow() {
309
+ var wasVisible = select.visible();
310
+ select.hide();
311
+ clearTimeout(timeout);
312
+ stopLoading();
313
+ if (options.mustMatch) {
314
+ // call search and run callback
315
+ $input.search(
316
+ function (result){
317
+ // if no value found, clear the input box
318
+ if( !result ) {
319
+ if (options.multiple) {
320
+ var words = trimWords($input.val()).slice(0, -1);
321
+ $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
322
+ }
323
+ else {
324
+ $input.val( "" );
325
+ $input.trigger("result", null);
326
+ }
327
+ }
328
+ }
329
+ );
330
+ }
331
+ };
332
+
333
+ function receiveData(q, data) {
334
+ if ( data && data.length && hasFocus ) {
335
+ stopLoading();
336
+ select.display(data, q);
337
+ autoFill(q, data[0].value);
338
+ select.show();
339
+ } else {
340
+ hideResultsNow();
341
+ }
342
+ };
343
+
344
+ function request(term, success, failure) {
345
+ if (!options.matchCase)
346
+ term = term.toLowerCase();
347
+ var data = cache.load(term);
348
+ // recieve the cached data
349
+ if (data && data.length) {
350
+ success(term, data);
351
+
352
+ // start geo_Autocomplete mod
353
+ // request handler for google geocoder
354
+ } else if (options.geocoder) {
355
+ var _query = lastWord(term);
356
+ options.geocoder.geocode({'address': _query}, function(_results, _status) {
357
+ var parsed = options.parse(_results, _status, _query);
358
+ cache.add(term, parsed);
359
+ success(term, parsed);
360
+ });
361
+ // end geo_Autocomplete mod
362
+
363
+ // if an AJAX url has been supplied, try loading the data now
364
+ } else if( (typeof options.url == "string") && (options.url.length > 0) ){
365
+
366
+ var extraParams = {
367
+ timestamp: +new Date()
368
+ };
369
+ $.each(options.extraParams, function(key, param) {
370
+ extraParams[key] = typeof param == "function" ? param() : param;
371
+ });
372
+
373
+ $.ajax({
374
+ // try to leverage ajaxQueue plugin to abort previous requests
375
+ mode: "abort",
376
+ // limit abortion to this input
377
+ port: "autocomplete" + input.name,
378
+ dataType: options.dataType,
379
+ url: options.url,
380
+ data: $.extend({
381
+ q: lastWord(term),
382
+ limit: options.max
383
+ }, extraParams),
384
+ success: function(data) {
385
+ var parsed = options.parse && options.parse(data) || parse(data);
386
+ cache.add(term, parsed);
387
+ success(term, parsed);
388
+ }
389
+ });
390
+
391
+ } else {
392
+ // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
393
+ select.emptyList();
394
+ failure(term);
395
+ }
396
+ };
397
+
398
+ function parse(data) {
399
+ var parsed = [];
400
+ var rows = data.split("\n");
401
+ for (var i=0; i < rows.length; i++) {
402
+ var row = $.trim(rows[i]);
403
+ if (row) {
404
+ row = row.split("|");
405
+ parsed[parsed.length] = {
406
+ data: row,
407
+ value: row[0],
408
+ result: options.formatResult && options.formatResult(row, row[0]) || row[0]
409
+ };
410
+ }
411
+ }
412
+ return parsed;
413
+ };
414
+
415
+ function stopLoading() {
416
+ $input.removeClass(options.loadingClass);
417
+ };
418
+
419
+ };
420
+
421
+ $.Autocompleter.defaults = {
422
+ inputClass: "ac_input",
423
+ resultsClass: "ac_results",
424
+ loadingClass: "ac_loading",
425
+ minChars: 1,
426
+ delay: 400,
427
+ matchCase: false,
428
+ matchSubset: true,
429
+ matchContains: false,
430
+ cacheLength: 10,
431
+ max: 100,
432
+ mustMatch: false,
433
+ extraParams: {},
434
+ selectFirst: true,
435
+ formatItem: function(row) { return row[0]; },
436
+ formatMatch: null,
437
+ autoFill: false,
438
+ width: 0,
439
+ multiple: false,
440
+ multipleSeparator: ", ",
441
+ highlight: function(value, term) {
442
+ return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
443
+ },
444
+ scroll: true,
445
+ scrollHeight: 180
446
+ };
447
+
448
+ $.Autocompleter.Cache = function(options) {
449
+
450
+ var data = {};
451
+ var length = 0;
452
+
453
+ function matchSubset(s, sub) {
454
+ if (!options.matchCase)
455
+ s = s.toLowerCase();
456
+ var i = s.indexOf(sub);
457
+ if (options.matchContains == "word"){
458
+ i = s.toLowerCase().search("\\b" + sub.toLowerCase());
459
+ }
460
+ if (i == -1) return false;
461
+ return i == 0 || options.matchContains;
462
+ };
463
+
464
+ function add(q, value) {
465
+ if (length > options.cacheLength){
466
+ flush();
467
+ }
468
+ if (!data[q]){
469
+ length++;
470
+ }
471
+ data[q] = value;
472
+ }
473
+
474
+ function populate(){
475
+ if( !options.data ) return false;
476
+ // track the matches
477
+ var stMatchSets = {},
478
+ nullData = 0;
479
+
480
+ // no url was specified, we need to adjust the cache length to make sure it fits the local data store
481
+ if( !options.url ) options.cacheLength = 1;
482
+
483
+ // track all options for minChars = 0
484
+ stMatchSets[""] = [];
485
+
486
+ // loop through the array and create a lookup structure
487
+ for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
488
+ var rawValue = options.data[i];
489
+ // if rawValue is a string, make an array otherwise just reference the array
490
+ rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
491
+
492
+ var value = options.formatMatch(rawValue, i+1, options.data.length);
493
+ if ( value === false )
494
+ continue;
495
+
496
+ var firstChar = value.charAt(0).toLowerCase();
497
+ // if no lookup array for this character exists, look it up now
498
+ if( !stMatchSets[firstChar] )
499
+ stMatchSets[firstChar] = [];
500
+
501
+ // if the match is a string
502
+ var row = {
503
+ value: value,
504
+ data: rawValue,
505
+ result: options.formatResult && options.formatResult(rawValue) || value
506
+ };
507
+
508
+ // push the current match into the set list
509
+ stMatchSets[firstChar].push(row);
510
+
511
+ // keep track of minChars zero items
512
+ if ( nullData++ < options.max ) {
513
+ stMatchSets[""].push(row);
514
+ }
515
+ };
516
+
517
+ // add the data items to the cache
518
+ $.each(stMatchSets, function(i, value) {
519
+ // increase the cache size
520
+ options.cacheLength++;
521
+ // add to the cache
522
+ add(i, value);
523
+ });
524
+ }
525
+
526
+ // populate any existing data
527
+ setTimeout(populate, 25);
528
+
529
+ function flush(){
530
+ data = {};
531
+ length = 0;
532
+ }
533
+
534
+ return {
535
+ flush: flush,
536
+ add: add,
537
+ populate: populate,
538
+ load: function(q) {
539
+ if (!options.cacheLength || !length)
540
+ return null;
541
+ /*
542
+ * if dealing w/local data and matchContains than we must make sure
543
+ * to loop through all the data collections looking for matches
544
+ */
545
+ if( !options.url && options.matchContains ){
546
+ // track all matches
547
+ var csub = [];
548
+ // loop through all the data grids for matches
549
+ for( var k in data ){
550
+ // don't search through the stMatchSets[""] (minChars: 0) cache
551
+ // this prevents duplicates
552
+ if( k.length > 0 ){
553
+ var c = data[k];
554
+ $.each(c, function(i, x) {
555
+ // if we've got a match, add it to the array
556
+ if (matchSubset(x.value, q)) {
557
+ csub.push(x);
558
+ }
559
+ });
560
+ }
561
+ }
562
+ return csub;
563
+ } else
564
+ // if the exact item exists, use it
565
+ if (data[q]){
566
+ return data[q];
567
+ } else
568
+ if (options.matchSubset) {
569
+ for (var i = q.length - 1; i >= options.minChars; i--) {
570
+ var c = data[q.substr(0, i)];
571
+ if (c) {
572
+ var csub = [];
573
+ $.each(c, function(i, x) {
574
+ if (matchSubset(x.value, q)) {
575
+ csub[csub.length] = x;
576
+ }
577
+ });
578
+ return csub;
579
+ }
580
+ }
581
+ }
582
+ return null;
583
+ }
584
+ };
585
+ };
586
+
587
+ $.Autocompleter.Select = function (options, input, select, config) {
588
+ var CLASSES = {
589
+ ACTIVE: "ac_over"
590
+ };
591
+
592
+ var listItems,
593
+ active = -1,
594
+ data,
595
+ term = "",
596
+ needsInit = true,
597
+ element,
598
+ list;
599
+
600
+ // Create results
601
+ function init() {
602
+ if (!needsInit)
603
+ return;
604
+ element = $("<div/>")
605
+ .hide()
606
+ .addClass(options.resultsClass)
607
+ .css("position", "absolute")
608
+ .appendTo(document.body);
609
+
610
+ list = $("<ul/>").appendTo(element).mouseover( function(event) {
611
+ if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
612
+ active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
613
+ $(target(event)).addClass(CLASSES.ACTIVE);
614
+ }
615
+ }).click(function(event) {
616
+ $(target(event)).addClass(CLASSES.ACTIVE);
617
+ select();
618
+ // TODO provide option to avoid setting focus again after selection? useful for cleanup-on-focus
619
+ input.focus();
620
+ return false;
621
+ }).mousedown(function() {
622
+ config.mouseDownOnSelect = true;
623
+ }).mouseup(function() {
624
+ config.mouseDownOnSelect = false;
625
+ });
626
+
627
+ if( options.width > 0 )
628
+ element.css("width", options.width);
629
+
630
+ needsInit = false;
631
+ }
632
+
633
+ function target(event) {
634
+ var element = event.target;
635
+ while(element && element.tagName != "LI")
636
+ element = element.parentNode;
637
+ // more fun with IE, sometimes event.target is empty, just ignore it then
638
+ if(!element)
639
+ return [];
640
+ return element;
641
+ }
642
+
643
+ function moveSelect(step) {
644
+ listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
645
+ movePosition(step);
646
+ var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
647
+ if(options.scroll) {
648
+ var offset = 0;
649
+ listItems.slice(0, active).each(function() {
650
+ offset += this.offsetHeight;
651
+ });
652
+ if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
653
+ list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
654
+ } else if(offset < list.scrollTop()) {
655
+ list.scrollTop(offset);
656
+ }
657
+ }
658
+ };
659
+
660
+ function movePosition(step) {
661
+ active += step;
662
+ if (active < 0) {
663
+ active = listItems.size() - 1;
664
+ } else if (active >= listItems.size()) {
665
+ active = 0;
666
+ }
667
+ }
668
+
669
+ function limitNumberOfItems(available) {
670
+ return options.max && options.max < available
671
+ ? options.max
672
+ : available;
673
+ }
674
+
675
+ function fillList() {
676
+ list.empty();
677
+ var max = limitNumberOfItems(data.length);
678
+ for (var i=0; i < max; i++) {
679
+ if (!data[i])
680
+ continue;
681
+ var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
682
+ if ( formatted === false )
683
+ continue;
684
+ var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
685
+ $.data(li, "ac_data", data[i]);
686
+ }
687
+ listItems = list.find("li");
688
+ if ( options.selectFirst ) {
689
+ listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
690
+ active = 0;
691
+ }
692
+ // apply bgiframe if available
693
+ if ( $.fn.bgiframe )
694
+ list.bgiframe();
695
+ }
696
+
697
+ return {
698
+ display: function(d, q) {
699
+ init();
700
+ data = d;
701
+ term = q;
702
+ fillList();
703
+ },
704
+ next: function() {
705
+ moveSelect(1);
706
+ },
707
+ prev: function() {
708
+ moveSelect(-1);
709
+ },
710
+ pageUp: function() {
711
+ if (active != 0 && active - 8 < 0) {
712
+ moveSelect( -active );
713
+ } else {
714
+ moveSelect(-8);
715
+ }
716
+ },
717
+ pageDown: function() {
718
+ if (active != listItems.size() - 1 && active + 8 > listItems.size()) {
719
+ moveSelect( listItems.size() - 1 - active );
720
+ } else {
721
+ moveSelect(8);
722
+ }
723
+ },
724
+ hide: function() {
725
+ element && element.hide();
726
+ listItems && listItems.removeClass(CLASSES.ACTIVE);
727
+ active = -1;
728
+ },
729
+ visible : function() {
730
+ return element && element.is(":visible");
731
+ },
732
+ current: function() {
733
+ return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
734
+ },
735
+ show: function() {
736
+ var offset = $(input).offset();
737
+ element.css({
738
+ width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
739
+ top: offset.top + input.offsetHeight,
740
+ left: offset.left
741
+ }).show();
742
+ if(options.scroll) {
743
+ list.scrollTop(0);
744
+ list.css({
745
+ maxHeight: options.scrollHeight,
746
+ overflow: 'auto'
747
+ });
748
+
749
+ if($.browser.msie && typeof document.body.style.maxHeight === "undefined") {
750
+ var listHeight = 0;
751
+ listItems.each(function() {
752
+ listHeight += this.offsetHeight;
753
+ });
754
+ var scrollbarsVisible = listHeight > options.scrollHeight;
755
+ list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
756
+ if (!scrollbarsVisible) {
757
+ // IE doesn't recalculate width when scrollbar disappears
758
+ listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
759
+ }
760
+ }
761
+
762
+ }
763
+ },
764
+ selected: function() {
765
+ var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
766
+ return selected && selected.length && $.data(selected[0], "ac_data");
767
+ },
768
+ emptyList: function (){
769
+ list && list.empty();
770
+ },
771
+ unbind: function() {
772
+ element && element.remove();
773
+ }
774
+ };
775
+ };
776
+
777
+ $.fn.selection = function(start, end) {
778
+ if (start !== undefined) {
779
+ return this.each(function() {
780
+ if( this.createTextRange ){
781
+ var selRange = this.createTextRange();
782
+ if (end === undefined || start == end) {
783
+ selRange.move("character", start);
784
+ selRange.select();
785
+ } else {
786
+ selRange.collapse(true);
787
+ selRange.moveStart("character", start);
788
+ selRange.moveEnd("character", end);
789
+ selRange.select();
790
+ }
791
+ } else if( this.setSelectionRange ){
792
+ this.setSelectionRange(start, end);
793
+ } else if( this.selectionStart ){
794
+ this.selectionStart = start;
795
+ this.selectionEnd = end;
796
+ }
797
+ });
798
+ }
799
+ var field = this[0];
800
+ if ( field.createTextRange ) {
801
+ var range = document.selection.createRange(),
802
+ orig = field.value,
803
+ teststring = "<->",
804
+ textLength = range.text.length;
805
+ range.text = teststring;
806
+ var caretAt = field.value.indexOf(teststring);
807
+ field.value = orig;
808
+ this.selection(caretAt, caretAt + textLength);
809
+ return {
810
+ start: caretAt,
811
+ end: caretAt + textLength
812
+ }
813
+ } else if( field.selectionStart !== undefined ){
814
+ return {
815
+ start: field.selectionStart,
816
+ end: field.selectionEnd
817
+ }
818
+ }
819
+ };
820
+
821
+ })(jQuery);
js/jquery.calendrical.js CHANGED
@@ -1 +1,485 @@
1
- function formatDate(b,c){return(c?((b.getUTCMonth()+1)+"/"+b.getUTCDate()):(b.getUTCDate()+"/"+(b.getUTCMonth()+1)))+"/"+b.getUTCFullYear()}function formatTime(b,g,e){var d=g;if(g<10){d="0"+g}if(e){var c=b;if(c<10){c="0"+b}return c+":"+d}else{var c=b%12;if(c==0){c=12}var f=(b<12)?"am":"pm";return c+":"+d+f}}function parseDate(c,d){c+=" GMT";if(d){return new Date(c)}a=c.split(/[\.\-\/]/);var b=a.shift();var e=a.shift();a.unshift(b);a.unshift(e);return new Date(a.join("/"))}function parseTime(e){var c=c=/(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(e);if(c&&c.length>=3){var b=Number(c[1]);var d=Number(c[2]);if(b==12&&c[3]){b-=12}if(c[3]&&c[3].toLowerCase()=="pm"){b+=12}return{hour:b,minute:d}}else{return null}}(function(h){var i=["January","February","March","April","May","June","July","August","September","October","November","December"];function e(){var m=new Date();return new Date(m.getFullYear(),m.getMonth(),m.getDate())}function b(n,m){return String(n)==String(m)}function c(m,n){if(m instanceof Date){return c(m.getUTCFullYear(),m.getUTCMonth())}if(n==1){var o=(m%4==0)&&(!(m%100==0)||(m%400==0));return o?29:28}else{if(n==3||n==5||n==8||n==10){return 30}else{return 31}}}function k(m){return new Date(m.getTime()+(1*24*60*60*1000))}function f(m){return new Date(m.getTime()-(1*24*60*60*1000))}function l(m,n){return(n==11)?new Date(m+1,0,1):new Date(m,n+1,1)}function j(n,o,r,m){var q=h("<thead />");var p=h("<tr />").appendTo(q);h("<th />").addClass("monthCell").append(h('<a href="javascript:;">&laquo;</a>').addClass("prevMonth").mousedown(function(t){g(n,r==0?(o-1):o,r==0?11:(r-1),m);t.preventDefault()})).appendTo(p);h("<th />").addClass("monthCell").attr("colSpan",5).append(h('<a href="javascript:;">'+i[r]+" "+o+"</a>").addClass("monthName")).appendTo(p);h("<th />").addClass("monthCell").append(h('<a href="javascript:;">&raquo;</a>').addClass("nextMonth").mousedown(function(){g(n,r==11?(o+1):o,r==11?0:(r+1),m)})).appendTo(p);var s=h("<tr />").appendTo(q);h.each(String("SMTWTFS").split(""),function(u,t){h("<td />").addClass("dayName").append(t).appendTo(s)});return q}function g(t,x,w,B){B=B||{};var y=B.today?B.today:e();var o=new Date(x,w,1);var u=l(x,w);var m=6-u.getUTCDay();if(m<6){m+=7}for(var s=0;s<m;s++){u=k(u)}var z=h("<table />");j(t,x,w,B).appendTo(z);var r=h("<tbody />").appendTo(z);var A=h("<tr />");var q=o.getUTCDay()+7;for(var s=0;s<q;s++){o=f(o)}while(o<=u){var p=h("<td />").addClass("day").append(h('<a href="javascript:;">'+o.getUTCDate()+"</a>").click((function(){var C=o;return function(){if(B&&B.selectDate){B.selectDate(C)}}}()))).appendTo(A);var v=b(o,y);var n=B.selected&&b(B.selected,o);if(v){p.addClass("today")}if(n){p.addClass("selected")}if(v&&n){p.addClass("today_selected")}if(o.getUTCMonth()!=w){p.addClass("nonMonth")}dow=o.getUTCDay();if(dow==6){r.append(A);A=h("<tr />")}o=k(o)}if(A.children().length){r.append(A)}else{A.remove()}t.empty().append(z)}function d(q,o){var s=o.selection&&parseTime(o.selection);if(s){s.minute=Math.floor(s.minute/15)*15}var r=o.startTime&&(o.startTime.hour*60+o.startTime.minute);var n;var p=h("<ul />");for(var m=0;m<24;m++){for(var t=0;t<60;t+=15){if(r&&r>(m*60+t)){continue}(function(){var v=formatTime(m,t,o.isoTime);var w=v;if(r!=null){var x=(m*60+t)-r;if(x<60){w+=" ("+x+" min)"}else{if(x==60){w+=" (1 hr)"}else{w+=" ("+Math.round(x/60)+" hr "+(x%60)+" min)"}}}var u=h("<li />").append(h('<a href="javascript:;">'+w+"</a>").click(function(){if(o&&o.selectTime){o.selectTime(v)}}).mousemove(function(){h("li.selected",p).removeClass("selected")})).appendTo(p);if(!n&&m==o.defaultHour){n=u}if(s&&s.hour==m&&s.minute==t){u.addClass("selected");n=u}})()}}if(n){setTimeout(function(){q[0].scrollTop=n[0].offsetTop-n.height()*2},0)}q.empty().append(p)}h.fn.calendricalDate=function(m){m=m||{};m.padding=m.padding||4;return this.each(function(){var o=h(this);var p;var n=false;o.bind("focus",function(){if(p){return}var s=o.position();var r=o.css("padding-left");p=h("<div />").addClass("calendricalDatePopup").mouseenter(function(){n=true}).mouseleave(function(){n=false}).mousedown(function(t){t.preventDefault()}).css({position:"absolute",left:s.left,top:s.top+o.height()+m.padding*2});o.after(p);var q=parseDate(o.val(),m.usa);if(!q.getUTCFullYear()){q=m.today?m.today:e()}g(p,q.getUTCFullYear(),q.getUTCMonth(),{today:m.today,selected:q,selectDate:function(t){n=false;o.val(formatDate(t,m.usa));p.remove();p=null;if(m.endDate){var u=parseDate(m.endDate.val(),m.usa);if(u>=q){m.endDate.val(formatDate(new Date(t.getTime()+u.getTime()-q.getTime()),m.usa))}}}})}).blur(function(){if(n){if(p){o.focus()}return}if(!p){return}p.remove();p=null})})};h.fn.calendricalDateRange=function(m){if(this.length>=2){h(this[0]).calendricalDate(h.extend({endDate:h(this[1])},m));h(this[1]).calendricalDate(m)}return this};h.fn.calendricalDateRangeSingle=function(m){if(this.length==1){h(this).calendricalDate(m)}return this};h.fn.calendricalTime=function(m){m=m||{};m.padding=m.padding||4;return this.each(function(){var o=h(this);var p;var n=false;o.bind("focus click",function(){if(p){return}var q=m.startTime;if(q){if(m.startDate&&m.endDate&&!b(parseDate(m.startDate.val()),parseDate(m.endDate.val()))){q=false}}var s=o.position();p=h("<div />").addClass("calendricalTimePopup").mouseenter(function(){n=true}).mouseleave(function(){n=false}).mousedown(function(t){t.preventDefault()}).css({position:"absolute",left:s.left,top:s.top+o.height()+m.padding*2});if(q){p.addClass("calendricalEndTimePopup")}o.after(p);var r={selection:o.val(),selectTime:function(t){n=false;o.val(t);p.remove();p=null},isoTime:m.isoTime||false,defaultHour:(m.defaultHour!=null)?m.defaultHour:8};if(q){r.startTime=parseTime(m.startTime.val())}d(p,r)}).blur(function(){if(n){if(p){o.focus()}return}if(!p){return}p.remove();p=null})})},h.fn.calendricalTimeRange=function(m){if(this.length>=2){h(this[0]).calendricalTime(m);h(this[1]).calendricalTime(h.extend({startTime:h(this[0])},m))}return this};h.fn.calendricalDateTimeRange=function(m){if(this.length>=4){h(this[0]).calendricalDate(h.extend({endDate:h(this[2])},m));h(this[1]).calendricalTime(m);h(this[2]).calendricalDate(m);h(this[3]).calendricalTime(h.extend({startTime:h(this[1]),startDate:h(this[0]),endDate:h(this[2])},m))}return this}})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function formatDate(date, usa)
2
+ {
3
+ return (usa ?
4
+ ((date.getUTCMonth() + 1) + '/' + date.getUTCDate()) :
5
+ (date.getUTCDate() + '/' + (date.getUTCMonth() + 1))
6
+ ) + '/' + date.getUTCFullYear();
7
+ }
8
+
9
+ function formatTime(hour, minute, iso)
10
+ {
11
+ var printMinute = minute;
12
+ if (minute < 10) printMinute = '0' + minute;
13
+
14
+ if (iso) {
15
+ var printHour = hour
16
+ if (printHour < 10) printHour = '0' + hour;
17
+ return printHour + ':' + printMinute;
18
+ } else {
19
+ var printHour = hour % 12;
20
+ if (printHour == 0) printHour = 12;
21
+ var half = (hour < 12) ? 'am' : 'pm';
22
+ return printHour + ':' + printMinute + half;
23
+ }
24
+ }
25
+
26
+ function parseDate(date, usa)
27
+ {
28
+ date += " GMT";
29
+ if (usa) return new Date(date);
30
+ a = date.split(/[\.\-\/]/);
31
+ var day = a.shift();
32
+ var month = a.shift();
33
+ a.unshift(day);
34
+ a.unshift(month);
35
+ return new Date(a.join('/'));
36
+ }
37
+
38
+ function parseTime(text)
39
+ {
40
+ var match = match = /(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(text);
41
+ if (match && match.length >= 3) {
42
+ var hour = Number(match[1]);
43
+ var minute = Number(match[2]);
44
+ if (hour == 12 && match[3]) hour -= 12;
45
+ if (match[3] && match[3].toLowerCase() == 'pm') hour += 12;
46
+ return {
47
+ hour: hour,
48
+ minute: minute
49
+ };
50
+ } else {
51
+ return null;
52
+ }
53
+ }
54
+
55
+ (function($) {
56
+ var monthNames = ['January', 'February', 'March', 'April', 'May', 'June',
57
+ 'July', 'August', 'September', 'October', 'November', 'December'];
58
+
59
+ function getToday()
60
+ {
61
+ var date = new Date();
62
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
63
+ }
64
+
65
+ function areDatesEqual(date1, date2)
66
+ {
67
+ return String(date1) == String(date2);
68
+ }
69
+
70
+ function daysInMonth(year, month)
71
+ {
72
+ if (year instanceof Date) return daysInMonth(year.getUTCFullYear(), year.getUTCMonth());
73
+ if (month == 1) {
74
+ var leapYear = (year % 4 == 0) &&
75
+ (!(year % 100 == 0) || (year % 400 == 0));
76
+ return leapYear ? 29 : 28;
77
+ } else if (month == 3 || month == 5 || month == 8 || month == 10) {
78
+ return 30;
79
+ } else {
80
+ return 31;
81
+ }
82
+ }
83
+
84
+ function dayAfter(date)
85
+ {
86
+ // + 1 day
87
+ return new Date( date.getTime() + (1*24*60*60*1000) );
88
+ }
89
+
90
+ function dayBefore(date)
91
+ {
92
+ // - 1 day
93
+ return new Date( date.getTime() - (1*24*60*60*1000) );
94
+ }
95
+
96
+ function monthAfter(year, month)
97
+ {
98
+ return (month == 11) ?
99
+ new Date(year + 1, 0, 1) :
100
+ new Date(year, month + 1, 1);
101
+ }
102
+
103
+ /**
104
+ * Generates calendar header, with month name, << and >> controls, and
105
+ * initials for days of the week.
106
+ */
107
+ function renderCalendarHeader(element, year, month, options)
108
+ {
109
+ //Prepare thead element
110
+ var thead = $('<thead />');
111
+ var titleRow = $('<tr />').appendTo(thead);
112
+
113
+ //Generate << (back a month) link
114
+ $('<th />').addClass('monthCell').append(
115
+ $('<a href="javascript:;">&laquo;</a>')
116
+ .addClass('prevMonth')
117
+ .mousedown(function(e) {
118
+ renderCalendarPage(element,
119
+ month == 0 ? (year - 1) : year,
120
+ month == 0 ? 11 : (month - 1), options
121
+ );
122
+ e.preventDefault();
123
+ })
124
+ ).appendTo(titleRow);
125
+
126
+ //Generate month title
127
+ $('<th />').addClass('monthCell').attr('colSpan', 5).append(
128
+ $('<a href="javascript:;">' + monthNames[month] + ' ' +
129
+ year + '</a>').addClass('monthName')
130
+ ).appendTo(titleRow);
131
+
132
+ //Generate >> (forward a month) link
133
+ $('<th />').addClass('monthCell').append(
134
+ $('<a href="javascript:;">&raquo;</a>')
135
+ .addClass('nextMonth')
136
+ .mousedown(function() {
137
+ renderCalendarPage(element,
138
+ month == 11 ? (year + 1) : year,
139
+ month == 11 ? 0 : (month + 1), options
140
+ );
141
+ })
142
+ ).appendTo(titleRow);
143
+
144
+ //Generate weekday initials row
145
+ var dayNames = $('<tr />').appendTo(thead);
146
+ $.each(String('SMTWTFS').split(''), function(k, v) {
147
+ $('<td />').addClass('dayName').append(v).appendTo(dayNames);
148
+ });
149
+
150
+ return thead;
151
+ }
152
+
153
+ function renderCalendarPage(element, year, month, options)
154
+ {
155
+ options = options || {};
156
+
157
+ var today = options.today ? options.today : getToday();
158
+
159
+ var date = new Date(year, month, 1);
160
+
161
+ //Wind end date forward to saturday week after month
162
+ var endDate = monthAfter(year, month);
163
+ var ff = 6 - endDate.getUTCDay();
164
+ if (ff < 6) ff += 7;
165
+ for (var i = 0; i < ff; i++) endDate = dayAfter(endDate);
166
+
167
+ var table = $('<table />');
168
+ renderCalendarHeader(element, year, month, options).appendTo(table);
169
+
170
+ var tbody = $('<tbody />').appendTo(table);
171
+ var row = $('<tr />');
172
+
173
+ //Rewind date to monday week before month
174
+ var rewind = date.getUTCDay() + 7;
175
+ for (var i = 0; i < rewind; i++) date = dayBefore(date);
176
+
177
+ while (date <= endDate) {
178
+ var td = $('<td />')
179
+ .addClass('day')
180
+ .append(
181
+ $('<a href="javascript:;">' +
182
+ date.getUTCDate() + '</a>'
183
+ ).click((function() {
184
+ var thisDate = date;
185
+
186
+ return function() {
187
+ if (options && options.selectDate) {
188
+ options.selectDate(thisDate);
189
+ }
190
+ }
191
+ }()))
192
+ )
193
+ .appendTo(row);
194
+
195
+ var isToday = areDatesEqual(date, today);
196
+ var isSelected = options.selected &&
197
+ areDatesEqual(options.selected, date);
198
+
199
+ if (isToday) td.addClass('today');
200
+ if (isSelected) td.addClass('selected');
201
+ if (isToday && isSelected) td.addClass('today_selected');
202
+ if (date.getUTCMonth() != month) td.addClass('nonMonth');
203
+
204
+ dow = date.getUTCDay();
205
+ if (dow == 6) {
206
+ tbody.append(row);
207
+ row = $('<tr />');
208
+ }
209
+ date = dayAfter(date);
210
+ }
211
+ if (row.children().length) {
212
+ tbody.append(row);
213
+ } else {
214
+ row.remove();
215
+ }
216
+
217
+ element.empty().append(table);
218
+ }
219
+
220
+ function renderTimeSelect(element, options)
221
+ {
222
+ var selection = options.selection && parseTime(options.selection);
223
+ if (selection) {
224
+ selection.minute = Math.floor(selection.minute / 15.0) * 15;
225
+ }
226
+ var startTime = options.startTime &&
227
+ (options.startTime.hour * 60 + options.startTime.minute);
228
+
229
+ var scrollTo; //Element to scroll the dropdown box to when shown
230
+ var ul = $('<ul />');
231
+ for (var hour = 0; hour < 24; hour++) {
232
+ for (var minute = 0; minute < 60; minute += 15) {
233
+ if (startTime && startTime > (hour * 60 + minute)) continue;
234
+
235
+ (function() {
236
+ var timeText = formatTime(hour, minute, options.isoTime);
237
+ var fullText = timeText;
238
+ if (startTime != null) {
239
+ var duration = (hour * 60 + minute) - startTime;
240
+ if (duration < 60) {
241
+ fullText += ' (' + duration + ' min)';
242
+ } else if (duration == 60) {
243
+ fullText += ' (1 hr)';
244
+ } else {
245
+ fullText += ' (' + Math.round( duration / 60.0 ) + ' hr ' + ( duration % 60 ) + ' min)';
246
+ }
247
+ }
248
+ var li = $('<li />').append(
249
+ $('<a href="javascript:;">' + fullText + '</a>')
250
+ .click(function() {
251
+ if (options && options.selectTime) {
252
+ options.selectTime(timeText);
253
+ }
254
+ }).mousemove(function() {
255
+ $('li.selected', ul).removeClass('selected');
256
+ })
257
+ ).appendTo(ul);
258
+
259
+ //Set to scroll to the default hour, unless already set
260
+ if (!scrollTo && hour == options.defaultHour) {
261
+ scrollTo = li;
262
+ }
263
+
264
+ if (selection &&
265
+ selection.hour == hour &&
266
+ selection.minute == minute)
267
+ {
268
+ //Highlight selected item
269
+ li.addClass('selected');
270
+
271
+ //Set to scroll to the selected hour
272
+ //
273
+ //This is set even if scrollTo is already set, since
274
+ //scrolling to selected hour is more important than
275
+ //scrolling to default hour
276
+ scrollTo = li;
277
+ }
278
+ })();
279
+ }
280
+ }
281
+ if (scrollTo) {
282
+ //Set timeout of zero so code runs immediately after any calling
283
+ //functions are finished (this is needed, since box hasn't been
284
+ //added to the DOM yet)
285
+ setTimeout(function() {
286
+ //Scroll the dropdown box so that scrollTo item is in
287
+ //the middle
288
+ element[0].scrollTop =
289
+ scrollTo[0].offsetTop - scrollTo.height() * 2;
290
+ }, 0);
291
+ }
292
+ element.empty().append(ul);
293
+ }
294
+
295
+ $.fn.calendricalDate = function(options)
296
+ {
297
+ options = options || {};
298
+ options.padding = options.padding || 4;
299
+
300
+ return this.each(function() {
301
+ var element = $(this);
302
+ var div;
303
+ var within = false;
304
+
305
+ element.bind('focus', function() {
306
+ if (div) return;
307
+ var offset = element.position();
308
+ var padding = element.css('padding-left');
309
+ div = $('<div />')
310
+ .addClass('calendricalDatePopup')
311
+ .mouseenter(function() { within = true; })
312
+ .mouseleave(function() { within = false; })
313
+ .mousedown(function(e) {
314
+ e.preventDefault();
315
+ })
316
+ .css({
317
+ position: 'absolute',
318
+ left: offset.left,
319
+ top: offset.top + element.height() +
320
+ options.padding * 2
321
+ });
322
+ element.after(div);
323
+
324
+ var selected = parseDate(element.val(), options.usa);
325
+ if (!selected.getUTCFullYear()) selected = options.today ? options.today : getToday();
326
+
327
+ renderCalendarPage(
328
+ div,
329
+ selected.getUTCFullYear(),
330
+ selected.getUTCMonth(), {
331
+ today: options.today,
332
+ selected: selected,
333
+ selectDate: function(date) {
334
+ within = false;
335
+ element.val(formatDate(date, options.usa));
336
+ div.remove();
337
+ div = null;
338
+ if (options.endDate) {
339
+ var endDate = parseDate(
340
+ options.endDate.val(), options.usa
341
+ );
342
+ if (endDate >= selected) {
343
+ options.endDate.val(formatDate(
344
+ new Date(
345
+ date.getTime() +
346
+ endDate.getTime() -
347
+ selected.getTime()
348
+ ),
349
+ options.usa
350
+ ));
351
+ }
352
+ }
353
+ }
354
+ }
355
+ );
356
+ }).blur(function() {
357
+ if (within){
358
+ if (div) element.focus();
359
+ return;
360
+ }
361
+ if (!div) return;
362
+ div.remove();
363
+ div = null;
364
+ });
365
+ });
366
+ };
367
+
368
+ $.fn.calendricalDateRange = function(options)
369
+ {
370
+ if (this.length >= 2) {
371
+ $(this[0]).calendricalDate($.extend({
372
+ endDate: $(this[1])
373
+ }, options));
374
+ $(this[1]).calendricalDate(options);
375
+ }
376
+ return this;
377
+ };
378
+
379
+ $.fn.calendricalDateRangeSingle = function(options)
380
+ {
381
+ if (this.length == 1) {
382
+ $(this).calendricalDate(options);
383
+ }
384
+ return this;
385
+ };
386
+
387
+ $.fn.calendricalTime = function(options)
388
+ {
389
+ options = options || {};
390
+ options.padding = options.padding || 4;
391
+
392
+ return this.each(function() {
393
+ var element = $(this);
394
+ var div;
395
+ var within = false;
396
+
397
+ element.bind('focus click', function() {
398
+ if (div) return;
399
+
400
+ var useStartTime = options.startTime;
401
+ if (useStartTime) {
402
+ if (options.startDate && options.endDate &&
403
+ !areDatesEqual(parseDate(options.startDate.val()),
404
+ parseDate(options.endDate.val())))
405
+ useStartTime = false;
406
+ }
407
+
408
+ var offset = element.position();
409
+ div = $('<div />')
410
+ .addClass('calendricalTimePopup')
411
+ .mouseenter(function() { within = true; })
412
+ .mouseleave(function() { within = false; })
413
+ .mousedown(function(e) {
414
+ e.preventDefault();
415
+ })
416
+ .css({
417
+ position: 'absolute',
418
+ left: offset.left,
419
+ top: offset.top + element.height() +
420
+ options.padding * 2
421
+ });
422
+ if (useStartTime) {
423
+ div.addClass('calendricalEndTimePopup');
424
+ }
425
+
426
+ element.after(div);
427
+
428
+ var opts = {
429
+ selection: element.val(),
430
+ selectTime: function(time) {
431
+ within = false;
432
+ element.val(time);
433
+ div.remove();
434
+ div = null;
435
+ },
436
+ isoTime: options.isoTime || false,
437
+ defaultHour: (options.defaultHour != null) ?
438
+ options.defaultHour : 8
439
+ };
440
+
441
+ if (useStartTime) {
442
+ opts.startTime = parseTime(options.startTime.val());
443
+ }
444
+
445
+ renderTimeSelect(div, opts);
446
+ }).blur(function() {
447
+ if (within){
448
+ if (div) element.focus();
449
+ return;
450
+ }
451
+ if (!div) return;
452
+ div.remove();
453
+ div = null;
454
+ });
455
+ });
456
+ },
457
+
458
+ $.fn.calendricalTimeRange = function(options)
459
+ {
460
+ if (this.length >= 2) {
461
+ $(this[0]).calendricalTime(options);
462
+ $(this[1]).calendricalTime($.extend({
463
+ startTime: $(this[0])
464
+ }, options));
465
+ }
466
+ return this;
467
+ };
468
+
469
+ $.fn.calendricalDateTimeRange = function(options)
470
+ {
471
+ if (this.length >= 4) {
472
+ $(this[0]).calendricalDate($.extend({
473
+ endDate: $(this[2])
474
+ }, options));
475
+ $(this[1]).calendricalTime(options);
476
+ $(this[2]).calendricalDate(options);
477
+ $(this[3]).calendricalTime($.extend({
478
+ startTime: $(this[1]),
479
+ startDate: $(this[0]),
480
+ endDate: $(this[2])
481
+ }, options));
482
+ }
483
+ return this;
484
+ };
485
+ })(jQuery);
js/jquery.inputdate.js CHANGED
@@ -1 +1,195 @@
1
- (function(d){function a(g){g.addClass("error").fadeOut("normal",function(){g.val(g.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function e(){d(this).data("timespan.stored",this.value)}function c(h,i,j,g){i.val(i.data("timespan.initial_value"));var k=parseInt(i.val());if(!isNaN(parseInt(k))){k=new Date(parseInt(k)*1000)}else{k=new Date(g)}h.val(formatDate(k,false));h.each(e)}var f={start_date_input:"date-input",start_time:"time",twentyfour_hour:false,now:new Date()};var b={init:function(i){var l=d.extend({},f,i);var j=d(l.start_date_input);var k=d(l.start_time);var h=j;var g=j;g.bind("focus.timespan",e);h.calendricalDate({today:new Date(l.now.getFullYear(),l.now.getMonth(),l.now.getDate())});h.bind("blur.timespan",function(){var m=parseDate(this.value,false);if(isNaN(m)){a(d(this))}else{d(this).data("timespan.stored",this.value);d(this).val(formatDate(m,false))}});j.bind("focus.timespan",function(){var m=parseDate(j.val(),false).getTime()/1000}).bind("blur.timespan",function(){var m=parseDate(j.data("timespan.stored"),false)});j.closest("form").bind("submit.timespan",function(){var m=parseDate(j.val(),false).getTime()/1000;if(isNaN(m)){m=""}k.val(m)});k.data("timespan.initial_value",k.val());c(j,k,l.twentyfour_hour,l.now);return this},reset:function(g){var h=d.extend({},f,g);c(d(h.start_date_input),d(h.start_time),h.twentyfour_hour,h.now);return this},destroy:function(g){g=d.extend({},f,g);d.each(g,function(i,h){d(h).unbind(".timespan")});d(g.start_date_input).closest("form").unbind(".timespan");return this}};d.inputdate=function(g){if(b[g]){return b[g].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof g==="object"||!g){return b.init.apply(this,arguments)}else{d.error("Method "+g+" does not exist on jQuery.timespan")}}}})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( $ )
2
+ {
3
+ /**
4
+ * Private functions
5
+ */
6
+
7
+ // Helper function - reset contents of current field to stored original
8
+ // value and alert user.
9
+ function reset_invalid( field )
10
+ {
11
+ field
12
+ .addClass( 'error' )
13
+ .fadeOut( 'normal', function() {
14
+ field
15
+ .val( field.data( 'timespan.stored' ) )
16
+ .removeClass( 'error' )
17
+ .fadeIn( 'fast' );
18
+ });
19
+ }
20
+
21
+ // Stores the value of the HTML element in context to its "stored" jQuery data.
22
+ function store_value() {
23
+ $(this).data( 'timespan.stored', this.value );
24
+ }
25
+
26
+ /**
27
+ * Value initialization
28
+ */
29
+ function reset( start_date_input, start_time, twentyfour_hour, now )
30
+ {
31
+ // Restore original values of fields when the page was loaded
32
+ start_time.val( start_time.data( 'timespan.initial_value' ) );
33
+
34
+ // Fill out input field with default date/time based on this original
35
+ // value.
36
+
37
+ var start = parseInt( start_time.val() );
38
+ // If start_time field has a valid integer, use it, else use current time
39
+ // rounded to nearest quarter-hour.
40
+ if( ! isNaN( parseInt( start ) ) ) {
41
+ start = new Date( parseInt( start ) * 1000 );
42
+ } else {
43
+ start = new Date( now );
44
+ }
45
+ start_date_input.val( formatDate( start, false ) );
46
+
47
+ // Trigger function (defined above) to internally store values of each
48
+ // input field (used in calculations later).
49
+ start_date_input.each( store_value );
50
+ }
51
+
52
+ /**
53
+ * Private constants
54
+ */
55
+
56
+ var default_options = {
57
+ start_date_input: 'date-input',
58
+ start_time: 'time',
59
+ twentyfour_hour: false,
60
+ now: new Date()
61
+ };
62
+
63
+ /**
64
+ * Public methods
65
+ */
66
+
67
+ var methods = {
68
+
69
+ /**
70
+ * Initialize settings.
71
+ */
72
+ init: function( options )
73
+ {
74
+ var o = $.extend( {}, default_options, options );
75
+
76
+ // Shortcut jQuery objects
77
+ var start_date_input = $(o.start_date_input);
78
+ var start_time = $(o.start_time);
79
+
80
+ var date_inputs = start_date_input;
81
+ var all_inputs = start_date_input;
82
+
83
+ /**
84
+ * Event handlers
85
+ */
86
+
87
+ // Save original (presumably valid) value of every input field upon focus.
88
+ all_inputs.bind( 'focus.timespan', store_value );
89
+ date_inputs.calendricalDate( {
90
+ today: new Date( o.now.getFullYear(), o.now.getMonth(), o.now.getDate() )
91
+ } );
92
+
93
+ // Validate and update saved value of DATE fields upon blur.
94
+ date_inputs
95
+ .bind( 'blur.timespan', function() {
96
+ // Validate contents of this field.
97
+ var date = parseDate( this.value, false );
98
+ if( isNaN( date ) ) {
99
+ // This field is invalid.
100
+ reset_invalid( $(this) );
101
+ } else {
102
+ // Value is valid, so store it for later use (below).
103
+ $(this).data( 'timespan.stored', this.value );
104
+ // Re-format contents of field correctly (in case parsable but not
105
+ // perfect).
106
+ $(this).val( formatDate( date, false ) );
107
+ }
108
+ });
109
+
110
+ // When start date/time are modified, update end date/time by shifting the
111
+ // appropriate amount.
112
+ start_date_input.bind( 'focus.timespan', function() {
113
+ // Calculate the time difference between start & end and save it.
114
+ var start_date_val = parseDate( start_date_input.val(), false ).getTime() / 1000;
115
+ } )
116
+ .bind( 'blur.timespan', function() {
117
+ var start_date_val = parseDate( start_date_input.data( 'timespan.stored' ), false );
118
+ // Shift end date/time as appropriate.
119
+ } );
120
+
121
+ // Validation upon form submission
122
+ start_date_input.closest( 'form' )
123
+ .bind( 'submit.timespan', function() {
124
+ // Update hidden field value with chosen date/time.
125
+
126
+ // Convert Date object into UNIX timestamp for form submission
127
+ var unix_start_time = parseDate( start_date_input.val(), false ).getTime() / 1000;
128
+ // If parsed incorrectly, entire calculation is invalid.
129
+ if( isNaN( unix_start_time ) ) {
130
+ unix_start_time = '';
131
+ }
132
+ // Set start date value to valid unix time, or empty string, depending
133
+ // on above validation.
134
+ start_time.val( unix_start_time );
135
+ } );
136
+
137
+ // Store original form value
138
+ start_time.data( 'timespan.initial_value', start_time.val() );
139
+
140
+ // Initialize input fields
141
+ reset( start_date_input,
142
+ start_time,
143
+ o.twentyfour_hour,
144
+ o.now )
145
+
146
+ return this;
147
+ },
148
+
149
+ /**
150
+ * Reset values to defaults.
151
+ */
152
+ reset: function( options )
153
+ {
154
+ var o = $.extend( {}, default_options, options );
155
+
156
+ reset( $(o.start_date_input),
157
+ $(o.start_time),
158
+ o.twentyfour_hour,
159
+ o.now );
160
+
161
+ return this;
162
+ },
163
+
164
+ /**
165
+ * Destroy registered event handlers.
166
+ */
167
+ destroy: function( options )
168
+ {
169
+ options = $.extend( {}, default_options, options );
170
+
171
+ $.each( options, function( option_name, value ) {
172
+ $(value).unbind( '.timespan' );
173
+ } );
174
+ $(options.start_date_input).closest('form').unbind( '.timespan' );
175
+
176
+ return this;
177
+ }
178
+ }
179
+
180
+ /**
181
+ * Main jQuery plugin definition
182
+ */
183
+
184
+ $.inputdate = function( arg )
185
+ {
186
+ // Method calling logic
187
+ if( methods[arg] ) {
188
+ return methods[arg].apply( this, Array.prototype.slice.call( arguments, 1 ));
189
+ } else if( typeof arg === 'object' || ! arg ) {
190
+ return methods.init.apply( this, arguments );
191
+ } else {
192
+ $.error( 'Method ' + arg + ' does not exist on jQuery.timespan' );
193
+ }
194
+ };
195
+ })( jQuery );
js/jquery.scrollTo-min.js CHANGED
@@ -1 +1,11 @@
1
- (function(c){var a=c.scrollTo=function(d,f,g){c(window).scrollTo(d,f,g)};a.defaults={axis:"xy",duration:parseFloat(c.fn.jquery)>=1.3?0:1};a.window=function(d){return c(window)._scrollable()};c.fn._scrollable=function(){return this.map(function(){var d=this,f=!d.nodeName||c.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!f){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return c.browser.safari||g.compatMode=="BackCompat"?g.body:g.documentElement})};c.fn.scrollTo=function(f,e,d){if(typeof e=="object"){d=e;e=0}if(typeof d=="function"){d={onAfter:d}}if(f=="max"){f=9000000000}d=c.extend({},a.defaults,d);e=e||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){e/=2}d.offset=b(d.offset);d.over=b(d.over);return this._scrollable().each(function(){var n=this,l=c(n),m=f,j,k={},h=l.is("html,body");switch(typeof m){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(m)){m=b(m);break}m=c(m,this);case"object":if(m.is||m.style){j=(m=c(m)).offset()}}c.each(d.axis.split(""),function(q,r){var t=r=="x"?"Left":"Top",s=t.toLowerCase(),v="scroll"+t,p=n[v],g=a.max(n,r);if(j){k[v]=j[s]+(h?0:p-l.offset()[s]);if(d.margin){k[v]-=parseInt(m.css("margin"+t))||0;k[v]-=parseInt(m.css("border"+t+"Width"))||0}k[v]+=d.offset[s]||0;if(d.over[s]){k[v]+=m[r=="x"?"width":"height"]()*d.over[s]}}else{var u=m[s];k[v]=u.slice&&u.slice(-1)=="%"?parseFloat(u)/100*g:u}if(/^\d+$/.test(k[v])){k[v]=k[v]<=0?0:Math.min(k[v],g)}if(!q&&d.queue){if(p!=k[v]){i(d.onAfterFirst)}delete k[v]}});i(d.onAfter);function i(g){l.animate(k,e,d.easing,g&&function(){g.call(this,f,d)})}}).end()};a.max=function(g,j){var n=j=="x"?"Width":"Height",k="scroll"+n;if(!c(g).is("html,body")){return g[k]-c(g)[n.toLowerCase()]()}var o="client"+n,f=g.ownerDocument.documentElement,d=g.ownerDocument.body;return Math.max(f[k],d[k])-Math.min(f[o],d[o])};function b(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * jQuery.ScrollTo - Easy element scrolling using jQuery.
3
+ * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
4
+ * Dual licensed under MIT and GPL.
5
+ * Date: 5/25/2009
6
+ * @author Ariel Flesler
7
+ * @version 1.4.2
8
+ *
9
+ * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
10
+ */
11
+ ;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
js/jquery.timespan.js CHANGED
@@ -1 +1,337 @@
1
- (function(d){function a(g){g.addClass("error").fadeOut("normal",function(){g.val(g.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function e(){d(this).data("timespan.stored",this.value)}function c(l,p,o,j,n,i,q,m,h){o.val(o.data("timespan.initial_value"));i.val(i.data("timespan.initial_value"));q.get(0).checked=q.data("timespan.initial_value");var g=parseInt(o.val());if(!isNaN(parseInt(g))){g=new Date(parseInt(g)*1000);p.val(formatTime(g.getUTCHours(),g.getUTCMinutes(),m))}else{g=new Date(h);p.val(formatTime(g.getUTCHours(),g.getUTCMinutes()-g.getUTCMinutes()%15,m))}l.val(formatDate(g,false));var k=parseInt(i.val());if(!isNaN(parseInt(k))){k=new Date(parseInt(k)*1000);n.val(formatTime(k.getUTCHours(),k.getUTCMinutes(),m))}else{k=new Date(g.getTime()+3600000);n.val(formatTime(k.getUTCHours(),k.getUTCMinutes()-k.getUTCMinutes()%15,m))}if(q.get(0).checked){k.setUTCDate(k.getUTCDate()-1)}j.val(formatDate(k,false));l.each(e);p.each(e);j.each(e);n.each(e);q.trigger("change.timespan")}var f={allday:"#allday",start_date_input:"#start-date-input",start_time_input:"#start-time-input",start_time:"#start-time",end_date_input:"#end-date-input",end_time_input:"#end-time-input",end_time:"#end-time",twentyfour_hour:false,now:new Date(),};var b={init:function(t){var h=d.extend({},f,t);var s=d(h.allday);var k=d(h.start_date_input);var p=d(h.start_time_input);var m=d(h.start_time);var j=d(h.end_date_input);var l=d(h.end_time_input);var g=d(h.end_time);var q=k.add(h.end_date_input);var r=p.add(h.end_time_input);var i=k.add(h.start_time_input).add(h.end_date_input).add(h.end_time_input);i.bind("focus.timespan",e);var n=new Date(h.now.getFullYear(),h.now.getMonth(),h.now.getDate());s.bind("change.timespan",function(){if(this.checked){r.fadeOut();q.calendricalDateRange({today:n})}else{r.fadeIn();i.calendricalDateTimeRange({today:n})}}).get().checked=false;q.bind("blur.timespan",function(){var o=parseDate(this.value,false);if(isNaN(o)){a(d(this))}else{d(this).data("timespan.stored",this.value);d(this).val(formatDate(o,false))}});r.bind("blur.timespan",function(){var o=parseTime(this.value);if(!o){a(d(this))}else{d(this).data("timespan.stored",this.value);d(this).val(formatTime(o.hour,o.minute,false))}});k.add(h.start_time_input).bind("focus.timespan",function(){var o=parseDate(k.val(),false).getTime()/1000;var v=parseTime(p.val());o+=v.hour*3600+v.minute*60;var u=parseDate(j.val(),false).getTime()/1000;var w=parseTime(l.val());u+=w.hour*3600+w.minute*60;k.data("time_diff",u-o)}).bind("blur.timespan",function(){var o=parseDate(k.data("timespan.stored"),false);var u=parseTime(p.data("timespan.stored"));var v=o.getTime()/1000+u.hour*3600+u.minute*60+k.data("time_diff");v=new Date(v*1000);j.val(formatDate(v,false));l.val(formatTime(v.getUTCHours(),v.getUTCMinutes(),false))});k.closest("form").bind("submit.timespan",function(){var o=parseDate(k.val(),false).getTime()/1000;if(!isNaN(o)){if(!s.get(0).checked){var u=parseTime(p.val());if(u){o+=u.hour*3600+u.minute*60}else{o=""}}}else{o=""}m.val(o);var v=parseDate(j.val(),false).getTime()/1000;if(!isNaN(v)){if(s.get(0).checked){v+=24*60*60}else{var u=parseTime(l.val());if(u){v+=u.hour*3600+u.minute*60}else{v=""}}}else{v=""}g.val(v)});m.data("timespan.initial_value",m.val());g.data("timespan.initial_value",g.val());s.data("timespan.initial_value",s.get(0).checked);c(k,p,m,j,l,g,s,h.twentyfour_hour,h.now);return this},reset:function(g){var h=d.extend({},f,g);c(d(h.start_date_input),d(h.start_time_input),d(h.start_time),d(h.end_date_input),d(h.end_time_input),d(h.end_time),d(h.allday),h.twentyfour_hour,h.now);return this},destroy:function(g){g=d.extend({},f,g);d.each(g,function(i,h){d(h).unbind(".timespan")});d(g.start_date_input).closest("form").unbind(".timespan");return this}};d.timespan=function(g){if(b[g]){return b[g].apply(this,Array.prototype.slice.call(arguments,1))}else{if(typeof g==="object"||!g){return b.init.apply(this,arguments)}else{d.error("Method "+g+" does not exist on jQuery.timespan")}}}})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( $ )
2
+ {
3
+ /**
4
+ * Private functions
5
+ */
6
+
7
+ // Helper function - reset contents of current field to stored original
8
+ // value and alert user.
9
+ function reset_invalid( field )
10
+ {
11
+ field
12
+ .addClass( 'error' )
13
+ .fadeOut( 'normal', function() {
14
+ field
15
+ .val( field.data( 'timespan.stored' ) )
16
+ .removeClass( 'error' )
17
+ .fadeIn( 'fast' );
18
+ });
19
+ }
20
+
21
+ // Stores the value of the HTML element in context to its "stored" jQuery data.
22
+ function store_value() {
23
+ $(this).data( 'timespan.stored', this.value );
24
+ }
25
+
26
+ /**
27
+ * Value initialization
28
+ */
29
+ function reset( start_date_input, start_time_input, start_time,
30
+ end_date_input, end_time_input, end_time, allday, twentyfour_hour, now )
31
+ {
32
+ // Restore original values of fields when the page was loaded
33
+ start_time.val( start_time.data( 'timespan.initial_value' ) );
34
+ end_time.val( end_time.data( 'timespan.initial_value' ) );
35
+ allday.get(0).checked = allday.data( 'timespan.initial_value' );
36
+
37
+ // Fill out input fields with default date/time based on these original
38
+ // values.
39
+
40
+ var start = parseInt( start_time.val() );
41
+ // If start_time field has a valid integer, use it, else use current time
42
+ // rounded to nearest quarter-hour.
43
+ if( ! isNaN( parseInt( start ) ) ) {
44
+ start = new Date( parseInt( start ) * 1000 );
45
+ start_time_input.val( formatTime( start.getUTCHours(), start.getUTCMinutes(), twentyfour_hour ) );
46
+ } else {
47
+ start = new Date( now );
48
+ // Round minutes to nearest quarter-hour.
49
+ start_time_input.val(
50
+ formatTime( start.getUTCHours(), start.getUTCMinutes() - start.getUTCMinutes() % 15, twentyfour_hour ) );
51
+ }
52
+ start_date_input.val( formatDate( start, false ) );
53
+
54
+ var end = parseInt( end_time.val() );
55
+ // If end_time field has a valid integer, use it, else use start time plus
56
+ // one hour.
57
+ if( ! isNaN( parseInt( end ) ) ) {
58
+ end = new Date( parseInt( end ) * 1000 );
59
+ end_time_input.val( formatTime( end.getUTCHours(), end.getUTCMinutes(), twentyfour_hour ) );
60
+ } else {
61
+ end = new Date( start.getTime() + 3600000 );
62
+ // Round minutes to nearest quarter-hour.
63
+ end_time_input.val(
64
+ formatTime( end.getUTCHours(), end.getUTCMinutes() - end.getUTCMinutes() % 15, twentyfour_hour ) );
65
+ }
66
+ // If all-day is checked, end date one day *before* last day of the span,
67
+ // provided we were given an iCalendar-spec all-day timespan.
68
+ if( allday.get(0).checked )
69
+ end.setUTCDate( end.getUTCDate() - 1 );
70
+ end_date_input.val( formatDate( end, false ) );
71
+
72
+ // Trigger function (defined above) to internally store values of each
73
+ // input field (used in calculations later).
74
+ start_date_input.each( store_value );
75
+ start_time_input.each( store_value );
76
+ end_date_input.each( store_value );
77
+ end_time_input.each( store_value );
78
+
79
+ // Set up visibility of controls and Calendrical activation based on
80
+ // original "checked" status of "All day" box.
81
+ allday.trigger( 'change.timespan' );
82
+ }
83
+
84
+ /**
85
+ * Private constants
86
+ */
87
+
88
+ var default_options = {
89
+ allday: '#allday',
90
+ start_date_input: '#start-date-input',
91
+ start_time_input: '#start-time-input',
92
+ start_time: '#start-time',
93
+ end_date_input: '#end-date-input',
94
+ end_time_input: '#end-time-input',
95
+ end_time: '#end-time',
96
+ twentyfour_hour: false,
97
+ now: new Date(),
98
+ };
99
+
100
+ /**
101
+ * Public methods
102
+ */
103
+
104
+ var methods = {
105
+
106
+ /**
107
+ * Initialize settings.
108
+ */
109
+ init: function( options )
110
+ {
111
+ var o = $.extend( {}, default_options, options );
112
+
113
+ // Shortcut jQuery objects
114
+ var allday = $(o.allday);
115
+ var start_date_input = $(o.start_date_input);
116
+ var start_time_input = $(o.start_time_input);
117
+ var start_time = $(o.start_time);
118
+ var end_date_input = $(o.end_date_input);
119
+ var end_time_input = $(o.end_time_input);
120
+ var end_time = $(o.end_time);
121
+
122
+ var date_inputs = start_date_input.add( o.end_date_input );
123
+ var time_inputs = start_time_input.add( o.end_time_input );
124
+ var all_inputs = start_date_input.add( o.start_time_input )
125
+ .add( o.end_date_input ).add( o.end_time_input );
126
+
127
+ /**
128
+ * Event handlers
129
+ */
130
+
131
+ // Save original (presumably valid) value of every input field upon focus.
132
+ all_inputs.bind( 'focus.timespan', store_value );
133
+
134
+ // When "All day" is toggled, show/hide time.
135
+ var today = new Date( o.now.getFullYear(), o.now.getMonth(), o.now.getDate() );
136
+ allday
137
+ .bind( 'change.timespan', function() {
138
+ if( this.checked ) {
139
+ time_inputs.fadeOut();
140
+ date_inputs.calendricalDateRange( { today: today } );
141
+ } else {
142
+ time_inputs.fadeIn();
143
+ all_inputs.calendricalDateTimeRange( { today: today } );
144
+ }
145
+ } )
146
+ .get().checked = false;
147
+
148
+ // Validate and update saved value of DATE fields upon blur.
149
+ date_inputs
150
+ .bind( 'blur.timespan', function() {
151
+ // Validate contents of this field.
152
+ var date = parseDate( this.value, false );
153
+ if( isNaN( date ) ) {
154
+ // This field is invalid.
155
+ reset_invalid( $(this) );
156
+ } else {
157
+ // Value is valid, so store it for later use (below).
158
+ $(this).data( 'timespan.stored', this.value );
159
+ // Re-format contents of field correctly (in case parsable but not
160
+ // perfect).
161
+ $(this).val( formatDate( date, false ) );
162
+ }
163
+ });
164
+
165
+ // Validate and update saved value of TIME fields upon blur.
166
+ time_inputs
167
+ .bind( 'blur.timespan', function() {
168
+ // Validate contents of this field.
169
+ var time = parseTime( this.value );
170
+ if( ! time ) {
171
+ // This field is invalid.
172
+ reset_invalid( $(this) );
173
+ } else {
174
+ // Value is valid, so store it for later use (below).
175
+ $(this).data( 'timespan.stored', this.value );
176
+ // Re-format contents of field correctly (in case parsable but not
177
+ // perfect).
178
+ $(this).val( formatTime( time.hour, time.minute, false ) );
179
+ }
180
+ });
181
+
182
+ // When start date/time are modified, update end date/time by shifting the
183
+ // appropriate amount.
184
+ start_date_input.add( o.start_time_input )
185
+ .bind( 'focus.timespan', function() {
186
+ // Calculate the time difference between start & end and save it.
187
+ var start_date_val = parseDate( start_date_input.val(), false ).getTime() / 1000;
188
+ var start_time_val = parseTime( start_time_input.val() );
189
+ start_date_val += start_time_val.hour * 3600 + start_time_val.minute * 60;
190
+ var end_date_val = parseDate( end_date_input.val(), false ).getTime() / 1000;
191
+ var end_time_val = parseTime( end_time_input.val() );
192
+ end_date_val += end_time_val.hour * 3600 + end_time_val.minute * 60;
193
+ start_date_input.data( 'time_diff', end_date_val - start_date_val );
194
+ } )
195
+ .bind( 'blur.timespan', function() {
196
+ var start_date_val = parseDate( start_date_input.data( 'timespan.stored' ), false );
197
+ var start_time_val = parseTime( start_time_input.data( 'timespan.stored' ) );
198
+ // Shift end date/time as appropriate.
199
+ var end_time_val = start_date_val.getTime() / 1000
200
+ + start_time_val.hour * 3600 + start_time_val.minute * 60
201
+ + start_date_input.data( 'time_diff' );
202
+ end_time_val = new Date( end_time_val * 1000 );
203
+ end_date_input.val( formatDate( end_time_val, false ) );
204
+ end_time_input.val( formatTime( end_time_val.getUTCHours(), end_time_val.getUTCMinutes(), false ) );
205
+ } );
206
+
207
+ // Validation upon form submission
208
+ start_date_input.closest( 'form' )
209
+ .bind( 'submit.timespan', function() {
210
+ // Update hidden field values with chosen date/time.
211
+ //
212
+ // 1. Start date/time
213
+
214
+ // Convert Date object into UNIX timestamp for form submission
215
+ var unix_start_time = parseDate( start_date_input.val(), false ).getTime() / 1000;
216
+ // If parsed correctly, proceed to add the time.
217
+ if( ! isNaN( unix_start_time ) ) {
218
+ // Add time quantity to date, unless "All day" is checked.
219
+ if( ! allday.get(0).checked ) {
220
+ var time = parseTime( start_time_input.val() );
221
+ // If parsed correctly, proceed add its value.
222
+ if( time ) {
223
+ unix_start_time += time.hour * 3600 + time.minute * 60;
224
+ } else {
225
+ // Else entire calculation is invalid.
226
+ unix_start_time = '';
227
+ }
228
+ }
229
+ } else {
230
+ // Else entire calculation is invalid.
231
+ unix_start_time = '';
232
+ }
233
+ // Set start date value to valid unix time, or empty string, depending
234
+ // on above validation.
235
+ start_time.val( unix_start_time );
236
+
237
+ // 2. End date/time
238
+
239
+ // Convert Date object into UNIX timestamp for form submission
240
+ var unix_end_time = parseDate( end_date_input.val(), false ).getTime() / 1000;
241
+ // If parsed correctly, proceed to add the time.
242
+ if( ! isNaN( unix_end_time ) ) {
243
+ // If "All day" is checked, store an end date that is one day
244
+ // *after* the start date (following iCalendar spec).
245
+ if( allday.get(0).checked ) {
246
+ unix_end_time += 24 * 60 * 60;
247
+ // Else add time quantity to date.
248
+ } else {
249
+ var time = parseTime( end_time_input.val() );
250
+ // If parsed correctly, proceed add its value.
251
+ if( time ) {
252
+ unix_end_time += time.hour * 3600 + time.minute * 60;
253
+ } else {
254
+ // Else entire calculation is invalid.
255
+ unix_end_time = '';
256
+ }
257
+ }
258
+ } else {
259
+ // Else entire calculation is invalid.
260
+ unix_end_time = '';
261
+ }
262
+ // Set end date value to valid unix time, or empty string, depending
263
+ // on above validation.
264
+ end_time.val( unix_end_time );
265
+ } );
266
+
267
+ // Store original form values
268
+ start_time.data( 'timespan.initial_value', start_time.val() );
269
+ end_time.data( 'timespan.initial_value', end_time.val() );
270
+ allday.data( 'timespan.initial_value', allday.get(0).checked );
271
+
272
+ // Initialize input fields
273
+ reset( start_date_input,
274
+ start_time_input,
275
+ start_time,
276
+ end_date_input,
277
+ end_time_input,
278
+ end_time,
279
+ allday,
280
+ o.twentyfour_hour,
281
+ o.now )
282
+
283
+ return this;
284
+ },
285
+
286
+ /**
287
+ * Reset values to defaults.
288
+ */
289
+ reset: function( options )
290
+ {
291
+ var o = $.extend( {}, default_options, options );
292
+
293
+ reset( $(o.start_date_input),
294
+ $(o.start_time_input),
295
+ $(o.start_time),
296
+ $(o.end_date_input),
297
+ $(o.end_time_input),
298
+ $(o.end_time),
299
+ $(o.allday),
300
+ o.twentyfour_hour,
301
+ o.now );
302
+
303
+ return this;
304
+ },
305
+
306
+ /**
307
+ * Destroy registered event handlers.
308
+ */
309
+ destroy: function( options )
310
+ {
311
+ options = $.extend( {}, default_options, options );
312
+
313
+ $.each( options, function( option_name, value ) {
314
+ $(value).unbind( '.timespan' );
315
+ } );
316
+ $(options.start_date_input).closest('form').unbind( '.timespan' );
317
+
318
+ return this;
319
+ }
320
+ }
321
+
322
+ /**
323
+ * Main jQuery plugin definition
324
+ */
325
+
326
+ $.timespan = function( arg )
327
+ {
328
+ // Method calling logic
329
+ if( methods[arg] ) {
330
+ return methods[arg].apply( this, Array.prototype.slice.call( arguments, 1 ));
331
+ } else if( typeof arg === 'object' || ! arg ) {
332
+ return methods.init.apply( this, arguments );
333
+ } else {
334
+ $.error( 'Method ' + arg + ' does not exist on jQuery.timespan' );
335
+ }
336
+ };
337
+ })( jQuery );
js/settings.js CHANGED
@@ -1 +1,4 @@
1
- jQuery(function(a){a(".if-js-closed").removeClass("if-js-closed").addClass("closed");postboxes.add_postbox_toggles(ai1ec_settings_page)});
 
 
 
1
+ jQuery( function( $ ) {
2
+ $('.if-js-closed').removeClass('if-js-closed').addClass('closed');
3
+ postboxes.add_postbox_toggles( ai1ec_settings_page );
4
+ });
lib/iCalUtilityFunctions.class.php CHANGED
File without changes
lib/iCalcreator.class.php CHANGED
File without changes
readme.txt CHANGED
@@ -4,12 +4,13 @@ Donate link: http://theseedstudio.com/software/all-in-one-event-calendar-wordpre
4
  Tags: calendar, event, events, ics, ics calendar, ical-feed, ics feed, wordpress ics importer, wordpress ical importer, upcoming events, todo, notes, journal, freebusy, availability, web calendar, web events, webcal, google calendar, ical, iCalendar, all-in-one, ai1ec, google calendar sync, ical sync, events sync, holiday calendar, calendar 2011, events 2011
5
  Requires at least: 3.1.3
6
  Tested up to: 3.2.1
7
- Stable tag: 1.0.3
8
 
9
  An event calendar system with month and agenda calendar views, color-coded categories, recurring events, and import/export of iCalendar (.ics) feeds.
10
 
11
  == Description ==
12
- **Important notice:** You need to re-enable the plugin after updating to version `1.0.3`.
 
13
 
14
  Welcome to the All-in-One Event Calendar Plugin, a new way to list your events in WordPress and easily share them with the rest of the world.
15
 
@@ -48,13 +49,18 @@ The All-in-One Event Calendar Plugin also has a few features that will prove use
48
  * Each event links to the original calendar
49
  * Your calendar can be embedded into a WordPress page without needing to create template files or modify the theme
50
 
51
- [Check out the demo »](http://thenelsonpost.ca/calendar/)
52
 
53
  == Changelog ==
54
 
 
 
 
 
 
55
  = Version 1.0.3 =
56
  * Changed plugin name from `All-in-One Events Calendar` to `All-in-One Event Calendar`
57
- * **Important notice:** You need to re-enable the plugin after updating to version `1.0.3`.
58
 
59
  = Version 1.0.2 =
60
  * Fixed the URL for settings page that is displayed in the notice
@@ -68,9 +74,18 @@ The All-in-One Event Calendar Plugin also has a few features that will prove use
68
  == Installation ==
69
 
70
  1. Upload `all-in-one-event-calendar` to the `/wp-content/plugins/` directory.
71
- 1. Activate the plugin through the **Plugins** menu item in the WordPress Dashboard.
72
- 1. Once the plugin is activated, follow the instructions in the notice to configure it.
73
- **For advanced users:** To place the calendar in an HTML element besides the default page content container, enter a CSS or jQuery-style selector of the element in the **Contain calendar in this DOM element** field of the Settings page.
 
 
 
 
 
 
 
 
 
74
 
75
  == Screenshots ==
76
 
@@ -84,3 +99,8 @@ The All-in-One Event Calendar Plugin also has a few features that will prove use
84
  8. Front-end: Month view of calendar with active tag filter
85
  9. Front-end: Agenda view of calendar
86
  10. Settings page
 
 
 
 
 
4
  Tags: calendar, event, events, ics, ics calendar, ical-feed, ics feed, wordpress ics importer, wordpress ical importer, upcoming events, todo, notes, journal, freebusy, availability, web calendar, web events, webcal, google calendar, ical, iCalendar, all-in-one, ai1ec, google calendar sync, ical sync, events sync, holiday calendar, calendar 2011, events 2011
5
  Requires at least: 3.1.3
6
  Tested up to: 3.2.1
7
+ Stable tag: 1.0.4
8
 
9
  An event calendar system with month and agenda calendar views, color-coded categories, recurring events, and import/export of iCalendar (.ics) feeds.
10
 
11
  == Description ==
12
+
13
+ **Important notice:** When upgrading to version `1.0.3` you must reactivate the plugin.
14
 
15
  Welcome to the All-in-One Event Calendar Plugin, a new way to list your events in WordPress and easily share them with the rest of the world.
16
 
49
  * Each event links to the original calendar
50
  * Your calendar can be embedded into a WordPress page without needing to create template files or modify the theme
51
 
52
+ [Check out the demo »](http://demo.theseedstudio.com/calendar/)
53
 
54
  == Changelog ==
55
 
56
+ = Version 1.0.4 =
57
+ * Improved layout of buttons around map in single event view
58
+ * Set Content-Type to text/calendar for exported iCalendar feeds
59
+ * Added Donate button to Settings screen
60
+
61
  = Version 1.0.3 =
62
  * Changed plugin name from `All-in-One Events Calendar` to `All-in-One Event Calendar`
63
+ * **Important notice:** When upgrading to version `1.0.3` you must reactivate the plugin.
64
 
65
  = Version 1.0.2 =
66
  * Fixed the URL for settings page that is displayed in the notice
74
  == Installation ==
75
 
76
  1. Upload `all-in-one-event-calendar` to the `/wp-content/plugins/` directory.
77
+ 2. Activate the plugin through the **Plugins** menu item in the WordPress Dashboard.
78
+ 3. Once the plugin is activated, follow the instructions in the notice to configure it.
79
+
80
+ **Important notice:** When upgrading to version `1.0.3` you must reactivate the plugin.
81
+
82
+ = For advanced users: =
83
+
84
+ To place the calendar in a DOM/HTML element besides the default page content container without modifying the theme:
85
+
86
+ 1. Navigate to **Events** > **Settings** in the WordPress Dashboard.
87
+ 2. Enter a CSS or jQuery-style selector of the target element in the **Contain calendar in this DOM element** field.
88
+ 3. Click **Update Settings**.
89
 
90
  == Screenshots ==
91
 
99
  8. Front-end: Month view of calendar with active tag filter
100
  9. Front-end: Agenda view of calendar
101
  10. Settings page
102
+
103
+ == Upgrade Notice ==
104
+
105
+ = 1.0.3 =
106
+ When upgrading to version `1.0.3` you must reactivate the plugin.