Version Description
This version fixes a CSS layout issue so the calendar works with WordPress 5.6.
Download this release
Release Info
Developer | zgrossbart |
Plugin | Editorial Calendar |
Version | 3.7.8 |
Comparing to | |
See all releases |
Code changes from version 3.7.7 to 3.7.8
- 3.7.8/.jshintrc +25 -0
- 3.7.8/LICENSE.txt +236 -0
- 3.7.8/closure.sh +3 -0
- 3.7.8/edcal.css +633 -0
- 3.7.8/edcal.js +2733 -0
- 3.7.8/edcal.min.js +71 -0
- 3.7.8/edcal.php +1420 -0
- 3.7.8/edcal_rtl.css +60 -0
- 3.7.8/edcal_test.js +587 -0
- 3.7.8/images/month-present_bk.gif +0 -0
- 3.7.8/images/tip_close.png +0 -0
- 3.7.8/images/today_bk.gif +0 -0
- 3.7.8/languages/editorial-calendar-cs_CZ.mo +0 -0
- 3.7.8/languages/editorial-calendar-cs_CZ.po +192 -0
- 3.7.8/languages/editorial-calendar-da_DK.mo +0 -0
- 3.7.8/languages/editorial-calendar-da_DK.po +279 -0
- 3.7.8/languages/editorial-calendar-de_DE.mo +0 -0
- 3.7.8/languages/editorial-calendar-de_DE.po +307 -0
- 3.7.8/languages/editorial-calendar-el.mo +0 -0
- 3.7.8/languages/editorial-calendar-el.po +199 -0
- 3.7.8/languages/editorial-calendar-es_ES.mo +0 -0
- 3.7.8/languages/editorial-calendar-es_ES.po +279 -0
- 3.7.8/languages/editorial-calendar-fr_FR.mo +0 -0
- 3.7.8/languages/editorial-calendar-fr_FR.po +189 -0
- 3.7.8/languages/editorial-calendar-he_IL.mo +0 -0
- 3.7.8/languages/editorial-calendar-he_IL.po +247 -0
- 3.7.8/languages/editorial-calendar-hr.mo +0 -0
- 3.7.8/languages/editorial-calendar-hr.po +146 -0
- 3.7.8/languages/editorial-calendar-it_IT.mo +0 -0
- 3.7.8/languages/editorial-calendar-it_IT.po +279 -0
- 3.7.8/languages/editorial-calendar-ja.mo +0 -0
- 3.7.8/languages/editorial-calendar-ja.po +247 -0
- 3.7.8/languages/editorial-calendar-lt_LT.mo +0 -0
- 3.7.8/languages/editorial-calendar-lt_LT.po +311 -0
- 3.7.8/languages/editorial-calendar-nb_NO.mo +0 -0
- 3.7.8/languages/editorial-calendar-nb_NO.po +245 -0
- 3.7.8/languages/editorial-calendar-nl_NL.mo +0 -0
- 3.7.8/languages/editorial-calendar-nl_NL.po +239 -0
- 3.7.8/languages/editorial-calendar-pl_PL.mo +0 -0
- 3.7.8/languages/editorial-calendar-pl_PL.po +198 -0
- 3.7.8/languages/editorial-calendar-pt_BR.mo +0 -0
- 3.7.8/languages/editorial-calendar-pt_BR.po +189 -0
- 3.7.8/languages/editorial-calendar-ru_RU.mo +0 -0
- 3.7.8/languages/editorial-calendar-ru_RU.po +189 -0
- 3.7.8/languages/editorial-calendar-sv_SE.mo +0 -0
- 3.7.8/languages/editorial-calendar-sv_SE.po +313 -0
- 3.7.8/languages/editorial-calendar-template.pot +182 -0
- 3.7.8/languages/editorial-calendar-tr_TR.mo +0 -0
- 3.7.8/languages/editorial-calendar-tr_TR.po +331 -0
- 3.7.8/lib/date.extras.js +332 -0
- 3.7.8/lib/edcallib.min.js +78 -0
- 3.7.8/lib/humanmsg.css +40 -0
- 3.7.8/lib/humanmsg.js +190 -0
- 3.7.8/lib/jquery.bgiframe.js +104 -0
- 3.7.8/lib/jquery.cookie.js +96 -0
- 3.7.8/lib/jquery.delegate.js +56 -0
- 3.7.8/lib/jquery.mousewheel.js +84 -0
- 3.7.8/lib/jquery.timepicker.js +309 -0
- 3.7.8/lib/jquery.tools.min.js +27 -0
- 3.7.8/lib/json2.js +480 -0
- 3.7.8/lib/languages/date-cs-CZ.js +104 -0
- 3.7.8/lib/languages/date-da-DK.js +104 -0
- 3.7.8/lib/languages/date-de-DE.js +104 -0
- 3.7.8/lib/languages/date-el-GR.js +104 -0
- 3.7.8/lib/languages/date-en-US.js +104 -0
- 3.7.8/lib/languages/date-es-ES.js +104 -0
- 3.7.8/lib/languages/date-fr-FR.js +104 -0
- 3.7.8/lib/languages/date-he-IL.js +104 -0
- 3.7.8/lib/languages/date-hr-HR.js +104 -0
- 3.7.8/lib/languages/date-it-IT.js +104 -0
- 3.7.8/lib/languages/date-ja-JP.js +104 -0
- 3.7.8/lib/languages/date-lt-LT.js +104 -0
- 3.7.8/lib/languages/date-nb-NO.js +104 -0
- 3.7.8/lib/languages/date-nl-NL.js +104 -0
- 3.7.8/lib/languages/date-pl-PL.js +104 -0
- 3.7.8/lib/languages/date-pt-BR.js +104 -0
- 3.7.8/lib/languages/date-ru-RU.js +104 -0
- 3.7.8/lib/languages/date-sv-SE.js +104 -0
- 3.7.8/lib/languages/date-tr-TR.js +104 -0
- 3.7.8/lib/lib.txt +58 -0
- 3.7.8/lib/qunit.css +196 -0
- 3.7.8/lib/qunit.js +1341 -0
- 3.7.8/lib/sprintf-0.7-beta1.js +183 -0
- 3.7.8/lib/timePicker.css +26 -0
- 3.7.8/lib/tools.scrollable-1.1.2.js +439 -0
- 3.7.8/lib/tools.scrollable.mousewheel-1.0.1.js +103 -0
- 3.7.8/readme.txt +369 -0
3.7.8/.jshintrc
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"curly": true,
|
3 |
+
"bitwise": true,
|
4 |
+
"eqeqeq": true,
|
5 |
+
"es3": true,
|
6 |
+
"forin": true,
|
7 |
+
"freeze": true,
|
8 |
+
"immed": true,
|
9 |
+
"indent": 4,
|
10 |
+
"latedef": true,
|
11 |
+
"newcap": true,
|
12 |
+
"noarg": true,
|
13 |
+
"noempty": true,
|
14 |
+
"nonbsp": true,
|
15 |
+
"nonew": true,
|
16 |
+
"quotmark": true,
|
17 |
+
"undef": true,
|
18 |
+
"browser": true,
|
19 |
+
"jquery": true,
|
20 |
+
"devel": true,
|
21 |
+
"predef": [ "sprintf", "ajaxurl", "humanMsg", "edcal_test" ],
|
22 |
+
"maxparams": 7,
|
23 |
+
"maxdepth": 7,
|
24 |
+
"maxcomplexity": 14
|
25 |
+
}
|
3.7.8/LICENSE.txt
ADDED
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Apache License
|
2 |
+
Version 2.0, January 2004
|
3 |
+
http://www.apache.org/licenses/
|
4 |
+
|
5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6 |
+
|
7 |
+
1. Definitions.
|
8 |
+
|
9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
11 |
+
|
12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13 |
+
the copyright owner that is granting the License.
|
14 |
+
|
15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
16 |
+
other entities that control, are controlled by, or are under common
|
17 |
+
control with that entity. For the purposes of this definition,
|
18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
19 |
+
direction or management of such entity, whether by contract or
|
20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22 |
+
|
23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24 |
+
exercising permissions granted by this License.
|
25 |
+
|
26 |
+
"Source" form shall mean the preferred form for making modifications,
|
27 |
+
including but not limited to software source code, documentation
|
28 |
+
source, and configuration files.
|
29 |
+
|
30 |
+
"Object" form shall mean any form resulting from mechanical
|
31 |
+
transformation or translation of a Source form, including but
|
32 |
+
not limited to compiled object code, generated documentation,
|
33 |
+
and conversions to other media types.
|
34 |
+
|
35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
36 |
+
Object form, made available under the License, as indicated by a
|
37 |
+
copyright notice that is included in or attached to the work
|
38 |
+
(an example is provided in the Appendix below).
|
39 |
+
|
40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41 |
+
form, that is based on (or derived from) the Work and for which the
|
42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
44 |
+
of this License, Derivative Works shall not include works that remain
|
45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46 |
+
the Work and Derivative Works thereof.
|
47 |
+
|
48 |
+
"Contribution" shall mean any work of authorship, including
|
49 |
+
the original version of the Work and any modifications or additions
|
50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
54 |
+
means any form of electronic, verbal, or written communication sent
|
55 |
+
to the Licensor or its representatives, including but not limited to
|
56 |
+
communication on electronic mailing lists, source code control systems,
|
57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
59 |
+
excluding communication that is conspicuously marked or otherwise
|
60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
61 |
+
|
62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
64 |
+
subsequently incorporated within the Work.
|
65 |
+
|
66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
71 |
+
Work and such Derivative Works in Source or Object form.
|
72 |
+
|
73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76 |
+
(except as stated in this section) patent license to make, have made,
|
77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78 |
+
where such license applies only to those patent claims licensable
|
79 |
+
by such Contributor that are necessarily infringed by their
|
80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
82 |
+
institute patent litigation against any entity (including a
|
83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84 |
+
or a Contribution incorporated within the Work constitutes direct
|
85 |
+
or contributory patent infringement, then any patent licenses
|
86 |
+
granted to You under this License for that Work shall terminate
|
87 |
+
as of the date such litigation is filed.
|
88 |
+
|
89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
90 |
+
Work or Derivative Works thereof in any medium, with or without
|
91 |
+
modifications, and in Source or Object form, provided that You
|
92 |
+
meet the following conditions:
|
93 |
+
|
94 |
+
(a) You must give any other recipients of the Work or
|
95 |
+
Derivative Works a copy of this License; and
|
96 |
+
|
97 |
+
(b) You must cause any modified files to carry prominent notices
|
98 |
+
stating that You changed the files; and
|
99 |
+
|
100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
101 |
+
that You distribute, all copyright, patent, trademark, and
|
102 |
+
attribution notices from the Source form of the Work,
|
103 |
+
excluding those notices that do not pertain to any part of
|
104 |
+
the Derivative Works; and
|
105 |
+
|
106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107 |
+
distribution, then any Derivative Works that You distribute must
|
108 |
+
include a readable copy of the attribution notices contained
|
109 |
+
within such NOTICE file, excluding those notices that do not
|
110 |
+
pertain to any part of the Derivative Works, in at least one
|
111 |
+
of the following places: within a NOTICE text file distributed
|
112 |
+
as part of the Derivative Works; within the Source form or
|
113 |
+
documentation, if provided along with the Derivative Works; or,
|
114 |
+
within a display generated by the Derivative Works, if and
|
115 |
+
wherever such third-party notices normally appear. The contents
|
116 |
+
of the NOTICE file are for informational purposes only and
|
117 |
+
do not modify the License. You may add Your own attribution
|
118 |
+
notices within Derivative Works that You distribute, alongside
|
119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
120 |
+
that such additional attribution notices cannot be construed
|
121 |
+
as modifying the License.
|
122 |
+
|
123 |
+
You may add Your own copyright statement to Your modifications and
|
124 |
+
may provide additional or different license terms and conditions
|
125 |
+
for use, reproduction, or distribution of Your modifications, or
|
126 |
+
for any such Derivative Works as a whole, provided Your use,
|
127 |
+
reproduction, and distribution of the Work otherwise complies with
|
128 |
+
the conditions stated in this License.
|
129 |
+
|
130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
132 |
+
by You to the Licensor shall be under the terms and conditions of
|
133 |
+
this License, without any additional terms or conditions.
|
134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135 |
+
the terms of any separate license agreement you may have executed
|
136 |
+
with Licensor regarding such Contributions.
|
137 |
+
|
138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
140 |
+
except as required for reasonable and customary use in describing the
|
141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
142 |
+
|
143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144 |
+
agreed to in writing, Licensor provides the Work (and each
|
145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147 |
+
implied, including, without limitation, any warranties or conditions
|
148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150 |
+
appropriateness of using or redistributing the Work and assume any
|
151 |
+
risks associated with Your exercise of permissions under this License.
|
152 |
+
|
153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
154 |
+
whether in tort (including negligence), contract, or otherwise,
|
155 |
+
unless required by applicable law (such as deliberate and grossly
|
156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157 |
+
liable to You for damages, including any direct, indirect, special,
|
158 |
+
incidental, or consequential damages of any character arising as a
|
159 |
+
result of this License or out of the use or inability to use the
|
160 |
+
Work (including but not limited to damages for loss of goodwill,
|
161 |
+
work stoppage, computer failure or malfunction, or any and all
|
162 |
+
other commercial damages or losses), even if such Contributor
|
163 |
+
has been advised of the possibility of such damages.
|
164 |
+
|
165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168 |
+
or other liability obligations and/or rights consistent with this
|
169 |
+
License. However, in accepting such obligations, You may act only
|
170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171 |
+
of any other Contributor, and only if You agree to indemnify,
|
172 |
+
defend, and hold each Contributor harmless for any liability
|
173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
174 |
+
of your accepting any such warranty or additional liability.
|
175 |
+
|
176 |
+
END OF TERMS AND CONDITIONS
|
177 |
+
|
178 |
+
APPENDIX: How to apply the Apache License to your work.
|
179 |
+
|
180 |
+
To apply the Apache License to your work, attach the following
|
181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182 |
+
replaced with your own identifying information. (Don't include
|
183 |
+
the brackets!) The text should be enclosed in the appropriate
|
184 |
+
comment syntax for the file format. We also recommend that a
|
185 |
+
file or class name and description of purpose be included on the
|
186 |
+
same "printed page" as the copyright notice for easier
|
187 |
+
identification within third-party archives.
|
188 |
+
|
189 |
+
Copyright [yyyy] [name of copyright owner]
|
190 |
+
|
191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192 |
+
you may not use this file except in compliance with the License.
|
193 |
+
You may obtain a copy of the License at
|
194 |
+
|
195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
196 |
+
|
197 |
+
Unless required by applicable law or agreed to in writing, software
|
198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200 |
+
See the License for the specific language governing permissions and
|
201 |
+
limitations under the License.
|
202 |
+
|
203 |
+
|
204 |
+
/*
|
205 |
+
* One-JAR� (http://www.simontuffs.com/one-jar). Copyright (c) 2004-2007,
|
206 |
+
* P. Simon Tuffs (simon@simontuffs.com). All rights reserved.
|
207 |
+
*
|
208 |
+
* Redistribution and use in source and binary forms, with or without
|
209 |
+
* modification, are permitted provided that the following conditions are met:
|
210 |
+
*
|
211 |
+
* Redistributions of source code must retain the above copyright notice, this
|
212 |
+
* list of conditions and the following disclaimer.
|
213 |
+
*
|
214 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
215 |
+
* this list of conditions and the following disclaimer in the documentation
|
216 |
+
* and/or other materials provided with the distribution.
|
217 |
+
*
|
218 |
+
* Neither the name of P. Simon Tuffs, nor the names of any contributors,
|
219 |
+
* nor the name One-JAR may be used to endorse or promote products derived
|
220 |
+
* from this software without specific prior written permission.
|
221 |
+
*
|
222 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
223 |
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
224 |
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
225 |
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
226 |
+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
227 |
+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
228 |
+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
229 |
+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
230 |
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
231 |
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
232 |
+
* POSSIBILITY OF SUCH DAMAGE.
|
233 |
+
*
|
234 |
+
* Including this file inside the built One-JAR file conforms with these terms.
|
235 |
+
*/
|
236 |
+
|
3.7.8/closure.sh
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
java -jar closure/compiler.jar --js_output_file lib/edcallib.min.js --js lib/humanmsg.js --js lib/jquery.mousewheel.js --js lib/sprintf-0.7-beta1.js --js lib/jquery.cookie.js --js lib/jquery.bgiframe.js --js lib/jquery.delegate.js --js lib/jquery.tools.min.js --js lib/jquery.timepicker.js --js lib/json2.js --js lib/tools.scrollable-1.1.2.js --js lib/tools.scrollable.mousewheel-1.0.1.js --js lib/date.extras.js
|
2 |
+
|
3 |
+
java -jar closure/compiler.jar --js_output_file edcal.min.js --js edcal.js
|
3.7.8/edcal.css
ADDED
@@ -0,0 +1,633 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*******************************************************************************
|
2 |
+
*
|
3 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
+
* you may not use this file except in compliance with the License.
|
5 |
+
* You may obtain a copy of the License at
|
6 |
+
*
|
7 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
8 |
+
*
|
9 |
+
* Unless required by applicable law or agreed to in writing, software
|
10 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
+
* See the License for the specific language governing permissions and
|
13 |
+
* limitations under the License.
|
14 |
+
*
|
15 |
+
******************************************************************************/
|
16 |
+
|
17 |
+
/*
|
18 |
+
Table of Contents
|
19 |
+
- Reset
|
20 |
+
- Loading section
|
21 |
+
- Top bar #topbar, including prev/next month arrows at left and Show Today at right
|
22 |
+
- Drafts Drawer
|
23 |
+
- the Calendar Content #calcont
|
24 |
+
- day head container #dayheadcont [Monday, Tuesday etc]
|
25 |
+
- edcal scrollable area #edcal_scrollable [the main calendar pane]
|
26 |
+
- calendar #cal container
|
27 |
+
- day label table head
|
28 |
+
- row container .rowcont [absolutely positioned, top adjusted by js]
|
29 |
+
- row inner .row [positioned relative, within the rowcont
|
30 |
+
- days
|
31 |
+
- posts
|
32 |
+
- edcal_quickedit [new/edit posts popover]
|
33 |
+
- Screen options
|
34 |
+
- Feedback section [appears once after using the calendar 3 times]
|
35 |
+
*/
|
36 |
+
|
37 |
+
/*.row .day:first-child, .dayheadcont .dayhead:first-child {
|
38 |
+
margin-left:0 !important;
|
39 |
+
}
|
40 |
+
.rowcont { margin:0 !important; }
|
41 |
+
.day { float:left; }
|
42 |
+
*/
|
43 |
+
|
44 |
+
|
45 |
+
/* Reset & Utility */
|
46 |
+
|
47 |
+
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
|
48 |
+
background: none repeat scroll 0 0 transparent;
|
49 |
+
border: 0 none;
|
50 |
+
margin: 0;
|
51 |
+
outline: 0 none;
|
52 |
+
padding: 0;
|
53 |
+
}
|
54 |
+
.clearfix:before, .clearfix:after { content:'\0020'; display:block; height:0; visibility:hidden; }
|
55 |
+
.clearfix:after { clear:both; }
|
56 |
+
.clearfix { zoom:1; }
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
/* Loading section */
|
61 |
+
|
62 |
+
#loadingcont {
|
63 |
+
position: relative;
|
64 |
+
}
|
65 |
+
|
66 |
+
#loading, #draftsdrawer_loading {
|
67 |
+
background-image: url('images/loading.gif');
|
68 |
+
background-repeat: no-repeat;
|
69 |
+
position: absolute;
|
70 |
+
width: 43px;
|
71 |
+
height: 43px;
|
72 |
+
display: block;
|
73 |
+
left: 20em;
|
74 |
+
top: -1.5em;
|
75 |
+
}
|
76 |
+
|
77 |
+
.loadingclass > .postlink, .tiploading, .loadingclass:hover > .postlink {
|
78 |
+
background-image: url('images/loading_post.gif');
|
79 |
+
background-position: top right;
|
80 |
+
background-repeat: no-repeat;
|
81 |
+
cursor: auto;
|
82 |
+
}
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
/* Top bar */
|
87 |
+
|
88 |
+
#topbar {
|
89 |
+
margin-bottom: 1em;
|
90 |
+
margin-top: 1em;
|
91 |
+
height:2em;
|
92 |
+
}
|
93 |
+
#topbar .tablenav-pages a {
|
94 |
+
font-weight:normal;
|
95 |
+
}
|
96 |
+
#topleft.tablenav-pages {
|
97 |
+
float:left;
|
98 |
+
}
|
99 |
+
#nextmonth, #prevmonth {
|
100 |
+
font-size:12px;
|
101 |
+
}
|
102 |
+
#topright button {
|
103 |
+
margin-left: 2em;
|
104 |
+
margin-right: 6px;
|
105 |
+
text-decoration: none;
|
106 |
+
}
|
107 |
+
|
108 |
+
|
109 |
+
|
110 |
+
/* Drafts Drawer */
|
111 |
+
|
112 |
+
#draftsdrawer_cont {
|
113 |
+
height:100%;
|
114 |
+
float:right;
|
115 |
+
display:none;
|
116 |
+
}
|
117 |
+
#draftsdrawer {
|
118 |
+
font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
|
119 |
+
border:1px solid #dfdfdf;
|
120 |
+
padding-bottom:1px;
|
121 |
+
-moz-border-radius:4px;
|
122 |
+
-webkit-border-radius:4px;
|
123 |
+
-o-border-radius:4px;
|
124 |
+
border-radius:4px;
|
125 |
+
}
|
126 |
+
#draftsdrawer .dayheadcont { }
|
127 |
+
#draftsdrawer .dayhead {
|
128 |
+
float:none;
|
129 |
+
white-space: nowrap;
|
130 |
+
width: 100%;
|
131 |
+
overflow: hidden;
|
132 |
+
text-overflow: ellipsis;
|
133 |
+
min-width: 0px;
|
134 |
+
}
|
135 |
+
#draftsdrawer .day { border:0; }
|
136 |
+
#draftsdrawer .dayobj { height:auto; }
|
137 |
+
#draftsdrawer .postlist {
|
138 |
+
top:26px;
|
139 |
+
padding-left: 5px;
|
140 |
+
}
|
141 |
+
#draftsdrawer .posttime { display:none; }
|
142 |
+
#draftsdrawer_loading {
|
143 |
+
position:relative;
|
144 |
+
margin:2em 2em 0 2em;
|
145 |
+
top:0;
|
146 |
+
left:0;
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
/* Calendar container */
|
151 |
+
|
152 |
+
#cal_cont, #edcal_scrollable {
|
153 |
+
-x-system-font:none;
|
154 |
+
font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
|
155 |
+
font-size:11px;
|
156 |
+
font-size-adjust:none;
|
157 |
+
font-stretch:normal;
|
158 |
+
font-style:normal;
|
159 |
+
font-variant:normal;
|
160 |
+
font-weight:normal;
|
161 |
+
}
|
162 |
+
|
163 |
+
#cal_cont {
|
164 |
+
border:1px solid #dfdfdf;
|
165 |
+
padding-bottom:1px;
|
166 |
+
-moz-border-radius:4px;
|
167 |
+
-webkit-border-radius:4px;
|
168 |
+
-o-border-radius:4px;
|
169 |
+
border-radius:4px;
|
170 |
+
}
|
171 |
+
|
172 |
+
#edcal_scrollable {
|
173 |
+
/* required settings */
|
174 |
+
position:relative;
|
175 |
+
overflow:hidden;
|
176 |
+
|
177 |
+
/* This height will be reset with JavaScript */
|
178 |
+
height: 80vh;
|
179 |
+
margin-top: 5px;
|
180 |
+
margin-left: 4px;
|
181 |
+
margin-right: 2px;
|
182 |
+
}
|
183 |
+
|
184 |
+
#cal {
|
185 |
+
position:absolute;
|
186 |
+
|
187 |
+
/* this time we have very large space for the height */
|
188 |
+
height:100%;
|
189 |
+
margin-right: 10px;
|
190 |
+
}
|
191 |
+
|
192 |
+
|
193 |
+
|
194 |
+
/* Day label table head */
|
195 |
+
|
196 |
+
.dayheadcont, .draftsdrawerheadcont {
|
197 |
+
position: relative;
|
198 |
+
height: 34px;
|
199 |
+
top: 0px;
|
200 |
+
background:#e9e9e9;
|
201 |
+
background-image:-moz-linear-gradient(top,#f4f4f4,#e9e9e9);
|
202 |
+
background-image:-o-linear-gradient(top,#f4f4f4,#e9e9e9);
|
203 |
+
background-image:-webkit-gradient(linear,left top,left bottom,from(#f4f4f4),to(#e9e9e9));
|
204 |
+
background-image:-webkit-linear-gradient(top,#f4f4f4,#e9e9e9);
|
205 |
+
background-image:linear-gradient(top,#f4f4f4,#e9e9e9);
|
206 |
+
font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;
|
207 |
+
font-size:14px;
|
208 |
+
border-top:1px solid #fff;
|
209 |
+
border-bottom:1px solid #dfdfdf;
|
210 |
+
-moz-border-radius:3px 3px 0 0;
|
211 |
+
-webkit-border-radius:3px 3px 0 0
|
212 |
+
-o-border-radius:3px 3px 0 0
|
213 |
+
border-radius:3px 3px 0 0
|
214 |
+
}
|
215 |
+
|
216 |
+
.dayhead {
|
217 |
+
text-align: left;
|
218 |
+
text-indent: 5px;
|
219 |
+
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
|
220 |
+
color: #000;
|
221 |
+
line-height: 2.4em;
|
222 |
+
min-width: 10em;
|
223 |
+
float:left;
|
224 |
+
}
|
225 |
+
|
226 |
+
.dayhead.firstday {
|
227 |
+
margin-left: 5px;
|
228 |
+
}
|
229 |
+
|
230 |
+
.dayhead.lastday {
|
231 |
+
}
|
232 |
+
|
233 |
+
|
234 |
+
|
235 |
+
/* Rows */
|
236 |
+
|
237 |
+
.edcal_row {
|
238 |
+
height: 100%;
|
239 |
+
}
|
240 |
+
|
241 |
+
|
242 |
+
|
243 |
+
/* Days */
|
244 |
+
|
245 |
+
.day {
|
246 |
+
border: 1px solid #ccc; /* this will add to total height in IE. So, 100% + 2px */
|
247 |
+
-moz-border-radius:3px;
|
248 |
+
-webkit-border-radius:3px;
|
249 |
+
-o-border-radius:3px;
|
250 |
+
border-radius:3px;
|
251 |
+
background: white;
|
252 |
+
}
|
253 |
+
|
254 |
+
.day.beforeToday {
|
255 |
+
background: #ececec;
|
256 |
+
/* background: #f9f9f9;*/
|
257 |
+
}
|
258 |
+
|
259 |
+
.day.todayAndAfter {
|
260 |
+
background: #fff;
|
261 |
+
}
|
262 |
+
|
263 |
+
.day.day-active {
|
264 |
+
background-color: lightyellow;
|
265 |
+
}
|
266 |
+
|
267 |
+
.scrollHover {
|
268 |
+
background: lightblue;
|
269 |
+
}
|
270 |
+
|
271 |
+
.dayobj {
|
272 |
+
position: relative;
|
273 |
+
width: 100%;
|
274 |
+
height: 100%;
|
275 |
+
}
|
276 |
+
|
277 |
+
.firstOfMonth .dayobj {
|
278 |
+
background-color: #eaf2fb;
|
279 |
+
-moz-border-radius:2px;
|
280 |
+
-webkit-border-radius:2px;
|
281 |
+
-o-border-radius:2px;
|
282 |
+
border-radius:2px;
|
283 |
+
}
|
284 |
+
|
285 |
+
.daylabel {
|
286 |
+
position: absolute;
|
287 |
+
top: 0px;
|
288 |
+
right: 0px;
|
289 |
+
left: 0px;
|
290 |
+
font-weight:bold;
|
291 |
+
text-align: right;
|
292 |
+
padding-right: 10px;
|
293 |
+
line-height:1.8em;
|
294 |
+
-moz-border-radius:2px 2px 0 0;
|
295 |
+
-webkit-border-radius:2px 2px 0 0;
|
296 |
+
-o-border-radius:2px 2px 0 0;
|
297 |
+
border-radius:2px 2px 0 0;
|
298 |
+
}
|
299 |
+
|
300 |
+
.day.month-present .daylabel {
|
301 |
+
border-bottom:1px solid #dfdfdf;
|
302 |
+
background:#e9e9e9;
|
303 |
+
background-image:-moz-linear-gradient(top,#f4f4f4,#e9e9e9);
|
304 |
+
background-image:-o-linear-gradient(top,#f4f4f4,#e9e9e9);
|
305 |
+
background-image:-webkit-gradient(linear,left top,left bottom,from(#f4f4f4),to(#e9e9e9));
|
306 |
+
background-image:-webkit-linear-gradient(top,#f4f4f4,#e9e9e9);
|
307 |
+
background-image:linear-gradient(top,#f4f4f4,#e9e9e9);
|
308 |
+
}
|
309 |
+
|
310 |
+
.daynewlink {
|
311 |
+
position: absolute;
|
312 |
+
top: 0px;
|
313 |
+
left: 0px;
|
314 |
+
display: none;
|
315 |
+
padding-left: 0.5em;
|
316 |
+
padding-right: 0em;
|
317 |
+
text-decoration: none;
|
318 |
+
font-size:10px;
|
319 |
+
z-index: 10;
|
320 |
+
overflow: hidden;
|
321 |
+
height: 1.5em;
|
322 |
+
white-space: nowrap;
|
323 |
+
text-overflow: ellipsis;
|
324 |
+
width: 70%;
|
325 |
+
}
|
326 |
+
|
327 |
+
.day.today .daylabel {
|
328 |
+
color: white;
|
329 |
+
text-shadow:0 -1px 0 rgba(0,0,0,0.3);
|
330 |
+
background:#8cc1e9;
|
331 |
+
background-image:-webkit-gradient(linear,left bottom,left top,from(#72a7cf),to(#8cc1e9));
|
332 |
+
background-image:-webkit-linear-gradient(bottom,#72a7cf,#8cc1e9);
|
333 |
+
background-image:-moz-linear-gradient(bottom,#72a7cf,#8cc1e9);
|
334 |
+
background-image:-o-linear-gradient(bottom,#72a7cf,#8cc1e9);
|
335 |
+
background-image:linear-gradient(to top,#72a7cf,#8cc1e9);
|
336 |
+
}
|
337 |
+
|
338 |
+
.today .daynewlink {
|
339 |
+
color: white;
|
340 |
+
}
|
341 |
+
|
342 |
+
|
343 |
+
|
344 |
+
/* Posts */
|
345 |
+
|
346 |
+
.post {
|
347 |
+
display: block;
|
348 |
+
list-style-type: none;
|
349 |
+
z-index: 10;
|
350 |
+
margin-left: 2px;
|
351 |
+
margin-right: 2px;
|
352 |
+
font-size: 10px;
|
353 |
+
padding: 0px;
|
354 |
+
}
|
355 |
+
|
356 |
+
.posttime {
|
357 |
+
font-weight: bold;
|
358 |
+
}
|
359 |
+
|
360 |
+
.post.draggable .postlink {
|
361 |
+
cursor: move;
|
362 |
+
}
|
363 |
+
|
364 |
+
.post .postactions {
|
365 |
+
display: none;
|
366 |
+
}
|
367 |
+
|
368 |
+
.postactions a {
|
369 |
+
text-decoration:none;
|
370 |
+
}
|
371 |
+
|
372 |
+
.post .postlink:hover {
|
373 |
+
color: #d54e21;
|
374 |
+
background-color: #f5f5f5;
|
375 |
+
}
|
376 |
+
|
377 |
+
.publish, .post.readonly {
|
378 |
+
color: #a4a4a4;
|
379 |
+
font-weight:normal;
|
380 |
+
}
|
381 |
+
|
382 |
+
.postlist {
|
383 |
+
position: relative;
|
384 |
+
top:24px; /* 1.5em; */
|
385 |
+
overflow: auto;
|
386 |
+
}
|
387 |
+
|
388 |
+
.postlist li {
|
389 |
+
margin-bottom: 8px;
|
390 |
+
}
|
391 |
+
|
392 |
+
/*.page-numbers {
|
393 |
+
text-decoration: none;
|
394 |
+
border-bottom-style: none;
|
395 |
+
border: none;
|
396 |
+
background: white;
|
397 |
+
color: #21759B;
|
398 |
+
}*/
|
399 |
+
|
400 |
+
|
401 |
+
|
402 |
+
/* Quick Add/Edit Tooltip */
|
403 |
+
|
404 |
+
#edcal_quickedit {
|
405 |
+
background: #f4f4f4;
|
406 |
+
width:500px;
|
407 |
+
border:1px solid #dfdfdf;
|
408 |
+
-moz-border-radius:3px;
|
409 |
+
-webkit-border-radius:3px;
|
410 |
+
-o-border-radius:3px;
|
411 |
+
border-radius:3px;
|
412 |
+
-moz-box-shadow:0 4px 8px #c8c8c8, 0 1px 0 #FFFFFF inset;
|
413 |
+
-webkit-box-shadow:0 4px 8px #c8c8c8, 0 1px 0 #FFFFFF inset;
|
414 |
+
-o-box-shadow:0 4px 8px #c8c8c8, 0 1px 0 #FFFFFF inset;
|
415 |
+
box-shadow:0 4px 8px #c8c8c8, 0 1px 0 #FFFFFF inset;
|
416 |
+
position: relative;
|
417 |
+
z-index: 25;
|
418 |
+
}
|
419 |
+
|
420 |
+
.edcal_quickedit {
|
421 |
+
padding: 10px;
|
422 |
+
position: relative;
|
423 |
+
border-top:1px solid #fff;
|
424 |
+
}
|
425 |
+
|
426 |
+
#tooltiphead {
|
427 |
+
background: #e9e9e9;
|
428 |
+
background-image:-moz-linear-gradient(top,#f4f4f4,#e9e9e9);
|
429 |
+
background-image:-o-linear-gradient(top,#f4f4f4,#e9e9e9);
|
430 |
+
background-image:-webkit-gradient(linear,left top,left bottom,from(#f4f4f4),to(#e9e9e9));
|
431 |
+
background-image:-webkit-linear-gradient(top,#f4f4f4,#e9e9e9);
|
432 |
+
background-image:linear-gradient(top,#f4f4f4,#e9e9e9);
|
433 |
+
}
|
434 |
+
|
435 |
+
#tooltiptitle {
|
436 |
+
border-bottom:1px solid #dfdfdf;
|
437 |
+
color:#464646;
|
438 |
+
font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;
|
439 |
+
font-size:15px;
|
440 |
+
font-weight:normal;
|
441 |
+
line-height:1;
|
442 |
+
position:relative;
|
443 |
+
text-shadow: #fff 0px 1px 0px;
|
444 |
+
padding:7px 10px;
|
445 |
+
margin:1px 0 0;
|
446 |
+
}
|
447 |
+
|
448 |
+
#tipclose {
|
449 |
+
width: 15px;
|
450 |
+
height: 15px;
|
451 |
+
position: absolute;
|
452 |
+
top:8px;
|
453 |
+
right:10px;
|
454 |
+
}
|
455 |
+
|
456 |
+
#edcal_quickedit .inline-edit-row fieldset {
|
457 |
+
padding-bottom:1.2em;
|
458 |
+
}
|
459 |
+
|
460 |
+
#edcal-title { /* not sure this is being used */
|
461 |
+
padding-top: 0.5em;
|
462 |
+
padding-bottom: 0.5em;
|
463 |
+
}
|
464 |
+
|
465 |
+
/*
|
466 |
+
TinyMCE Rich Editor and Media buttons are not currently used
|
467 |
+
#edcal_quickedit .mceEditor,*/
|
468 |
+
#edcal_quickedit textarea {
|
469 |
+
height: 15em;
|
470 |
+
}
|
471 |
+
|
472 |
+
/*
|
473 |
+
#edcal_quickedit #cal_mediabar {
|
474 |
+
font-size: 11px;
|
475 |
+
}
|
476 |
+
|
477 |
+
#edcal_quickedit #media-buttons {
|
478 |
+
padding: 5px 0;
|
479 |
+
}*/
|
480 |
+
|
481 |
+
#edcal_quickedit #edcal-time {
|
482 |
+
width: 9em;
|
483 |
+
background-color: white;
|
484 |
+
}
|
485 |
+
|
486 |
+
#edcal-author-p {
|
487 |
+
line-height:1.8em;
|
488 |
+
padding-left:0.2em;
|
489 |
+
}
|
490 |
+
|
491 |
+
#edit-slug-buttons {
|
492 |
+
position: relative;
|
493 |
+
margin:0;
|
494 |
+
padding:0 0 0.5em 0;
|
495 |
+
}
|
496 |
+
|
497 |
+
#edit-slug-buttons a {
|
498 |
+
}
|
499 |
+
|
500 |
+
#newPostScheduleButton {
|
501 |
+
position: absolute;
|
502 |
+
right: 0;
|
503 |
+
top: -5px;
|
504 |
+
}
|
505 |
+
|
506 |
+
#newPostScheduleButton.disabled {
|
507 |
+
color:#9FD0D5!important;
|
508 |
+
background:#298CBA!important;
|
509 |
+
}
|
510 |
+
|
511 |
+
/* End Add/Edit Tooltip */
|
512 |
+
|
513 |
+
|
514 |
+
|
515 |
+
/* Screen Options */
|
516 |
+
|
517 |
+
#edcal_weeks_pref {
|
518 |
+
width: 4em;
|
519 |
+
}
|
520 |
+
|
521 |
+
div.calendar-fields-prefs {
|
522 |
+
margin-bottom: 1em;
|
523 |
+
}
|
524 |
+
|
525 |
+
div.calendar-fields-prefs label {
|
526 |
+
margin-left: 1em;
|
527 |
+
line-height: normal;
|
528 |
+
vertical-align: baseline;
|
529 |
+
}
|
530 |
+
|
531 |
+
#edcal-qunit {
|
532 |
+
margin-top: 2em;
|
533 |
+
}
|
534 |
+
|
535 |
+
.optionscolorrow {
|
536 |
+
position: relative;
|
537 |
+
height: 20px;
|
538 |
+
}
|
539 |
+
|
540 |
+
.optionscolor {
|
541 |
+
width: 16px;
|
542 |
+
height: 16px;
|
543 |
+
margin-left: 1em;
|
544 |
+
display: block;
|
545 |
+
position: absolute;
|
546 |
+
top: 2px;
|
547 |
+
-moz-border-radius: 3px;
|
548 |
+
-webkit-border-radius: 3px;
|
549 |
+
opacity: 0.5;
|
550 |
+
|
551 |
+
}
|
552 |
+
|
553 |
+
.optionscolor:hover {
|
554 |
+
opacity: 1;
|
555 |
+
}
|
556 |
+
|
557 |
+
.colorselected {
|
558 |
+
opacity: 1;
|
559 |
+
}
|
560 |
+
|
561 |
+
.colorlabel {
|
562 |
+
-moz-border-radius: 4px;
|
563 |
+
-webkit-border-radius: 4px;
|
564 |
+
}
|
565 |
+
|
566 |
+
#screen-meta #show-edcal-settings-link.show-settings {
|
567 |
+
background-position: right -1px;
|
568 |
+
}
|
569 |
+
|
570 |
+
div.metabox-prefs {
|
571 |
+
padding-left: 10px;
|
572 |
+
}
|
573 |
+
|
574 |
+
#contextual-help-wrap {
|
575 |
+
margin-left: 8px;
|
576 |
+
padding: 0 0 10px;
|
577 |
+
}
|
578 |
+
|
579 |
+
|
580 |
+
|
581 |
+
/* Feedback section */
|
582 |
+
|
583 |
+
#feedbacksection {
|
584 |
+
margin-top: 15px;
|
585 |
+
padding: 1em;
|
586 |
+
-moz-border-radius: 3px;
|
587 |
+
-webkit-border-radius: 3px;
|
588 |
+
width: 55%;
|
589 |
+
min-width: 500px;
|
590 |
+
background-color: #eaf2fb;
|
591 |
+
font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
|
592 |
+
font-size:11px;
|
593 |
+
}
|
594 |
+
|
595 |
+
#feedbacksection h2 {
|
596 |
+
font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
|
597 |
+
font-size: 14.3px;
|
598 |
+
font-style: normal;
|
599 |
+
font-weight: bold;
|
600 |
+
color: #333333;
|
601 |
+
padding: 0px;
|
602 |
+
margin: 0px;
|
603 |
+
margin-top: -10px;
|
604 |
+
}
|
605 |
+
|
606 |
+
#nofeedbacklink {
|
607 |
+
margin-left: 1em;
|
608 |
+
}
|
609 |
+
|
610 |
+
|
611 |
+
#moveToToday {
|
612 |
+
margin-left: 1.5em;
|
613 |
+
}
|
614 |
+
|
615 |
+
.tablenav .tablenav-pages a {
|
616 |
+
background-position-y: -380px;
|
617 |
+
}
|
618 |
+
|
619 |
+
.postlist::-webkit-scrollbar {
|
620 |
+
-webkit-appearance: none;
|
621 |
+
width: 7px;
|
622 |
+
}
|
623 |
+
.postlist::-webkit-scrollbar-thumb {
|
624 |
+
border-radius: 4px;
|
625 |
+
background-color: rgba(0, 0, 0, .5);
|
626 |
+
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);
|
627 |
+
}
|
628 |
+
|
629 |
+
#currentRange {
|
630 |
+
min-width: 17em;
|
631 |
+
display: inline-block;
|
632 |
+
text-align: center;
|
633 |
+
}
|
3.7.8/edcal.js
ADDED
@@ -0,0 +1,2733 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*******************************************************************************
|
2 |
+
*
|
3 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
+
* you may not use this file except in compliance with the License.
|
5 |
+
* You may obtain a copy of the License at
|
6 |
+
*
|
7 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
8 |
+
*
|
9 |
+
* Unless required by applicable law or agreed to in writing, software
|
10 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
+
* See the License for the specific language governing permissions and
|
13 |
+
* limitations under the License.
|
14 |
+
*
|
15 |
+
******************************************************************************/
|
16 |
+
|
17 |
+
/*
|
18 |
+
This is the WordPress editorial calendar. It is a continuous
|
19 |
+
calendar in both directions. That means instead of showing only
|
20 |
+
one month at a time it shows the months running together. Users
|
21 |
+
can scroll from one month to the next using the up and down
|
22 |
+
arrow keys, the page up and page down keys, the next and previous
|
23 |
+
month buttons, and their mouse wheel.
|
24 |
+
|
25 |
+
The calendar shows five weeks visible at a time and maintains 11
|
26 |
+
weeks of rendered HTML. Only the middle weeks are visible.
|
27 |
+
|
28 |
+
Week 1
|
29 |
+
Week 2
|
30 |
+
Week 3
|
31 |
+
- Week 4 -
|
32 |
+
| Week 5 |
|
33 |
+
| Week 6 |
|
34 |
+
| Week 7 |
|
35 |
+
- Week 8 -
|
36 |
+
Week 9
|
37 |
+
Week 10
|
38 |
+
Week 11
|
39 |
+
|
40 |
+
When the user scrolls down one week the new week is added at the
|
41 |
+
end of the calendar and the first week is removed. In this way
|
42 |
+
the calendar will only ever have 11 weeks total and won't use up
|
43 |
+
excessive memory.
|
44 |
+
|
45 |
+
This calendar uses AJAX to call into the functions defined in
|
46 |
+
edcal.php. These functions get posts and change post dates.
|
47 |
+
|
48 |
+
The HTML structure of the calendar is:
|
49 |
+
|
50 |
+
<div id="cal">
|
51 |
+
<div id="row08Nov2009">
|
52 |
+
<div id="row08Nov2009row">
|
53 |
+
<div class="day sunday nov" id="08Nov2009">
|
54 |
+
<div class="dayobj">
|
55 |
+
<div class="daylabel">8</div>
|
56 |
+
<ul class="postlist">
|
57 |
+
</ul>
|
58 |
+
</div>
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
*/
|
64 |
+
var edcal = {
|
65 |
+
|
66 |
+
/*
|
67 |
+
This final string represents the date which indicates to WordPress
|
68 |
+
that a post doesn't have a date.
|
69 |
+
*/
|
70 |
+
NO_DATE: '00000000',
|
71 |
+
|
72 |
+
/*
|
73 |
+
This value is the number of weeks the user wants to see at one time
|
74 |
+
in the calendar.
|
75 |
+
*/
|
76 |
+
weeksPref: 3,
|
77 |
+
|
78 |
+
/*
|
79 |
+
This is a preference value indicating if you see the post status
|
80 |
+
*/
|
81 |
+
statusPref: true,
|
82 |
+
|
83 |
+
/*
|
84 |
+
This is a preference value indicating if you see the post author
|
85 |
+
*/
|
86 |
+
authorPref: false,
|
87 |
+
|
88 |
+
/*
|
89 |
+
This is a preference value indicating if you see the post time
|
90 |
+
*/
|
91 |
+
timePref: true,
|
92 |
+
|
93 |
+
/*
|
94 |
+
This is a preference value indiciating if we should scroll the calendar with mouse wheel scrolls
|
95 |
+
*/
|
96 |
+
wheelScrollPref: true,
|
97 |
+
|
98 |
+
/*
|
99 |
+
This is a preference value indicating if we should prompt for feeback
|
100 |
+
*/
|
101 |
+
doFeedbackPref: true,
|
102 |
+
|
103 |
+
/*
|
104 |
+
* True if the calendar is in the process of moving
|
105 |
+
*/
|
106 |
+
isMoving: false,
|
107 |
+
|
108 |
+
/*
|
109 |
+
* True if we are in the middle of dragging a post
|
110 |
+
*/
|
111 |
+
inDrag: false,
|
112 |
+
|
113 |
+
/*
|
114 |
+
True if the calendar is in the process of queueing scrolling
|
115 |
+
during a drag.
|
116 |
+
*/
|
117 |
+
isDragScrolling: false,
|
118 |
+
|
119 |
+
/*
|
120 |
+
* This is the format we use to dates that we use as IDs in the
|
121 |
+
* calendar. It is independant of the visible date which is
|
122 |
+
* formatted based on the user's locale.
|
123 |
+
*/
|
124 |
+
internalDateFormat: 'ddMMyyyy',
|
125 |
+
|
126 |
+
/*
|
127 |
+
This is the position of the calendar on the screen in pixels.
|
128 |
+
It is an array with two fields: top and bottom.
|
129 |
+
*/
|
130 |
+
position: null,
|
131 |
+
|
132 |
+
/*
|
133 |
+
* This is the first date of the current month
|
134 |
+
*/
|
135 |
+
firstDayOfMonth: null,
|
136 |
+
|
137 |
+
/*
|
138 |
+
* This is the first day of the next month
|
139 |
+
*/
|
140 |
+
firstDayOfNextMonth: null,
|
141 |
+
|
142 |
+
/*
|
143 |
+
* The date format used by wordpress
|
144 |
+
*/
|
145 |
+
wp_dateFormat: 'yyyy-MM-dd',
|
146 |
+
|
147 |
+
/*
|
148 |
+
* The cache of dates we have already loaded posts for.
|
149 |
+
*/
|
150 |
+
cacheDates: [],
|
151 |
+
|
152 |
+
/*
|
153 |
+
* The ID of the timer we use to batch new post requests
|
154 |
+
*/
|
155 |
+
tID: null,
|
156 |
+
|
157 |
+
/*
|
158 |
+
* The number of steps moving for this timer.
|
159 |
+
*/
|
160 |
+
steps: 0,
|
161 |
+
|
162 |
+
/*
|
163 |
+
* The constant for the concurrency error.
|
164 |
+
*/
|
165 |
+
CONCURRENCY_ERROR: 4,
|
166 |
+
|
167 |
+
/*
|
168 |
+
* The constant for the user permission error
|
169 |
+
*/
|
170 |
+
PERMISSION_ERROR: 5,
|
171 |
+
|
172 |
+
/*
|
173 |
+
* The constant for the nonce error
|
174 |
+
*/
|
175 |
+
NONCE_ERROR: 6,
|
176 |
+
|
177 |
+
/*
|
178 |
+
The direction the calendar last moved.
|
179 |
+
true = down = to the future
|
180 |
+
false = up = to the past
|
181 |
+
|
182 |
+
*/
|
183 |
+
currentDirection: true,
|
184 |
+
|
185 |
+
/*
|
186 |
+
This date is our index. When the calendar moves we
|
187 |
+
update this date to indicate the next rows we need
|
188 |
+
to add.
|
189 |
+
*/
|
190 |
+
_wDate: Date.today(),
|
191 |
+
|
192 |
+
/*
|
193 |
+
* The date since the previous move
|
194 |
+
*/
|
195 |
+
moveDate: null,
|
196 |
+
|
197 |
+
/*
|
198 |
+
* This is a number from 0-6 indicating when the start
|
199 |
+
* of the week is. The user sets this in the Settings >
|
200 |
+
* General page and it is a single value for the entire
|
201 |
+
* server. We are setting this value in edcal.php
|
202 |
+
*/
|
203 |
+
startOfWeek: null,
|
204 |
+
|
205 |
+
/*
|
206 |
+
A cache of all the posts we have loaded so far. The
|
207 |
+
data structure is:
|
208 |
+
|
209 |
+
posts [date - ddMMMyyyy][posts array - post object from JSON data]
|
210 |
+
*/
|
211 |
+
posts: [],
|
212 |
+
|
213 |
+
/*
|
214 |
+
IE will sometimes fire the resize event twice for the same resize
|
215 |
+
action. We save it so we only resize the calendar once and avoid
|
216 |
+
any flickering.
|
217 |
+
*/
|
218 |
+
windowHeight: 0,
|
219 |
+
|
220 |
+
|
221 |
+
/*
|
222 |
+
This variable indicates if the calendar is in left to right or right to
|
223 |
+
left display mode.
|
224 |
+
*/
|
225 |
+
ltr: 'ltr',
|
226 |
+
|
227 |
+
/*
|
228 |
+
This variable indicates if the drafts drawer is visible or not.
|
229 |
+
*/
|
230 |
+
isDraftsDrawerVisible: false,
|
231 |
+
|
232 |
+
enableMouseWheel: function() {
|
233 |
+
if (edcal.wheelScrollPref) {
|
234 |
+
jQuery('#edcal_scrollable').bind('mousewheel', function(event, delta) {
|
235 |
+
var dir = delta > 0 ? false : true, vel = Math.abs(delta);
|
236 |
+
//edcal.output(dir + ' at a velocity of ' + vel);
|
237 |
+
|
238 |
+
if (!edcal.isMoving && vel > 0.2) {
|
239 |
+
edcal.move(1, dir);
|
240 |
+
}
|
241 |
+
|
242 |
+
return false;
|
243 |
+
});
|
244 |
+
} else {
|
245 |
+
jQuery('#edcal_scrollable').unbind('mousewheel');
|
246 |
+
}
|
247 |
+
},
|
248 |
+
|
249 |
+
/*
|
250 |
+
* Initializes the calendar
|
251 |
+
*/
|
252 |
+
init: function() {
|
253 |
+
if (jQuery('#edcal_scrollable').length === 0) {
|
254 |
+
/*
|
255 |
+
* This means we are on a page without the editorial
|
256 |
+
* calendar
|
257 |
+
*/
|
258 |
+
return;
|
259 |
+
}
|
260 |
+
|
261 |
+
//edcal.addFeedbackSection();
|
262 |
+
|
263 |
+
var draftsDrawerVisible = jQuery.cookie('edcal_drafts_drawer');
|
264 |
+
if (draftsDrawerVisible === 'true') {
|
265 |
+
edcal.isDraftsDrawerVisible = true;
|
266 |
+
edcal.setDraftsDrawerVisible(edcal.isDraftsDrawerVisible);
|
267 |
+
}
|
268 |
+
|
269 |
+
jQuery('#loading').hide();
|
270 |
+
|
271 |
+
jQuery('#edcal_scrollable').css('height', edcal.getCalHeight() + 'px');
|
272 |
+
edcal.windowHeight = jQuery(window).height();
|
273 |
+
|
274 |
+
/*
|
275 |
+
* Add the days of the week
|
276 |
+
*/
|
277 |
+
edcal.createDaysHeader();
|
278 |
+
|
279 |
+
/*
|
280 |
+
* We start by initializting the scrollable. We use this to manage the
|
281 |
+
* scrolling of the calendar, but don't actually call it to animate the
|
282 |
+
* scrolling. We specify an easing here because the default is "swing"
|
283 |
+
* and that has a conflict with JavaScript used in the BuddyPress plugin/
|
284 |
+
*
|
285 |
+
* This doesn't really change anything since the animation happens offscreen.
|
286 |
+
*/
|
287 |
+
jQuery('#edcal_scrollable').scrollable({
|
288 |
+
vertical: true,
|
289 |
+
size: edcal.weeksPref,
|
290 |
+
keyboard: false,
|
291 |
+
keyboardSteps: 1,
|
292 |
+
speed: 100,
|
293 |
+
easing: 'linear'
|
294 |
+
});
|
295 |
+
|
296 |
+
var api = jQuery('#edcal_scrollable').scrollable();
|
297 |
+
|
298 |
+
api.getConf().keyboard = false;
|
299 |
+
|
300 |
+
/*
|
301 |
+
When the user moves the calendar around we remember their
|
302 |
+
date and save it in a cookie. Then we read the cookie back
|
303 |
+
when we reload so the calendar stays where the user left
|
304 |
+
it last.
|
305 |
+
*/
|
306 |
+
var curDate = jQuery.cookie('edcal_date');
|
307 |
+
|
308 |
+
if (curDate) {
|
309 |
+
curDate = Date.parseExact(curDate, 'yyyy-dd-MM');
|
310 |
+
edcal.output('Resetting to date from the edcal_Date cookie: ' + curDate);
|
311 |
+
} else {
|
312 |
+
curDate = Date.today();
|
313 |
+
}
|
314 |
+
|
315 |
+
edcal.moveTo(curDate.clone());
|
316 |
+
|
317 |
+
/*
|
318 |
+
We are handling all of our own events so we just cancel all events from
|
319 |
+
the scrollable.
|
320 |
+
*/
|
321 |
+
api.onBeforeSeek(function(evt, direction) {
|
322 |
+
return false;
|
323 |
+
});
|
324 |
+
|
325 |
+
edcal.enableMouseWheel();
|
326 |
+
|
327 |
+
/*
|
328 |
+
* We also want to listen for a few other key events
|
329 |
+
*/
|
330 |
+
jQuery(document).bind('keydown', function(evt) {
|
331 |
+
//if (evt.altKey || evt.ctrlKey) { return; }
|
332 |
+
//edcal.output("evt.altKey: " + evt.altKey);
|
333 |
+
//edcal.output("evt.keyCode: " + evt.keyCode);
|
334 |
+
//edcal.output("evt.ctrlKey: " + evt.ctrlKey);
|
335 |
+
|
336 |
+
if (evt.keyCode === 27) { //escape key
|
337 |
+
return false;
|
338 |
+
}
|
339 |
+
|
340 |
+
if (jQuery('#edcal_quickedit').is(':visible')) {
|
341 |
+
return;
|
342 |
+
}
|
343 |
+
|
344 |
+
if ((evt.keyCode === 40 && !(evt.altKey || evt.ctrlKey))) { // down arrow key
|
345 |
+
edcal.move(1, true);
|
346 |
+
return false;
|
347 |
+
} else if ((evt.keyCode === 38 && !(evt.altKey || evt.ctrlKey))) { // up arrow key
|
348 |
+
edcal.move(1, false);
|
349 |
+
return false;
|
350 |
+
} else if ((evt.keyCode === 34 && !(evt.altKey || evt.ctrlKey)) || //page down
|
351 |
+
evt.keyCode === 40 && evt.ctrlKey) { // Ctrl+down down arrow
|
352 |
+
edcal.move(edcal.weeksPref, true);
|
353 |
+
return false;
|
354 |
+
} else if ((evt.keyCode === 33 && !(evt.altKey || evt.ctrlKey)) || //page up
|
355 |
+
evt.keyCode === 38 && evt.ctrlKey) { // Ctrl+up up arrow
|
356 |
+
edcal.move(edcal.weeksPref, false);
|
357 |
+
return false;
|
358 |
+
}
|
359 |
+
});
|
360 |
+
|
361 |
+
edcal.getPosts(edcal.nextStartOfWeek(curDate).add(-3).weeks(),
|
362 |
+
edcal.nextStartOfWeek(curDate).add(edcal.weeksPref + 3).weeks());
|
363 |
+
|
364 |
+
/*
|
365 |
+
Now we bind the listeners for all of our links and the window
|
366 |
+
resize.
|
367 |
+
*/
|
368 |
+
jQuery('#moveToToday').click(function() {
|
369 |
+
edcal.moveTo(Date.today());
|
370 |
+
edcal.getPosts(edcal.nextStartOfWeek(Date.today()).add(-3).weeks(),
|
371 |
+
edcal.nextStartOfWeek(Date.today()).add(edcal.weeksPref + 3).weeks());
|
372 |
+
return false;
|
373 |
+
});
|
374 |
+
|
375 |
+
jQuery('#moveToLast').click(function() {
|
376 |
+
if (edcal.lastPostDate === '-1') {
|
377 |
+
/*
|
378 |
+
* This happens when the blog doesn't have any posts
|
379 |
+
*/
|
380 |
+
return;
|
381 |
+
}
|
382 |
+
|
383 |
+
var d = Date.parseExact(edcal.lastPostDate, 'ddMMyyyy');
|
384 |
+
edcal.moveTo(d);
|
385 |
+
edcal.getPosts(edcal.nextStartOfWeek(d).add(-3).weeks(),
|
386 |
+
edcal.nextStartOfWeek(d).add(edcal.weeksPref + 3).weeks());
|
387 |
+
return false;
|
388 |
+
});
|
389 |
+
|
390 |
+
jQuery('#prevmonth').click(function() {
|
391 |
+
edcal.move(edcal.weeksPref, false);
|
392 |
+
return false;
|
393 |
+
});
|
394 |
+
|
395 |
+
jQuery('#nextmonth').click(function() {
|
396 |
+
edcal.move(edcal.weeksPref, true);
|
397 |
+
return false;
|
398 |
+
});
|
399 |
+
|
400 |
+
/*
|
401 |
+
We used to listen to resize events so we could make the calendar the right size
|
402 |
+
for the current window when it changed size, but this was causing a problem with
|
403 |
+
WordPress 3.3 and it never worked properly because the scroll position was a little
|
404 |
+
off so we are just skipping it.
|
405 |
+
*/
|
406 |
+
/*function resizeWindow(e) {
|
407 |
+
if (edcal.windowHeight != jQuery(window).height()) {
|
408 |
+
jQuery('#edcal_scrollable').css('height', edcal.getCalHeight() + 'px');
|
409 |
+
edcal.windowHeight = jQuery(window).height();
|
410 |
+
edcal.savePosition();
|
411 |
+
}
|
412 |
+
}
|
413 |
+
jQuery(window).bind('resize', resizeWindow);*/
|
414 |
+
|
415 |
+
jQuery('#newPostScheduleButton').on('click', function(evt) {
|
416 |
+
// if the button is disabled, don't do anything
|
417 |
+
if (jQuery(this).hasClass('disabled')) {
|
418 |
+
return false;
|
419 |
+
}
|
420 |
+
// Otherwise,
|
421 |
+
// make sure we can't make duplicate posts by clicking twice quickly
|
422 |
+
jQuery(this).addClass('disabled');
|
423 |
+
// and save the post
|
424 |
+
return edcal.savePost(null, false, true);
|
425 |
+
});
|
426 |
+
|
427 |
+
jQuery('#edcal-title-new-field').bind('input', function(evt) {
|
428 |
+
if ((jQuery('#edcal-title-new-field').val().length > 0 || jQuery('#content').val().length > 0) &&
|
429 |
+
(!jQuery('#edcal-time').is(':visible') || jQuery('#edcal-time').val().length > 0)) {
|
430 |
+
jQuery('#newPostScheduleButton').removeClass('disabled');
|
431 |
+
} else {
|
432 |
+
jQuery('#newPostScheduleButton').addClass('disabled');
|
433 |
+
}
|
434 |
+
|
435 |
+
if (evt.keyCode === 13) { // enter key
|
436 |
+
/*
|
437 |
+
* If the user presses enter we want to save the draft.
|
438 |
+
*/
|
439 |
+
return edcal.savePost(null, true);
|
440 |
+
}
|
441 |
+
});
|
442 |
+
|
443 |
+
jQuery('#content').bind('input', function(evt) {
|
444 |
+
if ((jQuery('#edcal-title-new-field').val().length > 0 || jQuery('#content').val().length > 0) &&
|
445 |
+
(!jQuery('#edcal-time').is(':visible') || jQuery('#edcal-time').val().length > 0)) {
|
446 |
+
jQuery('#newPostScheduleButton').removeClass('disabled');
|
447 |
+
} else {
|
448 |
+
jQuery('#newPostScheduleButton').addClass('disabled');
|
449 |
+
}
|
450 |
+
|
451 |
+
if (evt.keyCode === 13) { // enter key
|
452 |
+
/*
|
453 |
+
* If the user presses enter we want to save the draft.
|
454 |
+
*/
|
455 |
+
return edcal.savePost(null, true);
|
456 |
+
}
|
457 |
+
});
|
458 |
+
|
459 |
+
jQuery('#edcal-status').bind('change', function(evt) {
|
460 |
+
edcal.updatePublishButton();
|
461 |
+
});
|
462 |
+
|
463 |
+
jQuery('#edcal_weeks_pref').on('keyup', function(evt) {
|
464 |
+
if (jQuery('#edcal_weeks_pref').val().length > 0) {
|
465 |
+
jQuery('#edcal_applyoptions').removeClass('disabled');
|
466 |
+
} else {
|
467 |
+
jQuery('#edcal_applyoptions').addClass('disabled');
|
468 |
+
}
|
469 |
+
|
470 |
+
if (evt.keyCode === 13) { // enter key
|
471 |
+
edcal.saveOptions();
|
472 |
+
}
|
473 |
+
|
474 |
+
});
|
475 |
+
|
476 |
+
edcal.savePosition();
|
477 |
+
|
478 |
+
edcal.addOptionsSection();
|
479 |
+
|
480 |
+
jQuery('#edcal-time').timePicker({
|
481 |
+
show24Hours: edcal.timeFormat === 'H:i',
|
482 |
+
separator: ':',
|
483 |
+
step: 30
|
484 |
+
});
|
485 |
+
|
486 |
+
jQuery('#showdraftsdrawer').click(function() {
|
487 |
+
edcal.setDraftsDrawerVisible(!edcal.isDraftsDrawerVisible);
|
488 |
+
});
|
489 |
+
},
|
490 |
+
|
491 |
+
/*
|
492 |
+
* This function shows and hides the drafts drawer. Kind of clunky right now.
|
493 |
+
* Inits [loads content] only once.
|
494 |
+
*/
|
495 |
+
setDraftsDrawerVisible: function(/*boolean*/ visible, /*function*/ callback) {
|
496 |
+
var drawerwidth = '13%';
|
497 |
+
var drawerwidthmargin = '13.5%';
|
498 |
+
var showhideElement = jQuery('#showdraftsdrawer');
|
499 |
+
/* tells us if the drafts have been loaded for the first time */
|
500 |
+
if (!showhideElement.hasClass('isLoaded')) {
|
501 |
+
showhideElement.addClass('isLoaded');
|
502 |
+
edcal.setupDraftsdrawer(callback);
|
503 |
+
} else if (callback) {
|
504 |
+
/*
|
505 |
+
* If the drawer was already open we just call the callback
|
506 |
+
*/
|
507 |
+
callback();
|
508 |
+
}
|
509 |
+
|
510 |
+
if (visible) {
|
511 |
+
// edcal.output('showing draftsdrawer');
|
512 |
+
jQuery('#cal_cont').css({ 'margin-right': drawerwidthmargin });
|
513 |
+
jQuery('#draftsdrawer_cont').css({ display:'block', width:drawerwidth });
|
514 |
+
showhideElement.html(edcal.str_hidedrafts);
|
515 |
+
} else {
|
516 |
+
// edcal.output('hiding draftsdrawer');
|
517 |
+
jQuery('#cal_cont').css({ 'margin-right': '0' });
|
518 |
+
jQuery('#draftsdrawer_cont').css({ display:'none', width:'0' });
|
519 |
+
showhideElement.html(edcal.str_showdrafts);
|
520 |
+
}
|
521 |
+
|
522 |
+
edcal.isDraftsDrawerVisible = visible;
|
523 |
+
|
524 |
+
jQuery.cookie('edcal_drafts_drawer', visible, {expires: 2060});
|
525 |
+
},
|
526 |
+
|
527 |
+
/*
|
528 |
+
* Sets up the drafts drawer.
|
529 |
+
*/
|
530 |
+
setupDraftsdrawer: function(/*function*/ callback) {
|
531 |
+
jQuery('#draftsdrawer_loading').css({display:'block'});
|
532 |
+
edcal.getPosts(edcal.NO_DATE, null, function() {
|
533 |
+
edcal.initDraftsdrawer();
|
534 |
+
if (callback) {
|
535 |
+
callback();
|
536 |
+
}
|
537 |
+
});
|
538 |
+
},
|
539 |
+
|
540 |
+
/*
|
541 |
+
* Inits the drafts drawer, much like edcal.createRow()
|
542 |
+
* We could paginate this but right now we're just loading them all.
|
543 |
+
*/
|
544 |
+
initDraftsdrawer: function() {
|
545 |
+
var newrow = '';
|
546 |
+
|
547 |
+
newrow += '<a href="#" adddate="' + edcal.NO_DATE + '" class="daynewlink" style="margin-top: 5px;"' +
|
548 |
+
'title="' + edcal.str_newdraft + '" id="unscheduledNewLink" ' +
|
549 |
+
'onclick="edcal.addDraft(); return false;">' + edcal.str_addDraftLink + '</a>';
|
550 |
+
|
551 |
+
newrow += '<ul class="postlist">';
|
552 |
+
|
553 |
+
newrow += edcal.getPostItems(edcal.NO_DATE);
|
554 |
+
|
555 |
+
newrow += '</ul>';
|
556 |
+
|
557 |
+
edcal.draggablePost('#row' + edcal._wDate.toString(edcal.internalDateFormat) + ' li.post');
|
558 |
+
|
559 |
+
edcal.makeDroppable(jQuery('#draftsdrawer div.day'));
|
560 |
+
|
561 |
+
jQuery('#unscheduled').append(newrow);
|
562 |
+
jQuery('#draftsdrawer_loading').css({display:'none'});
|
563 |
+
|
564 |
+
var cal_cont = jQuery('#cal_cont');
|
565 |
+
|
566 |
+
jQuery('#unscheduled ul.postlist').css('min-height', ((cal_cont.height() - 10) -
|
567 |
+
jQuery('#draftsdrawer .draftsdrawerheadcont').height()) -
|
568 |
+
jQuery('#unscheduledNewLink').outerHeight());
|
569 |
+
|
570 |
+
jQuery('#unscheduled').mouseout(function() {
|
571 |
+
jQuery('#unscheduledNewLink').hide();
|
572 |
+
}).mouseover(function() {
|
573 |
+
jQuery('#unscheduledNewLink').show();
|
574 |
+
});
|
575 |
+
},
|
576 |
+
|
577 |
+
/*
|
578 |
+
This function aligns the grid in two directions. There
|
579 |
+
is a vertical grid with a row of each week and a horizontal
|
580 |
+
grid for each week with a list of days.
|
581 |
+
*/
|
582 |
+
alignGrid: function(/*string*/ gridid, /*int*/ cols, /*int*/ cellWidth, /*int*/ cellHeight, /*int*/ padding) {
|
583 |
+
if (jQuery(gridid).parent().attr('id') === 'draftsdrawer') {
|
584 |
+
return;
|
585 |
+
}
|
586 |
+
|
587 |
+
var x = 0;
|
588 |
+
var y = 0;
|
589 |
+
var count = 1;
|
590 |
+
|
591 |
+
jQuery(gridid).each(function() {
|
592 |
+
jQuery(this).css('position', 'relative');
|
593 |
+
|
594 |
+
var children = jQuery(this).children('div');
|
595 |
+
|
596 |
+
/*
|
597 |
+
In left to right languages the first day of the week shows
|
598 |
+
up on the left side of the calendar. In right to left languages
|
599 |
+
the first day of the week shows up on the right. We handle
|
600 |
+
this by changing the order of the cells in the layout code.
|
601 |
+
|
602 |
+
We only want to do this for the days of the week so we skip it
|
603 |
+
if we're dealing with just one column for the rows in the calendar.
|
604 |
+
*/
|
605 |
+
if (cols === 1 || edcal.ltr !== 'rtl') {
|
606 |
+
for (var i = 0; i < children.length; i++) {
|
607 |
+
children.eq(i).css({
|
608 |
+
width: cellWidth + '%',
|
609 |
+
height: cellHeight + '%',
|
610 |
+
position: 'absolute',
|
611 |
+
left: x + '%',
|
612 |
+
top: y + '%'
|
613 |
+
});
|
614 |
+
|
615 |
+
if ((count % cols) === 0) {
|
616 |
+
x = 0;
|
617 |
+
y += cellHeight + padding;
|
618 |
+
} else {
|
619 |
+
x += cellWidth + padding;
|
620 |
+
}
|
621 |
+
|
622 |
+
count++;
|
623 |
+
}
|
624 |
+
} else {
|
625 |
+
for (var j = children.length - 1; j > -1; j--) {
|
626 |
+
children.eq(j).css({
|
627 |
+
width: cellWidth + '%',
|
628 |
+
height: cellHeight + '%',
|
629 |
+
position: 'absolute',
|
630 |
+
left: x + '%',
|
631 |
+
top: y + '%'
|
632 |
+
});
|
633 |
+
|
634 |
+
if ((count % cols) === 0) {
|
635 |
+
x = 0;
|
636 |
+
y += cellHeight + padding;
|
637 |
+
} else {
|
638 |
+
x += cellWidth + padding;
|
639 |
+
}
|
640 |
+
|
641 |
+
count++;
|
642 |
+
}
|
643 |
+
}
|
644 |
+
|
645 |
+
});
|
646 |
+
},
|
647 |
+
|
648 |
+
/*
|
649 |
+
This is a helper function to align the calendar so we don't
|
650 |
+
have to change the cell sizes in multiple places.
|
651 |
+
*/
|
652 |
+
alignCal: function() {
|
653 |
+
edcal.alignGrid('#cal', 1, 100, (100 / edcal.weeksPref) - 1, 1);
|
654 |
+
},
|
655 |
+
|
656 |
+
|
657 |
+
/*
|
658 |
+
This function creates the days header at the top of the
|
659 |
+
calendar.
|
660 |
+
*/
|
661 |
+
createDaysHeader: function() {
|
662 |
+
/*
|
663 |
+
* The first day of the week in the calendar depends on
|
664 |
+
* a wordpress setting and maybe the server locale. This
|
665 |
+
* means we need to determine the days of the week dynamically.
|
666 |
+
* Luckily the Date.js library already has these strings
|
667 |
+
* localized for us. All we need to do is figure out the
|
668 |
+
* first day of the week and then we can add a day from there.
|
669 |
+
*/
|
670 |
+
|
671 |
+
var date = Date.today().next().sunday();
|
672 |
+
|
673 |
+
/*
|
674 |
+
* We need to call nextStartOfWeek to make sure the
|
675 |
+
* edcal.startOfWeek variable gets initialized.
|
676 |
+
*/
|
677 |
+
edcal.nextStartOfWeek(date);
|
678 |
+
|
679 |
+
|
680 |
+
var html = '<div class="dayheadcont"><div class="dayhead firstday">' +
|
681 |
+
date.add(edcal.startOfWeek).days().toString('dddd') +
|
682 |
+
'</div>';
|
683 |
+
|
684 |
+
html += '<div class="dayhead">' + date.add(1).days().toString('dddd') + '</div>';
|
685 |
+
html += '<div class="dayhead">' + date.add(1).days().toString('dddd') + '</div>';
|
686 |
+
html += '<div class="dayhead">' + date.add(1).days().toString('dddd') + '</div>';
|
687 |
+
html += '<div class="dayhead">' + date.add(1).days().toString('dddd') + '</div>';
|
688 |
+
html += '<div class="dayhead">' + date.add(1).days().toString('dddd') + '</div>';
|
689 |
+
html += '<div class="dayhead lastday">' + date.add(1).days().toString('dddd') + '</div>';
|
690 |
+
|
691 |
+
jQuery('#cal_cont').prepend(html);
|
692 |
+
|
693 |
+
edcal.alignGrid('.dayheadcont', 7, 13.8, 100, 0.5);
|
694 |
+
},
|
695 |
+
|
696 |
+
/*
|
697 |
+
We have different styles for days in previous months,
|
698 |
+
the current month, and future months. This function
|
699 |
+
figures out the right class based on the date.
|
700 |
+
*/
|
701 |
+
getDateClass: function(/*Date*/ date) {
|
702 |
+
|
703 |
+
var monthstyle;
|
704 |
+
var daystyle;
|
705 |
+
|
706 |
+
if (date.compareTo(Date.today()) === -1) {
|
707 |
+
/*
|
708 |
+
* Date is before today
|
709 |
+
*/
|
710 |
+
daystyle = 'beforeToday';
|
711 |
+
} else {
|
712 |
+
/*
|
713 |
+
* Date is after today
|
714 |
+
*/
|
715 |
+
daystyle = 'todayAndAfter';
|
716 |
+
}
|
717 |
+
if (!edcal.firstDayOfMonth) {
|
718 |
+
/*
|
719 |
+
* We only need to figure out the first and last day
|
720 |
+
* of the month once
|
721 |
+
*/
|
722 |
+
edcal.firstDayOfMonth = Date.today().moveToFirstDayOfMonth().clearTime();
|
723 |
+
edcal.firstDayOfNextMonth = Date.today().moveToLastDayOfMonth().clearTime();
|
724 |
+
}
|
725 |
+
if (date.between(edcal.firstDayOfMonth, edcal.firstDayOfNextMonth)) {
|
726 |
+
/*
|
727 |
+
* If the date isn't before the first of the
|
728 |
+
* month and it isn't after the last of the
|
729 |
+
* month then it is in the current month.
|
730 |
+
*/
|
731 |
+
monthstyle = 'month-present';
|
732 |
+
} else if (date.compareTo(edcal.firstDayOfMonth) === 1) {
|
733 |
+
/*
|
734 |
+
* Then the date is after the current month
|
735 |
+
*/
|
736 |
+
monthstyle = 'month-future';
|
737 |
+
} else if (date.compareTo(edcal.firstDayOfNextMonth) === -1) {
|
738 |
+
/*
|
739 |
+
* Then the date is before the current month
|
740 |
+
*/
|
741 |
+
monthstyle = 'month-past';
|
742 |
+
}
|
743 |
+
|
744 |
+
if (date.toString('dd') === '01') {
|
745 |
+
/*
|
746 |
+
* This this date is the first day of the month
|
747 |
+
*/
|
748 |
+
daystyle += ' firstOfMonth';
|
749 |
+
}
|
750 |
+
|
751 |
+
|
752 |
+
return monthstyle + ' ' + daystyle;
|
753 |
+
},
|
754 |
+
|
755 |
+
/*
|
756 |
+
Show the add post link. This gets called when the mouse
|
757 |
+
is over a specific day.
|
758 |
+
*/
|
759 |
+
showAddPostLink: function(/*string*/ dayid) {
|
760 |
+
if (edcal.inDrag) {
|
761 |
+
return;
|
762 |
+
}
|
763 |
+
|
764 |
+
var createLink = jQuery('#' + dayid + ' a.daynewlink');
|
765 |
+
createLink.css('display', 'block');
|
766 |
+
createLink.bind('click', edcal.addPost);
|
767 |
+
},
|
768 |
+
|
769 |
+
/*
|
770 |
+
Hides the add new post link it is called when the mouse moves
|
771 |
+
outside of the calendar day.
|
772 |
+
*/
|
773 |
+
hideAddPostLink: function(/*string*/ dayid) {
|
774 |
+
var link = jQuery('#' + dayid + ' a.daynewlink').hide();
|
775 |
+
link.unbind('click', edcal.addPost);
|
776 |
+
},
|
777 |
+
|
778 |
+
/*
|
779 |
+
Creates a row of the calendar and adds all of the CSS classes
|
780 |
+
and listeners for each calendar day.
|
781 |
+
*/
|
782 |
+
createRow: function(/*jQuery*/ parent, /*bool*/ append) {
|
783 |
+
var _date = edcal._wDate.clone();
|
784 |
+
|
785 |
+
var newrow = '<div class="rowcont" id="' + 'row' + edcal._wDate.toString(edcal.internalDateFormat) + '">' +
|
786 |
+
'<div id="' + 'row' + edcal._wDate.toString(edcal.internalDateFormat) + 'row" class="edcal_row">';
|
787 |
+
for (var i = 0; i < 7; i++) {
|
788 |
+
/*
|
789 |
+
* Adding all of these calls in the string is kind of messy. We
|
790 |
+
* could do this with the JQuery live function, but there are a lot
|
791 |
+
* of days in the calendar and the live function gets a little slow.
|
792 |
+
*/
|
793 |
+
newrow += '<div onmouseover="edcal.showAddPostLink(\'' + _date.toString(edcal.internalDateFormat) + '\');" ' +
|
794 |
+
'onmouseout="edcal.hideAddPostLink(\'' + _date.toString(edcal.internalDateFormat) + '\');" ' +
|
795 |
+
'id="' + _date.toString(edcal.internalDateFormat) + '" class="day ' +
|
796 |
+
edcal.getDateClass(_date) + ' ' +
|
797 |
+
_date.toString('dddd').toLowerCase() + ' month-' +
|
798 |
+
_date.toString('MM').toLowerCase() + '">';
|
799 |
+
|
800 |
+
newrow += '<div class="dayobj">';
|
801 |
+
|
802 |
+
newrow += '<a href="#" adddate="' + _date.toString('MMMM d') + '" class="daynewlink" title="' +
|
803 |
+
sprintf(edcal.str_newpost, edcal.chineseAposWorkaround(_date.toString(Date.CultureInfo.formatPatterns.monthDay))) + '" ' +
|
804 |
+
'onclick="return false;">' + edcal.str_addPostLink + '</a>';
|
805 |
+
|
806 |
+
if (_date.toString('dd') === '01') {
|
807 |
+
newrow += '<div class="daylabel">' + _date.toString('MMM d');
|
808 |
+
} else {
|
809 |
+
newrow += '<div class="daylabel">' + _date.toString('d');
|
810 |
+
}
|
811 |
+
|
812 |
+
|
813 |
+
newrow += '</div>';
|
814 |
+
|
815 |
+
newrow += '<ul class="postlist">';
|
816 |
+
|
817 |
+
newrow += edcal.getPostItems(_date.toString(edcal.internalDateFormat));
|
818 |
+
|
819 |
+
newrow += '</ul>';
|
820 |
+
|
821 |
+
newrow += '</div>';
|
822 |
+
newrow += '</div>';
|
823 |
+
_date.add(1).days();
|
824 |
+
}
|
825 |
+
|
826 |
+
newrow += '</div></div>';
|
827 |
+
|
828 |
+
if (append) {
|
829 |
+
parent.append(newrow);
|
830 |
+
|
831 |
+
} else {
|
832 |
+
parent.prepend(newrow);
|
833 |
+
}
|
834 |
+
|
835 |
+
/*
|
836 |
+
* This is the horizontal alignment of an individual week
|
837 |
+
*/
|
838 |
+
edcal.alignGrid('#row' + edcal._wDate.toString(edcal.internalDateFormat) + 'row', 7, 13.9, 100, 0.5);
|
839 |
+
|
840 |
+
edcal.draggablePost('#row' + edcal._wDate.toString(edcal.internalDateFormat) + ' li.post');
|
841 |
+
|
842 |
+
edcal.makeDroppable(jQuery('#row' + edcal._wDate.toString(edcal.internalDateFormat) + ' > div > div.day'));
|
843 |
+
|
844 |
+
return jQuery('row' + edcal._wDate.toString(edcal.internalDateFormat));
|
845 |
+
},
|
846 |
+
|
847 |
+
/*
|
848 |
+
* Make a specific post droppable
|
849 |
+
*/
|
850 |
+
makeDroppable: function(/*jQuery*/ day) {
|
851 |
+
day.droppable({
|
852 |
+
hoverClass: 'day-active',
|
853 |
+
accept: function(ui) {
|
854 |
+
/*
|
855 |
+
We only let them drag draft posts into the past. If
|
856 |
+
they try to drag and scheduled post into the past we
|
857 |
+
reject the drag. Using the class here is a little
|
858 |
+
fragile, but it is much faster than doing date
|
859 |
+
arithmetic every time the mouse twitches.
|
860 |
+
*/
|
861 |
+
if (jQuery(this).hasClass('beforeToday')) {
|
862 |
+
if (ui.hasClass('draft')) {
|
863 |
+
return true;
|
864 |
+
} else {
|
865 |
+
return false;
|
866 |
+
}
|
867 |
+
} else {
|
868 |
+
return true;
|
869 |
+
}
|
870 |
+
},
|
871 |
+
greedy: true,
|
872 |
+
tolerance: 'pointer',
|
873 |
+
drop: function(event, ui) {
|
874 |
+
//edcal.output('dropped ui.draggable.attr("id"): ' + ui.draggable.attr("id"));
|
875 |
+
//edcal.output('dropped on jQuery(this).attr("id"): ' + jQuery(this).attr("id"));
|
876 |
+
//edcal.output('ui.draggable.html(): ' + ui.draggable.html());
|
877 |
+
var dayId = ui.draggable.parent().parent().parent().attr('id');
|
878 |
+
//edcal.output('dayId: ' + dayId);
|
879 |
+
edcal.doDrop(dayId, ui.draggable.attr('id'), jQuery(this).attr('id'));
|
880 |
+
}
|
881 |
+
});
|
882 |
+
},
|
883 |
+
|
884 |
+
/*
|
885 |
+
* Handle the drop when a user drags and drops a post.
|
886 |
+
*/
|
887 |
+
doDrop: function(/*string*/ parentId, /*string*/ postId, /*string*/ newDate, /*function*/ callback) {
|
888 |
+
//edcal.output('doDrop(' + parentId + ', ' + postId + ', ' + newDate + ')');
|
889 |
+
var dayId = parentId;
|
890 |
+
|
891 |
+
|
892 |
+
// Step 0. Get the post object from the map
|
893 |
+
var post = edcal.findPostForId(parentId, postId);
|
894 |
+
|
895 |
+
// Step 1. Remove the post from the posts map
|
896 |
+
edcal.removePostFromMap(parentId, postId);
|
897 |
+
|
898 |
+
/*
|
899 |
+
Step 2. Remove the old element from the old parent.
|
900 |
+
|
901 |
+
We would like to just remove the item right away,
|
902 |
+
but on IE with JQuery UI 1.8 that causes an error
|
903 |
+
because it tries to access the properties of the
|
904 |
+
object to reset the cursor and it can't since the
|
905 |
+
object is not longer part of the DOM. That is why
|
906 |
+
we detach it instead of removing it.
|
907 |
+
|
908 |
+
However, this causes a small memory leak since every
|
909 |
+
drag will detach an element and never remove it. To
|
910 |
+
clean up we wait half a second until the drag is done
|
911 |
+
and then remove the item. Hacky, but it works.
|
912 |
+
*/
|
913 |
+
var oldPost = jQuery('#' + postId);
|
914 |
+
oldPost.detach();
|
915 |
+
|
916 |
+
setTimeout(function() {
|
917 |
+
oldPost.remove();
|
918 |
+
}, 500);
|
919 |
+
|
920 |
+
// Step 3. Add the item to the new DOM parent
|
921 |
+
// Step 3a. Check whether we dropped it on a day or on the Drafts Drawer
|
922 |
+
jQuery('#' + newDate + ' .postlist').append(edcal.createPostItem(post, newDate));
|
923 |
+
|
924 |
+
|
925 |
+
if (dayId === newDate) {
|
926 |
+
/*
|
927 |
+
If they dropped back on to the day they started with we
|
928 |
+
don't want to go back to the server.
|
929 |
+
*/
|
930 |
+
edcal.draggablePost('#' + newDate + ' .post');
|
931 |
+
} else {
|
932 |
+
// Step6. Update the date on the server
|
933 |
+
edcal.changeDate(newDate, post, callback);
|
934 |
+
}
|
935 |
+
},
|
936 |
+
|
937 |
+
/*
|
938 |
+
* This is a helper method to make an individual post item draggable.
|
939 |
+
*/
|
940 |
+
draggablePost: function(/*post selector*/ post) {
|
941 |
+
jQuery(post).each(function() {
|
942 |
+
var postObj = edcal.findPostForId(jQuery(this).parent().parent().parent().attr('id'),
|
943 |
+
jQuery(this).attr('id'));
|
944 |
+
if (edcal.isPostMovable(postObj)) {
|
945 |
+
jQuery(this).draggable({
|
946 |
+
revert: 'invalid',
|
947 |
+
appendTo: 'body',
|
948 |
+
helper: 'clone',
|
949 |
+
distance: 1,
|
950 |
+
addClasses: false,
|
951 |
+
start: function() {
|
952 |
+
edcal.inDrag = true;
|
953 |
+
},
|
954 |
+
stop: function() {
|
955 |
+
edcal.inDrag = false;
|
956 |
+
},
|
957 |
+
drag: function(event, ui) {
|
958 |
+
edcal.handleDrag(event, ui);
|
959 |
+
},
|
960 |
+
scroll: false,
|
961 |
+
refreshPositions: true
|
962 |
+
});
|
963 |
+
jQuery(this).addClass('draggable');
|
964 |
+
}
|
965 |
+
});
|
966 |
+
},
|
967 |
+
|
968 |
+
/*
|
969 |
+
When the user is dragging we scroll the calendar when they get
|
970 |
+
close to the top or bottom of the calendar. This function handles
|
971 |
+
scrolling the calendar when that happens.
|
972 |
+
*/
|
973 |
+
handleDrag: function(event, ui) {
|
974 |
+
if (edcal.isMoving || edcal.isDragScrolling
|
975 |
+
/*
|
976 |
+
TODO: make sure that if we are on top of the drafts drawer
|
977 |
+
we don't dragScroll.
|
978 |
+
*/
|
979 |
+
) {
|
980 |
+
return;
|
981 |
+
}
|
982 |
+
|
983 |
+
edcal.isDragScrolling = true;
|
984 |
+
|
985 |
+
if (event.pageY < (edcal.position.top + 10)) {
|
986 |
+
/*
|
987 |
+
This means we're close enough to the top of the calendar to
|
988 |
+
start scrolling up.
|
989 |
+
*/
|
990 |
+
edcal.move(1, false);
|
991 |
+
} else if (event.pageY > (edcal.position.bottom - 10)) {
|
992 |
+
/*
|
993 |
+
This means we're close enough to the bottom of the calendar
|
994 |
+
to start scrolling down.
|
995 |
+
*/
|
996 |
+
edcal.move(1, true);
|
997 |
+
}
|
998 |
+
|
999 |
+
/*
|
1000 |
+
We want to start scrolling as soon as the user gets their mouse
|
1001 |
+
close to the top, but if we just scrolle with every event then
|
1002 |
+
the screen flies by way too fast. We wait here so we scroll one
|
1003 |
+
row and wait three quarters of a second. That way it gives a
|
1004 |
+
smooth scroll that doesn't go too fast to track.
|
1005 |
+
*/
|
1006 |
+
setTimeout(function() {
|
1007 |
+
edcal.isDragScrolling = false;
|
1008 |
+
}, 300);
|
1009 |
+
},
|
1010 |
+
|
1011 |
+
/*
|
1012 |
+
This is a utility method to find a post and remove it
|
1013 |
+
from the cache map.
|
1014 |
+
*/
|
1015 |
+
removePostFromMap: function(/*string*/ dayobjId, /*string*/ postId) {
|
1016 |
+
if (edcal.posts[dayobjId]) {
|
1017 |
+
for (var i = 0; i < edcal.posts[dayobjId].length; i++) {
|
1018 |
+
if (edcal.posts[dayobjId][i] &&
|
1019 |
+
'post-' + edcal.posts[dayobjId][i].id === postId) {
|
1020 |
+
edcal.posts[dayobjId][i] = null;
|
1021 |
+
return true;
|
1022 |
+
}
|
1023 |
+
}
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
return false;
|
1027 |
+
},
|
1028 |
+
|
1029 |
+
/*
|
1030 |
+
* Adds a post to an already existing calendar day.
|
1031 |
+
*/
|
1032 |
+
addPostItem: function(/*post*/ post, /*string*/ dayobjId) {
|
1033 |
+
/*
|
1034 |
+
* We are trying to select the .postlist item under this div. It would
|
1035 |
+
* be much more adaptable to reference the class by name, but this is
|
1036 |
+
* significantly faster. Especially on IE.
|
1037 |
+
*/
|
1038 |
+
// edcal.output('post.id: '+post.id+'\ndayobjId: '+dayobjId);
|
1039 |
+
jQuery('#' + dayobjId + ' > div > ul').append(edcal.createPostItem(post, dayobjId));
|
1040 |
+
},
|
1041 |
+
|
1042 |
+
/*
|
1043 |
+
Makes all the posts in the specified day draggable
|
1044 |
+
and adds the edcal_quickedit.
|
1045 |
+
*/
|
1046 |
+
addPostItemDragAndToolltip: function(/*string*/ dayobjId) {
|
1047 |
+
edcal.draggablePost('#' + dayobjId + ' > div > ul > li');
|
1048 |
+
},
|
1049 |
+
|
1050 |
+
|
1051 |
+
/*
|
1052 |
+
Deletes the post specified. Will only be executed once the user clicks the confirm link to proceed.
|
1053 |
+
*/
|
1054 |
+
deletePost: function(/*Post ID*/ postId, /*function*/ callback) {
|
1055 |
+
|
1056 |
+
var url = edcal.ajax_url() + '&action=edcal_deletepost&postid=' + postId;
|
1057 |
+
|
1058 |
+
jQuery.ajax({
|
1059 |
+
url: url,
|
1060 |
+
type: 'POST',
|
1061 |
+
processData: false,
|
1062 |
+
timeout: 100000,
|
1063 |
+
dataType: 'json',
|
1064 |
+
success: function(res) {
|
1065 |
+
if (res.post.date_gmt === edcal.NO_DATE) {
|
1066 |
+
edcal.removePostItem(res.post.date_gmt, 'post-' + res.post.id);
|
1067 |
+
} else {
|
1068 |
+
edcal.removePostItem(res.post.date, 'post-' + res.post.id);
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
if (res.error) {
|
1072 |
+
/*
|
1073 |
+
* If there was an error we need to remove the dropped
|
1074 |
+
* post item.
|
1075 |
+
*/
|
1076 |
+
if (res.error === edcal.NONCE_ERROR) {
|
1077 |
+
edcal.showError(edcal.checksum_error);
|
1078 |
+
}
|
1079 |
+
} else {
|
1080 |
+
edcal.output('Finished deleting the post: "' + res.post.title + '" with id:' + res.post.id);
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
if (callback) {
|
1084 |
+
callback(res);
|
1085 |
+
}
|
1086 |
+
},
|
1087 |
+
error: function(xhr) {
|
1088 |
+
edcal.showError(edcal.general_error);
|
1089 |
+
if (xhr.responseText) {
|
1090 |
+
edcal.output('deletePost xhr.responseText: ' + xhr.responseText);
|
1091 |
+
}
|
1092 |
+
}
|
1093 |
+
});
|
1094 |
+
},
|
1095 |
+
|
1096 |
+
|
1097 |
+
/*
|
1098 |
+
* Confirms if you want to delete the specified post
|
1099 |
+
*/
|
1100 |
+
confirmDelete: function(/*string*/ posttitle) {
|
1101 |
+
if (confirm(edcal.str_del_msg1 + posttitle + edcal.str_del_msg2)) {
|
1102 |
+
return true;
|
1103 |
+
// [wes] might be better to call deletePost from here directly, rather than return control back to the agent... which will then follow the link and call deletePost
|
1104 |
+
} else {
|
1105 |
+
return false;
|
1106 |
+
}
|
1107 |
+
},
|
1108 |
+
|
1109 |
+
/*
|
1110 |
+
This is a simple function that creates the AJAX URL with the
|
1111 |
+
nonce value generated in edcal.php. The ajaxurl variable is
|
1112 |
+
defined by WordPress in all of the admin pages.
|
1113 |
+
*/
|
1114 |
+
ajax_url: function() {
|
1115 |
+
return ajaxurl + '?_wpnonce=' + edcal.wp_nonce;
|
1116 |
+
},
|
1117 |
+
|
1118 |
+
/*
|
1119 |
+
NOT USED
|
1120 |
+
*/
|
1121 |
+
getMediaBar: function() {
|
1122 |
+
return jQuery('#cal_mediabar').html();
|
1123 |
+
},
|
1124 |
+
|
1125 |
+
/*
|
1126 |
+
* Called when the "Add a post" link is clicked.
|
1127 |
+
* Sets up a post object and displays the add form
|
1128 |
+
*/
|
1129 |
+
addPost: function() {
|
1130 |
+
jQuery('#newPostScheduleButton').addClass('disabled');
|
1131 |
+
|
1132 |
+
var date = jQuery(this).parent().parent().attr('id');
|
1133 |
+
|
1134 |
+
var formattedtime = edcal.defaultTime;
|
1135 |
+
if (edcal.timeFormat !== 'H:i' && edcal.timeFormat !== 'G:i') {
|
1136 |
+
formattedtime += ' AM';
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
var post = {
|
1140 |
+
id: 0,
|
1141 |
+
date: date,
|
1142 |
+
formatteddate: edcal.getDayFromDayId(date).toString(edcal.previewDateFormat),
|
1143 |
+
time: formattedtime
|
1144 |
+
};
|
1145 |
+
edcal.showForm(post);
|
1146 |
+
return false;
|
1147 |
+
},
|
1148 |
+
|
1149 |
+
/*
|
1150 |
+
* Called when the "Add a draft" link is clicked.
|
1151 |
+
* Sets up a post object and displays the add form
|
1152 |
+
*/
|
1153 |
+
addDraft: function() {
|
1154 |
+
jQuery('#newPostScheduleButton').addClass('disabled');
|
1155 |
+
|
1156 |
+
var post = {
|
1157 |
+
id: 0,
|
1158 |
+
date: Date.today(),
|
1159 |
+
formatteddate: edcal.NO_DATE,
|
1160 |
+
time: edcal.NO_DATE,
|
1161 |
+
status: 'draft'
|
1162 |
+
};
|
1163 |
+
edcal.showForm(post);
|
1164 |
+
return false;
|
1165 |
+
},
|
1166 |
+
|
1167 |
+
/*
|
1168 |
+
* Called when the Edit link for a post is clicked.
|
1169 |
+
* Gets post details via an AJAX call and displays the edit form
|
1170 |
+
* with the fields populated.
|
1171 |
+
*/
|
1172 |
+
editPost: function(/*int*/ post_id) {
|
1173 |
+
// Un-disable the save buttons because we're editing
|
1174 |
+
jQuery('#newPostScheduleButton').removeClass('disabled');
|
1175 |
+
|
1176 |
+
// Editing, so we need to make an ajax call to get body of post
|
1177 |
+
edcal.getPost(post_id, edcal.showForm);
|
1178 |
+
return false;
|
1179 |
+
},
|
1180 |
+
|
1181 |
+
|
1182 |
+
/*
|
1183 |
+
* When the user presses the new post link on each calendar cell they get
|
1184 |
+
* a tooltip which prompts them to add or edit a post. Once
|
1185 |
+
* they hit save we call this function.
|
1186 |
+
*
|
1187 |
+
* post - post object containing data for the post
|
1188 |
+
* doEdit - should we edit the post immediately? if true we send the user
|
1189 |
+
* to the edit screen for their new post.
|
1190 |
+
*/
|
1191 |
+
savePost: function(/*object*/ post, /*boolean*/ doEdit, /*boolean*/ doPublish, /*function*/ callback) {
|
1192 |
+
if (typeof(post) === 'undefined' || post === null) {
|
1193 |
+
post = edcal.serializePost();
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
//edcal.output('savePost(' + post.date + ', ' + post.title + ')');
|
1197 |
+
|
1198 |
+
jQuery('#edit-slug-buttons').addClass('tiploading');
|
1199 |
+
|
1200 |
+
/*
|
1201 |
+
The date.js library has a bug where it gives the wrong
|
1202 |
+
24 hour value for 12AM and 12PM. I've filed a bug report,
|
1203 |
+
but we still need to work aorund the issue. Hackito
|
1204 |
+
ergo sum.
|
1205 |
+
*/
|
1206 |
+
var postTimeUpper = post.time.toUpperCase();
|
1207 |
+
if (postTimeUpper.slice(0, 2) === '12' &&
|
1208 |
+
postTimeUpper.slice(postTimeUpper.length - 2, postTimeUpper.length) === 'PM') {
|
1209 |
+
post.time = '12:' + postTimeUpper.slice(3, 5);
|
1210 |
+
} else if (postTimeUpper.slice(0, 2) === '12' &&
|
1211 |
+
postTimeUpper.slice(post.time.length - 2, post.time.length) === 'AM') {
|
1212 |
+
post.time = '00:' + postTimeUpper.slice(3, 5);
|
1213 |
+
}
|
1214 |
+
|
1215 |
+
var time;
|
1216 |
+
if (post.time !== '') {
|
1217 |
+
time = Date.parse(post.time);
|
1218 |
+
} else {
|
1219 |
+
time = Date.parse(edcal.defaultTime); // If we don't have a time set, default it to 10am
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
var formattedDate;
|
1223 |
+
|
1224 |
+
if (time !== null && time !== edcal.NO_DATE) {
|
1225 |
+
var formattedtime = time.format('H:i:s');
|
1226 |
+
formattedDate = encodeURIComponent(edcal.getDayFromDayId(post.date).toString(edcal.wp_dateFormat) + ' ' + formattedtime);
|
1227 |
+
} else {
|
1228 |
+
formattedDate = encodeURIComponent(post.date.toString(edcal.wp_dateFormat + ' H:i:s'));
|
1229 |
+
}
|
1230 |
+
|
1231 |
+
var url = edcal.ajax_url() + '&action=edcal_savepost';
|
1232 |
+
var postData = 'date=' + formattedDate +
|
1233 |
+
'&title=' + encodeURIComponent(post.title) +
|
1234 |
+
'&content=' + encodeURIComponent(post.content) +
|
1235 |
+
'&id=' + encodeURIComponent(post.id) +
|
1236 |
+
'&status=' + encodeURIComponent(post.status) +
|
1237 |
+
'&orig_status=' + encodeURIComponent(post.orig_status);
|
1238 |
+
|
1239 |
+
if (time === null || time === edcal.NO_DATE) {
|
1240 |
+
postData += '&date_gmt=' + encodeURIComponent('0000-00-00 00:00:00');
|
1241 |
+
}
|
1242 |
+
|
1243 |
+
if (edcal.getUrlVars().post_type) {
|
1244 |
+
postData += '&post_type=' + encodeURIComponent(edcal.getUrlVars().post_type);
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
if (doPublish) {
|
1248 |
+
postData += '&dopublish=' + encodeURIComponent('future');
|
1249 |
+
}
|
1250 |
+
|
1251 |
+
jQuery.ajax({
|
1252 |
+
url: url,
|
1253 |
+
type: 'POST',
|
1254 |
+
processData: false,
|
1255 |
+
data: postData,
|
1256 |
+
timeout: 100000,
|
1257 |
+
dataType: 'json',
|
1258 |
+
success: function(res) {
|
1259 |
+
jQuery('#edit-slug-buttons').removeClass('tiploading');
|
1260 |
+
jQuery('#edcal_quickedit').hide();
|
1261 |
+
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = true;
|
1262 |
+
if (res.error) {
|
1263 |
+
/*
|
1264 |
+
* If there was an error we need to remove the dropped
|
1265 |
+
* post item.
|
1266 |
+
*/
|
1267 |
+
if (res.error === edcal.NONCE_ERROR) {
|
1268 |
+
edcal.showError(edcal.checksum_error);
|
1269 |
+
}
|
1270 |
+
return false;
|
1271 |
+
}
|
1272 |
+
|
1273 |
+
if (!res.post) {
|
1274 |
+
edcal.showError('There was an error creating a new post for your blog.');
|
1275 |
+
} else {
|
1276 |
+
if (doEdit) {
|
1277 |
+
/*
|
1278 |
+
* If the user wanted to edit the post then we redirect
|
1279 |
+
* them to the edit page.
|
1280 |
+
*/
|
1281 |
+
window.location = res.post.editlink.replace('&', '&');
|
1282 |
+
} else {
|
1283 |
+
|
1284 |
+
var date = res.post.date;
|
1285 |
+
|
1286 |
+
if (res.post.date_gmt === edcal.NO_DATE) {
|
1287 |
+
date = res.post.date_gmt;
|
1288 |
+
}
|
1289 |
+
|
1290 |
+
if (res.post.id) {
|
1291 |
+
edcal.removePostItem(date, 'post-' + res.post.id);
|
1292 |
+
}
|
1293 |
+
|
1294 |
+
edcal.addPostItem(res.post, date);
|
1295 |
+
edcal.addPostItemDragAndToolltip(date);
|
1296 |
+
}
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
if (callback) {
|
1300 |
+
callback(res);
|
1301 |
+
}
|
1302 |
+
|
1303 |
+
return true;
|
1304 |
+
},
|
1305 |
+
error: function(xhr) {
|
1306 |
+
jQuery('#edit-slug-buttons').removeClass('tiploading');
|
1307 |
+
jQuery('#edcal_quickedit').hide();
|
1308 |
+
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = true;
|
1309 |
+
edcal.showError(edcal.general_error);
|
1310 |
+
if (xhr.responseText) {
|
1311 |
+
edcal.output('savePost xhr.responseText: ' + xhr.responseText);
|
1312 |
+
}
|
1313 |
+
}
|
1314 |
+
});
|
1315 |
+
return false;
|
1316 |
+
},
|
1317 |
+
|
1318 |
+
/*
|
1319 |
+
* Collects form values for the post inputted by the user into an object
|
1320 |
+
*/
|
1321 |
+
serializePost: function() {
|
1322 |
+
var post = {};
|
1323 |
+
|
1324 |
+
jQuery('#edcal_quickedit').find('input, textarea, select').each(function() {
|
1325 |
+
post[this.name] = this.value;
|
1326 |
+
});
|
1327 |
+
return post;
|
1328 |
+
},
|
1329 |
+
|
1330 |
+
/*
|
1331 |
+
* Accepts new or existing post data and then populates text fields as necessary
|
1332 |
+
*/
|
1333 |
+
showForm: function(post) {
|
1334 |
+
edcal.resetForm();
|
1335 |
+
|
1336 |
+
if (post.formatteddate === edcal.NO_DATE || post.date_gmt === edcal.NO_DATE) {
|
1337 |
+
jQuery('#timeEditControls').hide();
|
1338 |
+
} else {
|
1339 |
+
jQuery('#timeEditControls').show();
|
1340 |
+
}
|
1341 |
+
|
1342 |
+
// show tooltip
|
1343 |
+
jQuery('#edcal_quickedit').center().show();
|
1344 |
+
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = false;
|
1345 |
+
|
1346 |
+
if (!post.id) {
|
1347 |
+
if (post.formatteddate === edcal.NO_DATE) {
|
1348 |
+
jQuery('#tooltiptitle').text(edcal.str_newdraft_title);
|
1349 |
+
} else {
|
1350 |
+
jQuery('#tooltiptitle').text(edcal.str_newpost_title + post.formatteddate);
|
1351 |
+
}
|
1352 |
+
} else {
|
1353 |
+
jQuery('#tooltiptitle').text(sprintf(edcal.str_edit_post_title, post.typeTitle, edcal.getDayFromDayId(post.date).toString(edcal.previewDateFormat)));
|
1354 |
+
|
1355 |
+
// sets the read-only author field
|
1356 |
+
//jQuery('#edcal-author-p').html(post.author);
|
1357 |
+
|
1358 |
+
// add post info to form
|
1359 |
+
jQuery('#edcal-title-new-field').val(post.title);
|
1360 |
+
jQuery('#content').val(post.content);
|
1361 |
+
}
|
1362 |
+
|
1363 |
+
if (post.status === 'future') {
|
1364 |
+
jQuery('#newPostScheduleButton').text(edcal.str_update);
|
1365 |
+
}
|
1366 |
+
|
1367 |
+
if (post.status) {
|
1368 |
+
jQuery('#edcal-status').val(post.status);
|
1369 |
+
edcal.updatePublishButton();
|
1370 |
+
} else {
|
1371 |
+
if (0 !== jQuery('#edcal-status option[value=' + edcal.defaultStatus + ']').length) {
|
1372 |
+
/*
|
1373 |
+
* We want to use the default status if it exists in the list and we'll
|
1374 |
+
* default to the draft status if the default one is in the list.
|
1375 |
+
*/
|
1376 |
+
jQuery('#edcal-status').val(edcal.defaultStatus);
|
1377 |
+
} else {
|
1378 |
+
jQuery('#edcal-status').val('draft');
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
jQuery('#newPostScheduleButton').text(edcal.str_save);
|
1382 |
+
}
|
1383 |
+
|
1384 |
+
/*
|
1385 |
+
If you have a status that isn't draft or future we
|
1386 |
+
just make it read only.
|
1387 |
+
*/
|
1388 |
+
if (post.status && post.status !== 'draft' && post.status !== 'future' && post.status !== 'pending') {
|
1389 |
+
jQuery('#edcal-status').attr('disabled', 'true');
|
1390 |
+
jQuery('#edcal-status').append('<option class="temp" value="' + post.status + '">' + post.status + '</option>');
|
1391 |
+
jQuery('#edcal-status').val(post.status);
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
|
1395 |
+
|
1396 |
+
if (post.formatteddate !== edcal.NO_DATE &&
|
1397 |
+
edcal.getDayFromDayId(post.date).compareTo(Date.today()) === -1) {
|
1398 |
+
/*
|
1399 |
+
* We only allow drafts in the past
|
1400 |
+
*/
|
1401 |
+
jQuery('#edcal-status').attr('disabled', 'true');
|
1402 |
+
}
|
1403 |
+
|
1404 |
+
var time = post.time;
|
1405 |
+
jQuery('#edcal-time').val(time);
|
1406 |
+
|
1407 |
+
// set hidden fields: post.date, post.id
|
1408 |
+
jQuery('#edcal-date').val(post.date);
|
1409 |
+
jQuery('#edcal-id').val(post.id);
|
1410 |
+
|
1411 |
+
/*
|
1412 |
+
* Put the focus in the post title field when the tooltip opens.
|
1413 |
+
*/
|
1414 |
+
|
1415 |
+
jQuery('#edcal-title-new-field').focus();
|
1416 |
+
jQuery('#edcal-title-new-field').select();
|
1417 |
+
},
|
1418 |
+
|
1419 |
+
/*
|
1420 |
+
* Hides the add/edit form
|
1421 |
+
*/
|
1422 |
+
hideForm: function() {
|
1423 |
+
jQuery('#edcal_quickedit').hide();
|
1424 |
+
jQuery('#edcal_scrollable').data('scrollable').getConf().keyboard = true;
|
1425 |
+
edcal.resetForm();
|
1426 |
+
},
|
1427 |
+
|
1428 |
+
/*
|
1429 |
+
* Clears all the input values in the add/edit form
|
1430 |
+
*/
|
1431 |
+
resetForm: function() {
|
1432 |
+
jQuery('#edcal_quickedit').find('input, textarea, select').each(function() {
|
1433 |
+
this.value = '';
|
1434 |
+
});
|
1435 |
+
|
1436 |
+
jQuery('#edcal-status').removeAttr('disabled');
|
1437 |
+
|
1438 |
+
jQuery('#newPostScheduleButton').text(edcal.str_publish);
|
1439 |
+
|
1440 |
+
jQuery('#tooltiptitle').text('');
|
1441 |
+
//jQuery('#edcal-author-p').html('');
|
1442 |
+
|
1443 |
+
jQuery('#edcal-status').removeAttr('disabled');
|
1444 |
+
|
1445 |
+
jQuery('#edcal-status .temp').remove();
|
1446 |
+
},
|
1447 |
+
|
1448 |
+
/*
|
1449 |
+
Creates the HTML for a post item and adds the data for
|
1450 |
+
the post to the posts cache.
|
1451 |
+
*/
|
1452 |
+
createPostItem: function(/*post*/ post, /*string*/ dayobjId) {
|
1453 |
+
if (!edcal.posts[dayobjId]) {
|
1454 |
+
edcal.posts[dayobjId] = [];
|
1455 |
+
}
|
1456 |
+
|
1457 |
+
edcal.posts[dayobjId][edcal.posts[dayobjId].length] = post;
|
1458 |
+
|
1459 |
+
return edcal.getPostItemString(post);
|
1460 |
+
},
|
1461 |
+
|
1462 |
+
/*
|
1463 |
+
Finds the post object for the specified post ID in the
|
1464 |
+
specified day.
|
1465 |
+
*/
|
1466 |
+
findPostForId: function(/*string*/ dayobjId, /*string*/ postId) {
|
1467 |
+
if (edcal.posts[dayobjId]) {
|
1468 |
+
for (var i = 0; i < edcal.posts[dayobjId].length; i++) {
|
1469 |
+
if (edcal.posts[dayobjId][i] &&
|
1470 |
+
'post-' + edcal.posts[dayobjId][i].id === postId) {
|
1471 |
+
return edcal.posts[dayobjId][i];
|
1472 |
+
}
|
1473 |
+
}
|
1474 |
+
}
|
1475 |
+
|
1476 |
+
return null;
|
1477 |
+
},
|
1478 |
+
|
1479 |
+
/*
|
1480 |
+
* Removes a post from the HTML and the posts cache.
|
1481 |
+
*/
|
1482 |
+
removePostItem: function(/*string*/ dayobjId, /*string*/ postId) {
|
1483 |
+
//edcal.output('removePostItem(' + dayobjId + ', ' + postId + ')');
|
1484 |
+
if (edcal.findPostForId(dayobjId, postId)) {
|
1485 |
+
for (var i = 0; i < edcal.posts[dayobjId].length; i++) {
|
1486 |
+
if (edcal.posts[dayobjId][i] && 'post-' + edcal.posts[dayobjId][i].id === postId) {
|
1487 |
+
edcal.posts[dayobjId][i] = null;
|
1488 |
+
}
|
1489 |
+
}
|
1490 |
+
}
|
1491 |
+
|
1492 |
+
jQuery('#' + postId).remove();
|
1493 |
+
},
|
1494 |
+
|
1495 |
+
/*
|
1496 |
+
Gets all the post items for the specified day from
|
1497 |
+
the post cache.
|
1498 |
+
*/
|
1499 |
+
getPostItems: function(/*string*/ dayobjId) {
|
1500 |
+
var postsString = '';
|
1501 |
+
|
1502 |
+
if (edcal.posts[dayobjId]) {
|
1503 |
+
var posts = edcal.posts[dayobjId];
|
1504 |
+
if (posts.length < 50) {
|
1505 |
+
/*
|
1506 |
+
* If there are fewer than 50 posts then we just load them
|
1507 |
+
*/
|
1508 |
+
for (var i = 0; i < posts.length; i++) {
|
1509 |
+
if (posts[i]) {
|
1510 |
+
postsString += edcal.getPostItemString(posts[i]);
|
1511 |
+
}
|
1512 |
+
}
|
1513 |
+
} else {
|
1514 |
+
/*
|
1515 |
+
If there are more than 50 posts then we want to batch
|
1516 |
+
the load so it doesn't slow down the browser.
|
1517 |
+
*/
|
1518 |
+
edcal.addPostItems(dayobjId, 0, 50);
|
1519 |
+
}
|
1520 |
+
}
|
1521 |
+
|
1522 |
+
return postsString;
|
1523 |
+
},
|
1524 |
+
|
1525 |
+
addPostItems: function(/*string*/ dayobjId, /*int*/ index, /*int*/ length) {
|
1526 |
+
var posts = edcal.posts[dayobjId];
|
1527 |
+
var postsString = '';
|
1528 |
+
setTimeout(function() {
|
1529 |
+
for (var i = index; i < index + length && i < posts.length; i++) {
|
1530 |
+
if (posts[i]) {
|
1531 |
+
postsString += edcal.getPostItemString(posts[i]);
|
1532 |
+
}
|
1533 |
+
}
|
1534 |
+
|
1535 |
+
jQuery('#' + dayobjId + ' ul').append(postsString);
|
1536 |
+
|
1537 |
+
if (index + length < posts.length) {
|
1538 |
+
edcal.addPostItems(dayobjId, index + length, 50);
|
1539 |
+
}
|
1540 |
+
}, 100);
|
1541 |
+
},
|
1542 |
+
|
1543 |
+
/*
|
1544 |
+
This function shows the action links for the post with the
|
1545 |
+
specified ID.
|
1546 |
+
*/
|
1547 |
+
showActionLinks: function(/*string*/ postid) {
|
1548 |
+
if (edcal.actionTimer) {
|
1549 |
+
clearTimeout(edcal.actionTimer);
|
1550 |
+
}
|
1551 |
+
|
1552 |
+
var timeout = 250;
|
1553 |
+
|
1554 |
+
var post = edcal.findPostForId(jQuery('#' + postid).parent().parent().parent().attr('id'), postid);
|
1555 |
+
|
1556 |
+
if (edcal.inDrag || !edcal.isPostEditable(post)) {
|
1557 |
+
return;
|
1558 |
+
}
|
1559 |
+
|
1560 |
+
var elem = jQuery('#' + postid + ' > div.postactions');
|
1561 |
+
|
1562 |
+
if (edcal.actionLinksElem && edcal.actionLinksElem.get(0) !== elem.get(0)) {
|
1563 |
+
edcal.actionLinksElem.slideUp();
|
1564 |
+
}
|
1565 |
+
|
1566 |
+
edcal.actionLinksElem = elem;
|
1567 |
+
|
1568 |
+
edcal.actionTimer = setTimeout(function() {
|
1569 |
+
elem.slideDown();
|
1570 |
+
|
1571 |
+
|
1572 |
+
if (elem.parent().position().top + elem.parent().height() > elem.parent().parent().height()) {
|
1573 |
+
/*
|
1574 |
+
This means the action links probably won't be visible and we need to
|
1575 |
+
scroll to make sure the users can see it.
|
1576 |
+
*/
|
1577 |
+
var p = jQuery('#' + postid + ' > div.postactions').parent().parent();
|
1578 |
+
p.scrollTop(p.scrollTop() + 45);
|
1579 |
+
}
|
1580 |
+
}, timeout);
|
1581 |
+
},
|
1582 |
+
|
1583 |
+
/*
|
1584 |
+
Hides the action links for the post with the specified
|
1585 |
+
post ID.
|
1586 |
+
*/
|
1587 |
+
hideActionLinks: function(/*string*/ postid) {
|
1588 |
+
if (edcal.actionTimer) {
|
1589 |
+
clearTimeout(edcal.actionTimer);
|
1590 |
+
}
|
1591 |
+
|
1592 |
+
edcal.actionTimer = setTimeout(function() {
|
1593 |
+
var elem = jQuery('#' + postid + ' > div.postactions');
|
1594 |
+
elem.slideUp();
|
1595 |
+
edcal.actionLinksElem = null;
|
1596 |
+
}, 1000);
|
1597 |
+
},
|
1598 |
+
|
1599 |
+
/*
|
1600 |
+
Returns true if the post is movable and false otherwise.
|
1601 |
+
This is based on the post date
|
1602 |
+
*/
|
1603 |
+
isPostMovable: function(/*post*/ post) {
|
1604 |
+
return post.editlink && post.status !== 'publish';
|
1605 |
+
},
|
1606 |
+
|
1607 |
+
/*
|
1608 |
+
Returns true if the post is editable and false otherwise.
|
1609 |
+
This is based on user permissions
|
1610 |
+
*/
|
1611 |
+
isPostEditable: function(/*post*/ post) {
|
1612 |
+
return post.editlink;
|
1613 |
+
},
|
1614 |
+
|
1615 |
+
/*
|
1616 |
+
Returns readonly if the post isn't editable
|
1617 |
+
*/
|
1618 |
+
getPostEditableClass: function(/*post*/ post) {
|
1619 |
+
if (post.editlink) {
|
1620 |
+
return '';
|
1621 |
+
} else {
|
1622 |
+
return 'readonly';
|
1623 |
+
}
|
1624 |
+
},
|
1625 |
+
|
1626 |
+
/*
|
1627 |
+
* Gets the HTML string for a post.
|
1628 |
+
*/
|
1629 |
+
getPostItemString: function(/*post*/ post) {
|
1630 |
+
var posttitle = post.title;
|
1631 |
+
|
1632 |
+
if (posttitle === '') {
|
1633 |
+
posttitle = '[No Title]';
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
if (edcal.statusPref) {
|
1637 |
+
if (post.status === 'draft' &&
|
1638 |
+
post.sticky === '1') {
|
1639 |
+
/*
|
1640 |
+
* Then this post is a sticky draft
|
1641 |
+
*/
|
1642 |
+
posttitle += edcal.str_draft_sticky;
|
1643 |
+
} else if (post.status === 'pending' &&
|
1644 |
+
post.sticky === '1') {
|
1645 |
+
/*
|
1646 |
+
* Then this post is a sticky pending post
|
1647 |
+
*/
|
1648 |
+
posttitle += edcal.str_pending_sticky;
|
1649 |
+
} else if (post.sticky === '1') {
|
1650 |
+
posttitle += edcal.str_sticky;
|
1651 |
+
} else if (post.status === 'pending') {
|
1652 |
+
posttitle += edcal.str_pending;
|
1653 |
+
} else if (post.status === 'draft') {
|
1654 |
+
posttitle += edcal.str_draft;
|
1655 |
+
} else if (post.status !== 'publish' &&
|
1656 |
+
post.status !== 'future' &&
|
1657 |
+
post.status !== 'pending') {
|
1658 |
+
/*
|
1659 |
+
There are some WordPress plugins that let you specify
|
1660 |
+
custom post status. In that case we just want to show
|
1661 |
+
you the status.
|
1662 |
+
*/
|
1663 |
+
posttitle += ' [' + post.status + ']';
|
1664 |
+
}
|
1665 |
+
}
|
1666 |
+
|
1667 |
+
if (edcal.timePref) {
|
1668 |
+
posttitle = '<span class="posttime">' + post.formattedtime + '</span> ' + posttitle;
|
1669 |
+
}
|
1670 |
+
|
1671 |
+
if (edcal.authorPref) {
|
1672 |
+
posttitle = sprintf(edcal.str_by, posttitle, '<span class="postauthor">' + post.author + '</span>');
|
1673 |
+
}
|
1674 |
+
|
1675 |
+
|
1676 |
+
var classString = '';
|
1677 |
+
|
1678 |
+
if (edcal.isPostMovable(post)) {
|
1679 |
+
return '<li onmouseover="edcal.showActionLinks(\'post-' + post.id + '\');" ' +
|
1680 |
+
'onmouseout="edcal.hideActionLinks(\'post-' + post.id + '\');" ' +
|
1681 |
+
'id="post-' + post.id + '" class="post ' + post.status + ' ' + edcal.getPostEditableClass(post) + post.slugs + '"><div class="postlink ' + classString + '">' +
|
1682 |
+
'<span>' + posttitle + '</span>' +
|
1683 |
+
'</div>' +
|
1684 |
+
'<div class="postactions">' +
|
1685 |
+
'<a href="' + post.editlink + '">' + edcal.str_edit + '</a> | ' +
|
1686 |
+
'<a href="#" onclick="edcal.editPost(' + post.id + '); return false;">' + edcal.str_quick_edit + '</a> | ' +
|
1687 |
+
'<a href="' + post.dellink + '" onclick="return edcal.confirmDelete(\'' + post.title + '\');">' + edcal.str_del + '</a> | ' +
|
1688 |
+
'<a href="' + post.permalink + '"' +
|
1689 |
+
// ' onclick="edcal.getPost('+post.id+',function(r){ edcal.output(r) }); return false;"' + // for debugging
|
1690 |
+
'>' + edcal.str_view + '</a>' +
|
1691 |
+
'</div></li>';
|
1692 |
+
} else {
|
1693 |
+
return '<li onmouseover="edcal.showActionLinks(\'post-' + post.id + '\');" ' +
|
1694 |
+
'onmouseout="edcal.hideActionLinks(\'post-' + post.id + '\');" ' +
|
1695 |
+
'id="post-' + post.id + '" class="post ' + post.status + ' ' + edcal.getPostEditableClass(post) + '"><div class="postlink ' + classString + '">' +
|
1696 |
+
'<span>' + posttitle + '</span>' +
|
1697 |
+
'</div>' +
|
1698 |
+
'<div class="postactions">' +
|
1699 |
+
'<a href="' + post.editlink + '">' + edcal.str_republish + '</a> | ' +
|
1700 |
+
'<a href="' + post.permalink + '">' + edcal.str_view + '</a>' +
|
1701 |
+
'</div></li>';
|
1702 |
+
}
|
1703 |
+
},
|
1704 |
+
|
1705 |
+
/*
|
1706 |
+
Finds the calendar cell for the current day and adds the
|
1707 |
+
class "today" to that cell.
|
1708 |
+
*/
|
1709 |
+
setClassforToday: function() {
|
1710 |
+
/*
|
1711 |
+
We want to set a class for the cell that represents the current day so we can
|
1712 |
+
give it a background color.
|
1713 |
+
*/
|
1714 |
+
jQuery('#' + Date.today().toString(edcal.internalDateFormat)).addClass('today');
|
1715 |
+
},
|
1716 |
+
|
1717 |
+
/*
|
1718 |
+
Most browsers need us to set a calendar height in pixels instead
|
1719 |
+
of percent. This function get the correct pixel height for the
|
1720 |
+
calendar based on the window height.
|
1721 |
+
*/
|
1722 |
+
getCalHeight: function() {
|
1723 |
+
var myHeight = jQuery(window).height() - jQuery('#footer').height() - jQuery('#wphead').height() - 150;
|
1724 |
+
|
1725 |
+
/*
|
1726 |
+
We don't want to make the calendar too short even if the
|
1727 |
+
user's screen is super short.
|
1728 |
+
*/
|
1729 |
+
return Math.max(myHeight, 500);
|
1730 |
+
},
|
1731 |
+
|
1732 |
+
/*
|
1733 |
+
Moves the calendar a certain number of steps in the specified direction.
|
1734 |
+
True moves the calendar down into the future and false moves the calendar
|
1735 |
+
up into the past.
|
1736 |
+
*/
|
1737 |
+
move: function(/*int*/ steps, /*boolean*/ direction, /*function*/ callback) {
|
1738 |
+
/*
|
1739 |
+
* If the add/edit post form is visible, don't go anywhere.
|
1740 |
+
*/
|
1741 |
+
if (jQuery('#edcal_quickedit').is(':visible')) {
|
1742 |
+
return;
|
1743 |
+
}
|
1744 |
+
|
1745 |
+
/*
|
1746 |
+
The working date is a marker for the last calendar row we created.
|
1747 |
+
If we are moving forward that will be the last row, if we are moving
|
1748 |
+
backward it will be the first row. If we switch direction we need
|
1749 |
+
to bump up our date by 11 rows times 7 days a week or 77 days.
|
1750 |
+
*/
|
1751 |
+
if (edcal.currentDirection !== direction) {
|
1752 |
+
if (direction) { // into the future
|
1753 |
+
edcal._wDate = edcal._wDate.add((edcal.weeksPref + 7) * 7).days();
|
1754 |
+
} else { // into the past
|
1755 |
+
edcal._wDate = edcal._wDate.add(-((edcal.weeksPref + 7) * 7)).days();
|
1756 |
+
}
|
1757 |
+
|
1758 |
+
edcal.steps = 0;
|
1759 |
+
edcal.moveDate = edcal._wDate;
|
1760 |
+
}
|
1761 |
+
|
1762 |
+
edcal.currentDirection = direction;
|
1763 |
+
|
1764 |
+
var i;
|
1765 |
+
|
1766 |
+
|
1767 |
+
if (direction) {
|
1768 |
+
for (i = 0; i < steps; i++) {
|
1769 |
+
jQuery('#cal > div:first').remove();
|
1770 |
+
edcal.createRow(jQuery('#cal'), true);
|
1771 |
+
edcal._wDate.add(7).days();
|
1772 |
+
}
|
1773 |
+
edcal.alignCal();
|
1774 |
+
} else {
|
1775 |
+
for (i = 0; i < steps; i++) {
|
1776 |
+
jQuery('#cal > div:last').remove();
|
1777 |
+
edcal.createRow(jQuery('#cal'), false);
|
1778 |
+
edcal._wDate.add(-7).days();
|
1779 |
+
}
|
1780 |
+
edcal.alignCal();
|
1781 |
+
}
|
1782 |
+
|
1783 |
+
edcal.setClassforToday();
|
1784 |
+
edcal.setDateLabel();
|
1785 |
+
|
1786 |
+
/*
|
1787 |
+
* If the user clicks quickly or uses the mouse wheel they can
|
1788 |
+
* get a lot of move events very quickly and we need to batch
|
1789 |
+
* them up together. We set a timeout and clear it if there is
|
1790 |
+
* another move before the timeout happens.
|
1791 |
+
*/
|
1792 |
+
edcal.steps += steps;
|
1793 |
+
if (edcal.tID) {
|
1794 |
+
clearTimeout(edcal.tID);
|
1795 |
+
} else {
|
1796 |
+
edcal.moveDate = edcal._wDate;
|
1797 |
+
}
|
1798 |
+
|
1799 |
+
edcal.tID = setTimeout(function() {
|
1800 |
+
|
1801 |
+
/*
|
1802 |
+
* Now that we are done moving the calendar we need to get the posts for the
|
1803 |
+
* new dates. We want to load the posts between the place the calendar was
|
1804 |
+
* at when the user started moving it and the place the calendar is at now.
|
1805 |
+
*/
|
1806 |
+
if (!direction) {
|
1807 |
+
edcal.getPosts(edcal._wDate.clone(),
|
1808 |
+
edcal._wDate.clone().add(7 * (edcal.steps + 1)).days(),
|
1809 |
+
callback);
|
1810 |
+
} else {
|
1811 |
+
edcal.getPosts(edcal._wDate.clone().add(-7 * (edcal.steps + 1)).days(),
|
1812 |
+
edcal._wDate.clone(),
|
1813 |
+
callback);
|
1814 |
+
}
|
1815 |
+
|
1816 |
+
edcal.steps = 0;
|
1817 |
+
edcal.tID = null;
|
1818 |
+
edcal.moveDate = edcal._wDate;
|
1819 |
+
}, 1000);
|
1820 |
+
|
1821 |
+
if (direction) {
|
1822 |
+
/*
|
1823 |
+
If we are going into the future then wDate is way in the
|
1824 |
+
future so we need to get the current date which is four weeks
|
1825 |
+
plus the number of visible weeks before the end of the current _wDate.
|
1826 |
+
*/
|
1827 |
+
jQuery.cookie('edcal_date', edcal._wDate.clone().add(-(edcal.weeksPref + 4)).weeks().toString('yyyy-dd-MM'));
|
1828 |
+
} else {
|
1829 |
+
/*
|
1830 |
+
If we are going into the past then the current date is two
|
1831 |
+
weeks after the current _wDate
|
1832 |
+
*/
|
1833 |
+
jQuery.cookie('edcal_date', edcal._wDate.clone().add(3).weeks().toString('yyyy-dd-MM'));
|
1834 |
+
}
|
1835 |
+
},
|
1836 |
+
|
1837 |
+
/*
|
1838 |
+
We use the date as the ID for day elements, but the Date
|
1839 |
+
library can't parse the date without spaces and using
|
1840 |
+
spaces in IDs can cause problems. We work around the
|
1841 |
+
issue by adding the spaces back before we parse.
|
1842 |
+
*/
|
1843 |
+
getDayFromDayId: function(/*dayId*/ day) {
|
1844 |
+
return Date.parseExact(day.substring(2, 4) + '/' + day.substring(0, 2) + '/' + day.substring(4), 'MM/dd/yyyy');
|
1845 |
+
},
|
1846 |
+
|
1847 |
+
/*
|
1848 |
+
This is a helper method to set the date label on the top of
|
1849 |
+
the calendar. It looks like November 2009-December2009
|
1850 |
+
*/
|
1851 |
+
setDateLabel: function(year) {
|
1852 |
+
var api = jQuery('#edcal_scrollable').scrollable();
|
1853 |
+
var items = api.getVisibleItems();
|
1854 |
+
|
1855 |
+
/*
|
1856 |
+
We need to get the first day in the first week and the
|
1857 |
+
last day in the last week. We call children twice to
|
1858 |
+
work around a small JQuery issue.
|
1859 |
+
*/
|
1860 |
+
var firstDate = edcal.getDayFromDayId(items.eq(0).children('.edcal_row').children('.day:first').attr('id'));
|
1861 |
+
var lastDate = edcal.getDayFromDayId(items.eq(edcal.weeksPref - 1).children('.edcal_row').children('.day:last').attr('id'));
|
1862 |
+
|
1863 |
+
jQuery('#currentRange').text(edcal.chineseAposWorkaround(firstDate.toString(Date.CultureInfo.formatPatterns.yearMonth)) + ' - ' +
|
1864 |
+
edcal.chineseAposWorkaround(lastDate.toString(Date.CultureInfo.formatPatterns.yearMonth)));
|
1865 |
+
},
|
1866 |
+
|
1867 |
+
/*
|
1868 |
+
* We want the calendar to start on the day of the week that matches the country
|
1869 |
+
* code in the locale. If their full locale is en-US, that means the country
|
1870 |
+
* code is US.
|
1871 |
+
*
|
1872 |
+
* This is the full list of start of the week days from unicode.org
|
1873 |
+
* http://unicode.org/repos/cldr/trunk/common/supplemental/supplementalData.xml
|
1874 |
+
*/
|
1875 |
+
/* jshint maxcomplexity: 80 */
|
1876 |
+
nextStartOfWeek: function(/*date*/ date) {
|
1877 |
+
date = date.clone();
|
1878 |
+
if (edcal.startOfWeek === null) {
|
1879 |
+
if (edcal.locale) {
|
1880 |
+
var local = edcal.locale.toUpperCase();
|
1881 |
+
|
1882 |
+
if (edcal.endsWith(local, 'AS') ||
|
1883 |
+
edcal.endsWith(local, 'AZ') ||
|
1884 |
+
edcal.endsWith(local, 'BW') ||
|
1885 |
+
edcal.endsWith(local, 'CA') ||
|
1886 |
+
edcal.endsWith(local, 'CN') ||
|
1887 |
+
edcal.endsWith(local, 'FO') ||
|
1888 |
+
edcal.endsWith(local, 'GB') ||
|
1889 |
+
edcal.endsWith(local, 'GE') ||
|
1890 |
+
edcal.endsWith(local, 'GL') ||
|
1891 |
+
edcal.endsWith(local, 'GU') ||
|
1892 |
+
edcal.endsWith(local, 'HK') ||
|
1893 |
+
edcal.endsWith(local, 'IE') ||
|
1894 |
+
edcal.endsWith(local, 'IL') ||
|
1895 |
+
edcal.endsWith(local, 'IN') ||
|
1896 |
+
edcal.endsWith(local, 'IS') ||
|
1897 |
+
edcal.endsWith(local, 'JM') ||
|
1898 |
+
edcal.endsWith(local, 'JP') ||
|
1899 |
+
edcal.endsWith(local, 'KG') ||
|
1900 |
+
edcal.endsWith(local, 'KR') ||
|
1901 |
+
edcal.endsWith(local, 'LA') ||
|
1902 |
+
edcal.endsWith(local, 'MH') ||
|
1903 |
+
edcal.endsWith(local, 'MN') ||
|
1904 |
+
edcal.endsWith(local, 'MO') ||
|
1905 |
+
edcal.endsWith(local, 'MP') ||
|
1906 |
+
edcal.endsWith(local, 'MT') ||
|
1907 |
+
edcal.endsWith(local, 'NZ') ||
|
1908 |
+
edcal.endsWith(local, 'PH') ||
|
1909 |
+
edcal.endsWith(local, 'PK') ||
|
1910 |
+
edcal.endsWith(local, 'SG') ||
|
1911 |
+
edcal.endsWith(local, 'SY') ||
|
1912 |
+
edcal.endsWith(local, 'TH') ||
|
1913 |
+
edcal.endsWith(local, 'TT') ||
|
1914 |
+
edcal.endsWith(local, 'TW') ||
|
1915 |
+
edcal.endsWith(local, 'UM') ||
|
1916 |
+
edcal.endsWith(local, 'US') ||
|
1917 |
+
edcal.endsWith(local, 'UZ') ||
|
1918 |
+
edcal.endsWith(local, 'VI') ||
|
1919 |
+
edcal.endsWith(local, 'ZW')) {
|
1920 |
+
|
1921 |
+
/*
|
1922 |
+
* Sunday
|
1923 |
+
*/
|
1924 |
+
edcal.startOfWeek = 0;
|
1925 |
+
} else if (edcal.endsWith(local, 'MV')) {
|
1926 |
+
/*
|
1927 |
+
* Friday
|
1928 |
+
*/
|
1929 |
+
edcal.startOfWeek = 5;
|
1930 |
+
} else if (edcal.endsWith(local, 'AF') ||
|
1931 |
+
edcal.endsWith(local, 'BH') ||
|
1932 |
+
edcal.endsWith(local, 'DJ') ||
|
1933 |
+
edcal.endsWith(local, 'DZ') ||
|
1934 |
+
edcal.endsWith(local, 'EG') ||
|
1935 |
+
edcal.endsWith(local, 'ER') ||
|
1936 |
+
edcal.endsWith(local, 'ET') ||
|
1937 |
+
edcal.endsWith(local, 'IQ') ||
|
1938 |
+
edcal.endsWith(local, 'IR') ||
|
1939 |
+
edcal.endsWith(local, 'JO') ||
|
1940 |
+
edcal.endsWith(local, 'KE') ||
|
1941 |
+
edcal.endsWith(local, 'KW') ||
|
1942 |
+
edcal.endsWith(local, 'LY') ||
|
1943 |
+
edcal.endsWith(local, 'MA') ||
|
1944 |
+
edcal.endsWith(local, 'OM') ||
|
1945 |
+
edcal.endsWith(local, 'QA') ||
|
1946 |
+
edcal.endsWith(local, 'SA') ||
|
1947 |
+
edcal.endsWith(local, 'SD') ||
|
1948 |
+
edcal.endsWith(local, 'SO') ||
|
1949 |
+
edcal.endsWith(local, 'TN') ||
|
1950 |
+
edcal.endsWith(local, 'YE')) {
|
1951 |
+
/*
|
1952 |
+
* Sunday
|
1953 |
+
*/
|
1954 |
+
edcal.startOfWeek = 6;
|
1955 |
+
} else {
|
1956 |
+
/*
|
1957 |
+
* Monday
|
1958 |
+
*/
|
1959 |
+
edcal.startOfWeek = 1;
|
1960 |
+
}
|
1961 |
+
} else {
|
1962 |
+
/*
|
1963 |
+
* If we have no locale set we'll assume American style and
|
1964 |
+
* make it Sunday.
|
1965 |
+
*/
|
1966 |
+
edcal.startOfWeek = 0;
|
1967 |
+
}
|
1968 |
+
}
|
1969 |
+
|
1970 |
+
return date.next().sunday().add(edcal.startOfWeek).days();
|
1971 |
+
},
|
1972 |
+
|
1973 |
+
/* jshint maxcomplexity: 14 */
|
1974 |
+
|
1975 |
+
/*
|
1976 |
+
* Just a little helper function to tell if a given string (str)
|
1977 |
+
* ends with the given expression (expr). I could adding this
|
1978 |
+
* function to the JavaScript string object, but I don't want to
|
1979 |
+
* risk conflicts with other plugins.
|
1980 |
+
*/
|
1981 |
+
endsWith: function(/*string*/ str, /*string*/ expr) {
|
1982 |
+
return (str.match(expr + '$') === expr);
|
1983 |
+
},
|
1984 |
+
|
1985 |
+
/*
|
1986 |
+
* Moves the calendar to the specified date.
|
1987 |
+
*/
|
1988 |
+
moveTo: function(/*Date*/ date) {
|
1989 |
+
edcal.isMoving = true;
|
1990 |
+
jQuery('#cal').empty();
|
1991 |
+
|
1992 |
+
jQuery.cookie('edcal_date', date.toString('yyyy-dd-MM'));
|
1993 |
+
|
1994 |
+
/*
|
1995 |
+
When we first start up our working date is 4 weeks before
|
1996 |
+
the next Sunday.
|
1997 |
+
*/
|
1998 |
+
edcal._wDate = edcal.nextStartOfWeek(date).add(-21).days();
|
1999 |
+
|
2000 |
+
/*
|
2001 |
+
After we remove and redo all the rows we are back to
|
2002 |
+
moving in a going down direction.
|
2003 |
+
*/
|
2004 |
+
|
2005 |
+
edcal.currentDirection = true;
|
2006 |
+
|
2007 |
+
var count = edcal.weeksPref + 6;
|
2008 |
+
|
2009 |
+
for (var i = 0; i < count; i++) {
|
2010 |
+
edcal.createRow(jQuery('#cal'), true);
|
2011 |
+
edcal._wDate.add(7).days();
|
2012 |
+
}
|
2013 |
+
|
2014 |
+
edcal.alignCal();
|
2015 |
+
|
2016 |
+
var api = jQuery('#edcal_scrollable').scrollable();
|
2017 |
+
|
2018 |
+
api.move(2);
|
2019 |
+
|
2020 |
+
edcal.setDateLabel();
|
2021 |
+
edcal.setClassforToday();
|
2022 |
+
edcal.isMoving = false;
|
2023 |
+
},
|
2024 |
+
|
2025 |
+
/*
|
2026 |
+
When we handle dragging posts we need to know the size
|
2027 |
+
of the calendar so we figure it out ahead of time and
|
2028 |
+
save it.
|
2029 |
+
*/
|
2030 |
+
savePosition: function() {
|
2031 |
+
var cal = jQuery('#edcal_scrollable');
|
2032 |
+
var cal_cont = jQuery('#cal_cont');
|
2033 |
+
edcal.position = {
|
2034 |
+
top: cal.offset().top,
|
2035 |
+
bottom: cal.offset().top + cal.height()
|
2036 |
+
};
|
2037 |
+
|
2038 |
+
/*
|
2039 |
+
When the user drags a post they get a "helper" element that clones
|
2040 |
+
the post and displays it during the drag. This means they get all
|
2041 |
+
the same classes and styles. However, the width of a post is based
|
2042 |
+
on the width of a day in the calendar and not anything in a style.
|
2043 |
+
That works well for the posts in the calendar, but it means we need
|
2044 |
+
to dynamically determine the width of the post when dragging.
|
2045 |
+
|
2046 |
+
This value will remain the same until the calendar resizes. That is
|
2047 |
+
why we do it here. We need to get the width of the first visible day
|
2048 |
+
in the calendar which is why we use the complicated selector. We also
|
2049 |
+
need to generate a style for it since the drag element doesn't exist
|
2050 |
+
yet and using the live function would really slow down the drag operation.
|
2051 |
+
|
2052 |
+
We base this on the width of a way since they might not have any posts
|
2053 |
+
yet.
|
2054 |
+
*/
|
2055 |
+
jQuery('#edcal_poststyle').remove();
|
2056 |
+
|
2057 |
+
/*
|
2058 |
+
We need to figure out the height of each post list. They all have the same
|
2059 |
+
height so we just look at the first visible list and set some styles on the
|
2060 |
+
page to set the post list height based on that. We reset the value every
|
2061 |
+
time the page refreshes.
|
2062 |
+
*/
|
2063 |
+
var dayHeight = jQuery('.rowcont:eq(2) .dayobj:first').height() - jQuery('.rowcont:eq(2) .daylabel:first').height() - 6;
|
2064 |
+
jQuery('head').append('<style id="edcal_poststyle" type="text/css">.ui-draggable-dragging {' +
|
2065 |
+
'width: ' + (jQuery('.rowcont:eq(2) .day:first').width() - 5) + 'px;' +
|
2066 |
+
'}' +
|
2067 |
+
'.postlist {' +
|
2068 |
+
'height: ' + dayHeight + 'px;' +
|
2069 |
+
'}' +
|
2070 |
+
'</style>');
|
2071 |
+
|
2072 |
+
|
2073 |
+
jQuery('#draftsdrawer').css('height', cal_cont.height());
|
2074 |
+
jQuery('#draftsdrawer .day').css('min-height', (cal_cont.height() - 10) - jQuery('#draftsdrawer .draftsdrawerheadcont').height());
|
2075 |
+
},
|
2076 |
+
|
2077 |
+
/*
|
2078 |
+
* Adds the feedback section
|
2079 |
+
*/
|
2080 |
+
addFeedbackSection: function() {
|
2081 |
+
if (edcal.visitCount > 3 && edcal.doFeedbackPref) {
|
2082 |
+
jQuery('#edcal_main_title').after(edcal.str_feedbackmsg);
|
2083 |
+
}
|
2084 |
+
},
|
2085 |
+
|
2086 |
+
/*
|
2087 |
+
* Does the data collection. This uses Mint to collect data about the way
|
2088 |
+
* the calendar is being used.
|
2089 |
+
*/
|
2090 |
+
doFeedback: function() {
|
2091 |
+
jQuery.getScript('http://www.zackgrossbart.com/edcal/mint/?js', function() {
|
2092 |
+
edcal.saveFeedbackPref();
|
2093 |
+
});
|
2094 |
+
},
|
2095 |
+
|
2096 |
+
/*
|
2097 |
+
* Sends no feedback and hides the section
|
2098 |
+
*/
|
2099 |
+
noFeedback: function() {
|
2100 |
+
jQuery('#feedbacksection').hide('fast');
|
2101 |
+
edcal.saveFeedbackPref();
|
2102 |
+
},
|
2103 |
+
|
2104 |
+
/*
|
2105 |
+
* Saves the feedback preference to the server
|
2106 |
+
*/
|
2107 |
+
saveFeedbackPref: function() {
|
2108 |
+
var url = edcal.ajax_url() + '&action=edcal_saveoptions&dofeedback=' + encodeURIComponent('done');
|
2109 |
+
|
2110 |
+
jQuery.ajax({
|
2111 |
+
url: url,
|
2112 |
+
type: 'POST',
|
2113 |
+
processData: false,
|
2114 |
+
timeout: 100000,
|
2115 |
+
dataType: 'text',
|
2116 |
+
success: function(res) {
|
2117 |
+
jQuery('#feedbacksection').html(edcal.str_feedbackdone);
|
2118 |
+
setTimeout(function() {
|
2119 |
+
jQuery('#feedbacksection').hide('slow');
|
2120 |
+
}, 5000);
|
2121 |
+
},
|
2122 |
+
error: function(xhr) {
|
2123 |
+
edcal.showError(edcal.general_error);
|
2124 |
+
if (xhr.responseText) {
|
2125 |
+
edcal.output('saveOptions xhr.responseText: ' + xhr.responseText);
|
2126 |
+
}
|
2127 |
+
}
|
2128 |
+
});
|
2129 |
+
|
2130 |
+
},
|
2131 |
+
|
2132 |
+
/*
|
2133 |
+
This function updates the text of te publish button in the quick
|
2134 |
+
edit dialog to match the current operation.
|
2135 |
+
*/
|
2136 |
+
updatePublishButton: function() {
|
2137 |
+
if (jQuery('#edcal-status').val() === 'future') {
|
2138 |
+
jQuery('#newPostScheduleButton').text(edcal.str_publish);
|
2139 |
+
} if (jQuery('#edcal-status').val() === 'pending') {
|
2140 |
+
jQuery('#newPostScheduleButton').text(edcal.str_review);
|
2141 |
+
} else {
|
2142 |
+
jQuery('#newPostScheduleButton').text(edcal.str_save);
|
2143 |
+
}
|
2144 |
+
},
|
2145 |
+
|
2146 |
+
/*
|
2147 |
+
This function makes an AJAX call and changes the date of
|
2148 |
+
the specified post on the server.
|
2149 |
+
*/
|
2150 |
+
changeDate: function(/*string*/ newdate, /*Post*/ post, /*function*/ callback) {
|
2151 |
+
//edcal.output('changeDate(' + newdate + ', ' + post + ')');
|
2152 |
+
var move_to_drawer = newdate === edcal.NO_DATE;
|
2153 |
+
var move_from_drawer = post.date_gmt === edcal.NO_DATE;
|
2154 |
+
var newdateFormatted = move_to_drawer ? '0000-00-00' : edcal.getDayFromDayId(newdate).toString(edcal.wp_dateFormat);
|
2155 |
+
// edcal.output('newdate='+newdate+'\nnewdateFormatted='+newdateFormatted);
|
2156 |
+
|
2157 |
+
var olddate = move_from_drawer ? post.date_gmt : edcal.getDayFromDayId(post.date).toString(edcal.wp_dateFormat);
|
2158 |
+
|
2159 |
+
|
2160 |
+
if (move_to_drawer) {
|
2161 |
+
/*
|
2162 |
+
* If the post is going into the drafts drawer then it must be a draft
|
2163 |
+
*/
|
2164 |
+
post.status = 'draft';
|
2165 |
+
}
|
2166 |
+
|
2167 |
+
var url = edcal.ajax_url() + '&action=edcal_changedate&postid=' + post.id +
|
2168 |
+
'&postStatus=' + post.status +
|
2169 |
+
'&newdate=' + newdateFormatted + '&olddate=' + olddate;
|
2170 |
+
|
2171 |
+
jQuery('#post-' + post.id).addClass('loadingclass');
|
2172 |
+
|
2173 |
+
jQuery.ajax({
|
2174 |
+
url: url,
|
2175 |
+
type: 'POST',
|
2176 |
+
processData: false,
|
2177 |
+
timeout: 100000,
|
2178 |
+
// dataType: 'text',
|
2179 |
+
dataType: 'json',
|
2180 |
+
success: function(res) {
|
2181 |
+
//edcal.output('res.post.date='+res.post.date);
|
2182 |
+
//edcal.output(res.post);
|
2183 |
+
// console.log(res.post);
|
2184 |
+
if (res.error) {
|
2185 |
+
/*
|
2186 |
+
* If there was an error we need to remove the dropped
|
2187 |
+
* post item.
|
2188 |
+
*/
|
2189 |
+
edcal.removePostItem(newdate, 'post-' + res.post.id);
|
2190 |
+
if (res.error === edcal.CONCURRENCY_ERROR) {
|
2191 |
+
edcal.displayMessage(edcal.concurrency_error + '<br />' + res.post.title);
|
2192 |
+
} else if (res.error === edcal.PERMISSION_ERROR) {
|
2193 |
+
edcal.displayMessage(edcal.permission_error);
|
2194 |
+
} else if (res.error === edcal.NONCE_ERROR) {
|
2195 |
+
edcal.displayMessage(edcal.checksum_error);
|
2196 |
+
}
|
2197 |
+
}
|
2198 |
+
|
2199 |
+
// edcal.output(res.post.date);
|
2200 |
+
// var container = newdateFormatted == '0000-00-00' ?
|
2201 |
+
|
2202 |
+
var removecont = move_to_drawer ? '00000000' : res.post.date;
|
2203 |
+
var addcont = move_from_drawer ? newdate : removecont;
|
2204 |
+
|
2205 |
+
edcal.removePostItem(removecont, 'post-' + res.post.id);
|
2206 |
+
// edcal.output('remove post from: '+removecont+', add post to: '+addcont);
|
2207 |
+
edcal.addPostItem(res.post, addcont);
|
2208 |
+
edcal.addPostItemDragAndToolltip(addcont);
|
2209 |
+
|
2210 |
+
if (callback) {
|
2211 |
+
callback(res);
|
2212 |
+
}
|
2213 |
+
},
|
2214 |
+
error: function(xhr, textStatus, error) {
|
2215 |
+
edcal.showError(edcal.general_error);
|
2216 |
+
|
2217 |
+
edcal.output('textStatus: ' + textStatus);
|
2218 |
+
edcal.output('error: ' + error);
|
2219 |
+
if (xhr.responseText) {
|
2220 |
+
edcal.output('changeDate xhr.responseText: ' + xhr.responseText);
|
2221 |
+
}
|
2222 |
+
}
|
2223 |
+
});
|
2224 |
+
|
2225 |
+
},
|
2226 |
+
|
2227 |
+
/*
|
2228 |
+
Makes an AJAX call to get the posts from the server within the
|
2229 |
+
specified dates.
|
2230 |
+
*/
|
2231 |
+
getPosts: function(/*Date*/ from, /*Date*/ to, /*function*/ callback) {
|
2232 |
+
if (!to) {
|
2233 |
+
to = '';
|
2234 |
+
}
|
2235 |
+
|
2236 |
+
var shouldGet = edcal.cacheDates[from];
|
2237 |
+
|
2238 |
+
if (shouldGet) {
|
2239 |
+
/*
|
2240 |
+
* TODO: We don't want to make extra AJAX calls for dates
|
2241 |
+
* that we have already covered. This is cutting down on
|
2242 |
+
* it somewhat, but we could get much better about this.
|
2243 |
+
*/
|
2244 |
+
// edcal.output('Using cached results for posts from ' + from.toString('dd-MMM-yyyy') + ' to ' + to.toString('dd-MMM-yyyy'));
|
2245 |
+
|
2246 |
+
if (callback) {
|
2247 |
+
callback();
|
2248 |
+
}
|
2249 |
+
return;
|
2250 |
+
}
|
2251 |
+
|
2252 |
+
edcal.cacheDates[from] = true;
|
2253 |
+
|
2254 |
+
var url = edcal.ajax_url() + '&action=edcal_posts&from=' + from.toString('yyyy-MM-dd') + '&to=' + to.toString('yyyy-MM-dd');
|
2255 |
+
|
2256 |
+
if (edcal.getUrlVars().post_type) {
|
2257 |
+
url += '&post_type=' + encodeURIComponent(edcal.getUrlVars().post_type);
|
2258 |
+
}
|
2259 |
+
|
2260 |
+
jQuery('#loading').show();
|
2261 |
+
|
2262 |
+
jQuery.ajax({
|
2263 |
+
url: url,
|
2264 |
+
type: 'GET',
|
2265 |
+
processData: false,
|
2266 |
+
timeout: 100000,
|
2267 |
+
dataType: 'text',
|
2268 |
+
success: function(res) {
|
2269 |
+
// edcal.output(res);
|
2270 |
+
jQuery('#loading').hide();
|
2271 |
+
/*
|
2272 |
+
* These result here can get pretty large on a busy blog and
|
2273 |
+
* the JSON parser from JSON.org works faster than the native
|
2274 |
+
* one used by JQuery.
|
2275 |
+
*/
|
2276 |
+
var parsedRes = null;
|
2277 |
+
|
2278 |
+
try {
|
2279 |
+
parsedRes = JSON.parseIt(res);
|
2280 |
+
} catch (e) {
|
2281 |
+
edcal.showFatalError(edcal.str_fatal_parse_error + e.message);
|
2282 |
+
if (window.console) {
|
2283 |
+
console.error(e);
|
2284 |
+
}
|
2285 |
+
return;
|
2286 |
+
}
|
2287 |
+
|
2288 |
+
if (parsedRes.error) {
|
2289 |
+
/*
|
2290 |
+
* If there was an error we need to remove the dropped
|
2291 |
+
* post item.
|
2292 |
+
*/
|
2293 |
+
if (parsedRes.error === edcal.NONCE_ERROR) {
|
2294 |
+
edcal.showError(edcal.checksum_error);
|
2295 |
+
}
|
2296 |
+
return;
|
2297 |
+
}
|
2298 |
+
var postDates = [];
|
2299 |
+
|
2300 |
+
/*
|
2301 |
+
We get the posts back with the most recent post first. That
|
2302 |
+
is what most blogs want. However, we want them in the other
|
2303 |
+
order so we can show the earliest post in a given day first.
|
2304 |
+
*/
|
2305 |
+
for (var i = parsedRes.length; i >= 0; i--) {
|
2306 |
+
var post = parsedRes[i];
|
2307 |
+
if (post) {
|
2308 |
+
if (post.status === 'trash') {
|
2309 |
+
continue;
|
2310 |
+
}
|
2311 |
+
|
2312 |
+
/*
|
2313 |
+
* In some non-English locales the date comes back as all lower case.
|
2314 |
+
* This is a problem since we use the date as the ID so we replace
|
2315 |
+
* the first letter of the month name with the same letter in upper
|
2316 |
+
* case to make sure we don't get into trouble.
|
2317 |
+
*/
|
2318 |
+
post.date = post.date.replace(post.date.substring(2, 3), post.date.substring(2, 3).toUpperCase());
|
2319 |
+
if (from === '00000000') {
|
2320 |
+
post.date = from;
|
2321 |
+
}
|
2322 |
+
|
2323 |
+
// edcal.output(post.date + ', post-' + post.id);
|
2324 |
+
edcal.removePostItem(post.date, 'post-' + post.id);
|
2325 |
+
edcal.addPostItem(post, post.date);
|
2326 |
+
// edcal.output(post.id + ', ' + post.date);
|
2327 |
+
postDates[postDates.length] = post.date;
|
2328 |
+
}
|
2329 |
+
}
|
2330 |
+
|
2331 |
+
/*
|
2332 |
+
* If the blog has a very larger number of posts then adding
|
2333 |
+
* them all can make the UI a little slow. Particularly IE
|
2334 |
+
* pops up a warning giving the user a chance to abort the
|
2335 |
+
* script. Adding tooltips and making the items draggable is
|
2336 |
+
* a lot of what makes things slow. Delaying those two operations
|
2337 |
+
* makes the UI show up much faster and the user has to wait
|
2338 |
+
* three seconds before they can drag. It also makes IE
|
2339 |
+
* stop complaining.
|
2340 |
+
*/
|
2341 |
+
setTimeout(function() {
|
2342 |
+
// edcal.output('Finished adding draggable support to ' + postDates.length + ' posts.');
|
2343 |
+
jQuery.each(postDates, function(i, postDate) {
|
2344 |
+
edcal.addPostItemDragAndToolltip(postDate);
|
2345 |
+
});
|
2346 |
+
}, 300);
|
2347 |
+
|
2348 |
+
if (callback) {
|
2349 |
+
callback(res);
|
2350 |
+
}
|
2351 |
+
|
2352 |
+
},
|
2353 |
+
error: function(xhr) {
|
2354 |
+
edcal.showError(edcal.general_error);
|
2355 |
+
if (xhr.responseText) {
|
2356 |
+
edcal.output('getPosts xhr.responseText: ' + xhr.responseText);
|
2357 |
+
}
|
2358 |
+
}
|
2359 |
+
});
|
2360 |
+
},
|
2361 |
+
|
2362 |
+
/*
|
2363 |
+
* Retreives a single post item based on the id
|
2364 |
+
* Can optionally pass a callback function that is triggered
|
2365 |
+
* when the call successfully completes. The post object is passed
|
2366 |
+
* as a parameter for the callback.
|
2367 |
+
*/
|
2368 |
+
getPost: function(/*int*/ postid, /*function*/ callback) {
|
2369 |
+
|
2370 |
+
if (postid === 0) {
|
2371 |
+
return false;
|
2372 |
+
}
|
2373 |
+
|
2374 |
+
// show loading
|
2375 |
+
jQuery('#loading').show();
|
2376 |
+
|
2377 |
+
var url = edcal.ajax_url() + '&action=edcal_getpost&postid=' + postid;
|
2378 |
+
|
2379 |
+
if (edcal.getUrlVars().post_type) {
|
2380 |
+
url += '&post_type=' + encodeURIComponent(edcal.getUrlVars().post_type);
|
2381 |
+
}
|
2382 |
+
|
2383 |
+
jQuery.ajax({
|
2384 |
+
url: url,
|
2385 |
+
type: 'GET',
|
2386 |
+
processData: false,
|
2387 |
+
timeout: 100000,
|
2388 |
+
dataType: 'json',
|
2389 |
+
success: function(res) {
|
2390 |
+
// hide loading
|
2391 |
+
jQuery('#loading').hide();
|
2392 |
+
|
2393 |
+
edcal.output('xhr for getPost returned: ' + res);
|
2394 |
+
if (res.error) {
|
2395 |
+
if (res.error === edcal.NONCE_ERROR) {
|
2396 |
+
edcal.showError(edcal.checksum_error);
|
2397 |
+
}
|
2398 |
+
return false;
|
2399 |
+
}
|
2400 |
+
if (typeof callback === 'function') {
|
2401 |
+
callback(res.post);
|
2402 |
+
}
|
2403 |
+
return res.post;
|
2404 |
+
},
|
2405 |
+
error: function(xhr) {
|
2406 |
+
// hide loading
|
2407 |
+
jQuery('#loading').hide();
|
2408 |
+
|
2409 |
+
edcal.showError(edcal.general_error);
|
2410 |
+
if (xhr.responseText) {
|
2411 |
+
edcal.output('getPost xhr.responseText: ' + xhr.responseText);
|
2412 |
+
}
|
2413 |
+
return false;
|
2414 |
+
}
|
2415 |
+
});
|
2416 |
+
|
2417 |
+
return true;
|
2418 |
+
},
|
2419 |
+
|
2420 |
+
/*
|
2421 |
+
This function adds the screen options tab to the top of the screen. I wish
|
2422 |
+
WordPress had a hook so I could provide this in PHP, but as of version 2.9.1
|
2423 |
+
they just have an internal loop for their own screen options tabs so we're
|
2424 |
+
doing this in JavaScript.
|
2425 |
+
*/
|
2426 |
+
addOptionsSection: function() {
|
2427 |
+
var html =
|
2428 |
+
'<div class="hide-if-no-js screen-meta-toggle" id="screen-options-link-wrap">' +
|
2429 |
+
'<a class="show-settings" ' +
|
2430 |
+
'id="show-edcal-settings-link" ' +
|
2431 |
+
'onclick="edcal.toggleOptions(); return false;" ' +
|
2432 |
+
'href="#" ' +
|
2433 |
+
'>' +
|
2434 |
+
edcal.str_screenoptions +
|
2435 |
+
'</a>' +
|
2436 |
+
'</div>';
|
2437 |
+
|
2438 |
+
if (jQuery('#screen-meta-links').length === 0) {
|
2439 |
+
/*
|
2440 |
+
* Wordpress 3.3 stopped adding the screen meta section to all the admin pages
|
2441 |
+
*/
|
2442 |
+
jQuery('#screen-meta').after('<div id="screen-meta-links"></div>');
|
2443 |
+
}
|
2444 |
+
|
2445 |
+
jQuery('#screen-meta-links').append(html);
|
2446 |
+
},
|
2447 |
+
|
2448 |
+
/*
|
2449 |
+
Respond to clicks on the Screen Options tab by sliding it down when it
|
2450 |
+
is up and sliding it up when it is down.
|
2451 |
+
*/
|
2452 |
+
toggleOptions: function() {
|
2453 |
+
if (!edcal.helpMeta) {
|
2454 |
+
/*
|
2455 |
+
Show the screen options section. We start by saving off the old HTML
|
2456 |
+
*/
|
2457 |
+
edcal.helpMeta = jQuery('#contextual-help-wrap').html();
|
2458 |
+
|
2459 |
+
/*
|
2460 |
+
* Set up the visible fields option
|
2461 |
+
*/
|
2462 |
+
var optionsHtml = '<div class="metabox-prefs calendar-fields-prefs">' +
|
2463 |
+
'<h5>' + edcal.str_show_opts + '</h5>' +
|
2464 |
+
'<label for="author-hide">' +
|
2465 |
+
'<input type="checkbox" ' + edcal.isPrefChecked(edcal.authorPref) + 'value="true" id="author-hide" ' +
|
2466 |
+
'name="author-hide" class="hide-column-tog" />' + edcal.str_opt_author +
|
2467 |
+
'</label>' +
|
2468 |
+
'<label for="status-hide">' +
|
2469 |
+
'<input type="checkbox" ' + edcal.isPrefChecked(edcal.statusPref) + 'value="true" id="status-hide" ' +
|
2470 |
+
'name="status-hide" class="hide-column-tog" />' + edcal.str_opt_status +
|
2471 |
+
'</label>' +
|
2472 |
+
'<label for="time-hide">' +
|
2473 |
+
'<input type="checkbox" ' + edcal.isPrefChecked(edcal.timePref) + 'value="true" id="time-hide" ' +
|
2474 |
+
'name="time-hide" class="hide-column-tog" />' + edcal.str_opt_time +
|
2475 |
+
'</label>' +
|
2476 |
+
'</div>' +
|
2477 |
+
'<div class="metabox-prefs calendar-fields-prefs">' +
|
2478 |
+
'<h5>' + edcal.str_show_wheel_opts + '</h5>' +
|
2479 |
+
'<label for="wheel-support">' +
|
2480 |
+
'<input type="checkbox" ' + edcal.isPrefChecked(edcal.wheelScrollPref) + 'value="true" id="wheel-support" ' +
|
2481 |
+
'name="wheel-support" class="hide-column-tog" />' + edcal.str_opt_wheel +
|
2482 |
+
'</label>' +
|
2483 |
+
'</div>';
|
2484 |
+
|
2485 |
+
/*
|
2486 |
+
* Set up the number of posts option
|
2487 |
+
*/
|
2488 |
+
optionsHtml += '<div class="metabox-prefs">' +
|
2489 |
+
'<h5>' + edcal.str_show_title + '</h5>' +
|
2490 |
+
'<select id="edcal_weeks_pref" ' + 'class="screen-per-page" title="' + edcal.str_weekstt + '"> ';
|
2491 |
+
|
2492 |
+
var weeks = parseInt(edcal.weeksPref, 10);
|
2493 |
+
for (var i = 1; i < 9; i++) {
|
2494 |
+
if (i === weeks) {
|
2495 |
+
optionsHtml += '<option selected="true">' + i + '</option>';
|
2496 |
+
} else {
|
2497 |
+
optionsHtml += '<option>' + i + '</option>';
|
2498 |
+
}
|
2499 |
+
}
|
2500 |
+
|
2501 |
+
optionsHtml += '</select>' +
|
2502 |
+
edcal.str_opt_weeks +
|
2503 |
+
'</div>';
|
2504 |
+
|
2505 |
+
/*
|
2506 |
+
I started work on adding a color picker so you could choose the color for
|
2507 |
+
drafts, published posts, and scheduled posts. However, that makes the settings
|
2508 |
+
a lot more complicated and I'm not sure it is worth it.
|
2509 |
+
*/
|
2510 |
+
//optionsHtml += '<h5>' + edcal.str_optionscolors + '</h5>';
|
2511 |
+
//optionsHtml += edcal.generateColorPicker(edcal.str_optionsdraftcolor, 'draft-color', 'lightgreen');
|
2512 |
+
|
2513 |
+
|
2514 |
+
optionsHtml += '<br /><button id="edcal_applyoptions" onclick="edcal.saveOptions(); return false;" class="save button">' + edcal.str_apply + '</button>';
|
2515 |
+
|
2516 |
+
jQuery('#contextual-help-wrap').html(optionsHtml);
|
2517 |
+
|
2518 |
+
jQuery('#contextual-help-link-wrap').css('visibility', 'hidden');
|
2519 |
+
|
2520 |
+
jQuery('#contextual-help-wrap').slideDown('normal');
|
2521 |
+
|
2522 |
+
jQuery('#screen-meta').show();
|
2523 |
+
|
2524 |
+
jQuery('#show-edcal-settings-link').addClass('screen-meta-active');
|
2525 |
+
} else {
|
2526 |
+
jQuery('#contextual-help-wrap').slideUp('fast');
|
2527 |
+
|
2528 |
+
/*
|
2529 |
+
* restore the old HTML
|
2530 |
+
*/
|
2531 |
+
jQuery('#contextual-help-wrap').html(edcal.helpMeta);
|
2532 |
+
|
2533 |
+
edcal.helpMeta = null;
|
2534 |
+
|
2535 |
+
jQuery('#show-edcal-settings-link').removeClass('screen-meta-active');
|
2536 |
+
jQuery('#contextual-help-link-wrap').css('visibility', '');
|
2537 |
+
}
|
2538 |
+
},
|
2539 |
+
|
2540 |
+
generateColorPicker: function(/*String*/ title, /*string*/ id, /*string*/ value) {
|
2541 |
+
var html = '<div id="' + id + '" class="optionscolorrow">';
|
2542 |
+
|
2543 |
+
html += '<span style="background-color: ' + value + ';" class="colorlabel"> ' + title + '</span> ';
|
2544 |
+
|
2545 |
+
var colors = ['lightred', 'orange', 'yellow', 'lightgreen', 'lightblue', 'purple', 'lightgray'];
|
2546 |
+
|
2547 |
+
edcal.output('colors.length: ' + colors.length);
|
2548 |
+
for (var i = 0; i < colors.length; i++) {
|
2549 |
+
html += '<a href="#" class="optionscolor ';
|
2550 |
+
|
2551 |
+
if (colors[i] === value) {
|
2552 |
+
html += 'colorselected';
|
2553 |
+
|
2554 |
+
}
|
2555 |
+
|
2556 |
+
html += '" class=' + id + colors[i] + '" style="background-color: ' + colors[i] + '; left: ' + ((i * 20) + 50) + 'px" ' +
|
2557 |
+
'onclick="edcal.selectColor(\'' + id + '\', \'' + colors[i] + '\'); return false;"></a>';
|
2558 |
+
|
2559 |
+
}
|
2560 |
+
|
2561 |
+
html += '</div>';
|
2562 |
+
|
2563 |
+
return html;
|
2564 |
+
|
2565 |
+
},
|
2566 |
+
|
2567 |
+
selectColor: function(/*string*/ id, /*string*/ value) {
|
2568 |
+
edcal.output('selectColor(' + id + ', ' + value + ')');
|
2569 |
+
jQuery('#' + id + ' .colorlabel').css('background-color', value);
|
2570 |
+
|
2571 |
+
jQuery('#' + id + ' .colorselected').removeClass('colorselected');
|
2572 |
+
|
2573 |
+
jQuery('#' + id + 'value').addClass('colorselected');
|
2574 |
+
|
2575 |
+
},
|
2576 |
+
|
2577 |
+
isPrefChecked: function(/*boolean*/ prefVal) {
|
2578 |
+
if (prefVal) {
|
2579 |
+
return ' checked="checked" ';
|
2580 |
+
} else {
|
2581 |
+
return '';
|
2582 |
+
}
|
2583 |
+
},
|
2584 |
+
|
2585 |
+
/*
|
2586 |
+
Save the number of weeks options with an AJAX call. This happens
|
2587 |
+
when you press the apply button.
|
2588 |
+
*/
|
2589 |
+
saveOptions: function() {
|
2590 |
+
/*
|
2591 |
+
We start by validating the number of weeks. We only allow
|
2592 |
+
1, 2, 3, 4, or 5 weeks at a time.
|
2593 |
+
*/
|
2594 |
+
var weeks = parseInt(jQuery('#edcal_weeks_pref').val(), 10);
|
2595 |
+
if (weeks < 1 || weeks > 8) {
|
2596 |
+
humanMsg.displayMsg(edcal.str_weekserror);
|
2597 |
+
return;
|
2598 |
+
}
|
2599 |
+
|
2600 |
+
edcal.enableMouseWheel();
|
2601 |
+
|
2602 |
+
var url = edcal.ajax_url() + '&action=edcal_saveoptions&weeks=' +
|
2603 |
+
encodeURIComponent(jQuery('#edcal_weeks_pref').val());
|
2604 |
+
|
2605 |
+
jQuery('div.calendar-fields-prefs').find('input, textarea, select').each(function() {
|
2606 |
+
url += '&' + encodeURIComponent(this.name) + '=' + encodeURIComponent(this.checked);
|
2607 |
+
});
|
2608 |
+
|
2609 |
+
jQuery.ajax({
|
2610 |
+
url: url,
|
2611 |
+
type: 'POST',
|
2612 |
+
processData: false,
|
2613 |
+
timeout: 100000,
|
2614 |
+
dataType: 'text',
|
2615 |
+
success: function(res) {
|
2616 |
+
/*
|
2617 |
+
Now we refresh the page because I'm too lazy to
|
2618 |
+
make changing the weeks work inline.
|
2619 |
+
*/
|
2620 |
+
window.location.href = window.location.href;
|
2621 |
+
},
|
2622 |
+
error: function(xhr) {
|
2623 |
+
edcal.showError(edcal.general_error);
|
2624 |
+
if (xhr.responseText) {
|
2625 |
+
edcal.output('saveOptions xhr.responseText: ' + xhr.responseText);
|
2626 |
+
}
|
2627 |
+
}
|
2628 |
+
});
|
2629 |
+
},
|
2630 |
+
|
2631 |
+
/**
|
2632 |
+
* Outputs info messages to the Firebug console if it is available.
|
2633 |
+
*
|
2634 |
+
* msg the message to write.
|
2635 |
+
*/
|
2636 |
+
output: function(msg) {
|
2637 |
+
if (window.console) {
|
2638 |
+
console.log(msg);
|
2639 |
+
}
|
2640 |
+
},
|
2641 |
+
|
2642 |
+
/*
|
2643 |
+
* Shows an error message and sends the message as an error to the
|
2644 |
+
* Firebug console if it is available.
|
2645 |
+
*/
|
2646 |
+
showError: function(/*string*/ msg) {
|
2647 |
+
if (window.console) {
|
2648 |
+
console.error(msg);
|
2649 |
+
}
|
2650 |
+
|
2651 |
+
edcal.displayMessage(msg);
|
2652 |
+
|
2653 |
+
},
|
2654 |
+
|
2655 |
+
/*
|
2656 |
+
* Display an error message to the user
|
2657 |
+
*/
|
2658 |
+
displayMessage: function(/*string*/ msg) {
|
2659 |
+
humanMsg.displayMsg(msg);
|
2660 |
+
},
|
2661 |
+
|
2662 |
+
/*
|
2663 |
+
* A helper function to get the parameters from the
|
2664 |
+
* current URL.
|
2665 |
+
*/
|
2666 |
+
getUrlVars: function() {
|
2667 |
+
var vars = [], hash;
|
2668 |
+
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
2669 |
+
for (var i = 0; i < hashes.length; i++) {
|
2670 |
+
hash = hashes[i].split('=');
|
2671 |
+
vars.push(hash[0]);
|
2672 |
+
vars[hash[0]] = hash[1];
|
2673 |
+
}
|
2674 |
+
|
2675 |
+
return vars;
|
2676 |
+
},
|
2677 |
+
|
2678 |
+
/*
|
2679 |
+
* Show an error indicating the calendar couldn't be loaded
|
2680 |
+
*/
|
2681 |
+
showFatalError: function(message) {
|
2682 |
+
jQuery('#edcal_main_title').after(
|
2683 |
+
'<div class="error below-h2" id="message"><p>' +
|
2684 |
+
edcal.str_fatal_error + message + '<br></p></div>');
|
2685 |
+
|
2686 |
+
if (window.console) {
|
2687 |
+
console.error(message);
|
2688 |
+
}
|
2689 |
+
},
|
2690 |
+
|
2691 |
+
chineseAposWorkaround: function(/*String*/ dateString) {
|
2692 |
+
if (Date.CultureInfo.name.indexOf('zh') === 0 ||
|
2693 |
+
Date.CultureInfo.name.indexOf('ja') === 0) {
|
2694 |
+
return dateString.replace(/'/g, '');
|
2695 |
+
}
|
2696 |
+
return dateString;
|
2697 |
+
}
|
2698 |
+
};
|
2699 |
+
|
2700 |
+
/*
|
2701 |
+
* Helper function for jQuery to center a div
|
2702 |
+
*/
|
2703 |
+
jQuery.fn.center = function() {
|
2704 |
+
this.css('position', 'absolute');
|
2705 |
+
this.css('top', (jQuery(window).height() - this.outerHeight()) / 2 + jQuery(window).scrollTop() + 'px');
|
2706 |
+
this.css('left', (jQuery(window).width() - this.outerWidth()) / 2 + jQuery(window).scrollLeft() + 'px');
|
2707 |
+
return this;
|
2708 |
+
};
|
2709 |
+
|
2710 |
+
|
2711 |
+
jQuery(document).ready(function() {
|
2712 |
+
try {
|
2713 |
+
edcal.init();
|
2714 |
+
} catch (e) {
|
2715 |
+
/*
|
2716 |
+
* These kinds of errors often happen when there is a
|
2717 |
+
* conflict with a JavaScript library imported by
|
2718 |
+
* another plugin.
|
2719 |
+
*/
|
2720 |
+
edcal.output('Error loading calendar: ' + e);
|
2721 |
+
edcal.showFatalError(e.description);
|
2722 |
+
}
|
2723 |
+
|
2724 |
+
/*
|
2725 |
+
* The calendar supports unit tests through the QUnit framework,
|
2726 |
+
* but we don't want to load the extra files when we aren't running
|
2727 |
+
* tests so we load them dynamically. Add the qunit=true parameter
|
2728 |
+
* to run the tests.
|
2729 |
+
*/
|
2730 |
+
if (edcal.getUrlVars().qunit) {
|
2731 |
+
edcal_test.runTests();
|
2732 |
+
}
|
2733 |
+
});
|
3.7.8/edcal.min.js
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
2 |
+
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};
|
3 |
+
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6-impl","es3");$jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};
|
4 |
+
$jscomp.polyfill("String.prototype.endsWith",function(a){return a?a:function(a,c){var b=$jscomp.checkStringArgs(this,a,"endsWith");a+="";void 0===c&&(c=b.length);c=Math.max(0,Math.min(c|0,b.length));for(var e=a.length;0<e&&0<c;)if(b[--c]!=a[--e])return!1;return 0>=e}},"es6-impl","es3");
|
5 |
+
var edcal={NO_DATE:"00000000",weeksPref:3,statusPref:!0,authorPref:!1,timePref:!0,wheelScrollPref:!0,doFeedbackPref:!0,isMoving:!1,inDrag:!1,isDragScrolling:!1,internalDateFormat:"ddMMyyyy",position:null,firstDayOfMonth:null,firstDayOfNextMonth:null,wp_dateFormat:"yyyy-MM-dd",cacheDates:[],tID:null,steps:0,CONCURRENCY_ERROR:4,PERMISSION_ERROR:5,NONCE_ERROR:6,currentDirection:!0,_wDate:Date.today(),moveDate:null,startOfWeek:null,posts:[],windowHeight:0,ltr:"ltr",isDraftsDrawerVisible:!1,enableMouseWheel:function(){edcal.wheelScrollPref?
|
6 |
+
jQuery("#edcal_scrollable").bind("mousewheel",function(a,b){a=Math.abs(b);!edcal.isMoving&&.2<a&&edcal.move(1,0<b?!1:!0);return!1}):jQuery("#edcal_scrollable").unbind("mousewheel")},init:function(){if(0!==jQuery("#edcal_scrollable").length){"true"===jQuery.cookie("edcal_drafts_drawer")&&(edcal.isDraftsDrawerVisible=!0,edcal.setDraftsDrawerVisible(edcal.isDraftsDrawerVisible));jQuery("#loading").hide();jQuery("#edcal_scrollable").css("height",edcal.getCalHeight()+"px");edcal.windowHeight=jQuery(window).height();
|
7 |
+
edcal.createDaysHeader();jQuery("#edcal_scrollable").scrollable({vertical:!0,size:edcal.weeksPref,keyboard:!1,keyboardSteps:1,speed:100,easing:"linear"});var a=jQuery("#edcal_scrollable").scrollable();a.getConf().keyboard=!1;var b=jQuery.cookie("edcal_date");b?(b=Date.parseExact(b,"yyyy-dd-MM"),edcal.output("Resetting to date from the edcal_Date cookie: "+b)):b=Date.today();edcal.moveTo(b.clone());a.onBeforeSeek(function(a,b){return!1});edcal.enableMouseWheel();jQuery(document).bind("keydown",function(a){if(27===
|
8 |
+
a.keyCode)return!1;if(!jQuery("#edcal_quickedit").is(":visible"))if(40!==a.keyCode||a.altKey||a.ctrlKey)if(38!==a.keyCode||a.altKey||a.ctrlKey){if(34===a.keyCode&&!a.altKey&&!a.ctrlKey||40===a.keyCode&&a.ctrlKey)return edcal.move(edcal.weeksPref,!0),!1;if(33===a.keyCode&&!a.altKey&&!a.ctrlKey||38===a.keyCode&&a.ctrlKey)return edcal.move(edcal.weeksPref,!1),!1}else return edcal.move(1,!1),!1;else return edcal.move(1,!0),!1});edcal.getPosts(edcal.nextStartOfWeek(b).add(-3).weeks(),edcal.nextStartOfWeek(b).add(edcal.weeksPref+
|
9 |
+
3).weeks());jQuery("#moveToToday").click(function(){edcal.moveTo(Date.today());edcal.getPosts(edcal.nextStartOfWeek(Date.today()).add(-3).weeks(),edcal.nextStartOfWeek(Date.today()).add(edcal.weeksPref+3).weeks());return!1});jQuery("#moveToLast").click(function(){if("-1"!==edcal.lastPostDate){var a=Date.parseExact(edcal.lastPostDate,"ddMMyyyy");edcal.moveTo(a);edcal.getPosts(edcal.nextStartOfWeek(a).add(-3).weeks(),edcal.nextStartOfWeek(a).add(edcal.weeksPref+3).weeks());return!1}});jQuery("#prevmonth").click(function(){edcal.move(edcal.weeksPref,
|
10 |
+
!1);return!1});jQuery("#nextmonth").click(function(){edcal.move(edcal.weeksPref,!0);return!1});jQuery("#newPostScheduleButton").on("click",function(a){if(jQuery(this).hasClass("disabled"))return!1;jQuery(this).addClass("disabled");return edcal.savePost(null,!1,!0)});jQuery("#edcal-title-new-field").bind("input",function(a){(0<jQuery("#edcal-title-new-field").val().length||0<jQuery("#content").val().length)&&(!jQuery("#edcal-time").is(":visible")||0<jQuery("#edcal-time").val().length)?jQuery("#newPostScheduleButton").removeClass("disabled"):
|
11 |
+
jQuery("#newPostScheduleButton").addClass("disabled");if(13===a.keyCode)return edcal.savePost(null,!0)});jQuery("#content").bind("input",function(a){(0<jQuery("#edcal-title-new-field").val().length||0<jQuery("#content").val().length)&&(!jQuery("#edcal-time").is(":visible")||0<jQuery("#edcal-time").val().length)?jQuery("#newPostScheduleButton").removeClass("disabled"):jQuery("#newPostScheduleButton").addClass("disabled");if(13===a.keyCode)return edcal.savePost(null,!0)});jQuery("#edcal-status").bind("change",
|
12 |
+
function(a){edcal.updatePublishButton()});jQuery("#edcal_weeks_pref").on("keyup",function(a){0<jQuery("#edcal_weeks_pref").val().length?jQuery("#edcal_applyoptions").removeClass("disabled"):jQuery("#edcal_applyoptions").addClass("disabled");13===a.keyCode&&edcal.saveOptions()});edcal.savePosition();edcal.addOptionsSection();jQuery("#edcal-time").timePicker({show24Hours:"H:i"===edcal.timeFormat,separator:":",step:30});jQuery("#showdraftsdrawer").click(function(){edcal.setDraftsDrawerVisible(!edcal.isDraftsDrawerVisible)})}},
|
13 |
+
setDraftsDrawerVisible:function(a,b){var c=jQuery("#showdraftsdrawer");c.hasClass("isLoaded")?b&&b():(c.addClass("isLoaded"),edcal.setupDraftsdrawer(b));a?(jQuery("#cal_cont").css({"margin-right":"13.5%"}),jQuery("#draftsdrawer_cont").css({display:"block",width:"13%"}),c.html(edcal.str_hidedrafts)):(jQuery("#cal_cont").css({"margin-right":"0"}),jQuery("#draftsdrawer_cont").css({display:"none",width:"0"}),c.html(edcal.str_showdrafts));edcal.isDraftsDrawerVisible=a;jQuery.cookie("edcal_drafts_drawer",
|
14 |
+
a,{expires:2060})},setupDraftsdrawer:function(a){jQuery("#draftsdrawer_loading").css({display:"block"});edcal.getPosts(edcal.NO_DATE,null,function(){edcal.initDraftsdrawer();a&&a()})},initDraftsdrawer:function(){var a=""+('<a href="#" adddate="'+edcal.NO_DATE+'" class="daynewlink" style="margin-top: 5px;"title="'+edcal.str_newdraft+'" id="unscheduledNewLink" onclick="edcal.addDraft(); return false;">'+edcal.str_addDraftLink+"</a>");a=a+'<ul class="postlist">'+edcal.getPostItems(edcal.NO_DATE);a+=
|
15 |
+
"</ul>";edcal.draggablePost("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" li.post");edcal.makeDroppable(jQuery("#draftsdrawer div.day"));jQuery("#unscheduled").append(a);jQuery("#draftsdrawer_loading").css({display:"none"});a=jQuery("#cal_cont");jQuery("#unscheduled ul.postlist").css("min-height",a.height()-10-jQuery("#draftsdrawer .draftsdrawerheadcont").height()-jQuery("#unscheduledNewLink").outerHeight());jQuery("#unscheduled").mouseout(function(){jQuery("#unscheduledNewLink").hide()}).mouseover(function(){jQuery("#unscheduledNewLink").show()})},
|
16 |
+
alignGrid:function(a,b,c,d,e){if("draftsdrawer"!==jQuery(a).parent().attr("id")){var f=0,h=0,g=1;jQuery(a).each(function(){jQuery(this).css("position","relative");var a=jQuery(this).children("div");if(1===b||"rtl"!==edcal.ltr)for(var k=0;k<a.length;k++)a.eq(k).css({width:c+"%",height:d+"%",position:"absolute",left:f+"%",top:h+"%"}),0===g%b?(f=0,h+=d+e):f+=c+e,g++;else for(k=a.length-1;-1<k;k--)a.eq(k).css({width:c+"%",height:d+"%",position:"absolute",left:f+"%",top:h+"%"}),0===g%b?(f=0,h+=d+e):f+=
|
17 |
+
c+e,g++})}},alignCal:function(){edcal.alignGrid("#cal",1,100,100/edcal.weeksPref-1,1)},createDaysHeader:function(){var a=Date.today().next().sunday();edcal.nextStartOfWeek(a);var b='<div class="dayheadcont"><div class="dayhead firstday">'+a.add(edcal.startOfWeek).days().toString("dddd")+"</div>",b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+
|
18 |
+
"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead">'+a.add(1).days().toString("dddd")+"</div>"),b=b+('<div class="dayhead lastday">'+a.add(1).days().toString("dddd")+"</div>");jQuery("#cal_cont").prepend(b);edcal.alignGrid(".dayheadcont",7,13.8,100,.5)},getDateClass:function(a){var b;var c=-1===a.compareTo(Date.today())?"beforeToday":"todayAndAfter";edcal.firstDayOfMonth||(edcal.firstDayOfMonth=Date.today().moveToFirstDayOfMonth().clearTime(),
|
19 |
+
edcal.firstDayOfNextMonth=Date.today().moveToLastDayOfMonth().clearTime());a.between(edcal.firstDayOfMonth,edcal.firstDayOfNextMonth)?b="month-present":1===a.compareTo(edcal.firstDayOfMonth)?b="month-future":-1===a.compareTo(edcal.firstDayOfNextMonth)&&(b="month-past");"01"===a.toString("dd")&&(c+=" firstOfMonth");return b+" "+c},showAddPostLink:function(a){edcal.inDrag||(a=jQuery("#"+a+" a.daynewlink"),a.css("display","block"),a.bind("click",edcal.addPost))},hideAddPostLink:function(a){jQuery("#"+
|
20 |
+
a+" a.daynewlink").hide().unbind("click",edcal.addPost)},createRow:function(a,b){for(var c=edcal._wDate.clone(),d='<div class="rowcont" id="row'+edcal._wDate.toString(edcal.internalDateFormat)+'"><div id="row'+edcal._wDate.toString(edcal.internalDateFormat)+'row" class="edcal_row">',e=0;7>e;e++)d+="<div onmouseover=\"edcal.showAddPostLink('"+c.toString(edcal.internalDateFormat)+"');\" onmouseout=\"edcal.hideAddPostLink('"+c.toString(edcal.internalDateFormat)+'\');" id="'+c.toString(edcal.internalDateFormat)+
|
21 |
+
'" class="day '+edcal.getDateClass(c)+" "+c.toString("dddd").toLowerCase()+" month-"+c.toString("MM").toLowerCase()+'">',d+='<div class="dayobj">',d+='<a href="#" adddate="'+c.toString("MMMM d")+'" class="daynewlink" title="'+sprintf(edcal.str_newpost,edcal.chineseAposWorkaround(c.toString(Date.CultureInfo.formatPatterns.monthDay)))+'" onclick="return false;">'+edcal.str_addPostLink+"</a>",d="01"===c.toString("dd")?d+('<div class="daylabel">'+c.toString("MMM d")):d+('<div class="daylabel">'+c.toString("d")),
|
22 |
+
d+="</div>",d+='<ul class="postlist">',d+=edcal.getPostItems(c.toString(edcal.internalDateFormat)),d+="</ul>",d+="</div>",d+="</div>",c.add(1).days();d+="</div></div>";b?a.append(d):a.prepend(d);edcal.alignGrid("#row"+edcal._wDate.toString(edcal.internalDateFormat)+"row",7,13.9,100,.5);edcal.draggablePost("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" li.post");edcal.makeDroppable(jQuery("#row"+edcal._wDate.toString(edcal.internalDateFormat)+" > div > div.day"));return jQuery("row"+edcal._wDate.toString(edcal.internalDateFormat))},
|
23 |
+
makeDroppable:function(a){a.droppable({hoverClass:"day-active",accept:function(a){return jQuery(this).hasClass("beforeToday")?a.hasClass("draft")?!0:!1:!0},greedy:!0,tolerance:"pointer",drop:function(a,c){a=c.draggable.parent().parent().parent().attr("id");edcal.doDrop(a,c.draggable.attr("id"),jQuery(this).attr("id"))}})},doDrop:function(a,b,c,d){var e=edcal.findPostForId(a,b);edcal.removePostFromMap(a,b);var f=jQuery("#"+b);f.detach();setTimeout(function(){f.remove()},500);jQuery("#"+c+" .postlist").append(edcal.createPostItem(e,
|
24 |
+
c));a===c?edcal.draggablePost("#"+c+" .post"):edcal.changeDate(c,e,d)},draggablePost:function(a){jQuery(a).each(function(){var a=edcal.findPostForId(jQuery(this).parent().parent().parent().attr("id"),jQuery(this).attr("id"));edcal.isPostMovable(a)&&(jQuery(this).draggable({revert:"invalid",appendTo:"body",helper:"clone",distance:1,addClasses:!1,start:function(){edcal.inDrag=!0},stop:function(){edcal.inDrag=!1},drag:function(a,b){edcal.handleDrag(a,b)},scroll:!1,refreshPositions:!0}),jQuery(this).addClass("draggable"))})},
|
25 |
+
handleDrag:function(a,b){edcal.isMoving||edcal.isDragScrolling||(edcal.isDragScrolling=!0,a.pageY<edcal.position.top+10?edcal.move(1,!1):a.pageY>edcal.position.bottom-10&&edcal.move(1,!0),setTimeout(function(){edcal.isDragScrolling=!1},300))},removePostFromMap:function(a,b){if(edcal.posts[a])for(var c=0;c<edcal.posts[a].length;c++)if(edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b)return edcal.posts[a][c]=null,!0;return!1},addPostItem:function(a,b){jQuery("#"+b+" > div > ul").append(edcal.createPostItem(a,
|
26 |
+
b))},addPostItemDragAndToolltip:function(a){edcal.draggablePost("#"+a+" > div > ul > li")},deletePost:function(a,b){a=edcal.ajax_url()+"&action=edcal_deletepost&postid="+a;jQuery.ajax({url:a,type:"POST",processData:!1,timeout:1E5,dataType:"json",success:function(a){a.post.date_gmt===edcal.NO_DATE?edcal.removePostItem(a.post.date_gmt,"post-"+a.post.id):edcal.removePostItem(a.post.date,"post-"+a.post.id);a.error?a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error):edcal.output('Finished deleting the post: "'+
|
27 |
+
a.post.title+'" with id:'+a.post.id);b&&b(a)},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("deletePost xhr.responseText: "+a.responseText)}})},confirmDelete:function(a){return confirm(edcal.str_del_msg1+a+edcal.str_del_msg2)?!0:!1},ajax_url:function(){return ajaxurl+"?_wpnonce="+edcal.wp_nonce},getMediaBar:function(){return jQuery("#cal_mediabar").html()},addPost:function(){jQuery("#newPostScheduleButton").addClass("disabled");var a=jQuery(this).parent().parent().attr("id"),
|
28 |
+
b=edcal.defaultTime;"H:i"!==edcal.timeFormat&&"G:i"!==edcal.timeFormat&&(b+=" AM");a={id:0,date:a,formatteddate:edcal.getDayFromDayId(a).toString(edcal.previewDateFormat),time:b};edcal.showForm(a);return!1},addDraft:function(){jQuery("#newPostScheduleButton").addClass("disabled");var a={id:0,date:Date.today(),formatteddate:edcal.NO_DATE,time:edcal.NO_DATE,status:"draft"};edcal.showForm(a);return!1},editPost:function(a){jQuery("#newPostScheduleButton").removeClass("disabled");edcal.getPost(a,edcal.showForm);
|
29 |
+
return!1},savePost:function(a,b,c,d){if("undefined"===typeof a||null===a)a=edcal.serializePost();jQuery("#edit-slug-buttons").addClass("tiploading");var e=a.time.toUpperCase();"12"===e.slice(0,2)&&"PM"===e.slice(e.length-2,e.length)?a.time="12:"+e.slice(3,5):"12"===e.slice(0,2)&&"AM"===e.slice(a.time.length-2,a.time.length)&&(a.time="00:"+e.slice(3,5));var e=""!==a.time?Date.parse(a.time):Date.parse(edcal.defaultTime);if(null!==e&&e!==edcal.NO_DATE){var f=e.format("H:i:s");var h=encodeURIComponent(edcal.getDayFromDayId(a.date).toString(edcal.wp_dateFormat)+
|
30 |
+
" "+f)}else h=encodeURIComponent(a.date.toString(edcal.wp_dateFormat+" H:i:s"));f=edcal.ajax_url()+"&action=edcal_savepost";a="date="+h+"&title="+encodeURIComponent(a.title)+"&content="+encodeURIComponent(a.content)+"&id="+encodeURIComponent(a.id)+"&status="+encodeURIComponent(a.status)+"&orig_status="+encodeURIComponent(a.orig_status);if(null===e||e===edcal.NO_DATE)a+="&date_gmt="+encodeURIComponent("0000-00-00 00:00:00");edcal.getUrlVars().post_type&&(a+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type));
|
31 |
+
c&&(a+="&dopublish="+encodeURIComponent("future"));jQuery.ajax({url:f,type:"POST",processData:!1,data:a,timeout:1E5,dataType:"json",success:function(a){jQuery("#edit-slug-buttons").removeClass("tiploading");jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;if(a.error)return a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error),!1;if(a.post)if(b)window.location=a.post.editlink.replace("&","&");else{var c=a.post.date;a.post.date_gmt===
|
32 |
+
edcal.NO_DATE&&(c=a.post.date_gmt);a.post.id&&edcal.removePostItem(c,"post-"+a.post.id);edcal.addPostItem(a.post,c);edcal.addPostItemDragAndToolltip(c)}else edcal.showError("There was an error creating a new post for your blog.");d&&d(a);return!0},error:function(a){jQuery("#edit-slug-buttons").removeClass("tiploading");jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;edcal.showError(edcal.general_error);a.responseText&&edcal.output("savePost xhr.responseText: "+
|
33 |
+
a.responseText)}});return!1},serializePost:function(){var a={};jQuery("#edcal_quickedit").find("input, textarea, select").each(function(){a[this.name]=this.value});return a},showForm:function(a){edcal.resetForm();a.formatteddate===edcal.NO_DATE||a.date_gmt===edcal.NO_DATE?jQuery("#timeEditControls").hide():jQuery("#timeEditControls").show();jQuery("#edcal_quickedit").center().show();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!1;a.id?(jQuery("#tooltiptitle").text(sprintf(edcal.str_edit_post_title,
|
34 |
+
a.typeTitle,edcal.getDayFromDayId(a.date).toString(edcal.previewDateFormat))),jQuery("#edcal-title-new-field").val(a.title),jQuery("#content").val(a.content)):a.formatteddate===edcal.NO_DATE?jQuery("#tooltiptitle").text(edcal.str_newdraft_title):jQuery("#tooltiptitle").text(edcal.str_newpost_title+a.formatteddate);"future"===a.status&&jQuery("#newPostScheduleButton").text(edcal.str_update);a.status?(jQuery("#edcal-status").val(a.status),edcal.updatePublishButton()):(0!==jQuery("#edcal-status option[value="+
|
35 |
+
edcal.defaultStatus+"]").length?jQuery("#edcal-status").val(edcal.defaultStatus):jQuery("#edcal-status").val("draft"),jQuery("#newPostScheduleButton").text(edcal.str_save));a.status&&"draft"!==a.status&&"future"!==a.status&&"pending"!==a.status&&(jQuery("#edcal-status").attr("disabled","true"),jQuery("#edcal-status").append('<option class="temp" value="'+a.status+'">'+a.status+"</option>"),jQuery("#edcal-status").val(a.status));a.formatteddate!==edcal.NO_DATE&&-1===edcal.getDayFromDayId(a.date).compareTo(Date.today())&&
|
36 |
+
jQuery("#edcal-status").attr("disabled","true");var b=a.time;jQuery("#edcal-time").val(b);jQuery("#edcal-date").val(a.date);jQuery("#edcal-id").val(a.id);jQuery("#edcal-title-new-field").focus();jQuery("#edcal-title-new-field").select()},hideForm:function(){jQuery("#edcal_quickedit").hide();jQuery("#edcal_scrollable").data("scrollable").getConf().keyboard=!0;edcal.resetForm()},resetForm:function(){jQuery("#edcal_quickedit").find("input, textarea, select").each(function(){this.value=""});jQuery("#edcal-status").removeAttr("disabled");
|
37 |
+
jQuery("#newPostScheduleButton").text(edcal.str_publish);jQuery("#tooltiptitle").text("");jQuery("#edcal-status").removeAttr("disabled");jQuery("#edcal-status .temp").remove()},createPostItem:function(a,b){edcal.posts[b]||(edcal.posts[b]=[]);edcal.posts[b][edcal.posts[b].length]=a;return edcal.getPostItemString(a)},findPostForId:function(a,b){if(edcal.posts[a])for(var c=0;c<edcal.posts[a].length;c++)if(edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b)return edcal.posts[a][c];return null},removePostItem:function(a,
|
38 |
+
b){if(edcal.findPostForId(a,b))for(var c=0;c<edcal.posts[a].length;c++)edcal.posts[a][c]&&"post-"+edcal.posts[a][c].id===b&&(edcal.posts[a][c]=null);jQuery("#"+b).remove()},getPostItems:function(a){var b="";if(edcal.posts[a]){var c=edcal.posts[a];if(50>c.length)for(a=0;a<c.length;a++)c[a]&&(b+=edcal.getPostItemString(c[a]));else edcal.addPostItems(a,0,50)}return b},addPostItems:function(a,b,c){var d=edcal.posts[a],e="";setTimeout(function(){for(var f=b;f<b+c&&f<d.length;f++)d[f]&&(e+=edcal.getPostItemString(d[f]));
|
39 |
+
jQuery("#"+a+" ul").append(e);b+c<d.length&&edcal.addPostItems(a,b+c,50)},100)},showActionLinks:function(a){edcal.actionTimer&&clearTimeout(edcal.actionTimer);var b=edcal.findPostForId(jQuery("#"+a).parent().parent().parent().attr("id"),a);if(!edcal.inDrag&&edcal.isPostEditable(b)){var c=jQuery("#"+a+" > div.postactions");edcal.actionLinksElem&&edcal.actionLinksElem.get(0)!==c.get(0)&&edcal.actionLinksElem.slideUp();edcal.actionLinksElem=c;edcal.actionTimer=setTimeout(function(){c.slideDown();if(c.parent().position().top+
|
40 |
+
c.parent().height()>c.parent().parent().height()){var b=jQuery("#"+a+" > div.postactions").parent().parent();b.scrollTop(b.scrollTop()+45)}},250)}},hideActionLinks:function(a){edcal.actionTimer&&clearTimeout(edcal.actionTimer);edcal.actionTimer=setTimeout(function(){jQuery("#"+a+" > div.postactions").slideUp();edcal.actionLinksElem=null},1E3)},isPostMovable:function(a){return a.editlink&&"publish"!==a.status},isPostEditable:function(a){return a.editlink},getPostEditableClass:function(a){return a.editlink?
|
41 |
+
"":"readonly"},getPostItemString:function(a){var b=a.title;""===b&&(b="[No Title]");edcal.statusPref&&("draft"===a.status&&"1"===a.sticky?b+=edcal.str_draft_sticky:"pending"===a.status&&"1"===a.sticky?b+=edcal.str_pending_sticky:"1"===a.sticky?b+=edcal.str_sticky:"pending"===a.status?b+=edcal.str_pending:"draft"===a.status?b+=edcal.str_draft:"publish"!==a.status&&"future"!==a.status&&"pending"!==a.status&&(b+=" ["+a.status+"]"));edcal.timePref&&(b='<span class="posttime">'+a.formattedtime+"</span> "+
|
42 |
+
b);edcal.authorPref&&(b=sprintf(edcal.str_by,b,'<span class="postauthor">'+a.author+"</span>"));return edcal.isPostMovable(a)?"<li onmouseover=\"edcal.showActionLinks('post-"+a.id+"');\" onmouseout=\"edcal.hideActionLinks('post-"+a.id+'\');" id="post-'+a.id+'" class="post '+a.status+" "+edcal.getPostEditableClass(a)+a.slugs+'"><div class="postlink "><span>'+b+'</span></div><div class="postactions"><a href="'+a.editlink+'">'+edcal.str_edit+'</a> | <a href="#" onclick="edcal.editPost('+a.id+'); return false;">'+
|
43 |
+
edcal.str_quick_edit+'</a> | <a href="'+a.dellink+'" onclick="return edcal.confirmDelete(\''+a.title+"');\">"+edcal.str_del+'</a> | <a href="'+a.permalink+'">'+edcal.str_view+"</a></div></li>":"<li onmouseover=\"edcal.showActionLinks('post-"+a.id+"');\" onmouseout=\"edcal.hideActionLinks('post-"+a.id+'\');" id="post-'+a.id+'" class="post '+a.status+" "+edcal.getPostEditableClass(a)+'"><div class="postlink "><span>'+b+'</span></div><div class="postactions"><a href="'+a.editlink+'">'+edcal.str_republish+
|
44 |
+
'</a> | <a href="'+a.permalink+'">'+edcal.str_view+"</a></div></li>"},setClassforToday:function(){jQuery("#"+Date.today().toString(edcal.internalDateFormat)).addClass("today")},getCalHeight:function(){var a=jQuery(window).height()-jQuery("#footer").height()-jQuery("#wphead").height()-150;return Math.max(a,500)},move:function(a,b,c){if(!jQuery("#edcal_quickedit").is(":visible")){edcal.currentDirection!==b&&(edcal._wDate=b?edcal._wDate.add(7*(edcal.weeksPref+7)).days():edcal._wDate.add(-(7*(edcal.weeksPref+
|
45 |
+
7))).days(),edcal.steps=0,edcal.moveDate=edcal._wDate);edcal.currentDirection=b;var d;if(b)for(d=0;d<a;d++)jQuery("#cal > div:first").remove(),edcal.createRow(jQuery("#cal"),!0),edcal._wDate.add(7).days();else for(d=0;d<a;d++)jQuery("#cal > div:last").remove(),edcal.createRow(jQuery("#cal"),!1),edcal._wDate.add(-7).days();edcal.alignCal();edcal.setClassforToday();edcal.setDateLabel();edcal.steps+=a;edcal.tID?clearTimeout(edcal.tID):edcal.moveDate=edcal._wDate;edcal.tID=setTimeout(function(){b?edcal.getPosts(edcal._wDate.clone().add(-7*
|
46 |
+
(edcal.steps+1)).days(),edcal._wDate.clone(),c):edcal.getPosts(edcal._wDate.clone(),edcal._wDate.clone().add(7*(edcal.steps+1)).days(),c);edcal.steps=0;edcal.tID=null;edcal.moveDate=edcal._wDate},1E3);b?jQuery.cookie("edcal_date",edcal._wDate.clone().add(-(edcal.weeksPref+4)).weeks().toString("yyyy-dd-MM")):jQuery.cookie("edcal_date",edcal._wDate.clone().add(3).weeks().toString("yyyy-dd-MM"))}},getDayFromDayId:function(a){return Date.parseExact(a.substring(2,4)+"/"+a.substring(0,2)+"/"+a.substring(4),
|
47 |
+
"MM/dd/yyyy")},setDateLabel:function(a){var b=jQuery("#edcal_scrollable").scrollable().getVisibleItems();a=edcal.getDayFromDayId(b.eq(0).children(".edcal_row").children(".day:first").attr("id"));b=edcal.getDayFromDayId(b.eq(edcal.weeksPref-1).children(".edcal_row").children(".day:last").attr("id"));jQuery("#currentRange").text(edcal.chineseAposWorkaround(a.toString(Date.CultureInfo.formatPatterns.yearMonth))+" - "+edcal.chineseAposWorkaround(b.toString(Date.CultureInfo.formatPatterns.yearMonth)))},
|
48 |
+
nextStartOfWeek:function(a){a=a.clone();if(null===edcal.startOfWeek)if(edcal.locale){var b=edcal.locale.toUpperCase();edcal.endsWith(b,"AS")||edcal.endsWith(b,"AZ")||edcal.endsWith(b,"BW")||edcal.endsWith(b,"CA")||edcal.endsWith(b,"CN")||edcal.endsWith(b,"FO")||edcal.endsWith(b,"GB")||edcal.endsWith(b,"GE")||edcal.endsWith(b,"GL")||edcal.endsWith(b,"GU")||edcal.endsWith(b,"HK")||edcal.endsWith(b,"IE")||edcal.endsWith(b,"IL")||edcal.endsWith(b,"IN")||edcal.endsWith(b,"IS")||edcal.endsWith(b,"JM")||
|
49 |
+
edcal.endsWith(b,"JP")||edcal.endsWith(b,"KG")||edcal.endsWith(b,"KR")||edcal.endsWith(b,"LA")||edcal.endsWith(b,"MH")||edcal.endsWith(b,"MN")||edcal.endsWith(b,"MO")||edcal.endsWith(b,"MP")||edcal.endsWith(b,"MT")||edcal.endsWith(b,"NZ")||edcal.endsWith(b,"PH")||edcal.endsWith(b,"PK")||edcal.endsWith(b,"SG")||edcal.endsWith(b,"SY")||edcal.endsWith(b,"TH")||edcal.endsWith(b,"TT")||edcal.endsWith(b,"TW")||edcal.endsWith(b,"UM")||edcal.endsWith(b,"US")||edcal.endsWith(b,"UZ")||edcal.endsWith(b,"VI")||
|
50 |
+
edcal.endsWith(b,"ZW")?edcal.startOfWeek=0:edcal.endsWith(b,"MV")?edcal.startOfWeek=5:edcal.endsWith(b,"AF")||edcal.endsWith(b,"BH")||edcal.endsWith(b,"DJ")||edcal.endsWith(b,"DZ")||edcal.endsWith(b,"EG")||edcal.endsWith(b,"ER")||edcal.endsWith(b,"ET")||edcal.endsWith(b,"IQ")||edcal.endsWith(b,"IR")||edcal.endsWith(b,"JO")||edcal.endsWith(b,"KE")||edcal.endsWith(b,"KW")||edcal.endsWith(b,"LY")||edcal.endsWith(b,"MA")||edcal.endsWith(b,"OM")||edcal.endsWith(b,"QA")||edcal.endsWith(b,"SA")||edcal.endsWith(b,
|
51 |
+
"SD")||edcal.endsWith(b,"SO")||edcal.endsWith(b,"TN")||edcal.endsWith(b,"YE")?edcal.startOfWeek=6:edcal.startOfWeek=1}else edcal.startOfWeek=0;return a.next().sunday().add(edcal.startOfWeek).days()},endsWith:function(a,b){return a.match(b+"$")===b},moveTo:function(a){edcal.isMoving=!0;jQuery("#cal").empty();jQuery.cookie("edcal_date",a.toString("yyyy-dd-MM"));edcal._wDate=edcal.nextStartOfWeek(a).add(-21).days();edcal.currentDirection=!0;a=edcal.weeksPref+6;for(var b=0;b<a;b++)edcal.createRow(jQuery("#cal"),
|
52 |
+
!0),edcal._wDate.add(7).days();edcal.alignCal();jQuery("#edcal_scrollable").scrollable().move(2);edcal.setDateLabel();edcal.setClassforToday();edcal.isMoving=!1},savePosition:function(){var a=jQuery("#edcal_scrollable"),b=jQuery("#cal_cont");edcal.position={top:a.offset().top,bottom:a.offset().top+a.height()};jQuery("#edcal_poststyle").remove();a=jQuery(".rowcont:eq(2) .dayobj:first").height()-jQuery(".rowcont:eq(2) .daylabel:first").height()-6;jQuery("head").append('<style id="edcal_poststyle" type="text/css">.ui-draggable-dragging {width: '+
|
53 |
+
(jQuery(".rowcont:eq(2) .day:first").width()-5)+"px;}.postlist {height: "+a+"px;}</style>");jQuery("#draftsdrawer").css("height",b.height());jQuery("#draftsdrawer .day").css("min-height",b.height()-10-jQuery("#draftsdrawer .draftsdrawerheadcont").height())},addFeedbackSection:function(){3<edcal.visitCount&&edcal.doFeedbackPref&&jQuery("#edcal_main_title").after(edcal.str_feedbackmsg)},doFeedback:function(){jQuery.getScript("http://www.zackgrossbart.com/edcal/mint/?js",function(){edcal.saveFeedbackPref()})},
|
54 |
+
noFeedback:function(){jQuery("#feedbacksection").hide("fast");edcal.saveFeedbackPref()},saveFeedbackPref:function(){var a=edcal.ajax_url()+"&action=edcal_saveoptions&dofeedback="+encodeURIComponent("done");jQuery.ajax({url:a,type:"POST",processData:!1,timeout:1E5,dataType:"text",success:function(a){jQuery("#feedbacksection").html(edcal.str_feedbackdone);setTimeout(function(){jQuery("#feedbacksection").hide("slow")},5E3)},error:function(a){edcal.showError(edcal.general_error);a.responseText&&edcal.output("saveOptions xhr.responseText: "+
|
55 |
+
a.responseText)}})},updatePublishButton:function(){"future"===jQuery("#edcal-status").val()&&jQuery("#newPostScheduleButton").text(edcal.str_publish);"pending"===jQuery("#edcal-status").val()?jQuery("#newPostScheduleButton").text(edcal.str_review):jQuery("#newPostScheduleButton").text(edcal.str_save)},changeDate:function(a,b,c){var d=a===edcal.NO_DATE,e=b.date_gmt===edcal.NO_DATE,f=d?"0000-00-00":edcal.getDayFromDayId(a).toString(edcal.wp_dateFormat),h=e?b.date_gmt:edcal.getDayFromDayId(b.date).toString(edcal.wp_dateFormat);
|
56 |
+
d&&(b.status="draft");f=edcal.ajax_url()+"&action=edcal_changedate&postid="+b.id+"&postStatus="+b.status+"&newdate="+f+"&olddate="+h;jQuery("#post-"+b.id).addClass("loadingclass");jQuery.ajax({url:f,type:"POST",processData:!1,timeout:1E5,dataType:"json",success:function(b){b.error&&(edcal.removePostItem(a,"post-"+b.post.id),b.error===edcal.CONCURRENCY_ERROR?edcal.displayMessage(edcal.concurrency_error+"<br />"+b.post.title):b.error===edcal.PERMISSION_ERROR?edcal.displayMessage(edcal.permission_error):
|
57 |
+
b.error===edcal.NONCE_ERROR&&edcal.displayMessage(edcal.checksum_error));var f=d?"00000000":b.post.date,g=e?a:f;edcal.removePostItem(f,"post-"+b.post.id);edcal.addPostItem(b.post,g);edcal.addPostItemDragAndToolltip(g);c&&c(b)},error:function(a,b,c){edcal.showError(edcal.general_error);edcal.output("textStatus: "+b);edcal.output("error: "+c);a.responseText&&edcal.output("changeDate xhr.responseText: "+a.responseText)}})},getPosts:function(a,b,c){b||(b="");edcal.cacheDates[a]?c&&c():(edcal.cacheDates[a]=
|
58 |
+
!0,b=edcal.ajax_url()+"&action=edcal_posts&from="+a.toString("yyyy-MM-dd")+"&to="+b.toString("yyyy-MM-dd"),edcal.getUrlVars().post_type&&(b+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type)),jQuery("#loading").show(),jQuery.ajax({url:b,type:"GET",processData:!1,timeout:1E5,dataType:"text",success:function(b){jQuery("#loading").hide();var d=null;try{d=JSON.parseIt(b)}catch(l){edcal.showFatalError(edcal.str_fatal_parse_error+l.message);window.console&&console.error(l);return}if(d.error)d.error===
|
59 |
+
edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error);else{for(var f=[],h=d.length;0<=h;h--){var g=d[h];g&&"trash"!==g.status&&(g.date=g.date.replace(g.date.substring(2,3),g.date.substring(2,3).toUpperCase()),"00000000"===a&&(g.date=a),edcal.removePostItem(g.date,"post-"+g.id),edcal.addPostItem(g,g.date),f[f.length]=g.date)}setTimeout(function(){jQuery.each(f,function(a,b){edcal.addPostItemDragAndToolltip(b)})},300);c&&c(b)}},error:function(a){edcal.showError(edcal.general_error);a.responseText&&
|
60 |
+
edcal.output("getPosts xhr.responseText: "+a.responseText)}}))},getPost:function(a,b){if(0===a)return!1;jQuery("#loading").show();a=edcal.ajax_url()+"&action=edcal_getpost&postid="+a;edcal.getUrlVars().post_type&&(a+="&post_type="+encodeURIComponent(edcal.getUrlVars().post_type));jQuery.ajax({url:a,type:"GET",processData:!1,timeout:1E5,dataType:"json",success:function(a){jQuery("#loading").hide();edcal.output("xhr for getPost returned: "+a);if(a.error)return a.error===edcal.NONCE_ERROR&&edcal.showError(edcal.checksum_error),
|
61 |
+
!1;"function"===typeof b&&b(a.post);return a.post},error:function(a){jQuery("#loading").hide();edcal.showError(edcal.general_error);a.responseText&&edcal.output("getPost xhr.responseText: "+a.responseText);return!1}});return!0},addOptionsSection:function(){var a='<div class="hide-if-no-js screen-meta-toggle" id="screen-options-link-wrap"><a class="show-settings" id="show-edcal-settings-link" onclick="edcal.toggleOptions(); return false;" href="#" >'+edcal.str_screenoptions+"</a></div>";0===jQuery("#screen-meta-links").length&&
|
62 |
+
jQuery("#screen-meta").after('<div id="screen-meta-links"></div>');jQuery("#screen-meta-links").append(a)},toggleOptions:function(){if(edcal.helpMeta)jQuery("#contextual-help-wrap").slideUp("fast"),jQuery("#contextual-help-wrap").html(edcal.helpMeta),edcal.helpMeta=null,jQuery("#show-edcal-settings-link").removeClass("screen-meta-active"),jQuery("#contextual-help-link-wrap").css("visibility","");else{edcal.helpMeta=jQuery("#contextual-help-wrap").html();for(var a='<div class="metabox-prefs calendar-fields-prefs"><h5>'+
|
63 |
+
edcal.str_show_opts+'</h5><label for="author-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.authorPref)+'value="true" id="author-hide" name="author-hide" class="hide-column-tog" />'+edcal.str_opt_author+'</label><label for="status-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.statusPref)+'value="true" id="status-hide" name="status-hide" class="hide-column-tog" />'+edcal.str_opt_status+'</label><label for="time-hide"><input type="checkbox" '+edcal.isPrefChecked(edcal.timePref)+
|
64 |
+
'value="true" id="time-hide" name="time-hide" class="hide-column-tog" />'+edcal.str_opt_time+'</label></div><div class="metabox-prefs calendar-fields-prefs"><h5>'+edcal.str_show_wheel_opts+'</h5><label for="wheel-support"><input type="checkbox" '+edcal.isPrefChecked(edcal.wheelScrollPref)+'value="true" id="wheel-support" name="wheel-support" class="hide-column-tog" />'+edcal.str_opt_wheel+"</label></div>",a=a+('<div class="metabox-prefs"><h5>'+edcal.str_show_title+'</h5><select id="edcal_weeks_pref" class="screen-per-page" title="'+
|
65 |
+
edcal.str_weekstt+'"> '),b=parseInt(edcal.weeksPref,10),c=1;9>c;c++)a=c===b?a+('<option selected="true">'+c+"</option>"):a+("<option>"+c+"</option>");a+="</select>"+edcal.str_opt_weeks+"</div>";a+='<br /><button id="edcal_applyoptions" onclick="edcal.saveOptions(); return false;" class="save button">'+edcal.str_apply+"</button>";jQuery("#contextual-help-wrap").html(a);jQuery("#contextual-help-link-wrap").css("visibility","hidden");jQuery("#contextual-help-wrap").slideDown("normal");jQuery("#screen-meta").show();
|
66 |
+
jQuery("#show-edcal-settings-link").addClass("screen-meta-active")}},generateColorPicker:function(a,b,c){a='<div id="'+b+'" class="optionscolorrow">'+('<span style="background-color: '+c+';" class="colorlabel"> '+a+"</span> ");var d="lightred orange yellow lightgreen lightblue purple lightgray".split(" ");edcal.output("colors.length: "+d.length);for(var e=0;e<d.length;e++)a+='<a href="#" class="optionscolor ',d[e]===c&&(a+="colorselected"),a+='" class='+b+d[e]+'" style="background-color: '+d[e]+"; left: "+
|
67 |
+
(20*e+50)+'px" onclick="edcal.selectColor(\''+b+"', '"+d[e]+"'); return false;\"></a>";return a+"</div>"},selectColor:function(a,b){edcal.output("selectColor("+a+", "+b+")");jQuery("#"+a+" .colorlabel").css("background-color",b);jQuery("#"+a+" .colorselected").removeClass("colorselected");jQuery("#"+a+"value").addClass("colorselected")},isPrefChecked:function(a){return a?' checked="checked" ':""},saveOptions:function(){var a=parseInt(jQuery("#edcal_weeks_pref").val(),10);if(1>a||8<a)humanMsg.displayMsg(edcal.str_weekserror);
|
68 |
+
else{edcal.enableMouseWheel();var b=edcal.ajax_url()+"&action=edcal_saveoptions&weeks="+encodeURIComponent(jQuery("#edcal_weeks_pref").val());jQuery("div.calendar-fields-prefs").find("input, textarea, select").each(function(){b+="&"+encodeURIComponent(this.name)+"="+encodeURIComponent(this.checked)});jQuery.ajax({url:b,type:"POST",processData:!1,timeout:1E5,dataType:"text",success:function(a){window.location.href=window.location.href},error:function(a){edcal.showError(edcal.general_error);a.responseText&&
|
69 |
+
edcal.output("saveOptions xhr.responseText: "+a.responseText)}})}},output:function(a){window.console&&console.log(a)},showError:function(a){window.console&&console.error(a);edcal.displayMessage(a)},displayMessage:function(a){humanMsg.displayMsg(a)},getUrlVars:function(){for(var a=[],b,c=window.location.href.slice(window.location.href.indexOf("?")+1).split("&"),d=0;d<c.length;d++)b=c[d].split("="),a.push(b[0]),a[b[0]]=b[1];return a},showFatalError:function(a){jQuery("#edcal_main_title").after('<div class="error below-h2" id="message"><p>'+
|
70 |
+
edcal.str_fatal_error+a+"<br></p></div>");window.console&&console.error(a)},chineseAposWorkaround:function(a){return 0===Date.CultureInfo.name.indexOf("zh")||0===Date.CultureInfo.name.indexOf("ja")?a.replace(/'/g,""):a}};jQuery.fn.center=function(){this.css("position","absolute");this.css("top",(jQuery(window).height()-this.outerHeight())/2+jQuery(window).scrollTop()+"px");this.css("left",(jQuery(window).width()-this.outerWidth())/2+jQuery(window).scrollLeft()+"px");return this};
|
71 |
+
jQuery(document).ready(function(){try{edcal.init()}catch(a){edcal.output("Error loading calendar: "+a),edcal.showFatalError(a.description)}edcal.getUrlVars().qunit&&edcal_test.runTests()});
|
3.7.8/edcal.php
ADDED
@@ -0,0 +1,1420 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*******************************************************************************
|
3 |
+
*
|
4 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
+
* you may not use this file except in compliance with the License.
|
6 |
+
* You may obtain a copy of the License at
|
7 |
+
*
|
8 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
*
|
10 |
+
* Unless required by applicable law or agreed to in writing, software
|
11 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
+
* See the License for the specific language governing permissions and
|
14 |
+
* limitations under the License.
|
15 |
+
*
|
16 |
+
******************************************************************************/
|
17 |
+
|
18 |
+
/*
|
19 |
+
Plugin Name: WordPress Editorial Calendar
|
20 |
+
Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
|
21 |
+
Version: 3.7.8
|
22 |
+
Author: Colin Vernon, Justin Evans, Joachim Kudish, Mary Vogt, and Zack Grossbart
|
23 |
+
Author URI: http://www.zackgrossbart.com
|
24 |
+
Plugin URI: http://stresslimitdesign.com/editorial-calendar-plugin
|
25 |
+
*/
|
26 |
+
|
27 |
+
|
28 |
+
if ( is_admin() ) {
|
29 |
+
global $edcal;
|
30 |
+
if ( empty($edcal) )
|
31 |
+
$edcal = new EdCal();
|
32 |
+
}
|
33 |
+
|
34 |
+
|
35 |
+
/*
|
36 |
+
* This error code matches CONCURRENCY_ERROR from edcal.js
|
37 |
+
*/
|
38 |
+
define( 'EDCAL_CONCURRENCY_ERROR', 4 );
|
39 |
+
|
40 |
+
/*
|
41 |
+
* This error code matches PERMISSION_ERROR from edcal.js
|
42 |
+
*/
|
43 |
+
define( 'EDCAL_PERMISSION_ERROR', 5 );
|
44 |
+
|
45 |
+
/*
|
46 |
+
* This error code matches NONCE_ERROR from edcal.js
|
47 |
+
*/
|
48 |
+
define( 'EDCAL_NONCE_ERROR', 6 );
|
49 |
+
|
50 |
+
class EdCal {
|
51 |
+
|
52 |
+
protected $supports_custom_types;
|
53 |
+
protected $default_time;
|
54 |
+
|
55 |
+
function __construct() {
|
56 |
+
add_action('wp_ajax_edcal_saveoptions', array(&$this, 'edcal_saveoptions'));
|
57 |
+
add_action('wp_ajax_edcal_changedate', array(&$this, 'edcal_changedate'));
|
58 |
+
add_action('wp_ajax_edcal_savepost', array(&$this, 'edcal_savepost'));
|
59 |
+
add_action('wp_ajax_edcal_changetitle', array(&$this, 'edcal_changetitle'));
|
60 |
+
add_action('admin_menu', array(&$this, 'edcal_list_add_management_page'));
|
61 |
+
add_action('wp_ajax_edcal_posts', array(&$this, 'edcal_posts'));
|
62 |
+
add_action('wp_ajax_edcal_getpost', array(&$this, 'edcal_getpost'));
|
63 |
+
add_action('wp_ajax_edcal_deletepost', array(&$this, 'edcal_deletepost'));
|
64 |
+
add_action("init", array(&$this, 'edcal_load_language'));
|
65 |
+
|
66 |
+
/*
|
67 |
+
* This boolean variable will be used to check whether this
|
68 |
+
* installation of WordPress supports custom post types.
|
69 |
+
*/
|
70 |
+
$this->supports_custom_types = function_exists('get_post_types') && function_exists('get_post_type_object');
|
71 |
+
|
72 |
+
/*
|
73 |
+
* This is the default time that posts get created at, for now
|
74 |
+
* we are using 10am, but this could become an option later.
|
75 |
+
*/
|
76 |
+
$this->default_time = get_option("edcal_default_time") != "" ? get_option("edcal_default_time") : '10:00';
|
77 |
+
|
78 |
+
/*
|
79 |
+
* This is the default status used for creating new posts.
|
80 |
+
*/
|
81 |
+
$this->default_status = get_option("edcal_default_status") != "" ? get_option("edcal_default_status") : 'draft';
|
82 |
+
|
83 |
+
/*
|
84 |
+
* We use these variables to hold the post dates for the filter when
|
85 |
+
* we do our post query.
|
86 |
+
*/
|
87 |
+
//$edcal_startDate;
|
88 |
+
//$edcal_endDate;
|
89 |
+
}
|
90 |
+
|
91 |
+
function edcal_load_language() {
|
92 |
+
$plugin_dir = basename(dirname(__FILE__));
|
93 |
+
load_plugin_textdomain( 'editorial-calendar', 'wp-content/plugins/' . $plugin_dir . '/languages/', $plugin_dir . '/languages/' );
|
94 |
+
}
|
95 |
+
|
96 |
+
/*
|
97 |
+
* This function adds our calendar page to the admin UI
|
98 |
+
*/
|
99 |
+
function edcal_list_add_management_page() {
|
100 |
+
if (function_exists('add_management_page') ) {
|
101 |
+
$page = add_posts_page( __('Calendar', 'editorial-calendar'), __('Calendar', 'editorial-calendar'), 'edit_posts', 'cal', array(&$this, 'edcal_list_admin'));
|
102 |
+
add_action( "admin_print_scripts-$page", array(&$this, 'edcal_scripts'));
|
103 |
+
|
104 |
+
if ($this->supports_custom_types) {
|
105 |
+
|
106 |
+
|
107 |
+
/*
|
108 |
+
* We add one calendar for Posts and then we add a separate calendar for each
|
109 |
+
* custom post type. This calendar will have an URL like this:
|
110 |
+
* /wp-admin/edit.php?post_type=podcasts&page=cal_podcasts
|
111 |
+
*
|
112 |
+
* We can then use the post_type parameter to show the posts of just that custom
|
113 |
+
* type and update the labels for each post type.
|
114 |
+
*/
|
115 |
+
$args = array(
|
116 |
+
'public' => get_option("edcal_custom_posts_public") != "" ? get_option("edcal_custom_posts_public") : true,
|
117 |
+
'_builtin' => false
|
118 |
+
);
|
119 |
+
$output = 'names'; // names or objects
|
120 |
+
$operator = 'and'; // 'and' or 'or'
|
121 |
+
$post_types = get_post_types($args,$output,$operator);
|
122 |
+
|
123 |
+
foreach ($post_types as $post_type) {
|
124 |
+
$show_this_post_type = apply_filters("edcal_show_calendar_$post_type", true);
|
125 |
+
if ($show_this_post_type) {
|
126 |
+
$page = add_submenu_page('edit.php?post_type=' . $post_type, __('Calendar', 'editorial-calendar'), __('Calendar', 'editorial-calendar'), 'edit_posts', 'cal_' . $post_type, array(&$this, 'edcal_list_admin'));
|
127 |
+
add_action( "admin_print_scripts-$page", array(&$this, 'edcal_scripts'));
|
128 |
+
}
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
/*
|
135 |
+
* This is a utility function to open a file add it to our
|
136 |
+
* output stream. We use this to embed JavaScript and CSS
|
137 |
+
* files and cut down on the number of HTTP requests.
|
138 |
+
*/
|
139 |
+
function edcal_echoFile($myFile) {
|
140 |
+
$fh = fopen($myFile, 'r');
|
141 |
+
$theData = fread($fh, filesize($myFile));
|
142 |
+
fclose($fh);
|
143 |
+
echo $theData;
|
144 |
+
}
|
145 |
+
|
146 |
+
/*
|
147 |
+
* This is the function that generates our admin page. It adds the CSS files and
|
148 |
+
* generates the divs that we need for the JavaScript to work.
|
149 |
+
*/
|
150 |
+
function edcal_list_admin() {
|
151 |
+
|
152 |
+
/*
|
153 |
+
* We want to count the number of times they load the calendar
|
154 |
+
* so we only show the feedback after they have been using it
|
155 |
+
* for a little while.
|
156 |
+
*/
|
157 |
+
$edcal_count = get_option("edcal_count");
|
158 |
+
if ($edcal_count == '') {
|
159 |
+
$edcal_count = 0;
|
160 |
+
add_option("edcal_count", $edcal_count, "", "yes");
|
161 |
+
}
|
162 |
+
|
163 |
+
if (get_option("edcal_do_feedback") != "done") {
|
164 |
+
$edcal_count++;
|
165 |
+
update_option("edcal_count", $edcal_count);
|
166 |
+
}
|
167 |
+
|
168 |
+
/*
|
169 |
+
* This section of code embeds certain CSS and
|
170 |
+
* JavaScript files into the HTML. This has the
|
171 |
+
* advantage of fewer HTTP requests, but the
|
172 |
+
* disadvantage that the browser can't cache the
|
173 |
+
* results. We only do this for files that will
|
174 |
+
* be used on this page and nowhere else.
|
175 |
+
*/
|
176 |
+
|
177 |
+
echo '<!-- This is the styles from time picker.css -->';
|
178 |
+
echo '<style type="text/css">';
|
179 |
+
$this->edcal_echoFile(dirname( __FILE__ ) . "/lib/timePicker.css");
|
180 |
+
echo '</style>';
|
181 |
+
|
182 |
+
echo '<!-- This is the styles from humanmsg.css -->';
|
183 |
+
echo '<style type="text/css">';
|
184 |
+
$this->edcal_echoFile(dirname( __FILE__ ) . "/lib/humanmsg.css");
|
185 |
+
echo '</style>';
|
186 |
+
|
187 |
+
echo '<!-- This is the styles from edcal.css -->';
|
188 |
+
echo '<style type="text/css">';
|
189 |
+
$this->edcal_echoFile(dirname( __FILE__ ) . "/edcal.css");
|
190 |
+
echo '</style>';
|
191 |
+
|
192 |
+
/*
|
193 |
+
* We want to add the right to left stylesheet if
|
194 |
+
* we're in a right to left language.
|
195 |
+
*/
|
196 |
+
if (__('ltr', 'editorial-calendar') == 'rtl') {
|
197 |
+
echo '<!-- This is the styles from edcal_rtl.css -->';
|
198 |
+
echo '<style type="text/css">';
|
199 |
+
$this->edcal_echoFile(dirname( __FILE__ ) . "/edcal_rtl.css");
|
200 |
+
echo '</style>';
|
201 |
+
}
|
202 |
+
|
203 |
+
|
204 |
+
?>
|
205 |
+
|
206 |
+
<!-- This is just a little script so we can pass the AJAX URL and some localized strings -->
|
207 |
+
<script type="text/javascript">
|
208 |
+
jQuery(document).ready(function(){
|
209 |
+
edcal.plugin_url = '<?php echo(plugins_url("/", __FILE__ )); ?>';
|
210 |
+
edcal.wp_nonce = '<?php echo wp_create_nonce("edit-calendar"); ?>';
|
211 |
+
<?php
|
212 |
+
if (get_option("edcal_weeks_pref") != "") {
|
213 |
+
?>
|
214 |
+
edcal.weeksPref = <?php echo(get_option("edcal_weeks_pref")); ?>;
|
215 |
+
<?php
|
216 |
+
}
|
217 |
+
?>
|
218 |
+
|
219 |
+
<?php
|
220 |
+
if (get_option("edcal_author_pref") != "") {
|
221 |
+
?>
|
222 |
+
edcal.authorPref = <?php echo(get_option("edcal_author_pref")); ?>;
|
223 |
+
<?php
|
224 |
+
}
|
225 |
+
?>
|
226 |
+
|
227 |
+
<?php
|
228 |
+
if (get_option("edcal_time_pref") != "") {
|
229 |
+
?>
|
230 |
+
edcal.timePref = <?php echo(get_option("edcal_time_pref")); ?>;
|
231 |
+
<?php
|
232 |
+
}
|
233 |
+
?>
|
234 |
+
|
235 |
+
<?php
|
236 |
+
if (get_option("edcal_wheelscroll_pref") != "") {
|
237 |
+
?>
|
238 |
+
edcal.wheelScrollPref = <?php echo(get_option("edcal_wheelscroll_pref")); ?>;
|
239 |
+
<?php
|
240 |
+
}
|
241 |
+
?>
|
242 |
+
|
243 |
+
<?php
|
244 |
+
if (get_option("edcal_status_pref") != "") {
|
245 |
+
?>
|
246 |
+
edcal.statusPref = <?php echo(get_option("edcal_status_pref")); ?>;
|
247 |
+
<?php
|
248 |
+
}
|
249 |
+
?>
|
250 |
+
|
251 |
+
<?php
|
252 |
+
if (get_option("edcal_do_feedback") != "done") {
|
253 |
+
?>
|
254 |
+
edcal.doFeedbackPref = true;
|
255 |
+
edcal.visitCount = <?php echo(get_option("edcal_count")); ?>;
|
256 |
+
<?php
|
257 |
+
}
|
258 |
+
?>
|
259 |
+
|
260 |
+
<?php $this->edcal_getLastPost(); ?>
|
261 |
+
|
262 |
+
edcal.startOfWeek = <?php echo(get_option("start_of_week")); ?>;
|
263 |
+
edcal.timeFormat = "<?php echo(get_option("time_format")); ?>";
|
264 |
+
edcal.previewDateFormat = "MMMM d";
|
265 |
+
edcal.defaultTime = "<?php echo $this->default_time; ?>";
|
266 |
+
edcal.defaultStatus = "<?php echo $this->default_status; ?>";
|
267 |
+
|
268 |
+
/*
|
269 |
+
* We want to show the day of the first day of the week to match the user's
|
270 |
+
* country code. The problem is that we can't just use the WordPress locale.
|
271 |
+
* If the locale was fr-FR so we started the week on Monday it would still
|
272 |
+
* say Sunday was the first day if we didn't have a proper language bundle
|
273 |
+
* for French. Therefore we must depend on the language bundle writers to
|
274 |
+
* specify the locale for the language they are adding.
|
275 |
+
*
|
276 |
+
*/
|
277 |
+
edcal.locale = '<?php echo(__('en-US', 'editorial-calendar')) ?>';
|
278 |
+
|
279 |
+
/*
|
280 |
+
* These strings are all localized values. The WordPress localization mechanism
|
281 |
+
* doesn't really extend to JavaScript so we localize the strings in PHP and then
|
282 |
+
* pass the values to JavaScript.
|
283 |
+
*/
|
284 |
+
|
285 |
+
edcal.str_by = <?php echo($this->edcal_json_encode(__('%1$s by %2$s', 'editorial-calendar'))) ?>;
|
286 |
+
|
287 |
+
edcal.str_addPostLink = <?php echo($this->edcal_json_encode(__('New Post', 'editorial-calendar'))) ?>;
|
288 |
+
edcal.str_addDraftLink = <?php echo($this->edcal_json_encode(__('New Draft', 'editorial-calendar'))) ?>;
|
289 |
+
edcal.ltr = <?php echo($this->edcal_json_encode(strtolower(__('ltr', 'editorial-calendar')))) ?>;
|
290 |
+
|
291 |
+
edcal.str_draft = <?php echo($this->edcal_json_encode(__(' [DRAFT]', 'editorial-calendar'))) ?>;
|
292 |
+
edcal.str_pending = <?php echo($this->edcal_json_encode(__(' [PENDING]', 'editorial-calendar'))) ?>;
|
293 |
+
edcal.str_sticky = <?php echo($this->edcal_json_encode(__(' [STICKY]', 'editorial-calendar'))) ?>;
|
294 |
+
edcal.str_draft_sticky = <?php echo($this->edcal_json_encode(__(' [DRAFT, STICKY]', 'editorial-calendar'))) ?>;
|
295 |
+
edcal.str_pending_sticky = <?php echo($this->edcal_json_encode(__(' [PENDING, STICKY]', 'editorial-calendar'))) ?>;
|
296 |
+
edcal.str_edit = <?php echo($this->edcal_json_encode(__('Edit', 'editorial-calendar'))) ?>;
|
297 |
+
edcal.str_quick_edit = <?php echo($this->edcal_json_encode(__('Quick Edit', 'editorial-calendar'))) ?>;
|
298 |
+
edcal.str_del = <?php echo($this->edcal_json_encode(__('Delete', 'editorial-calendar'))) ?>;
|
299 |
+
edcal.str_view = <?php echo($this->edcal_json_encode(__('View', 'editorial-calendar'))) ?>;
|
300 |
+
edcal.str_republish = <?php echo($this->edcal_json_encode(__('Edit', 'editorial-calendar'))) ?>;
|
301 |
+
edcal.str_status = <?php echo($this->edcal_json_encode(__('Status:', 'editorial-calendar'))) ?>;
|
302 |
+
edcal.str_cancel = <?php echo($this->edcal_json_encode(__('Cancel', 'editorial-calendar'))) ?>;
|
303 |
+
edcal.str_posttitle = <?php echo($this->edcal_json_encode(__('Title', 'editorial-calendar'))) ?>;
|
304 |
+
edcal.str_postcontent = <?php echo($this->edcal_json_encode(__('Content', 'editorial-calendar'))) ?>;
|
305 |
+
edcal.str_newpost = <?php echo($this->edcal_json_encode(__('Add a new post on %s', 'editorial-calendar'))) ?>;
|
306 |
+
edcal.str_newdraft = <?php echo($this->edcal_json_encode(__('Add a new draft', 'editorial-calendar'))) ?>;
|
307 |
+
edcal.str_newpost_title = <?php echo($this->edcal_json_encode(sprintf(__('New %s - ', 'editorial-calendar'), $this->edcal_get_posttype_singlename()))) ?> ;
|
308 |
+
edcal.str_newdraft_title = <?php echo($this->edcal_json_encode(__('New Draft', 'editorial-calendar'))) ?>;
|
309 |
+
edcal.str_update = <?php echo($this->edcal_json_encode(__('Update', 'editorial-calendar'))) ?>;
|
310 |
+
edcal.str_publish = <?php echo($this->edcal_json_encode(__('Schedule', 'editorial-calendar'))) ?>;
|
311 |
+
edcal.str_review = <?php echo($this->edcal_json_encode(__('Submit for Review', 'editorial-calendar'))) ?>;
|
312 |
+
edcal.str_save = <?php echo($this->edcal_json_encode(__('Save', 'editorial-calendar'))) ?>;
|
313 |
+
edcal.str_edit_post_title = <?php echo($this->edcal_json_encode(__('Edit %1$s - %2$s', 'editorial-calendar'))) ?>;
|
314 |
+
edcal.str_scheduled = <?php echo($this->edcal_json_encode(__('Scheduled', 'editorial-calendar'))) ?>;
|
315 |
+
|
316 |
+
edcal.str_del_msg1 = <?php echo($this->edcal_json_encode(__('You are about to delete the post "', 'editorial-calendar'))) ?>;
|
317 |
+
edcal.str_del_msg2 = <?php echo($this->edcal_json_encode(__('". Press Cancel to stop, OK to delete.', 'editorial-calendar'))) ?>;
|
318 |
+
|
319 |
+
edcal.concurrency_error = <?php echo($this->edcal_json_encode(__('Looks like someone else already moved this post.', 'editorial-calendar'))) ?>;
|
320 |
+
edcal.permission_error = <?php echo($this->edcal_json_encode(__('You do not have permission to edit posts.', 'editorial-calendar'))) ?>;
|
321 |
+
edcal.checksum_error = <?php echo($this->edcal_json_encode(__('Invalid checksum for post. This is commonly a cross-site scripting error.', 'editorial-calendar'))) ?>;
|
322 |
+
edcal.general_error = <?php echo($this->edcal_json_encode(__('There was an error contacting your blog.', 'editorial-calendar'))) ?>;
|
323 |
+
|
324 |
+
edcal.str_screenoptions = <?php echo($this->edcal_json_encode(__('Screen Options', 'editorial-calendar'))) ?>;
|
325 |
+
edcal.str_optionscolors = <?php echo($this->edcal_json_encode(__('Colors', 'editorial-calendar'))) ?>;
|
326 |
+
edcal.str_optionsdraftcolor = <?php echo($this->edcal_json_encode(__('Drafts: ', 'editorial-calendar'))) ?>;
|
327 |
+
edcal.str_apply = <?php echo($this->edcal_json_encode(__('Apply', 'editorial-calendar'))) ?>;
|
328 |
+
edcal.str_show_title = <?php echo($this->edcal_json_encode(__('Show on screen', 'editorial-calendar'))) ?>;
|
329 |
+
edcal.str_opt_weeks = <?php echo($this->edcal_json_encode(__(' weeks at a time', 'editorial-calendar'))) ?>;
|
330 |
+
edcal.str_show_opts = <?php echo($this->edcal_json_encode(__('Show in Calendar Cell', 'editorial-calendar'))) ?>;
|
331 |
+
edcal.str_show_wheel_opts = <?php echo($this->edcal_json_encode(__('Mouse Wheel', 'editorial-calendar'))) ?>;
|
332 |
+
edcal.str_opt_author = <?php echo($this->edcal_json_encode(__('Author', 'editorial-calendar'))) ?>;
|
333 |
+
edcal.str_opt_status = <?php echo($this->edcal_json_encode(__('Status', 'editorial-calendar'))) ?>;
|
334 |
+
edcal.str_opt_time = <?php echo($this->edcal_json_encode(__('Time of day', 'editorial-calendar'))) ?>;
|
335 |
+
edcal.str_opt_wheel = <?php echo($this->edcal_json_encode(__('Scroll the calendar with the mouse wheel', 'editorial-calendar'))) ?>;
|
336 |
+
edcal.str_fatal_error = <?php echo($this->edcal_json_encode(__('An error occurred while loading the calendar: ', 'editorial-calendar'))) ?>;
|
337 |
+
edcal.str_fatal_parse_error = <?php echo($this->edcal_json_encode(__('<br /><br />The calendar was not able to parse the data your blog returned about the posts. This error is most likely caused by a conflict with another plugin on your blog. The actual parse error was:<br/><br/> ', 'editorial-calendar'))) ?>;
|
338 |
+
|
339 |
+
edcal.str_weekserror = <?php echo($this->edcal_json_encode(__('The calendar can only show between 1 and 8 weeks at a time.', 'editorial-calendar'))) ?>;
|
340 |
+
edcal.str_weekstt = <?php echo($this->edcal_json_encode(__('Select the number of weeks for the calendar to show.', 'editorial-calendar'))) ?>;
|
341 |
+
|
342 |
+
edcal.str_showdrafts = <?php echo($this->edcal_json_encode(__('Show Unscheduled Drafts'))) ?>;
|
343 |
+
edcal.str_hidedrafts = <?php echo($this->edcal_json_encode(__('Hide Unscheduled Drafts'))) ?>;
|
344 |
+
|
345 |
+
edcal.str_feedbackmsg = <?php echo($this->edcal_json_encode(__('<div id="feedbacksection">' .
|
346 |
+
'<h2>Help us Make the Editorial Calendar Better</h2>' .
|
347 |
+
'We are always trying to improve the Editorial Calendar and you can help. May we collect some data about your blog and browser settings to help us improve this plugin? We\'ll only do it once and your blog will show up on our <a target="_blank" href="http://www.zackgrossbart.com/edcal/mint/">Editorial Calendar Statistics page</a>.<br /><br />' .
|
348 |
+
'<button class="button-secondary" onclick="edcal.doFeedback();">Collect Data</button> ' .
|
349 |
+
'<a href="#" id="nofeedbacklink" onclick="edcal.noFeedback(); return false;">No thank you</a></div>', 'editorial-calendar'))) ?>;
|
350 |
+
|
351 |
+
edcal.str_feedbackdone = <?php echo($this->edcal_json_encode(__('<h2>We\'re done</h2>We\'ve finished collecting data. Thank you for helping us make the calendar better.', 'editorial-calendar'))) ?>;
|
352 |
+
});
|
353 |
+
</script>
|
354 |
+
|
355 |
+
<?php
|
356 |
+
/*
|
357 |
+
* There are a few images we want to reference where we need the full path to the image
|
358 |
+
* since we don't want to make assumptions about the plugin file structure. We need to
|
359 |
+
* set those here since we need PHP to get the full path.
|
360 |
+
*/
|
361 |
+
?>
|
362 |
+
|
363 |
+
<style type="text/css">
|
364 |
+
.loadingclass > .postlink, .loadingclass:hover > .postlink, .tiploading {
|
365 |
+
background-image: url('<?php echo(admin_url("images/loading.gif", __FILE__ )); ?>');
|
366 |
+
}
|
367 |
+
|
368 |
+
#loading {
|
369 |
+
background-image: url('<?php echo(admin_url("images/loading.gif", __FILE__ )); ?>');
|
370 |
+
}
|
371 |
+
|
372 |
+
#tipclose {
|
373 |
+
background-image: url('<?php echo(plugins_url("images/tip_close.png", __FILE__ )); ?>');
|
374 |
+
}
|
375 |
+
|
376 |
+
</style>
|
377 |
+
|
378 |
+
<?php
|
379 |
+
echo '<!-- This is the code from edcal.js -->';
|
380 |
+
echo '<script type="text/javascript">';
|
381 |
+
if (isset($_GET['debug'])) {
|
382 |
+
$this->edcal_echoFile(dirname( __FILE__ ) . "/edcal.js");
|
383 |
+
} else {
|
384 |
+
$this->edcal_echoFile(dirname( __FILE__ ) . "/edcal.min.js");
|
385 |
+
}
|
386 |
+
echo '</script>';
|
387 |
+
|
388 |
+
?>
|
389 |
+
|
390 |
+
<div class="wrap">
|
391 |
+
<div class="icon32" id="icon-edit"><br/></div>
|
392 |
+
<h2 id="edcal_main_title"><?php echo sprintf( __('%1$s Calendar', 'editorial-calendar'), $this->edcal_get_posttype_multiplename() ) ?></h2>
|
393 |
+
|
394 |
+
<div id="loadingcont">
|
395 |
+
<div id="loading"> </div>
|
396 |
+
</div>
|
397 |
+
|
398 |
+
<div id="topbar" class="tablenav clearfix">
|
399 |
+
<div id="topleft" class="tablenav-pages alignleft">
|
400 |
+
<h3>
|
401 |
+
<a href="#" title="<?php echo(__('Jump back', 'editorial-calendar')) ?>" class="prev page-numbers" id="prevmonth">‹</a>
|
402 |
+
<span id="currentRange"></span>
|
403 |
+
<a href="#" title="<?php echo(__('Skip ahead', 'editorial-calendar')) ?>" class="next page-numbers" id="nextmonth">›</a>
|
404 |
+
<a class="next page-numbers" title="<?php echo(__('Scroll the calendar and make the last post visible', 'editorial-calendar')) ?>" id="moveToLast">»</a>
|
405 |
+
|
406 |
+
<a class="next page-numbers" title="<?php echo(__('Scroll the calendar and make the today visible', 'editorial-calendar')) ?>" id="moveToToday"><?php echo(__('Show Today', 'editorial-calendar')) ?></a>
|
407 |
+
|
408 |
+
|
409 |
+
</h3>
|
410 |
+
</div>
|
411 |
+
|
412 |
+
<div id="topright" class="tablenav-pages alignright">
|
413 |
+
<a class="next page-numbers" title="<?php echo(__('Show unscheduled posts', 'editorial-calendar')) ?>" id="showdraftsdrawer"><?php echo(__('Show Unscheduled Drafts', 'editorial-calendar')) ?></a>
|
414 |
+
</div>
|
415 |
+
</div>
|
416 |
+
|
417 |
+
<div id="draftsdrawer_cont">
|
418 |
+
<div id="draftsdrawer">
|
419 |
+
<div class="draftsdrawerheadcont" title="<?php echo(__('Unscheduled draft posts', 'editorial-calendar')) ?>"><div class="dayhead"><?php echo(__('Unscheduled', 'editorial-calendar')) ?></div></div>
|
420 |
+
<div class="day" id="00000000">
|
421 |
+
<div id="draftsdrawer_loading"></div>
|
422 |
+
<div id="unscheduled" class="dayobj"></div>
|
423 |
+
</div>
|
424 |
+
</div>
|
425 |
+
</div>
|
426 |
+
|
427 |
+
<div id="cal_cont">
|
428 |
+
<div id="edcal_scrollable" class="edcal_scrollable vertical">
|
429 |
+
<div id="cal"></div>
|
430 |
+
</div>
|
431 |
+
</div>
|
432 |
+
|
433 |
+
<?php $this->edcal_edit_popup(); ?>
|
434 |
+
|
435 |
+
</div><?php // end .wrap ?>
|
436 |
+
|
437 |
+
<?php
|
438 |
+
}
|
439 |
+
|
440 |
+
/*
|
441 |
+
* Generate the DOM elements for the quick edit popup from
|
442 |
+
* within the calendar.
|
443 |
+
*/
|
444 |
+
function edcal_edit_popup() {
|
445 |
+
|
446 |
+
?>
|
447 |
+
<div id="edcal_quickedit" style="display:none;">
|
448 |
+
<div id="tooltiphead">
|
449 |
+
<h3 id="tooltiptitle"><?php _e('Edit Post', 'editorial-calendar') ?></h3>
|
450 |
+
<a href="#" id="tipclose" onclick="edcal.hideForm(); return false;" title="close"> </a>
|
451 |
+
</div>
|
452 |
+
|
453 |
+
<div class="edcal_quickedit inline-edit-row">
|
454 |
+
|
455 |
+
<fieldset>
|
456 |
+
|
457 |
+
<label>
|
458 |
+
<span class="title"><?php _e('Title', 'editorial-calendar') ?></span>
|
459 |
+
<span class="input-text-wrap"><input type="text" class="ptitle" id="edcal-title-new-field" name="title" /></span>
|
460 |
+
</label>
|
461 |
+
|
462 |
+
<label>
|
463 |
+
<span class="title"><?php _e('Content', 'editorial-calendar') ?></span>
|
464 |
+
<span class="input-text-wrap"><textarea cols="15" rows="7" id="content" name="content"></textarea></span>
|
465 |
+
</label>
|
466 |
+
|
467 |
+
<div id="timeEditControls">
|
468 |
+
<label>
|
469 |
+
<span class="title"><?php _e('Time', 'editorial-calendar') ?></span>
|
470 |
+
<span class="input-text-wrap"><input type="text" class="ptitle" id="edcal-time" name="time" value="" size="8" maxlength="8" autocomplete="off" /></span>
|
471 |
+
</label>
|
472 |
+
|
473 |
+
<label>
|
474 |
+
<span class="title"><?php _e('Status', 'editorial-calendar') ?></span>
|
475 |
+
<span class="input-text-wrap">
|
476 |
+
<select name="status" id="edcal-status">
|
477 |
+
<option value="draft"><?php _e('Draft', 'editorial-calendar') ?></option>
|
478 |
+
<option value="pending"><?php _e('Pending Review', 'editorial-calendar') ?></option>
|
479 |
+
<?php if ( current_user_can('publish_posts') ) {?>
|
480 |
+
<option id="futureoption" value="future"><?php _e('Scheduled', 'editorial-calendar') ?></option>
|
481 |
+
<?php } ?>
|
482 |
+
</select>
|
483 |
+
</span>
|
484 |
+
</label>
|
485 |
+
</div>
|
486 |
+
|
487 |
+
<?php /* <label>
|
488 |
+
<span class="title"><?php _e('Author', 'editorial-calendar') ?></span>
|
489 |
+
<span id="edcal-author-p"><!-- Placeholder for the author's name, added dynamically --></span>
|
490 |
+
</label>
|
491 |
+
*/ ?>
|
492 |
+
</fieldset>
|
493 |
+
|
494 |
+
<p class="submit inline-edit-save" id="edit-slug-buttons">
|
495 |
+
<a class="button-primary disabled" id="newPostScheduleButton" href="#"><?php _e('Schedule', 'editorial-calendar') ?></a>
|
496 |
+
<a href="#" onclick="edcal.hideForm(); return false;" class="button-secondary cancel"><?php _e('Cancel', 'editorial-calendar') ?></a>
|
497 |
+
</p>
|
498 |
+
|
499 |
+
<input type="hidden" id="edcal-date" name="date" value="" />
|
500 |
+
<input type="hidden" id="edcal-id" name="id" value="" />
|
501 |
+
|
502 |
+
</div><?php // end .tooltip ?>
|
503 |
+
</div><?php // end #tooltip
|
504 |
+
}
|
505 |
+
|
506 |
+
/*
|
507 |
+
* When we get a set of posts to populate the calendar we don't want
|
508 |
+
* to get all of the posts. This filter allows us to specify the dates
|
509 |
+
* we want. We also exclude posts that have not been set to a specific date.
|
510 |
+
*/
|
511 |
+
function edcal_filter_where($where = '') {
|
512 |
+
global $edcal_startDate, $edcal_endDate;
|
513 |
+
if ($edcal_startDate == '00000000') {
|
514 |
+
$where .= " AND post_date_gmt LIKE '0000%'";
|
515 |
+
} else {
|
516 |
+
/*
|
517 |
+
* The start date and end date come from the client and we want to make
|
518 |
+
* sure there's no SQL injection attack here. We know these values must
|
519 |
+
* be dates in a format like 2013-02-03. Date parsing is complex and PHP
|
520 |
+
* dates allow a lot of different formats. The simplest way to make sure
|
521 |
+
* this isn't a SQL injection attack is to remove the dashes and check if
|
522 |
+
* the result is numeric. If it is then this can't be a SQL injection attack.
|
523 |
+
*/
|
524 |
+
if (!is_numeric(str_replace("-", "", $edcal_startDate)) || !is_numeric(str_replace("-", "", $edcal_endDate))) {
|
525 |
+
die("The specified start date and end date for the posts query must be numeric.");
|
526 |
+
}
|
527 |
+
|
528 |
+
$where .= " AND post_date >= '" . $edcal_startDate . "' AND post_date < '" . $edcal_endDate . "' AND post_date_gmt NOT LIKE '0000%'";
|
529 |
+
}
|
530 |
+
return $where;
|
531 |
+
}
|
532 |
+
|
533 |
+
/*
|
534 |
+
* This function adds all of the JavaScript files we need.
|
535 |
+
*
|
536 |
+
*/
|
537 |
+
function edcal_scripts() {
|
538 |
+
/*
|
539 |
+
* To get proper localization for dates we need to include the correct JavaScript file for the current
|
540 |
+
* locale. We can do this based on the locale in the localized bundle to make sure the date locale matches
|
541 |
+
* the locale for the other strings.
|
542 |
+
*/
|
543 |
+
wp_enqueue_script('jquery');
|
544 |
+
wp_enqueue_script('jquery-ui-draggable');
|
545 |
+
wp_enqueue_script('jquery-ui-droppable');
|
546 |
+
|
547 |
+
//wp_enqueue_script("date-extras", plugins_url("lib/date.extras.js", __FILE__ ), array( 'jquery' ));
|
548 |
+
|
549 |
+
wp_enqueue_script("edcal-date", plugins_url("lib/languages/date-".__('en-US', 'editorial-calendar').".js", __FILE__ ));
|
550 |
+
wp_enqueue_script("edcal-lib", plugins_url("lib/edcallib.min.js", __FILE__ ), array( 'jquery' ));
|
551 |
+
|
552 |
+
if (isset($_GET['qunit'])) {
|
553 |
+
wp_enqueue_script("qunit", plugins_url("lib/qunit.js", __FILE__ ), array( 'jquery' ));
|
554 |
+
wp_enqueue_script("edcal-test", plugins_url("edcal_test.js", __FILE__ ), array( 'jquery' ));
|
555 |
+
}
|
556 |
+
|
557 |
+
return;
|
558 |
+
|
559 |
+
/*
|
560 |
+
* If you're using one of the specific libraries you should comment out the two lines
|
561 |
+
* above this comment.
|
562 |
+
*/
|
563 |
+
wp_enqueue_script("bgiframe", plugins_url("lib/jquery.bgiframe.js", __FILE__ ), array( 'jquery' ));
|
564 |
+
wp_enqueue_script("humanMsg", plugins_url("lib/humanmsg.js", __FILE__ ), array( 'jquery' ));
|
565 |
+
wp_enqueue_script("jquery-timepicker", plugins_url("lib/jquery.timepicker.js", __FILE__ ), array( 'jquery' ));
|
566 |
+
|
567 |
+
wp_enqueue_script("scrollable", plugins_url("lib/tools.scrollable-1.1.2.js", __FILE__ ), array( 'jquery' ));
|
568 |
+
wp_enqueue_script("mouse-wheel", plugins_url("lib/lib/tools.scrollable.mousewheel-1.0.1.js", __FILE__ ), array( 'jquery' ));
|
569 |
+
|
570 |
+
wp_enqueue_script("json-parse2", plugins_url("lib/json2.js", __FILE__ ), array( 'jquery' ));
|
571 |
+
}
|
572 |
+
|
573 |
+
/*
|
574 |
+
* This is an AJAX call that gets the posts between the from date
|
575 |
+
* and the to date.
|
576 |
+
*/
|
577 |
+
function edcal_posts() {
|
578 |
+
header("Content-Type: application/json");
|
579 |
+
$this->edcal_addNoCacheHeaders();
|
580 |
+
if (!$this->edcal_checknonce()) {
|
581 |
+
die();
|
582 |
+
}
|
583 |
+
|
584 |
+
global $edcal_startDate, $edcal_endDate;
|
585 |
+
|
586 |
+
$edcal_startDate = isset($_GET['from']) ? $_GET['from'] : null;
|
587 |
+
$edcal_endDate = isset($_GET['to']) ? $_GET['to'] : null;
|
588 |
+
global $post;
|
589 |
+
$args = array(
|
590 |
+
'posts_per_page' => -1,
|
591 |
+
'post_status' => "publish&future&draft",
|
592 |
+
'post_parent' => null // any parent
|
593 |
+
);
|
594 |
+
|
595 |
+
/*
|
596 |
+
* If we're in the specific post type case we need to add
|
597 |
+
* the post type to our query.
|
598 |
+
*/
|
599 |
+
$post_type = isset($_GET['post_type'])?$_GET['post_type']:null;
|
600 |
+
if ($post_type) {
|
601 |
+
$args['post_type'] = $post_type;
|
602 |
+
}
|
603 |
+
|
604 |
+
/*
|
605 |
+
* If we're getting the list of posts for the drafts drawer we
|
606 |
+
* want to sort them by the post title.
|
607 |
+
*/
|
608 |
+
if ($edcal_startDate == '00000000') {
|
609 |
+
$args['orderby'] = 'title';
|
610 |
+
}
|
611 |
+
|
612 |
+
/*
|
613 |
+
* We add a WHERE clause to filter by calendar date and/or by whether
|
614 |
+
* or not the posts have been scheduled to a specific date:
|
615 |
+
* WHERE `post_date_gmt` = '0000-00-00 00:00:00'
|
616 |
+
*/
|
617 |
+
add_filter( 'posts_where', array(&$this, 'edcal_filter_where' ));
|
618 |
+
$myposts = query_posts($args);
|
619 |
+
remove_filter( 'posts_where', array(&$this, 'edcal_filter_where' ));
|
620 |
+
|
621 |
+
?>[
|
622 |
+
<?php
|
623 |
+
$size = sizeof($myposts);
|
624 |
+
|
625 |
+
for($i = 0; $i < $size; $i++) {
|
626 |
+
$post = $myposts[$i];
|
627 |
+
$this->edcal_postJSON($post, $i < $size - 1);
|
628 |
+
}
|
629 |
+
|
630 |
+
?> ]
|
631 |
+
<?php
|
632 |
+
|
633 |
+
die();
|
634 |
+
}
|
635 |
+
|
636 |
+
/*
|
637 |
+
* This filter specifies a special WHERE clause so we just get the posts we're
|
638 |
+
* interested in for the last post.
|
639 |
+
*/
|
640 |
+
function edcal_lastpost_filter_where($where = '') {
|
641 |
+
$where .= " AND (`post_status` = 'draft' OR `post_status` = 'publish' OR `post_status` = 'future')";
|
642 |
+
return $where;
|
643 |
+
}
|
644 |
+
|
645 |
+
/*
|
646 |
+
* Get information about the last post (the one furthest in the future) and make
|
647 |
+
* that information available to the JavaScript code so it can make the last post
|
648 |
+
* button work.
|
649 |
+
*/
|
650 |
+
function edcal_getLastPost() {
|
651 |
+
$args = array(
|
652 |
+
'posts_per_page' => 1,
|
653 |
+
'post_parent' => null,
|
654 |
+
'order' => 'DESC'
|
655 |
+
);
|
656 |
+
|
657 |
+
add_filter( 'posts_where', array(&$this, 'edcal_lastpost_filter_where' ));
|
658 |
+
$myposts = query_posts($args);
|
659 |
+
remove_filter( 'posts_where', array(&$this, 'edcal_lastpost_filter_where' ));
|
660 |
+
|
661 |
+
if (sizeof($myposts) > 0) {
|
662 |
+
$post = $myposts[0];
|
663 |
+
setup_postdata($post);
|
664 |
+
?>
|
665 |
+
edcal.lastPostDate = '<?php echo(date('dmY',strtotime($post->post_date))); ?>';
|
666 |
+
edcal.lastPostId = '<?php echo($post->ID); ?>';
|
667 |
+
<?php
|
668 |
+
} else {
|
669 |
+
?>
|
670 |
+
edcal.lastPostDate = '-1';
|
671 |
+
edcal.lastPostId = '-1';
|
672 |
+
<?php
|
673 |
+
}
|
674 |
+
}
|
675 |
+
|
676 |
+
/*
|
677 |
+
* This is for an AJAX call that returns a post with the specified ID
|
678 |
+
*/
|
679 |
+
function edcal_getpost() {
|
680 |
+
|
681 |
+
header("Content-Type: application/json");
|
682 |
+
$this->edcal_addNoCacheHeaders();
|
683 |
+
|
684 |
+
// If nonce fails, return
|
685 |
+
if (!$this->edcal_checknonce()) {
|
686 |
+
die();
|
687 |
+
}
|
688 |
+
|
689 |
+
$post_id = isset($_GET['postid'])?intval($_GET['postid']):-1;
|
690 |
+
|
691 |
+
// If a proper post_id wasn't passed, return
|
692 |
+
if(!$post_id) die();
|
693 |
+
|
694 |
+
$args = array(
|
695 |
+
'post__in' => array($post_id)
|
696 |
+
);
|
697 |
+
|
698 |
+
/*
|
699 |
+
* If we're in the specific post type case we need to add
|
700 |
+
* the post type to our query.
|
701 |
+
*/
|
702 |
+
$post_type = isset($_GET['post_type'])?$_GET['post_type']:null;
|
703 |
+
if ($post_type) {
|
704 |
+
$args['post_type'] = $post_type;
|
705 |
+
}
|
706 |
+
|
707 |
+
$post = query_posts($args);
|
708 |
+
|
709 |
+
// get_post and setup_postdata don't get along, so we're doing a mini-loop
|
710 |
+
if(have_posts()) :
|
711 |
+
while(have_posts()) : the_post();
|
712 |
+
?>
|
713 |
+
{
|
714 |
+
"post" :
|
715 |
+
<?php
|
716 |
+
$this->edcal_postJSON($post[0], false, true);
|
717 |
+
?>
|
718 |
+
}
|
719 |
+
<?php
|
720 |
+
endwhile;
|
721 |
+
endif;
|
722 |
+
die();
|
723 |
+
}
|
724 |
+
|
725 |
+
/*
|
726 |
+
* Wrap php's json_encode() for a WP-specific apostrophe bug
|
727 |
+
*/
|
728 |
+
function edcal_json_encode($string) {
|
729 |
+
/*
|
730 |
+
* WordPress escapes apostrophe's when they show up in post titles as '
|
731 |
+
* This is the HTML ASCII code for a straight apostrophe. This works well
|
732 |
+
* with Firefox, but IE complains with a very unhelpful error message. We
|
733 |
+
* can replace them with a right curly apostrophe since that works in IE
|
734 |
+
* and Firefox. It is also a little nicer typographically.
|
735 |
+
*
|
736 |
+
*/
|
737 |
+
return json_encode(str_replace("'", "’", $string));
|
738 |
+
}
|
739 |
+
|
740 |
+
/*
|
741 |
+
* This helper functions gets the plural name of the post
|
742 |
+
* type specified by the post_type parameter.
|
743 |
+
*/
|
744 |
+
function edcal_get_posttype_multiplename() {
|
745 |
+
|
746 |
+
$post_type = isset($_GET['post_type'])?$_GET['post_type']:null;
|
747 |
+
if (!$post_type) {
|
748 |
+
return __('Posts ', 'editorial-calendar');
|
749 |
+
}
|
750 |
+
|
751 |
+
$postTypeObj = get_post_type_object($post_type);
|
752 |
+
return $postTypeObj->labels->name;
|
753 |
+
}
|
754 |
+
|
755 |
+
/*
|
756 |
+
* This helper functions gets the singular name of the post
|
757 |
+
* type specified by the post_type parameter.
|
758 |
+
*/
|
759 |
+
|
760 |
+
function edcal_get_posttype_singlename() {
|
761 |
+
|
762 |
+
$post_type = isset($_GET['post_type'])?$_GET['post_type']:null;
|
763 |
+
if (!$post_type) {
|
764 |
+
return __('Post ', 'editorial-calendar');
|
765 |
+
}
|
766 |
+
|
767 |
+
$postTypeObj = get_post_type_object($post_type);
|
768 |
+
return $postTypeObj->labels->singular_name;
|
769 |
+
}
|
770 |
+
|
771 |
+
/*
|
772 |
+
* This function sets up the post data and prints out the values we
|
773 |
+
* care about in a JSON data structure. This prints out just the
|
774 |
+
* value part. If $fullPost is set to true, post_content is also returned.
|
775 |
+
*/
|
776 |
+
function edcal_postJSON($post, $addComma = true, $fullPost = false) {
|
777 |
+
$timeFormat = get_option("time_format");
|
778 |
+
if ($timeFormat == "g:i a") {
|
779 |
+
$timeFormat = "ga";
|
780 |
+
} else if ($timeFormat == "g:i A") {
|
781 |
+
$timeFormat = "gA";
|
782 |
+
} else if ($timeFormat == "H:i") {
|
783 |
+
$timeFormat = "H";
|
784 |
+
}
|
785 |
+
|
786 |
+
setup_postdata($post);
|
787 |
+
|
788 |
+
if (get_post_status() == 'auto-draft' || get_post_status() == 'inherit' || get_post_status() == 'trash' ) {
|
789 |
+
/*
|
790 |
+
* WordPress 3 added a new post status of auto-draft so
|
791 |
+
* we want to hide them from the calendar.
|
792 |
+
* We also want to hide posts with type 'inherit'
|
793 |
+
*/
|
794 |
+
return;
|
795 |
+
}
|
796 |
+
|
797 |
+
/*
|
798 |
+
* We want to return the type of each post as part of the
|
799 |
+
* JSON data about that post. Right now this will always
|
800 |
+
* match the post_type parameter for the calendar, but in
|
801 |
+
* the future we might support a mixed post type calendar
|
802 |
+
* and this extra data will become useful. Right now we
|
803 |
+
* are using this data for the title on the quick edit form.
|
804 |
+
*/
|
805 |
+
if( $this->supports_custom_types ) {
|
806 |
+
$postTypeObj = get_post_type_object(get_post_type( $post ));
|
807 |
+
$postTypeTitle = $postTypeObj->labels->singular_name;
|
808 |
+
} else {
|
809 |
+
$postTypeTitle = 'post';
|
810 |
+
}
|
811 |
+
|
812 |
+
$post_date_gmt = date('dmY',strtotime($post->post_date_gmt));
|
813 |
+
if ($post_date_gmt == '01011970') {
|
814 |
+
$post_date_gmt = '00000000';
|
815 |
+
}
|
816 |
+
|
817 |
+
/*
|
818 |
+
* The date function in PHP isn't consistent in the way it handles
|
819 |
+
* formatting dates that are all zeros. In that case we can manually
|
820 |
+
* format the all zeros date so it shows up properly.
|
821 |
+
*/
|
822 |
+
if ($post->post_date_gmt == '0000-00-00 00:00:00') {
|
823 |
+
$post_date_gmt = '00000000';
|
824 |
+
}
|
825 |
+
|
826 |
+
$slugs = '';
|
827 |
+
foreach(get_the_category() as $category) {
|
828 |
+
$slugs .= $category->slug . ' ';
|
829 |
+
}
|
830 |
+
|
831 |
+
?>
|
832 |
+
{
|
833 |
+
"date" : "<?php the_time('d') ?><?php the_time('m') ?><?php the_time('Y') ?>",
|
834 |
+
"date_gmt" : "<?php echo $post_date_gmt; ?>",
|
835 |
+
"time" : "<?php echo trim(get_the_time()) ?>",
|
836 |
+
"formattedtime" : "<?php $this->edcal_json_encode(the_time($timeFormat)) ?>",
|
837 |
+
"sticky" : "<?php echo is_sticky($post->ID) ?>",
|
838 |
+
"url" : "<?php $this->edcal_json_encode(the_permalink()) ?>",
|
839 |
+
"status" : "<?php echo get_post_status() ?>",
|
840 |
+
"orig_status" : "<?php echo get_post_status() ?>",
|
841 |
+
"title" : <?php echo $this->edcal_json_encode(isset( $post->post_title ) ? $post->post_title : '') ?>,
|
842 |
+
"author" : <?php echo $this->edcal_json_encode(get_the_author()) ?>,
|
843 |
+
"type" : "<?php echo get_post_type( $post ) ?>",
|
844 |
+
"typeTitle" : "<?php echo $postTypeTitle ?>",
|
845 |
+
"slugs" : <?php echo $this->edcal_json_encode($slugs) ?>,
|
846 |
+
|
847 |
+
<?php if ( current_user_can('edit_post', $post->ID) ) {?>
|
848 |
+
"editlink" : "<?php echo get_edit_post_link($post->ID) ?>",
|
849 |
+
<?php } ?>
|
850 |
+
|
851 |
+
<?php if ( current_user_can('delete_post', $post->ID) ) {?>
|
852 |
+
"dellink" : "javascript:edcal.deletePost(<?php echo $post->ID ?>)",
|
853 |
+
<?php } ?>
|
854 |
+
|
855 |
+
"permalink" : "<?php echo get_permalink($post->ID) ?>",
|
856 |
+
"id" : "<?php the_ID(); ?>"
|
857 |
+
|
858 |
+
<?php if($fullPost) : ?>
|
859 |
+
, "content" : <?php echo $this->edcal_json_encode($post->post_content) ?>
|
860 |
+
|
861 |
+
<?php endif; ?>
|
862 |
+
}
|
863 |
+
<?php
|
864 |
+
if ($addComma) {
|
865 |
+
?>,<?php
|
866 |
+
}
|
867 |
+
}
|
868 |
+
|
869 |
+
/*
|
870 |
+
* This is a helper AJAX function to delete a post. It gets called
|
871 |
+
* when a user clicks the delete button, and allows the user to
|
872 |
+
* retain their position within the calendar without a page refresh.
|
873 |
+
* It is not called unless the user has permission to delete the post.
|
874 |
+
*/
|
875 |
+
function edcal_deletepost() {
|
876 |
+
if (!$this->edcal_checknonce()) {
|
877 |
+
die();
|
878 |
+
}
|
879 |
+
|
880 |
+
header("Content-Type: application/json");
|
881 |
+
$this->edcal_addNoCacheHeaders();
|
882 |
+
|
883 |
+
$edcal_postid = isset($_GET['postid'])?$_GET['postid']:null;
|
884 |
+
|
885 |
+
if (!current_user_can('delete_post', $edcal_postid)) {
|
886 |
+
die("You don't have permission to delete this post");
|
887 |
+
}
|
888 |
+
|
889 |
+
$post = get_post($edcal_postid, ARRAY_A);
|
890 |
+
$title = $post['post_title'];
|
891 |
+
$date = date('dmY', strtotime($post['post_date'])); // [TODO] : is there a better way to generate the date string ... ??
|
892 |
+
$date_gmt = date('dmY',strtotime($post['post_date_gmt']));
|
893 |
+
if ($date_gmt == '01011970') {
|
894 |
+
$date_gmt = '00000000';
|
895 |
+
}
|
896 |
+
|
897 |
+
$force = !EMPTY_TRASH_DAYS; // wordpress 2.9 thing. deleted post hangs around (ie in a recycle bin) after deleted for this # of days
|
898 |
+
if ( isset($post->post_type) && ($post->post_type == 'attachment' )) {
|
899 |
+
$force = ( $force || !MEDIA_TRASH );
|
900 |
+
if ( ! wp_delete_attachment($edcal_postid, $force) )
|
901 |
+
wp_die( __('Error in deleting...') );
|
902 |
+
} else {
|
903 |
+
if ( !wp_delete_post($edcal_postid, $force) )
|
904 |
+
wp_die( __('Error in deleting...') );
|
905 |
+
}
|
906 |
+
|
907 |
+
// return the following info so that jQuery can then remove post from edcal display :
|
908 |
+
?>
|
909 |
+
{
|
910 |
+
"post" :
|
911 |
+
{
|
912 |
+
"date" : "<?php echo $date ?>",
|
913 |
+
"title" : "<?php echo $title ?>",
|
914 |
+
"id" : "<?php echo $edcal_postid ?>",
|
915 |
+
"date_gmt" : "<?php echo $date_gmt; ?>"
|
916 |
+
}
|
917 |
+
}
|
918 |
+
<?php
|
919 |
+
|
920 |
+
die();
|
921 |
+
}
|
922 |
+
|
923 |
+
/*
|
924 |
+
* This is a helper AJAX function to change the title of a post. It
|
925 |
+
* gets called from the save button in the tooltip when you change a
|
926 |
+
* post title in a calendar.
|
927 |
+
*/
|
928 |
+
function edcal_changetitle() {
|
929 |
+
if (!$this->edcal_checknonce()) {
|
930 |
+
die();
|
931 |
+
}
|
932 |
+
|
933 |
+
header("Content-Type: application/json");
|
934 |
+
$this->edcal_addNoCacheHeaders();
|
935 |
+
|
936 |
+
$edcal_postid = isset($_GET['postid'])?$_GET['postid']:null;
|
937 |
+
$edcal_newTitle = isset($_GET['title'])?$_GET['title']:null;
|
938 |
+
|
939 |
+
$post = get_post($edcal_postid, ARRAY_A);
|
940 |
+
setup_postdata($post);
|
941 |
+
|
942 |
+
$post['post_title'] = wp_strip_all_tags($edcal_newTitle);
|
943 |
+
|
944 |
+
/*
|
945 |
+
* Now we finally update the post into the database
|
946 |
+
*/
|
947 |
+
wp_update_post( $post );
|
948 |
+
|
949 |
+
/*
|
950 |
+
* We finish by returning the latest data for the post in the JSON
|
951 |
+
*/
|
952 |
+
global $post;
|
953 |
+
$args = array(
|
954 |
+
'posts_id' => $edcal_postid,
|
955 |
+
);
|
956 |
+
|
957 |
+
$post = get_post($edcal_postid);
|
958 |
+
|
959 |
+
?>{
|
960 |
+
"post" :
|
961 |
+
<?php
|
962 |
+
|
963 |
+
$this->edcal_postJSON($post);
|
964 |
+
|
965 |
+
?>
|
966 |
+
}
|
967 |
+
<?php
|
968 |
+
|
969 |
+
|
970 |
+
die();
|
971 |
+
}
|
972 |
+
|
973 |
+
/*
|
974 |
+
* This is a helper function to create a new blank draft
|
975 |
+
* post on a specified date.
|
976 |
+
*/
|
977 |
+
function edcal_newdraft() {
|
978 |
+
if (!$this->edcal_checknonce()) {
|
979 |
+
die();
|
980 |
+
}
|
981 |
+
|
982 |
+
header("Content-Type: application/json");
|
983 |
+
$this->edcal_addNoCacheHeaders();
|
984 |
+
|
985 |
+
$edcal_date = isset($_POST["date"])?$_POST["date"]:null;
|
986 |
+
|
987 |
+
$my_post = array();
|
988 |
+
$my_post['post_title'] = isset($_POST["title"])?wp_strip_all_tags($_POST["title"]):null;
|
989 |
+
$my_post['post_content'] = isset($_POST["content"])?$_POST["content"]:null;
|
990 |
+
$my_post['post_status'] = 'draft';
|
991 |
+
|
992 |
+
$my_post['post_date'] = $edcal_date;
|
993 |
+
$my_post['post_date_gmt'] = get_gmt_from_date($edcal_date);
|
994 |
+
$my_post['post_modified'] = $edcal_date;
|
995 |
+
$my_post['post_modified_gmt'] = get_gmt_from_date($edcal_date);
|
996 |
+
|
997 |
+
// Insert the post into the database
|
998 |
+
$my_post_id = wp_insert_post( $my_post );
|
999 |
+
|
1000 |
+
/*
|
1001 |
+
* We finish by returning the latest data for the post in the JSON
|
1002 |
+
*/
|
1003 |
+
global $post;
|
1004 |
+
$post = get_post($my_post_id);
|
1005 |
+
|
1006 |
+
?>{
|
1007 |
+
"post" :
|
1008 |
+
<?php
|
1009 |
+
|
1010 |
+
$this->edcal_postJSON($post, false);
|
1011 |
+
|
1012 |
+
?>
|
1013 |
+
}
|
1014 |
+
<?php
|
1015 |
+
|
1016 |
+
die();
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
/*
|
1020 |
+
* This is a helper function to create a new draft post on a specified date
|
1021 |
+
* or update an existing post.
|
1022 |
+
*/
|
1023 |
+
function edcal_savepost() {
|
1024 |
+
|
1025 |
+
if (!$this->edcal_checknonce()) {
|
1026 |
+
die();
|
1027 |
+
}
|
1028 |
+
|
1029 |
+
// Most blogs have warnings turned off by default, but if they're
|
1030 |
+
// turned on the warnings can cause errors in the JSON data when
|
1031 |
+
// we change the post status so we set the warning level to hide
|
1032 |
+
// warnings and then reset it at the end of this function.
|
1033 |
+
$my_error_level = error_reporting();
|
1034 |
+
error_reporting(E_ERROR);
|
1035 |
+
|
1036 |
+
header("Content-Type: application/json");
|
1037 |
+
$this->edcal_addNoCacheHeaders();
|
1038 |
+
|
1039 |
+
$edcal_date = isset($_POST["date"])?$_POST["date"]:null;
|
1040 |
+
$edcal_date_gmt = isset($_POST["date_gmt"])?$_POST["date_gmt"]:get_gmt_from_date($edcal_date);
|
1041 |
+
|
1042 |
+
$my_post = array();
|
1043 |
+
|
1044 |
+
// If the post id is not specified, we're creating a new post
|
1045 |
+
if($_POST['id'] && intval($_POST['id']) > 0) {
|
1046 |
+
$my_post['ID'] = intval($_POST['id']);
|
1047 |
+
} else {
|
1048 |
+
// We have a new post
|
1049 |
+
//$my_post['ID'] = 0; // and the post ID to 0
|
1050 |
+
|
1051 |
+
// Set the status to draft unless the user otherwise specifies
|
1052 |
+
if ($_POST['status']) {
|
1053 |
+
$my_post['post_status'] = $_POST['status'];
|
1054 |
+
} else {
|
1055 |
+
$my_post['post_status'] = 'draft';
|
1056 |
+
}
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
$my_post['post_title'] = isset($_POST["title"])?wp_strip_all_tags($_POST["title"]):null;
|
1060 |
+
$my_post['post_content'] = isset($_POST["content"])?$_POST["content"]:null;
|
1061 |
+
|
1062 |
+
if ($edcal_date_gmt != '0000-00-00 00:00:00') {
|
1063 |
+
/*
|
1064 |
+
* We don't want to set a date if this a new post in the drafts
|
1065 |
+
* drawer since WordPress 3.5 will reject new posts with a 0000
|
1066 |
+
* GMT date.
|
1067 |
+
*/
|
1068 |
+
$my_post['post_date'] = $edcal_date;
|
1069 |
+
$my_post['post_date_gmt'] = $edcal_date_gmt;
|
1070 |
+
$my_post['post_modified'] = $edcal_date;
|
1071 |
+
$my_post['post_modified_gmt'] = $edcal_date_gmt;
|
1072 |
+
}
|
1073 |
+
|
1074 |
+
$my_post['post_status'] = $_POST['status'];
|
1075 |
+
|
1076 |
+
/*
|
1077 |
+
* When we create a new post we need to specify the post type
|
1078 |
+
* passed in from the JavaScript.
|
1079 |
+
*/
|
1080 |
+
$post_type = isset($_POST["post_type"])?$_POST["post_type"]:null;
|
1081 |
+
if ($post_type) {
|
1082 |
+
$my_post['post_type'] = $post_type;
|
1083 |
+
}
|
1084 |
+
|
1085 |
+
// If we are updating a post
|
1086 |
+
if($_POST['id']) {
|
1087 |
+
if ($_POST['status'] != $_POST['orig_status']) {
|
1088 |
+
wp_transition_post_status($_POST['status'], $_POST['orig_status'], $my_post);
|
1089 |
+
$my_post['post_status'] = $_POST['status'];
|
1090 |
+
}
|
1091 |
+
$my_post_id = wp_update_post($my_post);
|
1092 |
+
} else {
|
1093 |
+
// We have a new post, insert the post into the database
|
1094 |
+
$my_post_id = wp_insert_post($my_post, true);
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
// TODO: throw error if update/insert or getsinglepost fails
|
1098 |
+
/*
|
1099 |
+
* We finish by returning the latest data for the post in the JSON
|
1100 |
+
*/
|
1101 |
+
$args = array(
|
1102 |
+
'post__in' => array($my_post_id)
|
1103 |
+
);
|
1104 |
+
|
1105 |
+
if ($post_type) {
|
1106 |
+
$args['post_type'] = $post_type;
|
1107 |
+
}
|
1108 |
+
$post = query_posts($args);
|
1109 |
+
|
1110 |
+
// get_post and setup_postdata don't get along, so we're doing a mini-loop
|
1111 |
+
if(have_posts()) :
|
1112 |
+
while(have_posts()) : the_post();
|
1113 |
+
?>
|
1114 |
+
{
|
1115 |
+
"post" :
|
1116 |
+
<?php
|
1117 |
+
$this->edcal_postJSON($post[0], false);
|
1118 |
+
?>
|
1119 |
+
}
|
1120 |
+
<?php
|
1121 |
+
endwhile;
|
1122 |
+
endif;
|
1123 |
+
|
1124 |
+
error_reporting($my_error_level);
|
1125 |
+
|
1126 |
+
die();
|
1127 |
+
}
|
1128 |
+
|
1129 |
+
/*
|
1130 |
+
* This function checks the nonce for the URL. It returns
|
1131 |
+
* true if the nonce checks out and outputs a JSON error
|
1132 |
+
* and returns false otherwise.
|
1133 |
+
*/
|
1134 |
+
function edcal_checknonce() {
|
1135 |
+
header("Content-Type: application/json");
|
1136 |
+
$this->edcal_addNoCacheHeaders();
|
1137 |
+
|
1138 |
+
if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'edit-calendar')) {
|
1139 |
+
/*
|
1140 |
+
* This is just a sanity check to make sure
|
1141 |
+
* this isn't a CSRF attack. Most of the time this
|
1142 |
+
* will never be run because you can't see the calendar unless
|
1143 |
+
* you are at least an editor
|
1144 |
+
*/
|
1145 |
+
?>
|
1146 |
+
{
|
1147 |
+
"error": <?php echo(EDCAL_NONCE_ERROR); ?>
|
1148 |
+
}
|
1149 |
+
<?php
|
1150 |
+
return false;
|
1151 |
+
}
|
1152 |
+
return true;
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
/*
|
1156 |
+
* This function changes the date on a post. It does optimistic
|
1157 |
+
* concurrency checking by comparing the original post date from
|
1158 |
+
* the browser with the one from the database. If they don't match
|
1159 |
+
* then it returns an error code and the updated post data.
|
1160 |
+
*
|
1161 |
+
* If the call is successful then it returns the updated post data.
|
1162 |
+
*/
|
1163 |
+
function edcal_changedate() {
|
1164 |
+
if (!$this->edcal_checknonce()) {
|
1165 |
+
die();
|
1166 |
+
}
|
1167 |
+
header("Content-Type: application/json");
|
1168 |
+
$this->edcal_addNoCacheHeaders();
|
1169 |
+
|
1170 |
+
$edcal_postid = isset($_GET['postid'])?$_GET['postid']:null;
|
1171 |
+
$edcal_newDate = isset($_GET['newdate'])?$_GET['newdate']:null;
|
1172 |
+
$edcal_oldDate = isset($_GET['olddate'])?$_GET['olddate']:null;
|
1173 |
+
$edcal_postStatus = isset($_GET['postStatus'])?$_GET['postStatus']:null;
|
1174 |
+
$move_to_drawer = $edcal_newDate == '0000-00-00';
|
1175 |
+
$move_from_drawer = $edcal_oldDate == '00000000';
|
1176 |
+
|
1177 |
+
global $post;
|
1178 |
+
$args = array(
|
1179 |
+
'posts_id' => $edcal_postid,
|
1180 |
+
);
|
1181 |
+
$post = get_post($edcal_postid);
|
1182 |
+
setup_postdata($post);
|
1183 |
+
|
1184 |
+
/*
|
1185 |
+
* Posts in WordPress have more than one date. There is the GMT date,
|
1186 |
+
* the date in the local time zone, the modified date in GMT and the
|
1187 |
+
* modified date in the local time zone. We update all of them.
|
1188 |
+
*/
|
1189 |
+
if ( $move_from_drawer ) {
|
1190 |
+
/*
|
1191 |
+
* Set the date to 'unscheduled' [ie. 0]. We use this date
|
1192 |
+
* further down in the concurrency check, and this will make the dates
|
1193 |
+
* technically off by 10 hours, but it's still the same day. We only do
|
1194 |
+
* this for posts that were created as drafts. Works for now, but
|
1195 |
+
* we would have to revamp this if we use an actual timestamp check.
|
1196 |
+
*/
|
1197 |
+
$post->post_date = '0000-00-00 ' . date('H:i:s', strtotime($post->post_date));
|
1198 |
+
} else if ( $move_to_drawer ) {
|
1199 |
+
// echo ( "\r\npost->post_date_gmt=".$post->post_date_gmt);
|
1200 |
+
$post->post_date_gmt = $post->post_date;
|
1201 |
+
} else {
|
1202 |
+
// set the scheduled time as our original time
|
1203 |
+
$post->post_date_gmt = $post->post_date;
|
1204 |
+
}
|
1205 |
+
// echo ( "\r\npost->post_date_gmt = $post->post_date_gmt \r\npost->post_date = $post->post_date");
|
1206 |
+
|
1207 |
+
/*
|
1208 |
+
* Error-checking:
|
1209 |
+
*/
|
1210 |
+
$error = false;
|
1211 |
+
if (!current_user_can('edit_post', $edcal_postid)) {
|
1212 |
+
/*
|
1213 |
+
* This is just a sanity check to make sure that the current
|
1214 |
+
* user has permission to edit posts. Most of the time this
|
1215 |
+
* will never be run because you can't see the calendar unless
|
1216 |
+
* you are at least an editor.
|
1217 |
+
*/
|
1218 |
+
$error = EDCAL_PERMISSION_ERROR;
|
1219 |
+
} else if ( date('Y-m-d', strtotime($post->post_date)) != date('Y-m-d', strtotime($edcal_oldDate)) ) {
|
1220 |
+
/*
|
1221 |
+
* We are doing optimistic concurrency checking on the dates. If
|
1222 |
+
* the user tries to move a post we want to make sure nobody else
|
1223 |
+
* has moved that post since the page was last updated. If the
|
1224 |
+
* old date in the database doesn't match the old date from the
|
1225 |
+
* browser then we return an error to the browser along with the
|
1226 |
+
* updated post data.
|
1227 |
+
*/
|
1228 |
+
$error = EDCAL_CONCURRENCY_ERROR;
|
1229 |
+
}
|
1230 |
+
|
1231 |
+
if ( $error ) {
|
1232 |
+
// die('error= '.$error);
|
1233 |
+
?>
|
1234 |
+
{
|
1235 |
+
"error": <?php echo $error; ?>,
|
1236 |
+
"post" :
|
1237 |
+
<?php
|
1238 |
+
$this->edcal_postJSON($post, false, true);
|
1239 |
+
?> }
|
1240 |
+
|
1241 |
+
<?php
|
1242 |
+
die();
|
1243 |
+
}
|
1244 |
+
|
1245 |
+
|
1246 |
+
/*
|
1247 |
+
* No errors, so let's go create our new post parameters to update
|
1248 |
+
*/
|
1249 |
+
|
1250 |
+
$updated_post = array();
|
1251 |
+
$updated_post['ID'] = $edcal_postid;
|
1252 |
+
|
1253 |
+
if ( !$move_to_drawer ) {
|
1254 |
+
$updated_post['post_date'] = $edcal_newDate . substr($post->post_date, strlen($edcal_newDate));
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
/*
|
1258 |
+
* When a user creates a draft and never sets a date or publishes it
|
1259 |
+
* then the GMT date will have a timestamp of 00:00:00 to indicate
|
1260 |
+
* that the date hasn't been set. In that case we need to specify
|
1261 |
+
* an edit date or the wp_update_post function will strip our new
|
1262 |
+
* date out and leave the post as publish immediately.
|
1263 |
+
*/
|
1264 |
+
$needsEditDate = preg_match( '/^0000/', $post->post_date_gmt );
|
1265 |
+
|
1266 |
+
if ( $needsEditDate ) {
|
1267 |
+
// echo "\r\nneeds edit date\r\n";
|
1268 |
+
$updated_post['edit_date'] = $edcal_newDate . substr($post->post_date, strlen($edcal_newDate));
|
1269 |
+
}
|
1270 |
+
|
1271 |
+
if ( $move_to_drawer ) {
|
1272 |
+
$updated_post['post_date_gmt'] = "0000-00-00 00:00:00";
|
1273 |
+
$updated_post['edit_date'] = $post->post_date;
|
1274 |
+
} else if ( $move_from_drawer ) {
|
1275 |
+
$updated_post['post_date_gmt'] = get_gmt_from_date($post->post_date);
|
1276 |
+
$updated_post['post_modified_gmt'] = get_gmt_from_date($post->post_date);
|
1277 |
+
}
|
1278 |
+
|
1279 |
+
/*
|
1280 |
+
* We need to make sure to use the GMT formatting for the date.
|
1281 |
+
*/
|
1282 |
+
if ( !$move_to_drawer ) {
|
1283 |
+
$updated_post['post_date_gmt'] = get_gmt_from_date($updated_post['post_date']);
|
1284 |
+
$updated_post['post_modified'] = $edcal_newDate . substr($post->post_modified, strlen($edcal_newDate));
|
1285 |
+
$updated_post['post_modified_gmt'] = get_gmt_from_date($updated_post['post_date']);
|
1286 |
+
}
|
1287 |
+
|
1288 |
+
if ($edcal_postStatus != $post->post_status) {
|
1289 |
+
/*
|
1290 |
+
* We only want to update the post status if it has changed.
|
1291 |
+
* If the post status has changed that takes a few more steps
|
1292 |
+
*/
|
1293 |
+
wp_transition_post_status($edcal_postStatus, $post->post_status, $post);
|
1294 |
+
$updated_post['post_status'] = $edcal_postStatus;
|
1295 |
+
|
1296 |
+
// Update counts for the post's terms.
|
1297 |
+
foreach ( (array) get_object_taxonomies('post') as $taxonomy ) {
|
1298 |
+
$tt_ids = wp_get_object_terms($post_id, $taxonomy, 'fields=tt_ids');
|
1299 |
+
wp_update_term_count($tt_ids, $taxonomy);
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
do_action('edit_post', $edcal_postid, $post);
|
1303 |
+
do_action('save_post', $edcal_postid, $post);
|
1304 |
+
do_action('wp_insert_post', $edcal_postid, $post);
|
1305 |
+
}
|
1306 |
+
|
1307 |
+
// die(var_dump($updated_post).'success!');
|
1308 |
+
/*
|
1309 |
+
* Now we finally update the post into the database
|
1310 |
+
*/
|
1311 |
+
wp_update_post( $updated_post );
|
1312 |
+
|
1313 |
+
/*
|
1314 |
+
* We finish by returning the latest data for the post in the JSON
|
1315 |
+
*/
|
1316 |
+
global $post;
|
1317 |
+
$args = array(
|
1318 |
+
'posts_id' => $edcal_postid,
|
1319 |
+
);
|
1320 |
+
|
1321 |
+
$post = get_post($edcal_postid);
|
1322 |
+
?>{
|
1323 |
+
"post" :
|
1324 |
+
|
1325 |
+
<?php
|
1326 |
+
$this->edcal_postJSON($post, false, true);
|
1327 |
+
?>}
|
1328 |
+
<?php
|
1329 |
+
|
1330 |
+
die();
|
1331 |
+
}
|
1332 |
+
|
1333 |
+
/*
|
1334 |
+
* This function saves the preferences
|
1335 |
+
*/
|
1336 |
+
function edcal_saveoptions() {
|
1337 |
+
if (!$this->edcal_checknonce()) {
|
1338 |
+
die();
|
1339 |
+
}
|
1340 |
+
|
1341 |
+
header("Content-Type: application/json");
|
1342 |
+
$this->edcal_addNoCacheHeaders();
|
1343 |
+
|
1344 |
+
/*
|
1345 |
+
* The number of weeks preference
|
1346 |
+
*/
|
1347 |
+
$edcal_weeks = isset($_GET['weeks'])?$_GET['weeks']:null;
|
1348 |
+
if ($edcal_weeks != null) {
|
1349 |
+
add_option("edcal_weeks_pref", $edcal_weeks, "", "yes");
|
1350 |
+
update_option("edcal_weeks_pref", $edcal_weeks);
|
1351 |
+
}
|
1352 |
+
|
1353 |
+
/*
|
1354 |
+
* The show author preference
|
1355 |
+
*/
|
1356 |
+
$edcal_author = isset($_GET['author-hide'])?$_GET['author-hide']:null;
|
1357 |
+
if ($edcal_author != null) {
|
1358 |
+
add_option("edcal_author_pref", $edcal_author, "", "yes");
|
1359 |
+
update_option("edcal_author_pref", $edcal_author);
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
/*
|
1363 |
+
* The show status preference
|
1364 |
+
*/
|
1365 |
+
$edcal_status = isset($_GET['status-hide'])?$_GET['status-hide']:null;
|
1366 |
+
if ($edcal_status != null) {
|
1367 |
+
add_option("edcal_status_pref", $edcal_status, "", "yes");
|
1368 |
+
update_option("edcal_status_pref", $edcal_status);
|
1369 |
+
}
|
1370 |
+
|
1371 |
+
/*
|
1372 |
+
* The show time preference
|
1373 |
+
*/
|
1374 |
+
$edcal_time = isset($_GET['time-hide'])?$_GET['time-hide']:null;
|
1375 |
+
if ($edcal_time != null) {
|
1376 |
+
add_option("edcal_time_pref", $edcal_time, "", "yes");
|
1377 |
+
update_option("edcal_time_pref", $edcal_time);
|
1378 |
+
}
|
1379 |
+
|
1380 |
+
/*
|
1381 |
+
* The show mouse wheel preference
|
1382 |
+
*/
|
1383 |
+
$edcal_wheel = isset($_GET['wheel-support'])?$_GET['wheel-support']:null;
|
1384 |
+
if ($edcal_wheel != null) {
|
1385 |
+
add_option("edcal_wheelscroll_pref", $edcal_time, "", "yes");
|
1386 |
+
update_option("edcal_wheelscroll_pref", $edcal_wheel);
|
1387 |
+
}
|
1388 |
+
|
1389 |
+
/*
|
1390 |
+
* The edcal feedback preference
|
1391 |
+
*/
|
1392 |
+
$edcal_feedback = isset($_GET['dofeedback'])?$_GET['dofeedback']:null;
|
1393 |
+
if ($edcal_feedback != null) {
|
1394 |
+
add_option("edcal_do_feedback", $edcal_feedback, "", "yes");
|
1395 |
+
update_option("edcal_do_feedback", $edcal_feedback);
|
1396 |
+
}
|
1397 |
+
|
1398 |
+
/*
|
1399 |
+
* We finish by returning the latest data for the post in the JSON
|
1400 |
+
*/
|
1401 |
+
?>{
|
1402 |
+
"update" : "success"
|
1403 |
+
}
|
1404 |
+
<?php
|
1405 |
+
|
1406 |
+
die();
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
/*
|
1410 |
+
* Add the no cache headers to make sure that our responses aren't
|
1411 |
+
* cached by the browser.
|
1412 |
+
*/
|
1413 |
+
function edcal_addNoCacheHeaders() {
|
1414 |
+
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
1415 |
+
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
1416 |
+
}
|
1417 |
+
|
1418 |
+
}
|
1419 |
+
|
1420 |
+
?>
|
3.7.8/edcal_rtl.css
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.inline-edit-row fieldset label span.title {
|
2 |
+
width: 7em;
|
3 |
+
float: right;
|
4 |
+
text-align: right;
|
5 |
+
direction: rtl;
|
6 |
+
}
|
7 |
+
|
8 |
+
.inline-edit-row fieldset label span.input-text-wrap {
|
9 |
+
margin-left: 0;
|
10 |
+
margin-right: 7em;
|
11 |
+
}
|
12 |
+
|
13 |
+
.inline-edit-row fieldset label span.input-text-wrap {
|
14 |
+
text-align: right;
|
15 |
+
direction: rtl;
|
16 |
+
}
|
17 |
+
|
18 |
+
#topleft {
|
19 |
+
left: auto;
|
20 |
+
right: 0px;
|
21 |
+
}
|
22 |
+
|
23 |
+
#topright {
|
24 |
+
right: auto;
|
25 |
+
left: 0px;
|
26 |
+
}
|
27 |
+
|
28 |
+
#screen-options-link-wrap, #contextual-help-link-wrap {
|
29 |
+
float: left;
|
30 |
+
}
|
31 |
+
|
32 |
+
.wrap h2 {
|
33 |
+
text-align: right;
|
34 |
+
direction: rtl;
|
35 |
+
}
|
36 |
+
|
37 |
+
.icon32 {
|
38 |
+
float: right;
|
39 |
+
}
|
40 |
+
|
41 |
+
.post {
|
42 |
+
text-align: right;
|
43 |
+
direction: rtl;
|
44 |
+
}
|
45 |
+
|
46 |
+
.dayhead {
|
47 |
+
min-width: 0;
|
48 |
+
text-align: right;
|
49 |
+
direction: rtl;
|
50 |
+
}
|
51 |
+
|
52 |
+
#contextual-help-wrap {
|
53 |
+
text-align: right;
|
54 |
+
direction: rtl;
|
55 |
+
}
|
56 |
+
|
57 |
+
#tooltiptitle {
|
58 |
+
direction: rtl;
|
59 |
+
padding-right: 35px;
|
60 |
+
}
|
3.7.8/edcal_test.js
ADDED
@@ -0,0 +1,587 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*******************************************************************************
|
2 |
+
*
|
3 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
+
* you may not use this file except in compliance with the License.
|
5 |
+
* You may obtain a copy of the License at
|
6 |
+
*
|
7 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
8 |
+
*
|
9 |
+
* Unless required by applicable law or agreed to in writing, software
|
10 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
+
* See the License for the specific language governing permissions and
|
13 |
+
* limitations under the License.
|
14 |
+
*
|
15 |
+
******************************************************************************/
|
16 |
+
/*
|
17 |
+
* This file contains unit tests for the editorial calendar. It is only loaded
|
18 |
+
* if you add the qunit=true parameter to the URL for the calendar.
|
19 |
+
*/
|
20 |
+
|
21 |
+
var edcal_test = {
|
22 |
+
|
23 |
+
post: {},
|
24 |
+
|
25 |
+
testContent: 'This is the content of the <b>unit test – post</b>. <!--more--> This is content after the more tag to make sure we a reading it.',
|
26 |
+
testContent2: 'This is the content of the <b>unit test – post</b>. <!--more--> This is content after the more tag to make sure we a reading it. - CHANGED',
|
27 |
+
testContent3: 'This is the content of the <b>unit test – post</b>. <!--more--> This is content after the more tag to make sure we a reading it. - CHANGED DRAFT',
|
28 |
+
|
29 |
+
runTests: function() {
|
30 |
+
edcal_test.isDraftsDrawerVisible = edcal.isDraftsDrawerVisible;
|
31 |
+
|
32 |
+
edcal.setDraftsDrawerVisible(true, function() {
|
33 |
+
edcal_test.startTests();
|
34 |
+
});
|
35 |
+
},
|
36 |
+
|
37 |
+
startTests: function() {
|
38 |
+
jQuery('head').append('<link>');
|
39 |
+
css = jQuery('head').children(':last');
|
40 |
+
css.attr({
|
41 |
+
rel: 'stylesheet',
|
42 |
+
type: 'text/css',
|
43 |
+
href: edcal.plugin_url + '/lib/qunit.css'
|
44 |
+
});
|
45 |
+
|
46 |
+
jQuery('#wpbody-content .wrap').append('<div id="edcal-qunit"></div>');
|
47 |
+
|
48 |
+
jQuery('#edcal-qunit').append('<h1 id="qunit-header">WordPress Editorial Calendar Unit Tests</h1>' +
|
49 |
+
'<h2 id="qunit-banner"></h2>' +
|
50 |
+
'<div id="qunit-testrunner-toolbar"></div>' +
|
51 |
+
'<h2 id="qunit-userAgent"></h2>' +
|
52 |
+
'<ol id="qunit-tests"></ol>' +
|
53 |
+
'<div id="qunit-fixture">test markup</div>');
|
54 |
+
|
55 |
+
|
56 |
+
edcal_test.moveTests();
|
57 |
+
},
|
58 |
+
|
59 |
+
getFirstDate: function() {
|
60 |
+
var api = jQuery('#edcal_scrollable').scrollable();
|
61 |
+
var items = api.getVisibleItems();
|
62 |
+
|
63 |
+
return edcal.getDayFromDayId(items.eq(0).children('.edcal_row').children('.day:first').attr('id'));
|
64 |
+
},
|
65 |
+
|
66 |
+
getLastDate: function() {
|
67 |
+
var api = jQuery('#edcal_scrollable').scrollable();
|
68 |
+
var items = api.getVisibleItems();
|
69 |
+
|
70 |
+
return edcal.getDayFromDayId(items.eq(edcal.weeksPref - 1).children('.edcal_row').children('.day:last').attr('id'));
|
71 |
+
},
|
72 |
+
|
73 |
+
moveTests: function() {
|
74 |
+
var curSunday = edcal.nextStartOfWeek(Date.today()).add(-1).weeks();
|
75 |
+
|
76 |
+
edcal.moveTo(Date.today());
|
77 |
+
|
78 |
+
/*
|
79 |
+
* We'll start of with a series of tests about moving the calendar around
|
80 |
+
*/
|
81 |
+
test('Move to today and check visible dates', function() {
|
82 |
+
expect(2);
|
83 |
+
ok(edcal_test.getFirstDate().equals(curSunday.clone()), 'firstDate should match ' + curSunday);
|
84 |
+
|
85 |
+
ok(edcal_test.getLastDate().equals(curSunday.clone().add(edcal.weeksPref).weeks().add(-1).days()),
|
86 |
+
'lastDate should match ' + curSunday);
|
87 |
+
});
|
88 |
+
|
89 |
+
asyncTest('Move 1 week in the future and check visible dates', function() {
|
90 |
+
expect(2);
|
91 |
+
edcal.move(1, true, function() {
|
92 |
+
ok(edcal_test.getFirstDate().equals(curSunday.clone().add(1).weeks()), 'firstDate should match ' + curSunday);
|
93 |
+
|
94 |
+
ok(edcal_test.getLastDate().equals(curSunday.clone().add(edcal.weeksPref).weeks().add(-1).days().add(1).weeks()),
|
95 |
+
'lastDate should match ' + curSunday);
|
96 |
+
|
97 |
+
edcal.move(1, false, function() {
|
98 |
+
start();
|
99 |
+
edcal_test.testMoveFourWeeks();
|
100 |
+
});
|
101 |
+
});
|
102 |
+
});
|
103 |
+
|
104 |
+
return;
|
105 |
+
|
106 |
+
},
|
107 |
+
|
108 |
+
testMoveFourWeeks: function() {
|
109 |
+
var curSunday = edcal.nextStartOfWeek(Date.today()).add(-1).weeks();
|
110 |
+
|
111 |
+
/*
|
112 |
+
* Now we'll move 4 weeks into the future
|
113 |
+
*/
|
114 |
+
asyncTest('Move 4 weeks in the future and check visible dates', function() {
|
115 |
+
expect(2);
|
116 |
+
|
117 |
+
edcal.move(4, true, function() {
|
118 |
+
ok(edcal_test.getFirstDate().equals(curSunday.clone().add(4).weeks()), 'firstDate should match ' + curSunday);
|
119 |
+
|
120 |
+
ok(edcal_test.getLastDate().equals(curSunday.clone().add(edcal.weeksPref).weeks().add(-1).days().add(4).weeks()),
|
121 |
+
'lastDate should match ' + curSunday);
|
122 |
+
|
123 |
+
edcal.move(4, false, function() {
|
124 |
+
start();
|
125 |
+
edcal_test.testMoveEightWeeks();
|
126 |
+
});
|
127 |
+
});
|
128 |
+
|
129 |
+
|
130 |
+
});
|
131 |
+
},
|
132 |
+
|
133 |
+
testMoveEightWeeks: function() {
|
134 |
+
var curSunday = edcal.nextStartOfWeek(Date.today()).add(-1).weeks();
|
135 |
+
|
136 |
+
/*
|
137 |
+
* Now 8 weeks into the past
|
138 |
+
*/
|
139 |
+
asyncTest('Move 8 weeks in the past and check visible dates', function() {
|
140 |
+
expect(2);
|
141 |
+
|
142 |
+
edcal.move(8, false, function() {
|
143 |
+
ok(edcal_test.getFirstDate().equals(curSunday.clone().add(-8).weeks()), 'firstDate should match ' + curSunday);
|
144 |
+
|
145 |
+
ok(edcal_test.getLastDate().equals(curSunday.clone().add(edcal.weeksPref).weeks().add(-1).days().add(-8).weeks()),
|
146 |
+
'lastDate should match ' + curSunday);
|
147 |
+
|
148 |
+
edcal.move(8, true, function() {
|
149 |
+
start();
|
150 |
+
edcal_test.testMoveToLast();
|
151 |
+
});
|
152 |
+
});
|
153 |
+
|
154 |
+
|
155 |
+
});
|
156 |
+
},
|
157 |
+
|
158 |
+
testMoveToLast: function() {
|
159 |
+
if (edcal.lastPostDate === '-1') {
|
160 |
+
/*
|
161 |
+
* Then there aren't any posts and we can't go
|
162 |
+
* to the last one so we just skip this test.
|
163 |
+
*/
|
164 |
+
edcal_test.testCreatePost();
|
165 |
+
return;
|
166 |
+
}
|
167 |
+
|
168 |
+
var d = Date.parseExact(edcal.lastPostDate, 'ddMMyyyy');
|
169 |
+
var curSunday = edcal.nextStartOfWeek(d).add(-1).weeks();
|
170 |
+
|
171 |
+
/*
|
172 |
+
* Now move to the last post, get the post date, and make sure the post
|
173 |
+
* is there with the correct ID.
|
174 |
+
*/
|
175 |
+
asyncTest('Move to the last post', function() {
|
176 |
+
expect(1);
|
177 |
+
|
178 |
+
edcal.moveTo(d);
|
179 |
+
edcal.getPosts(edcal.nextStartOfWeek(d).add(-3).weeks(),
|
180 |
+
edcal.nextStartOfWeek(d).add(edcal.weeksPref + 3).weeks(), function() {
|
181 |
+
|
182 |
+
equals(jQuery('#post-' + edcal.lastPostId).length, 1, 'The post should be added at ' +
|
183 |
+
d.toString(Date.CultureInfo.formatPatterns.longDate));
|
184 |
+
|
185 |
+
edcal.moveTo(Date.today());
|
186 |
+
start();
|
187 |
+
edcal_test.testCreatePost();
|
188 |
+
});
|
189 |
+
|
190 |
+
|
191 |
+
});
|
192 |
+
},
|
193 |
+
|
194 |
+
testCreatePost: function() {
|
195 |
+
/*
|
196 |
+
* Now we'll do a few tests about creating, modifying, and deleting posts.
|
197 |
+
*/
|
198 |
+
|
199 |
+
asyncTest('Create a new post', function() {
|
200 |
+
expect(3);
|
201 |
+
|
202 |
+
edcal_test.post.title = 'Unit Test Post';
|
203 |
+
edcal_test.post.content = edcal_test.testContent;
|
204 |
+
edcal_test.post.status = 'draft';
|
205 |
+
edcal_test.post.time = '10:00 AM';
|
206 |
+
edcal_test.post.date = Date.today().add(7).days().toString(edcal.internalDateFormat);
|
207 |
+
edcal_test.post.id = '0';
|
208 |
+
|
209 |
+
edcal.savePost(edcal_test.post, false, false, function(res) {
|
210 |
+
if (!res.post) {
|
211 |
+
ok(false, 'There was an error creating the new post.');
|
212 |
+
start();
|
213 |
+
return;
|
214 |
+
}
|
215 |
+
|
216 |
+
equals(res.post.date, edcal_test.post.date, 'The resulting post should have the same date as the request');
|
217 |
+
equals(res.post.title, edcal_test.post.title, 'The resulting post should have the same title as the request');
|
218 |
+
|
219 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
220 |
+
|
221 |
+
edcal_test.post = res.post;
|
222 |
+
|
223 |
+
start();
|
224 |
+
|
225 |
+
edcal_test.testGetPost();
|
226 |
+
});
|
227 |
+
});
|
228 |
+
|
229 |
+
},
|
230 |
+
|
231 |
+
testGetPost: function() {
|
232 |
+
/*
|
233 |
+
* We'll start by getting data about the post we've just created
|
234 |
+
*/
|
235 |
+
|
236 |
+
asyncTest('Get post information', function() {
|
237 |
+
expect(3);
|
238 |
+
|
239 |
+
edcal.getPost(edcal_test.post.id, function(post) {
|
240 |
+
equals(post.date, edcal_test.post.date, 'The resulting post should have the same date as the request');
|
241 |
+
equals(post.title, edcal_test.post.title, 'The resulting post should have the same title as the request');
|
242 |
+
equals(post.content, edcal_test.testContent, 'The resulting post content should be the same as the test post content');
|
243 |
+
|
244 |
+
edcal_test.post = post;
|
245 |
+
|
246 |
+
start();
|
247 |
+
|
248 |
+
edcal_test.testMovePost();
|
249 |
+
});
|
250 |
+
});
|
251 |
+
|
252 |
+
},
|
253 |
+
|
254 |
+
testMovePost: function() {
|
255 |
+
|
256 |
+
asyncTest('Change the date of an existing post', function() {
|
257 |
+
expect(2);
|
258 |
+
|
259 |
+
// We added the post one week in the future, now we will move it
|
260 |
+
// one day after that.
|
261 |
+
var newDate = Date.today().add(8).days().toString(edcal.internalDateFormat);
|
262 |
+
|
263 |
+
edcal.doDrop(edcal_test.post.date, 'post-' + edcal_test.post.id, newDate, function(res) {
|
264 |
+
|
265 |
+
if (!res.post) {
|
266 |
+
ok(false, 'There was an error creating the new post.');
|
267 |
+
return;
|
268 |
+
}
|
269 |
+
|
270 |
+
equals(res.post.date, newDate, 'The resulting post should have the same date as the request');
|
271 |
+
|
272 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
273 |
+
|
274 |
+
edcal_test.post = res.post;
|
275 |
+
|
276 |
+
start();
|
277 |
+
|
278 |
+
edcal_test.testMovePostOneWeek();
|
279 |
+
});
|
280 |
+
});
|
281 |
+
|
282 |
+
},
|
283 |
+
|
284 |
+
testMovePostOneWeek: function() {
|
285 |
+
|
286 |
+
asyncTest('Make a second change to the date of an existing post', function() {
|
287 |
+
expect(2);
|
288 |
+
|
289 |
+
// We added the post one week in the future, now we will move it
|
290 |
+
// one day after that.
|
291 |
+
var newDate = Date.today().add(22).days().toString(edcal.internalDateFormat);
|
292 |
+
|
293 |
+
edcal.doDrop(edcal_test.post.date, 'post-' + edcal_test.post.id, newDate, function(res) {
|
294 |
+
|
295 |
+
if (!res.post) {
|
296 |
+
ok(false, 'There was an error creating the new post.');
|
297 |
+
return;
|
298 |
+
}
|
299 |
+
|
300 |
+
equals(res.post.date, newDate, 'The resulting post should have the same date as the request');
|
301 |
+
|
302 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
303 |
+
|
304 |
+
edcal_test.post = res.post;
|
305 |
+
|
306 |
+
start();
|
307 |
+
|
308 |
+
edcal_test.testMovePostDraft();
|
309 |
+
});
|
310 |
+
});
|
311 |
+
|
312 |
+
},
|
313 |
+
|
314 |
+
testMovePostDraft: function() {
|
315 |
+
|
316 |
+
asyncTest('Move an existing post to the drafts drawer', function() {
|
317 |
+
expect(2);
|
318 |
+
|
319 |
+
edcal.doDrop(edcal_test.post.date, 'post-' + edcal_test.post.id, edcal.NO_DATE, function(res) {
|
320 |
+
|
321 |
+
if (!res.post) {
|
322 |
+
ok(false, 'There was an error creating the new post.');
|
323 |
+
return;
|
324 |
+
}
|
325 |
+
|
326 |
+
equals(res.post.date_gmt, edcal.NO_DATE, 'The resulting post should have the same date as the request and it was ' + res.post.date);
|
327 |
+
|
328 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
329 |
+
|
330 |
+
edcal_test.post = res.post;
|
331 |
+
|
332 |
+
start();
|
333 |
+
|
334 |
+
edcal_test.testEditPostDraft();
|
335 |
+
});
|
336 |
+
});
|
337 |
+
|
338 |
+
},
|
339 |
+
|
340 |
+
testEditPostDraft: function() {
|
341 |
+
|
342 |
+
asyncTest('Edit the content of a draft post', function() {
|
343 |
+
expect(2);
|
344 |
+
|
345 |
+
edcal_test.post.title = 'Unit Test Draft Post – Changed';
|
346 |
+
edcal_test.post.content = edcal_test.testContent3;
|
347 |
+
|
348 |
+
edcal.savePost(edcal_test.post, false, false, function(res)
|
349 |
+
{
|
350 |
+
if (!res.post) {
|
351 |
+
ok(false, 'There was an error editing the post.');
|
352 |
+
start();
|
353 |
+
return;
|
354 |
+
}
|
355 |
+
|
356 |
+
equals(res.post.title, edcal_test.post.title, 'The resulting post should have the same title as the request');
|
357 |
+
|
358 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
359 |
+
|
360 |
+
edcal_test.post = res.post;
|
361 |
+
|
362 |
+
start();
|
363 |
+
|
364 |
+
edcal_test.testMovePostDraftSchedule();
|
365 |
+
|
366 |
+
});
|
367 |
+
});
|
368 |
+
},
|
369 |
+
|
370 |
+
testMovePostDraftSchedule: function() {
|
371 |
+
|
372 |
+
asyncTest('Move a post from the drafts drawer back to the calendar', function() {
|
373 |
+
expect(2);
|
374 |
+
|
375 |
+
// We added the post one week in the future, now we will move it
|
376 |
+
// two days after that.
|
377 |
+
var newDate = Date.today().add(23).days().toString(edcal.internalDateFormat);
|
378 |
+
|
379 |
+
edcal.doDrop(edcal.NO_DATE, 'post-' + edcal_test.post.id, newDate, function(res) {
|
380 |
+
|
381 |
+
if (!res.post) {
|
382 |
+
ok(false, 'There was an error creating the new post.');
|
383 |
+
return;
|
384 |
+
}
|
385 |
+
|
386 |
+
equals(res.post.date, newDate, 'The resulting post should have the same date as the request and it was ' + res.post.date);
|
387 |
+
|
388 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
389 |
+
|
390 |
+
edcal_test.post = res.post;
|
391 |
+
|
392 |
+
start();
|
393 |
+
|
394 |
+
edcal_test.testEditPost();
|
395 |
+
});
|
396 |
+
});
|
397 |
+
|
398 |
+
},
|
399 |
+
|
400 |
+
testEditPost: function() {
|
401 |
+
|
402 |
+
asyncTest('Edit the content of an existing post and mark it as scheduled', function() {
|
403 |
+
expect(2);
|
404 |
+
|
405 |
+
edcal_test.post.title = 'Unit Test Post – Changed';
|
406 |
+
edcal_test.post.content = edcal_test.testContent2;
|
407 |
+
|
408 |
+
edcal.savePost(edcal_test.post, false, true, function(res)
|
409 |
+
{
|
410 |
+
if (!res.post) {
|
411 |
+
ok(false, 'There was an error editing the post.');
|
412 |
+
start();
|
413 |
+
return;
|
414 |
+
}
|
415 |
+
|
416 |
+
equals(res.post.title, edcal_test.post.title, 'The resulting post should have the same title as the request');
|
417 |
+
|
418 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
419 |
+
|
420 |
+
edcal_test.post = res.post;
|
421 |
+
|
422 |
+
start();
|
423 |
+
|
424 |
+
edcal_test.testGetAfterEdit();
|
425 |
+
|
426 |
+
});
|
427 |
+
});
|
428 |
+
|
429 |
+
},
|
430 |
+
|
431 |
+
testGetAfterEdit: function() {
|
432 |
+
/*
|
433 |
+
* Now we'll test to make sure our new post data still matches what we think it should
|
434 |
+
*/
|
435 |
+
|
436 |
+
asyncTest('Get post information after editing', function() {
|
437 |
+
expect(3);
|
438 |
+
|
439 |
+
edcal.getPost(edcal_test.post.id, function(post) {
|
440 |
+
equals(post.date, edcal_test.post.date, 'The resulting post should have the same date as the request');
|
441 |
+
equals(post.title, edcal_test.post.title, 'The resulting post should have the same title as the request');
|
442 |
+
equals(post.content, edcal_test.testContent2, 'The resulting post content should be the same as the test post content');
|
443 |
+
|
444 |
+
edcal_test.post = post;
|
445 |
+
|
446 |
+
start();
|
447 |
+
|
448 |
+
edcal_test.testDateConflict();
|
449 |
+
});
|
450 |
+
});
|
451 |
+
|
452 |
+
},
|
453 |
+
|
454 |
+
testDateConflict: function() {
|
455 |
+
asyncTest('Try to change a post date and fail because of a concurrency conflict', function() {
|
456 |
+
expect(2);
|
457 |
+
|
458 |
+
edcal_test.post.date = Date.today().add(-1).days().toString(edcal.internalDateFormat);
|
459 |
+
|
460 |
+
/*
|
461 |
+
* We added the post one week in the future, now we will move it
|
462 |
+
* one day after that.
|
463 |
+
*/
|
464 |
+
var newDate = Date.today().add(8).days().toString(edcal.internalDateFormat);
|
465 |
+
|
466 |
+
edcal.changeDate(newDate, edcal_test.post, function(res)
|
467 |
+
{
|
468 |
+
if (!res.post) {
|
469 |
+
ok(false, 'There was an error with the change date conflict.');
|
470 |
+
return;
|
471 |
+
}
|
472 |
+
|
473 |
+
equals(res.error, edcal.CONCURRENCY_ERROR, 'This move should show an exception because it is in conflict.');
|
474 |
+
|
475 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
476 |
+
|
477 |
+
edcal_test.post = res.post;
|
478 |
+
|
479 |
+
start();
|
480 |
+
|
481 |
+
edcal_test.testDeletePost();
|
482 |
+
|
483 |
+
});
|
484 |
+
});
|
485 |
+
|
486 |
+
},
|
487 |
+
|
488 |
+
testDeletePost: function() {
|
489 |
+
|
490 |
+
/*
|
491 |
+
* The last step is to delete the post we made so
|
492 |
+
* the test cleans up after itself.
|
493 |
+
*/
|
494 |
+
asyncTest('Delete the post created for testing', function() {
|
495 |
+
expect(1);
|
496 |
+
|
497 |
+
edcal.deletePost(edcal_test.post.id, function(res)
|
498 |
+
{
|
499 |
+
if (!res.post) {
|
500 |
+
ok(false, 'There was an error creating the new post.');
|
501 |
+
start();
|
502 |
+
return;
|
503 |
+
}
|
504 |
+
|
505 |
+
equals(jQuery('#post-' + res.post.id).length, 0, 'The post should now be deleted from the calendar.');
|
506 |
+
start();
|
507 |
+
|
508 |
+
edcal_test.testCreateDraftDrawerPost();
|
509 |
+
|
510 |
+
});
|
511 |
+
});
|
512 |
+
},
|
513 |
+
|
514 |
+
testCreateDraftDrawerPost: function() {
|
515 |
+
/*
|
516 |
+
* Now we'll create a new post in the drafts drawer
|
517 |
+
*/
|
518 |
+
|
519 |
+
asyncTest('Create a new drafts drawer post', function() {
|
520 |
+
expect(2);
|
521 |
+
|
522 |
+
edcal_test.post.title = 'Unit Test Drafts Drawer Post';
|
523 |
+
edcal_test.post.content = edcal_test.testContent;
|
524 |
+
edcal_test.post.status = 'draft';
|
525 |
+
edcal_test.post.time = edcal.NO_DATE;
|
526 |
+
edcal_test.post.date = edcal.NO_DATE;
|
527 |
+
edcal_test.post.id = '0';
|
528 |
+
|
529 |
+
edcal.savePost(edcal_test.post, false, false, function(res) {
|
530 |
+
if (!res.post) {
|
531 |
+
ok(false, 'There was an error creating the new post.');
|
532 |
+
start();
|
533 |
+
return;
|
534 |
+
}
|
535 |
+
|
536 |
+
equals(res.post.title, edcal_test.post.title, 'The resulting post should have the same title as the request');
|
537 |
+
|
538 |
+
equals(jQuery('#post-' + res.post.id).length, 1, 'The post should be added in only one place in the calendar.');
|
539 |
+
|
540 |
+
edcal_test.post = res.post;
|
541 |
+
|
542 |
+
start();
|
543 |
+
|
544 |
+
edcal_test.testDeleteDraftDrawerPost();
|
545 |
+
});
|
546 |
+
});
|
547 |
+
|
548 |
+
},
|
549 |
+
|
550 |
+
testDeleteDraftDrawerPost: function() {
|
551 |
+
|
552 |
+
/*
|
553 |
+
* The last step is to delete the post we made so
|
554 |
+
* the test cleans up after itself.
|
555 |
+
*/
|
556 |
+
asyncTest('Delete the post created for drafts drawer testing', function() {
|
557 |
+
expect(1);
|
558 |
+
|
559 |
+
edcal.deletePost(edcal_test.post.id, function(res)
|
560 |
+
{
|
561 |
+
if (!res.post) {
|
562 |
+
ok(false, 'There was an error creating the new post.');
|
563 |
+
start();
|
564 |
+
return;
|
565 |
+
}
|
566 |
+
|
567 |
+
equals(jQuery('#post-' + res.post.id).length, 0, 'The post should now be deleted from the calendar.');
|
568 |
+
start();
|
569 |
+
|
570 |
+
edcal_test.finishTests();
|
571 |
+
|
572 |
+
});
|
573 |
+
});
|
574 |
+
},
|
575 |
+
|
576 |
+
finishTests: function() {
|
577 |
+
if (!edcal_test.isDraftsDrawerVisible) {
|
578 |
+
/*
|
579 |
+
* We need to make sure the drafts drawer is open because
|
580 |
+
* we can use it in the tests so we open it when the tests
|
581 |
+
* start if it isn't open already. We want to close it at
|
582 |
+
* the end if we opened it.
|
583 |
+
*/
|
584 |
+
edcal.setDraftsDrawerVisible(false);
|
585 |
+
}
|
586 |
+
}
|
587 |
+
};
|
3.7.8/images/month-present_bk.gif
ADDED
Binary file
|
3.7.8/images/tip_close.png
ADDED
Binary file
|
3.7.8/images/today_bk.gif
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-cs_CZ.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-cs_CZ.po
ADDED
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of the WordPress plugin by .
|
2 |
+
# Copyright (C) 2010
|
3 |
+
# This file is distributed under the same license as the package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
+
#
|
6 |
+
msgid ""
|
7 |
+
msgstr ""
|
8 |
+
"Project-Id-Version: Editorial-Calendar-cs_CZ\n"
|
9 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
10 |
+
"POT-Creation-Date: 2010-01-02 21:49+0000\n"
|
11 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
12 |
+
"Last-Translator: Road runner <roadrunner@ufoni.cz>\n"
|
13 |
+
"Language-Team: Lakva <lakva@volny.cz>\n"
|
14 |
+
"MIME-Version: 1.0\n"
|
15 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
16 |
+
"Content-Transfer-Encoding: 8bit\n"
|
17 |
+
"Plural-Forms: Y;\n"
|
18 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
19 |
+
"Language: cs_CZ\n"
|
20 |
+
"X-Generator: Poedit 2.2.3\n"
|
21 |
+
|
22 |
+
#: edcal.php:53
|
23 |
+
msgid "Calendar"
|
24 |
+
msgstr "Kalendář"
|
25 |
+
|
26 |
+
#: edcal.php:116
|
27 |
+
msgid "en-US"
|
28 |
+
msgstr "cs-CZ"
|
29 |
+
|
30 |
+
#: edcal.php:124
|
31 |
+
msgid "on"
|
32 |
+
msgstr "na"
|
33 |
+
|
34 |
+
#: edcal.php:125
|
35 |
+
msgid "by"
|
36 |
+
msgstr "do"
|
37 |
+
|
38 |
+
#: edcal.php:126
|
39 |
+
msgid "at"
|
40 |
+
msgstr "v"
|
41 |
+
|
42 |
+
#: edcal.php:128
|
43 |
+
msgid "Sunday"
|
44 |
+
msgstr "Pondělí"
|
45 |
+
|
46 |
+
#: edcal.php:129
|
47 |
+
msgid "Monday"
|
48 |
+
msgstr "Úterý"
|
49 |
+
|
50 |
+
#: edcal.php:130
|
51 |
+
msgid "Tuesday"
|
52 |
+
msgstr "Středa"
|
53 |
+
|
54 |
+
#: edcal.php:131
|
55 |
+
msgid "Wednesday"
|
56 |
+
msgstr "Čtvrtek"
|
57 |
+
|
58 |
+
#: edcal.php:132
|
59 |
+
msgid "Thursday"
|
60 |
+
msgstr "Pátek"
|
61 |
+
|
62 |
+
#: edcal.php:133
|
63 |
+
msgid "Friday"
|
64 |
+
msgstr "Sobota"
|
65 |
+
|
66 |
+
#: edcal.php:134
|
67 |
+
msgid "Saturday"
|
68 |
+
msgstr "Neděle"
|
69 |
+
|
70 |
+
#: edcal.php:153
|
71 |
+
msgid " [DRAFT]"
|
72 |
+
msgstr "[KONCEPT]"
|
73 |
+
|
74 |
+
#: edcal.php:136
|
75 |
+
msgid "Edit"
|
76 |
+
msgstr "Upravit"
|
77 |
+
|
78 |
+
#: edcal.php:137
|
79 |
+
msgid "Delete"
|
80 |
+
msgstr "Smazat"
|
81 |
+
|
82 |
+
#: edcal.php:138
|
83 |
+
msgid "View"
|
84 |
+
msgstr "Zobrazit"
|
85 |
+
|
86 |
+
#: edcal.php:139
|
87 |
+
msgid "Status:"
|
88 |
+
msgstr "Stav:"
|
89 |
+
|
90 |
+
#: edcal.php:140
|
91 |
+
msgid "Cancel"
|
92 |
+
msgstr "Storno"
|
93 |
+
|
94 |
+
#: edcal.php:141
|
95 |
+
msgid "Post Title:"
|
96 |
+
msgstr "Název příspěvku:"
|
97 |
+
|
98 |
+
#: edcal.php:161
|
99 |
+
msgid "Post Content:"
|
100 |
+
msgstr "Příspěvek obashuje:"
|
101 |
+
|
102 |
+
#: edcal.php:142
|
103 |
+
msgid "Save Draft"
|
104 |
+
msgstr "Uložit koncept"
|
105 |
+
|
106 |
+
#: edcal.php:143
|
107 |
+
msgid "Save and Edit Draft"
|
108 |
+
msgstr "Uložit a upravit koncept"
|
109 |
+
|
110 |
+
#: edcal.php:144
|
111 |
+
msgid "Add a new post on "
|
112 |
+
msgstr "Přidat nový příspěvek na "
|
113 |
+
|
114 |
+
#: edcal.php:146
|
115 |
+
msgid "You are about to delete this post "
|
116 |
+
msgstr "Chystáte se SMAZAT tento příspěvek "
|
117 |
+
|
118 |
+
#: edcal.php:147
|
119 |
+
msgid "Press cancel to stop, OK to delete."
|
120 |
+
msgstr "Stisknutím \"Storno\" akci zrušíte, \"Ok\" příspěvek smaže."
|
121 |
+
|
122 |
+
#: edcal.php:149
|
123 |
+
msgid "Looks like someone else already moved this post."
|
124 |
+
msgstr "Zdá se že příspěvek už někdo přesunul."
|
125 |
+
|
126 |
+
#: edcal.php:150
|
127 |
+
msgid "You do not have permission to edit posts."
|
128 |
+
msgstr "Nemáte oprávnění změnit příspěvek."
|
129 |
+
|
130 |
+
#: edcal.php:151
|
131 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
132 |
+
msgstr "Neplatný kontrolní součet příspěvku. To je obvykle chyba při mezi-sitové scriptování."
|
133 |
+
|
134 |
+
#: edcal.php:152
|
135 |
+
msgid "There was an error contacting your blog."
|
136 |
+
msgstr "Došlo k chybě při spojení s vaším blogem."
|
137 |
+
|
138 |
+
#: edcal.php:174
|
139 |
+
msgid "Screen Options"
|
140 |
+
msgstr "Možnosti zobrazení"
|
141 |
+
|
142 |
+
#: edcal.php:175
|
143 |
+
msgid "Calendar Options"
|
144 |
+
msgstr "Možnosti kalendáře"
|
145 |
+
|
146 |
+
#: edcal.php:176
|
147 |
+
msgid "Apply"
|
148 |
+
msgstr "Použít"
|
149 |
+
|
150 |
+
#: edcal.php:177
|
151 |
+
msgid "Show "
|
152 |
+
msgstr "Zobrazit"
|
153 |
+
|
154 |
+
#: edcal.php:178
|
155 |
+
msgid "weeks at a time"
|
156 |
+
msgstr "týdnů naráz"
|
157 |
+
|
158 |
+
#: edcal.php:179
|
159 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
160 |
+
msgstr "Kalendář může zobrazit 1 až 5 týdnů nazáz."
|
161 |
+
|
162 |
+
#: edcal.php:180
|
163 |
+
msgid "Enter the number of weeks, between 1 and 5, for the calendar to show."
|
164 |
+
msgstr "Vložte počet týdnů, které má kalendář zobrazit, od 1 do 5."
|
165 |
+
|
166 |
+
#: edcal.php:184
|
167 |
+
msgid "Posts Calendar"
|
168 |
+
msgstr "Kalendář článků."
|
169 |
+
|
170 |
+
#: edcal.php:193
|
171 |
+
msgid "Go back four weeks."
|
172 |
+
msgstr "Zpět o čtyři týdny."
|
173 |
+
|
174 |
+
#: edcal.php:195
|
175 |
+
msgid "Skip ahead four weeks."
|
176 |
+
msgstr "Vpřed o čtyři týdny."
|
177 |
+
|
178 |
+
#: edcal.php:250
|
179 |
+
msgid "Jump to today"
|
180 |
+
msgstr "Přejít na dnešek"
|
181 |
+
|
182 |
+
#: edcal.php:200
|
183 |
+
msgid "Today"
|
184 |
+
msgstr "Dnes"
|
185 |
+
|
186 |
+
#: edcal.php:457 edcal.php:460
|
187 |
+
msgid "Error in deleting..."
|
188 |
+
msgstr "Chyba při mazání..."
|
189 |
+
|
190 |
+
#: edcal.php:190 edcal.php:274
|
191 |
+
msgid "ltr"
|
192 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-da_DK.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-da_DK.po
ADDED
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of WordPress Editorial Calendar in Danish
|
2 |
+
# This file is distributed under the same license as the WordPress Editorial Calendar package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
10 |
+
"X-Generator: Poedit 2.2.3\n"
|
11 |
+
"Project-Id-Version: WordPress Editorial Calendar\n"
|
12 |
+
"POT-Creation-Date: \n"
|
13 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
14 |
+
"Language-Team: \n"
|
15 |
+
"Language: da_DK\n"
|
16 |
+
|
17 |
+
#: edcal.php:273 edcal.php:293
|
18 |
+
msgid "New Draft"
|
19 |
+
msgstr "Ny kladde"
|
20 |
+
|
21 |
+
#: edcal.php:291
|
22 |
+
msgid "Add a new draft"
|
23 |
+
msgstr "Tilføj en ny kladde"
|
24 |
+
|
25 |
+
#: edcal.php:321
|
26 |
+
msgid "The calendar can only show between 1 and 8 weeks at a time."
|
27 |
+
msgstr "Kalenderen kan kun vise mellem 1 og 8 uger ad gangen."
|
28 |
+
|
29 |
+
#: edcal.php:324 edcal.php:395
|
30 |
+
msgid "Show Unscheduled Drafts"
|
31 |
+
msgstr "Vis ikke planlagte kladder"
|
32 |
+
|
33 |
+
#: edcal.php:325
|
34 |
+
msgid "Hide Unscheduled Drafts"
|
35 |
+
msgstr "Skjul ikke planlagte kladder"
|
36 |
+
|
37 |
+
#: edcal.php:386
|
38 |
+
msgid "Scroll the calendar and make the last post visible"
|
39 |
+
msgstr "Gå til det sidste indlæg på kalenderen"
|
40 |
+
|
41 |
+
#: edcal.php:395
|
42 |
+
msgid "Show unscheduled posts"
|
43 |
+
msgstr "Vis ikke udgivne indlæg"
|
44 |
+
|
45 |
+
#: edcal.php:401
|
46 |
+
msgid "Unscheduled draft posts"
|
47 |
+
msgstr "Ikke planlagte indlægskladder"
|
48 |
+
|
49 |
+
#: edcal.php:401
|
50 |
+
msgid "Unscheduled"
|
51 |
+
msgstr "Ikke udgivet"
|
52 |
+
|
53 |
+
#: edcal.php:374
|
54 |
+
msgid "%1$s Calendar"
|
55 |
+
msgstr "%1$s kalender"
|
56 |
+
|
57 |
+
#: edcal.php:96 edcal.php:120
|
58 |
+
msgid "Calendar"
|
59 |
+
msgstr "Kalender"
|
60 |
+
|
61 |
+
#: edcal.php:262 edcal.php:531
|
62 |
+
msgid "en-US"
|
63 |
+
msgstr "da-DK"
|
64 |
+
|
65 |
+
#: edcal.php:270
|
66 |
+
msgid "%1$s by %2$s"
|
67 |
+
msgstr "%1$s af %2$s"
|
68 |
+
|
69 |
+
#: edcal.php:272
|
70 |
+
msgid "New Post"
|
71 |
+
msgstr "Nyt indlæg"
|
72 |
+
|
73 |
+
#: edcal.php:276
|
74 |
+
msgid " [DRAFT]"
|
75 |
+
msgstr "[KLADDE]"
|
76 |
+
|
77 |
+
#: edcal.php:277
|
78 |
+
msgid " [PENDING]"
|
79 |
+
msgstr "[AFVENTER]"
|
80 |
+
|
81 |
+
#: edcal.php:278
|
82 |
+
msgid " [STICKY]"
|
83 |
+
msgstr "[STICKY]"
|
84 |
+
|
85 |
+
#: edcal.php:279
|
86 |
+
msgid " [DRAFT, STICKY]"
|
87 |
+
msgstr "[KLADDE, STICKY]"
|
88 |
+
|
89 |
+
#: edcal.php:280
|
90 |
+
msgid " [PENDING, STICKY]"
|
91 |
+
msgstr "[AFVENTER, STICKY]"
|
92 |
+
|
93 |
+
#: edcal.php:281 edcal.php:285
|
94 |
+
msgid "Edit"
|
95 |
+
msgstr "Rediger"
|
96 |
+
|
97 |
+
#: edcal.php:282
|
98 |
+
msgid "Quick Edit"
|
99 |
+
msgstr "Lynrediger"
|
100 |
+
|
101 |
+
#: edcal.php:283
|
102 |
+
msgid "Delete"
|
103 |
+
msgstr "Slet"
|
104 |
+
|
105 |
+
#: edcal.php:284
|
106 |
+
msgid "View"
|
107 |
+
msgstr "Vis"
|
108 |
+
|
109 |
+
#: edcal.php:286
|
110 |
+
msgid "Status:"
|
111 |
+
msgstr "Status:"
|
112 |
+
|
113 |
+
#: edcal.php:287 edcal.php:478
|
114 |
+
msgid "Cancel"
|
115 |
+
msgstr "Annuller"
|
116 |
+
|
117 |
+
#: edcal.php:288 edcal.php:440
|
118 |
+
msgid "Title"
|
119 |
+
msgstr "Titel"
|
120 |
+
|
121 |
+
#: edcal.php:289 edcal.php:445
|
122 |
+
msgid "Content"
|
123 |
+
msgstr "Indhold"
|
124 |
+
|
125 |
+
#: edcal.php:290
|
126 |
+
msgid "Add a new post on %s"
|
127 |
+
msgstr "Tilføj et nyt indlæg den %s"
|
128 |
+
|
129 |
+
#: edcal.php:292
|
130 |
+
msgid "New %s - "
|
131 |
+
msgstr "Nyt %s -"
|
132 |
+
|
133 |
+
#: edcal.php:294
|
134 |
+
msgid "Update"
|
135 |
+
msgstr "Opdater"
|
136 |
+
|
137 |
+
#: edcal.php:295 edcal.php:477
|
138 |
+
msgid "Schedule"
|
139 |
+
msgstr "Udgiv"
|
140 |
+
|
141 |
+
#: edcal.php:296
|
142 |
+
msgid "Submit for Review"
|
143 |
+
msgstr "Send til gennemlæsning"
|
144 |
+
|
145 |
+
#: edcal.php:297
|
146 |
+
msgid "Save"
|
147 |
+
msgstr "Gem"
|
148 |
+
|
149 |
+
#: edcal.php:298
|
150 |
+
msgid "Edit %1$s - %2$s"
|
151 |
+
msgstr "Rediger %1$s - %2$s"
|
152 |
+
|
153 |
+
#: edcal.php:299 edcal.php:462
|
154 |
+
msgid "Scheduled"
|
155 |
+
msgstr "Udgivet"
|
156 |
+
|
157 |
+
#: edcal.php:301
|
158 |
+
msgid "You are about to delete the post \""
|
159 |
+
msgstr "Du er ved at slette indlægget \""
|
160 |
+
|
161 |
+
#: edcal.php:302
|
162 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
163 |
+
msgstr "\". Tryk Annuller for at stoppe, OK for at slette."
|
164 |
+
|
165 |
+
#: edcal.php:304
|
166 |
+
msgid "Looks like someone else already moved this post."
|
167 |
+
msgstr "Det ser ud til at en anden allerede har flyttet dette indlæg."
|
168 |
+
|
169 |
+
#: edcal.php:305
|
170 |
+
msgid "You do not have permission to edit posts."
|
171 |
+
msgstr "Du har ikke adgang til at redigere indlæg."
|
172 |
+
|
173 |
+
#: edcal.php:306
|
174 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
175 |
+
msgstr "Ugyldig checksum for indlæg. Dette er oftest en cross-site script fejl."
|
176 |
+
|
177 |
+
#: edcal.php:307
|
178 |
+
msgid "There was an error contacting your blog."
|
179 |
+
msgstr "Der opstod en fejl under forbindelse til din blog."
|
180 |
+
|
181 |
+
#: edcal.php:309
|
182 |
+
msgid "Screen Options"
|
183 |
+
msgstr "Indstillinger for visning"
|
184 |
+
|
185 |
+
#: edcal.php:310
|
186 |
+
msgid "Colors"
|
187 |
+
msgstr "Farver"
|
188 |
+
|
189 |
+
#: edcal.php:311
|
190 |
+
msgid "Drafts: "
|
191 |
+
msgstr "Kladder:"
|
192 |
+
|
193 |
+
#: edcal.php:312
|
194 |
+
msgid "Apply"
|
195 |
+
msgstr "OK"
|
196 |
+
|
197 |
+
#: edcal.php:313
|
198 |
+
msgid "Show on screen"
|
199 |
+
msgstr "Vis på skærm"
|
200 |
+
|
201 |
+
#: edcal.php:314
|
202 |
+
msgid " weeks at a time"
|
203 |
+
msgstr " uger på en gang"
|
204 |
+
|
205 |
+
#: edcal.php:315
|
206 |
+
msgid "Show in Calendar Cell"
|
207 |
+
msgstr "Vis i kalender"
|
208 |
+
|
209 |
+
#: edcal.php:316
|
210 |
+
msgid "Author"
|
211 |
+
msgstr "Forfatter"
|
212 |
+
|
213 |
+
#: edcal.php:317 edcal.php:456
|
214 |
+
msgid "Status"
|
215 |
+
msgstr "Status"
|
216 |
+
|
217 |
+
#: edcal.php:318
|
218 |
+
msgid "Time of day"
|
219 |
+
msgstr "Tidspunkt"
|
220 |
+
|
221 |
+
#: edcal.php:319
|
222 |
+
msgid "An error occurred while loading the calendar: "
|
223 |
+
msgstr "Der skete en fejl under åbning af kalenderen:"
|
224 |
+
|
225 |
+
#: edcal.php:322
|
226 |
+
msgid "Select the number of weeks for the calendar to show."
|
227 |
+
msgstr "Vælg antal uger der skal vises i kalenderen."
|
228 |
+
|
229 |
+
#: edcal.php:333
|
230 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
231 |
+
msgstr "<h2>Vi er færdige</h2>Vi har nu indsamlet de nødvendige data. Tak fordi du hjalp os med at forbedre kalenderen."
|
232 |
+
|
233 |
+
#: edcal.php:383
|
234 |
+
msgid "Jump back"
|
235 |
+
msgstr "Tilbage"
|
236 |
+
|
237 |
+
#: edcal.php:385
|
238 |
+
msgid "Skip ahead"
|
239 |
+
msgstr "Frem"
|
240 |
+
|
241 |
+
#: edcal.php:388
|
242 |
+
msgid "Scroll the calendar and make the today visible"
|
243 |
+
msgstr "Gå til i dag"
|
244 |
+
|
245 |
+
#: edcal.php:388
|
246 |
+
msgid "Show Today"
|
247 |
+
msgstr "Vis i dag"
|
248 |
+
|
249 |
+
#: edcal.php:431
|
250 |
+
msgid "Edit Post"
|
251 |
+
msgstr "Rediger indlæg"
|
252 |
+
|
253 |
+
#: edcal.php:451
|
254 |
+
msgid "Time"
|
255 |
+
msgstr "Tidspunkt"
|
256 |
+
|
257 |
+
#: edcal.php:459
|
258 |
+
msgid "Draft"
|
259 |
+
msgstr "Kladde"
|
260 |
+
|
261 |
+
#: edcal.php:460
|
262 |
+
msgid "Pending Review"
|
263 |
+
msgstr "Afventer gennemlæsning"
|
264 |
+
|
265 |
+
#: edcal.php:729
|
266 |
+
msgid "Posts "
|
267 |
+
msgstr "Indlæg"
|
268 |
+
|
269 |
+
#: edcal.php:745
|
270 |
+
msgid "Post "
|
271 |
+
msgstr "Indlæg"
|
272 |
+
|
273 |
+
#: edcal.php:877 edcal.php:880
|
274 |
+
msgid "Error in deleting..."
|
275 |
+
msgstr "Fejl ved sletning..."
|
276 |
+
|
277 |
+
#: edcal.php:190 edcal.php:274
|
278 |
+
msgid "ltr"
|
279 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-de_DE.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-de_DE.po
ADDED
@@ -0,0 +1,307 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WordPress Editorial Calendar v1.4\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
7 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
14 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
15 |
+
"X-Poedit-Basepath: ..\n"
|
16 |
+
"X-Textdomain-Support: yes\n"
|
17 |
+
"Language: de_DE\n"
|
18 |
+
"X-Generator: Poedit 2.2.3\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
# @ editorial-calendar
|
22 |
+
#: edcal.php:90 edcal.php:112
|
23 |
+
msgid "Calendar"
|
24 |
+
msgstr "Kalender"
|
25 |
+
|
26 |
+
# @ editorial-calendar
|
27 |
+
#: edcal.php:240 edcal.php:464
|
28 |
+
msgid "en-US"
|
29 |
+
msgstr "de-DE"
|
30 |
+
|
31 |
+
# @ editorial-calendar
|
32 |
+
#: edcal.php:248
|
33 |
+
#, php-format
|
34 |
+
msgid "%1$s by %2$s"
|
35 |
+
msgstr "%1$s von %2$s"
|
36 |
+
|
37 |
+
# @ editorial-calendar
|
38 |
+
#: edcal.php:250
|
39 |
+
msgid "New Post"
|
40 |
+
msgstr "Neuer Beitrag"
|
41 |
+
|
42 |
+
# @ editorial-calendar
|
43 |
+
#: edcal.php:252
|
44 |
+
msgid " [DRAFT]"
|
45 |
+
msgstr "[ENTWURF]"
|
46 |
+
|
47 |
+
# @ editorial-calendar
|
48 |
+
#: edcal.php:253
|
49 |
+
msgid " [PENDING]"
|
50 |
+
msgstr "[AUSSTEHEND]"
|
51 |
+
|
52 |
+
# @ editorial-calendar
|
53 |
+
#: edcal.php:254
|
54 |
+
msgid " [STICKY]"
|
55 |
+
msgstr "[STICKY]"
|
56 |
+
|
57 |
+
# @ editorial-calendar
|
58 |
+
#: edcal.php:255
|
59 |
+
msgid " [DRAFT, STICKY]"
|
60 |
+
msgstr "[Entwurf, STICKY]"
|
61 |
+
|
62 |
+
# @ editorial-calendar
|
63 |
+
#: edcal.php:256
|
64 |
+
msgid " [PENDING, STICKY]"
|
65 |
+
msgstr "[AUSSTEHEND, STICKY]"
|
66 |
+
|
67 |
+
# @ editorial-calendar
|
68 |
+
#: edcal.php:257 edcal.php:261
|
69 |
+
msgid "Edit"
|
70 |
+
msgstr "Bearbeiten"
|
71 |
+
|
72 |
+
# @ editorial-calendar
|
73 |
+
#: edcal.php:258
|
74 |
+
msgid "Quick Edit"
|
75 |
+
msgstr "Quick Edit"
|
76 |
+
|
77 |
+
# @ editorial-calendar
|
78 |
+
#: edcal.php:259
|
79 |
+
msgid "Delete"
|
80 |
+
msgstr "Löschen"
|
81 |
+
|
82 |
+
# @ editorial-calendar
|
83 |
+
#: edcal.php:260
|
84 |
+
msgid "View"
|
85 |
+
msgstr "anschauen"
|
86 |
+
|
87 |
+
# @ editorial-calendar
|
88 |
+
#: edcal.php:262
|
89 |
+
msgid "Status:"
|
90 |
+
msgstr "Status:"
|
91 |
+
|
92 |
+
# @ editorial-calendar
|
93 |
+
#: edcal.php:263 edcal.php:433
|
94 |
+
msgid "Cancel"
|
95 |
+
msgstr "abbrechen"
|
96 |
+
|
97 |
+
# @ editorial-calendar
|
98 |
+
#: edcal.php:264 edcal.php:396
|
99 |
+
msgid "Title"
|
100 |
+
msgstr "Titel"
|
101 |
+
|
102 |
+
# @ editorial-calendar
|
103 |
+
#: edcal.php:265 edcal.php:401
|
104 |
+
msgid "Content"
|
105 |
+
msgstr "Inhalt"
|
106 |
+
|
107 |
+
# @ editorial-calendar
|
108 |
+
#: edcal.php:266
|
109 |
+
#, php-format
|
110 |
+
msgid "Add a new post on %s"
|
111 |
+
msgstr "Einen neuen Beitrag am %s hinzufügen"
|
112 |
+
|
113 |
+
# @ editorial-calendar
|
114 |
+
#: edcal.php:267
|
115 |
+
#, php-format
|
116 |
+
msgid "New %s - "
|
117 |
+
msgstr "Neu %s - "
|
118 |
+
|
119 |
+
# @ editorial-calendar
|
120 |
+
#: edcal.php:268
|
121 |
+
msgid "Update"
|
122 |
+
msgstr "Update"
|
123 |
+
|
124 |
+
# @ editorial-calendar
|
125 |
+
#: edcal.php:269 edcal.php:432
|
126 |
+
msgid "Schedule"
|
127 |
+
msgstr "planen"
|
128 |
+
|
129 |
+
# @ editorial-calendar
|
130 |
+
#: edcal.php:270
|
131 |
+
msgid "Submit for Review"
|
132 |
+
msgstr "Fertig"
|
133 |
+
|
134 |
+
# @ editorial-calendar
|
135 |
+
#: edcal.php:271
|
136 |
+
msgid "Save"
|
137 |
+
msgstr "Speichern"
|
138 |
+
|
139 |
+
# @ editorial-calendar
|
140 |
+
#: edcal.php:272
|
141 |
+
#, php-format
|
142 |
+
msgid "Edit %1$s - %2$s"
|
143 |
+
msgstr "Ändere von %1$s - %2$s"
|
144 |
+
|
145 |
+
# @ editorial-calendar
|
146 |
+
#: edcal.php:273 edcal.php:418
|
147 |
+
msgid "Scheduled"
|
148 |
+
msgstr "Geplant"
|
149 |
+
|
150 |
+
# @ editorial-calendar
|
151 |
+
#: edcal.php:275
|
152 |
+
msgid "You are about to delete the post \""
|
153 |
+
msgstr "Wirklich löschen? \""
|
154 |
+
|
155 |
+
# @ editorial-calendar
|
156 |
+
#: edcal.php:276
|
157 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
158 |
+
msgstr "\" Klicke abbrechen oder okay um fortzufahren"
|
159 |
+
|
160 |
+
# @ editorial-calendar
|
161 |
+
#: edcal.php:278
|
162 |
+
msgid "Looks like someone else already moved this post."
|
163 |
+
msgstr "Jemand hat den Artikel verschoben"
|
164 |
+
|
165 |
+
# @ editorial-calendar
|
166 |
+
#: edcal.php:279
|
167 |
+
msgid "You do not have permission to edit posts."
|
168 |
+
msgstr "Du hast nicht die Rechte, um Artikel zu editieren"
|
169 |
+
|
170 |
+
# @ editorial-calendar
|
171 |
+
#: edcal.php:280
|
172 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
173 |
+
msgstr "Falsche Checksumme. Möglicherweise ein cross-site-Fehler"
|
174 |
+
|
175 |
+
# @ editorial-calendar
|
176 |
+
#: edcal.php:281
|
177 |
+
msgid "There was an error contacting your blog."
|
178 |
+
msgstr "Verbindungsfehler"
|
179 |
+
|
180 |
+
# @ editorial-calendar
|
181 |
+
#: edcal.php:283
|
182 |
+
msgid "Screen Options"
|
183 |
+
msgstr "Ansichtsoptionen"
|
184 |
+
|
185 |
+
# @ editorial-calendar
|
186 |
+
#: edcal.php:284
|
187 |
+
msgid "Colors"
|
188 |
+
msgstr "Farben"
|
189 |
+
|
190 |
+
# @ editorial-calendar
|
191 |
+
#: edcal.php:285
|
192 |
+
msgid "Drafts: "
|
193 |
+
msgstr "Entwürfe:"
|
194 |
+
|
195 |
+
# @ editorial-calendar
|
196 |
+
#: edcal.php:286
|
197 |
+
msgid "Apply"
|
198 |
+
msgstr "Anwenden"
|
199 |
+
|
200 |
+
# @ editorial-calendar
|
201 |
+
#: edcal.php:287
|
202 |
+
msgid "Show on screen"
|
203 |
+
msgstr "Auf dem Bildschirm anzeigen"
|
204 |
+
|
205 |
+
# @ editorial-calendar
|
206 |
+
#: edcal.php:288
|
207 |
+
msgid " weeks at a time"
|
208 |
+
msgstr "Wochen"
|
209 |
+
|
210 |
+
# @ editorial-calendar
|
211 |
+
#: edcal.php:289
|
212 |
+
msgid "Show in Calendar Cell"
|
213 |
+
msgstr "In Kalenderbox anzeigen"
|
214 |
+
|
215 |
+
# @ editorial-calendar
|
216 |
+
#: edcal.php:290
|
217 |
+
msgid "Author"
|
218 |
+
msgstr "Autor"
|
219 |
+
|
220 |
+
# @ editorial-calendar
|
221 |
+
#: edcal.php:291 edcal.php:412
|
222 |
+
msgid "Status"
|
223 |
+
msgstr "Status"
|
224 |
+
|
225 |
+
# @ editorial-calendar
|
226 |
+
#: edcal.php:292
|
227 |
+
msgid "Time of day"
|
228 |
+
msgstr "Uhrzeit"
|
229 |
+
|
230 |
+
# @ editorial-calendar
|
231 |
+
#: edcal.php:293
|
232 |
+
msgid "An error occurred while loading the calendar: "
|
233 |
+
msgstr "Ein Fehler beim Laden des Kalenders:"
|
234 |
+
|
235 |
+
# @ editorial-calendar
|
236 |
+
#: edcal.php:295
|
237 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
238 |
+
msgstr "Der Kalender zeigt zwischen einer und fünf Wochen an."
|
239 |
+
|
240 |
+
# @ editorial-calendar
|
241 |
+
#: edcal.php:296
|
242 |
+
msgid "Select the number of weeks for the calendar to show."
|
243 |
+
msgstr "Wochen"
|
244 |
+
|
245 |
+
# @ editorial-calendar
|
246 |
+
#: edcal.php:302
|
247 |
+
msgid "<div id=\"feedbacksection\"><h2>Help us Make the Editorial Calendar Better</h2>We are always trying to improve the Editorial Calendar and you can help. May we collect some data about your blog and browser settings to help us improve this plugin? We'll only do it once and your blog will show up on our <a target=\"_blank\" href=\"http://www.zackgrossbart.com/edcal/mint/\">Editorial Calendar Statistics page</a>.<br /><br /><button class=\"button-secondary\" onclick=\"edcal.doFeedback();\">Collect Anonymous Data</button> <a href=\"#\" id=\"nofeedbacklink\" onclick=\"edcal.noFeedback(); return false;\">No thank you</a></div>"
|
248 |
+
msgstr "<div id=\"feedbacksection\"><h2>Hilf uns Editorial Calendar zu verbessern</h2>Wir sind bestrebt, Editoral Calender zu verbessern. Dabei kannst du uns helfen. Sende uns einige Daten über deinen Blog und deinen Browser. Das passiert einmalig und du stehst auf unserer <a target=\"_blank\" href=\"http://www.zackgrossbart.com/edcal/mint/\">Editorial Calendar Statistics Seite</a>.<br /><br /><button class=\"button-secondary\" onclick=\"edcal.doFeedback();\">Daten anonym senden</button> <a href=\"#\" id=\"nofeedbacklink\" onclick=\"edcal.noFeedback(); return false;\">Nein, lieber nicht.</a></div>"
|
249 |
+
|
250 |
+
# @ editorial-calendar
|
251 |
+
#: edcal.php:304
|
252 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
253 |
+
msgstr "<h2>Erledigt!</h2>Die Daten wurden übertragen. Vielen Dank für deine Hilfe. "
|
254 |
+
|
255 |
+
# @ editorial-calendar
|
256 |
+
#: edcal.php:345
|
257 |
+
msgid " Calendar"
|
258 |
+
msgstr "Kalender"
|
259 |
+
|
260 |
+
# @ editorial-calendar
|
261 |
+
#: edcal.php:354
|
262 |
+
msgid "Jump back"
|
263 |
+
msgstr "Zurück"
|
264 |
+
|
265 |
+
# @ editorial-calendar
|
266 |
+
#: edcal.php:356
|
267 |
+
msgid "Skip ahead"
|
268 |
+
msgstr "Vor"
|
269 |
+
|
270 |
+
# @ editorial-calendar
|
271 |
+
#: edcal.php:361
|
272 |
+
msgid "Scroll the calendar and make the today visible"
|
273 |
+
msgstr "Zum heutigen Tag springen"
|
274 |
+
|
275 |
+
# @ editorial-calendar
|
276 |
+
#: edcal.php:361
|
277 |
+
msgid "Show Today"
|
278 |
+
msgstr "Heute"
|
279 |
+
|
280 |
+
# @ editorial-calendar
|
281 |
+
#: edcal.php:387
|
282 |
+
msgid "Edit Post"
|
283 |
+
msgstr "Edit Post"
|
284 |
+
|
285 |
+
# @ editorial-calendar
|
286 |
+
#: edcal.php:407
|
287 |
+
msgid "Time"
|
288 |
+
msgstr "Zeit"
|
289 |
+
|
290 |
+
# @ editorial-calendar
|
291 |
+
#: edcal.php:415
|
292 |
+
msgid "Draft"
|
293 |
+
msgstr "Entwurf"
|
294 |
+
|
295 |
+
# @ editorial-calendar
|
296 |
+
#: edcal.php:416
|
297 |
+
msgid "Pending Review"
|
298 |
+
msgstr "fertig"
|
299 |
+
|
300 |
+
# @ default
|
301 |
+
#: edcal.php:735 edcal.php:738
|
302 |
+
msgid "Error in deleting..."
|
303 |
+
msgstr "Fehler beim Löschen ..."
|
304 |
+
|
305 |
+
#: edcal.php:190 edcal.php:274
|
306 |
+
msgid "ltr"
|
307 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-el.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-el.po
ADDED
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of the WordPress plugin by .
|
2 |
+
# Copyright (C) 2010
|
3 |
+
# This file is distributed under the same license as the package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
+
#
|
6 |
+
msgid ""
|
7 |
+
msgstr ""
|
8 |
+
"Project-Id-Version: editorial-calendar-el\n"
|
9 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
10 |
+
"POT-Creation-Date: 2010-04-13 21:19+0000\n"
|
11 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
12 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
13 |
+
"Language-Team: Mihalis Papanousis - http://aenaon.biz <fotonews@aenaon.biz>\n"
|
14 |
+
"MIME-Version: 1.0\n"
|
15 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
16 |
+
"Content-Transfer-Encoding: 8bit\n"
|
17 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
18 |
+
"Language: el_GR\n"
|
19 |
+
"X-Generator: Poedit 2.2.3\n"
|
20 |
+
|
21 |
+
#: edcal.php:63
|
22 |
+
msgid "Calendar"
|
23 |
+
msgstr "Ημερολόγιο άρθρων"
|
24 |
+
|
25 |
+
#: edcal.php:137 edcal.php:349
|
26 |
+
msgid "en-US"
|
27 |
+
msgstr "el-GR"
|
28 |
+
|
29 |
+
#: edcal.php:145
|
30 |
+
msgid "on"
|
31 |
+
msgstr "στις"
|
32 |
+
|
33 |
+
#: edcal.php:146
|
34 |
+
msgid "by"
|
35 |
+
msgstr "by-μέχρι"
|
36 |
+
|
37 |
+
#: edcal.php:147
|
38 |
+
msgid "at"
|
39 |
+
msgstr "στις"
|
40 |
+
|
41 |
+
#: edcal.php:149
|
42 |
+
msgid "New Post"
|
43 |
+
msgstr "Νέο άρθρο"
|
44 |
+
|
45 |
+
#: edcal.php:151
|
46 |
+
msgid " [DRAFT]"
|
47 |
+
msgstr " [ΠΡΟΣΧΕΔΙΟ]"
|
48 |
+
|
49 |
+
#: edcal.php:152
|
50 |
+
msgid "Edit"
|
51 |
+
msgstr "Επεξεργασία"
|
52 |
+
|
53 |
+
#: edcal.php:153
|
54 |
+
msgid "Delete"
|
55 |
+
msgstr "Διαγραφή"
|
56 |
+
|
57 |
+
#: edcal.php:154
|
58 |
+
msgid "View"
|
59 |
+
msgstr "Προβολή"
|
60 |
+
|
61 |
+
#: edcal.php:155
|
62 |
+
msgid "Republish"
|
63 |
+
msgstr "Επαναδημοσίευση"
|
64 |
+
|
65 |
+
#: edcal.php:156
|
66 |
+
msgid "Status:"
|
67 |
+
msgstr "Κατάσταση"
|
68 |
+
|
69 |
+
#: edcal.php:157 edcal.php:295
|
70 |
+
msgid "Cancel"
|
71 |
+
msgstr "Ακύρωση"
|
72 |
+
|
73 |
+
#: edcal.php:158 edcal.php:261
|
74 |
+
msgid "Title"
|
75 |
+
msgstr "Τίτλος"
|
76 |
+
|
77 |
+
#: edcal.php:159 edcal.php:266
|
78 |
+
msgid "Content"
|
79 |
+
msgstr "Κείμενο"
|
80 |
+
|
81 |
+
#: edcal.php:160
|
82 |
+
msgid "Add a new post on "
|
83 |
+
msgstr "Προσθήκη νέου άρθρου στις"
|
84 |
+
|
85 |
+
#: edcal.php:161
|
86 |
+
msgid "New Post - "
|
87 |
+
msgstr "Νέο άρθρο -"
|
88 |
+
|
89 |
+
#: edcal.php:162
|
90 |
+
msgid "Update"
|
91 |
+
msgstr "Ενημέρωση"
|
92 |
+
|
93 |
+
#: edcal.php:163 edcal.php:294
|
94 |
+
msgid "Schedule"
|
95 |
+
msgstr "Προγραμματισμός δημοσίευσης"
|
96 |
+
|
97 |
+
#: edcal.php:164
|
98 |
+
msgid "Save"
|
99 |
+
msgstr "Αποθήκευση"
|
100 |
+
|
101 |
+
#: edcal.php:165 edcal.php:255
|
102 |
+
msgid "Edit Post"
|
103 |
+
msgstr "Επεξεργασία άρθρου"
|
104 |
+
|
105 |
+
#: edcal.php:166 edcal.php:287
|
106 |
+
msgid "Scheduled"
|
107 |
+
msgstr "Να δημοσιευθεί στις"
|
108 |
+
|
109 |
+
#: edcal.php:168
|
110 |
+
msgid "You are about to delete the post \""
|
111 |
+
msgstr "Πρόκειται να διαγράψετε το άρθρο \""
|
112 |
+
|
113 |
+
#: edcal.php:169
|
114 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
115 |
+
msgstr "\". Πατήστε Ακύρωση για να σταματήσετε, OK για διαγραφή."
|
116 |
+
|
117 |
+
#: edcal.php:171
|
118 |
+
msgid "Looks like someone else already moved this post."
|
119 |
+
msgstr "Φαίνεται πως κάποιος άλλος ήδη μετακίνησε αυτό το άρθρο."
|
120 |
+
|
121 |
+
#: edcal.php:172
|
122 |
+
msgid "You do not have permission to edit posts."
|
123 |
+
msgstr "Δεν έχετε δικαιώματα επεξεργασίας άρθρων."
|
124 |
+
|
125 |
+
#: edcal.php:173
|
126 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
127 |
+
msgstr "Μη έγκυρο άθροισμα μνήμης. Συνήθως οφείλεται σε 'cross-site scripting' (XSS)."
|
128 |
+
|
129 |
+
#: edcal.php:174
|
130 |
+
msgid "There was an error contacting your blog."
|
131 |
+
msgstr "Υπήρξε σφάλμα επικοινωνίας με το ιστολόγιο σας."
|
132 |
+
|
133 |
+
#: edcal.php:176
|
134 |
+
msgid "Screen Options"
|
135 |
+
msgstr "Επιλογές οθόνης"
|
136 |
+
|
137 |
+
#: edcal.php:177
|
138 |
+
msgid "Calendar Options"
|
139 |
+
msgstr "Επιλογές ημερολογίου"
|
140 |
+
|
141 |
+
#: edcal.php:178
|
142 |
+
msgid "Apply"
|
143 |
+
msgstr "Εφαρμογή"
|
144 |
+
|
145 |
+
#: edcal.php:179
|
146 |
+
msgid "Show "
|
147 |
+
msgstr "Εμφάνιση"
|
148 |
+
|
149 |
+
#: edcal.php:180
|
150 |
+
msgid "weeks at a time"
|
151 |
+
msgstr "εβδομάδων ανα οθόνη"
|
152 |
+
|
153 |
+
#: edcal.php:181
|
154 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
155 |
+
msgstr "Το ημερολόγιο μπορεί να εμφανίσει απο 1 έως και 5 εβδομάδες ανα οθόνη."
|
156 |
+
|
157 |
+
#: edcal.php:182
|
158 |
+
msgid "Select the number of weeks for the calendar to show."
|
159 |
+
msgstr "Εισάγετε τον αριθμό των εβδομάδων (1-5) για εμφάνιση στην οθόνη του ημερολογίου."
|
160 |
+
|
161 |
+
#: edcal.php:226
|
162 |
+
msgid "Posts Calendar"
|
163 |
+
msgstr "Ημερολόγιο άρθρων"
|
164 |
+
|
165 |
+
#: edcal.php:235
|
166 |
+
msgid "Jump back"
|
167 |
+
msgstr "Μετάβαση μια οθόνη πίσω"
|
168 |
+
|
169 |
+
#: edcal.php:237
|
170 |
+
msgid "Skip ahead"
|
171 |
+
msgstr "Μετάβαση μια οθόνη μπροστά"
|
172 |
+
|
173 |
+
#: edcal.php:242
|
174 |
+
msgid "Jump to today"
|
175 |
+
msgstr "Μετάβαση στη σημερινή ημερομηνία"
|
176 |
+
|
177 |
+
#: edcal.php:242
|
178 |
+
msgid "Today"
|
179 |
+
msgstr "Σήμερα"
|
180 |
+
|
181 |
+
#: edcal.php:281
|
182 |
+
msgid "Time"
|
183 |
+
msgstr "Ώρα"
|
184 |
+
|
185 |
+
#: edcal.php:285
|
186 |
+
msgid "Status"
|
187 |
+
msgstr "Κατάσταση"
|
188 |
+
|
189 |
+
#: edcal.php:289
|
190 |
+
msgid "Draft"
|
191 |
+
msgstr "Προσχέδιο"
|
192 |
+
|
193 |
+
#: edcal.php:544 edcal.php:547
|
194 |
+
msgid "Error in deleting..."
|
195 |
+
msgstr "Υπήρξε σφάλμα κατα τη διαγραφή..."
|
196 |
+
|
197 |
+
#: edcal.php:190 edcal.php:274
|
198 |
+
msgid "ltr"
|
199 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-es_ES.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-es_ES.po
ADDED
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of WordPress Editorial Calendar in Spanish (Spain)
|
2 |
+
# This file is distributed under the same license as the WordPress Editorial Calendar package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
10 |
+
"X-Generator: Poedit 2.2.3\n"
|
11 |
+
"Project-Id-Version: WordPress Editorial Calendar\n"
|
12 |
+
"POT-Creation-Date: \n"
|
13 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
14 |
+
"Language-Team: \n"
|
15 |
+
"Language: es_ES\n"
|
16 |
+
|
17 |
+
#: edcal.php:273 edcal.php:293
|
18 |
+
msgid "New Draft"
|
19 |
+
msgstr "Nuevo Borrador"
|
20 |
+
|
21 |
+
#: edcal.php:291
|
22 |
+
msgid "Add a new draft"
|
23 |
+
msgstr "Añadir nuevo borrador"
|
24 |
+
|
25 |
+
#: edcal.php:321
|
26 |
+
msgid "The calendar can only show between 1 and 8 weeks at a time."
|
27 |
+
msgstr "El calendario sólo puede mostrar entre 1 y 8 semanas a la vez."
|
28 |
+
|
29 |
+
#: edcal.php:324 edcal.php:395
|
30 |
+
msgid "Show Unscheduled Drafts"
|
31 |
+
msgstr "Mostrar entradas no programadas"
|
32 |
+
|
33 |
+
#: edcal.php:325
|
34 |
+
msgid "Hide Unscheduled Drafts"
|
35 |
+
msgstr "Ocultar entradas no programadas"
|
36 |
+
|
37 |
+
#: edcal.php:386
|
38 |
+
msgid "Scroll the calendar and make the last post visible"
|
39 |
+
msgstr "Ver lo último que figura programado"
|
40 |
+
|
41 |
+
#: edcal.php:395
|
42 |
+
msgid "Show unscheduled posts"
|
43 |
+
msgstr "Mostrar entradas no programadas"
|
44 |
+
|
45 |
+
#: edcal.php:401
|
46 |
+
msgid "Unscheduled draft posts"
|
47 |
+
msgstr "Borradores de Entradas No Programadas"
|
48 |
+
|
49 |
+
#: edcal.php:401
|
50 |
+
msgid "Unscheduled"
|
51 |
+
msgstr "No Programado"
|
52 |
+
|
53 |
+
#: edcal.php:374
|
54 |
+
msgid "%1$s Calendar"
|
55 |
+
msgstr "Calendario de %1$s"
|
56 |
+
|
57 |
+
#: edcal.php:96 edcal.php:120
|
58 |
+
msgid "Calendar"
|
59 |
+
msgstr "Calendario"
|
60 |
+
|
61 |
+
#: edcal.php:262 edcal.php:531
|
62 |
+
msgid "en-US"
|
63 |
+
msgstr "es-ES"
|
64 |
+
|
65 |
+
#: edcal.php:270
|
66 |
+
msgid "%1$s by %2$s"
|
67 |
+
msgstr "%1$s por %2$s"
|
68 |
+
|
69 |
+
#: edcal.php:272
|
70 |
+
msgid "New Post"
|
71 |
+
msgstr "Nueva Entrada"
|
72 |
+
|
73 |
+
#: edcal.php:276
|
74 |
+
msgid " [DRAFT]"
|
75 |
+
msgstr " [BORRADOR]"
|
76 |
+
|
77 |
+
#: edcal.php:277
|
78 |
+
msgid " [PENDING]"
|
79 |
+
msgstr " [PENDIENTE]"
|
80 |
+
|
81 |
+
#: edcal.php:278
|
82 |
+
msgid " [STICKY]"
|
83 |
+
msgstr " [DESTACADO]"
|
84 |
+
|
85 |
+
#: edcal.php:279
|
86 |
+
msgid " [DRAFT, STICKY]"
|
87 |
+
msgstr " [BORRADOR, DESTACADO]"
|
88 |
+
|
89 |
+
#: edcal.php:280
|
90 |
+
msgid " [PENDING, STICKY]"
|
91 |
+
msgstr " [PENDIENTE, DESTACADO]"
|
92 |
+
|
93 |
+
#: edcal.php:281 edcal.php:285
|
94 |
+
msgid "Edit"
|
95 |
+
msgstr "Editar"
|
96 |
+
|
97 |
+
#: edcal.php:282
|
98 |
+
msgid "Quick Edit"
|
99 |
+
msgstr "Edición Rápida"
|
100 |
+
|
101 |
+
#: edcal.php:283
|
102 |
+
msgid "Delete"
|
103 |
+
msgstr "Eliminar"
|
104 |
+
|
105 |
+
#: edcal.php:284
|
106 |
+
msgid "View"
|
107 |
+
msgstr "Ver"
|
108 |
+
|
109 |
+
#: edcal.php:286
|
110 |
+
msgid "Status:"
|
111 |
+
msgstr "Estado:"
|
112 |
+
|
113 |
+
#: edcal.php:287 edcal.php:478
|
114 |
+
msgid "Cancel"
|
115 |
+
msgstr "Cancelar"
|
116 |
+
|
117 |
+
#: edcal.php:288 edcal.php:440
|
118 |
+
msgid "Title"
|
119 |
+
msgstr "Título"
|
120 |
+
|
121 |
+
#: edcal.php:289 edcal.php:445
|
122 |
+
msgid "Content"
|
123 |
+
msgstr "Contenido"
|
124 |
+
|
125 |
+
#: edcal.php:290
|
126 |
+
msgid "Add a new post on %s"
|
127 |
+
msgstr "Añadir nueva entrada en %s"
|
128 |
+
|
129 |
+
#: edcal.php:292
|
130 |
+
msgid "New %s - "
|
131 |
+
msgstr "Nuevo %s - "
|
132 |
+
|
133 |
+
#: edcal.php:294
|
134 |
+
msgid "Update"
|
135 |
+
msgstr "Actualizar"
|
136 |
+
|
137 |
+
#: edcal.php:295 edcal.php:477
|
138 |
+
msgid "Schedule"
|
139 |
+
msgstr "Programar"
|
140 |
+
|
141 |
+
#: edcal.php:296
|
142 |
+
msgid "Submit for Review"
|
143 |
+
msgstr "Enviar para revisión"
|
144 |
+
|
145 |
+
#: edcal.php:297
|
146 |
+
msgid "Save"
|
147 |
+
msgstr "Guardar"
|
148 |
+
|
149 |
+
#: edcal.php:298
|
150 |
+
msgid "Edit %1$s - %2$s"
|
151 |
+
msgstr "Editar %1$s - %2$s"
|
152 |
+
|
153 |
+
#: edcal.php:299 edcal.php:462
|
154 |
+
msgid "Scheduled"
|
155 |
+
msgstr "Programado"
|
156 |
+
|
157 |
+
#: edcal.php:301
|
158 |
+
msgid "You are about to delete the post \""
|
159 |
+
msgstr "Va a eliminar la entrada \""
|
160 |
+
|
161 |
+
#: edcal.php:302
|
162 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
163 |
+
msgstr "\". Presione Cancelar para detener, OK para eliminar."
|
164 |
+
|
165 |
+
#: edcal.php:304
|
166 |
+
msgid "Looks like someone else already moved this post."
|
167 |
+
msgstr "Parece que alguien ya ha movido esta entrada."
|
168 |
+
|
169 |
+
#: edcal.php:305
|
170 |
+
msgid "You do not have permission to edit posts."
|
171 |
+
msgstr "No tiene permiso para editar entradas."
|
172 |
+
|
173 |
+
#: edcal.php:306
|
174 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
175 |
+
msgstr "Error de verificación de la entrada. Esto suele ser un error de cross-site scripting."
|
176 |
+
|
177 |
+
#: edcal.php:307
|
178 |
+
msgid "There was an error contacting your blog."
|
179 |
+
msgstr "Hubo un error al comunicarse con su blog."
|
180 |
+
|
181 |
+
#: edcal.php:309
|
182 |
+
msgid "Screen Options"
|
183 |
+
msgstr "Opciones de pantalla"
|
184 |
+
|
185 |
+
#: edcal.php:310
|
186 |
+
msgid "Colors"
|
187 |
+
msgstr "Colores"
|
188 |
+
|
189 |
+
#: edcal.php:311
|
190 |
+
msgid "Drafts: "
|
191 |
+
msgstr "Borradores: "
|
192 |
+
|
193 |
+
#: edcal.php:312
|
194 |
+
msgid "Apply"
|
195 |
+
msgstr "Aplicar"
|
196 |
+
|
197 |
+
#: edcal.php:313
|
198 |
+
msgid "Show on screen"
|
199 |
+
msgstr "Mostrar en pantalla"
|
200 |
+
|
201 |
+
#: edcal.php:314
|
202 |
+
msgid " weeks at a time"
|
203 |
+
msgstr " semanas a la vez"
|
204 |
+
|
205 |
+
#: edcal.php:315
|
206 |
+
msgid "Show in Calendar Cell"
|
207 |
+
msgstr "Mostrar en la celda del calendario"
|
208 |
+
|
209 |
+
#: edcal.php:316
|
210 |
+
msgid "Author"
|
211 |
+
msgstr "Autor"
|
212 |
+
|
213 |
+
#: edcal.php:317 edcal.php:456
|
214 |
+
msgid "Status"
|
215 |
+
msgstr "Estado"
|
216 |
+
|
217 |
+
#: edcal.php:318
|
218 |
+
msgid "Time of day"
|
219 |
+
msgstr "En el dia"
|
220 |
+
|
221 |
+
#: edcal.php:319
|
222 |
+
msgid "An error occurred while loading the calendar: "
|
223 |
+
msgstr "Ha ocurrido un error al cargar el calendario: "
|
224 |
+
|
225 |
+
#: edcal.php:322
|
226 |
+
msgid "Select the number of weeks for the calendar to show."
|
227 |
+
msgstr "Seleccione el número de semanas para mostrar en el calendario."
|
228 |
+
|
229 |
+
#: edcal.php:333
|
230 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
231 |
+
msgstr "<h2>Listo!</h2>Hemos terminado de recolectar datos. Gracias por ayudarnos a mejorar este calendario."
|
232 |
+
|
233 |
+
#: edcal.php:383
|
234 |
+
msgid "Jump back"
|
235 |
+
msgstr "Atras"
|
236 |
+
|
237 |
+
#: edcal.php:385
|
238 |
+
msgid "Skip ahead"
|
239 |
+
msgstr "Adelante"
|
240 |
+
|
241 |
+
#: edcal.php:388
|
242 |
+
msgid "Scroll the calendar and make the today visible"
|
243 |
+
msgstr "Mover hasta el día de hoy"
|
244 |
+
|
245 |
+
#: edcal.php:388
|
246 |
+
msgid "Show Today"
|
247 |
+
msgstr "Hoy"
|
248 |
+
|
249 |
+
#: edcal.php:431
|
250 |
+
msgid "Edit Post"
|
251 |
+
msgstr "Editar Articulo"
|
252 |
+
|
253 |
+
#: edcal.php:451
|
254 |
+
msgid "Time"
|
255 |
+
msgstr "Hora"
|
256 |
+
|
257 |
+
#: edcal.php:459
|
258 |
+
msgid "Draft"
|
259 |
+
msgstr "Borrador"
|
260 |
+
|
261 |
+
#: edcal.php:460
|
262 |
+
msgid "Pending Review"
|
263 |
+
msgstr "Pendiente de revisión"
|
264 |
+
|
265 |
+
#: edcal.php:729
|
266 |
+
msgid "Posts "
|
267 |
+
msgstr "Entrada"
|
268 |
+
|
269 |
+
#: edcal.php:745
|
270 |
+
msgid "Post "
|
271 |
+
msgstr "Entradas"
|
272 |
+
|
273 |
+
#: edcal.php:877 edcal.php:880
|
274 |
+
msgid "Error in deleting..."
|
275 |
+
msgstr "Error al eliminar..."
|
276 |
+
|
277 |
+
#: edcal.php:190 edcal.php:274
|
278 |
+
msgid "ltr"
|
279 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-fr_FR.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-fr_FR.po
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of WordPress Editorial Calendar in French (France)
|
2 |
+
# This file is distributed under the same license as the WordPress Editorial Calendar package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Plural-Forms: nplurals=2; plural=n > 1;\n"
|
10 |
+
"X-Generator: Poedit 2.2.3\n"
|
11 |
+
"Project-Id-Version: WordPress Editorial Calendar\n"
|
12 |
+
"POT-Creation-Date: \n"
|
13 |
+
"Last-Translator: \n"
|
14 |
+
"Language-Team: \n"
|
15 |
+
"Language: fr_FR\n"
|
16 |
+
|
17 |
+
msgid "%1$s Calendar"
|
18 |
+
msgstr "Calendrier des %1$s"
|
19 |
+
|
20 |
+
msgid "Calendar"
|
21 |
+
msgstr "Calendrier"
|
22 |
+
|
23 |
+
msgid "en-US"
|
24 |
+
msgstr "fr-FR"
|
25 |
+
|
26 |
+
msgid "%1$s by %2$s"
|
27 |
+
msgstr "%1$s par %2$s"
|
28 |
+
|
29 |
+
msgid "New Post"
|
30 |
+
msgstr "Nouveau post"
|
31 |
+
|
32 |
+
msgid " [DRAFT]"
|
33 |
+
msgstr " [BROUILLON]"
|
34 |
+
|
35 |
+
msgid " [PENDING]"
|
36 |
+
msgstr " [EN ATTENTE]"
|
37 |
+
|
38 |
+
msgid " [STICKY]"
|
39 |
+
msgstr " [EN PRIORITÉ]"
|
40 |
+
|
41 |
+
msgid " [DRAFT, STICKY]"
|
42 |
+
msgstr " [BROUILLON, STICKY]"
|
43 |
+
|
44 |
+
msgid " [PENDING, STICKY]"
|
45 |
+
msgstr " [EN ATTENTE, EN PRIORITÉ]"
|
46 |
+
|
47 |
+
msgid "Edit"
|
48 |
+
msgstr "Éditer"
|
49 |
+
|
50 |
+
msgid "Quick Edit"
|
51 |
+
msgstr "Éditer rapide"
|
52 |
+
|
53 |
+
msgid "Delete"
|
54 |
+
msgstr "Supprimer"
|
55 |
+
|
56 |
+
msgid "View"
|
57 |
+
msgstr "Voir"
|
58 |
+
|
59 |
+
msgid "Status:"
|
60 |
+
msgstr "Statut :"
|
61 |
+
|
62 |
+
msgid "Cancel"
|
63 |
+
msgstr "Annuler"
|
64 |
+
|
65 |
+
msgid "Title"
|
66 |
+
msgstr "Titre"
|
67 |
+
|
68 |
+
msgid "Content"
|
69 |
+
msgstr "Contenu"
|
70 |
+
|
71 |
+
msgid "Add a new post on %s"
|
72 |
+
msgstr "Ajouter un article au %s"
|
73 |
+
|
74 |
+
msgid "New %s - "
|
75 |
+
msgstr "Nouveau %s - "
|
76 |
+
|
77 |
+
msgid "Update"
|
78 |
+
msgstr "Mettre à jour"
|
79 |
+
|
80 |
+
msgid "Schedule"
|
81 |
+
msgstr "Horaire"
|
82 |
+
|
83 |
+
msgid "Submit for Review"
|
84 |
+
msgstr "Soumettre pour revision"
|
85 |
+
|
86 |
+
msgid "Save"
|
87 |
+
msgstr "Sauvegarder"
|
88 |
+
|
89 |
+
msgid "Edit %1$s - %2$s"
|
90 |
+
msgstr "Éditer %1$s - %2$s"
|
91 |
+
|
92 |
+
msgid "Scheduled"
|
93 |
+
msgstr "Planifié"
|
94 |
+
|
95 |
+
msgid "You are about to delete the post \""
|
96 |
+
msgstr "Vous allez supprimer le post \""
|
97 |
+
|
98 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
99 |
+
msgstr "\". Cliquer OK pour confirmer."
|
100 |
+
|
101 |
+
msgid "Looks like someone else already moved this post."
|
102 |
+
msgstr "Quelqu'un d'autre a déjà déplacé ce post."
|
103 |
+
|
104 |
+
msgid "You do not have permission to edit posts."
|
105 |
+
msgstr "Vous n'avez pas les permissions d'éditer les posts."
|
106 |
+
|
107 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
108 |
+
msgstr "Désolé, les donnés de l'article sont corrompu, il se peut que ce soit une erreur de 'cross-site scripting' (XSS)."
|
109 |
+
|
110 |
+
msgid "There was an error contacting your blog."
|
111 |
+
msgstr "Une erreur est survenue en contactant votre blog."
|
112 |
+
|
113 |
+
msgid "Screen Options"
|
114 |
+
msgstr "Options d'affichage"
|
115 |
+
|
116 |
+
msgid "Colors"
|
117 |
+
msgstr "Couleurs"
|
118 |
+
|
119 |
+
msgid "Drafts: "
|
120 |
+
msgstr "Brouillons:"
|
121 |
+
|
122 |
+
msgid "Apply"
|
123 |
+
msgstr "Appliquer"
|
124 |
+
|
125 |
+
msgid "Show on screen"
|
126 |
+
msgstr "Afficher"
|
127 |
+
|
128 |
+
msgid " weeks at a time"
|
129 |
+
msgstr "semaines à la fois"
|
130 |
+
|
131 |
+
msgid "Show in Calendar Cell"
|
132 |
+
msgstr "Afficher en calendrier"
|
133 |
+
|
134 |
+
msgid "Author"
|
135 |
+
msgstr "Auteur"
|
136 |
+
|
137 |
+
msgid "Status"
|
138 |
+
msgstr "Statut"
|
139 |
+
|
140 |
+
msgid "Time of day"
|
141 |
+
msgstr "Heure"
|
142 |
+
|
143 |
+
msgid "An error occurred while loading the calendar: "
|
144 |
+
msgstr "Il y a eu un erreur en chargement du calendrier : "
|
145 |
+
|
146 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
147 |
+
msgstr "Le calendrier ne peut afficher qu'une à cinq semaines à la fois."
|
148 |
+
|
149 |
+
msgid "Select the number of weeks for the calendar to show."
|
150 |
+
msgstr "Sélectionner le nombre de semaines à afficher au calendrier."
|
151 |
+
|
152 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
153 |
+
msgstr "<h2>C'est tout !</h2>On a tout finit. Merci de nous aider à améliorer le calendrier."
|
154 |
+
|
155 |
+
msgid "Jump back"
|
156 |
+
msgstr "Mois précédent"
|
157 |
+
|
158 |
+
msgid "Skip ahead"
|
159 |
+
msgstr "Mois suivant"
|
160 |
+
|
161 |
+
msgid "Scroll the calendar and make the today visible"
|
162 |
+
msgstr "Sauter à aujourd'hui"
|
163 |
+
|
164 |
+
msgid "Show Today"
|
165 |
+
msgstr "Voir aujourd'hui"
|
166 |
+
|
167 |
+
msgid "Edit Post"
|
168 |
+
msgstr "Éditer l'article"
|
169 |
+
|
170 |
+
msgid "Time"
|
171 |
+
msgstr "Heure"
|
172 |
+
|
173 |
+
msgid "Draft"
|
174 |
+
msgstr "Brouillon"
|
175 |
+
|
176 |
+
msgid "Pending Review"
|
177 |
+
msgstr "En attente de relecture"
|
178 |
+
|
179 |
+
msgid "Posts "
|
180 |
+
msgstr "Articles"
|
181 |
+
|
182 |
+
msgid "Post "
|
183 |
+
msgstr "Article"
|
184 |
+
|
185 |
+
msgid "Error in deleting..."
|
186 |
+
msgstr "Erreur en supprimant..."
|
187 |
+
|
188 |
+
msgid "ltr"
|
189 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-he_IL.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-he_IL.po
ADDED
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2012
|
2 |
+
# This file is distributed under the same license as the package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: \n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
7 |
+
"POT-Creation-Date: 2012-02-07 11:33:49+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
12 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
13 |
+
"Language-Team: Zack Grossbart <zack@grossbart.com>\n"
|
14 |
+
"Language: he_IL\n"
|
15 |
+
"X-Generator: Poedit 2.2.3\n"
|
16 |
+
|
17 |
+
#: edcal.php:90 edcal.php:114
|
18 |
+
msgid "Calendar"
|
19 |
+
msgstr "לוח שנה"
|
20 |
+
|
21 |
+
#: edcal.php:242 edcal.php:466
|
22 |
+
msgid "en-US"
|
23 |
+
msgstr "he-IL"
|
24 |
+
|
25 |
+
#: edcal.php:250
|
26 |
+
msgid "%1$s by %2$s"
|
27 |
+
msgstr "%1$s פורסם על ידי: %2$s"
|
28 |
+
|
29 |
+
#: edcal.php:252
|
30 |
+
msgid "New Post"
|
31 |
+
msgstr "פוסט חדש"
|
32 |
+
|
33 |
+
#: edcal.php:254
|
34 |
+
msgid " [DRAFT]"
|
35 |
+
msgstr "[טיוטה]"
|
36 |
+
|
37 |
+
#: edcal.php:255
|
38 |
+
msgid " [PENDING]"
|
39 |
+
msgstr "[ממתין לאישור]"
|
40 |
+
|
41 |
+
#: edcal.php:256
|
42 |
+
msgid " [STICKY]"
|
43 |
+
msgstr "[דביק]"
|
44 |
+
|
45 |
+
#: edcal.php:257
|
46 |
+
msgid " [DRAFT, STICKY]"
|
47 |
+
msgstr "[טיוטה, דביק]"
|
48 |
+
|
49 |
+
#: edcal.php:258
|
50 |
+
msgid " [PENDING, STICKY]"
|
51 |
+
msgstr "[ממתין לאישור, דביק]"
|
52 |
+
|
53 |
+
#: edcal.php:259 edcal.php:263
|
54 |
+
msgid "Edit"
|
55 |
+
msgstr "עריכה"
|
56 |
+
|
57 |
+
#: edcal.php:260
|
58 |
+
msgid "Quick Edit"
|
59 |
+
msgstr "עריכה מהירה"
|
60 |
+
|
61 |
+
#: edcal.php:261
|
62 |
+
msgid "Delete"
|
63 |
+
msgstr "מחק"
|
64 |
+
|
65 |
+
#: edcal.php:262
|
66 |
+
msgid "View"
|
67 |
+
msgstr "הצג"
|
68 |
+
|
69 |
+
#: edcal.php:264
|
70 |
+
msgid "Status:"
|
71 |
+
msgstr "מצב:"
|
72 |
+
|
73 |
+
#: edcal.php:265 edcal.php:435
|
74 |
+
msgid "Cancel"
|
75 |
+
msgstr "בטל"
|
76 |
+
|
77 |
+
#: edcal.php:266 edcal.php:398
|
78 |
+
msgid "Title"
|
79 |
+
msgstr "כותרת"
|
80 |
+
|
81 |
+
#: edcal.php:267 edcal.php:403
|
82 |
+
msgid "Content"
|
83 |
+
msgstr "תוכן"
|
84 |
+
|
85 |
+
#: edcal.php:268
|
86 |
+
msgid "Add a new post on %s"
|
87 |
+
msgstr "הוסף פוסט חדש ב %s"
|
88 |
+
|
89 |
+
#: edcal.php:269
|
90 |
+
msgid "New %s - "
|
91 |
+
msgstr "%s חדש -"
|
92 |
+
|
93 |
+
#: edcal.php:270
|
94 |
+
msgid "Update"
|
95 |
+
msgstr "עדכן"
|
96 |
+
|
97 |
+
#: edcal.php:271 edcal.php:434
|
98 |
+
msgid "Schedule"
|
99 |
+
msgstr "מתוזמן"
|
100 |
+
|
101 |
+
#: edcal.php:272
|
102 |
+
msgid "Submit for Review"
|
103 |
+
msgstr "הגש לבדיקה"
|
104 |
+
|
105 |
+
#: edcal.php:273
|
106 |
+
msgid "Save"
|
107 |
+
msgstr "שמור"
|
108 |
+
|
109 |
+
#: edcal.php:274
|
110 |
+
msgid "Edit %1$s - %2$s"
|
111 |
+
msgstr "ערוך %1$s - %2$s"
|
112 |
+
|
113 |
+
#: edcal.php:275 edcal.php:420
|
114 |
+
msgid "Scheduled"
|
115 |
+
msgstr "מתוזמן"
|
116 |
+
|
117 |
+
#: edcal.php:277
|
118 |
+
msgid "You are about to delete the post \""
|
119 |
+
msgstr "הינך עומד למחוק את הפוסט \""
|
120 |
+
|
121 |
+
#: edcal.php:278
|
122 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
123 |
+
msgstr "\". לחץ על ביטול לעצורת אישור למחיקה."
|
124 |
+
|
125 |
+
#: edcal.php:280
|
126 |
+
msgid "Looks like someone else already moved this post."
|
127 |
+
msgstr "נראה שמישהו כבר הזיז פוסט זה."
|
128 |
+
|
129 |
+
#: edcal.php:281
|
130 |
+
msgid "You do not have permission to edit posts."
|
131 |
+
msgstr "אין לך הרשאה לערוך פוסטים."
|
132 |
+
|
133 |
+
#: edcal.php:282
|
134 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
135 |
+
msgstr "בדיקות שגויות עבור הפוסט. דבר זה קורה לעיתים עקב שגיאה בסקריפט חוצה אתר."
|
136 |
+
|
137 |
+
#: edcal.php:283
|
138 |
+
msgid "There was an error contacting your blog."
|
139 |
+
msgstr "אירעה שגיאה בהתחברות לאתר/בלוג שלך."
|
140 |
+
|
141 |
+
#: edcal.php:285
|
142 |
+
msgid "Screen Options"
|
143 |
+
msgstr "הצג אפשרויות תצוגה"
|
144 |
+
|
145 |
+
#: edcal.php:286
|
146 |
+
msgid "Colors"
|
147 |
+
msgstr "צבעים"
|
148 |
+
|
149 |
+
#: edcal.php:287
|
150 |
+
msgid "Drafts: "
|
151 |
+
msgstr "טיוטות:"
|
152 |
+
|
153 |
+
#: edcal.php:288
|
154 |
+
msgid "Apply"
|
155 |
+
msgstr "החל שינויים"
|
156 |
+
|
157 |
+
#: edcal.php:289
|
158 |
+
msgid "Show on screen"
|
159 |
+
msgstr "הצג על המסך"
|
160 |
+
|
161 |
+
#: edcal.php:290
|
162 |
+
msgid " weeks at a time"
|
163 |
+
msgstr "שבועות בכל תצוגה"
|
164 |
+
|
165 |
+
#: edcal.php:291
|
166 |
+
msgid "Show in Calendar Cell"
|
167 |
+
msgstr "הצג בתאי לוח שנה"
|
168 |
+
|
169 |
+
#: edcal.php:292
|
170 |
+
msgid "Author"
|
171 |
+
msgstr "מחבר הפוסט"
|
172 |
+
|
173 |
+
#: edcal.php:293 edcal.php:414
|
174 |
+
msgid "Status"
|
175 |
+
msgstr "סטטוס הפוסט"
|
176 |
+
|
177 |
+
#: edcal.php:294
|
178 |
+
msgid "Time of day"
|
179 |
+
msgstr "השעה ביום"
|
180 |
+
|
181 |
+
#: edcal.php:295
|
182 |
+
msgid "An error occurred while loading the calendar: "
|
183 |
+
msgstr "אירעה שגיאה בזמן טעינת לוח השנה:"
|
184 |
+
|
185 |
+
#: edcal.php:297
|
186 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
187 |
+
msgstr "לוח השנה יכול להציג בין שבוע ל חמישה שבועות כל פעם."
|
188 |
+
|
189 |
+
#: edcal.php:298
|
190 |
+
msgid "Select the number of weeks for the calendar to show."
|
191 |
+
msgstr "בחר את מספר השבועות שיוצגו בלוח השנה."
|
192 |
+
|
193 |
+
#: edcal.php:306
|
194 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
195 |
+
msgstr "<h2>זהו, סיימנו!</h2> סיימנו לאסוף את המידע הדרוש. תודה שעזרת לנו להפוך את לוח השנה ליותר טוב.. "
|
196 |
+
|
197 |
+
#: edcal.php:347
|
198 |
+
msgid " Calendar"
|
199 |
+
msgstr "לוח שנה"
|
200 |
+
|
201 |
+
#: edcal.php:356
|
202 |
+
msgid "Jump back"
|
203 |
+
msgstr "דלג אחורה"
|
204 |
+
|
205 |
+
#: edcal.php:358
|
206 |
+
msgid "Skip ahead"
|
207 |
+
msgstr "דלג קדימה"
|
208 |
+
|
209 |
+
#: edcal.php:363
|
210 |
+
msgid "Scroll the calendar and make the today visible"
|
211 |
+
msgstr "גלול את לוח השנה והצג את היום גלוי"
|
212 |
+
|
213 |
+
#: edcal.php:363
|
214 |
+
msgid "Show Today"
|
215 |
+
msgstr "הצג את היום"
|
216 |
+
|
217 |
+
#: edcal.php:389
|
218 |
+
msgid "Edit Post"
|
219 |
+
msgstr "ערוך פוסט"
|
220 |
+
|
221 |
+
#: edcal.php:409
|
222 |
+
msgid "Time"
|
223 |
+
msgstr "זמן פרסום הפוסט"
|
224 |
+
|
225 |
+
#: edcal.php:417
|
226 |
+
msgid "Draft"
|
227 |
+
msgstr "טיוטה"
|
228 |
+
|
229 |
+
#: edcal.php:418
|
230 |
+
msgid "Pending Review"
|
231 |
+
msgstr "ממתין לאישור"
|
232 |
+
|
233 |
+
#: edcal.php:617
|
234 |
+
msgid "Posts "
|
235 |
+
msgstr "פוסטים "
|
236 |
+
|
237 |
+
#: edcal.php:633
|
238 |
+
msgid "Post "
|
239 |
+
msgstr "פוסט"
|
240 |
+
|
241 |
+
#: edcal.php:737 edcal.php:740
|
242 |
+
msgid "Error in deleting..."
|
243 |
+
msgstr "שגיאה במחיקה..."
|
244 |
+
|
245 |
+
#: edcal.php:185
|
246 |
+
msgid "ltr"
|
247 |
+
msgstr "rtl"
|
3.7.8/languages/editorial-calendar-hr.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-hr.po
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of the WordPress plugin by .
|
2 |
+
# Copyright (C) 2010
|
3 |
+
# This file is distributed under the same license as the package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
+
#
|
6 |
+
msgid ""
|
7 |
+
msgstr ""
|
8 |
+
"Project-Id-Version: \n"
|
9 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
10 |
+
"POT-Creation-Date: 2010-01-02 21:49+0000\n"
|
11 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
12 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
13 |
+
"MIME-Version: 1.0\n"
|
14 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
15 |
+
"Content-Transfer-Encoding: 8bit\n"
|
16 |
+
"Language-Team: \n"
|
17 |
+
"Language: hr\n"
|
18 |
+
"X-Generator: Poedit 2.2.3\n"
|
19 |
+
|
20 |
+
#: edcal.php:53
|
21 |
+
msgid "Calendar"
|
22 |
+
msgstr "Kalendar"
|
23 |
+
|
24 |
+
#: edcal.php:116
|
25 |
+
msgid "en-US"
|
26 |
+
msgstr "hr-HR"
|
27 |
+
|
28 |
+
#: edcal.php:124
|
29 |
+
msgid "on"
|
30 |
+
msgstr "na"
|
31 |
+
|
32 |
+
#: edcal.php:125
|
33 |
+
msgid "by"
|
34 |
+
msgstr "do"
|
35 |
+
|
36 |
+
#: edcal.php:126
|
37 |
+
msgid "at"
|
38 |
+
msgstr "u"
|
39 |
+
|
40 |
+
#: edcal.php:128
|
41 |
+
msgid "Sunday"
|
42 |
+
msgstr "Nedjelja"
|
43 |
+
|
44 |
+
#: edcal.php:129
|
45 |
+
msgid "Monday"
|
46 |
+
msgstr "Ponedjeljak"
|
47 |
+
|
48 |
+
#: edcal.php:130
|
49 |
+
msgid "Tuesday"
|
50 |
+
msgstr "Utorak"
|
51 |
+
|
52 |
+
#: edcal.php:131
|
53 |
+
msgid "Wednesday"
|
54 |
+
msgstr "Srijeda"
|
55 |
+
|
56 |
+
#: edcal.php:132
|
57 |
+
msgid "Thursday"
|
58 |
+
msgstr "Cetvrtak"
|
59 |
+
|
60 |
+
#: edcal.php:133
|
61 |
+
msgid "Friday"
|
62 |
+
msgstr "Petar"
|
63 |
+
|
64 |
+
#: edcal.php:134
|
65 |
+
msgid "Saturday"
|
66 |
+
msgstr "Subota"
|
67 |
+
|
68 |
+
#: edcal.php:136
|
69 |
+
msgid "Edit"
|
70 |
+
msgstr "Uredi"
|
71 |
+
|
72 |
+
#: edcal.php:137
|
73 |
+
msgid "Delete"
|
74 |
+
msgstr "Izbrisi"
|
75 |
+
|
76 |
+
#: edcal.php:138
|
77 |
+
msgid "View"
|
78 |
+
msgstr "Pregledaj"
|
79 |
+
|
80 |
+
#: edcal.php:139
|
81 |
+
msgid "Status:"
|
82 |
+
msgstr "Status:"
|
83 |
+
|
84 |
+
#: edcal.php:140
|
85 |
+
msgid "Cancel"
|
86 |
+
msgstr "Prekini"
|
87 |
+
|
88 |
+
#: edcal.php:141
|
89 |
+
msgid "Post Title:"
|
90 |
+
msgstr "Naslov clanka:"
|
91 |
+
|
92 |
+
#: edcal.php:142
|
93 |
+
msgid "Save Draft"
|
94 |
+
msgstr "Spremite predlozak"
|
95 |
+
|
96 |
+
#: edcal.php:143
|
97 |
+
msgid "Save and Edit Draft"
|
98 |
+
msgstr "Spremite predlozak i uredite ga"
|
99 |
+
|
100 |
+
#: edcal.php:144
|
101 |
+
msgid "Add a new post on "
|
102 |
+
msgstr "Dodajte novi clanak za "
|
103 |
+
|
104 |
+
#: edcal.php:146
|
105 |
+
msgid "You are about to delete this post "
|
106 |
+
msgstr "Izbrisati cete clanak "
|
107 |
+
|
108 |
+
#: edcal.php:147
|
109 |
+
msgid "Press cancel to stop, OK to delete."
|
110 |
+
msgstr "Kliknite prekini kako biste zaustavili akciju, Ok kako biste izbrisali."
|
111 |
+
|
112 |
+
#: edcal.php:149
|
113 |
+
msgid "Looks like someone else already moved this post."
|
114 |
+
msgstr "Cini se da je netko vec premjestio ovaj clanak."
|
115 |
+
|
116 |
+
#: edcal.php:150
|
117 |
+
msgid "You do not have permission to edit posts."
|
118 |
+
msgstr "Niste ovlasteni za uredivanje clanaka."
|
119 |
+
|
120 |
+
#: edcal.php:151
|
121 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
122 |
+
msgstr "Invalid checksum za clanak. Ovo je cesta cross-site scripting greska."
|
123 |
+
|
124 |
+
#: edcal.php:152
|
125 |
+
msgid "There was an error contacting your blog."
|
126 |
+
msgstr "Doslo je do greske prilikom kontaktiranja vaseg bloga."
|
127 |
+
|
128 |
+
#: edcal.php:184
|
129 |
+
msgid "Posts Calendar"
|
130 |
+
msgstr "Kalendar clanaka."
|
131 |
+
|
132 |
+
#: edcal.php:193
|
133 |
+
msgid "Go back four weeks."
|
134 |
+
msgstr "Vratite se 4 tjedna unazad."
|
135 |
+
|
136 |
+
#: edcal.php:195
|
137 |
+
msgid "Skip ahead four weeks."
|
138 |
+
msgstr "Preskocite 4 tjedna."
|
139 |
+
|
140 |
+
#: edcal.php:200
|
141 |
+
msgid "Today"
|
142 |
+
msgstr "Danas"
|
143 |
+
|
144 |
+
#: edcal.php:190 edcal.php:274
|
145 |
+
msgid "ltr"
|
146 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-it_IT.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-it_IT.po
ADDED
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of WordPress Editorial Calendar in Italian
|
2 |
+
# This file is distributed under the same license as the WordPress Editorial Calendar package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
10 |
+
"X-Generator: Poedit 2.2.3\n"
|
11 |
+
"Project-Id-Version: WordPress Editorial Calendar\n"
|
12 |
+
"POT-Creation-Date: \n"
|
13 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
14 |
+
"Language-Team: \n"
|
15 |
+
"Language: it_IT\n"
|
16 |
+
|
17 |
+
#: edcal.php:274 edcal.php:294
|
18 |
+
msgid "New Draft"
|
19 |
+
msgstr "Nuova Bozza"
|
20 |
+
|
21 |
+
#: edcal.php:292
|
22 |
+
msgid "Add a new draft"
|
23 |
+
msgstr "Aggiungi una nuova bozza"
|
24 |
+
|
25 |
+
#: edcal.php:322
|
26 |
+
msgid "The calendar can only show between 1 and 8 weeks at a time."
|
27 |
+
msgstr "Il calendario può mostrare solo tra 1 e 8 settimane alla volta."
|
28 |
+
|
29 |
+
#: edcal.php:325 edcal.php:400
|
30 |
+
msgid "Show Unscheduled Drafts"
|
31 |
+
msgstr "Mostra le bozze non programmate"
|
32 |
+
|
33 |
+
#: edcal.php:326
|
34 |
+
msgid "Hide Unscheduled Drafts"
|
35 |
+
msgstr "Nascondi le bozze non programmate"
|
36 |
+
|
37 |
+
#: edcal.php:391
|
38 |
+
msgid "Scroll the calendar and make the last post visible"
|
39 |
+
msgstr "Scorri il calendario e rendi l'ultimo post visibile"
|
40 |
+
|
41 |
+
#: edcal.php:400
|
42 |
+
msgid "Show unscheduled posts"
|
43 |
+
msgstr "Mostra i post non programmati"
|
44 |
+
|
45 |
+
#: edcal.php:406
|
46 |
+
msgid "Unscheduled draft posts"
|
47 |
+
msgstr "Post bozza non programmati"
|
48 |
+
|
49 |
+
#: edcal.php:406
|
50 |
+
msgid "Unscheduled"
|
51 |
+
msgstr "Non programmati"
|
52 |
+
|
53 |
+
#: edcal.php:379
|
54 |
+
msgid "%1$s Calendar"
|
55 |
+
msgstr "Calendario %1$s"
|
56 |
+
|
57 |
+
#: edcal.php:96 edcal.php:120
|
58 |
+
msgid "Calendar"
|
59 |
+
msgstr "Calendario"
|
60 |
+
|
61 |
+
#: edcal.php:263 edcal.php:524
|
62 |
+
msgid "en-US"
|
63 |
+
msgstr "it-IT"
|
64 |
+
|
65 |
+
#: edcal.php:271
|
66 |
+
msgid "%1$s by %2$s"
|
67 |
+
msgstr "%1$s di %2$s"
|
68 |
+
|
69 |
+
#: edcal.php:273
|
70 |
+
msgid "New Post"
|
71 |
+
msgstr "Nuovo post"
|
72 |
+
|
73 |
+
#: edcal.php:277
|
74 |
+
msgid " [DRAFT]"
|
75 |
+
msgstr "[BOZZA]"
|
76 |
+
|
77 |
+
#: edcal.php:278
|
78 |
+
msgid " [PENDING]"
|
79 |
+
msgstr "[IN ATTESA DI REVISIONE]"
|
80 |
+
|
81 |
+
#: edcal.php:279
|
82 |
+
msgid " [STICKY]"
|
83 |
+
msgstr "[IN EVIDENZA]"
|
84 |
+
|
85 |
+
#: edcal.php:280
|
86 |
+
msgid " [DRAFT, STICKY]"
|
87 |
+
msgstr "[BOZZA, IN EVIDENZA]"
|
88 |
+
|
89 |
+
#: edcal.php:281
|
90 |
+
msgid " [PENDING, STICKY]"
|
91 |
+
msgstr "[IN ATTESA DI REVISIONE, IN EVIDENZA]"
|
92 |
+
|
93 |
+
#: edcal.php:282 edcal.php:286
|
94 |
+
msgid "Edit"
|
95 |
+
msgstr "Modifica"
|
96 |
+
|
97 |
+
#: edcal.php:283
|
98 |
+
msgid "Quick Edit"
|
99 |
+
msgstr "Modifica veloce"
|
100 |
+
|
101 |
+
#: edcal.php:284
|
102 |
+
msgid "Delete"
|
103 |
+
msgstr "Cancella"
|
104 |
+
|
105 |
+
#: edcal.php:285
|
106 |
+
msgid "View"
|
107 |
+
msgstr "Visualizza"
|
108 |
+
|
109 |
+
#: edcal.php:287
|
110 |
+
msgid "Status:"
|
111 |
+
msgstr "Stato:"
|
112 |
+
|
113 |
+
#: edcal.php:288 edcal.php:483
|
114 |
+
msgid "Cancel"
|
115 |
+
msgstr "Annulla"
|
116 |
+
|
117 |
+
#: edcal.php:289 edcal.php:445
|
118 |
+
msgid "Title"
|
119 |
+
msgstr "Titolo"
|
120 |
+
|
121 |
+
#: edcal.php:290 edcal.php:450
|
122 |
+
msgid "Content"
|
123 |
+
msgstr "Contenuto"
|
124 |
+
|
125 |
+
#: edcal.php:291
|
126 |
+
msgid "Add a new post on %s"
|
127 |
+
msgstr "Aggiungi un nuovo post al %s"
|
128 |
+
|
129 |
+
#: edcal.php:293
|
130 |
+
msgid "New %s - "
|
131 |
+
msgstr "Nuovo %s -"
|
132 |
+
|
133 |
+
#: edcal.php:295
|
134 |
+
msgid "Update"
|
135 |
+
msgstr "Aggiorna"
|
136 |
+
|
137 |
+
#: edcal.php:296 edcal.php:482
|
138 |
+
msgid "Schedule"
|
139 |
+
msgstr "Programma"
|
140 |
+
|
141 |
+
#: edcal.php:297
|
142 |
+
msgid "Submit for Review"
|
143 |
+
msgstr "Invia per revisione"
|
144 |
+
|
145 |
+
#: edcal.php:298
|
146 |
+
msgid "Save"
|
147 |
+
msgstr "Salva"
|
148 |
+
|
149 |
+
#: edcal.php:299
|
150 |
+
msgid "Edit %1$s - %2$s"
|
151 |
+
msgstr "Modifica %1$s - %2$s"
|
152 |
+
|
153 |
+
#: edcal.php:300 edcal.php:467
|
154 |
+
msgid "Scheduled"
|
155 |
+
msgstr "Programmato"
|
156 |
+
|
157 |
+
#: edcal.php:302
|
158 |
+
msgid "You are about to delete the post \""
|
159 |
+
msgstr "Stai per cancellare il post \""
|
160 |
+
|
161 |
+
#: edcal.php:303
|
162 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
163 |
+
msgstr "\". Premi Annulla per annullate, OK per cancellare."
|
164 |
+
|
165 |
+
#: edcal.php:305
|
166 |
+
msgid "Looks like someone else already moved this post."
|
167 |
+
msgstr "Sembra che qualcun altro abbia già spostato questo post."
|
168 |
+
|
169 |
+
#: edcal.php:306
|
170 |
+
msgid "You do not have permission to edit posts."
|
171 |
+
msgstr "Non hai i permessi per modificare post."
|
172 |
+
|
173 |
+
#: edcal.php:307
|
174 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
175 |
+
msgstr "Checksum non valido per il post. Questo è un comune errore di cross-site scripting."
|
176 |
+
|
177 |
+
#: edcal.php:308
|
178 |
+
msgid "There was an error contacting your blog."
|
179 |
+
msgstr "Si è verificato un errore nel contattare il tuo blog."
|
180 |
+
|
181 |
+
#: edcal.php:310
|
182 |
+
msgid "Screen Options"
|
183 |
+
msgstr "Opzioni schermo"
|
184 |
+
|
185 |
+
#: edcal.php:311
|
186 |
+
msgid "Colors"
|
187 |
+
msgstr "Colori"
|
188 |
+
|
189 |
+
#: edcal.php:312
|
190 |
+
msgid "Drafts: "
|
191 |
+
msgstr "Bozze:"
|
192 |
+
|
193 |
+
#: edcal.php:313
|
194 |
+
msgid "Apply"
|
195 |
+
msgstr "Applica"
|
196 |
+
|
197 |
+
#: edcal.php:314
|
198 |
+
msgid "Show on screen"
|
199 |
+
msgstr "Mostra sullo schermo"
|
200 |
+
|
201 |
+
#: edcal.php:315
|
202 |
+
msgid " weeks at a time"
|
203 |
+
msgstr "settimane per volta"
|
204 |
+
|
205 |
+
#: edcal.php:316
|
206 |
+
msgid "Show in Calendar Cell"
|
207 |
+
msgstr "Mostra nella cella del calendario"
|
208 |
+
|
209 |
+
#: edcal.php:317
|
210 |
+
msgid "Author"
|
211 |
+
msgstr "Autore"
|
212 |
+
|
213 |
+
#: edcal.php:318 edcal.php:461
|
214 |
+
msgid "Status"
|
215 |
+
msgstr "Stato"
|
216 |
+
|
217 |
+
#: edcal.php:319
|
218 |
+
msgid "Time of day"
|
219 |
+
msgstr "Ora del giorno"
|
220 |
+
|
221 |
+
#: edcal.php:320
|
222 |
+
msgid "An error occurred while loading the calendar: "
|
223 |
+
msgstr "Si è verificato un errore nel caricamento del calendario:"
|
224 |
+
|
225 |
+
#: edcal.php:323
|
226 |
+
msgid "Select the number of weeks for the calendar to show."
|
227 |
+
msgstr "Seleziona il numero di settimane da visualizzare nel calendario."
|
228 |
+
|
229 |
+
#: edcal.php:334
|
230 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
231 |
+
msgstr "<h2>Ci siamo</h2>Abbiamo finito di raccogliere i dati. Grazie per aiutarci a rendere il calendario migliore."
|
232 |
+
|
233 |
+
#: edcal.php:388
|
234 |
+
msgid "Jump back"
|
235 |
+
msgstr "Torna indietro"
|
236 |
+
|
237 |
+
#: edcal.php:390
|
238 |
+
msgid "Skip ahead"
|
239 |
+
msgstr "Salta avanti"
|
240 |
+
|
241 |
+
#: edcal.php:393
|
242 |
+
msgid "Scroll the calendar and make the today visible"
|
243 |
+
msgstr "Scorri il calendario e rendi visibile oggi"
|
244 |
+
|
245 |
+
#: edcal.php:393
|
246 |
+
msgid "Show Today"
|
247 |
+
msgstr "Mostra oggi"
|
248 |
+
|
249 |
+
#: edcal.php:436
|
250 |
+
msgid "Edit Post"
|
251 |
+
msgstr "Modifica post"
|
252 |
+
|
253 |
+
#: edcal.php:456
|
254 |
+
msgid "Time"
|
255 |
+
msgstr "Ora"
|
256 |
+
|
257 |
+
#: edcal.php:464
|
258 |
+
msgid "Draft"
|
259 |
+
msgstr "Bozza"
|
260 |
+
|
261 |
+
#: edcal.php:465
|
262 |
+
msgid "Pending Review"
|
263 |
+
msgstr "In attesa di revisione"
|
264 |
+
|
265 |
+
#: edcal.php:722
|
266 |
+
msgid "Posts "
|
267 |
+
msgstr "Post"
|
268 |
+
|
269 |
+
#: edcal.php:738
|
270 |
+
msgid "Post "
|
271 |
+
msgstr "Post"
|
272 |
+
|
273 |
+
#: edcal.php:865 edcal.php:868
|
274 |
+
msgid "Error in deleting..."
|
275 |
+
msgstr "Errore nel cancellare..."
|
276 |
+
|
277 |
+
#: edcal.php:191 edcal.php:275
|
278 |
+
msgid "ltr"
|
279 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-ja.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-ja.po
ADDED
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2010
|
2 |
+
# This file is distributed under the same license as the package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: \n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
7 |
+
"POT-Creation-Date: 2011-12-26 13:18:14+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
12 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
13 |
+
"Language-Team: Editorial Calendar\n"
|
14 |
+
"Language: ja\n"
|
15 |
+
"X-Generator: Poedit 2.2.3\n"
|
16 |
+
|
17 |
+
#: edcal.php:90 edcal.php:114
|
18 |
+
msgid "Calendar"
|
19 |
+
msgstr "カレンダー"
|
20 |
+
|
21 |
+
#: edcal.php:242 edcal.php:466
|
22 |
+
msgid "en-US"
|
23 |
+
msgstr "ja-JP"
|
24 |
+
|
25 |
+
#: edcal.php:250
|
26 |
+
msgid "%1$s by %2$s"
|
27 |
+
msgstr "%1$s by %2$s"
|
28 |
+
|
29 |
+
#: edcal.php:252
|
30 |
+
msgid "New Post"
|
31 |
+
msgstr "新規追加"
|
32 |
+
|
33 |
+
#: edcal.php:254
|
34 |
+
msgid " [DRAFT]"
|
35 |
+
msgstr " [下書き]"
|
36 |
+
|
37 |
+
#: edcal.php:255
|
38 |
+
msgid " [PENDING]"
|
39 |
+
msgstr " [レビュー待ち]"
|
40 |
+
|
41 |
+
#: edcal.php:256
|
42 |
+
msgid " [STICKY]"
|
43 |
+
msgstr " [先頭に固定表示]"
|
44 |
+
|
45 |
+
#: edcal.php:257
|
46 |
+
msgid " [DRAFT, STICKY]"
|
47 |
+
msgstr " [下書き、先頭に固定表示]"
|
48 |
+
|
49 |
+
#: edcal.php:258
|
50 |
+
msgid " [PENDING, STICKY]"
|
51 |
+
msgstr " [レビュー待ち、先頭に固定表示]"
|
52 |
+
|
53 |
+
#: edcal.php:259 edcal.php:263
|
54 |
+
msgid "Edit"
|
55 |
+
msgstr "編集"
|
56 |
+
|
57 |
+
#: edcal.php:260
|
58 |
+
msgid "Quick Edit"
|
59 |
+
msgstr "クイック編集"
|
60 |
+
|
61 |
+
#: edcal.php:261
|
62 |
+
msgid "Delete"
|
63 |
+
msgstr "削除"
|
64 |
+
|
65 |
+
#: edcal.php:262
|
66 |
+
msgid "View"
|
67 |
+
msgstr "プレビュー"
|
68 |
+
|
69 |
+
#: edcal.php:264
|
70 |
+
msgid "Status:"
|
71 |
+
msgstr "ステータス:"
|
72 |
+
|
73 |
+
#: edcal.php:265 edcal.php:435
|
74 |
+
msgid "Cancel"
|
75 |
+
msgstr "キャンセル"
|
76 |
+
|
77 |
+
#: edcal.php:266 edcal.php:398
|
78 |
+
msgid "Title"
|
79 |
+
msgstr "タイトル"
|
80 |
+
|
81 |
+
#: edcal.php:267 edcal.php:403
|
82 |
+
msgid "Content"
|
83 |
+
msgstr "本文"
|
84 |
+
|
85 |
+
#: edcal.php:268
|
86 |
+
msgid "Add a new post on %s"
|
87 |
+
msgstr "%s に新規投稿を追加"
|
88 |
+
|
89 |
+
#: edcal.php:269
|
90 |
+
msgid "New %s - "
|
91 |
+
msgstr "新規 %s - "
|
92 |
+
|
93 |
+
#: edcal.php:270
|
94 |
+
msgid "Update"
|
95 |
+
msgstr "アップデート"
|
96 |
+
|
97 |
+
#: edcal.php:271 edcal.php:434
|
98 |
+
msgid "Schedule"
|
99 |
+
msgstr "スケジュール"
|
100 |
+
|
101 |
+
#: edcal.php:272
|
102 |
+
msgid "Submit for Review"
|
103 |
+
msgstr "レビュー待ちとして送信"
|
104 |
+
|
105 |
+
#: edcal.php:273
|
106 |
+
msgid "Save"
|
107 |
+
msgstr "保存"
|
108 |
+
|
109 |
+
#: edcal.php:274
|
110 |
+
msgid "Edit %1$s - %2$s"
|
111 |
+
msgstr "編集 %1$s - %2$s"
|
112 |
+
|
113 |
+
#: edcal.php:275 edcal.php:420
|
114 |
+
msgid "Scheduled"
|
115 |
+
msgstr "予約投稿"
|
116 |
+
|
117 |
+
#: edcal.php:277
|
118 |
+
msgid "You are about to delete the post \""
|
119 |
+
msgstr "投稿を削除しようとしています \""
|
120 |
+
|
121 |
+
#: edcal.php:278
|
122 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
123 |
+
msgstr "\". 中止するにはキャンセルを、削除するならOKを押してください。"
|
124 |
+
|
125 |
+
#: edcal.php:280
|
126 |
+
msgid "Looks like someone else already moved this post."
|
127 |
+
msgstr "他の誰かがすでにこの投稿を移動させたようです。"
|
128 |
+
|
129 |
+
#: edcal.php:281
|
130 |
+
msgid "You do not have permission to edit posts."
|
131 |
+
msgstr "この投稿を編集する権限がありません。"
|
132 |
+
|
133 |
+
#: edcal.php:282
|
134 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
135 |
+
msgstr "チェックサムが正しくありません。これは一般的にはクロスサイトスクリプティングのエラーです。"
|
136 |
+
|
137 |
+
#: edcal.php:283
|
138 |
+
msgid "There was an error contacting your blog."
|
139 |
+
msgstr "あなたのブログとの間でエラーがありました。"
|
140 |
+
|
141 |
+
#: edcal.php:285
|
142 |
+
msgid "Screen Options"
|
143 |
+
msgstr "表示オプション"
|
144 |
+
|
145 |
+
#: edcal.php:286
|
146 |
+
msgid "Colors"
|
147 |
+
msgstr "色"
|
148 |
+
|
149 |
+
#: edcal.php:287
|
150 |
+
msgid "Drafts: "
|
151 |
+
msgstr "下書き:"
|
152 |
+
|
153 |
+
#: edcal.php:288
|
154 |
+
msgid "Apply"
|
155 |
+
msgstr "適用"
|
156 |
+
|
157 |
+
#: edcal.php:289
|
158 |
+
msgid "Show on screen"
|
159 |
+
msgstr "画面への表示"
|
160 |
+
|
161 |
+
#: edcal.php:290
|
162 |
+
msgid " weeks at a time"
|
163 |
+
msgstr " 週間"
|
164 |
+
|
165 |
+
#: edcal.php:291
|
166 |
+
msgid "Show in Calendar Cell"
|
167 |
+
msgstr "カレンダーのセルへの表示"
|
168 |
+
|
169 |
+
#: edcal.php:292
|
170 |
+
msgid "Author"
|
171 |
+
msgstr "作成者"
|
172 |
+
|
173 |
+
#: edcal.php:293 edcal.php:414
|
174 |
+
msgid "Status"
|
175 |
+
msgstr "ステータス"
|
176 |
+
|
177 |
+
#: edcal.php:294
|
178 |
+
msgid "Time of day"
|
179 |
+
msgstr "時刻"
|
180 |
+
|
181 |
+
#: edcal.php:295
|
182 |
+
msgid "An error occurred while loading the calendar: "
|
183 |
+
msgstr "カレンダーを読み込み中にエラーが発生しました:"
|
184 |
+
|
185 |
+
#: edcal.php:297
|
186 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
187 |
+
msgstr "カレンダーは1~5週間のみ一度に表示できます。"
|
188 |
+
|
189 |
+
#: edcal.php:298
|
190 |
+
msgid "Select the number of weeks for the calendar to show."
|
191 |
+
msgstr "表示させる週数を選んでください。"
|
192 |
+
|
193 |
+
#: edcal.php:306
|
194 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
195 |
+
msgstr "<h2>完了しました</h2>データの収集が完了しました。カレンダーをより良いものにするためのご協力ありがとうございます。"
|
196 |
+
|
197 |
+
#: edcal.php:347
|
198 |
+
msgid " Calendar"
|
199 |
+
msgstr " カレンダー"
|
200 |
+
|
201 |
+
#: edcal.php:356
|
202 |
+
msgid "Jump back"
|
203 |
+
msgstr "前のページへ"
|
204 |
+
|
205 |
+
#: edcal.php:358
|
206 |
+
msgid "Skip ahead"
|
207 |
+
msgstr "次のページへ"
|
208 |
+
|
209 |
+
#: edcal.php:363
|
210 |
+
msgid "Scroll the calendar and make the today visible"
|
211 |
+
msgstr "カレンダーをスクロールして今日の日付を表示します"
|
212 |
+
|
213 |
+
#: edcal.php:363
|
214 |
+
msgid "Show Today"
|
215 |
+
msgstr "今日"
|
216 |
+
|
217 |
+
#: edcal.php:389
|
218 |
+
msgid "Edit Post"
|
219 |
+
msgstr "投稿を編集"
|
220 |
+
|
221 |
+
#: edcal.php:409
|
222 |
+
msgid "Time"
|
223 |
+
msgstr "時刻"
|
224 |
+
|
225 |
+
#: edcal.php:417
|
226 |
+
msgid "Draft"
|
227 |
+
msgstr "下書き"
|
228 |
+
|
229 |
+
#: edcal.php:418
|
230 |
+
msgid "Pending Review"
|
231 |
+
msgstr "レビュー待ち"
|
232 |
+
|
233 |
+
#: edcal.php:617
|
234 |
+
msgid "Posts "
|
235 |
+
msgstr "投稿"
|
236 |
+
|
237 |
+
#: edcal.php:633
|
238 |
+
msgid "Post "
|
239 |
+
msgstr "投稿"
|
240 |
+
|
241 |
+
#: edcal.php:737 edcal.php:740
|
242 |
+
msgid "Error in deleting..."
|
243 |
+
msgstr "削除中にエラーが発生しました..."
|
244 |
+
|
245 |
+
#: edcal.php:190 edcal.php:274
|
246 |
+
msgid "ltr"
|
247 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-lt_LT.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-lt_LT.po
ADDED
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WordPress Editorial Calendar v1.4\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
7 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
14 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
15 |
+
"X-Poedit-Basepath: ..\n"
|
16 |
+
"X-Textdomain-Support: yes\n"
|
17 |
+
"Language: de_DE\n"
|
18 |
+
"X-Generator: Poedit 2.2.3\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
# @ editorial-calendar
|
22 |
+
#: edcal.php:90 edcal.php:112
|
23 |
+
msgid "Calendar"
|
24 |
+
msgstr "Kalendorius"
|
25 |
+
|
26 |
+
# @ editorial-calendar
|
27 |
+
#: edcal.php:240 edcal.php:464
|
28 |
+
msgid "en-US"
|
29 |
+
msgstr "lt-LT"
|
30 |
+
|
31 |
+
# @ editorial-calendar
|
32 |
+
#: edcal.php:248
|
33 |
+
#, php-format
|
34 |
+
msgid "%1$s by %2$s"
|
35 |
+
msgstr "%1$s prie %2$s"
|
36 |
+
|
37 |
+
# @ editorial-calendar
|
38 |
+
#: edcal.php:250
|
39 |
+
msgid "New Post"
|
40 |
+
msgstr "Naujas Įrašas"
|
41 |
+
|
42 |
+
# @ editorial-calendar
|
43 |
+
#: edcal.php:252
|
44 |
+
msgid " [DRAFT]"
|
45 |
+
msgstr "[JUODRAŠTIS]"
|
46 |
+
|
47 |
+
# @ editorial-calendar
|
48 |
+
#: edcal.php:253
|
49 |
+
msgid " [PENDING]"
|
50 |
+
msgstr "[LAUKIAMA]"
|
51 |
+
|
52 |
+
# @ editorial-calendar
|
53 |
+
#: edcal.php:254
|
54 |
+
msgid " [STICKY]"
|
55 |
+
msgstr "[PAINU]"
|
56 |
+
|
57 |
+
# @ editorial-calendar
|
58 |
+
#: edcal.php:255
|
59 |
+
msgid " [DRAFT, STICKY]"
|
60 |
+
msgstr "[ĮRAŠAS, PAINU]"
|
61 |
+
|
62 |
+
# @ editorial-calendar
|
63 |
+
#: edcal.php:256
|
64 |
+
msgid " [PENDING, STICKY]"
|
65 |
+
msgstr "[LAUKIAMA, PAINU]"
|
66 |
+
|
67 |
+
# @ editorial-calendar
|
68 |
+
#: edcal.php:257 edcal.php:261
|
69 |
+
msgid "Edit"
|
70 |
+
msgstr "Redaguoti"
|
71 |
+
|
72 |
+
# @ editorial-calendar
|
73 |
+
#: edcal.php:258
|
74 |
+
msgid "Quick Edit"
|
75 |
+
msgstr "Greitasis Redagavimas"
|
76 |
+
|
77 |
+
# @ editorial-calendar
|
78 |
+
#: edcal.php:259
|
79 |
+
msgid "Delete"
|
80 |
+
msgstr "Ištrinti"
|
81 |
+
|
82 |
+
# @ editorial-calendar
|
83 |
+
#: edcal.php:260
|
84 |
+
msgid "View"
|
85 |
+
msgstr "Peržiūrėti"
|
86 |
+
|
87 |
+
# @ editorial-calendar
|
88 |
+
#: edcal.php:262
|
89 |
+
msgid "Status:"
|
90 |
+
msgstr "Būsena:"
|
91 |
+
|
92 |
+
# @ editorial-calendar
|
93 |
+
#: edcal.php:263 edcal.php:433
|
94 |
+
msgid "Cancel"
|
95 |
+
msgstr "Atšaukti"
|
96 |
+
|
97 |
+
# @ editorial-calendar
|
98 |
+
#: edcal.php:264 edcal.php:396
|
99 |
+
msgid "Title"
|
100 |
+
msgstr "Antraštė"
|
101 |
+
|
102 |
+
# @ editorial-calendar
|
103 |
+
#: edcal.php:265 edcal.php:401
|
104 |
+
msgid "Content"
|
105 |
+
msgstr "Turinys"
|
106 |
+
|
107 |
+
# @ editorial-calendar
|
108 |
+
#: edcal.php:266
|
109 |
+
#, php-format
|
110 |
+
msgid "Add a new post on %s"
|
111 |
+
msgstr "Pridėti naują įrašą į %s"
|
112 |
+
|
113 |
+
# @ editorial-calendar
|
114 |
+
#: edcal.php:267
|
115 |
+
#, php-format
|
116 |
+
msgid "New %s - "
|
117 |
+
msgstr "Naujas %s - "
|
118 |
+
|
119 |
+
# @ editorial-calendar
|
120 |
+
#: edcal.php:268
|
121 |
+
msgid "Update"
|
122 |
+
msgstr "Atnaujinti"
|
123 |
+
|
124 |
+
# @ editorial-calendar
|
125 |
+
#: edcal.php:269 edcal.php:432
|
126 |
+
msgid "Schedule"
|
127 |
+
msgstr "Planuoti"
|
128 |
+
|
129 |
+
# @ editorial-calendar
|
130 |
+
#: edcal.php:270
|
131 |
+
msgid "Submit for Review"
|
132 |
+
msgstr "Pateikti Peržiūrai"
|
133 |
+
|
134 |
+
# @ editorial-calendar
|
135 |
+
#: edcal.php:271
|
136 |
+
msgid "Save"
|
137 |
+
msgstr "Įrašyti"
|
138 |
+
|
139 |
+
# @ editorial-calendar
|
140 |
+
#: edcal.php:272
|
141 |
+
#, php-format
|
142 |
+
msgid "Edit %1$s - %2$s"
|
143 |
+
msgstr "Redaguoti %1$s - %2$s"
|
144 |
+
|
145 |
+
# @ editorial-calendar
|
146 |
+
#: edcal.php:273 edcal.php:418
|
147 |
+
msgid "Scheduled"
|
148 |
+
msgstr "Suplanuota"
|
149 |
+
|
150 |
+
# @ editorial-calendar
|
151 |
+
#: edcal.php:275
|
152 |
+
msgid "You are about to delete the post \""
|
153 |
+
msgstr "Ar tikrai norite ištrinti šį įrašą? \""
|
154 |
+
|
155 |
+
# @ editorial-calendar
|
156 |
+
#: edcal.php:276
|
157 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
158 |
+
msgstr "\" Paspauskite Cancel, norėdamas sustabdyti, Ok - tęsti trynimą"
|
159 |
+
|
160 |
+
# @ editorial-calendar
|
161 |
+
#: edcal.php:278
|
162 |
+
msgid "Looks like someone else already moved this post."
|
163 |
+
msgstr "Panašu, kad kažkas jau perkelė šį įrašą."
|
164 |
+
|
165 |
+
# @ editorial-calendar
|
166 |
+
#: edcal.php:279
|
167 |
+
msgid "You do not have permission to edit posts."
|
168 |
+
msgstr "Jūs neturite reikiamų leidimų įrašų redagavimui."
|
169 |
+
|
170 |
+
# @ editorial-calendar
|
171 |
+
#: edcal.php:280
|
172 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
173 |
+
msgstr "Klaidinga įrašo kontrolinė suma. Veikiausiai tai kryžminių tinklapių skriptų kalbos klaida."
|
174 |
+
|
175 |
+
# @ editorial-calendar
|
176 |
+
#: edcal.php:281
|
177 |
+
msgid "There was an error contacting your blog."
|
178 |
+
msgstr "Įvyko Jūsų tinklaraščio veiklą įtakojanti klaida."
|
179 |
+
|
180 |
+
# @ editorial-calendar
|
181 |
+
#: edcal.php:283
|
182 |
+
msgid "Screen Options"
|
183 |
+
msgstr "Vaizdavimo Parinktys"
|
184 |
+
|
185 |
+
# @ editorial-calendar
|
186 |
+
#: edcal.php:284
|
187 |
+
msgid "Colors"
|
188 |
+
msgstr "Spalvos"
|
189 |
+
|
190 |
+
# @ editorial-calendar
|
191 |
+
#: edcal.php:285
|
192 |
+
msgid "Drafts: "
|
193 |
+
msgstr "Juodraščiai:"
|
194 |
+
|
195 |
+
# @ editorial-calendar
|
196 |
+
#: edcal.php:286
|
197 |
+
msgid "Apply"
|
198 |
+
msgstr "Taikyti"
|
199 |
+
|
200 |
+
# @ editorial-calendar
|
201 |
+
#: edcal.php:287
|
202 |
+
msgid "Show on screen"
|
203 |
+
msgstr "Rodyti ekrane"
|
204 |
+
|
205 |
+
# @ editorial-calendar
|
206 |
+
#: edcal.php:288
|
207 |
+
msgid " weeks at a time"
|
208 |
+
msgstr "savaitės vienu metu."
|
209 |
+
|
210 |
+
# @ editorial-calendar
|
211 |
+
#: edcal.php:289
|
212 |
+
msgid "Show in Calendar Cell"
|
213 |
+
msgstr "Rodyti Kalendoriaus langelyje"
|
214 |
+
|
215 |
+
# @ editorial-calendar
|
216 |
+
#: edcal.php:290
|
217 |
+
msgid "Author"
|
218 |
+
msgstr "Autorius"
|
219 |
+
|
220 |
+
# @ editorial-calendar
|
221 |
+
#: edcal.php:291 edcal.php:412
|
222 |
+
msgid "Status"
|
223 |
+
msgstr "Būsena"
|
224 |
+
|
225 |
+
# @ editorial-calendar
|
226 |
+
#: edcal.php:292
|
227 |
+
msgid "Time of day"
|
228 |
+
msgstr "Dienos laikas"
|
229 |
+
|
230 |
+
# @ editorial-calendar
|
231 |
+
#: edcal.php:293
|
232 |
+
msgid "An error occurred while loading the calendar: "
|
233 |
+
msgstr "Įkeliant kalendorių įvyko klaida:"
|
234 |
+
|
235 |
+
# @ editorial-calendar
|
236 |
+
#: edcal.php:295
|
237 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
238 |
+
msgstr "Kalendorius vienu metu gali rodyti tik tarp 1 ir 5 savaičių."
|
239 |
+
|
240 |
+
# @ editorial-calendar
|
241 |
+
#: edcal.php:296
|
242 |
+
msgid "Select the number of weeks for the calendar to show."
|
243 |
+
msgstr "Pasinkite kalendoriuje rodomą savaičių skaičių."
|
244 |
+
|
245 |
+
# @ editorial-calendar
|
246 |
+
#: edcal.php:302
|
247 |
+
msgid "<div id=\"feedbacksection\"><h2>Help us Make the Editorial Calendar Better</h2>We are always trying to improve the Editorial Calendar and you can help. May we collect some data about your blog and browser settings to help us improve this plugin? We'll only do it once and your blog will show up on our <a target=\"_blank\" href=\"http://www.zackgrossbart.com/edcal/mint/\">Editorial Calendar Statistics page</a>.<br /><br /><button class=\"button-secondary\" onclick=\"edcal.doFeedback();\">Collect Anonymous Data</button> <a href=\"#\" id=\"nofeedbacklink\" onclick=\"edcal.noFeedback(); return false;\">No thank you</a></div>"
|
248 |
+
msgstr "<div id=\"feedbacksection\"><h2> Padėkite mums patobulinti šį kalendorių. <h2> Mes visada ieškome būdų kaip tai padaryti ir Jūs tikrai galite padėti. Gal norėtumėte suteikti šiek tiek informacijos apie Jūsų tinklaraštį ir naršyklės parinktis, kad galėtume ir toliau sėkmingai judėti į priekį? Mes tai padarysime tik kartą ir Jūsų tinklaraštis pasirodys mūsų <a target=\"_blank\" href=\"http://www.zackgrossbart.com/edcal/mint/\">Editorial Calendar Statistikos puslapyje </a>.<br /><br /><button class=\"button-secondary\" onclick=\"edcal.doFeedback();\">Suteikti anoniminę informaciją</button> <a href=\"#\" id=\"nofeedbacklink\" onclick=\"edcal.noFeedback(); return false;\">Ne, dekui.</a></div>"
|
249 |
+
|
250 |
+
# @ editorial-calendar
|
251 |
+
#: edcal.php:304
|
252 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
253 |
+
msgstr "<h2>Viskas!</h2> Mes baigėmė informacijos rinkimo procedūrą. Ačių, kad padedade mums tobulinti kalendorių."
|
254 |
+
|
255 |
+
# @ editorial-calendar
|
256 |
+
#: edcal.php:345
|
257 |
+
msgid " Calendar"
|
258 |
+
msgstr " Kalendorius"
|
259 |
+
|
260 |
+
# @ editorial-calendar
|
261 |
+
#: edcal.php:354
|
262 |
+
msgid "Jump back"
|
263 |
+
msgstr "Grįžti atgal"
|
264 |
+
|
265 |
+
# @ editorial-calendar
|
266 |
+
#: edcal.php:356
|
267 |
+
msgid "Skip ahead"
|
268 |
+
msgstr "Peršokti į priekį"
|
269 |
+
|
270 |
+
# @ editorial-calendar
|
271 |
+
#: edcal.php:361
|
272 |
+
msgid "Scroll the calendar and make the today visible"
|
273 |
+
msgstr "Slinkite kalendoriumi ir padarykite šiandienos infromaciją matoma"
|
274 |
+
|
275 |
+
# @ editorial-calendar
|
276 |
+
#: edcal.php:361
|
277 |
+
msgid "Show Today"
|
278 |
+
msgstr "Rodyti Šiandieną"
|
279 |
+
|
280 |
+
# @ editorial-calendar
|
281 |
+
#: edcal.php:387
|
282 |
+
msgid "Edit Post"
|
283 |
+
msgstr "Redaguoti Įrašą"
|
284 |
+
|
285 |
+
# @ editorial-calendar
|
286 |
+
#: edcal.php:407
|
287 |
+
msgid "Time"
|
288 |
+
msgstr "Laikas"
|
289 |
+
|
290 |
+
# @ editorial-calendar
|
291 |
+
#: edcal.php:415
|
292 |
+
msgid "Draft"
|
293 |
+
msgstr "Juodraštis"
|
294 |
+
|
295 |
+
# @ editorial-calendar
|
296 |
+
#: edcal.php:416
|
297 |
+
msgid "Pending Review"
|
298 |
+
msgstr "Laukiama Peržiūros"
|
299 |
+
|
300 |
+
# @ default
|
301 |
+
#: edcal.php:735 edcal.php:738
|
302 |
+
msgid "Error in deleting..."
|
303 |
+
msgstr "Klaida trynimo procese..."
|
304 |
+
|
305 |
+
#: edcal.php:617
|
306 |
+
msgid "Posts "
|
307 |
+
msgstr "Pranešimų "
|
308 |
+
|
309 |
+
#: edcal.php:190 edcal.php:274
|
310 |
+
msgid "ltr"
|
311 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-nb_NO.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-nb_NO.po
ADDED
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: \n"
|
4 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
5 |
+
"POT-Creation-Date: 2011-12-21 13:34:53+00:00\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
10 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
11 |
+
"Language-Team: Zack Grossbart <zack@grossbart.com>\n"
|
12 |
+
"Language: nb_NO\n"
|
13 |
+
"X-Generator: Poedit 2.2.3\n"
|
14 |
+
|
15 |
+
#: edcal.php:90 edcal.php:114
|
16 |
+
msgid "Calendar"
|
17 |
+
msgstr "Kalendar"
|
18 |
+
|
19 |
+
#: edcal.php:242 edcal.php:466
|
20 |
+
msgid "en-US"
|
21 |
+
msgstr "nb-NO"
|
22 |
+
|
23 |
+
#: edcal.php:250
|
24 |
+
msgid "%1$s by %2$s"
|
25 |
+
msgstr "1$s av %2$s"
|
26 |
+
|
27 |
+
#: edcal.php:252
|
28 |
+
msgid "New Post"
|
29 |
+
msgstr "Nytt Innlegg"
|
30 |
+
|
31 |
+
#: edcal.php:254
|
32 |
+
msgid " [DRAFT]"
|
33 |
+
msgstr " [UTKAST]"
|
34 |
+
|
35 |
+
#: edcal.php:255
|
36 |
+
msgid " [PENDING]"
|
37 |
+
msgstr " [PÃ…VENTE]"
|
38 |
+
|
39 |
+
#: edcal.php:256
|
40 |
+
msgid " [STICKY]"
|
41 |
+
msgstr " [KLISTRET]"
|
42 |
+
|
43 |
+
#: edcal.php:257
|
44 |
+
msgid " [DRAFT, STICKY]"
|
45 |
+
msgstr " [UTKAST KLISTRET]"
|
46 |
+
|
47 |
+
#: edcal.php:258
|
48 |
+
msgid " [PENDING, STICKY]"
|
49 |
+
msgstr " [PÃ…VENTE KLISTRET]"
|
50 |
+
|
51 |
+
#: edcal.php:259 edcal.php:263
|
52 |
+
msgid "Edit"
|
53 |
+
msgstr "Editer"
|
54 |
+
|
55 |
+
#: edcal.php:260
|
56 |
+
msgid "Quick Edit"
|
57 |
+
msgstr "Hurtig Editering"
|
58 |
+
|
59 |
+
#: edcal.php:261
|
60 |
+
msgid "Delete"
|
61 |
+
msgstr "Slett"
|
62 |
+
|
63 |
+
#: edcal.php:262
|
64 |
+
msgid "View"
|
65 |
+
msgstr "Se"
|
66 |
+
|
67 |
+
#: edcal.php:264
|
68 |
+
msgid "Status:"
|
69 |
+
msgstr "Status"
|
70 |
+
|
71 |
+
#: edcal.php:265 edcal.php:435
|
72 |
+
msgid "Cancel"
|
73 |
+
msgstr "Avbryt"
|
74 |
+
|
75 |
+
#: edcal.php:266 edcal.php:398
|
76 |
+
msgid "Title"
|
77 |
+
msgstr "Tittel"
|
78 |
+
|
79 |
+
#: edcal.php:267 edcal.php:403
|
80 |
+
msgid "Content"
|
81 |
+
msgstr "Innhold"
|
82 |
+
|
83 |
+
#: edcal.php:268
|
84 |
+
msgid "Add a new post on %s"
|
85 |
+
msgstr "Legg til nytt innlegg på %s"
|
86 |
+
|
87 |
+
#: edcal.php:269
|
88 |
+
msgid "New %s - "
|
89 |
+
msgstr "Nytt %s - "
|
90 |
+
|
91 |
+
#: edcal.php:270
|
92 |
+
msgid "Update"
|
93 |
+
msgstr "Oppdater"
|
94 |
+
|
95 |
+
#: edcal.php:271 edcal.php:434
|
96 |
+
msgid "Schedule"
|
97 |
+
msgstr "Planlegg"
|
98 |
+
|
99 |
+
#: edcal.php:272
|
100 |
+
msgid "Submit for Review"
|
101 |
+
msgstr "Send til vurdering"
|
102 |
+
|
103 |
+
#: edcal.php:273
|
104 |
+
msgid "Save"
|
105 |
+
msgstr "Lagre"
|
106 |
+
|
107 |
+
#: edcal.php:274
|
108 |
+
msgid "Edit %1$s - %2$s"
|
109 |
+
msgstr "Editer %1$ - %2$s"
|
110 |
+
|
111 |
+
#: edcal.php:275 edcal.php:420
|
112 |
+
msgid "Scheduled"
|
113 |
+
msgstr "Planlagt"
|
114 |
+
|
115 |
+
#: edcal.php:277
|
116 |
+
msgid "You are about to delete the post \""
|
117 |
+
msgstr "Du er i ferd med å slette innlegget \""
|
118 |
+
|
119 |
+
#: edcal.php:278
|
120 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
121 |
+
msgstr "\". Trykk Avbryt for å stoppe, OK for å slette."
|
122 |
+
|
123 |
+
#: edcal.php:280
|
124 |
+
msgid "Looks like someone else already moved this post."
|
125 |
+
msgstr "Ser ut som noen andre allerede flyttet dette innlegget."
|
126 |
+
|
127 |
+
#: edcal.php:281
|
128 |
+
msgid "You do not have permission to edit posts."
|
129 |
+
msgstr "Du har ikke tillatelse til å redigere innlegg."
|
130 |
+
|
131 |
+
#: edcal.php:282
|
132 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
133 |
+
msgstr "Ugyldig kontrollsum for post. Dette er vanligvis en cross-site scripting feil."
|
134 |
+
|
135 |
+
#: edcal.php:283
|
136 |
+
msgid "There was an error contacting your blog."
|
137 |
+
msgstr "Det oppstod en feil med tilkobling av din blogg."
|
138 |
+
|
139 |
+
#: edcal.php:285
|
140 |
+
msgid "Screen Options"
|
141 |
+
msgstr "Skjerm Alternativer"
|
142 |
+
|
143 |
+
#: edcal.php:286
|
144 |
+
msgid "Colors"
|
145 |
+
msgstr "Farger"
|
146 |
+
|
147 |
+
#: edcal.php:287
|
148 |
+
msgid "Drafts: "
|
149 |
+
msgstr "Utkast: "
|
150 |
+
|
151 |
+
#: edcal.php:288
|
152 |
+
msgid "Apply"
|
153 |
+
msgstr "Legg til"
|
154 |
+
|
155 |
+
#: edcal.php:289
|
156 |
+
msgid "Show on screen"
|
157 |
+
msgstr "Vis på skjerm"
|
158 |
+
|
159 |
+
#: edcal.php:290
|
160 |
+
msgid " weeks at a time"
|
161 |
+
msgstr "Uker"
|
162 |
+
|
163 |
+
#: edcal.php:291
|
164 |
+
msgid "Show in Calendar Cell"
|
165 |
+
msgstr "Vis i Kalender celle"
|
166 |
+
|
167 |
+
#: edcal.php:292
|
168 |
+
msgid "Author"
|
169 |
+
msgstr "Forfatter"
|
170 |
+
|
171 |
+
#: edcal.php:293 edcal.php:414
|
172 |
+
msgid "Status"
|
173 |
+
msgstr "Status"
|
174 |
+
|
175 |
+
#: edcal.php:294
|
176 |
+
msgid "Time of day"
|
177 |
+
msgstr "Tid på dagen"
|
178 |
+
|
179 |
+
#: edcal.php:295
|
180 |
+
msgid "An error occurred while loading the calendar: "
|
181 |
+
msgstr "Det oppstod en feil under innlasting av kalenderen: "
|
182 |
+
|
183 |
+
#: edcal.php:297
|
184 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
185 |
+
msgstr "Kalenderen kan bare vise mellom 1 og 5 uker av gangen."
|
186 |
+
|
187 |
+
#: edcal.php:298
|
188 |
+
msgid "Select the number of weeks for the calendar to show."
|
189 |
+
msgstr "Velg antall uker som kalenderen skal vise"
|
190 |
+
|
191 |
+
#: edcal.php:306
|
192 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
193 |
+
msgstr "<h2>Vi er ferdig</h2> Vi er ferdig med å samle data. Takk for at du hjelper oss\" \"med å gjøre kalenderen bedre."
|
194 |
+
|
195 |
+
#: edcal.php:347
|
196 |
+
msgid " Calendar"
|
197 |
+
msgstr " Kalendar"
|
198 |
+
|
199 |
+
#: edcal.php:356
|
200 |
+
msgid "Jump back"
|
201 |
+
msgstr "GÃ¥ tilbake"
|
202 |
+
|
203 |
+
#: edcal.php:358
|
204 |
+
msgid "Skip ahead"
|
205 |
+
msgstr "hopp fremover"
|
206 |
+
|
207 |
+
#: edcal.php:363
|
208 |
+
msgid "Scroll the calendar and make the today visible"
|
209 |
+
msgstr "Bla i kalenderen og gjør i dag synlig"
|
210 |
+
|
211 |
+
#: edcal.php:363
|
212 |
+
msgid "Show Today"
|
213 |
+
msgstr "Vis i dag"
|
214 |
+
|
215 |
+
#: edcal.php:389
|
216 |
+
msgid "Edit Post"
|
217 |
+
msgstr "Editer Innlegg"
|
218 |
+
|
219 |
+
#: edcal.php:409
|
220 |
+
msgid "Time"
|
221 |
+
msgstr "Tid"
|
222 |
+
|
223 |
+
#: edcal.php:417
|
224 |
+
msgid "Draft"
|
225 |
+
msgstr "Utkast"
|
226 |
+
|
227 |
+
#: edcal.php:418
|
228 |
+
msgid "Pending Review"
|
229 |
+
msgstr "Send til gjennomgang"
|
230 |
+
|
231 |
+
#: edcal.php:617
|
232 |
+
msgid "Posts "
|
233 |
+
msgstr "Innlegg "
|
234 |
+
|
235 |
+
#: edcal.php:633
|
236 |
+
msgid "Post "
|
237 |
+
msgstr "Innlegg "
|
238 |
+
|
239 |
+
#: edcal.php:737 edcal.php:740
|
240 |
+
msgid "Error in deleting..."
|
241 |
+
msgstr "Feil under sletting..."
|
242 |
+
|
243 |
+
#: edcal.php:190 edcal.php:274
|
244 |
+
msgid "ltr"
|
245 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-nl_NL.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-nl_NL.po
ADDED
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2010
|
2 |
+
# This file is distributed under the same license as the package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: EditorialCalendar\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
7 |
+
"POT-Creation-Date: 2011-02-01 15:28:07+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
12 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
13 |
+
"Language-Team: Paternostre <info@paternostre.nl>\n"
|
14 |
+
"Language: nl_NL\n"
|
15 |
+
"X-Generator: Poedit 2.2.3\n"
|
16 |
+
|
17 |
+
#: edcal.php:71 edcal.php:93
|
18 |
+
msgid "Calendar"
|
19 |
+
msgstr "Kalender"
|
20 |
+
|
21 |
+
#: edcal.php:221 edcal.php:465
|
22 |
+
msgid "en-US"
|
23 |
+
msgstr "nl-NL"
|
24 |
+
|
25 |
+
#: edcal.php:229
|
26 |
+
msgid "%1$s by %2$s"
|
27 |
+
msgstr "%1$s door %2$s"
|
28 |
+
|
29 |
+
#: edcal.php:231
|
30 |
+
msgid "New Post"
|
31 |
+
msgstr "Nieuw bericht"
|
32 |
+
|
33 |
+
#: edcal.php:233
|
34 |
+
msgid " [DRAFT]"
|
35 |
+
msgstr "[ CONCEPT]"
|
36 |
+
|
37 |
+
#: edcal.php:234
|
38 |
+
msgid " [PENDING]"
|
39 |
+
msgstr "[WACHTEND]"
|
40 |
+
|
41 |
+
#: edcal.php:235
|
42 |
+
msgid " [STICKY]"
|
43 |
+
msgstr "[STICKY]"
|
44 |
+
|
45 |
+
#: edcal.php:236
|
46 |
+
msgid " [DRAFT, STICKY]"
|
47 |
+
msgstr "[CONCEPT, STICKY]"
|
48 |
+
|
49 |
+
#: edcal.php:237
|
50 |
+
msgid " [PENDING, STICKY]"
|
51 |
+
msgstr "[WACHTEND, STICKY]"
|
52 |
+
|
53 |
+
#: edcal.php:238 edcal.php:242
|
54 |
+
msgid "Edit"
|
55 |
+
msgstr "Bewerken"
|
56 |
+
|
57 |
+
#: edcal.php:239
|
58 |
+
msgid "Quick Edit"
|
59 |
+
msgstr "Snel bewerken"
|
60 |
+
|
61 |
+
#: edcal.php:240
|
62 |
+
msgid "Delete"
|
63 |
+
msgstr "Verwijderen"
|
64 |
+
|
65 |
+
#: edcal.php:241
|
66 |
+
msgid "View"
|
67 |
+
msgstr "Bekijken"
|
68 |
+
|
69 |
+
#: edcal.php:243
|
70 |
+
msgid "Status:"
|
71 |
+
msgstr "Status:"
|
72 |
+
|
73 |
+
#: edcal.php:244 edcal.php:409
|
74 |
+
msgid "Cancel"
|
75 |
+
msgstr "Annuleren"
|
76 |
+
|
77 |
+
#: edcal.php:245 edcal.php:363
|
78 |
+
msgid "Title"
|
79 |
+
msgstr "Titel"
|
80 |
+
|
81 |
+
#: edcal.php:246 edcal.php:368
|
82 |
+
msgid "Content"
|
83 |
+
msgstr "Inhoud"
|
84 |
+
|
85 |
+
#: edcal.php:247
|
86 |
+
msgid "Add a new post on %s"
|
87 |
+
msgstr "Voeg een nieuwe bericht toe op %s"
|
88 |
+
|
89 |
+
#: edcal.php:248
|
90 |
+
msgid "New %s - "
|
91 |
+
msgstr "Nieuwe %s - "
|
92 |
+
|
93 |
+
#: edcal.php:249
|
94 |
+
msgid "Update"
|
95 |
+
msgstr "Bijwerken"
|
96 |
+
|
97 |
+
#: edcal.php:250 edcal.php:408
|
98 |
+
msgid "Schedule"
|
99 |
+
msgstr "Planning"
|
100 |
+
|
101 |
+
#: edcal.php:251
|
102 |
+
msgid "Submit for Review"
|
103 |
+
msgstr "Inzenden voor review"
|
104 |
+
|
105 |
+
#: edcal.php:252
|
106 |
+
msgid "Save"
|
107 |
+
msgstr "Opslaan"
|
108 |
+
|
109 |
+
#: edcal.php:253
|
110 |
+
msgid "Edit %1$s - %2$s"
|
111 |
+
msgstr "Bewerk %1$s - %2$s"
|
112 |
+
|
113 |
+
#: edcal.php:254 edcal.php:394
|
114 |
+
msgid "Scheduled"
|
115 |
+
msgstr "Gepland"
|
116 |
+
|
117 |
+
#: edcal.php:256
|
118 |
+
msgid "You are about to delete the post \""
|
119 |
+
msgstr "Je staat op het punt om het bericht te verwijderen \""
|
120 |
+
|
121 |
+
#: edcal.php:257
|
122 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
123 |
+
msgstr "\". Klik op Annuleer om te stoppen of op OK om te verwijderen."
|
124 |
+
|
125 |
+
#: edcal.php:259
|
126 |
+
msgid "Looks like someone else already moved this post."
|
127 |
+
msgstr "Het lijkt erop dat iemand anders dit bericht al verplaatst heeft."
|
128 |
+
|
129 |
+
#: edcal.php:260
|
130 |
+
msgid "You do not have permission to edit posts."
|
131 |
+
msgstr "Je hebt onvoldoende rechten om berichten te mogen bewerken."
|
132 |
+
|
133 |
+
#: edcal.php:261
|
134 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
135 |
+
msgstr "Ongeldige checksum voor bericht. Dit is gebruikelijk bij een cross-site scripting-fout."
|
136 |
+
|
137 |
+
#: edcal.php:262
|
138 |
+
msgid "There was an error contacting your blog."
|
139 |
+
msgstr "Er is een fout opgetreden bij de verbinding met je blog."
|
140 |
+
|
141 |
+
#: edcal.php:264
|
142 |
+
msgid "Screen Options"
|
143 |
+
msgstr "Schermopties"
|
144 |
+
|
145 |
+
#: edcal.php:265
|
146 |
+
msgid "Colors"
|
147 |
+
msgstr "Kleuren"
|
148 |
+
|
149 |
+
#: edcal.php:266
|
150 |
+
msgid "Drafts: "
|
151 |
+
msgstr "Concepten:"
|
152 |
+
|
153 |
+
#: edcal.php:267
|
154 |
+
msgid "Apply"
|
155 |
+
msgstr "Toepassen"
|
156 |
+
|
157 |
+
#: edcal.php:268
|
158 |
+
msgid "Show on screen"
|
159 |
+
msgstr "Toon op scherm"
|
160 |
+
|
161 |
+
#: edcal.php:269
|
162 |
+
msgid " weeks at a time"
|
163 |
+
msgstr "weken per keer"
|
164 |
+
|
165 |
+
#: edcal.php:270
|
166 |
+
msgid "Show in Calendar Cell"
|
167 |
+
msgstr "Toon in kalendercel"
|
168 |
+
|
169 |
+
#: edcal.php:271
|
170 |
+
msgid "Author"
|
171 |
+
msgstr "Auteur"
|
172 |
+
|
173 |
+
#: edcal.php:272 edcal.php:388
|
174 |
+
msgid "Status"
|
175 |
+
msgstr "Status"
|
176 |
+
|
177 |
+
#: edcal.php:273
|
178 |
+
msgid "Time of day"
|
179 |
+
msgstr "Tijd van de dag"
|
180 |
+
|
181 |
+
#: edcal.php:274
|
182 |
+
msgid "An error occurred while loading the calendar: "
|
183 |
+
msgstr "Er is een fout opgetreden tijdens het laden van de kalender:"
|
184 |
+
|
185 |
+
#: edcal.php:276
|
186 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
187 |
+
msgstr "De kalender kan alleen tussen 1 en 5 weken per keer tonen."
|
188 |
+
|
189 |
+
#: edcal.php:277
|
190 |
+
msgid "Select the number of weeks for the calendar to show."
|
191 |
+
msgstr "Selecteer het aantal weken dat de kalender moet tonen."
|
192 |
+
|
193 |
+
#: edcal.php:285
|
194 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
195 |
+
msgstr "<h2>We zijn klaar</h2>We zijn klaar met het verzamelen van de data. Dank je wel voor het helpen bij het verbeteren van de kalender."
|
196 |
+
|
197 |
+
#: edcal.php:326
|
198 |
+
msgid " Calendar"
|
199 |
+
msgstr "Kalender"
|
200 |
+
|
201 |
+
#: edcal.php:335
|
202 |
+
msgid "Jump back"
|
203 |
+
msgstr "Ga terug"
|
204 |
+
|
205 |
+
#: edcal.php:337
|
206 |
+
msgid "Skip ahead"
|
207 |
+
msgstr "Ga vooruit"
|
208 |
+
|
209 |
+
#: edcal.php:342
|
210 |
+
msgid "Scroll the calendar and make the today visible"
|
211 |
+
msgstr "Verschuif de kalender en maak vandaag zichtbaar"
|
212 |
+
|
213 |
+
#: edcal.php:342
|
214 |
+
msgid "Show Today"
|
215 |
+
msgstr "Toon vandaag"
|
216 |
+
|
217 |
+
#: edcal.php:354
|
218 |
+
msgid "Edit Post"
|
219 |
+
msgstr "Bericht bewerken"
|
220 |
+
|
221 |
+
#: edcal.php:383
|
222 |
+
msgid "Time"
|
223 |
+
msgstr "Tijd"
|
224 |
+
|
225 |
+
#: edcal.php:391
|
226 |
+
msgid "Draft"
|
227 |
+
msgstr "Concept"
|
228 |
+
|
229 |
+
#: edcal.php:392
|
230 |
+
msgid "Pending Review"
|
231 |
+
msgstr "Wachtend op review"
|
232 |
+
|
233 |
+
#: edcal.php:734 edcal.php:737
|
234 |
+
msgid "Error in deleting..."
|
235 |
+
msgstr "Fout bij het verwijderen..."
|
236 |
+
|
237 |
+
#: edcal.php:190 edcal.php:274
|
238 |
+
msgid "ltr"
|
239 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-pl_PL.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-pl_PL.po
ADDED
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of the WordPress plugin by .
|
2 |
+
# Copyright (C) 2010
|
3 |
+
# This file is distributed under the same license as the package.
|
4 |
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
5 |
+
#
|
6 |
+
msgid ""
|
7 |
+
msgstr ""
|
8 |
+
"Project-Id-Version: \n"
|
9 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/editorial-calendar\n"
|
10 |
+
"POT-Creation-Date: 2010-04-14 14:22+0000\n"
|
11 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
12 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
13 |
+
"Language-Team: POLISH <LL@li.org>\n"
|
14 |
+
"MIME-Version: 1.0\n"
|
15 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
16 |
+
"Content-Transfer-Encoding: 8bit\n"
|
17 |
+
"Language: pl_PL\n"
|
18 |
+
"X-Generator: Poedit 2.2.3\n"
|
19 |
+
|
20 |
+
#: edcal.php:63
|
21 |
+
msgid "Calendar"
|
22 |
+
msgstr "Kalendarz"
|
23 |
+
|
24 |
+
#: edcal.php:137 edcal.php:349
|
25 |
+
msgid "en-US"
|
26 |
+
msgstr "pl-PL"
|
27 |
+
|
28 |
+
#: edcal.php:145
|
29 |
+
msgid "on"
|
30 |
+
msgstr "na"
|
31 |
+
|
32 |
+
#: edcal.php:146
|
33 |
+
msgid "by"
|
34 |
+
msgstr "przez"
|
35 |
+
|
36 |
+
#: edcal.php:147
|
37 |
+
msgid "at"
|
38 |
+
msgstr "o"
|
39 |
+
|
40 |
+
#: edcal.php:149
|
41 |
+
msgid "New Post"
|
42 |
+
msgstr "Nowy wpis"
|
43 |
+
|
44 |
+
#: edcal.php:151
|
45 |
+
msgid " [DRAFT]"
|
46 |
+
msgstr "[SZKIC]"
|
47 |
+
|
48 |
+
#: edcal.php:152
|
49 |
+
msgid "Edit"
|
50 |
+
msgstr "Edytuj"
|
51 |
+
|
52 |
+
#: edcal.php:153
|
53 |
+
msgid "Delete"
|
54 |
+
msgstr "Usuń"
|
55 |
+
|
56 |
+
#: edcal.php:154
|
57 |
+
msgid "View"
|
58 |
+
msgstr "Podejrzyj"
|
59 |
+
|
60 |
+
#: edcal.php:155
|
61 |
+
msgid "Republish"
|
62 |
+
msgstr "Publikuj ponownie"
|
63 |
+
|
64 |
+
#: edcal.php:156
|
65 |
+
msgid "Status:"
|
66 |
+
msgstr "Stan:"
|
67 |
+
|
68 |
+
#: edcal.php:157 edcal.php:295
|
69 |
+
msgid "Cancel"
|
70 |
+
msgstr "Anuluj"
|
71 |
+
|
72 |
+
#: edcal.php:158 edcal.php:261
|
73 |
+
msgid "Title"
|
74 |
+
msgstr "Tytuł"
|
75 |
+
|
76 |
+
#: edcal.php:159 edcal.php:266
|
77 |
+
msgid "Content"
|
78 |
+
msgstr "Treść"
|
79 |
+
|
80 |
+
#: edcal.php:160
|
81 |
+
msgid "Add a new post on "
|
82 |
+
msgstr "Dodaj nowy wpis dnia"
|
83 |
+
|
84 |
+
#: edcal.php:161
|
85 |
+
msgid "New Post - "
|
86 |
+
msgstr "Nowy wpis -"
|
87 |
+
|
88 |
+
#: edcal.php:162
|
89 |
+
msgid "Update"
|
90 |
+
msgstr "Zaktualizuj"
|
91 |
+
|
92 |
+
#: edcal.php:163 edcal.php:294
|
93 |
+
msgid "Schedule"
|
94 |
+
msgstr "Zaplanuj"
|
95 |
+
|
96 |
+
#: edcal.php:164
|
97 |
+
msgid "Save"
|
98 |
+
msgstr "Zapisz"
|
99 |
+
|
100 |
+
#: edcal.php:165 edcal.php:255
|
101 |
+
msgid "Edit Post"
|
102 |
+
msgstr "Edytuj wpis"
|
103 |
+
|
104 |
+
#: edcal.php:166 edcal.php:287
|
105 |
+
msgid "Scheduled"
|
106 |
+
msgstr "Zaplanowano"
|
107 |
+
|
108 |
+
#: edcal.php:168
|
109 |
+
msgid "You are about to delete the post \""
|
110 |
+
msgstr "Zamierzasz usunąć wpis \""
|
111 |
+
|
112 |
+
#: edcal.php:169
|
113 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
114 |
+
msgstr "\". Kliknij Anuluj, aby zatrzymać, OK, aby usunąć"
|
115 |
+
|
116 |
+
#: edcal.php:171
|
117 |
+
msgid "Looks like someone else already moved this post."
|
118 |
+
msgstr "Prawdopodobnie ktoś inny przeniósł ten wpis."
|
119 |
+
|
120 |
+
#: edcal.php:172
|
121 |
+
msgid "You do not have permission to edit posts."
|
122 |
+
msgstr "Nie masz uprawnień do edycji tego wpisu."
|
123 |
+
|
124 |
+
#: edcal.php:173
|
125 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
126 |
+
msgstr "Niewłaściwa suma kontrolna dla wpisu. Jest to zwykle związane z błędem cross-site scripting. "
|
127 |
+
|
128 |
+
#: edcal.php:174
|
129 |
+
msgid "There was an error contacting your blog."
|
130 |
+
msgstr "Nie udało się połączyć z Twoim blogiem."
|
131 |
+
|
132 |
+
#: edcal.php:176
|
133 |
+
msgid "Screen Options"
|
134 |
+
msgstr "Opcje ekranu"
|
135 |
+
|
136 |
+
#: edcal.php:177
|
137 |
+
msgid "Calendar Options"
|
138 |
+
msgstr "Opcje kalendarza"
|
139 |
+
|
140 |
+
#: edcal.php:178
|
141 |
+
msgid "Apply"
|
142 |
+
msgstr "Zatwierdź"
|
143 |
+
|
144 |
+
#: edcal.php:179
|
145 |
+
msgid "Show "
|
146 |
+
msgstr "Pokaż"
|
147 |
+
|
148 |
+
#: edcal.php:180
|
149 |
+
msgid "weeks at a time"
|
150 |
+
msgstr "tygodni jednocześnie"
|
151 |
+
|
152 |
+
#: edcal.php:181
|
153 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
154 |
+
msgstr "Kalendarz może pokazywać jednocześnie tylko od 1 do 5 tygodni."
|
155 |
+
|
156 |
+
#: edcal.php:182
|
157 |
+
msgid "Select the number of weeks for the calendar to show."
|
158 |
+
msgstr "Wybierz liczbę tygodni, które mają się pokazywać w kalendarzu."
|
159 |
+
|
160 |
+
#: edcal.php:226
|
161 |
+
msgid "Posts Calendar"
|
162 |
+
msgstr "Kalendarz wpisów"
|
163 |
+
|
164 |
+
#: edcal.php:235
|
165 |
+
msgid "Jump back"
|
166 |
+
msgstr "Skocz wstecz"
|
167 |
+
|
168 |
+
#: edcal.php:237
|
169 |
+
msgid "Skip ahead"
|
170 |
+
msgstr "Skocz naprzód"
|
171 |
+
|
172 |
+
#: edcal.php:242
|
173 |
+
msgid "Jump to today"
|
174 |
+
msgstr "Skocz do dzisiaj"
|
175 |
+
|
176 |
+
#: edcal.php:242
|
177 |
+
msgid "Today"
|
178 |
+
msgstr "Dzisiaj"
|
179 |
+
|
180 |
+
#: edcal.php:281
|
181 |
+
msgid "Time"
|
182 |
+
msgstr "Czas"
|
183 |
+
|
184 |
+
#: edcal.php:285
|
185 |
+
msgid "Status"
|
186 |
+
msgstr "Stan"
|
187 |
+
|
188 |
+
#: edcal.php:289
|
189 |
+
msgid "Draft"
|
190 |
+
msgstr "Szkic"
|
191 |
+
|
192 |
+
#: edcal.php:544 edcal.php:547
|
193 |
+
msgid "Error in deleting..."
|
194 |
+
msgstr "Błąd podczas usuwania..."
|
195 |
+
|
196 |
+
#: edcal.php:190 edcal.php:274
|
197 |
+
msgid "ltr"
|
198 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-pt_BR.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-pt_BR.po
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of WordPress Editorial Calendar in Portuguese (Brazil)
|
2 |
+
# This file is distributed under the same license as the WordPress Editorial Calendar package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
10 |
+
"X-Generator: Poedit 2.2.3\n"
|
11 |
+
"Project-Id-Version: WordPress Editorial Calendar\n"
|
12 |
+
"POT-Creation-Date: \n"
|
13 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
14 |
+
"Language-Team: \n"
|
15 |
+
"Language: pt_BR\n"
|
16 |
+
|
17 |
+
msgid "%1$s Calendar"
|
18 |
+
msgstr "%1$s Calendário"
|
19 |
+
|
20 |
+
msgid "Calendar"
|
21 |
+
msgstr "Calendário"
|
22 |
+
|
23 |
+
msgid "en-US"
|
24 |
+
msgstr "pt-BR"
|
25 |
+
|
26 |
+
msgid "%1$s by %2$s"
|
27 |
+
msgstr "%1$s por %2$s"
|
28 |
+
|
29 |
+
msgid "New Post"
|
30 |
+
msgstr "Novo Post"
|
31 |
+
|
32 |
+
msgid " [DRAFT]"
|
33 |
+
msgstr "[RASCUNHO]"
|
34 |
+
|
35 |
+
msgid " [PENDING]"
|
36 |
+
msgstr "[PENDENTE]"
|
37 |
+
|
38 |
+
msgid " [STICKY]"
|
39 |
+
msgstr "[FIXO]"
|
40 |
+
|
41 |
+
msgid " [DRAFT, STICKY]"
|
42 |
+
msgstr "[RASCUNHO, FIXO]"
|
43 |
+
|
44 |
+
msgid " [PENDING, STICKY]"
|
45 |
+
msgstr "[PENDENTE, FIXO]"
|
46 |
+
|
47 |
+
msgid "Edit"
|
48 |
+
msgstr "Editar"
|
49 |
+
|
50 |
+
msgid "Quick Edit"
|
51 |
+
msgstr "Ed Rápida"
|
52 |
+
|
53 |
+
msgid "Delete"
|
54 |
+
msgstr "Deletar"
|
55 |
+
|
56 |
+
msgid "View"
|
57 |
+
msgstr "Ver"
|
58 |
+
|
59 |
+
msgid "Status:"
|
60 |
+
msgstr "Estado:"
|
61 |
+
|
62 |
+
msgid "Cancel"
|
63 |
+
msgstr "Cancelar"
|
64 |
+
|
65 |
+
msgid "Title"
|
66 |
+
msgstr "Título"
|
67 |
+
|
68 |
+
msgid "Content"
|
69 |
+
msgstr "Conteúdo"
|
70 |
+
|
71 |
+
msgid "Add a new post on %s"
|
72 |
+
msgstr "Novo post em %s"
|
73 |
+
|
74 |
+
msgid "New %s - "
|
75 |
+
msgstr "Novo %s - "
|
76 |
+
|
77 |
+
msgid "Update"
|
78 |
+
msgstr "Atualizar"
|
79 |
+
|
80 |
+
msgid "Schedule"
|
81 |
+
msgstr "Agendar"
|
82 |
+
|
83 |
+
msgid "Submit for Review"
|
84 |
+
msgstr "Enviar para Revisão"
|
85 |
+
|
86 |
+
msgid "Save"
|
87 |
+
msgstr "Salvar"
|
88 |
+
|
89 |
+
msgid "Edit %1$s - %2$s"
|
90 |
+
msgstr "Editar %1$s - %2$s"
|
91 |
+
|
92 |
+
msgid "Scheduled"
|
93 |
+
msgstr "Agendado"
|
94 |
+
|
95 |
+
msgid "You are about to delete the post \""
|
96 |
+
msgstr "Você está prestes a deletar o post \""
|
97 |
+
|
98 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
99 |
+
msgstr "\". Clique Cancelar para parar, OK para deletar."
|
100 |
+
|
101 |
+
msgid "Looks like someone else already moved this post."
|
102 |
+
msgstr "Parece que alguém já moveu este post."
|
103 |
+
|
104 |
+
msgid "You do not have permission to edit posts."
|
105 |
+
msgstr "Você não tem permissão para editar posts"
|
106 |
+
|
107 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
108 |
+
msgstr "Soma de verificação inválida para o post. Este é normalmente um erro de cross-site scripting."
|
109 |
+
|
110 |
+
msgid "There was an error contacting your blog."
|
111 |
+
msgstr "Ocorreu um erro contatando seu blog."
|
112 |
+
|
113 |
+
msgid "Screen Options"
|
114 |
+
msgstr "Opções de Tela"
|
115 |
+
|
116 |
+
msgid "Colors"
|
117 |
+
msgstr "Cores"
|
118 |
+
|
119 |
+
msgid "Drafts: "
|
120 |
+
msgstr "Rascunhos: "
|
121 |
+
|
122 |
+
msgid "Apply"
|
123 |
+
msgstr "Aplicar"
|
124 |
+
|
125 |
+
msgid "Show on screen"
|
126 |
+
msgstr "Exibir na tela"
|
127 |
+
|
128 |
+
msgid " weeks at a time"
|
129 |
+
msgstr " semanas de uma vez"
|
130 |
+
|
131 |
+
msgid "Show in Calendar Cell"
|
132 |
+
msgstr "Mostrar na Célula do Calendário"
|
133 |
+
|
134 |
+
msgid "Author"
|
135 |
+
msgstr "Autor"
|
136 |
+
|
137 |
+
msgid "Status"
|
138 |
+
msgstr "Estado"
|
139 |
+
|
140 |
+
msgid "Time of day"
|
141 |
+
msgstr "Hora do dia"
|
142 |
+
|
143 |
+
msgid "An error occurred while loading the calendar: "
|
144 |
+
msgstr "Ocorreu um erro carregando o calendário: "
|
145 |
+
|
146 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
147 |
+
msgstr "O calendário só pode exibir entre 1 e 5 semanas de uma vez."
|
148 |
+
|
149 |
+
msgid "Select the number of weeks for the calendar to show."
|
150 |
+
msgstr "Selecione o número de semanas a exibir no calendário."
|
151 |
+
|
152 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
153 |
+
msgstr "<h2>Feito</h2>Acabamos a coleta de dados. Obrigado por nos ajudar a fazer o calendário melhor."
|
154 |
+
|
155 |
+
msgid "Jump back"
|
156 |
+
msgstr "Para trás"
|
157 |
+
|
158 |
+
msgid "Skip ahead"
|
159 |
+
msgstr "Para frente"
|
160 |
+
|
161 |
+
msgid "Scroll the calendar and make the today visible"
|
162 |
+
msgstr "Rolar o calendário e fazer 'hoje' visível"
|
163 |
+
|
164 |
+
msgid "Show Today"
|
165 |
+
msgstr "Mostrar Hoje"
|
166 |
+
|
167 |
+
msgid "Edit Post"
|
168 |
+
msgstr "Editar Post"
|
169 |
+
|
170 |
+
msgid "Time"
|
171 |
+
msgstr "Hora"
|
172 |
+
|
173 |
+
msgid "Draft"
|
174 |
+
msgstr "Rascunho"
|
175 |
+
|
176 |
+
msgid "Pending Review"
|
177 |
+
msgstr "Revisão Pendente"
|
178 |
+
|
179 |
+
msgid "Posts "
|
180 |
+
msgstr "Posts "
|
181 |
+
|
182 |
+
msgid "Post "
|
183 |
+
msgstr "Post "
|
184 |
+
|
185 |
+
msgid "Error in deleting..."
|
186 |
+
msgstr "Erro ao deletar..."
|
187 |
+
|
188 |
+
msgid "ltr"
|
189 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-ru_RU.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-ru_RU.po
ADDED
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of WordPress Editorial Calendar in Russian
|
2 |
+
# This file is distributed under the same license as the WordPress Editorial Calendar package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
10 |
+
"X-Generator: Poedit 2.2.3\n"
|
11 |
+
"Project-Id-Version: WordPress Editorial Calendar\n"
|
12 |
+
"POT-Creation-Date: \n"
|
13 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
14 |
+
"Language-Team: \n"
|
15 |
+
"Language: ru_RU\n"
|
16 |
+
|
17 |
+
msgid "%1$s Calendar"
|
18 |
+
msgstr "%1$s Календарь"
|
19 |
+
|
20 |
+
msgid "Calendar"
|
21 |
+
msgstr "Календарь"
|
22 |
+
|
23 |
+
msgid "en-US"
|
24 |
+
msgstr "ru-RU"
|
25 |
+
|
26 |
+
msgid "%1$s by %2$s"
|
27 |
+
msgstr "%1$s по %2$s"
|
28 |
+
|
29 |
+
msgid "New Post"
|
30 |
+
msgstr "новый публикация"
|
31 |
+
|
32 |
+
msgid " [DRAFT]"
|
33 |
+
msgstr "[черновой вариант]"
|
34 |
+
|
35 |
+
msgid " [PENDING]"
|
36 |
+
msgstr "в ожидании"
|
37 |
+
|
38 |
+
msgid " [STICKY]"
|
39 |
+
msgstr "[Важно]"
|
40 |
+
|
41 |
+
msgid " [DRAFT, STICKY]"
|
42 |
+
msgstr "[черновой вариант, Важно]"
|
43 |
+
|
44 |
+
msgid " [PENDING, STICKY]"
|
45 |
+
msgstr "[в ожидании, Важно]"
|
46 |
+
|
47 |
+
msgid "Edit"
|
48 |
+
msgstr "отредактировать"
|
49 |
+
|
50 |
+
msgid "Quick Edit"
|
51 |
+
msgstr "быстрое редактирование"
|
52 |
+
|
53 |
+
msgid "Delete"
|
54 |
+
msgstr "удалить"
|
55 |
+
|
56 |
+
msgid "View"
|
57 |
+
msgstr "смотреть"
|
58 |
+
|
59 |
+
msgid "Status:"
|
60 |
+
msgstr "статус"
|
61 |
+
|
62 |
+
msgid "Cancel"
|
63 |
+
msgstr "отменить"
|
64 |
+
|
65 |
+
msgid "Title"
|
66 |
+
msgstr "название"
|
67 |
+
|
68 |
+
msgid "Content"
|
69 |
+
msgstr "содержание"
|
70 |
+
|
71 |
+
msgid "Add a new post on %s"
|
72 |
+
msgstr "Добавить новую публикацию на %s"
|
73 |
+
|
74 |
+
msgid "New %s - "
|
75 |
+
msgstr "новая %s"
|
76 |
+
|
77 |
+
msgid "Update"
|
78 |
+
msgstr "обновить"
|
79 |
+
|
80 |
+
msgid "Schedule"
|
81 |
+
msgstr "планировать"
|
82 |
+
|
83 |
+
msgid "Submit for Review"
|
84 |
+
msgstr "Отправить на проверку"
|
85 |
+
|
86 |
+
msgid "Save"
|
87 |
+
msgstr "сохранить"
|
88 |
+
|
89 |
+
msgid "Edit %1$s - %2$s"
|
90 |
+
msgstr "отредактировать %1$s - %2$s"
|
91 |
+
|
92 |
+
msgid "Scheduled"
|
93 |
+
msgstr "Запланированно"
|
94 |
+
|
95 |
+
msgid "You are about to delete the post \""
|
96 |
+
msgstr "Вы собираетесь удалить публикацию \""
|
97 |
+
|
98 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
99 |
+
msgstr "\". Нажмите кнопку Отмена, чтобы остановить, ОК, чтобы удалить."
|
100 |
+
|
101 |
+
msgid "Looks like someone else already moved this post."
|
102 |
+
msgstr "Похоже, кто-то уже переместил этот публикацию."
|
103 |
+
|
104 |
+
msgid "You do not have permission to edit posts."
|
105 |
+
msgstr "У вас нет разрешения редактировать публикацию."
|
106 |
+
|
107 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
108 |
+
msgstr "Неверная чексам для публикаций. Обычно это межсайтовый скриптинг ошибки."
|
109 |
+
|
110 |
+
msgid "There was an error contacting your blog."
|
111 |
+
msgstr "произошла ошибка соединения с блогом."
|
112 |
+
|
113 |
+
msgid "Screen Options"
|
114 |
+
msgstr "Настройки экрана"
|
115 |
+
|
116 |
+
msgid "Colors"
|
117 |
+
msgstr "Цвета"
|
118 |
+
|
119 |
+
msgid "Drafts: "
|
120 |
+
msgstr "черновики"
|
121 |
+
|
122 |
+
msgid "Apply"
|
123 |
+
msgstr "применить"
|
124 |
+
|
125 |
+
msgid "Show on screen"
|
126 |
+
msgstr "Показать на экране"
|
127 |
+
|
128 |
+
msgid " weeks at a time"
|
129 |
+
msgstr "недели за один раз"
|
130 |
+
|
131 |
+
msgid "Show in Calendar Cell"
|
132 |
+
msgstr "Показать в ячейке календаря"
|
133 |
+
|
134 |
+
msgid "Author"
|
135 |
+
msgstr "автор"
|
136 |
+
|
137 |
+
msgid "Status"
|
138 |
+
msgstr "статус"
|
139 |
+
|
140 |
+
msgid "Time of day"
|
141 |
+
msgstr "Время дня"
|
142 |
+
|
143 |
+
msgid "An error occurred while loading the calendar: "
|
144 |
+
msgstr "Произошла ошибка при загрузке календаря:"
|
145 |
+
|
146 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
147 |
+
msgstr "Календарь может показывать только от 1 до 5 недель за один раз."
|
148 |
+
|
149 |
+
msgid "Select the number of weeks for the calendar to show."
|
150 |
+
msgstr "Выберите количество недель для календаря, чтобы показать."
|
151 |
+
|
152 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
153 |
+
msgstr "<h2>Мы закончили</h2> Мы закончили сбор данных. Спасибо за помощь в улучшении календаря."
|
154 |
+
|
155 |
+
msgid "Jump back"
|
156 |
+
msgstr "Перейти обратно"
|
157 |
+
|
158 |
+
msgid "Skip ahead"
|
159 |
+
msgstr "Перейдите"
|
160 |
+
|
161 |
+
msgid "Scroll the calendar and make the today visible"
|
162 |
+
msgstr "перекрутите календарь к сегоднешнему дню "
|
163 |
+
|
164 |
+
msgid "Show Today"
|
165 |
+
msgstr "Покажите сегодня"
|
166 |
+
|
167 |
+
msgid "Edit Post"
|
168 |
+
msgstr "Редактировать публикацию"
|
169 |
+
|
170 |
+
msgid "Time"
|
171 |
+
msgstr "время"
|
172 |
+
|
173 |
+
msgid "Draft"
|
174 |
+
msgstr "черновой вариант"
|
175 |
+
|
176 |
+
msgid "Pending Review"
|
177 |
+
msgstr "ожидает рассмотрения"
|
178 |
+
|
179 |
+
msgid "Posts "
|
180 |
+
msgstr "публикации"
|
181 |
+
|
182 |
+
msgid "Post "
|
183 |
+
msgstr "публикацию"
|
184 |
+
|
185 |
+
msgid "Error in deleting..."
|
186 |
+
msgstr "Ошибка при удалении ..."
|
187 |
+
|
188 |
+
msgid "ltr"
|
189 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-sv_SE.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-sv_SE.po
ADDED
@@ -0,0 +1,313 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WordPress Editorial Calendar v1.4\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2019-08-12 06:19-0400\n"
|
7 |
+
"Last-Translator: Zack Grossbart <zack@grossbart.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
14 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
15 |
+
"X-Poedit-Basepath: ..\n"
|
16 |
+
"X-Textdomain-Support: yes\n"
|
17 |
+
"Language: de_DE\n"
|
18 |
+
"X-Generator: Poedit 2.2.3\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
|
21 |
+
# @ editorial-calendar
|
22 |
+
#: edcal.php:90 edcal.php:112
|
23 |
+
msgid "Calendar"
|
24 |
+
msgstr "Inläggskalender"
|
25 |
+
|
26 |
+
# @ editorial-calendar
|
27 |
+
#: edcal.php:240 edcal.php:464
|
28 |
+
msgid "en-US"
|
29 |
+
msgstr "sv-SE"
|
30 |
+
|
31 |
+
# @ editorial-calendar
|
32 |
+
#: edcal.php:248
|
33 |
+
#, php-format
|
34 |
+
msgid "%1$s by %2$s"
|
35 |
+
msgstr "%1$s av %2$s"
|
36 |
+
|
37 |
+
# @ editorial-calendar
|
38 |
+
#: edcal.php:250
|
39 |
+
msgid "New Post"
|
40 |
+
msgstr "Nytt inlägg"
|
41 |
+
|
42 |
+
# @ editorial-calendar
|
43 |
+
#: edcal.php:252
|
44 |
+
msgid " [DRAFT]"
|
45 |
+
msgstr " [UTKAST]"
|
46 |
+
|
47 |
+
# @ editorial-calendar
|
48 |
+
#: edcal.php:253
|
49 |
+
msgid " [PENDING]"
|
50 |
+
msgstr " [VÄNTANDE]"
|
51 |
+
|
52 |
+
# @ editorial-calendar
|
53 |
+
#: edcal.php:254
|
54 |
+
msgid " [STICKY]"
|
55 |
+
msgstr " [KLISTRAD]"
|
56 |
+
|
57 |
+
# @ editorial-calendar
|
58 |
+
#: edcal.php:255
|
59 |
+
msgid " [DRAFT, STICKY]"
|
60 |
+
msgstr " [UTKAST, KLISTRAD]"
|
61 |
+
|
62 |
+
# @ editorial-calendar
|
63 |
+
#: edcal.php:256
|
64 |
+
msgid " [PENDING, STICKY]"
|
65 |
+
msgstr " [VÄNTANDE, KLISTRAD]"
|
66 |
+
|
67 |
+
# @ editorial-calendar
|
68 |
+
#: edcal.php:257 edcal.php:261
|
69 |
+
msgid "Edit"
|
70 |
+
msgstr "Redigera"
|
71 |
+
|
72 |
+
# @ editorial-calendar
|
73 |
+
#: edcal.php:258
|
74 |
+
msgid "Quick Edit"
|
75 |
+
msgstr "Snabbredigera"
|
76 |
+
|
77 |
+
# @ editorial-calendar
|
78 |
+
#: edcal.php:259
|
79 |
+
msgid "Delete"
|
80 |
+
msgstr "Radera"
|
81 |
+
|
82 |
+
# @ editorial-calendar
|
83 |
+
#: edcal.php:260
|
84 |
+
msgid "View"
|
85 |
+
msgstr "Förhandsgranska"
|
86 |
+
|
87 |
+
# @ editorial-calendar
|
88 |
+
#: edcal.php:262
|
89 |
+
msgid "Status:"
|
90 |
+
msgstr "Status:"
|
91 |
+
|
92 |
+
# @ editorial-calendar
|
93 |
+
#: edcal.php:263 edcal.php:433
|
94 |
+
msgid "Cancel"
|
95 |
+
msgstr "Avbryt"
|
96 |
+
|
97 |
+
# @ editorial-calendar
|
98 |
+
#: edcal.php:264 edcal.php:396
|
99 |
+
msgid "Title"
|
100 |
+
msgstr "Titel"
|
101 |
+
|
102 |
+
# @ editorial-calendar
|
103 |
+
#: edcal.php:265 edcal.php:401
|
104 |
+
msgid "Content"
|
105 |
+
msgstr "Innehåll"
|
106 |
+
|
107 |
+
# @ editorial-calendar
|
108 |
+
#: edcal.php:266
|
109 |
+
#, php-format
|
110 |
+
msgid "Add a new post on %s"
|
111 |
+
msgstr "Skapa nytt inlägg den %s"
|
112 |
+
|
113 |
+
# @ editorial-calendar
|
114 |
+
#: edcal.php:267
|
115 |
+
#, php-format
|
116 |
+
msgid "New %s - "
|
117 |
+
msgstr "Nytt %s - "
|
118 |
+
|
119 |
+
# @ editorial-calendar
|
120 |
+
#: edcal.php:268
|
121 |
+
msgid "Update"
|
122 |
+
msgstr "Uppdatera"
|
123 |
+
|
124 |
+
# @ editorial-calendar
|
125 |
+
#: edcal.php:269 edcal.php:432
|
126 |
+
msgid "Schedule"
|
127 |
+
msgstr "Schemalägg"
|
128 |
+
|
129 |
+
# @ editorial-calendar
|
130 |
+
#: edcal.php:270
|
131 |
+
msgid "Submit for Review"
|
132 |
+
msgstr "Skicka för godkännande"
|
133 |
+
|
134 |
+
# @ editorial-calendar
|
135 |
+
#: edcal.php:271
|
136 |
+
msgid "Save"
|
137 |
+
msgstr "Spara"
|
138 |
+
|
139 |
+
# @ editorial-calendar
|
140 |
+
#: edcal.php:272
|
141 |
+
#, php-format
|
142 |
+
msgid "Edit %1$s - %2$s"
|
143 |
+
msgstr "Redigera %1$s - %2$s"
|
144 |
+
|
145 |
+
# @ editorial-calendar
|
146 |
+
#: edcal.php:273 edcal.php:418
|
147 |
+
msgid "Scheduled"
|
148 |
+
msgstr "Schemalagd"
|
149 |
+
|
150 |
+
# @ editorial-calendar
|
151 |
+
#: edcal.php:275
|
152 |
+
msgid "You are about to delete the post \""
|
153 |
+
msgstr "Du är på väg att radera inlägget \""
|
154 |
+
|
155 |
+
# @ editorial-calendar
|
156 |
+
#: edcal.php:276
|
157 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
158 |
+
msgstr "\". Klicka Avbryt för att avbryta, eller OK för att radera."
|
159 |
+
|
160 |
+
# @ editorial-calendar
|
161 |
+
#: edcal.php:278
|
162 |
+
msgid "Looks like someone else already moved this post."
|
163 |
+
msgstr "Det verkar som om någon annan redan flyttat detta inlägg."
|
164 |
+
|
165 |
+
# @ editorial-calendar
|
166 |
+
#: edcal.php:279
|
167 |
+
msgid "You do not have permission to edit posts."
|
168 |
+
msgstr "Du har inte rättighet att redigera detta inlägg."
|
169 |
+
|
170 |
+
# @ editorial-calendar
|
171 |
+
#: edcal.php:280
|
172 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
173 |
+
msgstr "Ogiltig checksumma för inlägg. Detta brukar vanligtvis uppstå p.g.a. cross-site script-fel."
|
174 |
+
|
175 |
+
# @ editorial-calendar
|
176 |
+
#: edcal.php:281
|
177 |
+
msgid "There was an error contacting your blog."
|
178 |
+
msgstr "Anslutningsfel."
|
179 |
+
|
180 |
+
# @ editorial-calendar
|
181 |
+
#: edcal.php:283
|
182 |
+
msgid "Screen Options"
|
183 |
+
msgstr "Visningsalternativ"
|
184 |
+
|
185 |
+
# @ editorial-calendar
|
186 |
+
#: edcal.php:284
|
187 |
+
msgid "Colors"
|
188 |
+
msgstr "Färger"
|
189 |
+
|
190 |
+
# @ editorial-calendar
|
191 |
+
#: edcal.php:285
|
192 |
+
msgid "Drafts: "
|
193 |
+
msgstr "Utkast:"
|
194 |
+
|
195 |
+
# @ editorial-calendar
|
196 |
+
#: edcal.php:286
|
197 |
+
msgid "Apply"
|
198 |
+
msgstr "Verkställ"
|
199 |
+
|
200 |
+
# @ editorial-calendar
|
201 |
+
#: edcal.php:287
|
202 |
+
msgid "Show on screen"
|
203 |
+
msgstr "Antal veckor att visa på skärmen"
|
204 |
+
|
205 |
+
# @ editorial-calendar
|
206 |
+
#: edcal.php:288
|
207 |
+
msgid " weeks at a time"
|
208 |
+
msgstr " "
|
209 |
+
|
210 |
+
# @ editorial-calendar
|
211 |
+
#: edcal.php:289
|
212 |
+
msgid "Show in Calendar Cell"
|
213 |
+
msgstr "Visa i kalendercell"
|
214 |
+
|
215 |
+
# @ editorial-calendar
|
216 |
+
#: edcal.php:290
|
217 |
+
msgid "Author"
|
218 |
+
msgstr "Författare"
|
219 |
+
|
220 |
+
# @ editorial-calendar
|
221 |
+
#: edcal.php:291 edcal.php:412
|
222 |
+
msgid "Status"
|
223 |
+
msgstr "Status"
|
224 |
+
|
225 |
+
# @ editorial-calendar
|
226 |
+
#: edcal.php:292
|
227 |
+
msgid "Time of day"
|
228 |
+
msgstr "Klockslag"
|
229 |
+
|
230 |
+
# @ editorial-calendar
|
231 |
+
#: edcal.php:293
|
232 |
+
msgid "An error occurred while loading the calendar: "
|
233 |
+
msgstr "Ett fel uppstod när kalendern laddades:"
|
234 |
+
|
235 |
+
# @ editorial-calendar
|
236 |
+
#: edcal.php:295
|
237 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
238 |
+
msgstr "Kalendern kan bara visa mellan 1 och 5 veckor samtidigt."
|
239 |
+
|
240 |
+
# @ editorial-calendar
|
241 |
+
#: edcal.php:296
|
242 |
+
msgid "Select the number of weeks for the calendar to show."
|
243 |
+
msgstr "Välj antal veckor att visa."
|
244 |
+
|
245 |
+
# @ editorial-calendar
|
246 |
+
#: edcal.php:302
|
247 |
+
msgid "<div id=\"feedbacksection\"><h2>Help us Make the Editorial Calendar Better</h2>We are always trying to improve the Editorial Calendar and you can help. May we collect some data about your blog and browser settings to help us improve this plugin? We'll only do it once and your blog will show up on our <a target=\"_blank\" href=\"http://www.zackgrossbart.com/edcal/mint/\">Editorial Calendar Statistics page</a>.<br /><br /><button class=\"button-secondary\" onclick=\"edcal.doFeedback();\">Collect Anonymous Data</button> <a href=\"#\" id=\"nofeedbacklink\" onclick=\"edcal.noFeedback(); return false;\">No thank you</a></div>"
|
248 |
+
msgstr "<div id=\"feedbacksection\"><h2>Hjälp oss göra Editorial Calendar bättre</h2>Vi försöker hela tiden förbättra Editorial Calendar och du kan hjälpa till. Får vi samla in några data om din blogg och webbläsarinställningar för att hjälpa oss förbättra denna plug-in? Det sker endast en gång och din blogg kommer att dyka upp på vår <a target=\"_blank\" href=\"http://www.zackgrossbart.com/edcal/mint/\">Editorial Calendar statistik-sida</a>.<br /><br /><button class=\"button-secondary\" onclick=\"edcal.doFeedback();\">Skicka anonym data</button> <a href=\"#\" id=\"nofeedbacklink\" onclick=\"edcal.noFeedback(); return false;\">Nej tack</a></div>"
|
249 |
+
|
250 |
+
# @ editorial-calendar
|
251 |
+
#: edcal.php:304
|
252 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
253 |
+
msgstr "<h2>Färdigt!</h2>Datainsamlandet är klart. Tack för att du hjälper oss göra kalendern ännu bättre. "
|
254 |
+
|
255 |
+
# @ editorial-calendar
|
256 |
+
#: edcal.php:345
|
257 |
+
msgid " Calendar"
|
258 |
+
msgstr "kalender"
|
259 |
+
|
260 |
+
# @ editorial-calendar
|
261 |
+
#: edcal.php:354
|
262 |
+
msgid "Jump back"
|
263 |
+
msgstr "Tillbaka"
|
264 |
+
|
265 |
+
# @ editorial-calendar
|
266 |
+
#: edcal.php:356
|
267 |
+
msgid "Skip ahead"
|
268 |
+
msgstr "Framåt"
|
269 |
+
|
270 |
+
# @ editorial-calendar
|
271 |
+
#: edcal.php:361
|
272 |
+
msgid "Scroll the calendar and make the today visible"
|
273 |
+
msgstr "Scrolla kalendern och visa idag."
|
274 |
+
|
275 |
+
# @ editorial-calendar
|
276 |
+
#: edcal.php:361
|
277 |
+
msgid "Show Today"
|
278 |
+
msgstr "Visa idag"
|
279 |
+
|
280 |
+
# @ editorial-calendar
|
281 |
+
#: edcal.php:387
|
282 |
+
msgid "Edit Post"
|
283 |
+
msgstr "Redigera inlägg"
|
284 |
+
|
285 |
+
# @ editorial-calendar
|
286 |
+
#: edcal.php:407
|
287 |
+
msgid "Time"
|
288 |
+
msgstr "Klockan"
|
289 |
+
|
290 |
+
# @ editorial-calendar
|
291 |
+
#: edcal.php:415
|
292 |
+
msgid "Draft"
|
293 |
+
msgstr "Utkast"
|
294 |
+
|
295 |
+
# @ editorial-calendar
|
296 |
+
#: edcal.php:416
|
297 |
+
msgid "Pending Review"
|
298 |
+
msgstr "Väntande"
|
299 |
+
|
300 |
+
# @ default
|
301 |
+
#: edcal.php:735 edcal.php:738
|
302 |
+
msgid "Error in deleting..."
|
303 |
+
msgstr "Fel vid borttagning..."
|
304 |
+
|
305 |
+
msgid "Post "
|
306 |
+
msgstr "inlägg "
|
307 |
+
|
308 |
+
msgid "Posts "
|
309 |
+
msgstr "Inläggs "
|
310 |
+
|
311 |
+
#: edcal.php:190 edcal.php:274
|
312 |
+
msgid "ltr"
|
313 |
+
msgstr "ltr"
|
3.7.8/languages/editorial-calendar-template.pot
ADDED
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Translation of Editorial Calendar
|
2 |
+
# This file is distributed under the same license as the Editorial Calendar package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"PO-Revision-Date: 2012-02-26 21:34:50+0000\n"
|
6 |
+
"MIME-Version: 1.0\n"
|
7 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
8 |
+
"Content-Transfer-Encoding: 8bit\n"
|
9 |
+
|
10 |
+
msgid "Calendar"
|
11 |
+
msgstr ""
|
12 |
+
|
13 |
+
msgid "en-US"
|
14 |
+
msgstr ""
|
15 |
+
|
16 |
+
msgid "%1$s by %2$s"
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
msgid "New Post"
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
msgid " [DRAFT]"
|
23 |
+
msgstr ""
|
24 |
+
|
25 |
+
msgid " [PENDING]"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
msgid " [STICKY]"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
msgid " [DRAFT, STICKY]"
|
32 |
+
msgstr ""
|
33 |
+
|
34 |
+
msgid " [PENDING, STICKY]"
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
msgid "Edit"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
msgid "Quick Edit"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
msgid "Delete"
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
msgid "View"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
msgid "Status:"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
msgid "Cancel"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
msgid "Title"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
msgid "Content"
|
59 |
+
msgstr ""
|
60 |
+
|
61 |
+
msgid "Add a new post on %s"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
msgid "New %s - "
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
msgid "Update"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
msgid "Schedule"
|
71 |
+
msgstr ""
|
72 |
+
|
73 |
+
msgid "Submit for Review"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
msgid "Save"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
msgid "Edit %1$s - %2$s"
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
msgid "Scheduled"
|
83 |
+
msgstr ""
|
84 |
+
|
85 |
+
msgid "You are about to delete the post \""
|
86 |
+
msgstr ""
|
87 |
+
|
88 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
msgid "Looks like someone else already moved this post."
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
msgid "You do not have permission to edit posts."
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
msgid "There was an error contacting your blog."
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
msgid "Screen Options"
|
104 |
+
msgstr ""
|
105 |
+
|
106 |
+
msgid "Colors"
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
msgid "Drafts: "
|
110 |
+
msgstr ""
|
111 |
+
|
112 |
+
msgid "Apply"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
msgid "Show on screen"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
msgid " weeks at a time"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
msgid "Show in Calendar Cell"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
msgid "Author"
|
125 |
+
msgstr ""
|
126 |
+
|
127 |
+
msgid "Status"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
msgid "Time of day"
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
msgid "An error occurred while loading the calendar: "
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
msgid "The calendar can only show between 1 and 5 weeks at a time."
|
137 |
+
msgstr ""
|
138 |
+
|
139 |
+
msgid "Select the number of weeks for the calendar to show."
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
msgid "<h2>We're done</h2>We've finished collecting data. Thank you for helping us make the calendar better."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
msgid "%1$s Calendar"
|
146 |
+
msgstr ""
|
147 |
+
|
148 |
+
msgid "Jump back"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
msgid "Skip ahead"
|
152 |
+
msgstr ""
|
153 |
+
|
154 |
+
msgid "Scroll the calendar and make the today visible"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
msgid "Show Today"
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
msgid "Edit Post"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
msgid "Time"
|
164 |
+
msgstr ""
|
165 |
+
|
166 |
+
msgid "Draft"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
msgid "Pending Review"
|
170 |
+
msgstr ""
|
171 |
+
|
172 |
+
msgid "Posts "
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
msgid "Post "
|
176 |
+
msgstr ""
|
177 |
+
|
178 |
+
msgid "Error in deleting..."
|
179 |
+
msgstr ""
|
180 |
+
|
181 |
+
msgid "ltr"
|
182 |
+
msgstr ""
|
3.7.8/languages/editorial-calendar-tr_TR.mo
ADDED
Binary file
|
3.7.8/languages/editorial-calendar-tr_TR.po
ADDED
@@ -0,0 +1,331 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WordPress Editorial Calendar\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2018-05-28 08:22-0400\n"
|
7 |
+
"Last-Translator: adnan <auludag@mac.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"Language: tr\n"
|
10 |
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
+
"X-Generator: Poedit 2.0.7\n"
|
16 |
+
"X-Poedit-Basepath: .\n"
|
17 |
+
"X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
|
18 |
+
"__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
|
19 |
+
"_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
|
20 |
+
"esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
|
21 |
+
"esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
|
22 |
+
"X-Loco-Target-Locale: tr_TR\n"
|
23 |
+
"X-Poedit-SearchPath-0: ..\n"
|
24 |
+
|
25 |
+
#. Name of the plugin
|
26 |
+
msgid "WordPress Editorial Calendar"
|
27 |
+
msgstr "WordPress Yayın Takvimi"
|
28 |
+
|
29 |
+
#. Description of the plugin
|
30 |
+
msgid ""
|
31 |
+
"The Editorial Calendar makes it possible to see all your posts and drag and "
|
32 |
+
"drop them to manage your blog."
|
33 |
+
msgstr ""
|
34 |
+
"Yayın takvimi tüm yazılarınızı görmeyi ve blogunuzu yönetmek için onları "
|
35 |
+
"sürükleyip bırakmayı sağlar. "
|
36 |
+
|
37 |
+
#. Author of the plugin
|
38 |
+
msgid "Colin Vernon, Justin Evans, Joachim Kudish, Mary Vogt, and Zack Grossbart"
|
39 |
+
msgstr "Colin Vernon, Justin Evans, Joachim Kudish, Mary Vogt, ve Zack Grossbart"
|
40 |
+
|
41 |
+
#. Author URI of the plugin
|
42 |
+
msgid "http://www.zackgrossbart.com"
|
43 |
+
msgstr "http://www.zackgrossbart.com"
|
44 |
+
|
45 |
+
#. URI of the plugin
|
46 |
+
msgid "http://stresslimitdesign.com/editorial-calendar-plugin"
|
47 |
+
msgstr "http://stresslimitdesign.com/editorial-calendar-plugin"
|
48 |
+
|
49 |
+
#: ../edcal.php:101 ../edcal.php:126
|
50 |
+
msgid "Calendar"
|
51 |
+
msgstr "Takvim"
|
52 |
+
|
53 |
+
#: ../edcal.php:196 ../edcal.php:281
|
54 |
+
msgid "ltr"
|
55 |
+
msgstr "ltr"
|
56 |
+
|
57 |
+
#: ../edcal.php:269 ../edcal.php:539
|
58 |
+
msgid "en-US"
|
59 |
+
msgstr "tr-TR"
|
60 |
+
|
61 |
+
#: ../edcal.php:277
|
62 |
+
#, php-format
|
63 |
+
msgid "%1$s by %2$s"
|
64 |
+
msgstr "%2$s tarafından %1$s"
|
65 |
+
|
66 |
+
#: ../edcal.php:279
|
67 |
+
msgid "New Post"
|
68 |
+
msgstr "Yeni Yazı"
|
69 |
+
|
70 |
+
#: ../edcal.php:280 ../edcal.php:300
|
71 |
+
msgid "New Draft"
|
72 |
+
msgstr "Yeni taslak"
|
73 |
+
|
74 |
+
#: ../edcal.php:283
|
75 |
+
msgid " [DRAFT]"
|
76 |
+
msgstr " [TASLAK]"
|
77 |
+
|
78 |
+
#: ../edcal.php:284
|
79 |
+
msgid " [PENDING]"
|
80 |
+
msgstr " [BEKLEMEDE]"
|
81 |
+
|
82 |
+
#: ../edcal.php:285
|
83 |
+
msgid " [STICKY]"
|
84 |
+
msgstr " [YAPIŞKAN]"
|
85 |
+
|
86 |
+
#: ../edcal.php:286
|
87 |
+
msgid " [DRAFT, STICKY]"
|
88 |
+
msgstr " [TASLAK, YAPIŞKAN]"
|
89 |
+
|
90 |
+
#: ../edcal.php:287
|
91 |
+
msgid " [PENDING, STICKY]"
|
92 |
+
msgstr " [BEKLEMEDE, YAPIŞKAN]"
|
93 |
+
|
94 |
+
#: ../edcal.php:288 ../edcal.php:292
|
95 |
+
msgid "Edit"
|
96 |
+
msgstr "Düzenle"
|
97 |
+
|
98 |
+
#: ../edcal.php:289
|
99 |
+
msgid "Quick Edit"
|
100 |
+
msgstr "Hızlı Düzenle"
|
101 |
+
|
102 |
+
#: ../edcal.php:290
|
103 |
+
msgid "Delete"
|
104 |
+
msgstr "Sil"
|
105 |
+
|
106 |
+
#: ../edcal.php:291
|
107 |
+
msgid "View"
|
108 |
+
msgstr "Görünüm"
|
109 |
+
|
110 |
+
#: ../edcal.php:293
|
111 |
+
msgid "Status:"
|
112 |
+
msgstr "Durum"
|
113 |
+
|
114 |
+
#: ../edcal.php:294 ../edcal.php:486
|
115 |
+
msgid "Cancel"
|
116 |
+
msgstr "İptal"
|
117 |
+
|
118 |
+
#: ../edcal.php:295 ../edcal.php:448
|
119 |
+
msgid "Title"
|
120 |
+
msgstr "Başlık"
|
121 |
+
|
122 |
+
#: ../edcal.php:296 ../edcal.php:453
|
123 |
+
msgid "Content"
|
124 |
+
msgstr "İçerik"
|
125 |
+
|
126 |
+
#: ../edcal.php:297
|
127 |
+
#, php-format
|
128 |
+
msgid "Add a new post on %s"
|
129 |
+
msgstr " %s üzerinde yeni bir yazı ekle"
|
130 |
+
|
131 |
+
#: ../edcal.php:298
|
132 |
+
msgid "Add a new draft"
|
133 |
+
msgstr "Yeni taslak ekle"
|
134 |
+
|
135 |
+
#: ../edcal.php:299
|
136 |
+
#, php-format
|
137 |
+
msgid "New %s - "
|
138 |
+
msgstr "Yeni %s - "
|
139 |
+
|
140 |
+
#: ../edcal.php:301
|
141 |
+
msgid "Update"
|
142 |
+
msgstr "Güncelle"
|
143 |
+
|
144 |
+
#: ../edcal.php:302 ../edcal.php:485
|
145 |
+
msgid "Schedule"
|
146 |
+
msgstr "Zamanla"
|
147 |
+
|
148 |
+
#: ../edcal.php:303
|
149 |
+
msgid "Submit for Review"
|
150 |
+
msgstr "İncelemeye yolla"
|
151 |
+
|
152 |
+
#: ../edcal.php:304
|
153 |
+
msgid "Save"
|
154 |
+
msgstr "Kaydet"
|
155 |
+
|
156 |
+
#: ../edcal.php:305
|
157 |
+
#, php-format
|
158 |
+
msgid "Edit %1$s - %2$s"
|
159 |
+
msgstr "Düzenle %1$s - %2$s"
|
160 |
+
|
161 |
+
#: ../edcal.php:306 ../edcal.php:470
|
162 |
+
msgid "Scheduled"
|
163 |
+
msgstr "Zamanlandı"
|
164 |
+
|
165 |
+
#: ../edcal.php:308
|
166 |
+
msgid "You are about to delete the post \""
|
167 |
+
msgstr "Yazıyı silmek üzeresiniz. \""
|
168 |
+
|
169 |
+
#: ../edcal.php:309
|
170 |
+
msgid "\". Press Cancel to stop, OK to delete."
|
171 |
+
msgstr "\". Vazgeçmek için İptal e Silmek için OK e basın"
|
172 |
+
|
173 |
+
#: ../edcal.php:311
|
174 |
+
msgid "Looks like someone else already moved this post."
|
175 |
+
msgstr "Bu yazı zaten taşınmış görünüyor."
|
176 |
+
|
177 |
+
#: ../edcal.php:312
|
178 |
+
msgid "You do not have permission to edit posts."
|
179 |
+
msgstr "Yazıları düzenleme yetkiniz yok"
|
180 |
+
|
181 |
+
#: ../edcal.php:313
|
182 |
+
msgid "Invalid checksum for post. This is commonly a cross-site scripting error."
|
183 |
+
msgstr ""
|
184 |
+
"Yazı için geçersiz sınama. Bu genelde siteler arası komut çalıştırma hatasıdır."
|
185 |
+
|
186 |
+
#: ../edcal.php:314
|
187 |
+
msgid "There was an error contacting your blog."
|
188 |
+
msgstr "Sitenize erişim hatası oldu."
|
189 |
+
|
190 |
+
#: ../edcal.php:316
|
191 |
+
msgid "Screen Options"
|
192 |
+
msgstr "Ekran Seçenekleri"
|
193 |
+
|
194 |
+
#: ../edcal.php:317
|
195 |
+
msgid "Colors"
|
196 |
+
msgstr "Renkler"
|
197 |
+
|
198 |
+
#: ../edcal.php:318
|
199 |
+
msgid "Drafts: "
|
200 |
+
msgstr "Taslaklar"
|
201 |
+
|
202 |
+
#: ../edcal.php:319
|
203 |
+
msgid "Apply"
|
204 |
+
msgstr "Uygula"
|
205 |
+
|
206 |
+
#: ../edcal.php:320
|
207 |
+
msgid "Show on screen"
|
208 |
+
msgstr "Ekranda göster"
|
209 |
+
|
210 |
+
#: ../edcal.php:321
|
211 |
+
msgid " weeks at a time"
|
212 |
+
msgstr "hafta üstüste"
|
213 |
+
|
214 |
+
#: ../edcal.php:322
|
215 |
+
msgid "Show in Calendar Cell"
|
216 |
+
msgstr "Takvim Hücresinde Göster"
|
217 |
+
|
218 |
+
#: ../edcal.php:323
|
219 |
+
msgid "Author"
|
220 |
+
msgstr "Yazar"
|
221 |
+
|
222 |
+
#: ../edcal.php:324 ../edcal.php:464
|
223 |
+
msgid "Status"
|
224 |
+
msgstr "Durum"
|
225 |
+
|
226 |
+
#: ../edcal.php:325
|
227 |
+
msgid "Time of day"
|
228 |
+
msgstr "Günün belirli saati"
|
229 |
+
|
230 |
+
#: ../edcal.php:326
|
231 |
+
msgid "An error occurred while loading the calendar: "
|
232 |
+
msgstr "Takvim yüklenirken bir hata oluştu"
|
233 |
+
|
234 |
+
#: ../edcal.php:327
|
235 |
+
msgid ""
|
236 |
+
"<br /><br />The calendar was not able to parse the data your blog returned "
|
237 |
+
"about the posts. This error is most likely caused by a conflict with another "
|
238 |
+
"plugin on your blog. The actual parse error was:<br/><br/> "
|
239 |
+
msgstr ""
|
240 |
+
"<br /><br />Takvim yazılarınız hakkında, blogunuzun gönderdiği veriyi "
|
241 |
+
"ayrıştıramadı. Bu genelde blogunuzdaki diğer bir eklentiden kaynaklanır. Esas "
|
242 |
+
"ayrıştırma hatası:<br/><br/> "
|
243 |
+
|
244 |
+
#: ../edcal.php:329
|
245 |
+
msgid "The calendar can only show between 1 and 8 weeks at a time."
|
246 |
+
msgstr "Takvim aynı anda sadece 1 ve 8 hafta arasını gösterebilir. "
|
247 |
+
|
248 |
+
#: ../edcal.php:330
|
249 |
+
msgid "Select the number of weeks for the calendar to show."
|
250 |
+
msgstr "Takvimde gösterilecek hafta sayısını giriniz."
|
251 |
+
|
252 |
+
#: ../edcal.php:332 ../edcal.php:403
|
253 |
+
msgid "Show Unscheduled Drafts"
|
254 |
+
msgstr "Zamanlanmamış taslakları göster"
|
255 |
+
|
256 |
+
#: ../edcal.php:333
|
257 |
+
msgid "Hide Unscheduled Drafts"
|
258 |
+
msgstr "Zamanlanmamış taslakları sakla"
|
259 |
+
|
260 |
+
#: ../edcal.php:341
|
261 |
+
msgid ""
|
262 |
+
"<h2>We're done</h2>We've finished collecting data. Thank you for helping us "
|
263 |
+
"make the calendar better."
|
264 |
+
msgstr ""
|
265 |
+
"<h2>Tamamdır</h2>Veri toplamayı bitirdik. Takvimi daha iyi yapmada yardımcı "
|
266 |
+
"olduğunuz için teşekkkür ederiz."
|
267 |
+
|
268 |
+
#: ../edcal.php:382
|
269 |
+
#, php-format
|
270 |
+
msgid "%1$s Calendar"
|
271 |
+
msgstr "%1$s Takvim"
|
272 |
+
|
273 |
+
#: ../edcal.php:391
|
274 |
+
msgid "Jump back"
|
275 |
+
msgstr "Geri git"
|
276 |
+
|
277 |
+
#: ../edcal.php:393
|
278 |
+
msgid "Skip ahead"
|
279 |
+
msgstr "İleri atla"
|
280 |
+
|
281 |
+
#: ../edcal.php:394
|
282 |
+
msgid "Scroll the calendar and make the last post visible"
|
283 |
+
msgstr "Takvimi kaydır ve son yazıyı görünür kıl"
|
284 |
+
|
285 |
+
#: ../edcal.php:396
|
286 |
+
msgid "Scroll the calendar and make the today visible"
|
287 |
+
msgstr "Takvimi kaydır ve bugünü görünür kıl."
|
288 |
+
|
289 |
+
#: ../edcal.php:396
|
290 |
+
msgid "Show Today"
|
291 |
+
msgstr "Bugünü göster"
|
292 |
+
|
293 |
+
#: ../edcal.php:403
|
294 |
+
msgid "Show unscheduled posts"
|
295 |
+
msgstr "Zamanlanmamış yazıları göster"
|
296 |
+
|
297 |
+
#: ../edcal.php:409
|
298 |
+
msgid "Unscheduled draft posts"
|
299 |
+
msgstr "Zamanlanmamış taslak yazılar"
|
300 |
+
|
301 |
+
#: ../edcal.php:409
|
302 |
+
msgid "Unscheduled"
|
303 |
+
msgstr "Zamanlanmamış "
|
304 |
+
|
305 |
+
#: ../edcal.php:439
|
306 |
+
msgid "Edit Post"
|
307 |
+
msgstr "Yazıyı düzenle"
|
308 |
+
|
309 |
+
#: ../edcal.php:459
|
310 |
+
msgid "Time"
|
311 |
+
msgstr "Zaman"
|
312 |
+
|
313 |
+
#: ../edcal.php:467
|
314 |
+
msgid "Draft"
|
315 |
+
msgstr "Taslak"
|
316 |
+
|
317 |
+
#: ../edcal.php:468
|
318 |
+
msgid "Pending Review"
|
319 |
+
msgstr "Onay Bekliyor"
|
320 |
+
|
321 |
+
#: ../edcal.php:738
|
322 |
+
msgid "Posts "
|
323 |
+
msgstr "Yazılar"
|
324 |
+
|
325 |
+
#: ../edcal.php:754
|
326 |
+
msgid "Post "
|
327 |
+
msgstr "Yazı"
|
328 |
+
|
329 |
+
#: ../edcal.php:891 ../edcal.php:894
|
330 |
+
msgid "Error in deleting..."
|
331 |
+
msgstr "Silme hatası"
|
3.7.8/lib/date.extras.js
ADDED
@@ -0,0 +1,332 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* @version: 1.0 Alpha-1
|
3 |
+
* @author: Coolite Inc. http://www.coolite.com/
|
4 |
+
* @date: 2008-04-13
|
5 |
+
* @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
6 |
+
* @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
7 |
+
* @website: http://www.datejs.com/
|
8 |
+
*/
|
9 |
+
|
10 |
+
(function () {
|
11 |
+
var $D = Date,
|
12 |
+
$P = $D.prototype,
|
13 |
+
$C = $D.CultureInfo,
|
14 |
+
$f = [],
|
15 |
+
p = function (s, l) {
|
16 |
+
if (!l) {
|
17 |
+
l = 2;
|
18 |
+
}
|
19 |
+
return ("000" + s).slice(l * -1);
|
20 |
+
};
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Converts a PHP format string to Java/.NET format string.
|
24 |
+
* A PHP format string can be used with .$format or .format.
|
25 |
+
* A Java/.NET format string can be used with .toString().
|
26 |
+
* The .parseExact function will only accept a Java/.NET format string
|
27 |
+
*
|
28 |
+
* Example
|
29 |
+
<pre>
|
30 |
+
var f1 = "%m/%d/%y"
|
31 |
+
var f2 = Date.normalizeFormat(f1); // "MM/dd/yy"
|
32 |
+
|
33 |
+
new Date().format(f1); // "04/13/08"
|
34 |
+
new Date().$format(f1); // "04/13/08"
|
35 |
+
new Date().toString(f2); // "04/13/08"
|
36 |
+
|
37 |
+
var date = Date.parseExact("04/13/08", f2); // Sun Apr 13 2008
|
38 |
+
</pre>
|
39 |
+
* @param {String} A PHP format string consisting of one or more format spcifiers.
|
40 |
+
* @return {String} The PHP format converted to a Java/.NET format string.
|
41 |
+
*/
|
42 |
+
$D.normalizeFormat = function (format) {
|
43 |
+
$f = [];
|
44 |
+
var t = new Date().$format(format);
|
45 |
+
return $f.join("");
|
46 |
+
};
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Format a local Unix timestamp according to locale settings
|
50 |
+
*
|
51 |
+
* Example
|
52 |
+
<pre>
|
53 |
+
Date.strftime("%m/%d/%y", new Date()); // "04/13/08"
|
54 |
+
Date.strftime("c", "2008-04-13T17:52:03Z"); // "04/13/08"
|
55 |
+
</pre>
|
56 |
+
* @param {String} A format string consisting of one or more format spcifiers [Optional].
|
57 |
+
* @param {Number} The number representing the number of seconds that have elapsed since January 1, 1970 (local time).
|
58 |
+
* @return {String} A string representation of the current Date object.
|
59 |
+
*/
|
60 |
+
$D.strftime = function (format, time) {
|
61 |
+
return new Date(time * 1000).$format(format);
|
62 |
+
};
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Parse any textual datetime description into a Unix timestamp.
|
66 |
+
* A Unix timestamp is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT).
|
67 |
+
*
|
68 |
+
* Example
|
69 |
+
<pre>
|
70 |
+
Date.strtotime("04/13/08"); // 1208044800
|
71 |
+
Date.strtotime("1970-01-01T00:00:00Z"); // 0
|
72 |
+
</pre>
|
73 |
+
* @param {String} A format string consisting of one or more format spcifiers [Optional].
|
74 |
+
* @param {Object} A string or date object.
|
75 |
+
* @return {String} A string representation of the current Date object.
|
76 |
+
*/
|
77 |
+
$D.strtotime = function (time) {
|
78 |
+
var d = $D.parse(time);
|
79 |
+
d.addMinutes(d.getTimezoneOffset() * -1);
|
80 |
+
return Math.round($D.UTC(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds()) / 1000);
|
81 |
+
};
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Converts the value of the current Date object to its equivalent string representation using a PHP/Unix style of date format specifiers.
|
85 |
+
*
|
86 |
+
* The following descriptions are from http://www.php.net/strftime and http://www.php.net/manual/en/function.date.php.
|
87 |
+
* Copyright © 2001-2008 The PHP Group
|
88 |
+
*
|
89 |
+
* Format Specifiers
|
90 |
+
<pre>
|
91 |
+
Format Description Example
|
92 |
+
------ --------------------------------------------------------------------------- -----------------------
|
93 |
+
%a abbreviated weekday name according to the current localed "Mon" through "Sun"
|
94 |
+
%A full weekday name according to the current locale "Sunday" through "Saturday"
|
95 |
+
%b abbreviated month name according to the current locale "Jan" through "Dec"
|
96 |
+
%B full month name according to the current locale "January" through "December"
|
97 |
+
%c preferred date and time representation for the current locale "4/13/2008 12:33 PM"
|
98 |
+
%C century number (the year divided by 100 and truncated to an integer) "00" to "99"
|
99 |
+
%d day of the month as a decimal number "01" to "31"
|
100 |
+
%D same as %m/%d/%y "04/13/08"
|
101 |
+
%e day of the month as a decimal number, a single digit is preceded by a space "1" to "31"
|
102 |
+
%g like %G, but without the century "08"
|
103 |
+
%G The 4-digit year corresponding to the ISO week number (see %V). "2008"
|
104 |
+
This has the same format and value as %Y, except that if the ISO week number
|
105 |
+
belongs to the previous or next year, that year is used instead.
|
106 |
+
%h same as %b "Jan" through "Dec"
|
107 |
+
%H hour as a decimal number using a 24-hour clock "00" to "23"
|
108 |
+
%I hour as a decimal number using a 12-hour clock "01" to "12"
|
109 |
+
%j day of the year as a decimal number "001" to "366"
|
110 |
+
%m month as a decimal number "01" to "12"
|
111 |
+
%M minute as a decimal number "00" to "59"
|
112 |
+
%n newline character "\n"
|
113 |
+
%p either "am" or "pm" according to the given time value, or the "am" or "pm"
|
114 |
+
corresponding strings for the current locale
|
115 |
+
%r time in a.m. and p.m. notation "8:44 PM"
|
116 |
+
%R time in 24 hour notation "20:44"
|
117 |
+
%S second as a decimal number "00" to "59"
|
118 |
+
%t tab character "\t"
|
119 |
+
%T current time, equal to %H:%M:%S "12:49:11"
|
120 |
+
%u weekday as a decimal number ["1", "7"], with "1" representing Monday "1" to "7"
|
121 |
+
%U week number of the current year as a decimal number, starting with the "0" to ("52" or "53")
|
122 |
+
first Sunday as the first day of the first week
|
123 |
+
%V The ISO 8601:1988 week number of the current year as a decimal number, "00" to ("52" or "53")
|
124 |
+
range 01 to 53, where week 1 is the first week that has at least 4 days
|
125 |
+
in the current year, and with Monday as the first day of the week.
|
126 |
+
(Use %G or %g for the year component that corresponds to the week number
|
127 |
+
for the specified timestamp.)
|
128 |
+
%W week number of the current year as a decimal number, starting with the "00" to ("52" or "53")
|
129 |
+
first Monday as the first day of the first week
|
130 |
+
%w day of the week as a decimal, Sunday being "0" "0" to "6"
|
131 |
+
%x preferred date representation for the current locale without the time "4/13/2008"
|
132 |
+
%X preferred time representation for the current locale without the date "12:53:05"
|
133 |
+
%y year as a decimal number without a century "00" "99"
|
134 |
+
%Y year as a decimal number including the century "2008"
|
135 |
+
%Z time zone or name or abbreviation "UTC", "EST", "PST"
|
136 |
+
%z same as %Z
|
137 |
+
%% a literal "%" character "%"
|
138 |
+
|
139 |
+
d Day of the month, 2 digits with leading zeros "01" to "31"
|
140 |
+
D A textual representation of a day, three letters "Mon" through "Sun"
|
141 |
+
j Day of the month without leading zeros "1" to "31"
|
142 |
+
l A full textual representation of the day of the week (lowercase "L") "Sunday" through "Saturday"
|
143 |
+
N ISO-8601 numeric representation of the day of the week (added in PHP 5.1.0) "1" (for Monday) through "7" (for Sunday)
|
144 |
+
S English ordinal suffix for the day of the month, 2 characters "st", "nd", "rd" or "th". Works well with j
|
145 |
+
w Numeric representation of the day of the week "0" (for Sunday) through "6" (for Saturday)
|
146 |
+
z The day of the year (starting from "0") "0" through "365"
|
147 |
+
W ISO-8601 week number of year, weeks starting on Monday "00" to ("52" or "53")
|
148 |
+
F A full textual representation of a month, such as January or March "January" through "December"
|
149 |
+
m Numeric representation of a month, with leading zeros "01" through "12"
|
150 |
+
M A short textual representation of a month, three letters "Jan" through "Dec"
|
151 |
+
n Numeric representation of a month, without leading zeros "1" through "12"
|
152 |
+
t Number of days in the given month "28" through "31"
|
153 |
+
L Whether it's a leap year "1" if it is a leap year, "0" otherwise
|
154 |
+
o ISO-8601 year number. This has the same value as Y, except that if the "2008"
|
155 |
+
ISO week number (W) belongs to the previous or next year, that year
|
156 |
+
is used instead.
|
157 |
+
Y A full numeric representation of a year, 4 digits "2008"
|
158 |
+
y A two digit representation of a year "08"
|
159 |
+
a Lowercase Ante meridiem and Post meridiem "am" or "pm"
|
160 |
+
A Uppercase Ante meridiem and Post meridiem "AM" or "PM"
|
161 |
+
B Swatch Internet time "000" through "999"
|
162 |
+
g 12-hour format of an hour without leading zeros "1" through "12"
|
163 |
+
G 24-hour format of an hour without leading zeros "0" through "23"
|
164 |
+
h 12-hour format of an hour with leading zeros "01" through "12"
|
165 |
+
H 24-hour format of an hour with leading zeros "00" through "23"
|
166 |
+
i Minutes with leading zeros "00" to "59"
|
167 |
+
s Seconds, with leading zeros "00" through "59"
|
168 |
+
u Milliseconds "54321"
|
169 |
+
e Timezone identifier "UTC", "EST", "PST"
|
170 |
+
I Whether or not the date is in daylight saving time (uppercase i) "1" if Daylight Saving Time, "0" otherwise
|
171 |
+
O Difference to Greenwich time (GMT) in hours "+0200", "-0600"
|
172 |
+
P Difference to Greenwich time (GMT) with colon between hours and minutes "+02:00", "-06:00"
|
173 |
+
T Timezone abbreviation "UTC", "EST", "PST"
|
174 |
+
Z Timezone offset in seconds. The offset for timezones west of UTC is "-43200" through "50400"
|
175 |
+
always negative, and for those east of UTC is always positive.
|
176 |
+
c ISO 8601 date "2004-02-12T15:19:21+00:00"
|
177 |
+
r RFC 2822 formatted date "Thu, 21 Dec 2000 16:01:07 +0200"
|
178 |
+
U Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) "0"
|
179 |
+
</pre>
|
180 |
+
* @param {String} A format string consisting of one or more format spcifiers [Optional].
|
181 |
+
* @return {String} A string representation of the current Date object.
|
182 |
+
*/
|
183 |
+
$P.$format = function (format) {
|
184 |
+
var x = this,
|
185 |
+
y,
|
186 |
+
t = function (v) {
|
187 |
+
$f.push(v);
|
188 |
+
return x.toString(v);
|
189 |
+
};
|
190 |
+
|
191 |
+
return format ? format.replace(/(%|\\)?.|%%/g,
|
192 |
+
function (m) {
|
193 |
+
if (m.charAt(0) === "\\" || m.substring(0, 2) === "%%") {
|
194 |
+
return m.replace("\\", "").replace("%%", "%");
|
195 |
+
}
|
196 |
+
switch (m) {
|
197 |
+
case "d":
|
198 |
+
case "%d":
|
199 |
+
return t("dd");
|
200 |
+
case "D":
|
201 |
+
case "%a":
|
202 |
+
return t("ddd");
|
203 |
+
case "j":
|
204 |
+
case "%e":
|
205 |
+
return t("d");
|
206 |
+
case "l":
|
207 |
+
case "%A":
|
208 |
+
return t("dddd");
|
209 |
+
case "N":
|
210 |
+
case "%u":
|
211 |
+
return x.getDay() + 1;
|
212 |
+
case "S":
|
213 |
+
return t("S");
|
214 |
+
case "w":
|
215 |
+
case "%w":
|
216 |
+
return x.getDay();
|
217 |
+
case "z":
|
218 |
+
return x.getOrdinalNumber();
|
219 |
+
case "%j":
|
220 |
+
return p(x.getOrdinalNumber(), 3);
|
221 |
+
case "%U":
|
222 |
+
var d1 = x.clone().set({month: 0, day: 1}).addDays(-1).moveToDayOfWeek(0),
|
223 |
+
d2 = x.clone().addDays(1).moveToDayOfWeek(0, -1);
|
224 |
+
return (d2 < d1) ? "00" : p((d2.getOrdinalNumber() - d1.getOrdinalNumber()) / 7 + 1);
|
225 |
+
case "W":
|
226 |
+
case "%V":
|
227 |
+
return x.getISOWeek();
|
228 |
+
case "%W":
|
229 |
+
return p(x.getWeek());
|
230 |
+
case "F":
|
231 |
+
case "%B":
|
232 |
+
return t("MMMM");
|
233 |
+
case "m":
|
234 |
+
case "%m":
|
235 |
+
return t("MM");
|
236 |
+
case "M":
|
237 |
+
case "%b":
|
238 |
+
case "%h":
|
239 |
+
return t("MMM");
|
240 |
+
case "n":
|
241 |
+
return t("M");
|
242 |
+
case "t":
|
243 |
+
return $D.getDaysInMonth(x.getFullYear(), x.getMonth());
|
244 |
+
case "L":
|
245 |
+
return ($D.isLeapYear(x.getFullYear())) ? 1 : 0;
|
246 |
+
case "o":
|
247 |
+
case "%G":
|
248 |
+
return x.setWeek(x.getISOWeek()).toString("yyyy");
|
249 |
+
case "%g":
|
250 |
+
return x.$format("%G").slice(-2);
|
251 |
+
case "Y":
|
252 |
+
case "%Y":
|
253 |
+
return t("yyyy");
|
254 |
+
case "y":
|
255 |
+
case "%y":
|
256 |
+
return t("yy");
|
257 |
+
case "a":
|
258 |
+
case "%p":
|
259 |
+
return t("tt").toLowerCase();
|
260 |
+
case "A":
|
261 |
+
return t("tt").toUpperCase();
|
262 |
+
case "g":
|
263 |
+
case "%I":
|
264 |
+
return t("h");
|
265 |
+
case "G":
|
266 |
+
return t("H");
|
267 |
+
case "h":
|
268 |
+
return t("hh");
|
269 |
+
case "H":
|
270 |
+
case "%H":
|
271 |
+
return t("HH");
|
272 |
+
case "i":
|
273 |
+
case "%M":
|
274 |
+
return t("mm");
|
275 |
+
case "s":
|
276 |
+
case "%S":
|
277 |
+
return t("ss");
|
278 |
+
case "u":
|
279 |
+
return p(x.getMilliseconds(), 3);
|
280 |
+
case "I":
|
281 |
+
return (x.isDaylightSavingTime()) ? 1 : 0;
|
282 |
+
case "O":
|
283 |
+
return x.getUTCOffset();
|
284 |
+
case "P":
|
285 |
+
y = x.getUTCOffset();
|
286 |
+
return y.substring(0, y.length - 2) + ":" + y.substring(y.length - 2);
|
287 |
+
case "e":
|
288 |
+
case "T":
|
289 |
+
case "%z":
|
290 |
+
case "%Z":
|
291 |
+
return x.getTimezone();
|
292 |
+
case "Z":
|
293 |
+
return x.getTimezoneOffset() * -60;
|
294 |
+
case "B":
|
295 |
+
var now = new Date();
|
296 |
+
return Math.floor(((now.getHours() * 3600) + (now.getMinutes() * 60) + now.getSeconds() + (now.getTimezoneOffset() + 60) * 60) / 86.4);
|
297 |
+
case "c":
|
298 |
+
return x.toISOString().replace(/\"/g, "");
|
299 |
+
case "U":
|
300 |
+
return $D.strtotime("now");
|
301 |
+
case "%c":
|
302 |
+
return t("d") + " " + t("t");
|
303 |
+
case "%C":
|
304 |
+
return Math.floor(x.getFullYear() / 100 + 1);
|
305 |
+
case "%D":
|
306 |
+
return t("MM/dd/yy");
|
307 |
+
case "%n":
|
308 |
+
return "\\n";
|
309 |
+
case "%t":
|
310 |
+
return "\\t";
|
311 |
+
case "%r":
|
312 |
+
return t("hh:mm tt");
|
313 |
+
case "%R":
|
314 |
+
return t("H:mm");
|
315 |
+
case "%T":
|
316 |
+
return t("H:mm:ss");
|
317 |
+
case "%x":
|
318 |
+
return t("d");
|
319 |
+
case "%X":
|
320 |
+
return t("t");
|
321 |
+
default:
|
322 |
+
$f.push(m);
|
323 |
+
return m;
|
324 |
+
}
|
325 |
+
}
|
326 |
+
) : this._toString();
|
327 |
+
};
|
328 |
+
|
329 |
+
if (!$P.format) {
|
330 |
+
$P.format = $P.$format;
|
331 |
+
}
|
332 |
+
}());
|
3.7.8/lib/edcallib.min.js
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,f,g){a instanceof String&&(a=String(a));for(var c=a.length,b=0;b<c;b++){var e=a[b];if(f.call(g,e,b,a))return{i:b,v:e}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,f,g){a!=Array.prototype&&a!=Object.prototype&&(a[f]=g.value)};
|
2 |
+
$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,f,g,c){if(f){g=$jscomp.global;a=a.split(".");for(c=0;c<a.length-1;c++){var b=a[c];b in g||(g[b]={});g=g[b]}a=a[a.length-1];c=g[a];f=f(c);f!=c&&null!=f&&$jscomp.defineProperty(g,a,{configurable:!0,writable:!0,value:f})}};
|
3 |
+
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,g){return $jscomp.findInternal(this,a,g).v}},"es6-impl","es3");
|
4 |
+
var humanMsg={setup:function(a,f,g){humanMsg.msgID="humanMsg";humanMsg.logID="humanMsgLog";a="body";void 0==f&&(f=void 0==humanMsg.logTitle?"Message Log":humanMsg.logTitle);humanMsg.logTop=jQuery("#"+humanMsg.logID).css("top");humanMsg.msgOpacity=.9;void 0!=g&&(humanMsg.msgOpacity=parseFloat(g));jQuery(a).prepend('<div id="'+humanMsg.msgID+'" class="humanMsg"><div class="round"></div><p></p><div class="round"></div></div>');jQuery(a).append('<div id="'+humanMsg.logID+'"><p>'+f+'</p><a href="#" id="humanMsgClose">x</a><ul></ul></div>');
|
5 |
+
jQuery("#humanMsgClose").click(function(){jQuery("#"+humanMsg.logID+" p").addClass("minimized");jQuery("#humanMsgClose").hide();return!1});jQuery("#"+humanMsg.logID+" p").click(function(){humanMsg.activateLog();jQuery("#"+humanMsg.logID+" p").hasClass("minimized")?(jQuery("#humanMsgClose").show(),jQuery("#"+humanMsg.logID+" p").removeClass("minimized")):"none"!=jQuery(this).siblings("ul").css("display")?(jQuery("#"+humanMsg.logID).css("top",humanMsg.logTop),jQuery(this).siblings("ul").hide(),jQuery("#humanMsgClose").show()):
|
6 |
+
(humanMsg.setLogHeight(),jQuery(this).siblings("ul").slideToggle(),jQuery("#humanMsgClose").slideToggle())})},setLogTitle:function(a){humanMsg.logTitle=a;jQuery("#"+humanMsg.logID+" > p").text(a)},displayMsg:function(a,f){""!=a&&(humanMsg.activateLog(),clearTimeout(humanMsg.t2),jQuery("#"+humanMsg.msgID).css("top",jQuery(window).scrollTop()+75+"px"),jQuery("#"+humanMsg.msgID+" p").html(a),jQuery("#"+humanMsg.msgID+"").show().animate({opacity:humanMsg.msgOpacity},200,function(){f&&humanMsg.log(a)}),
|
7 |
+
humanMsg.t1&&clearTimeout(humanMsg.t1),humanMsg.t2&&clearTimeout(humanMsg.t2),humanMsg.t1=setTimeout(function(){humanMsg.bindEvents()},3E3),humanMsg.t2=setTimeout(function(){humanMsg.removeMsg()},5E3))},log:function(a){jQuery("#"+humanMsg.logID).show().children("ul").prepend("<li>"+a+"</li>").children("li:first").slideDown(200);"none"==jQuery("#"+humanMsg.logID+" ul").css("display")?jQuery("#"+humanMsg.logID+" p").animate({bottom:40},200,"linear",function(){jQuery(this).animate({bottom:0},300,"swing",
|
8 |
+
function(){jQuery(this).css({bottom:0})})}):humanMsg.setLogHeight();jQuery("#humanMsgClose").show();jQuery("#"+humanMsg.logID+" p").removeClass("minimized")},activateLog:function(){jQuery("#"+humanMsg.logID+" p").removeClass("faded");clearTimeout(humanMsg.t3);humanMsg.t3=setTimeout(humanMsg.fadeLog,15E3)},setLogHeight:function(){if("Microsoft Internet Explorer"===navigator.appName){var a=Math.min(48*jQuery("#"+humanMsg.logID+" ul").children("li").length,112);jQuery("#"+humanMsg.logID+" ul").css("height",
|
9 |
+
a+10+"px");jQuery("#"+humanMsg.logID).css("top","-"+(a+56+humanMsg.logTop)+"px")}else a=Math.min(14*jQuery("#"+humanMsg.logID+" ul").children("li").length,56),jQuery("#"+humanMsg.logID+" ul").css("height",a+10+"px"),jQuery("#"+humanMsg.logID).css("top","-"+(a+112+humanMsg.logTop)+"px")},bindEvents:function(){jQuery(window).mousemove(humanMsg.removeMsg).click(humanMsg.removeMsg).keypress(humanMsg.removeMsg)},removeMsg:function(){jQuery(window).unbind("mousemove",humanMsg.removeMsg).unbind("click",
|
10 |
+
humanMsg.removeMsg).unbind("keypress",humanMsg.removeMsg);jQuery("#"+humanMsg.msgID).fadeOut()},fadeLog:function(){"none"===jQuery("#"+humanMsg.logID+" ul").css("display")&&jQuery("#"+humanMsg.logID+" p").addClass("faded")}};jQuery(document).ready(function(){humanMsg.setup()});/*
|
11 |
+
Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
|
12 |
+
Licensed under the MIT License (LICENSE.txt).
|
13 |
+
|
14 |
+
Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
|
15 |
+
Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
|
16 |
+
Thanks to: Seamus Leahy for adding deltaX and deltaY
|
17 |
+
|
18 |
+
Version: 3.0.6
|
19 |
+
|
20 |
+
Requires: 1.2.2+
|
21 |
+
*/
|
22 |
+
(function(a){function f(b){var e=b||window.event,d=[].slice.call(arguments,1),c=0,g=0;b=a.event.fix(e);b.type="mousewheel";e.wheelDelta&&(c=e.wheelDelta/120);e.detail&&(c=-e.detail/3);var h=c;void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(h=0,g=-1*c);void 0!==e.wheelDeltaY&&(h=e.wheelDeltaY/120);void 0!==e.wheelDeltaX&&(g=-1*e.wheelDeltaX/120);d.unshift(b,c,g,h);return(a.event.dispatch||a.event.handle).apply(this,d)}var g=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var c=g.length;c;)a.event.fixHooks[g[--c]]=
|
23 |
+
a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=g.length;a;)this.addEventListener(g[--a],f,!1);else this.onmousewheel=f},teardown:function(){if(this.removeEventListener)for(var a=g.length;a;)this.removeEventListener(g[--a],f,!1);else this.onmousewheel=null}};a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery);var sprintf=function(){function a(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}var f=function(){f.cache.hasOwnProperty(arguments[0])||(f.cache[arguments[0]]=f.parse(arguments[0]));return f.format.call(null,f.cache[arguments[0]],arguments)};f.format=function(g,c){var b=1,e=g.length,d=[],f,m;for(f=0;f<e;f++){var h=a(g[f]);if("string"===h)d.push(g[f]);else if("array"===h){var k=g[f];if(k[2])for(h=c[b],m=0;m<k[2].length;m++){if(!h.hasOwnProperty(k[2][m]))throw sprintf('[sprintf] property "%s" does not exist',
|
24 |
+
k[2][m]);h=h[k[2][m]]}else h=k[1]?c[k[1]]:c[b++];if(/[^s]/.test(k[8])&&"number"!=a(h))throw sprintf("[sprintf] expecting number but found %s",a(h));switch(k[8]){case "b":h=h.toString(2);break;case "c":h=String.fromCharCode(h);break;case "d":h=parseInt(h,10);break;case "e":h=k[7]?h.toExponential(k[7]):h.toExponential();break;case "f":h=k[7]?parseFloat(h).toFixed(k[7]):parseFloat(h);break;case "o":h=h.toString(8);break;case "s":h=(h=String(h))&&k[7]?h.substring(0,k[7]):h;break;case "u":h=Math.abs(h);
|
25 |
+
break;case "x":h=h.toString(16);break;case "X":h=h.toString(16).toUpperCase()}h=/[def]/.test(k[8])&&k[3]&&0<=h?"+"+h:h;m=k[4]?"0"==k[4]?"0":k[4].charAt(1):" ";var l=k[6]-String(h).length;if(k[6]){for(var q=[];0<l;q[--l]=m);m=q.join("")}else m="";d.push(k[5]?h+m:m+h)}}return d.join("")};f.cache={};f.parse=function(a){for(var c,b=[],e=0;a;){if(null!==(c=/^[^\x25]+/.exec(a)))b.push(c[0]);else if(null!==(c=/^\x25{2}/.exec(a)))b.push("%");else if(null!==(c=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(a))){if(c[2]){var e=
|
26 |
+
e|1,d=[],g=c[2],f;if(null!==(f=/^([a-z_][a-z_\d]*)/i.exec(g)))for(d.push(f[1]);""!==(g=g.substring(f[0].length));)if(null!==(f=/^\.([a-z_][a-z_\d]*)/i.exec(g)))d.push(f[1]);else if(null!==(f=/^\[(\d+)\]/.exec(g)))d.push(f[1]);else throw"[sprintf] huh?";else throw"[sprintf] huh?";c[2]=d}else e|=2;if(3===e)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";b.push(c)}else throw"[sprintf] huh?";a=a.substring(c[0].length)}return b};return f}(),vsprintf=function(a,f){f.unshift(a);
|
27 |
+
return sprintf.apply(null,f)};jQuery.cookie=function(a,f,g){if("undefined"!=typeof f){g=g||{};null===f&&(f="",g.expires=-1);var c="";g.expires&&("number"==typeof g.expires||g.expires.toUTCString)&&("number"==typeof g.expires?(c=new Date,c.setTime(c.getTime()+864E5*g.expires)):c=g.expires,c="; expires="+c.toUTCString());var b=g.path?"; path="+g.path:"",e=g.domain?"; domain="+g.domain:"";g=g.secure?"; secure":"";document.cookie=[a,"=",encodeURIComponent(f),c,b,e,g].join("")}else{f=null;if(document.cookie&&""!=document.cookie)for(g=
|
28 |
+
document.cookie.split(";"),c=0;c<g.length;c++)if(b=jQuery.trim(g[c]),b.substring(0,a.length+1)==a+"="){f=decodeURIComponent(b.substring(a.length+1));break}return f}};(function(a){a.fn.bgIframe=a.fn.bgiframe=function(f){if(a.browser_backward_hack.msie&&6>=parseInt(a.browser_backward_hack.version)){f=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:!0,src:"javascript:false;"},f||{});var g=function(a){return a&&a.constructor==Number?a+"px":a},c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+f.src+'"style="display:block;position:absolute;z-index:-1;'+(!1!==f.opacity?"filter:Alpha(Opacity='0');":"")+"top:"+("auto"==f.top?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":
|
29 |
+
g(f.top))+";left:"+("auto"==f.left?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":g(f.left))+";width:"+("auto"==f.width?"expression(this.parentNode.offsetWidth+'px')":g(f.width))+";height:"+("auto"==f.height?"expression(this.parentNode.offsetHeight+'px')":g(f.height))+';"/>';return this.each(function(){0==a("> iframe.bgiframe",this).length&&this.insertBefore(document.createElement(c),this.firstChild)})}return this};a.browser_backward_hack||(a.browser_backward_hack={});a.browser_backward_hack.version||
|
30 |
+
(a.browser_backward_hack.version=navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1])})(jQuery);(function(a){a.each({focus:"focusin",blur:"focusout"},function(f,g){a.event.special[g]={setup:function(){if(a.browser_backward_hack.msie)return!1;this.addEventListener(f,a.event.special[g].handler,!0)},teardown:function(){if(a.browser_backward_hack.msie)return!1;this.removeEventListener(f,a.event.special[g].handler,!0)},handler:function(c){arguments[0]=a.event.fix(c);arguments[0].type=g;return a.event.handle.apply(this,arguments)}}});a.extend(a.fn,{delegate:function(f,g,c){return this.bind(f,function(b){var e=a(b.target);if(e.is(g))return c.apply(e,
|
31 |
+
arguments)})},triggerEvent:function(f,g){return this.triggerHandler(f,[a.event.fix({type:f,target:g})])}})})(jQuery);(function(a){function f(c,b){function e(d){var e=a(d);return b.globalNav?e:c.parent().find(d)}var d=this,f=a(this),m=!b.vertical,h=c.children(),k=0,l;g||(g=d);a.each(b,function(d,b){a.isFunction(b)&&f.bind(d,b)});1<h.length&&(h=a(b.items,c));c.data("finder",e);var q=e(b.prev),n=e(b.next),t=e(b.prevPage),p=e(b.nextPage);a.extend(d,{getIndex:function(){return k},getClickIndex:function(){var a=d.getItems();return a.index(a.filter("."+b.activeClass))},getConf:function(){return b},getSize:function(){return d.getItems().length},
|
32 |
+
getPageAmount:function(){return Math.ceil(this.getSize()/b.size)},getPageIndex:function(){return Math.ceil(k/b.size)},getNaviButtons:function(){return q.add(n).add(t).add(p)},getRoot:function(){return c},getItemWrap:function(){return h},getItems:function(){return h.children(b.item)},getVisibleItems:function(){return d.getItems().slice(k,k+b.size)},seekTo:function(e,c,r){function x(){r&&r.call(d,e);f.trigger("onSeek",[e])}0>e&&(e=0);if(k===e)return d;a.isFunction(c)&&(r=c);if(e>d.getSize()-b.size)return b.loop?
|
33 |
+
d.begin():this.end();var u=d.getItems().eq(e);if(!u.length)return d;var l=a.Event("onBeforeSeek");f.trigger(l,[e]);if(l.isDefaultPrevented())return d;if(void 0===c||a.isFunction(c))c=b.speed;m?h.animate({left:-u.position().left},c,b.easing,x):h.animate({top:-u.position().top},c,b.easing,x);g=d;k=e;l=a.Event("onStart");f.trigger(l,[e]);if(l.isDefaultPrevented())return d;q.add(t).toggleClass(b.disabledClass,0===e);n.add(p).toggleClass(b.disabledClass,e>=d.getSize()-b.size);return d},move:function(a,
|
34 |
+
b,d){l=0<a;return this.seekTo(k+a,b,d)},next:function(a,b){return this.move(1,a,b)},prev:function(a,b){return this.move(-1,a,b)},movePage:function(a,d,e){l=0<a;var c=b.size*a,g=k%b.size;0<g&&(c+=0<a?-g:b.size-g);return this.move(c,d,e)},prevPage:function(a,b){return this.movePage(-1,a,b)},nextPage:function(a,b){return this.movePage(1,a,b)},setPage:function(a,d,e){return this.seekTo(a*b.size,d,e)},begin:function(a,b){l=!1;return this.seekTo(0,a,b)},end:function(a,e){l=!0;var c=this.getSize()-b.size;
|
35 |
+
return 0<c?this.seekTo(c,a,e):d},reload:function(){f.trigger("onReload");return d},focus:function(){return g=d},click:function(a){var e=d.getItems().eq(a),c=b.activeClass,g=b.size;if(0>a||a>=d.getSize())return d;if(1==g){if(b.loop)return d.next();if(0===a||a==d.getSize()-1)l=void 0===l?!0:!l;return!1===l?d.prev():d.next()}return 2==g?(a==k&&a--,d.getItems().removeClass(c),e.addClass(c),d.seekTo(a,time,fn)):e.hasClass(c)||(d.getItems().removeClass(c),e.addClass(c),e=a-Math.floor(g/2),e>d.getSize()-
|
36 |
+
g&&(e=d.getSize()-g),e===a)?d:d.seekTo(e)},bind:function(a,b){f.bind(a,b);return d},unbind:function(a){f.unbind(a);return d}});a.each(["onBeforeSeek","onStart","onSeek","onReload"],function(a,b){d[b]=function(a){return d.bind(b,a)}});q.addClass(b.disabledClass).click(function(){d.prev()});n.click(function(){d.next()});p.click(function(){d.nextPage()});d.getSize()<b.size&&n.add(p).addClass(b.disabledClass);t.addClass(b.disabledClass).click(function(){d.prevPage()});var v=b.hoverClass,w="keydown."+
|
37 |
+
Math.random().toString().substring(10);d.onReload(function(){v&&d.getItems().hover(function(){a(this).addClass(v)},function(){a(this).removeClass(v)});b.clickable&&d.getItems().each(function(b){a(this).unbind("click.scrollable").bind("click.scrollable",function(e){if(!a(e.target).is("a"))return d.click(b)})});b.keyboard?a(document).unbind(w).bind(w,function(a){if(!(a.altKey||a.ctrlKey||"static"!=b.keyboard&&g!=d)){var e=b.keyboardSteps;return!m||37!=a.keyCode&&39!=a.keyCode?m||38!=a.keyCode&&40!=
|
38 |
+
a.keyCode?!0:(d.move(38==a.keyCode?-e:e),a.preventDefault()):(d.move(37==a.keyCode?-e:e),a.preventDefault())}}):a(document).unbind(w)});d.reload()}a.tools=a.tools||{};a.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:!1,speed:400,keyboard:!0,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:!0,activeClass:"active",easing:"swing",loop:!1,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:!1}};var g;a.fn.scrollable=function(c){var b=
|
39 |
+
this.eq("number"==typeof c?c:0).data("scrollable");if(b)return b;var e=a.extend({},a.tools.scrollable.conf);c=a.extend(e,c);c.keyboardSteps=c.keyboardSteps||c.size;this.each(function(){b=new f(a(this),c);a(this).data("scrollable",b)});return c.api?b:this}})(jQuery);
|
40 |
+
(function(a){var f=a.tools.scrollable;f.plugins=f.plugins||{};f.plugins.autoscroll={version:"1.0.1",conf:{autoplay:!0,interval:3E3,autopause:!0,steps:1,api:!1}};a.fn.autoscroll=function(g){"number"==typeof g&&(g={interval:g});var c=a.extend({},f.plugins.autoscroll.conf),b;a.extend(c,g);this.each(function(){var e=a(this).scrollable();e&&(b=e);var d,g,f=!0;e.play=function(){d||(f=!1,d=setInterval(function(){e.move(c.steps)},c.interval),e.move(c.steps))};e.pause=function(){d=clearInterval(d)};e.stop=
|
41 |
+
function(){e.pause();f=!0};c.autopause&&e.getRoot().add(e.getNaviButtons()).hover(function(){e.pause();clearInterval(g)},function(){f||(g=setTimeout(e.play,c.interval))});c.autoplay&&setTimeout(e.play,c.interval)});return c.api?b:this}})(jQuery);
|
42 |
+
(function(a){var f=a.tools.scrollable;f.plugins=f.plugins||{};f.plugins.navigator={version:"1.0.2",conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:!1,api:!1,idPrefix:null}};a.fn.navigator=function(g){var c=a.extend({},f.plugins.navigator.conf),b;"string"==typeof g&&(g={navi:g});g=a.extend(c,g);this.each(function(){function e(){if(c.children().length&&c.data("navi")!=d)f=g.naviItem?c.find(g.naviItem):c.children(),f.each(function(b){a(this).click(function(a){d.setPage(b);return a.preventDefault()})});
|
43 |
+
else{c.empty();c.data("navi",d);for(var b=0;b<d.getPageAmount();b++)c.append(a("<"+(g.naviItem||"a")+"/>"));f=c.children().each(function(b){var e=a(this);e.click(function(a){d.setPage(b);return a.preventDefault()});g.indexed&&e.text(b);g.idPrefix&&e.attr("id",g.idPrefix+b)})}f.eq(0).addClass(g.activeClass)}var d=a(this).scrollable(),c=d.getRoot().data("finder").call(null,g.navi),f=null,h=d.getNaviButtons();d&&(b=d);d.getNaviButtons=function(){return h.add(c)};d.onStart(function(a,b){a=g.activeClass;
|
44 |
+
f.removeClass(a).eq(d.getPageIndex()).addClass(a)});d.onReload(function(){e()});e();var k=f.filter("[href="+location.hash+"]");k.length&&d.move(f.index(k))});return g.api?b:this}})(jQuery);
|
45 |
+
(function(a){function f(b){switch(b.type){case "mousemove":return a.extend(b.data,{clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY});case "DOMMouseScroll":a.extend(b,b.data);b.delta=-b.detail/3;break;case "mousewheel":b.delta=b.wheelDelta/120}b.type="wheel";return a.event.handle.call(this,b,b.delta)}a.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};a.event.special.wheel={setup:function(){a.event.add(this,g,f,{})},teardown:function(){a.event.remove(this,g,f)}};var g=
|
46 |
+
a.browser_backward_hack.mozilla?"DOMMouseScroll"+("1.9">a.browser_backward_hack.version?" mousemove":""):"mousewheel",c=a.tools.scrollable;c.plugins=c.plugins||{};c.plugins.mousewheel={version:"1.0.1",conf:{api:!1,speed:50}};a.fn.mousewheel=function(b){var e=a.extend({},c.plugins.mousewheel.conf),d;"number"==typeof b&&(b={speed:b});b=a.extend(e,b);this.each(function(){var e=a(this).scrollable();e&&(d=e);e.getRoot().wheel(function(a,d){e.move(0>d?1:-1,b.speed||50);return!1})});return b.api?d:this}})(jQuery);(function(a){function f(a,b){var e=a.getHours(),d=b.show24Hours?e:(e+11)%12+1;b.show24Hours&&(d=(10>d?"0":"")+d);var c=a.getMinutes();a=b.timeFormat;a=a.replace("hh",d);a=a.replace("h",d);a=a.replace("mm",(10>c?"0":"")+c);return a=b.show24Hours?a.replace(" tt",""):a.replace("tt",12>e?b.amDesignator:b.pmDesignator)}function g(a,d){return"object"==typeof a?b(a):c(a,d)}function c(a,d){if(a){var e=a.split(d.separator),c=parseFloat(e[0]),e=parseFloat(e[1]);d.show24Hours||(12===c&&-1!==a.substr(d.amDesignator)?
|
47 |
+
c=0:12!==c&&-1!==a.indexOf(d.pmDesignator)&&(c+=12));return b(new Date(0,0,0,c,e,0))}return null}function b(a){a.setFullYear(2001);a.setMonth(0);a.setDate(0);return a}a.fn.timePicker=function(b){var d=a.extend({},a.fn.timePicker.defaults,b);return this.each(function(){a.timePicker(this,d)})};a.timePicker=function(b,d){b=a(b)[0];return b.timePicker||(b.timePicker=new jQuery._timePicker(b,d))};a._timePicker=function(e,d){var r=!1,m=!1,h=g(d.startTime,d),k=g(d.endTime,d);a(e).attr("autocomplete","OFF");
|
48 |
+
for(var l=[],q=new Date(h);q<=k;)l[l.length]=f(q,d),q=new Date(q.setMinutes(q.getMinutes()+d.step));for(var n=a("<div "+(d.tpDivId?'id="'+d.tpDivId+'" ':"")+'class="time-picker'+(d.show24Hours?"":" time-picker-12hours")+'"></div>'),t=a("<ul></ul>"),q=0;q<l.length;q++)t.append("<li>"+l[q]+"</li>");n.append(t);l=a(e).offset();n.appendTo("body").css({top:l.top-48+"px",left:l.left,width:a(e).width()+5+"px"}).hide();n.mouseover(function(){r=!0}).mouseout(function(){r=!1});a("li",t).mouseover(function(){m||
|
49 |
+
(a("li.selected",n).removeClass("selected"),a(this).addClass("selected"))}).mousedown(function(){r=!0}).click(function(){e.value=a(this).text();a(e).change();a.browser_backward_hack.msie||e.focus();n.hide();r=!1});var p=function(){if(n.is(":visible"))return!1;a("li",n).removeClass("selected");var g=a(e).offset();n.css({top:g.top+a(e).height()+10+"px",left:g.left,width:a(e).width()+5+"px"});n.show();var m=e.value?c(e.value,d):h,g=60*h.getHours()+h.getMinutes(),m=60*m.getHours()+m.getMinutes()-g,g=b(new Date(0,0,
|
50 |
+
0,0,Math.round(m/d.step)*d.step+g,0)),g=h<g&&g<=k?g:h,g=a("li:contains("+f(g,d)+")",n);g.length&&(g.addClass("selected"),n[0].scrollTop=g[0].offsetTop);return!0};a(e).focus(p).click(p);a(e).blur(function(){r||n.hide()});l=a.browser_backward_hack.opera||a.browser_backward_hack.mozilla?"keypress":"keydown";a(e)[l](function(b){m=!0;var d=n[0].scrollTop;switch(b.keyCode){case 38:if(p())return!1;b=a("li.selected",t);var c=b.prev().addClass("selected")[0];c?(b.removeClass("selected"),c.offsetTop<d&&(n[0].scrollTop=d-c.offsetHeight)):
|
51 |
+
(b.removeClass("selected"),c=a("li:last",t).addClass("selected")[0],n[0].scrollTop=c.offsetTop-c.offsetHeight);return!1;case 40:if(p())return!1;b=a("li.selected",t);(c=b.next().addClass("selected")[0])?(b.removeClass("selected"),c.offsetTop+c.offsetHeight>d+n[0].offsetHeight&&(n[0].scrollTop=d+c.offsetHeight)):(b.removeClass("selected"),a("li:first",t).addClass("selected"),n[0].scrollTop=0);return!1;case 13:return n.is(":visible")&&(d=a("li.selected",t)[0],e.value=a(d).text(),a(e).change(),a.browser_backward_hack.msie||
|
52 |
+
e.focus(),n.hide()),!1;case 27:return n.hide(),!1}return!0});a(e).keyup(function(a){m=!1});this.getTime=function(){return c(e.value,d)};this.setTime=function(c){e.value=f(b(c),d);a(e).change()}};a.fn.timePicker.defaults={step:30,startTime:new Date(0,0,0,0,0,0),endTime:new Date(0,0,0,23,30,0),separator:":",show24Hours:!0,timeFormat:"hh:mm tt",amDesignator:"AM",pmDesignator:"PM"}})(jQuery);this.JSON||(this.JSON={});
|
53 |
+
(function(){function a(a){return 10>a?"0"+a:a}function f(a){b.lastIndex=0;return b.test(a)?'"'+a.replace(b,function(a){var b=r[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function g(a,b){var c=e,h=b[a];h&&"object"===typeof h&&"function"===typeof h.toJSON&&(h=h.toJSON(a));"function"===typeof m&&(h=m.call(b,a,h));switch(typeof h){case "string":return f(h);case "number":return isFinite(h)?String(h):"null";case "boolean":case "null":return String(h);case "object":if(!h)return"null";
|
54 |
+
e+=d;var k=[];if("[object Array]"===Object.prototype.toString.apply(h)){var r=h.length;for(a=0;a<r;a+=1)k[a]=g(a,h)||"null";b=0===k.length?"[]":e?"[\n"+e+k.join(",\n"+e)+"\n"+c+"]":"["+k.join(",")+"]";e=c;return b}if(m&&"object"===typeof m)for(r=m.length,a=0;a<r;a+=1){var p=m[a];"string"===typeof p&&(b=g(p,h))&&k.push(f(p)+(e?": ":":")+b)}else for(p in h)Object.hasOwnProperty.call(h,p)&&(b=g(p,h))&&k.push(f(p)+(e?": ":":")+b);b=0===k.length?"{}":e?"{\n"+e+k.join(",\n"+e)+"\n"+c+"}":"{"+k.join(",")+
|
55 |
+
"}";e=c;return b}}"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(b){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var c=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
56 |
+
b=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e,d,r={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},m;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var f;d=e="";if("number"===typeof c)for(f=0;f<c;f+=1)d+=" ";else"string"===typeof c&&(d=c);if((m=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return g("",{"":a})});
|
57 |
+
"function"!==typeof JSON.parseIt&&(JSON.parseIt=function(a,b){function d(a,c){var e,g=a[c];if(g&&"object"===typeof g)for(e in g)if(Object.hasOwnProperty.call(g,e)){var f=d(g,e);void 0!==f?g[e]=f:delete g[e]}return b.call(a,c,g)}c.lastIndex=0;c.test(a)&&(a=a.replace(c,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,
|
58 |
+
"")))return a=eval("("+a+")"),"function"===typeof b?d({"":a},""):a;throw new SyntaxError("JSON.parseIt");})})();(function(a){function f(c,b){function e(d){var e=a(d);return b.globalNav?e:c.parent().find(d)}var d=this,f=a(this),m=!b.vertical,h=c.children(),k=0,l;g||(g=d);a.each(b,function(b,d){a.isFunction(d)&&f.bind(b,d)});1<h.length&&(h=a(b.items,c));c.data("finder",e);var q=e(b.prev),n=e(b.next),t=e(b.prevPage),p=e(b.nextPage);a.extend(d,{getIndex:function(){return k},getClickIndex:function(){var a=d.getItems();return a.index(a.filter("."+b.activeClass))},getConf:function(){return b},getSize:function(){return d.getItems().length},
|
59 |
+
getPageAmount:function(){return Math.ceil(this.getSize()/b.size)},getPageIndex:function(){return Math.ceil(k/b.size)},getNaviButtons:function(){return q.add(n).add(t).add(p)},getRoot:function(){return c},getItemWrap:function(){return h},getItems:function(){return h.children(b.item)},getVisibleItems:function(){return d.getItems().slice(k,k+b.size)},seekTo:function(c,e,r){function x(){r&&r.call(d,c);f.trigger("onSeek",[c])}0>c&&(c=0);if(k===c)return d;a.isFunction(e)&&(r=e);if(c>d.getSize()-b.size)return b.loop?
|
60 |
+
d.begin():this.end();var u=d.getItems().eq(c);if(!u.length)return d;var l=a.Event("onBeforeSeek");f.trigger(l,c>k);if(l.isDefaultPrevented())return d;if(void 0===e||a.isFunction(e))e=b.speed;m?h.animate({left:-u.position().left},e,b.easing,x):h.animate({top:-u.position().top},e,b.easing,x);g=d;k=c;l=a.Event("onStart");f.trigger(l,[c]);if(l.isDefaultPrevented())return d;q.add(t).toggleClass(b.disabledClass,0===c);n.add(p).toggleClass(b.disabledClass,c>=d.getSize()-b.size);return d},move:function(a,
|
61 |
+
b,c){l=0<a;return this.seekTo(k+a,b,c)},next:function(a,b){return this.move(1,a,b)},prev:function(a,b){return this.move(-1,a,b)},movePage:function(a,c,d){l=0<a;var e=b.size*a,g=k%b.size;0<g&&(e+=0<a?-g:b.size-g);return this.move(e,c,d)},prevPage:function(a,b){return this.movePage(-1,a,b)},nextPage:function(a,b){return this.movePage(1,a,b)},setPage:function(a,c,d){return this.seekTo(a*b.size,c,d)},begin:function(a,b){l=!1;return this.seekTo(0,a,b)},end:function(a,c){l=!0;var e=this.getSize()-b.size;
|
62 |
+
return 0<e?this.seekTo(e,a,c):d},reload:function(){f.trigger("onReload");return d},focus:function(){return g=d},click:function(a){var c=d.getItems().eq(a),e=b.activeClass,g=b.size;if(0>a||a>=d.getSize())return d;if(1==g){if(b.loop)return d.next();if(0===a||a==d.getSize()-1)l=void 0===l?!0:!l;return!1===l?d.prev():d.next()}return 2==g?(a==k&&a--,d.getItems().removeClass(e),c.addClass(e),d.seekTo(a,time,fn)):c.hasClass(e)||(d.getItems().removeClass(e),c.addClass(e),c=a-Math.floor(g/2),c>d.getSize()-
|
63 |
+
g&&(c=d.getSize()-g),c===a)?d:d.seekTo(c)},bind:function(a,b){f.bind(a,b);return d},unbind:function(a){f.unbind(a);return d}});a.each(["onBeforeSeek","onStart","onSeek","onReload"],function(a,b){d[b]=function(a){return d.bind(b,a)}});q.addClass(b.disabledClass).click(function(){d.prev()});n.click(function(){d.next()});p.click(function(){d.nextPage()});d.getSize()<b.size&&n.add(p).addClass(b.disabledClass);t.addClass(b.disabledClass).click(function(){d.prevPage()});var v=b.hoverClass,w="keydown."+
|
64 |
+
Math.random().toString().substring(10);d.onReload(function(){v&&d.getItems().hover(function(){a(this).addClass(v)},function(){a(this).removeClass(v)});b.clickable&&d.getItems().each(function(b){a(this).unbind("click.scrollable").bind("click.scrollable",function(c){if(!a(c.target).is("a"))return d.click(b)})});b.keyboard?a(document).unbind(w).bind(w,function(a){if(!(a.altKey||a.ctrlKey||"static"!=b.keyboard&&g!=d)){var c=b.keyboardSteps;return!m||37!=a.keyCode&&39!=a.keyCode?m||38!=a.keyCode&&40!=
|
65 |
+
a.keyCode?!0:(d.move(38==a.keyCode?-c:c),a.preventDefault()):(d.move(37==a.keyCode?-c:c),a.preventDefault())}}):a(document).unbind(w)});d.reload()}a.tools=a.tools||{};a.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:!1,speed:400,keyboard:!0,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:!0,activeClass:"active",easing:"swing",loop:!1,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:!1}};var g;a.fn.scrollable=function(c){var b=
|
66 |
+
this.eq("number"==typeof c?c:0).data("scrollable");if(b)return b;var e=a.extend({},a.tools.scrollable.conf);c=a.extend(e,c);c.keyboardSteps=c.keyboardSteps||c.size;this.each(function(){b=new f(a(this),c);a(this).data("scrollable",b)});return c.api?b:this}})(jQuery);(function(a){function f(c){switch(c.type){case "mousemove":return a.extend(c.data,{clientX:c.clientX,clientY:c.clientY,pageX:c.pageX,pageY:c.pageY});case "DOMMouseScroll":a.extend(c,c.data);c.delta=-c.detail/3;break;case "mousewheel":c.delta=c.wheelDelta/120}var b=a(this).scrollable();c.preventDefault();b.move(0>c.delta?1:-1,50);return!1}a.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};a.event.special.wheel={setup:function(){this.addEventListener("DOMMouseScroll",f,!1);this.addEventListener("mousewheel",
|
67 |
+
f,!1)},teardown:function(){this.removeEventListener("DOMMouseScroll",f,!1);this.removeEventListener("mousewheel",f,!1)}};var g=a.tools.scrollable;g.plugins=g.plugins||{};g.plugins.mousewheel={version:"1.0.1",conf:{api:!1,speed:50}};a.fn.mousewheel=function(c){var b=a.extend({},g.plugins.mousewheel.conf),e;"number"==typeof c&&(c={speed:c});c=a.extend(b,c);this.each(function(){var b=a(this).scrollable();b&&(e=b);b.getRoot().wheel(function(a,e){b.move(0>e?1:-1,c.speed||50);return!1})});return c.api?
|
68 |
+
e:this}})(jQuery);/*
|
69 |
+
: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
70 |
+
@license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
71 |
+
@website: http://www.datejs.com/
|
72 |
+
*/
|
73 |
+
(function(){var a=Date,f=a.prototype,g=[],c=function(a,c){c||(c=2);return("000"+a).slice(-1*c)};a.normalizeFormat=function(a){g=[];(new Date).$format(a);return g.join("")};a.strftime=function(a,c){return(new Date(1E3*c)).$format(a)};a.strtotime=function(b){b=a.parse(b);b.addMinutes(-1*b.getTimezoneOffset());return Math.round(a.UTC(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),b.getUTCHours(),b.getUTCMinutes(),b.getUTCSeconds(),b.getUTCMilliseconds())/1E3)};f.$format=function(b){var e=this,d,f=
|
74 |
+
function(a){g.push(a);return e.toString(a)};return b?b.replace(/(%|\\)?.|%%/g,function(b){if("\\"===b.charAt(0)||"%%"===b.substring(0,2))return b.replace("\\","").replace("%%","%");switch(b){case "d":case "%d":return f("dd");case "D":case "%a":return f("ddd");case "j":case "%e":return f("d");case "l":case "%A":return f("dddd");case "N":case "%u":return e.getDay()+1;case "S":return f("S");case "w":case "%w":return e.getDay();case "z":return e.getOrdinalNumber();case "%j":return c(e.getOrdinalNumber(),
|
75 |
+
3);case "%U":b=e.clone().set({month:0,day:1}).addDays(-1).moveToDayOfWeek(0);var h=e.clone().addDays(1).moveToDayOfWeek(0,-1);return h<b?"00":c((h.getOrdinalNumber()-b.getOrdinalNumber())/7+1);case "W":case "%V":return e.getISOWeek();case "%W":return c(e.getWeek());case "F":case "%B":return f("MMMM");case "m":case "%m":return f("MM");case "M":case "%b":case "%h":return f("MMM");case "n":return f("M");case "t":return a.getDaysInMonth(e.getFullYear(),e.getMonth());case "L":return a.isLeapYear(e.getFullYear())?
|
76 |
+
1:0;case "o":case "%G":return e.setWeek(e.getISOWeek()).toString("yyyy");case "%g":return e.$format("%G").slice(-2);case "Y":case "%Y":return f("yyyy");case "y":case "%y":return f("yy");case "a":case "%p":return f("tt").toLowerCase();case "A":return f("tt").toUpperCase();case "g":case "%I":return f("h");case "G":return f("H");case "h":return f("hh");case "H":case "%H":return f("HH");case "i":case "%M":return f("mm");case "s":case "%S":return f("ss");case "u":return c(e.getMilliseconds(),3);case "I":return e.isDaylightSavingTime()?
|
77 |
+
1:0;case "O":return e.getUTCOffset();case "P":return d=e.getUTCOffset(),d.substring(0,d.length-2)+":"+d.substring(d.length-2);case "e":case "T":case "%z":case "%Z":return e.getTimezone();case "Z":return-60*e.getTimezoneOffset();case "B":return b=new Date,Math.floor((3600*b.getHours()+60*b.getMinutes()+b.getSeconds()+60*(b.getTimezoneOffset()+60))/86.4);case "c":return e.toISOString().replace(/\"/g,"");case "U":return a.strtotime("now");case "%c":return f("d")+" "+f("t");case "%C":return Math.floor(e.getFullYear()/
|
78 |
+
100+1);case "%D":return f("MM/dd/yy");case "%n":return"\\n";case "%t":return"\\t";case "%r":return f("hh:mm tt");case "%R":return f("H:mm");case "%T":return f("H:mm:ss");case "%x":return f("d");case "%X":return f("t");default:return g.push(b),b}}):this._toString()};f.format||(f.format=f.$format)})();
|
3.7.8/lib/humanmsg.css
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
HUMANIZED MESSAGES 1.0
|
3 |
+
idea - http://www.humanized.com/weblog/2006/09/11/monolog_boxes_and_transparent_messages
|
4 |
+
home - http://humanmsg.googlecode.com
|
5 |
+
*/
|
6 |
+
|
7 |
+
.humanMsg {
|
8 |
+
font: normal 2em Helvetica, Arial, Sans-Serif;
|
9 |
+
letter-spacing: -1px;
|
10 |
+
position: fixed;
|
11 |
+
top: 130px;
|
12 |
+
left: 25%;
|
13 |
+
width: 50%;
|
14 |
+
color: white;
|
15 |
+
background-color: red;
|
16 |
+
text-align: center;
|
17 |
+
display: none;
|
18 |
+
opacity: 0;
|
19 |
+
z-index: 100000;
|
20 |
+
}
|
21 |
+
|
22 |
+
.humanMsg .round {
|
23 |
+
border-left: solid 2px white;
|
24 |
+
border-right: solid 2px white;
|
25 |
+
font-size: 1px; height: 2px;
|
26 |
+
}
|
27 |
+
|
28 |
+
.humanMsg p {
|
29 |
+
padding: .3em;
|
30 |
+
display: inline;
|
31 |
+
font-size: 1.5em;
|
32 |
+
}
|
33 |
+
|
34 |
+
.humanMsg a {
|
35 |
+
display: none;
|
36 |
+
}
|
37 |
+
|
38 |
+
#humanMsgLog {
|
39 |
+
display: none;
|
40 |
+
}
|
3.7.8/lib/humanmsg.js
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
HUMANIZED MESSAGES 1.0
|
3 |
+
idea - http://www.humanized.com/weblog/2006/09/11/monolog_boxes_and_transparent_messages
|
4 |
+
home - http://humanmsg.googlecode.com
|
5 |
+
*/
|
6 |
+
|
7 |
+
var humanMsg = {
|
8 |
+
setup: function(appendTo, logName, msgOpacity) {
|
9 |
+
humanMsg.msgID = 'humanMsg';
|
10 |
+
humanMsg.logID = 'humanMsgLog';
|
11 |
+
|
12 |
+
// appendTo is the element the msg is appended to
|
13 |
+
appendTo = 'body';
|
14 |
+
|
15 |
+
// The text on the Log tab
|
16 |
+
if (logName == undefined) {
|
17 |
+
if (humanMsg.logTitle == undefined) {
|
18 |
+
logName = 'Message Log';
|
19 |
+
} else {
|
20 |
+
logName = humanMsg.logTitle;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
humanMsg.logTop = jQuery('#'+humanMsg.logID).css("top");
|
25 |
+
|
26 |
+
// Opacity of the message
|
27 |
+
humanMsg.msgOpacity = 0.9;
|
28 |
+
|
29 |
+
if (msgOpacity != undefined)
|
30 |
+
humanMsg.msgOpacity = parseFloat(msgOpacity);
|
31 |
+
|
32 |
+
// Inject the message structure
|
33 |
+
jQuery(appendTo).prepend('<div id="'+humanMsg.msgID+'" class="humanMsg"><div class="round"></div><p></p><div class="round"></div></div>');
|
34 |
+
jQuery(appendTo).append('<div id="'+humanMsg.logID+'"><p>'+logName+'</p><a href="#" id="humanMsgClose">x</a><ul></ul></div>');
|
35 |
+
|
36 |
+
jQuery('#humanMsgClose').click(
|
37 |
+
function() {
|
38 |
+
jQuery('#'+humanMsg.logID+' p').addClass('minimized');
|
39 |
+
jQuery('#humanMsgClose').hide();
|
40 |
+
return false;
|
41 |
+
});
|
42 |
+
|
43 |
+
jQuery('#'+humanMsg.logID+' p').click(
|
44 |
+
function() {
|
45 |
+
humanMsg.activateLog();
|
46 |
+
|
47 |
+
if (jQuery('#'+humanMsg.logID+' p').hasClass('minimized')) {
|
48 |
+
jQuery('#humanMsgClose').show();
|
49 |
+
jQuery('#'+humanMsg.logID+' p').removeClass('minimized');
|
50 |
+
return;
|
51 |
+
} else if (jQuery(this).siblings('ul').css('display') != 'none') {
|
52 |
+
jQuery('#'+humanMsg.logID).css("top", humanMsg.logTop);
|
53 |
+
jQuery(this).siblings('ul').hide();
|
54 |
+
jQuery('#humanMsgClose').show();
|
55 |
+
} else {
|
56 |
+
humanMsg.setLogHeight();
|
57 |
+
jQuery(this).siblings('ul').slideToggle();
|
58 |
+
jQuery('#humanMsgClose').slideToggle();
|
59 |
+
}
|
60 |
+
}
|
61 |
+
)
|
62 |
+
},
|
63 |
+
|
64 |
+
setLogTitle: function(/*string*/ title) {
|
65 |
+
humanMsg.logTitle = title;
|
66 |
+
jQuery("#" + humanMsg.logID + " > p").text(title);
|
67 |
+
},
|
68 |
+
|
69 |
+
displayMsg: function(msg, /*boolean*/doLog) {
|
70 |
+
if (msg == '')
|
71 |
+
return;
|
72 |
+
|
73 |
+
humanMsg.activateLog();
|
74 |
+
|
75 |
+
clearTimeout(humanMsg.t2);
|
76 |
+
|
77 |
+
/*
|
78 |
+
* IE doesn't really support CSS fixed position so we need to set the position manually
|
79 |
+
*/
|
80 |
+
jQuery('#' + humanMsg.msgID).css('top', (jQuery(window).scrollTop() + 75) + 'px');
|
81 |
+
|
82 |
+
// Inject message
|
83 |
+
jQuery('#'+humanMsg.msgID+' p').html(msg)
|
84 |
+
|
85 |
+
// Show message
|
86 |
+
jQuery('#'+humanMsg.msgID+'').show().animate({ opacity: humanMsg.msgOpacity}, 200, function() {
|
87 |
+
if (doLog) {
|
88 |
+
humanMsg.log(msg);
|
89 |
+
}
|
90 |
+
|
91 |
+
});
|
92 |
+
|
93 |
+
/*
|
94 |
+
* If we are starting a new message and have an existing
|
95 |
+
* message then we want to restart the timers so the
|
96 |
+
* existing message doesn't get hidden very fast.
|
97 |
+
*/
|
98 |
+
if (humanMsg.t1) {
|
99 |
+
clearTimeout(humanMsg.t1);
|
100 |
+
}
|
101 |
+
|
102 |
+
if (humanMsg.t2) {
|
103 |
+
clearTimeout(humanMsg.t2);
|
104 |
+
}
|
105 |
+
|
106 |
+
// Watch for mouse & keyboard in .5s
|
107 |
+
humanMsg.t1 = setTimeout(function() {humanMsg.bindEvents();}, 3000);
|
108 |
+
// Remove message after 5s
|
109 |
+
humanMsg.t2 = setTimeout(function() {humanMsg.removeMsg();}, 5000);
|
110 |
+
},
|
111 |
+
|
112 |
+
log: function(msg) {
|
113 |
+
jQuery('#'+humanMsg.logID)
|
114 |
+
.show().children('ul').prepend('<li>'+msg+'</li>') // Prepend message to log
|
115 |
+
.children('li:first').slideDown(200) // Slide it down
|
116 |
+
|
117 |
+
if (jQuery('#'+humanMsg.logID+' ul').css('display') == 'none') {
|
118 |
+
jQuery('#'+humanMsg.logID+' p').animate({ bottom: 40 }, 200, 'linear', function() {
|
119 |
+
jQuery(this).animate({ bottom: 0 }, 300, 'swing', function() { jQuery(this).css({ bottom: 0 }) })
|
120 |
+
})
|
121 |
+
} else {
|
122 |
+
humanMsg.setLogHeight();
|
123 |
+
}
|
124 |
+
|
125 |
+
jQuery('#humanMsgClose').show();
|
126 |
+
jQuery('#'+humanMsg.logID+' p').removeClass('minimized');
|
127 |
+
},
|
128 |
+
|
129 |
+
activateLog: function() {
|
130 |
+
jQuery('#'+humanMsg.logID+' p').removeClass("faded");
|
131 |
+
|
132 |
+
clearTimeout(humanMsg.t3);
|
133 |
+
|
134 |
+
//fadeout the error log after 15s
|
135 |
+
humanMsg.t3 = setTimeout(humanMsg.fadeLog, 15000)
|
136 |
+
},
|
137 |
+
|
138 |
+
setLogHeight: function() {
|
139 |
+
/*
|
140 |
+
* When items are added to the log we want to adjust the top of the log (where
|
141 |
+
* the pull tab goes) and the height of the log list dynamically so the log is
|
142 |
+
* always a reasonable size.
|
143 |
+
*/
|
144 |
+
if (navigator.appName === "Microsoft Internet Explorer") {
|
145 |
+
/*
|
146 |
+
* IE just calculates the size of these list items differently thn every
|
147 |
+
* other browser. There isn't a good cross-browser way to set the height,
|
148 |
+
* so we tweak it for IE.
|
149 |
+
*/
|
150 |
+
var height = Math.min(jQuery('#'+humanMsg.logID + ' ul').children('li').length * 48, 112);
|
151 |
+
jQuery('#'+humanMsg.logID + ' ul').css("height", (height + 10) + "px");
|
152 |
+
|
153 |
+
jQuery('#'+humanMsg.logID).css("top", "-" + ((height) + 56 + humanMsg.logTop) + "px");
|
154 |
+
} else {
|
155 |
+
var height = Math.min(jQuery('#'+humanMsg.logID + ' ul').children('li').length * 14, 56);
|
156 |
+
jQuery('#'+humanMsg.logID + ' ul').css("height", (height + 10) + "px");
|
157 |
+
jQuery('#'+humanMsg.logID).css("top", "-" + ((height) + 112 + humanMsg.logTop) + "px");
|
158 |
+
}
|
159 |
+
|
160 |
+
|
161 |
+
},
|
162 |
+
|
163 |
+
bindEvents: function() {
|
164 |
+
// Remove message if mouse is moved or key is pressed
|
165 |
+
jQuery(window)
|
166 |
+
.mousemove(humanMsg.removeMsg)
|
167 |
+
.click(humanMsg.removeMsg)
|
168 |
+
.keypress(humanMsg.removeMsg)
|
169 |
+
},
|
170 |
+
|
171 |
+
removeMsg: function() {
|
172 |
+
// Unbind mouse & keyboard
|
173 |
+
jQuery(window)
|
174 |
+
.unbind('mousemove', humanMsg.removeMsg)
|
175 |
+
.unbind('click', humanMsg.removeMsg)
|
176 |
+
.unbind('keypress', humanMsg.removeMsg)
|
177 |
+
|
178 |
+
jQuery('#'+humanMsg.msgID).fadeOut();
|
179 |
+
},
|
180 |
+
|
181 |
+
fadeLog: function() {
|
182 |
+
if(jQuery('#'+humanMsg.logID+' ul').css('display') === "none") {
|
183 |
+
jQuery('#'+humanMsg.logID+' p').addClass("faded");
|
184 |
+
}
|
185 |
+
}
|
186 |
+
};
|
187 |
+
|
188 |
+
jQuery(document).ready(function(){
|
189 |
+
humanMsg.setup();
|
190 |
+
})
|
3.7.8/lib/jquery.bgiframe.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Copyright (c) 2006 Brandon Aaron (http://brandonaaron.net)
|
2 |
+
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
3 |
+
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
4 |
+
*
|
5 |
+
* jQueryLastChangedDate: 2007-06-20 03:23:36 +0200 (Mi, 20 Jun 2007) jQuery
|
6 |
+
* jQueryRev: 2110 jQuery
|
7 |
+
*
|
8 |
+
* Version 2.1
|
9 |
+
*/
|
10 |
+
|
11 |
+
(function(jQuery){
|
12 |
+
|
13 |
+
/**
|
14 |
+
* The bgiframe is chainable and applies the iframe hack to get
|
15 |
+
* around zIndex issues in IE6. It will only apply itself in IE
|
16 |
+
* and adds a class to the iframe called 'bgiframe'. The iframe
|
17 |
+
* is appeneded as the first child of the matched element(s)
|
18 |
+
* with a tabIndex and zIndex of -1.
|
19 |
+
*
|
20 |
+
* By default the plugin will take borders, sized with pixel units,
|
21 |
+
* into account. If a different unit is used for the border's width,
|
22 |
+
* then you will need to use the top and left settings as explained below.
|
23 |
+
*
|
24 |
+
* NOTICE: This plugin has been reported to cause perfromance problems
|
25 |
+
* when used on elements that change properties (like width, height and
|
26 |
+
* opacity) a lot in IE6. Most of these problems have been caused by
|
27 |
+
* the expressions used to calculate the elements width, height and
|
28 |
+
* borders. Some have reported it is due to the opacity filter. All
|
29 |
+
* these settings can be changed if needed as explained below.
|
30 |
+
*
|
31 |
+
* @example jQuery('div').bgiframe();
|
32 |
+
* @before <div><p>Paragraph</p></div>
|
33 |
+
* @result <div><iframe class="bgiframe".../><p>Paragraph</p></div>
|
34 |
+
*
|
35 |
+
* @param Map settings Optional settings to configure the iframe.
|
36 |
+
* @option String|Number top The iframe must be offset to the top
|
37 |
+
* by the width of the top border. This should be a negative
|
38 |
+
* number representing the border-top-width. If a number is
|
39 |
+
* is used here, pixels will be assumed. Otherwise, be sure
|
40 |
+
* to specify a unit. An expression could also be used.
|
41 |
+
* By default the value is "auto" which will use an expression
|
42 |
+
* to get the border-top-width if it is in pixels.
|
43 |
+
* @option String|Number left The iframe must be offset to the left
|
44 |
+
* by the width of the left border. This should be a negative
|
45 |
+
* number representing the border-left-width. If a number is
|
46 |
+
* is used here, pixels will be assumed. Otherwise, be sure
|
47 |
+
* to specify a unit. An expression could also be used.
|
48 |
+
* By default the value is "auto" which will use an expression
|
49 |
+
* to get the border-left-width if it is in pixels.
|
50 |
+
* @option String|Number width This is the width of the iframe. If
|
51 |
+
* a number is used here, pixels will be assume. Otherwise, be sure
|
52 |
+
* to specify a unit. An experssion could also be used.
|
53 |
+
* By default the value is "auto" which will use an experssion
|
54 |
+
* to get the offsetWidth.
|
55 |
+
* @option String|Number height This is the height of the iframe. If
|
56 |
+
* a number is used here, pixels will be assume. Otherwise, be sure
|
57 |
+
* to specify a unit. An experssion could also be used.
|
58 |
+
* By default the value is "auto" which will use an experssion
|
59 |
+
* to get the offsetHeight.
|
60 |
+
* @option Boolean opacity This is a boolean representing whether or not
|
61 |
+
* to use opacity. If set to true, the opacity of 0 is applied. If
|
62 |
+
* set to false, the opacity filter is not applied. Default: true.
|
63 |
+
* @option String src This setting is provided so that one could change
|
64 |
+
* the src of the iframe to whatever they need.
|
65 |
+
* Default: "javascript:false;"
|
66 |
+
*
|
67 |
+
* @name bgiframe
|
68 |
+
@cat Plugins/bgiframe
|
69 |
+
* @author Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
|
70 |
+
*/
|
71 |
+
jQuery.fn.bgIframe = jQuery.fn.bgiframe = function(s) {
|
72 |
+
// This is only for IE6
|
73 |
+
if ( jQuery.browser_backward_hack_backward_hack.msie && parseInt(jQuery.browser_backward_hack_backward_hack.version) <= 6 ) {
|
74 |
+
s = jQuery.extend({
|
75 |
+
top : 'auto', // auto == .currentStyle.borderTopWidth
|
76 |
+
left : 'auto', // auto == .currentStyle.borderLeftWidth
|
77 |
+
width : 'auto', // auto == offsetWidth
|
78 |
+
height : 'auto', // auto == offsetHeight
|
79 |
+
opacity : true,
|
80 |
+
src : 'javascript:false;'
|
81 |
+
}, s || {});
|
82 |
+
var prop = function(n){return n&&n.constructor==Number?n+'px':n;},
|
83 |
+
html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
|
84 |
+
'style="display:block;position:absolute;z-index:-1;'+
|
85 |
+
(s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
|
86 |
+
'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
|
87 |
+
'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
|
88 |
+
'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
|
89 |
+
'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
|
90 |
+
'"/>';
|
91 |
+
return this.each(function() {
|
92 |
+
if ( jQuery('> iframe.bgiframe', this).length == 0 )
|
93 |
+
this.insertBefore( document.createElement(html), this.firstChild );
|
94 |
+
});
|
95 |
+
}
|
96 |
+
return this;
|
97 |
+
};
|
98 |
+
|
99 |
+
if (!jQuery.browser_backward_hack_backward_hack_backjQuery.browser_backward_hack_backward_hackjQuery.browser_backward_hack = {};
|
100 |
+
}
|
101 |
+
|
102 |
+
// Add browser.version if it doesnjQuery.browser_backward_hack_backward_hackjQuery.browjQuery.browser_backward_hack_backward_hackjQuery.browser_backward_hack.version = navigator.userAgent.toLowerCase().match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1];
|
103 |
+
|
104 |
+
})(jQuery);
|
3.7.8/lib/jquery.cookie.js
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Cookie plugin
|
3 |
+
*
|
4 |
+
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
5 |
+
* Dual licensed under the MIT and GPL licenses:
|
6 |
+
* http://www.opensource.org/licenses/mit-license.php
|
7 |
+
* http://www.gnu.org/licenses/gpl.html
|
8 |
+
*
|
9 |
+
*/
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Create a cookie with the given name and value and other optional parameters.
|
13 |
+
*
|
14 |
+
* @example $.cookie('the_cookie', 'the_value');
|
15 |
+
* @desc Set the value of a cookie.
|
16 |
+
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
17 |
+
* @desc Create a cookie with all available options.
|
18 |
+
* @example $.cookie('the_cookie', 'the_value');
|
19 |
+
* @desc Create a session cookie.
|
20 |
+
* @example $.cookie('the_cookie', null);
|
21 |
+
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
22 |
+
* used when the cookie was set.
|
23 |
+
*
|
24 |
+
* @param String name The name of the cookie.
|
25 |
+
* @param String value The value of the cookie.
|
26 |
+
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
27 |
+
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
28 |
+
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
29 |
+
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
30 |
+
* when the the browser exits.
|
31 |
+
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
32 |
+
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
33 |
+
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
34 |
+
* require a secure protocol (like HTTPS).
|
35 |
+
* @type undefined
|
36 |
+
*
|
37 |
+
* @name $.cookie
|
38 |
+
* @cat Plugins/Cookie
|
39 |
+
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
40 |
+
*/
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Get the value of a cookie with the given name.
|
44 |
+
*
|
45 |
+
* @example $.cookie('the_cookie');
|
46 |
+
* @desc Get the value of a cookie.
|
47 |
+
*
|
48 |
+
* @param String name The name of the cookie.
|
49 |
+
* @return The value of the cookie.
|
50 |
+
* @type String
|
51 |
+
*
|
52 |
+
* @name $.cookie
|
53 |
+
* @cat Plugins/Cookie
|
54 |
+
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
55 |
+
*/
|
56 |
+
jQuery.cookie = function(name, value, options) {
|
57 |
+
if (typeof value != 'undefined') { // name and value given, set cookie
|
58 |
+
options = options || {};
|
59 |
+
if (value === null) {
|
60 |
+
value = '';
|
61 |
+
options.expires = -1;
|
62 |
+
}
|
63 |
+
var expires = '';
|
64 |
+
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
65 |
+
var date;
|
66 |
+
if (typeof options.expires == 'number') {
|
67 |
+
date = new Date();
|
68 |
+
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
|
69 |
+
} else {
|
70 |
+
date = options.expires;
|
71 |
+
}
|
72 |
+
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
|
73 |
+
}
|
74 |
+
// CAUTION: Needed to parenthesize options.path and options.domain
|
75 |
+
// in the following expressions, otherwise they evaluate to undefined
|
76 |
+
// in the packed version for some reason...
|
77 |
+
var path = options.path ? '; path=' + (options.path) : '';
|
78 |
+
var domain = options.domain ? '; domain=' + (options.domain) : '';
|
79 |
+
var secure = options.secure ? '; secure' : '';
|
80 |
+
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
81 |
+
} else { // only name given, get cookie
|
82 |
+
var cookieValue = null;
|
83 |
+
if (document.cookie && document.cookie != '') {
|
84 |
+
var cookies = document.cookie.split(';');
|
85 |
+
for (var i = 0; i < cookies.length; i++) {
|
86 |
+
var cookie = jQuery.trim(cookies[i]);
|
87 |
+
// Does this cookie string begin with the name we want?
|
88 |
+
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
89 |
+
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
}
|
94 |
+
return cookieValue;
|
95 |
+
}
|
96 |
+
};
|
3.7.8/lib/jquery.delegate.js
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery delegate plug-in v1.0
|
3 |
+
*
|
4 |
+
* Copyright (c) 2007 Jörn Zaefferer
|
5 |
+
*
|
6 |
+
* jQueryId: jquery.delegate.js 4786 2008-02-19 20:02:34Z joern.zaefferer jQuery
|
7 |
+
*
|
8 |
+
* Dual licensed under the MIT and GPL licenses:
|
9 |
+
* http://www.opensource.org/licenses/mit-license.php
|
10 |
+
* http://www.gnu.org/licenses/gpl.html
|
11 |
+
*/
|
12 |
+
|
13 |
+
// provides cross-browser focusin and focusout events
|
14 |
+
// IE has native support, in other browsers, use event caputuring (neither bubbles)
|
15 |
+
|
16 |
+
// provides delegate(type: String, delegate: Selector, handler: Callback) plugin for easier event delegation
|
17 |
+
// handler is only called when jQuery(event.target).is(delegate), in the scope of the jQuery-object for event.target
|
18 |
+
|
19 |
+
// provides triggerEvent(type: String, target: Element) to trigger delegated events
|
20 |
+
;(function(jQuery) {
|
21 |
+
jQuery.each({
|
22 |
+
focus: 'focusin',
|
23 |
+
blur: 'focusout'
|
24 |
+
}, function( original, fix ){
|
25 |
+
jQuery.event.special[fix] = {
|
26 |
+
setup:function() {
|
27 |
+
if ( jQuery.browser_backward_hack_backward_hack.msie ) return false;
|
28 |
+
this.addEventListener( original, jQuery.event.special[fix].handler, true );
|
29 |
+
},
|
30 |
+
teardown:function() {
|
31 |
+
if ( jQuery.browser_backward_hack_backward_hack.msie ) return false;
|
32 |
+
this.removeEventListener( original,
|
33 |
+
jQuery.event.special[fix].handler, true );
|
34 |
+
},
|
35 |
+
handler: function(e) {
|
36 |
+
arguments[0] = jQuery.event.fix(e);
|
37 |
+
arguments[0].type = fix;
|
38 |
+
return jQuery.event.handle.apply(this, arguments);
|
39 |
+
}
|
40 |
+
};
|
41 |
+
});
|
42 |
+
|
43 |
+
jQuery.extend(jQuery.fn, {
|
44 |
+
delegate: function(type, delegate, handler) {
|
45 |
+
return this.bind(type, function(event) {
|
46 |
+
var target = jQuery(event.target);
|
47 |
+
if (target.is(delegate)) {
|
48 |
+
return handler.apply(target, arguments);
|
49 |
+
}
|
50 |
+
});
|
51 |
+
},
|
52 |
+
triggerEvent: function(type, target) {
|
53 |
+
return this.triggerHandler(type, [jQuery.event.fix({ type: type, target: target })]);
|
54 |
+
}
|
55 |
+
})
|
56 |
+
})(jQuery);
|
3.7.8/lib/jquery.mousewheel.js
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
|
2 |
+
* Licensed under the MIT License (LICENSE.txt).
|
3 |
+
*
|
4 |
+
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
|
5 |
+
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
|
6 |
+
* Thanks to: Seamus Leahy for adding deltaX and deltaY
|
7 |
+
*
|
8 |
+
* Version: 3.0.6
|
9 |
+
*
|
10 |
+
* Requires: 1.2.2+
|
11 |
+
*/
|
12 |
+
|
13 |
+
(function($) {
|
14 |
+
|
15 |
+
var types = ['DOMMouseScroll', 'mousewheel'];
|
16 |
+
|
17 |
+
if ($.event.fixHooks) {
|
18 |
+
for ( var i=types.length; i; ) {
|
19 |
+
$.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
$.event.special.mousewheel = {
|
24 |
+
setup: function() {
|
25 |
+
if ( this.addEventListener ) {
|
26 |
+
for ( var i=types.length; i; ) {
|
27 |
+
this.addEventListener( types[--i], handler, false );
|
28 |
+
}
|
29 |
+
} else {
|
30 |
+
this.onmousewheel = handler;
|
31 |
+
}
|
32 |
+
},
|
33 |
+
|
34 |
+
teardown: function() {
|
35 |
+
if ( this.removeEventListener ) {
|
36 |
+
for ( var i=types.length; i; ) {
|
37 |
+
this.removeEventListener( types[--i], handler, false );
|
38 |
+
}
|
39 |
+
} else {
|
40 |
+
this.onmousewheel = null;
|
41 |
+
}
|
42 |
+
}
|
43 |
+
};
|
44 |
+
|
45 |
+
$.fn.extend({
|
46 |
+
mousewheel: function(fn) {
|
47 |
+
return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
|
48 |
+
},
|
49 |
+
|
50 |
+
unmousewheel: function(fn) {
|
51 |
+
return this.unbind("mousewheel", fn);
|
52 |
+
}
|
53 |
+
});
|
54 |
+
|
55 |
+
|
56 |
+
function handler(event) {
|
57 |
+
var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
|
58 |
+
event = $.event.fix(orgEvent);
|
59 |
+
event.type = "mousewheel";
|
60 |
+
|
61 |
+
// Old school scrollwheel delta
|
62 |
+
if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }
|
63 |
+
if ( orgEvent.detail ) { delta = -orgEvent.detail/3; }
|
64 |
+
|
65 |
+
// New school multidimensional scroll (touchpads) deltas
|
66 |
+
deltaY = delta;
|
67 |
+
|
68 |
+
// Gecko
|
69 |
+
if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
|
70 |
+
deltaY = 0;
|
71 |
+
deltaX = -1*delta;
|
72 |
+
}
|
73 |
+
|
74 |
+
// Webkit
|
75 |
+
if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
|
76 |
+
if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
|
77 |
+
|
78 |
+
// Add event and delta to the front of the arguments
|
79 |
+
args.unshift(event, delta, deltaX, deltaY);
|
80 |
+
|
81 |
+
return ($.event.dispatch || $.event.handle).apply(this, args);
|
82 |
+
}
|
83 |
+
|
84 |
+
})(jQuery);
|
3.7.8/lib/jquery.timepicker.js
ADDED
@@ -0,0 +1,309 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* A time picker for jQuery
|
3 |
+
* Based on original timePicker by Sam Collet (http://www.texotela.co.uk) -
|
4 |
+
* copyright (c) 2006 Sam Collett (http://www.texotela.co.uk)
|
5 |
+
*
|
6 |
+
* Dual licensed under the MIT and GPL licenses.
|
7 |
+
* Copyright (c) 2009 Anders Fajerson
|
8 |
+
* @name timePicker
|
9 |
+
* @version 0.2
|
10 |
+
* @author Anders Fajerson (http://perifer.se)
|
11 |
+
* @example $("#mytime").timePicker();
|
12 |
+
* @example $("#mytime").timePicker({step:30, startTime:"15:00", endTime:"18:00"});
|
13 |
+
*/
|
14 |
+
|
15 |
+
(function($){
|
16 |
+
$.fn.timePicker = function(options) {
|
17 |
+
// Build main options before element iteration
|
18 |
+
var settings = $.extend({}, $.fn.timePicker.defaults, options);
|
19 |
+
|
20 |
+
return this.each(function() {
|
21 |
+
$.timePicker(this, settings);
|
22 |
+
});
|
23 |
+
};
|
24 |
+
|
25 |
+
$.timePicker = function (elm, settings) {
|
26 |
+
var e = $(elm)[0];
|
27 |
+
return e.timePicker || (e.timePicker = new jQuery._timePicker(e, settings));
|
28 |
+
};
|
29 |
+
|
30 |
+
$._timePicker = function(elm, settings) {
|
31 |
+
|
32 |
+
var tpOver = false;
|
33 |
+
var keyDown = false;
|
34 |
+
var startTime = timeToDate(settings.startTime, settings);
|
35 |
+
var endTime = timeToDate(settings.endTime, settings);
|
36 |
+
|
37 |
+
$(elm).attr('autocomplete', 'OFF'); // Disable browser autocomplete
|
38 |
+
|
39 |
+
var times = [];
|
40 |
+
var time = new Date(startTime); // Create a new date object.
|
41 |
+
while(time <= endTime) {
|
42 |
+
times[times.length] = formatTime(time, settings);
|
43 |
+
time = new Date(time.setMinutes(time.getMinutes() + settings.step));
|
44 |
+
}
|
45 |
+
|
46 |
+
//A tpDiv is generated for every timepicker, so give it a unique id based settings.id
|
47 |
+
//so the GWT TimePickerTextBox can be fully functional.
|
48 |
+
//If there is no settings.id then do not bother with an id because it is not being used
|
49 |
+
//with GWT TimePickerTextBox.
|
50 |
+
var $tpDiv = $('<div ' + (settings.tpDivId ? 'id="' + settings.tpDivId + '" ' : '') + 'class="time-picker'+ (settings.show24Hours ? '' : ' time-picker-12hours') +'"></div>');
|
51 |
+
var $tpList = $('<ul></ul>');
|
52 |
+
|
53 |
+
// Build the list.
|
54 |
+
for(var i = 0; i < times.length; i++) {
|
55 |
+
$tpList.append("<li>" + times[i] + "</li>");
|
56 |
+
}
|
57 |
+
$tpDiv.append($tpList);
|
58 |
+
// Append the timPicker to the body and position it.
|
59 |
+
var elmOffset = $(elm).offset();
|
60 |
+
|
61 |
+
$tpDiv.appendTo('body').css({
|
62 |
+
'top':(elmOffset.top - 48) + "px",
|
63 |
+
'left':elmOffset.left,
|
64 |
+
'width': ($(elm).width() + 5) + "px"
|
65 |
+
}).hide();
|
66 |
+
|
67 |
+
// Store the mouse state, used by the blur event. Use mouseover instead of
|
68 |
+
// mousedown since Opera fires blur before mousedown.
|
69 |
+
$tpDiv.mouseover(function() {
|
70 |
+
tpOver = true;
|
71 |
+
}).mouseout(function() {
|
72 |
+
tpOver = false;
|
73 |
+
});
|
74 |
+
|
75 |
+
$("li", $tpList).mouseover(function() {
|
76 |
+
if (!keyDown) {
|
77 |
+
$("li.selected", $tpDiv).removeClass("selected");
|
78 |
+
$(this).addClass("selected");
|
79 |
+
}
|
80 |
+
}).mousedown(function() {
|
81 |
+
tpOver = true;
|
82 |
+
}).click(function() {
|
83 |
+
setTimeVal(elm, this, $tpDiv, settings);
|
84 |
+
tpOver = false;
|
85 |
+
});
|
86 |
+
|
87 |
+
var showPicker = function() {
|
88 |
+
if ($tpDiv.is(":visible")) {
|
89 |
+
return false;
|
90 |
+
}
|
91 |
+
$("li", $tpDiv).removeClass("selected");
|
92 |
+
|
93 |
+
//Reposition the picker in case the page has changed (other things hidden or shown)
|
94 |
+
//and the textbox element is no longer where it was when the tpDiv was first appended to the DOM body.
|
95 |
+
var elmOffset = $(elm).offset();
|
96 |
+
|
97 |
+
$tpDiv.css({
|
98 |
+
'top':(elmOffset.top + $(elm).height() + 10) + "px",
|
99 |
+
'left':elmOffset.left,
|
100 |
+
'width': ($(elm).width() + 5) + "px"
|
101 |
+
});
|
102 |
+
|
103 |
+
// Show picker. This has to be done before scrollTop is set since that
|
104 |
+
// can't be done on hidden elements.
|
105 |
+
$tpDiv.show();
|
106 |
+
|
107 |
+
// Try to find a time in the list that matches the entered time.
|
108 |
+
var time = elm.value ? timeStringToDate(elm.value, settings) : startTime;
|
109 |
+
var startMin = startTime.getHours() * 60 + startTime.getMinutes();
|
110 |
+
var min = (time.getHours() * 60 + time.getMinutes()) - startMin;
|
111 |
+
var steps = Math.round(min / settings.step);
|
112 |
+
var roundTime = normaliseTime(new Date(0, 0, 0, 0, (steps * settings.step + startMin), 0));
|
113 |
+
roundTime = (startTime < roundTime && roundTime <= endTime) ? roundTime : startTime;
|
114 |
+
var $matchedTime = $("li:contains(" + formatTime(roundTime, settings) + ")", $tpDiv);
|
115 |
+
|
116 |
+
if ($matchedTime.length) {
|
117 |
+
$matchedTime.addClass("selected");
|
118 |
+
// Scroll to matched time.
|
119 |
+
$tpDiv[0].scrollTop = $matchedTime[0].offsetTop;
|
120 |
+
}
|
121 |
+
return true;
|
122 |
+
};
|
123 |
+
// Attach to click as well as focus so timePicker can be shown again when
|
124 |
+
// clicking on the input when it already has focus.
|
125 |
+
$(elm).focus(showPicker).click(showPicker);
|
126 |
+
// Hide timepicker on blur
|
127 |
+
$(elm).blur(function() {
|
128 |
+
if (!tpOver) {
|
129 |
+
$tpDiv.hide();
|
130 |
+
}
|
131 |
+
});
|
132 |
+
// Keypress doesn't repeat on Safari for non-text keys.
|
133 |
+
// Keydown doesn't repeat on Firefox and Opera on Mac.
|
134 |
+
// Using kepress for Opera and Firefox and keydown for the rest seems to
|
135 |
+
// work with up/down/enter/esc.
|
136 |
+
var event = ($.browser_backward_hack.opera || $.browser_backward_hack.mozilla) ? 'keypress' : 'keydown';
|
137 |
+
$(elm)[event](function(e) {
|
138 |
+
var $selected;
|
139 |
+
keyDown = true;
|
140 |
+
var top = $tpDiv[0].scrollTop;
|
141 |
+
switch (e.keyCode) {
|
142 |
+
case 38: // Up arrow.
|
143 |
+
// Just show picker if it's hidden.
|
144 |
+
if (showPicker()) {
|
145 |
+
return false;
|
146 |
+
};
|
147 |
+
$selected = $("li.selected", $tpList);
|
148 |
+
var prev = $selected.prev().addClass("selected")[0];
|
149 |
+
if (prev) {
|
150 |
+
$selected.removeClass("selected");
|
151 |
+
// Scroll item into view.
|
152 |
+
if (prev.offsetTop < top) {
|
153 |
+
$tpDiv[0].scrollTop = top - prev.offsetHeight;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
else {
|
157 |
+
// Loop to next item.
|
158 |
+
$selected.removeClass("selected");
|
159 |
+
prev = $("li:last", $tpList).addClass("selected")[0];
|
160 |
+
$tpDiv[0].scrollTop = prev.offsetTop - prev.offsetHeight;
|
161 |
+
}
|
162 |
+
return false;
|
163 |
+
break;
|
164 |
+
case 40: // Down arrow, similar in behaviour to up arrow.
|
165 |
+
if (showPicker()) {
|
166 |
+
return false;
|
167 |
+
};
|
168 |
+
$selected = $("li.selected", $tpList);
|
169 |
+
var next = $selected.next().addClass("selected")[0];
|
170 |
+
if (next) {
|
171 |
+
$selected.removeClass("selected");
|
172 |
+
if (next.offsetTop + next.offsetHeight > top + $tpDiv[0].offsetHeight) {
|
173 |
+
$tpDiv[0].scrollTop = top + next.offsetHeight;
|
174 |
+
}
|
175 |
+
}
|
176 |
+
else {
|
177 |
+
$selected.removeClass("selected");
|
178 |
+
next = $("li:first", $tpList).addClass("selected")[0];
|
179 |
+
$tpDiv[0].scrollTop = 0;
|
180 |
+
}
|
181 |
+
return false;
|
182 |
+
break;
|
183 |
+
case 13: // Enter
|
184 |
+
if ($tpDiv.is(":visible")) {
|
185 |
+
var sel = $("li.selected", $tpList)[0];
|
186 |
+
setTimeVal(elm, sel, $tpDiv, settings);
|
187 |
+
}
|
188 |
+
return false;
|
189 |
+
break;
|
190 |
+
case 27: // Esc
|
191 |
+
$tpDiv.hide();
|
192 |
+
return false;
|
193 |
+
break;
|
194 |
+
}
|
195 |
+
return true;
|
196 |
+
});
|
197 |
+
$(elm).keyup(function(e) {
|
198 |
+
keyDown = false;
|
199 |
+
});
|
200 |
+
// Helper function to get an inputs current time as Date object.
|
201 |
+
// Returns a Date object.
|
202 |
+
this.getTime = function() {
|
203 |
+
return timeStringToDate(elm.value, settings);
|
204 |
+
};
|
205 |
+
// Helper function to set a time input.
|
206 |
+
// Takes a Date object.
|
207 |
+
this.setTime = function(time) {
|
208 |
+
elm.value = formatTime(normaliseTime(time), settings);
|
209 |
+
// Trigger element's change events.
|
210 |
+
$(elm).change();
|
211 |
+
};
|
212 |
+
|
213 |
+
}; // End fn;
|
214 |
+
|
215 |
+
// Plugin defaults.
|
216 |
+
$.fn.timePicker.defaults = {
|
217 |
+
step:30,
|
218 |
+
startTime: new Date(0, 0, 0, 0, 0, 0),
|
219 |
+
endTime: new Date(0, 0, 0, 23, 30, 0),
|
220 |
+
separator: ':',
|
221 |
+
show24Hours: true,
|
222 |
+
timeFormat: 'hh:mm tt',
|
223 |
+
amDesignator: 'AM',
|
224 |
+
pmDesignator: 'PM'
|
225 |
+
};
|
226 |
+
|
227 |
+
// Private functions.
|
228 |
+
|
229 |
+
function setTimeVal(elm, sel, $tpDiv, settings) {
|
230 |
+
// Update input field
|
231 |
+
elm.value = $(sel).text();
|
232 |
+
// Trigger element's change events.
|
233 |
+
$(elm).change();
|
234 |
+
// Keep focus for all but IE (which doesn't like it)
|
235 |
+
if (!$.browser_backward_hack.msie) {
|
236 |
+
elm.focus();
|
237 |
+
}
|
238 |
+
// Hide picker
|
239 |
+
$tpDiv.hide();
|
240 |
+
}
|
241 |
+
|
242 |
+
function formatTime(time, settings) {
|
243 |
+
var h = time.getHours();
|
244 |
+
var hours = settings.show24Hours ? h : (((h + 11) % 12) + 1);
|
245 |
+
hours = formatHour(hours, settings);
|
246 |
+
var minutes = time.getMinutes();
|
247 |
+
|
248 |
+
// Now that we have the current time we take the time format
|
249 |
+
// and replace the time values into that string.
|
250 |
+
var time = settings.timeFormat;
|
251 |
+
time = time.replace('hh', hours);
|
252 |
+
time = time.replace('h', hours);
|
253 |
+
time = time.replace('mm', formatNumber(minutes));
|
254 |
+
if (settings.show24Hours) {
|
255 |
+
time = time.replace(' tt', '');
|
256 |
+
} else {
|
257 |
+
time = time.replace('tt', (h < 12) ? settings.amDesignator : settings.pmDesignator);
|
258 |
+
}
|
259 |
+
|
260 |
+
return time;
|
261 |
+
}
|
262 |
+
|
263 |
+
function formatNumber(value) {
|
264 |
+
return (value < 10 ? '0' : '') + value;
|
265 |
+
}
|
266 |
+
|
267 |
+
function formatHour(value, settings) {
|
268 |
+
if (settings.show24Hours) {
|
269 |
+
return (value < 10 ? '0' : '') + value;
|
270 |
+
} else {
|
271 |
+
return value;
|
272 |
+
}
|
273 |
+
}
|
274 |
+
|
275 |
+
function timeToDate(input, settings) {
|
276 |
+
return (typeof input == 'object') ? normaliseTime(input) : timeStringToDate(input, settings);
|
277 |
+
}
|
278 |
+
|
279 |
+
function timeStringToDate(input, settings) {
|
280 |
+
if (input) {
|
281 |
+
var array = input.split(settings.separator);
|
282 |
+
var hours = parseFloat(array[0]);
|
283 |
+
var minutes = parseFloat(array[1]);
|
284 |
+
|
285 |
+
// Convert AM/PM hour to 24-hour format.
|
286 |
+
if (!settings.show24Hours) {
|
287 |
+
if (hours === 12 && input.substr(settings.amDesignator) !== -1) {
|
288 |
+
hours = 0;
|
289 |
+
}
|
290 |
+
else if (hours !== 12 && input.indexOf(settings.pmDesignator) !== -1) {
|
291 |
+
hours += 12;
|
292 |
+
}
|
293 |
+
}
|
294 |
+
var time = new Date(0, 0, 0, hours, minutes, 0);
|
295 |
+
return normaliseTime(time);
|
296 |
+
}
|
297 |
+
return null;
|
298 |
+
}
|
299 |
+
|
300 |
+
/* Normalise time object to a common date. */
|
301 |
+
function normaliseTime(time) {
|
302 |
+
time.setFullYear(2001);
|
303 |
+
time.setMonth(0);
|
304 |
+
time.setDate(0);
|
305 |
+
return time;
|
306 |
+
}
|
307 |
+
|
308 |
+
})(jQuery);
|
309 |
+
|
3.7.8/lib/jquery.tools.min.js
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jquery.tools 1.1.2 - The missing UI library for the Web
|
3 |
+
*
|
4 |
+
* [tools.scrollable-1.1.2, tools.scrollable.autoscroll-1.0.1, tools.scrollable.navigator-1.0.2, tools.scrollable.mousewheel-1.0.1]
|
5 |
+
*
|
6 |
+
* Copyright (c) 2009 Tero Piirainen
|
7 |
+
* http://flowplayer.org/tools/
|
8 |
+
*
|
9 |
+
* Dual licensed under MIT and GPL 2+ licenses
|
10 |
+
* http://www.opensource.org/licenses
|
11 |
+
*
|
12 |
+
* -----
|
13 |
+
*
|
14 |
+
* jquery.event.wheel.js - rev 1
|
15 |
+
* Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
|
16 |
+
* Liscensed under the MIT License (MIT-LICENSE.txt)
|
17 |
+
* http://www.opensource.org/licenses/mit-license.php
|
18 |
+
* Created: 2008-07-01 | Updated: 2008-07-14
|
19 |
+
*
|
20 |
+
* -----
|
21 |
+
*
|
22 |
+
* File generated: Wed Oct 07 19:54:35 GMT+00:00 2009
|
23 |
+
*/
|
24 |
+
(function(b){b.tools=b.tools||{};b.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:false}};var c;function a(o,m){var r=this,p=b(this),d=!m.vertical,e=o.children(),k=0,i;if(!c){c=r}b.each(m,function(s,t){if(b.isFunction(t)){p.bind(s,t)}});if(e.length>1){e=b(m.items,o)}function l(t){var s=b(t);return m.globalNav?s:o.parent().find(t)}o.data("finder",l);var f=l(m.prev),h=l(m.next),g=l(m.prevPage),n=l(m.nextPage);b.extend(r,{getIndex:function(){return k},getClickIndex:function(){var s=r.getItems();return s.index(s.filter("."+m.activeClass))},getConf:function(){return m},getSize:function(){return r.getItems().size()},getPageAmount:function(){return Math.ceil(this.getSize()/m.size)},getPageIndex:function(){return Math.ceil(k/m.size)},getNaviButtons:function(){return f.add(h).add(g).add(n)},getRoot:function(){return o},getItemWrap:function(){return e},getItems:function(){return e.children(m.item)},getVisibleItems:function(){return r.getItems().slice(k,k+m.size)},seekTo:function(s,w,t){if(s<0){s=0}if(k===s){return r}if(b.isFunction(w)){t=w}if(s>r.getSize()-m.size){return m.loop?r.begin():this.end()}var u=r.getItems().eq(s);if(!u.length){return r}var v=b.Event("onBeforeSeek");p.trigger(v,[s]);if(v.isDefaultPrevented()){return r}if(w===undefined||b.isFunction(w)){w=m.speed}function x(){if(t){t.call(r,s)}p.trigger("onSeek",[s])}if(d){e.animate({left:-u.position().left},w,m.easing,x)}else{e.animate({top:-u.position().top},w,m.easing,x)}c=r;k=s;v=b.Event("onStart");p.trigger(v,[s]);if(v.isDefaultPrevented()){return r}f.add(g).toggleClass(m.disabledClass,s===0);h.add(n).toggleClass(m.disabledClass,s>=r.getSize()-m.size);return r},move:function(u,t,s){i=u>0;return this.seekTo(k+u,t,s)},next:function(t,s){return this.move(1,t,s)},prev:function(t,s){return this.move(-1,t,s)},movePage:function(w,v,u){i=w>0;var s=m.size*w;var t=k%m.size;if(t>0){s+=(w>0?-t:m.size-t)}return this.move(s,v,u)},prevPage:function(t,s){return this.movePage(-1,t,s)},nextPage:function(t,s){return this.movePage(1,t,s)},setPage:function(t,u,s){return this.seekTo(t*m.size,u,s)},begin:function(t,s){i=false;return this.seekTo(0,t,s)},end:function(t,s){i=true;var u=this.getSize()-m.size;return u>0?this.seekTo(u,t,s):r},reload:function(){p.trigger("onReload");return r},focus:function(){c=r;return r},click:function(u){var v=r.getItems().eq(u),s=m.activeClass,t=m.size;if(u<0||u>=r.getSize()){return r}if(t==1){if(m.loop){return r.next()}if(u===0||u==r.getSize()-1){i=(i===undefined)?true:!i}return i===false?r.prev():r.next()}if(t==2){if(u==k){u--}r.getItems().removeClass(s);v.addClass(s);return r.seekTo(u,time,fn)}if(!v.hasClass(s)){r.getItems().removeClass(s);v.addClass(s);var x=Math.floor(t/2);var w=u-x;if(w>r.getSize()-t){w=r.getSize()-t}if(w!==u){return r.seekTo(w)}}return r},bind:function(s,t){p.bind(s,t);return r},unbind:function(s){p.unbind(s);return r}});b.each("onBeforeSeek,onStart,onSeek,onReload".split(","),function(s,t){r[t]=function(u){return r.bind(t,u)}});f.addClass(m.disabledClass).click(function(){r.prev()});h.click(function(){r.next()});n.click(function(){r.nextPage()});if(r.getSize()<m.size){h.add(n).addClass(m.disabledClass)}g.addClass(m.disabledClass).click(function(){r.prevPage()});var j=m.hoverClass,q="keydown."+Math.random().toString().substring(10);r.onReload(function(){if(j){r.getItems().hover(function(){b(this).addClass(j)},function(){b(this).removeClass(j)})}if(m.clickable){r.getItems().each(function(s){b(this).unbind("click.scrollable").bind("click.scrollable",function(t){if(b(t.target).is("a")){return}return r.click(s)})})}if(m.keyboard){b(document).unbind(q).bind(q,function(t){if(t.altKey||t.ctrlKey){return}if(m.keyboard!="static"&&c!=r){return}var u=m.keyboardSteps;if(d&&(t.keyCode==37||t.keyCode==39)){r.move(t.keyCode==37?-u:u);return t.preventDefault()}if(!d&&(t.keyCode==38||t.keyCode==40)){r.move(t.keyCode==38?-u:u);return t.preventDefault()}return true})}else{b(document).unbind(q)}});r.reload()}b.fn.scrollable=function(d){var e=this.eq(typeof d=="number"?d:0).data("scrollable");if(e){return e}var f=b.extend({},b.tools.scrollable.conf);d=b.extend(f,d);d.keyboardSteps=d.keyboardSteps||d.size;this.each(function(){e=new a(b(this),d);b(this).data("scrollable",e)});return d.api?e:this}})(jQuery);
|
25 |
+
(function(b){var a=b.tools.scrollable;a.plugins=a.plugins||{};a.plugins.autoscroll={version:"1.0.1",conf:{autoplay:true,interval:3000,autopause:true,steps:1,api:false}};b.fn.autoscroll=function(d){if(typeof d=="number"){d={interval:d}}var e=b.extend({},a.plugins.autoscroll.conf),c;b.extend(e,d);this.each(function(){var g=b(this).scrollable();if(g){c=g}var i,f,h=true;g.play=function(){if(i){return}h=false;i=setInterval(function(){g.move(e.steps)},e.interval);g.move(e.steps)};g.pause=function(){i=clearInterval(i)};g.stop=function(){g.pause();h=true};if(e.autopause){g.getRoot().add(g.getNaviButtons()).hover(function(){g.pause();clearInterval(f)},function(){if(!h){f=setTimeout(g.play,e.interval)}})}if(e.autoplay){setTimeout(g.play,e.interval)}});return e.api?c:this}})(jQuery);
|
26 |
+
(function(b){var a=b.tools.scrollable;a.plugins=a.plugins||{};a.plugins.navigator={version:"1.0.2",conf:{navi:".navi",naviItem:null,activeClass:"active",indexed:false,api:false,idPrefix:null}};b.fn.navigator=function(d){var e=b.extend({},a.plugins.navigator.conf),c;if(typeof d=="string"){d={navi:d}}d=b.extend(e,d);this.each(function(){var i=b(this).scrollable(),f=i.getRoot(),l=f.data("finder").call(null,d.navi),g=null,k=i.getNaviButtons();if(i){c=i}i.getNaviButtons=function(){return k.add(l)};function j(){if(!l.children().length||l.data("navi")==i){l.empty();l.data("navi",i);for(var m=0;m<i.getPageAmount();m++){l.append(b("<"+(d.naviItem||"a")+"/>"))}g=l.children().each(function(n){var o=b(this);o.click(function(p){i.setPage(n);return p.preventDefault()});if(d.indexed){o.text(n)}if(d.idPrefix){o.attr("id",d.idPrefix+n)}})}else{g=d.naviItem?l.find(d.naviItem):l.children();g.each(function(n){var o=b(this);o.click(function(p){i.setPage(n);return p.preventDefault()})})}g.eq(0).addClass(d.activeClass)}i.onStart(function(o,n){var m=d.activeClass;g.removeClass(m).eq(i.getPageIndex()).addClass(m)});i.onReload(function(){j()});j();var h=g.filter("[href="+location.hash+"]");if(h.length){i.move(g.index(h))}});return d.api?c:this}})(jQuery);
|
27 |
+
(function(b){b.fn.wheel=function(e){return this[e?"bind":"trigger"]("wheel",e)};b.event.special.wheel={setup:function(){b.event.add(this,d,c,{})},teardown:function(){b.event.remove(this,d,c)}};var d=!b.browser_backward_hack.mozilla?"mousewheel":"DOMMouseScroll"+(b.browser_backward_hack.version<"1.9"?" mousemove":"");function c(e){switch(e.type){case"mousemove":return b.extend(e.data,{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY});case"DOMMouseScroll":b.extend(e,e.data);e.delta=-e.detail/3;break;case"mousewheel":e.delta=e.wheelDelta/120;break}e.type="wheel";return b.event.handle.call(this,e,e.delta)}var a=b.tools.scrollable;a.plugins=a.plugins||{};a.plugins.mousewheel={version:"1.0.1",conf:{api:false,speed:50}};b.fn.mousewheel=function(f){var g=b.extend({},a.plugins.mousewheel.conf),e;if(typeof f=="number"){f={speed:f}}f=b.extend(g,f);this.each(function(){var h=b(this).scrollable();if(h){e=h}h.getRoot().wheel(function(i,j){h.move(j<0?1:-1,f.speed||50);return false})});return f.api?e:this}})(jQuery);
|
3.7.8/lib/json2.js
ADDED
@@ -0,0 +1,480 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
http://www.JSON.org/json2.js
|
3 |
+
2009-09-29
|
4 |
+
|
5 |
+
Public Domain.
|
6 |
+
|
7 |
+
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
|
8 |
+
|
9 |
+
See http://www.JSON.org/js.html
|
10 |
+
|
11 |
+
This file creates a global JSON object containing two methods: stringify
|
12 |
+
and parse.
|
13 |
+
|
14 |
+
JSON.stringify(value, replacer, space)
|
15 |
+
value any JavaScript value, usually an object or array.
|
16 |
+
|
17 |
+
replacer an optional parameter that determines how object
|
18 |
+
values are stringified for objects. It can be a
|
19 |
+
function or an array of strings.
|
20 |
+
|
21 |
+
space an optional parameter that specifies the indentation
|
22 |
+
of nested structures. If it is omitted, the text will
|
23 |
+
be packed without extra whitespace. If it is a number,
|
24 |
+
it will specify the number of spaces to indent at each
|
25 |
+
level. If it is a string (such as '\t' or ' '),
|
26 |
+
it contains the characters used to indent at each level.
|
27 |
+
|
28 |
+
This method produces a JSON text from a JavaScript value.
|
29 |
+
|
30 |
+
When an object value is found, if the object contains a toJSON
|
31 |
+
method, its toJSON method will be called and the result will be
|
32 |
+
stringified. A toJSON method does not serialize: it returns the
|
33 |
+
value represented by the name/value pair that should be serialized,
|
34 |
+
or undefined if nothing should be serialized. The toJSON method
|
35 |
+
will be passed the key associated with the value, and this will be
|
36 |
+
bound to the value
|
37 |
+
|
38 |
+
For example, this would serialize Dates as ISO strings.
|
39 |
+
|
40 |
+
Date.prototype.toJSON = function (key) {
|
41 |
+
function f(n) {
|
42 |
+
// Format integers to have at least two digits.
|
43 |
+
return n < 10 ? '0' + n : n;
|
44 |
+
}
|
45 |
+
|
46 |
+
return this.getUTCFullYear() + '-' +
|
47 |
+
f(this.getUTCMonth() + 1) + '-' +
|
48 |
+
f(this.getUTCDate()) + 'T' +
|
49 |
+
f(this.getUTCHours()) + ':' +
|
50 |
+
f(this.getUTCMinutes()) + ':' +
|
51 |
+
f(this.getUTCSeconds()) + 'Z';
|
52 |
+
};
|
53 |
+
|
54 |
+
You can provide an optional replacer method. It will be passed the
|
55 |
+
key and value of each member, with this bound to the containing
|
56 |
+
object. The value that is returned from your method will be
|
57 |
+
serialized. If your method returns undefined, then the member will
|
58 |
+
be excluded from the serialization.
|
59 |
+
|
60 |
+
If the replacer parameter is an array of strings, then it will be
|
61 |
+
used to select the members to be serialized. It filters the results
|
62 |
+
such that only members with keys listed in the replacer array are
|
63 |
+
stringified.
|
64 |
+
|
65 |
+
Values that do not have JSON representations, such as undefined or
|
66 |
+
functions, will not be serialized. Such values in objects will be
|
67 |
+
dropped; in arrays they will be replaced with null. You can use
|
68 |
+
a replacer function to replace those with JSON values.
|
69 |
+
JSON.stringify(undefined) returns undefined.
|
70 |
+
|
71 |
+
The optional space parameter produces a stringification of the
|
72 |
+
value that is filled with line breaks and indentation to make it
|
73 |
+
easier to read.
|
74 |
+
|
75 |
+
If the space parameter is a non-empty string, then that string will
|
76 |
+
be used for indentation. If the space parameter is a number, then
|
77 |
+
the indentation will be that many spaces.
|
78 |
+
|
79 |
+
Example:
|
80 |
+
|
81 |
+
text = JSON.stringify(['e', {pluribus: 'unum'}]);
|
82 |
+
// text is '["e",{"pluribus":"unum"}]'
|
83 |
+
|
84 |
+
|
85 |
+
text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
|
86 |
+
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
|
87 |
+
|
88 |
+
text = JSON.stringify([new Date()], function (key, value) {
|
89 |
+
return this[key] instanceof Date ?
|
90 |
+
'Date(' + this[key] + ')' : value;
|
91 |
+
});
|
92 |
+
// text is '["Date(---current time---)"]'
|
93 |
+
|
94 |
+
|
95 |
+
JSON.parse(text, reviver)
|
96 |
+
This method parses a JSON text to produce an object or array.
|
97 |
+
It can throw a SyntaxError exception.
|
98 |
+
|
99 |
+
The optional reviver parameter is a function that can filter and
|
100 |
+
transform the results. It receives each of the keys and values,
|
101 |
+
and its return value is used instead of the original value.
|
102 |
+
If it returns what it received, then the structure is not modified.
|
103 |
+
If it returns undefined then the member is deleted.
|
104 |
+
|
105 |
+
Example:
|
106 |
+
|
107 |
+
// Parse the text. Values that look like ISO date strings will
|
108 |
+
// be converted to Date objects.
|
109 |
+
|
110 |
+
myData = JSON.parse(text, function (key, value) {
|
111 |
+
var a;
|
112 |
+
if (typeof value === 'string') {
|
113 |
+
a =
|
114 |
+
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
|
115 |
+
if (a) {
|
116 |
+
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
|
117 |
+
+a[5], +a[6]));
|
118 |
+
}
|
119 |
+
}
|
120 |
+
return value;
|
121 |
+
});
|
122 |
+
|
123 |
+
myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
|
124 |
+
var d;
|
125 |
+
if (typeof value === 'string' &&
|
126 |
+
value.slice(0, 5) === 'Date(' &&
|
127 |
+
value.slice(-1) === ')') {
|
128 |
+
d = new Date(value.slice(5, -1));
|
129 |
+
if (d) {
|
130 |
+
return d;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
return value;
|
134 |
+
});
|
135 |
+
|
136 |
+
|
137 |
+
This is a reference implementation. You are free to copy, modify, or
|
138 |
+
redistribute.
|
139 |
+
|
140 |
+
This code should be minified before deployment.
|
141 |
+
See http://javascript.crockford.com/jsmin.html
|
142 |
+
|
143 |
+
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
|
144 |
+
NOT CONTROL.
|
145 |
+
*/
|
146 |
+
|
147 |
+
/*jslint evil: true, strict: false */
|
148 |
+
|
149 |
+
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
|
150 |
+
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
|
151 |
+
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
|
152 |
+
lastIndex, length, parse, prototype, push, replace, slice, stringify,
|
153 |
+
test, toJSON, toString, valueOf
|
154 |
+
*/
|
155 |
+
|
156 |
+
|
157 |
+
// Create a JSON object only if one does not already exist. We create the
|
158 |
+
// methods in a closure to avoid creating global variables.
|
159 |
+
|
160 |
+
if (!this.JSON) {
|
161 |
+
this.JSON = {};
|
162 |
+
}
|
163 |
+
|
164 |
+
(function () {
|
165 |
+
|
166 |
+
function f(n) {
|
167 |
+
// Format integers to have at least two digits.
|
168 |
+
return n < 10 ? '0' + n : n;
|
169 |
+
}
|
170 |
+
|
171 |
+
if (typeof Date.prototype.toJSON !== 'function') {
|
172 |
+
|
173 |
+
Date.prototype.toJSON = function (key) {
|
174 |
+
|
175 |
+
return isFinite(this.valueOf()) ?
|
176 |
+
this.getUTCFullYear() + '-' +
|
177 |
+
f(this.getUTCMonth() + 1) + '-' +
|
178 |
+
f(this.getUTCDate()) + 'T' +
|
179 |
+
f(this.getUTCHours()) + ':' +
|
180 |
+
f(this.getUTCMinutes()) + ':' +
|
181 |
+
f(this.getUTCSeconds()) + 'Z' : null;
|
182 |
+
};
|
183 |
+
|
184 |
+
String.prototype.toJSON =
|
185 |
+
Number.prototype.toJSON =
|
186 |
+
Boolean.prototype.toJSON = function (key) {
|
187 |
+
return this.valueOf();
|
188 |
+
};
|
189 |
+
}
|
190 |
+
|
191 |
+
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
192 |
+
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
193 |
+
gap,
|
194 |
+
indent,
|
195 |
+
meta = { // table of character substitutions
|
196 |
+
'\b': '\\b',
|
197 |
+
'\t': '\\t',
|
198 |
+
'\n': '\\n',
|
199 |
+
'\f': '\\f',
|
200 |
+
'\r': '\\r',
|
201 |
+
'"' : '\\"',
|
202 |
+
'\\': '\\\\'
|
203 |
+
},
|
204 |
+
rep;
|
205 |
+
|
206 |
+
|
207 |
+
function quote(string) {
|
208 |
+
|
209 |
+
// If the string contains no control characters, no quote characters, and no
|
210 |
+
// backslash characters, then we can safely slap some quotes around it.
|
211 |
+
// Otherwise we must also replace the offending characters with safe escape
|
212 |
+
// sequences.
|
213 |
+
|
214 |
+
escapable.lastIndex = 0;
|
215 |
+
return escapable.test(string) ?
|
216 |
+
'"' + string.replace(escapable, function (a) {
|
217 |
+
var c = meta[a];
|
218 |
+
return typeof c === 'string' ? c :
|
219 |
+
'\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
220 |
+
}) + '"' :
|
221 |
+
'"' + string + '"';
|
222 |
+
}
|
223 |
+
|
224 |
+
|
225 |
+
function str(key, holder) {
|
226 |
+
|
227 |
+
// Produce a string from holder[key].
|
228 |
+
|
229 |
+
var i, // The loop counter.
|
230 |
+
k, // The member key.
|
231 |
+
v, // The member value.
|
232 |
+
length,
|
233 |
+
mind = gap,
|
234 |
+
partial,
|
235 |
+
value = holder[key];
|
236 |
+
|
237 |
+
// If the value has a toJSON method, call it to obtain a replacement value.
|
238 |
+
|
239 |
+
if (value && typeof value === 'object' &&
|
240 |
+
typeof value.toJSON === 'function') {
|
241 |
+
value = value.toJSON(key);
|
242 |
+
}
|
243 |
+
|
244 |
+
// If we were called with a replacer function, then call the replacer to
|
245 |
+
// obtain a replacement value.
|
246 |
+
|
247 |
+
if (typeof rep === 'function') {
|
248 |
+
value = rep.call(holder, key, value);
|
249 |
+
}
|
250 |
+
|
251 |
+
// What happens next depends on the value's type.
|
252 |
+
|
253 |
+
switch (typeof value) {
|
254 |
+
case 'string':
|
255 |
+
return quote(value);
|
256 |
+
|
257 |
+
case 'number':
|
258 |
+
|
259 |
+
// JSON numbers must be finite. Encode non-finite numbers as null.
|
260 |
+
|
261 |
+
return isFinite(value) ? String(value) : 'null';
|
262 |
+
|
263 |
+
case 'boolean':
|
264 |
+
case 'null':
|
265 |
+
|
266 |
+
// If the value is a boolean or null, convert it to a string. Note:
|
267 |
+
// typeof null does not produce 'null'. The case is included here in
|
268 |
+
// the remote chance that this gets fixed someday.
|
269 |
+
|
270 |
+
return String(value);
|
271 |
+
|
272 |
+
// If the type is 'object', we might be dealing with an object or an array or
|
273 |
+
// null.
|
274 |
+
|
275 |
+
case 'object':
|
276 |
+
|
277 |
+
// Due to a specification blunder in ECMAScript, typeof null is 'object',
|
278 |
+
// so watch out for that case.
|
279 |
+
|
280 |
+
if (!value) {
|
281 |
+
return 'null';
|
282 |
+
}
|
283 |
+
|
284 |
+
// Make an array to hold the partial results of stringifying this object value.
|
285 |
+
|
286 |
+
gap += indent;
|
287 |
+
partial = [];
|
288 |
+
|
289 |
+
// Is the value an array?
|
290 |
+
|
291 |
+
if (Object.prototype.toString.apply(value) === '[object Array]') {
|
292 |
+
|
293 |
+
// The value is an array. Stringify every element. Use null as a placeholder
|
294 |
+
// for non-JSON values.
|
295 |
+
|
296 |
+
length = value.length;
|
297 |
+
for (i = 0; i < length; i += 1) {
|
298 |
+
partial[i] = str(i, value) || 'null';
|
299 |
+
}
|
300 |
+
|
301 |
+
// Join all of the elements together, separated with commas, and wrap them in
|
302 |
+
// brackets.
|
303 |
+
|
304 |
+
v = partial.length === 0 ? '[]' :
|
305 |
+
gap ? '[\n' + gap +
|
306 |
+
partial.join(',\n' + gap) + '\n' +
|
307 |
+
mind + ']' :
|
308 |
+
'[' + partial.join(',') + ']';
|
309 |
+
gap = mind;
|
310 |
+
return v;
|
311 |
+
}
|
312 |
+
|
313 |
+
// If the replacer is an array, use it to select the members to be stringified.
|
314 |
+
|
315 |
+
if (rep && typeof rep === 'object') {
|
316 |
+
length = rep.length;
|
317 |
+
for (i = 0; i < length; i += 1) {
|
318 |
+
k = rep[i];
|
319 |
+
if (typeof k === 'string') {
|
320 |
+
v = str(k, value);
|
321 |
+
if (v) {
|
322 |
+
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
323 |
+
}
|
324 |
+
}
|
325 |
+
}
|
326 |
+
} else {
|
327 |
+
|
328 |
+
// Otherwise, iterate through all of the keys in the object.
|
329 |
+
|
330 |
+
for (k in value) {
|
331 |
+
if (Object.hasOwnProperty.call(value, k)) {
|
332 |
+
v = str(k, value);
|
333 |
+
if (v) {
|
334 |
+
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
335 |
+
}
|
336 |
+
}
|
337 |
+
}
|
338 |
+
}
|
339 |
+
|
340 |
+
// Join all of the member texts together, separated with commas,
|
341 |
+
// and wrap them in braces.
|
342 |
+
|
343 |
+
v = partial.length === 0 ? '{}' :
|
344 |
+
gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
|
345 |
+
mind + '}' : '{' + partial.join(',') + '}';
|
346 |
+
gap = mind;
|
347 |
+
return v;
|
348 |
+
}
|
349 |
+
}
|
350 |
+
|
351 |
+
// If the JSON object does not yet have a stringify method, give it one.
|
352 |
+
|
353 |
+
if (typeof JSON.stringify !== 'function') {
|
354 |
+
JSON.stringify = function (value, replacer, space) {
|
355 |
+
|
356 |
+
// The stringify method takes a value and an optional replacer, and an optional
|
357 |
+
// space parameter, and returns a JSON text. The replacer can be a function
|
358 |
+
// that can replace values, or an array of strings that will select the keys.
|
359 |
+
// A default replacer method can be provided. Use of the space parameter can
|
360 |
+
// produce text that is more easily readable.
|
361 |
+
|
362 |
+
var i;
|
363 |
+
gap = '';
|
364 |
+
indent = '';
|
365 |
+
|
366 |
+
// If the space parameter is a number, make an indent string containing that
|
367 |
+
// many spaces.
|
368 |
+
|
369 |
+
if (typeof space === 'number') {
|
370 |
+
for (i = 0; i < space; i += 1) {
|
371 |
+
indent += ' ';
|
372 |
+
}
|
373 |
+
|
374 |
+
// If the space parameter is a string, it will be used as the indent string.
|
375 |
+
|
376 |
+
} else if (typeof space === 'string') {
|
377 |
+
indent = space;
|
378 |
+
}
|
379 |
+
|
380 |
+
// If there is a replacer, it must be a function or an array.
|
381 |
+
// Otherwise, throw an error.
|
382 |
+
|
383 |
+
rep = replacer;
|
384 |
+
if (replacer && typeof replacer !== 'function' &&
|
385 |
+
(typeof replacer !== 'object' ||
|
386 |
+
typeof replacer.length !== 'number')) {
|
387 |
+
throw new Error('JSON.stringify');
|
388 |
+
}
|
389 |
+
|
390 |
+
// Make a fake root object containing our value under the key of ''.
|
391 |
+
// Return the result of stringifying the value.
|
392 |
+
|
393 |
+
return str('', {'': value});
|
394 |
+
};
|
395 |
+
}
|
396 |
+
|
397 |
+
|
398 |
+
// If the JSON object does not yet have a parse method, give it one.
|
399 |
+
|
400 |
+
if (typeof JSON.parseIt !== 'function') {
|
401 |
+
JSON.parseIt = function (text, reviver) {
|
402 |
+
|
403 |
+
// The parse method takes a text and an optional reviver function, and returns
|
404 |
+
// a JavaScript value if the text is a valid JSON text.
|
405 |
+
|
406 |
+
var j;
|
407 |
+
|
408 |
+
function walk(holder, key) {
|
409 |
+
|
410 |
+
// The walk method is used to recursively walk the resulting structure so
|
411 |
+
// that modifications can be made.
|
412 |
+
|
413 |
+
var k, v, value = holder[key];
|
414 |
+
if (value && typeof value === 'object') {
|
415 |
+
for (k in value) {
|
416 |
+
if (Object.hasOwnProperty.call(value, k)) {
|
417 |
+
v = walk(value, k);
|
418 |
+
if (v !== undefined) {
|
419 |
+
value[k] = v;
|
420 |
+
} else {
|
421 |
+
delete value[k];
|
422 |
+
}
|
423 |
+
}
|
424 |
+
}
|
425 |
+
}
|
426 |
+
return reviver.call(holder, key, value);
|
427 |
+
}
|
428 |
+
|
429 |
+
|
430 |
+
// Parsing happens in four stages. In the first stage, we replace certain
|
431 |
+
// Unicode characters with escape sequences. JavaScript handles many characters
|
432 |
+
// incorrectly, either silently deleting them, or treating them as line endings.
|
433 |
+
|
434 |
+
cx.lastIndex = 0;
|
435 |
+
if (cx.test(text)) {
|
436 |
+
text = text.replace(cx, function (a) {
|
437 |
+
return '\\u' +
|
438 |
+
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
|
439 |
+
});
|
440 |
+
}
|
441 |
+
|
442 |
+
// In the second stage, we run the text against regular expressions that look
|
443 |
+
// for non-JSON patterns. We are especially concerned with '()' and 'new'
|
444 |
+
// because they can cause invocation, and '=' because it can cause mutation.
|
445 |
+
// But just to be safe, we want to reject all unexpected forms.
|
446 |
+
|
447 |
+
// We split the second stage into 4 regexp operations in order to work around
|
448 |
+
// crippling inefficiencies in IE's and Safari's regexp engines. First we
|
449 |
+
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
|
450 |
+
// replace all simple value tokens with ']' characters. Third, we delete all
|
451 |
+
// open brackets that follow a colon or comma or that begin the text. Finally,
|
452 |
+
// we look to see that the remaining characters are only whitespace or ']' or
|
453 |
+
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
|
454 |
+
|
455 |
+
if (/^[\],:{}\s]*$/.
|
456 |
+
test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
|
457 |
+
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
|
458 |
+
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
|
459 |
+
|
460 |
+
// In the third stage we use the eval function to compile the text into a
|
461 |
+
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
|
462 |
+
// in JavaScript: it can begin a block or an object literal. We wrap the text
|
463 |
+
// in parens to eliminate the ambiguity.
|
464 |
+
|
465 |
+
j = eval('(' + text + ')');
|
466 |
+
|
467 |
+
// In the optional fourth stage, we recursively walk the new structure, passing
|
468 |
+
// each name/value pair to a reviver function for possible transformation.
|
469 |
+
|
470 |
+
return typeof reviver === 'function' ?
|
471 |
+
walk({'': j}, '') : j;
|
472 |
+
}
|
473 |
+
|
474 |
+
// If the text is not JSON parseable, then a SyntaxError is thrown.
|
475 |
+
|
476 |
+
throw new SyntaxError('JSON.parseIt');
|
477 |
+
};
|
478 |
+
}
|
479 |
+
}());
|
480 |
+
|
3.7.8/lib/languages/date-cs-CZ.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"cs-CZ",englishName:"Czech (Czech Republic)",nativeName:"čeština (Česká republika)",dayNames:["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],abbreviatedDayNames:["ne","po","út","st","čt","pá","so"],shortestDayNames:["ne","po","út","st","čt","pá","so"],firstLetterDayNames:["n","p","ú","s","č","p","s"],monthNames:["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec"],abbreviatedMonthNames:["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"],amDesignator:"dop.",pmDesignator:"odp.",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^leden/i,feb:/^únor/i,mar:/^březen/i,apr:/^duben/i,may:/^květen/i,jun:/^červen/i,jul:/^červenec/i,aug:/^srpen/i,sep:/^září/i,oct:/^říjen/i,nov:/^listopad/i,dec:/^prosinec/i,sun:/^neděle/i,mon:/^pondělí/i,tue:/^úterý/i,wed:/^středa/i,thu:/^čtvrtek/i,fri:/^pátek/i,sat:/^sobota/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-da-DK.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"da-DK",englishName:"Danish (Denmark)",nativeName:"dansk (Danmark)",dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],abbreviatedDayNames:["sø","ma","ti","on","to","fr","lø"],shortestDayNames:["sø","ma","ti","on","to","fr","lø"],firstLetterDayNames:["s","m","t","o","t","f","l"],monthNames:["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd-MM-yyyy",longDate:"d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(ts)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^søndag/i,mon:/^mandag/i,tue:/^tirsdag/i,wed:/^onsdag/i,thu:/^torsdag/i,fri:/^fredag/i,sat:/^lørdag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-de-DE.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"de-DE",englishName:"German (Germany)",nativeName:"Deutsch (Deutschland)",dayNames:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],abbreviatedDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],shortestDayNames:["So","Mo","Di","Mi","Do","Fr","Sa"],firstLetterDayNames:["S","M","D","M","D","F","S"],monthNames:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],abbreviatedMonthNames:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dddd, d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd, d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^märz/i,apr:/^apr(il)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dez(ember)?/i,sun:/^sonntag/i,mon:/^montag/i,tue:/^dienstag/i,wed:/^mittwoch/i,thu:/^donnerstag/i,fri:/^freitag/i,sat:/^samstag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-el-GR.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"el-GR",englishName:"Greek (Greece)",nativeName:"ελληνικά (Ελλάδα)",dayNames:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],abbreviatedDayNames:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],shortestDayNames:["Κυ","Δε","Τρ","Τε","Πε","Πα","Σά"],firstLetterDayNames:["Κ","Δ","Τ","Τ","Π","Π","Σ"],monthNames:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],abbreviatedMonthNames:["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],amDesignator:"πμ",pmDesignator:"μμ",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/M/yyyy",longDate:"dddd, d MMMM yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, d MMMM yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ιαν(ουάριος)?/i,feb:/^φεβ(ρουάριος)?/i,mar:/^μάρτιος/i,apr:/^απρ(ίλιος)?/i,may:/^μάιος/i,jun:/^ιούνιος/i,jul:/^ιούλιος/i,aug:/^αύγουστος/i,sep:/^σεπ(τέμβριος)?/i,oct:/^οκτ(ώβριος)?/i,nov:/^νοέμβριος/i,dec:/^δεκ(έμβριος)?/i,sun:/^κυ(ρ(ιακή)?)?/i,mon:/^δε(υ(τέρα)?)?/i,tue:/^τρ(ι(τη)?)?/i,wed:/^τε(τ(άρτη)?)?/i,thu:/^πε(μ(πτη)?)?/i,fri:/^πα(ρ(ασκευή)?)?/i,sat:/^σά(β(βατο)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-en-US.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-es-ES.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"es-ES",englishName:"Spanish (Spain)",nativeName:"español (España)",dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],abbreviatedDayNames:["dom","lun","mar","mié","jue","vie","sáb"],shortestDayNames:["do","lu","ma","mi","ju","vi","sá"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],abbreviatedMonthNames:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd, dd' de 'MMMM' de 'yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM' de 'yyyy"},regexPatterns:{jan:/^ene(ro)?/i,feb:/^feb(rero)?/i,mar:/^mar(zo)?/i,apr:/^abr(il)?/i,may:/^may(o)?/i,jun:/^jun(io)?/i,jul:/^jul(io)?/i,aug:/^ago(sto)?/i,sep:/^sep(tiembre)?/i,oct:/^oct(ubre)?/i,nov:/^nov(iembre)?/i,dec:/^dic(iembre)?/i,sun:/^do(m(ingo)?)?/i,mon:/^lu(n(es)?)?/i,tue:/^ma(r(tes)?)?/i,wed:/^mi(é(rcoles)?)?/i,thu:/^ju(e(ves)?)?/i,fri:/^vi(e(rnes)?)?/i,sat:/^sá(b(ado)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-fr-FR.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"fr-FR",englishName:"French (France)",nativeName:"français (France)",dayNames:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],abbreviatedDayNames:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],shortestDayNames:["di","lu","ma","me","je","ve","sa"],firstLetterDayNames:["d","l","m","m","j","v","s"],monthNames:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],abbreviatedMonthNames:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd d MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd d MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^janv(.(ier)?)?/i,feb:/^févr(.(ier)?)?/i,mar:/^mars/i,apr:/^avr(.(il)?)?/i,may:/^mai/i,jun:/^juin/i,jul:/^juil(.(let)?)?/i,aug:/^août/i,sep:/^sept(.(embre)?)?/i,oct:/^oct(.(obre)?)?/i,nov:/^nov(.(embre)?)?/i,dec:/^déc(.(embre)?)?/i,sun:/^di(m(.(anche)?)?)?/i,mon:/^lu(n(.(di)?)?)?/i,tue:/^ma(r(.(di)?)?)?/i,wed:/^me(r(.(credi)?)?)?/i,thu:/^je(u(.(di)?)?)?/i,fri:/^ve(n(.(dredi)?)?)?/i,sat:/^sa(m(.(edi)?)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-he-IL.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"he-IL",englishName:"Hebrew (Israel)",nativeName:"עברית (ישראל)",dayNames:["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],abbreviatedDayNames:["יום א","יום ב","יום ג","יום ד","יום ה","יום ו","שבת"],shortestDayNames:["א","ב","ג","ד","ה","ו","ש"],firstLetterDayNames:["א","ב","ג","ד","ה","ו","ש"],monthNames:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],abbreviatedMonthNames:["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd dd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dddd dd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^ינו(אר)?/i,feb:/^פבר(ואר)?/i,mar:/^מרץ/i,apr:/^אפר(יל)?/i,may:/^מאי/i,jun:/^יונ(י)?/i,jul:/^יול(י)?/i,aug:/^אוג(וסט)?/i,sep:/^ספט(מבר)?/i,oct:/^אוק(טובר)?/i,nov:/^נוב(מבר)?/i,dec:/^דצמ(בר)?/i,sun:/^א(ום א(אשון)?)?/i,mon:/^ב(ום ב(ני)?)?/i,tue:/^ג(ום ג(לישי)?)?/i,wed:/^ד(ום ד(ביעי)?)?/i,thu:/^ה(ום ה(מישי)?)?/i,fri:/^ו(ום ו(ישי)?)?/i,sat:/^ש(1)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-hr-HR.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"hr-HR",englishName:"Croatian (Croatia)",nativeName:"hrvatski (Hrvatska)",dayNames:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],abbreviatedDayNames:["ned","pon","uto","sri","čet","pet","sub"],shortestDayNames:["ne","po","ut","sr","če","pe","su"],firstLetterDayNames:["n","p","u","s","č","p","s"],monthNames:["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac"],abbreviatedMonthNames:["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d.M.yyyy",longDate:"d. MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d. MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^sij(ečanj)?/i,feb:/^veljača/i,mar:/^ožu(jak)?/i,apr:/^tra(vanj)?/i,may:/^svi(banj)?/i,jun:/^lip(anj)?/i,jul:/^srp(anj)?/i,aug:/^kol(ovoz)?/i,sep:/^ruj(an)?/i,oct:/^lis(topad)?/i,nov:/^stu(deni)?/i,dec:/^pro(sinac)?/i,sun:/^ne(d(jelja)?)?/i,mon:/^po(n(edjeljak)?)?/i,tue:/^ut(o(rak)?)?/i,wed:/^sr(i(jeda)?)?/i,thu:/^če(t(vrtak)?)?/i,fri:/^pe(t(ak)?)?/i,sat:/^su(b(ota)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-it-IT.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"it-IT",englishName:"Italian (Italy)",nativeName:"italiano (Italia)",dayNames:["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],abbreviatedDayNames:["dom","lun","mar","mer","gio","ven","sab"],shortestDayNames:["do","lu","ma","me","gi","ve","sa"],firstLetterDayNames:["d","l","m","m","g","v","s"],monthNames:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],abbreviatedMonthNames:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dddd d MMMM yyyy",shortTime:"H.mm",longTime:"H.mm.ss",fullDateTime:"dddd d MMMM yyyy H.mm.ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^gen(naio)?/i,feb:/^feb(braio)?/i,mar:/^mar(zo)?/i,apr:/^apr(ile)?/i,may:/^mag(gio)?/i,jun:/^giu(gno)?/i,jul:/^lug(lio)?/i,aug:/^ago(sto)?/i,sep:/^set(tembre)?/i,oct:/^ott(obre)?/i,nov:/^nov(embre)?/i,dec:/^dic(embre)?/i,sun:/^do(m(enica)?)?/i,mon:/^lu(n(edì)?)?/i,tue:/^ma(r(tedì)?)?/i,wed:/^me(r(coledì)?)?/i,thu:/^gi(o(vedì)?)?/i,fri:/^ve(n(erdì)?)?/i,sat:/^sa(b(ato)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-ja-JP.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"ja-JP",englishName:"Japanese (Japan)",nativeName:"日本語 (日本)",dayNames:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],abbreviatedDayNames:["日","月","火","水","木","金","土"],shortestDayNames:["日","月","火","水","木","金","土"],firstLetterDayNames:["日","月","火","水","木","金","土"],monthNames:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],abbreviatedMonthNames:["1","2","3","4","5","6","7","8","9","10","11","12"],amDesignator:"午前",pmDesignator:"午後",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy/MM/dd",longDate:"yyyy'年'M'月'd'日'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"yyyy'年'M'月'd'日' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"M'月'd'日'",yearMonth:"yyyy'年'M'月'"},regexPatterns:{jan:/^1(月)?/i,feb:/^2(月)?/i,mar:/^3(月)?/i,apr:/^4(月)?/i,may:/^5(月)?/i,jun:/^6(月)?/i,jul:/^7(月)?/i,aug:/^8(月)?/i,sep:/^9(月)?/i,oct:/^10(月)?/i,nov:/^11(月)?/i,dec:/^12(月)?/i,sun:/^日曜日/i,mon:/^月曜日/i,tue:/^火曜日/i,wed:/^水曜日/i,thu:/^木曜日/i,fri:/^金曜日/i,sat:/^土曜日/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-lt-LT.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"lt-LT",englishName:"Lithuanian (Lithuania)",nativeName:"lietuvių (Lietuva)",dayNames:["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"],abbreviatedDayNames:["Sk","Pr","An","Tr","Kt","Pn","Št"],shortestDayNames:["S","P","A","T","K","Pn","Š"],firstLetterDayNames:["S","P","A","T","K","P","Š"],monthNames:["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjūtis","rugsėjis","spalis","lapkritis","gruodis"],abbreviatedMonthNames:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy.MM.dd",longDate:"yyyy 'm.' MMMM d 'd.'",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"yyyy 'm.' MMMM d 'd.' HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM d 'd.'",yearMonth:"yyyy MMMM"},regexPatterns:{jan:/^sau(sis)?/i,feb:/^vas(aris)?/i,mar:/^kov(as)?/i,apr:/^bal(andis)?/i,may:/^geg(užė)?/i,jun:/^bir(želis)?/i,jul:/^lie(pa)?/i,aug:/^rugpjūtis/i,sep:/^rugsėjis/i,oct:/^spalis/i,nov:/^lap(kritis)?/i,dec:/^gruodis/i,sun:/^s(k(kmadienis)?)?/i,mon:/^p(r(rmadienis)?)?/i,tue:/^a(n(tradienis)?)?/i,wed:/^t(r(ečiadienis)?)?/i,thu:/^k(t(tvirtadienis)?)?/i,fri:/^penktadienis/i,sat:/^š(t(štadienis)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-nb-NO.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"nb-NO",englishName:"Norwegian, Bokmål (Norway)",nativeName:"norsk, bokmål (Norge)",dayNames:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],abbreviatedDayNames:["sø","ma","ti","on","to","fr","lø"],shortestDayNames:["sø","ma","ti","on","to","fr","lø"],firstLetterDayNames:["s","m","t","o","t","f","l"],monthNames:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"],abbreviatedMonthNames:["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d. MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d. MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d. MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uar)?/i,feb:/^feb(ruar)?/i,mar:/^mar(s)?/i,apr:/^apr(il)?/i,may:/^mai/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^des(ember)?/i,sun:/^søndag/i,mon:/^mandag/i,tue:/^tirsdag/i,wed:/^onsdag/i,thu:/^torsdag/i,fri:/^fredag/i,sat:/^lørdag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-nl-NL.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"nl-NL",englishName:"Dutch (Netherlands)",nativeName:"Nederlands (Nederland)",dayNames:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],abbreviatedDayNames:["zo","ma","di","wo","do","vr","za"],shortestDayNames:["zo","ma","di","wo","do","vr","za"],firstLetterDayNames:["z","m","d","w","d","v","z"],monthNames:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d-M-yyyy",longDate:"dddd d MMMM yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd d MMMM yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uari)?/i,feb:/^feb(ruari)?/i,mar:/^maart/i,apr:/^apr(il)?/i,may:/^mei/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(ustus)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^zondag/i,mon:/^maandag/i,tue:/^dinsdag/i,wed:/^woensdag/i,thu:/^donderdag/i,fri:/^vrijdag/i,sat:/^zaterdag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-pl-PL.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"pl-PL",englishName:"Polish (Poland)",nativeName:"polski (Polska)",dayNames:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],abbreviatedDayNames:["N","Pn","Wt","Śr","Cz","Pt","So"],shortestDayNames:["N","Pn","Wt","Śr","Cz","Pt","So"],firstLetterDayNames:["N","P","W","Ś","C","P","S"],monthNames:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],abbreviatedMonthNames:["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy-MM-dd",longDate:"d MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"d MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^sty(czeń)?/i,feb:/^lut(y)?/i,mar:/^mar(zec)?/i,apr:/^kwi(ecień)?/i,may:/^maj/i,jun:/^cze(rwiec)?/i,jul:/^lip(iec)?/i,aug:/^sie(rpień)?/i,sep:/^wrz(esień)?/i,oct:/^paź(dziernik)?/i,nov:/^lis(topad)?/i,dec:/^gru(dzień)?/i,sun:/^niedziela/i,mon:/^poniedziałek/i,tue:/^wtorek/i,wed:/^środa/i,thu:/^czwartek/i,fri:/^piątek/i,sat:/^sobota/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-pt-BR.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"pt-BR",englishName:"Portuguese (Brazil)",nativeName:"Português (Brasil)",dayNames:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],abbreviatedDayNames:["dom","seg","ter","qua","qui","sex","sáb"],shortestDayNames:["dom","seg","ter","qua","qui","sex","sáb"],firstLetterDayNames:["d","s","t","q","q","s","s"],monthNames:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"],abbreviatedMonthNames:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],amDesignator:"",pmDesignator:"",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"d/M/yyyy",longDate:"dddd, d' de 'MMMM' de 'yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dddd, d' de 'MMMM' de 'yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd' de 'MMMM",yearMonth:"MMMM' de 'yyyy"},regexPatterns:{jan:/^jan(eiro)?/i,feb:/^fev(ereiro)?/i,mar:/^mar(ço)?/i,apr:/^abr(il)?/i,may:/^mai(o)?/i,jun:/^jun(ho)?/i,jul:/^jul(ho)?/i,aug:/^ago(sto)?/i,sep:/^set(embro)?/i,oct:/^out(ubro)?/i,nov:/^nov(embro)?/i,dec:/^dez(embro)?/i,sun:/^domingo/i,mon:/^segunda-feira/i,tue:/^terça-feira/i,wed:/^quarta-feira/i,thu:/^quinta-feira/i,fri:/^sexta-feira/i,sat:/^sábado/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-ru-RU.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"ru-RU",englishName:"Russian (Russia)",nativeName:"русский (Россия)",dayNames:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],abbreviatedDayNames:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],shortestDayNames:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],firstLetterDayNames:["В","П","В","С","Ч","П","С"],monthNames:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],abbreviatedMonthNames:["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"d MMMM yyyy 'г.'",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"d MMMM yyyy 'г.' H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM yyyy 'г.'"},regexPatterns:{jan:/^янв(арь)?/i,feb:/^фев(раль)?/i,mar:/^мар(т)?/i,apr:/^апр(ель)?/i,may:/^май/i,jun:/^июн(ь)?/i,jul:/^июл(ь)?/i,aug:/^авг(уст)?/i,sep:/^сен(тябрь)?/i,oct:/^окт(ябрь)?/i,nov:/^ноя(брь)?/i,dec:/^дек(абрь)?/i,sun:/^воскресенье/i,mon:/^понедельник/i,tue:/^вторник/i,wed:/^среда/i,thu:/^четверг/i,fri:/^пятница/i,sat:/^суббота/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-sv-SE.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"sv-SE",englishName:"Swedish (Sweden)",nativeName:"svenska (Sverige)",dayNames:["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],abbreviatedDayNames:["sö","må","ti","on","to","fr","lö"],shortestDayNames:["sö","må","ti","on","to","fr","lö"],firstLetterDayNames:["s","m","t","o","t","f","l"],monthNames:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],abbreviatedMonthNames:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{shortDate:"yyyy-MM-dd",longDate:"'den 'd MMMM yyyy",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"'den 'd MMMM yyyy HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"d MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uari)?/i,feb:/^feb(ruari)?/i,mar:/^mar(s)?/i,apr:/^apr(il)?/i,may:/^maj/i,jun:/^jun(i)?/i,jul:/^jul(i)?/i,aug:/^aug(usti)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^söndag/i,mon:/^måndag/i,tue:/^tisdag/i,wed:/^onsdag/i,thu:/^torsdag/i,fri:/^fredag/i,sat:/^lördag/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/languages/date-tr-TR.js
ADDED
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Version: 1.0 Alpha-1
|
3 |
+
* Build Date: 13-Nov-2007
|
4 |
+
* Copyright (c) 2006-2007, Coolite Inc. (http://www.coolite.com/). All rights reserved.
|
5 |
+
* License: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
|
6 |
+
* Website: http://www.datejs.com/ or http://www.coolite.com/datejs/
|
7 |
+
*/
|
8 |
+
Date.CultureInfo={name:"tr-TR",englishName:"Turkish (Turkey)",nativeName:"Türkçe (Türkiye)",dayNames:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],abbreviatedDayNames:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],shortestDayNames:["Pz","Pt","Sa","Ça","Pe","Cu","Ct"],firstLetterDayNames:["P","P","S","Ç","P","C","C"],monthNames:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],abbreviatedMonthNames:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],amDesignator:"",pmDesignator:"",firstDayOfWeek:1,twoDigitYearMax:2029,dateElementOrder:"dmy",formatPatterns:{shortDate:"dd.MM.yyyy",longDate:"dd MMMM yyyy dddd",shortTime:"HH:mm",longTime:"HH:mm:ss",fullDateTime:"dd MMMM yyyy dddd HH:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^oca(k)?/i,feb:/^şub(at)?/i,mar:/^mar(t)?/i,apr:/^nis(an)?/i,may:/^may(ıs)?/i,jun:/^haz(iran)?/i,jul:/^tem(muz)?/i,aug:/^ağu(stos)?/i,sep:/^eyl(ül)?/i,oct:/^eki(m)?/i,nov:/^kas(ım)?/i,dec:/^ara(lık)?/i,sun:/^pz(z(ar)?)?/i,mon:/^pt(t(artesi)?)?/i,tue:/^sa(l(ı)?)?/i,wed:/^ça(r(şamba)?)?/i,thu:/^pe(r(şembe)?)?/i,fri:/^cu(m(a)?)?/i,sat:/^ct(t(artesi)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|after|from)/i,subtract:/^(\-|before|ago)/i,yesterday:/^yesterday/i,today:/^t(oday)?/i,tomorrow:/^tomorrow/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^min(ute)?s?/i,hour:/^h(ou)?rs?/i,week:/^w(ee)?k/i,month:/^m(o(nth)?s?)?/i,day:/^d(ays?)?/i,year:/^y((ea)?rs?)?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a|p)/i},abbreviatedTimeZoneStandard:{GMT:"-000",EST:"-0400",CST:"-0500",MST:"-0600",PST:"-0700"},abbreviatedTimeZoneDST:{GMT:"-000",EDT:"-0500",CDT:"-0600",MDT:"-0700",PDT:"-0800"}};
|
9 |
+
Date.getMonthNumberFromName=function(name){var n=Date.CultureInfo.monthNames,m=Date.CultureInfo.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
10 |
+
return-1;};Date.getDayNumberFromName=function(name){var n=Date.CultureInfo.dayNames,m=Date.CultureInfo.abbreviatedDayNames,o=Date.CultureInfo.shortestDayNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
|
11 |
+
return-1;};Date.isLeapYear=function(year){return(((year%4===0)&&(year%100!==0))||(year%400===0));};Date.getDaysInMonth=function(year,month){return[31,(Date.isLeapYear(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};Date.getTimezoneOffset=function(s,dst){return(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST[s.toUpperCase()]:Date.CultureInfo.abbreviatedTimeZoneStandard[s.toUpperCase()];};Date.getTimezoneAbbreviation=function(offset,dst){var n=(dst||false)?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard,p;for(p in n){if(n[p]===offset){return p;}}
|
12 |
+
return null;};Date.prototype.clone=function(){return new Date(this.getTime());};Date.prototype.compareTo=function(date){if(isNaN(this)){throw new Error(this);}
|
13 |
+
if(date instanceof Date&&!isNaN(date)){return(this>date)?1:(this<date)?-1:0;}else{throw new TypeError(date);}};Date.prototype.equals=function(date){return(this.compareTo(date)===0);};Date.prototype.between=function(start,end){var t=this.getTime();return t>=start.getTime()&&t<=end.getTime();};Date.prototype.addMilliseconds=function(value){this.setMilliseconds(this.getMilliseconds()+value);return this;};Date.prototype.addSeconds=function(value){return this.addMilliseconds(value*1000);};Date.prototype.addMinutes=function(value){return this.addMilliseconds(value*60000);};Date.prototype.addHours=function(value){return this.addMilliseconds(value*3600000);};Date.prototype.addDays=function(value){return this.addMilliseconds(value*86400000);};Date.prototype.addWeeks=function(value){return this.addMilliseconds(value*604800000);};Date.prototype.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this.setDate(Math.min(n,this.getDaysInMonth()));return this;};Date.prototype.addYears=function(value){return this.addMonths(value*12);};Date.prototype.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
|
14 |
+
var x=config;if(x.millisecond||x.milliseconds){this.addMilliseconds(x.millisecond||x.milliseconds);}
|
15 |
+
if(x.second||x.seconds){this.addSeconds(x.second||x.seconds);}
|
16 |
+
if(x.minute||x.minutes){this.addMinutes(x.minute||x.minutes);}
|
17 |
+
if(x.hour||x.hours){this.addHours(x.hour||x.hours);}
|
18 |
+
if(x.month||x.months){this.addMonths(x.month||x.months);}
|
19 |
+
if(x.year||x.years){this.addYears(x.year||x.years);}
|
20 |
+
if(x.day||x.days){this.addDays(x.day||x.days);}
|
21 |
+
return this;};Date._validate=function(value,min,max,name){if(typeof value!="number"){throw new TypeError(value+" is not a Number.");}else if(value<min||value>max){throw new RangeError(value+" is not a valid value for "+name+".");}
|
22 |
+
return true;};Date.validateMillisecond=function(n){return Date._validate(n,0,999,"milliseconds");};Date.validateSecond=function(n){return Date._validate(n,0,59,"seconds");};Date.validateMinute=function(n){return Date._validate(n,0,59,"minutes");};Date.validateHour=function(n){return Date._validate(n,0,23,"hours");};Date.validateDay=function(n,year,month){return Date._validate(n,1,Date.getDaysInMonth(year,month),"days");};Date.validateMonth=function(n){return Date._validate(n,0,11,"months");};Date.validateYear=function(n){return Date._validate(n,1,9999,"seconds");};Date.prototype.set=function(config){var x=config;if(!x.millisecond&&x.millisecond!==0){x.millisecond=-1;}
|
23 |
+
if(!x.second&&x.second!==0){x.second=-1;}
|
24 |
+
if(!x.minute&&x.minute!==0){x.minute=-1;}
|
25 |
+
if(!x.hour&&x.hour!==0){x.hour=-1;}
|
26 |
+
if(!x.day&&x.day!==0){x.day=-1;}
|
27 |
+
if(!x.month&&x.month!==0){x.month=-1;}
|
28 |
+
if(!x.year&&x.year!==0){x.year=-1;}
|
29 |
+
if(x.millisecond!=-1&&Date.validateMillisecond(x.millisecond)){this.addMilliseconds(x.millisecond-this.getMilliseconds());}
|
30 |
+
if(x.second!=-1&&Date.validateSecond(x.second)){this.addSeconds(x.second-this.getSeconds());}
|
31 |
+
if(x.minute!=-1&&Date.validateMinute(x.minute)){this.addMinutes(x.minute-this.getMinutes());}
|
32 |
+
if(x.hour!=-1&&Date.validateHour(x.hour)){this.addHours(x.hour-this.getHours());}
|
33 |
+
if(x.month!==-1&&Date.validateMonth(x.month)){this.addMonths(x.month-this.getMonth());}
|
34 |
+
if(x.year!=-1&&Date.validateYear(x.year)){this.addYears(x.year-this.getFullYear());}
|
35 |
+
if(x.day!=-1&&Date.validateDay(x.day,this.getFullYear(),this.getMonth())){this.addDays(x.day-this.getDate());}
|
36 |
+
if(x.timezone){this.setTimezone(x.timezone);}
|
37 |
+
if(x.timezoneOffset){this.setTimezoneOffset(x.timezoneOffset);}
|
38 |
+
return this;};Date.prototype.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};Date.prototype.isLeapYear=function(){var y=this.getFullYear();return(((y%4===0)&&(y%100!==0))||(y%400===0));};Date.prototype.isWeekday=function(){return!(this.is().sat()||this.is().sun());};Date.prototype.getDaysInMonth=function(){return Date.getDaysInMonth(this.getFullYear(),this.getMonth());};Date.prototype.moveToFirstDayOfMonth=function(){return this.set({day:1});};Date.prototype.moveToLastDayOfMonth=function(){return this.set({day:this.getDaysInMonth()});};Date.prototype.moveToDayOfWeek=function(day,orient){var diff=(day-this.getDay()+7*(orient||+1))%7;return this.addDays((diff===0)?diff+=7*(orient||+1):diff);};Date.prototype.moveToMonth=function(month,orient){var diff=(month-this.getMonth()+12*(orient||+1))%12;return this.addMonths((diff===0)?diff+=12*(orient||+1):diff);};Date.prototype.getDayOfYear=function(){return Math.floor((this-new Date(this.getFullYear(),0,1))/86400000);};Date.prototype.getWeekOfYear=function(firstDayOfWeek){var y=this.getFullYear(),m=this.getMonth(),d=this.getDate();var dow=firstDayOfWeek||Date.CultureInfo.firstDayOfWeek;var offset=7+1-new Date(y,0,1).getDay();if(offset==8){offset=1;}
|
39 |
+
var daynum=((Date.UTC(y,m,d,0,0,0)-Date.UTC(y,0,1,0,0,0))/86400000)+1;var w=Math.floor((daynum-offset+7)/7);if(w===dow){y--;var prevOffset=7+1-new Date(y,0,1).getDay();if(prevOffset==2||prevOffset==8){w=53;}else{w=52;}}
|
40 |
+
return w;};Date.prototype.isDST=function(){console.log('isDST');return this.toString().match(/(E|C|M|P)(S|D)T/)[2]=="D";};Date.prototype.getTimezone=function(){return Date.getTimezoneAbbreviation(this.getUTCOffset,this.isDST());};Date.prototype.setTimezoneOffset=function(s){var here=this.getTimezoneOffset(),there=Number(s)*-6/10;this.addMinutes(there-here);return this;};Date.prototype.setTimezone=function(s){return this.setTimezoneOffset(Date.getTimezoneOffset(s));};Date.prototype.getUTCOffset=function(){var n=this.getTimezoneOffset()*-10/6,r;if(n<0){r=(n-10000).toString();return r[0]+r.substr(2);}else{r=(n+10000).toString();return"+"+r.substr(1);}};Date.prototype.getDayName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedDayNames[this.getDay()]:Date.CultureInfo.dayNames[this.getDay()];};Date.prototype.getMonthName=function(abbrev){return abbrev?Date.CultureInfo.abbreviatedMonthNames[this.getMonth()]:Date.CultureInfo.monthNames[this.getMonth()];};Date.prototype._toString=Date.prototype.toString;Date.prototype.toString=function(format){var self=this;var p=function p(s){return(s.toString().length==1)?"0"+s:s;};return format?format.replace(/dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?/g,function(format){switch(format){case"hh":return p(self.getHours()<13?self.getHours():(self.getHours()-12));case"h":return self.getHours()<13?self.getHours():(self.getHours()-12);case"HH":return p(self.getHours());case"H":return self.getHours();case"mm":return p(self.getMinutes());case"m":return self.getMinutes();case"ss":return p(self.getSeconds());case"s":return self.getSeconds();case"yyyy":return self.getFullYear();case"yy":return self.getFullYear().toString().substring(2,4);case"dddd":return self.getDayName();case"ddd":return self.getDayName(true);case"dd":return p(self.getDate());case"d":return self.getDate().toString();case"MMMM":return self.getMonthName();case"MMM":return self.getMonthName(true);case"MM":return p((self.getMonth()+1));case"M":return self.getMonth()+1;case"t":return self.getHours()<12?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return self.getHours()<12?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"zzz":case"zz":case"z":return"";}}):this._toString();};
|
41 |
+
Date.now=function(){return new Date();};Date.today=function(){return Date.now().clearTime();};Date.prototype._orient=+1;Date.prototype.next=function(){this._orient=+1;return this;};Date.prototype.last=Date.prototype.prev=Date.prototype.previous=function(){this._orient=-1;return this;};Date.prototype._is=false;Date.prototype.is=function(){this._is=true;return this;};Number.prototype._dateElement="day";Number.prototype.fromNow=function(){var c={};c[this._dateElement]=this;return Date.now().add(c);};Number.prototype.ago=function(){var c={};c[this._dateElement]=this*-1;return Date.now().add(c);};(function(){var $D=Date.prototype,$N=Number.prototype;var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
|
42 |
+
return this.moveToDayOfWeek(n,this._orient);};};for(var i=0;i<dx.length;i++){$D[dx[i]]=$D[dx[i].substring(0,3)]=df(i);}
|
43 |
+
var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
|
44 |
+
return this.moveToMonth(n,this._orient);};};for(var j=0;j<mx.length;j++){$D[mx[j]]=$D[mx[j].substring(0,3)]=mf(j);}
|
45 |
+
var ef=function(j){return function(){if(j.substring(j.length-1)!="s"){j+="s";}
|
46 |
+
return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$D[de]=$D[de+"s"]=ef(px[k]);$N[de]=$N[de+"s"]=nf(de);}}());Date.prototype.toJSONString=function(){return this.toString("yyyy-MM-ddThh:mm:ssZ");};Date.prototype.toShortDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortDatePattern);};Date.prototype.toLongDateString=function(){return this.toString(Date.CultureInfo.formatPatterns.longDatePattern);};Date.prototype.toShortTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.shortTimePattern);};Date.prototype.toLongTimeString=function(){return this.toString(Date.CultureInfo.formatPatterns.longTimePattern);};Date.prototype.getOrdinal=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};
|
47 |
+
(function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0]);s=rx[1];continue;}
|
48 |
+
break;}
|
49 |
+
return[qx,s];};},many:function(p){return function(s){var rx=[],r=null;while(s.length){try{r=p.call(this,s);}catch(e){return[rx,s];}
|
50 |
+
rx.push(r[0]);s=r[1];}
|
51 |
+
return[rx,s];};},optional:function(p){return function(s){var r=null;try{r=p.call(this,s);}catch(e){return[null,s];}
|
52 |
+
return[r[0],r[1]];};},not:function(p){return function(s){try{p.call(this,s);}catch(e){return[null,s];}
|
53 |
+
throw new $P.Exception(s);};},ignore:function(p){return p?function(s){var r=null;r=p.call(this,s);return[null,r[1]];}:null;},product:function(){var px=arguments[0],qx=Array.prototype.slice.call(arguments,1),rx=[];for(var i=0;i<px.length;i++){rx.push(_.each(px[i],qx));}
|
54 |
+
return rx;},cache:function(rule){var cache={},r=null;return function(s){try{r=cache[s]=(cache[s]||rule.call(this,s));}catch(e){r=cache[s]=e;}
|
55 |
+
if(r instanceof $P.Exception){throw r;}else{return r;}};},any:function(){var px=arguments;return function(s){var r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
56 |
+
try{r=(px[i].call(this,s));}catch(e){r=null;}
|
57 |
+
if(r){return r;}}
|
58 |
+
throw new $P.Exception(s);};},each:function(){var px=arguments;return function(s){var rx=[],r=null;for(var i=0;i<px.length;i++){if(px[i]==null){continue;}
|
59 |
+
try{r=(px[i].call(this,s));}catch(e){throw new $P.Exception(s);}
|
60 |
+
rx.push(r[0]);s=r[1];}
|
61 |
+
return[rx,s];};},all:function(){var px=arguments,_=_;return _.each(_.optional(px));},sequence:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;if(px.length==1){return px[0];}
|
62 |
+
return function(s){var r=null,q=null;var rx=[];for(var i=0;i<px.length;i++){try{r=px[i].call(this,s);}catch(e){break;}
|
63 |
+
rx.push(r[0]);try{q=d.call(this,r[1]);}catch(ex){q=null;break;}
|
64 |
+
s=q[1];}
|
65 |
+
if(!r){throw new $P.Exception(s);}
|
66 |
+
if(q){throw new $P.Exception(q[1]);}
|
67 |
+
if(c){try{r=c.call(this,r[1]);}catch(ey){throw new $P.Exception(r[1]);}}
|
68 |
+
return[rx,(r?r[1]:s)];};},between:function(d1,p,d2){d2=d2||d1;var _fn=_.each(_.ignore(d1),p,_.ignore(d2));return function(s){var rx=_fn.call(this,s);return[[rx[0][0],r[0][2]],rx[1]];};},list:function(p,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return(p instanceof Array?_.each(_.product(p.slice(0,-1),_.ignore(d)),p.slice(-1),_.ignore(c)):_.each(_.many(_.each(p,_.ignore(d))),px,_.ignore(c)));},set:function(px,d,c){d=d||_.rtoken(/^\s*/);c=c||null;return function(s){var r=null,p=null,q=null,rx=null,best=[[],s],last=false;for(var i=0;i<px.length;i++){q=null;p=null;r=null;last=(px.length==1);try{r=px[i].call(this,s);}catch(e){continue;}
|
69 |
+
rx=[[r[0]],r[1]];if(r[1].length>0&&!last){try{q=d.call(this,r[1]);}catch(ex){last=true;}}else{last=true;}
|
70 |
+
if(!last&&q[1].length===0){last=true;}
|
71 |
+
if(!last){var qx=[];for(var j=0;j<px.length;j++){if(i!=j){qx.push(px[j]);}}
|
72 |
+
p=_.set(qx,d).call(this,q[1]);if(p[0].length>0){rx[0]=rx[0].concat(p[0]);rx[1]=p[1];}}
|
73 |
+
if(rx[1].length<best[1].length){best=rx;}
|
74 |
+
if(best[1].length===0){break;}}
|
75 |
+
if(best[0].length===0){return best;}
|
76 |
+
if(c){try{q=c.call(this,best[1]);}catch(ey){throw new $P.Exception(best[1]);}
|
77 |
+
best[1]=q[1];}
|
78 |
+
return best;};},forward:function(gr,fname){return function(s){return gr[fname].call(this,s);};},replace:function(rule,repl){return function(s){var r=rule.call(this,s);return[repl,r[1]];};},process:function(rule,fn){return function(s){var r=rule.call(this,s);return[fn.call(this,r[0]),r[1]];};},min:function(min,rule){return function(s){var rx=rule.call(this,s);if(rx[0].length<min){throw new $P.Exception(s);}
|
79 |
+
return rx;};}};var _generator=function(op){return function(){var args=null,rx=[];if(arguments.length>1){args=Array.prototype.slice.call(arguments);}else if(arguments[0]instanceof Array){args=arguments[0];}
|
80 |
+
if(args){for(var i=0,px=args.shift();i<px.length;i++){args.unshift(px[i]);rx.push(op.apply(null,args));args.shift();return rx;}}else{return op.apply(null,arguments);}};};var gx="optional not ignore cache".split(/\s/);for(var i=0;i<gx.length;i++){_[gx[i]]=_generator(_[gx[i]]);}
|
81 |
+
var _vector=function(op){return function(){if(arguments[0]instanceof Array){return op.apply(null,arguments[0]);}else{return op.apply(null,arguments);}};};var vx="each any all".split(/\s/);for(var j=0;j<vx.length;j++){_[vx[j]]=_vector(_[vx[j]]);}}());(function(){var flattenAndCompact=function(ax){var rx=[];for(var i=0;i<ax.length;i++){if(ax[i]instanceof Array){rx=rx.concat(flattenAndCompact(ax[i]));}else{if(ax[i]){rx.push(ax[i]);}}}
|
82 |
+
return rx;};Date.Grammar={};Date.Translator={hour:function(s){return function(){this.hour=Number(s);};},minute:function(s){return function(){this.minute=Number(s);};},second:function(s){return function(){this.second=Number(s);};},meridian:function(s){return function(){this.meridian=s.slice(0,1).toLowerCase();};},timezone:function(s){return function(){var n=s.replace(/[^\d\+\-]/g,"");if(n.length){this.timezoneOffset=Number(n);}else{this.timezone=s.toLowerCase();}};},day:function(x){var s=x[0];return function(){this.day=Number(s.match(/\d+/)[0]);};},month:function(s){return function(){this.month=((s.length==3)?Date.getMonthNumberFromName(s):(Number(s)-1));};},year:function(s){return function(){var n=Number(s);this.year=((s.length>2)?n:(n+(((n+2000)<Date.CultureInfo.twoDigitYearMax)?2000:1900)));};},rday:function(s){return function(){switch(s){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break;}};},finishExact:function(x){x=(x instanceof Array)?x:[x];var now=new Date();this.year=now.getFullYear();this.month=now.getMonth();this.day=1;this.hour=0;this.minute=0;this.second=0;for(var i=0;i<x.length;i++){if(x[i]){x[i].call(this);}}
|
83 |
+
this.hour=(this.meridian=="p"&&this.hour<13)?this.hour+12:this.hour;if(this.day>Date.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.");}
|
84 |
+
var r=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){r.set({timezone:this.timezone});}else if(this.timezoneOffset){r.set({timezoneOffset:this.timezoneOffset});}
|
85 |
+
return r;},finish:function(x){x=(x instanceof Array)?flattenAndCompact(x):[x];if(x.length===0){return null;}
|
86 |
+
for(var i=0;i<x.length;i++){if(typeof x[i]=="function"){x[i].call(this);}}
|
87 |
+
if(this.now){return new Date();}
|
88 |
+
var today=Date.today();var method=null;var expression=!!(this.days!=null||this.orient||this.operator);if(expression){var gap,mod,orient;orient=((this.orient=="past"||this.operator=="subtract")?-1:1);if(this.weekday){this.unit="day";gap=(Date.getDayNumberFromName(this.weekday)-today.getDay());mod=7;this.days=gap?((gap+(orient*mod))%mod):(orient*mod);}
|
89 |
+
if(this.month){this.unit="month";gap=(this.month-today.getMonth());mod=12;this.months=gap?((gap+(orient*mod))%mod):(orient*mod);this.month=null;}
|
90 |
+
if(!this.unit){this.unit="day";}
|
91 |
+
if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1;}
|
92 |
+
if(this.unit=="week"){this.unit="day";this.value=this.value*7;}
|
93 |
+
this[this.unit+"s"]=this.value*orient;}
|
94 |
+
return today.add(this);}else{if(this.meridian&&this.hour){this.hour=(this.hour<13&&this.meridian=="p")?this.hour+12:this.hour;}
|
95 |
+
if(this.weekday&&!this.day){this.day=(today.addDays((Date.getDayNumberFromName(this.weekday)-today.getDay()))).getDate();}
|
96 |
+
if(this.month&&!this.day){this.day=1;}
|
97 |
+
return today.set(this);}}};var _=Date.Parsing.Operators,g=Date.Grammar,t=Date.Translator,_fn;g.datePartDelimiter=_.rtoken(/^([\s\-\.\,\/\x27]+)/);g.timePartDelimiter=_.stoken(":");g.whiteSpace=_.rtoken(/^\s*/);g.generalDelimiter=_.rtoken(/^(([\s\,]|at|on)+)/);var _C={};g.ctoken=function(keys){var fn=_C[keys];if(!fn){var c=Date.CultureInfo.regexPatterns;var kx=keys.split(/\s+/),px=[];for(var i=0;i<kx.length;i++){px.push(_.replace(_.rtoken(c[kx[i]]),kx[i]));}
|
98 |
+
fn=_C[keys]=_.any.apply(null,px);}
|
99 |
+
return fn;};g.ctoken2=function(key){return _.rtoken(Date.CultureInfo.regexPatterns[key]);};g.h=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),t.hour));g.hh=_.cache(_.process(_.rtoken(/^(0[0-9]|1[0-2])/),t.hour));g.H=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),t.hour));g.HH=_.cache(_.process(_.rtoken(/^([0-1][0-9]|2[0-3])/),t.hour));g.m=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.minute));g.mm=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.minute));g.s=_.cache(_.process(_.rtoken(/^([0-5][0-9]|[0-9])/),t.second));g.ss=_.cache(_.process(_.rtoken(/^[0-5][0-9]/),t.second));g.hms=_.cache(_.sequence([g.H,g.mm,g.ss],g.timePartDelimiter));g.t=_.cache(_.process(g.ctoken2("shortMeridian"),t.meridian));g.tt=_.cache(_.process(g.ctoken2("longMeridian"),t.meridian));g.z=_.cache(_.process(_.rtoken(/^(\+|\-)?\s*\d\d\d\d?/),t.timezone));g.zz=_.cache(_.process(_.rtoken(/^(\+|\-)\s*\d\d\d\d/),t.timezone));g.zzz=_.cache(_.process(g.ctoken2("timezone"),t.timezone));g.timeSuffix=_.each(_.ignore(g.whiteSpace),_.set([g.tt,g.zzz]));g.time=_.each(_.optional(_.ignore(_.stoken("T"))),g.hms,g.timeSuffix);g.d=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1]|\d)/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.dd=_.cache(_.process(_.each(_.rtoken(/^([0-2]\d|3[0-1])/),_.optional(g.ctoken2("ordinalSuffix"))),t.day));g.ddd=g.dddd=_.cache(_.process(g.ctoken("sun mon tue wed thu fri sat"),function(s){return function(){this.weekday=s;};}));g.M=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d|\d)/),t.month));g.MM=_.cache(_.process(_.rtoken(/^(1[0-2]|0\d)/),t.month));g.MMM=g.MMMM=_.cache(_.process(g.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),t.month));g.y=_.cache(_.process(_.rtoken(/^(\d\d?)/),t.year));g.yy=_.cache(_.process(_.rtoken(/^(\d\d)/),t.year));g.yyy=_.cache(_.process(_.rtoken(/^(\d\d?\d?\d?)/),t.year));g.yyyy=_.cache(_.process(_.rtoken(/^(\d\d\d\d)/),t.year));_fn=function(){return _.each(_.any.apply(null,arguments),_.not(g.ctoken2("timeContext")));};g.day=_fn(g.d,g.dd);g.month=_fn(g.M,g.MMM);g.year=_fn(g.yyyy,g.yy);g.orientation=_.process(g.ctoken("past future"),function(s){return function(){this.orient=s;};});g.operator=_.process(g.ctoken("add subtract"),function(s){return function(){this.operator=s;};});g.rday=_.process(g.ctoken("yesterday tomorrow today now"),t.rday);g.unit=_.process(g.ctoken("minute hour day week month year"),function(s){return function(){this.unit=s;};});g.value=_.process(_.rtoken(/^\d\d?(st|nd|rd|th)?/),function(s){return function(){this.value=s.replace(/\D/g,"");};});g.expression=_.set([g.rday,g.operator,g.value,g.unit,g.orientation,g.ddd,g.MMM]);_fn=function(){return _.set(arguments,g.datePartDelimiter);};g.mdy=_fn(g.ddd,g.month,g.day,g.year);g.ymd=_fn(g.ddd,g.year,g.month,g.day);g.dmy=_fn(g.ddd,g.day,g.month,g.year);g.date=function(s){return((g[Date.CultureInfo.dateElementOrder]||g.mdy).call(this,s));};g.format=_.process(_.many(_.any(_.process(_.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(fmt){if(g[fmt]){return g[fmt];}else{throw Date.Parsing.Exception(fmt);}}),_.process(_.rtoken(/^[^dMyhHmstz]+/),function(s){return _.ignore(_.stoken(s));}))),function(rules){return _.process(_.each.apply(null,rules),t.finishExact);});var _F={};var _get=function(f){return _F[f]=(_F[f]||g.format(f)[0]);};g.formats=function(fx){if(fx instanceof Array){var rx=[];for(var i=0;i<fx.length;i++){rx.push(_get(fx[i]));}
|
100 |
+
return _.any.apply(null,rx);}else{return _get(fx);}};g._formats=g.formats(["yyyy-MM-ddTHH:mm:ss","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","d"]);g._start=_.process(_.set([g.date,g.time,g.expression],g.generalDelimiter,g.whiteSpace),t.finish);g.start=function(s){try{var r=g._formats.call({},s);if(r[1].length===0){return r;}}catch(e){}
|
101 |
+
return g._start.call({},s);};}());Date._parse=Date.parse;Date.parse=function(s){var r=null;if(!s){return null;}
|
102 |
+
try{r=Date.Grammar.start.call({},s);}catch(e){return null;}
|
103 |
+
return((r[1].length===0)?r[0]:null);};Date.getParseFunction=function(fx){var fn=Date.Grammar.formats(fx);return function(s){var r=null;try{r=fn.call({},s);}catch(e){return null;}
|
104 |
+
return((r[1].length===0)?r[0]:null);};};Date.parseExact=function(s,fx){return Date.getParseFunction(fx)(s);};
|
3.7.8/lib/lib.txt
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
This file lists all of the third-party JavaScript libraries we are using and where they came from. All of these files are compressed and combined into the edcallib.min.js file. This compressed file was made with the Google Closure JavaScript compiler. I haven't checked in that compiler because it is over 4MB and you don't need it for runtime. I haven't been able to figure out a way to make WordPress's Subversion exclude a file when building a plugin.
|
2 |
+
|
3 |
+
languages/date-*.js
|
4 |
+
date.extras.js
|
5 |
+
This is an open source JavaScript date library that we use to provide and manipulate dates for the calendar.
|
6 |
+
http://www.datejs.com/
|
7 |
+
MIT License
|
8 |
+
|
9 |
+
humanmsg.css
|
10 |
+
humanmsg.js
|
11 |
+
We use Humanized style error messages when we show concurrency errors and other issues the user might run into when dragging posts.
|
12 |
+
http://code.google.com/p/humanmsg/
|
13 |
+
Apache License 2.0
|
14 |
+
|
15 |
+
jquery.bgiframe.js
|
16 |
+
jquery.delegate.js
|
17 |
+
jquery.tools.min.js
|
18 |
+
JQuery tools supports the scrolling.
|
19 |
+
http://flowplayer.org/tools/index.html
|
20 |
+
MIT license
|
21 |
+
|
22 |
+
jquery.cookie.js
|
23 |
+
A nice utility for setting and reading cookies.
|
24 |
+
http://plugins.jquery.com/project/Cookie
|
25 |
+
MIT license
|
26 |
+
|
27 |
+
jquery.mousewheel.js
|
28 |
+
This library handles mousewhere integration for the calendar.
|
29 |
+
http://brandonaaron.net/code/mousewheel/demos
|
30 |
+
MIT License
|
31 |
+
|
32 |
+
timePicker.css
|
33 |
+
jquery.timepicker.js
|
34 |
+
The JQuery time picker shows a nice time picker when you edit the post time.
|
35 |
+
http://labs.perifer.se/timedatepicker
|
36 |
+
MIT License
|
37 |
+
|
38 |
+
json2.js
|
39 |
+
We use this library for faster JSON parsing.
|
40 |
+
http://www.json.org/js.html
|
41 |
+
It is available under the public domain.
|
42 |
+
|
43 |
+
sprintf-0.7-beta1.js
|
44 |
+
This libraries helps us to PHP style string substitution for localization.
|
45 |
+
http://www.diveintojavascript.com/projects/javascript-sprintf
|
46 |
+
BSD license
|
47 |
+
|
48 |
+
tools.scrollable-1.1.2.js
|
49 |
+
tools.scrollable.mousewheel-1.0.1.js
|
50 |
+
The scrollable library supports the mouse wheel scrolling and manages the calendar's vertical scrolling.
|
51 |
+
http://flowplayer.org/tools/scrollable.html
|
52 |
+
MIT License
|
53 |
+
|
54 |
+
qunit.js
|
55 |
+
qunit.css
|
56 |
+
A unit testing framework for the calendar
|
57 |
+
http://docs.jquery.com/QUnit
|
58 |
+
MIT License
|
3.7.8/lib/qunit.css
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/** Font Family and Sizes */
|
2 |
+
|
3 |
+
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
4 |
+
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
|
5 |
+
}
|
6 |
+
|
7 |
+
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
8 |
+
#qunit-tests { font-size: smaller; }
|
9 |
+
|
10 |
+
|
11 |
+
/** Resets */
|
12 |
+
|
13 |
+
#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
|
14 |
+
margin: 0;
|
15 |
+
padding: 0;
|
16 |
+
}
|
17 |
+
|
18 |
+
|
19 |
+
/** Header */
|
20 |
+
|
21 |
+
#qunit-header {
|
22 |
+
padding: 0.5em 0 0.5em 1em;
|
23 |
+
|
24 |
+
color: #8699a4;
|
25 |
+
background-color: #0d3349;
|
26 |
+
|
27 |
+
font-size: 1.5em;
|
28 |
+
line-height: 1em;
|
29 |
+
font-weight: normal;
|
30 |
+
|
31 |
+
border-radius: 15px 15px 0 0;
|
32 |
+
-moz-border-radius: 15px 15px 0 0;
|
33 |
+
-webkit-border-top-right-radius: 15px;
|
34 |
+
-webkit-border-top-left-radius: 15px;
|
35 |
+
}
|
36 |
+
|
37 |
+
#qunit-header a {
|
38 |
+
text-decoration: none;
|
39 |
+
color: #c2ccd1;
|
40 |
+
}
|
41 |
+
|
42 |
+
#qunit-header a:hover,
|
43 |
+
#qunit-header a:focus {
|
44 |
+
color: #fff;
|
45 |
+
}
|
46 |
+
|
47 |
+
#qunit-banner {
|
48 |
+
height: 5px;
|
49 |
+
}
|
50 |
+
|
51 |
+
#qunit-testrunner-toolbar {
|
52 |
+
padding: 0em 0 0.5em 2em;
|
53 |
+
}
|
54 |
+
|
55 |
+
#qunit-userAgent {
|
56 |
+
padding: 0.5em 0 0.5em 2.5em;
|
57 |
+
background-color: #2b81af;
|
58 |
+
color: #fff;
|
59 |
+
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
60 |
+
}
|
61 |
+
|
62 |
+
|
63 |
+
/** Tests: Pass/Fail */
|
64 |
+
|
65 |
+
#qunit-tests {
|
66 |
+
list-style-position: inside;
|
67 |
+
}
|
68 |
+
|
69 |
+
#qunit-tests li {
|
70 |
+
padding: 0.4em 0.5em 0.4em 2.5em;
|
71 |
+
border-bottom: 1px solid #fff;
|
72 |
+
list-style-position: inside;
|
73 |
+
}
|
74 |
+
|
75 |
+
#qunit-tests li strong {
|
76 |
+
cursor: pointer;
|
77 |
+
}
|
78 |
+
|
79 |
+
#qunit-tests ol {
|
80 |
+
margin-top: 0.5em;
|
81 |
+
padding: 0.5em;
|
82 |
+
|
83 |
+
background-color: #fff;
|
84 |
+
|
85 |
+
border-radius: 15px;
|
86 |
+
-moz-border-radius: 15px;
|
87 |
+
-webkit-border-radius: 15px;
|
88 |
+
|
89 |
+
box-shadow: inset 0px 2px 13px #999;
|
90 |
+
-moz-box-shadow: inset 0px 2px 13px #999;
|
91 |
+
-webkit-box-shadow: inset 0px 2px 13px #999;
|
92 |
+
}
|
93 |
+
|
94 |
+
#qunit-tests table {
|
95 |
+
border-collapse: collapse;
|
96 |
+
margin-top: .2em;
|
97 |
+
}
|
98 |
+
|
99 |
+
#qunit-tests th {
|
100 |
+
text-align: right;
|
101 |
+
vertical-align: top;
|
102 |
+
padding: 0 .5em 0 0;
|
103 |
+
}
|
104 |
+
|
105 |
+
#qunit-tests td {
|
106 |
+
vertical-align: top;
|
107 |
+
}
|
108 |
+
|
109 |
+
#qunit-tests pre {
|
110 |
+
margin: 0;
|
111 |
+
white-space: pre-wrap;
|
112 |
+
word-wrap: break-word;
|
113 |
+
}
|
114 |
+
|
115 |
+
#qunit-tests del {
|
116 |
+
background-color: #e0f2be;
|
117 |
+
color: #374e0c;
|
118 |
+
text-decoration: none;
|
119 |
+
}
|
120 |
+
|
121 |
+
#qunit-tests ins {
|
122 |
+
background-color: #ffcaca;
|
123 |
+
color: #500;
|
124 |
+
text-decoration: none;
|
125 |
+
}
|
126 |
+
|
127 |
+
/*** Test Counts */
|
128 |
+
|
129 |
+
#qunit-tests b.counts { color: black; }
|
130 |
+
#qunit-tests b.passed { color: #5E740B; }
|
131 |
+
#qunit-tests b.failed { color: #710909; }
|
132 |
+
|
133 |
+
#qunit-tests li li {
|
134 |
+
margin: 0.5em;
|
135 |
+
padding: 0.4em 0.5em 0.4em 0.5em;
|
136 |
+
background-color: #fff;
|
137 |
+
border-bottom: none;
|
138 |
+
list-style-position: inside;
|
139 |
+
}
|
140 |
+
|
141 |
+
/*** Passing Styles */
|
142 |
+
|
143 |
+
#qunit-tests li li.pass {
|
144 |
+
color: #5E740B;
|
145 |
+
background-color: #fff;
|
146 |
+
border-left: 26px solid #C6E746;
|
147 |
+
}
|
148 |
+
|
149 |
+
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
150 |
+
#qunit-tests .pass .test-name { color: #366097; }
|
151 |
+
|
152 |
+
#qunit-tests .pass .test-actual,
|
153 |
+
#qunit-tests .pass .test-expected { color: #999999; }
|
154 |
+
|
155 |
+
#qunit-banner.qunit-pass { background-color: #C6E746; }
|
156 |
+
|
157 |
+
/*** Failing Styles */
|
158 |
+
|
159 |
+
#qunit-tests li li.fail {
|
160 |
+
color: #710909;
|
161 |
+
background-color: #fff;
|
162 |
+
border-left: 26px solid #EE5757;
|
163 |
+
}
|
164 |
+
|
165 |
+
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
|
166 |
+
#qunit-tests .fail .test-name,
|
167 |
+
#qunit-tests .fail .module-name { color: #000000; }
|
168 |
+
|
169 |
+
#qunit-tests .fail .test-actual { color: #EE5757; }
|
170 |
+
#qunit-tests .fail .test-expected { color: green; }
|
171 |
+
|
172 |
+
#qunit-banner.qunit-fail,
|
173 |
+
#qunit-testrunner-toolbar { background-color: #EE5757; }
|
174 |
+
|
175 |
+
|
176 |
+
/** Footer */
|
177 |
+
|
178 |
+
#qunit-testresult {
|
179 |
+
padding: 0.5em 0.5em 0.5em 2.5em;
|
180 |
+
|
181 |
+
color: #2b81af;
|
182 |
+
background-color: #D2E0E6;
|
183 |
+
|
184 |
+
border-radius: 0 0 15px 15px;
|
185 |
+
-moz-border-radius: 0 0 15px 15px;
|
186 |
+
-webkit-border-bottom-right-radius: 15px;
|
187 |
+
-webkit-border-bottom-left-radius: 15px;
|
188 |
+
}
|
189 |
+
|
190 |
+
/** Fixture */
|
191 |
+
|
192 |
+
#qunit-fixture {
|
193 |
+
position: absolute;
|
194 |
+
top: -10000px;
|
195 |
+
left: -10000px;
|
196 |
+
}
|
3.7.8/lib/qunit.js
ADDED
@@ -0,0 +1,1341 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* QUnit - A JavaScript Unit Testing Framework
|
3 |
+
*
|
4 |
+
* http://docs.jquery.com/QUnit
|
5 |
+
*
|
6 |
+
* Copyright (c) 2009 John Resig, Jörn Zaefferer
|
7 |
+
* Dual licensed under the MIT (MIT-LICENSE.txt)
|
8 |
+
* and GPL (GPL-LICENSE.txt) licenses.
|
9 |
+
*/
|
10 |
+
|
11 |
+
(function(window) {
|
12 |
+
|
13 |
+
var defined = {
|
14 |
+
setTimeout: typeof window.setTimeout !== "undefined",
|
15 |
+
sessionStorage: (function() {
|
16 |
+
try {
|
17 |
+
return !!sessionStorage.getItem;
|
18 |
+
} catch(e){
|
19 |
+
return false;
|
20 |
+
}
|
21 |
+
})()
|
22 |
+
}
|
23 |
+
|
24 |
+
var testId = 0;
|
25 |
+
|
26 |
+
var Test = function(name, testName, expected, testEnvironmentArg, async, callback) {
|
27 |
+
this.name = name;
|
28 |
+
this.testName = testName;
|
29 |
+
this.expected = expected;
|
30 |
+
this.testEnvironmentArg = testEnvironmentArg;
|
31 |
+
this.async = async;
|
32 |
+
this.callback = callback;
|
33 |
+
this.assertions = [];
|
34 |
+
};
|
35 |
+
Test.prototype = {
|
36 |
+
init: function() {
|
37 |
+
var tests = id("qunit-tests");
|
38 |
+
if (tests) {
|
39 |
+
var b = document.createElement("strong");
|
40 |
+
b.innerHTML = "Running " + this.name;
|
41 |
+
var li = document.createElement("li");
|
42 |
+
li.appendChild( b );
|
43 |
+
li.id = this.id = "test-output" + testId++;
|
44 |
+
tests.appendChild( li );
|
45 |
+
}
|
46 |
+
},
|
47 |
+
setup: function() {
|
48 |
+
if (this.module != config.previousModule) {
|
49 |
+
if ( this.previousModule ) {
|
50 |
+
QUnit.moduleDone( this.module, config.moduleStats.bad, config.moduleStats.all );
|
51 |
+
}
|
52 |
+
config.previousModule = this.module;
|
53 |
+
config.moduleStats = { all: 0, bad: 0 };
|
54 |
+
QUnit.moduleStart( this.module, this.moduleTestEnvironment );
|
55 |
+
}
|
56 |
+
|
57 |
+
config.current = this;
|
58 |
+
this.testEnvironment = extend({
|
59 |
+
setup: function() {},
|
60 |
+
teardown: function() {}
|
61 |
+
}, this.moduleTestEnvironment);
|
62 |
+
if (this.testEnvironmentArg) {
|
63 |
+
extend(this.testEnvironment, this.testEnvironmentArg);
|
64 |
+
}
|
65 |
+
|
66 |
+
QUnit.testStart( this.testName, this.testEnvironment );
|
67 |
+
|
68 |
+
// allow utility functions to access the current test environment
|
69 |
+
// TODO why??
|
70 |
+
QUnit.current_testEnvironment = this.testEnvironment;
|
71 |
+
|
72 |
+
try {
|
73 |
+
if ( !config.pollution ) {
|
74 |
+
saveGlobal();
|
75 |
+
}
|
76 |
+
|
77 |
+
this.testEnvironment.setup.call(this.testEnvironment);
|
78 |
+
} catch(e) {
|
79 |
+
// TODO use testName instead of name for no-markup message?
|
80 |
+
QUnit.ok( false, "Setup failed on " + this.name + ": " + e.message );
|
81 |
+
}
|
82 |
+
},
|
83 |
+
run: function() {
|
84 |
+
if ( this.async ) {
|
85 |
+
QUnit.stop();
|
86 |
+
}
|
87 |
+
|
88 |
+
try {
|
89 |
+
this.callback.call(this.testEnvironment);
|
90 |
+
} catch(e) {
|
91 |
+
// TODO use testName instead of name for no-markup message?
|
92 |
+
fail("Test " + this.name + " died, exception and test follows", e, this.callback);
|
93 |
+
QUnit.ok( false, "Died on test #" + (this.assertions.length + 1) + ": " + e.message + " - " + QUnit.jsDump.parse(e) );
|
94 |
+
// else next test will carry the responsibility
|
95 |
+
saveGlobal();
|
96 |
+
|
97 |
+
// Restart the tests if they're blocking
|
98 |
+
if ( config.blocking ) {
|
99 |
+
start();
|
100 |
+
}
|
101 |
+
}
|
102 |
+
},
|
103 |
+
teardown: function() {
|
104 |
+
try {
|
105 |
+
checkPollution();
|
106 |
+
this.testEnvironment.teardown.call(this.testEnvironment);
|
107 |
+
} catch(e) {
|
108 |
+
// TODO use testName instead of name for no-markup message?
|
109 |
+
QUnit.ok( false, "Teardown failed on " + this.name + ": " + e.message );
|
110 |
+
}
|
111 |
+
},
|
112 |
+
finish: function() {
|
113 |
+
if ( this.expected && this.expected != this.assertions.length ) {
|
114 |
+
QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" );
|
115 |
+
}
|
116 |
+
|
117 |
+
var good = 0, bad = 0,
|
118 |
+
tests = id("qunit-tests");
|
119 |
+
|
120 |
+
config.stats.all += this.assertions.length;
|
121 |
+
config.moduleStats.all += this.assertions.length;
|
122 |
+
|
123 |
+
if ( tests ) {
|
124 |
+
var ol = document.createElement("ol");
|
125 |
+
|
126 |
+
for ( var i = 0; i < this.assertions.length; i++ ) {
|
127 |
+
var assertion = this.assertions[i];
|
128 |
+
|
129 |
+
var li = document.createElement("li");
|
130 |
+
li.className = assertion.result ? "pass" : "fail";
|
131 |
+
li.innerHTML = assertion.message || (assertion.result ? "okay" : "failed");
|
132 |
+
ol.appendChild( li );
|
133 |
+
|
134 |
+
if ( assertion.result ) {
|
135 |
+
good++;
|
136 |
+
} else {
|
137 |
+
bad++;
|
138 |
+
config.stats.bad++;
|
139 |
+
config.moduleStats.bad++;
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
// store result when possible
|
144 |
+
defined.sessionStorage && sessionStorage.setItem("qunit-" + this.testName, bad);
|
145 |
+
|
146 |
+
if (bad == 0) {
|
147 |
+
ol.style.display = "none";
|
148 |
+
}
|
149 |
+
|
150 |
+
var b = document.createElement("strong");
|
151 |
+
b.innerHTML = this.name + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>";
|
152 |
+
|
153 |
+
addEvent(b, "click", function() {
|
154 |
+
var next = b.nextSibling, display = next.style.display;
|
155 |
+
next.style.display = display === "none" ? "block" : "none";
|
156 |
+
});
|
157 |
+
|
158 |
+
addEvent(b, "dblclick", function(e) {
|
159 |
+
var target = e && e.target ? e.target : window.event.srcElement;
|
160 |
+
if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) {
|
161 |
+
target = target.parentNode;
|
162 |
+
}
|
163 |
+
if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
|
164 |
+
window.location.search = "?" + encodeURIComponent(getText([target]).replace(/\(.+\)$/, "").replace(/(^\s*|\s*$)/g, ""));
|
165 |
+
}
|
166 |
+
});
|
167 |
+
|
168 |
+
var li = id(this.id);
|
169 |
+
li.className = bad ? "fail" : "pass";
|
170 |
+
li.style.display = resultDisplayStyle(!bad);
|
171 |
+
li.removeChild( li.firstChild );
|
172 |
+
li.appendChild( b );
|
173 |
+
li.appendChild( ol );
|
174 |
+
|
175 |
+
if ( bad ) {
|
176 |
+
var toolbar = id("qunit-testrunner-toolbar");
|
177 |
+
if ( toolbar ) {
|
178 |
+
toolbar.style.display = "block";
|
179 |
+
id("qunit-filter-pass").disabled = null;
|
180 |
+
}
|
181 |
+
}
|
182 |
+
|
183 |
+
} else {
|
184 |
+
for ( var i = 0; i < this.assertions.length; i++ ) {
|
185 |
+
if ( !this.assertions[i].result ) {
|
186 |
+
bad++;
|
187 |
+
config.stats.bad++;
|
188 |
+
config.moduleStats.bad++;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
try {
|
194 |
+
QUnit.reset();
|
195 |
+
} catch(e) {
|
196 |
+
// TODO use testName instead of name for no-markup message?
|
197 |
+
fail("reset() failed, following Test " + this.name + ", exception and reset fn follows", e, QUnit.reset);
|
198 |
+
}
|
199 |
+
|
200 |
+
QUnit.testDone( this.testName, bad, this.assertions.length );
|
201 |
+
},
|
202 |
+
|
203 |
+
queue: function() {
|
204 |
+
var test = this;
|
205 |
+
synchronize(function() {
|
206 |
+
test.init();
|
207 |
+
});
|
208 |
+
function run() {
|
209 |
+
// each of these can by async
|
210 |
+
synchronize(function() {
|
211 |
+
test.setup();
|
212 |
+
});
|
213 |
+
synchronize(function() {
|
214 |
+
test.run();
|
215 |
+
});
|
216 |
+
synchronize(function() {
|
217 |
+
test.teardown();
|
218 |
+
});
|
219 |
+
synchronize(function() {
|
220 |
+
test.finish();
|
221 |
+
});
|
222 |
+
}
|
223 |
+
// defer when previous test run passed, if storage is available
|
224 |
+
var bad = defined.sessionStorage && +sessionStorage.getItem("qunit-" + this.testName);
|
225 |
+
if (bad) {
|
226 |
+
run();
|
227 |
+
} else {
|
228 |
+
synchronize(run);
|
229 |
+
};
|
230 |
+
}
|
231 |
+
|
232 |
+
}
|
233 |
+
|
234 |
+
var QUnit = {
|
235 |
+
|
236 |
+
// call on start of module test to prepend name to all tests
|
237 |
+
module: function(name, testEnvironment) {
|
238 |
+
config.previousModule = config.currentModule;
|
239 |
+
config.currentModule = name;
|
240 |
+
config.currentModuleTestEnviroment = testEnvironment;
|
241 |
+
},
|
242 |
+
|
243 |
+
asyncTest: function(testName, expected, callback) {
|
244 |
+
if ( arguments.length === 2 ) {
|
245 |
+
callback = expected;
|
246 |
+
expected = 0;
|
247 |
+
}
|
248 |
+
|
249 |
+
QUnit.test(testName, expected, callback, true);
|
250 |
+
},
|
251 |
+
|
252 |
+
test: function(testName, expected, callback, async) {
|
253 |
+
var name = '<span class="test-name">' + testName + '</span>', testEnvironmentArg;
|
254 |
+
|
255 |
+
if ( arguments.length === 2 ) {
|
256 |
+
callback = expected;
|
257 |
+
expected = null;
|
258 |
+
}
|
259 |
+
// is 2nd argument a testEnvironment?
|
260 |
+
if ( expected && typeof expected === 'object') {
|
261 |
+
testEnvironmentArg = expected;
|
262 |
+
expected = null;
|
263 |
+
}
|
264 |
+
|
265 |
+
if ( config.currentModule ) {
|
266 |
+
name = '<span class="module-name">' + config.currentModule + "</span>: " + name;
|
267 |
+
}
|
268 |
+
|
269 |
+
if ( !validTest(config.currentModule + ": " + testName) ) {
|
270 |
+
return;
|
271 |
+
}
|
272 |
+
|
273 |
+
var test = new Test(name, testName, expected, testEnvironmentArg, async, callback);
|
274 |
+
test.previousModule = config.previousModule;
|
275 |
+
test.module = config.currentModule;
|
276 |
+
test.moduleTestEnvironment = config.currentModuleTestEnviroment;
|
277 |
+
test.queue();
|
278 |
+
},
|
279 |
+
|
280 |
+
/**
|
281 |
+
* Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
|
282 |
+
*/
|
283 |
+
expect: function(asserts) {
|
284 |
+
config.current.expected = asserts;
|
285 |
+
},
|
286 |
+
|
287 |
+
/**
|
288 |
+
* Asserts true.
|
289 |
+
* @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
|
290 |
+
*/
|
291 |
+
ok: function(a, msg) {
|
292 |
+
a = !!a;
|
293 |
+
var details = {
|
294 |
+
result: a,
|
295 |
+
message: msg
|
296 |
+
};
|
297 |
+
msg = escapeHtml(msg);
|
298 |
+
QUnit.log(a, msg, details);
|
299 |
+
config.current.assertions.push({
|
300 |
+
result: a,
|
301 |
+
message: msg
|
302 |
+
});
|
303 |
+
},
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Checks that the first two arguments are equal, with an optional message.
|
307 |
+
* Prints out both actual and expected values.
|
308 |
+
*
|
309 |
+
* Prefered to ok( actual == expected, message )
|
310 |
+
*
|
311 |
+
* @example equal( format("Received {0} bytes.", 2), "Received 2 bytes." );
|
312 |
+
*
|
313 |
+
* @param Object actual
|
314 |
+
* @param Object expected
|
315 |
+
* @param String message (optional)
|
316 |
+
*/
|
317 |
+
equal: function(actual, expected, message) {
|
318 |
+
QUnit.push(expected == actual, actual, expected, message);
|
319 |
+
},
|
320 |
+
|
321 |
+
notEqual: function(actual, expected, message) {
|
322 |
+
QUnit.push(expected != actual, actual, expected, message);
|
323 |
+
},
|
324 |
+
|
325 |
+
deepEqual: function(actual, expected, message) {
|
326 |
+
QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
|
327 |
+
},
|
328 |
+
|
329 |
+
notDeepEqual: function(actual, expected, message) {
|
330 |
+
QUnit.push(!QUnit.equiv(actual, expected), actual, expected, message);
|
331 |
+
},
|
332 |
+
|
333 |
+
strictEqual: function(actual, expected, message) {
|
334 |
+
QUnit.push(expected === actual, actual, expected, message);
|
335 |
+
},
|
336 |
+
|
337 |
+
notStrictEqual: function(actual, expected, message) {
|
338 |
+
QUnit.push(expected !== actual, actual, expected, message);
|
339 |
+
},
|
340 |
+
|
341 |
+
raises: function(fn, message) {
|
342 |
+
try {
|
343 |
+
fn();
|
344 |
+
QUnit.ok( false, message );
|
345 |
+
}
|
346 |
+
catch (e) {
|
347 |
+
QUnit.ok( true, message );
|
348 |
+
}
|
349 |
+
},
|
350 |
+
|
351 |
+
start: function() {
|
352 |
+
// A slight delay, to avoid any current callbacks
|
353 |
+
if ( defined.setTimeout ) {
|
354 |
+
window.setTimeout(function() {
|
355 |
+
if ( config.timeout ) {
|
356 |
+
clearTimeout(config.timeout);
|
357 |
+
}
|
358 |
+
|
359 |
+
config.blocking = false;
|
360 |
+
process();
|
361 |
+
}, 13);
|
362 |
+
} else {
|
363 |
+
config.blocking = false;
|
364 |
+
process();
|
365 |
+
}
|
366 |
+
},
|
367 |
+
|
368 |
+
stop: function(timeout) {
|
369 |
+
config.blocking = true;
|
370 |
+
|
371 |
+
if ( timeout && defined.setTimeout ) {
|
372 |
+
config.timeout = window.setTimeout(function() {
|
373 |
+
QUnit.ok( false, "Test timed out" );
|
374 |
+
QUnit.start();
|
375 |
+
}, timeout);
|
376 |
+
}
|
377 |
+
}
|
378 |
+
|
379 |
+
};
|
380 |
+
|
381 |
+
// Backwards compatibility, deprecated
|
382 |
+
QUnit.equals = QUnit.equal;
|
383 |
+
QUnit.same = QUnit.deepEqual;
|
384 |
+
|
385 |
+
// Maintain internal state
|
386 |
+
var config = {
|
387 |
+
// The queue of tests to run
|
388 |
+
queue: [],
|
389 |
+
|
390 |
+
// block until document ready
|
391 |
+
blocking: true
|
392 |
+
};
|
393 |
+
|
394 |
+
// Load paramaters
|
395 |
+
(function() {
|
396 |
+
var location = window.location || { search: "", protocol: "file:" },
|
397 |
+
GETParams = location.search.slice(1).split('&');
|
398 |
+
|
399 |
+
for ( var i = 0; i < GETParams.length; i++ ) {
|
400 |
+
GETParams[i] = decodeURIComponent( GETParams[i] );
|
401 |
+
if ( GETParams[i] === "noglobals" ) {
|
402 |
+
GETParams.splice( i, 1 );
|
403 |
+
i--;
|
404 |
+
config.noglobals = true;
|
405 |
+
} else if ( GETParams[i].search('=') > -1 ) {
|
406 |
+
GETParams.splice( i, 1 );
|
407 |
+
i--;
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
// restrict modules/tests by get parameters
|
412 |
+
config.filters = GETParams;
|
413 |
+
|
414 |
+
// Figure out if we're running the tests from a server or not
|
415 |
+
QUnit.isLocal = !!(location.protocol === 'file:');
|
416 |
+
})();
|
417 |
+
|
418 |
+
// Expose the API as global variables, unless an 'exports'
|
419 |
+
// object exists, in that case we assume we're in CommonJS
|
420 |
+
if ( typeof exports === "undefined" || typeof require === "undefined" ) {
|
421 |
+
extend(window, QUnit);
|
422 |
+
window.QUnit = QUnit;
|
423 |
+
} else {
|
424 |
+
extend(exports, QUnit);
|
425 |
+
exports.QUnit = QUnit;
|
426 |
+
}
|
427 |
+
|
428 |
+
// define these after exposing globals to keep them in these QUnit namespace only
|
429 |
+
extend(QUnit, {
|
430 |
+
config: config,
|
431 |
+
|
432 |
+
// Initialize the configuration options
|
433 |
+
init: function() {
|
434 |
+
extend(config, {
|
435 |
+
stats: { all: 0, bad: 0 },
|
436 |
+
moduleStats: { all: 0, bad: 0 },
|
437 |
+
started: +new Date,
|
438 |
+
updateRate: 1000,
|
439 |
+
blocking: false,
|
440 |
+
autostart: true,
|
441 |
+
autorun: false,
|
442 |
+
filters: [],
|
443 |
+
queue: []
|
444 |
+
});
|
445 |
+
|
446 |
+
var tests = id("qunit-tests"),
|
447 |
+
banner = id("qunit-banner"),
|
448 |
+
result = id("qunit-testresult");
|
449 |
+
|
450 |
+
if ( tests ) {
|
451 |
+
tests.innerHTML = "";
|
452 |
+
}
|
453 |
+
|
454 |
+
if ( banner ) {
|
455 |
+
banner.className = "";
|
456 |
+
}
|
457 |
+
|
458 |
+
if ( result ) {
|
459 |
+
result.parentNode.removeChild( result );
|
460 |
+
}
|
461 |
+
},
|
462 |
+
|
463 |
+
/**
|
464 |
+
* Resets the test setup. Useful for tests that modify the DOM.
|
465 |
+
*
|
466 |
+
* If jQuery is available, uses jQuery's html(), otherwise just innerHTML.
|
467 |
+
*/
|
468 |
+
reset: function() {
|
469 |
+
if ( window.jQuery ) {
|
470 |
+
jQuery( "#main, #qunit-fixture" ).html( config.fixture );
|
471 |
+
} else {
|
472 |
+
var main = id( 'main' ) || id( 'qunit-fixture' );
|
473 |
+
if ( main ) {
|
474 |
+
main.innerHTML = config.fixture;
|
475 |
+
}
|
476 |
+
}
|
477 |
+
},
|
478 |
+
|
479 |
+
/**
|
480 |
+
* Trigger an event on an element.
|
481 |
+
*
|
482 |
+
* @example triggerEvent( document.body, "click" );
|
483 |
+
*
|
484 |
+
* @param DOMElement elem
|
485 |
+
* @param String type
|
486 |
+
*/
|
487 |
+
triggerEvent: function( elem, type, event ) {
|
488 |
+
if ( document.createEvent ) {
|
489 |
+
event = document.createEvent("MouseEvents");
|
490 |
+
event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
|
491 |
+
0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
492 |
+
elem.dispatchEvent( event );
|
493 |
+
|
494 |
+
} else if ( elem.fireEvent ) {
|
495 |
+
elem.fireEvent("on"+type);
|
496 |
+
}
|
497 |
+
},
|
498 |
+
|
499 |
+
// Safe object type checking
|
500 |
+
is: function( type, obj ) {
|
501 |
+
return QUnit.objectType( obj ) == type;
|
502 |
+
},
|
503 |
+
|
504 |
+
objectType: function( obj ) {
|
505 |
+
if (typeof obj === "undefined") {
|
506 |
+
return "undefined";
|
507 |
+
|
508 |
+
// consider: typeof null === object
|
509 |
+
}
|
510 |
+
if (obj === null) {
|
511 |
+
return "null";
|
512 |
+
}
|
513 |
+
|
514 |
+
var type = Object.prototype.toString.call( obj )
|
515 |
+
.match(/^\[object\s(.*)\]$/)[1] || '';
|
516 |
+
|
517 |
+
switch (type) {
|
518 |
+
case 'Number':
|
519 |
+
if (isNaN(obj)) {
|
520 |
+
return "nan";
|
521 |
+
} else {
|
522 |
+
return "number";
|
523 |
+
}
|
524 |
+
case 'String':
|
525 |
+
case 'Boolean':
|
526 |
+
case 'Array':
|
527 |
+
case 'Date':
|
528 |
+
case 'RegExp':
|
529 |
+
case 'Function':
|
530 |
+
return type.toLowerCase();
|
531 |
+
}
|
532 |
+
if (typeof obj === "object") {
|
533 |
+
return "object";
|
534 |
+
}
|
535 |
+
return undefined;
|
536 |
+
},
|
537 |
+
|
538 |
+
push: function(result, actual, expected, message) {
|
539 |
+
var details = {
|
540 |
+
result: result,
|
541 |
+
message: message,
|
542 |
+
actual: actual,
|
543 |
+
expected: expected
|
544 |
+
};
|
545 |
+
|
546 |
+
message = escapeHtml(message) || (result ? "okay" : "failed");
|
547 |
+
message = '<span class="test-message">' + message + "</span>";
|
548 |
+
expected = escapeHtml(QUnit.jsDump.parse(expected));
|
549 |
+
actual = escapeHtml(QUnit.jsDump.parse(actual));
|
550 |
+
var output = message + '<table><tr class="test-expected"><th>Expected: </th><td><pre>' + expected + '</pre></td></tr>';
|
551 |
+
if (actual != expected) {
|
552 |
+
output += '<tr class="test-actual"><th>Result: </th><td><pre>' + actual + '</pre></td></tr>';
|
553 |
+
output += '<tr class="test-diff"><th>Diff: </th><td><pre>' + QUnit.diff(expected, actual) +'</pre></td></tr>';
|
554 |
+
}
|
555 |
+
if (!result) {
|
556 |
+
var source = sourceFromStacktrace();
|
557 |
+
if (source) {
|
558 |
+
details.source = source;
|
559 |
+
output += '<tr class="test-source"><th>Source: </th><td><pre>' + source +'</pre></td></tr>';
|
560 |
+
}
|
561 |
+
}
|
562 |
+
output += "</table>";
|
563 |
+
|
564 |
+
QUnit.log(result, message, details);
|
565 |
+
|
566 |
+
config.current.assertions.push({
|
567 |
+
result: !!result,
|
568 |
+
message: output
|
569 |
+
});
|
570 |
+
},
|
571 |
+
|
572 |
+
// Logging callbacks
|
573 |
+
begin: function() {},
|
574 |
+
done: function(failures, total) {},
|
575 |
+
log: function(result, message) {},
|
576 |
+
testStart: function(name, testEnvironment) {},
|
577 |
+
testDone: function(name, failures, total) {},
|
578 |
+
moduleStart: function(name, testEnvironment) {},
|
579 |
+
moduleDone: function(name, failures, total) {}
|
580 |
+
});
|
581 |
+
|
582 |
+
if ( typeof document === "undefined" || document.readyState === "complete" ) {
|
583 |
+
config.autorun = true;
|
584 |
+
}
|
585 |
+
|
586 |
+
addEvent(window, "load", function() {
|
587 |
+
QUnit.begin();
|
588 |
+
|
589 |
+
// Initialize the config, saving the execution queue
|
590 |
+
var oldconfig = extend({}, config);
|
591 |
+
QUnit.init();
|
592 |
+
extend(config, oldconfig);
|
593 |
+
|
594 |
+
config.blocking = false;
|
595 |
+
|
596 |
+
var userAgent = id("qunit-userAgent");
|
597 |
+
if ( userAgent ) {
|
598 |
+
userAgent.innerHTML = navigator.userAgent;
|
599 |
+
}
|
600 |
+
var banner = id("qunit-header");
|
601 |
+
if ( banner ) {
|
602 |
+
var paramsIndex = location.href.lastIndexOf(location.search);
|
603 |
+
if ( paramsIndex > -1 ) {
|
604 |
+
var mainPageLocation = location.href.slice(0, paramsIndex);
|
605 |
+
if ( mainPageLocation == location.href ) {
|
606 |
+
banner.innerHTML = '<a href=""> ' + banner.innerHTML + '</a> ';
|
607 |
+
} else {
|
608 |
+
var testName = decodeURIComponent(location.search.slice(1));
|
609 |
+
banner.innerHTML = '<a href="' + mainPageLocation + '">' + banner.innerHTML + '</a> › <a href="">' + testName + '</a>';
|
610 |
+
}
|
611 |
+
}
|
612 |
+
}
|
613 |
+
|
614 |
+
var toolbar = id("qunit-testrunner-toolbar");
|
615 |
+
if ( toolbar ) {
|
616 |
+
toolbar.style.display = "none";
|
617 |
+
|
618 |
+
var filter = document.createElement("input");
|
619 |
+
filter.type = "checkbox";
|
620 |
+
filter.id = "qunit-filter-pass";
|
621 |
+
filter.disabled = true;
|
622 |
+
addEvent( filter, "click", function() {
|
623 |
+
var li = document.getElementsByTagName("li");
|
624 |
+
for ( var i = 0; i < li.length; i++ ) {
|
625 |
+
if ( li[i].className.indexOf("pass") > -1 ) {
|
626 |
+
li[i].style.display = filter.checked ? "none" : "";
|
627 |
+
}
|
628 |
+
}
|
629 |
+
});
|
630 |
+
toolbar.appendChild( filter );
|
631 |
+
|
632 |
+
var label = document.createElement("label");
|
633 |
+
label.setAttribute("for", "qunit-filter-pass");
|
634 |
+
label.innerHTML = "Hide passed tests";
|
635 |
+
toolbar.appendChild( label );
|
636 |
+
}
|
637 |
+
|
638 |
+
var main = id('main') || id('qunit-fixture');
|
639 |
+
if ( main ) {
|
640 |
+
config.fixture = main.innerHTML;
|
641 |
+
}
|
642 |
+
|
643 |
+
if (config.autostart) {
|
644 |
+
QUnit.start();
|
645 |
+
}
|
646 |
+
});
|
647 |
+
|
648 |
+
function done() {
|
649 |
+
config.autorun = true;
|
650 |
+
|
651 |
+
// Log the last module results
|
652 |
+
if ( config.currentModule ) {
|
653 |
+
QUnit.moduleDone( config.currentModule, config.moduleStats.bad, config.moduleStats.all );
|
654 |
+
}
|
655 |
+
|
656 |
+
var banner = id("qunit-banner"),
|
657 |
+
tests = id("qunit-tests"),
|
658 |
+
html = ['Tests completed in ',
|
659 |
+
+new Date - config.started, ' milliseconds.<br/>',
|
660 |
+
'<span class="passed">', config.stats.all - config.stats.bad, '</span> tests of <span class="total">', config.stats.all, '</span> passed, <span class="failed">', config.stats.bad,'</span> failed.'].join('');
|
661 |
+
|
662 |
+
if ( banner ) {
|
663 |
+
banner.className = (config.stats.bad ? "qunit-fail" : "qunit-pass");
|
664 |
+
}
|
665 |
+
|
666 |
+
if ( tests ) {
|
667 |
+
var result = id("qunit-testresult");
|
668 |
+
|
669 |
+
if ( !result ) {
|
670 |
+
result = document.createElement("p");
|
671 |
+
result.id = "qunit-testresult";
|
672 |
+
result.className = "result";
|
673 |
+
tests.parentNode.insertBefore( result, tests.nextSibling );
|
674 |
+
}
|
675 |
+
|
676 |
+
result.innerHTML = html;
|
677 |
+
}
|
678 |
+
|
679 |
+
QUnit.done( config.stats.bad, config.stats.all );
|
680 |
+
}
|
681 |
+
|
682 |
+
function validTest( name ) {
|
683 |
+
var i = config.filters.length,
|
684 |
+
run = false;
|
685 |
+
|
686 |
+
if ( !i ) {
|
687 |
+
return true;
|
688 |
+
}
|
689 |
+
|
690 |
+
while ( i-- ) {
|
691 |
+
var filter = config.filters[i],
|
692 |
+
not = filter.charAt(0) == '!';
|
693 |
+
|
694 |
+
if ( not ) {
|
695 |
+
filter = filter.slice(1);
|
696 |
+
}
|
697 |
+
|
698 |
+
if ( name.indexOf(filter) !== -1 ) {
|
699 |
+
return !not;
|
700 |
+
}
|
701 |
+
|
702 |
+
if ( not ) {
|
703 |
+
run = true;
|
704 |
+
}
|
705 |
+
}
|
706 |
+
|
707 |
+
return run;
|
708 |
+
}
|
709 |
+
|
710 |
+
// so far supports only Firefox, Chrome and Opera (buggy)
|
711 |
+
// could be extended in the future to use something like https://github.com/csnover/TraceKit
|
712 |
+
function sourceFromStacktrace() {
|
713 |
+
try {
|
714 |
+
throw new Error();
|
715 |
+
} catch ( e ) {
|
716 |
+
if (e.stacktrace) {
|
717 |
+
// Opera
|
718 |
+
return e.stacktrace.split("\n")[6];
|
719 |
+
} else if (e.stack) {
|
720 |
+
// Firefox, Chrome
|
721 |
+
return e.stack.split("\n")[4];
|
722 |
+
}
|
723 |
+
}
|
724 |
+
}
|
725 |
+
|
726 |
+
function resultDisplayStyle(passed) {
|
727 |
+
return passed && id("qunit-filter-pass") && id("qunit-filter-pass").checked ? 'none' : '';
|
728 |
+
}
|
729 |
+
|
730 |
+
function escapeHtml(s) {
|
731 |
+
if (!s) {
|
732 |
+
return "";
|
733 |
+
}
|
734 |
+
s = s + "";
|
735 |
+
return s.replace(/[\&"<>\\]/g, function(s) {
|
736 |
+
switch(s) {
|
737 |
+
case "&": return "&";
|
738 |
+
case "\\": return "\\\\";
|
739 |
+
case '"': return '\"';
|
740 |
+
case "<": return "<";
|
741 |
+
case ">": return ">";
|
742 |
+
default: return s;
|
743 |
+
}
|
744 |
+
});
|
745 |
+
}
|
746 |
+
|
747 |
+
function synchronize( callback ) {
|
748 |
+
config.queue.push( callback );
|
749 |
+
|
750 |
+
if ( config.autorun && !config.blocking ) {
|
751 |
+
process();
|
752 |
+
}
|
753 |
+
}
|
754 |
+
|
755 |
+
function process() {
|
756 |
+
var start = (new Date()).getTime();
|
757 |
+
|
758 |
+
while ( config.queue.length && !config.blocking ) {
|
759 |
+
if ( config.updateRate <= 0 || (((new Date()).getTime() - start) < config.updateRate) ) {
|
760 |
+
config.queue.shift()();
|
761 |
+
} else {
|
762 |
+
window.setTimeout( process, 13 );
|
763 |
+
break;
|
764 |
+
}
|
765 |
+
}
|
766 |
+
if (!config.blocking && !config.queue.length) {
|
767 |
+
done();
|
768 |
+
}
|
769 |
+
}
|
770 |
+
|
771 |
+
function saveGlobal() {
|
772 |
+
config.pollution = [];
|
773 |
+
|
774 |
+
if ( config.noglobals ) {
|
775 |
+
for ( var key in window ) {
|
776 |
+
config.pollution.push( key );
|
777 |
+
}
|
778 |
+
}
|
779 |
+
}
|
780 |
+
|
781 |
+
function checkPollution( name ) {
|
782 |
+
var old = config.pollution;
|
783 |
+
saveGlobal();
|
784 |
+
|
785 |
+
var newGlobals = diff( old, config.pollution );
|
786 |
+
if ( newGlobals.length > 0 ) {
|
787 |
+
ok( false, "Introduced global variable(s): " + newGlobals.join(", ") );
|
788 |
+
config.current.expected++;
|
789 |
+
}
|
790 |
+
|
791 |
+
var deletedGlobals = diff( config.pollution, old );
|
792 |
+
if ( deletedGlobals.length > 0 ) {
|
793 |
+
ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") );
|
794 |
+
config.current.expected++;
|
795 |
+
}
|
796 |
+
}
|
797 |
+
|
798 |
+
// returns a new Array with the elements that are in a but not in b
|
799 |
+
function diff( a, b ) {
|
800 |
+
var result = a.slice();
|
801 |
+
for ( var i = 0; i < result.length; i++ ) {
|
802 |
+
for ( var j = 0; j < b.length; j++ ) {
|
803 |
+
if ( result[i] === b[j] ) {
|
804 |
+
result.splice(i, 1);
|
805 |
+
i--;
|
806 |
+
break;
|
807 |
+
}
|
808 |
+
}
|
809 |
+
}
|
810 |
+
return result;
|
811 |
+
}
|
812 |
+
|
813 |
+
function fail(message, exception, callback) {
|
814 |
+
if ( typeof console !== "undefined" && console.error && console.warn ) {
|
815 |
+
console.error(message);
|
816 |
+
console.error(exception);
|
817 |
+
console.warn(callback.toString());
|
818 |
+
|
819 |
+
} else if ( window.opera && opera.postError ) {
|
820 |
+
opera.postError(message, exception, callback.toString);
|
821 |
+
}
|
822 |
+
}
|
823 |
+
|
824 |
+
function extend(a, b) {
|
825 |
+
for ( var prop in b ) {
|
826 |
+
a[prop] = b[prop];
|
827 |
+
}
|
828 |
+
|
829 |
+
return a;
|
830 |
+
}
|
831 |
+
|
832 |
+
function addEvent(elem, type, fn) {
|
833 |
+
if ( elem.addEventListener ) {
|
834 |
+
elem.addEventListener( type, fn, false );
|
835 |
+
} else if ( elem.attachEvent ) {
|
836 |
+
elem.attachEvent( "on" + type, fn );
|
837 |
+
} else {
|
838 |
+
fn();
|
839 |
+
}
|
840 |
+
}
|
841 |
+
|
842 |
+
function id(name) {
|
843 |
+
return !!(typeof document !== "undefined" && document && document.getElementById) &&
|
844 |
+
document.getElementById( name );
|
845 |
+
}
|
846 |
+
|
847 |
+
// Test for equality any JavaScript type.
|
848 |
+
// Discussions and reference: http://philrathe.com/articles/equiv
|
849 |
+
// Test suites: http://philrathe.com/tests/equiv
|
850 |
+
// Author: Philippe Rathé <prathe@gmail.com>
|
851 |
+
QUnit.equiv = function () {
|
852 |
+
|
853 |
+
var innerEquiv; // the real equiv function
|
854 |
+
var callers = []; // stack to decide between skip/abort functions
|
855 |
+
var parents = []; // stack to avoiding loops from circular referencing
|
856 |
+
|
857 |
+
// Call the o related callback with the given arguments.
|
858 |
+
function bindCallbacks(o, callbacks, args) {
|
859 |
+
var prop = QUnit.objectType(o);
|
860 |
+
if (prop) {
|
861 |
+
if (QUnit.objectType(callbacks[prop]) === "function") {
|
862 |
+
return callbacks[prop].apply(callbacks, args);
|
863 |
+
} else {
|
864 |
+
return callbacks[prop]; // or undefined
|
865 |
+
}
|
866 |
+
}
|
867 |
+
}
|
868 |
+
|
869 |
+
var callbacks = function () {
|
870 |
+
|
871 |
+
// for string, boolean, number and null
|
872 |
+
function useStrictEquality(b, a) {
|
873 |
+
if (b instanceof a.constructor || a instanceof b.constructor) {
|
874 |
+
// to catch short annotaion VS 'new' annotation of a declaration
|
875 |
+
// e.g. var i = 1;
|
876 |
+
// var j = new Number(1);
|
877 |
+
return a == b;
|
878 |
+
} else {
|
879 |
+
return a === b;
|
880 |
+
}
|
881 |
+
}
|
882 |
+
|
883 |
+
return {
|
884 |
+
"string": useStrictEquality,
|
885 |
+
"boolean": useStrictEquality,
|
886 |
+
"number": useStrictEquality,
|
887 |
+
"null": useStrictEquality,
|
888 |
+
"undefined": useStrictEquality,
|
889 |
+
|
890 |
+
"nan": function (b) {
|
891 |
+
return isNaN(b);
|
892 |
+
},
|
893 |
+
|
894 |
+
"date": function (b, a) {
|
895 |
+
return QUnit.objectType(b) === "date" && a.valueOf() === b.valueOf();
|
896 |
+
},
|
897 |
+
|
898 |
+
"regexp": function (b, a) {
|
899 |
+
return QUnit.objectType(b) === "regexp" &&
|
900 |
+
a.source === b.source && // the regex itself
|
901 |
+
a.global === b.global && // and its modifers (gmi) ...
|
902 |
+
a.ignoreCase === b.ignoreCase &&
|
903 |
+
a.multiline === b.multiline;
|
904 |
+
},
|
905 |
+
|
906 |
+
// - skip when the property is a method of an instance (OOP)
|
907 |
+
// - abort otherwise,
|
908 |
+
// initial === would have catch identical references anyway
|
909 |
+
"function": function () {
|
910 |
+
var caller = callers[callers.length - 1];
|
911 |
+
return caller !== Object &&
|
912 |
+
typeof caller !== "undefined";
|
913 |
+
},
|
914 |
+
|
915 |
+
"array": function (b, a) {
|
916 |
+
var i, j, loop;
|
917 |
+
var len;
|
918 |
+
|
919 |
+
// b could be an object literal here
|
920 |
+
if ( ! (QUnit.objectType(b) === "array")) {
|
921 |
+
return false;
|
922 |
+
}
|
923 |
+
|
924 |
+
len = a.length;
|
925 |
+
if (len !== b.length) { // safe and faster
|
926 |
+
return false;
|
927 |
+
}
|
928 |
+
|
929 |
+
//track reference to avoid circular references
|
930 |
+
parents.push(a);
|
931 |
+
for (i = 0; i < len; i++) {
|
932 |
+
loop = false;
|
933 |
+
for(j=0;j<parents.length;j++){
|
934 |
+
if(parents[j] === a[i]){
|
935 |
+
loop = true;//dont rewalk array
|
936 |
+
}
|
937 |
+
}
|
938 |
+
if (!loop && ! innerEquiv(a[i], b[i])) {
|
939 |
+
parents.pop();
|
940 |
+
return false;
|
941 |
+
}
|
942 |
+
}
|
943 |
+
parents.pop();
|
944 |
+
return true;
|
945 |
+
},
|
946 |
+
|
947 |
+
"object": function (b, a) {
|
948 |
+
var i, j, loop;
|
949 |
+
var eq = true; // unless we can proove it
|
950 |
+
var aProperties = [], bProperties = []; // collection of strings
|
951 |
+
|
952 |
+
// comparing constructors is more strict than using instanceof
|
953 |
+
if ( a.constructor !== b.constructor) {
|
954 |
+
return false;
|
955 |
+
}
|
956 |
+
|
957 |
+
// stack constructor before traversing properties
|
958 |
+
callers.push(a.constructor);
|
959 |
+
//track reference to avoid circular references
|
960 |
+
parents.push(a);
|
961 |
+
|
962 |
+
for (i in a) { // be strict: don't ensures hasOwnProperty and go deep
|
963 |
+
loop = false;
|
964 |
+
for(j=0;j<parents.length;j++){
|
965 |
+
if(parents[j] === a[i])
|
966 |
+
loop = true; //don't go down the same path twice
|
967 |
+
}
|
968 |
+
aProperties.push(i); // collect a's properties
|
969 |
+
|
970 |
+
if (!loop && ! innerEquiv(a[i], b[i])) {
|
971 |
+
eq = false;
|
972 |
+
break;
|
973 |
+
}
|
974 |
+
}
|
975 |
+
|
976 |
+
callers.pop(); // unstack, we are done
|
977 |
+
parents.pop();
|
978 |
+
|
979 |
+
for (i in b) {
|
980 |
+
bProperties.push(i); // collect b's properties
|
981 |
+
}
|
982 |
+
|
983 |
+
// Ensures identical properties name
|
984 |
+
return eq && innerEquiv(aProperties.sort(), bProperties.sort());
|
985 |
+
}
|
986 |
+
};
|
987 |
+
}();
|
988 |
+
|
989 |
+
innerEquiv = function () { // can take multiple arguments
|
990 |
+
var args = Array.prototype.slice.apply(arguments);
|
991 |
+
if (args.length < 2) {
|
992 |
+
return true; // end transition
|
993 |
+
}
|
994 |
+
|
995 |
+
return (function (a, b) {
|
996 |
+
if (a === b) {
|
997 |
+
return true; // catch the most you can
|
998 |
+
} else if (a === null || b === null || typeof a === "undefined" || typeof b === "undefined" || QUnit.objectType(a) !== QUnit.objectType(b)) {
|
999 |
+
return false; // don't lose time with error prone cases
|
1000 |
+
} else {
|
1001 |
+
return bindCallbacks(a, callbacks, [b, a]);
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
// apply transition with (1..n) arguments
|
1005 |
+
})(args[0], args[1]) && arguments.callee.apply(this, args.splice(1, args.length -1));
|
1006 |
+
};
|
1007 |
+
|
1008 |
+
return innerEquiv;
|
1009 |
+
|
1010 |
+
}();
|
1011 |
+
|
1012 |
+
/**
|
1013 |
+
* jsDump
|
1014 |
+
* Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
|
1015 |
+
* Licensed under BSD (http://www.opensource.org/licenses/bsd-license.php)
|
1016 |
+
* Date: 5/15/2008
|
1017 |
+
* @projectDescription Advanced and extensible data dumping for Javascript.
|
1018 |
+
* @version 1.0.0
|
1019 |
+
* @author Ariel Flesler
|
1020 |
+
* @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
|
1021 |
+
*/
|
1022 |
+
QUnit.jsDump = (function() {
|
1023 |
+
function quote( str ) {
|
1024 |
+
return '"' + str.toString().replace(/"/g, '\\"') + '"';
|
1025 |
+
};
|
1026 |
+
function literal( o ) {
|
1027 |
+
return o + '';
|
1028 |
+
};
|
1029 |
+
function join( pre, arr, post ) {
|
1030 |
+
var s = jsDump.separator(),
|
1031 |
+
base = jsDump.indent(),
|
1032 |
+
inner = jsDump.indent(1);
|
1033 |
+
if ( arr.join )
|
1034 |
+
arr = arr.join( ',' + s + inner );
|
1035 |
+
if ( !arr )
|
1036 |
+
return pre + post;
|
1037 |
+
return [ pre, inner + arr, base + post ].join(s);
|
1038 |
+
};
|
1039 |
+
function array( arr ) {
|
1040 |
+
var i = arr.length, ret = Array(i);
|
1041 |
+
this.up();
|
1042 |
+
while ( i-- )
|
1043 |
+
ret[i] = this.parse( arr[i] );
|
1044 |
+
this.down();
|
1045 |
+
return join( '[', ret, ']' );
|
1046 |
+
};
|
1047 |
+
|
1048 |
+
var reName = /^function (\w+)/;
|
1049 |
+
|
1050 |
+
var jsDump = {
|
1051 |
+
parse:function( obj, type ) { //type is used mostly internally, you can fix a (custom)type in advance
|
1052 |
+
var parser = this.parsers[ type || this.typeOf(obj) ];
|
1053 |
+
type = typeof parser;
|
1054 |
+
|
1055 |
+
return type == 'function' ? parser.call( this, obj ) :
|
1056 |
+
type == 'string' ? parser :
|
1057 |
+
this.parsers.error;
|
1058 |
+
},
|
1059 |
+
typeOf:function( obj ) {
|
1060 |
+
var type;
|
1061 |
+
if ( obj === null ) {
|
1062 |
+
type = "null";
|
1063 |
+
} else if (typeof obj === "undefined") {
|
1064 |
+
type = "undefined";
|
1065 |
+
} else if (QUnit.is("RegExp", obj)) {
|
1066 |
+
type = "regexp";
|
1067 |
+
} else if (QUnit.is("Date", obj)) {
|
1068 |
+
type = "date";
|
1069 |
+
} else if (QUnit.is("Function", obj)) {
|
1070 |
+
type = "function";
|
1071 |
+
} else if (typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined") {
|
1072 |
+
type = "window";
|
1073 |
+
} else if (obj.nodeType === 9) {
|
1074 |
+
type = "document";
|
1075 |
+
} else if (obj.nodeType) {
|
1076 |
+
type = "node";
|
1077 |
+
} else if (typeof obj === "object" && typeof obj.length === "number" && obj.length >= 0) {
|
1078 |
+
type = "array";
|
1079 |
+
} else {
|
1080 |
+
type = typeof obj;
|
1081 |
+
}
|
1082 |
+
return type;
|
1083 |
+
},
|
1084 |
+
separator:function() {
|
1085 |
+
return this.multiline ? this.HTML ? '<br />' : '\n' : this.HTML ? ' ' : ' ';
|
1086 |
+
},
|
1087 |
+
indent:function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
|
1088 |
+
if ( !this.multiline )
|
1089 |
+
return '';
|
1090 |
+
var chr = this.indentChar;
|
1091 |
+
if ( this.HTML )
|
1092 |
+
chr = chr.replace(/\t/g,' ').replace(/ /g,' ');
|
1093 |
+
return Array( this._depth_ + (extra||0) ).join(chr);
|
1094 |
+
},
|
1095 |
+
up:function( a ) {
|
1096 |
+
this._depth_ += a || 1;
|
1097 |
+
},
|
1098 |
+
down:function( a ) {
|
1099 |
+
this._depth_ -= a || 1;
|
1100 |
+
},
|
1101 |
+
setParser:function( name, parser ) {
|
1102 |
+
this.parsers[name] = parser;
|
1103 |
+
},
|
1104 |
+
// The next 3 are exposed so you can use them
|
1105 |
+
quote:quote,
|
1106 |
+
literal:literal,
|
1107 |
+
join:join,
|
1108 |
+
//
|
1109 |
+
_depth_: 1,
|
1110 |
+
// This is the list of parsers, to modify them, use jsDump.setParser
|
1111 |
+
parsers:{
|
1112 |
+
window: '[Window]',
|
1113 |
+
document: '[Document]',
|
1114 |
+
error:'[ERROR]', //when no parser is found, shouldn't happen
|
1115 |
+
unknown: '[Unknown]',
|
1116 |
+
'null':'null',
|
1117 |
+
undefined:'undefined',
|
1118 |
+
'function':function( fn ) {
|
1119 |
+
var ret = 'function',
|
1120 |
+
name = 'name' in fn ? fn.name : (reName.exec(fn)||[])[1];//functions never have name in IE
|
1121 |
+
if ( name )
|
1122 |
+
ret += ' ' + name;
|
1123 |
+
ret += '(';
|
1124 |
+
|
1125 |
+
ret = [ ret, QUnit.jsDump.parse( fn, 'functionArgs' ), '){'].join('');
|
1126 |
+
return join( ret, QUnit.jsDump.parse(fn,'functionCode'), '}' );
|
1127 |
+
},
|
1128 |
+
array: array,
|
1129 |
+
nodelist: array,
|
1130 |
+
arguments: array,
|
1131 |
+
object:function( map ) {
|
1132 |
+
var ret = [ ];
|
1133 |
+
QUnit.jsDump.up();
|
1134 |
+
for ( var key in map )
|
1135 |
+
ret.push( QUnit.jsDump.parse(key,'key') + ': ' + QUnit.jsDump.parse(map[key]) );
|
1136 |
+
QUnit.jsDump.down();
|
1137 |
+
return join( '{', ret, '}' );
|
1138 |
+
},
|
1139 |
+
node:function( node ) {
|
1140 |
+
var open = QUnit.jsDump.HTML ? '<' : '<',
|
1141 |
+
close = QUnit.jsDump.HTML ? '>' : '>';
|
1142 |
+
|
1143 |
+
var tag = node.nodeName.toLowerCase(),
|
1144 |
+
ret = open + tag;
|
1145 |
+
|
1146 |
+
for ( var a in QUnit.jsDump.DOMAttrs ) {
|
1147 |
+
var val = node[QUnit.jsDump.DOMAttrs[a]];
|
1148 |
+
if ( val )
|
1149 |
+
ret += ' ' + a + '=' + QUnit.jsDump.parse( val, 'attribute' );
|
1150 |
+
}
|
1151 |
+
return ret + close + open + '/' + tag + close;
|
1152 |
+
},
|
1153 |
+
functionArgs:function( fn ) {//function calls it internally, it's the arguments part of the function
|
1154 |
+
var l = fn.length;
|
1155 |
+
if ( !l ) return '';
|
1156 |
+
|
1157 |
+
var args = Array(l);
|
1158 |
+
while ( l-- )
|
1159 |
+
args[l] = String.fromCharCode(97+l);//97 is 'a'
|
1160 |
+
return ' ' + args.join(', ') + ' ';
|
1161 |
+
},
|
1162 |
+
key:quote, //object calls it internally, the key part of an item in a map
|
1163 |
+
functionCode:'[code]', //function calls it internally, it's the content of the function
|
1164 |
+
attribute:quote, //node calls it internally, it's an html attribute value
|
1165 |
+
string:quote,
|
1166 |
+
date:quote,
|
1167 |
+
regexp:literal, //regex
|
1168 |
+
number:literal,
|
1169 |
+
'boolean':literal
|
1170 |
+
},
|
1171 |
+
DOMAttrs:{//attributes to dump from nodes, name=>realName
|
1172 |
+
id:'id',
|
1173 |
+
name:'name',
|
1174 |
+
'class':'className'
|
1175 |
+
},
|
1176 |
+
HTML:false,//if true, entities are escaped ( <, >, \t, space and \n )
|
1177 |
+
indentChar:' ',//indentation unit
|
1178 |
+
multiline:true //if true, items in a collection, are separated by a \n, else just a space.
|
1179 |
+
};
|
1180 |
+
|
1181 |
+
return jsDump;
|
1182 |
+
})();
|
1183 |
+
|
1184 |
+
// from Sizzle.js
|
1185 |
+
function getText( elems ) {
|
1186 |
+
var ret = "", elem;
|
1187 |
+
|
1188 |
+
for ( var i = 0; elems[i]; i++ ) {
|
1189 |
+
elem = elems[i];
|
1190 |
+
|
1191 |
+
// Get the text from text nodes and CDATA nodes
|
1192 |
+
if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
|
1193 |
+
ret += elem.nodeValue;
|
1194 |
+
|
1195 |
+
// Traverse everything else, except comment nodes
|
1196 |
+
} else if ( elem.nodeType !== 8 ) {
|
1197 |
+
ret += getText( elem.childNodes );
|
1198 |
+
}
|
1199 |
+
}
|
1200 |
+
|
1201 |
+
return ret;
|
1202 |
+
};
|
1203 |
+
|
1204 |
+
/*
|
1205 |
+
* Javascript Diff Algorithm
|
1206 |
+
* By John Resig (http://ejohn.org/)
|
1207 |
+
* Modified by Chu Alan "sprite"
|
1208 |
+
*
|
1209 |
+
* Released under the MIT license.
|
1210 |
+
*
|
1211 |
+
* More Info:
|
1212 |
+
* http://ejohn.org/projects/javascript-diff-algorithm/
|
1213 |
+
*
|
1214 |
+
* Usage: QUnit.diff(expected, actual)
|
1215 |
+
*
|
1216 |
+
* QUnit.diff("the quick brown fox jumped over", "the quick fox jumps over") == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
|
1217 |
+
*/
|
1218 |
+
QUnit.diff = (function() {
|
1219 |
+
function diff(o, n){
|
1220 |
+
var ns = new Object();
|
1221 |
+
var os = new Object();
|
1222 |
+
|
1223 |
+
for (var i = 0; i < n.length; i++) {
|
1224 |
+
if (ns[n[i]] == null)
|
1225 |
+
ns[n[i]] = {
|
1226 |
+
rows: new Array(),
|
1227 |
+
o: null
|
1228 |
+
};
|
1229 |
+
ns[n[i]].rows.push(i);
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
for (var i = 0; i < o.length; i++) {
|
1233 |
+
if (os[o[i]] == null)
|
1234 |
+
os[o[i]] = {
|
1235 |
+
rows: new Array(),
|
1236 |
+
n: null
|
1237 |
+
};
|
1238 |
+
os[o[i]].rows.push(i);
|
1239 |
+
}
|
1240 |
+
|
1241 |
+
for (var i in ns) {
|
1242 |
+
if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) {
|
1243 |
+
n[ns[i].rows[0]] = {
|
1244 |
+
text: n[ns[i].rows[0]],
|
1245 |
+
row: os[i].rows[0]
|
1246 |
+
};
|
1247 |
+
o[os[i].rows[0]] = {
|
1248 |
+
text: o[os[i].rows[0]],
|
1249 |
+
row: ns[i].rows[0]
|
1250 |
+
};
|
1251 |
+
}
|
1252 |
+
}
|
1253 |
+
|
1254 |
+
for (var i = 0; i < n.length - 1; i++) {
|
1255 |
+
if (n[i].text != null && n[i + 1].text == null && n[i].row + 1 < o.length && o[n[i].row + 1].text == null &&
|
1256 |
+
n[i + 1] == o[n[i].row + 1]) {
|
1257 |
+
n[i + 1] = {
|
1258 |
+
text: n[i + 1],
|
1259 |
+
row: n[i].row + 1
|
1260 |
+
};
|
1261 |
+
o[n[i].row + 1] = {
|
1262 |
+
text: o[n[i].row + 1],
|
1263 |
+
row: i + 1
|
1264 |
+
};
|
1265 |
+
}
|
1266 |
+
}
|
1267 |
+
|
1268 |
+
for (var i = n.length - 1; i > 0; i--) {
|
1269 |
+
if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null &&
|
1270 |
+
n[i - 1] == o[n[i].row - 1]) {
|
1271 |
+
n[i - 1] = {
|
1272 |
+
text: n[i - 1],
|
1273 |
+
row: n[i].row - 1
|
1274 |
+
};
|
1275 |
+
o[n[i].row - 1] = {
|
1276 |
+
text: o[n[i].row - 1],
|
1277 |
+
row: i - 1
|
1278 |
+
};
|
1279 |
+
}
|
1280 |
+
}
|
1281 |
+
|
1282 |
+
return {
|
1283 |
+
o: o,
|
1284 |
+
n: n
|
1285 |
+
};
|
1286 |
+
}
|
1287 |
+
|
1288 |
+
return function(o, n){
|
1289 |
+
o = o.replace(/\s+$/, '');
|
1290 |
+
n = n.replace(/\s+$/, '');
|
1291 |
+
var out = diff(o == "" ? [] : o.split(/\s+/), n == "" ? [] : n.split(/\s+/));
|
1292 |
+
|
1293 |
+
var str = "";
|
1294 |
+
|
1295 |
+
var oSpace = o.match(/\s+/g);
|
1296 |
+
if (oSpace == null) {
|
1297 |
+
oSpace = [" "];
|
1298 |
+
}
|
1299 |
+
else {
|
1300 |
+
oSpace.push(" ");
|
1301 |
+
}
|
1302 |
+
var nSpace = n.match(/\s+/g);
|
1303 |
+
if (nSpace == null) {
|
1304 |
+
nSpace = [" "];
|
1305 |
+
}
|
1306 |
+
else {
|
1307 |
+
nSpace.push(" ");
|
1308 |
+
}
|
1309 |
+
|
1310 |
+
if (out.n.length == 0) {
|
1311 |
+
for (var i = 0; i < out.o.length; i++) {
|
1312 |
+
str += '<del>' + out.o[i] + oSpace[i] + "</del>";
|
1313 |
+
}
|
1314 |
+
}
|
1315 |
+
else {
|
1316 |
+
if (out.n[0].text == null) {
|
1317 |
+
for (n = 0; n < out.o.length && out.o[n].text == null; n++) {
|
1318 |
+
str += '<del>' + out.o[n] + oSpace[n] + "</del>";
|
1319 |
+
}
|
1320 |
+
}
|
1321 |
+
|
1322 |
+
for (var i = 0; i < out.n.length; i++) {
|
1323 |
+
if (out.n[i].text == null) {
|
1324 |
+
str += '<ins>' + out.n[i] + nSpace[i] + "</ins>";
|
1325 |
+
}
|
1326 |
+
else {
|
1327 |
+
var pre = "";
|
1328 |
+
|
1329 |
+
for (n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++) {
|
1330 |
+
pre += '<del>' + out.o[n] + oSpace[n] + "</del>";
|
1331 |
+
}
|
1332 |
+
str += " " + out.n[i].text + nSpace[i] + pre;
|
1333 |
+
}
|
1334 |
+
}
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
return str;
|
1338 |
+
};
|
1339 |
+
})();
|
1340 |
+
|
1341 |
+
})(this);
|
3.7.8/lib/sprintf-0.7-beta1.js
ADDED
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
sprintf() for JavaScript 0.7-beta1
|
3 |
+
http://www.diveintojavascript.com/projects/javascript-sprintf
|
4 |
+
|
5 |
+
Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
|
6 |
+
All rights reserved.
|
7 |
+
|
8 |
+
Redistribution and use in source and binary forms, with or without
|
9 |
+
modification, are permitted provided that the following conditions are met:
|
10 |
+
* Redistributions of source code must retain the above copyright
|
11 |
+
notice, this list of conditions and the following disclaimer.
|
12 |
+
* Redistributions in binary form must reproduce the above copyright
|
13 |
+
notice, this list of conditions and the following disclaimer in the
|
14 |
+
documentation and/or other materials provided with the distribution.
|
15 |
+
* Neither the name of sprintf() for JavaScript nor the
|
16 |
+
names of its contributors may be used to endorse or promote products
|
17 |
+
derived from this software without specific prior written permission.
|
18 |
+
|
19 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
20 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
22 |
+
DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
|
23 |
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
24 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
25 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
26 |
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
28 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29 |
+
|
30 |
+
|
31 |
+
Changelog:
|
32 |
+
2010.09.06 - 0.7-beta1
|
33 |
+
- features: vsprintf, support for named placeholders
|
34 |
+
- enhancements: format cache, reduced global namespace pollution
|
35 |
+
|
36 |
+
2010.05.22 - 0.6:
|
37 |
+
- reverted to 0.4 and fixed the bug regarding the sign of the number 0
|
38 |
+
Note:
|
39 |
+
Thanks to Raphael Pigulla <raph (at] n3rd [dot) org> (http://www.n3rd.org/)
|
40 |
+
who warned me about a bug in 0.5, I discovered that the last update was
|
41 |
+
a regress. I appologize for that.
|
42 |
+
|
43 |
+
2010.05.09 - 0.5:
|
44 |
+
- bug fix: 0 is now preceeded with a + sign
|
45 |
+
- bug fix: the sign was not at the right position on padded results (Kamal Abdali)
|
46 |
+
- switched from GPL to BSD license
|
47 |
+
|
48 |
+
2007.10.21 - 0.4:
|
49 |
+
- unit test and patch (David Baird)
|
50 |
+
|
51 |
+
2007.09.17 - 0.3:
|
52 |
+
- bug fix: no longer throws exception on empty paramenters (Hans Pufal)
|
53 |
+
|
54 |
+
2007.09.11 - 0.2:
|
55 |
+
- feature: added argument swapping
|
56 |
+
|
57 |
+
2007.04.03 - 0.1:
|
58 |
+
- initial release
|
59 |
+
**/
|
60 |
+
|
61 |
+
var sprintf = (function() {
|
62 |
+
function get_type(variable) {
|
63 |
+
return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase();
|
64 |
+
}
|
65 |
+
function str_repeat(input, multiplier) {
|
66 |
+
for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */}
|
67 |
+
return output.join('');
|
68 |
+
}
|
69 |
+
|
70 |
+
var str_format = function() {
|
71 |
+
if (!str_format.cache.hasOwnProperty(arguments[0])) {
|
72 |
+
str_format.cache[arguments[0]] = str_format.parse(arguments[0]);
|
73 |
+
}
|
74 |
+
return str_format.format.call(null, str_format.cache[arguments[0]], arguments);
|
75 |
+
};
|
76 |
+
|
77 |
+
str_format.format = function(parse_tree, argv) {
|
78 |
+
var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length;
|
79 |
+
for (i = 0; i < tree_length; i++) {
|
80 |
+
node_type = get_type(parse_tree[i]);
|
81 |
+
if (node_type === 'string') {
|
82 |
+
output.push(parse_tree[i]);
|
83 |
+
}
|
84 |
+
else if (node_type === 'array') {
|
85 |
+
match = parse_tree[i]; // convenience purposes only
|
86 |
+
if (match[2]) { // keyword argument
|
87 |
+
arg = argv[cursor];
|
88 |
+
for (k = 0; k < match[2].length; k++) {
|
89 |
+
if (!arg.hasOwnProperty(match[2][k])) {
|
90 |
+
throw(sprintf('[sprintf] property "%s" does not exist', match[2][k]));
|
91 |
+
}
|
92 |
+
arg = arg[match[2][k]];
|
93 |
+
}
|
94 |
+
}
|
95 |
+
else if (match[1]) { // positional argument (explicit)
|
96 |
+
arg = argv[match[1]];
|
97 |
+
}
|
98 |
+
else { // positional argument (implicit)
|
99 |
+
arg = argv[cursor++];
|
100 |
+
}
|
101 |
+
|
102 |
+
if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) {
|
103 |
+
throw(sprintf('[sprintf] expecting number but found %s', get_type(arg)));
|
104 |
+
}
|
105 |
+
switch (match[8]) {
|
106 |
+
case 'b': arg = arg.toString(2); break;
|
107 |
+
case 'c': arg = String.fromCharCode(arg); break;
|
108 |
+
case 'd': arg = parseInt(arg, 10); break;
|
109 |
+
case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break;
|
110 |
+
case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break;
|
111 |
+
case 'o': arg = arg.toString(8); break;
|
112 |
+
case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break;
|
113 |
+
case 'u': arg = Math.abs(arg); break;
|
114 |
+
case 'x': arg = arg.toString(16); break;
|
115 |
+
case 'X': arg = arg.toString(16).toUpperCase(); break;
|
116 |
+
}
|
117 |
+
arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg);
|
118 |
+
pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' ';
|
119 |
+
pad_length = match[6] - String(arg).length;
|
120 |
+
pad = match[6] ? str_repeat(pad_character, pad_length) : '';
|
121 |
+
output.push(match[5] ? arg + pad : pad + arg);
|
122 |
+
}
|
123 |
+
}
|
124 |
+
return output.join('');
|
125 |
+
};
|
126 |
+
|
127 |
+
str_format.cache = {};
|
128 |
+
|
129 |
+
str_format.parse = function(fmt) {
|
130 |
+
var _fmt = fmt, match = [], parse_tree = [], arg_names = 0;
|
131 |
+
while (_fmt) {
|
132 |
+
if ((match = /^[^\x25]+/.exec(_fmt)) !== null) {
|
133 |
+
parse_tree.push(match[0]);
|
134 |
+
}
|
135 |
+
else if ((match = /^\x25{2}/.exec(_fmt)) !== null) {
|
136 |
+
parse_tree.push('%');
|
137 |
+
}
|
138 |
+
else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) {
|
139 |
+
if (match[2]) {
|
140 |
+
arg_names |= 1;
|
141 |
+
var field_list = [], replacement_field = match[2], field_match = [];
|
142 |
+
if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
|
143 |
+
field_list.push(field_match[1]);
|
144 |
+
while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
|
145 |
+
if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
|
146 |
+
field_list.push(field_match[1]);
|
147 |
+
}
|
148 |
+
else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) {
|
149 |
+
field_list.push(field_match[1]);
|
150 |
+
}
|
151 |
+
else {
|
152 |
+
throw('[sprintf] huh?');
|
153 |
+
}
|
154 |
+
}
|
155 |
+
}
|
156 |
+
else {
|
157 |
+
throw('[sprintf] huh?');
|
158 |
+
}
|
159 |
+
match[2] = field_list;
|
160 |
+
}
|
161 |
+
else {
|
162 |
+
arg_names |= 2;
|
163 |
+
}
|
164 |
+
if (arg_names === 3) {
|
165 |
+
throw('[sprintf] mixing positional and named placeholders is not (yet) supported');
|
166 |
+
}
|
167 |
+
parse_tree.push(match);
|
168 |
+
}
|
169 |
+
else {
|
170 |
+
throw('[sprintf] huh?');
|
171 |
+
}
|
172 |
+
_fmt = _fmt.substring(match[0].length);
|
173 |
+
}
|
174 |
+
return parse_tree;
|
175 |
+
};
|
176 |
+
|
177 |
+
return str_format;
|
178 |
+
})();
|
179 |
+
|
180 |
+
var vsprintf = function(fmt, argv) {
|
181 |
+
argv.unshift(fmt);
|
182 |
+
return sprintf.apply(null, argv);
|
183 |
+
};
|
3.7.8/lib/timePicker.css
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
div.time-picker {
|
2 |
+
position: absolute;
|
3 |
+
height: 200px;
|
4 |
+
width:6em; /* needed for IE */
|
5 |
+
overflow: auto;
|
6 |
+
background: #fff;
|
7 |
+
border: 1px solid #000;
|
8 |
+
z-index: 99;
|
9 |
+
}
|
10 |
+
div.time-picker-12hours {
|
11 |
+
width:8em; /* needed for IE */
|
12 |
+
}
|
13 |
+
|
14 |
+
div.time-picker ul {
|
15 |
+
list-style-type: none;
|
16 |
+
margin: 0;
|
17 |
+
padding: 0;
|
18 |
+
}
|
19 |
+
div.time-picker li {
|
20 |
+
padding: 1px;
|
21 |
+
cursor: pointer;
|
22 |
+
}
|
23 |
+
div.time-picker li.selected {
|
24 |
+
background: #316AC5;
|
25 |
+
color: #fff;
|
26 |
+
}
|
3.7.8/lib/tools.scrollable-1.1.2.js
ADDED
@@ -0,0 +1,439 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* tools.scrollable 1.1.2 - Scroll your HTML with eye candy.
|
3 |
+
*
|
4 |
+
* Copyright (c) 2009 Tero Piirainen
|
5 |
+
* http://flowplayer.org/tools/scrollable.html
|
6 |
+
*
|
7 |
+
* Dual licensed under MIT and GPL 2+ licenses
|
8 |
+
* http://www.opensource.org/licenses
|
9 |
+
*
|
10 |
+
* Launch : March 2008
|
11 |
+
* Date: jQuery{date}
|
12 |
+
* Revision: jQuery{revision}
|
13 |
+
*/
|
14 |
+
(function(jQuery) {
|
15 |
+
|
16 |
+
// static constructs
|
17 |
+
jQuery.tools = jQuery.tools || {};
|
18 |
+
|
19 |
+
jQuery.tools.scrollable = {
|
20 |
+
version: '1.1.2',
|
21 |
+
|
22 |
+
conf: {
|
23 |
+
|
24 |
+
// basics
|
25 |
+
size: 5,
|
26 |
+
vertical: false,
|
27 |
+
speed: 400,
|
28 |
+
keyboard: true,
|
29 |
+
|
30 |
+
// by default this is the same as size
|
31 |
+
keyboardSteps: null,
|
32 |
+
|
33 |
+
// other
|
34 |
+
disabledClass: 'disabled',
|
35 |
+
hoverClass: null,
|
36 |
+
clickable: true,
|
37 |
+
activeClass: 'active',
|
38 |
+
easing: 'swing',
|
39 |
+
loop: false,
|
40 |
+
|
41 |
+
items: '.items',
|
42 |
+
item: null,
|
43 |
+
|
44 |
+
// navigational elements
|
45 |
+
prev: '.prev',
|
46 |
+
next: '.next',
|
47 |
+
prevPage: '.prevPage',
|
48 |
+
nextPage: '.nextPage',
|
49 |
+
api: false
|
50 |
+
|
51 |
+
// CALLBACKS: onBeforeSeek, onSeek, onReload
|
52 |
+
}
|
53 |
+
};
|
54 |
+
|
55 |
+
var current;
|
56 |
+
|
57 |
+
// constructor
|
58 |
+
function Scrollable(root, conf) {
|
59 |
+
|
60 |
+
// current instance
|
61 |
+
var self = this, jQueryself = jQuery(this),
|
62 |
+
horizontal = !conf.vertical,
|
63 |
+
wrap = root.children(),
|
64 |
+
index = 0,
|
65 |
+
forward;
|
66 |
+
|
67 |
+
|
68 |
+
if (!current) { current = self; }
|
69 |
+
|
70 |
+
// bind all callbacks from configuration
|
71 |
+
jQuery.each(conf, function(name, fn) {
|
72 |
+
if (jQuery.isFunction(fn)) { jQueryself.bind(name, fn); }
|
73 |
+
});
|
74 |
+
|
75 |
+
if (wrap.length > 1) { wrap = jQuery(conf.items, root); }
|
76 |
+
|
77 |
+
// navigational items can be anywhere when globalNav = true
|
78 |
+
function find(query) {
|
79 |
+
var els = jQuery(query);
|
80 |
+
return conf.globalNav ? els : root.parent().find(query);
|
81 |
+
}
|
82 |
+
|
83 |
+
// to be used by plugins
|
84 |
+
root.data("finder", find);
|
85 |
+
|
86 |
+
// get handle to navigational elements
|
87 |
+
var prev = find(conf.prev),
|
88 |
+
next = find(conf.next),
|
89 |
+
prevPage = find(conf.prevPage),
|
90 |
+
nextPage = find(conf.nextPage);
|
91 |
+
|
92 |
+
|
93 |
+
// methods
|
94 |
+
jQuery.extend(self, {
|
95 |
+
|
96 |
+
getIndex: function() {
|
97 |
+
return index;
|
98 |
+
},
|
99 |
+
|
100 |
+
getClickIndex: function() {
|
101 |
+
var items = self.getItems();
|
102 |
+
return items.index(items.filter("." + conf.activeClass));
|
103 |
+
},
|
104 |
+
|
105 |
+
getConf: function() {
|
106 |
+
return conf;
|
107 |
+
},
|
108 |
+
|
109 |
+
getSize: function() {
|
110 |
+
return self.getItems().length;
|
111 |
+
},
|
112 |
+
|
113 |
+
getPageAmount: function() {
|
114 |
+
return Math.ceil(this.getSize() / conf.size);
|
115 |
+
},
|
116 |
+
|
117 |
+
getPageIndex: function() {
|
118 |
+
return Math.ceil(index / conf.size);
|
119 |
+
},
|
120 |
+
|
121 |
+
getNaviButtons: function() {
|
122 |
+
return prev.add(next).add(prevPage).add(nextPage);
|
123 |
+
},
|
124 |
+
|
125 |
+
getRoot: function() {
|
126 |
+
return root;
|
127 |
+
},
|
128 |
+
|
129 |
+
getItemWrap: function() {
|
130 |
+
return wrap;
|
131 |
+
},
|
132 |
+
|
133 |
+
getItems: function() {
|
134 |
+
return wrap.children(conf.item);
|
135 |
+
},
|
136 |
+
|
137 |
+
getVisibleItems: function() {
|
138 |
+
return self.getItems().slice(index, index + conf.size);
|
139 |
+
},
|
140 |
+
|
141 |
+
/* all seeking functions depend on this */
|
142 |
+
seekTo: function(i, time, fn) {
|
143 |
+
|
144 |
+
if (i < 0) { i = 0; }
|
145 |
+
|
146 |
+
// nothing happens
|
147 |
+
if (index === i) { return self; }
|
148 |
+
|
149 |
+
// function given as second argument
|
150 |
+
if (jQuery.isFunction(time)) {
|
151 |
+
fn = time;
|
152 |
+
}
|
153 |
+
|
154 |
+
// seeking exceeds the end
|
155 |
+
if (i > self.getSize() - conf.size) {
|
156 |
+
return conf.loop ? self.begin() : this.end();
|
157 |
+
}
|
158 |
+
|
159 |
+
var item = self.getItems().eq(i);
|
160 |
+
if (!item.length) { return self; }
|
161 |
+
|
162 |
+
// onBeforeSeek
|
163 |
+
var e = jQuery.Event("onBeforeSeek");
|
164 |
+
|
165 |
+
jQueryself.trigger(e, i > index);
|
166 |
+
if (e.isDefaultPrevented()) { return self; }
|
167 |
+
|
168 |
+
// get the (possibly altered) speed
|
169 |
+
if (time === undefined || jQuery.isFunction(time)) { time = conf.speed; }
|
170 |
+
|
171 |
+
function callback() {
|
172 |
+
if (fn) { fn.call(self, i); }
|
173 |
+
jQueryself.trigger("onSeek", [i]);
|
174 |
+
}
|
175 |
+
|
176 |
+
if (horizontal) {
|
177 |
+
wrap.animate({left: -item.position().left}, time, conf.easing, callback);
|
178 |
+
} else {
|
179 |
+
wrap.animate({top: -item.position().top}, time, conf.easing, callback);
|
180 |
+
}
|
181 |
+
|
182 |
+
|
183 |
+
current = self;
|
184 |
+
index = i;
|
185 |
+
|
186 |
+
// onStart
|
187 |
+
e = jQuery.Event("onStart");
|
188 |
+
jQueryself.trigger(e, [i]);
|
189 |
+
if (e.isDefaultPrevented()) { return self; }
|
190 |
+
|
191 |
+
|
192 |
+
/* default behaviour */
|
193 |
+
|
194 |
+
// prev/next buttons disabled flags
|
195 |
+
prev.add(prevPage).toggleClass(conf.disabledClass, i === 0);
|
196 |
+
next.add(nextPage).toggleClass(conf.disabledClass, i >= self.getSize() - conf.size);
|
197 |
+
|
198 |
+
return self;
|
199 |
+
},
|
200 |
+
|
201 |
+
|
202 |
+
move: function(offset, time, fn) {
|
203 |
+
forward = offset > 0;
|
204 |
+
return this.seekTo(index + offset, time, fn);
|
205 |
+
},
|
206 |
+
|
207 |
+
next: function(time, fn) {
|
208 |
+
return this.move(1, time, fn);
|
209 |
+
},
|
210 |
+
|
211 |
+
prev: function(time, fn) {
|
212 |
+
return this.move(-1, time, fn);
|
213 |
+
},
|
214 |
+
|
215 |
+
movePage: function(offset, time, fn) {
|
216 |
+
forward = offset > 0;
|
217 |
+
var steps = conf.size * offset;
|
218 |
+
|
219 |
+
var i = index % conf.size;
|
220 |
+
if (i > 0) {
|
221 |
+
steps += (offset > 0 ? -i : conf.size - i);
|
222 |
+
}
|
223 |
+
|
224 |
+
return this.move(steps, time, fn);
|
225 |
+
},
|
226 |
+
|
227 |
+
prevPage: function(time, fn) {
|
228 |
+
return this.movePage(-1, time, fn);
|
229 |
+
},
|
230 |
+
|
231 |
+
nextPage: function(time, fn) {
|
232 |
+
return this.movePage(1, time, fn);
|
233 |
+
},
|
234 |
+
|
235 |
+
setPage: function(page, time, fn) {
|
236 |
+
return this.seekTo(page * conf.size, time, fn);
|
237 |
+
},
|
238 |
+
|
239 |
+
begin: function(time, fn) {
|
240 |
+
forward = false;
|
241 |
+
return this.seekTo(0, time, fn);
|
242 |
+
},
|
243 |
+
|
244 |
+
end: function(time, fn) {
|
245 |
+
forward = true;
|
246 |
+
var to = this.getSize() - conf.size;
|
247 |
+
return to > 0 ? this.seekTo(to, time, fn) : self;
|
248 |
+
},
|
249 |
+
|
250 |
+
reload: function() {
|
251 |
+
jQueryself.trigger("onReload");
|
252 |
+
return self;
|
253 |
+
},
|
254 |
+
|
255 |
+
focus: function() {
|
256 |
+
current = self;
|
257 |
+
return self;
|
258 |
+
},
|
259 |
+
|
260 |
+
click: function(i) {
|
261 |
+
|
262 |
+
var item = self.getItems().eq(i),
|
263 |
+
klass = conf.activeClass,
|
264 |
+
size = conf.size;
|
265 |
+
|
266 |
+
// check that i is sane
|
267 |
+
if (i < 0 || i >= self.getSize()) { return self; }
|
268 |
+
|
269 |
+
// size == 1
|
270 |
+
if (size == 1) {
|
271 |
+
if (conf.loop) { return self.next(); }
|
272 |
+
|
273 |
+
if (i === 0 || i == self.getSize() -1) {
|
274 |
+
forward = (forward === undefined) ? true : !forward;
|
275 |
+
}
|
276 |
+
return forward === false ? self.prev() : self.next();
|
277 |
+
}
|
278 |
+
|
279 |
+
// size == 2
|
280 |
+
if (size == 2) {
|
281 |
+
if (i == index) { i--; }
|
282 |
+
self.getItems().removeClass(klass);
|
283 |
+
item.addClass(klass);
|
284 |
+
return self.seekTo(i, time, fn);
|
285 |
+
}
|
286 |
+
|
287 |
+
if (!item.hasClass(klass)) {
|
288 |
+
self.getItems().removeClass(klass);
|
289 |
+
item.addClass(klass);
|
290 |
+
var delta = Math.floor(size / 2);
|
291 |
+
var to = i - delta;
|
292 |
+
|
293 |
+
// next to last item must work
|
294 |
+
if (to > self.getSize() - size) {
|
295 |
+
to = self.getSize() - size;
|
296 |
+
}
|
297 |
+
|
298 |
+
if (to !== i) {
|
299 |
+
return self.seekTo(to);
|
300 |
+
}
|
301 |
+
}
|
302 |
+
|
303 |
+
return self;
|
304 |
+
},
|
305 |
+
|
306 |
+
// bind / unbind
|
307 |
+
bind: function(name, fn) {
|
308 |
+
jQueryself.bind(name, fn);
|
309 |
+
return self;
|
310 |
+
},
|
311 |
+
|
312 |
+
unbind: function(name) {
|
313 |
+
jQueryself.unbind(name);
|
314 |
+
return self;
|
315 |
+
}
|
316 |
+
|
317 |
+
});
|
318 |
+
|
319 |
+
// callbacks
|
320 |
+
jQuery.each("onBeforeSeek,onStart,onSeek,onReload".split(","), function(i, ev) {
|
321 |
+
self[ev] = function(fn) {
|
322 |
+
return self.bind(ev, fn);
|
323 |
+
};
|
324 |
+
});
|
325 |
+
|
326 |
+
|
327 |
+
// prev button
|
328 |
+
prev.addClass(conf.disabledClass).click(function() {
|
329 |
+
self.prev();
|
330 |
+
});
|
331 |
+
|
332 |
+
|
333 |
+
// next button
|
334 |
+
next.click(function() {
|
335 |
+
self.next();
|
336 |
+
});
|
337 |
+
|
338 |
+
// prev page button
|
339 |
+
nextPage.click(function() {
|
340 |
+
self.nextPage();
|
341 |
+
});
|
342 |
+
|
343 |
+
if (self.getSize() < conf.size) {
|
344 |
+
next.add(nextPage).addClass(conf.disabledClass);
|
345 |
+
}
|
346 |
+
|
347 |
+
|
348 |
+
// next page button
|
349 |
+
prevPage.addClass(conf.disabledClass).click(function() {
|
350 |
+
self.prevPage();
|
351 |
+
});
|
352 |
+
|
353 |
+
|
354 |
+
// hover
|
355 |
+
var hc = conf.hoverClass, keyId = "keydown." + Math.random().toString().substring(10);
|
356 |
+
|
357 |
+
self.onReload(function() {
|
358 |
+
|
359 |
+
// hovering
|
360 |
+
if (hc) {
|
361 |
+
self.getItems().hover(function() {
|
362 |
+
jQuery(this).addClass(hc);
|
363 |
+
}, function() {
|
364 |
+
jQuery(this).removeClass(hc);
|
365 |
+
});
|
366 |
+
}
|
367 |
+
|
368 |
+
// clickable
|
369 |
+
if (conf.clickable) {
|
370 |
+
self.getItems().each(function(i) {
|
371 |
+
jQuery(this).unbind("click.scrollable").bind("click.scrollable", function(e) {
|
372 |
+
if (jQuery(e.target).is("a")) { return; }
|
373 |
+
return self.click(i);
|
374 |
+
});
|
375 |
+
});
|
376 |
+
}
|
377 |
+
|
378 |
+
// keyboard
|
379 |
+
if (conf.keyboard) {
|
380 |
+
|
381 |
+
// keyboard works on one instance at the time. thus we need to unbind first
|
382 |
+
jQuery(document).unbind(keyId).bind(keyId, function(evt) {
|
383 |
+
|
384 |
+
// do nothing with CTRL / ALT buttons
|
385 |
+
if (evt.altKey || evt.ctrlKey) { return; }
|
386 |
+
|
387 |
+
// do nothing for unstatic and unfocused instances
|
388 |
+
if (conf.keyboard != 'static' && current != self) { return; }
|
389 |
+
|
390 |
+
var s = conf.keyboardSteps;
|
391 |
+
|
392 |
+
if (horizontal && (evt.keyCode == 37 || evt.keyCode == 39)) {
|
393 |
+
self.move(evt.keyCode == 37 ? -s : s);
|
394 |
+
return evt.preventDefault();
|
395 |
+
}
|
396 |
+
|
397 |
+
if (!horizontal && (evt.keyCode == 38 || evt.keyCode == 40)) {
|
398 |
+
self.move(evt.keyCode == 38 ? -s : s);
|
399 |
+
return evt.preventDefault();
|
400 |
+
}
|
401 |
+
|
402 |
+
return true;
|
403 |
+
|
404 |
+
});
|
405 |
+
|
406 |
+
} else {
|
407 |
+
jQuery(document).unbind(keyId);
|
408 |
+
}
|
409 |
+
|
410 |
+
});
|
411 |
+
|
412 |
+
self.reload();
|
413 |
+
|
414 |
+
}
|
415 |
+
|
416 |
+
|
417 |
+
// jQuery plugin implementation
|
418 |
+
jQuery.fn.scrollable = function(conf) {
|
419 |
+
|
420 |
+
// already constructed --> return API
|
421 |
+
var el = this.eq(typeof conf == 'number' ? conf : 0).data("scrollable");
|
422 |
+
if (el) { return el; }
|
423 |
+
|
424 |
+
var globals = jQuery.extend({}, jQuery.tools.scrollable.conf);
|
425 |
+
conf = jQuery.extend(globals, conf);
|
426 |
+
|
427 |
+
conf.keyboardSteps = conf.keyboardSteps || conf.size;
|
428 |
+
|
429 |
+
this.each(function() {
|
430 |
+
el = new Scrollable(jQuery(this), conf);
|
431 |
+
jQuery(this).data("scrollable", el);
|
432 |
+
});
|
433 |
+
|
434 |
+
return conf.api ? el: this;
|
435 |
+
|
436 |
+
};
|
437 |
+
|
438 |
+
|
439 |
+
})(jQuery);
|
3.7.8/lib/tools.scrollable.mousewheel-1.0.1.js
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jQuery TOOLS plugin :: scrollable.mousewheel 1.0.1
|
3 |
+
*
|
4 |
+
* Copyright (c) 2009 Tero Piirainen
|
5 |
+
* http://flowplayer.org/tools/scrollable.html#mousewheel
|
6 |
+
*
|
7 |
+
* Dual licensed under MIT and GPL 2+ licenses
|
8 |
+
* http://www.opensource.org/licenses
|
9 |
+
*
|
10 |
+
* Launch : September 2009
|
11 |
+
* Date: jQuery{date}
|
12 |
+
* Revision: jQuery{revision}
|
13 |
+
*
|
14 |
+
*
|
15 |
+
* jquery.event.wheel.js - rev 1
|
16 |
+
* Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
|
17 |
+
* Liscensed under the MIT License (MIT-LICENSE.txt)
|
18 |
+
* http://www.opensource.org/licenses/mit-license.php
|
19 |
+
* Created: 2008-07-01 | Updated: 2008-07-14
|
20 |
+
*/
|
21 |
+
(function(jQuery) {
|
22 |
+
|
23 |
+
jQuery.fn.wheel = function( fn ){
|
24 |
+
return this[ fn ? "bind" : "trigger" ]( "wheel", fn );
|
25 |
+
};
|
26 |
+
|
27 |
+
// special event config
|
28 |
+
jQuery.event.special.wheel = {
|
29 |
+
setup: function(){
|
30 |
+
this.addEventListener('DOMMouseScroll', wheelHandler, false);
|
31 |
+
this.addEventListener('mousewheel', wheelHandler, false);
|
32 |
+
},
|
33 |
+
teardown: function(){
|
34 |
+
this.removeEventListener('DOMMouseScroll', wheelHandler, false);
|
35 |
+
this.removeEventListener('mousewheel', wheelHandler, false);
|
36 |
+
}
|
37 |
+
};
|
38 |
+
|
39 |
+
// shared event handler
|
40 |
+
function wheelHandler( event ) {
|
41 |
+
|
42 |
+
switch ( event.type ){
|
43 |
+
|
44 |
+
// FF2 has incorrect event positions
|
45 |
+
case "mousemove":
|
46 |
+
return jQuery.extend( event.data, { // store the correct properties
|
47 |
+
clientX: event.clientX, clientY: event.clientY,
|
48 |
+
pageX: event.pageX, pageY: event.pageY
|
49 |
+
});
|
50 |
+
|
51 |
+
// firefox
|
52 |
+
case "DOMMouseScroll":
|
53 |
+
jQuery.extend( event, event.data ); // fix event properties in FF2
|
54 |
+
event.delta = -event.detail / 3; // normalize delta
|
55 |
+
break;
|
56 |
+
|
57 |
+
// IE, opera, safari
|
58 |
+
case "mousewheel":
|
59 |
+
event.delta = event.wheelDelta / 120;
|
60 |
+
break;
|
61 |
+
}
|
62 |
+
|
63 |
+
var api = jQuery(this).scrollable();
|
64 |
+
event.preventDefault();
|
65 |
+
api.move(event.delta < 0 ? 1 : -1, 50);
|
66 |
+
return false;
|
67 |
+
}
|
68 |
+
|
69 |
+
|
70 |
+
// version number
|
71 |
+
var t = jQuery.tools.scrollable;
|
72 |
+
t.plugins = t.plugins || {};
|
73 |
+
t.plugins.mousewheel = {
|
74 |
+
version: '1.0.1',
|
75 |
+
conf: {
|
76 |
+
api: false,
|
77 |
+
speed: 50
|
78 |
+
}
|
79 |
+
};
|
80 |
+
|
81 |
+
// scrollable mousewheel implementation
|
82 |
+
jQuery.fn.mousewheel = function(conf) {
|
83 |
+
|
84 |
+
var globals = jQuery.extend({}, t.plugins.mousewheel.conf), ret;
|
85 |
+
if (typeof conf == 'number') { conf = {speed: conf}; }
|
86 |
+
conf = jQuery.extend(globals, conf);
|
87 |
+
|
88 |
+
this.each(function() {
|
89 |
+
|
90 |
+
var api = jQuery(this).scrollable();
|
91 |
+
if (api) { ret = api; }
|
92 |
+
|
93 |
+
api.getRoot().wheel(function(e, delta) {
|
94 |
+
api.move(delta < 0 ? 1 : -1, conf.speed || 50);
|
95 |
+
return false;
|
96 |
+
});
|
97 |
+
});
|
98 |
+
|
99 |
+
return conf.api ? ret : this;
|
100 |
+
};
|
101 |
+
|
102 |
+
})(jQuery);
|
103 |
+
|
3.7.8/readme.txt
ADDED
@@ -0,0 +1,552 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Editorial Calendar ===
|
2 |
+
Contributors: cvernon, justinstresslimit, jkudish, MaryVogt, zgrossbart
|
3 |
+
Tags: posts, post, calendar, AJAX, admin, administration
|
4 |
+
Requires at least: 4.0
|
5 |
+
Tested up to: 5.6
|
6 |
+
Stable tag: 3.7.8
|
7 |
+
|
8 |
+
The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
|
9 |
+
|
10 |
+
== Description ==
|
11 |
+
|
12 |
+
Did you remember to write a post for next Tuesday? What about the Tuesday after that? WordPress doesn't make it easy to see when your posts are scheduled. The editorial calendar gives you an overview of your blog and when each post will be published. You can drag and drop to move posts, edit posts right in the calendar, and manage your entire blog.
|
13 |
+
|
14 |
+
<h4>Watch the video</h4>
|
15 |
+
|
16 |
+
[vimeo https://vimeo.com/272028435]
|
17 |
+
|
18 |
+
<h4>Try it out</h4>
|
19 |
+
Try the calendar before you install it. Check out the demo installation at <a href="http://www.zackgrossbart.com/extras/sandbox/wp-admin/edit.php?page=cal">Zack's WordPress Sandbox</a>. You can log in with the username and password test.
|
20 |
+
|
21 |
+
|
22 |
+
<h4>Features</h4>
|
23 |
+
|
24 |
+
1. See all of your posts and when they'll be posted.
|
25 |
+
1. Drag and drop to change your post dates.
|
26 |
+
1. Manage your drafts with our new drafts drawer.
|
27 |
+
1. Quickedit post titles, contents, and times.
|
28 |
+
1. Publish posts or manage drafts.
|
29 |
+
1. Easily see the status of your posts.
|
30 |
+
1. Manage posts from multiple authors.
|
31 |
+
|
32 |
+
<h4>Make it better</h4>
|
33 |
+
|
34 |
+
Thank you to everyone who has given us feedback and helped us improve this plugin. If you have questions, problems, or ideas for new features please let us know at <a href="mailto:wp-edcal@googlegroups.com">wp-edcal@googlegroups.com</a>.
|
35 |
+
|
36 |
+
<h4>Translate it</h4>
|
37 |
+
|
38 |
+
Again, thanks to all who have already helped make the plugin available in so many languages. If you would like to help us translate the plugin into your language, or if you use it in a language other than English already and would like to help us keep it up to date, please write to us at <a href="mailto:wp-edcal@googlegroups.com">wp-edcal@googlegroups.com</a>
|
39 |
+
|
40 |
+
== Installation ==
|
41 |
+
|
42 |
+
1. <b>Backup your WordPress database</b>.
|
43 |
+
1. Upload the plugin directory <code>editorial-calendar</code> to the <code>wp-content/plugins</code> directory.
|
44 |
+
1. Activate the plugin through the 'Plugins' menu in WordPress.
|
45 |
+
1. Click the new 'Calendar' option under the 'Posts' menu or any other custom post types.
|
46 |
+
|
47 |
+
== Frequently Asked Questions ==
|
48 |
+
|
49 |
+
= What is an editorial calendar? =
|
50 |
+
|
51 |
+
An editorial calendar is simply a plan for your blog. It is thinking ahead about what you're going to write. There's a detailed explanation of editorial calendars at <a href="http://www.copyblogger.com/editorial-calendar/">The Easy-to-Use Tool that Helps You Build a Breakthrough Blog</a> from <a href="http://www.copyblogger.com/">Copyblogger</a>.
|
52 |
+
|
53 |
+
= What are other people saying about the calendar? =
|
54 |
+
|
55 |
+
From time to time people write articles about the editorial calendar. We appreciate every one.
|
56 |
+
|
57 |
+
<a href="http://www.dailyblogtips.com/5-reasons-youll-love-the-wordpress-editorial-calendar/">5 Reasons You’ll Love the WordPress Editorial Calendar</a> by <a href="http://www.successfulblogging.com/">Annabel Candy</a>
|
58 |
+
|
59 |
+
<a href="http://www.chrisbrogan.com/use-an-editorial-calendar/">Use An Editorial Calendar</a> by <a href="http://www.chrisbrogan.com">Chris Brogan</a>
|
60 |
+
|
61 |
+
<a href="http://www.smashingmagazine.com/2010/08/30/the-importance-of-consistency-using-editorial-calendars-and-style-guides/">Blogging For Web Designers: Editorial Calendars and Style Guides</a> by <a href="http://jessica.smashingmagazine.com/">Jessica Bordeau</a> at <a href="http://www.smashingmagazine.com/">Smashing Magazine</a>
|
62 |
+
|
63 |
+
<a href="http://mydigitalinternet.com/2010/editorial-calendar-wordpress-plugin-review">
|
64 |
+
Editorial Calendar WordPress plugin review</a> by Stephen Duckworth at <a href="http://mydigitalinternet.com/">My Digital Internet</a>
|
65 |
+
|
66 |
+
<a href="http://www.disruptiveconversations.com/2010/09/brogan-is-right-the-editorial-calendar-wordpress-plugin-truly-rocks.html">Brogan is right - the "Editorial Calendar" WordPress plugin truly rocks!</a> by <a href="http://www.danyork.com/">Dan York</a>
|
67 |
+
|
68 |
+
<a href="http://www.socialbrandingblog.com/637/editorial-calendar-plugin-for-wordpress/">Editorial Calendar Plugin for WordPress</a> by <a href="http://www.socialbrandingblog.com/">Steve Campbell</a>
|
69 |
+
|
70 |
+
<a href="http://marketplacemommies.com/2010/an-editorial-calendar-plugin-for-wordpress/">
|
71 |
+
An Editorial Calendar Plugin For WordPress</a> by <a href="http://marketplacemommies.com/">Marketplace Mommies</a>
|
72 |
+
|
73 |
+
<a href="http://www.mequoda.com/articles/editorial-strategy/editorial-calendar-wp-plugin-review/">Great WP Plugin for Online Editors: Editorial Calendar</a> by <a href="http://www.mequoda.com/">Mequoda Daily</a>
|
74 |
+
|
75 |
+
<a href="http://chrisg.org/drag-and-drop-post-scheduling-with-the-editorial-calendar-wordpress-plugin/">Drag and Drop Post Scheduling with the Editorial Calendar WordPress plugin</a> by <a href="http://chrisg.org/">Chris Garrett</a>
|
76 |
+
|
77 |
+
<a href="http://theincidentaleconomist.com/wordpress-plug-in-plug-editorial-calendar/">WordPress Plug-In Plug: Editorial Calendar</a> on <a href="http://theincidentaleconomist.com/">The Incidental Economist</a>
|
78 |
+
|
79 |
+
<a href="http://www.rezdwanhamid.com/tutorials/how-to-use-editorial-calendar-plugin-for-wordpress/">How To Use The Editorial Calendar For WordPress</a> by <a href="http://www.rezdwanhamid.com/">Rezdwan Hamid</a>
|
80 |
+
|
81 |
+
<a href="http://wordcastnet.com/2010/01/12/visually-manage-your-post-publication-dates-with-the-editorial-calendar-wordpress-plugin/">Visually Manage Your Post Publication Dates with the Editorial Calendar WordPress Plugin</a> on <a href="http://wordcastnet.com/">WordCast</a>
|
82 |
+
|
83 |
+
<a href="http://askcharlyleetham.com/blog/guest-authors/powerful-plugins-that-keep-you-organized-and-increase-your-productivity/comment-page-1#comment-5791">Powerful Plugins That Keep You Organized and Increase Your Productivity</a> at <a href="http://www.askcharlyleetham.com">askcharlyleetham.com</a>.
|
84 |
+
|
85 |
+
<a href="http://websuccessdiva.com/seo-copywriting-checklist/">SEO Copywriting Checklist for Wordpress Blogs</a> on <a href="http://websuccessdiva.com/">@WebSuccessDiva</a> is a good article about SEO and using an editorial calendar.
|
86 |
+
|
87 |
+
= Can I see a demo of the calendar? =
|
88 |
+
|
89 |
+
Check out our demo installation at <a href="http://www.zackgrossbart.com/extras/sandbox/wp-admin/edit.php?page=cal">Zack's WordPress Sandbox</a>.
|
90 |
+
|
91 |
+
= How do I get help using the calendar? =
|
92 |
+
|
93 |
+
The <a href="http://groups.google.com/group/wp-edcal">WordPress Editorial Calendar Google Group</a> is a good place to ask questions, find answers, and post feedback. We also follow the WordPress.org forum <a href="http://wordpress.org/tags/editorial-calendar?forum_id=10">Editorial Calendar discussion</a>.
|
94 |
+
|
95 |
+
= How do I navigate in the calendar? =
|
96 |
+
|
97 |
+
You can move around in the calendar using the arrows next to the months at the top or your mouse wheel. You can also move using your keyboard:
|
98 |
+
|
99 |
+
<ul>
|
100 |
+
<li>Move 1 week into the past - Up Arrow</li>
|
101 |
+
<li>Move 1 week into the future - Down Arrow</li>
|
102 |
+
<li>Jump multiple weeks into the past - Page Up or Ctrl+Up Arrow</li>
|
103 |
+
<li>Jump multiple weeks into the future - Page Down or Ctrl+Down Arrow</li>
|
104 |
+
</ul>
|
105 |
+
|
106 |
+
= How do I change the first day of the week? =
|
107 |
+
|
108 |
+
The editorial calendar follows the Week Starts On preference on the WordPress General Settings page. Choose the day you want and the calendar will use that day as the first day of the week.
|
109 |
+
|
110 |
+
= What languages does the calendar support? =
|
111 |
+
|
112 |
+
The calendar is available in Brazilian Portuguese, Croatian, Czech, Danish, Dutch, English, French, German, Greek, Hebrew, Italian, Japanese, Lithuanian, Norwegian, Polish, Russian, Spanish, and Swedish.
|
113 |
+
|
114 |
+
= Can I add new languages? =
|
115 |
+
|
116 |
+
Yes please! We are looking for translators. It only takes about 20 minutes. If you're interested please <a href="mailto:wp-edcal@googlegroups.com">contact us</a>.
|
117 |
+
|
118 |
+
= How does the calendar work =
|
119 |
+
|
120 |
+
The calendar is written in JavaScript. It contacts your blog when it scrolls to get data about your posts. Just like Google Maps. <a href="http://www.zackgrossbart.com/hackito/edcal/">Creating a JQuery Powered Posts Calendar for WordPress</a> explains a lot of the technical details.
|
121 |
+
|
122 |
+
= Is the calendar collecting data about my blog? =
|
123 |
+
|
124 |
+
After you use the calendar a few times we'll prompt you to let us collect a little data about your blog. Information like the size of your browser window and the number of posts you have per day help us make the calendar even better.
|
125 |
+
|
126 |
+
The collected data is all available to the public. Check out the <a href="http://www.zackgrossbart.com/edcal/mint/">Editorial Calendar Statistics</a>.
|
127 |
+
|
128 |
+
= What users can use the calendar? =
|
129 |
+
|
130 |
+
The editorial calendar works differently based on your permissions.
|
131 |
+
|
132 |
+
* Administrators and Editors can use every feature available in the calendar.
|
133 |
+
* Authors can use the calendar to edit, move, and publish their own posts, but other people's posts are read-only.
|
134 |
+
* Contributors see everyone's posts and move their own posts, but can only save drafts.
|
135 |
+
* Subscribers can't see the calendar.
|
136 |
+
|
137 |
+
You can see how it looks for different users on our <a href="http://www.zackgrossbart.com/extras/sandbox/wp-admin/edit.php?page=cal">Zack's WordPress Sandbox</a> with the following users:
|
138 |
+
|
139 |
+
* edgar the Editor
|
140 |
+
* alice the Author
|
141 |
+
* conrad the Contributor
|
142 |
+
* sam the Subscriber
|
143 |
+
|
144 |
+
Each of these users has the password test.
|
145 |
+
|
146 |
+
= Can I use the editorial calendar with pages? =
|
147 |
+
|
148 |
+
Right now the calendar only supports posts. We're considering adding pages. If you would like to see pages show up in the calendar let us know.
|
149 |
+
|
150 |
+
= Does the calendar support group blogs? =
|
151 |
+
|
152 |
+
If your blog has multiple authors the calendar will work just fine. You can show author names right in the calendar. Just look under screen options.
|
153 |
+
|
154 |
+
We are currently working on new features for multi-author blogs. If you have any ideas please <a href="mailto:wp-edcal@googlegroups.com">contact us</a>.
|
155 |
+
|
156 |
+
= Can my readers tell I'm using the editorial calendar? =
|
157 |
+
|
158 |
+
No. The calendar is only an administration tool. None of your readers will know you're running it unless you tell them.
|
159 |
+
|
160 |
+
= Why can't I move published posts? =
|
161 |
+
|
162 |
+
Moving published posts can cause problems with some RSS feeds and is generally not a very popular thing to do. The calendar only allows you to move scheduled and draft posts.
|
163 |
+
|
164 |
+
= Can I change post colors or styles in the calendar? =
|
165 |
+
|
166 |
+
You can style the posts in the calendar with CSS on your blog. The calendar adds a new CSS class to your post for every catalog. The class is based on the slug for the category.
|
167 |
+
|
168 |
+
For example, if you have a category named "My Category" you might have a slug for it named "my-category". Then you can make all posts with that category show up as red in the calendar with CSS like this:
|
169 |
+
|
170 |
+
<pre>
|
171 |
+
.post.my-category {
|
172 |
+
color: red;
|
173 |
+
}
|
174 |
+
</pre>
|
175 |
+
|
176 |
+
You can use any CSS properties to change posts in the calendar based on the post category.
|
177 |
+
|
178 |
+
= Can I change default post time or status when creating new posts? =
|
179 |
+
|
180 |
+
The calendar allows you to create new posts. The default time for this new posts is 10:00 AM and the default status for this new posts is draft. You can change those values by specifying options in your blog.
|
181 |
+
|
182 |
+
The `edcal_default_time` property controls the default time for new posts in the calendar. This value is in 24 hour time and you can change it by specifying the time in a format like `11:00`.
|
183 |
+
|
184 |
+
The `edcal_default_status` property controls the default status for new posts in the calendar. The allowed values are `draft`, `future`, and `pending` for the statuses of `Draft`, `Scheduled`, and `Pending Review` respectively. This value will only be used if the current user doesn't have access to change that status. For example, if you're an author then you can't use a default status of `pending` since you aren't allowed to publish posts.
|
185 |
+
|
186 |
+
== Screenshots ==
|
187 |
+
|
188 |
+
1. The calendar integrates seamlessly into the WordPress administration console
|
189 |
+
2. See the big picture with a view of all your posts and when they'll be published.
|
190 |
+
3. Drag and drop posts to easily change dates and take control of your blog.
|
191 |
+
4. Create, edit, and schedule posts in one simple quickedit dialog.
|
192 |
+
5. Show as much or as little of your blog as you like.
|
193 |
+
6. Use a special calendar for each custom post type on your blog.
|
194 |
+
7. Use the new unscheduled drafts section to manage drafts before you schedule them.
|
195 |
+
|
196 |
+
== Changelog ==
|
197 |
+
|
198 |
+
|
199 |
+
= 3.7.8 =
|
200 |
+
|
201 |
+
This version fixes a CSS layout issue so the calendar works with WordPress 5.6.
|
202 |
+
|
203 |
+
= 3.7.7 =
|
204 |
+
|
205 |
+
This version tweaks the libraries that support the calendar to avoid warnings from the Enable jQuery Migrate Helper plugin.
|
206 |
+
|
207 |
+
= 3.7.5 =
|
208 |
+
|
209 |
+
The calendar now support quick edit when a post has either a title or content instead of requiring a title.
|
210 |
+
|
211 |
+
= 3.7.4 =
|
212 |
+
|
213 |
+
Fixed a specific issue which made the calendar show up as right to left instead of left to right in Dutch.
|
214 |
+
|
215 |
+
= 3.7.3 =
|
216 |
+
|
217 |
+
We are now making sure to set the correct right to left and left to right orientation in every language file.
|
218 |
+
|
219 |
+
= 3.7.2 =
|
220 |
+
|
221 |
+
This version fixes an error with the drafts drawer that broke compatibility with WordPress 5.0.
|
222 |
+
|
223 |
+
= 3.7.1 =
|
224 |
+
|
225 |
+
We now have an option so you can choose if you want to scroll the calendar with the mouse wheel or not.
|
226 |
+
|
227 |
+
= 3.7 =
|
228 |
+
|
229 |
+
The calendar no longer responds to the mouse wheel. We did some user testing and it was a better experience without having to worry about the mouse wheel.
|
230 |
+
|
231 |
+
The current date range is now doing a better display job and not jumping around when the date changes.
|
232 |
+
|
233 |
+
= 3.6.8 =
|
234 |
+
|
235 |
+
The calendar now properly shows scrollbars for individual days when there are too many posts in a single day.
|
236 |
+
|
237 |
+
The calendar is now showing the correct left to right orientation in Turkish.
|
238 |
+
|
239 |
+
= 3.6.7 =
|
240 |
+
|
241 |
+
The calendar is now showing in the correct left to right orientation in Japanese.
|
242 |
+
|
243 |
+
= 3.6.6 =
|
244 |
+
|
245 |
+
Added a new video and did complete testing to make sure the calendar is fully compatible with the latest version of WordPress.
|
246 |
+
|
247 |
+
= 3.6.5 =
|
248 |
+
|
249 |
+
The calendar will no longer prompt new users to collect data about how they use the calendar. We have all the data we need for now.
|
250 |
+
|
251 |
+
The calendar has now been updated and tested for WordPress version 4.9.1.
|
252 |
+
|
253 |
+
= 3.6.4 =
|
254 |
+
|
255 |
+
The calendar has now been updated and tested for WordPress version 4.8.
|
256 |
+
|
257 |
+
= 3.6.3 =
|
258 |
+
|
259 |
+
The calendar has now been updated and tested for WordPress version 4.7.
|
260 |
+
|
261 |
+
= 3.6.2 =
|
262 |
+
|
263 |
+
The calendar has now been updated and tested for WordPress version 4.5.
|
264 |
+
|
265 |
+
We have a new translation in turkish with updated strings and language fixes.
|
266 |
+
|
267 |
+
= 3.6.1 =
|
268 |
+
|
269 |
+
The calendar has now been updated and tested for WordPress version 4.4.
|
270 |
+
|
271 |
+
= 3.6 =
|
272 |
+
|
273 |
+
The calendar has now been updated and tested for WordPress version 4.3.1.
|
274 |
+
|
275 |
+
= 3.5 =
|
276 |
+
|
277 |
+
The calendar has now been translated into Turkish and updated for WordPress version 4.2.
|
278 |
+
|
279 |
+
= 3.4 =
|
280 |
+
|
281 |
+
The calendar has now been translated into Danish. Thank you to our Danish translator Thomas Christensen.
|
282 |
+
|
283 |
+
= 3.3 =
|
284 |
+
|
285 |
+
This version fixes an error handling apostrophes and ampersands in post titles in WordPress 4.0.
|
286 |
+
|
287 |
+
= 3.2 =
|
288 |
+
|
289 |
+
We now have a new option for specifying the default status of a new post and documented the option for specifying the default time of a post.
|
290 |
+
|
291 |
+
The calendar is now doing a better job of reporting errors when it can't parse the post information from the blog.
|
292 |
+
|
293 |
+
= 3.1.1 =
|
294 |
+
|
295 |
+
This version is exactly the same as version 3.1, but it's been fully tested against WordPress 3.9.
|
296 |
+
|
297 |
+
= 3.1 =
|
298 |
+
|
299 |
+
The calendar now adds the category slugs for each post as a class for the line of that post in the calendar.
|
300 |
+
|
301 |
+
The calendar has a new option called edcal_custom_posts_public to control if the calendar shows for private custom posts or not.
|
302 |
+
|
303 |
+
= 3.0 =
|
304 |
+
|
305 |
+
This version makes a few small bug fixes to work well with WordPress 3.8. This includes showing the screen options with some better formatting and deleting posts from the drafts drawer properly.
|
306 |
+
|
307 |
+
= 2.9 =
|
308 |
+
|
309 |
+
Version 2.9 is another testing release. This version makes sure everything works great with WordPress 3.7.1.
|
310 |
+
|
311 |
+
= 2.8 =
|
312 |
+
|
313 |
+
Version 2.8 is all about testing. This version makes sure everything works great with WordPress 3.6 and jQuery 2.0. It also has a couple of small bug fixes.
|
314 |
+
|
315 |
+
= 2.7 =
|
316 |
+
|
317 |
+
The calendar is now available in Italian thanks to Lorenzo Boldorini who blogs at http://www.webqbe.it.
|
318 |
+
|
319 |
+
Changed all calls of the jQuery live method to use the new on method so the calendar will keep working when WordPress upgrades to jQuery 1.9.
|
320 |
+
|
321 |
+
The Mozilla team is now using the Editorial Calendar in one of their blogs and performed a security review of the calendar. They found a couple of potential issues which were fixed in this release. https://bugzilla.mozilla.org/show_bug.cgi?id=738112
|
322 |
+
|
323 |
+
The Editorial Calendar is now stripping all tags out of post titles created from the calendar. This fixes a potential security issue found by the Mozilla security testing team. https://bugzilla.mozilla.org/show_bug.cgi?id=738112
|
324 |
+
|
325 |
+
We are now preventing a potential SQL injection attack with the start date and end date filter when querying posts. This fixes a potential security issue found by the Mozilla security testing team. https://bugzilla.mozilla.org/show_bug.cgi?id=738112
|
326 |
+
|
327 |
+
We are adding an extra check to make sure that authors can't delete a post created by another author. This fixes a potential security issue found by the Mozilla security testing team. https://bugzilla.mozilla.org/show_bug.cgi?id=738112
|
328 |
+
|
329 |
+
= 2.6 =
|
330 |
+
|
331 |
+
Fixed some layout issues with the previous and next calendar buttons in WordPress 3.5.
|
332 |
+
|
333 |
+
We are now properly saving new posts in the drafts drawer in WordPress 3.5.
|
334 |
+
|
335 |
+
Added unit tests to cover creating a new post in the drafts drawer.
|
336 |
+
|
337 |
+
Added a few performance improvements to the calendar like making sure we only load our code in the admin console.
|
338 |
+
|
339 |
+
= 2.5 =
|
340 |
+
|
341 |
+
The calendar is now handling the post ID in the same way for each call it uses to get data about each post when returning post data to the calendar to avoid some PHP warnings.
|
342 |
+
|
343 |
+
The calendar is now more careful about PHP warnings so it still works if the blog is set to show PHP warnings.
|
344 |
+
|
345 |
+
The unit tests are now using the correct CSS reference so they show up properly.
|
346 |
+
|
347 |
+
Moved the setting for the default post time to the edcal.php so it's easier to change without recompiling the JavaScript.
|
348 |
+
|
349 |
+
The calendar now supports Russian thanks to Danny Zawacki and Lyudmila Kostryka. Danny blogs at http://dannyzawacki.com
|
350 |
+
|
351 |
+
We have started to namespace css classes to avoid conflicts with other plugins & themes.
|
352 |
+
|
353 |
+
= 2.4 =
|
354 |
+
|
355 |
+
Creating a new unscheduled draft is now working properly from the calendar.
|
356 |
+
|
357 |
+
= 2.3 =
|
358 |
+
|
359 |
+
The calendar is now loading relative URLs for CSS, JavaScript, and image files using the right API so they load properly when using SSL.
|
360 |
+
|
361 |
+
= 2.2.1 =
|
362 |
+
|
363 |
+
Fixed a memory leak in the calendar where the calendar doesn't load if you have too many posts in your blog.
|
364 |
+
|
365 |
+
= 2.2 =
|
366 |
+
|
367 |
+
The calendar is using JavaScript compression to load less data and run faster.
|
368 |
+
|
369 |
+
We've added a new me
|