Version Description
Updates the MailChimp API version, adds double/single opt-in toggle.
Download this release
Release Info
Developer | MailChimp |
Plugin | MailChimp List Subscribe Form |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.4.5 to 1.5
- README.md +225 -0
- css/admin.css +1 -1
- css/flick/flick.css +0 -0
- css/flick/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- css/flick/images/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- css/flick/images/ui-bg_flat_55_ffffff_40x100.png +0 -0
- css/flick/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- css/flick/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- css/flick/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
- css/flick/images/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
- css/flick/images/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
- css/flick/images/ui-icons_0073ea_256x240.png +0 -0
- css/flick/images/ui-icons_454545_256x240.png +0 -0
- css/flick/images/ui-icons_666666_256x240.png +0 -0
- css/flick/images/ui-icons_ff0084_256x240.png +0 -0
- css/flick/images/ui-icons_ffffff_256x240.png +0 -0
- datepicker.js +1815 -0
- i18n/jquery-ui-i18n.js +1379 -0
- i18n/jquery.ui.datepicker-af.js +23 -0
- i18n/jquery.ui.datepicker-ar-DZ.js +23 -0
- i18n/jquery.ui.datepicker-ar.js +23 -0
- i18n/jquery.ui.datepicker-az.js +23 -0
- i18n/jquery.ui.datepicker-bg.js +24 -0
- i18n/jquery.ui.datepicker-bs.js +23 -0
- i18n/jquery.ui.datepicker-ca.js +23 -0
- i18n/jquery.ui.datepicker-cs.js +23 -0
- i18n/jquery.ui.datepicker-da.js +23 -0
- i18n/jquery.ui.datepicker-de.js +23 -0
- i18n/jquery.ui.datepicker-el.js +23 -0
- i18n/jquery.ui.datepicker-en-AU.js +23 -0
- i18n/jquery.ui.datepicker-en-GB.js +23 -0
- i18n/jquery.ui.datepicker-en-NZ.js +23 -0
- i18n/jquery.ui.datepicker-eo.js +23 -0
- i18n/jquery.ui.datepicker-es.js +23 -0
- i18n/jquery.ui.datepicker-et.js +23 -0
- i18n/jquery.ui.datepicker-eu.js +23 -0
- i18n/jquery.ui.datepicker-fa.js +23 -0
- i18n/jquery.ui.datepicker-fi.js +23 -0
- i18n/jquery.ui.datepicker-fo.js +23 -0
- i18n/jquery.ui.datepicker-fr-CH.js +23 -0
- i18n/jquery.ui.datepicker-fr.js +25 -0
- i18n/jquery.ui.datepicker-gl.js +23 -0
- i18n/jquery.ui.datepicker-he.js +23 -0
- i18n/jquery.ui.datepicker-hr.js +23 -0
- i18n/jquery.ui.datepicker-hu.js +23 -0
- i18n/jquery.ui.datepicker-hy.js +23 -0
- i18n/jquery.ui.datepicker-id.js +23 -0
- i18n/jquery.ui.datepicker-is.js +23 -0
- i18n/jquery.ui.datepicker-it.js +23 -0
- i18n/jquery.ui.datepicker-ja.js +23 -0
- i18n/jquery.ui.datepicker-ko.js +23 -0
- i18n/jquery.ui.datepicker-kz.js +23 -0
- i18n/jquery.ui.datepicker-lt.js +23 -0
- i18n/jquery.ui.datepicker-lv.js +23 -0
- i18n/jquery.ui.datepicker-ml.js +23 -0
- i18n/jquery.ui.datepicker-ms.js +23 -0
- i18n/jquery.ui.datepicker-nl.js +23 -0
- i18n/jquery.ui.datepicker-no.js +23 -0
- i18n/jquery.ui.datepicker-pl.js +23 -0
- i18n/jquery.ui.datepicker-pt-BR.js +23 -0
- i18n/jquery.ui.datepicker-pt.js +22 -0
- i18n/jquery.ui.datepicker-rm.js +21 -0
- i18n/jquery.ui.datepicker-ro.js +26 -0
- i18n/jquery.ui.datepicker-ru.js +23 -0
- i18n/jquery.ui.datepicker-sk.js +23 -0
- i18n/jquery.ui.datepicker-sl.js +24 -0
- i18n/jquery.ui.datepicker-sq.js +23 -0
- i18n/jquery.ui.datepicker-sr-SR.js +23 -0
- i18n/jquery.ui.datepicker-sr.js +23 -0
- i18n/jquery.ui.datepicker-sv.js +23 -0
- i18n/jquery.ui.datepicker-ta.js +23 -0
- i18n/jquery.ui.datepicker-th.js +23 -0
- i18n/jquery.ui.datepicker-tj.js +23 -0
- i18n/jquery.ui.datepicker-tr.js +23 -0
- i18n/jquery.ui.datepicker-uk.js +23 -0
- i18n/jquery.ui.datepicker-vi.js +23 -0
- i18n/jquery.ui.datepicker-zh-CN.js +23 -0
- i18n/jquery.ui.datepicker-zh-HK.js +23 -0
- i18n/jquery.ui.datepicker-zh-TW.js +23 -0
- js/admin.js +0 -15
- js/datepicker.js +0 -0
- js/hidecss.js +18 -0
- js/i18n/jquery-ui-i18n.js +0 -0
- js/i18n/jquery.ui.datepicker-af.js +0 -0
- js/i18n/jquery.ui.datepicker-ar-DZ.js +0 -0
- js/i18n/jquery.ui.datepicker-ar.js +0 -0
- js/i18n/jquery.ui.datepicker-az.js +0 -0
- js/i18n/jquery.ui.datepicker-bg.js +0 -0
- js/i18n/jquery.ui.datepicker-bs.js +0 -0
- js/i18n/jquery.ui.datepicker-ca.js +0 -0
- js/i18n/jquery.ui.datepicker-cs.js +0 -0
- js/i18n/jquery.ui.datepicker-da.js +0 -0
- js/i18n/jquery.ui.datepicker-de.js +0 -0
- js/i18n/jquery.ui.datepicker-el.js +0 -0
- js/i18n/jquery.ui.datepicker-en-AU.js +0 -0
- js/i18n/jquery.ui.datepicker-en-GB.js +0 -0
- js/i18n/jquery.ui.datepicker-en-NZ.js +0 -0
- js/i18n/jquery.ui.datepicker-eo.js +0 -0
- js/i18n/jquery.ui.datepicker-es.js +0 -0
- js/i18n/jquery.ui.datepicker-et.js +0 -0
- js/i18n/jquery.ui.datepicker-eu.js +0 -0
- js/i18n/jquery.ui.datepicker-fa.js +0 -0
- js/i18n/jquery.ui.datepicker-fi.js +0 -0
- js/i18n/jquery.ui.datepicker-fo.js +0 -0
- js/i18n/jquery.ui.datepicker-fr-CH.js +0 -0
- js/i18n/jquery.ui.datepicker-fr.js +0 -0
- js/i18n/jquery.ui.datepicker-gl.js +0 -0
- js/i18n/jquery.ui.datepicker-he.js +0 -0
- js/i18n/jquery.ui.datepicker-hr.js +0 -0
- js/i18n/jquery.ui.datepicker-hu.js +0 -0
- js/i18n/jquery.ui.datepicker-hy.js +0 -0
- js/i18n/jquery.ui.datepicker-id.js +0 -0
- js/i18n/jquery.ui.datepicker-is.js +0 -0
- js/i18n/jquery.ui.datepicker-it.js +0 -0
- js/i18n/jquery.ui.datepicker-ja.js +0 -0
- js/i18n/jquery.ui.datepicker-ko.js +0 -0
- js/i18n/jquery.ui.datepicker-kz.js +0 -0
- js/i18n/jquery.ui.datepicker-lt.js +0 -0
- js/i18n/jquery.ui.datepicker-lv.js +0 -0
- js/i18n/jquery.ui.datepicker-ml.js +0 -0
- js/i18n/jquery.ui.datepicker-ms.js +0 -0
- js/i18n/jquery.ui.datepicker-nl.js +0 -0
- js/i18n/jquery.ui.datepicker-no.js +0 -0
- js/i18n/jquery.ui.datepicker-pl.js +0 -0
- js/i18n/jquery.ui.datepicker-pt-BR.js +0 -0
- js/i18n/jquery.ui.datepicker-pt.js +0 -0
- js/i18n/jquery.ui.datepicker-rm.js +0 -0
- js/i18n/jquery.ui.datepicker-ro.js +0 -0
- js/i18n/jquery.ui.datepicker-ru.js +0 -0
- js/i18n/jquery.ui.datepicker-sk.js +0 -0
- js/i18n/jquery.ui.datepicker-sl.js +0 -0
- js/i18n/jquery.ui.datepicker-sq.js +0 -0
- js/i18n/jquery.ui.datepicker-sr-SR.js +0 -0
- js/i18n/jquery.ui.datepicker-sr.js +0 -0
- js/i18n/jquery.ui.datepicker-sv.js +0 -0
- js/i18n/jquery.ui.datepicker-ta.js +0 -0
- js/i18n/jquery.ui.datepicker-th.js +0 -0
- js/i18n/jquery.ui.datepicker-tj.js +0 -0
- js/i18n/jquery.ui.datepicker-tr.js +0 -0
- js/i18n/jquery.ui.datepicker-uk.js +0 -0
- js/i18n/jquery.ui.datepicker-vi.js +0 -0
- js/i18n/jquery.ui.datepicker-zh-CN.js +0 -0
- js/i18n/jquery.ui.datepicker-zh-HK.js +0 -0
- js/i18n/jquery.ui.datepicker-zh-TW.js +0 -0
- js/scrollTo.js +0 -0
- lib/mailchimp/mailchimp.php +74 -0
- mailchimp.js +38 -0
- mailchimp.php +879 -1349
- mailchimp_widget.php +55 -111
- readme.txt +22 -69
- scrollTo.js +11 -0
- views/css/frontend.php +75 -0
- views/datepicker.php +36 -0
- views/setup_page.php +445 -0
README.md
ADDED
@@ -0,0 +1,225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== MailChimp List Subscribe Form ===
|
2 |
+
Contributors: crowdfavorite
|
3 |
+
Tags: mailchimp, email, newsletter, signup, marketing, plugin, widget
|
4 |
+
Requires at least: 2.8
|
5 |
+
Tested up to: 4.5
|
6 |
+
Stable tag: 1.5
|
7 |
+
|
8 |
+
== Description ==
|
9 |
+
|
10 |
+
Use the MailChimp List Subscribe plugin to quickly add a MailChimp signup form widget to your WordPress 2.8 or higher site.
|
11 |
+
|
12 |
+
After installation, you’ll log in with your API key, select your MailChimp list, choose merge fields and groups, and add the widget to your site. Typically, installation and setup will take about 5-10 minutes, and absolutely everything can be done via the WordPress Setting GUI, with no file editing at all.
|
13 |
+
|
14 |
+
== Installation ==
|
15 |
+
|
16 |
+
This section describes how to install the plugin and get started using it.
|
17 |
+
|
18 |
+
= Version 2.8+ =
|
19 |
+
1. Unzip our archive and upload the entire mailchimp directory to your `/wp-content/plugins/ directory`
|
20 |
+
2. Activate the plugin through the **Plugins** menu in WordPress
|
21 |
+
3. Navigate to **Settings** click **MailChimp Setup**.
|
22 |
+
4. Enter your MailChimp API Key and let the plugin verify it.
|
23 |
+
5. Select the list where you want to send new MailChimp subscribers.
|
24 |
+
6. Optional: turn **MonkeyRewards** on or off.
|
25 |
+
7. Optional: Turn **Merge Fields** and **Groups** on or off. Navigate to **Appearance**, and click **Widgets**. Drag the MailChimp Widget into one of your Widget Areas.
|
26 |
+
|
27 |
+
|
28 |
+
= Advanced =
|
29 |
+
If you have a custom coded sidebar or bells and whistles that prevent enabling widgets through the WordPress GUI, complete these steps instead.
|
30 |
+
|
31 |
+
WordPress v2.8 or higher:
|
32 |
+
` [mailchimpsf_form] `
|
33 |
+
|
34 |
+
If you are adding it inside a php code block, pop this in:
|
35 |
+
|
36 |
+
` mailchimpSF_signup_form(); `
|
37 |
+
|
38 |
+
Or, if you are dropping it in between a bunch of HTML, use this:
|
39 |
+
|
40 |
+
`<?php mailchimpSF_signup_form(); ?>`
|
41 |
+
|
42 |
+
Where ever you want it to show up.
|
43 |
+
|
44 |
+
Note: in some environments you will need to install the Exec_PHP plugin to use that method of display. It can be found here: http://wordpress.org/extend/plugins/exec-php/
|
45 |
+
|
46 |
+
== Upgrading ==
|
47 |
+
|
48 |
+
If you are upgrading to version 1.2.1 and you used the widget in your sidebar previously, all you need to do is drag the `MailChimp Widget` back into the sidebar, visit the MailChimp settings page (which will have maintained your prior settings), click the "Update List" button, and you're done!
|
49 |
+
|
50 |
+
== Internationalization (i18n) ==
|
51 |
+
Currently we have the plugin configured so it can be easily translated and the following languages supported:
|
52 |
+
|
53 |
+
* bg_BG - Bulgarian in Bulgaria (thanks to [SiteGround](http://www.siteground.com/wordpress-hosting.htm) for contributing)
|
54 |
+
* cs_CZ - Czech in the Czech Republic (thanks to [Peter Kahoun](http://kahi.cz/) for contributing)
|
55 |
+
* da_DK - Danish in Denmark (thanks to Jan Lund for contributing)
|
56 |
+
* de_DE - German in Germany (thanks to Michael Jaekel for contributing)
|
57 |
+
* el_GR - Modern Greek in Greece (thanks to Ιωάννης Δημοφέρλιας (John Dimoferlias) for contributing)
|
58 |
+
* en_US - English in the U.S.
|
59 |
+
* es_CL - Spanish in Chile (thanks to Tomás Nader for contributing)
|
60 |
+
* es_ES - Spanish in Spain (thanks to [Claudia Mansilla](http://cricava.com/) for contributing)
|
61 |
+
* et_ET - Estonian in Estonia (thanks to [Helen Urbanik](http://www.motomaania.ee/) for contributing)
|
62 |
+
* fr_FR - French in France (thanks to [Maxime Toulliou](http://www.maximetoulliou.com/) for contributing)
|
63 |
+
* he_IL - Hebrew in Israel (thanks to [שגיב בית](http://www.sagive.co.il) for contributing)
|
64 |
+
* hu_HU - Hungarian in Hungary (thanks to Okostobi for contributing)
|
65 |
+
* it_IT - Italian in Italy (thanks to [Stefan Des](http://www.stefandes.com) for contributing)
|
66 |
+
* ko_KR - Korean (thanks to 백선기 (SK Baek) for contributing)
|
67 |
+
* nb_NO - Norwegian (thanks to [Alexander Roterud aka Defrag](http://www.tigerpews.com) for contributing)
|
68 |
+
* nl_BE - Dutch (thanks to [Filip Stas](http://suddenelfilio.net/) for contributing)
|
69 |
+
* pt_BR - Portuguese in Brazil (thanks to Maria Manoela Porto for contributing)
|
70 |
+
* pt_PT - Portuguese in Portugal (thanks to [Tiago Faria](http://xroot.org) for contributing)
|
71 |
+
* ro_RO - Romanian in Romania (thanks to Alexandru Armin Roșu for contributing)
|
72 |
+
* ru_RU - Russian in the Russian Federation (thanks to [Илья](http://fatcow.com) for contributing)
|
73 |
+
* sv_SE - Swedish in Sweden (thanks to [Sebastian Johnsson](http://www.agiley.se/) for contributing)
|
74 |
+
* tr_TR - Turkish in Turkey (thanks to [Hakan E.](http://kazancexpert.com/) for contributing)
|
75 |
+
|
76 |
+
If your language is not listed above, feel free to create a translation. Here are the basic steps:
|
77 |
+
|
78 |
+
1. Copy "mailchimp_i18n-en_US.po" to "mailchimp_i18n-LANG_COUNTRY.po" - fill in LANG and COUNTRY with whatever you use for WPLANG in wp-config.php
|
79 |
+
2. Grab a transalation editor. [POedit](http://www.poedit.net/) works for us
|
80 |
+
3. Translate each line - if you need some context, just open up mailchimp.php and search for the line number or text
|
81 |
+
4. [Fork](http://help.github.com/fork-a-repo/) the [repository on github](https://github.com/crowdfavorite/wp-mailchimp)
|
82 |
+
5. [Clone](http://help.github.com/remotes/#clone) the _develop_ branch
|
83 |
+
6. Add the appropriately named files to the /po/ directory and edit the /readme.txt to include how you'd like to be attributed
|
84 |
+
7. Make a [pull request](http://help.github.com/send-pull-requests/)
|
85 |
+
|
86 |
+
|
87 |
+
== Frequently Asked Questions ==
|
88 |
+
|
89 |
+
= What in the world is MailChimp? =
|
90 |
+
|
91 |
+
Good question! [MailChimp](http://mailchimp.com/features/all/) is full of useful, powerful email marketing features that are easy to use and even a little fun (that's right---we said fun), whether you're an email marketing expert, or a small business just getting started.
|
92 |
+
|
93 |
+
To learn more, just check out our site: [MailChimp](http://mailchimp.com/features/all/)
|
94 |
+
|
95 |
+
|
96 |
+
= Wait a minute, you want me to pay to try this? =
|
97 |
+
|
98 |
+
*Absolutely not!* We welcome you to come signup for a [FREE Trial Account](http://mailchimp.com/signup/) and see if you find it useful.
|
99 |
+
|
100 |
+
= I want this in my language, do you have a translation? =
|
101 |
+
Maybe! Look in the /po/ directory in our plugin package and see if your language is in there. If it is, great! If it is not, feel from to create one. Here are the basic steps:
|
102 |
+
|
103 |
+
1. Copy "mailchimp_i18n-en_US.po" to "mailchimp_i18n-LANG_COUNTRY.po" - fill in LANG and COUNTRY with whatever you use for WPLANG in wp-config.php
|
104 |
+
2. Grab a transalation editor. [POedit](http://www.poedit.net/) works for us
|
105 |
+
3. Translate each line - if you need some context, just open up mailchimp.php and search for the line number or text
|
106 |
+
4. [Fork](http://help.github.com/fork-a-repo/) the [repository on github](https://github.com/crowdfavorite/wp-mailchimp)
|
107 |
+
5. [Clone](http://help.github.com/remotes/#clone) the _develop_ branch
|
108 |
+
6. Add the appropriately named files to the /po/ directory and edit the /readme.txt to include how you'd like to be attributed
|
109 |
+
7. Make a [pull request](http://help.github.com/send-pull-requests/)
|
110 |
+
|
111 |
+
|
112 |
+
== Screenshots ==
|
113 |
+
|
114 |
+
1. Entering your MailChimp login info
|
115 |
+
2. Selecting your MailChimp list
|
116 |
+
3. Configuring your Signup Form display format (optional)
|
117 |
+
4. Configuring extra fields on your Signup Form (optional)
|
118 |
+
5. An example Signup Form Widget
|
119 |
+
|
120 |
+
== Upgrade Notice ==
|
121 |
+
|
122 |
+
= 1.5 =
|
123 |
+
Updates the MailChimp API version, adds double/single opt-in toggle.
|
124 |
+
|
125 |
+
= 1.4.2 =
|
126 |
+
add customized wp_nonces functions for post-back behavior to fix 4.0 callbacks
|
127 |
+
|
128 |
+
= 1.4.1 =
|
129 |
+
Fix for checkbox weirdness on 3.8
|
130 |
+
|
131 |
+
= 1.4 =
|
132 |
+
Added Developer Mode "Kitchen Sink" to aid in styling without having to authenticate a MailChimp account.
|
133 |
+
|
134 |
+
= 1.3 =
|
135 |
+
Now using OAuth flow within plugin for user authentication
|
136 |
+
|
137 |
+
Admin UI refresh
|
138 |
+
|
139 |
+
= 1.2.11 =
|
140 |
+
Merged pull request from https://github.com/headshift/wp-mailchimp adding additional translation strings.
|
141 |
+
|
142 |
+
= 1.2.10 =
|
143 |
+
Fixed submission error when apostrophes are present
|
144 |
+
|
145 |
+
= 1.2.8=
|
146 |
+
Fixes bug where entire phone numbers were only being deposited in the area code portion
|
147 |
+
|
148 |
+
= 1.2.6 =
|
149 |
+
Fixes major bug with "Settings" link on Plugins screen.
|
150 |
+
|
151 |
+
= 1.2.5 =
|
152 |
+
Added support for multiple interest groups, field formatting based on type and date picker.
|
153 |
+
|
154 |
+
== Changelog ==
|
155 |
+
|
156 |
+
= 1.5 =
|
157 |
+
* Upgrade to MailChimp API v3.0
|
158 |
+
* Remove OAuth2 middle layer and use MailChimp API keys
|
159 |
+
* Include double/single opt-in toggle.
|
160 |
+
|
161 |
+
= 1.4.1 =
|
162 |
+
* Update styles to be compatible with upcoming 3.8 wp-admin changes
|
163 |
+
|
164 |
+
= 1.4 =
|
165 |
+
* Developer Mode "Kitchen Sink" takes over plugin for local development
|
166 |
+
* Developer Mode has filters of changable content
|
167 |
+
* Fix bug related to required US phone validation
|
168 |
+
|
169 |
+
= 1.3 =
|
170 |
+
* Now using OAuth flow for user authentication
|
171 |
+
* Admin UI refresh
|
172 |
+
|
173 |
+
= 1.2.14 =
|
174 |
+
* Add link to edit profile within error when duplicate signup occurs
|
175 |
+
|
176 |
+
= 1.2.13 =
|
177 |
+
* Fixed bug preventing address fields from submitting correctly.
|
178 |
+
|
179 |
+
= 1.2.12 =
|
180 |
+
* Update spanish language files (es_ES and es_MX)
|
181 |
+
|
182 |
+
= 1.2.9 =
|
183 |
+
* Fixed bug where multiple checkbox type interest groups were returning an invalid error
|
184 |
+
* Fixed bug where assets were not enqueueing properly if the plugin directory was not set to 'mailchimp'. Now supports any directory name.
|
185 |
+
|
186 |
+
= 1.2.8 =
|
187 |
+
* Fixed bug where entire phone numbers were only being deposited in the area code portion
|
188 |
+
|
189 |
+
= 1.2.7 =
|
190 |
+
* CSS should now always load correctly on the front end
|
191 |
+
* Adding Hebrew and Romanian language support
|
192 |
+
* Updating translation contribution instructions
|
193 |
+
* Tested version is now 3.3.1
|
194 |
+
|
195 |
+
= 1.2.6 =
|
196 |
+
* Fixed bug with "Settings" link appearing on all plugins (props Jason Lane)
|
197 |
+
* Resolved issue with unnecessary calls to the MailChimp API during upgrade check
|
198 |
+
* Resolved PHP warning when there weren't any interest groups
|
199 |
+
|
200 |
+
= 1.2.5 =
|
201 |
+
* Field formatting based on type
|
202 |
+
* Support for multiple interest groups (a data upgrade procedure must be run by visiting the WordPress dashboard)
|
203 |
+
* Added jQuery datepicker option to be used with dates.
|
204 |
+
* Added a handful of new translations
|
205 |
+
* Fixing various PHP notices and deprecated functions (props Jeffry Ghazally)
|
206 |
+
|
207 |
+
= 1.2.4 =
|
208 |
+
* Version bump for proper listing on wordpress.org
|
209 |
+
|
210 |
+
= 1.2.3 =
|
211 |
+
* Change mailchimpSF_where_am_i() to use plugins_url() in place of WP_PLUGIN_URL to take SSL into account when delivering assets (props John LeBlanc)
|
212 |
+
* Update MCAPI wrapper to bring back PHP4 support (note: PHP 5.2 to be required starting with WordPress 3.2)
|
213 |
+
|
214 |
+
= 1.2.2 =
|
215 |
+
* Change MCAPI wrapper to use a more unique class name, v1.3 of the API, and a much lighter client library
|
216 |
+
|
217 |
+
= 1.2.1 =
|
218 |
+
* Fixed internationalization path bug.
|
219 |
+
* Fixed instances where i18n functions weren't necessary in admin.
|
220 |
+
* Added more strings to be translated.
|
221 |
+
|
222 |
+
= 1.2 =
|
223 |
+
* Recommended Upgrade, please see "Upgrading" section of readme.
|
224 |
+
* Security and various other improvements
|
225 |
+
|
css/admin.css
CHANGED
@@ -158,7 +158,7 @@ table.mc-list-select {
|
|
158 |
|
159 |
.mailchimp-header h2 {
|
160 |
float: right;
|
161 |
-
margin-top:
|
162 |
margin-right: 12px;
|
163 |
font-family: "HelveticaNeue-Bold", "Helvetica Neue Bold", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
164 |
font-weight: 700;
|
158 |
|
159 |
.mailchimp-header h2 {
|
160 |
float: right;
|
161 |
+
margin-top: 50px;
|
162 |
margin-right: 12px;
|
163 |
font-family: "HelveticaNeue-Bold", "Helvetica Neue Bold", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
|
164 |
font-weight: 700;
|
css/flick/flick.css
CHANGED
File without changes
|
css/flick/images/ui-bg_flat_0_aaaaaa_40x100.png
CHANGED
File without changes
|
css/flick/images/ui-bg_flat_0_eeeeee_40x100.png
CHANGED
File without changes
|
css/flick/images/ui-bg_flat_55_ffffff_40x100.png
CHANGED
File without changes
|
css/flick/images/ui-bg_flat_75_ffffff_40x100.png
CHANGED
File without changes
|
css/flick/images/ui-bg_glass_65_ffffff_1x400.png
CHANGED
File without changes
|
css/flick/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png
CHANGED
File without changes
|
css/flick/images/ui-bg_highlight-soft_25_0073ea_1x100.png
CHANGED
File without changes
|
css/flick/images/ui-bg_highlight-soft_50_dddddd_1x100.png
CHANGED
File without changes
|
css/flick/images/ui-icons_0073ea_256x240.png
CHANGED
File without changes
|
css/flick/images/ui-icons_454545_256x240.png
CHANGED
File without changes
|
css/flick/images/ui-icons_666666_256x240.png
CHANGED
File without changes
|
css/flick/images/ui-icons_ff0084_256x240.png
CHANGED
File without changes
|
css/flick/images/ui-icons_ffffff_256x240.png
CHANGED
File without changes
|
datepicker.js
ADDED
@@ -0,0 +1,1815 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* jQuery UI Datepicker 1.8.14
|
3 |
+
*
|
4 |
+
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
5 |
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
6 |
+
* http://jquery.org/license
|
7 |
+
*
|
8 |
+
* http://docs.jquery.com/UI/Datepicker
|
9 |
+
*
|
10 |
+
* Depends:
|
11 |
+
* jquery.ui.core.js
|
12 |
+
*/
|
13 |
+
(function( $, undefined ) {
|
14 |
+
|
15 |
+
$.extend($.ui, { datepicker: { version: "1.8.14" } });
|
16 |
+
|
17 |
+
var PROP_NAME = 'datepicker';
|
18 |
+
var dpuuid = new Date().getTime();
|
19 |
+
var instActive;
|
20 |
+
|
21 |
+
/* Date picker manager.
|
22 |
+
Use the singleton instance of this class, $.datepicker, to interact with the date picker.
|
23 |
+
Settings for (groups of) date pickers are maintained in an instance object,
|
24 |
+
allowing multiple different settings on the same page. */
|
25 |
+
|
26 |
+
function Datepicker() {
|
27 |
+
this.debug = false; // Change this to true to start debugging
|
28 |
+
this._curInst = null; // The current instance in use
|
29 |
+
this._keyEvent = false; // If the last event was a key event
|
30 |
+
this._disabledInputs = []; // List of date picker inputs that have been disabled
|
31 |
+
this._datepickerShowing = false; // True if the popup picker is showing , false if not
|
32 |
+
this._inDialog = false; // True if showing within a "dialog", false if not
|
33 |
+
this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
|
34 |
+
this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
|
35 |
+
this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
|
36 |
+
this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
|
37 |
+
this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
|
38 |
+
this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
|
39 |
+
this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
|
40 |
+
this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
|
41 |
+
this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
|
42 |
+
this.regional = []; // Available regional settings, indexed by language code
|
43 |
+
this.regional[''] = { // Default regional settings
|
44 |
+
closeText: 'Done', // Display text for close link
|
45 |
+
prevText: 'Prev', // Display text for previous month link
|
46 |
+
nextText: 'Next', // Display text for next month link
|
47 |
+
currentText: 'Today', // Display text for current month link
|
48 |
+
monthNames: ['January','February','March','April','May','June',
|
49 |
+
'July','August','September','October','November','December'], // Names of months for drop-down and formatting
|
50 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
|
51 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
|
52 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
|
53 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
|
54 |
+
weekHeader: 'Wk', // Column header for week of the year
|
55 |
+
dateFormat: 'mm/dd/yy', // See format options on parseDate
|
56 |
+
firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
|
57 |
+
isRTL: false, // True if right-to-left language, false if left-to-right
|
58 |
+
showMonthAfterYear: false, // True if the year select precedes month, false for month then year
|
59 |
+
yearSuffix: '' // Additional text to append to the year in the month headers
|
60 |
+
};
|
61 |
+
this._defaults = { // Global defaults for all the date picker instances
|
62 |
+
showOn: 'focus', // 'focus' for popup on focus,
|
63 |
+
// 'button' for trigger button, or 'both' for either
|
64 |
+
showAnim: 'fadeIn', // Name of jQuery animation for popup
|
65 |
+
showOptions: {}, // Options for enhanced animations
|
66 |
+
defaultDate: null, // Used when field is blank: actual date,
|
67 |
+
// +/-number for offset from today, null for today
|
68 |
+
appendText: '', // Display text following the input box, e.g. showing the format
|
69 |
+
buttonText: '...', // Text for trigger button
|
70 |
+
buttonImage: '', // URL for trigger button image
|
71 |
+
buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
|
72 |
+
hideIfNoPrevNext: false, // True to hide next/previous month links
|
73 |
+
// if not applicable, false to just disable them
|
74 |
+
navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
|
75 |
+
gotoCurrent: false, // True if today link goes back to current selection instead
|
76 |
+
changeMonth: false, // True if month can be selected directly, false if only prev/next
|
77 |
+
changeYear: false, // True if year can be selected directly, false if only prev/next
|
78 |
+
yearRange: 'c-10:c+10', // Range of years to display in drop-down,
|
79 |
+
// either relative to today's year (-nn:+nn), relative to currently displayed year
|
80 |
+
// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
|
81 |
+
showOtherMonths: false, // True to show dates in other months, false to leave blank
|
82 |
+
selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
|
83 |
+
showWeek: false, // True to show week of the year, false to not show it
|
84 |
+
calculateWeek: this.iso8601Week, // How to calculate the week of the year,
|
85 |
+
// takes a Date and returns the number of the week for it
|
86 |
+
shortYearCutoff: '+10', // Short year values < this are in the current century,
|
87 |
+
// > this are in the previous century,
|
88 |
+
// string value starting with '+' for current year + value
|
89 |
+
minDate: null, // The earliest selectable date, or null for no limit
|
90 |
+
maxDate: null, // The latest selectable date, or null for no limit
|
91 |
+
duration: 'fast', // Duration of display/closure
|
92 |
+
beforeShowDay: null, // Function that takes a date and returns an array with
|
93 |
+
// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
|
94 |
+
// [2] = cell title (optional), e.g. $.datepicker.noWeekends
|
95 |
+
beforeShow: null, // Function that takes an input field and
|
96 |
+
// returns a set of custom settings for the date picker
|
97 |
+
onSelect: null, // Define a callback function when a date is selected
|
98 |
+
onChangeMonthYear: null, // Define a callback function when the month or year is changed
|
99 |
+
onClose: null, // Define a callback function when the datepicker is closed
|
100 |
+
numberOfMonths: 1, // Number of months to show at a time
|
101 |
+
showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
|
102 |
+
stepMonths: 1, // Number of months to step back/forward
|
103 |
+
stepBigMonths: 12, // Number of months to step back/forward for the big links
|
104 |
+
altField: '', // Selector for an alternate field to store selected dates into
|
105 |
+
altFormat: '', // The date format to use for the alternate field
|
106 |
+
constrainInput: true, // The input is constrained by the current date format
|
107 |
+
showButtonPanel: false, // True to show button panel, false to not show it
|
108 |
+
autoSize: false // True to size the input for the date format, false to leave as is
|
109 |
+
};
|
110 |
+
$.extend(this._defaults, this.regional['']);
|
111 |
+
this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'));
|
112 |
+
}
|
113 |
+
|
114 |
+
$.extend(Datepicker.prototype, {
|
115 |
+
/* Class name added to elements to indicate already configured with a date picker. */
|
116 |
+
markerClassName: 'hasDatepicker',
|
117 |
+
|
118 |
+
//Keep track of the maximum number of rows displayed (see #7043)
|
119 |
+
maxRows: 4,
|
120 |
+
|
121 |
+
/* Debug logging (if enabled). */
|
122 |
+
log: function () {
|
123 |
+
if (this.debug)
|
124 |
+
console.log.apply('', arguments);
|
125 |
+
},
|
126 |
+
|
127 |
+
// TODO rename to "widget" when switching to widget factory
|
128 |
+
_widgetDatepicker: function() {
|
129 |
+
return this.dpDiv;
|
130 |
+
},
|
131 |
+
|
132 |
+
/* Override the default settings for all instances of the date picker.
|
133 |
+
@param settings object - the new settings to use as defaults (anonymous object)
|
134 |
+
@return the manager object */
|
135 |
+
setDefaults: function(settings) {
|
136 |
+
extendRemove(this._defaults, settings || {});
|
137 |
+
return this;
|
138 |
+
},
|
139 |
+
|
140 |
+
/* Attach the date picker to a jQuery selection.
|
141 |
+
@param target element - the target input field or division or span
|
142 |
+
@param settings object - the new settings to use for this date picker instance (anonymous) */
|
143 |
+
_attachDatepicker: function(target, settings) {
|
144 |
+
// check for settings on the control itself - in namespace 'date:'
|
145 |
+
var inlineSettings = null;
|
146 |
+
for (var attrName in this._defaults) {
|
147 |
+
var attrValue = target.getAttribute('date:' + attrName);
|
148 |
+
if (attrValue) {
|
149 |
+
inlineSettings = inlineSettings || {};
|
150 |
+
try {
|
151 |
+
inlineSettings[attrName] = eval(attrValue);
|
152 |
+
} catch (err) {
|
153 |
+
inlineSettings[attrName] = attrValue;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
}
|
157 |
+
var nodeName = target.nodeName.toLowerCase();
|
158 |
+
var inline = (nodeName == 'div' || nodeName == 'span');
|
159 |
+
if (!target.id) {
|
160 |
+
this.uuid += 1;
|
161 |
+
target.id = 'dp' + this.uuid;
|
162 |
+
}
|
163 |
+
var inst = this._newInst($(target), inline);
|
164 |
+
inst.settings = $.extend({}, settings || {}, inlineSettings || {});
|
165 |
+
if (nodeName == 'input') {
|
166 |
+
this._connectDatepicker(target, inst);
|
167 |
+
} else if (inline) {
|
168 |
+
this._inlineDatepicker(target, inst);
|
169 |
+
}
|
170 |
+
},
|
171 |
+
|
172 |
+
/* Create a new instance object. */
|
173 |
+
_newInst: function(target, inline) {
|
174 |
+
var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
|
175 |
+
return {id: id, input: target, // associated target
|
176 |
+
selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
|
177 |
+
drawMonth: 0, drawYear: 0, // month being drawn
|
178 |
+
inline: inline, // is datepicker inline or not
|
179 |
+
dpDiv: (!inline ? this.dpDiv : // presentation div
|
180 |
+
bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')))};
|
181 |
+
},
|
182 |
+
|
183 |
+
/* Attach the date picker to an input field. */
|
184 |
+
_connectDatepicker: function(target, inst) {
|
185 |
+
var input = $(target);
|
186 |
+
inst.append = $([]);
|
187 |
+
inst.trigger = $([]);
|
188 |
+
if (input.hasClass(this.markerClassName))
|
189 |
+
return;
|
190 |
+
this._attachments(input, inst);
|
191 |
+
input.addClass(this.markerClassName).keydown(this._doKeyDown).
|
192 |
+
keypress(this._doKeyPress).keyup(this._doKeyUp).
|
193 |
+
bind("setData.datepicker", function(event, key, value) {
|
194 |
+
inst.settings[key] = value;
|
195 |
+
}).bind("getData.datepicker", function(event, key) {
|
196 |
+
return this._get(inst, key);
|
197 |
+
});
|
198 |
+
this._autoSize(inst);
|
199 |
+
$.data(target, PROP_NAME, inst);
|
200 |
+
},
|
201 |
+
|
202 |
+
/* Make attachments based on settings. */
|
203 |
+
_attachments: function(input, inst) {
|
204 |
+
var appendText = this._get(inst, 'appendText');
|
205 |
+
var isRTL = this._get(inst, 'isRTL');
|
206 |
+
if (inst.append)
|
207 |
+
inst.append.remove();
|
208 |
+
if (appendText) {
|
209 |
+
inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
|
210 |
+
input[isRTL ? 'before' : 'after'](inst.append);
|
211 |
+
}
|
212 |
+
input.unbind('focus', this._showDatepicker);
|
213 |
+
if (inst.trigger)
|
214 |
+
inst.trigger.remove();
|
215 |
+
var showOn = this._get(inst, 'showOn');
|
216 |
+
if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
|
217 |
+
input.focus(this._showDatepicker);
|
218 |
+
if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
|
219 |
+
var buttonText = this._get(inst, 'buttonText');
|
220 |
+
var buttonImage = this._get(inst, 'buttonImage');
|
221 |
+
inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
|
222 |
+
$('<img/>').addClass(this._triggerClass).
|
223 |
+
attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
|
224 |
+
$('<button type="button"></button>').addClass(this._triggerClass).
|
225 |
+
html(buttonImage == '' ? buttonText : $('<img/>').attr(
|
226 |
+
{ src:buttonImage, alt:buttonText, title:buttonText })));
|
227 |
+
input[isRTL ? 'before' : 'after'](inst.trigger);
|
228 |
+
inst.trigger.click(function() {
|
229 |
+
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
|
230 |
+
$.datepicker._hideDatepicker();
|
231 |
+
else
|
232 |
+
$.datepicker._showDatepicker(input[0]);
|
233 |
+
return false;
|
234 |
+
});
|
235 |
+
}
|
236 |
+
},
|
237 |
+
|
238 |
+
/* Apply the maximum length for the date format. */
|
239 |
+
_autoSize: function(inst) {
|
240 |
+
if (this._get(inst, 'autoSize') && !inst.inline) {
|
241 |
+
var date = new Date(2009, 12 - 1, 20); // Ensure double digits
|
242 |
+
var dateFormat = this._get(inst, 'dateFormat');
|
243 |
+
if (dateFormat.match(/[DM]/)) {
|
244 |
+
var findMax = function(names) {
|
245 |
+
var max = 0;
|
246 |
+
var maxI = 0;
|
247 |
+
for (var i = 0; i < names.length; i++) {
|
248 |
+
if (names[i].length > max) {
|
249 |
+
max = names[i].length;
|
250 |
+
maxI = i;
|
251 |
+
}
|
252 |
+
}
|
253 |
+
return maxI;
|
254 |
+
};
|
255 |
+
date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
|
256 |
+
'monthNames' : 'monthNamesShort'))));
|
257 |
+
date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
|
258 |
+
'dayNames' : 'dayNamesShort'))) + 20 - date.getDay());
|
259 |
+
}
|
260 |
+
inst.input.attr('size', this._formatDate(inst, date).length);
|
261 |
+
}
|
262 |
+
},
|
263 |
+
|
264 |
+
/* Attach an inline date picker to a div. */
|
265 |
+
_inlineDatepicker: function(target, inst) {
|
266 |
+
var divSpan = $(target);
|
267 |
+
if (divSpan.hasClass(this.markerClassName))
|
268 |
+
return;
|
269 |
+
divSpan.addClass(this.markerClassName).append(inst.dpDiv).
|
270 |
+
bind("setData.datepicker", function(event, key, value){
|
271 |
+
inst.settings[key] = value;
|
272 |
+
}).bind("getData.datepicker", function(event, key){
|
273 |
+
return this._get(inst, key);
|
274 |
+
});
|
275 |
+
$.data(target, PROP_NAME, inst);
|
276 |
+
this._setDate(inst, this._getDefaultDate(inst), true);
|
277 |
+
this._updateDatepicker(inst);
|
278 |
+
this._updateAlternate(inst);
|
279 |
+
inst.dpDiv.show();
|
280 |
+
},
|
281 |
+
|
282 |
+
/* Pop-up the date picker in a "dialog" box.
|
283 |
+
@param input element - ignored
|
284 |
+
@param date string or Date - the initial date to display
|
285 |
+
@param onSelect function - the function to call when a date is selected
|
286 |
+
@param settings object - update the dialog date picker instance's settings (anonymous object)
|
287 |
+
@param pos int[2] - coordinates for the dialog's position within the screen or
|
288 |
+
event - with x/y coordinates or
|
289 |
+
leave empty for default (screen centre)
|
290 |
+
@return the manager object */
|
291 |
+
_dialogDatepicker: function(input, date, onSelect, settings, pos) {
|
292 |
+
var inst = this._dialogInst; // internal instance
|
293 |
+
if (!inst) {
|
294 |
+
this.uuid += 1;
|
295 |
+
var id = 'dp' + this.uuid;
|
296 |
+
this._dialogInput = $('<input type="text" id="' + id +
|
297 |
+
'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
|
298 |
+
this._dialogInput.keydown(this._doKeyDown);
|
299 |
+
$('body').append(this._dialogInput);
|
300 |
+
inst = this._dialogInst = this._newInst(this._dialogInput, false);
|
301 |
+
inst.settings = {};
|
302 |
+
$.data(this._dialogInput[0], PROP_NAME, inst);
|
303 |
+
}
|
304 |
+
extendRemove(inst.settings, settings || {});
|
305 |
+
date = (date && date.constructor == Date ? this._formatDate(inst, date) : date);
|
306 |
+
this._dialogInput.val(date);
|
307 |
+
|
308 |
+
this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
|
309 |
+
if (!this._pos) {
|
310 |
+
var browserWidth = document.documentElement.clientWidth;
|
311 |
+
var browserHeight = document.documentElement.clientHeight;
|
312 |
+
var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
|
313 |
+
var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
|
314 |
+
this._pos = // should use actual width/height below
|
315 |
+
[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
|
316 |
+
}
|
317 |
+
|
318 |
+
// move input on screen for focus, but hidden behind dialog
|
319 |
+
this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px');
|
320 |
+
inst.settings.onSelect = onSelect;
|
321 |
+
this._inDialog = true;
|
322 |
+
this.dpDiv.addClass(this._dialogClass);
|
323 |
+
this._showDatepicker(this._dialogInput[0]);
|
324 |
+
if ($.blockUI)
|
325 |
+
$.blockUI(this.dpDiv);
|
326 |
+
$.data(this._dialogInput[0], PROP_NAME, inst);
|
327 |
+
return this;
|
328 |
+
},
|
329 |
+
|
330 |
+
/* Detach a datepicker from its control.
|
331 |
+
@param target element - the target input field or division or span */
|
332 |
+
_destroyDatepicker: function(target) {
|
333 |
+
var $target = $(target);
|
334 |
+
var inst = $.data(target, PROP_NAME);
|
335 |
+
if (!$target.hasClass(this.markerClassName)) {
|
336 |
+
return;
|
337 |
+
}
|
338 |
+
var nodeName = target.nodeName.toLowerCase();
|
339 |
+
$.removeData(target, PROP_NAME);
|
340 |
+
if (nodeName == 'input') {
|
341 |
+
inst.append.remove();
|
342 |
+
inst.trigger.remove();
|
343 |
+
$target.removeClass(this.markerClassName).
|
344 |
+
unbind('focus', this._showDatepicker).
|
345 |
+
unbind('keydown', this._doKeyDown).
|
346 |
+
unbind('keypress', this._doKeyPress).
|
347 |
+
unbind('keyup', this._doKeyUp);
|
348 |
+
} else if (nodeName == 'div' || nodeName == 'span')
|
349 |
+
$target.removeClass(this.markerClassName).empty();
|
350 |
+
},
|
351 |
+
|
352 |
+
/* Enable the date picker to a jQuery selection.
|
353 |
+
@param target element - the target input field or division or span */
|
354 |
+
_enableDatepicker: function(target) {
|
355 |
+
var $target = $(target);
|
356 |
+
var inst = $.data(target, PROP_NAME);
|
357 |
+
if (!$target.hasClass(this.markerClassName)) {
|
358 |
+
return;
|
359 |
+
}
|
360 |
+
var nodeName = target.nodeName.toLowerCase();
|
361 |
+
if (nodeName == 'input') {
|
362 |
+
target.disabled = false;
|
363 |
+
inst.trigger.filter('button').
|
364 |
+
each(function() { this.disabled = false; }).end().
|
365 |
+
filter('img').css({opacity: '1.0', cursor: ''});
|
366 |
+
}
|
367 |
+
else if (nodeName == 'div' || nodeName == 'span') {
|
368 |
+
var inline = $target.children('.' + this._inlineClass);
|
369 |
+
inline.children().removeClass('ui-state-disabled');
|
370 |
+
inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
|
371 |
+
removeAttr("disabled");
|
372 |
+
}
|
373 |
+
this._disabledInputs = $.map(this._disabledInputs,
|
374 |
+
function(value) { return (value == target ? null : value); }); // delete entry
|
375 |
+
},
|
376 |
+
|
377 |
+
/* Disable the date picker to a jQuery selection.
|
378 |
+
@param target element - the target input field or division or span */
|
379 |
+
_disableDatepicker: function(target) {
|
380 |
+
var $target = $(target);
|
381 |
+
var inst = $.data(target, PROP_NAME);
|
382 |
+
if (!$target.hasClass(this.markerClassName)) {
|
383 |
+
return;
|
384 |
+
}
|
385 |
+
var nodeName = target.nodeName.toLowerCase();
|
386 |
+
if (nodeName == 'input') {
|
387 |
+
target.disabled = true;
|
388 |
+
inst.trigger.filter('button').
|
389 |
+
each(function() { this.disabled = true; }).end().
|
390 |
+
filter('img').css({opacity: '0.5', cursor: 'default'});
|
391 |
+
}
|
392 |
+
else if (nodeName == 'div' || nodeName == 'span') {
|
393 |
+
var inline = $target.children('.' + this._inlineClass);
|
394 |
+
inline.children().addClass('ui-state-disabled');
|
395 |
+
inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
|
396 |
+
attr("disabled", "disabled");
|
397 |
+
}
|
398 |
+
this._disabledInputs = $.map(this._disabledInputs,
|
399 |
+
function(value) { return (value == target ? null : value); }); // delete entry
|
400 |
+
this._disabledInputs[this._disabledInputs.length] = target;
|
401 |
+
},
|
402 |
+
|
403 |
+
/* Is the first field in a jQuery collection disabled as a datepicker?
|
404 |
+
@param target element - the target input field or division or span
|
405 |
+
@return boolean - true if disabled, false if enabled */
|
406 |
+
_isDisabledDatepicker: function(target) {
|
407 |
+
if (!target) {
|
408 |
+
return false;
|
409 |
+
}
|
410 |
+
for (var i = 0; i < this._disabledInputs.length; i++) {
|
411 |
+
if (this._disabledInputs[i] == target)
|
412 |
+
return true;
|
413 |
+
}
|
414 |
+
return false;
|
415 |
+
},
|
416 |
+
|
417 |
+
/* Retrieve the instance data for the target control.
|
418 |
+
@param target element - the target input field or division or span
|
419 |
+
@return object - the associated instance data
|
420 |
+
@throws error if a jQuery problem getting data */
|
421 |
+
_getInst: function(target) {
|
422 |
+
try {
|
423 |
+
return $.data(target, PROP_NAME);
|
424 |
+
}
|
425 |
+
catch (err) {
|
426 |
+
throw 'Missing instance data for this datepicker';
|
427 |
+
}
|
428 |
+
},
|
429 |
+
|
430 |
+
/* Update or retrieve the settings for a date picker attached to an input field or division.
|
431 |
+
@param target element - the target input field or division or span
|
432 |
+
@param name object - the new settings to update or
|
433 |
+
string - the name of the setting to change or retrieve,
|
434 |
+
when retrieving also 'all' for all instance settings or
|
435 |
+
'defaults' for all global defaults
|
436 |
+
@param value any - the new value for the setting
|
437 |
+
(omit if above is an object or to retrieve a value) */
|
438 |
+
_optionDatepicker: function(target, name, value) {
|
439 |
+
var inst = this._getInst(target);
|
440 |
+
if (arguments.length == 2 && typeof name == 'string') {
|
441 |
+
return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
|
442 |
+
(inst ? (name == 'all' ? $.extend({}, inst.settings) :
|
443 |
+
this._get(inst, name)) : null));
|
444 |
+
}
|
445 |
+
var settings = name || {};
|
446 |
+
if (typeof name == 'string') {
|
447 |
+
settings = {};
|
448 |
+
settings[name] = value;
|
449 |
+
}
|
450 |
+
if (inst) {
|
451 |
+
if (this._curInst == inst) {
|
452 |
+
this._hideDatepicker();
|
453 |
+
}
|
454 |
+
var date = this._getDateDatepicker(target, true);
|
455 |
+
var minDate = this._getMinMaxDate(inst, 'min');
|
456 |
+
var maxDate = this._getMinMaxDate(inst, 'max');
|
457 |
+
extendRemove(inst.settings, settings);
|
458 |
+
// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
|
459 |
+
if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined)
|
460 |
+
inst.settings.minDate = this._formatDate(inst, minDate);
|
461 |
+
if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined)
|
462 |
+
inst.settings.maxDate = this._formatDate(inst, maxDate);
|
463 |
+
this._attachments($(target), inst);
|
464 |
+
this._autoSize(inst);
|
465 |
+
this._setDate(inst, date);
|
466 |
+
this._updateAlternate(inst);
|
467 |
+
this._updateDatepicker(inst);
|
468 |
+
}
|
469 |
+
},
|
470 |
+
|
471 |
+
// change method deprecated
|
472 |
+
_changeDatepicker: function(target, name, value) {
|
473 |
+
this._optionDatepicker(target, name, value);
|
474 |
+
},
|
475 |
+
|
476 |
+
/* Redraw the date picker attached to an input field or division.
|
477 |
+
@param target element - the target input field or division or span */
|
478 |
+
_refreshDatepicker: function(target) {
|
479 |
+
var inst = this._getInst(target);
|
480 |
+
if (inst) {
|
481 |
+
this._updateDatepicker(inst);
|
482 |
+
}
|
483 |
+
},
|
484 |
+
|
485 |
+
/* Set the dates for a jQuery selection.
|
486 |
+
@param target element - the target input field or division or span
|
487 |
+
@param date Date - the new date */
|
488 |
+
_setDateDatepicker: function(target, date) {
|
489 |
+
var inst = this._getInst(target);
|
490 |
+
if (inst) {
|
491 |
+
this._setDate(inst, date);
|
492 |
+
this._updateDatepicker(inst);
|
493 |
+
this._updateAlternate(inst);
|
494 |
+
}
|
495 |
+
},
|
496 |
+
|
497 |
+
/* Get the date(s) for the first entry in a jQuery selection.
|
498 |
+
@param target element - the target input field or division or span
|
499 |
+
@param noDefault boolean - true if no default date is to be used
|
500 |
+
@return Date - the current date */
|
501 |
+
_getDateDatepicker: function(target, noDefault) {
|
502 |
+
var inst = this._getInst(target);
|
503 |
+
if (inst && !inst.inline)
|
504 |
+
this._setDateFromField(inst, noDefault);
|
505 |
+
return (inst ? this._getDate(inst) : null);
|
506 |
+
},
|
507 |
+
|
508 |
+
/* Handle keystrokes. */
|
509 |
+
_doKeyDown: function(event) {
|
510 |
+
var inst = $.datepicker._getInst(event.target);
|
511 |
+
var handled = true;
|
512 |
+
var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
|
513 |
+
inst._keyEvent = true;
|
514 |
+
if ($.datepicker._datepickerShowing)
|
515 |
+
switch (event.keyCode) {
|
516 |
+
case 9: $.datepicker._hideDatepicker();
|
517 |
+
handled = false;
|
518 |
+
break; // hide on tab out
|
519 |
+
case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' +
|
520 |
+
$.datepicker._currentClass + ')', inst.dpDiv);
|
521 |
+
if (sel[0])
|
522 |
+
$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
|
523 |
+
else
|
524 |
+
$.datepicker._hideDatepicker();
|
525 |
+
return false; // don't submit the form
|
526 |
+
break; // select the value on enter
|
527 |
+
case 27: $.datepicker._hideDatepicker();
|
528 |
+
break; // hide on escape
|
529 |
+
case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
530 |
+
-$.datepicker._get(inst, 'stepBigMonths') :
|
531 |
+
-$.datepicker._get(inst, 'stepMonths')), 'M');
|
532 |
+
break; // previous month/year on page up/+ ctrl
|
533 |
+
case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
534 |
+
+$.datepicker._get(inst, 'stepBigMonths') :
|
535 |
+
+$.datepicker._get(inst, 'stepMonths')), 'M');
|
536 |
+
break; // next month/year on page down/+ ctrl
|
537 |
+
case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
|
538 |
+
handled = event.ctrlKey || event.metaKey;
|
539 |
+
break; // clear on ctrl or command +end
|
540 |
+
case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
|
541 |
+
handled = event.ctrlKey || event.metaKey;
|
542 |
+
break; // current on ctrl or command +home
|
543 |
+
case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
|
544 |
+
handled = event.ctrlKey || event.metaKey;
|
545 |
+
// -1 day on ctrl or command +left
|
546 |
+
if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
547 |
+
-$.datepicker._get(inst, 'stepBigMonths') :
|
548 |
+
-$.datepicker._get(inst, 'stepMonths')), 'M');
|
549 |
+
// next month/year on alt +left on Mac
|
550 |
+
break;
|
551 |
+
case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
|
552 |
+
handled = event.ctrlKey || event.metaKey;
|
553 |
+
break; // -1 week on ctrl or command +up
|
554 |
+
case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
|
555 |
+
handled = event.ctrlKey || event.metaKey;
|
556 |
+
// +1 day on ctrl or command +right
|
557 |
+
if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
|
558 |
+
+$.datepicker._get(inst, 'stepBigMonths') :
|
559 |
+
+$.datepicker._get(inst, 'stepMonths')), 'M');
|
560 |
+
// next month/year on alt +right
|
561 |
+
break;
|
562 |
+
case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
|
563 |
+
handled = event.ctrlKey || event.metaKey;
|
564 |
+
break; // +1 week on ctrl or command +down
|
565 |
+
default: handled = false;
|
566 |
+
}
|
567 |
+
else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
|
568 |
+
$.datepicker._showDatepicker(this);
|
569 |
+
else {
|
570 |
+
handled = false;
|
571 |
+
}
|
572 |
+
if (handled) {
|
573 |
+
event.preventDefault();
|
574 |
+
event.stopPropagation();
|
575 |
+
}
|
576 |
+
},
|
577 |
+
|
578 |
+
/* Filter entered characters - based on date format. */
|
579 |
+
_doKeyPress: function(event) {
|
580 |
+
var inst = $.datepicker._getInst(event.target);
|
581 |
+
if ($.datepicker._get(inst, 'constrainInput')) {
|
582 |
+
var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
|
583 |
+
var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
|
584 |
+
return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
|
585 |
+
}
|
586 |
+
},
|
587 |
+
|
588 |
+
/* Synchronise manual entry and field/alternate field. */
|
589 |
+
_doKeyUp: function(event) {
|
590 |
+
var inst = $.datepicker._getInst(event.target);
|
591 |
+
if (inst.input.val() != inst.lastVal) {
|
592 |
+
try {
|
593 |
+
var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
|
594 |
+
(inst.input ? inst.input.val() : null),
|
595 |
+
$.datepicker._getFormatConfig(inst));
|
596 |
+
if (date) { // only if valid
|
597 |
+
$.datepicker._setDateFromField(inst);
|
598 |
+
$.datepicker._updateAlternate(inst);
|
599 |
+
$.datepicker._updateDatepicker(inst);
|
600 |
+
}
|
601 |
+
}
|
602 |
+
catch (event) {
|
603 |
+
$.datepicker.log(event);
|
604 |
+
}
|
605 |
+
}
|
606 |
+
return true;
|
607 |
+
},
|
608 |
+
|
609 |
+
/* Pop-up the date picker for a given input field.
|
610 |
+
@param input element - the input field attached to the date picker or
|
611 |
+
event - if triggered by focus */
|
612 |
+
_showDatepicker: function(input) {
|
613 |
+
input = input.target || input;
|
614 |
+
if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
|
615 |
+
input = $('input', input.parentNode)[0];
|
616 |
+
if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
|
617 |
+
return;
|
618 |
+
var inst = $.datepicker._getInst(input);
|
619 |
+
if ($.datepicker._curInst && $.datepicker._curInst != inst) {
|
620 |
+
if ( $.datepicker._datepickerShowing ) {
|
621 |
+
$.datepicker._triggerOnClose($.datepicker._curInst);
|
622 |
+
}
|
623 |
+
$.datepicker._curInst.dpDiv.stop(true, true);
|
624 |
+
}
|
625 |
+
var beforeShow = $.datepicker._get(inst, 'beforeShow');
|
626 |
+
extendRemove(inst.settings, (beforeShow ? beforeShow.apply(input, [input, inst]) : {}));
|
627 |
+
inst.lastVal = null;
|
628 |
+
$.datepicker._lastInput = input;
|
629 |
+
$.datepicker._setDateFromField(inst);
|
630 |
+
if ($.datepicker._inDialog) // hide cursor
|
631 |
+
input.value = '';
|
632 |
+
if (!$.datepicker._pos) { // position below input
|
633 |
+
$.datepicker._pos = $.datepicker._findPos(input);
|
634 |
+
$.datepicker._pos[1] += input.offsetHeight; // add the height
|
635 |
+
}
|
636 |
+
var isFixed = false;
|
637 |
+
$(input).parents().each(function() {
|
638 |
+
isFixed |= $(this).css('position') == 'fixed';
|
639 |
+
return !isFixed;
|
640 |
+
});
|
641 |
+
if (isFixed && $.browser.opera) { // correction for Opera when fixed and scrolled
|
642 |
+
$.datepicker._pos[0] -= document.documentElement.scrollLeft;
|
643 |
+
$.datepicker._pos[1] -= document.documentElement.scrollTop;
|
644 |
+
}
|
645 |
+
var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
|
646 |
+
$.datepicker._pos = null;
|
647 |
+
//to avoid flashes on Firefox
|
648 |
+
inst.dpDiv.empty();
|
649 |
+
// determine sizing offscreen
|
650 |
+
inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
|
651 |
+
$.datepicker._updateDatepicker(inst);
|
652 |
+
// fix width for dynamic number of date pickers
|
653 |
+
// and adjust position before showing
|
654 |
+
offset = $.datepicker._checkOffset(inst, offset, isFixed);
|
655 |
+
inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
|
656 |
+
'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
|
657 |
+
left: offset.left + 'px', top: offset.top + 'px'});
|
658 |
+
if (!inst.inline) {
|
659 |
+
var showAnim = $.datepicker._get(inst, 'showAnim');
|
660 |
+
var duration = $.datepicker._get(inst, 'duration');
|
661 |
+
var postProcess = function() {
|
662 |
+
var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
|
663 |
+
if( !! cover.length ){
|
664 |
+
var borders = $.datepicker._getBorders(inst.dpDiv);
|
665 |
+
cover.css({left: -borders[0], top: -borders[1],
|
666 |
+
width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
|
667 |
+
}
|
668 |
+
};
|
669 |
+
inst.dpDiv.zIndex($(input).zIndex()+1);
|
670 |
+
$.datepicker._datepickerShowing = true;
|
671 |
+
if ($.effects && $.effects[showAnim])
|
672 |
+
inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
|
673 |
+
else
|
674 |
+
inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
|
675 |
+
if (!showAnim || !duration)
|
676 |
+
postProcess();
|
677 |
+
if (inst.input.is(':visible') && !inst.input.is(':disabled'))
|
678 |
+
inst.input.focus();
|
679 |
+
$.datepicker._curInst = inst;
|
680 |
+
}
|
681 |
+
},
|
682 |
+
|
683 |
+
/* Generate the date picker content. */
|
684 |
+
_updateDatepicker: function(inst) {
|
685 |
+
var self = this;
|
686 |
+
self.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
|
687 |
+
var borders = $.datepicker._getBorders(inst.dpDiv);
|
688 |
+
instActive = inst; // for delegate hover events
|
689 |
+
inst.dpDiv.empty().append(this._generateHTML(inst));
|
690 |
+
var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
|
691 |
+
if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
|
692 |
+
cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
|
693 |
+
}
|
694 |
+
inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
|
695 |
+
var numMonths = this._getNumberOfMonths(inst);
|
696 |
+
var cols = numMonths[1];
|
697 |
+
var width = 17;
|
698 |
+
inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
|
699 |
+
if (cols > 1)
|
700 |
+
inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
|
701 |
+
inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
|
702 |
+
'Class']('ui-datepicker-multi');
|
703 |
+
inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
|
704 |
+
'Class']('ui-datepicker-rtl');
|
705 |
+
if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
|
706 |
+
// #6694 - don't focus the input if it's already focused
|
707 |
+
// this breaks the change event in IE
|
708 |
+
inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
|
709 |
+
inst.input.focus();
|
710 |
+
// deffered render of the years select (to avoid flashes on Firefox)
|
711 |
+
if( inst.yearshtml ){
|
712 |
+
var origyearshtml = inst.yearshtml;
|
713 |
+
setTimeout(function(){
|
714 |
+
//assure that inst.yearshtml didn't change.
|
715 |
+
if( origyearshtml === inst.yearshtml && inst.yearshtml ){
|
716 |
+
inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
|
717 |
+
}
|
718 |
+
origyearshtml = inst.yearshtml = null;
|
719 |
+
}, 0);
|
720 |
+
}
|
721 |
+
},
|
722 |
+
|
723 |
+
/* Retrieve the size of left and top borders for an element.
|
724 |
+
@param elem (jQuery object) the element of interest
|
725 |
+
@return (number[2]) the left and top borders */
|
726 |
+
_getBorders: function(elem) {
|
727 |
+
var convert = function(value) {
|
728 |
+
return {thin: 1, medium: 2, thick: 3}[value] || value;
|
729 |
+
};
|
730 |
+
return [parseFloat(convert(elem.css('border-left-width'))),
|
731 |
+
parseFloat(convert(elem.css('border-top-width')))];
|
732 |
+
},
|
733 |
+
|
734 |
+
/* Check positioning to remain on screen. */
|
735 |
+
_checkOffset: function(inst, offset, isFixed) {
|
736 |
+
var dpWidth = inst.dpDiv.outerWidth();
|
737 |
+
var dpHeight = inst.dpDiv.outerHeight();
|
738 |
+
var inputWidth = inst.input ? inst.input.outerWidth() : 0;
|
739 |
+
var inputHeight = inst.input ? inst.input.outerHeight() : 0;
|
740 |
+
var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
|
741 |
+
var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
|
742 |
+
|
743 |
+
offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
|
744 |
+
offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
|
745 |
+
offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
|
746 |
+
|
747 |
+
// now check if datepicker is showing outside window viewport - move to a better place if so.
|
748 |
+
offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
|
749 |
+
Math.abs(offset.left + dpWidth - viewWidth) : 0);
|
750 |
+
offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
|
751 |
+
Math.abs(dpHeight + inputHeight) : 0);
|
752 |
+
|
753 |
+
return offset;
|
754 |
+
},
|
755 |
+
|
756 |
+
/* Find an object's position on the screen. */
|
757 |
+
_findPos: function(obj) {
|
758 |
+
var inst = this._getInst(obj);
|
759 |
+
var isRTL = this._get(inst, 'isRTL');
|
760 |
+
while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {
|
761 |
+
obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
|
762 |
+
}
|
763 |
+
var position = $(obj).offset();
|
764 |
+
return [position.left, position.top];
|
765 |
+
},
|
766 |
+
|
767 |
+
/* Trigger custom callback of onClose. */
|
768 |
+
_triggerOnClose: function(inst) {
|
769 |
+
var onClose = this._get(inst, 'onClose');
|
770 |
+
if (onClose)
|
771 |
+
onClose.apply((inst.input ? inst.input[0] : null),
|
772 |
+
[(inst.input ? inst.input.val() : ''), inst]);
|
773 |
+
},
|
774 |
+
|
775 |
+
/* Hide the date picker from view.
|
776 |
+
@param input element - the input field attached to the date picker */
|
777 |
+
_hideDatepicker: function(input) {
|
778 |
+
var inst = this._curInst;
|
779 |
+
if (!inst || (input && inst != $.data(input, PROP_NAME)))
|
780 |
+
return;
|
781 |
+
if (this._datepickerShowing) {
|
782 |
+
var showAnim = this._get(inst, 'showAnim');
|
783 |
+
var duration = this._get(inst, 'duration');
|
784 |
+
var postProcess = function() {
|
785 |
+
$.datepicker._tidyDialog(inst);
|
786 |
+
this._curInst = null;
|
787 |
+
};
|
788 |
+
if ($.effects && $.effects[showAnim])
|
789 |
+
inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
|
790 |
+
else
|
791 |
+
inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
|
792 |
+
(showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
|
793 |
+
if (!showAnim)
|
794 |
+
postProcess();
|
795 |
+
$.datepicker._triggerOnClose(inst);
|
796 |
+
this._datepickerShowing = false;
|
797 |
+
this._lastInput = null;
|
798 |
+
if (this._inDialog) {
|
799 |
+
this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
|
800 |
+
if ($.blockUI) {
|
801 |
+
$.unblockUI();
|
802 |
+
$('body').append(this.dpDiv);
|
803 |
+
}
|
804 |
+
}
|
805 |
+
this._inDialog = false;
|
806 |
+
}
|
807 |
+
},
|
808 |
+
|
809 |
+
/* Tidy up after a dialog display. */
|
810 |
+
_tidyDialog: function(inst) {
|
811 |
+
inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
|
812 |
+
},
|
813 |
+
|
814 |
+
/* Close date picker if clicked elsewhere. */
|
815 |
+
_checkExternalClick: function(event) {
|
816 |
+
if (!$.datepicker._curInst)
|
817 |
+
return;
|
818 |
+
var $target = $(event.target);
|
819 |
+
if ($target[0].id != $.datepicker._mainDivId &&
|
820 |
+
$target.parents('#' + $.datepicker._mainDivId).length == 0 &&
|
821 |
+
!$target.hasClass($.datepicker.markerClassName) &&
|
822 |
+
!$target.hasClass($.datepicker._triggerClass) &&
|
823 |
+
$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI))
|
824 |
+
$.datepicker._hideDatepicker();
|
825 |
+
},
|
826 |
+
|
827 |
+
/* Adjust one of the date sub-fields. */
|
828 |
+
_adjustDate: function(id, offset, period) {
|
829 |
+
var target = $(id);
|
830 |
+
var inst = this._getInst(target[0]);
|
831 |
+
if (this._isDisabledDatepicker(target[0])) {
|
832 |
+
return;
|
833 |
+
}
|
834 |
+
this._adjustInstDate(inst, offset +
|
835 |
+
(period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
|
836 |
+
period);
|
837 |
+
this._updateDatepicker(inst);
|
838 |
+
},
|
839 |
+
|
840 |
+
/* Action for current link. */
|
841 |
+
_gotoToday: function(id) {
|
842 |
+
var target = $(id);
|
843 |
+
var inst = this._getInst(target[0]);
|
844 |
+
if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
|
845 |
+
inst.selectedDay = inst.currentDay;
|
846 |
+
inst.drawMonth = inst.selectedMonth = inst.currentMonth;
|
847 |
+
inst.drawYear = inst.selectedYear = inst.currentYear;
|
848 |
+
}
|
849 |
+
else {
|
850 |
+
var date = new Date();
|
851 |
+
inst.selectedDay = date.getDate();
|
852 |
+
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
853 |
+
inst.drawYear = inst.selectedYear = date.getFullYear();
|
854 |
+
}
|
855 |
+
this._notifyChange(inst);
|
856 |
+
this._adjustDate(target);
|
857 |
+
},
|
858 |
+
|
859 |
+
/* Action for selecting a new month/year. */
|
860 |
+
_selectMonthYear: function(id, select, period) {
|
861 |
+
var target = $(id);
|
862 |
+
var inst = this._getInst(target[0]);
|
863 |
+
inst._selectingMonthYear = false;
|
864 |
+
inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
|
865 |
+
inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
|
866 |
+
parseInt(select.options[select.selectedIndex].value,10);
|
867 |
+
this._notifyChange(inst);
|
868 |
+
this._adjustDate(target);
|
869 |
+
},
|
870 |
+
|
871 |
+
/* Restore input focus after not changing month/year. */
|
872 |
+
_clickMonthYear: function(id) {
|
873 |
+
var target = $(id);
|
874 |
+
var inst = this._getInst(target[0]);
|
875 |
+
if (inst.input && inst._selectingMonthYear) {
|
876 |
+
setTimeout(function() {
|
877 |
+
inst.input.focus();
|
878 |
+
}, 0);
|
879 |
+
}
|
880 |
+
inst._selectingMonthYear = !inst._selectingMonthYear;
|
881 |
+
},
|
882 |
+
|
883 |
+
/* Action for selecting a day. */
|
884 |
+
_selectDay: function(id, month, year, td) {
|
885 |
+
var target = $(id);
|
886 |
+
if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
|
887 |
+
return;
|
888 |
+
}
|
889 |
+
var inst = this._getInst(target[0]);
|
890 |
+
inst.selectedDay = inst.currentDay = $('a', td).html();
|
891 |
+
inst.selectedMonth = inst.currentMonth = month;
|
892 |
+
inst.selectedYear = inst.currentYear = year;
|
893 |
+
this._selectDate(id, this._formatDate(inst,
|
894 |
+
inst.currentDay, inst.currentMonth, inst.currentYear));
|
895 |
+
},
|
896 |
+
|
897 |
+
/* Erase the input field and hide the date picker. */
|
898 |
+
_clearDate: function(id) {
|
899 |
+
var target = $(id);
|
900 |
+
var inst = this._getInst(target[0]);
|
901 |
+
this._selectDate(target, '');
|
902 |
+
},
|
903 |
+
|
904 |
+
/* Update the input field with the selected date. */
|
905 |
+
_selectDate: function(id, dateStr) {
|
906 |
+
var target = $(id);
|
907 |
+
var inst = this._getInst(target[0]);
|
908 |
+
dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
|
909 |
+
if (inst.input)
|
910 |
+
inst.input.val(dateStr);
|
911 |
+
this._updateAlternate(inst);
|
912 |
+
var onSelect = this._get(inst, 'onSelect');
|
913 |
+
if (onSelect)
|
914 |
+
onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
|
915 |
+
else if (inst.input)
|
916 |
+
inst.input.trigger('change'); // fire the change event
|
917 |
+
if (inst.inline)
|
918 |
+
this._updateDatepicker(inst);
|
919 |
+
else {
|
920 |
+
this._hideDatepicker();
|
921 |
+
this._lastInput = inst.input[0];
|
922 |
+
if (typeof(inst.input[0]) != 'object')
|
923 |
+
inst.input.focus(); // restore focus
|
924 |
+
this._lastInput = null;
|
925 |
+
}
|
926 |
+
},
|
927 |
+
|
928 |
+
/* Update any alternate field to synchronise with the main field. */
|
929 |
+
_updateAlternate: function(inst) {
|
930 |
+
var altField = this._get(inst, 'altField');
|
931 |
+
if (altField) { // update alternate field too
|
932 |
+
var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
|
933 |
+
var date = this._getDate(inst);
|
934 |
+
var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
|
935 |
+
$(altField).each(function() { $(this).val(dateStr); });
|
936 |
+
}
|
937 |
+
},
|
938 |
+
|
939 |
+
/* Set as beforeShowDay function to prevent selection of weekends.
|
940 |
+
@param date Date - the date to customise
|
941 |
+
@return [boolean, string] - is this date selectable?, what is its CSS class? */
|
942 |
+
noWeekends: function(date) {
|
943 |
+
var day = date.getDay();
|
944 |
+
return [(day > 0 && day < 6), ''];
|
945 |
+
},
|
946 |
+
|
947 |
+
/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
|
948 |
+
@param date Date - the date to get the week for
|
949 |
+
@return number - the number of the week within the year that contains this date */
|
950 |
+
iso8601Week: function(date) {
|
951 |
+
var checkDate = new Date(date.getTime());
|
952 |
+
// Find Thursday of this week starting on Monday
|
953 |
+
checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
|
954 |
+
var time = checkDate.getTime();
|
955 |
+
checkDate.setMonth(0); // Compare with Jan 1
|
956 |
+
checkDate.setDate(1);
|
957 |
+
return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
|
958 |
+
},
|
959 |
+
|
960 |
+
/* Parse a string value into a date object.
|
961 |
+
See formatDate below for the possible formats.
|
962 |
+
|
963 |
+
@param format string - the expected format of the date
|
964 |
+
@param value string - the date in the above format
|
965 |
+
@param settings Object - attributes include:
|
966 |
+
shortYearCutoff number - the cutoff year for determining the century (optional)
|
967 |
+
dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
|
968 |
+
dayNames string[7] - names of the days from Sunday (optional)
|
969 |
+
monthNamesShort string[12] - abbreviated names of the months (optional)
|
970 |
+
monthNames string[12] - names of the months (optional)
|
971 |
+
@return Date - the extracted date value or null if value is blank */
|
972 |
+
parseDate: function (format, value, settings) {
|
973 |
+
if (format == null || value == null)
|
974 |
+
throw 'Invalid arguments';
|
975 |
+
value = (typeof value == 'object' ? value.toString() : value + '');
|
976 |
+
if (value == '')
|
977 |
+
return null;
|
978 |
+
var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
|
979 |
+
shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
|
980 |
+
new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
|
981 |
+
var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
|
982 |
+
var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
|
983 |
+
var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
|
984 |
+
var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
|
985 |
+
var year = -1;
|
986 |
+
var month = -1;
|
987 |
+
var day = -1;
|
988 |
+
var doy = -1;
|
989 |
+
var literal = false;
|
990 |
+
// Check whether a format character is doubled
|
991 |
+
var lookAhead = function(match) {
|
992 |
+
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
|
993 |
+
if (matches)
|
994 |
+
iFormat++;
|
995 |
+
return matches;
|
996 |
+
};
|
997 |
+
// Extract a number from the string value
|
998 |
+
var getNumber = function(match) {
|
999 |
+
var isDoubled = lookAhead(match);
|
1000 |
+
var size = (match == '@' ? 14 : (match == '!' ? 20 :
|
1001 |
+
(match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));
|
1002 |
+
var digits = new RegExp('^\\d{1,' + size + '}');
|
1003 |
+
var num = value.substring(iValue).match(digits);
|
1004 |
+
if (!num)
|
1005 |
+
throw 'Missing number at position ' + iValue;
|
1006 |
+
iValue += num[0].length;
|
1007 |
+
return parseInt(num[0], 10);
|
1008 |
+
};
|
1009 |
+
// Extract a name from the string value and convert to an index
|
1010 |
+
var getName = function(match, shortNames, longNames) {
|
1011 |
+
var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
|
1012 |
+
return [ [k, v] ];
|
1013 |
+
}).sort(function (a, b) {
|
1014 |
+
return -(a[1].length - b[1].length);
|
1015 |
+
});
|
1016 |
+
var index = -1;
|
1017 |
+
$.each(names, function (i, pair) {
|
1018 |
+
var name = pair[1];
|
1019 |
+
if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) {
|
1020 |
+
index = pair[0];
|
1021 |
+
iValue += name.length;
|
1022 |
+
return false;
|
1023 |
+
}
|
1024 |
+
});
|
1025 |
+
if (index != -1)
|
1026 |
+
return index + 1;
|
1027 |
+
else
|
1028 |
+
throw 'Unknown name at position ' + iValue;
|
1029 |
+
};
|
1030 |
+
// Confirm that a literal character matches the string value
|
1031 |
+
var checkLiteral = function() {
|
1032 |
+
if (value.charAt(iValue) != format.charAt(iFormat))
|
1033 |
+
throw 'Unexpected literal at position ' + iValue;
|
1034 |
+
iValue++;
|
1035 |
+
};
|
1036 |
+
var iValue = 0;
|
1037 |
+
for (var iFormat = 0; iFormat < format.length; iFormat++) {
|
1038 |
+
if (literal)
|
1039 |
+
if (format.charAt(iFormat) == "'" && !lookAhead("'"))
|
1040 |
+
literal = false;
|
1041 |
+
else
|
1042 |
+
checkLiteral();
|
1043 |
+
else
|
1044 |
+
switch (format.charAt(iFormat)) {
|
1045 |
+
case 'd':
|
1046 |
+
day = getNumber('d');
|
1047 |
+
break;
|
1048 |
+
case 'D':
|
1049 |
+
getName('D', dayNamesShort, dayNames);
|
1050 |
+
break;
|
1051 |
+
case 'o':
|
1052 |
+
doy = getNumber('o');
|
1053 |
+
break;
|
1054 |
+
case 'm':
|
1055 |
+
month = getNumber('m');
|
1056 |
+
break;
|
1057 |
+
case 'M':
|
1058 |
+
month = getName('M', monthNamesShort, monthNames);
|
1059 |
+
break;
|
1060 |
+
case 'y':
|
1061 |
+
year = getNumber('y');
|
1062 |
+
break;
|
1063 |
+
case '@':
|
1064 |
+
var date = new Date(getNumber('@'));
|
1065 |
+
year = date.getFullYear();
|
1066 |
+
month = date.getMonth() + 1;
|
1067 |
+
day = date.getDate();
|
1068 |
+
break;
|
1069 |
+
case '!':
|
1070 |
+
var date = new Date((getNumber('!') - this._ticksTo1970) / 10000);
|
1071 |
+
year = date.getFullYear();
|
1072 |
+
month = date.getMonth() + 1;
|
1073 |
+
day = date.getDate();
|
1074 |
+
break;
|
1075 |
+
case "'":
|
1076 |
+
if (lookAhead("'"))
|
1077 |
+
checkLiteral();
|
1078 |
+
else
|
1079 |
+
literal = true;
|
1080 |
+
break;
|
1081 |
+
default:
|
1082 |
+
checkLiteral();
|
1083 |
+
}
|
1084 |
+
}
|
1085 |
+
if (iValue < value.length){
|
1086 |
+
throw "Extra/unparsed characters found in date: " + value.substring(iValue);
|
1087 |
+
}
|
1088 |
+
if (year == -1)
|
1089 |
+
year = new Date().getFullYear();
|
1090 |
+
else if (year < 100)
|
1091 |
+
year += new Date().getFullYear() - new Date().getFullYear() % 100 +
|
1092 |
+
(year <= shortYearCutoff ? 0 : -100);
|
1093 |
+
if (doy > -1) {
|
1094 |
+
month = 1;
|
1095 |
+
day = doy;
|
1096 |
+
do {
|
1097 |
+
var dim = this._getDaysInMonth(year, month - 1);
|
1098 |
+
if (day <= dim)
|
1099 |
+
break;
|
1100 |
+
month++;
|
1101 |
+
day -= dim;
|
1102 |
+
} while (true);
|
1103 |
+
}
|
1104 |
+
var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
|
1105 |
+
if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
|
1106 |
+
throw 'Invalid date'; // E.g. 31/02/00
|
1107 |
+
return date;
|
1108 |
+
},
|
1109 |
+
|
1110 |
+
/* Standard date formats. */
|
1111 |
+
ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
|
1112 |
+
COOKIE: 'D, dd M yy',
|
1113 |
+
ISO_8601: 'yy-mm-dd',
|
1114 |
+
RFC_822: 'D, d M y',
|
1115 |
+
RFC_850: 'DD, dd-M-y',
|
1116 |
+
RFC_1036: 'D, d M y',
|
1117 |
+
RFC_1123: 'D, d M yy',
|
1118 |
+
RFC_2822: 'D, d M yy',
|
1119 |
+
RSS: 'D, d M y', // RFC 822
|
1120 |
+
TICKS: '!',
|
1121 |
+
TIMESTAMP: '@',
|
1122 |
+
W3C: 'yy-mm-dd', // ISO 8601
|
1123 |
+
|
1124 |
+
_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
|
1125 |
+
Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
|
1126 |
+
|
1127 |
+
/* Format a date object into a string value.
|
1128 |
+
The format can be combinations of the following:
|
1129 |
+
d - day of month (no leading zero)
|
1130 |
+
dd - day of month (two digit)
|
1131 |
+
o - day of year (no leading zeros)
|
1132 |
+
oo - day of year (three digit)
|
1133 |
+
D - day name short
|
1134 |
+
DD - day name long
|
1135 |
+
m - month of year (no leading zero)
|
1136 |
+
mm - month of year (two digit)
|
1137 |
+
M - month name short
|
1138 |
+
MM - month name long
|
1139 |
+
y - year (two digit)
|
1140 |
+
yy - year (four digit)
|
1141 |
+
@ - Unix timestamp (ms since 01/01/1970)
|
1142 |
+
! - Windows ticks (100ns since 01/01/0001)
|
1143 |
+
'...' - literal text
|
1144 |
+
'' - single quote
|
1145 |
+
|
1146 |
+
@param format string - the desired format of the date
|
1147 |
+
@param date Date - the date value to format
|
1148 |
+
@param settings Object - attributes include:
|
1149 |
+
dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
|
1150 |
+
dayNames string[7] - names of the days from Sunday (optional)
|
1151 |
+
monthNamesShort string[12] - abbreviated names of the months (optional)
|
1152 |
+
monthNames string[12] - names of the months (optional)
|
1153 |
+
@return string - the date in the above format */
|
1154 |
+
formatDate: function (format, date, settings) {
|
1155 |
+
if (!date)
|
1156 |
+
return '';
|
1157 |
+
var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
|
1158 |
+
var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
|
1159 |
+
var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
|
1160 |
+
var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
|
1161 |
+
// Check whether a format character is doubled
|
1162 |
+
var lookAhead = function(match) {
|
1163 |
+
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
|
1164 |
+
if (matches)
|
1165 |
+
iFormat++;
|
1166 |
+
return matches;
|
1167 |
+
};
|
1168 |
+
// Format a number, with leading zero if necessary
|
1169 |
+
var formatNumber = function(match, value, len) {
|
1170 |
+
var num = '' + value;
|
1171 |
+
if (lookAhead(match))
|
1172 |
+
while (num.length < len)
|
1173 |
+
num = '0' + num;
|
1174 |
+
return num;
|
1175 |
+
};
|
1176 |
+
// Format a name, short or long as requested
|
1177 |
+
var formatName = function(match, value, shortNames, longNames) {
|
1178 |
+
return (lookAhead(match) ? longNames[value] : shortNames[value]);
|
1179 |
+
};
|
1180 |
+
var output = '';
|
1181 |
+
var literal = false;
|
1182 |
+
if (date)
|
1183 |
+
for (var iFormat = 0; iFormat < format.length; iFormat++) {
|
1184 |
+
if (literal)
|
1185 |
+
if (format.charAt(iFormat) == "'" && !lookAhead("'"))
|
1186 |
+
literal = false;
|
1187 |
+
else
|
1188 |
+
output += format.charAt(iFormat);
|
1189 |
+
else
|
1190 |
+
switch (format.charAt(iFormat)) {
|
1191 |
+
case 'd':
|
1192 |
+
output += formatNumber('d', date.getDate(), 2);
|
1193 |
+
break;
|
1194 |
+
case 'D':
|
1195 |
+
output += formatName('D', date.getDay(), dayNamesShort, dayNames);
|
1196 |
+
break;
|
1197 |
+
case 'o':
|
1198 |
+
output += formatNumber('o',
|
1199 |
+
Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
|
1200 |
+
break;
|
1201 |
+
case 'm':
|
1202 |
+
output += formatNumber('m', date.getMonth() + 1, 2);
|
1203 |
+
break;
|
1204 |
+
case 'M':
|
1205 |
+
output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
|
1206 |
+
break;
|
1207 |
+
case 'y':
|
1208 |
+
output += (lookAhead('y') ? date.getFullYear() :
|
1209 |
+
(date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
|
1210 |
+
break;
|
1211 |
+
case '@':
|
1212 |
+
output += date.getTime();
|
1213 |
+
break;
|
1214 |
+
case '!':
|
1215 |
+
output += date.getTime() * 10000 + this._ticksTo1970;
|
1216 |
+
break;
|
1217 |
+
case "'":
|
1218 |
+
if (lookAhead("'"))
|
1219 |
+
output += "'";
|
1220 |
+
else
|
1221 |
+
literal = true;
|
1222 |
+
break;
|
1223 |
+
default:
|
1224 |
+
output += format.charAt(iFormat);
|
1225 |
+
}
|
1226 |
+
}
|
1227 |
+
return output;
|
1228 |
+
},
|
1229 |
+
|
1230 |
+
/* Extract all possible characters from the date format. */
|
1231 |
+
_possibleChars: function (format) {
|
1232 |
+
var chars = '';
|
1233 |
+
var literal = false;
|
1234 |
+
// Check whether a format character is doubled
|
1235 |
+
var lookAhead = function(match) {
|
1236 |
+
var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
|
1237 |
+
if (matches)
|
1238 |
+
iFormat++;
|
1239 |
+
return matches;
|
1240 |
+
};
|
1241 |
+
for (var iFormat = 0; iFormat < format.length; iFormat++)
|
1242 |
+
if (literal)
|
1243 |
+
if (format.charAt(iFormat) == "'" && !lookAhead("'"))
|
1244 |
+
literal = false;
|
1245 |
+
else
|
1246 |
+
chars += format.charAt(iFormat);
|
1247 |
+
else
|
1248 |
+
switch (format.charAt(iFormat)) {
|
1249 |
+
case 'd': case 'm': case 'y': case '@':
|
1250 |
+
chars += '0123456789';
|
1251 |
+
break;
|
1252 |
+
case 'D': case 'M':
|
1253 |
+
return null; // Accept anything
|
1254 |
+
case "'":
|
1255 |
+
if (lookAhead("'"))
|
1256 |
+
chars += "'";
|
1257 |
+
else
|
1258 |
+
literal = true;
|
1259 |
+
break;
|
1260 |
+
default:
|
1261 |
+
chars += format.charAt(iFormat);
|
1262 |
+
}
|
1263 |
+
return chars;
|
1264 |
+
},
|
1265 |
+
|
1266 |
+
/* Get a setting value, defaulting if necessary. */
|
1267 |
+
_get: function(inst, name) {
|
1268 |
+
return inst.settings[name] !== undefined ?
|
1269 |
+
inst.settings[name] : this._defaults[name];
|
1270 |
+
},
|
1271 |
+
|
1272 |
+
/* Parse existing date and initialise date picker. */
|
1273 |
+
_setDateFromField: function(inst, noDefault) {
|
1274 |
+
if (inst.input.val() == inst.lastVal) {
|
1275 |
+
return;
|
1276 |
+
}
|
1277 |
+
var dateFormat = this._get(inst, 'dateFormat');
|
1278 |
+
var dates = inst.lastVal = inst.input ? inst.input.val() : null;
|
1279 |
+
var date, defaultDate;
|
1280 |
+
date = defaultDate = this._getDefaultDate(inst);
|
1281 |
+
var settings = this._getFormatConfig(inst);
|
1282 |
+
try {
|
1283 |
+
date = this.parseDate(dateFormat, dates, settings) || defaultDate;
|
1284 |
+
} catch (event) {
|
1285 |
+
this.log(event);
|
1286 |
+
dates = (noDefault ? '' : dates);
|
1287 |
+
}
|
1288 |
+
inst.selectedDay = date.getDate();
|
1289 |
+
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
1290 |
+
inst.drawYear = inst.selectedYear = date.getFullYear();
|
1291 |
+
inst.currentDay = (dates ? date.getDate() : 0);
|
1292 |
+
inst.currentMonth = (dates ? date.getMonth() : 0);
|
1293 |
+
inst.currentYear = (dates ? date.getFullYear() : 0);
|
1294 |
+
this._adjustInstDate(inst);
|
1295 |
+
},
|
1296 |
+
|
1297 |
+
/* Retrieve the default date shown on opening. */
|
1298 |
+
_getDefaultDate: function(inst) {
|
1299 |
+
return this._restrictMinMax(inst,
|
1300 |
+
this._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));
|
1301 |
+
},
|
1302 |
+
|
1303 |
+
/* A date may be specified as an exact value or a relative one. */
|
1304 |
+
_determineDate: function(inst, date, defaultDate) {
|
1305 |
+
var offsetNumeric = function(offset) {
|
1306 |
+
var date = new Date();
|
1307 |
+
date.setDate(date.getDate() + offset);
|
1308 |
+
return date;
|
1309 |
+
};
|
1310 |
+
var offsetString = function(offset) {
|
1311 |
+
try {
|
1312 |
+
return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
|
1313 |
+
offset, $.datepicker._getFormatConfig(inst));
|
1314 |
+
}
|
1315 |
+
catch (e) {
|
1316 |
+
// Ignore
|
1317 |
+
}
|
1318 |
+
var date = (offset.toLowerCase().match(/^c/) ?
|
1319 |
+
$.datepicker._getDate(inst) : null) || new Date();
|
1320 |
+
var year = date.getFullYear();
|
1321 |
+
var month = date.getMonth();
|
1322 |
+
var day = date.getDate();
|
1323 |
+
var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
|
1324 |
+
var matches = pattern.exec(offset);
|
1325 |
+
while (matches) {
|
1326 |
+
switch (matches[2] || 'd') {
|
1327 |
+
case 'd' : case 'D' :
|
1328 |
+
day += parseInt(matches[1],10); break;
|
1329 |
+
case 'w' : case 'W' :
|
1330 |
+
day += parseInt(matches[1],10) * 7; break;
|
1331 |
+
case 'm' : case 'M' :
|
1332 |
+
month += parseInt(matches[1],10);
|
1333 |
+
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
|
1334 |
+
break;
|
1335 |
+
case 'y': case 'Y' :
|
1336 |
+
year += parseInt(matches[1],10);
|
1337 |
+
day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
|
1338 |
+
break;
|
1339 |
+
}
|
1340 |
+
matches = pattern.exec(offset);
|
1341 |
+
}
|
1342 |
+
return new Date(year, month, day);
|
1343 |
+
};
|
1344 |
+
var newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) :
|
1345 |
+
(typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
|
1346 |
+
newDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate);
|
1347 |
+
if (newDate) {
|
1348 |
+
newDate.setHours(0);
|
1349 |
+
newDate.setMinutes(0);
|
1350 |
+
newDate.setSeconds(0);
|
1351 |
+
newDate.setMilliseconds(0);
|
1352 |
+
}
|
1353 |
+
return this._daylightSavingAdjust(newDate);
|
1354 |
+
},
|
1355 |
+
|
1356 |
+
/* Handle switch to/from daylight saving.
|
1357 |
+
Hours may be non-zero on daylight saving cut-over:
|
1358 |
+
> 12 when midnight changeover, but then cannot generate
|
1359 |
+
midnight datetime, so jump to 1AM, otherwise reset.
|
1360 |
+
@param date (Date) the date to check
|
1361 |
+
@return (Date) the corrected date */
|
1362 |
+
_daylightSavingAdjust: function(date) {
|
1363 |
+
if (!date) return null;
|
1364 |
+
date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
|
1365 |
+
return date;
|
1366 |
+
},
|
1367 |
+
|
1368 |
+
/* Set the date(s) directly. */
|
1369 |
+
_setDate: function(inst, date, noChange) {
|
1370 |
+
var clear = !date;
|
1371 |
+
var origMonth = inst.selectedMonth;
|
1372 |
+
var origYear = inst.selectedYear;
|
1373 |
+
var newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
|
1374 |
+
inst.selectedDay = inst.currentDay = newDate.getDate();
|
1375 |
+
inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
|
1376 |
+
inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
|
1377 |
+
if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
|
1378 |
+
this._notifyChange(inst);
|
1379 |
+
this._adjustInstDate(inst);
|
1380 |
+
if (inst.input) {
|
1381 |
+
inst.input.val(clear ? '' : this._formatDate(inst));
|
1382 |
+
}
|
1383 |
+
},
|
1384 |
+
|
1385 |
+
/* Retrieve the date(s) directly. */
|
1386 |
+
_getDate: function(inst) {
|
1387 |
+
var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
|
1388 |
+
this._daylightSavingAdjust(new Date(
|
1389 |
+
inst.currentYear, inst.currentMonth, inst.currentDay)));
|
1390 |
+
return startDate;
|
1391 |
+
},
|
1392 |
+
|
1393 |
+
/* Generate the HTML for the current state of the date picker. */
|
1394 |
+
_generateHTML: function(inst) {
|
1395 |
+
var today = new Date();
|
1396 |
+
today = this._daylightSavingAdjust(
|
1397 |
+
new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
|
1398 |
+
var isRTL = this._get(inst, 'isRTL');
|
1399 |
+
var showButtonPanel = this._get(inst, 'showButtonPanel');
|
1400 |
+
var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
|
1401 |
+
var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
|
1402 |
+
var numMonths = this._getNumberOfMonths(inst);
|
1403 |
+
var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
|
1404 |
+
var stepMonths = this._get(inst, 'stepMonths');
|
1405 |
+
var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
|
1406 |
+
var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
|
1407 |
+
new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
|
1408 |
+
var minDate = this._getMinMaxDate(inst, 'min');
|
1409 |
+
var maxDate = this._getMinMaxDate(inst, 'max');
|
1410 |
+
var drawMonth = inst.drawMonth - showCurrentAtPos;
|
1411 |
+
var drawYear = inst.drawYear;
|
1412 |
+
if (drawMonth < 0) {
|
1413 |
+
drawMonth += 12;
|
1414 |
+
drawYear--;
|
1415 |
+
}
|
1416 |
+
if (maxDate) {
|
1417 |
+
var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
|
1418 |
+
maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
|
1419 |
+
maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
|
1420 |
+
while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
|
1421 |
+
drawMonth--;
|
1422 |
+
if (drawMonth < 0) {
|
1423 |
+
drawMonth = 11;
|
1424 |
+
drawYear--;
|
1425 |
+
}
|
1426 |
+
}
|
1427 |
+
}
|
1428 |
+
inst.drawMonth = drawMonth;
|
1429 |
+
inst.drawYear = drawYear;
|
1430 |
+
var prevText = this._get(inst, 'prevText');
|
1431 |
+
prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
|
1432 |
+
this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
|
1433 |
+
this._getFormatConfig(inst)));
|
1434 |
+
var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
|
1435 |
+
'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
1436 |
+
'.datepicker._adjustDate(\'#' + inst.id + '\', -' + stepMonths + ', \'M\');"' +
|
1437 |
+
' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
|
1438 |
+
(hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
|
1439 |
+
var nextText = this._get(inst, 'nextText');
|
1440 |
+
nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
|
1441 |
+
this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
|
1442 |
+
this._getFormatConfig(inst)));
|
1443 |
+
var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
|
1444 |
+
'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
1445 |
+
'.datepicker._adjustDate(\'#' + inst.id + '\', +' + stepMonths + ', \'M\');"' +
|
1446 |
+
' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
|
1447 |
+
(hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
|
1448 |
+
var currentText = this._get(inst, 'currentText');
|
1449 |
+
var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
|
1450 |
+
currentText = (!navigationAsDateFormat ? currentText :
|
1451 |
+
this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
|
1452 |
+
var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
1453 |
+
'.datepicker._hideDatepicker();">' + this._get(inst, 'closeText') + '</button>' : '');
|
1454 |
+
var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
|
1455 |
+
(this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + dpuuid +
|
1456 |
+
'.datepicker._gotoToday(\'#' + inst.id + '\');"' +
|
1457 |
+
'>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
|
1458 |
+
var firstDay = parseInt(this._get(inst, 'firstDay'),10);
|
1459 |
+
firstDay = (isNaN(firstDay) ? 0 : firstDay);
|
1460 |
+
var showWeek = this._get(inst, 'showWeek');
|
1461 |
+
var dayNames = this._get(inst, 'dayNames');
|
1462 |
+
var dayNamesShort = this._get(inst, 'dayNamesShort');
|
1463 |
+
var dayNamesMin = this._get(inst, 'dayNamesMin');
|
1464 |
+
var monthNames = this._get(inst, 'monthNames');
|
1465 |
+
var monthNamesShort = this._get(inst, 'monthNamesShort');
|
1466 |
+
var beforeShowDay = this._get(inst, 'beforeShowDay');
|
1467 |
+
var showOtherMonths = this._get(inst, 'showOtherMonths');
|
1468 |
+
var selectOtherMonths = this._get(inst, 'selectOtherMonths');
|
1469 |
+
var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
|
1470 |
+
var defaultDate = this._getDefaultDate(inst);
|
1471 |
+
var html = '';
|
1472 |
+
for (var row = 0; row < numMonths[0]; row++) {
|
1473 |
+
var group = '';
|
1474 |
+
this.maxRows = 4;
|
1475 |
+
for (var col = 0; col < numMonths[1]; col++) {
|
1476 |
+
var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
|
1477 |
+
var cornerClass = ' ui-corner-all';
|
1478 |
+
var calender = '';
|
1479 |
+
if (isMultiMonth) {
|
1480 |
+
calender += '<div class="ui-datepicker-group';
|
1481 |
+
if (numMonths[1] > 1)
|
1482 |
+
switch (col) {
|
1483 |
+
case 0: calender += ' ui-datepicker-group-first';
|
1484 |
+
cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
|
1485 |
+
case numMonths[1]-1: calender += ' ui-datepicker-group-last';
|
1486 |
+
cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
|
1487 |
+
default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;
|
1488 |
+
}
|
1489 |
+
calender += '">';
|
1490 |
+
}
|
1491 |
+
calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
|
1492 |
+
(/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
|
1493 |
+
(/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
|
1494 |
+
this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
|
1495 |
+
row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
|
1496 |
+
'</div><table class="ui-datepicker-calendar"><thead>' +
|
1497 |
+
'<tr>';
|
1498 |
+
var thead = (showWeek ? '<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : '');
|
1499 |
+
for (var dow = 0; dow < 7; dow++) { // days of the week
|
1500 |
+
var day = (dow + firstDay) % 7;
|
1501 |
+
thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
|
1502 |
+
'<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
|
1503 |
+
}
|
1504 |
+
calender += thead + '</tr></thead><tbody>';
|
1505 |
+
var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
|
1506 |
+
if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
|
1507 |
+
inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
|
1508 |
+
var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
|
1509 |
+
var curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
|
1510 |
+
var numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
|
1511 |
+
this.maxRows = numRows;
|
1512 |
+
var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
|
1513 |
+
for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
|
1514 |
+
calender += '<tr>';
|
1515 |
+
var tbody = (!showWeek ? '' : '<td class="ui-datepicker-week-col">' +
|
1516 |
+
this._get(inst, 'calculateWeek')(printDate) + '</td>');
|
1517 |
+
for (var dow = 0; dow < 7; dow++) { // create date picker days
|
1518 |
+
var daySettings = (beforeShowDay ?
|
1519 |
+
beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
|
1520 |
+
var otherMonth = (printDate.getMonth() != drawMonth);
|
1521 |
+
var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
|
1522 |
+
(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
|
1523 |
+
tbody += '<td class="' +
|
1524 |
+
((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
|
1525 |
+
(otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
|
1526 |
+
((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
|
1527 |
+
(defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
|
1528 |
+
// or defaultDate is current printedDate and defaultDate is selectedDate
|
1529 |
+
' ' + this._dayOverClass : '') + // highlight selected day
|
1530 |
+
(unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
|
1531 |
+
(otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
|
1532 |
+
(printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
|
1533 |
+
(printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
|
1534 |
+
((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
|
1535 |
+
(unselectable ? '' : ' onclick="DP_jQuery_' + dpuuid + '.datepicker._selectDay(\'#' +
|
1536 |
+
inst.id + '\',' + printDate.getMonth() + ',' + printDate.getFullYear() + ', this);return false;"') + '>' + // actions
|
1537 |
+
(otherMonth && !showOtherMonths ? ' ' : // display for other months
|
1538 |
+
(unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
|
1539 |
+
(printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
|
1540 |
+
(printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
|
1541 |
+
(otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
|
1542 |
+
'" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
|
1543 |
+
printDate.setDate(printDate.getDate() + 1);
|
1544 |
+
printDate = this._daylightSavingAdjust(printDate);
|
1545 |
+
}
|
1546 |
+
calender += tbody + '</tr>';
|
1547 |
+
}
|
1548 |
+
drawMonth++;
|
1549 |
+
if (drawMonth > 11) {
|
1550 |
+
drawMonth = 0;
|
1551 |
+
drawYear++;
|
1552 |
+
}
|
1553 |
+
calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
|
1554 |
+
((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
|
1555 |
+
group += calender;
|
1556 |
+
}
|
1557 |
+
html += group;
|
1558 |
+
}
|
1559 |
+
html += buttonPanel + ($.browser.msie && parseInt($.browser.version,10) < 7 && !inst.inline ?
|
1560 |
+
'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
|
1561 |
+
inst._keyEvent = false;
|
1562 |
+
return html;
|
1563 |
+
},
|
1564 |
+
|
1565 |
+
/* Generate the month and year header. */
|
1566 |
+
_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
|
1567 |
+
secondary, monthNames, monthNamesShort) {
|
1568 |
+
var changeMonth = this._get(inst, 'changeMonth');
|
1569 |
+
var changeYear = this._get(inst, 'changeYear');
|
1570 |
+
var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
|
1571 |
+
var html = '<div class="ui-datepicker-title">';
|
1572 |
+
var monthHtml = '';
|
1573 |
+
// month selection
|
1574 |
+
if (secondary || !changeMonth)
|
1575 |
+
monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>';
|
1576 |
+
else {
|
1577 |
+
var inMinYear = (minDate && minDate.getFullYear() == drawYear);
|
1578 |
+
var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
|
1579 |
+
monthHtml += '<select class="ui-datepicker-month" ' +
|
1580 |
+
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
|
1581 |
+
'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
|
1582 |
+
'>';
|
1583 |
+
for (var month = 0; month < 12; month++) {
|
1584 |
+
if ((!inMinYear || month >= minDate.getMonth()) &&
|
1585 |
+
(!inMaxYear || month <= maxDate.getMonth()))
|
1586 |
+
monthHtml += '<option value="' + month + '"' +
|
1587 |
+
(month == drawMonth ? ' selected="selected"' : '') +
|
1588 |
+
'>' + monthNamesShort[month] + '</option>';
|
1589 |
+
}
|
1590 |
+
monthHtml += '</select>';
|
1591 |
+
}
|
1592 |
+
if (!showMonthAfterYear)
|
1593 |
+
html += monthHtml + (secondary || !(changeMonth && changeYear) ? ' ' : '');
|
1594 |
+
// year selection
|
1595 |
+
if ( !inst.yearshtml ) {
|
1596 |
+
inst.yearshtml = '';
|
1597 |
+
if (secondary || !changeYear)
|
1598 |
+
html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
|
1599 |
+
else {
|
1600 |
+
// determine range of years to display
|
1601 |
+
var years = this._get(inst, 'yearRange').split(':');
|
1602 |
+
var thisYear = new Date().getFullYear();
|
1603 |
+
var determineYear = function(value) {
|
1604 |
+
var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) :
|
1605 |
+
(value.match(/[+-].*/) ? thisYear + parseInt(value, 10) :
|
1606 |
+
parseInt(value, 10)));
|
1607 |
+
return (isNaN(year) ? thisYear : year);
|
1608 |
+
};
|
1609 |
+
var year = determineYear(years[0]);
|
1610 |
+
var endYear = Math.max(year, determineYear(years[1] || ''));
|
1611 |
+
year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
|
1612 |
+
endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
|
1613 |
+
inst.yearshtml += '<select class="ui-datepicker-year" ' +
|
1614 |
+
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
|
1615 |
+
'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
|
1616 |
+
'>';
|
1617 |
+
for (; year <= endYear; year++) {
|
1618 |
+
inst.yearshtml += '<option value="' + year + '"' +
|
1619 |
+
(year == drawYear ? ' selected="selected"' : '') +
|
1620 |
+
'>' + year + '</option>';
|
1621 |
+
}
|
1622 |
+
inst.yearshtml += '</select>';
|
1623 |
+
|
1624 |
+
html += inst.yearshtml;
|
1625 |
+
inst.yearshtml = null;
|
1626 |
+
}
|
1627 |
+
}
|
1628 |
+
html += this._get(inst, 'yearSuffix');
|
1629 |
+
if (showMonthAfterYear)
|
1630 |
+
html += (secondary || !(changeMonth && changeYear) ? ' ' : '') + monthHtml;
|
1631 |
+
html += '</div>'; // Close datepicker_header
|
1632 |
+
return html;
|
1633 |
+
},
|
1634 |
+
|
1635 |
+
/* Adjust one of the date sub-fields. */
|
1636 |
+
_adjustInstDate: function(inst, offset, period) {
|
1637 |
+
var year = inst.drawYear + (period == 'Y' ? offset : 0);
|
1638 |
+
var month = inst.drawMonth + (period == 'M' ? offset : 0);
|
1639 |
+
var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
|
1640 |
+
(period == 'D' ? offset : 0);
|
1641 |
+
var date = this._restrictMinMax(inst,
|
1642 |
+
this._daylightSavingAdjust(new Date(year, month, day)));
|
1643 |
+
inst.selectedDay = date.getDate();
|
1644 |
+
inst.drawMonth = inst.selectedMonth = date.getMonth();
|
1645 |
+
inst.drawYear = inst.selectedYear = date.getFullYear();
|
1646 |
+
if (period == 'M' || period == 'Y')
|
1647 |
+
this._notifyChange(inst);
|
1648 |
+
},
|
1649 |
+
|
1650 |
+
/* Ensure a date is within any min/max bounds. */
|
1651 |
+
_restrictMinMax: function(inst, date) {
|
1652 |
+
var minDate = this._getMinMaxDate(inst, 'min');
|
1653 |
+
var maxDate = this._getMinMaxDate(inst, 'max');
|
1654 |
+
var newDate = (minDate && date < minDate ? minDate : date);
|
1655 |
+
newDate = (maxDate && newDate > maxDate ? maxDate : newDate);
|
1656 |
+
return newDate;
|
1657 |
+
},
|
1658 |
+
|
1659 |
+
/* Notify change of month/year. */
|
1660 |
+
_notifyChange: function(inst) {
|
1661 |
+
var onChange = this._get(inst, 'onChangeMonthYear');
|
1662 |
+
if (onChange)
|
1663 |
+
onChange.apply((inst.input ? inst.input[0] : null),
|
1664 |
+
[inst.selectedYear, inst.selectedMonth + 1, inst]);
|
1665 |
+
},
|
1666 |
+
|
1667 |
+
/* Determine the number of months to show. */
|
1668 |
+
_getNumberOfMonths: function(inst) {
|
1669 |
+
var numMonths = this._get(inst, 'numberOfMonths');
|
1670 |
+
return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
|
1671 |
+
},
|
1672 |
+
|
1673 |
+
/* Determine the current maximum date - ensure no time components are set. */
|
1674 |
+
_getMinMaxDate: function(inst, minMax) {
|
1675 |
+
return this._determineDate(inst, this._get(inst, minMax + 'Date'), null);
|
1676 |
+
},
|
1677 |
+
|
1678 |
+
/* Find the number of days in a given month. */
|
1679 |
+
_getDaysInMonth: function(year, month) {
|
1680 |
+
return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
|
1681 |
+
},
|
1682 |
+
|
1683 |
+
/* Find the day of the week of the first of a month. */
|
1684 |
+
_getFirstDayOfMonth: function(year, month) {
|
1685 |
+
return new Date(year, month, 1).getDay();
|
1686 |
+
},
|
1687 |
+
|
1688 |
+
/* Determines if we should allow a "next/prev" month display change. */
|
1689 |
+
_canAdjustMonth: function(inst, offset, curYear, curMonth) {
|
1690 |
+
var numMonths = this._getNumberOfMonths(inst);
|
1691 |
+
var date = this._daylightSavingAdjust(new Date(curYear,
|
1692 |
+
curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
|
1693 |
+
if (offset < 0)
|
1694 |
+
date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
|
1695 |
+
return this._isInRange(inst, date);
|
1696 |
+
},
|
1697 |
+
|
1698 |
+
/* Is the given date in the accepted range? */
|
1699 |
+
_isInRange: function(inst, date) {
|
1700 |
+
var minDate = this._getMinMaxDate(inst, 'min');
|
1701 |
+
var maxDate = this._getMinMaxDate(inst, 'max');
|
1702 |
+
return ((!minDate || date.getTime() >= minDate.getTime()) &&
|
1703 |
+
(!maxDate || date.getTime() <= maxDate.getTime()));
|
1704 |
+
},
|
1705 |
+
|
1706 |
+
/* Provide the configuration settings for formatting/parsing. */
|
1707 |
+
_getFormatConfig: function(inst) {
|
1708 |
+
var shortYearCutoff = this._get(inst, 'shortYearCutoff');
|
1709 |
+
shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
|
1710 |
+
new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
|
1711 |
+
return {shortYearCutoff: shortYearCutoff,
|
1712 |
+
dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
|
1713 |
+
monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
|
1714 |
+
},
|
1715 |
+
|
1716 |
+
/* Format the given date for display. */
|
1717 |
+
_formatDate: function(inst, day, month, year) {
|
1718 |
+
if (!day) {
|
1719 |
+
inst.currentDay = inst.selectedDay;
|
1720 |
+
inst.currentMonth = inst.selectedMonth;
|
1721 |
+
inst.currentYear = inst.selectedYear;
|
1722 |
+
}
|
1723 |
+
var date = (day ? (typeof day == 'object' ? day :
|
1724 |
+
this._daylightSavingAdjust(new Date(year, month, day))) :
|
1725 |
+
this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
|
1726 |
+
return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
|
1727 |
+
}
|
1728 |
+
});
|
1729 |
+
|
1730 |
+
/*
|
1731 |
+
* Bind hover events for datepicker elements.
|
1732 |
+
* Done via delegate so the binding only occurs once in the lifetime of the parent div.
|
1733 |
+
* Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
|
1734 |
+
*/
|
1735 |
+
function bindHover(dpDiv) {
|
1736 |
+
var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
|
1737 |
+
return dpDiv.bind('mouseout', function(event) {
|
1738 |
+
var elem = $( event.target ).closest( selector );
|
1739 |
+
if ( !elem.length ) {
|
1740 |
+
return;
|
1741 |
+
}
|
1742 |
+
elem.removeClass( "ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover" );
|
1743 |
+
})
|
1744 |
+
.bind('mouseover', function(event) {
|
1745 |
+
var elem = $( event.target ).closest( selector );
|
1746 |
+
if ($.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0]) ||
|
1747 |
+
!elem.length ) {
|
1748 |
+
return;
|
1749 |
+
}
|
1750 |
+
elem.parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
|
1751 |
+
elem.addClass('ui-state-hover');
|
1752 |
+
if (elem.hasClass('ui-datepicker-prev')) elem.addClass('ui-datepicker-prev-hover');
|
1753 |
+
if (elem.hasClass('ui-datepicker-next')) elem.addClass('ui-datepicker-next-hover');
|
1754 |
+
});
|
1755 |
+
}
|
1756 |
+
|
1757 |
+
/* jQuery extend now ignores nulls! */
|
1758 |
+
function extendRemove(target, props) {
|
1759 |
+
$.extend(target, props);
|
1760 |
+
for (var name in props)
|
1761 |
+
if (props[name] == null || props[name] == undefined)
|
1762 |
+
target[name] = props[name];
|
1763 |
+
return target;
|
1764 |
+
};
|
1765 |
+
|
1766 |
+
/* Determine whether an object is an array. */
|
1767 |
+
function isArray(a) {
|
1768 |
+
return (a && (($.browser.safari && typeof a == 'object' && a.length) ||
|
1769 |
+
(a.constructor && a.constructor.toString().match(/\Array\(\)/))));
|
1770 |
+
};
|
1771 |
+
|
1772 |
+
/* Invoke the datepicker functionality.
|
1773 |
+
@param options string - a command, optionally followed by additional parameters or
|
1774 |
+
Object - settings for attaching new datepicker functionality
|
1775 |
+
@return jQuery object */
|
1776 |
+
$.fn.datepicker = function(options){
|
1777 |
+
|
1778 |
+
/* Verify an empty collection wasn't passed - Fixes #6976 */
|
1779 |
+
if ( !this.length ) {
|
1780 |
+
return this;
|
1781 |
+
}
|
1782 |
+
|
1783 |
+
/* Initialise the date picker. */
|
1784 |
+
if (!$.datepicker.initialized) {
|
1785 |
+
$(document).mousedown($.datepicker._checkExternalClick).
|
1786 |
+
find('body').append($.datepicker.dpDiv);
|
1787 |
+
$.datepicker.initialized = true;
|
1788 |
+
}
|
1789 |
+
|
1790 |
+
var otherArgs = Array.prototype.slice.call(arguments, 1);
|
1791 |
+
if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))
|
1792 |
+
return $.datepicker['_' + options + 'Datepicker'].
|
1793 |
+
apply($.datepicker, [this[0]].concat(otherArgs));
|
1794 |
+
if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
|
1795 |
+
return $.datepicker['_' + options + 'Datepicker'].
|
1796 |
+
apply($.datepicker, [this[0]].concat(otherArgs));
|
1797 |
+
return this.each(function() {
|
1798 |
+
typeof options == 'string' ?
|
1799 |
+
$.datepicker['_' + options + 'Datepicker'].
|
1800 |
+
apply($.datepicker, [this].concat(otherArgs)) :
|
1801 |
+
$.datepicker._attachDatepicker(this, options);
|
1802 |
+
});
|
1803 |
+
};
|
1804 |
+
|
1805 |
+
$.datepicker = new Datepicker(); // singleton instance
|
1806 |
+
$.datepicker.initialized = false;
|
1807 |
+
$.datepicker.uuid = new Date().getTime();
|
1808 |
+
$.datepicker.version = "1.8.14";
|
1809 |
+
|
1810 |
+
// Workaround for #4055
|
1811 |
+
// Add another global to avoid noConflict issues with inline event handlers
|
1812 |
+
window['DP_jQuery_' + dpuuid] = $;
|
1813 |
+
|
1814 |
+
$('.date-pick').datepicker({autoFocusNextInput: true});
|
1815 |
+
})(jQuery);
|
i18n/jquery-ui-i18n.js
ADDED
@@ -0,0 +1,1379 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Afrikaans initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Renier Pretorius. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['af'] = {
|
5 |
+
closeText: 'Selekteer',
|
6 |
+
prevText: 'Vorige',
|
7 |
+
nextText: 'Volgende',
|
8 |
+
currentText: 'Vandag',
|
9 |
+
monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
|
10 |
+
'Julie','Augustus','September','Oktober','November','Desember'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
|
13 |
+
dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
|
14 |
+
dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
|
15 |
+
dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['af']);
|
23 |
+
});
|
24 |
+
/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
|
25 |
+
/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */
|
26 |
+
|
27 |
+
jQuery(function($){
|
28 |
+
$.datepicker.regional['ar-DZ'] = {
|
29 |
+
closeText: 'إغلاق',
|
30 |
+
prevText: '<السابق',
|
31 |
+
nextText: 'التالي>',
|
32 |
+
currentText: 'اليوم',
|
33 |
+
monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
|
34 |
+
'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
|
35 |
+
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
|
36 |
+
dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
37 |
+
dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
38 |
+
dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
39 |
+
weekHeader: 'أسبوع',
|
40 |
+
dateFormat: 'dd/mm/yy',
|
41 |
+
firstDay: 6,
|
42 |
+
isRTL: true,
|
43 |
+
showMonthAfterYear: false,
|
44 |
+
yearSuffix: ''};
|
45 |
+
$.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
|
46 |
+
});
|
47 |
+
/* Arabic Translation for jQuery UI date picker plugin. */
|
48 |
+
/* Khaled Alhourani -- me@khaledalhourani.com */
|
49 |
+
/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
|
50 |
+
jQuery(function($){
|
51 |
+
$.datepicker.regional['ar'] = {
|
52 |
+
closeText: 'إغلاق',
|
53 |
+
prevText: '<السابق',
|
54 |
+
nextText: 'التالي>',
|
55 |
+
currentText: 'اليوم',
|
56 |
+
monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
|
57 |
+
'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
|
58 |
+
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
|
59 |
+
dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
60 |
+
dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
61 |
+
dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
62 |
+
weekHeader: 'أسبوع',
|
63 |
+
dateFormat: 'dd/mm/yy',
|
64 |
+
firstDay: 6,
|
65 |
+
isRTL: true,
|
66 |
+
showMonthAfterYear: false,
|
67 |
+
yearSuffix: ''};
|
68 |
+
$.datepicker.setDefaults($.datepicker.regional['ar']);
|
69 |
+
});/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
70 |
+
/* Written by Jamil Najafov (necefov33@gmail.com). */
|
71 |
+
jQuery(function($) {
|
72 |
+
$.datepicker.regional['az'] = {
|
73 |
+
closeText: 'Bağla',
|
74 |
+
prevText: '<Geri',
|
75 |
+
nextText: 'İrəli>',
|
76 |
+
currentText: 'Bugün',
|
77 |
+
monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
|
78 |
+
'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
|
79 |
+
monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
|
80 |
+
'İyul','Avq','Sen','Okt','Noy','Dek'],
|
81 |
+
dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
|
82 |
+
dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
|
83 |
+
dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
|
84 |
+
weekHeader: 'Hf',
|
85 |
+
dateFormat: 'dd.mm.yy',
|
86 |
+
firstDay: 1,
|
87 |
+
isRTL: false,
|
88 |
+
showMonthAfterYear: false,
|
89 |
+
yearSuffix: ''};
|
90 |
+
$.datepicker.setDefaults($.datepicker.regional['az']);
|
91 |
+
});/* Bulgarian initialisation for the jQuery UI date picker plugin. */
|
92 |
+
/* Written by Stoyan Kyosev (http://svest.org). */
|
93 |
+
jQuery(function($){
|
94 |
+
$.datepicker.regional['bg'] = {
|
95 |
+
closeText: 'затвори',
|
96 |
+
prevText: '<назад',
|
97 |
+
nextText: 'напред>',
|
98 |
+
nextBigText: '>>',
|
99 |
+
currentText: 'днес',
|
100 |
+
monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
|
101 |
+
'Юли','Август','Септември','Октомври','Ноември','Декември'],
|
102 |
+
monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
|
103 |
+
'Юли','Авг','Сеп','Окт','Нов','Дек'],
|
104 |
+
dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
|
105 |
+
dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
|
106 |
+
dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
|
107 |
+
weekHeader: 'Wk',
|
108 |
+
dateFormat: 'dd.mm.yy',
|
109 |
+
firstDay: 1,
|
110 |
+
isRTL: false,
|
111 |
+
showMonthAfterYear: false,
|
112 |
+
yearSuffix: ''};
|
113 |
+
$.datepicker.setDefaults($.datepicker.regional['bg']);
|
114 |
+
});
|
115 |
+
/* Bosnian i18n for the jQuery UI date picker plugin. */
|
116 |
+
/* Written by Kenan Konjo. */
|
117 |
+
jQuery(function($){
|
118 |
+
$.datepicker.regional['bs'] = {
|
119 |
+
closeText: 'Zatvori',
|
120 |
+
prevText: '<',
|
121 |
+
nextText: '>',
|
122 |
+
currentText: 'Danas',
|
123 |
+
monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
|
124 |
+
'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
|
125 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
126 |
+
'Jul','Aug','Sep','Okt','Nov','Dec'],
|
127 |
+
dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
|
128 |
+
dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
|
129 |
+
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
130 |
+
weekHeader: 'Wk',
|
131 |
+
dateFormat: 'dd.mm.yy',
|
132 |
+
firstDay: 1,
|
133 |
+
isRTL: false,
|
134 |
+
showMonthAfterYear: false,
|
135 |
+
yearSuffix: ''};
|
136 |
+
$.datepicker.setDefaults($.datepicker.regional['bs']);
|
137 |
+
});/* Inicialització en català per a l'extenció 'calendar' per jQuery. */
|
138 |
+
/* Writers: (joan.leon@gmail.com). */
|
139 |
+
jQuery(function($){
|
140 |
+
$.datepicker.regional['ca'] = {
|
141 |
+
closeText: 'Tancar',
|
142 |
+
prevText: '<Ant',
|
143 |
+
nextText: 'Seg>',
|
144 |
+
currentText: 'Avui',
|
145 |
+
monthNames: ['Gener','Febrer','Març','Abril','Maig','Juny',
|
146 |
+
'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'],
|
147 |
+
monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun',
|
148 |
+
'Jul','Ago','Set','Oct','Nov','Des'],
|
149 |
+
dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],
|
150 |
+
dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],
|
151 |
+
dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],
|
152 |
+
weekHeader: 'Sm',
|
153 |
+
dateFormat: 'dd/mm/yy',
|
154 |
+
firstDay: 1,
|
155 |
+
isRTL: false,
|
156 |
+
showMonthAfterYear: false,
|
157 |
+
yearSuffix: ''};
|
158 |
+
$.datepicker.setDefaults($.datepicker.regional['ca']);
|
159 |
+
});/* Czech initialisation for the jQuery UI date picker plugin. */
|
160 |
+
/* Written by Tomas Muller (tomas@tomas-muller.net). */
|
161 |
+
jQuery(function($){
|
162 |
+
$.datepicker.regional['cs'] = {
|
163 |
+
closeText: 'Zavřít',
|
164 |
+
prevText: '<Dříve',
|
165 |
+
nextText: 'Později>',
|
166 |
+
currentText: 'Nyní',
|
167 |
+
monthNames: ['leden','únor','březen','duben','květen','červen',
|
168 |
+
'červenec','srpen','září','říjen','listopad','prosinec'],
|
169 |
+
monthNamesShort: ['led','úno','bře','dub','kvě','čer',
|
170 |
+
'čvc','srp','zář','říj','lis','pro'],
|
171 |
+
dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
|
172 |
+
dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
|
173 |
+
dayNamesMin: ['ne','po','út','st','čt','pá','so'],
|
174 |
+
weekHeader: 'Týd',
|
175 |
+
dateFormat: 'dd.mm.yy',
|
176 |
+
firstDay: 1,
|
177 |
+
isRTL: false,
|
178 |
+
showMonthAfterYear: false,
|
179 |
+
yearSuffix: ''};
|
180 |
+
$.datepicker.setDefaults($.datepicker.regional['cs']);
|
181 |
+
});
|
182 |
+
/* Danish initialisation for the jQuery UI date picker plugin. */
|
183 |
+
/* Written by Jan Christensen ( deletestuff@gmail.com). */
|
184 |
+
jQuery(function($){
|
185 |
+
$.datepicker.regional['da'] = {
|
186 |
+
closeText: 'Luk',
|
187 |
+
prevText: '<Forrige',
|
188 |
+
nextText: 'Næste>',
|
189 |
+
currentText: 'Idag',
|
190 |
+
monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
|
191 |
+
'Juli','August','September','Oktober','November','December'],
|
192 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
193 |
+
'Jul','Aug','Sep','Okt','Nov','Dec'],
|
194 |
+
dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
|
195 |
+
dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
|
196 |
+
dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
|
197 |
+
weekHeader: 'Uge',
|
198 |
+
dateFormat: 'dd-mm-yy',
|
199 |
+
firstDay: 1,
|
200 |
+
isRTL: false,
|
201 |
+
showMonthAfterYear: false,
|
202 |
+
yearSuffix: ''};
|
203 |
+
$.datepicker.setDefaults($.datepicker.regional['da']);
|
204 |
+
});
|
205 |
+
/* German initialisation for the jQuery UI date picker plugin. */
|
206 |
+
/* Written by Milian Wolff (mail@milianw.de). */
|
207 |
+
jQuery(function($){
|
208 |
+
$.datepicker.regional['de'] = {
|
209 |
+
closeText: 'schließen',
|
210 |
+
prevText: '<zurück',
|
211 |
+
nextText: 'Vor>',
|
212 |
+
currentText: 'heute',
|
213 |
+
monthNames: ['Januar','Februar','März','April','Mai','Juni',
|
214 |
+
'Juli','August','September','Oktober','November','Dezember'],
|
215 |
+
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
|
216 |
+
'Jul','Aug','Sep','Okt','Nov','Dez'],
|
217 |
+
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
|
218 |
+
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
219 |
+
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
220 |
+
weekHeader: 'Wo',
|
221 |
+
dateFormat: 'dd.mm.yy',
|
222 |
+
firstDay: 1,
|
223 |
+
isRTL: false,
|
224 |
+
showMonthAfterYear: false,
|
225 |
+
yearSuffix: ''};
|
226 |
+
$.datepicker.setDefaults($.datepicker.regional['de']);
|
227 |
+
});
|
228 |
+
/* Greek (el) initialisation for the jQuery UI date picker plugin. */
|
229 |
+
/* Written by Alex Cicovic (http://www.alexcicovic.com) */
|
230 |
+
jQuery(function($){
|
231 |
+
$.datepicker.regional['el'] = {
|
232 |
+
closeText: 'Κλείσιμο',
|
233 |
+
prevText: 'Προηγούμενος',
|
234 |
+
nextText: 'Επόμενος',
|
235 |
+
currentText: 'Τρέχων Μήνας',
|
236 |
+
monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
|
237 |
+
'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
|
238 |
+
monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
|
239 |
+
'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
|
240 |
+
dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
|
241 |
+
dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
|
242 |
+
dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
|
243 |
+
weekHeader: 'Εβδ',
|
244 |
+
dateFormat: 'dd/mm/yy',
|
245 |
+
firstDay: 1,
|
246 |
+
isRTL: false,
|
247 |
+
showMonthAfterYear: false,
|
248 |
+
yearSuffix: ''};
|
249 |
+
$.datepicker.setDefaults($.datepicker.regional['el']);
|
250 |
+
});/* English/Australia initialisation for the jQuery UI date picker plugin. */
|
251 |
+
/* Based on the en-GB initialisation. */
|
252 |
+
jQuery(function($){
|
253 |
+
$.datepicker.regional['en-AU'] = {
|
254 |
+
closeText: 'Done',
|
255 |
+
prevText: 'Prev',
|
256 |
+
nextText: 'Next',
|
257 |
+
currentText: 'Today',
|
258 |
+
monthNames: ['January','February','March','April','May','June',
|
259 |
+
'July','August','September','October','November','December'],
|
260 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
261 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
262 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
263 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
264 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
265 |
+
weekHeader: 'Wk',
|
266 |
+
dateFormat: 'dd/mm/yy',
|
267 |
+
firstDay: 1,
|
268 |
+
isRTL: false,
|
269 |
+
showMonthAfterYear: false,
|
270 |
+
yearSuffix: ''};
|
271 |
+
$.datepicker.setDefaults($.datepicker.regional['en-AU']);
|
272 |
+
});
|
273 |
+
/* English/UK initialisation for the jQuery UI date picker plugin. */
|
274 |
+
/* Written by Stuart. */
|
275 |
+
jQuery(function($){
|
276 |
+
$.datepicker.regional['en-GB'] = {
|
277 |
+
closeText: 'Done',
|
278 |
+
prevText: 'Prev',
|
279 |
+
nextText: 'Next',
|
280 |
+
currentText: 'Today',
|
281 |
+
monthNames: ['January','February','March','April','May','June',
|
282 |
+
'July','August','September','October','November','December'],
|
283 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
284 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
285 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
286 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
287 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
288 |
+
weekHeader: 'Wk',
|
289 |
+
dateFormat: 'dd/mm/yy',
|
290 |
+
firstDay: 1,
|
291 |
+
isRTL: false,
|
292 |
+
showMonthAfterYear: false,
|
293 |
+
yearSuffix: ''};
|
294 |
+
$.datepicker.setDefaults($.datepicker.regional['en-GB']);
|
295 |
+
});
|
296 |
+
/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
|
297 |
+
/* Based on the en-GB initialisation. */
|
298 |
+
jQuery(function($){
|
299 |
+
$.datepicker.regional['en-NZ'] = {
|
300 |
+
closeText: 'Done',
|
301 |
+
prevText: 'Prev',
|
302 |
+
nextText: 'Next',
|
303 |
+
currentText: 'Today',
|
304 |
+
monthNames: ['January','February','March','April','May','June',
|
305 |
+
'July','August','September','October','November','December'],
|
306 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
307 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
308 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
309 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
310 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
311 |
+
weekHeader: 'Wk',
|
312 |
+
dateFormat: 'dd/mm/yy',
|
313 |
+
firstDay: 1,
|
314 |
+
isRTL: false,
|
315 |
+
showMonthAfterYear: false,
|
316 |
+
yearSuffix: ''};
|
317 |
+
$.datepicker.setDefaults($.datepicker.regional['en-NZ']);
|
318 |
+
});
|
319 |
+
/* Esperanto initialisation for the jQuery UI date picker plugin. */
|
320 |
+
/* Written by Olivier M. (olivierweb@ifrance.com). */
|
321 |
+
jQuery(function($){
|
322 |
+
$.datepicker.regional['eo'] = {
|
323 |
+
closeText: 'Fermi',
|
324 |
+
prevText: '<Anta',
|
325 |
+
nextText: 'Sekv>',
|
326 |
+
currentText: 'Nuna',
|
327 |
+
monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
|
328 |
+
'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
|
329 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
330 |
+
'Jul','Aŭg','Sep','Okt','Nov','Dec'],
|
331 |
+
dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
|
332 |
+
dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
|
333 |
+
dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
|
334 |
+
weekHeader: 'Sb',
|
335 |
+
dateFormat: 'dd/mm/yy',
|
336 |
+
firstDay: 0,
|
337 |
+
isRTL: false,
|
338 |
+
showMonthAfterYear: false,
|
339 |
+
yearSuffix: ''};
|
340 |
+
$.datepicker.setDefaults($.datepicker.regional['eo']);
|
341 |
+
});
|
342 |
+
/* Inicialización en español para la extensión 'UI date picker' para jQuery. */
|
343 |
+
/* Traducido por Vester (xvester@gmail.com). */
|
344 |
+
jQuery(function($){
|
345 |
+
$.datepicker.regional['es'] = {
|
346 |
+
closeText: 'Cerrar',
|
347 |
+
prevText: '<Ant',
|
348 |
+
nextText: 'Sig>',
|
349 |
+
currentText: 'Hoy',
|
350 |
+
monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
|
351 |
+
'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
|
352 |
+
monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
|
353 |
+
'Jul','Ago','Sep','Oct','Nov','Dic'],
|
354 |
+
dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
|
355 |
+
dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
|
356 |
+
dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
|
357 |
+
weekHeader: 'Sm',
|
358 |
+
dateFormat: 'dd/mm/yy',
|
359 |
+
firstDay: 1,
|
360 |
+
isRTL: false,
|
361 |
+
showMonthAfterYear: false,
|
362 |
+
yearSuffix: ''};
|
363 |
+
$.datepicker.setDefaults($.datepicker.regional['es']);
|
364 |
+
});/* Estonian initialisation for the jQuery UI date picker plugin. */
|
365 |
+
/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
|
366 |
+
jQuery(function($){
|
367 |
+
$.datepicker.regional['et'] = {
|
368 |
+
closeText: 'Sulge',
|
369 |
+
prevText: 'Eelnev',
|
370 |
+
nextText: 'Järgnev',
|
371 |
+
currentText: 'Täna',
|
372 |
+
monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
|
373 |
+
'Juuli','August','September','Oktoober','November','Detsember'],
|
374 |
+
monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
|
375 |
+
'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
|
376 |
+
dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
|
377 |
+
dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
|
378 |
+
dayNamesMin: ['P','E','T','K','N','R','L'],
|
379 |
+
weekHeader: 'Sm',
|
380 |
+
dateFormat: 'dd.mm.yy',
|
381 |
+
firstDay: 1,
|
382 |
+
isRTL: false,
|
383 |
+
showMonthAfterYear: false,
|
384 |
+
yearSuffix: ''};
|
385 |
+
$.datepicker.setDefaults($.datepicker.regional['et']);
|
386 |
+
}); /* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
|
387 |
+
/* Karrikas-ek itzulia (karrikas@karrikas.com) */
|
388 |
+
jQuery(function($){
|
389 |
+
$.datepicker.regional['eu'] = {
|
390 |
+
closeText: 'Egina',
|
391 |
+
prevText: '<Aur',
|
392 |
+
nextText: 'Hur>',
|
393 |
+
currentText: 'Gaur',
|
394 |
+
monthNames: ['Urtarrila','Otsaila','Martxoa','Apirila','Maiatza','Ekaina',
|
395 |
+
'Uztaila','Abuztua','Iraila','Urria','Azaroa','Abendua'],
|
396 |
+
monthNamesShort: ['Urt','Ots','Mar','Api','Mai','Eka',
|
397 |
+
'Uzt','Abu','Ira','Urr','Aza','Abe'],
|
398 |
+
dayNames: ['Igandea','Astelehena','Asteartea','Asteazkena','Osteguna','Ostirala','Larunbata'],
|
399 |
+
dayNamesShort: ['Iga','Ast','Ast','Ast','Ost','Ost','Lar'],
|
400 |
+
dayNamesMin: ['Ig','As','As','As','Os','Os','La'],
|
401 |
+
weekHeader: 'Wk',
|
402 |
+
dateFormat: 'yy/mm/dd',
|
403 |
+
firstDay: 1,
|
404 |
+
isRTL: false,
|
405 |
+
showMonthAfterYear: false,
|
406 |
+
yearSuffix: ''};
|
407 |
+
$.datepicker.setDefaults($.datepicker.regional['eu']);
|
408 |
+
});/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
|
409 |
+
/* Javad Mowlanezhad -- jmowla@gmail.com */
|
410 |
+
/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
|
411 |
+
jQuery(function($) {
|
412 |
+
$.datepicker.regional['fa'] = {
|
413 |
+
closeText: 'بستن',
|
414 |
+
prevText: '<قبلي',
|
415 |
+
nextText: 'بعدي>',
|
416 |
+
currentText: 'امروز',
|
417 |
+
monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور',
|
418 |
+
'مهر','آبان','آذر','دي','بهمن','اسفند'],
|
419 |
+
monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
|
420 |
+
dayNames: ['يکشنبه','دوشنبه','سهشنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'],
|
421 |
+
dayNamesShort: ['ي','د','س','چ','پ','ج', 'ش'],
|
422 |
+
dayNamesMin: ['ي','د','س','چ','پ','ج', 'ش'],
|
423 |
+
weekHeader: 'هف',
|
424 |
+
dateFormat: 'yy/mm/dd',
|
425 |
+
firstDay: 6,
|
426 |
+
isRTL: true,
|
427 |
+
showMonthAfterYear: false,
|
428 |
+
yearSuffix: ''};
|
429 |
+
$.datepicker.setDefaults($.datepicker.regional['fa']);
|
430 |
+
});/* Finnish initialisation for the jQuery UI date picker plugin. */
|
431 |
+
/* Written by Harri Kilpi� (harrikilpio@gmail.com). */
|
432 |
+
jQuery(function($){
|
433 |
+
$.datepicker.regional['fi'] = {
|
434 |
+
closeText: 'Sulje',
|
435 |
+
prevText: '«Edellinen',
|
436 |
+
nextText: 'Seuraava»',
|
437 |
+
currentText: 'Tänään',
|
438 |
+
monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
|
439 |
+
'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
|
440 |
+
monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
|
441 |
+
'Heinä','Elo','Syys','Loka','Marras','Joulu'],
|
442 |
+
dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'],
|
443 |
+
dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
|
444 |
+
dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
|
445 |
+
weekHeader: 'Vk',
|
446 |
+
dateFormat: 'dd.mm.yy',
|
447 |
+
firstDay: 1,
|
448 |
+
isRTL: false,
|
449 |
+
showMonthAfterYear: false,
|
450 |
+
yearSuffix: ''};
|
451 |
+
$.datepicker.setDefaults($.datepicker.regional['fi']);
|
452 |
+
});
|
453 |
+
/* Faroese initialisation for the jQuery UI date picker plugin */
|
454 |
+
/* Written by Sverri Mohr Olsen, sverrimo@gmail.com */
|
455 |
+
jQuery(function($){
|
456 |
+
$.datepicker.regional['fo'] = {
|
457 |
+
closeText: 'Lat aftur',
|
458 |
+
prevText: '<Fyrra',
|
459 |
+
nextText: 'Næsta>',
|
460 |
+
currentText: 'Í dag',
|
461 |
+
monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
|
462 |
+
'Juli','August','September','Oktober','November','Desember'],
|
463 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
|
464 |
+
'Jul','Aug','Sep','Okt','Nov','Des'],
|
465 |
+
dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
|
466 |
+
dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
|
467 |
+
dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
|
468 |
+
weekHeader: 'Vk',
|
469 |
+
dateFormat: 'dd-mm-yy',
|
470 |
+
firstDay: 0,
|
471 |
+
isRTL: false,
|
472 |
+
showMonthAfterYear: false,
|
473 |
+
yearSuffix: ''};
|
474 |
+
$.datepicker.setDefaults($.datepicker.regional['fo']);
|
475 |
+
});
|
476 |
+
/* Swiss-French initialisation for the jQuery UI date picker plugin. */
|
477 |
+
/* Written Martin Voelkle (martin.voelkle@e-tc.ch). */
|
478 |
+
jQuery(function($){
|
479 |
+
$.datepicker.regional['fr-CH'] = {
|
480 |
+
closeText: 'Fermer',
|
481 |
+
prevText: '<Préc',
|
482 |
+
nextText: 'Suiv>',
|
483 |
+
currentText: 'Courant',
|
484 |
+
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
|
485 |
+
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
|
486 |
+
monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
|
487 |
+
'Jul','Aoû','Sep','Oct','Nov','Déc'],
|
488 |
+
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
|
489 |
+
dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
|
490 |
+
dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
|
491 |
+
weekHeader: 'Sm',
|
492 |
+
dateFormat: 'dd.mm.yy',
|
493 |
+
firstDay: 1,
|
494 |
+
isRTL: false,
|
495 |
+
showMonthAfterYear: false,
|
496 |
+
yearSuffix: ''};
|
497 |
+
$.datepicker.setDefaults($.datepicker.regional['fr-CH']);
|
498 |
+
});/* French initialisation for the jQuery UI date picker plugin. */
|
499 |
+
/* Written by Keith Wood (kbwood{at}iinet.com.au),
|
500 |
+
Stéphane Nahmani (sholby@sholby.net),
|
501 |
+
Stéphane Raimbault <stephane.raimbault@gmail.com> */
|
502 |
+
jQuery(function($){
|
503 |
+
$.datepicker.regional['fr'] = {
|
504 |
+
closeText: 'Fermer',
|
505 |
+
prevText: 'Précédent',
|
506 |
+
nextText: 'Suivant',
|
507 |
+
currentText: 'Aujourd\'hui',
|
508 |
+
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
|
509 |
+
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
|
510 |
+
monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
|
511 |
+
'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
|
512 |
+
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
|
513 |
+
dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
|
514 |
+
dayNamesMin: ['D','L','M','M','J','V','S'],
|
515 |
+
weekHeader: 'Sem.',
|
516 |
+
dateFormat: 'dd/mm/yy',
|
517 |
+
firstDay: 1,
|
518 |
+
isRTL: false,
|
519 |
+
showMonthAfterYear: false,
|
520 |
+
yearSuffix: ''};
|
521 |
+
$.datepicker.setDefaults($.datepicker.regional['fr']);
|
522 |
+
});
|
523 |
+
/* Galician localization for 'UI date picker' jQuery extension. */
|
524 |
+
/* Translated by Jorge Barreiro <yortx.barry@gmail.com>. */
|
525 |
+
jQuery(function($){
|
526 |
+
$.datepicker.regional['gl'] = {
|
527 |
+
closeText: 'Pechar',
|
528 |
+
prevText: '<Ant',
|
529 |
+
nextText: 'Seg>',
|
530 |
+
currentText: 'Hoxe',
|
531 |
+
monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
|
532 |
+
'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
|
533 |
+
monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
|
534 |
+
'Xul','Ago','Set','Out','Nov','Dec'],
|
535 |
+
dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
|
536 |
+
dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
|
537 |
+
dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
|
538 |
+
weekHeader: 'Sm',
|
539 |
+
dateFormat: 'dd/mm/yy',
|
540 |
+
firstDay: 1,
|
541 |
+
isRTL: false,
|
542 |
+
showMonthAfterYear: false,
|
543 |
+
yearSuffix: ''};
|
544 |
+
$.datepicker.setDefaults($.datepicker.regional['gl']);
|
545 |
+
});/* Hebrew initialisation for the UI Datepicker extension. */
|
546 |
+
/* Written by Amir Hardon (ahardon at gmail dot com). */
|
547 |
+
jQuery(function($){
|
548 |
+
$.datepicker.regional['he'] = {
|
549 |
+
closeText: 'סגור',
|
550 |
+
prevText: '<הקודם',
|
551 |
+
nextText: 'הבא>',
|
552 |
+
currentText: 'היום',
|
553 |
+
monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
|
554 |
+
'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
|
555 |
+
monthNamesShort: ['1','2','3','4','5','6',
|
556 |
+
'7','8','9','10','11','12'],
|
557 |
+
dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
|
558 |
+
dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
|
559 |
+
dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
|
560 |
+
weekHeader: 'Wk',
|
561 |
+
dateFormat: 'dd/mm/yy',
|
562 |
+
firstDay: 0,
|
563 |
+
isRTL: true,
|
564 |
+
showMonthAfterYear: false,
|
565 |
+
yearSuffix: ''};
|
566 |
+
$.datepicker.setDefaults($.datepicker.regional['he']);
|
567 |
+
});
|
568 |
+
/* Croatian i18n for the jQuery UI date picker plugin. */
|
569 |
+
/* Written by Vjekoslav Nesek. */
|
570 |
+
jQuery(function($){
|
571 |
+
$.datepicker.regional['hr'] = {
|
572 |
+
closeText: 'Zatvori',
|
573 |
+
prevText: '<',
|
574 |
+
nextText: '>',
|
575 |
+
currentText: 'Danas',
|
576 |
+
monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
|
577 |
+
'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
|
578 |
+
monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
|
579 |
+
'Srp','Kol','Ruj','Lis','Stu','Pro'],
|
580 |
+
dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
|
581 |
+
dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
|
582 |
+
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
583 |
+
weekHeader: 'Tje',
|
584 |
+
dateFormat: 'dd.mm.yy.',
|
585 |
+
firstDay: 1,
|
586 |
+
isRTL: false,
|
587 |
+
showMonthAfterYear: false,
|
588 |
+
yearSuffix: ''};
|
589 |
+
$.datepicker.setDefaults($.datepicker.regional['hr']);
|
590 |
+
});/* Hungarian initialisation for the jQuery UI date picker plugin. */
|
591 |
+
/* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
|
592 |
+
jQuery(function($){
|
593 |
+
$.datepicker.regional['hu'] = {
|
594 |
+
closeText: 'bezárás',
|
595 |
+
prevText: '« vissza',
|
596 |
+
nextText: 'előre »',
|
597 |
+
currentText: 'ma',
|
598 |
+
monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
|
599 |
+
'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
|
600 |
+
monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
|
601 |
+
'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
|
602 |
+
dayNames: ['Vasárnap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
|
603 |
+
dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
|
604 |
+
dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
|
605 |
+
weekHeader: 'Hé',
|
606 |
+
dateFormat: 'yy-mm-dd',
|
607 |
+
firstDay: 1,
|
608 |
+
isRTL: false,
|
609 |
+
showMonthAfterYear: true,
|
610 |
+
yearSuffix: ''};
|
611 |
+
$.datepicker.setDefaults($.datepicker.regional['hu']);
|
612 |
+
});
|
613 |
+
/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
|
614 |
+
/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
|
615 |
+
jQuery(function($){
|
616 |
+
$.datepicker.regional['hy'] = {
|
617 |
+
closeText: 'Փակել',
|
618 |
+
prevText: '<Նախ.',
|
619 |
+
nextText: 'Հաջ.>',
|
620 |
+
currentText: 'Այսօր',
|
621 |
+
monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
|
622 |
+
'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
|
623 |
+
monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
|
624 |
+
'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
|
625 |
+
dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
|
626 |
+
dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
|
627 |
+
dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
|
628 |
+
weekHeader: 'ՇԲՏ',
|
629 |
+
dateFormat: 'dd.mm.yy',
|
630 |
+
firstDay: 1,
|
631 |
+
isRTL: false,
|
632 |
+
showMonthAfterYear: false,
|
633 |
+
yearSuffix: ''};
|
634 |
+
$.datepicker.setDefaults($.datepicker.regional['hy']);
|
635 |
+
});/* Indonesian initialisation for the jQuery UI date picker plugin. */
|
636 |
+
/* Written by Deden Fathurahman (dedenf@gmail.com). */
|
637 |
+
jQuery(function($){
|
638 |
+
$.datepicker.regional['id'] = {
|
639 |
+
closeText: 'Tutup',
|
640 |
+
prevText: '<mundur',
|
641 |
+
nextText: 'maju>',
|
642 |
+
currentText: 'hari ini',
|
643 |
+
monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
|
644 |
+
'Juli','Agustus','September','Oktober','Nopember','Desember'],
|
645 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
|
646 |
+
'Jul','Agus','Sep','Okt','Nop','Des'],
|
647 |
+
dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
|
648 |
+
dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
|
649 |
+
dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
|
650 |
+
weekHeader: 'Mg',
|
651 |
+
dateFormat: 'dd/mm/yy',
|
652 |
+
firstDay: 0,
|
653 |
+
isRTL: false,
|
654 |
+
showMonthAfterYear: false,
|
655 |
+
yearSuffix: ''};
|
656 |
+
$.datepicker.setDefaults($.datepicker.regional['id']);
|
657 |
+
});/* Icelandic initialisation for the jQuery UI date picker plugin. */
|
658 |
+
/* Written by Haukur H. Thorsson (haukur@eskill.is). */
|
659 |
+
jQuery(function($){
|
660 |
+
$.datepicker.regional['is'] = {
|
661 |
+
closeText: 'Loka',
|
662 |
+
prevText: '< Fyrri',
|
663 |
+
nextText: 'Næsti >',
|
664 |
+
currentText: 'Í dag',
|
665 |
+
monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
|
666 |
+
'Júlí','Ágúst','September','Október','Nóvember','Desember'],
|
667 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
|
668 |
+
'Júl','Ágú','Sep','Okt','Nóv','Des'],
|
669 |
+
dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
|
670 |
+
dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
|
671 |
+
dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
|
672 |
+
weekHeader: 'Vika',
|
673 |
+
dateFormat: 'dd/mm/yy',
|
674 |
+
firstDay: 0,
|
675 |
+
isRTL: false,
|
676 |
+
showMonthAfterYear: false,
|
677 |
+
yearSuffix: ''};
|
678 |
+
$.datepicker.setDefaults($.datepicker.regional['is']);
|
679 |
+
});/* Italian initialisation for the jQuery UI date picker plugin. */
|
680 |
+
/* Written by Antonello Pasella (antonello.pasella@gmail.com). */
|
681 |
+
jQuery(function($){
|
682 |
+
$.datepicker.regional['it'] = {
|
683 |
+
closeText: 'Chiudi',
|
684 |
+
prevText: '<Prec',
|
685 |
+
nextText: 'Succ>',
|
686 |
+
currentText: 'Oggi',
|
687 |
+
monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
|
688 |
+
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
|
689 |
+
monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
|
690 |
+
'Lug','Ago','Set','Ott','Nov','Dic'],
|
691 |
+
dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
|
692 |
+
dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
|
693 |
+
dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
|
694 |
+
weekHeader: 'Sm',
|
695 |
+
dateFormat: 'dd/mm/yy',
|
696 |
+
firstDay: 1,
|
697 |
+
isRTL: false,
|
698 |
+
showMonthAfterYear: false,
|
699 |
+
yearSuffix: ''};
|
700 |
+
$.datepicker.setDefaults($.datepicker.regional['it']);
|
701 |
+
});
|
702 |
+
/* Japanese initialisation for the jQuery UI date picker plugin. */
|
703 |
+
/* Written by Kentaro SATO (kentaro@ranvis.com). */
|
704 |
+
jQuery(function($){
|
705 |
+
$.datepicker.regional['ja'] = {
|
706 |
+
closeText: '閉じる',
|
707 |
+
prevText: '<前',
|
708 |
+
nextText: '次>',
|
709 |
+
currentText: '今日',
|
710 |
+
monthNames: ['1月','2月','3月','4月','5月','6月',
|
711 |
+
'7月','8月','9月','10月','11月','12月'],
|
712 |
+
monthNamesShort: ['1月','2月','3月','4月','5月','6月',
|
713 |
+
'7月','8月','9月','10月','11月','12月'],
|
714 |
+
dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
|
715 |
+
dayNamesShort: ['日','月','火','水','木','金','土'],
|
716 |
+
dayNamesMin: ['日','月','火','水','木','金','土'],
|
717 |
+
weekHeader: '週',
|
718 |
+
dateFormat: 'yy/mm/dd',
|
719 |
+
firstDay: 0,
|
720 |
+
isRTL: false,
|
721 |
+
showMonthAfterYear: true,
|
722 |
+
yearSuffix: '年'};
|
723 |
+
$.datepicker.setDefaults($.datepicker.regional['ja']);
|
724 |
+
});/* Korean initialisation for the jQuery calendar extension. */
|
725 |
+
/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */
|
726 |
+
jQuery(function($){
|
727 |
+
$.datepicker.regional['ko'] = {
|
728 |
+
closeText: '닫기',
|
729 |
+
prevText: '이전달',
|
730 |
+
nextText: '다음달',
|
731 |
+
currentText: '오늘',
|
732 |
+
monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
|
733 |
+
'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
|
734 |
+
monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
|
735 |
+
'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
|
736 |
+
dayNames: ['일','월','화','수','목','금','토'],
|
737 |
+
dayNamesShort: ['일','월','화','수','목','금','토'],
|
738 |
+
dayNamesMin: ['일','월','화','수','목','금','토'],
|
739 |
+
weekHeader: 'Wk',
|
740 |
+
dateFormat: 'yy-mm-dd',
|
741 |
+
firstDay: 0,
|
742 |
+
isRTL: false,
|
743 |
+
showMonthAfterYear: false,
|
744 |
+
yearSuffix: '년'};
|
745 |
+
$.datepicker.setDefaults($.datepicker.regional['ko']);
|
746 |
+
});/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
747 |
+
/* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */
|
748 |
+
jQuery(function($){
|
749 |
+
$.datepicker.regional['kz'] = {
|
750 |
+
closeText: 'Жабу',
|
751 |
+
prevText: '<Алдыңғы',
|
752 |
+
nextText: 'Келесі>',
|
753 |
+
currentText: 'Бүгін',
|
754 |
+
monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
|
755 |
+
'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
|
756 |
+
monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
|
757 |
+
'Шіл','Там','Қыр','Қаз','Қар','Жел'],
|
758 |
+
dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
|
759 |
+
dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
|
760 |
+
dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
|
761 |
+
weekHeader: 'Не',
|
762 |
+
dateFormat: 'dd.mm.yy',
|
763 |
+
firstDay: 1,
|
764 |
+
isRTL: false,
|
765 |
+
showMonthAfterYear: false,
|
766 |
+
yearSuffix: ''};
|
767 |
+
$.datepicker.setDefaults($.datepicker.regional['kz']);
|
768 |
+
});
|
769 |
+
/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
770 |
+
/* @author Arturas Paleicikas <arturas@avalon.lt> */
|
771 |
+
jQuery(function($){
|
772 |
+
$.datepicker.regional['lt'] = {
|
773 |
+
closeText: 'Uždaryti',
|
774 |
+
prevText: '<Atgal',
|
775 |
+
nextText: 'Pirmyn>',
|
776 |
+
currentText: 'Šiandien',
|
777 |
+
monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
|
778 |
+
'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
|
779 |
+
monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
|
780 |
+
'Lie','Rugp','Rugs','Spa','Lap','Gru'],
|
781 |
+
dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
|
782 |
+
dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
|
783 |
+
dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
|
784 |
+
weekHeader: 'Wk',
|
785 |
+
dateFormat: 'yy-mm-dd',
|
786 |
+
firstDay: 1,
|
787 |
+
isRTL: false,
|
788 |
+
showMonthAfterYear: false,
|
789 |
+
yearSuffix: ''};
|
790 |
+
$.datepicker.setDefaults($.datepicker.regional['lt']);
|
791 |
+
});/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
792 |
+
/* @author Arturas Paleicikas <arturas.paleicikas@metasite.net> */
|
793 |
+
jQuery(function($){
|
794 |
+
$.datepicker.regional['lv'] = {
|
795 |
+
closeText: 'Aizvērt',
|
796 |
+
prevText: 'Iepr',
|
797 |
+
nextText: 'Nāka',
|
798 |
+
currentText: 'Šodien',
|
799 |
+
monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
|
800 |
+
'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
|
801 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
|
802 |
+
'Jūl','Aug','Sep','Okt','Nov','Dec'],
|
803 |
+
dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
|
804 |
+
dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
|
805 |
+
dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
|
806 |
+
weekHeader: 'Nav',
|
807 |
+
dateFormat: 'dd-mm-yy',
|
808 |
+
firstDay: 1,
|
809 |
+
isRTL: false,
|
810 |
+
showMonthAfterYear: false,
|
811 |
+
yearSuffix: ''};
|
812 |
+
$.datepicker.setDefaults($.datepicker.regional['lv']);
|
813 |
+
});/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
814 |
+
/* Written by Saji Nediyanchath (saji89@gmail.com). */
|
815 |
+
jQuery(function($){
|
816 |
+
$.datepicker.regional['ml'] = {
|
817 |
+
closeText: 'ശരി',
|
818 |
+
prevText: 'മുന്നത്തെ',
|
819 |
+
nextText: 'അടുത്തത് ',
|
820 |
+
currentText: 'ഇന്ന്',
|
821 |
+
monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്ച്ച്','ഏപ്രില്','മേയ്','ജൂണ്',
|
822 |
+
'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്','ഒക്ടോബര്','നവംബര്','ഡിസംബര്'],
|
823 |
+
monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്', 'ഏപ്രി', 'മേയ്', 'ജൂണ്',
|
824 |
+
'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
|
825 |
+
dayNames: ['ഞായര്', 'തിങ്കള്', 'ചൊവ്വ', 'ബുധന്', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
|
826 |
+
dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
|
827 |
+
dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
|
828 |
+
weekHeader: 'ആ',
|
829 |
+
dateFormat: 'dd/mm/yy',
|
830 |
+
firstDay: 1,
|
831 |
+
isRTL: false,
|
832 |
+
showMonthAfterYear: false,
|
833 |
+
yearSuffix: ''};
|
834 |
+
$.datepicker.setDefaults($.datepicker.regional['ml']);
|
835 |
+
});
|
836 |
+
/* Malaysian initialisation for the jQuery UI date picker plugin. */
|
837 |
+
/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */
|
838 |
+
jQuery(function($){
|
839 |
+
$.datepicker.regional['ms'] = {
|
840 |
+
closeText: 'Tutup',
|
841 |
+
prevText: '<Sebelum',
|
842 |
+
nextText: 'Selepas>',
|
843 |
+
currentText: 'hari ini',
|
844 |
+
monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
|
845 |
+
'Julai','Ogos','September','Oktober','November','Disember'],
|
846 |
+
monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
|
847 |
+
'Jul','Ogo','Sep','Okt','Nov','Dis'],
|
848 |
+
dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
|
849 |
+
dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
|
850 |
+
dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
|
851 |
+
weekHeader: 'Mg',
|
852 |
+
dateFormat: 'dd/mm/yy',
|
853 |
+
firstDay: 0,
|
854 |
+
isRTL: false,
|
855 |
+
showMonthAfterYear: false,
|
856 |
+
yearSuffix: ''};
|
857 |
+
$.datepicker.setDefaults($.datepicker.regional['ms']);
|
858 |
+
});/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
859 |
+
/* Written by Mathias Bynens <http://mathiasbynens.be/> */
|
860 |
+
jQuery(function($){
|
861 |
+
$.datepicker.regional.nl = {
|
862 |
+
closeText: 'Sluiten',
|
863 |
+
prevText: '←',
|
864 |
+
nextText: '→',
|
865 |
+
currentText: 'Vandaag',
|
866 |
+
monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
|
867 |
+
'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
|
868 |
+
monthNamesShort: ['jan', 'feb', 'maa', 'apr', 'mei', 'jun',
|
869 |
+
'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
870 |
+
dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
|
871 |
+
dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
|
872 |
+
dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
|
873 |
+
weekHeader: 'Wk',
|
874 |
+
dateFormat: 'dd-mm-yy',
|
875 |
+
firstDay: 1,
|
876 |
+
isRTL: false,
|
877 |
+
showMonthAfterYear: false,
|
878 |
+
yearSuffix: ''};
|
879 |
+
$.datepicker.setDefaults($.datepicker.regional.nl);
|
880 |
+
});/* Norwegian initialisation for the jQuery UI date picker plugin. */
|
881 |
+
/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
|
882 |
+
|
883 |
+
jQuery(function($){
|
884 |
+
$.datepicker.regional['no'] = {
|
885 |
+
closeText: 'Lukk',
|
886 |
+
prevText: '«Forrige',
|
887 |
+
nextText: 'Neste»',
|
888 |
+
currentText: 'I dag',
|
889 |
+
monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
|
890 |
+
monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
|
891 |
+
dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
|
892 |
+
dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
|
893 |
+
dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
|
894 |
+
weekHeader: 'Uke',
|
895 |
+
dateFormat: 'dd.mm.yy',
|
896 |
+
firstDay: 1,
|
897 |
+
isRTL: false,
|
898 |
+
showMonthAfterYear: false,
|
899 |
+
yearSuffix: ''
|
900 |
+
};
|
901 |
+
$.datepicker.setDefaults($.datepicker.regional['no']);
|
902 |
+
});
|
903 |
+
/* Polish initialisation for the jQuery UI date picker plugin. */
|
904 |
+
/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
|
905 |
+
jQuery(function($){
|
906 |
+
$.datepicker.regional['pl'] = {
|
907 |
+
closeText: 'Zamknij',
|
908 |
+
prevText: '<Poprzedni',
|
909 |
+
nextText: 'Następny>',
|
910 |
+
currentText: 'Dziś',
|
911 |
+
monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
|
912 |
+
'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
|
913 |
+
monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
|
914 |
+
'Lip','Sie','Wrz','Pa','Lis','Gru'],
|
915 |
+
dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
|
916 |
+
dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
|
917 |
+
dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
|
918 |
+
weekHeader: 'Tydz',
|
919 |
+
dateFormat: 'dd.mm.yy',
|
920 |
+
firstDay: 1,
|
921 |
+
isRTL: false,
|
922 |
+
showMonthAfterYear: false,
|
923 |
+
yearSuffix: ''};
|
924 |
+
$.datepicker.setDefaults($.datepicker.regional['pl']);
|
925 |
+
});
|
926 |
+
/* Brazilian initialisation for the jQuery UI date picker plugin. */
|
927 |
+
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
|
928 |
+
jQuery(function($){
|
929 |
+
$.datepicker.regional['pt-BR'] = {
|
930 |
+
closeText: 'Fechar',
|
931 |
+
prevText: '<Anterior',
|
932 |
+
nextText: 'Próximo>',
|
933 |
+
currentText: 'Hoje',
|
934 |
+
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
|
935 |
+
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
|
936 |
+
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
|
937 |
+
'Jul','Ago','Set','Out','Nov','Dez'],
|
938 |
+
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
|
939 |
+
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
940 |
+
dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
941 |
+
weekHeader: 'Sm',
|
942 |
+
dateFormat: 'dd/mm/yy',
|
943 |
+
firstDay: 0,
|
944 |
+
isRTL: false,
|
945 |
+
showMonthAfterYear: false,
|
946 |
+
yearSuffix: ''};
|
947 |
+
$.datepicker.setDefaults($.datepicker.regional['pt-BR']);
|
948 |
+
});/* Portuguese initialisation for the jQuery UI date picker plugin. */
|
949 |
+
jQuery(function($){
|
950 |
+
$.datepicker.regional['pt'] = {
|
951 |
+
closeText: 'Fechar',
|
952 |
+
prevText: '<Anterior',
|
953 |
+
nextText: 'Seguinte',
|
954 |
+
currentText: 'Hoje',
|
955 |
+
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
|
956 |
+
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
|
957 |
+
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
|
958 |
+
'Jul','Ago','Set','Out','Nov','Dez'],
|
959 |
+
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
|
960 |
+
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
961 |
+
dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
962 |
+
weekHeader: 'Sem',
|
963 |
+
dateFormat: 'dd/mm/yy',
|
964 |
+
firstDay: 0,
|
965 |
+
isRTL: false,
|
966 |
+
showMonthAfterYear: false,
|
967 |
+
yearSuffix: ''};
|
968 |
+
$.datepicker.setDefaults($.datepicker.regional['pt']);
|
969 |
+
});/* Romansh initialisation for the jQuery UI date picker plugin. */
|
970 |
+
/* Written by Yvonne Gienal (yvonne.gienal@educa.ch). */
|
971 |
+
jQuery(function($){
|
972 |
+
$.datepicker.regional['rm'] = {
|
973 |
+
closeText: 'Serrar',
|
974 |
+
prevText: '<Suandant',
|
975 |
+
nextText: 'Precedent>',
|
976 |
+
currentText: 'Actual',
|
977 |
+
monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
|
978 |
+
monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
|
979 |
+
dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
|
980 |
+
dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
|
981 |
+
dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
|
982 |
+
weekHeader: 'emna',
|
983 |
+
dateFormat: 'dd/mm/yy',
|
984 |
+
firstDay: 1,
|
985 |
+
isRTL: false,
|
986 |
+
showMonthAfterYear: false,
|
987 |
+
yearSuffix: ''};
|
988 |
+
$.datepicker.setDefaults($.datepicker.regional['rm']);
|
989 |
+
});
|
990 |
+
/* Romanian initialisation for the jQuery UI date picker plugin.
|
991 |
+
*
|
992 |
+
* Written by Edmond L. (ll_edmond@walla.com)
|
993 |
+
* and Ionut G. Stan (ionut.g.stan@gmail.com)
|
994 |
+
*/
|
995 |
+
jQuery(function($){
|
996 |
+
$.datepicker.regional['ro'] = {
|
997 |
+
closeText: 'Închide',
|
998 |
+
prevText: '« Luna precedentă',
|
999 |
+
nextText: 'Luna următoare »',
|
1000 |
+
currentText: 'Azi',
|
1001 |
+
monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
|
1002 |
+
'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
|
1003 |
+
monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
|
1004 |
+
'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
1005 |
+
dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
|
1006 |
+
dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
|
1007 |
+
dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
|
1008 |
+
weekHeader: 'Săpt',
|
1009 |
+
dateFormat: 'dd.mm.yy',
|
1010 |
+
firstDay: 1,
|
1011 |
+
isRTL: false,
|
1012 |
+
showMonthAfterYear: false,
|
1013 |
+
yearSuffix: ''};
|
1014 |
+
$.datepicker.setDefaults($.datepicker.regional['ro']);
|
1015 |
+
});
|
1016 |
+
/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
1017 |
+
/* Written by Andrew Stromnov (stromnov@gmail.com). */
|
1018 |
+
jQuery(function($){
|
1019 |
+
$.datepicker.regional['ru'] = {
|
1020 |
+
closeText: 'Закрыть',
|
1021 |
+
prevText: '<Пред',
|
1022 |
+
nextText: 'След>',
|
1023 |
+
currentText: 'Сегодня',
|
1024 |
+
monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
|
1025 |
+
'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
|
1026 |
+
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
|
1027 |
+
'Июл','Авг','Сен','Окт','Ноя','Дек'],
|
1028 |
+
dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
|
1029 |
+
dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
|
1030 |
+
dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
|
1031 |
+
weekHeader: 'Нед',
|
1032 |
+
dateFormat: 'dd.mm.yy',
|
1033 |
+
firstDay: 1,
|
1034 |
+
isRTL: false,
|
1035 |
+
showMonthAfterYear: false,
|
1036 |
+
yearSuffix: ''};
|
1037 |
+
$.datepicker.setDefaults($.datepicker.regional['ru']);
|
1038 |
+
});/* Slovak initialisation for the jQuery UI date picker plugin. */
|
1039 |
+
/* Written by Vojtech Rinik (vojto@hmm.sk). */
|
1040 |
+
jQuery(function($){
|
1041 |
+
$.datepicker.regional['sk'] = {
|
1042 |
+
closeText: 'Zavrieť',
|
1043 |
+
prevText: '<Predchádzajúci',
|
1044 |
+
nextText: 'Nasledujúci>',
|
1045 |
+
currentText: 'Dnes',
|
1046 |
+
monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
|
1047 |
+
'Júl','August','September','Október','November','December'],
|
1048 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
|
1049 |
+
'Júl','Aug','Sep','Okt','Nov','Dec'],
|
1050 |
+
dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
|
1051 |
+
dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
|
1052 |
+
dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
|
1053 |
+
weekHeader: 'Ty',
|
1054 |
+
dateFormat: 'dd.mm.yy',
|
1055 |
+
firstDay: 1,
|
1056 |
+
isRTL: false,
|
1057 |
+
showMonthAfterYear: false,
|
1058 |
+
yearSuffix: ''};
|
1059 |
+
$.datepicker.setDefaults($.datepicker.regional['sk']);
|
1060 |
+
});
|
1061 |
+
/* Slovenian initialisation for the jQuery UI date picker plugin. */
|
1062 |
+
/* Written by Jaka Jancar (jaka@kubje.org). */
|
1063 |
+
/* c = č, s = š z = ž C = Č S = Š Z = Ž */
|
1064 |
+
jQuery(function($){
|
1065 |
+
$.datepicker.regional['sl'] = {
|
1066 |
+
closeText: 'Zapri',
|
1067 |
+
prevText: '<Prejšnji',
|
1068 |
+
nextText: 'Naslednji>',
|
1069 |
+
currentText: 'Trenutni',
|
1070 |
+
monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
|
1071 |
+
'Julij','Avgust','September','Oktober','November','December'],
|
1072 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
1073 |
+
'Jul','Avg','Sep','Okt','Nov','Dec'],
|
1074 |
+
dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
|
1075 |
+
dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
|
1076 |
+
dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
|
1077 |
+
weekHeader: 'Teden',
|
1078 |
+
dateFormat: 'dd.mm.yy',
|
1079 |
+
firstDay: 1,
|
1080 |
+
isRTL: false,
|
1081 |
+
showMonthAfterYear: false,
|
1082 |
+
yearSuffix: ''};
|
1083 |
+
$.datepicker.setDefaults($.datepicker.regional['sl']);
|
1084 |
+
});
|
1085 |
+
/* Albanian initialisation for the jQuery UI date picker plugin. */
|
1086 |
+
/* Written by Flakron Bytyqi (flakron@gmail.com). */
|
1087 |
+
jQuery(function($){
|
1088 |
+
$.datepicker.regional['sq'] = {
|
1089 |
+
closeText: 'mbylle',
|
1090 |
+
prevText: '<mbrapa',
|
1091 |
+
nextText: 'Përpara>',
|
1092 |
+
currentText: 'sot',
|
1093 |
+
monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
|
1094 |
+
'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
|
1095 |
+
monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
|
1096 |
+
'Kor','Gus','Sht','Tet','Nën','Dhj'],
|
1097 |
+
dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
|
1098 |
+
dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
|
1099 |
+
dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
|
1100 |
+
weekHeader: 'Ja',
|
1101 |
+
dateFormat: 'dd.mm.yy',
|
1102 |
+
firstDay: 1,
|
1103 |
+
isRTL: false,
|
1104 |
+
showMonthAfterYear: false,
|
1105 |
+
yearSuffix: ''};
|
1106 |
+
$.datepicker.setDefaults($.datepicker.regional['sq']);
|
1107 |
+
});
|
1108 |
+
/* Serbian i18n for the jQuery UI date picker plugin. */
|
1109 |
+
/* Written by Dejan Dimić. */
|
1110 |
+
jQuery(function($){
|
1111 |
+
$.datepicker.regional['sr-SR'] = {
|
1112 |
+
closeText: 'Zatvori',
|
1113 |
+
prevText: '<',
|
1114 |
+
nextText: '>',
|
1115 |
+
currentText: 'Danas',
|
1116 |
+
monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
|
1117 |
+
'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
|
1118 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
1119 |
+
'Jul','Avg','Sep','Okt','Nov','Dec'],
|
1120 |
+
dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
|
1121 |
+
dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
|
1122 |
+
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
1123 |
+
weekHeader: 'Sed',
|
1124 |
+
dateFormat: 'dd/mm/yy',
|
1125 |
+
firstDay: 1,
|
1126 |
+
isRTL: false,
|
1127 |
+
showMonthAfterYear: false,
|
1128 |
+
yearSuffix: ''};
|
1129 |
+
$.datepicker.setDefaults($.datepicker.regional['sr-SR']);
|
1130 |
+
});
|
1131 |
+
/* Serbian i18n for the jQuery UI date picker plugin. */
|
1132 |
+
/* Written by Dejan Dimić. */
|
1133 |
+
jQuery(function($){
|
1134 |
+
$.datepicker.regional['sr'] = {
|
1135 |
+
closeText: 'Затвори',
|
1136 |
+
prevText: '<',
|
1137 |
+
nextText: '>',
|
1138 |
+
currentText: 'Данас',
|
1139 |
+
monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
|
1140 |
+
'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
|
1141 |
+
monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
|
1142 |
+
'Јул','Авг','Сеп','Окт','Нов','Дец'],
|
1143 |
+
dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
|
1144 |
+
dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
|
1145 |
+
dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
|
1146 |
+
weekHeader: 'Сед',
|
1147 |
+
dateFormat: 'dd/mm/yy',
|
1148 |
+
firstDay: 1,
|
1149 |
+
isRTL: false,
|
1150 |
+
showMonthAfterYear: false,
|
1151 |
+
yearSuffix: ''};
|
1152 |
+
$.datepicker.setDefaults($.datepicker.regional['sr']);
|
1153 |
+
});
|
1154 |
+
/* Swedish initialisation for the jQuery UI date picker plugin. */
|
1155 |
+
/* Written by Anders Ekdahl ( anders@nomadiz.se). */
|
1156 |
+
jQuery(function($){
|
1157 |
+
$.datepicker.regional['sv'] = {
|
1158 |
+
closeText: 'Stäng',
|
1159 |
+
prevText: '«Förra',
|
1160 |
+
nextText: 'Nästa»',
|
1161 |
+
currentText: 'Idag',
|
1162 |
+
monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
|
1163 |
+
'Juli','Augusti','September','Oktober','November','December'],
|
1164 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
1165 |
+
'Jul','Aug','Sep','Okt','Nov','Dec'],
|
1166 |
+
dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
|
1167 |
+
dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
|
1168 |
+
dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
|
1169 |
+
weekHeader: 'Ve',
|
1170 |
+
dateFormat: 'yy-mm-dd',
|
1171 |
+
firstDay: 1,
|
1172 |
+
isRTL: false,
|
1173 |
+
showMonthAfterYear: false,
|
1174 |
+
yearSuffix: ''};
|
1175 |
+
$.datepicker.setDefaults($.datepicker.regional['sv']);
|
1176 |
+
});
|
1177 |
+
/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
1178 |
+
/* Written by S A Sureshkumar (saskumar@live.com). */
|
1179 |
+
jQuery(function($){
|
1180 |
+
$.datepicker.regional['ta'] = {
|
1181 |
+
closeText: 'மூடு',
|
1182 |
+
prevText: 'முன்னையது',
|
1183 |
+
nextText: 'அடுத்தது',
|
1184 |
+
currentText: 'இன்று',
|
1185 |
+
monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
|
1186 |
+
'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
|
1187 |
+
monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
|
1188 |
+
'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
|
1189 |
+
dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
|
1190 |
+
dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
|
1191 |
+
dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
|
1192 |
+
weekHeader: 'Не',
|
1193 |
+
dateFormat: 'dd/mm/yy',
|
1194 |
+
firstDay: 1,
|
1195 |
+
isRTL: false,
|
1196 |
+
showMonthAfterYear: false,
|
1197 |
+
yearSuffix: ''};
|
1198 |
+
$.datepicker.setDefaults($.datepicker.regional['ta']);
|
1199 |
+
});
|
1200 |
+
/* Thai initialisation for the jQuery UI date picker plugin. */
|
1201 |
+
/* Written by pipo (pipo@sixhead.com). */
|
1202 |
+
jQuery(function($){
|
1203 |
+
$.datepicker.regional['th'] = {
|
1204 |
+
closeText: 'ปิด',
|
1205 |
+
prevText: '« ย้อน',
|
1206 |
+
nextText: 'ถัดไป »',
|
1207 |
+
currentText: 'วันนี้',
|
1208 |
+
monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
|
1209 |
+
'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
|
1210 |
+
monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
|
1211 |
+
'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
|
1212 |
+
dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
|
1213 |
+
dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
|
1214 |
+
dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
|
1215 |
+
weekHeader: 'Wk',
|
1216 |
+
dateFormat: 'dd/mm/yy',
|
1217 |
+
firstDay: 0,
|
1218 |
+
isRTL: false,
|
1219 |
+
showMonthAfterYear: false,
|
1220 |
+
yearSuffix: ''};
|
1221 |
+
$.datepicker.setDefaults($.datepicker.regional['th']);
|
1222 |
+
});/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
1223 |
+
/* Written by Abdurahmon Saidov (saidovab@gmail.com). */
|
1224 |
+
jQuery(function($){
|
1225 |
+
$.datepicker.regional['tj'] = {
|
1226 |
+
closeText: 'Идома',
|
1227 |
+
prevText: '<Қафо',
|
1228 |
+
nextText: 'Пеш>',
|
1229 |
+
currentText: 'Имрӯз',
|
1230 |
+
monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн',
|
1231 |
+
'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'],
|
1232 |
+
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
|
1233 |
+
'Июл','Авг','Сен','Окт','Ноя','Дек'],
|
1234 |
+
dayNames: ['якшанбе','душанбе','сешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'],
|
1235 |
+
dayNamesShort: ['якш','душ','сеш','чор','пан','ҷум','шан'],
|
1236 |
+
dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'],
|
1237 |
+
weekHeader: 'Хф',
|
1238 |
+
dateFormat: 'dd.mm.yy',
|
1239 |
+
firstDay: 1,
|
1240 |
+
isRTL: false,
|
1241 |
+
showMonthAfterYear: false,
|
1242 |
+
yearSuffix: ''};
|
1243 |
+
$.datepicker.setDefaults($.datepicker.regional['tj']);
|
1244 |
+
});/* Turkish initialisation for the jQuery UI date picker plugin. */
|
1245 |
+
/* Written by Izzet Emre Erkan (kara@karalamalar.net). */
|
1246 |
+
jQuery(function($){
|
1247 |
+
$.datepicker.regional['tr'] = {
|
1248 |
+
closeText: 'kapat',
|
1249 |
+
prevText: '<geri',
|
1250 |
+
nextText: 'ileri>',
|
1251 |
+
currentText: 'bugün',
|
1252 |
+
monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
|
1253 |
+
'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
|
1254 |
+
monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
|
1255 |
+
'Tem','Ağu','Eyl','Eki','Kas','Ara'],
|
1256 |
+
dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
|
1257 |
+
dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
|
1258 |
+
dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
|
1259 |
+
weekHeader: 'Hf',
|
1260 |
+
dateFormat: 'dd.mm.yy',
|
1261 |
+
firstDay: 1,
|
1262 |
+
isRTL: false,
|
1263 |
+
showMonthAfterYear: false,
|
1264 |
+
yearSuffix: ''};
|
1265 |
+
$.datepicker.setDefaults($.datepicker.regional['tr']);
|
1266 |
+
});/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
1267 |
+
/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
|
1268 |
+
jQuery(function($){
|
1269 |
+
$.datepicker.regional['uk'] = {
|
1270 |
+
closeText: 'Закрити',
|
1271 |
+
prevText: '<',
|
1272 |
+
nextText: '>',
|
1273 |
+
currentText: 'Сьогодні',
|
1274 |
+
monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
|
1275 |
+
'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
|
1276 |
+
monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
|
1277 |
+
'Лип','Сер','Вер','Жов','Лис','Гру'],
|
1278 |
+
dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
|
1279 |
+
dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
|
1280 |
+
dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
|
1281 |
+
weekHeader: 'Не',
|
1282 |
+
dateFormat: 'dd/mm/yy',
|
1283 |
+
firstDay: 1,
|
1284 |
+
isRTL: false,
|
1285 |
+
showMonthAfterYear: false,
|
1286 |
+
yearSuffix: ''};
|
1287 |
+
$.datepicker.setDefaults($.datepicker.regional['uk']);
|
1288 |
+
});/* Vietnamese initialisation for the jQuery UI date picker plugin. */
|
1289 |
+
/* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */
|
1290 |
+
jQuery(function($){
|
1291 |
+
$.datepicker.regional['vi'] = {
|
1292 |
+
closeText: 'Đóng',
|
1293 |
+
prevText: '<Trước',
|
1294 |
+
nextText: 'Tiếp>',
|
1295 |
+
currentText: 'Hôm nay',
|
1296 |
+
monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu',
|
1297 |
+
'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'],
|
1298 |
+
monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
|
1299 |
+
'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
|
1300 |
+
dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
|
1301 |
+
dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
1302 |
+
dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
1303 |
+
weekHeader: 'Tu',
|
1304 |
+
dateFormat: 'dd/mm/yy',
|
1305 |
+
firstDay: 0,
|
1306 |
+
isRTL: false,
|
1307 |
+
showMonthAfterYear: false,
|
1308 |
+
yearSuffix: ''};
|
1309 |
+
$.datepicker.setDefaults($.datepicker.regional['vi']);
|
1310 |
+
});
|
1311 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
1312 |
+
/* Written by Cloudream (cloudream@gmail.com). */
|
1313 |
+
jQuery(function($){
|
1314 |
+
$.datepicker.regional['zh-CN'] = {
|
1315 |
+
closeText: '关闭',
|
1316 |
+
prevText: '<上月',
|
1317 |
+
nextText: '下月>',
|
1318 |
+
currentText: '今天',
|
1319 |
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
1320 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
1321 |
+
monthNamesShort: ['一','二','三','四','五','六',
|
1322 |
+
'七','八','九','十','十一','十二'],
|
1323 |
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
1324 |
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
1325 |
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
1326 |
+
weekHeader: '周',
|
1327 |
+
dateFormat: 'yy-mm-dd',
|
1328 |
+
firstDay: 1,
|
1329 |
+
isRTL: false,
|
1330 |
+
showMonthAfterYear: true,
|
1331 |
+
yearSuffix: '年'};
|
1332 |
+
$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
|
1333 |
+
});
|
1334 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
1335 |
+
/* Written by SCCY (samuelcychan@gmail.com). */
|
1336 |
+
jQuery(function($){
|
1337 |
+
$.datepicker.regional['zh-HK'] = {
|
1338 |
+
closeText: '關閉',
|
1339 |
+
prevText: '<上月',
|
1340 |
+
nextText: '下月>',
|
1341 |
+
currentText: '今天',
|
1342 |
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
1343 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
1344 |
+
monthNamesShort: ['一','二','三','四','五','六',
|
1345 |
+
'七','八','九','十','十一','十二'],
|
1346 |
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
1347 |
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
1348 |
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
1349 |
+
weekHeader: '周',
|
1350 |
+
dateFormat: 'dd-mm-yy',
|
1351 |
+
firstDay: 0,
|
1352 |
+
isRTL: false,
|
1353 |
+
showMonthAfterYear: true,
|
1354 |
+
yearSuffix: '年'};
|
1355 |
+
$.datepicker.setDefaults($.datepicker.regional['zh-HK']);
|
1356 |
+
});
|
1357 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
1358 |
+
/* Written by Ressol (ressol@gmail.com). */
|
1359 |
+
jQuery(function($){
|
1360 |
+
$.datepicker.regional['zh-TW'] = {
|
1361 |
+
closeText: '關閉',
|
1362 |
+
prevText: '<上月',
|
1363 |
+
nextText: '下月>',
|
1364 |
+
currentText: '今天',
|
1365 |
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
1366 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
1367 |
+
monthNamesShort: ['一','二','三','四','五','六',
|
1368 |
+
'七','八','九','十','十一','十二'],
|
1369 |
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
1370 |
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
1371 |
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
1372 |
+
weekHeader: '周',
|
1373 |
+
dateFormat: 'yy/mm/dd',
|
1374 |
+
firstDay: 1,
|
1375 |
+
isRTL: false,
|
1376 |
+
showMonthAfterYear: true,
|
1377 |
+
yearSuffix: '年'};
|
1378 |
+
$.datepicker.setDefaults($.datepicker.regional['zh-TW']);
|
1379 |
+
});
|
i18n/jquery.ui.datepicker-af.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Afrikaans initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Renier Pretorius. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['af'] = {
|
5 |
+
closeText: 'Selekteer',
|
6 |
+
prevText: 'Vorige',
|
7 |
+
nextText: 'Volgende',
|
8 |
+
currentText: 'Vandag',
|
9 |
+
monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
|
10 |
+
'Julie','Augustus','September','Oktober','November','Desember'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
|
13 |
+
dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
|
14 |
+
dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
|
15 |
+
dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['af']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-ar-DZ.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
|
2 |
+
/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */
|
3 |
+
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['ar-DZ'] = {
|
6 |
+
closeText: 'إغلاق',
|
7 |
+
prevText: '<السابق',
|
8 |
+
nextText: 'التالي>',
|
9 |
+
currentText: 'اليوم',
|
10 |
+
monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
|
11 |
+
'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
|
12 |
+
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
|
13 |
+
dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
14 |
+
dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
15 |
+
dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
16 |
+
weekHeader: 'أسبوع',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 6,
|
19 |
+
isRTL: true,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-ar.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Arabic Translation for jQuery UI date picker plugin. */
|
2 |
+
/* Khaled Alhourani -- me@khaledalhourani.com */
|
3 |
+
/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['ar'] = {
|
6 |
+
closeText: 'إغلاق',
|
7 |
+
prevText: '<السابق',
|
8 |
+
nextText: 'التالي>',
|
9 |
+
currentText: 'اليوم',
|
10 |
+
monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
|
11 |
+
'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
|
12 |
+
monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
|
13 |
+
dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
14 |
+
dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
15 |
+
dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
16 |
+
weekHeader: 'أسبوع',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 6,
|
19 |
+
isRTL: true,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ar']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-az.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jamil Najafov (necefov33@gmail.com). */
|
3 |
+
jQuery(function($) {
|
4 |
+
$.datepicker.regional['az'] = {
|
5 |
+
closeText: 'Bağla',
|
6 |
+
prevText: '<Geri',
|
7 |
+
nextText: 'İrəli>',
|
8 |
+
currentText: 'Bugün',
|
9 |
+
monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
|
10 |
+
'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
|
11 |
+
monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
|
12 |
+
'İyul','Avq','Sen','Okt','Noy','Dek'],
|
13 |
+
dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
|
14 |
+
dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
|
15 |
+
dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
|
16 |
+
weekHeader: 'Hf',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['az']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-bg.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Bulgarian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Stoyan Kyosev (http://svest.org). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['bg'] = {
|
5 |
+
closeText: 'затвори',
|
6 |
+
prevText: '<назад',
|
7 |
+
nextText: 'напред>',
|
8 |
+
nextBigText: '>>',
|
9 |
+
currentText: 'днес',
|
10 |
+
monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
|
11 |
+
'Юли','Август','Септември','Октомври','Ноември','Декември'],
|
12 |
+
monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
|
13 |
+
'Юли','Авг','Сеп','Окт','Нов','Дек'],
|
14 |
+
dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
|
15 |
+
dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
|
16 |
+
dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
|
17 |
+
weekHeader: 'Wk',
|
18 |
+
dateFormat: 'dd.mm.yy',
|
19 |
+
firstDay: 1,
|
20 |
+
isRTL: false,
|
21 |
+
showMonthAfterYear: false,
|
22 |
+
yearSuffix: ''};
|
23 |
+
$.datepicker.setDefaults($.datepicker.regional['bg']);
|
24 |
+
});
|
i18n/jquery.ui.datepicker-bs.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Bosnian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Kenan Konjo. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['bs'] = {
|
5 |
+
closeText: 'Zatvori',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
8 |
+
currentText: 'Danas',
|
9 |
+
monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
|
10 |
+
'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
12 |
+
'Jul','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
|
14 |
+
dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
|
15 |
+
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['bs']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-ca.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Inicialització en català per a l'extenció 'calendar' per jQuery. */
|
2 |
+
/* Writers: (joan.leon@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ca'] = {
|
5 |
+
closeText: 'Tancar',
|
6 |
+
prevText: '<Ant',
|
7 |
+
nextText: 'Seg>',
|
8 |
+
currentText: 'Avui',
|
9 |
+
monthNames: ['Gener','Febrer','Març','Abril','Maig','Juny',
|
10 |
+
'Juliol','Agost','Setembre','Octubre','Novembre','Desembre'],
|
11 |
+
monthNamesShort: ['Gen','Feb','Mar','Abr','Mai','Jun',
|
12 |
+
'Jul','Ago','Set','Oct','Nov','Des'],
|
13 |
+
dayNames: ['Diumenge','Dilluns','Dimarts','Dimecres','Dijous','Divendres','Dissabte'],
|
14 |
+
dayNamesShort: ['Dug','Dln','Dmt','Dmc','Djs','Dvn','Dsb'],
|
15 |
+
dayNamesMin: ['Dg','Dl','Dt','Dc','Dj','Dv','Ds'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ca']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-cs.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Czech initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Tomas Muller (tomas@tomas-muller.net). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['cs'] = {
|
5 |
+
closeText: 'Zavřít',
|
6 |
+
prevText: '<Dříve',
|
7 |
+
nextText: 'Později>',
|
8 |
+
currentText: 'Nyní',
|
9 |
+
monthNames: ['leden','únor','březen','duben','květen','červen',
|
10 |
+
'červenec','srpen','září','říjen','listopad','prosinec'],
|
11 |
+
monthNamesShort: ['led','úno','bře','dub','kvě','čer',
|
12 |
+
'čvc','srp','zář','říj','lis','pro'],
|
13 |
+
dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
|
14 |
+
dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
|
15 |
+
dayNamesMin: ['ne','po','út','st','čt','pá','so'],
|
16 |
+
weekHeader: 'Týd',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['cs']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-da.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Danish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jan Christensen ( deletestuff@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['da'] = {
|
5 |
+
closeText: 'Luk',
|
6 |
+
prevText: '<Forrige',
|
7 |
+
nextText: 'Næste>',
|
8 |
+
currentText: 'Idag',
|
9 |
+
monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
|
10 |
+
'Juli','August','September','Oktober','November','December'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
12 |
+
'Jul','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
|
14 |
+
dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
|
15 |
+
dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
|
16 |
+
weekHeader: 'Uge',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['da']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-de.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* German initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Milian Wolff (mail@milianw.de). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['de'] = {
|
5 |
+
closeText: 'schließen',
|
6 |
+
prevText: '<zurück',
|
7 |
+
nextText: 'Vor>',
|
8 |
+
currentText: 'heute',
|
9 |
+
monthNames: ['Januar','Februar','März','April','Mai','Juni',
|
10 |
+
'Juli','August','September','Oktober','November','Dezember'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
|
12 |
+
'Jul','Aug','Sep','Okt','Nov','Dez'],
|
13 |
+
dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
|
14 |
+
dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
15 |
+
dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
|
16 |
+
weekHeader: 'Wo',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['de']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-el.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Greek (el) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Alex Cicovic (http://www.alexcicovic.com) */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['el'] = {
|
5 |
+
closeText: 'Κλείσιμο',
|
6 |
+
prevText: 'Προηγούμενος',
|
7 |
+
nextText: 'Επόμενος',
|
8 |
+
currentText: 'Τρέχων Μήνας',
|
9 |
+
monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
|
10 |
+
'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
|
11 |
+
monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
|
12 |
+
'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
|
13 |
+
dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
|
14 |
+
dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
|
15 |
+
dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
|
16 |
+
weekHeader: 'Εβδ',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['el']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-en-AU.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* English/Australia initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Based on the en-GB initialisation. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['en-AU'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['January','February','March','April','May','June',
|
10 |
+
'July','August','September','October','November','December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
14 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
15 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['en-AU']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-en-GB.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* English/UK initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Stuart. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['en-GB'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['January','February','March','April','May','June',
|
10 |
+
'July','August','September','October','November','December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
14 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
15 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['en-GB']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-en-NZ.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Based on the en-GB initialisation. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['en-NZ'] = {
|
5 |
+
closeText: 'Done',
|
6 |
+
prevText: 'Prev',
|
7 |
+
nextText: 'Next',
|
8 |
+
currentText: 'Today',
|
9 |
+
monthNames: ['January','February','March','April','May','June',
|
10 |
+
'July','August','September','October','November','December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
|
12 |
+
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
14 |
+
dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
15 |
+
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['en-NZ']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-eo.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Esperanto initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Olivier M. (olivierweb@ifrance.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['eo'] = {
|
5 |
+
closeText: 'Fermi',
|
6 |
+
prevText: '<Anta',
|
7 |
+
nextText: 'Sekv>',
|
8 |
+
currentText: 'Nuna',
|
9 |
+
monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
|
10 |
+
'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
12 |
+
'Jul','Aŭg','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
|
14 |
+
dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
|
15 |
+
dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
|
16 |
+
weekHeader: 'Sb',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['eo']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-es.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Inicialización en español para la extensión 'UI date picker' para jQuery. */
|
2 |
+
/* Traducido por Vester (xvester@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['es'] = {
|
5 |
+
closeText: 'Cerrar',
|
6 |
+
prevText: '<Ant',
|
7 |
+
nextText: 'Sig>',
|
8 |
+
currentText: 'Hoy',
|
9 |
+
monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
|
10 |
+
'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
|
11 |
+
monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
|
12 |
+
'Jul','Ago','Sep','Oct','Nov','Dic'],
|
13 |
+
dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
|
14 |
+
dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
|
15 |
+
dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['es']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-et.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Estonian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['et'] = {
|
5 |
+
closeText: 'Sulge',
|
6 |
+
prevText: 'Eelnev',
|
7 |
+
nextText: 'Järgnev',
|
8 |
+
currentText: 'Täna',
|
9 |
+
monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
|
10 |
+
'Juuli','August','September','Oktoober','November','Detsember'],
|
11 |
+
monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
|
12 |
+
'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
|
13 |
+
dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
|
14 |
+
dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
|
15 |
+
dayNamesMin: ['P','E','T','K','N','R','L'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['et']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-eu.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
|
2 |
+
/* Karrikas-ek itzulia (karrikas@karrikas.com) */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['eu'] = {
|
5 |
+
closeText: 'Egina',
|
6 |
+
prevText: '<Aur',
|
7 |
+
nextText: 'Hur>',
|
8 |
+
currentText: 'Gaur',
|
9 |
+
monthNames: ['Urtarrila','Otsaila','Martxoa','Apirila','Maiatza','Ekaina',
|
10 |
+
'Uztaila','Abuztua','Iraila','Urria','Azaroa','Abendua'],
|
11 |
+
monthNamesShort: ['Urt','Ots','Mar','Api','Mai','Eka',
|
12 |
+
'Uzt','Abu','Ira','Urr','Aza','Abe'],
|
13 |
+
dayNames: ['Igandea','Astelehena','Asteartea','Asteazkena','Osteguna','Ostirala','Larunbata'],
|
14 |
+
dayNamesShort: ['Iga','Ast','Ast','Ast','Ost','Ost','Lar'],
|
15 |
+
dayNamesMin: ['Ig','As','As','As','Os','Os','La'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'yy/mm/dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['eu']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-fa.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
|
2 |
+
/* Javad Mowlanezhad -- jmowla@gmail.com */
|
3 |
+
/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
|
4 |
+
jQuery(function($) {
|
5 |
+
$.datepicker.regional['fa'] = {
|
6 |
+
closeText: 'بستن',
|
7 |
+
prevText: '<قبلي',
|
8 |
+
nextText: 'بعدي>',
|
9 |
+
currentText: 'امروز',
|
10 |
+
monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور',
|
11 |
+
'مهر','آبان','آذر','دي','بهمن','اسفند'],
|
12 |
+
monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
|
13 |
+
dayNames: ['يکشنبه','دوشنبه','سهشنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'],
|
14 |
+
dayNamesShort: ['ي','د','س','چ','پ','ج', 'ش'],
|
15 |
+
dayNamesMin: ['ي','د','س','چ','پ','ج', 'ش'],
|
16 |
+
weekHeader: 'هف',
|
17 |
+
dateFormat: 'yy/mm/dd',
|
18 |
+
firstDay: 6,
|
19 |
+
isRTL: true,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['fa']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-fi.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Finnish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Harri Kilpi� (harrikilpio@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['fi'] = {
|
5 |
+
closeText: 'Sulje',
|
6 |
+
prevText: '«Edellinen',
|
7 |
+
nextText: 'Seuraava»',
|
8 |
+
currentText: 'Tänään',
|
9 |
+
monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
|
10 |
+
'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
|
11 |
+
monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
|
12 |
+
'Heinä','Elo','Syys','Loka','Marras','Joulu'],
|
13 |
+
dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','Su'],
|
14 |
+
dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
|
15 |
+
dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
|
16 |
+
weekHeader: 'Vk',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['fi']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-fo.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Faroese initialisation for the jQuery UI date picker plugin */
|
2 |
+
/* Written by Sverri Mohr Olsen, sverrimo@gmail.com */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['fo'] = {
|
5 |
+
closeText: 'Lat aftur',
|
6 |
+
prevText: '<Fyrra',
|
7 |
+
nextText: 'Næsta>',
|
8 |
+
currentText: 'Í dag',
|
9 |
+
monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
|
10 |
+
'Juli','August','September','Oktober','November','Desember'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
|
12 |
+
'Jul','Aug','Sep','Okt','Nov','Des'],
|
13 |
+
dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
|
14 |
+
dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
|
15 |
+
dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
|
16 |
+
weekHeader: 'Vk',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['fo']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-fr-CH.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Swiss-French initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written Martin Voelkle (martin.voelkle@e-tc.ch). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['fr-CH'] = {
|
5 |
+
closeText: 'Fermer',
|
6 |
+
prevText: '<Préc',
|
7 |
+
nextText: 'Suiv>',
|
8 |
+
currentText: 'Courant',
|
9 |
+
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
|
10 |
+
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
|
11 |
+
monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
|
12 |
+
'Jul','Aoû','Sep','Oct','Nov','Déc'],
|
13 |
+
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
|
14 |
+
dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
|
15 |
+
dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['fr-CH']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-fr.js
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* French initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Keith Wood (kbwood{at}iinet.com.au),
|
3 |
+
Stéphane Nahmani (sholby@sholby.net),
|
4 |
+
Stéphane Raimbault <stephane.raimbault@gmail.com> */
|
5 |
+
jQuery(function($){
|
6 |
+
$.datepicker.regional['fr'] = {
|
7 |
+
closeText: 'Fermer',
|
8 |
+
prevText: 'Précédent',
|
9 |
+
nextText: 'Suivant',
|
10 |
+
currentText: 'Aujourd\'hui',
|
11 |
+
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
|
12 |
+
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
|
13 |
+
monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
|
14 |
+
'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
|
15 |
+
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
|
16 |
+
dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
|
17 |
+
dayNamesMin: ['D','L','M','M','J','V','S'],
|
18 |
+
weekHeader: 'Sem.',
|
19 |
+
dateFormat: 'dd/mm/yy',
|
20 |
+
firstDay: 1,
|
21 |
+
isRTL: false,
|
22 |
+
showMonthAfterYear: false,
|
23 |
+
yearSuffix: ''};
|
24 |
+
$.datepicker.setDefaults($.datepicker.regional['fr']);
|
25 |
+
});
|
i18n/jquery.ui.datepicker-gl.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Galician localization for 'UI date picker' jQuery extension. */
|
2 |
+
/* Translated by Jorge Barreiro <yortx.barry@gmail.com>. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['gl'] = {
|
5 |
+
closeText: 'Pechar',
|
6 |
+
prevText: '<Ant',
|
7 |
+
nextText: 'Seg>',
|
8 |
+
currentText: 'Hoxe',
|
9 |
+
monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
|
10 |
+
'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
|
11 |
+
monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
|
12 |
+
'Xul','Ago','Set','Out','Nov','Dec'],
|
13 |
+
dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
|
14 |
+
dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
|
15 |
+
dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['gl']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-he.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hebrew initialisation for the UI Datepicker extension. */
|
2 |
+
/* Written by Amir Hardon (ahardon at gmail dot com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['he'] = {
|
5 |
+
closeText: 'סגור',
|
6 |
+
prevText: '<הקודם',
|
7 |
+
nextText: 'הבא>',
|
8 |
+
currentText: 'היום',
|
9 |
+
monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
|
10 |
+
'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
|
11 |
+
monthNamesShort: ['1','2','3','4','5','6',
|
12 |
+
'7','8','9','10','11','12'],
|
13 |
+
dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
|
14 |
+
dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
|
15 |
+
dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: true,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['he']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-hr.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Croatian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Vjekoslav Nesek. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hr'] = {
|
5 |
+
closeText: 'Zatvori',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
8 |
+
currentText: 'Danas',
|
9 |
+
monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
|
10 |
+
'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
|
11 |
+
monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
|
12 |
+
'Srp','Kol','Ruj','Lis','Stu','Pro'],
|
13 |
+
dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
|
14 |
+
dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
|
15 |
+
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
16 |
+
weekHeader: 'Tje',
|
17 |
+
dateFormat: 'dd.mm.yy.',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['hr']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-hu.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hungarian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Istvan Karaszi (jquery@spam.raszi.hu). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hu'] = {
|
5 |
+
closeText: 'bezárás',
|
6 |
+
prevText: '« vissza',
|
7 |
+
nextText: 'előre »',
|
8 |
+
currentText: 'ma',
|
9 |
+
monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
|
10 |
+
'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
|
11 |
+
monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
|
12 |
+
'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
|
13 |
+
dayNames: ['Vasárnap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
|
14 |
+
dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
|
15 |
+
dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
|
16 |
+
weekHeader: 'Hé',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['hu']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-hy.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['hy'] = {
|
5 |
+
closeText: 'Փակել',
|
6 |
+
prevText: '<Նախ.',
|
7 |
+
nextText: 'Հաջ.>',
|
8 |
+
currentText: 'Այսօր',
|
9 |
+
monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
|
10 |
+
'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
|
11 |
+
monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
|
12 |
+
'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
|
13 |
+
dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
|
14 |
+
dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
|
15 |
+
dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
|
16 |
+
weekHeader: 'ՇԲՏ',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['hy']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-id.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Indonesian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Deden Fathurahman (dedenf@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['id'] = {
|
5 |
+
closeText: 'Tutup',
|
6 |
+
prevText: '<mundur',
|
7 |
+
nextText: 'maju>',
|
8 |
+
currentText: 'hari ini',
|
9 |
+
monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
|
10 |
+
'Juli','Agustus','September','Oktober','Nopember','Desember'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
|
12 |
+
'Jul','Agus','Sep','Okt','Nop','Des'],
|
13 |
+
dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
|
14 |
+
dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
|
15 |
+
dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
|
16 |
+
weekHeader: 'Mg',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['id']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-is.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Icelandic initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Haukur H. Thorsson (haukur@eskill.is). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['is'] = {
|
5 |
+
closeText: 'Loka',
|
6 |
+
prevText: '< Fyrri',
|
7 |
+
nextText: 'Næsti >',
|
8 |
+
currentText: 'Í dag',
|
9 |
+
monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
|
10 |
+
'Júlí','Ágúst','September','Október','Nóvember','Desember'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
|
12 |
+
'Júl','Ágú','Sep','Okt','Nóv','Des'],
|
13 |
+
dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
|
14 |
+
dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
|
15 |
+
dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
|
16 |
+
weekHeader: 'Vika',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['is']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-it.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Italian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Antonello Pasella (antonello.pasella@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['it'] = {
|
5 |
+
closeText: 'Chiudi',
|
6 |
+
prevText: '<Prec',
|
7 |
+
nextText: 'Succ>',
|
8 |
+
currentText: 'Oggi',
|
9 |
+
monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
|
10 |
+
'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
|
11 |
+
monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
|
12 |
+
'Lug','Ago','Set','Ott','Nov','Dic'],
|
13 |
+
dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
|
14 |
+
dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
|
15 |
+
dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['it']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-ja.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Japanese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Kentaro SATO (kentaro@ranvis.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ja'] = {
|
5 |
+
closeText: '閉じる',
|
6 |
+
prevText: '<前',
|
7 |
+
nextText: '次>',
|
8 |
+
currentText: '今日',
|
9 |
+
monthNames: ['1月','2月','3月','4月','5月','6月',
|
10 |
+
'7月','8月','9月','10月','11月','12月'],
|
11 |
+
monthNamesShort: ['1月','2月','3月','4月','5月','6月',
|
12 |
+
'7月','8月','9月','10月','11月','12月'],
|
13 |
+
dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
|
14 |
+
dayNamesShort: ['日','月','火','水','木','金','土'],
|
15 |
+
dayNamesMin: ['日','月','火','水','木','金','土'],
|
16 |
+
weekHeader: '週',
|
17 |
+
dateFormat: 'yy/mm/dd',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: '年'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ja']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-ko.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Korean initialisation for the jQuery calendar extension. */
|
2 |
+
/* Written by DaeKwon Kang (ncrash.dk@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ko'] = {
|
5 |
+
closeText: '닫기',
|
6 |
+
prevText: '이전달',
|
7 |
+
nextText: '다음달',
|
8 |
+
currentText: '오늘',
|
9 |
+
monthNames: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
|
10 |
+
'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
|
11 |
+
monthNamesShort: ['1월(JAN)','2월(FEB)','3월(MAR)','4월(APR)','5월(MAY)','6월(JUN)',
|
12 |
+
'7월(JUL)','8월(AUG)','9월(SEP)','10월(OCT)','11월(NOV)','12월(DEC)'],
|
13 |
+
dayNames: ['일','월','화','수','목','금','토'],
|
14 |
+
dayNamesShort: ['일','월','화','수','목','금','토'],
|
15 |
+
dayNamesMin: ['일','월','화','수','목','금','토'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: '년'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ko']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-kz.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Dmitriy Karasyov (dmitriy.karasyov@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['kz'] = {
|
5 |
+
closeText: 'Жабу',
|
6 |
+
prevText: '<Алдыңғы',
|
7 |
+
nextText: 'Келесі>',
|
8 |
+
currentText: 'Бүгін',
|
9 |
+
monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
|
10 |
+
'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
|
11 |
+
monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
|
12 |
+
'Шіл','Там','Қыр','Қаз','Қар','Жел'],
|
13 |
+
dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
|
14 |
+
dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
|
15 |
+
dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
|
16 |
+
weekHeader: 'Не',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['kz']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-lt.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* @author Arturas Paleicikas <arturas@avalon.lt> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['lt'] = {
|
5 |
+
closeText: 'Uždaryti',
|
6 |
+
prevText: '<Atgal',
|
7 |
+
nextText: 'Pirmyn>',
|
8 |
+
currentText: 'Šiandien',
|
9 |
+
monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
|
10 |
+
'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
|
11 |
+
monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
|
12 |
+
'Lie','Rugp','Rugs','Spa','Lap','Gru'],
|
13 |
+
dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
|
14 |
+
dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
|
15 |
+
dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['lt']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-lv.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* @author Arturas Paleicikas <arturas.paleicikas@metasite.net> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['lv'] = {
|
5 |
+
closeText: 'Aizvērt',
|
6 |
+
prevText: 'Iepr',
|
7 |
+
nextText: 'Nāka',
|
8 |
+
currentText: 'Šodien',
|
9 |
+
monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
|
10 |
+
'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
|
12 |
+
'Jūl','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
|
14 |
+
dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
|
15 |
+
dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
|
16 |
+
weekHeader: 'Nav',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['lv']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-ml.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Saji Nediyanchath (saji89@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ml'] = {
|
5 |
+
closeText: 'ശരി',
|
6 |
+
prevText: 'മുന്നത്തെ',
|
7 |
+
nextText: 'അടുത്തത് ',
|
8 |
+
currentText: 'ഇന്ന്',
|
9 |
+
monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്ച്ച്','ഏപ്രില്','മേയ്','ജൂണ്',
|
10 |
+
'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്','ഒക്ടോബര്','നവംബര്','ഡിസംബര്'],
|
11 |
+
monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്', 'ഏപ്രി', 'മേയ്', 'ജൂണ്',
|
12 |
+
'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
|
13 |
+
dayNames: ['ഞായര്', 'തിങ്കള്', 'ചൊവ്വ', 'ബുധന്', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
|
14 |
+
dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
|
15 |
+
dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
|
16 |
+
weekHeader: 'ആ',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ml']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-ms.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Malaysian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Mohd Nawawi Mohamad Jamili (nawawi@ronggeng.net). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ms'] = {
|
5 |
+
closeText: 'Tutup',
|
6 |
+
prevText: '<Sebelum',
|
7 |
+
nextText: 'Selepas>',
|
8 |
+
currentText: 'hari ini',
|
9 |
+
monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
|
10 |
+
'Julai','Ogos','September','Oktober','November','Disember'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
|
12 |
+
'Jul','Ogo','Sep','Okt','Nov','Dis'],
|
13 |
+
dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
|
14 |
+
dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
|
15 |
+
dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
|
16 |
+
weekHeader: 'Mg',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ms']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-nl.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Mathias Bynens <http://mathiasbynens.be/> */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional.nl = {
|
5 |
+
closeText: 'Sluiten',
|
6 |
+
prevText: '←',
|
7 |
+
nextText: '→',
|
8 |
+
currentText: 'Vandaag',
|
9 |
+
monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
|
10 |
+
'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
|
11 |
+
monthNamesShort: ['jan', 'feb', 'maa', 'apr', 'mei', 'jun',
|
12 |
+
'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
13 |
+
dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
|
14 |
+
dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
|
15 |
+
dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional.nl);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-no.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Norwegian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
|
3 |
+
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['no'] = {
|
6 |
+
closeText: 'Lukk',
|
7 |
+
prevText: '«Forrige',
|
8 |
+
nextText: 'Neste»',
|
9 |
+
currentText: 'I dag',
|
10 |
+
monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
|
11 |
+
monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
|
12 |
+
dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
|
13 |
+
dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
|
14 |
+
dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
|
15 |
+
weekHeader: 'Uke',
|
16 |
+
dateFormat: 'dd.mm.yy',
|
17 |
+
firstDay: 1,
|
18 |
+
isRTL: false,
|
19 |
+
showMonthAfterYear: false,
|
20 |
+
yearSuffix: ''
|
21 |
+
};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['no']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-pl.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Polish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jacek Wysocki (jacek.wysocki@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['pl'] = {
|
5 |
+
closeText: 'Zamknij',
|
6 |
+
prevText: '<Poprzedni',
|
7 |
+
nextText: 'Następny>',
|
8 |
+
currentText: 'Dziś',
|
9 |
+
monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
|
10 |
+
'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
|
11 |
+
monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
|
12 |
+
'Lip','Sie','Wrz','Pa','Lis','Gru'],
|
13 |
+
dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
|
14 |
+
dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
|
15 |
+
dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
|
16 |
+
weekHeader: 'Tydz',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['pl']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-pt-BR.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Brazilian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Leonildo Costa Silva (leocsilva@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['pt-BR'] = {
|
5 |
+
closeText: 'Fechar',
|
6 |
+
prevText: '<Anterior',
|
7 |
+
nextText: 'Próximo>',
|
8 |
+
currentText: 'Hoje',
|
9 |
+
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
|
10 |
+
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
|
11 |
+
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
|
12 |
+
'Jul','Ago','Set','Out','Nov','Dez'],
|
13 |
+
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
|
14 |
+
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
15 |
+
dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
16 |
+
weekHeader: 'Sm',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['pt-BR']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-pt.js
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Portuguese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
jQuery(function($){
|
3 |
+
$.datepicker.regional['pt'] = {
|
4 |
+
closeText: 'Fechar',
|
5 |
+
prevText: '<Anterior',
|
6 |
+
nextText: 'Seguinte',
|
7 |
+
currentText: 'Hoje',
|
8 |
+
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
|
9 |
+
'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
|
10 |
+
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
|
11 |
+
'Jul','Ago','Set','Out','Nov','Dez'],
|
12 |
+
dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
|
13 |
+
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
14 |
+
dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
|
15 |
+
weekHeader: 'Sem',
|
16 |
+
dateFormat: 'dd/mm/yy',
|
17 |
+
firstDay: 0,
|
18 |
+
isRTL: false,
|
19 |
+
showMonthAfterYear: false,
|
20 |
+
yearSuffix: ''};
|
21 |
+
$.datepicker.setDefaults($.datepicker.regional['pt']);
|
22 |
+
});
|
i18n/jquery.ui.datepicker-rm.js
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Romansh initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Yvonne Gienal (yvonne.gienal@educa.ch). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['rm'] = {
|
5 |
+
closeText: 'Serrar',
|
6 |
+
prevText: '<Suandant',
|
7 |
+
nextText: 'Precedent>',
|
8 |
+
currentText: 'Actual',
|
9 |
+
monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
|
10 |
+
monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
|
11 |
+
dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
|
12 |
+
dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
|
13 |
+
dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
|
14 |
+
weekHeader: 'emna',
|
15 |
+
dateFormat: 'dd/mm/yy',
|
16 |
+
firstDay: 1,
|
17 |
+
isRTL: false,
|
18 |
+
showMonthAfterYear: false,
|
19 |
+
yearSuffix: ''};
|
20 |
+
$.datepicker.setDefaults($.datepicker.regional['rm']);
|
21 |
+
});
|
i18n/jquery.ui.datepicker-ro.js
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Romanian initialisation for the jQuery UI date picker plugin.
|
2 |
+
*
|
3 |
+
* Written by Edmond L. (ll_edmond@walla.com)
|
4 |
+
* and Ionut G. Stan (ionut.g.stan@gmail.com)
|
5 |
+
*/
|
6 |
+
jQuery(function($){
|
7 |
+
$.datepicker.regional['ro'] = {
|
8 |
+
closeText: 'Închide',
|
9 |
+
prevText: '« Luna precedentă',
|
10 |
+
nextText: 'Luna următoare »',
|
11 |
+
currentText: 'Azi',
|
12 |
+
monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
|
13 |
+
'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
|
14 |
+
monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
|
15 |
+
'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
16 |
+
dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
|
17 |
+
dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
|
18 |
+
dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
|
19 |
+
weekHeader: 'Săpt',
|
20 |
+
dateFormat: 'dd.mm.yy',
|
21 |
+
firstDay: 1,
|
22 |
+
isRTL: false,
|
23 |
+
showMonthAfterYear: false,
|
24 |
+
yearSuffix: ''};
|
25 |
+
$.datepicker.setDefaults($.datepicker.regional['ro']);
|
26 |
+
});
|
i18n/jquery.ui.datepicker-ru.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Andrew Stromnov (stromnov@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ru'] = {
|
5 |
+
closeText: 'Закрыть',
|
6 |
+
prevText: '<Пред',
|
7 |
+
nextText: 'След>',
|
8 |
+
currentText: 'Сегодня',
|
9 |
+
monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
|
10 |
+
'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
|
11 |
+
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
|
12 |
+
'Июл','Авг','Сен','Окт','Ноя','Дек'],
|
13 |
+
dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
|
14 |
+
dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
|
15 |
+
dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
|
16 |
+
weekHeader: 'Нед',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ru']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-sk.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Slovak initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Vojtech Rinik (vojto@hmm.sk). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sk'] = {
|
5 |
+
closeText: 'Zavrieť',
|
6 |
+
prevText: '<Predchádzajúci',
|
7 |
+
nextText: 'Nasledujúci>',
|
8 |
+
currentText: 'Dnes',
|
9 |
+
monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
|
10 |
+
'Júl','August','September','Október','November','December'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
|
12 |
+
'Júl','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
|
14 |
+
dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
|
15 |
+
dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
|
16 |
+
weekHeader: 'Ty',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['sk']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-sl.js
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Slovenian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Jaka Jancar (jaka@kubje.org). */
|
3 |
+
/* c = č, s = š z = ž C = Č S = Š Z = Ž */
|
4 |
+
jQuery(function($){
|
5 |
+
$.datepicker.regional['sl'] = {
|
6 |
+
closeText: 'Zapri',
|
7 |
+
prevText: '<Prejšnji',
|
8 |
+
nextText: 'Naslednji>',
|
9 |
+
currentText: 'Trenutni',
|
10 |
+
monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
|
11 |
+
'Julij','Avgust','September','Oktober','November','December'],
|
12 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
13 |
+
'Jul','Avg','Sep','Okt','Nov','Dec'],
|
14 |
+
dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
|
15 |
+
dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
|
16 |
+
dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
|
17 |
+
weekHeader: 'Teden',
|
18 |
+
dateFormat: 'dd.mm.yy',
|
19 |
+
firstDay: 1,
|
20 |
+
isRTL: false,
|
21 |
+
showMonthAfterYear: false,
|
22 |
+
yearSuffix: ''};
|
23 |
+
$.datepicker.setDefaults($.datepicker.regional['sl']);
|
24 |
+
});
|
i18n/jquery.ui.datepicker-sq.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Albanian initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Flakron Bytyqi (flakron@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sq'] = {
|
5 |
+
closeText: 'mbylle',
|
6 |
+
prevText: '<mbrapa',
|
7 |
+
nextText: 'Përpara>',
|
8 |
+
currentText: 'sot',
|
9 |
+
monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
|
10 |
+
'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
|
11 |
+
monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
|
12 |
+
'Kor','Gus','Sht','Tet','Nën','Dhj'],
|
13 |
+
dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
|
14 |
+
dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
|
15 |
+
dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
|
16 |
+
weekHeader: 'Ja',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['sq']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-sr-SR.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Serbian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Dejan Dimić. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sr-SR'] = {
|
5 |
+
closeText: 'Zatvori',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
8 |
+
currentText: 'Danas',
|
9 |
+
monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
|
10 |
+
'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
12 |
+
'Jul','Avg','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
|
14 |
+
dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
|
15 |
+
dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
|
16 |
+
weekHeader: 'Sed',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['sr-SR']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-sr.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Serbian i18n for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Dejan Dimić. */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sr'] = {
|
5 |
+
closeText: 'Затвори',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
8 |
+
currentText: 'Данас',
|
9 |
+
monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
|
10 |
+
'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
|
11 |
+
monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
|
12 |
+
'Јул','Авг','Сеп','Окт','Нов','Дец'],
|
13 |
+
dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
|
14 |
+
dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
|
15 |
+
dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
|
16 |
+
weekHeader: 'Сед',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['sr']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-sv.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Swedish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Anders Ekdahl ( anders@nomadiz.se). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['sv'] = {
|
5 |
+
closeText: 'Stäng',
|
6 |
+
prevText: '«Förra',
|
7 |
+
nextText: 'Nästa»',
|
8 |
+
currentText: 'Idag',
|
9 |
+
monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
|
10 |
+
'Juli','Augusti','September','Oktober','November','December'],
|
11 |
+
monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
|
12 |
+
'Jul','Aug','Sep','Okt','Nov','Dec'],
|
13 |
+
dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
|
14 |
+
dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
|
15 |
+
dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
|
16 |
+
weekHeader: 'Ve',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['sv']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-ta.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by S A Sureshkumar (saskumar@live.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['ta'] = {
|
5 |
+
closeText: 'மூடு',
|
6 |
+
prevText: 'முன்னையது',
|
7 |
+
nextText: 'அடுத்தது',
|
8 |
+
currentText: 'இன்று',
|
9 |
+
monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
|
10 |
+
'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
|
11 |
+
monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
|
12 |
+
'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
|
13 |
+
dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
|
14 |
+
dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
|
15 |
+
dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
|
16 |
+
weekHeader: 'Не',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['ta']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-th.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Thai initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by pipo (pipo@sixhead.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['th'] = {
|
5 |
+
closeText: 'ปิด',
|
6 |
+
prevText: '« ย้อน',
|
7 |
+
nextText: 'ถัดไป »',
|
8 |
+
currentText: 'วันนี้',
|
9 |
+
monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
|
10 |
+
'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
|
11 |
+
monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
|
12 |
+
'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
|
13 |
+
dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
|
14 |
+
dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
|
15 |
+
dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
|
16 |
+
weekHeader: 'Wk',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['th']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-tj.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Abdurahmon Saidov (saidovab@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['tj'] = {
|
5 |
+
closeText: 'Идома',
|
6 |
+
prevText: '<Қафо',
|
7 |
+
nextText: 'Пеш>',
|
8 |
+
currentText: 'Имрӯз',
|
9 |
+
monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн',
|
10 |
+
'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'],
|
11 |
+
monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
|
12 |
+
'Июл','Авг','Сен','Окт','Ноя','Дек'],
|
13 |
+
dayNames: ['якшанбе','душанбе','сешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'],
|
14 |
+
dayNamesShort: ['якш','душ','сеш','чор','пан','ҷум','шан'],
|
15 |
+
dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'],
|
16 |
+
weekHeader: 'Хф',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['tj']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-tr.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Turkish initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Izzet Emre Erkan (kara@karalamalar.net). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['tr'] = {
|
5 |
+
closeText: 'kapat',
|
6 |
+
prevText: '<geri',
|
7 |
+
nextText: 'ileri>',
|
8 |
+
currentText: 'bugün',
|
9 |
+
monthNames: ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran',
|
10 |
+
'Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'],
|
11 |
+
monthNamesShort: ['Oca','Şub','Mar','Nis','May','Haz',
|
12 |
+
'Tem','Ağu','Eyl','Eki','Kas','Ara'],
|
13 |
+
dayNames: ['Pazar','Pazartesi','Salı','Çarşamba','Perşembe','Cuma','Cumartesi'],
|
14 |
+
dayNamesShort: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
|
15 |
+
dayNamesMin: ['Pz','Pt','Sa','Ça','Pe','Cu','Ct'],
|
16 |
+
weekHeader: 'Hf',
|
17 |
+
dateFormat: 'dd.mm.yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['tr']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-uk.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Ukrainian (UTF-8) initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Maxim Drogobitskiy (maxdao@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['uk'] = {
|
5 |
+
closeText: 'Закрити',
|
6 |
+
prevText: '<',
|
7 |
+
nextText: '>',
|
8 |
+
currentText: 'Сьогодні',
|
9 |
+
monthNames: ['Січень','Лютий','Березень','Квітень','Травень','Червень',
|
10 |
+
'Липень','Серпень','Вересень','Жовтень','Листопад','Грудень'],
|
11 |
+
monthNamesShort: ['Січ','Лют','Бер','Кві','Тра','Чер',
|
12 |
+
'Лип','Сер','Вер','Жов','Лис','Гру'],
|
13 |
+
dayNames: ['неділя','понеділок','вівторок','середа','четвер','п’ятниця','субота'],
|
14 |
+
dayNamesShort: ['нед','пнд','вів','срд','чтв','птн','сбт'],
|
15 |
+
dayNamesMin: ['Нд','Пн','Вт','Ср','Чт','Пт','Сб'],
|
16 |
+
weekHeader: 'Не',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['uk']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-vi.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Vietnamese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['vi'] = {
|
5 |
+
closeText: 'Đóng',
|
6 |
+
prevText: '<Trước',
|
7 |
+
nextText: 'Tiếp>',
|
8 |
+
currentText: 'Hôm nay',
|
9 |
+
monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu',
|
10 |
+
'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'],
|
11 |
+
monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6',
|
12 |
+
'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'],
|
13 |
+
dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
|
14 |
+
dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
15 |
+
dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
16 |
+
weekHeader: 'Tu',
|
17 |
+
dateFormat: 'dd/mm/yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: false,
|
21 |
+
yearSuffix: ''};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['vi']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-zh-CN.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Cloudream (cloudream@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['zh-CN'] = {
|
5 |
+
closeText: '关闭',
|
6 |
+
prevText: '<上月',
|
7 |
+
nextText: '下月>',
|
8 |
+
currentText: '今天',
|
9 |
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
10 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
11 |
+
monthNamesShort: ['一','二','三','四','五','六',
|
12 |
+
'七','八','九','十','十一','十二'],
|
13 |
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
14 |
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
15 |
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
16 |
+
weekHeader: '周',
|
17 |
+
dateFormat: 'yy-mm-dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: '年'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-zh-HK.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by SCCY (samuelcychan@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['zh-HK'] = {
|
5 |
+
closeText: '關閉',
|
6 |
+
prevText: '<上月',
|
7 |
+
nextText: '下月>',
|
8 |
+
currentText: '今天',
|
9 |
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
10 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
11 |
+
monthNamesShort: ['一','二','三','四','五','六',
|
12 |
+
'七','八','九','十','十一','十二'],
|
13 |
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
14 |
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
15 |
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
16 |
+
weekHeader: '周',
|
17 |
+
dateFormat: 'dd-mm-yy',
|
18 |
+
firstDay: 0,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: '年'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['zh-HK']);
|
23 |
+
});
|
i18n/jquery.ui.datepicker-zh-TW.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Chinese initialisation for the jQuery UI date picker plugin. */
|
2 |
+
/* Written by Ressol (ressol@gmail.com). */
|
3 |
+
jQuery(function($){
|
4 |
+
$.datepicker.regional['zh-TW'] = {
|
5 |
+
closeText: '關閉',
|
6 |
+
prevText: '<上月',
|
7 |
+
nextText: '下月>',
|
8 |
+
currentText: '今天',
|
9 |
+
monthNames: ['一月','二月','三月','四月','五月','六月',
|
10 |
+
'七月','八月','九月','十月','十一月','十二月'],
|
11 |
+
monthNamesShort: ['一','二','三','四','五','六',
|
12 |
+
'七','八','九','十','十一','十二'],
|
13 |
+
dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
|
14 |
+
dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
|
15 |
+
dayNamesMin: ['日','一','二','三','四','五','六'],
|
16 |
+
weekHeader: '周',
|
17 |
+
dateFormat: 'yy/mm/dd',
|
18 |
+
firstDay: 1,
|
19 |
+
isRTL: false,
|
20 |
+
showMonthAfterYear: true,
|
21 |
+
yearSuffix: '年'};
|
22 |
+
$.datepicker.setDefaults($.datepicker.regional['zh-TW']);
|
23 |
+
});
|
js/admin.js
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
jQuery(function($) {
|
2 |
-
$('.mailchimp-login').click(function(e) {
|
3 |
-
e.preventDefault();
|
4 |
-
|
5 |
-
var login_window = window.open($(this).attr('href'), "ServiceAssociate", 'width=500,height=550'),
|
6 |
-
auth_poll = null;
|
7 |
-
|
8 |
-
auth_poll = setInterval(function() {
|
9 |
-
if (login_window.closed) {
|
10 |
-
clearInterval(auth_poll);
|
11 |
-
window.location.reload();
|
12 |
-
}
|
13 |
-
}, 100);
|
14 |
-
});
|
15 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/datepicker.js
CHANGED
File without changes
|
js/hidecss.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* show/hide on checkbox click */
|
2 |
+
function showMe (box) {
|
3 |
+
|
4 |
+
var chboxs = document.getElementsByName("mc_nuke_all_styles");
|
5 |
+
var vis = "none";
|
6 |
+
for(var i=0;i<chboxs.length;i++) {
|
7 |
+
if(chboxs[i].checked){
|
8 |
+
vis = "none";
|
9 |
+
}
|
10 |
+
else{
|
11 |
+
var vis = "";
|
12 |
+
vis = "";
|
13 |
+
}
|
14 |
+
}
|
15 |
+
document.getElementById(box).style.display = vis;
|
16 |
+
|
17 |
+
|
18 |
+
}
|
js/i18n/jquery-ui-i18n.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-af.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-ar-DZ.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-ar.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-az.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-bg.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-bs.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-ca.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-cs.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-da.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-de.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-el.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-en-AU.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-en-GB.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-en-NZ.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-eo.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-es.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-et.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-eu.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-fa.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-fi.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-fo.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-fr-CH.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-fr.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-gl.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-he.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-hr.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-hu.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-hy.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-id.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-is.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-it.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-ja.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-ko.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-kz.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-lt.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-lv.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-ml.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-ms.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-nl.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-no.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-pl.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-pt-BR.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-pt.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-rm.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-ro.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-ru.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-sk.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-sl.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-sq.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-sr-SR.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-sr.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-sv.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-ta.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-th.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-tj.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-tr.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-uk.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-vi.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-zh-CN.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-zh-HK.js
CHANGED
File without changes
|
js/i18n/jquery.ui.datepicker-zh-TW.js
CHANGED
File without changes
|
js/scrollTo.js
CHANGED
File without changes
|
lib/mailchimp/mailchimp.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class MailChimp_API {
|
4 |
+
|
5 |
+
public $key;
|
6 |
+
public $datacenter;
|
7 |
+
|
8 |
+
public function __construct($api_key) {
|
9 |
+
$api_key = trim($api_key);
|
10 |
+
if(!$api_key) {
|
11 |
+
throw new Exception(__('Invalid API Key: ' . $api_key));
|
12 |
+
}
|
13 |
+
|
14 |
+
$this->key = $api_key;
|
15 |
+
$dc = explode('-', $api_key);
|
16 |
+
$this->datacenter = empty($dc[1]) ? 'us1' : $dc[1];
|
17 |
+
$this->api_url = 'https://' . $this->datacenter . '.api.mailchimp.com/3.0/';
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
public function get($endpoint, $count=10) {
|
22 |
+
$url = $this->api_url . $endpoint;
|
23 |
+
|
24 |
+
if($count) {
|
25 |
+
$url .= '?count=' . $count;
|
26 |
+
}
|
27 |
+
|
28 |
+
$args = array(
|
29 |
+
'timeout' => 5,
|
30 |
+
'redirection' => 5,
|
31 |
+
'httpversion' => '1.1',
|
32 |
+
'user-agent' => 'MailChimp WordPress Plugin/' . get_bloginfo( 'url' ),
|
33 |
+
'headers' => array("Authorization" => 'apikey ' . $this->key)
|
34 |
+
);
|
35 |
+
|
36 |
+
$request = wp_remote_get($url, $args);
|
37 |
+
|
38 |
+
if(is_array($request) && $request['response']['code'] == 200) {
|
39 |
+
return json_decode($request['body'], true);
|
40 |
+
} elseif(is_array($request) && $request['response']['code']) {
|
41 |
+
$error = json_decode($request['body']);
|
42 |
+
$error = new WP_Error('mailchimp-get-error', $error->detail);
|
43 |
+
return $error;
|
44 |
+
} else {
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
public function post($endpoint, $body, $method='POST') {
|
50 |
+
$url = $this->api_url . $endpoint;
|
51 |
+
|
52 |
+
$args = array(
|
53 |
+
'method' => $method,
|
54 |
+
'timeout' => 5,
|
55 |
+
'redirection' => 5,
|
56 |
+
'httpversion' => '1.1',
|
57 |
+
'user-agent' => 'MailChimp WordPress Plugin/' . get_bloginfo( 'url' ),
|
58 |
+
'headers' => array("Authorization" => 'apikey ' . $this->key),
|
59 |
+
'body' => json_encode($body)
|
60 |
+
);
|
61 |
+
$request = wp_remote_post($url, $args);
|
62 |
+
|
63 |
+
if(is_array($request) && $request['response']['code'] == 200) {
|
64 |
+
return json_decode($request['body'], true);
|
65 |
+
} else {
|
66 |
+
if(is_wp_error($request)) {
|
67 |
+
return new WP_Error('mc-subscribe-error', $request->get_error_message());
|
68 |
+
}
|
69 |
+
|
70 |
+
$body = json_decode($request['body']);
|
71 |
+
return new WP_Error('mc-subscribe-error-api', $body['detail']);
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
mailchimp.js
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Form submission functions for the MailChimp Widget */
|
2 |
+
;(function($){
|
3 |
+
$(function($) {
|
4 |
+
// Change our submit type from HTML (default) to JS
|
5 |
+
$('#mc_submit_type').val('js');
|
6 |
+
|
7 |
+
// Attach our form submitter action
|
8 |
+
$('#mc_signup_form').ajaxForm({
|
9 |
+
url: mailchimpSF.ajax_url,
|
10 |
+
type: 'POST',
|
11 |
+
dataType: 'text',
|
12 |
+
beforeSubmit: mc_beforeForm,
|
13 |
+
success: mc_success
|
14 |
+
});
|
15 |
+
});
|
16 |
+
|
17 |
+
function mc_beforeForm(){
|
18 |
+
// Disable the submit button
|
19 |
+
$('#mc_signup_submit').attr("disabled","disabled");
|
20 |
+
}
|
21 |
+
function mc_success(data){
|
22 |
+
// Re-enable the submit button
|
23 |
+
$('#mc_signup_submit').removeAttr("disabled");
|
24 |
+
|
25 |
+
// Put the response in the message div
|
26 |
+
$('#mc_message').html(data);
|
27 |
+
|
28 |
+
// See if we're successful, if so, wipe the fields
|
29 |
+
var reg = new RegExp("class='mc_success_msg'", 'i');
|
30 |
+
if (reg.test(data)){
|
31 |
+
$('#mc_signup_form').each(function(){
|
32 |
+
this.reset();
|
33 |
+
});
|
34 |
+
$('#mc_submit_type').val('js');
|
35 |
+
}
|
36 |
+
$.scrollTo('#mc_signup', {offset: {top: -28}});
|
37 |
+
}
|
38 |
+
})(jQuery);
|
mailchimp.php
CHANGED
@@ -3,44 +3,40 @@
|
|
3 |
Plugin Name: MailChimp
|
4 |
Plugin URI: http://www.mailchimp.com/plugins/mailchimp-wordpress-plugin/
|
5 |
Description: The MailChimp plugin allows you to quickly and easily add a signup form for your MailChimp list.
|
6 |
-
Version: 1.
|
7 |
-
Author: MailChimp
|
8 |
-
Author URI:
|
9 |
*/
|
10 |
/* Copyright 2008-2012 MailChimp.com (email : api@mailchimp.com)
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
*/
|
26 |
|
27 |
// Version constant for easy CSS refreshes
|
28 |
-
define('MCSF_VER', '1.
|
29 |
|
30 |
// What's our permission (capability) threshold
|
31 |
define('MCSF_CAP_THRESHOLD', 'manage_options');
|
32 |
|
33 |
-
// If Developer mode not defined, make it false
|
34 |
-
if (! defined('MAILCHIMP_DEV_MODE') ) {
|
35 |
-
define('MAILCHIMP_DEV_MODE', false);
|
36 |
-
}
|
37 |
-
|
38 |
// Define our location constants, both MCSF_DIR and MCSF_URL
|
39 |
mailchimpSF_where_am_i();
|
40 |
|
41 |
// Get our MailChimp API class in scope
|
42 |
-
if (!class_exists('
|
43 |
-
|
|
|
44 |
}
|
45 |
|
46 |
// includes the widget code so it can be easily called either normally or via ajax
|
@@ -58,13 +54,16 @@ include_once('mailchimp_compat.php');
|
|
58 |
* @return void
|
59 |
*/
|
60 |
function mailchimpSF_plugin_init() {
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
65 |
|
66 |
-
|
67 |
-
|
68 |
}
|
69 |
add_action( 'init', 'mailchimpSF_plugin_init' );
|
70 |
|
@@ -76,10 +75,10 @@ add_action( 'init', 'mailchimpSF_plugin_init' );
|
|
76 |
* @return array - Links
|
77 |
*/
|
78 |
function mailchimpSD_plugin_action_links($links) {
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
}
|
84 |
add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'mailchimpSD_plugin_action_links', 10, 1);
|
85 |
|
@@ -90,30 +89,32 @@ add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'mailchimpSD_plugin
|
|
90 |
* @return void
|
91 |
*/
|
92 |
function mailchimpSF_load_resources() {
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
|
|
|
|
117 |
}
|
118 |
|
119 |
|
@@ -123,8 +124,8 @@ function mailchimpSF_load_resources() {
|
|
123 |
* @return void
|
124 |
*/
|
125 |
function mc_admin_page_load_resources() {
|
126 |
-
|
127 |
-
|
128 |
}
|
129 |
add_action('load-settings_page_mailchimpSF_options', 'mc_admin_page_load_resources');
|
130 |
|
@@ -133,44 +134,10 @@ add_action('load-settings_page_mailchimpSF_options', 'mc_admin_page_load_resourc
|
|
133 |
* Loads jQuery Datepicker for the date-pick class
|
134 |
**/
|
135 |
function mc_datepicker_load() {
|
136 |
-
|
137 |
-
<script type="text/javascript">
|
138 |
-
jQuery(function($) {
|
139 |
-
$('.date-pick').each(function() {
|
140 |
-
var format = $(this).data('format') || 'mm/dd/yyyy';
|
141 |
-
format = format.replace(/yyyy/i, 'yy');
|
142 |
-
$(this).datepicker({
|
143 |
-
autoFocusNextInput: true,
|
144 |
-
constrainInput: false,
|
145 |
-
changeMonth: true,
|
146 |
-
changeYear: true,
|
147 |
-
beforeShow: function(input, inst) { $('#ui-datepicker-div').addClass('show'); },
|
148 |
-
dateFormat: format.toLowerCase(),
|
149 |
-
});
|
150 |
-
});
|
151 |
-
d = new Date();
|
152 |
-
$('.birthdate-pick').each(function() {
|
153 |
-
var format = $(this).data('format') || 'mm/dd';
|
154 |
-
format = format.replace(/yyyy/i, 'yy');
|
155 |
-
$(this).datepicker({
|
156 |
-
autoFocusNextInput: true,
|
157 |
-
constrainInput: false,
|
158 |
-
changeMonth: true,
|
159 |
-
changeYear: false,
|
160 |
-
minDate: new Date(d.getFullYear(), 1-1, 1),
|
161 |
-
maxDate: new Date(d.getFullYear(), 12-1, 31),
|
162 |
-
beforeShow: function(input, inst) { $('#ui-datepicker-div').removeClass('show'); },
|
163 |
-
dateFormat: format.toLowerCase(),
|
164 |
-
});
|
165 |
-
|
166 |
-
});
|
167 |
-
|
168 |
-
});
|
169 |
-
</script>
|
170 |
-
<?php
|
171 |
}
|
172 |
if (get_option('mc_use_datepicker') == 'on' && !is_admin()) {
|
173 |
-
|
174 |
}
|
175 |
|
176 |
/**
|
@@ -178,20 +145,14 @@ if (get_option('mc_use_datepicker') == 'on' && !is_admin()) {
|
|
178 |
* typically, JS or CSS
|
179 |
**/
|
180 |
function mailchimpSF_early_request_handler() {
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
break;
|
190 |
-
case 'authorized':
|
191 |
-
mailchimpSF_authorized();
|
192 |
-
break;
|
193 |
-
}
|
194 |
-
}
|
195 |
}
|
196 |
add_action('init', 'mailchimpSF_early_request_handler', 0);
|
197 |
|
@@ -201,82 +162,7 @@ add_action('init', 'mailchimpSF_early_request_handler', 0);
|
|
201 |
* a static file.
|
202 |
*/
|
203 |
function mailchimpSF_main_css() {
|
204 |
-
|
205 |
-
.mc_error_msg {
|
206 |
-
color: red;
|
207 |
-
margin-bottom: 1.0em;
|
208 |
-
}
|
209 |
-
.mc_success_msg {
|
210 |
-
color: green;
|
211 |
-
margin-bottom: 1.0em;
|
212 |
-
}
|
213 |
-
.mc_merge_var{
|
214 |
-
padding:0;
|
215 |
-
margin:0;
|
216 |
-
}
|
217 |
-
<?php
|
218 |
-
// If we're utilizing custom styles
|
219 |
-
if (get_option('mc_custom_style')=='on'){
|
220 |
-
?>
|
221 |
-
#mc_signup_form {
|
222 |
-
padding:5px;
|
223 |
-
border-width: <?php echo get_option('mc_form_border_width'); ?>px;
|
224 |
-
border-style: <?php echo (get_option('mc_form_border_width')==0) ? 'none' : 'solid'; ?>;
|
225 |
-
border-color: #<?php echo get_option('mc_form_border_color'); ?>;
|
226 |
-
color: #<?php echo get_option('mc_form_text_color'); ?>;
|
227 |
-
background-color: #<?php echo get_option('mc_form_background'); ?>;
|
228 |
-
}
|
229 |
-
|
230 |
-
|
231 |
-
.mc_custom_border_hdr {
|
232 |
-
border-width: <?php echo get_option('mc_header_border_width'); ?>px;
|
233 |
-
border-style: <?php echo (get_option('mc_header_border_width')==0) ? 'none' : 'solid'; ?>;
|
234 |
-
border-color: #<?php echo get_option('mc_header_border_color'); ?>;
|
235 |
-
color: #<?php echo get_option('mc_header_text_color'); ?>;
|
236 |
-
background-color: #<?php echo get_option('mc_header_background'); ?>;
|
237 |
-
<!-- font-size: 1.2em;-->
|
238 |
-
padding:5px 10px;
|
239 |
-
width: 100%;
|
240 |
-
}
|
241 |
-
<?php
|
242 |
-
}
|
243 |
-
?>
|
244 |
-
#mc_signup_container {}
|
245 |
-
#mc_signup_form {}
|
246 |
-
#mc_signup_form .mc_var_label {}
|
247 |
-
#mc_signup_form .mc_input {}
|
248 |
-
#mc-indicates-required {
|
249 |
-
width:100%;
|
250 |
-
}
|
251 |
-
#mc_display_rewards {}
|
252 |
-
.mc_interests_header {
|
253 |
-
font-weight:bold;
|
254 |
-
}
|
255 |
-
div.mc_interest{
|
256 |
-
width:100%;
|
257 |
-
}
|
258 |
-
#mc_signup_form input.mc_interest {}
|
259 |
-
#mc_signup_form select {}
|
260 |
-
#mc_signup_form label.mc_interest_label {
|
261 |
-
display:inline;
|
262 |
-
}
|
263 |
-
.mc_signup_submit {
|
264 |
-
text-align:center;
|
265 |
-
}
|
266 |
-
ul.mc_list {
|
267 |
-
list-style-type: none;
|
268 |
-
}
|
269 |
-
ul.mc_list li {
|
270 |
-
font-size: 12px;
|
271 |
-
}
|
272 |
-
#ui-datepicker-div .ui-datepicker-year {
|
273 |
-
display: none;
|
274 |
-
}
|
275 |
-
#ui-datepicker-div.show .ui-datepicker-year {
|
276 |
-
display: inline;
|
277 |
-
padding-left: 3px
|
278 |
-
}
|
279 |
-
<?php
|
280 |
}
|
281 |
|
282 |
|
@@ -286,164 +172,157 @@ if (get_option('mc_custom_style')=='on'){
|
|
286 |
* @return void
|
287 |
*/
|
288 |
function mailchimpSF_add_pages(){
|
289 |
-
|
290 |
-
|
291 |
}
|
292 |
add_action('admin_menu', 'mailchimpSF_add_pages');
|
293 |
|
294 |
function mailchimpSF_request_handler() {
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
}
|
349 |
add_action('init', 'mailchimpSF_request_handler');
|
350 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
|
352 |
function mailchimpSF_auth_nonce_key($salt = null) {
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
}
|
358 |
|
359 |
function mailchimpSF_auth_nonce_salt() {
|
360 |
-
|
361 |
-
}
|
362 |
-
|
363 |
-
function mailchimpSF_authorize() {
|
364 |
-
$api = mailchimpSF_get_api(true);
|
365 |
-
$proxy = apply_filters('mailchimp_authorize_url', $api->getApiUrl('authorize'));
|
366 |
-
if (strpos($proxy, 'socialize-this') !== false) {
|
367 |
-
$salt = mailchimpSF_auth_nonce_salt();
|
368 |
-
$id = mailchimpSF_create_nonce( mailchimpSF_auth_nonce_key( $salt ) );
|
369 |
-
|
370 |
-
$url = home_url('index.php');
|
371 |
-
$args = array(
|
372 |
-
'mcsf_action' => 'authorized',
|
373 |
-
'salt' => $salt,
|
374 |
-
'user_id' => get_current_user_id(),
|
375 |
-
);
|
376 |
-
|
377 |
-
$proxy = add_query_arg(array(
|
378 |
-
'id' => $id,
|
379 |
-
'response_url' => urlencode(add_query_arg($args, $url))
|
380 |
-
), $proxy);
|
381 |
-
|
382 |
-
$proxy = apply_filters('mailchimp_proxy_url', $proxy);
|
383 |
-
}
|
384 |
-
|
385 |
-
wp_redirect($proxy);
|
386 |
-
exit;
|
387 |
-
}
|
388 |
-
|
389 |
-
function mailchimpSF_authorized() {
|
390 |
-
// User ID on the request? Must be set before nonce comparison
|
391 |
-
$user_id = stripslashes($_GET['user_id']);
|
392 |
-
if ($user_id !== null) {
|
393 |
-
wp_set_current_user($user_id);
|
394 |
-
}
|
395 |
-
|
396 |
-
$nonce = stripslashes($_POST['id']);
|
397 |
-
$salt = stripslashes($_GET['salt']);
|
398 |
-
|
399 |
-
if (mailchimpSF_verify_nonce( $nonce, mailchimpSF_auth_nonce_key( $salt ) ) === false) {
|
400 |
-
wp_die('Cheatin’ huh?');
|
401 |
-
}
|
402 |
-
|
403 |
-
$response = stripslashes_deep($_POST['response']);
|
404 |
-
|
405 |
-
if (!isset($response['keys']) || !isset($response['user'])) {
|
406 |
-
wp_die('Something went wrong, please try again');
|
407 |
-
}
|
408 |
-
|
409 |
-
update_option('mc_sopresto_user', $response['user']);
|
410 |
-
update_option('mc_sopresto_dc', $response['dc']);
|
411 |
-
update_option('mc_sopresto_public_key', $response['keys']['public']);
|
412 |
-
update_option('mc_sopresto_secret_key', $response['keys']['secret']);
|
413 |
-
exit;
|
414 |
}
|
415 |
|
416 |
/**
|
417 |
-
*
|
418 |
*
|
419 |
-
* @return
|
420 |
*/
|
421 |
-
function mailchimpSF_upgrade() {
|
422 |
-
// See if we need an upgrade
|
423 |
-
if (mailchimpSF_needs_upgrade()) {
|
424 |
-
// remove password option if it's set (0.5)
|
425 |
-
// Update interest group data
|
426 |
-
mailchimpSF_do_upgrade();
|
427 |
-
}
|
428 |
-
}
|
429 |
-
add_action('admin_init', 'mailchimpSF_upgrade');
|
430 |
|
431 |
-
/**
|
432 |
-
* Creates new Sopresto API object
|
433 |
-
*
|
434 |
-
* @return Sopresto_MailChimp|false
|
435 |
-
*/
|
436 |
function mailchimpSF_get_api($force = false) {
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
return new Sopresto_MailChimp($public_key, $secret_key, '1.3');
|
442 |
-
}
|
443 |
|
444 |
-
|
445 |
}
|
446 |
|
|
|
|
|
447 |
/**
|
448 |
* Checks to see if we're storing a password, if so, we need
|
449 |
* to upgrade to the API key
|
@@ -451,95 +330,43 @@ function mailchimpSF_get_api($force = false) {
|
|
451 |
* @return bool
|
452 |
**/
|
453 |
function mailchimpSF_needs_upgrade() {
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
}
|
467 |
-
|
468 |
-
/**
|
469 |
-
* 1.2.4 -> 1.2.5 - Update to support multiple interest groups
|
470 |
-
* MCAPIv1.2 -> MCAPIv1.3 - update interest groups
|
471 |
-
* 2011-02-09 - old password upgrade code deleted as 0.5 is way old
|
472 |
-
*/
|
473 |
-
function mailchimpSF_do_upgrade() {
|
474 |
-
# TODO: reload this
|
475 |
}
|
476 |
|
477 |
/**
|
478 |
* Deletes all mailchimp options
|
479 |
**/
|
480 |
function mailchimpSF_delete_setup() {
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
if (is_array($mv)){
|
501 |
-
foreach($mv as $var){
|
502 |
-
$opt = 'mc_mv_'.$var['tag'];
|
503 |
-
delete_option($opt);
|
504 |
-
}
|
505 |
-
}
|
506 |
-
delete_option('mc_merge_vars');
|
507 |
-
}
|
508 |
-
|
509 |
-
/**
|
510 |
-
* Resets the list settings, there's only one list
|
511 |
-
* that can have settings at a time, so no list_id
|
512 |
-
* parameter is necessary.
|
513 |
-
**/
|
514 |
-
function mailchimpSF_reset_list_settings() {
|
515 |
-
|
516 |
-
delete_option('mc_list_id');
|
517 |
-
delete_option('mc_list_name');
|
518 |
-
delete_option('mc_merge_vars');
|
519 |
-
delete_option('mc_interest_groups');
|
520 |
-
|
521 |
-
delete_option('mc_use_javascript');
|
522 |
-
delete_option('mc_use_unsub_link');
|
523 |
-
delete_option('mc_use_datepicker');
|
524 |
-
|
525 |
-
delete_option('mc_header_content');
|
526 |
-
delete_option('mc_subheader_content');
|
527 |
-
delete_option('mc_submit_text');
|
528 |
-
|
529 |
-
delete_option('mc_custom_style');
|
530 |
-
|
531 |
-
delete_option('mc_header_border_width');
|
532 |
-
delete_option('mc_header_border_color');
|
533 |
-
delete_option('mc_header_background');
|
534 |
-
delete_option('mc_header_text_color');
|
535 |
-
|
536 |
-
delete_option('mc_form_border_width');
|
537 |
-
delete_option('mc_form_border_color');
|
538 |
-
delete_option('mc_form_background');
|
539 |
-
delete_option('mc_form_text_color');
|
540 |
-
|
541 |
-
$msg = '<p class="success_msg">'.esc_html(__('Successfully Reset your List selection... Now you get to pick again!', 'mailchimp_i18n')).'</p>';
|
542 |
-
mailchimpSF_global_msg($msg);
|
543 |
}
|
544 |
|
545 |
/**
|
@@ -548,43 +375,44 @@ function mailchimpSF_reset_list_settings() {
|
|
548 |
* @return string/bool depending on get/set
|
549 |
**/
|
550 |
function mailchimpSF_global_msg($msg = null) {
|
551 |
-
|
552 |
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
}
|
567 |
|
568 |
/**
|
569 |
* Sets the default options for the option form
|
570 |
**/
|
571 |
function mailchimpSF_set_form_defaults($list_name = '') {
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
|
|
588 |
}
|
589 |
|
590 |
/**
|
@@ -594,643 +422,269 @@ function mailchimpSF_set_form_defaults($list_name = '') {
|
|
594 |
**/
|
595 |
function mailchimpSF_save_general_form_settings() {
|
596 |
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
694 |
}
|
695 |
|
696 |
/**
|
697 |
* Sees if the user changed the list, and updates options accordingly
|
698 |
**/
|
699 |
function mailchimpSF_change_list_if_necessary() {
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
$igs_text = ' ';
|
759 |
-
if (is_array($igs)) {
|
760 |
-
$igs_text .= sprintf(__('and %s Sets of Interest Groups', 'mailchimp_i18n'), count($igs));
|
761 |
-
}
|
762 |
-
|
763 |
-
$msg = '<p class="success_msg">'.
|
764 |
-
sprintf(
|
765 |
-
__('<b>Success!</b> Loaded and saved the info for %d Merge Variables', 'mailchimp_i18n').$igs_text,
|
766 |
-
count($mv)
|
767 |
-
).' '.
|
768 |
-
__('from your list').' "'.$list_name.'"<br/><br/>'.
|
769 |
-
__('Now you should either Turn On the MailChimp Widget or change your options below, then turn it on.', 'mailchimp_i18n').'</p>';
|
770 |
-
mailchimpSF_global_msg($msg);
|
771 |
-
}
|
772 |
-
}
|
773 |
}
|
774 |
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
// Display Developer mode active.
|
789 |
-
if (MAILCHIMP_DEV_MODE == true) { ?>
|
790 |
-
<p class="error_msg">Developer mode active.</p>
|
791 |
-
<?php }
|
792 |
-
|
793 |
-
$user = get_option('mc_sopresto_user');
|
794 |
-
|
795 |
-
// If we have an API Key, see if we need to change the lists and its options
|
796 |
-
mailchimpSF_change_list_if_necessary();
|
797 |
-
|
798 |
-
// Display our success/error message(s) if have them
|
799 |
-
if (mailchimpSF_global_msg() != ''){
|
800 |
-
// Message has already been html escaped, so we don't want to 2x escape it here
|
801 |
-
?>
|
802 |
-
<div id="mc_message" class=""><?php echo mailchimpSF_global_msg(); ?></div>
|
803 |
-
<?php
|
804 |
}
|
805 |
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
?>
|
820 |
-
</p>
|
821 |
-
|
822 |
-
<div style="width: 900px;">
|
823 |
-
<table class="widefat mc-widefat mc-api">
|
824 |
-
<tr valign="top">
|
825 |
-
<th scope="row" class="mailchimp-connect"><?php esc_html_e('Connect to MailChimp', 'mailchimp_i18n'); ?></th>
|
826 |
-
<td>
|
827 |
-
<a href="<?php echo add_query_arg(array("mcsf_action" => "authorize"), home_url('index.php')) ?>" class="mailchimp-login">Connect</a>
|
828 |
-
</td>
|
829 |
-
</tr>
|
830 |
-
</table>
|
831 |
-
</div>
|
832 |
-
</div>
|
833 |
-
|
834 |
-
<br/>
|
835 |
-
<?php
|
836 |
-
if ($user && $user['username'] != '') {
|
837 |
-
?>
|
838 |
-
<!--<div class="notes_msg">
|
839 |
-
<strong><?php esc_html_e('Notes', 'mailchimp_i18n'); ?>:</strong>
|
840 |
-
<ul>
|
841 |
-
<li><?php esc_html_e('Changing your settings at MailChimp.com may cause this to stop working.', 'mailchimp_i18n'); ?></li>
|
842 |
-
<li><?php esc_html_e('If you change your login to a different account, the info you have setup below will be erased.', 'mailchimp_i18n'); ?></li>
|
843 |
-
<li><?php esc_html_e('If any of that happens, no biggie - just reconfigure your login and the items below...', 'mailchimp_i18n'); ?></li>
|
844 |
-
</ul>
|
845 |
-
</div>-->
|
846 |
-
<?php
|
847 |
-
}
|
848 |
-
} // End of login form
|
849 |
-
|
850 |
-
// Start logout form
|
851 |
-
elseif (MAILCHIMP_DEV_MODE == false) {
|
852 |
-
?>
|
853 |
-
<table style="min-width:400px;" class="mc-user" cellspacing="0">
|
854 |
-
<tr>
|
855 |
-
<td><h3><?php esc_html_e('Logged in as', 'mailchimp_i18n');?>: <?php echo esc_html($user['username']); ?></h3>
|
856 |
-
</td>
|
857 |
-
<td>
|
858 |
-
<form method="post" action="options-general.php?page=mailchimpSF_options">
|
859 |
-
<input type="hidden" name="mcsf_action" value="logout"/>
|
860 |
-
<input type="submit" name="Submit" value="<?php esc_attr_e('Logout', 'mailchimp_i18n');?>" class="button" />
|
861 |
-
<?php wp_nonce_field('mc_logout', '_mcsf_nonce_action'); ?>
|
862 |
-
</form>
|
863 |
-
</td>
|
864 |
-
</tr>
|
865 |
-
</table>
|
866 |
-
<?php
|
867 |
-
} // End Logout form
|
868 |
-
|
869 |
-
//Just get out if nothing else matters...
|
870 |
-
$api = mailchimpSF_get_api();
|
871 |
-
if (!$api && MAILCHIMP_DEV_MODE == false) { return; }
|
872 |
-
|
873 |
-
if ($api){
|
874 |
-
?>
|
875 |
-
<h3 class="mc-h2"><?php esc_html_e('Your Lists', 'mailchimp_i18n'); ?></h3>
|
876 |
-
|
877 |
-
<div>
|
878 |
-
|
879 |
-
<p class="mc-p"><?php esc_html_e('Please select the List you wish to create a Signup Form for.', 'mailchimp_i18n'); ?></p>
|
880 |
-
<p class="mc-list-note"><strong><?php esc_html_e('Note:', 'mailchimp_i18n'); ?></strong> <?php esc_html_e('Updating your list will not cause settings below to be lost. Changing to a new list will.', 'mailchimp_i18n'); ?></p>
|
881 |
-
|
882 |
-
<form method="post" action="options-general.php?page=mailchimpSF_options">
|
883 |
-
<?php
|
884 |
-
//we *could* support paging, but few users have that many lists (and shouldn't)
|
885 |
-
$lists = $api->lists(array(),0,100);
|
886 |
-
$lists = $lists['data'];
|
887 |
-
|
888 |
-
if (count($lists) == 0) {
|
889 |
-
?>
|
890 |
-
<span class='error_msg'>
|
891 |
-
<?php
|
892 |
-
echo sprintf(
|
893 |
-
esc_html(__("Uh-oh, you don't have any lists defined! Please visit %s, login, and setup a list before using this tool!", 'mailchimp_i18n')),
|
894 |
-
"<a href='http://www.mailchimp.com/'>MailChimp</a>"
|
895 |
-
);
|
896 |
-
?>
|
897 |
-
</span>
|
898 |
-
<?php
|
899 |
-
}
|
900 |
-
else {
|
901 |
-
?>
|
902 |
-
<table style="min-width:400px" class="mc-list-select" cellspacing="0">
|
903 |
-
<tr class="mc-list-row">
|
904 |
-
<td>
|
905 |
-
<select name="mc_list_id" style="min-width:200px;">
|
906 |
-
<option value=""> — <?php esc_html_e('Select A List','mailchimp_i18n'); ?> — </option>
|
907 |
-
<?php
|
908 |
-
foreach ($lists as $list) {
|
909 |
-
$option = get_option('mc_list_id');
|
910 |
-
?>
|
911 |
-
<option value="<?php echo esc_attr($list['id']); ?>"<?php selected($list['id'], $option); ?>><?php echo esc_html($list['name']); ?></option>
|
912 |
-
<?php
|
913 |
-
}
|
914 |
-
?>
|
915 |
-
</select>
|
916 |
-
</td>
|
917 |
-
<td>
|
918 |
-
<input type="hidden" name="mcsf_action" value="update_mc_list_id" />
|
919 |
-
<input type="submit" name="Submit" value="<?php esc_attr_e('Update List', 'mailchimp_i18n'); ?>" class="button" />
|
920 |
-
</td>
|
921 |
-
</tr>
|
922 |
-
</table>
|
923 |
-
<?php
|
924 |
-
} //end select list
|
925 |
-
?>
|
926 |
-
</form>
|
927 |
-
</div>
|
928 |
-
|
929 |
-
<br/>
|
930 |
-
|
931 |
-
<?php
|
932 |
}
|
933 |
-
elseif (MAILCHIMP_DEV_MODE == false) {
|
934 |
-
//display the selected list...
|
935 |
-
?>
|
936 |
-
|
937 |
-
<p class="submit">
|
938 |
-
<form method="post" action="options-general.php?page=mailchimpSF_options">
|
939 |
-
<input type="hidden" name="mcsf_action" value="reset_list" />
|
940 |
-
<input type="submit" name="reset_list" value="<?php esc_attr_e('Reset List Options and Select again', 'mailchimp_i18n'); ?>" class="button" />
|
941 |
-
<?php wp_nonce_field('reset_mailchimp_list', '_mcsf_nonce_action'); ?>
|
942 |
-
</form>
|
943 |
-
</p>
|
944 |
-
<h3><?php esc_html_e('Subscribe Form Widget Settings for this List', 'mailchimp_i18n'); ?>:</h3>
|
945 |
-
<h4><?php esc_html_e('Selected MailChimp List', 'mailchimp_i18n'); ?>: <?php echo esc_html(get_option('mc_list_name')); ?></h4>
|
946 |
-
<?php
|
947 |
-
}
|
948 |
-
|
949 |
-
//Just get out if nothing else matters...
|
950 |
-
if (get_option('mc_list_id') == '' && MAILCHIMP_DEV_MODE == false) return;
|
951 |
-
|
952 |
-
|
953 |
-
// The main Settings form
|
954 |
-
?>
|
955 |
-
|
956 |
-
<div>
|
957 |
-
<form method="post" action="options-general.php?page=mailchimpSF_options">
|
958 |
-
<div style="width:900px;">
|
959 |
-
<input type="hidden" name="mcsf_action" value="change_form_settings">
|
960 |
-
<?php wp_nonce_field('update_general_form_settings', '_mcsf_nonce_action'); ?>
|
961 |
-
|
962 |
-
<?php if (MAILCHIMP_DEV_MODE == false) { ?>
|
963 |
-
<!--<input type="submit" value="<?php esc_attr_e('Update Subscribe Form Settings', 'mailchimp_i18n'); ?>" class="button" />-->
|
964 |
-
<table class="widefat mc-widefat mc-label-options">
|
965 |
-
<tr><th colspan="2">Content Options</th></tr>
|
966 |
-
<tr valign="top">
|
967 |
-
<th scope="row"><?php esc_html_e('Header', 'mailchimp_i18n'); ?></th>
|
968 |
-
<td>
|
969 |
-
<textarea name="mc_header_content" rows="2" cols="70"><?php echo esc_html(get_option('mc_header_content')); ?></textarea><br/>
|
970 |
-
<?php esc_html_e('You can fill this with your own Text, HTML markup (including image links), or Nothing!', 'mailchimp_i18n'); ?>
|
971 |
-
</td>
|
972 |
-
</tr>
|
973 |
-
|
974 |
-
<tr valign="top">
|
975 |
-
<th scope="row"><?php esc_html_e('Sub-header', 'mailchimp_i18n'); ?></th>
|
976 |
-
<td>
|
977 |
-
<textarea name="mc_subheader_content" rows="2" cols="70"><?php echo esc_html(get_option('mc_subheader_content')); ?></textarea><br/>
|
978 |
-
<?php esc_html_e('You can fill this with your own Text, HTML markup (including image links), or Nothing!', 'mailchimp_i18n'); ?>.<br/>
|
979 |
-
<?php esc_html_e('This will be displayed under the heading and above the form.', 'mailchimp_i18n'); ?>
|
980 |
-
</td>
|
981 |
-
</tr>
|
982 |
-
|
983 |
-
<tr valign="top" class="last-row">
|
984 |
-
<th scope="row"><?php esc_html_e('Submit Button', 'mailchimp_i18n'); ?></th>
|
985 |
-
<td>
|
986 |
-
<input type="text" name="mc_submit_text" size="70" value="<?php echo esc_attr(get_option('mc_submit_text')); ?>"/>
|
987 |
-
</td>
|
988 |
-
</tr>
|
989 |
-
</table>
|
990 |
-
|
991 |
-
<input type="submit" value="<?php esc_attr_e('Update Subscribe Form Settings', 'mailchimp_i18n'); ?>" class="button mc-submit" /><br/>
|
992 |
-
<?php } ?>
|
993 |
-
|
994 |
-
<table class="widefat mc-widefat mc-custom-styling">
|
995 |
-
<tr><th colspan="2">Custom Styling</th></tr>
|
996 |
-
<tr class="mc-turned-on"><th><label for="mc_custom_style"><?php esc_html_e('Enabled?', 'mailchimp_i18n'); ?></label></th><td><span class="mc-pre-input"></span><input type="checkbox" name="mc_custom_style" id="mc_custom_style"<?php checked(get_option('mc_custom_style'), 'on'); ?> /></td></tr>
|
997 |
-
|
998 |
-
<tr class="mc-internal-heading"><th colspan="2"><?php esc_html_e('Form Settings', 'mailchimp_i18n'); ?></th></tr>
|
999 |
-
<tr><th><?php esc_html_e('Border Width', 'mailchimp_i18n'); ?></th><td><span class="mc-pre-input"></span><input type="text" name="mc_form_border_width" size="3" maxlength="3" value="<?php echo esc_attr(get_option('mc_form_border_width')); ?>"/>
|
1000 |
-
<em>px •<?php esc_html_e('Set to 0 for no border, do not enter', 'mailchimp_i18n'); ?> <strong>px</strong>!</em>
|
1001 |
-
</td></tr>
|
1002 |
-
<tr><th><?php esc_html_e('Border Color', 'mailchimp_i18n'); ?></th><td><span class="mc-pre-input">#</span><input type="text" name="mc_form_border_color" size="7" maxlength="6" value="<?php echo esc_attr(get_option('mc_form_border_color')); ?>"/>
|
1003 |
-
<em><?php esc_html_e('Do not enter initial', 'mailchimp_i18n'); ?> <strong>#</strong></em>
|
1004 |
-
</td></tr>
|
1005 |
-
<tr><th><?php esc_html_e('Text Color', 'mailchimp_i18n'); ?></th><td><span class="mc-pre-input">#</span><input type="text" name="mc_form_text_color" size="7" maxlength="6" value="<?php echo esc_attr(get_option('mc_form_text_color')); ?>"/>
|
1006 |
-
<em><?php esc_html_e('Do not enter initial', 'mailchimp_i18n'); ?> <strong>#</strong></em>
|
1007 |
-
</td></tr>
|
1008 |
-
<tr class="last-row"><th><?php esc_html_e('Background Color', 'mailchimp_i18n'); ?></th><td><span class="mc-pre-input">#</span><input type="text" name="mc_form_background" size="7" maxlength="6" value="<?php echo esc_attr(get_option('mc_form_background')); ?>"/>
|
1009 |
-
<em><?php esc_html_e('Do not enter initial', 'mailchimp_i18n'); ?> <strong>#</strong></em>
|
1010 |
-
</td></tr>
|
1011 |
-
</table>
|
1012 |
-
|
1013 |
-
<input type="submit" value="<?php esc_attr_e('Update Subscribe Form Settings', 'mailchimp_i18n'); ?>" class="button mc-submit" /><br/>
|
1014 |
-
|
1015 |
-
<?php if (MAILCHIMP_DEV_MODE == false) { ?>
|
1016 |
-
<table class="widefat mc-widefat">
|
1017 |
-
<tr><th colspan="2">List Options</th></tr>
|
1018 |
-
<tr valign="top">
|
1019 |
-
<th scope="row"><?php esc_html_e('Monkey Rewards', 'mailchimp_i18n'); ?>?</th>
|
1020 |
-
<td><input name="mc_rewards" type="checkbox"<?php if (get_option('mc_rewards')=='on' || get_option('mc_rewards')=='' ) { echo ' checked="checked"'; } ?> id="mc_rewards" class="code" />
|
1021 |
-
<em><label for="mc_rewards"><?php esc_html_e('Turning this on will place a "powered by MailChimp" link in your form that will earn you credits with us. It is optional and can be turned on or off at any time.', 'mailchimp_i18n'); ?></label></em>
|
1022 |
-
</td>
|
1023 |
-
</tr>
|
1024 |
-
|
1025 |
-
<tr valign="top">
|
1026 |
-
<th scope="row"><?php esc_html_e('Use Javascript Support?', 'mailchimp_i18n'); ?></th>
|
1027 |
-
<td><input name="mc_use_javascript" type="checkbox" <?php checked(get_option('mc_use_javascript'), 'on'); ?> id="mc_use_javascript" class="code" />
|
1028 |
-
<em><label for="mc_use_javascript"><?php esc_html_e('Turning this on will use fancy javascript submission and should degrade gracefully for users not using javascript. It is optional and can be turned on or off at any time.', 'mailchimp_i18n'); ?></label></em>
|
1029 |
-
</td>
|
1030 |
-
</tr>
|
1031 |
-
|
1032 |
-
<tr valign="top">
|
1033 |
-
<th scope="row"><?php esc_html_e('Use Javascript Datepicker?', 'mailchimp_i18n'); ?></th>
|
1034 |
-
<td><input name="mc_use_datepicker" type="checkbox" <?php checked(get_option('mc_use_datepicker'), 'on'); ?> id="mc_use_datepicker" class="code" />
|
1035 |
-
<em><label for="mc_use_datepicker"><?php esc_html_e('Turning this on will use the jQuery UI Datepicker for dates.', 'mailchimp_i18n'); ?></label></em>
|
1036 |
-
</td>
|
1037 |
-
</tr>
|
1038 |
-
<tr valign="top" class="last-row">
|
1039 |
-
<th scope="row"><?php esc_html_e('Include Unsubscribe link?', 'mailchimp_i18n'); ?></th>
|
1040 |
-
<td><input name="mc_use_unsub_link" type="checkbox"<?php checked(get_option('mc_use_unsub_link'), 'on'); ?> id="mc_use_unsub_link" class="code" />
|
1041 |
-
<em><label for="mc_use_unsub_link"><?php esc_html_e('Turning this on will add a link to your host unsubscribe form', 'mailchimp_i18n'); ?></label></em>
|
1042 |
-
</td>
|
1043 |
-
</tr>
|
1044 |
-
</table>
|
1045 |
-
|
1046 |
-
<?php } ?>
|
1047 |
-
|
1048 |
-
</div>
|
1049 |
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
?>
|
1071 |
-
</th>
|
1072 |
-
</tr>
|
1073 |
-
<tr valign="top">
|
1074 |
-
<th><?php esc_html_e('Name', 'mailchimp_i18n');?></th>
|
1075 |
-
<th><?php esc_html_e('Tag', 'mailchimp_i18n');?></th>
|
1076 |
-
<th><?php esc_html_e('Required?', 'mailchimp_i18n');?></th>
|
1077 |
-
<th><?php esc_html_e('Include?', 'mailchimp_i18n');?></th>
|
1078 |
-
</tr>
|
1079 |
-
<?php
|
1080 |
-
foreach($mv as $var){
|
1081 |
-
?>
|
1082 |
-
<tr valign="top">
|
1083 |
-
<td><?php echo esc_html($var['name']); ?></td>
|
1084 |
-
<td><?php echo esc_html($var['tag']); ?></td>
|
1085 |
-
<td><?php echo esc_html(($var['req'] == 1) ? 'Y' : 'N'); ?></td>
|
1086 |
-
<td>
|
1087 |
-
<?php
|
1088 |
-
if (!$var['req']){
|
1089 |
-
$opt = 'mc_mv_'.$var['tag'];
|
1090 |
-
?>
|
1091 |
-
<input name="<?php echo esc_attr($opt); ?>" type="checkbox" id="<?php echo esc_attr($opt); ?>" class="code"<?php checked(get_option($opt), 'on'); ?> />
|
1092 |
-
<?php
|
1093 |
-
} else {
|
1094 |
-
?>
|
1095 |
-
—
|
1096 |
-
<?php
|
1097 |
-
}
|
1098 |
-
?>
|
1099 |
-
</td>
|
1100 |
-
</tr>
|
1101 |
-
<?php
|
1102 |
-
}
|
1103 |
-
?>
|
1104 |
-
</table>
|
1105 |
-
<input type="submit" value="<?php esc_attr_e('Update Subscribe Form Settings', 'mailchimp_i18n'); ?>" class="button mc-submit" /><br/>
|
1106 |
-
</div>
|
1107 |
-
<?php
|
1108 |
}
|
1109 |
-
?>
|
1110 |
-
|
1111 |
|
1112 |
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
foreach ($igs as $ig) {
|
1121 |
-
if ($continue) {
|
1122 |
-
if (!is_array($ig) || empty($ig) || $ig == 'N' ) {
|
1123 |
-
?>
|
1124 |
-
<em><?php esc_html_e('No Interest Groups Setup for this List', 'mailchimp_i18n'); ?></em>
|
1125 |
-
<?php
|
1126 |
-
$continue = false;
|
1127 |
-
}
|
1128 |
-
else {
|
1129 |
-
?>
|
1130 |
-
<table class='mc-widefat mc-blue' width="450px" cellspacing="0">
|
1131 |
-
<tr valign="top">
|
1132 |
-
<th colspan="2"><?php echo esc_html($ig['name']); ?></th>
|
1133 |
-
</tr>
|
1134 |
-
<tr valign="top">
|
1135 |
-
<th>
|
1136 |
-
<label for="<?php echo esc_attr('mc_show_interest_groups_'.$ig['id']); ?>"><?php esc_html_e('Show?', 'mailchimp_i18n'); ?></label>
|
1137 |
-
</th>
|
1138 |
-
<th>
|
1139 |
-
<input name="<?php echo esc_attr('mc_show_interest_groups_'.$ig['id']); ?>" id="<?php echo esc_attr('mc_show_interest_groups_'.$ig['id']); ?>" type="checkbox" class="code"<?php checked('on', get_option('mc_show_interest_groups_'.$ig['id'])); ?> />
|
1140 |
-
</th>
|
1141 |
-
</tr>
|
1142 |
-
<tr valign="top">
|
1143 |
-
<th><?php esc_html_e('Input Type', 'mailchimp_i18n'); ?></th>
|
1144 |
-
<td><?php echo esc_html($ig['form_field']); ?></td>
|
1145 |
-
</tr>
|
1146 |
-
<tr valign="top" class="last-row">
|
1147 |
-
<th><?php esc_html_e('Options', 'mailchimp_i18n'); ?></th>
|
1148 |
-
<td>
|
1149 |
-
<ul>
|
1150 |
-
<?php
|
1151 |
-
foreach($ig['groups'] as $interest){
|
1152 |
-
?>
|
1153 |
-
<li><?php echo esc_html($interest['name']); ?></li>
|
1154 |
-
<?php
|
1155 |
-
}
|
1156 |
-
?>
|
1157 |
-
</ul>
|
1158 |
-
</td>
|
1159 |
-
</tr>
|
1160 |
-
</table>
|
1161 |
-
<?php
|
1162 |
-
}
|
1163 |
-
}
|
1164 |
-
}
|
1165 |
-
}
|
1166 |
-
} // end dev mode check
|
1167 |
-
?>
|
1168 |
-
<div style="width: 900px; margin-top: 35px;">
|
1169 |
-
<table class="widefat mc-widefat mc-yellow">
|
1170 |
-
<tr><th colspan="2">CSS Cheat Sheet</th></tr>
|
1171 |
-
<tr valign="top">
|
1172 |
-
<th scope="row">.widget_mailchimpsf_widget </th>
|
1173 |
-
<td>This targets the entire widget container.</td>
|
1174 |
-
</tr>
|
1175 |
-
<tr valign="top">
|
1176 |
-
<th scope="row">.widget-title</th>
|
1177 |
-
<td>This styles the title of your MailChimp widget. <i>Modifying this class will affect your other widget titles.</i></td>
|
1178 |
-
</tr>
|
1179 |
-
<tr valign="top">
|
1180 |
-
<th scope="row">#mc_signup</th>
|
1181 |
-
<td>This targets the entirity of the widget beneath the widget title.</td>
|
1182 |
-
</tr>
|
1183 |
-
<tr valign="top">
|
1184 |
-
<th scope="row">#mc_subheader</th>
|
1185 |
-
<td>This styles the subheader text.</td>
|
1186 |
-
</tr>
|
1187 |
-
<tr valign="top">
|
1188 |
-
<th scope="row">.mc_form_inside</th>
|
1189 |
-
<td>The guts and main container for the all of the form elements (the entirety of the widget minus the header and the sub header).</td>
|
1190 |
-
</tr>
|
1191 |
-
<tr valign="top">
|
1192 |
-
<th scope="row">.mc_header</th>
|
1193 |
-
<td>This targets the label above the input fields.</td>
|
1194 |
-
</tr>
|
1195 |
-
<tr valign="top">
|
1196 |
-
<th scope="row">.mc_input</th>
|
1197 |
-
<td>This attaches to the input fields.</td>
|
1198 |
-
</tr>
|
1199 |
-
<tr valign="top">
|
1200 |
-
<th scope="row">.mc_header_address</th>
|
1201 |
-
<td>This is the label above an address group.</td>
|
1202 |
-
</tr>
|
1203 |
-
<tr valign="top">
|
1204 |
-
<th scope="row">.mc_radio_label</th>
|
1205 |
-
<td>These are the labels associated with radio buttons.</td>
|
1206 |
-
</tr>
|
1207 |
-
<tr valign="top">
|
1208 |
-
<th scope="row">#mc-indicates-required</th>
|
1209 |
-
<td>This targets the “Indicates Required Field” text.</td>
|
1210 |
-
</tr>
|
1211 |
-
<tr valign="top">
|
1212 |
-
<th scope="row">#mc_signup_submit</th>
|
1213 |
-
<td>Use this to style the submit button.</td>
|
1214 |
-
</tr>
|
1215 |
-
</table>
|
1216 |
-
</div>
|
1217 |
-
|
1218 |
-
</form>
|
1219 |
-
<?php
|
1220 |
}//mailchimpSF_setup_page()
|
1221 |
|
1222 |
|
1223 |
function mailchimpSF_register_widgets() {
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
}
|
1228 |
add_action('widgets_init', 'mailchimpSF_register_widgets');
|
1229 |
|
1230 |
function mailchimpSF_shortcode($atts){
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
}
|
1235 |
add_shortcode('mailchimpsf_form', 'mailchimpSF_shortcode');
|
1236 |
|
@@ -1243,228 +697,305 @@ add_shortcode('mailchimpsf_form', 'mailchimpSF_shortcode');
|
|
1243 |
* @return bool
|
1244 |
*/
|
1245 |
function mailchimpSF_signup_submit() {
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
$groups = '';
|
1313 |
-
if (get_option('mc_show_interest_groups_'.$ig['id']) == 'on') {
|
1314 |
-
$groupings = array();
|
1315 |
-
switch ($ig['form_field']) {
|
1316 |
-
case 'select':
|
1317 |
-
case 'dropdown':
|
1318 |
-
case 'radio':
|
1319 |
-
if (isset($_POST['group'][$ig['id']])) {
|
1320 |
-
$groupings = array(
|
1321 |
-
'id' => $ig['id'],
|
1322 |
-
'groups' => str_replace(',', '\,', stripslashes($_POST['group'][$ig['id']])),
|
1323 |
-
);
|
1324 |
-
}
|
1325 |
-
break;
|
1326 |
-
case 'checkboxes':
|
1327 |
-
case 'checkbox':
|
1328 |
-
if (isset($_POST['group'][$ig['id']])) {
|
1329 |
-
foreach ($_POST['group'][$ig['id']] as $i => $value) {
|
1330 |
-
// Escape
|
1331 |
-
$groups .= str_replace(',', '\,', stripslashes($value)).',';
|
1332 |
-
}
|
1333 |
-
$groupings = array(
|
1334 |
-
'id' => $ig['id'],
|
1335 |
-
'groups' => $groups,
|
1336 |
-
);
|
1337 |
-
}
|
1338 |
-
break;
|
1339 |
-
default:
|
1340 |
-
// Nothing
|
1341 |
-
break;
|
1342 |
-
}
|
1343 |
-
if (!isset($merge['GROUPINGS']) || !is_array($merge['GROUPINGS'])) {
|
1344 |
-
$merge['GROUPINGS'] = array();
|
1345 |
-
}
|
1346 |
-
if (!empty($groupings)) {
|
1347 |
-
$merge['GROUPINGS'][] = $groupings;
|
1348 |
-
}
|
1349 |
-
}
|
1350 |
-
}
|
1351 |
-
|
1352 |
-
// If we're good
|
1353 |
-
if ($success) {
|
1354 |
-
// Clear out empty merge vars
|
1355 |
-
foreach ($merge as $k => $v) {
|
1356 |
-
if (is_array($v) && empty($v)) {
|
1357 |
-
unset($merge[$k]);
|
1358 |
-
}
|
1359 |
-
else if (!is_array($v) && trim($v) === '') {
|
1360 |
-
unset($merge[$k]);
|
1361 |
-
}
|
1362 |
-
}
|
1363 |
-
|
1364 |
-
// If we have an empty $merge, then assign empty string.
|
1365 |
-
if (count($merge) == 0 || $merge == '') {
|
1366 |
-
$merge = '';
|
1367 |
-
}
|
1368 |
-
|
1369 |
-
if (isset($_POST['email_type']) && in_array($_POST['email_type'], array('text', 'html', 'mobile'))) {
|
1370 |
-
$email_type = $_POST['email_type'];
|
1371 |
-
}
|
1372 |
-
else {
|
1373 |
-
$email_type = 'html';
|
1374 |
-
}
|
1375 |
-
|
1376 |
-
// Custom validation based on type
|
1377 |
-
if (is_array($merge) && !empty($merge)) {
|
1378 |
-
foreach ($merge as $merge_key => $merge_value) {
|
1379 |
-
if ($merge_key !== 'GROUPINGS') {
|
1380 |
-
switch ($mv_tag_keys[$merge_key]['field_type']) {
|
1381 |
-
case 'phone':
|
1382 |
-
if ($mv_tag_keys[$merge_key]['phoneformat'] == 'US') {
|
1383 |
-
$phone = $merge_value;
|
1384 |
-
if (!empty($phone)) {
|
1385 |
-
if (!preg_match('/[0-9]{0,3}-[0-9]{0,3}-[0-9]{0,4}/', $phone)) {
|
1386 |
-
$errs[] = sprintf(__("%s must consist of only numbers", 'mailchimp_i18n'), esc_html($mv_tag_keys[$merge_key]['name']));
|
1387 |
-
$success = false;
|
1388 |
-
}
|
1389 |
-
}
|
1390 |
-
}
|
1391 |
-
break;
|
1392 |
-
|
1393 |
-
default:
|
1394 |
-
break;
|
1395 |
-
}
|
1396 |
-
}
|
1397 |
-
}
|
1398 |
-
}
|
1399 |
-
if ($success) {
|
1400 |
-
$api = mailchimpSF_get_api();
|
1401 |
-
if (!$api) { return; }
|
1402 |
-
|
1403 |
-
$retval = $api->listSubscribe( $listId, $email, $merge, $email_type);
|
1404 |
-
if (!$retval) {
|
1405 |
-
switch($api->errorCode) {
|
1406 |
-
case '105' :
|
1407 |
-
$errs[] = __("Please try again later", 'mailchimp_i18n').'.';
|
1408 |
-
break;
|
1409 |
-
case '214' :
|
1410 |
-
$msg = __("That email address is already subscribed to the list", 'mailchimp_i18n') . '.';
|
1411 |
-
|
1412 |
-
$account = $api->getAccountDetails(array("modules", "orders", "rewards-credits", "rewards-inspections", "rewards-referrals", "rewards-applied"));
|
1413 |
-
if (!$api->errorCode) {
|
1414 |
-
$dc = get_option('mc_sopresto_dc');
|
1415 |
-
$uid = $account['user_id'];
|
1416 |
-
$username = preg_replace('/\s+/', '-', $account['username']);
|
1417 |
-
$eid = base64_encode($email);
|
1418 |
-
$msg .= ' ' . sprintf(__('<a href="%s">Click here to update your profile.</a>', 'mailchimp_i18n'), "http://$dc.list-manage.com/subscribe/send-email?u=$uid&id=$listId&e=$eid");
|
1419 |
-
}
|
1420 |
-
|
1421 |
-
$errs[] = $msg;
|
1422 |
-
$html_errs[] = count($errs)-1;
|
1423 |
-
break;
|
1424 |
-
case '250' :
|
1425 |
-
list($field, $rest) = explode(' ', $api->errorMessage, 2);
|
1426 |
-
$errs[] = sprintf(__("You must fill in %s.", 'mailchimp_i18n'), esc_html($mv_tag_keys[$field]['name']));
|
1427 |
-
break;
|
1428 |
-
case '254' :
|
1429 |
-
list($i1, $i2, $i3, $field, $rest) = explode(' ',$api->errorMessage,5);
|
1430 |
-
$errs[] = sprintf(__("%s has invalid content.", 'mailchimp_i18n'), esc_html($mv_tag_keys[$field]['name']));
|
1431 |
-
break;
|
1432 |
-
case '270' :
|
1433 |
-
$errs[] = __("An invalid Interest Group was selected", 'mailchimp_i18n').'.';
|
1434 |
-
break;
|
1435 |
-
case '502' :
|
1436 |
-
$errs[] = __("That email address is invalid", 'mailchimp_i18n').'.';
|
1437 |
-
break;
|
1438 |
-
default:
|
1439 |
-
$errs[] = $api->errorCode.":".$api->errorMessage;
|
1440 |
-
break;
|
1441 |
-
}
|
1442 |
-
$success = false;
|
1443 |
-
}
|
1444 |
-
}
|
1445 |
-
}
|
1446 |
-
|
1447 |
-
// If we have errors, then show them
|
1448 |
-
if (count($errs) > 0) {
|
1449 |
-
$msg = '<span class="mc_error_msg">';
|
1450 |
-
foreach($errs as $error_index => $error){
|
1451 |
-
if (!in_array($error_index, $html_errs)) {
|
1452 |
-
$error = esc_html($error);
|
1453 |
-
}
|
1454 |
-
$msg .= '» '.$error.'<br />';
|
1455 |
-
}
|
1456 |
-
$msg .= '</span>';
|
1457 |
-
}
|
1458 |
-
else {
|
1459 |
-
$msg = "<strong class='mc_success_msg'>".esc_html(__("Success, you've been signed up! Please look for our confirmation email!", 'mailchimp_i18n'))."</strong>";
|
1460 |
-
}
|
1461 |
-
|
1462 |
-
// Set our global message
|
1463 |
-
mailchimpSF_global_msg($msg);
|
1464 |
-
|
1465 |
-
return $success;
|
1466 |
}
|
1467 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1468 |
|
1469 |
|
1470 |
/**********************
|
@@ -1476,50 +1007,50 @@ function mailchimpSF_signup_submit() {
|
|
1476 |
* This function must be ran _very early_ in the load process, as it sets up important constants for the rest of the plugin
|
1477 |
*/
|
1478 |
function mailchimpSF_where_am_i() {
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
}
|
1524 |
|
1525 |
|
@@ -1537,33 +1068,33 @@ function mailchimpSF_where_am_i() {
|
|
1537 |
* @return bool Whether the nonce check passed or failed.
|
1538 |
*/
|
1539 |
function mailchimpSF_verify_nonce($nonce, $action = -1) {
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
|
1563 |
-
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
}
|
1568 |
|
1569 |
|
@@ -1577,16 +1108,15 @@ function mailchimpSF_verify_nonce($nonce, $action = -1) {
|
|
1577 |
* @return string The token.
|
1578 |
*/
|
1579 |
function mailchimpSF_create_nonce($action = -1) {
|
1580 |
-
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
}
|
1592 |
-
|
3 |
Plugin Name: MailChimp
|
4 |
Plugin URI: http://www.mailchimp.com/plugins/mailchimp-wordpress-plugin/
|
5 |
Description: The MailChimp plugin allows you to quickly and easily add a signup form for your MailChimp list.
|
6 |
+
Version: 1.5
|
7 |
+
Author: MailChimp
|
8 |
+
Author URI: https://mailchimp.com/
|
9 |
*/
|
10 |
/* Copyright 2008-2012 MailChimp.com (email : api@mailchimp.com)
|
11 |
|
12 |
+
This program is free software; you can redistribute it and/or modify
|
13 |
+
it under the terms of the GNU General Public License as published by
|
14 |
+
the Free Software Foundation; either version 2 of the License, or
|
15 |
+
(at your option) any later version.
|
16 |
|
17 |
+
This program is distributed in the hope that it will be useful,
|
18 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
20 |
+
GNU General Public License for more details.
|
21 |
|
22 |
+
You should have received a copy of the GNU General Public License
|
23 |
+
along with this program; if not, write to the Free Software
|
24 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
25 |
*/
|
26 |
|
27 |
// Version constant for easy CSS refreshes
|
28 |
+
define('MCSF_VER', '1.5');
|
29 |
|
30 |
// What's our permission (capability) threshold
|
31 |
define('MCSF_CAP_THRESHOLD', 'manage_options');
|
32 |
|
|
|
|
|
|
|
|
|
|
|
33 |
// Define our location constants, both MCSF_DIR and MCSF_URL
|
34 |
mailchimpSF_where_am_i();
|
35 |
|
36 |
// Get our MailChimp API class in scope
|
37 |
+
if (!class_exists('MailChimp_API')) {
|
38 |
+
$path = plugin_dir_path(__FILE__);
|
39 |
+
require_once($path . 'lib/mailchimp/mailchimp.php');
|
40 |
}
|
41 |
|
42 |
// includes the widget code so it can be easily called either normally or via ajax
|
54 |
* @return void
|
55 |
*/
|
56 |
function mailchimpSF_plugin_init() {
|
57 |
+
// Internationalize the plugin
|
58 |
+
$textdomain = 'mailchimp_i18n';
|
59 |
+
$locale = apply_filters( 'plugin_locale', get_locale(), $textdomain);
|
60 |
+
load_textdomain('mailchimp_i18n', MCSF_LANG_DIR.$textdomain.'-'.$locale.'.mo');
|
61 |
+
|
62 |
+
// Check for mc_api_key or sopresto key and continue if neither
|
63 |
+
mailchimpSF_migrate_sopresto();
|
64 |
|
65 |
+
// Bring in our appropriate JS and CSS resources
|
66 |
+
mailchimpSF_load_resources();
|
67 |
}
|
68 |
add_action( 'init', 'mailchimpSF_plugin_init' );
|
69 |
|
75 |
* @return array - Links
|
76 |
*/
|
77 |
function mailchimpSD_plugin_action_links($links) {
|
78 |
+
$settings_page = add_query_arg(array('page' => 'mailchimpSF_options'), admin_url('options-general.php'));
|
79 |
+
$settings_link = '<a href="'.esc_url($settings_page).'">'.__('Settings', 'mailchimp_i18n' ).'</a>';
|
80 |
+
array_unshift($links, $settings_link);
|
81 |
+
return $links;
|
82 |
}
|
83 |
add_filter('plugin_action_links_'.plugin_basename(__FILE__), 'mailchimpSD_plugin_action_links', 10, 1);
|
84 |
|
89 |
* @return void
|
90 |
*/
|
91 |
function mailchimpSF_load_resources() {
|
92 |
+
// JS
|
93 |
+
if (get_option('mc_use_javascript') == 'on') {
|
94 |
+
if (!is_admin()) {
|
95 |
+
wp_enqueue_script('jquery_scrollto', MCSF_URL.'js/scrollTo.js', array('jquery'), MCSF_VER);
|
96 |
+
wp_enqueue_script('mailchimpSF_main_js', MCSF_URL.'js/mailchimp.js', array('jquery', 'jquery-form'), MCSF_VER);
|
97 |
+
// some javascript to get ajax version submitting to the proper location
|
98 |
+
global $wp_scripts;
|
99 |
+
$wp_scripts->localize('mailchimpSF_main_js', 'mailchimpSF', array(
|
100 |
+
'ajax_url' => trailingslashit(home_url()),
|
101 |
+
));
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
if (get_option('mc_use_datepicker') == 'on' && !is_admin()) {
|
106 |
+
// Datepicker theme
|
107 |
+
wp_enqueue_style('flick', MCSF_URL.'/css/flick/flick.css');
|
108 |
+
// Datepicker JS
|
109 |
+
wp_enqueue_script('datepicker', MCSF_URL.'/js/datepicker.js', array('jquery','jquery-ui-core'));
|
110 |
+
}
|
111 |
+
|
112 |
+
if(get_option('mc_nuke_all_styles') !== true) {
|
113 |
+
wp_enqueue_style('mailchimpSF_main_css', home_url('?mcsf_action=main_css&ver='.MCSF_VER, 'relative'));
|
114 |
+
wp_enqueue_style('mailchimpSF_ie_css', MCSF_URL.'css/ie.css');
|
115 |
+
global $wp_styles;
|
116 |
+
$wp_styles->add_data( 'mailchimpSF_ie_css', 'conditional', 'IE' );
|
117 |
+
}
|
118 |
}
|
119 |
|
120 |
|
124 |
* @return void
|
125 |
*/
|
126 |
function mc_admin_page_load_resources() {
|
127 |
+
wp_enqueue_style('mailchimpSF_admin_css', MCSF_URL.'css/admin.css');
|
128 |
+
wp_enqueue_script('mailchimpSF_admin_js', MCSF_URL.'js/admin.js');
|
129 |
}
|
130 |
add_action('load-settings_page_mailchimpSF_options', 'mc_admin_page_load_resources');
|
131 |
|
134 |
* Loads jQuery Datepicker for the date-pick class
|
135 |
**/
|
136 |
function mc_datepicker_load() {
|
137 |
+
require_once(MCSF_DIR . '/views/datepicker.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
}
|
139 |
if (get_option('mc_use_datepicker') == 'on' && !is_admin()) {
|
140 |
+
add_action('wp_head', 'mc_datepicker_load');
|
141 |
}
|
142 |
|
143 |
/**
|
145 |
* typically, JS or CSS
|
146 |
**/
|
147 |
function mailchimpSF_early_request_handler() {
|
148 |
+
if (isset($_GET['mcsf_action'])) {
|
149 |
+
switch ($_GET['mcsf_action']) {
|
150 |
+
case 'main_css':
|
151 |
+
header("Content-type: text/css");
|
152 |
+
mailchimpSF_main_css();
|
153 |
+
exit;
|
154 |
+
}
|
155 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
}
|
157 |
add_action('init', 'mailchimpSF_early_request_handler', 0);
|
158 |
|
162 |
* a static file.
|
163 |
*/
|
164 |
function mailchimpSF_main_css() {
|
165 |
+
require_once(MCSF_DIR . '/views/css/frontend.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
}
|
167 |
|
168 |
|
172 |
* @return void
|
173 |
*/
|
174 |
function mailchimpSF_add_pages(){
|
175 |
+
// Add settings page for users who can edit plugins
|
176 |
+
add_options_page( __( 'MailChimp Setup', 'mailchimp_i18n' ), __( 'MailChimp Setup', 'mailchimp_i18n' ), MCSF_CAP_THRESHOLD, 'mailchimpSF_options', 'mailchimpSF_setup_page');
|
177 |
}
|
178 |
add_action('admin_menu', 'mailchimpSF_add_pages');
|
179 |
|
180 |
function mailchimpSF_request_handler() {
|
181 |
+
if (isset($_POST['mcsf_action'])) {
|
182 |
+
switch ($_POST['mcsf_action']) {
|
183 |
+
case 'login':
|
184 |
+
$key = trim($_POST['mailchimpSF_api_key']);
|
185 |
+
|
186 |
+
try {
|
187 |
+
$api = new MailChimp_API($key);
|
188 |
+
} catch (Exception $e) {
|
189 |
+
$msg = "<strong class='mc_error_msg'>" . $e->getMessage() . "</strong>";
|
190 |
+
mailchimpSF_global_msg($msg);
|
191 |
+
break;
|
192 |
+
}
|
193 |
+
|
194 |
+
$key = mailchimpSF_verify_key($api);
|
195 |
+
if(is_wp_error($key)) {
|
196 |
+
$msg = "<strong class='mc_error_msg'>" . $key->get_error_message() . "</strong>";
|
197 |
+
mailchimpSF_global_msg($msg);
|
198 |
+
}
|
199 |
+
|
200 |
+
break;
|
201 |
+
case 'logout':
|
202 |
+
// Check capability & Verify nonce
|
203 |
+
if (!current_user_can(MCSF_CAP_THRESHOLD) || !wp_verify_nonce($_POST['_mcsf_nonce_action'], 'mc_logout')) {
|
204 |
+
wp_die('Cheatin’ huh?');
|
205 |
+
}
|
206 |
+
|
207 |
+
// erase auth information
|
208 |
+
$options = array('mc_api_key', 'mc_sopresto_user', 'mc_sopresto_public_key', 'mc_sopresto_secret_key');
|
209 |
+
mailchimpSF_delete_options($options);
|
210 |
+
break;
|
211 |
+
case 'change_form_settings':
|
212 |
+
if (!current_user_can(MCSF_CAP_THRESHOLD) || !wp_verify_nonce($_POST['_mcsf_nonce_action'], 'update_general_form_settings')) {
|
213 |
+
wp_die('Cheatin’ huh?');
|
214 |
+
}
|
215 |
+
|
216 |
+
// Update the form settings
|
217 |
+
mailchimpSF_save_general_form_settings();
|
218 |
+
break;
|
219 |
+
case 'mc_submit_signup_form':
|
220 |
+
// Validate nonce
|
221 |
+
if (!wp_verify_nonce($_POST['_mc_submit_signup_form_nonce'], 'mc_submit_signup_form')) {
|
222 |
+
wp_die('Cheatin’ huh?');
|
223 |
+
}
|
224 |
+
|
225 |
+
// Attempt the signup
|
226 |
+
mailchimpSF_signup_submit();
|
227 |
+
|
228 |
+
// Do a different action for html vs. js
|
229 |
+
switch ($_POST['mc_submit_type']) {
|
230 |
+
case 'html':
|
231 |
+
/* Allow to fall through. The widget will pick up the
|
232 |
+
* global message left over from the signup_submit function */
|
233 |
+
break;
|
234 |
+
case 'js':
|
235 |
+
if (!headers_sent()){ //just in case...
|
236 |
+
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT', true, 200);
|
237 |
+
}
|
238 |
+
echo mailchimpSF_global_msg(); // Don't esc_html this, b/c we've already escaped it
|
239 |
+
exit;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
}
|
243 |
}
|
244 |
add_action('init', 'mailchimpSF_request_handler');
|
245 |
|
246 |
+
function mailchimpSF_migrate_sopresto() {
|
247 |
+
$sopresto = get_option('mc_sopresto_secret_key');
|
248 |
+
if(!$sopresto) {
|
249 |
+
return;
|
250 |
+
}
|
251 |
+
|
252 |
+
// Talk to Sopresto, make exchange, delete old sopresto things.
|
253 |
+
$body = array(
|
254 |
+
'public_key' => get_option('mc_sopresto_public_key'),
|
255 |
+
'hash' => sha1(get_option('mc_sopresto_public_key').get_option('mc_sopresto_secret_key'))
|
256 |
+
);
|
257 |
+
|
258 |
+
$url = 'https://sopresto.socialize-this.com/mailchimp/exchange';
|
259 |
+
$args = array(
|
260 |
+
'method' => 'POST',
|
261 |
+
'timeout' => 500,
|
262 |
+
'redirection' => 5,
|
263 |
+
'httpversion' => '1.0',
|
264 |
+
'user-agent' => 'MailChimp WordPress Plugin/' . get_bloginfo( 'url' ),
|
265 |
+
'body' => $body
|
266 |
+
);
|
267 |
+
|
268 |
+
//post to sopresto
|
269 |
+
$key = wp_remote_post($url, $args);
|
270 |
+
if(!is_wp_error($key) && $key['response']['code'] == 200) {
|
271 |
+
$key = json_decode($key['body']);
|
272 |
+
try {
|
273 |
+
$api = new MailChimp_API($key->response);
|
274 |
+
} catch (Exception $e) {
|
275 |
+
$msg = "<strong class='mc_error_msg'>" . $e->getMessage() . "</strong>";
|
276 |
+
mailchimpSF_global_msg($msg);
|
277 |
+
return;
|
278 |
+
}
|
279 |
+
|
280 |
+
$verify = mailchimpSF_verify_key($api);
|
281 |
+
|
282 |
+
//something went wrong with the key that we had
|
283 |
+
if(is_wp_error($verify)) {
|
284 |
+
return;
|
285 |
+
}
|
286 |
+
|
287 |
+
delete_option('mc_sopresto_public_key');
|
288 |
+
delete_option('mc_sopresto_secret_key');
|
289 |
+
delete_option('mc_sopresto_user');
|
290 |
+
|
291 |
+
return;
|
292 |
+
}
|
293 |
+
|
294 |
+
// Nothing to do here.
|
295 |
+
return;
|
296 |
+
}
|
297 |
|
298 |
function mailchimpSF_auth_nonce_key($salt = null) {
|
299 |
+
if (is_null($salt)) {
|
300 |
+
$salt = mailchimpSF_auth_nonce_salt();
|
301 |
+
}
|
302 |
+
return 'social_authentication' . md5( AUTH_KEY . $salt );
|
303 |
}
|
304 |
|
305 |
function mailchimpSF_auth_nonce_salt() {
|
306 |
+
return md5(microtime().$_SERVER['SERVER_ADDR']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
}
|
308 |
|
309 |
/**
|
310 |
+
* Creates new MailChimp API v3 object
|
311 |
*
|
312 |
+
* @return MailChimp_API | false
|
313 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
314 |
|
|
|
|
|
|
|
|
|
|
|
315 |
function mailchimpSF_get_api($force = false) {
|
316 |
+
$key = get_option('mc_api_key');
|
317 |
+
if($key) {
|
318 |
+
return new MailChimp_API($key);
|
319 |
+
}
|
|
|
|
|
320 |
|
321 |
+
return false;
|
322 |
}
|
323 |
|
324 |
+
|
325 |
+
|
326 |
/**
|
327 |
* Checks to see if we're storing a password, if so, we need
|
328 |
* to upgrade to the API key
|
330 |
* @return bool
|
331 |
**/
|
332 |
function mailchimpSF_needs_upgrade() {
|
333 |
+
$igs = get_option('mc_interest_groups');
|
334 |
+
|
335 |
+
if ($igs !== false // we have an option
|
336 |
+
&& (
|
337 |
+
empty($igs) || // it can be an empty array (no interest groups)
|
338 |
+
(is_array($igs) && isset($igs[0]['id'])) // OR it should be a populated array that's well-formed
|
339 |
+
)) {
|
340 |
+
return false; // no need to upgrade
|
341 |
+
}
|
342 |
+
else {
|
343 |
+
return true; // yeah, let's do it
|
344 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
}
|
346 |
|
347 |
/**
|
348 |
* Deletes all mailchimp options
|
349 |
**/
|
350 |
function mailchimpSF_delete_setup() {
|
351 |
+
$options = array('mc_user_id', 'mc_sopresto_user', 'mc_sopresto_public_key', 'mc_sopresto_secret_key', 'mc_rewards', 'mc_use_javascript', 'mc_use_datepicker', 'mc_use_unsub_link', 'mc_list_id', 'mc_list_name', 'mc_interest_groups', 'mc_merge_vars');
|
352 |
+
|
353 |
+
$igs = get_option('mc_interest_groups');
|
354 |
+
if (is_array($igs)) {
|
355 |
+
foreach ($igs as $ig) {
|
356 |
+
$opt = 'mc_show_interest_groups_'.$ig['id'];
|
357 |
+
$options[] = $opt;
|
358 |
+
}
|
359 |
+
}
|
360 |
+
|
361 |
+
$mv = get_option('mc_merge_vars');
|
362 |
+
if (is_array($mv)){
|
363 |
+
foreach($mv as $var){
|
364 |
+
$opt = 'mc_mv_'.$var['tag'];
|
365 |
+
$options[] = $opt;
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
mailchimpSF_delete_options($options);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
}
|
371 |
|
372 |
/**
|
375 |
* @return string/bool depending on get/set
|
376 |
**/
|
377 |
function mailchimpSF_global_msg($msg = null) {
|
378 |
+
global $mcsf_msgs;
|
379 |
|
380 |
+
// Make sure we're formed properly
|
381 |
+
if (!is_array($mcsf_msgs)) {
|
382 |
+
$mcsf_msgs = array();
|
383 |
+
}
|
384 |
|
385 |
+
// See if we're getting
|
386 |
+
if (is_null($msg)) {
|
387 |
+
return implode('', $mcsf_msgs);
|
388 |
+
}
|
389 |
|
390 |
+
// Must be setting
|
391 |
+
$mcsf_msgs[] = $msg;
|
392 |
+
return true;
|
393 |
}
|
394 |
|
395 |
/**
|
396 |
* Sets the default options for the option form
|
397 |
**/
|
398 |
function mailchimpSF_set_form_defaults($list_name = '') {
|
399 |
+
update_option('mc_header_content',__( 'Sign up for', 'mailchimp_i18n' ).' '.$list_name);
|
400 |
+
update_option('mc_submit_text',__( 'Subscribe', 'mailchimp_i18n' ));
|
401 |
+
|
402 |
+
update_option('mc_use_datepicker', 'on');
|
403 |
+
update_option('mc_custom_style','off');
|
404 |
+
update_option('mc_use_javascript','on');
|
405 |
+
update_option('mc_double_optin', true);
|
406 |
+
update_option('mc_use_unsub_link','off');
|
407 |
+
update_option('mc_header_border_width','1');
|
408 |
+
update_option('mc_header_border_color','E3E3E3');
|
409 |
+
update_option('mc_header_background','FFFFFF');
|
410 |
+
update_option('mc_header_text_color','CC6600');
|
411 |
+
|
412 |
+
update_option('mc_form_border_width','1');
|
413 |
+
update_option('mc_form_border_color','E0E0E0');
|
414 |
+
update_option('mc_form_background','FFFFFF');
|
415 |
+
update_option('mc_form_text_color','3F3F3f');
|
416 |
}
|
417 |
|
418 |
/**
|
422 |
**/
|
423 |
function mailchimpSF_save_general_form_settings() {
|
424 |
|
425 |
+
// IF NOT DEV MODE
|
426 |
+
if (isset($_POST['mc_rewards'])){
|
427 |
+
update_option('mc_rewards', 'on');
|
428 |
+
$msg = '<p class="success_msg">'.__('Monkey Rewards turned On!', 'mailchimp_i18n').'</p>';
|
429 |
+
mailchimpSF_global_msg($msg);
|
430 |
+
} else if (get_option('mc_rewards')!='off') {
|
431 |
+
update_option('mc_rewards', 'off');
|
432 |
+
$msg = '<p class="success_msg">'.__('Monkey Rewards turned Off!', 'mailchimp_i18n').'</p>';
|
433 |
+
mailchimpSF_global_msg($msg);
|
434 |
+
}
|
435 |
+
if (isset($_POST['mc_use_javascript'])){
|
436 |
+
update_option('mc_use_javascript', 'on');
|
437 |
+
$msg = '<p class="success_msg">'.__('Fancy Javascript submission turned On!', 'mailchimp_i18n').'</p>';
|
438 |
+
mailchimpSF_global_msg($msg);
|
439 |
+
} else if (get_option('mc_use_javascript')!='off') {
|
440 |
+
update_option('mc_use_javascript', 'off');
|
441 |
+
$msg = '<p class="success_msg">'.__('Fancy Javascript submission turned Off!', 'mailchimp_i18n').'</p>';
|
442 |
+
mailchimpSF_global_msg($msg);
|
443 |
+
}
|
444 |
+
|
445 |
+
if (isset($_POST['mc_use_datepicker'])){
|
446 |
+
update_option('mc_use_datepicker', 'on');
|
447 |
+
$msg = '<p class="success_msg">'.__('Datepicker turned On!', 'mailchimp_i18n').'</p>';
|
448 |
+
mailchimpSF_global_msg($msg);
|
449 |
+
} else if (get_option('mc_use_datepicker')!='off') {
|
450 |
+
update_option('mc_use_datepicker', 'off');
|
451 |
+
$msg = '<p class="success_msg">'.__('Datepicker turned Off!', 'mailchimp_i18n').'</p>';
|
452 |
+
mailchimpSF_global_msg($msg);
|
453 |
+
}
|
454 |
+
|
455 |
+
/*Enable double optin toggle*/
|
456 |
+
|
457 |
+
if(isset($_POST['mc_double_optin'])) {
|
458 |
+
update_option('mc_double_optin', true);
|
459 |
+
$msg = '<p class="success_msg">'.__('Double opt-in turned On!', 'mailchimp_i18n').'</p>';
|
460 |
+
mailchimpSF_global_msg($msg);
|
461 |
+
} else if (get_option('mc_double_optin') != false) {
|
462 |
+
update_option('mc_double_optin', false);
|
463 |
+
$msg = '<p class="success_msg">'.__('Double opt-in turned Off!', 'mailchimp_i18n').'</p>';
|
464 |
+
mailchimpSF_global_msg($msg);
|
465 |
+
}
|
466 |
+
|
467 |
+
/* NUKE the CSS! */
|
468 |
+
if(isset($_POST['mc_nuke_all_styles'])) {
|
469 |
+
update_option('mc_nuke_all_styles', true);
|
470 |
+
$msg = '<p class="success_msg">'.__('MailChimp CSS turned Off!', 'mailchimp_i18n').'</p>';
|
471 |
+
mailchimpSF_global_msg($msg);
|
472 |
+
}elseif (get_option('mc_nuke_all_styles') !== false) {
|
473 |
+
update_option('mc_nuke_all_styles', false);
|
474 |
+
$msg = '<p class="success_msg">'.__('MailChimp CSS turned On!', 'mailchimp_i18n').'</p>';
|
475 |
+
mailchimpSF_global_msg($msg);
|
476 |
+
}
|
477 |
+
|
478 |
+
if (isset($_POST['mc_use_unsub_link'])){
|
479 |
+
update_option('mc_use_unsub_link', 'on');
|
480 |
+
$msg = '<p class="success_msg">'.__('Unsubscribe link turned On!', 'mailchimp_i18n').'</p>';
|
481 |
+
mailchimpSF_global_msg($msg);
|
482 |
+
}
|
483 |
+
|
484 |
+
elseif (get_option('mc_use_unsub_link')!='off') {
|
485 |
+
update_option('mc_use_unsub_link', 'off');
|
486 |
+
$msg = '<p class="success_msg">'.__('Unsubscribe link turned Off!', 'mailchimp_i18n').'</p>';
|
487 |
+
mailchimpSF_global_msg($msg);
|
488 |
+
}
|
489 |
+
|
490 |
+
$content = stripslashes($_POST['mc_header_content']);
|
491 |
+
$content = str_replace("\r\n","<br/>", $content);
|
492 |
+
update_option('mc_header_content', $content );
|
493 |
+
|
494 |
+
$content = stripslashes($_POST['mc_subheader_content']);
|
495 |
+
$content = str_replace("\r\n","<br/>", $content);
|
496 |
+
update_option('mc_subheader_content', $content );
|
497 |
+
|
498 |
+
|
499 |
+
$submit_text = stripslashes($_POST['mc_submit_text']);
|
500 |
+
$submit_text = str_replace("\r\n","", $submit_text);
|
501 |
+
update_option('mc_submit_text', $submit_text);
|
502 |
+
|
503 |
+
// Set Custom Style option
|
504 |
+
update_option('mc_custom_style', isset($_POST['mc_custom_style']) ? 'on' : 'off');
|
505 |
+
|
506 |
+
//we told them not to put these things we are replacing in, but let's just make sure they are listening...
|
507 |
+
if(isset($_POST['mc_form_border_width'])) {
|
508 |
+
update_option('mc_form_border_width',str_replace('px', '', $_POST['mc_form_border_width']) );
|
509 |
+
}
|
510 |
+
if(isset($_POST['mc_form_border_color'])) {
|
511 |
+
update_option('mc_form_border_color', str_replace('#', '', $_POST['mc_form_border_color']));
|
512 |
+
}
|
513 |
+
if(isset($_POST['mc_form_background'])){
|
514 |
+
update_option('mc_form_background',str_replace('#', '', $_POST['mc_form_background']));
|
515 |
+
}
|
516 |
+
if(isset($_POST['mc_form_text_color'])) {
|
517 |
+
update_option('mc_form_text_color', str_replace('#', '', $_POST['mc_form_text_color']));
|
518 |
+
}
|
519 |
+
|
520 |
+
|
521 |
+
// IF NOT DEV MODE
|
522 |
+
$igs = get_option('mc_interest_groups');
|
523 |
+
if (is_array($igs)) {
|
524 |
+
foreach($igs as $var){
|
525 |
+
$opt = 'mc_show_interest_groups_'.$var['id'];
|
526 |
+
if (isset($_POST[$opt])){
|
527 |
+
update_option($opt,'on');
|
528 |
+
} else {
|
529 |
+
update_option($opt,'off');
|
530 |
+
}
|
531 |
+
}
|
532 |
+
}
|
533 |
+
|
534 |
+
$mv = get_option('mc_merge_vars');
|
535 |
+
if (is_array($mv)) {
|
536 |
+
foreach($mv as $var){
|
537 |
+
$opt = 'mc_mv_'.$var['tag'];
|
538 |
+
if (isset($_POST[$opt]) || $var['required']=='Y'){
|
539 |
+
update_option($opt,'on');
|
540 |
+
} else {
|
541 |
+
update_option($opt,'off');
|
542 |
+
}
|
543 |
+
}
|
544 |
+
}
|
545 |
+
|
546 |
+
$msg = '<p class="success_msg">'.esc_html(__('Successfully Updated your List Subscribe Form Settings!', 'mailchimp_i18n')).'</p>';
|
547 |
+
mailchimpSF_global_msg($msg);
|
548 |
}
|
549 |
|
550 |
/**
|
551 |
* Sees if the user changed the list, and updates options accordingly
|
552 |
**/
|
553 |
function mailchimpSF_change_list_if_necessary() {
|
554 |
+
// Simple permission check before going through all this
|
555 |
+
if (!current_user_can(MCSF_CAP_THRESHOLD)) { return; }
|
556 |
+
|
557 |
+
$api = mailchimpSF_get_api();
|
558 |
+
if (!$api) { return; }
|
559 |
+
|
560 |
+
//we *could* support paging, but few users have that many lists (and shouldn't)
|
561 |
+
$lists = $api->get('lists',100);
|
562 |
+
$lists = $lists['lists'];
|
563 |
+
|
564 |
+
if (is_array($lists) && !empty($lists) && isset($_POST['mc_list_id'])) {
|
565 |
+
|
566 |
+
/* If our incoming list ID (the one chosen in the select dropdown)
|
567 |
+
is in our array of lists, the set it to be the active list */
|
568 |
+
foreach($lists as $key => $list) {
|
569 |
+
if ($list['id'] == $_POST['mc_list_id']) {
|
570 |
+
$list_id = $_POST['mc_list_id'];
|
571 |
+
$list_name = $list['name'];
|
572 |
+
$list_key = $key;
|
573 |
+
}
|
574 |
+
}
|
575 |
+
|
576 |
+
$orig_list = get_option('mc_list_id');
|
577 |
+
if ($list_id != '') {
|
578 |
+
update_option('mc_list_id', $list_id);
|
579 |
+
update_option('mc_list_name', $list_name);
|
580 |
+
update_option('mc_email_type_option', $lists[$list_key]['email_type_option']);
|
581 |
+
|
582 |
+
|
583 |
+
// See if the user changed the list
|
584 |
+
$new_list = false;
|
585 |
+
if ($orig_list != $list_id){
|
586 |
+
// The user changed the list, Reset the Form Defaults
|
587 |
+
mailchimpSF_set_form_defaults($list_name);
|
588 |
+
|
589 |
+
$new_list = true;
|
590 |
+
}
|
591 |
+
// email_type_option
|
592 |
+
|
593 |
+
// Grab the merge vars and interest groups
|
594 |
+
$mv = mailchimpSF_get_merge_vars($list_id, $new_list);
|
595 |
+
$igs = mailchimpSF_get_interest_categories($list_id, $new_list);
|
596 |
+
|
597 |
+
$igs_text = ' ';
|
598 |
+
if (is_array($igs)) {
|
599 |
+
$igs_text .= sprintf(__('and %s Sets of Interest Groups', 'mailchimp_i18n'), count($igs));
|
600 |
+
}
|
601 |
+
|
602 |
+
$msg = '<p class="success_msg">'.
|
603 |
+
sprintf(
|
604 |
+
__('<b>Success!</b> Loaded and saved the info for %d Merge Variables', 'mailchimp_i18n').$igs_text,
|
605 |
+
count($mv)
|
606 |
+
).' '.
|
607 |
+
__('from your list').' "'.$list_name.'"<br/><br/>'.
|
608 |
+
__('Now you should either Turn On the MailChimp Widget or change your options below, then turn it on.', 'mailchimp_i18n').'</p>';
|
609 |
+
mailchimpSF_global_msg($msg);
|
610 |
+
}
|
611 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
}
|
613 |
|
614 |
+
function mailchimpSF_get_merge_vars($list_id, $new_list) {
|
615 |
+
$api = mailchimpSF_get_api();
|
616 |
+
$mv = $api->get('lists/' . $list_id . '/merge-fields', 80);
|
617 |
+
$mv['merge_fields'] = mailchimpSF_add_email_field($mv['merge_fields']);
|
618 |
+
update_option('mc_merge_vars', $mv['merge_fields']);
|
619 |
+
foreach($mv['merge_fields'] as $var){
|
620 |
+
$opt = 'mc_mv_'.$var['tag'];
|
621 |
+
//turn them all on by default
|
622 |
+
if ($new_list) {
|
623 |
+
update_option($opt, 'on' );
|
624 |
+
}
|
625 |
+
}
|
626 |
+
return $mv['merge_fields'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
627 |
}
|
628 |
|
629 |
+
function mailchimpSF_add_email_field($merge) {
|
630 |
+
|
631 |
+
$email = array(
|
632 |
+
'tag' => 'EMAIL',
|
633 |
+
'name' => __('Email Address', 'mailchimp_i18n'),
|
634 |
+
'type' => 'email',
|
635 |
+
'required' => true,
|
636 |
+
'public' => true,
|
637 |
+
'display_order' => 1,
|
638 |
+
'default_value' => null
|
639 |
+
);
|
640 |
+
array_unshift($merge, $email);
|
641 |
+
return $merge;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
643 |
|
644 |
+
function mailchimpSF_get_interest_categories($list_id, $new_list) {
|
645 |
+
$api = mailchimpSF_get_api();
|
646 |
+
$igs = $api->get('lists/' . $list_id . '/interest-categories', 60);
|
647 |
+
|
648 |
+
if (is_array($igs)) {
|
649 |
+
$key = 0;
|
650 |
+
foreach($igs['categories'] as $ig) {
|
651 |
+
$groups = $api->get('lists/' . $list_id . '/interest-categories/' . $ig['id'] . '/interests', 60);
|
652 |
+
$igs['categories'][$key]['groups'] = $groups['interests'];
|
653 |
+
$opt = 'mc_show_interest_groups_'.$ig['id'];
|
654 |
+
|
655 |
+
//turn them all on by default
|
656 |
+
if ($new_list) {
|
657 |
+
update_option($opt, 'on' );
|
658 |
+
}
|
659 |
+
$key++;
|
660 |
+
}
|
661 |
+
}
|
662 |
+
update_option('mc_interest_groups', $igs['categories']);
|
663 |
+
return $igs['categories'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
664 |
}
|
|
|
|
|
665 |
|
666 |
|
667 |
+
/**
|
668 |
+
* Outputs the Settings/Options page
|
669 |
+
*/
|
670 |
+
function mailchimpSF_setup_page() {
|
671 |
+
$path = plugin_dir_path(__FILE__);
|
672 |
+
wp_enqueue_script('showMe', MCSF_URL.'js/hidecss.js', array('jquery'), MCSF_VER);
|
673 |
+
require_once($path.'/views/setup_page.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
674 |
}//mailchimpSF_setup_page()
|
675 |
|
676 |
|
677 |
function mailchimpSF_register_widgets() {
|
678 |
+
if (mailchimpSF_get_api()) {
|
679 |
+
register_widget('mailchimpSF_Widget');
|
680 |
+
}
|
681 |
}
|
682 |
add_action('widgets_init', 'mailchimpSF_register_widgets');
|
683 |
|
684 |
function mailchimpSF_shortcode($atts){
|
685 |
+
ob_start();
|
686 |
+
mailchimpSF_signup_form();
|
687 |
+
return ob_get_clean();
|
688 |
}
|
689 |
add_shortcode('mailchimpsf_form', 'mailchimpSF_shortcode');
|
690 |
|
697 |
* @return bool
|
698 |
*/
|
699 |
function mailchimpSF_signup_submit() {
|
700 |
+
$mv = get_option('mc_merge_vars', array());
|
701 |
+
$mv_tag_keys = array();
|
702 |
+
|
703 |
+
$igs = get_option('mc_interest_groups', array());
|
704 |
+
|
705 |
+
$listId = get_option('mc_list_id');
|
706 |
+
$email = isset($_POST['mc_mv_EMAIL']) ? strip_tags(stripslashes($_POST['mc_mv_EMAIL'])) : '';
|
707 |
+
$merge = $errs = $html_errs = array(); // Set up some vars
|
708 |
+
|
709 |
+
$merge = mailchimpSF_merge_submit($mv);
|
710 |
+
|
711 |
+
//Catch errors and fail early.
|
712 |
+
if(is_wp_error($merge)) {
|
713 |
+
$msg = "<strong class='mc_error_msg'>" . $merge->get_error_message() . "</strong>";
|
714 |
+
mailchimpSF_global_msg($msg);
|
715 |
+
|
716 |
+
return false;
|
717 |
+
}
|
718 |
+
|
719 |
+
// Head back to the beginning of the merge vars array
|
720 |
+
reset($mv);
|
721 |
+
// Ensure we have an array
|
722 |
+
$igs = !is_array($igs) ? array() : $igs;
|
723 |
+
$igs = mailchimpSF_groups_submit($igs);
|
724 |
+
|
725 |
+
// Clear out empty merge vars
|
726 |
+
$merge = mailchimpSF_merge_remove_empty($merge);
|
727 |
+
if (isset($_POST['email_type']) && in_array($_POST['email_type'], array('text', 'html', 'mobile'))) {
|
728 |
+
$email_type = $_POST['email_type'];
|
729 |
+
}
|
730 |
+
else {
|
731 |
+
$email_type = 'html';
|
732 |
+
}
|
733 |
+
|
734 |
+
$api = mailchimpSF_get_api();
|
735 |
+
if (!$api) {
|
736 |
+
$url = mailchimpSF_signup_form_url();
|
737 |
+
$error = '<strong class="mc_error_msg">'. __('We encountered a problem adding ' . $email . ' to the list. Please <a href="' . $url . '">sign up here.</a>') . '</strong>';
|
738 |
+
mailchimpSF_global_msg($error);
|
739 |
+
return false;
|
740 |
+
}
|
741 |
+
|
742 |
+
$url = 'lists/'. $listId . '/members/' . md5(strtolower($email));
|
743 |
+
$status = mailchimpSF_check_status($url);
|
744 |
+
$body = mailchimpSF_subscribe_body($merge, $igs, $email_type, $email, $status, get_option('mc_double_optin'));
|
745 |
+
$retval = $api->post($url, $body, 'PUT');
|
746 |
+
|
747 |
+
// If we have errors, then show them
|
748 |
+
if(is_wp_error($retval)) {
|
749 |
+
$msg = "<strong class='mc_error_msg'>" . $retval->get_error_message() . "</strong>";
|
750 |
+
mailchimpSF_global_msg($msg);
|
751 |
+
return false;
|
752 |
+
}
|
753 |
+
|
754 |
+
if($retval['status'] == 'subscribed') {
|
755 |
+
$esc = __("Success, you've been signed up.", 'mailchimp_i18n');
|
756 |
+
$msg = "<strong class='mc_success_msg'>{$esc}</strong>";
|
757 |
+
} else {
|
758 |
+
$esc = __("Success, you've been signed up! Please look for our confirmation email.", 'mailchimp_i18n');
|
759 |
+
$msg = "<strong class='mc_success_msg'>{$esc}</strong>";
|
760 |
+
}
|
761 |
+
|
762 |
+
// Set our global message
|
763 |
+
mailchimpSF_global_msg($msg);
|
764 |
+
|
765 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
}
|
767 |
|
768 |
+
/*
|
769 |
+
Cleans up merge fields and interests to make them
|
770 |
+
API 3.0-friendly.
|
771 |
+
*/
|
772 |
+
|
773 |
+
function mailchimpSF_subscribe_body($merge, $igs, $email_type, $email, $status, $double_optin) {
|
774 |
+
$body = new stdClass();
|
775 |
+
$body->email_address = $email;
|
776 |
+
$body->email_type = $email_type;
|
777 |
+
$body->merge_fields = $merge;
|
778 |
+
if (!empty($igs)) {
|
779 |
+
$body->interests = $igs;
|
780 |
+
}
|
781 |
+
|
782 |
+
// single opt-in that covers new subscribers
|
783 |
+
if (!$status && $double_optin == false) {
|
784 |
+
$body->status = 'subscribed';
|
785 |
+
}
|
786 |
+
// anyone else
|
787 |
+
else {
|
788 |
+
$body->status = 'pending';
|
789 |
+
}
|
790 |
+
|
791 |
+
|
792 |
+
return $body;
|
793 |
+
}
|
794 |
+
|
795 |
+
function mailchimpSF_check_status($endpoint) {
|
796 |
+
$endpoint .= '?fields=status';
|
797 |
+
$api = mailchimpSF_get_api();
|
798 |
+
$subscriber = $api->get($endpoint, null);
|
799 |
+
if(is_wp_error($subscriber)) {
|
800 |
+
return false;
|
801 |
+
}
|
802 |
+
return $subscriber['status'];
|
803 |
+
}
|
804 |
+
|
805 |
+
function mailchimpSF_merge_submit($mv) {
|
806 |
+
// Loop through our Merge Vars, and if they're empty, but required, then print an error, and mark as failed
|
807 |
+
$merge = new stdClass();
|
808 |
+
foreach($mv as $var) {
|
809 |
+
// We also want to create an array where the keys are the tags for easier validation later
|
810 |
+
$mv_tag_keys[$var['tag']] = $var;
|
811 |
+
|
812 |
+
$opt = 'mc_mv_'.$var['tag'];
|
813 |
+
|
814 |
+
$opt_val = isset($_POST[$opt]) ? stripslashes_deep($_POST[$opt]) : '';
|
815 |
+
|
816 |
+
// Handle phone number logic
|
817 |
+
if ($var['type'] === 'phone' && $var['options']['phone_format'] === 'US') {
|
818 |
+
$opt_val = mailchimpSF_merge_validate_phone($opt_val, $var);
|
819 |
+
if(is_wp_error($opt_val)) {
|
820 |
+
return $opt_val;
|
821 |
+
}
|
822 |
+
}
|
823 |
+
// Handle address logic
|
824 |
+
else if (is_array($opt_val) && $var['type'] == 'address') {
|
825 |
+
$validate = mailchimpSF_merge_validate_address($opt_val, $var);
|
826 |
+
if(is_wp_error($validate)) {
|
827 |
+
return $validate;
|
828 |
+
}
|
829 |
+
|
830 |
+
if($validate) {
|
831 |
+
$merge->$var['tag'] = $validate;
|
832 |
+
}
|
833 |
+
continue;
|
834 |
+
|
835 |
+
}
|
836 |
+
else if (is_array($opt_val)) {
|
837 |
+
$keys = array_keys($opt_val);
|
838 |
+
$val = new stdClass();
|
839 |
+
foreach($keys as $key) {
|
840 |
+
$val->$key = $opt_val[$key];
|
841 |
+
}
|
842 |
+
$opt_val = $val;
|
843 |
+
}
|
844 |
+
|
845 |
+
if ($var['required'] == 'Y' && trim($opt_val) == '') {
|
846 |
+
$message = sprintf(__("You must fill in %s.", 'mailchimp_i18n'), esc_html($var['name']));
|
847 |
+
$error = new WP_Error('missing_required_field', $message);
|
848 |
+
return $error;
|
849 |
+
}
|
850 |
+
else {
|
851 |
+
if ($var['tag'] != 'EMAIL') {
|
852 |
+
$merge->$var['tag'] = $opt_val;
|
853 |
+
}
|
854 |
+
}
|
855 |
+
}
|
856 |
+
return $merge;
|
857 |
+
}
|
858 |
+
|
859 |
+
function mailchimpSF_merge_validate_phone($opt_val, $var) {
|
860 |
+
// This filters out all 'falsey' elements
|
861 |
+
$opt_val = array_filter($opt_val);
|
862 |
+
// If they weren't all empty
|
863 |
+
if (!$opt_val) {
|
864 |
+
return false;
|
865 |
+
}
|
866 |
+
|
867 |
+
$opt_val = implode('-', $opt_val);
|
868 |
+
if (strlen($opt_val) < 12) {
|
869 |
+
$opt_val = '';
|
870 |
+
}
|
871 |
+
|
872 |
+
|
873 |
+
if (!preg_match('/[0-9]{0,3}-[0-9]{0,3}-[0-9]{0,4}/A', $opt_val)) {
|
874 |
+
$message = sprintf(__("%s must consist of only numbers", 'mailchimp_i18n'), esc_html($var['name']));
|
875 |
+
$error = new WP_Error('mc_phone_validation', $message);
|
876 |
+
return $error;
|
877 |
+
}
|
878 |
+
|
879 |
+
return $opt_val;
|
880 |
+
}
|
881 |
+
|
882 |
+
function mailchimpSF_merge_validate_address($opt_val, $var) {
|
883 |
+
if ($var['required'] == 'Y') {
|
884 |
+
if (empty($opt_val['addr1']) || empty($opt_val['city'])) {
|
885 |
+
$message = sprintf(__("You must fill in %s.", 'mailchimp_i18n'), esc_html($var['name']));
|
886 |
+
$error = new WP_Error('invalid_address_merge', $message);
|
887 |
+
return $error;
|
888 |
+
}
|
889 |
+
} else {
|
890 |
+
if (empty($opt_val['addr1']) || empty($opt_val['city'])) {
|
891 |
+
return false;
|
892 |
+
}
|
893 |
+
$merge = new stdClass();
|
894 |
+
$merge->addr1 = $opt_val['addr1'];
|
895 |
+
$merge->addr2 = $opt_val['addr2'];
|
896 |
+
$merge->city = $opt_val['city'];
|
897 |
+
$merge->state = $opt_val['state'];
|
898 |
+
$merge->zip = $opt_val['zip'];
|
899 |
+
$merge->country = $opt_val['country'];
|
900 |
+
return $merge;
|
901 |
+
}
|
902 |
+
}
|
903 |
+
|
904 |
+
function mailchimpSF_merge_remove_empty($merge) {
|
905 |
+
foreach ($merge as $k => $v) {
|
906 |
+
if (is_object($v) && empty($v)) {
|
907 |
+
unset($merge->$k);
|
908 |
+
}
|
909 |
+
else if (!is_object($v) && trim($v) === '') {
|
910 |
+
unset($merge->$k);
|
911 |
+
}
|
912 |
+
}
|
913 |
+
|
914 |
+
// If we have an empty $merge, then assign empty string.
|
915 |
+
if (count($merge) == 0 || $merge == '') {
|
916 |
+
$merge = '';
|
917 |
+
}
|
918 |
+
|
919 |
+
return $merge;
|
920 |
+
}
|
921 |
+
|
922 |
+
|
923 |
+
function mailchimpSF_groups_submit($igs) {
|
924 |
+
if(empty($igs)) {
|
925 |
+
return new StdClass();
|
926 |
+
}
|
927 |
+
|
928 |
+
$groups = new stdClass();
|
929 |
+
|
930 |
+
foreach ($igs as $ig) {
|
931 |
+
if (get_option('mc_show_interest_groups_'.$ig['id']) == 'on' && $ig['type'] !== 'hidden') {
|
932 |
+
switch ($ig['type']) {
|
933 |
+
case 'dropdown':
|
934 |
+
case 'radio':
|
935 |
+
// there can only be one value submitted for radio/dropdowns, so use that at the group id.
|
936 |
+
if (isset($_POST['group'][$ig['id']])){
|
937 |
+
$value = $_POST['group'][$ig['id']];
|
938 |
+
$groups->$value = true;
|
939 |
+
}
|
940 |
+
break;
|
941 |
+
case 'checkboxes':
|
942 |
+
if (isset($_POST['group'][$ig['id']])) {
|
943 |
+
foreach ($_POST['group'][$ig['id']] as $id => $value) {
|
944 |
+
$groups->$id = true;
|
945 |
+
}
|
946 |
+
}
|
947 |
+
break;
|
948 |
+
default:
|
949 |
+
// Nothing
|
950 |
+
break;
|
951 |
+
}
|
952 |
+
}
|
953 |
+
}
|
954 |
+
return $groups;
|
955 |
+
}
|
956 |
+
|
957 |
+
function mailchimpSF_verify_key($api) {
|
958 |
+
$user = $api->get('');
|
959 |
+
if (is_wp_error($user)) {
|
960 |
+
return $user;
|
961 |
+
}
|
962 |
+
|
963 |
+
//Might as well set this data if we have it already.
|
964 |
+
$valid_roles = array('owner', 'admin', 'manager');
|
965 |
+
if(in_array($user['role'], $valid_roles)) {
|
966 |
+
update_option('mc_api_key', $api->key);
|
967 |
+
update_option('mc_user', $user);
|
968 |
+
update_option('mc_datacenter', $api->datacenter);
|
969 |
+
|
970 |
+
} else {
|
971 |
+
$msg = __('API Key must belong to "Owner", "Admin", or "Manager."', 'mailchimp_i18n');
|
972 |
+
return new WP_Error('mc-invalid-role', $msg);
|
973 |
+
}
|
974 |
+
return;
|
975 |
+
}
|
976 |
+
|
977 |
+
function mailchimpSF_update_profile_url($email) {
|
978 |
+
$dc = get_option('mc_datacenter');
|
979 |
+
$eid = base64_encode($email);
|
980 |
+
$user = get_option('mc_user');
|
981 |
+
$list_id = get_option('mc_list_id');
|
982 |
+
$url = 'http://' . $dc . '.list-manage.com/subscribe/send-email?u=' . $user['account_id'] . '&id=' . $list_id . '&e=' . $eid;
|
983 |
+
return $url;
|
984 |
+
}
|
985 |
+
|
986 |
+
function mailchimpSF_signup_form_url() {
|
987 |
+
$dc = get_option('mc_datacenter');
|
988 |
+
$user = get_option('mc_user');
|
989 |
+
$list_id = get_option('mc_list_id');
|
990 |
+
$url = 'http://' . $dc . '.list-manage.com/subscribe?u=' . $user['account_id'] . '&id=' . $list_id;
|
991 |
+
return $url;
|
992 |
+
}
|
993 |
+
|
994 |
+
function mailchimpSF_delete_options($options = array()) {
|
995 |
+
foreach($options as $option) {
|
996 |
+
delete_option($option);
|
997 |
+
}
|
998 |
+
}
|
999 |
|
1000 |
|
1001 |
/**********************
|
1007 |
* This function must be ran _very early_ in the load process, as it sets up important constants for the rest of the plugin
|
1008 |
*/
|
1009 |
function mailchimpSF_where_am_i() {
|
1010 |
+
$locations = array(
|
1011 |
+
'plugins' => array(
|
1012 |
+
'dir' => plugin_dir_path(__FILE__),
|
1013 |
+
'url' => plugins_url()
|
1014 |
+
),
|
1015 |
+
'mu_plugins' => array(
|
1016 |
+
'dir' => plugin_dir_path(__FILE__),
|
1017 |
+
'url' => plugins_url(),
|
1018 |
+
),
|
1019 |
+
'template' => array(
|
1020 |
+
'dir' => trailingslashit(get_template_directory()).'plugins/',
|
1021 |
+
'url' => trailingslashit(get_template_directory_uri()).'plugins/',
|
1022 |
+
),
|
1023 |
+
'stylesheet' => array(
|
1024 |
+
'dir' => trailingslashit(get_stylesheet_directory()).'plugins/',
|
1025 |
+
'url' => trailingslashit(get_stylesheet_directory_uri()).'plugins/',
|
1026 |
+
),
|
1027 |
+
);
|
1028 |
+
|
1029 |
+
// Set defaults
|
1030 |
+
$mscf_dirbase = trailingslashit(basename(dirname(__FILE__))); // Typically wp-mailchimp/ or mailchimp/
|
1031 |
+
$mscf_dir = trailingslashit(plugin_dir_path(__FILE__));
|
1032 |
+
$mscf_url = trailingslashit(plugins_url(null, __FILE__));
|
1033 |
+
|
1034 |
+
// Try our hands at finding the real location
|
1035 |
+
foreach ($locations as $key => $loc) {
|
1036 |
+
$dir = trailingslashit($loc['dir']).$mscf_dirbase;
|
1037 |
+
$url = trailingslashit($loc['url']).$mscf_dirbase;
|
1038 |
+
if (is_file($dir.basename(__FILE__))) {
|
1039 |
+
$mscf_dir = $dir;
|
1040 |
+
$mscf_url = $url;
|
1041 |
+
break;
|
1042 |
+
}
|
1043 |
+
}
|
1044 |
+
|
1045 |
+
// Define our complete filesystem path
|
1046 |
+
define('MCSF_DIR', $mscf_dir);
|
1047 |
+
|
1048 |
+
/* Lang location needs to be relative *from* ABSPATH,
|
1049 |
+
so strip it out of our language dir location */
|
1050 |
+
define('MCSF_LANG_DIR', trailingslashit(MCSF_DIR).'po/');
|
1051 |
+
|
1052 |
+
// Define our complete URL to the plugin folder
|
1053 |
+
define('MCSF_URL', $mscf_url);
|
1054 |
}
|
1055 |
|
1056 |
|
1068 |
* @return bool Whether the nonce check passed or failed.
|
1069 |
*/
|
1070 |
function mailchimpSF_verify_nonce($nonce, $action = -1) {
|
1071 |
+
$user = wp_get_current_user();
|
1072 |
+
$uid = (int) $user->ID;
|
1073 |
+
if ( ! $uid ) {
|
1074 |
+
$uid = apply_filters( 'nonce_user_logged_out', $uid, $action );
|
1075 |
+
}
|
1076 |
+
|
1077 |
+
if ( empty( $nonce ) ) {
|
1078 |
+
return false;
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
$token = 'MAILCHIMP';
|
1082 |
+
$i = wp_nonce_tick();
|
1083 |
+
|
1084 |
+
// Nonce generated 0-12 hours ago
|
1085 |
+
$expected = substr( wp_hash( $i . '|' . $action . '|' . $uid . '|' . $token, 'nonce'), -12, 10 );
|
1086 |
+
if ( hash_equals( $expected, $nonce ) ) {
|
1087 |
+
return 1;
|
1088 |
+
}
|
1089 |
+
|
1090 |
+
// Nonce generated 12-24 hours ago
|
1091 |
+
$expected = substr( wp_hash( ( $i - 1 ) . '|' . $action . '|' . $uid . '|' . $token, 'nonce' ), -12, 10 );
|
1092 |
+
if ( hash_equals( $expected, $nonce ) ) {
|
1093 |
+
return 2;
|
1094 |
+
}
|
1095 |
+
|
1096 |
+
// Invalid nonce
|
1097 |
+
return false;
|
1098 |
}
|
1099 |
|
1100 |
|
1108 |
* @return string The token.
|
1109 |
*/
|
1110 |
function mailchimpSF_create_nonce($action = -1) {
|
1111 |
+
$user = wp_get_current_user();
|
1112 |
+
$uid = (int) $user->ID;
|
1113 |
+
if ( ! $uid ) {
|
1114 |
+
/** This filter is documented in wp-includes/pluggable.php */
|
1115 |
+
$uid = apply_filters( 'nonce_user_logged_out', $uid, $action );
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
$token = 'MAILCHIMP';
|
1119 |
+
$i = wp_nonce_tick();
|
1120 |
+
|
1121 |
+
return substr( wp_hash( $i . '|' . $action . '|' . $uid . '|' . $token, 'nonce' ), -12, 10 );
|
1122 |
+
}
|
|
mailchimp_widget.php
CHANGED
@@ -9,30 +9,22 @@ function mailchimpSF_signup_form($args = array()) {
|
|
9 |
$igs = get_option('mc_interest_groups');
|
10 |
|
11 |
// See if we have valid Merge Vars
|
12 |
-
if (!is_array($mv)
|
13 |
echo $before_widget;
|
14 |
?>
|
15 |
<div class="mc_error_msg">
|
16 |
-
<?php
|
17 |
</div>
|
18 |
<?php
|
19 |
echo $after_widget;
|
20 |
return;
|
21 |
}
|
22 |
-
|
23 |
-
if (!is_array($mv) && MAILCHIMP_DEV_MODE == true) {
|
24 |
-
$mv = mailchimp_get_kitchen_sink_fields();
|
25 |
-
$igs = mailchimp_get_kitchen_sink_groups();
|
26 |
-
}
|
27 |
|
28 |
if (!empty($before_widget)) {
|
29 |
echo $before_widget;
|
30 |
}
|
31 |
|
32 |
$header = get_option('mc_header_content');
|
33 |
-
if (!$header && MAILCHIMP_DEV_MODE == true) {
|
34 |
-
$header = apply_filters( 'mailchimp_dev_mode_header_text', 'MailChimp Developer' );
|
35 |
-
}
|
36 |
|
37 |
// See if we have custom header content
|
38 |
if (!empty($header)) {
|
@@ -48,14 +40,11 @@ function mailchimpSF_signup_form($args = array()) {
|
|
48 |
}
|
49 |
|
50 |
$sub_heading = trim(get_option('mc_subheader_content'));
|
51 |
-
if (!$sub_heading && MAILCHIMP_DEV_MODE == true) {
|
52 |
-
$sub_heading = apply_filters( 'mailchimp_dev_mode_subheading_text', 'This is the subheading text.' );
|
53 |
-
}
|
54 |
-
|
55 |
-
?>
|
56 |
|
57 |
-
|
58 |
-
|
|
|
|
|
59 |
line-height: 1.4em;
|
60 |
margin-bottom: 0.75em;
|
61 |
}
|
@@ -127,7 +116,10 @@ function mailchimpSF_signup_form($args = array()) {
|
|
127 |
.mc_email_type {
|
128 |
padding-left: 4px;
|
129 |
}
|
130 |
-
</style>
|
|
|
|
|
|
|
131 |
|
132 |
<div id="mc_signup">
|
133 |
<form method="post" action="#mc_signup" id="mc_signup_form">
|
@@ -156,7 +148,7 @@ function mailchimpSF_signup_form($args = array()) {
|
|
156 |
$num_fields = 0;
|
157 |
foreach((array)$mv as $var) {
|
158 |
$opt = 'mc_mv_'.$var['tag'];
|
159 |
-
if ($var['
|
160 |
$num_fields++;
|
161 |
}
|
162 |
}
|
@@ -191,11 +183,11 @@ function mailchimpSF_signup_form($args = array()) {
|
|
191 |
if (is_array($igs) && !empty($igs)) {
|
192 |
foreach ($igs as $ig) {
|
193 |
if (is_array($ig) && isset($ig['id'])) {
|
194 |
-
if (($igs && get_option('mc_show_interest_groups_'.$ig['id']) == 'on')
|
195 |
-
if ($ig['
|
196 |
?>
|
197 |
<div class="mc_interests_header">
|
198 |
-
<?php echo esc_html($ig['
|
199 |
</div><!-- /mc_interests_header -->
|
200 |
<div class="mc_interest">
|
201 |
<?php
|
@@ -218,7 +210,7 @@ function mailchimpSF_signup_form($args = array()) {
|
|
218 |
}
|
219 |
}
|
220 |
|
221 |
-
if (get_option('mc_email_type_option')
|
222 |
?>
|
223 |
<div class="mergeRow">
|
224 |
<label class="mc_email_format"><?php _e('Preferred Format', 'mailchimp_i18n'); ?></label>
|
@@ -234,10 +226,7 @@ function mailchimpSF_signup_form($args = array()) {
|
|
234 |
}
|
235 |
|
236 |
$submit_text = get_option('mc_submit_text');
|
237 |
-
|
238 |
-
$submit_text = apply_filters( 'mailchimp_dev_mode_submit_text', 'Subscribe' );
|
239 |
-
}
|
240 |
-
|
241 |
?>
|
242 |
|
243 |
<div class="mc_signup_submit">
|
@@ -246,13 +235,13 @@ function mailchimpSF_signup_form($args = array()) {
|
|
246 |
|
247 |
|
248 |
<?php
|
249 |
-
$user = get_option('
|
250 |
if ($user && get_option('mc_use_unsub_link') == 'on') {
|
251 |
-
$
|
252 |
-
$host = 'http://'.$
|
253 |
?>
|
254 |
<div id="mc_unsub_link" align="center">
|
255 |
-
<a href="<?php echo esc_url($host.'/unsubscribe/?u='.$user['
|
256 |
</div><!-- /mc_unsub_link -->
|
257 |
<?php
|
258 |
}
|
@@ -260,7 +249,7 @@ function mailchimpSF_signup_form($args = array()) {
|
|
260 |
?>
|
261 |
<br/>
|
262 |
<div id="mc_display_rewards" align="center">
|
263 |
-
<?php esc_html_e('powered by', 'mailchimp_i18n'); ?> <a href="<?php echo esc_url('http://www.mailchimp.com/affiliates/?aid='.$user['
|
264 |
</div><!-- /mc_display_rewards -->
|
265 |
<?php
|
266 |
}
|
@@ -286,37 +275,39 @@ function mailchimp_interest_group_field($ig) {
|
|
286 |
}
|
287 |
$html = '';
|
288 |
$set_name = 'group['.$ig['id'].']';
|
289 |
-
switch ($ig['
|
290 |
-
case 'checkbox':
|
291 |
case 'checkboxes':
|
292 |
$i = 1;
|
293 |
foreach($ig['groups'] as $interest){
|
294 |
-
$
|
|
|
295 |
$html .= '
|
296 |
-
|
297 |
-
<
|
|
|
298 |
<br/>';
|
299 |
$i++;
|
300 |
}
|
301 |
break;
|
302 |
case 'radio':
|
303 |
foreach($ig['groups'] as $interest){
|
304 |
-
$
|
|
|
305 |
$html .= '
|
306 |
-
<input type="radio" name="'.esc_attr($set_name).'" id="'.esc_attr('mc_interest_'.$ig['id'].'_'.$
|
307 |
-
<label for="'.esc_attr('mc_interest_'.$ig['id'].'_'.$
|
308 |
<br/>';
|
309 |
}
|
310 |
break;
|
311 |
-
case 'select':
|
312 |
case 'dropdown':
|
313 |
$html .= '
|
314 |
<select name="'.esc_attr($set_name).'">
|
315 |
<option value=""></option>';
|
316 |
foreach($ig['groups'] as $interest){
|
317 |
-
$
|
|
|
318 |
$html .= '
|
319 |
-
<option value="'.esc_attr($
|
320 |
}
|
321 |
$html .= '
|
322 |
</select>';
|
@@ -324,10 +315,11 @@ function mailchimp_interest_group_field($ig) {
|
|
324 |
case 'hidden':
|
325 |
$i = 1;
|
326 |
foreach($ig['groups'] as $interest) {
|
327 |
-
$
|
|
|
328 |
$html .= '
|
329 |
-
<input type="checkbox" name="'.esc_attr($set_name.'['.$i.']').'" id="'.esc_attr('mc_interest_'.$ig['id'].'_'.$
|
330 |
-
<label for="'. esc_attr('mc_interest_'.$ig['id'].'_'.$
|
331 |
$i++;
|
332 |
}
|
333 |
break;
|
@@ -345,9 +337,9 @@ function mailchimp_form_field($var, $num_fields) {
|
|
345 |
$opt = 'mc_mv_'.$var['tag'];
|
346 |
$html = '';
|
347 |
// See if that var is set as required, or turned on (for display)
|
348 |
-
if ($var['
|
349 |
-
$label = '<label for="'.esc_attr($opt).'" class="mc_var_label mc_header mc_header_'.esc_attr($var['
|
350 |
-
if ($var['
|
351 |
$label .= '<span class="mc_required">*</span>';
|
352 |
}
|
353 |
$label .= '</label>';
|
@@ -355,19 +347,19 @@ function mailchimp_form_field($var, $num_fields) {
|
|
355 |
$html .= '
|
356 |
<div class="mc_merge_var">
|
357 |
'.$label;
|
358 |
-
switch ($var['
|
359 |
case 'date':
|
360 |
$html .= '
|
361 |
-
<input type="text" size="18" placeholder="'.esc_attr($var['
|
362 |
break;
|
363 |
case 'radio':
|
364 |
-
if (is_array($var['choices'])) {
|
365 |
$html .= '
|
366 |
<ul class="mc_list">';
|
367 |
-
foreach ($var['choices'] as $key => $value) {
|
368 |
$html .= '
|
369 |
<li>
|
370 |
-
<input type="radio" id="'.esc_attr($opt.'_'.$key).'" name="'.esc_attr($opt).'" class="mc_radio" value="'.$value.'"'.checked($var['
|
371 |
<label for="'.esc_attr($opt.'_'.$key).'" class="mc_radio_label">'.esc_html($value).'</label>
|
372 |
</li>';
|
373 |
}
|
@@ -376,12 +368,12 @@ function mailchimp_form_field($var, $num_fields) {
|
|
376 |
}
|
377 |
break;
|
378 |
case 'dropdown':
|
379 |
-
if (is_array($var['choices'])) {
|
380 |
$html .= '
|
381 |
<select id="'.esc_attr($opt).'" name="'.esc_attr($opt).'" class="mc_select">';
|
382 |
-
foreach ($var['choices'] as $value) {
|
383 |
$html .= '
|
384 |
-
<option value="'.esc_attr($value).'"'.selected($value, $var['
|
385 |
}
|
386 |
$html .= '
|
387 |
</select>';
|
@@ -389,7 +381,7 @@ function mailchimp_form_field($var, $num_fields) {
|
|
389 |
break;
|
390 |
case 'birthday':
|
391 |
$html .= '
|
392 |
-
<input type="text" size="18" placeholder="'.esc_attr($var['
|
393 |
break;
|
394 |
case 'birthday-old':
|
395 |
$days = range(1, 31);
|
@@ -431,7 +423,7 @@ function mailchimp_form_field($var, $num_fields) {
|
|
431 |
<select name="'.esc_attr($opt.'[country]').'" id="'.esc_attr($opt.'-country').'">';
|
432 |
foreach ($countries as $country_code => $country_name) {
|
433 |
$html .= '
|
434 |
-
<option value="'.esc_attr($country_code).'"'.selected($country_code, $var['
|
435 |
}
|
436 |
$html .= '
|
437 |
</select>';
|
@@ -441,7 +433,7 @@ function mailchimp_form_field($var, $num_fields) {
|
|
441 |
<input type="text" size="18" maxlength="5" value="" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="mc_input" />';
|
442 |
break;
|
443 |
case 'phone':
|
444 |
-
if ($var['
|
445 |
$html .= '
|
446 |
<input type="text" size="2" maxlength="3" value="" name="'.esc_attr($opt.'[area]').'" id="'.esc_attr($opt.'-area').'" class="mc_input mc_phone" />
|
447 |
<input type="text" size="2" maxlength="3" value="" name="'.esc_attr($opt.'[detail1]').'" id="'.esc_attr($opt.'-detail1').'" class="mc_input mc_phone" />
|
@@ -461,11 +453,11 @@ function mailchimp_form_field($var, $num_fields) {
|
|
461 |
case 'number':
|
462 |
default:
|
463 |
$html .= '
|
464 |
-
<input type="text" size="18" placeholder="'.esc_html($var['
|
465 |
break;
|
466 |
}
|
467 |
-
if (!empty($var['
|
468 |
-
$html .= '<span class="mc_help">'.esc_html($var['
|
469 |
}
|
470 |
$html .= '
|
471 |
</div><!-- /mc_merge_var -->';
|
@@ -694,51 +686,3 @@ function mailchimp_country_list() {
|
|
694 |
'174' => __('Zimbabwe', 'mailchimp_i18n'),
|
695 |
);
|
696 |
}
|
697 |
-
|
698 |
-
function mailchimp_get_kitchen_sink_fields() {
|
699 |
-
$fields = array(
|
700 |
-
0 => array (
|
701 |
-
'name' => 'Email Address', 'req' => true, 'field_type' => 'email', 'public' => true, 'show' => true, 'order' => '1', 'default' => NULL, 'helptext' => NULL, 'size' => '25', 'tag' => 'EMAIL', 'id' => 0,
|
702 |
-
),
|
703 |
-
1 => array (
|
704 |
-
'name' => 'First Name', 'req' => true, 'field_type' => 'text', 'public' => true, 'show' => true, 'order' => '2', 'default' => '', 'helptext' => '', 'size' => '25', 'tag' => 'FNAME', 'id' => 1,
|
705 |
-
),
|
706 |
-
2 => array (
|
707 |
-
'name' => 'Last Name', 'req' => true, 'field_type' => 'text', 'public' => true, 'show' => true, 'order' => '3', 'default' => '', 'helptext' => '', 'size' => '25', 'tag' => 'LNAME', 'id' => 2,
|
708 |
-
),
|
709 |
-
3 => array (
|
710 |
-
'name' => 'Radio Buttons', 'req' => true, 'field_type' => 'radio', 'public' => true, 'show' => true, 'order' => '5', 'default' => '', 'helptext' => '', 'size' => '25', 'choices' => array ( 0 => 'First Choice', 1 => 'Second Choice', 2 => 'Third Choice' ), 'tag' => 'MMERGE3', 'id' => 3,
|
711 |
-
),
|
712 |
-
4 => array (
|
713 |
-
'name' => 'Drop Down','req' => true,'field_type' => 'dropdown','public' => true,'show' => true,'order' => '7','default' => '','helptext' => 'Help text','size' => '25','choices' => array (0 => 'First Choice', 1 => 'Second Choice', 2 => 'Third Choice', ),'tag' => 'MMERGE4','id' => 4,
|
714 |
-
),
|
715 |
-
5 => array (
|
716 |
-
'name' => 'Date','req' => true,'field_type' => 'date','public' => true,'show' => true,'order' => '8','default' => '','helptext' => '','size' => '25','dateformat' => 'MM/DD/YYYY','tag' => 'MMERGE5','id' => 5,
|
717 |
-
),
|
718 |
-
);
|
719 |
-
return apply_filters( 'mailchimp_dev_mode_fields', $fields );
|
720 |
-
}
|
721 |
-
|
722 |
-
function mailchimp_get_kitchen_sink_groups() {
|
723 |
-
$groups = array (
|
724 |
-
0 => array (
|
725 |
-
'id' => 123,
|
726 |
-
'name' => 'Checkboxes',
|
727 |
-
'form_field' => 'checkboxes',
|
728 |
-
'display_order' => '0',
|
729 |
-
'groups' =>
|
730 |
-
array (
|
731 |
-
0 => array (
|
732 |
-
'bit' => '1', 'name' => 'Checkbox Option 1', 'display_order' => '1', 'subscribers' => 0,
|
733 |
-
),
|
734 |
-
1 => array (
|
735 |
-
'bit' => '2', 'name' => 'Another Checkbox Option', 'display_order' => '2', 'subscribers' => 0,
|
736 |
-
),
|
737 |
-
2 => array (
|
738 |
-
'bit' => '4', 'name' => 'Third Option', 'display_order' => '3', 'subscribers' => 0,
|
739 |
-
),
|
740 |
-
),
|
741 |
-
),
|
742 |
-
);
|
743 |
-
return apply_filters( 'mailchimp_dev_mode_groups', $groups );
|
744 |
-
}
|
9 |
$igs = get_option('mc_interest_groups');
|
10 |
|
11 |
// See if we have valid Merge Vars
|
12 |
+
if (!is_array($mv)) {
|
13 |
echo $before_widget;
|
14 |
?>
|
15 |
<div class="mc_error_msg">
|
16 |
+
<?php echo __('Sorry, there was a problem loading your MailChimp details. Please navigate to <strong>Settings</strong> and click <strong>MailChimp Setup</strong> to try again.', 'mailchimp_i18n'); ?>
|
17 |
</div>
|
18 |
<?php
|
19 |
echo $after_widget;
|
20 |
return;
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
22 |
|
23 |
if (!empty($before_widget)) {
|
24 |
echo $before_widget;
|
25 |
}
|
26 |
|
27 |
$header = get_option('mc_header_content');
|
|
|
|
|
|
|
28 |
|
29 |
// See if we have custom header content
|
30 |
if (!empty($header)) {
|
40 |
}
|
41 |
|
42 |
$sub_heading = trim(get_option('mc_subheader_content'));
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
+
if(get_option('mc_nuke_all_styles') != true) {
|
45 |
+
?>
|
46 |
+
<style>
|
47 |
+
.widget_mailchimpsf_widget .widget-title {
|
48 |
line-height: 1.4em;
|
49 |
margin-bottom: 0.75em;
|
50 |
}
|
116 |
.mc_email_type {
|
117 |
padding-left: 4px;
|
118 |
}
|
119 |
+
</style>
|
120 |
+
<?php
|
121 |
+
}
|
122 |
+
?>
|
123 |
|
124 |
<div id="mc_signup">
|
125 |
<form method="post" action="#mc_signup" id="mc_signup_form">
|
148 |
$num_fields = 0;
|
149 |
foreach((array)$mv as $var) {
|
150 |
$opt = 'mc_mv_'.$var['tag'];
|
151 |
+
if ($var['required'] || get_option($opt) == 'on') {
|
152 |
$num_fields++;
|
153 |
}
|
154 |
}
|
183 |
if (is_array($igs) && !empty($igs)) {
|
184 |
foreach ($igs as $ig) {
|
185 |
if (is_array($ig) && isset($ig['id'])) {
|
186 |
+
if (($igs && get_option('mc_show_interest_groups_'.$ig['id']) == 'on')) {
|
187 |
+
if ($ig['type'] != 'hidden') {
|
188 |
?>
|
189 |
<div class="mc_interests_header">
|
190 |
+
<?php echo esc_html($ig['title']); ?>
|
191 |
</div><!-- /mc_interests_header -->
|
192 |
<div class="mc_interest">
|
193 |
<?php
|
210 |
}
|
211 |
}
|
212 |
|
213 |
+
if (get_option('mc_email_type_option')) {
|
214 |
?>
|
215 |
<div class="mergeRow">
|
216 |
<label class="mc_email_format"><?php _e('Preferred Format', 'mailchimp_i18n'); ?></label>
|
226 |
}
|
227 |
|
228 |
$submit_text = get_option('mc_submit_text');
|
229 |
+
|
|
|
|
|
|
|
230 |
?>
|
231 |
|
232 |
<div class="mc_signup_submit">
|
235 |
|
236 |
|
237 |
<?php
|
238 |
+
$user = get_option('mc_user');
|
239 |
if ($user && get_option('mc_use_unsub_link') == 'on') {
|
240 |
+
$api = mailchimpSF_get_api();
|
241 |
+
$host = 'http://'.$api->datacenter.'.list-manage.com';
|
242 |
?>
|
243 |
<div id="mc_unsub_link" align="center">
|
244 |
+
<a href="<?php echo esc_url($host.'/unsubscribe/?u='.$user['account_id'].'&id='.get_option('mc_list_id')); ?>" target="_blank"><?php esc_html_e('unsubscribe from list', 'mailchimp_i18n'); ?></a>
|
245 |
</div><!-- /mc_unsub_link -->
|
246 |
<?php
|
247 |
}
|
249 |
?>
|
250 |
<br/>
|
251 |
<div id="mc_display_rewards" align="center">
|
252 |
+
<?php esc_html_e('powered by', 'mailchimp_i18n'); ?> <a href="<?php echo esc_url('http://www.mailchimp.com/affiliates/?aid='.$user['account_id'].'&afl=1'); ?>">MailChimp</a>!
|
253 |
</div><!-- /mc_display_rewards -->
|
254 |
<?php
|
255 |
}
|
275 |
}
|
276 |
$html = '';
|
277 |
$set_name = 'group['.$ig['id'].']';
|
278 |
+
switch ($ig['type']) {
|
|
|
279 |
case 'checkboxes':
|
280 |
$i = 1;
|
281 |
foreach($ig['groups'] as $interest){
|
282 |
+
$interest_name = $interest['name'];
|
283 |
+
$interest_id = $interest['id'];
|
284 |
$html .= '
|
285 |
+
|
286 |
+
<input type="checkbox" name="'.esc_attr($set_name.'['.$interest_id.']').'" id="'.esc_attr('mc_interest_'.$ig['id'].'_'.$interest_id).'" class="mc_interest" value="'.esc_attr($interest_name).'" />
|
287 |
+
<label for="'. esc_attr('mc_interest_'.$ig['id'].'_'.$interest_id).'" class="mc_interest_label">'.esc_html($interest_name).'</label>
|
288 |
<br/>';
|
289 |
$i++;
|
290 |
}
|
291 |
break;
|
292 |
case 'radio':
|
293 |
foreach($ig['groups'] as $interest){
|
294 |
+
$interest_name = $interest['name'];
|
295 |
+
$interest_id = $interest['id'];
|
296 |
$html .= '
|
297 |
+
<input type="radio" name="'.esc_attr($set_name).'" id="'.esc_attr('mc_interest_'.$ig['id'].'_'.$interest_id).'" class="mc_interest" value="'.esc_attr($interest_id).'"/>
|
298 |
+
<label for="'.esc_attr('mc_interest_'.$ig['id'].'_'.$interest_id).'" class="mc_interest_label">'.esc_html($interest_name).'</label>
|
299 |
<br/>';
|
300 |
}
|
301 |
break;
|
|
|
302 |
case 'dropdown':
|
303 |
$html .= '
|
304 |
<select name="'.esc_attr($set_name).'">
|
305 |
<option value=""></option>';
|
306 |
foreach($ig['groups'] as $interest){
|
307 |
+
$interest_name = $interest['name'];
|
308 |
+
$interest_id = $interest['id'];
|
309 |
$html .= '
|
310 |
+
<option value="'.esc_attr($interest_id).'">'.esc_html($interest_name).'</option>';
|
311 |
}
|
312 |
$html .= '
|
313 |
</select>';
|
315 |
case 'hidden':
|
316 |
$i = 1;
|
317 |
foreach($ig['groups'] as $interest) {
|
318 |
+
$interest_name = $interest['name'];
|
319 |
+
$interest_id = $interest['id'];
|
320 |
$html .= '
|
321 |
+
<input type="checkbox" name="'.esc_attr($set_name.'['.$i.']').'" id="'.esc_attr('mc_interest_'.$ig['id'].'_'.$interest_id).'" class="mc_interest" value="'.esc_attr($interest_name).'" />
|
322 |
+
<label for="'. esc_attr('mc_interest_'.$ig['id'].'_'.$interest_id).'" class="mc_interest_label">'.esc_html($interest_name).'</label>';
|
323 |
$i++;
|
324 |
}
|
325 |
break;
|
337 |
$opt = 'mc_mv_'.$var['tag'];
|
338 |
$html = '';
|
339 |
// See if that var is set as required, or turned on (for display)
|
340 |
+
if ($var['required'] || get_option($opt) == 'on') {
|
341 |
+
$label = '<label for="'.esc_attr($opt).'" class="mc_var_label mc_header mc_header_'.esc_attr($var['type']).'">'.esc_html($var['name']);
|
342 |
+
if ($var['required'] && $num_fields > 1) {
|
343 |
$label .= '<span class="mc_required">*</span>';
|
344 |
}
|
345 |
$label .= '</label>';
|
347 |
$html .= '
|
348 |
<div class="mc_merge_var">
|
349 |
'.$label;
|
350 |
+
switch ($var['type']) {
|
351 |
case 'date':
|
352 |
$html .= '
|
353 |
+
<input type="text" size="18" placeholder="'.esc_attr($var['default_value']).'" data-format="'.esc_attr($var['options']['date_format']).'" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="date-pick mc_input"/>';
|
354 |
break;
|
355 |
case 'radio':
|
356 |
+
if (is_array($var['options']['choices'])) {
|
357 |
$html .= '
|
358 |
<ul class="mc_list">';
|
359 |
+
foreach ($var['options']['choices'] as $key => $value) {
|
360 |
$html .= '
|
361 |
<li>
|
362 |
+
<input type="radio" id="'.esc_attr($opt.'_'.$key).'" name="'.esc_attr($opt).'" class="mc_radio" value="'.$value.'"'.checked($var['default_value'], $value, false).' />
|
363 |
<label for="'.esc_attr($opt.'_'.$key).'" class="mc_radio_label">'.esc_html($value).'</label>
|
364 |
</li>';
|
365 |
}
|
368 |
}
|
369 |
break;
|
370 |
case 'dropdown':
|
371 |
+
if (is_array($var['options']['choices'])) {
|
372 |
$html .= '
|
373 |
<select id="'.esc_attr($opt).'" name="'.esc_attr($opt).'" class="mc_select">';
|
374 |
+
foreach ($var['options']['choices'] as $value) {
|
375 |
$html .= '
|
376 |
+
<option value="'.esc_attr($value).'"'.selected($value, $var['default_value'], false).'>'.esc_html($value).'</option>';
|
377 |
}
|
378 |
$html .= '
|
379 |
</select>';
|
381 |
break;
|
382 |
case 'birthday':
|
383 |
$html .= '
|
384 |
+
<input type="text" size="18" placeholder="'.esc_attr($var['default_value']).'" data-format="'.esc_attr($var['dateformat']).'" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="birthdate-pick mc_input"/>';
|
385 |
break;
|
386 |
case 'birthday-old':
|
387 |
$days = range(1, 31);
|
423 |
<select name="'.esc_attr($opt.'[country]').'" id="'.esc_attr($opt.'-country').'">';
|
424 |
foreach ($countries as $country_code => $country_name) {
|
425 |
$html .= '
|
426 |
+
<option value="'.esc_attr($country_code).'"'.selected($country_code, $var['options']['default_country'], false).'>'.esc_html($country_name).'</option>';
|
427 |
}
|
428 |
$html .= '
|
429 |
</select>';
|
433 |
<input type="text" size="18" maxlength="5" value="" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="mc_input" />';
|
434 |
break;
|
435 |
case 'phone':
|
436 |
+
if ($var['options']['phone_format'] == 'US') {
|
437 |
$html .= '
|
438 |
<input type="text" size="2" maxlength="3" value="" name="'.esc_attr($opt.'[area]').'" id="'.esc_attr($opt.'-area').'" class="mc_input mc_phone" />
|
439 |
<input type="text" size="2" maxlength="3" value="" name="'.esc_attr($opt.'[detail1]').'" id="'.esc_attr($opt.'-detail1').'" class="mc_input mc_phone" />
|
453 |
case 'number':
|
454 |
default:
|
455 |
$html .= '
|
456 |
+
<input type="text" size="18" placeholder="'.esc_html($var['default_value']).'" name="'.esc_attr($opt).'" id="'.esc_attr($opt).'" class="mc_input"/>';
|
457 |
break;
|
458 |
}
|
459 |
+
if (!empty($var['help_text'])) {
|
460 |
+
$html .= '<span class="mc_help">'.esc_html($var['help_text']).'</span>';
|
461 |
}
|
462 |
$html .= '
|
463 |
</div><!-- /mc_merge_var -->';
|
686 |
'174' => __('Zimbabwe', 'mailchimp_i18n'),
|
687 |
);
|
688 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,37 +1,34 @@
|
|
1 |
=== MailChimp List Subscribe Form ===
|
2 |
-
Contributors:
|
3 |
Tags: mailchimp, email, newsletter, signup, marketing, plugin, widget
|
4 |
Requires at least: 2.8
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
== Description ==
|
9 |
|
10 |
-
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
After Installation, the setup page will guide you through entering your Login information, selecting your List from our Service, selecting options for the Merge Fields and Interest Groups you have setup, and then add the Widget to your site. The time from starting installation to have the form on your site should be less than 5 minutes - absolutely everything can be done via the Wordpress Setting GUI - no file editing at all!
|
15 |
|
16 |
== Installation ==
|
17 |
|
18 |
This section describes how to install the plugin and get started using it.
|
19 |
|
20 |
= Version 2.8+ =
|
21 |
-
1. Unzip our archive and upload the entire
|
22 |
-
2. Activate the plugin through the
|
23 |
-
3.
|
24 |
4. Enter your MailChimp API Key and let the plugin verify it.
|
25 |
-
5. Select
|
26 |
-
6.
|
27 |
-
7.
|
28 |
-
|
29 |
-
9. And you are DONE!
|
30 |
|
31 |
= Advanced =
|
32 |
-
If you have a custom coded sidebar or
|
33 |
|
34 |
-
|
35 |
` [mailchimpsf_form] `
|
36 |
|
37 |
If you are adding it inside a php code block, pop this in:
|
@@ -44,23 +41,7 @@ Or, if you are dropping it in between a bunch of HTML, use this:
|
|
44 |
|
45 |
Where ever you want it to show up.
|
46 |
|
47 |
-
Note: in some environments you will need to install the Exec_PHP plugin to use that method of display. It can be found here:
|
48 |
-
http://wordpress.org/extend/plugins/exec-php/
|
49 |
-
|
50 |
-
== Developer Mode ==
|
51 |
-
|
52 |
-
You can enable "Devleoper Mode" by adding the following line to your `wp-config.php` file just above the "That's all, stope editing!" line.
|
53 |
-
|
54 |
-
define('MAILCHIMP_DEV_MODE', true);
|
55 |
-
|
56 |
-
This will enable the MailChimp List Subscribe plugin to operate without the need to connect an external MailChimp Account, and will provide a
|
57 |
-
subscription form widget that will not actually submit anywhere.
|
58 |
-
|
59 |
-
This will allow you to style and configure the widget in non-production environments that are not publicly accessible.
|
60 |
-
|
61 |
-
For more Developer Mode customization options see the following article:
|
62 |
-
|
63 |
-
http://connect.mailchimp.com/how-to/how-to-article-configuring-developer-mode-for-the-list-subscribe-wordpress-plugin
|
64 |
|
65 |
== Upgrading ==
|
66 |
|
@@ -103,31 +84,6 @@ If your language is not listed above, feel free to create a translation. Here ar
|
|
103 |
7. Make a [pull request](http://help.github.com/send-pull-requests/)
|
104 |
|
105 |
|
106 |
-
== Frequently Asked Questions ==
|
107 |
-
|
108 |
-
= What in the world is MailChimp? =
|
109 |
-
|
110 |
-
Good question! [MailChimp](http://mailchimp.com/features/all/) is full of useful, powerful email marketing features that are easy to use and even a little fun (that's right---we said fun), whether you're an email marketing expert, or a small business just getting started.
|
111 |
-
|
112 |
-
To learn more, just check out our site: [MailChimp](http://mailchimp.com/features/all/)
|
113 |
-
|
114 |
-
|
115 |
-
= Wait a minute, you want me to pay to try this? =
|
116 |
-
|
117 |
-
*Absolutely not!* We welcome you to come signup for a [FREE Trial Account](http://mailchimp.com/signup/) and see if you find it useful.
|
118 |
-
|
119 |
-
= I want this in my language, do you have a translation? =
|
120 |
-
Maybe! Look in the /po/ directory in our plugin package and see if your language is in there. If it is, great! If it is not, feel from to create one. Here are the basic steps:
|
121 |
-
|
122 |
-
1. Copy "mailchimp_i18n-en_US.po" to "mailchimp_i18n-LANG_COUNTRY.po" - fill in LANG and COUNTRY with whatever you use for WPLANG in wp-config.php
|
123 |
-
2. Grab a transalation editor. [POedit](http://www.poedit.net/) works for us
|
124 |
-
3. Translate each line - if you need some context, just open up mailchimp.php and search for the line number or text
|
125 |
-
4. [Fork](http://help.github.com/fork-a-repo/) the [repository on github](https://github.com/crowdfavorite/wp-mailchimp)
|
126 |
-
5. [Clone](http://help.github.com/remotes/#clone) the _develop_ branch
|
127 |
-
6. Add the appropriately named files to the /po/ directory and edit the /readme.txt to include how you'd like to be attributed
|
128 |
-
7. Make a [pull request](http://help.github.com/send-pull-requests/)
|
129 |
-
|
130 |
-
|
131 |
== Screenshots ==
|
132 |
|
133 |
1. Entering your MailChimp login info
|
@@ -138,6 +94,9 @@ Maybe! Look in the /po/ directory in our plugin package and see if your language
|
|
138 |
|
139 |
== Upgrade Notice ==
|
140 |
|
|
|
|
|
|
|
141 |
= 1.4.2 =
|
142 |
add customized wp_nonces functions for post-back behavior to fix 4.0 callbacks
|
143 |
|
@@ -169,16 +128,10 @@ Added support for multiple interest groups, field formatting based on type and d
|
|
169 |
|
170 |
== Changelog ==
|
171 |
|
172 |
-
=1.
|
173 |
-
*
|
174 |
-
*
|
175 |
-
|
176 |
-
= 1.4.4 =
|
177 |
-
* Stop using deprecated widget constructor
|
178 |
-
|
179 |
-
= 1.4.3 =
|
180 |
-
* Fix issue with improperly escaped text fields
|
181 |
-
* Fix issue with malformed update profile link
|
182 |
|
183 |
= 1.4.1 =
|
184 |
* Update styles to be compatible with upcoming 3.8 wp-admin changes
|
1 |
=== MailChimp List Subscribe Form ===
|
2 |
+
Contributors: MailChimp
|
3 |
Tags: mailchimp, email, newsletter, signup, marketing, plugin, widget
|
4 |
Requires at least: 2.8
|
5 |
+
Tested up to: 4.5
|
6 |
+
Stable tag: 1.5
|
7 |
|
8 |
== Description ==
|
9 |
|
10 |
+
Use the MailChimp List Subscribe plugin to quickly add a MailChimp signup form widget to your WordPress 2.8 or higher site.
|
11 |
|
12 |
+
After installation, you’ll log in with your API key, select your MailChimp list, choose merge fields and groups, and add the widget to your site. Typically, installation and setup will take about 5-10 minutes, and absolutely everything can be done via the WordPress Setting GUI, with no file editing at all.
|
|
|
|
|
13 |
|
14 |
== Installation ==
|
15 |
|
16 |
This section describes how to install the plugin and get started using it.
|
17 |
|
18 |
= Version 2.8+ =
|
19 |
+
1. Unzip our archive and upload the entire mailchimp directory to your `/wp-content/plugins/ directory`
|
20 |
+
2. Activate the plugin through the **Plugins** menu in WordPress
|
21 |
+
3. Navigate to **Settings** click **MailChimp Setup**.
|
22 |
4. Enter your MailChimp API Key and let the plugin verify it.
|
23 |
+
5. Select the list where you want to send new MailChimp subscribers.
|
24 |
+
6. Optional: turn **MonkeyRewards** on or off.
|
25 |
+
7. Optional: Turn **Merge Fields** and **Groups** on or off. Navigate to **Appearance**, and click **Widgets**. Drag the MailChimp Widget into one of your Widget Areas.
|
26 |
+
|
|
|
27 |
|
28 |
= Advanced =
|
29 |
+
If you have a custom coded sidebar or bells and whistles that prevent enabling widgets through the WordPress GUI, complete these steps instead.
|
30 |
|
31 |
+
WordPress v2.8 or higher:
|
32 |
` [mailchimpsf_form] `
|
33 |
|
34 |
If you are adding it inside a php code block, pop this in:
|
41 |
|
42 |
Where ever you want it to show up.
|
43 |
|
44 |
+
Note: in some environments you will need to install the Exec_PHP plugin to use that method of display. It can be found here: http://wordpress.org/extend/plugins/exec-php/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
== Upgrading ==
|
47 |
|
84 |
7. Make a [pull request](http://help.github.com/send-pull-requests/)
|
85 |
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
== Screenshots ==
|
88 |
|
89 |
1. Entering your MailChimp login info
|
94 |
|
95 |
== Upgrade Notice ==
|
96 |
|
97 |
+
= 1.5 =
|
98 |
+
Updates the MailChimp API version, adds double/single opt-in toggle.
|
99 |
+
|
100 |
= 1.4.2 =
|
101 |
add customized wp_nonces functions for post-back behavior to fix 4.0 callbacks
|
102 |
|
128 |
|
129 |
== Changelog ==
|
130 |
|
131 |
+
= 1.5 =
|
132 |
+
* Upgrade to MailChimp API v3.0
|
133 |
+
* Remove OAuth2 middle layer and use MailChimp API keys
|
134 |
+
* Include double/single opt-in toggle.
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
= 1.4.1 =
|
137 |
* Update styles to be compatible with upcoming 3.8 wp-admin changes
|
scrollTo.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jQuery.ScrollTo - Easy element scrolling using jQuery.
|
3 |
+
* Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
|
4 |
+
* Dual licensed under MIT and GPL.
|
5 |
+
* Date: 5/25/2009
|
6 |
+
* @author Ariel Flesler
|
7 |
+
* @version 1.4.2
|
8 |
+
*
|
9 |
+
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
|
10 |
+
*/
|
11 |
+
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
|
views/css/frontend.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php ?>
|
2 |
+
.mc_error_msg {
|
3 |
+
color: red;
|
4 |
+
margin-bottom: 1.0em;
|
5 |
+
}
|
6 |
+
.mc_success_msg {
|
7 |
+
color: green;
|
8 |
+
margin-bottom: 1.0em;
|
9 |
+
}
|
10 |
+
.mc_merge_var{
|
11 |
+
padding:0;
|
12 |
+
margin:0;
|
13 |
+
}
|
14 |
+
<?php
|
15 |
+
// If we're utilizing custom styles
|
16 |
+
if (get_option('mc_custom_style')=='on'){
|
17 |
+
?>
|
18 |
+
#mc_signup_form {
|
19 |
+
padding:5px;
|
20 |
+
border-width: <?php echo get_option('mc_form_border_width'); ?>px;
|
21 |
+
border-style: <?php echo (get_option('mc_form_border_width')==0) ? 'none' : 'solid'; ?>;
|
22 |
+
border-color: #<?php echo get_option('mc_form_border_color'); ?>;
|
23 |
+
color: #<?php echo get_option('mc_form_text_color'); ?>;
|
24 |
+
background-color: #<?php echo get_option('mc_form_background'); ?>;
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
.mc_custom_border_hdr {
|
29 |
+
border-width: <?php echo get_option('mc_header_border_width'); ?>px;
|
30 |
+
border-style: <?php echo (get_option('mc_header_border_width')==0) ? 'none' : 'solid'; ?>;
|
31 |
+
border-color: #<?php echo get_option('mc_header_border_color'); ?>;
|
32 |
+
color: #<?php echo get_option('mc_header_text_color'); ?>;
|
33 |
+
background-color: #<?php echo get_option('mc_header_background'); ?>;
|
34 |
+
<!-- font-size: 1.2em;-->
|
35 |
+
padding:5px 10px;
|
36 |
+
width: 100%;
|
37 |
+
}
|
38 |
+
<?php
|
39 |
+
}
|
40 |
+
?>
|
41 |
+
#mc_signup_container {}
|
42 |
+
#mc_signup_form {}
|
43 |
+
#mc_signup_form .mc_var_label {}
|
44 |
+
#mc_signup_form .mc_input {}
|
45 |
+
#mc-indicates-required {
|
46 |
+
width:100%;
|
47 |
+
}
|
48 |
+
#mc_display_rewards {}
|
49 |
+
.mc_interests_header {
|
50 |
+
font-weight:bold;
|
51 |
+
}
|
52 |
+
div.mc_interest{
|
53 |
+
width:100%;
|
54 |
+
}
|
55 |
+
#mc_signup_form input.mc_interest {}
|
56 |
+
#mc_signup_form select {}
|
57 |
+
#mc_signup_form label.mc_interest_label {
|
58 |
+
display:inline;
|
59 |
+
}
|
60 |
+
.mc_signup_submit {
|
61 |
+
text-align:center;
|
62 |
+
}
|
63 |
+
ul.mc_list {
|
64 |
+
list-style-type: none;
|
65 |
+
}
|
66 |
+
ul.mc_list li {
|
67 |
+
font-size: 12px;
|
68 |
+
}
|
69 |
+
#ui-datepicker-div .ui-datepicker-year {
|
70 |
+
display: none;
|
71 |
+
}
|
72 |
+
#ui-datepicker-div.show .ui-datepicker-year {
|
73 |
+
display: inline;
|
74 |
+
padding-left: 3px
|
75 |
+
}
|
views/datepicker.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
?>
|
4 |
+
<script type="text/javascript">
|
5 |
+
jQuery(function($) {
|
6 |
+
$('.date-pick').each(function() {
|
7 |
+
var format = $(this).data('format') || 'mm/dd/yyyy';
|
8 |
+
format = format.replace(/yyyy/i, 'yy');
|
9 |
+
$(this).datepicker({
|
10 |
+
autoFocusNextInput: true,
|
11 |
+
constrainInput: false,
|
12 |
+
changeMonth: true,
|
13 |
+
changeYear: true,
|
14 |
+
beforeShow: function(input, inst) { $('#ui-datepicker-div').addClass('show'); },
|
15 |
+
dateFormat: format.toLowerCase(),
|
16 |
+
});
|
17 |
+
});
|
18 |
+
d = new Date();
|
19 |
+
$('.birthdate-pick').each(function() {
|
20 |
+
var format = $(this).data('format') || 'mm/dd';
|
21 |
+
format = format.replace(/yyyy/i, 'yy');
|
22 |
+
$(this).datepicker({
|
23 |
+
autoFocusNextInput: true,
|
24 |
+
constrainInput: false,
|
25 |
+
changeMonth: true,
|
26 |
+
changeYear: false,
|
27 |
+
minDate: new Date(d.getFullYear(), 1-1, 1),
|
28 |
+
maxDate: new Date(d.getFullYear(), 12-1, 31),
|
29 |
+
beforeShow: function(input, inst) { $('#ui-datepicker-div').removeClass('show'); },
|
30 |
+
dateFormat: format.toLowerCase(),
|
31 |
+
});
|
32 |
+
|
33 |
+
});
|
34 |
+
|
35 |
+
});
|
36 |
+
</script>
|
views/setup_page.php
ADDED
@@ -0,0 +1,445 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
|
3 |
+
<div class="mailchimp-header">
|
4 |
+
<h2><?php esc_html_e('MailChimp List Setup', 'mailchimp_i18n');?> </h2>
|
5 |
+
</div>
|
6 |
+
<?php
|
7 |
+
|
8 |
+
$user = get_option('mc_user');
|
9 |
+
/* TODO MC SOPRESTO USER INFO */
|
10 |
+
|
11 |
+
// If we have an API Key, see if we need to change the lists and its options
|
12 |
+
mailchimpSF_change_list_if_necessary();
|
13 |
+
|
14 |
+
// Display our success/error message(s) if have them
|
15 |
+
if (mailchimpSF_global_msg() != ''){
|
16 |
+
// Message has already been html escaped, so we don't want to 2x escape it here
|
17 |
+
?>
|
18 |
+
<div id="mc_message" class=""><?php echo mailchimpSF_global_msg(); ?></div>
|
19 |
+
<?php
|
20 |
+
}
|
21 |
+
|
22 |
+
// If we don't have an API Key, do a login form
|
23 |
+
if (!$user || !get_option('mc_api_key')) {
|
24 |
+
?>
|
25 |
+
<div>
|
26 |
+
<h3 class="mc-h2"><?php esc_html_e('Log In', 'mailchimp_i18n');?></h3>
|
27 |
+
<p class="mc-p" style="width: 40%;line-height: 21px;"><?php echo __('To get started, we’ll need to access your MailChimp account with an <a href="http://kb.mailchimp.com/integrations/api-integrations/about-api-keys">API Key</a>. Paste your MailChimp API key, and click <strong>Connect</strong> to continue.
|
28 |
+
', 'mailchimp_i18n'); ?></p>
|
29 |
+
<p class="mc-a">
|
30 |
+
<?php
|
31 |
+
echo sprintf(
|
32 |
+
'%1$s <a href="http://www.mailchimp.com/signup/" target="_blank">%2$s</a>',
|
33 |
+
esc_html(__("Don't have a MailChimp account?", 'mailchimp_i18n')),
|
34 |
+
esc_html(__('Try one for Free!', 'mailchimp_i18n'))
|
35 |
+
);
|
36 |
+
?>
|
37 |
+
</p>
|
38 |
+
|
39 |
+
<div style="width: 900px;">
|
40 |
+
<table class="widefat mc-widefat mc-api">
|
41 |
+
<form method="POST" action="">
|
42 |
+
<tr valign="top">
|
43 |
+
<th scope="row" class="mailchimp-connect"><?php esc_html_e('Connect to MailChimp', 'mailchimp_i18n'); ?></th>
|
44 |
+
<td>
|
45 |
+
<input type="hidden" name="mcsf_action" value="login"/>
|
46 |
+
<input type="password" name="mailchimpSF_api_key" placeholder="API Key">
|
47 |
+
</td>
|
48 |
+
<td>
|
49 |
+
<input type="submit" value="Connnect">
|
50 |
+
</td>
|
51 |
+
</tr>
|
52 |
+
</form>
|
53 |
+
</table>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<br/>
|
58 |
+
<?php
|
59 |
+
if ($user && $user['username'] != '') {
|
60 |
+
?>
|
61 |
+
<!--<div class="notes_msg">
|
62 |
+
<strong><?php esc_html_e('Notes', 'mailchimp_i18n'); ?>:</strong>
|
63 |
+
<ul>
|
64 |
+
<li><?php esc_html_e('Changing your settings at MailChimp.com may cause this to stop working.', 'mailchimp_i18n'); ?></li>
|
65 |
+
<li><?php esc_html_e('If you change your login to a different account, the info you have setup below will be erased.', 'mailchimp_i18n'); ?></li>
|
66 |
+
<li><?php esc_html_e('If any of that happens, no biggie - just reconfigure your login and the items below...', 'mailchimp_i18n'); ?></li>
|
67 |
+
</ul>
|
68 |
+
</div>-->
|
69 |
+
<?php
|
70 |
+
}
|
71 |
+
} // End of login form
|
72 |
+
|
73 |
+
// Start logout form
|
74 |
+
else {
|
75 |
+
?>
|
76 |
+
<table style="min-width:400px;" class="mc-user" cellspacing="0">
|
77 |
+
<tr>
|
78 |
+
<td><h3><?php esc_html_e('Logged in as', 'mailchimp_i18n');?>: <?php echo esc_html($user['username']);
|
79 |
+
?></h3>
|
80 |
+
</td>
|
81 |
+
<td>
|
82 |
+
<form method="post" action="">
|
83 |
+
<input type="hidden" name="mcsf_action" value="logout"/>
|
84 |
+
<input type="submit" name="Submit" value="<?php esc_attr_e('Logout', 'mailchimp_i18n');?>" class="button" />
|
85 |
+
<?php wp_nonce_field('mc_logout', '_mcsf_nonce_action'); ?>
|
86 |
+
</form>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
</table>
|
90 |
+
<?php
|
91 |
+
} // End Logout form
|
92 |
+
|
93 |
+
//Just get out if nothing else matters...
|
94 |
+
$api = mailchimpSF_get_api();
|
95 |
+
if (!$api) { return; }
|
96 |
+
|
97 |
+
if ($api){
|
98 |
+
?>
|
99 |
+
<h3 class="mc-h2"><?php esc_html_e('Your Lists', 'mailchimp_i18n'); ?></h3>
|
100 |
+
|
101 |
+
<div>
|
102 |
+
|
103 |
+
<p class="mc-p"><?php esc_html_e('Please select the MailChimp list you’d like to connect to your form.', 'mailchimp_i18n'); ?></p>
|
104 |
+
<p class="mc-list-note"><strong><?php esc_html_e('Note:', 'mailchimp_i18n'); ?></strong> <?php esc_html_e('Updating your list will not remove list settings in this plugin, but changing lists will.', 'mailchimp_i18n'); ?></p>
|
105 |
+
|
106 |
+
<form method="post" action="options-general.php?page=mailchimpSF_options">
|
107 |
+
<?php
|
108 |
+
//we *could* support paging, but few users have that many lists (and shouldn't)
|
109 |
+
$lists = $api->get('lists',100);
|
110 |
+
$lists = $lists['lists'];
|
111 |
+
|
112 |
+
if (count($lists) == 0) {
|
113 |
+
?>
|
114 |
+
<span class='error_msg'>
|
115 |
+
<?php
|
116 |
+
echo sprintf(
|
117 |
+
esc_html(__("Uh-oh, you don't have any lists defined! Please visit %s, login, and setup a list before using this tool!", 'mailchimp_i18n')),
|
118 |
+
"<a href='http://www.mailchimp.com/'>MailChimp</a>"
|
119 |
+
);
|
120 |
+
?>
|
121 |
+
</span>
|
122 |
+
<?php
|
123 |
+
}
|
124 |
+
else {
|
125 |
+
?>
|
126 |
+
<table style="min-width:400px" class="mc-list-select" cellspacing="0">
|
127 |
+
<tr class="mc-list-row">
|
128 |
+
<td>
|
129 |
+
<select name="mc_list_id" style="min-width:200px;">
|
130 |
+
<option value=""> — <?php esc_html_e('Select A List','mailchimp_i18n'); ?> — </option>
|
131 |
+
<?php
|
132 |
+
foreach ($lists as $list) {
|
133 |
+
$option = get_option('mc_list_id');
|
134 |
+
?>
|
135 |
+
<option value="<?php echo esc_attr($list['id']); ?>"<?php selected($list['id'], $option); ?>><?php echo esc_html($list['name']); ?></option>
|
136 |
+
<?php
|
137 |
+
}
|
138 |
+
?>
|
139 |
+
</select>
|
140 |
+
</td>
|
141 |
+
<td>
|
142 |
+
<input type="hidden" name="mcsf_action" value="update_mc_list_id" />
|
143 |
+
<input type="submit" name="Submit" value="<?php esc_attr_e('Update List', 'mailchimp_i18n'); ?>" class="button" />
|
144 |
+
</td>
|
145 |
+
</tr>
|
146 |
+
</table>
|
147 |
+
<?php
|
148 |
+
} //end select list
|
149 |
+
?>
|
150 |
+
</form>
|
151 |
+
</div>
|
152 |
+
|
153 |
+
<br/>
|
154 |
+
|
155 |
+
<?php
|
156 |
+
}
|
157 |
+
else {
|
158 |
+
//display the selected list...
|
159 |
+
?>
|
160 |
+
|
161 |
+
<p class="submit">
|
162 |
+
<form method="post" action="options-general.php?page=mailchimpSF_options">
|
163 |
+
<input type="hidden" name="mcsf_action" value="reset_list" />
|
164 |
+
<input type="submit" name="reset_list" value="<?php esc_attr_e('Reset List Options and Select again', 'mailchimp_i18n'); ?>" class="button" />
|
165 |
+
<?php wp_nonce_field('reset_mailchimp_list', '_mcsf_nonce_action'); ?>
|
166 |
+
</form>
|
167 |
+
</p>
|
168 |
+
<h3><?php esc_html_e('Subscribe Form Widget Settings for this List', 'mailchimp_i18n'); ?>:</h3>
|
169 |
+
<h4><?php esc_html_e('Selected MailChimp List', 'mailchimp_i18n'); ?>: <?php echo esc_html(get_option('mc_list_name')); ?></h4>
|
170 |
+
<?php
|
171 |
+
}
|
172 |
+
|
173 |
+
//Just get out if nothing else matters...
|
174 |
+
if (get_option('mc_list_id') == '') return;
|
175 |
+
|
176 |
+
|
177 |
+
// The main Settings form
|
178 |
+
?>
|
179 |
+
|
180 |
+
<div>
|
181 |
+
<form method="post" action="options-general.php?page=mailchimpSF_options">
|
182 |
+
<div style="width:900px;">
|
183 |
+
<input type="hidden" name="mcsf_action" value="change_form_settings">
|
184 |
+
<?php wp_nonce_field('update_general_form_settings', '_mcsf_nonce_action'); ?>
|
185 |
+
|
186 |
+
<table class="widefat mc-widefat mc-label-options">
|
187 |
+
<tr><th colspan="2">Content Options</th></tr>
|
188 |
+
<tr valign="top">
|
189 |
+
<th scope="row"><?php esc_html_e('Header', 'mailchimp_i18n'); ?></th>
|
190 |
+
<td>
|
191 |
+
<textarea name="mc_header_content" rows="2" cols="70"><?php echo esc_html(get_option('mc_header_content')); ?></textarea><br/>
|
192 |
+
<?php esc_html_e('Add your own text, HTML markup (including image links), or keep it blank.', 'mailchimp_i18n'); ?>
|
193 |
+
</td>
|
194 |
+
</tr>
|
195 |
+
|
196 |
+
<tr valign="top">
|
197 |
+
<th scope="row"><?php esc_html_e('Sub-header', 'mailchimp_i18n'); ?></th>
|
198 |
+
<td>
|
199 |
+
<textarea name="mc_subheader_content" rows="2" cols="70"><?php echo esc_html(get_option('mc_subheader_content')); ?></textarea><br/>
|
200 |
+
<?php esc_html_e('Add your own text, HTML markup (including image links), or keep it blank.', 'mailchimp_i18n'); ?>.<br/>
|
201 |
+
<?php esc_html_e('This will be displayed under the heading and above the form.', 'mailchimp_i18n'); ?>
|
202 |
+
</td>
|
203 |
+
</tr>
|
204 |
+
|
205 |
+
<tr valign="top" class="last-row">
|
206 |
+
<th scope="row"><?php esc_html_e('Submit Button', 'mailchimp_i18n'); ?></th>
|
207 |
+
<td>
|
208 |
+
<input type="text" name="mc_submit_text" size="70" value="<?php echo esc_attr(get_option('mc_submit_text')); ?>"/>
|
209 |
+
</td>
|
210 |
+
</tr>
|
211 |
+
</table>
|
212 |
+
|
213 |
+
<input type="submit" value="<?php esc_attr_e('Update Subscribe Form Settings', 'mailchimp_i18n'); ?>" class="button mc-submit" /><br/>
|
214 |
+
|
215 |
+
<table class="widefat mc-widefat mc-nuke-styling">
|
216 |
+
<tr><th colspan="2">Remove MailChimp CSS</th></tr>
|
217 |
+
<tr class="mc-internal-heading"><th><label for="mc_nuke_all_styles"><?php esc_html_e('Remove CSS');?></label></th><td><span class="mc-pre-input"></span><input type="checkbox" name="mc_nuke_all_styles" id="mc_nuke_all_styles" <?php checked(get_option('mc_nuke_all_styles'), true);?> onclick="showMe('mc-custom-styling')"/><?php esc_html_e('This will disable all MailChimp CSS, so it’s recommended for WordPress experts only.');?></td></tr>
|
218 |
+
</table>
|
219 |
+
<?php if(get_option('mc_nuke_all_styles') == true) {
|
220 |
+
?>
|
221 |
+
<table class="widefat mc-widefat mc-custom-styling" id="mc-custom-styling" style="display:none">
|
222 |
+
<?php } else {?>
|
223 |
+
<table class="widefat mc-widefat mc-custom-styling" id="mc-custom-styling">
|
224 |
+
<?php } ?>
|
225 |
+
<tr><th colspan="2">Custom Styling</th></tr>
|
226 |
+
<tr class="mc-turned-on"><th><label for="mc_custom_style"><?php esc_html_e('Enabled?', 'mailchimp_i18n'); ?></label></th><td><span class="mc-pre-input"></span><input type="checkbox" name="mc_custom_style" id="mc_custom_style"<?php checked(get_option('mc_custom_style'), 'on'); ?> /><?php esc_html_e('Edit the default MailChimp CSS style.');?></td></tr>
|
227 |
+
|
228 |
+
<tr><th><?php esc_html_e('Border Width (px)', 'mailchimp_i18n'); ?></th><td><span class="mc-pre-input"></span><input type="text" name="mc_form_border_width" size="3" maxlength="3" value="<?php echo esc_attr(get_option('mc_form_border_width')); ?>"/>
|
229 |
+
<em><?php esc_html_e('Set to 0 for no border, do not enter', 'mailchimp_i18n'); ?> px</em>
|
230 |
+
</td></tr>
|
231 |
+
<tr><th><?php esc_html_e('Border Color', 'mailchimp_i18n'); ?></th><td><span class="mc-pre-input">#</span><input type="text" name="mc_form_border_color" size="7" maxlength="6" value="<?php echo esc_attr(get_option('mc_form_border_color')); ?>"/>
|
232 |
+
<em><?php esc_html_e('Do not enter initial', 'mailchimp_i18n'); ?> <strong>#</strong></em>
|
233 |
+
</td></tr>
|
234 |
+
<tr><th><?php esc_html_e('Text Color', 'mailchimp_i18n'); ?></th><td><span class="mc-pre-input">#</span><input type="text" name="mc_form_text_color" size="7" maxlength="6" value="<?php echo esc_attr(get_option('mc_form_text_color')); ?>"/>
|
235 |
+
<em><?php esc_html_e('Do not enter initial', 'mailchimp_i18n'); ?> <strong>#</strong></em>
|
236 |
+
</td></tr>
|
237 |
+
<tr class="last-row"><th><?php esc_html_e('Background Color', 'mailchimp_i18n'); ?></th><td><span class="mc-pre-input">#</span><input type="text" name="mc_form_background" size="7" maxlength="6" value="<?php echo esc_attr(get_option('mc_form_background')); ?>"/>
|
238 |
+
<em><?php esc_html_e('Do not enter initial', 'mailchimp_i18n'); ?> <strong>#</strong></em>
|
239 |
+
</td></tr>
|
240 |
+
</table>
|
241 |
+
|
242 |
+
<input type="submit" value="<?php esc_attr_e('Update Subscribe Form Settings', 'mailchimp_i18n'); ?>" class="button mc-submit" /><br/>
|
243 |
+
|
244 |
+
|
245 |
+
<table class="widefat mc-widefat">
|
246 |
+
<tr><th colspan="2">List Options</th></tr>
|
247 |
+
<tr valign="top">
|
248 |
+
<th scope="row"><?php esc_html_e('MonkeyRewards', 'mailchimp_i18n'); ?>?</th>
|
249 |
+
<td><input name="mc_rewards" type="checkbox"<?php if (get_option('mc_rewards')=='on' || get_option('mc_rewards')=='' ) { echo ' checked="checked"'; } ?> id="mc_rewards" class="code" />
|
250 |
+
<em><label for="mc_rewards"><?php echo __('We’ll add a "powered by MailChimp" link to your form that will help you earn <a href="http://kb.mailchimp.com/accounts/account-setup/monkeyrewards-credits" target="_blank">MonkeyRewards</a>. You can turn it off at any time.', 'mailchimp_i18n'); ?></label></em>
|
251 |
+
</td>
|
252 |
+
</tr>
|
253 |
+
|
254 |
+
<tr valign="top">
|
255 |
+
<th scope="row"><?php esc_html_e('Use JavaScript Support?', 'mailchimp_i18n'); ?></th>
|
256 |
+
<td><input name="mc_use_javascript" type="checkbox" <?php checked(get_option('mc_use_javascript'), 'on'); ?> id="mc_use_javascript" class="code" />
|
257 |
+
<em><label for="mc_use_javascript"><?php esc_html_e('This plugin uses JavaScript submission, and it should degrade gracefully for users not using JavaScript. It is optional, and you can turn it off at any time.', 'mailchimp_i18n'); ?></label></em>
|
258 |
+
</td>
|
259 |
+
</tr>
|
260 |
+
|
261 |
+
<tr valign="top">
|
262 |
+
<th scope="row"><?php esc_html_e('Use JavaScript Datepicker?', 'mailchimp_i18n'); ?></th>
|
263 |
+
<td><input name="mc_use_datepicker" type="checkbox" <?php checked(get_option('mc_use_datepicker'), 'on'); ?> id="mc_use_datepicker" class="code" />
|
264 |
+
<em><label for="mc_use_datepicker"><?php esc_html_e('We’ll use the jQuery UI Datepicker for dates.', 'mailchimp_i18n'); ?></label></em>
|
265 |
+
</td>
|
266 |
+
</tr>
|
267 |
+
|
268 |
+
<tr valign="top">
|
269 |
+
<th scope="row"><?php esc_html_e('Use Double Opt-In (Recommended)?', 'mailchimp_i18n'); ?></th>
|
270 |
+
<td><input name="mc_double_optin" type="checkbox" <?php checked(get_option('mc_double_optin'), true); ?> id="mc_double_optin" class="code" />
|
271 |
+
<em><label for="mc_double_optin"><?php esc_html_e('Before new your subscribers are added via the plugin, they\'ll need to confirm their email address.', 'mailchimp_i18n'); ?></label></em>
|
272 |
+
</td>
|
273 |
+
</tr>
|
274 |
+
|
275 |
+
<tr valign="top" class="last-row">
|
276 |
+
<th scope="row"><?php esc_html_e('Include Unsubscribe link?', 'mailchimp_i18n'); ?></th>
|
277 |
+
<td><input name="mc_use_unsub_link" type="checkbox"<?php checked(get_option('mc_use_unsub_link'), 'on'); ?> id="mc_use_unsub_link" class="code" />
|
278 |
+
<em><label for="mc_use_unsub_link"><?php esc_html_e('We’ll automatically add a link to your list’s unsubscribe form.', 'mailchimp_i18n'); ?></label></em>
|
279 |
+
</td>
|
280 |
+
</tr>
|
281 |
+
</table>
|
282 |
+
|
283 |
+
</div>
|
284 |
+
|
285 |
+
<div style="width:900px;">
|
286 |
+
|
287 |
+
<input type="submit" value="<?php esc_attr_e('Update Subscribe Form Settings', 'mailchimp_i18n'); ?>" class="button mc-submit" /><br/>
|
288 |
+
|
289 |
+
<table class='widefat mc-widefat'>
|
290 |
+
<tr>
|
291 |
+
<th colspan="4">
|
292 |
+
<?php esc_html_e('Merge Fields Included', 'mailchimp_i18n'); ?>
|
293 |
+
|
294 |
+
<?php
|
295 |
+
$mv = get_option('mc_merge_vars');
|
296 |
+
|
297 |
+
if (count($mv) == 0 || !is_array($mv)){
|
298 |
+
?>
|
299 |
+
<em><?php esc_html_e('No Merge Fields found.', 'mailchimp_i18n'); ?></em>
|
300 |
+
<?php
|
301 |
+
} else {
|
302 |
+
?>
|
303 |
+
</th>
|
304 |
+
</tr>
|
305 |
+
<tr valign="top">
|
306 |
+
<th><?php esc_html_e('Name', 'mailchimp_i18n');?></th>
|
307 |
+
<th><?php esc_html_e('Tag', 'mailchimp_i18n');?></th>
|
308 |
+
<th><?php esc_html_e('Required?', 'mailchimp_i18n');?></th>
|
309 |
+
<th><?php esc_html_e('Include?', 'mailchimp_i18n');?></th>
|
310 |
+
</tr>
|
311 |
+
<?php
|
312 |
+
foreach($mv as $var){
|
313 |
+
?>
|
314 |
+
<tr valign="top">
|
315 |
+
<td><?php echo esc_html($var['name']); ?></td>
|
316 |
+
<td><?php echo esc_html($var['tag']); ?></td>
|
317 |
+
<td><?php echo esc_html(($var['required'] == 1) ? 'Y' : 'N'); ?></td>
|
318 |
+
<td>
|
319 |
+
<?php
|
320 |
+
if (!$var['required']){
|
321 |
+
$opt = 'mc_mv_'.$var['tag'];
|
322 |
+
?>
|
323 |
+
<input name="<?php echo esc_attr($opt); ?>" type="checkbox" id="<?php echo esc_attr($opt); ?>" class="code"<?php checked(get_option($opt), 'on'); ?> />
|
324 |
+
<?php
|
325 |
+
} else {
|
326 |
+
?>
|
327 |
+
—
|
328 |
+
<?php
|
329 |
+
}
|
330 |
+
?>
|
331 |
+
</td>
|
332 |
+
</tr>
|
333 |
+
<?php
|
334 |
+
}
|
335 |
+
?>
|
336 |
+
</table>
|
337 |
+
<input type="submit" value="<?php esc_attr_e('Update Subscribe Form Settings', 'mailchimp_i18n'); ?>" class="button mc-submit" /><br/>
|
338 |
+
</div>
|
339 |
+
|
340 |
+
<?php
|
341 |
+
// Interest Groups Table
|
342 |
+
$igs = get_option('mc_interest_groups');
|
343 |
+
if (is_array($igs) && !isset($igs['id'])) { ?>
|
344 |
+
<h3 class="mc-h3"><?php esc_html_e('Group Settings', 'mailchimp_i18n'); ?></h3> <?php
|
345 |
+
// Determines whether or not to continue processing. Only false if there was an error.
|
346 |
+
$continue = true;
|
347 |
+
foreach ($igs as $ig) {
|
348 |
+
if ($continue) {
|
349 |
+
if (!is_array($ig) || empty($ig) || $ig == 'N' ) {
|
350 |
+
?>
|
351 |
+
<em><?php esc_html_e('No Interest Groups Setup for this List', 'mailchimp_i18n'); ?></em>
|
352 |
+
<?php
|
353 |
+
$continue = false;
|
354 |
+
}
|
355 |
+
else {
|
356 |
+
?>
|
357 |
+
<table class='mc-widefat mc-blue' width="450px" cellspacing="0">
|
358 |
+
<tr valign="top">
|
359 |
+
<th colspan="2"><?php echo esc_html($ig['title']); ?></th>
|
360 |
+
</tr>
|
361 |
+
<tr valign="top">
|
362 |
+
<th>
|
363 |
+
<label for="<?php echo esc_attr('mc_show_interest_groups_'.$ig['id']); ?>"><?php esc_html_e('Show?', 'mailchimp_i18n'); ?></label>
|
364 |
+
</th>
|
365 |
+
<th>
|
366 |
+
<input name="<?php echo esc_attr('mc_show_interest_groups_'.$ig['id']); ?>" id="<?php echo esc_attr('mc_show_interest_groups_'.$ig['id']); ?>" type="checkbox" class="code"<?php checked('on', get_option('mc_show_interest_groups_'.$ig['id'])); ?> />
|
367 |
+
</th>
|
368 |
+
</tr>
|
369 |
+
<tr valign="top">
|
370 |
+
<th><?php esc_html_e('Input Type', 'mailchimp_i18n'); ?></th>
|
371 |
+
<td><?php echo esc_html($ig['type']); ?></td>
|
372 |
+
</tr>
|
373 |
+
<tr valign="top" class="last-row">
|
374 |
+
<th><?php esc_html_e('Options', 'mailchimp_i18n'); ?></th>
|
375 |
+
<td>
|
376 |
+
<ul>
|
377 |
+
<?php
|
378 |
+
foreach($ig['groups'] as $interest){
|
379 |
+
?>
|
380 |
+
<li><?php echo esc_html($interest['name']); ?></li>
|
381 |
+
<?php
|
382 |
+
}
|
383 |
+
?>
|
384 |
+
</ul>
|
385 |
+
</td>
|
386 |
+
</tr>
|
387 |
+
</table>
|
388 |
+
<?php
|
389 |
+
}
|
390 |
+
}
|
391 |
+
}
|
392 |
+
}
|
393 |
+
}
|
394 |
+
?>
|
395 |
+
<div style="width: 900px; margin-top: 35px;">
|
396 |
+
<table class="widefat mc-widefat mc-yellow">
|
397 |
+
<tr><th colspan="2">CSS Cheat Sheet</th></tr>
|
398 |
+
<tr valign="top">
|
399 |
+
<th scope="row">.widget_mailchimpsf_widget </th>
|
400 |
+
<td>This targets the entire widget container.</td>
|
401 |
+
</tr>
|
402 |
+
<tr valign="top">
|
403 |
+
<th scope="row">.widget-title</th>
|
404 |
+
<td>This styles the title of your MailChimp widget. <i>Modifying this class will affect your other widget titles.</i></td>
|
405 |
+
</tr>
|
406 |
+
<tr valign="top">
|
407 |
+
<th scope="row">#mc_signup</th>
|
408 |
+
<td>This targets the entirity of the widget beneath the widget title.</td>
|
409 |
+
</tr>
|
410 |
+
<tr valign="top">
|
411 |
+
<th scope="row">#mc_subheader</th>
|
412 |
+
<td>This styles the subheader text.</td>
|
413 |
+
</tr>
|
414 |
+
<tr valign="top">
|
415 |
+
<th scope="row">.mc_form_inside</th>
|
416 |
+
<td>The guts and main container for the all of the form elements (the entirety of the widget minus the header and the sub header).</td>
|
417 |
+
</tr>
|
418 |
+
<tr valign="top">
|
419 |
+
<th scope="row">.mc_header</th>
|
420 |
+
<td>This targets the label above the input fields.</td>
|
421 |
+
</tr>
|
422 |
+
<tr valign="top">
|
423 |
+
<th scope="row">.mc_input</th>
|
424 |
+
<td>This attaches to the input fields.</td>
|
425 |
+
</tr>
|
426 |
+
<tr valign="top">
|
427 |
+
<th scope="row">.mc_header_address</th>
|
428 |
+
<td>This is the label above an address group.</td>
|
429 |
+
</tr>
|
430 |
+
<tr valign="top">
|
431 |
+
<th scope="row">.mc_radio_label</th>
|
432 |
+
<td>These are the labels associated with radio buttons.</td>
|
433 |
+
</tr>
|
434 |
+
<tr valign="top">
|
435 |
+
<th scope="row">#mc-indicates-required</th>
|
436 |
+
<td>This targets the “Indicates Required Field” text.</td>
|
437 |
+
</tr>
|
438 |
+
<tr valign="top">
|
439 |
+
<th scope="row">#mc_signup_submit</th>
|
440 |
+
<td>Use this to style the submit button.</td>
|
441 |
+
</tr>
|
442 |
+
</table>
|
443 |
+
</div>
|
444 |
+
|
445 |
+
</form>
|