Version Description
- Complete rewrite, using jquery-ui's datepicker
Download this release
Release Info
Developer | shockware |
Plugin | Contact Form 7 Datepicker |
Version | 2.0 |
Comparing to | |
See all releases |
Code changes from version 0.7.4 to 2.0
- .gitignore +0 -1
- admin.php +182 -0
- contact-form-7-datepicker.php +48 -887
- css/jsDatePick_ltr.css +0 -68
- css/jsDatePick_ltr.min.css +0 -1
- css/jsDatePick_rtl.css +0 -68
- css/jsDatePick_rtl.min.css +0 -1
- css/schemes/red.css +0 -12
- date-module.php +185 -0
- date-tag-generator.php +156 -0
- datepicker.php +159 -0
- img/aqua/aqua_dayDown.gif +0 -0
- img/aqua/aqua_dayNormal.gif +0 -0
- img/aqua/aqua_dayOver.gif +0 -0
- img/armygreen/armygreen_dayDown.gif +0 -0
- img/armygreen/armygreen_dayNormal.gif +0 -0
- img/armygreen/armygreen_dayOver.gif +0 -0
- img/bananasplit/bananasplit_dayDown.gif +0 -0
- img/bananasplit/bananasplit_dayNormal.gif +0 -0
- img/bananasplit/bananasplit_dayOver.gif +0 -0
- img/beige/beige_dayDown.gif +0 -0
- img/beige/beige_dayNormal.gif +0 -0
- img/beige/beige_dayOver.gif +0 -0
- img/boxBottomLeftCorner.png +0 -0
- img/boxBottomRightCorner.png +0 -0
- img/boxSideWallPx.gif +0 -0
- img/boxSideWallPx.png +0 -0
- img/boxTopLeftCorner.png +0 -0
- img/boxTopPx.gif +0 -0
- img/boxTopPx.png +0 -0
- img/boxTopRightCorner.png +0 -0
- img/closeButton_down.gif +0 -0
- img/closeButton_normal.gif +0 -0
- img/closeButton_over.gif +0 -0
- img/deepblue/deepblue_dayDown.gif +0 -0
- img/deepblue/deepblue_dayNormal.gif +0 -0
- img/deepblue/deepblue_dayOver.gif +0 -0
- img/greenish/greenish_dayDown.gif +0 -0
- img/greenish/greenish_dayNormal.gif +0 -0
- img/greenish/greenish_dayOver.gif +0 -0
- img/lightgreen/lightgreen_dayDown.gif +0 -0
- img/lightgreen/lightgreen_dayNormal.gif +0 -0
- img/lightgreen/lightgreen_dayOver.gif +0 -0
- img/monthBackward_down.gif +0 -0
- img/monthBackward_normal.gif +0 -0
- img/monthBackward_over.gif +0 -0
- img/monthForward_down.gif +0 -0
- img/monthForward_normal.gif +0 -0
- img/monthForward_over.gif +0 -0
- img/oceanblue/oceanblue_dayDown.gif +0 -0
- img/oceanblue/oceanblue_dayNormal.gif +0 -0
- img/oceanblue/oceanblue_dayOver.gif +0 -0
- img/orange/orange_dayDown.gif +0 -0
- img/orange/orange_dayNormal.gif +0 -0
- img/orange/orange_dayOver.gif +0 -0
- img/peppermint/peppermint_dayDown.gif +0 -0
- img/peppermint/peppermint_dayNormal.gif +0 -0
- img/peppermint/peppermint_dayOver.gif +0 -0
- img/pink/pink_dayDown.gif +0 -0
- img/pink/pink_dayNormal.gif +0 -0
- img/pink/pink_dayOver.gif +0 -0
- img/purple/purple_dayDown.gif +0 -0
- img/purple/purple_dayNormal.gif +0 -0
- img/purple/purple_dayOver.gif +0 -0
- img/red/red_dayDown.gif +0 -0
- img/red/red_dayNormal.gif +0 -0
- img/red/red_dayOver.gif +0 -0
- img/torqoise/torqoise_dayDown.gif +0 -0
- img/torqoise/torqoise_dayNormal.gif +0 -0
- img/torqoise/torqoise_dayOver.gif +0 -0
- img/yearBackward_down.gif +0 -0
- img/yearBackward_normal.gif +0 -0
- img/yearBackward_over.gif +0 -0
- img/yearForward_down.gif +0 -0
- img/yearForward_normal.gif +0 -0
- img/yearForward_over.gif +0 -0
- js/jsDatePick.jquery.full.js +0 -1288
- js/jsDatePick.jquery.min.js +0 -1
- languages/contact-form-7-datepicker-it_IT.mo +0 -0
- languages/contact-form-7-datepicker-it_IT.po +0 -314
- languages/contact-form-7-datepicker-nl_NL.mo +0 -0
- languages/contact-form-7-datepicker-ro_RO.mo +0 -0
- languages/contact-form-7-datepicker-ro_RO.po +0 -323
- languages/contact-form-7-datepicker.pot +0 -304
- readme.txt +18 -35
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
- screenshot-3.png +0 -0
.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
geany_run_script.sh
|
|
admin.php
ADDED
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class ContactForm7Datepicker_Admin {
|
4 |
+
|
5 |
+
public static function init() {
|
6 |
+
add_action('admin_enqueue_scripts', array(__CLASS__, 'enqueue_assets'));
|
7 |
+
add_action('wpcf7_admin_after_general_settings', array(__CLASS__, 'add_meta_box'));
|
8 |
+
add_action('admin_footer', array(__CLASS__, 'theme_js'));
|
9 |
+
add_action('wp_ajax_cf7dp_save_settings', array(__CLASS__, 'ajax_save_settings'));
|
10 |
+
}
|
11 |
+
|
12 |
+
public static function enqueue_assets() {
|
13 |
+
if (is_admin() && ! self::is_wpcf7_page())
|
14 |
+
return;
|
15 |
+
|
16 |
+
ContactForm7Datepicker::enqueue_js();
|
17 |
+
ContactForm7Datepicker::enqueue_css();
|
18 |
+
}
|
19 |
+
|
20 |
+
public static function add_meta_box() {
|
21 |
+
if (! current_user_can('publish_pages'))
|
22 |
+
return;
|
23 |
+
|
24 |
+
add_meta_box(
|
25 |
+
'datepickerthemediv',
|
26 |
+
__('Datepicker Theme'),
|
27 |
+
array(__CLASS__, 'theme_metabox'),
|
28 |
+
'cfseven',
|
29 |
+
'datepicker-theme',
|
30 |
+
'core'
|
31 |
+
);
|
32 |
+
|
33 |
+
do_meta_boxes('cfseven', 'datepicker-theme', array());
|
34 |
+
}
|
35 |
+
|
36 |
+
public static function theme_metabox() {
|
37 |
+
?>
|
38 |
+
|
39 |
+
<div id="preview" style="float: left; margin: 0 10px 0 0"></div>
|
40 |
+
<form action="">
|
41 |
+
<label for="jquery-ui-theme"><?php _e('Theme'); ?></label><br />
|
42 |
+
<?php self::themes_dropdown(); ?>
|
43 |
+
<input type="submit" id="save-ui-theme" value="<?php _e('Save'); ?>" class="button" />
|
44 |
+
</form>
|
45 |
+
<div class="clear"></div>
|
46 |
+
|
47 |
+
<?php
|
48 |
+
$dp = new CF7_DatePicker('#preview');
|
49 |
+
echo $dp->generate_code(true);
|
50 |
+
}
|
51 |
+
|
52 |
+
public static function theme_js() {
|
53 |
+
if (! self::is_wpcf7_page())
|
54 |
+
return;
|
55 |
+
?>
|
56 |
+
<script type="text/javascript">
|
57 |
+
jQuery(function($){
|
58 |
+
var $spinner = $(new Image()).attr('src', '<?php echo admin_url('images/wpspin_light.gif'); ?>');
|
59 |
+
var old_href = '';
|
60 |
+
|
61 |
+
$('#jquery-ui-theme').change(function(){
|
62 |
+
var style = $(this).val();
|
63 |
+
|
64 |
+
var $link = $('#jquery-ui-theme-css');
|
65 |
+
var href = $link.attr('href');
|
66 |
+
|
67 |
+
if (style == 'disabled') {
|
68 |
+
old_href = href;
|
69 |
+
$link.attr('href', '');
|
70 |
+
|
71 |
+
return;
|
72 |
+
} else if (href === '') {
|
73 |
+
href = old_href;
|
74 |
+
}
|
75 |
+
|
76 |
+
href = href.replace(/\/themes\/[-a-z]+\//g, '/themes/' + style + '/');
|
77 |
+
$link.attr('href', href);
|
78 |
+
});
|
79 |
+
|
80 |
+
$('#save-ui-theme').click(function(){
|
81 |
+
var data = {
|
82 |
+
action: 'cf7dp_save_settings',
|
83 |
+
ui_theme: $('#jquery-ui-theme').val()
|
84 |
+
};
|
85 |
+
|
86 |
+
var $this_spinner = $spinner.clone();
|
87 |
+
|
88 |
+
$(this).after($this_spinner.show());
|
89 |
+
|
90 |
+
$.post(ajaxurl, data, function(response) {
|
91 |
+
var $prev = $( '.wrap > .updated, .wrap > .error' );
|
92 |
+
var $msg = $(response).hide().insertAfter($('.wrap h2'));
|
93 |
+
if ($prev.length > 0)
|
94 |
+
$prev.fadeOut('slow', function(){
|
95 |
+
$msg.fadeIn('slow');
|
96 |
+
});
|
97 |
+
else
|
98 |
+
$msg.fadeIn('slow');
|
99 |
+
|
100 |
+
$this_spinner.hide();
|
101 |
+
});
|
102 |
+
|
103 |
+
return false;
|
104 |
+
});
|
105 |
+
});
|
106 |
+
</script>
|
107 |
+
<?php
|
108 |
+
}
|
109 |
+
|
110 |
+
public static function ajax_save_settings() {
|
111 |
+
$successmsg = '<div id="message" class="updated fade"><p><strong>' . __('Options saved.') . '</strong></p></div>';
|
112 |
+
$errormsg = '<div id="message" class="error fade"><p><strong>' . __('Options could not be saved.') . '</strong></p></div>';
|
113 |
+
|
114 |
+
if (! isset($_POST['ui_theme']))
|
115 |
+
die($errormsg);
|
116 |
+
|
117 |
+
if (! is_admin())
|
118 |
+
die($errormsg);
|
119 |
+
|
120 |
+
$theme = trim($_POST['ui_theme']);
|
121 |
+
|
122 |
+
if (! preg_match('%[-a-z]+%i', $theme))
|
123 |
+
die($errormsg);
|
124 |
+
|
125 |
+
if (! update_option('cf7dp_ui_theme', $theme))
|
126 |
+
die($errormsg);
|
127 |
+
|
128 |
+
die($successmsg);
|
129 |
+
}
|
130 |
+
|
131 |
+
private static function themes_dropdown() {
|
132 |
+
$themes = array(
|
133 |
+
'disabled' => __('Disabled'),
|
134 |
+
'base' => 'Base',
|
135 |
+
'black-tie' => 'Black Tie',
|
136 |
+
'blitzer' => 'Blitzer',
|
137 |
+
'cupertino' => 'Cupertino',
|
138 |
+
'dark-hive' => 'Dark Hive',
|
139 |
+
'dot-luv' => 'Dot Luv',
|
140 |
+
'eggplant' => 'Eggplant',
|
141 |
+
'excite-bike' => 'Excite Bike',
|
142 |
+
'flick' => 'Flick',
|
143 |
+
'hot-sneaks' => 'Hot Sneaks',
|
144 |
+
'humanity' => 'Humanity',
|
145 |
+
'le-frog' => 'Le frog',
|
146 |
+
'mint-choc' => 'Mint Choc',
|
147 |
+
'overcast' => 'Overcast',
|
148 |
+
'pepper-grinder' => 'Pepper Grinder',
|
149 |
+
'redmond' => 'Redmond',
|
150 |
+
'smoothness' => 'Smoothness',
|
151 |
+
'south-street' => 'South Street',
|
152 |
+
'start' => 'Start',
|
153 |
+
'sunny' => 'Sunny',
|
154 |
+
'swanky-purse' => 'Swanky Purse',
|
155 |
+
'trontastic' => 'Trontastic',
|
156 |
+
'ui-darkness' => 'UI Darkness',
|
157 |
+
'ui-lightness' => 'UI Lightness',
|
158 |
+
'vader' => 'Vader'
|
159 |
+
);
|
160 |
+
|
161 |
+
$themes = apply_filters('cf7dp_ui_themes', $themes);
|
162 |
+
|
163 |
+
$html = "<select id=\"jquery-ui-theme\">\n";
|
164 |
+
foreach ($themes as $key => $val) {
|
165 |
+
$is_selected = ($key == get_option('cf7dp_ui_theme')) ? ' selected="selected"' : '';
|
166 |
+
$html .= "\t<option value=\"{$key}\"{$is_selected}>{$val}</option>\n";
|
167 |
+
}
|
168 |
+
|
169 |
+
$html .= "</select>\n";
|
170 |
+
|
171 |
+
echo $html;
|
172 |
+
}
|
173 |
+
|
174 |
+
private static function is_wpcf7_page() {
|
175 |
+
global $current_screen;
|
176 |
+
|
177 |
+
if (is_object($current_screen) && 'toplevel_page_wpcf7' == $current_screen->id)
|
178 |
+
return true;
|
179 |
+
|
180 |
+
return false;
|
181 |
+
}
|
182 |
+
}
|
contact-form-7-datepicker.php
CHANGED
@@ -1,921 +1,82 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
Plugin Name: Contact Form 7 Datepicker
|
4 |
Plugin URI: https://github.com/relu/contact-form-7-datepicker/
|
5 |
-
Description:
|
6 |
Author: Aurel Canciu
|
7 |
-
Version: 0
|
8 |
Author URI: https://github.com/relu/
|
9 |
*/
|
10 |
-
?>
|
11 |
-
<?php
|
12 |
-
/* Copyright 2011 Aurel Canciu <aurelcanciu at gmail.com>
|
13 |
-
|
14 |
-
This program is free software; you can redistribute it and/or modify
|
15 |
-
it under the terms of the GNU General Public License as published by
|
16 |
-
the Free Software Foundation; either version 2 of the License, or
|
17 |
-
(at your option) any later version.
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
*/
|
28 |
?>
|
29 |
<?php
|
30 |
|
31 |
-
|
32 |
-
define('PLUGIN_PATH', '/wp-content/plugins/'.plugin_basename(dirname(__FILE__)));
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
}
|
37 |
|
38 |
-
|
|
|
39 |
|
40 |
-
/**
|
41 |
-
* static Array $option_defaults
|
42 |
-
*
|
43 |
-
* Holds the default option values for the plugin
|
44 |
-
*/
|
45 |
-
static $option_defaults = array(
|
46 |
-
"useMode" => 2,
|
47 |
-
"isStripped" => "false",
|
48 |
-
"limitToToday" => 0,
|
49 |
-
"cellColorScheme" => "beige",
|
50 |
-
"dateFormat" => "%d-%m-%Y",
|
51 |
-
"weekStartDay" => 1,
|
52 |
-
"directionality" => "ltr",
|
53 |
-
"yearsRange" => "1970,2100",
|
54 |
-
"yearButtons" => "true",
|
55 |
-
"monthButtons" => "true",
|
56 |
-
"animate" => "true",
|
57 |
-
"selectedDate" => ""
|
58 |
-
);
|
59 |
-
|
60 |
-
/**
|
61 |
-
* __construct()
|
62 |
-
*
|
63 |
-
* This is the class constructor method, it registers actions and initializes the plugin
|
64 |
-
*/
|
65 |
-
function __construct() {
|
66 |
register_activation_hook(__FILE__, array(__CLASS__, 'activate'));
|
67 |
-
register_deactivation_hook(__FILE__, array(__CLASS__, 'deactivate'));
|
68 |
-
|
69 |
-
add_action('plugins_loaded', array(__CLASS__, 'register_shortcodes'));
|
70 |
-
add_action('admin_init', array(__CLASS__, 'tag_generator'));
|
71 |
-
add_action('admin_menu', array(__CLASS__, 'register_admin_settings'));
|
72 |
-
add_action('init', array(__CLASS__, 'register_files'));
|
73 |
-
if (CF7_DATE_PICKER_ENQUEUES) {
|
74 |
-
add_action('wp_enqueue_scripts', array(__CLASS__, 'plugin_enqueues'));
|
75 |
-
}
|
76 |
-
add_action('admin_enqueue_scripts', array(__CLASS__, 'plugin_enqueues'));
|
77 |
-
|
78 |
-
add_action('init', array(__CLASS__, 'calendar_l10n'));
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
add_action('init', array(__CLASS__, 'admin_l10n'));
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* activate()
|
89 |
-
*
|
90 |
-
* Action triggered when plugin is activated
|
91 |
-
* It inserts some default values as options
|
92 |
-
*/
|
93 |
-
public static function activate() {
|
94 |
-
foreach (self::$option_defaults as $option => $value) {
|
95 |
-
add_option($option, $value);
|
96 |
}
|
97 |
}
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
* Action triggered when plugin is deactivated
|
103 |
-
* It deletes the settings stored in the database
|
104 |
-
*/
|
105 |
-
public static function deactivate() {
|
106 |
-
foreach (self::$option_defaults as $option => $value) {
|
107 |
-
delete_option($option);
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* update_settings($dataupdate)
|
113 |
-
*
|
114 |
-
* Updates plugin's settings into the database
|
115 |
-
* @param Array $dateupdate, contains the updated settings
|
116 |
-
*/
|
117 |
-
public static function update_settings($dataupdate) {
|
118 |
-
foreach ($dataupdate as $option => $value) {
|
119 |
-
if ($value != get_option($option))
|
120 |
-
update_option($option, $value);
|
121 |
-
}
|
122 |
-
}
|
123 |
-
|
124 |
-
/**
|
125 |
-
* register_admin_settings()
|
126 |
-
*
|
127 |
-
* Registers the Admin panel so that it will show up as a submenu page in Contact Form 7's menu
|
128 |
-
*/
|
129 |
-
public static function register_admin_settings() {
|
130 |
-
if (function_exists('add_submenu_page')) {
|
131 |
-
add_submenu_page('wpcf7',__('Datepicker Settings', 'contact-form-7-datepicker'),__('Datepicker Settings', 'contact-form-7-datepicker'),
|
132 |
-
'edit_themes',
|
133 |
-
basename(__FILE__),
|
134 |
-
array(__CLASS__,'admin_settings_html'));
|
135 |
-
}
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* read_schemes()
|
140 |
-
*
|
141 |
-
* Gets the names of the schemes available from the img/ directory
|
142 |
-
* @return Array $themes, the names of the schemes found
|
143 |
-
*/
|
144 |
-
private function read_schemes() {
|
145 |
-
$path = ABSPATH.PLUGIN_PATH.'/img/';
|
146 |
-
if ($handle = opendir($path)) {
|
147 |
-
$themes = array() ;
|
148 |
-
while (false !== ($file = readdir($handle))) {
|
149 |
-
if (is_dir($path.$file) && $file != "." && $file != "..") {
|
150 |
-
$themes[] = $file;
|
151 |
-
}
|
152 |
-
}
|
153 |
-
}
|
154 |
-
closedir($handle);
|
155 |
-
return $themes;
|
156 |
-
}
|
157 |
-
|
158 |
-
/**
|
159 |
-
* get_scheme_images($scheme)
|
160 |
-
*
|
161 |
-
* Gets the images of a scheme and natural sorts them
|
162 |
-
* @param String $scheme, the name of the scheme to get images for
|
163 |
-
* @return Array $schemeimg, the paths to the scheme images
|
164 |
-
*/
|
165 |
-
private function get_scheme_images($scheme) {
|
166 |
-
$path = ABSPATH.PLUGIN_PATH.'/img/'.$scheme.'/';
|
167 |
-
if ($handle = opendir($path)) {
|
168 |
-
$schemeimg = array();
|
169 |
-
while (false !== ($file = readdir($handle))) {
|
170 |
-
if (is_file($path.$file) && preg_match('/\.gif$/i', $file))
|
171 |
-
$schemeimg[] = get_option('siteurl').PLUGIN_PATH.'/img/'.$scheme.'/'.$file;
|
172 |
-
}
|
173 |
-
natsort($schemeimg);
|
174 |
-
}
|
175 |
-
closedir($handle);
|
176 |
-
return $schemeimg;
|
177 |
-
}
|
178 |
-
|
179 |
-
/**
|
180 |
-
* get_scheme_style($scheme)
|
181 |
-
*
|
182 |
-
* Checks if a CSS file exists in the scheme's directory and returns the path if so
|
183 |
-
* @param String $scheme, the name of the scheme to get the CSS for
|
184 |
-
* @return String the path to the CSS file
|
185 |
-
* @return Boolean false if no file found
|
186 |
-
*/
|
187 |
-
private function get_scheme_style($scheme) {
|
188 |
-
$file = PLUGIN_PATH.'/css/schemes/'.$scheme.'.css';
|
189 |
-
if (is_file(ABSPATH.$file)) {
|
190 |
-
return get_option('siteurl').$file;
|
191 |
-
}
|
192 |
-
return false;
|
193 |
-
}
|
194 |
-
|
195 |
-
/**
|
196 |
-
* admin_settings_html()
|
197 |
-
*
|
198 |
-
* Generates the admin panel HTML
|
199 |
-
*/
|
200 |
-
public static function admin_settings_html() {
|
201 |
-
if(isset($_POST['datepickersave'])) {
|
202 |
-
foreach(self::$option_defaults as $option => $value)
|
203 |
-
$dataupdate[$option] = $_POST[$option];
|
204 |
-
$dataupdate['yearsRange'] = trim($_POST['yearmin']).",".trim($_POST['yearmax']);
|
205 |
-
|
206 |
-
$dataupdate['yearButtons'] = (isset($_POST['yearButtons'])) ? "true" : "false";
|
207 |
-
$dataupdate['monthButtons'] = (isset($_POST['monthButtons'])) ? "true" : "false";
|
208 |
-
|
209 |
-
if ($_POST['selectedDate'] !== '') {
|
210 |
-
if (get_option('dateFormat') !== $dataupdate['dateFormat']) {
|
211 |
-
$df = $dataupdate['dateFormat'];
|
212 |
-
} else {
|
213 |
-
$df = get_option('dateFormat');
|
214 |
-
}
|
215 |
-
$df = str_replace('%', '', trim($df));
|
216 |
-
|
217 |
-
$dataupdate['selectedDate'] = date($df, strtotime($_POST['selectedDate']));
|
218 |
-
$dataupdate['selectedDate'] = date("Y-m-d", strtotime($dataupdate['selectedDate']));
|
219 |
-
}
|
220 |
-
|
221 |
-
self::update_settings($dataupdate);
|
222 |
-
}
|
223 |
-
$useMode = array(1,2);
|
224 |
-
$limitToToday = array(
|
225 |
-
__('Today and future', 'contact-form-7-datepicker'),
|
226 |
-
__('Today and past', 'contact-form-7-datepicker'),
|
227 |
-
__('No limit', 'contact-form-7-datepicker')
|
228 |
-
);
|
229 |
-
$isStripped = $animate = array(
|
230 |
-
__('true', 'contact-form-7-datepicker'),
|
231 |
-
__('false', 'contact-form-7-datepicker')
|
232 |
-
);
|
233 |
-
$cellColorScheme = self::read_schemes();
|
234 |
-
$weekStartDay = array(
|
235 |
-
__('Sunday', 'contact-form-7-datepicker'),
|
236 |
-
__('Monday', 'contact-form-7-datepicker')
|
237 |
-
);
|
238 |
-
$directionality = array(
|
239 |
-
__('Left to right', 'contact-form-7-datepicker'),
|
240 |
-
__('Right to left', 'contact-form-7-datepicker')
|
241 |
-
);
|
242 |
-
$yearsRange = explode(",", trim(get_option('yearsRange')));
|
243 |
-
|
244 |
-
?>
|
245 |
-
<div class="wrap">
|
246 |
-
<h2>Contact Form 7 Datepicker</h2><?php
|
247 |
-
echo __('<p>This plugin implements a new <strong>[date]</strong> tag in <a href="http://wordpress.org/extend/plugins/contact-form-7/">Contact Form 7</a>
|
248 |
-
that adds a date field to a form. When clicking the field a calendar pops up enabling your site visitors to easily select any date.<br />
|
249 |
-
To use it simply insert the <strong>[date your-field-name]</strong> or <strong>[date* your-requierd-field-name]</strong> if you want it to be mandatory,
|
250 |
-
in your Contact Form 7 edit section.</p>', 'contact-form-7-datepicker'); ?>
|
251 |
-
<form method="post">
|
252 |
-
<table class="widefat">
|
253 |
-
<tbody>
|
254 |
-
<tr>
|
255 |
-
<th style="width:20%">
|
256 |
-
<label><?php echo __('Color scheme', 'contact-form-7-datepicker'); ?></label>
|
257 |
-
</th>
|
258 |
-
<td colspan="2"><?php
|
259 |
-
foreach($cellColorScheme as $scheme) {
|
260 |
-
if($scheme == get_option('cellColorScheme'))
|
261 |
-
$checked = "checked=\"checked\"";
|
262 |
-
else
|
263 |
-
$checked = ""; ?>
|
264 |
-
|
265 |
-
<div style="float: left; width: 100px; margin: 30px 30px 0 0; text-align: center;">
|
266 |
-
<div style="display: block; padding: 5px; background: #fff; border: 1px solid #ccc; border-radius: 4px 4px 4px 4px;">
|
267 |
-
<label><?php echo $scheme; ?></label><br /><?php
|
268 |
-
foreach(self::get_scheme_images($scheme) as $img) { ?>
|
269 |
-
<img src="<?php echo $img; ?>" style="margin: 5px;" /><?php
|
270 |
-
} ?><br /><br />
|
271 |
-
<input name="cellColorScheme" type="radio" width="24" height="25" value="<?php echo $scheme; ?>" <?php echo $checked; ?> />
|
272 |
-
</div>
|
273 |
-
</div><?php
|
274 |
-
} ?>
|
275 |
-
</td>
|
276 |
-
</tr>
|
277 |
-
|
278 |
-
<tr>
|
279 |
-
<th>
|
280 |
-
<label><?php echo __('Use Mode', 'contact-form-7-datepicker'); ?></label>
|
281 |
-
</th>
|
282 |
-
<td>
|
283 |
-
<select name="useMode"><?php
|
284 |
-
foreach($useMode as $row) {
|
285 |
-
if($row == get_option('useMode'))
|
286 |
-
$selected = "selected";
|
287 |
-
else
|
288 |
-
$selected = "";
|
289 |
-
|
290 |
-
echo "<option value='".$row."' ".$selected." >".$row."</option>";
|
291 |
-
} ?>
|
292 |
-
</select>
|
293 |
-
</td>
|
294 |
-
<td>
|
295 |
-
<?php echo __('<p>1 – The calendar\'s HTML will be directly appended to the field supplied by target<br />
|
296 |
-
2 – The calendar will appear as a popup when the field with the id supplied in target is clicked.</p>', 'contact-form-7-datepicker'); ?>
|
297 |
-
</td>
|
298 |
-
</tr>
|
299 |
-
|
300 |
-
<tr>
|
301 |
-
<th>
|
302 |
-
<label><?php echo __('Sripped', 'contact-form-7-datepicker'); ?></label>
|
303 |
-
</th>
|
304 |
-
<td>
|
305 |
-
<select name="isStripped"><?php
|
306 |
-
foreach($isStripped as $row) {
|
307 |
-
if($row == __('true', 'contact-form-7-datepicker'))
|
308 |
-
$val = "true";
|
309 |
-
else
|
310 |
-
$val = "false";
|
311 |
-
|
312 |
-
if ($val == get_option('isStripped'))
|
313 |
-
$selected = "selected";
|
314 |
-
else
|
315 |
-
$selected = "";
|
316 |
-
|
317 |
-
echo "<option value='".$val."' ".$selected." >".__($row, 'contact-form-7-datepicker')."</option>";
|
318 |
-
} ?>
|
319 |
-
</select>
|
320 |
-
</td>
|
321 |
-
<td>
|
322 |
-
<?php echo __('<p>When set to true the calendar appears without the visual design - usually used with \'Use Mod\' 1.</p>','contact-form-7-datepicker'); ?>
|
323 |
-
</td>
|
324 |
-
</tr>
|
325 |
-
|
326 |
-
<tr>
|
327 |
-
<th>
|
328 |
-
<label><?php echo __('Limit Dates To', 'contact-form-7-datepicker'); ?></label>
|
329 |
-
</th>
|
330 |
-
<td>
|
331 |
-
<select name="limitToToday"><?php
|
332 |
-
foreach($limitToToday as $row) {
|
333 |
-
if ($row == __('Today and future', 'contact-form-7-datepicker'))
|
334 |
-
$val = 1;
|
335 |
-
elseif ($row == __('Today and past', 'contact-form-7-datepicker'))
|
336 |
-
$val = -1;
|
337 |
-
else
|
338 |
-
$val = 0;
|
339 |
-
|
340 |
-
if ($val == get_option('limitToToday'))
|
341 |
-
$selected = "selected";
|
342 |
-
else
|
343 |
-
$selected = "";
|
344 |
-
|
345 |
-
echo "<option value='".$val."' ".$selected." >".__($row, 'contact-form-7-datepicker')."</option>";
|
346 |
-
} ?>
|
347 |
-
</select>
|
348 |
-
</td>
|
349 |
-
<td>
|
350 |
-
<?php echo __('<p>Enables you to limit the possible picking dates according to the current date.</p>','contact-form-7-datepicker'); ?>
|
351 |
-
</td>
|
352 |
-
</tr>
|
353 |
-
|
354 |
-
<tr>
|
355 |
-
<th>
|
356 |
-
<label><?php echo __('Week Start Day', 'contact-form-7-datepicker'); ?></h2></label>
|
357 |
-
</th>
|
358 |
-
<td>
|
359 |
-
<select name="weekStartDay"><?php
|
360 |
-
foreach($weekStartDay as $row) {
|
361 |
-
if ($row == __('Sunday','contact-form-7-datepicker'))
|
362 |
-
$val = 0;
|
363 |
-
else
|
364 |
-
$val = 1;
|
365 |
-
|
366 |
-
if($val == get_option('weekStartDay'))
|
367 |
-
$selected = "selected";
|
368 |
-
else
|
369 |
-
$selected = "";
|
370 |
-
|
371 |
-
echo "<option value='".$val."' ".$selected." >".__($row,'contact-form-7-datepicker')."</option>";
|
372 |
-
} ?>
|
373 |
-
</select>
|
374 |
-
</td>
|
375 |
-
<td>
|
376 |
-
</td>
|
377 |
-
</tr>
|
378 |
-
|
379 |
-
<tr>
|
380 |
-
<th>
|
381 |
-
<label><?php echo __('Years Range', 'contact-form-7-datepicker'); ?></h2></label>
|
382 |
-
</th>
|
383 |
-
<td colspan="2">
|
384 |
-
<input name="yearmin" id="yearmin" type="text" value="<?php echo $yearsRange[0]; ?>" /> -
|
385 |
-
<input name="yearmax" id="yearmax" type="text" value="<?php echo $yearsRange[1]; ?>" />
|
386 |
-
</td>
|
387 |
-
</tr>
|
388 |
-
|
389 |
-
<tr>
|
390 |
-
<th>
|
391 |
-
<label><?php echo __('Text Direction', 'contact-form-7-datepicker'); ?></h2></label>
|
392 |
-
</th>
|
393 |
-
<td>
|
394 |
-
<select name="directionality"><?php
|
395 |
-
foreach($directionality as $row) {
|
396 |
-
if ($row == __('Left to right','contact-form-7-datepicker'))
|
397 |
-
$val = "ltr";
|
398 |
-
else
|
399 |
-
$val = "rtl";
|
400 |
-
|
401 |
-
if($val == get_option('directionality'))
|
402 |
-
$selected = "selected";
|
403 |
-
else
|
404 |
-
$selected = "";
|
405 |
-
|
406 |
-
echo "<option value='".$val."' ".$selected." >".__($row,'contact-form-7-datepicker')."</option>";
|
407 |
-
} ?>
|
408 |
-
</select>
|
409 |
-
</td>
|
410 |
-
<td>
|
411 |
-
</td>
|
412 |
-
</tr>
|
413 |
-
|
414 |
-
<tr>
|
415 |
-
<th>
|
416 |
-
<label><?php echo __('Controls', 'contact-form-7-datepicker'); ?></h2></label>
|
417 |
-
</th>
|
418 |
-
<td><?php
|
419 |
-
|
420 |
-
if (get_option('yearButtons') == "true")
|
421 |
-
$checked = "checked=\"checked\"";
|
422 |
-
else
|
423 |
-
$checked = "";
|
424 |
-
echo "<input type=\"checkbox\" name=\"yearButtons\" ".$checked.">"; ?>
|
425 |
-
<label><?php echo __('Year Controls','contact-form-7-datepicker'); ?> </label>
|
426 |
-
<br /><?php
|
427 |
-
|
428 |
-
if (get_option('monthButtons') == "true")
|
429 |
-
$checked = "checked=\"checked\"";
|
430 |
-
else
|
431 |
-
$checked = "";
|
432 |
-
echo "<input type=\"checkbox\" name=\"monthButtons\" ".$checked." >"; ?>
|
433 |
-
<label><?php echo __('Month Controls','contact-form-7-datepicker'); ?> </label>
|
434 |
-
</td>
|
435 |
-
<td>
|
436 |
-
<?php echo __('<p>You can select here what controls would you like to display on the calendar.</p>', 'contact-form-7-datepicker'); ?>
|
437 |
-
</td>
|
438 |
-
</tr>
|
439 |
-
|
440 |
-
<tr>
|
441 |
-
<th>
|
442 |
-
<label><?php echo __('Selected Date', 'contact-form-7-datepicker'); ?></label>
|
443 |
-
</th>
|
444 |
-
<td style="overflow: visible">
|
445 |
-
<?php
|
446 |
-
echo self::page_text_filter_callback("selectedDate");
|
447 |
-
?>
|
448 |
-
</td>
|
449 |
-
<td>
|
450 |
-
<?php echo __('<p>You can set here a default selected date and have a look of how the calendar shows up.</p>', 'contact-form-7-datepicker'); ?>
|
451 |
-
</td>
|
452 |
-
</tr>
|
453 |
-
|
454 |
-
<tr>
|
455 |
-
<th>
|
456 |
-
<label><?php echo __('Animate', 'contact-form-7-datepicker'); ?></label>
|
457 |
-
</th>
|
458 |
-
<td>
|
459 |
-
<select name="animate"><?php
|
460 |
-
foreach($animate as $row) {
|
461 |
-
if($row == __('true', 'contact-form-7-datepicker'))
|
462 |
-
$val = "true";
|
463 |
-
else
|
464 |
-
$val = "false";
|
465 |
-
|
466 |
-
if ($val == get_option('animate'))
|
467 |
-
$selected = "selected";
|
468 |
-
else
|
469 |
-
$selected = "";
|
470 |
-
|
471 |
-
echo "<option value='".$val."' ".$selected." >".__($row, 'contact-form-7-datepicker')."</option>";
|
472 |
-
} ?>
|
473 |
-
</select>
|
474 |
-
</td>
|
475 |
-
<td>
|
476 |
-
<?php echo __('<p>Animation on display.</p>','contact-form-7-datepicker'); ?>
|
477 |
-
</td>
|
478 |
-
</tr>
|
479 |
-
|
480 |
-
<tr>
|
481 |
-
<th>
|
482 |
-
<label><?php echo __('Date Format', 'contact-form-7-datepicker'); ?></label>
|
483 |
-
</th>
|
484 |
-
<td>
|
485 |
-
<input name="dateFormat" id="dateFormat" type="text" value="<?php echo get_option('dateFormat'); ?>" />
|
486 |
-
</td>
|
487 |
-
<td>
|
488 |
-
<?php echo __('<p>Possible values to use in the date format:<br />
|
489 |
-
<br />
|
490 |
-
%d - Day of the month, 2 digits with leading zeros<br />
|
491 |
-
%j - Day of the month without leading zeros<br />
|
492 |
-
%m - Numeric representation of a month, with leading zeros<br />
|
493 |
-
%M - A short textual representation of a month, three letters<br />
|
494 |
-
%n - Numeric representation of a month, without leading zeros<br />
|
495 |
-
%F - A full textual representation of a month, such as January or March<br />
|
496 |
-
%Y - A full numeric representation of a year, 4 digits<br />
|
497 |
-
%y - A two digit representation of a year<br />
|
498 |
-
<br />
|
499 |
-
You can of course put whatever divider you want between them.<br /></p>',
|
500 |
-
'contact-form-7-datepicker'); ?>
|
501 |
-
</td>
|
502 |
-
</tr>
|
503 |
-
|
504 |
-
<tr>
|
505 |
-
<td colspan="2">
|
506 |
-
</td>
|
507 |
-
<td>
|
508 |
-
<input name="datepickersave" id="datepickersave" type="submit" value="<?php echo __('Save Setting', 'contact-form-7-datepicker'); ?>" class="button" />
|
509 |
-
</td>
|
510 |
-
</tr>
|
511 |
-
</tbody>
|
512 |
-
</table>
|
513 |
-
</form><?php
|
514 |
-
}
|
515 |
-
|
516 |
-
/**
|
517 |
-
* register_files()
|
518 |
-
*
|
519 |
-
* Registers needed files
|
520 |
-
*/
|
521 |
-
public static function register_files() {
|
522 |
-
wp_register_style('jsdp_ltr', plugins_url( '/css/jsDatePick_ltr.min.css', __FILE__ ), array(), CF7_DATE_PICKER_VERSION);
|
523 |
-
wp_register_style('jsdp_rtl', plugins_url( '/css/jsDatePick_rtl.min.css', __FILE__ ), array(), CF7_DATE_PICKER_VERSION);
|
524 |
-
|
525 |
-
wp_register_script('jsDatePickJS', plugins_url( '/js/jsDatePick.jquery.min.js', __FILE__ ), array('jquery'), CF7_DATE_PICKER_VERSION, true);
|
526 |
-
}
|
527 |
-
|
528 |
-
/**
|
529 |
-
* plugin_enqueues()
|
530 |
-
*
|
531 |
-
* Enqueues JS/CSS
|
532 |
-
*/
|
533 |
-
public static function plugin_enqueues() {
|
534 |
-
wp_enqueue_style('jsdp_'.get_option('directionality'));
|
535 |
-
wp_enqueue_script('jsDatePickJS');
|
536 |
-
|
537 |
-
do_action('plugin_enqueues');
|
538 |
}
|
539 |
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
* If a match is found in the content of a form, this returns the HTML for the matched date input field
|
544 |
-
* @param Array $data, an array of attributes and options for the input date field that we generate code for
|
545 |
-
* @return String $string, the HTML for our match
|
546 |
-
*/
|
547 |
-
private function page_text_filter_callback($data) {
|
548 |
-
if (!is_array($data)) {
|
549 |
-
$name = $data;
|
550 |
-
} else {
|
551 |
-
$name = $data['name'];
|
552 |
-
}
|
553 |
-
|
554 |
-
if (is_array($data) && isset($data['atts']['id'])) {
|
555 |
-
$id = $data['atts']['id'];
|
556 |
-
} else {
|
557 |
-
$id = $name;
|
558 |
-
}
|
559 |
-
|
560 |
-
$jssafeid = preg_replace('/[^A-Za-z0-9]/', '', $id);
|
561 |
-
|
562 |
-
if (is_array($data) && !empty($data['value']) && is_numeric(strtotime($data['value']))) {
|
563 |
-
$seldate = date('Y-m-d', strtotime($data['value']));
|
564 |
-
|
565 |
-
} else {
|
566 |
-
$seldate = get_option('selectedDate');
|
567 |
-
}
|
568 |
-
|
569 |
-
if ($seldate) {
|
570 |
-
$ts = strtotime($seldate);
|
571 |
-
$seldate = array(
|
572 |
-
'd' => date('d', $ts),
|
573 |
-
'm' => date('m', $ts),
|
574 |
-
'y' => date('Y', $ts)
|
575 |
-
);
|
576 |
-
|
577 |
-
$dateval = $seldate['y'].'-'.$seldate['m'].'-'.$seldate['d'];
|
578 |
-
} else {
|
579 |
-
$dateval = '';
|
580 |
-
}
|
581 |
-
|
582 |
-
$attributes = '';
|
583 |
-
|
584 |
-
if (is_array($data['atts'])) {
|
585 |
-
foreach ($data['atts'] as $key => $val) {
|
586 |
-
if (!empty($val))
|
587 |
-
$attributes .= $key.'="'.$val.'" ';
|
588 |
-
}
|
589 |
-
}
|
590 |
-
|
591 |
-
if (!is_array($data) || (is_array($data['atts']) && empty($data['atts']['id']))) {
|
592 |
-
$attributes .= 'id="'.$id.'" ';
|
593 |
-
}
|
594 |
-
|
595 |
-
if (!empty($dateval)) {
|
596 |
-
$df = str_replace('%', '', get_option('dateFormat'));
|
597 |
-
$dateval = date($df, strtotime($dateval));
|
598 |
-
$attributes .= 'value="'.$dateval.'"';
|
599 |
-
}
|
600 |
-
|
601 |
-
$attributes = trim($attributes);
|
602 |
-
|
603 |
-
$string = '';
|
604 |
-
|
605 |
-
if ( (is_array($data) && $data['opts']['newfield'] === 'true') || !is_array($data) || (is_array($data) && empty($data['opts']['newfield'])))
|
606 |
-
$string = '<input type="text" name="'.$name.'" '.$attributes.' />';
|
607 |
-
|
608 |
-
$string .= '
|
609 |
-
<script type="text/javascript">
|
610 |
-
jQuery(document).ready(function() {
|
611 |
-
DatePicker_'.$jssafeid.' = new JsDatePick({
|
612 |
-
useMode:'.get_option('useMode').',
|
613 |
-
isStripped:'.get_option('isStripped').',
|
614 |
-
target:"'.$id.'",
|
615 |
-
limitToToday:"'.get_option('limitToToday').'",
|
616 |
-
cellColorScheme:"'.get_option('cellColorScheme').'",
|
617 |
-
dateFormat:"'.get_option('dateFormat').'",
|
618 |
-
imgPath:"'.plugins_url('/img/'.get_option('cellColorScheme').'/', __FILE__).'",
|
619 |
-
weekStartDay:'.get_option('weekStartDay').',
|
620 |
-
yearsRange:['.get_option('yearsRange').'],
|
621 |
-
directionality:"'.get_option('directionality').'",
|
622 |
-
yearButtons:'.get_option('yearButtons').',
|
623 |
-
monthButtons:'.get_option('monthButtons').',
|
624 |
-
animate:'.get_option('animate');
|
625 |
-
if ($seldate) {
|
626 |
-
$string .= ',
|
627 |
-
selectedDate: {
|
628 |
-
year: '.$seldate['y'].',
|
629 |
-
month: '.$seldate['m'].',
|
630 |
-
day: '.$seldate['d'].'
|
631 |
-
}';
|
632 |
-
}
|
633 |
-
$string .= '
|
634 |
-
});
|
635 |
-
});
|
636 |
-
</script>';
|
637 |
-
$schemecss = self::get_scheme_style(get_option('cellColorScheme'));
|
638 |
-
if ($schemecss)
|
639 |
-
$string .= '
|
640 |
-
<style type="text/css">
|
641 |
-
@import url(\''.$schemecss.'\');
|
642 |
-
</style>';
|
643 |
-
|
644 |
-
return $string;
|
645 |
-
}
|
646 |
-
|
647 |
-
/**
|
648 |
-
* wpcf7_shotcode_handler($tag)
|
649 |
-
*
|
650 |
-
* Handler for wpcf7 shortcodes [date ] and [date* ]
|
651 |
-
* @param Array $tag, this is the tag that will be handled (can be 'date' or 'date*')
|
652 |
-
* @return String $html, the HTML that will be appended to the form
|
653 |
-
*/
|
654 |
-
public static function wpcf7_shotcode_handler($tag) {
|
655 |
-
global $wpcf7_contact_form;
|
656 |
-
|
657 |
-
if ( ! is_array( $tag ) )
|
658 |
-
return '';
|
659 |
-
|
660 |
-
$type = $tag['type'];
|
661 |
-
$name = $tag['name'];
|
662 |
-
|
663 |
-
$options = (array) $tag['options'];
|
664 |
-
$values = (array) $tag['values'];
|
665 |
-
|
666 |
-
if ( empty( $name ) )
|
667 |
-
return '';
|
668 |
-
|
669 |
-
$atts = array();
|
670 |
-
|
671 |
-
if ( 'date*' == $type )
|
672 |
-
$atts['class'] = ' wpcf7-validates-as-required';
|
673 |
-
|
674 |
-
foreach ( $options as $option ) {
|
675 |
-
if ( preg_match( '%^id:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
676 |
-
$atts['id'] = $matches[1];
|
677 |
-
|
678 |
-
} elseif ( preg_match( '%^class:([-0-9a-zA-Z_]+)$%', $option, $matches ) ) {
|
679 |
-
$atts['class'] .= ' ' . $matches[1];
|
680 |
-
|
681 |
-
} elseif ( preg_match( '%^([0-9]*)[/x]([0-9]*)$%', $option, $matches ) ) {
|
682 |
-
$atts['size'] = (int) $matches[1];
|
683 |
-
$atts['maxlength'] = (int) $matches[2];
|
684 |
-
}
|
685 |
-
}
|
686 |
-
|
687 |
-
if ( is_a( $wpcf7_contact_form, 'WPCF7_ContactForm' ) && $wpcf7_contact_form->is_posted() ) {
|
688 |
-
if ( isset( $_POST['_wpcf7_mail_sent'] ) && $_POST['_wpcf7_mail_sent']['ok'] )
|
689 |
-
$value = '';
|
690 |
-
else
|
691 |
-
$value = $_POST[$name];
|
692 |
-
} else {
|
693 |
-
$value = $values[0];
|
694 |
-
}
|
695 |
-
|
696 |
-
$data = array(
|
697 |
-
"name" => $name,
|
698 |
-
"atts" => (array) $atts,
|
699 |
-
"opts" => NULL,
|
700 |
-
"value" => $value
|
701 |
-
);
|
702 |
-
|
703 |
-
$html = self::page_text_filter_callback($data);
|
704 |
-
$validation_error = '';
|
705 |
-
if ( is_a( $wpcf7_contact_form, 'WPCF7_ContactForm' ) )
|
706 |
-
$validation_error = $wpcf7_contact_form->validation_error( $name );
|
707 |
-
|
708 |
-
$html = '<span class="wpcf7-form-control-wrap ' . $name . '">' . str_replace('<p>','',$html) . $validation_error . '</span>';
|
709 |
-
|
710 |
-
return $html;
|
711 |
}
|
712 |
|
713 |
-
|
714 |
-
|
715 |
-
*
|
716 |
-
* This is used to validate the Contact Form 7 'date' field
|
717 |
-
* @param Array $result, 'valid' key has a boolean value (true if valid)
|
718 |
-
* and 'reason' key with a message if not valid
|
719 |
-
* @param Array $tag, contains the type and name of the field that is validated
|
720 |
-
* @return Array $result
|
721 |
-
*/
|
722 |
-
public static function wpcf7_validation_filter( $result, $tag ) {
|
723 |
-
global $wpcf7_contact_form;
|
724 |
|
725 |
-
$
|
726 |
-
$name = $tag['name'];
|
727 |
|
728 |
-
|
729 |
-
|
730 |
-
if ( 'date*' == $type ) {
|
731 |
-
if ( '' == $_POST[$name] ) {
|
732 |
-
$result['valid'] = false;
|
733 |
-
$result['reason'][$name] = $wpcf7_contact_form->message( 'invalid_required' );
|
734 |
-
}
|
735 |
-
}
|
736 |
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
* Function for loading the l10n files from /languages/ dir for the administatrion panel
|
744 |
-
*/
|
745 |
-
public static function admin_l10n() {
|
746 |
-
load_plugin_textdomain( 'contact-form-7-datepicker', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
747 |
-
}
|
748 |
-
|
749 |
-
/**
|
750 |
-
* datepicker_shortcode_handler()
|
751 |
-
*
|
752 |
-
* Function that handles the [datepicker name="?" id="?" class="?" newfield="?" value="?"] shortcode
|
753 |
-
*/
|
754 |
-
public static function datepicker_shortcode_handler($atts) {
|
755 |
-
extract(shortcode_atts(array(
|
756 |
-
'name' => '',
|
757 |
-
'id' => '',
|
758 |
-
'class' => '',
|
759 |
-
'newfield' => 'true',
|
760 |
-
'value' => ''
|
761 |
-
), $atts));
|
762 |
-
|
763 |
-
$data = array(
|
764 |
-
"name" => ($name) ? "{$name}" : "{$id}",
|
765 |
-
"atts" => array(
|
766 |
-
"id" => ($id) ? "{$id}" : "{$name}",
|
767 |
-
"class" => "{$class}"),
|
768 |
-
"opts" => array(
|
769 |
-
"newfield" => "{$newfield}"),
|
770 |
-
"value" => "{$value}"
|
771 |
);
|
772 |
-
|
773 |
-
return self::page_text_filter_callback($data);
|
774 |
-
}
|
775 |
-
|
776 |
-
/**
|
777 |
-
* calendar_l10n()
|
778 |
-
*
|
779 |
-
* Localization of JS file strings
|
780 |
-
*/
|
781 |
-
public static function calendar_l10n() {
|
782 |
-
$l10n_strings = array(
|
783 |
-
'MONTHS' => array(
|
784 |
-
__('January', 'contact-form-7-datepicker'),
|
785 |
-
__('February', 'contact-form-7-datepicker'),
|
786 |
-
__('March', 'contact-form-7-datepicker'),
|
787 |
-
__('April', 'contact-form-7-datepicker'),
|
788 |
-
__('May', 'contact-form-7-datepicker'),
|
789 |
-
__('June', 'contact-form-7-datepicker'),
|
790 |
-
__('July', 'contact-form-7-datepicker'),
|
791 |
-
__('August', 'contact-form-7-datepicker'),
|
792 |
-
__('September', 'contact-form-7-datepicker'),
|
793 |
-
__('October', 'contact-form-7-datepicker'),
|
794 |
-
__('November', 'contact-form-7-datepicker'),
|
795 |
-
__('December', 'contact-form-7-datepicker')
|
796 |
-
),
|
797 |
-
'DAYS_3' => array(
|
798 |
-
__('Sun', 'contact-form-7-datepicker'),
|
799 |
-
__('Mon', 'contact-form-7-datepicker'),
|
800 |
-
__('Tue', 'contact-form-7-datepicker'),
|
801 |
-
__('Wed', 'contact-form-7-datepicker'),
|
802 |
-
__('Thu', 'contact-form-7-datepicker'),
|
803 |
-
__('Fri', 'contact-form-7-datepicker'),
|
804 |
-
__('Sat', 'contact-form-7-datepicker')
|
805 |
-
),
|
806 |
-
'MONTH_FWD' => __('Move a month forward', 'contact-form-7-datepicker'),
|
807 |
-
'MONTH_BCK' => __('Move a month backward', 'contact-form-7-datepicker'),
|
808 |
-
'YEAR_FWD' => __('Move a year forward', 'contact-form-7-datepicker'),
|
809 |
-
'YEAR_BCK' => __('Move a year backward', 'contact-form-7-datepicker'),
|
810 |
-
'CLOSE' => __('Close the calendar', 'contact-form-7-datepicker'),
|
811 |
-
'ERROR_2' => __('Date object invalid!', 'contact-form-7-datepicker'),
|
812 |
-
'ERROR_1' => __('Date object invalid!', 'contact-form-7-datepicker'),
|
813 |
-
'ERROR_4' => __('Target invalid!', 'contact-form-7-datepicker'),
|
814 |
-
'ERROR_3' => __('Target invalid!', 'contact-form-7-datepicker')
|
815 |
-
);
|
816 |
-
$l10n = array('l10n_print_after' => 'g_l10n = ' . json_encode($l10n_strings) . ';');
|
817 |
-
|
818 |
-
wp_localize_script('jsDatePickJS', 'g_l10n', $l10n);
|
819 |
}
|
820 |
|
821 |
-
|
822 |
-
|
823 |
-
*
|
824 |
-
* Function for registering our shortcodes with CF7
|
825 |
-
*/
|
826 |
-
public static function register_shortcodes() {
|
827 |
-
if (function_exists('wpcf7_add_shortcode')) {
|
828 |
-
wpcf7_add_shortcode('date', array(__CLASS__, 'wpcf7_shotcode_handler'), true);
|
829 |
-
wpcf7_add_shortcode('date*', array(__CLASS__, 'wpcf7_shotcode_handler'), true);
|
830 |
-
}
|
831 |
|
832 |
-
|
833 |
-
|
834 |
|
835 |
-
|
836 |
-
* tag_generator()
|
837 |
-
*
|
838 |
-
* Registers the tag generator for CF7
|
839 |
-
*/
|
840 |
-
public static function tag_generator() {
|
841 |
-
if (function_exists('wpcf7_add_tag_generator')) {
|
842 |
-
wpcf7_add_tag_generator('date', __('Date field', 'contact-form-7-datepicker'),
|
843 |
-
'wpcf7-tg-pane-date', array(__CLASS__, 'wpcf7_tg_pane_datepicker_'));
|
844 |
-
}
|
845 |
}
|
846 |
-
|
847 |
-
/**
|
848 |
-
* wpcf7_tg_pane_datepicker_(&$contact_form)
|
849 |
-
*
|
850 |
-
* Caller function for the tag generator
|
851 |
-
* @param reference &$contact_form
|
852 |
-
*/
|
853 |
-
public static function wpcf7_tg_pane_datepicker_(&$contact_form) {
|
854 |
-
self::wpcf7_tg_pane_datepicker( 'date' );
|
855 |
-
}
|
856 |
-
|
857 |
-
/**
|
858 |
-
* wpcf7_tg_pane_datepicker($type = 'date')
|
859 |
-
*
|
860 |
-
* Callback function for the tag generator (called by wpcf7_tg_pane_datepicker_)
|
861 |
-
* @param $type = 'date'
|
862 |
-
*/
|
863 |
-
private function wpcf7_tg_pane_datepicker($type = 'date') { ?>
|
864 |
-
<div id="wpcf7-tg-pane-<?php echo $type; ?>" class="hidden">
|
865 |
-
<form action="">
|
866 |
-
<table>
|
867 |
-
<tr>
|
868 |
-
<td>
|
869 |
-
<input type="checkbox" name="required" /> <?php echo esc_html( __( 'Required field?', 'wpcf7' ) ); ?>
|
870 |
-
</td>
|
871 |
-
</tr>
|
872 |
-
<tr>
|
873 |
-
<td>
|
874 |
-
<?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" />
|
875 |
-
</td>
|
876 |
-
<td></td>
|
877 |
-
</tr>
|
878 |
-
</table>
|
879 |
-
|
880 |
-
<table>
|
881 |
-
<tr>
|
882 |
-
<td>
|
883 |
-
<code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
|
884 |
-
<input type="text" name="id" class="idvalue oneline option" />
|
885 |
-
</td>
|
886 |
-
|
887 |
-
<td>
|
888 |
-
<code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
|
889 |
-
<input type="text" name="class" class="classvalue oneline option" />
|
890 |
-
</td>
|
891 |
-
</tr>
|
892 |
-
|
893 |
-
<tr>
|
894 |
-
<td>
|
895 |
-
<code>size</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
|
896 |
-
<input type="text" name="size" class="numeric oneline option" />
|
897 |
-
</td>
|
898 |
-
|
899 |
-
<td>
|
900 |
-
<code>maxlength</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
|
901 |
-
<input type="text" name="maxlength" class="numeric oneline option" />
|
902 |
-
</td>
|
903 |
-
</tr>
|
904 |
-
</table>
|
905 |
-
|
906 |
-
<div class="tg-tag">
|
907 |
-
<?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="<?php echo $type; ?>" class="tag" readonly="readonly" onfocus="this.select()" />
|
908 |
-
</div>
|
909 |
-
|
910 |
-
<div class="tg-mail-tag">
|
911 |
-
<?php echo esc_html( __( "And, put this code into the Mail fields below.", 'wpcf7' ) ); ?><br /><span class="arrow">⬇</span> <input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" />
|
912 |
-
</div>
|
913 |
-
</form>
|
914 |
-
</div><?php
|
915 |
-
}
|
916 |
-
|
917 |
}
|
918 |
|
919 |
-
|
920 |
-
|
921 |
-
?>
|
1 |
<?php
|
2 |
+
/**
|
3 |
Plugin Name: Contact Form 7 Datepicker
|
4 |
Plugin URI: https://github.com/relu/contact-form-7-datepicker/
|
5 |
+
Description: Easily add a date field using jQuery UI's datepicker to your CF7 forms. This plugin depends on Contact Form 7.
|
6 |
Author: Aurel Canciu
|
7 |
+
Version: 2.0
|
8 |
Author URI: https://github.com/relu/
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
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 |
<?php
|
28 |
|
29 |
+
class ContactForm7Datepicker {
|
|
|
30 |
|
31 |
+
public static function init() {
|
32 |
+
add_action('plugins_loaded', array(__CLASS__, 'load_date_module'), 10);
|
|
|
33 |
|
34 |
+
add_action('wpcf7_enqueue_scripts', array(__CLASS__, 'enqueue_js'));
|
35 |
+
add_action('wpcf7_enqueue_styles', array(__CLASS__, 'enqueue_css'));
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
register_activation_hook(__FILE__, array(__CLASS__, 'activate'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
+
if (is_admin()) {
|
40 |
+
require_once dirname(__FILE__) . '/admin.php';
|
41 |
+
ContactForm7Datepicker_Admin::init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
}
|
43 |
}
|
44 |
|
45 |
+
public static function load_date_module() {
|
46 |
+
require_once dirname(__FILE__) . '/date-module.php';
|
47 |
+
ContactForm7Datepicker_Date::register();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
+
public static function activate() {
|
51 |
+
if (! get_option('cf7dp_ui_theme'))
|
52 |
+
add_option('cf7dp_ui_theme', 'base');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
|
55 |
+
public static function enqueue_js() {
|
56 |
+
wp_enqueue_script('jquery-ui-datepicker');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
+
$regional = CF7_DatePicker::get_regional_match();
|
|
|
59 |
|
60 |
+
if (! $regional)
|
61 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
+
wp_enqueue_script(
|
64 |
+
'jquery-ui-' . $regional,
|
65 |
+
'http://ajax.googleapis.com/ajax/libs/jqueryui/1/i18n/jquery.ui.datepicker-' . $regional . '.min.js',
|
66 |
+
array('jquery-ui-datepicker'),
|
67 |
+
'',
|
68 |
+
false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
|
72 |
+
public static function enqueue_css() {
|
73 |
+
$theme = get_option('cf7dp_ui_theme');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
+
if (! is_admin() && $theme == 'disabled')
|
76 |
+
return;
|
77 |
|
78 |
+
wp_enqueue_style('jquery-ui-theme', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/' . $theme . '/jquery-ui.css', array(), '');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
|
82 |
+
ContactForm7Datepicker::init();
|
|
|
|
css/jsDatePick_ltr.css
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
|
3 |
-
Copyright 2009 Itamar Arjuan
|
4 |
-
jsDatePick is distributed under the terms of the GNU General Public License.
|
5 |
-
|
6 |
-
*/
|
7 |
-
|
8 |
-
.JsDatePickBox { position:relative; width:212px; font-family:Arial; }
|
9 |
-
|
10 |
-
.JsDatePickBox .jsDatePickCloseButton { cursor:pointer; position:absolute; z-index:1; top:1px; right:10px; width:33px; height:13px; background:url(../img/closeButton_normal.gif) left top no-repeat; }
|
11 |
-
.JsDatePickBox .jsDatePickCloseButtonOver { cursor:pointer; position:absolute; z-index:1; top:1px; right:10px; width:33px; height:13px; background:url(../img/closeButton_over.gif) left top no-repeat; }
|
12 |
-
.JsDatePickBox .jsDatePickCloseButtonDown { cursor:pointer; position:absolute; z-index:1; top:1px; right:10px; width:33px; height:13px; background:url(../img/closeButton_down.gif) left top no-repeat; }
|
13 |
-
|
14 |
-
.JsDatePickBox .boxLeftWall { float:left; width:7px; margin:0; padding:0; }
|
15 |
-
.JsDatePickBox .boxLeftWall .leftTopCorner{ margin:0; padding:0; width:7px; height:8px; background:url(../img/boxTopLeftCorner.png) left top no-repeat; overflow:hidden; }
|
16 |
-
.JsDatePickBox .boxLeftWall .leftBottomCorner{ margin:0; padding:0; width:7px; height:8px; background:url(../img/boxBottomLeftCorner.png) left top no-repeat; overflow:hidden; }
|
17 |
-
.JsDatePickBox .boxLeftWall .leftWall{ margin:0; padding:0; width:7px; background:url(../img/boxSideWallPx.gif) #ffffff left top repeat-y; overflow:hidden; }
|
18 |
-
|
19 |
-
.JsDatePickBox .boxRightWall { float:left; width:7px; margin:0; padding:0;}
|
20 |
-
.JsDatePickBox .boxRightWall .rightTopCorner{ margin:0; padding:0; width:7px; height:8px; background:url(../img/boxTopRightCorner.png) left top no-repeat; overflow:hidden; }
|
21 |
-
.JsDatePickBox .boxRightWall .rightBottomCorner{ margin:0; padding:0; width:7px; height:8px; background:url(../img/boxBottomRightCorner.png) left top no-repeat; overflow:hidden; }
|
22 |
-
.JsDatePickBox .boxRightWall .rightWall{ margin:0; padding:0; width:7px; background:url(../img/boxSideWallPx.gif) #ffffff right top repeat-y; overflow:hidden; }
|
23 |
-
|
24 |
-
.JsDatePickBox .topWall { position:absolute; overflow:hidden; top:0px; left:7px; width:198px; height:4px; background:url(../img/boxTopPx.gif) #ffffff left top repeat-x; }
|
25 |
-
.JsDatePickBox .bottomWall { position:absolute; overflow:hidden; bottom:-1px; left:7px; width:198px; height:4px; background:url(../img/boxTopPx.gif) #ffffff left top repeat-x; }
|
26 |
-
|
27 |
-
.JsDatePickBox .hiddenBoxLeftWall { float:left; width:0px; overflow:hidden; overflow:hidden;}
|
28 |
-
.JsDatePickBox .hiddenBoxRightWall { float:left; width:0px; overflow:hidden; overflow:hidden;}
|
29 |
-
|
30 |
-
.JsDatePickBox .boxMain { float:left; background-color:#ffffff; margin:0; padding:15px 0 5px 0; }
|
31 |
-
.JsDatePickBox .boxMainStripped { background:#ffffff; border:none; }
|
32 |
-
.JsDatePickBox .tooltip { height:12px; line-height:11px; overflow:hidden; font-size:10px; color:#666666; text-align:left; padding:0px; margin:2px 0 2px 0; }
|
33 |
-
.JsDatePickBox .weekDaysRow { height:12px; overflow:hidden; line-height:11px; font-size:10px; color:#666666; text-align:center; padding:0px; margin:2px 0 0 0; }
|
34 |
-
.JsDatePickBox .weekDaysRow .weekDay { float:left; height:14px; overflow:hidden; width:24px; margin:0 5px 0 0; padding:0; }
|
35 |
-
|
36 |
-
.JsDatePickBox .boxMainInner { background:#ffffff; width:198px; float:left; margin:5px 0 0 0; padding:0; }
|
37 |
-
.JsDatePickBox .boxMainCellsContainer { background-color:#ffffff; margin:0; padding:0; }
|
38 |
-
|
39 |
-
.JsDatePickBox .boxMainInner .controlsBar { overflow:hidden; height:20px; position:relative; }
|
40 |
-
.JsDatePickBox .boxMainInner .controlsBarText { overflow:hidden; height:20px; line-height:20px; color:#000000; font-size:12px; text-align:center; }
|
41 |
-
|
42 |
-
.JsDatePickBox .boxMainInner .monthForwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:22px; background:url(../img/monthForward_normal.gif) left top no-repeat; }
|
43 |
-
.JsDatePickBox .boxMainInner .monthForwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:22px; background:url(../img/monthForward_over.gif) left top no-repeat; }
|
44 |
-
.JsDatePickBox .boxMainInner .monthForwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:22px; background:url(../img/monthForward_down.gif) left top no-repeat; }
|
45 |
-
|
46 |
-
.JsDatePickBox .boxMainInner .monthBackwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:22px; background:url(../img/monthBackward_normal.gif) left top no-repeat; }
|
47 |
-
.JsDatePickBox .boxMainInner .monthBackwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:22px; background:url(../img/monthBackward_over.gif) left top no-repeat; }
|
48 |
-
.JsDatePickBox .boxMainInner .monthBackwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:22px; background:url(../img/monthBackward_down.gif) left top no-repeat; }
|
49 |
-
|
50 |
-
.JsDatePickBox .boxMainInner .yearForwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:0px; background:url(../img/yearForward_normal.gif) left top no-repeat; }
|
51 |
-
.JsDatePickBox .boxMainInner .yearForwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:0px; background:url(../img/yearForward_over.gif) left top no-repeat; }
|
52 |
-
.JsDatePickBox .boxMainInner .yearForwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:0px; background:url(../img/yearForward_down.gif) left top no-repeat; }
|
53 |
-
|
54 |
-
.JsDatePickBox .boxMainInner .yearBackwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:0px; background:url(../img/yearBackward_normal.gif) left top no-repeat; }
|
55 |
-
.JsDatePickBox .boxMainInner .yearBackwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:0px; background:url(../img/yearBackward_over.gif) left top no-repeat; }
|
56 |
-
.JsDatePickBox .boxMainInner .yearBackwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:0px; background:url(../img/yearBackward_down.gif) left top no-repeat; }
|
57 |
-
|
58 |
-
.JsDatePickBox .boxMainInner .skipDay { cursor:default; overflow:hidden; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; }
|
59 |
-
.JsDatePickBox .boxMainInner .dayNormal { -khtml-user-select: none; font-size:12px; cursor:pointer; overflow:hidden; color:#4c4c4c; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(../img/dayNormal.gif) left top no-repeat;*/ }
|
60 |
-
.JsDatePickBox .boxMainInner .dayNormalToday { -khtml-user-select: none; font-size:12px; cursor:pointer; overflow:hidden; color:#f40f0f; font-weight:bold; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(../img/dayNormal.gif) left top no-repeat;*/ }
|
61 |
-
|
62 |
-
.JsDatePickBox .boxMainInner .dayDisabled { -khtml-user-select: none; cursor:default; font-size:12px; overflow:hidden; color:#999999; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(../img/dayNormal.gif) left top no-repeat;*/ }
|
63 |
-
|
64 |
-
.JsDatePickBox .boxMainInner .dayOver { -khtml-user-select: none; cursor:pointer; font-size:12px; overflow:hidden; color:#4c4c4c; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(../img/dayOver.gif) left top no-repeat;*/ }
|
65 |
-
.JsDatePickBox .boxMainInner .dayOverToday { -khtml-user-select: none; cursor:pointer; font-size:12px; overflow:hidden; font-weight:bold; color:#f40f0f; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(../img/dayOver.gif) left top no-repeat;*/ }
|
66 |
-
|
67 |
-
.JsDatePickBox .boxMainInner .dayDown { -khtml-user-select: none; cursor:pointer; font-size:12px; overflow:hidden; color:#F9F9F9; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /*background:url(../img/dayDown.gif) left top no-repeat; */ }
|
68 |
-
.JsDatePickBox .boxMainInner .dayDownToday { -khtml-user-select: none; cursor:pointer; font-size:12px; overflow:hidden; color:#f40f0f; font-weight:bold; width:24px; height:25px; float:left; margin:4px 5px 0 0; padding:0; text-align:center; line-height:25px; /* background:url(../img/dayDown.gif) left top no-repeat;*/ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/jsDatePick_ltr.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.JsDatePickBox{position:relative;width:212px;font-family:Arial;}.JsDatePickBox .jsDatePickCloseButton{cursor:pointer;position:absolute;z-index:1;top:1px;right:10px;width:33px;height:13px;background:url(../img/closeButton_normal.gif) left top no-repeat;}.JsDatePickBox .jsDatePickCloseButtonOver{cursor:pointer;position:absolute;z-index:1;top:1px;right:10px;width:33px;height:13px;background:url(../img/closeButton_over.gif) left top no-repeat;}.JsDatePickBox .jsDatePickCloseButtonDown{cursor:pointer;position:absolute;z-index:1;top:1px;right:10px;width:33px;height:13px;background:url(../img/closeButton_down.gif) left top no-repeat;}.JsDatePickBox .boxLeftWall{float:left;width:7px;margin:0;padding:0;}.JsDatePickBox .boxLeftWall .leftTopCorner{margin:0;padding:0;width:7px;height:8px;background:url(../img/boxTopLeftCorner.png) left top no-repeat;overflow:hidden;}.JsDatePickBox .boxLeftWall .leftBottomCorner{margin:0;padding:0;width:7px;height:8px;background:url(../img/boxBottomLeftCorner.png) left top no-repeat;overflow:hidden;}.JsDatePickBox .boxLeftWall .leftWall{margin:0;padding:0;width:7px;background:url(../img/boxSideWallPx.gif) #fff left top repeat-y;overflow:hidden;}.JsDatePickBox .boxRightWall{float:left;width:7px;margin:0;padding:0;}.JsDatePickBox .boxRightWall .rightTopCorner{margin:0;padding:0;width:7px;height:8px;background:url(../img/boxTopRightCorner.png) left top no-repeat;overflow:hidden;}.JsDatePickBox .boxRightWall .rightBottomCorner{margin:0;padding:0;width:7px;height:8px;background:url(../img/boxBottomRightCorner.png) left top no-repeat;overflow:hidden;}.JsDatePickBox .boxRightWall .rightWall{margin:0;padding:0;width:7px;background:url(../img/boxSideWallPx.gif) #fff right top repeat-y;overflow:hidden;}.JsDatePickBox .topWall{position:absolute;overflow:hidden;top:0;left:7px;width:198px;height:4px;background:url(../img/boxTopPx.gif) #fff left top repeat-x;}.JsDatePickBox .bottomWall{position:absolute;overflow:hidden;bottom:-1px;left:7px;width:198px;height:4px;background:url(../img/boxTopPx.gif) #fff left top repeat-x;}.JsDatePickBox .hiddenBoxLeftWall{float:left;width:0;overflow:hidden;overflow:hidden;}.JsDatePickBox .hiddenBoxRightWall{float:left;width:0;overflow:hidden;overflow:hidden;}.JsDatePickBox .boxMain{float:left;background-color:#fff;margin:0;padding:15px 0 5px 0;}.JsDatePickBox .boxMainStripped{background:#fff;border:none;}.JsDatePickBox .tooltip{height:12px;line-height:11px;overflow:hidden;font-size:10px;color:#666;text-align:left;padding:0;margin:2px 0 2px 0;}.JsDatePickBox .weekDaysRow{height:12px;overflow:hidden;line-height:11px;font-size:10px;color:#666;text-align:center;padding:0;margin:2px 0 0 0;}.JsDatePickBox .weekDaysRow .weekDay{float:left;height:14px;overflow:hidden;width:24px;margin:0 5px 0 0;padding:0;}.JsDatePickBox .boxMainInner{background:#fff;width:198px;float:left;margin:5px 0 0 0;padding:0;}.JsDatePickBox .boxMainCellsContainer{background-color:#fff;margin:0;padding:0;}.JsDatePickBox .boxMainInner .controlsBar{overflow:hidden;height:20px;position:relative;}.JsDatePickBox .boxMainInner .controlsBarText{overflow:hidden;height:20px;line-height:20px;color:#000;font-size:12px;text-align:center;}.JsDatePickBox .boxMainInner .monthForwardButton{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:22px;background:url(../img/monthForward_normal.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .monthForwardButtonOver{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:22px;background:url(../img/monthForward_over.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .monthForwardButtonDown{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:22px;background:url(../img/monthForward_down.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .monthBackwardButton{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:22px;background:url(../img/monthBackward_normal.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .monthBackwardButtonOver{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:22px;background:url(../img/monthBackward_over.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .monthBackwardButtonDown{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:22px;background:url(../img/monthBackward_down.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearForwardButton{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:0;background:url(../img/yearForward_normal.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearForwardButtonOver{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:0;background:url(../img/yearForward_over.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearForwardButtonDown{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:0;background:url(../img/yearForward_down.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearBackwardButton{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:0;background:url(../img/yearBackward_normal.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearBackwardButtonOver{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:0;background:url(../img/yearBackward_over.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearBackwardButtonDown{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:0;background:url(../img/yearBackward_down.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .skipDay{cursor:default;overflow:hidden;width:24px;height:25px;float:left;margin:4px 5px 0 0;padding:0;}.JsDatePickBox .boxMainInner .dayNormal{-khtml-user-select:none;font-size:12px;cursor:pointer;overflow:hidden;color:#4c4c4c;width:24px;height:25px;float:left;margin:4px 5px 0 0;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayNormalToday{-khtml-user-select:none;font-size:12px;cursor:pointer;overflow:hidden;color:#f40f0f;font-weight:bold;width:24px;height:25px;float:left;margin:4px 5px 0 0;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayDisabled{-khtml-user-select:none;cursor:default;font-size:12px;overflow:hidden;color:#999;width:24px;height:25px;float:left;margin:4px 5px 0 0;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayOver{-khtml-user-select:none;cursor:pointer;font-size:12px;overflow:hidden;color:#4c4c4c;width:24px;height:25px;float:left;margin:4px 5px 0 0;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayOverToday{-khtml-user-select:none;cursor:pointer;font-size:12px;overflow:hidden;font-weight:bold;color:#f40f0f;width:24px;height:25px;float:left;margin:4px 5px 0 0;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayDown{-khtml-user-select:none;cursor:pointer;font-size:12px;overflow:hidden;color:#F9F9F9;width:24px;height:25px;float:left;margin:4px 5px 0 0;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayDownToday{-khtml-user-select:none;cursor:pointer;font-size:12px;overflow:hidden;color:#f40f0f;font-weight:bold;width:24px;height:25px;float:left;margin:4px 5px 0 0;padding:0;text-align:center;line-height:25px;}
|
|
css/jsDatePick_rtl.css
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
|
3 |
-
Copyright 2009 Itamar Arjuan
|
4 |
-
jsDatePick is distributed under the terms of the GNU General Public License.
|
5 |
-
|
6 |
-
*/
|
7 |
-
|
8 |
-
.JsDatePickBox { position:relative; width:212px; font-family:Arial; }
|
9 |
-
|
10 |
-
.JsDatePickBox .jsDatePickCloseButton { cursor:pointer; position:absolute; z-index:1; top:1px; left:10px; width:33px; height:13px; background:url(../img/closeButton_normal.gif) left top no-repeat; }
|
11 |
-
.JsDatePickBox .jsDatePickCloseButtonOver { cursor:pointer; position:absolute; z-index:1; top:1px; left:10px; width:33px; height:13px; background:url(../img/closeButton_over.gif) left top no-repeat; }
|
12 |
-
.JsDatePickBox .jsDatePickCloseButtonDown { cursor:pointer; position:absolute; z-index:1; top:1px; left:10px; width:33px; height:13px; background:url(../img/closeButton_down.gif) left top no-repeat; }
|
13 |
-
|
14 |
-
.JsDatePickBox .boxLeftWall { float:left; width:7px; margin:0; padding:0; }
|
15 |
-
.JsDatePickBox .boxLeftWall .leftTopCorner{ margin:0; padding:0; width:7px; height:8px; background:url(../img/boxTopLeftCorner.png) left top no-repeat; overflow:hidden; }
|
16 |
-
.JsDatePickBox .boxLeftWall .leftBottomCorner{ margin:0; padding:0; width:7px; height:8px; background:url(../img/boxBottomLeftCorner.png) left top no-repeat; overflow:hidden; }
|
17 |
-
.JsDatePickBox .boxLeftWall .leftWall{ margin:0; padding:0; width:7px; background:url(../img/boxSideWallPx.gif) #ffffff left top repeat-y; overflow:hidden; }
|
18 |
-
|
19 |
-
.JsDatePickBox .boxRightWall { float:left; width:7px; margin:0; padding:0;}
|
20 |
-
.JsDatePickBox .boxRightWall .rightTopCorner{ margin:0; padding:0; width:7px; height:8px; background:url(../img/boxTopRightCorner.png) left top no-repeat; overflow:hidden; }
|
21 |
-
.JsDatePickBox .boxRightWall .rightBottomCorner{ margin:0; padding:0; width:7px; height:8px; background:url(../img/boxBottomRightCorner.png) left top no-repeat; overflow:hidden; }
|
22 |
-
.JsDatePickBox .boxRightWall .rightWall{ margin:0; padding:0; width:7px; background:url(../img/boxSideWallPx.gif) #ffffff right top repeat-y; overflow:hidden; }
|
23 |
-
|
24 |
-
.JsDatePickBox .topWall { position:absolute; overflow:hidden; top:0px; left:7px; width:198px; height:4px; background:url(../img/boxTopPx.gif) #ffffff left top repeat-x; }
|
25 |
-
.JsDatePickBox .bottomWall { position:absolute; overflow:hidden; bottom:-1px; left:7px; width:198px; height:4px; background:url(../img/boxTopPx.gif) #ffffff left top repeat-x; }
|
26 |
-
|
27 |
-
.JsDatePickBox .hiddenBoxLeftWall { float:left; width:0px; overflow:hidden; overflow:hidden;}
|
28 |
-
.JsDatePickBox .hiddenBoxRightWall { float:left; width:0px; overflow:hidden; overflow:hidden;}
|
29 |
-
|
30 |
-
.JsDatePickBox .boxMain { float:left; background-color:#ffffff; margin:0; padding:15px 0 5px 0; }
|
31 |
-
.JsDatePickBox .boxMainStripped { background:#ffffff; border:none; }
|
32 |
-
.JsDatePickBox .tooltip { height:12px; direction:rtl; text-align:right; line-height:11px; overflow:hidden; font-size:10px; color:#666666; padding:0px; margin:2px 0 2px 0; }
|
33 |
-
.JsDatePickBox .weekDaysRow { height:12px; overflow:hidden; line-height:11px; font-size:10px; color:#666666; text-align:center; padding:0px; margin:2px 0 0 0; }
|
34 |
-
.JsDatePickBox .weekDaysRow .weekDay { float:right; direction:rtl; height:14px; overflow:hidden; width:24px; margin:0 5px 0 0; padding:0; }
|
35 |
-
|
36 |
-
.JsDatePickBox .boxMainInner { background:#ffffff; width:198px; float:left; margin:5px 0 0 0; padding:0; }
|
37 |
-
.JsDatePickBox .boxMainCellsContainer { background-color:#ffffff; margin:0; padding:0; }
|
38 |
-
|
39 |
-
.JsDatePickBox .boxMainInner .controlsBar { overflow:hidden; height:20px; position:relative; }
|
40 |
-
.JsDatePickBox .boxMainInner .controlsBarText { overflow:hidden; height:20px; direction:rtl; line-height:20px; color:#000000; font-size:12px; text-align:center; }
|
41 |
-
|
42 |
-
.JsDatePickBox .boxMainInner .monthForwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:22px; background:url(../img/monthBackward_normal.gif) left top no-repeat; }
|
43 |
-
.JsDatePickBox .boxMainInner .monthForwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:22px; background:url(../img/monthBackward_over.gif) left top no-repeat; }
|
44 |
-
.JsDatePickBox .boxMainInner .monthForwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:22px; background:url(../img/monthBackward_down.gif) left top no-repeat; }
|
45 |
-
|
46 |
-
.JsDatePickBox .boxMainInner .monthBackwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:22px; background:url(../img/monthForward_normal.gif) left top no-repeat; }
|
47 |
-
.JsDatePickBox .boxMainInner .monthBackwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:22px; background:url(../img/monthForward_over.gif) left top no-repeat; }
|
48 |
-
.JsDatePickBox .boxMainInner .monthBackwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:22px; background:url(../img/monthForward_down.gif) left top no-repeat; }
|
49 |
-
|
50 |
-
.JsDatePickBox .boxMainInner .yearForwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:0px; background:url(../img/yearBackward_normal.gif) left top no-repeat; }
|
51 |
-
.JsDatePickBox .boxMainInner .yearForwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:0px; background:url(../img/yearBackward_over.gif) left top no-repeat; }
|
52 |
-
.JsDatePickBox .boxMainInner .yearForwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; left:0px; background:url(../img/yearBackward_down.gif) left top no-repeat; }
|
53 |
-
|
54 |
-
.JsDatePickBox .boxMainInner .yearBackwardButton { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:0px; background:url(../img/yearForward_normal.gif) left top no-repeat; }
|
55 |
-
.JsDatePickBox .boxMainInner .yearBackwardButtonOver { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:0px; background:url(../img/yearForward_over.gif) left top no-repeat; }
|
56 |
-
.JsDatePickBox .boxMainInner .yearBackwardButtonDown { overflow:hidden; cursor:pointer; width:20px; height:20px; position:absolute; top:0px; right:0px; background:url(../img/yearForward_down.gif) left top no-repeat; }
|
57 |
-
|
58 |
-
.JsDatePickBox .boxMainInner .skipDay { cursor:default; overflow:hidden; width:24px; height:25px; float:right; margin:4px 0 0 5px; padding:0; }
|
59 |
-
.JsDatePickBox .boxMainInner .dayNormal { -khtml-user-select: none; font-size:12px; cursor:pointer; overflow:hidden; color:#4c4c4c; width:24px; height:25px; float:right; margin:4px 0 0 5px; padding:0; text-align:center; line-height:25px; }
|
60 |
-
.JsDatePickBox .boxMainInner .dayNormalToday { -khtml-user-select: none; font-size:12px; cursor:pointer; overflow:hidden; color:#f40f0f; font-weight:bold; width:24px; height:25px; float:right; margin:4px 0 0 5px; padding:0; text-align:center; line-height:25px; }
|
61 |
-
|
62 |
-
.JsDatePickBox .boxMainInner .dayDisabled { -khtml-user-select: none; cursor:default; font-size:12px; overflow:hidden; color:#999999; width:24px; height:25px; float:right; margin:4px 0 0 5px; padding:0; text-align:center; line-height:25px; }
|
63 |
-
|
64 |
-
.JsDatePickBox .boxMainInner .dayOver { -khtml-user-select: none; cursor:pointer; font-size:12px; overflow:hidden; color:#4c4c4c; width:24px; height:25px; float:right; margin:4px 0 0 5px; padding:0; text-align:center; line-height:25px; }
|
65 |
-
.JsDatePickBox .boxMainInner .dayOverToday { -khtml-user-select: none; cursor:pointer; font-size:12px; overflow:hidden; font-weight:bold; color:#f40f0f; width:24px; height:25px; float:right; margin:4px 0 0 5px; padding:0; text-align:center; line-height:25px; }
|
66 |
-
|
67 |
-
.JsDatePickBox .boxMainInner .dayDown { -khtml-user-select: none; cursor:pointer; font-size:12px; overflow:hidden; color:#F9F9F9; width:24px; height:25px; float:right; margin:4px 0 0 5px; padding:0; text-align:center; line-height:25px; }
|
68 |
-
.JsDatePickBox .boxMainInner .dayDownToday { -khtml-user-select: none; cursor:pointer; font-size:12px; overflow:hidden; color:#f40f0f; font-weight:bold; width:24px; height:25px; float:right; margin:4px 0 0 5px; padding:0; text-align:center; line-height:25px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/jsDatePick_rtl.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.JsDatePickBox{position:relative;width:212px;font-family:Arial;}.JsDatePickBox .jsDatePickCloseButton{cursor:pointer;position:absolute;z-index:1;top:1px;left:10px;width:33px;height:13px;background:url(../img/closeButton_normal.gif) left top no-repeat;}.JsDatePickBox .jsDatePickCloseButtonOver{cursor:pointer;position:absolute;z-index:1;top:1px;left:10px;width:33px;height:13px;background:url(../img/closeButton_over.gif) left top no-repeat;}.JsDatePickBox .jsDatePickCloseButtonDown{cursor:pointer;position:absolute;z-index:1;top:1px;left:10px;width:33px;height:13px;background:url(../img/closeButton_down.gif) left top no-repeat;}.JsDatePickBox .boxLeftWall{float:left;width:7px;margin:0;padding:0;}.JsDatePickBox .boxLeftWall .leftTopCorner{margin:0;padding:0;width:7px;height:8px;background:url(../img/boxTopLeftCorner.png) left top no-repeat;overflow:hidden;}.JsDatePickBox .boxLeftWall .leftBottomCorner{margin:0;padding:0;width:7px;height:8px;background:url(../img/boxBottomLeftCorner.png) left top no-repeat;overflow:hidden;}.JsDatePickBox .boxLeftWall .leftWall{margin:0;padding:0;width:7px;background:url(../img/boxSideWallPx.gif) #fff left top repeat-y;overflow:hidden;}.JsDatePickBox .boxRightWall{float:left;width:7px;margin:0;padding:0;}.JsDatePickBox .boxRightWall .rightTopCorner{margin:0;padding:0;width:7px;height:8px;background:url(../img/boxTopRightCorner.png) left top no-repeat;overflow:hidden;}.JsDatePickBox .boxRightWall .rightBottomCorner{margin:0;padding:0;width:7px;height:8px;background:url(../img/boxBottomRightCorner.png) left top no-repeat;overflow:hidden;}.JsDatePickBox .boxRightWall .rightWall{margin:0;padding:0;width:7px;background:url(../img/boxSideWallPx.gif) #fff right top repeat-y;overflow:hidden;}.JsDatePickBox .topWall{position:absolute;overflow:hidden;top:0;left:7px;width:198px;height:4px;background:url(../img/boxTopPx.gif) #fff left top repeat-x;}.JsDatePickBox .bottomWall{position:absolute;overflow:hidden;bottom:-1px;left:7px;width:198px;height:4px;background:url(../img/boxTopPx.gif) #fff left top repeat-x;}.JsDatePickBox .hiddenBoxLeftWall{float:left;width:0;overflow:hidden;overflow:hidden;}.JsDatePickBox .hiddenBoxRightWall{float:left;width:0;overflow:hidden;overflow:hidden;}.JsDatePickBox .boxMain{float:left;background-color:#fff;margin:0;padding:15px 0 5px 0;}.JsDatePickBox .boxMainStripped{background:#fff;border:none;}.JsDatePickBox .tooltip{height:12px;direction:rtl;text-align:right;line-height:11px;overflow:hidden;font-size:10px;color:#666;padding:0;margin:2px 0 2px 0;}.JsDatePickBox .weekDaysRow{height:12px;overflow:hidden;line-height:11px;font-size:10px;color:#666;text-align:center;padding:0;margin:2px 0 0 0;}.JsDatePickBox .weekDaysRow .weekDay{float:right;direction:rtl;height:14px;overflow:hidden;width:24px;margin:0 5px 0 0;padding:0;}.JsDatePickBox .boxMainInner{background:#fff;width:198px;float:left;margin:5px 0 0 0;padding:0;}.JsDatePickBox .boxMainCellsContainer{background-color:#fff;margin:0;padding:0;}.JsDatePickBox .boxMainInner .controlsBar{overflow:hidden;height:20px;position:relative;}.JsDatePickBox .boxMainInner .controlsBarText{overflow:hidden;height:20px;direction:rtl;line-height:20px;color:#000;font-size:12px;text-align:center;}.JsDatePickBox .boxMainInner .monthForwardButton{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:22px;background:url(../img/monthBackward_normal.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .monthForwardButtonOver{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:22px;background:url(../img/monthBackward_over.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .monthForwardButtonDown{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:22px;background:url(../img/monthBackward_down.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .monthBackwardButton{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:22px;background:url(../img/monthForward_normal.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .monthBackwardButtonOver{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:22px;background:url(../img/monthForward_over.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .monthBackwardButtonDown{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:22px;background:url(../img/monthForward_down.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearForwardButton{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:0;background:url(../img/yearBackward_normal.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearForwardButtonOver{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:0;background:url(../img/yearBackward_over.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearForwardButtonDown{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;left:0;background:url(../img/yearBackward_down.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearBackwardButton{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:0;background:url(../img/yearForward_normal.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearBackwardButtonOver{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:0;background:url(../img/yearForward_over.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .yearBackwardButtonDown{overflow:hidden;cursor:pointer;width:20px;height:20px;position:absolute;top:0;right:0;background:url(../img/yearForward_down.gif) left top no-repeat;}.JsDatePickBox .boxMainInner .skipDay{cursor:default;overflow:hidden;width:24px;height:25px;float:right;margin:4px 0 0 5px;padding:0;}.JsDatePickBox .boxMainInner .dayNormal{-khtml-user-select:none;font-size:12px;cursor:pointer;overflow:hidden;color:#4c4c4c;width:24px;height:25px;float:right;margin:4px 0 0 5px;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayNormalToday{-khtml-user-select:none;font-size:12px;cursor:pointer;overflow:hidden;color:#f40f0f;font-weight:bold;width:24px;height:25px;float:right;margin:4px 0 0 5px;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayDisabled{-khtml-user-select:none;cursor:default;font-size:12px;overflow:hidden;color:#999;width:24px;height:25px;float:right;margin:4px 0 0 5px;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayOver{-khtml-user-select:none;cursor:pointer;font-size:12px;overflow:hidden;color:#4c4c4c;width:24px;height:25px;float:right;margin:4px 0 0 5px;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayOverToday{-khtml-user-select:none;cursor:pointer;font-size:12px;overflow:hidden;font-weight:bold;color:#f40f0f;width:24px;height:25px;float:right;margin:4px 0 0 5px;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayDown{-khtml-user-select:none;cursor:pointer;font-size:12px;overflow:hidden;color:#F9F9F9;width:24px;height:25px;float:right;margin:4px 0 0 5px;padding:0;text-align:center;line-height:25px;}.JsDatePickBox .boxMainInner .dayDownToday{-khtml-user-select:none;cursor:pointer;font-size:12px;overflow:hidden;color:#f40f0f;font-weight:bold;width:24px;height:25px;float:right;margin:4px 0 0 5px;padding:0;text-align:center;line-height:25px;}
|
|
css/schemes/red.css
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
.JsDatePickBox .boxMainInner .dayNormalToday, .JsDatePickBox .boxMainInner .dayDownToday {
|
2 |
-
color: #000;
|
3 |
-
}
|
4 |
-
|
5 |
-
.JsDatePickBox .boxMainInner .dayOver,
|
6 |
-
.JsDatePickBox .boxMainInner .dayOverToday {
|
7 |
-
color: #fff;
|
8 |
-
}
|
9 |
-
|
10 |
-
.JsDatePickBox .boxMainInner .dayNormal {
|
11 |
-
color: #444;
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
date-module.php
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class ContactForm7Datepicker_Date {
|
4 |
+
|
5 |
+
public static function register() {
|
6 |
+
require_once dirname(__FILE__) . '/datepicker.php';
|
7 |
+
|
8 |
+
// Register shortcodes
|
9 |
+
self::add_shortcodes();
|
10 |
+
|
11 |
+
// Validations
|
12 |
+
add_filter('wpcf7_validate_date', array(__CLASS__, 'validation_filter'), 10, 2);
|
13 |
+
add_filter('wpcf7_validate_date*', array(__CLASS__, 'validation_filter'), 10, 2);
|
14 |
+
|
15 |
+
|
16 |
+
// Tag generator
|
17 |
+
add_action('load-toplevel_page_wpcf7', array(__CLASS__, 'tag_generator'));
|
18 |
+
}
|
19 |
+
|
20 |
+
public static function shortcode_handler($tag) {
|
21 |
+
if (! is_array($tag))
|
22 |
+
return;
|
23 |
+
|
24 |
+
$type = $tag['type'];
|
25 |
+
$name = $tag['name'];
|
26 |
+
$options = (array) $tag['options'];
|
27 |
+
$values = (array) $tag['values'];
|
28 |
+
|
29 |
+
if (empty($name))
|
30 |
+
return;
|
31 |
+
|
32 |
+
$validation_error = wpcf7_get_validation_error($name);
|
33 |
+
|
34 |
+
$atts = $id_att = $size_att = $maxlen_att = '';
|
35 |
+
$tabindex_att = $title_att = '';
|
36 |
+
|
37 |
+
$class_att = wpcf7_form_controls_class( $type, 'wpcf7-date');
|
38 |
+
|
39 |
+
if ('date*' == $type)
|
40 |
+
$class_att .= ' wpcf7-validates-as-required';
|
41 |
+
|
42 |
+
if ($validation_error)
|
43 |
+
$class_att .= ' wpcf7-not-valid';
|
44 |
+
|
45 |
+
$dpOptions = array();
|
46 |
+
foreach ($options as $option) {
|
47 |
+
if (preg_match('%^id:([-_0-9a-z]+)$%i', $option, $matches)) {
|
48 |
+
$id_att = $matches[1];
|
49 |
+
} elseif (preg_match('%^class:([-_0-9a-z]+)$%i', $option, $matches)) {
|
50 |
+
$class_att .= " $matches[1]";
|
51 |
+
} elseif (preg_match('%^([0-9]*)[/x]([0-9]*)$%i', $option, $matches)) {
|
52 |
+
$size_att = (int) $matches[1];
|
53 |
+
$maxlen_att = (int) $matches[2];
|
54 |
+
} elseif (preg_match('%^tabindex:(\d+)$%i', $option, $matches)) {
|
55 |
+
$tabindex_att = (int) $matches[1];
|
56 |
+
} elseif (preg_match('%^date-format:([-_/\.a-z0-9]+)$%i', $option, $matches)) {
|
57 |
+
$dpOptions['dateFormat'] = str_replace('_', ' ', $matches[1]);
|
58 |
+
} elseif (preg_match('%^(min|max)-date:([-_/\., 0-9a-z]+)$%i', $option, $matches)) {
|
59 |
+
$dpOptions[$matches[1] . 'Date'] = $matches[2];
|
60 |
+
} elseif (preg_match('%^first-day:(\d)$%', $option, $matches)) {
|
61 |
+
$dpOptions['firstDay'] = (int) $matches[1];
|
62 |
+
} elseif (preg_match('%^animate:([a-z]+)$%i', $option, $matches)) {
|
63 |
+
$dpOptions['showAnim'] = $matches[1];
|
64 |
+
} elseif (preg_match('%^change-month:(true|false)$%i', $option, $matches)) {
|
65 |
+
$dpOptions['changeMonth'] = ('true' == $matches[1]);
|
66 |
+
} elseif (preg_match('%^change-year:(true|false)$%i', $option, $matches)) {
|
67 |
+
$dpOptions['changeYear'] = ('true' == $matches[1]);
|
68 |
+
} elseif (preg_match('%^year-range:([\d]+)-?([\d]+)?$%', $option, $matches)) {
|
69 |
+
$dpOptions['yearRange'] = "{$matches[1]}:{$matches[2]}";
|
70 |
+
} elseif (preg_match('%^months:([\d]+)$%', $option, $matches)) {
|
71 |
+
$dpOptions['numberOfMonths'] = (int) $matches[1];
|
72 |
+
} elseif (preg_match('%^buttons:(true|false)$%', $option, $matches)) {
|
73 |
+
$dpOptions['showButtonPanel'] = ('true' == $matches[1]);
|
74 |
+
}
|
75 |
+
|
76 |
+
do_action('cf7_datepicker_attr_match', $dpOptions, $option);
|
77 |
+
}
|
78 |
+
|
79 |
+
$value = reset($values);
|
80 |
+
|
81 |
+
if (wpcf7_script_is() && preg_grep('%^waremark$%', $options)) {
|
82 |
+
$class_att .= ' wpcf7-use-title-as-watermark';
|
83 |
+
$title_att .= " $value";
|
84 |
+
$value = '';
|
85 |
+
}
|
86 |
+
|
87 |
+
if (wpcf7_is_posted() && isset($_POST[$name]))
|
88 |
+
$value = stripslashes($_POST[$name]);
|
89 |
+
|
90 |
+
if ($id_att)
|
91 |
+
$atts .= ' id="' . trim($id_att) . '"';
|
92 |
+
|
93 |
+
if ($class_att)
|
94 |
+
$atts .= ' class="' . trim($class_att) . '"';
|
95 |
+
|
96 |
+
if ($size_att)
|
97 |
+
$atts .= ' size="' . $size_att . '"';
|
98 |
+
else
|
99 |
+
$atts .= ' size="40"';
|
100 |
+
|
101 |
+
if ($maxlen_att)
|
102 |
+
$atts .= ' maxlength="' . $maxlen_att . '"';
|
103 |
+
|
104 |
+
if ('' !== $tabindex_att)
|
105 |
+
$atts .= ' tabindex="' . $tabindex_att .'"';
|
106 |
+
|
107 |
+
if ($title_att)
|
108 |
+
$atts .= ' title="' . trim(esc_attr($title_att)) . '"';
|
109 |
+
|
110 |
+
$input = sprintf('<input type="text" name="%s" value="%s" %s/>',
|
111 |
+
esc_attr($name),
|
112 |
+
esc_attr($value),
|
113 |
+
$atts
|
114 |
+
);
|
115 |
+
|
116 |
+
$dp = new CF7_DatePicker($name, $dpOptions);
|
117 |
+
|
118 |
+
return sprintf('<span class="wpcf7-form-control-wrap %s">%s %s</span>%s',
|
119 |
+
esc_attr($name),
|
120 |
+
$input,
|
121 |
+
$validation_error,
|
122 |
+
$dp->generate_code()
|
123 |
+
);
|
124 |
+
}
|
125 |
+
|
126 |
+
public static function validation_filter($result, $tag) {
|
127 |
+
$type = $tag['type'];
|
128 |
+
$name = $tag['name'];
|
129 |
+
|
130 |
+
$value = trim($_POST[$name]);
|
131 |
+
|
132 |
+
if ('date*' == $type && '' == $value) {
|
133 |
+
$result['valid'] = false;
|
134 |
+
$result['reason'][$name] = wpcf7_get_message('invalid_required');
|
135 |
+
}
|
136 |
+
|
137 |
+
return $result;
|
138 |
+
}
|
139 |
+
|
140 |
+
public static function tag_generator() {
|
141 |
+
wpcf7_add_tag_generator('date',
|
142 |
+
__('Date field', 'wpcf7'),
|
143 |
+
'wpcf7-tg-pane-date',
|
144 |
+
array(__CLASS__, 'tg_pane_date')
|
145 |
+
);
|
146 |
+
}
|
147 |
+
|
148 |
+
public static function tg_pane_date() {
|
149 |
+
require_once 'date-tag-generator.php';
|
150 |
+
}
|
151 |
+
|
152 |
+
private static function add_shortcodes() {
|
153 |
+
if (function_exists('wpcf7_add_shortcode')) {
|
154 |
+
wpcf7_add_shortcode('date', array(__CLASS__, 'shortcode_handler'), true);
|
155 |
+
wpcf7_add_shortcode('date*', array(__CLASS__, 'shortcode_handler'), true);
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
|
160 |
+
private static function animate_dropdown() {
|
161 |
+
$effects = array(
|
162 |
+
'show' => __('Show'),
|
163 |
+
'blind' => __('Blind'),
|
164 |
+
'clip' => __('Clip'),
|
165 |
+
'drop' => __('Drop'),
|
166 |
+
'explode' => __('Explode'),
|
167 |
+
'fade' => __('Fade'),
|
168 |
+
'fold' => __('Fold'),
|
169 |
+
'puff' => __('Puff'),
|
170 |
+
'slide' => __('Slide'),
|
171 |
+
'scale' => __('Scale')
|
172 |
+
);
|
173 |
+
|
174 |
+
$effects = apply_filters('cf7dp_effects', $effects);
|
175 |
+
|
176 |
+
$html = "<select id=\"animate\">\n";
|
177 |
+
foreach ($effects as $key => $val) {
|
178 |
+
$html .= "\t<option value=\"{$key}\">{$val}</option>\n";
|
179 |
+
}
|
180 |
+
|
181 |
+
$html .= "</select>";
|
182 |
+
|
183 |
+
echo $html;
|
184 |
+
}
|
185 |
+
}
|
date-tag-generator.php
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="wpcf7-tg-pane-date" class="hidden">
|
2 |
+
<form action="">
|
3 |
+
<table>
|
4 |
+
<tr>
|
5 |
+
<td><input type="checkbox" name="required" /> <?php echo esc_html( __( 'Required field?', 'wpcf7' ) ); ?></td>
|
6 |
+
</tr>
|
7 |
+
<tr>
|
8 |
+
<td><?php echo esc_html( __( 'Name', 'wpcf7' ) ); ?><br /><input type="text" name="name" class="tg-name oneline" /></td><td></td>
|
9 |
+
</tr>
|
10 |
+
</table>
|
11 |
+
|
12 |
+
<table>
|
13 |
+
<tr>
|
14 |
+
<td>
|
15 |
+
<code>id</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
|
16 |
+
<input type="text" name="id" class="idvalue oneline option" />
|
17 |
+
</td>
|
18 |
+
|
19 |
+
<td>
|
20 |
+
<code>class</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
|
21 |
+
<input type="text" name="class" class="classvalue oneline option" />
|
22 |
+
</td>
|
23 |
+
</tr>
|
24 |
+
|
25 |
+
<tr>
|
26 |
+
<td>
|
27 |
+
<code>size</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
|
28 |
+
<input type="text" name="size" class="numeric oneline option" />
|
29 |
+
</td>
|
30 |
+
|
31 |
+
<td>
|
32 |
+
<code>maxlength</code> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br />
|
33 |
+
<input type="text" name="maxlength" class="numeric oneline option" />
|
34 |
+
</td>
|
35 |
+
</tr>
|
36 |
+
|
37 |
+
<tr>
|
38 |
+
<td>
|
39 |
+
<code>date-format</code><br />
|
40 |
+
<input type="text" value="mm/dd/yy" name="date-format" class="oneline option" />
|
41 |
+
</td>
|
42 |
+
<td>
|
43 |
+
<br />
|
44 |
+
<a href="http://docs.jquery.com/UI/Datepicker/formatDate" title="formatDate" target="_blank"><?php _e('Help'); ?></a>
|
45 |
+
</td>
|
46 |
+
</tr>
|
47 |
+
|
48 |
+
<tr>
|
49 |
+
<td>
|
50 |
+
<code>min-date</code><br />
|
51 |
+
<input type="text" name="min-date" class="oneline option" />
|
52 |
+
</td>
|
53 |
+
<td>
|
54 |
+
<code>max-date</code><br />
|
55 |
+
<input type="text" name="max-date" class="oneline option" />
|
56 |
+
</td>
|
57 |
+
</tr>
|
58 |
+
|
59 |
+
<tr>
|
60 |
+
<td>
|
61 |
+
<code>first-day</code><br />
|
62 |
+
<input type="text" name="first-day" class="option" style="display: none" />
|
63 |
+
<select id="first-day">
|
64 |
+
<option value="0" selected="selected"><?php _e('Sunday'); ?></option>
|
65 |
+
<option value="1"><?php _e('Monday'); ?></option>
|
66 |
+
</select>
|
67 |
+
</td>
|
68 |
+
<td>
|
69 |
+
<code>animate</code><br />
|
70 |
+
<input type="text" name="animate" class="option" style="display: none" />
|
71 |
+
<?php self::animate_dropdown(); ?>
|
72 |
+
</td>
|
73 |
+
</tr>
|
74 |
+
|
75 |
+
<tr>
|
76 |
+
<td>
|
77 |
+
<code>change-month</code><br />
|
78 |
+
<input type="text" name="change-month" class="option" style="display: none" />
|
79 |
+
<select id="change-month">
|
80 |
+
<option value="true"><?php _e('True'); ?></option>
|
81 |
+
<option value="false"><?php _e('False'); ?></option>
|
82 |
+
</select>
|
83 |
+
</td>
|
84 |
+
</tr>
|
85 |
+
|
86 |
+
<tr>
|
87 |
+
<td>
|
88 |
+
<code>change-year</code><br />
|
89 |
+
<input type="text" name="change-year" class="option" style="display: none" />
|
90 |
+
<select id="change-year">
|
91 |
+
<option value="true"><?php _e('True'); ?></option>
|
92 |
+
<option value="false" selected="selected"><?php _e('False'); ?></option>
|
93 |
+
</select>
|
94 |
+
</td>
|
95 |
+
<td>
|
96 |
+
<code>year-range</code><br />
|
97 |
+
<input type="text" name="year-range" class="option" style="display: none"/>
|
98 |
+
<input size="4" type="text" name="year-range-start" class="numeric" /> -
|
99 |
+
<input size="4"type="text" name="year-range-end" class="numeric" />
|
100 |
+
</td>
|
101 |
+
</tr>
|
102 |
+
|
103 |
+
<tr>
|
104 |
+
<td>
|
105 |
+
<code>months</code><br />
|
106 |
+
<input type="text" size="2" name="months" class="option"/>
|
107 |
+
</td>
|
108 |
+
<td>
|
109 |
+
<code>buttons</code><br />
|
110 |
+
<input type="text" name="buttons" class="option" style="display: none" />
|
111 |
+
<select id="buttons">
|
112 |
+
<option value="true"><?php _e('True'); ?></option>
|
113 |
+
<option value="false" selected="selected"><?php _e('False'); ?></option>
|
114 |
+
</select>
|
115 |
+
</td>
|
116 |
+
</tr>
|
117 |
+
|
118 |
+
<tr>
|
119 |
+
<td>
|
120 |
+
<?php echo esc_html( __( 'Default value', 'wpcf7' ) ); ?> (<?php echo esc_html( __( 'optional', 'wpcf7' ) ); ?>)<br /><input type="text" name="values" class="oneline" />
|
121 |
+
</td>
|
122 |
+
|
123 |
+
<td>
|
124 |
+
<br /><input type="checkbox" name="watermark" class="option" /> <?php echo esc_html( __( 'Use this text as watermark?', 'wpcf7' ) ); ?>
|
125 |
+
</td>
|
126 |
+
</tr>
|
127 |
+
</table>
|
128 |
+
|
129 |
+
<div class="tg-tag"><?php echo esc_html( __( "Copy this code and paste it into the form left.", 'wpcf7' ) ); ?><br /><input type="text" name="date" class="tag" readonly="readonly" onfocus="this.select()" /></div>
|
130 |
+
|
131 |
+
<div class="tg-mail-tag"><?php echo esc_html( __( "And, put this code into the Mail fields below.", 'wpcf7' ) ); ?><br /><span class="arrow">⬇</span> <input type="text" class="mail-tag" readonly="readonly" onfocus="this.select()" /></div>
|
132 |
+
</form>
|
133 |
+
</div>
|
134 |
+
|
135 |
+
<script type="text/javascript">
|
136 |
+
jQuery(function($){
|
137 |
+
$('select').change(function(){
|
138 |
+
var $this = $(this),
|
139 |
+
value = $this.val();
|
140 |
+
|
141 |
+
if (! value)
|
142 |
+
return;
|
143 |
+
|
144 |
+
$('input[name="'+$this.attr('id')+'"]').val(value);
|
145 |
+
});
|
146 |
+
|
147 |
+
$('input[name="year-range-start"], input[name="year-range-end"]').change(function(){
|
148 |
+
var value = $('input[name="year-range-start"]').val() + '-' + $('input[name="year-range-end"]').val();
|
149 |
+
|
150 |
+
if (! value)
|
151 |
+
return;
|
152 |
+
|
153 |
+
$('input[name="year-range"]').val(value);
|
154 |
+
});
|
155 |
+
});
|
156 |
+
</script>
|
datepicker.php
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class CF7_DatePicker {
|
4 |
+
private $input_name;
|
5 |
+
|
6 |
+
private $options = array(
|
7 |
+
'dateFormat' => '',
|
8 |
+
'minDate' => '',
|
9 |
+
'maxDate' => '',
|
10 |
+
'firstDay' => '',
|
11 |
+
'defaultDate' => '',
|
12 |
+
'showAnim' => 'show',
|
13 |
+
'changeMonth' => '',
|
14 |
+
'changeYear' => '',
|
15 |
+
'yearRange' => '',
|
16 |
+
'numberOfMonths' => 1,
|
17 |
+
'showButtonPanel' => '',
|
18 |
+
);
|
19 |
+
|
20 |
+
protected static $regionals = array(
|
21 |
+
'af' =>'Afrikaans',
|
22 |
+
'sq' =>'Albanian',
|
23 |
+
'ar-DZ' =>'Algerian Arabic',
|
24 |
+
'ar' =>'Arabic',
|
25 |
+
'hy' =>'Armenian',
|
26 |
+
'az' =>'Azerbaijani',
|
27 |
+
'eu' =>'Basque',
|
28 |
+
'bs' =>'Bosnian',
|
29 |
+
'bg' =>'Bulgarian',
|
30 |
+
'ca' =>'Catalan',
|
31 |
+
'zh-HK' =>'Chinese Hong Kong',
|
32 |
+
'zh-CN' =>'Chinese Simplified',
|
33 |
+
'zh-TW' =>'Chinese Traditional',
|
34 |
+
'hr' =>'Croatian',
|
35 |
+
'cs' =>'Czech',
|
36 |
+
'da' =>'Danish',
|
37 |
+
'nl-BE' =>'Dutch',
|
38 |
+
'nl' =>'Dutch',
|
39 |
+
'en-AU' =>'English/Australia',
|
40 |
+
'en-NZ' =>'English/New Zealand',
|
41 |
+
'en-GB' =>'English/UK',
|
42 |
+
'eo' =>'Esperanto',
|
43 |
+
'et' =>'Estonian',
|
44 |
+
'fo' =>'Faroese',
|
45 |
+
'fa' =>'Farsi/Persian',
|
46 |
+
'fi' =>'Finnish',
|
47 |
+
'fr' =>'French',
|
48 |
+
'fr-CH' =>'French/Swiss',
|
49 |
+
'gl' =>'Galician',
|
50 |
+
'de' =>'German',
|
51 |
+
'el' =>'Greek',
|
52 |
+
'he' =>'Hebrew',
|
53 |
+
'hu' =>'Hungarian',
|
54 |
+
'is' =>'Icelandic',
|
55 |
+
'id' =>'Indonesian',
|
56 |
+
'it' =>'Italian',
|
57 |
+
'ja' =>'Japanese',
|
58 |
+
'kk' =>'Kazakhstan',
|
59 |
+
'ko' =>'Korean',
|
60 |
+
'lv' =>'Latvian',
|
61 |
+
'lt' =>'Lithuanian',
|
62 |
+
'lb' =>'Luxembourgish',
|
63 |
+
'mk' =>'Macedonian',
|
64 |
+
'ml' =>'Malayalam',
|
65 |
+
'ms' =>'Malaysian',
|
66 |
+
'no' =>'Norwegian',
|
67 |
+
'pl' =>'Polish',
|
68 |
+
'pt' =>'Portuguese',
|
69 |
+
'pt-BR' =>'Portuguese/Brazilian',
|
70 |
+
'rm' =>'Rhaeto-Romanic',
|
71 |
+
'ro' =>'Romanian',
|
72 |
+
'ru' =>'Russian',
|
73 |
+
'sr' =>'Serbian',
|
74 |
+
'sr-SR' =>'Serbian',
|
75 |
+
'sk' =>'Slovak',
|
76 |
+
'sl' =>'Slovenian',
|
77 |
+
'es' =>'Spanish',
|
78 |
+
'sv' =>'Swedish',
|
79 |
+
'ta' =>'Tamil',
|
80 |
+
'th' =>'Thai',
|
81 |
+
'tj' =>'Tajikistan',
|
82 |
+
'tr' =>'Turkish',
|
83 |
+
'uk' =>'Ukranian',
|
84 |
+
'vi' =>'Vietnamese',
|
85 |
+
'cy-GB' =>'Welsh/UK',
|
86 |
+
);
|
87 |
+
|
88 |
+
function __construct($name, $options = array()) {
|
89 |
+
$this->input_name = $name;
|
90 |
+
|
91 |
+
$this->options['firstDay'] = get_option('start_of_week');
|
92 |
+
$this->options = wp_parse_args((array)$options, $this->options);
|
93 |
+
$this->options = apply_filters('cf7_datepicker_options', $this->options);
|
94 |
+
}
|
95 |
+
|
96 |
+
public function __set($option, $value) {
|
97 |
+
if (isset($this->options[$option])) {
|
98 |
+
$this->options[$option] = $value;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
public function __get($option) {
|
103 |
+
return isset($this->options[$option]) ? $this->options[$option] : null;
|
104 |
+
}
|
105 |
+
|
106 |
+
public function get_all() {
|
107 |
+
return $this->options;
|
108 |
+
}
|
109 |
+
|
110 |
+
public function generate_code($inline = false) {
|
111 |
+
$selector = ($inline) ? "$('$this->input_name')" : "$('input[name=\"{$this->input_name}\"]')";
|
112 |
+
|
113 |
+
$out = "{$selector}.datepicker({$this->options_encode()});\n";
|
114 |
+
$out .= self::_regionalize($selector);
|
115 |
+
|
116 |
+
$out = "jQuery(function($){ $out });";
|
117 |
+
|
118 |
+
return "\n<script type=\"text/javascript\">{$out}</script>\n";
|
119 |
+
}
|
120 |
+
|
121 |
+
private function options_encode() {
|
122 |
+
$options = json_encode(array_filter(
|
123 |
+
$this->options,
|
124 |
+
create_function('$var', 'return ! empty($var);')
|
125 |
+
));
|
126 |
+
|
127 |
+
return stripslashes($options);
|
128 |
+
}
|
129 |
+
|
130 |
+
private static function _regionalize($selector) {
|
131 |
+
$regional = self::get_regional_match();
|
132 |
+
|
133 |
+
$regional = apply_filters('cf7dp_datepicker_regional', $regional);
|
134 |
+
|
135 |
+
if ($regional)
|
136 |
+
return "{$selector}.datepicker('option', $.datepicker.regional['{$regional}']);";
|
137 |
+
|
138 |
+
return '';
|
139 |
+
}
|
140 |
+
|
141 |
+
public static function get_regional_match() {
|
142 |
+
$locale = get_locale();
|
143 |
+
|
144 |
+
$key_match = array(
|
145 |
+
substr($locale, 0, 2),
|
146 |
+
str_replace('_', '-', $locale),
|
147 |
+
);
|
148 |
+
|
149 |
+
if ($key_match[1] != 'en') {
|
150 |
+
foreach ($key_match as $key) {
|
151 |
+
if (array_key_exists($key, self::$regionals)) {
|
152 |
+
return $key;
|
153 |
+
}
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
return null;
|
158 |
+
}
|
159 |
+
}
|
img/aqua/aqua_dayDown.gif
DELETED
Binary file
|
img/aqua/aqua_dayNormal.gif
DELETED
Binary file
|
img/aqua/aqua_dayOver.gif
DELETED
Binary file
|
img/armygreen/armygreen_dayDown.gif
DELETED
Binary file
|
img/armygreen/armygreen_dayNormal.gif
DELETED
Binary file
|
img/armygreen/armygreen_dayOver.gif
DELETED
Binary file
|
img/bananasplit/bananasplit_dayDown.gif
DELETED
Binary file
|
img/bananasplit/bananasplit_dayNormal.gif
DELETED
Binary file
|
img/bananasplit/bananasplit_dayOver.gif
DELETED
Binary file
|
img/beige/beige_dayDown.gif
DELETED
Binary file
|
img/beige/beige_dayNormal.gif
DELETED
Binary file
|
img/beige/beige_dayOver.gif
DELETED
Binary file
|
img/boxBottomLeftCorner.png
DELETED
Binary file
|
img/boxBottomRightCorner.png
DELETED
Binary file
|
img/boxSideWallPx.gif
DELETED
Binary file
|
img/boxSideWallPx.png
DELETED
Binary file
|
img/boxTopLeftCorner.png
DELETED
Binary file
|
img/boxTopPx.gif
DELETED
Binary file
|
img/boxTopPx.png
DELETED
Binary file
|
img/boxTopRightCorner.png
DELETED
Binary file
|
img/closeButton_down.gif
DELETED
Binary file
|
img/closeButton_normal.gif
DELETED
Binary file
|
img/closeButton_over.gif
DELETED
Binary file
|
img/deepblue/deepblue_dayDown.gif
DELETED
Binary file
|
img/deepblue/deepblue_dayNormal.gif
DELETED
Binary file
|
img/deepblue/deepblue_dayOver.gif
DELETED
Binary file
|
img/greenish/greenish_dayDown.gif
DELETED
Binary file
|
img/greenish/greenish_dayNormal.gif
DELETED
Binary file
|
img/greenish/greenish_dayOver.gif
DELETED
Binary file
|
img/lightgreen/lightgreen_dayDown.gif
DELETED
Binary file
|
img/lightgreen/lightgreen_dayNormal.gif
DELETED
Binary file
|
img/lightgreen/lightgreen_dayOver.gif
DELETED
Binary file
|
img/monthBackward_down.gif
DELETED
Binary file
|
img/monthBackward_normal.gif
DELETED
Binary file
|
img/monthBackward_over.gif
DELETED
Binary file
|
img/monthForward_down.gif
DELETED
Binary file
|
img/monthForward_normal.gif
DELETED
Binary file
|
img/monthForward_over.gif
DELETED
Binary file
|
img/oceanblue/oceanblue_dayDown.gif
DELETED
Binary file
|
img/oceanblue/oceanblue_dayNormal.gif
DELETED
Binary file
|
img/oceanblue/oceanblue_dayOver.gif
DELETED
Binary file
|
img/orange/orange_dayDown.gif
DELETED
Binary file
|
img/orange/orange_dayNormal.gif
DELETED
Binary file
|
img/orange/orange_dayOver.gif
DELETED
Binary file
|
img/peppermint/peppermint_dayDown.gif
DELETED
Binary file
|
img/peppermint/peppermint_dayNormal.gif
DELETED
Binary file
|
img/peppermint/peppermint_dayOver.gif
DELETED
Binary file
|
img/pink/pink_dayDown.gif
DELETED
Binary file
|
img/pink/pink_dayNormal.gif
DELETED
Binary file
|
img/pink/pink_dayOver.gif
DELETED
Binary file
|
img/purple/purple_dayDown.gif
DELETED
Binary file
|
img/purple/purple_dayNormal.gif
DELETED
Binary file
|
img/purple/purple_dayOver.gif
DELETED
Binary file
|
img/red/red_dayDown.gif
DELETED
Binary file
|
img/red/red_dayNormal.gif
DELETED
Binary file
|
img/red/red_dayOver.gif
DELETED
Binary file
|
img/torqoise/torqoise_dayDown.gif
DELETED
Binary file
|
img/torqoise/torqoise_dayNormal.gif
DELETED
Binary file
|
img/torqoise/torqoise_dayOver.gif
DELETED
Binary file
|
img/yearBackward_down.gif
DELETED
Binary file
|
img/yearBackward_normal.gif
DELETED
Binary file
|
img/yearBackward_over.gif
DELETED
Binary file
|
img/yearForward_down.gif
DELETED
Binary file
|
img/yearForward_normal.gif
DELETED
Binary file
|
img/yearForward_over.gif
DELETED
Binary file
|
js/jsDatePick.jquery.full.js
DELETED
@@ -1,1288 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Copyright 2009 Itamar Arjuan
|
3 |
-
jsDatePick is distributed under the terms of the GNU General Public License.
|
4 |
-
This JsDatePick makes use of the jQuery library found at http://jquery.com/
|
5 |
-
*/
|
6 |
-
/*
|
7 |
-
Configuration settings documentation:
|
8 |
-
|
9 |
-
useMode (Integer) – Possible values are 1 and 2 as follows:
|
10 |
-
1 – The calendar's HTML will be directly appended to the field supplied by target
|
11 |
-
2 – The calendar will appear as a popup when the field with the id supplied in target is clicked.
|
12 |
-
|
13 |
-
target (String) – The id of the field to attach the calendar to , usually a text input field when using useMode 2.
|
14 |
-
|
15 |
-
isStripped (Boolean) – When set to true the calendar appears without the visual design - usually used with useMode 1
|
16 |
-
|
17 |
-
selectedDate (Object) – When supplied , this object tells the calendar to open up with this date selected already.
|
18 |
-
|
19 |
-
yearsRange (Array) – When supplied , this array sets the limits for the years enabled in the calendar.
|
20 |
-
|
21 |
-
limitToToday (Integer) – Enables you to limit the possible picking days according to today's date.
|
22 |
-
1 – Today and after
|
23 |
-
-1 – Today and before
|
24 |
-
0 – No limit
|
25 |
-
|
26 |
-
cellColorScheme (String) – Enables you to swap the colors of the date's cells from a wide range of colors.
|
27 |
-
Available color schemes: torqoise,purple,pink,orange,peppermint,aqua,armygreen,bananasplit,beige,
|
28 |
-
deepblue,greenish,lightgreen, ocean_blue <-default
|
29 |
-
|
30 |
-
dateFormat (String) - Enables you to easily switch the date format without any hassle at all!
|
31 |
-
Should you not supply anything this field will default to: "%m-%d-%Y"
|
32 |
-
|
33 |
-
Possible values to use in the date format:
|
34 |
-
|
35 |
-
%d - Day of the month, 2 digits with leading zeros
|
36 |
-
%j - Day of the month without leading zeros
|
37 |
-
|
38 |
-
%m - Numeric representation of a month, with leading zeros
|
39 |
-
%M - A short textual representation of a month, three letters
|
40 |
-
%n - Numeric representation of a month, without leading zeros
|
41 |
-
%F - A full textual representation of a month, such as January or March
|
42 |
-
|
43 |
-
%Y - A full numeric representation of a year, 4 digits
|
44 |
-
%y - A two digit representation of a year
|
45 |
-
|
46 |
-
You can of course put whatever divider you want between them.
|
47 |
-
|
48 |
-
weekStartDay (Integer) – Enables you to change the day that the week starts on.
|
49 |
-
Possible values 0 (Sunday) through 6 (Saturday)
|
50 |
-
Default value is 1 (Monday)
|
51 |
-
|
52 |
-
yearButtons (Boolean) – Enables you to toggle displaying the year navigation controls (backward/forward)
|
53 |
-
|
54 |
-
monthButtons (Boolean) – Enables you to toggle displaying the month navigation controls (backward/forward)
|
55 |
-
|
56 |
-
directionality (String) – Change text direction
|
57 |
-
ltr - Left To Right (default)
|
58 |
-
rtl - Right To Left
|
59 |
-
|
60 |
-
Note: We have implemented a way to change the image path of the img folder should you decide you want to move it somewhere else.
|
61 |
-
Please read through the instructions on how to carefully accomplish that just in the next comment!
|
62 |
-
|
63 |
-
Thanks for using my calendar !
|
64 |
-
Itamar :-)
|
65 |
-
|
66 |
-
itamar.arjuan@gmail.com
|
67 |
-
|
68 |
-
This version of the script is modified by Aurel Canciu for Contact Form 7 Datepicker Wordpress Plugin
|
69 |
-
* http://wordpress.org/extend/plugins/contact-form-7-datepicker/ *
|
70 |
-
|
71 |
-
aurelcanciu@gmail.com
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
// The language array - change these values to your language to better fit your needs!
|
76 |
-
*/
|
77 |
-
|
78 |
-
|
79 |
-
if (typeof(g_l10n) === "undefined") {
|
80 |
-
g_l10n = [];
|
81 |
-
g_l10n["MONTHS"] = ["January","February","March","April","May","June","July","August","September","October","November","December"];
|
82 |
-
g_l10n["DAYS_3"] = ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];
|
83 |
-
g_l10n["MONTH_FWD"] = "Move a month forward";
|
84 |
-
g_l10n["MONTH_BCK"] = "Move a month backward";
|
85 |
-
g_l10n["YEAR_FWD"] = "Move a year forward";
|
86 |
-
g_l10n["YEAR_BCK"] = "Move a year backward";
|
87 |
-
g_l10n["CLOSE"] = "Close the calendar";
|
88 |
-
g_l10n["ERROR_2"] = g_l10n["ERROR_1"] = "Date object invalid!";
|
89 |
-
g_l10n["ERROR_4"] = g_l10n["ERROR_3"] = "Target invalid!";
|
90 |
-
}
|
91 |
-
|
92 |
-
/* Changing the image path: WARNING! */
|
93 |
-
/*
|
94 |
-
The image path can be changed easily , however a few important
|
95 |
-
safety steps must take place!
|
96 |
-
|
97 |
-
CSS as a rule-of-thumb is always looking for relative image paths to where the CSS
|
98 |
-
file resides. Meaning , if we place the css document of JsDatePick somewhere else
|
99 |
-
Since some of the elements inside the CSS have background:url(img/someimage.png);
|
100 |
-
|
101 |
-
The system will try to look for a file under the same folder where the CSS file is.
|
102 |
-
So pay careful attention when moving the CSS file somewhere else as the images folder
|
103 |
-
must be relative to it. If you want to put the CSS document somewhere else and the images somewhere
|
104 |
-
else - you HAVE to look and replace each background:url(img/someimage.png); to the new path you desire.
|
105 |
-
|
106 |
-
That way you ensure risk free operation of images.
|
107 |
-
For any further questions or support about this issue - please consider the feedback form
|
108 |
-
at javascriptcalendar.org
|
109 |
-
Thank you!
|
110 |
-
*/
|
111 |
-
|
112 |
-
g_arrayOfUsedJsDatePickCalsGlobalNumbers = [];
|
113 |
-
g_arrayOfUsedJsDatePickCals = [];
|
114 |
-
g_currentDateObject = {};
|
115 |
-
g_currentDateObject.dateObject = new Date();
|
116 |
-
|
117 |
-
g_currentDateObject.day = g_currentDateObject.dateObject.getDate();
|
118 |
-
g_currentDateObject.month = g_currentDateObject.dateObject.getMonth() + 1;
|
119 |
-
g_currentDateObject.year = g_currentDateObject.dateObject.getFullYear();
|
120 |
-
|
121 |
-
String.prototype.trim = function() {
|
122 |
-
return this.replace(/^\s+|\s+$/g,"");
|
123 |
-
};
|
124 |
-
String.prototype.ltrim = function() {
|
125 |
-
return this.replace(/^\s+/,"");
|
126 |
-
};
|
127 |
-
String.prototype.rtrim = function() {
|
128 |
-
return this.replace(/\s+$/,"");
|
129 |
-
};
|
130 |
-
String.prototype.strpad=function(){
|
131 |
-
return (!isNaN(this) && this.toString().length==1)?"0"+this:this;
|
132 |
-
};
|
133 |
-
|
134 |
-
JsDatePick = function(configurationObject){
|
135 |
-
|
136 |
-
if (document.all){
|
137 |
-
this.isie = true;
|
138 |
-
this.iever = JsDatePick.getInternetExplorerVersion();
|
139 |
-
} else {
|
140 |
-
this.isie = false;
|
141 |
-
}
|
142 |
-
|
143 |
-
this.oConfiguration = {};
|
144 |
-
this.oCurrentDay = g_currentDateObject;
|
145 |
-
this.monthsTextualRepresentation = g_l10n["MONTHS"];
|
146 |
-
|
147 |
-
this.lastPostedDay = null;
|
148 |
-
|
149 |
-
this.initialZIndex = 2;
|
150 |
-
|
151 |
-
this.globalNumber = this.getUnUsedGlobalNumber();
|
152 |
-
g_arrayOfUsedJsDatePickCals[this.globalNumber] = this;
|
153 |
-
|
154 |
-
this.setConfiguration(configurationObject);
|
155 |
-
this.makeCalendar();
|
156 |
-
};
|
157 |
-
|
158 |
-
JsDatePick.getCalInstanceById=function(id){ return g_arrayOfUsedJsDatePickCals[parseInt(id,10)]; };
|
159 |
-
|
160 |
-
JsDatePick.getInternetExplorerVersion=function(){
|
161 |
-
var rv = -1, ua, re;
|
162 |
-
if (navigator.appName == 'Microsoft Internet Explorer'){
|
163 |
-
ua = navigator.userAgent;
|
164 |
-
re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
|
165 |
-
if (re.exec(ua) != null){
|
166 |
-
rv = parseFloat( RegExp.$1 );
|
167 |
-
}
|
168 |
-
return rv;
|
169 |
-
}
|
170 |
-
};
|
171 |
-
|
172 |
-
JsDatePick.prototype.setC = function(obj, aClassName){
|
173 |
-
if (this.isie && this.iever > 7){
|
174 |
-
jQuery(obj).attr("class", aClassName);
|
175 |
-
} else {
|
176 |
-
obj.className = aClassName;
|
177 |
-
}
|
178 |
-
};
|
179 |
-
|
180 |
-
JsDatePick.prototype.getUnUsedGlobalNumber = function(){
|
181 |
-
|
182 |
-
var aNum = Math.floor(Math.random()*1000);
|
183 |
-
|
184 |
-
while ( ! this.isUnique_GlobalNumber(aNum) ){
|
185 |
-
aNum = Math.floor(Math.random()*1000);
|
186 |
-
}
|
187 |
-
|
188 |
-
return aNum;
|
189 |
-
};
|
190 |
-
|
191 |
-
JsDatePick.prototype.isUnique_GlobalNumber = function(aNum){
|
192 |
-
var i;
|
193 |
-
for (i=0; i<g_arrayOfUsedJsDatePickCalsGlobalNumbers.length; i++){
|
194 |
-
if (g_arrayOfUsedJsDatePickCalsGlobalNumbers[i] == aNum){
|
195 |
-
return false;
|
196 |
-
}
|
197 |
-
}
|
198 |
-
return true;
|
199 |
-
};
|
200 |
-
|
201 |
-
JsDatePick.prototype.addOnSelectedDelegate = function(aDelegatedFunction){
|
202 |
-
if (typeof(aDelegatedFunction) == "function"){
|
203 |
-
this.addonSelectedDelegate = aDelegatedFunction;
|
204 |
-
}
|
205 |
-
return false;
|
206 |
-
};
|
207 |
-
|
208 |
-
JsDatePick.prototype.setOnSelectedDelegate = function(aDelegatedFunction){
|
209 |
-
if (typeof(aDelegatedFunction) == "function"){
|
210 |
-
this.onSelectedDelegate = aDelegatedFunction;
|
211 |
-
return true;
|
212 |
-
}
|
213 |
-
return false;
|
214 |
-
};
|
215 |
-
|
216 |
-
JsDatePick.prototype.executeOnSelectedDelegateIfExists = function(){
|
217 |
-
if (typeof(this.onSelectedDelegate) == "function"){
|
218 |
-
this.onSelectedDelegate();
|
219 |
-
}
|
220 |
-
if (typeof(this.addonSelectedDelegate) == "function"){
|
221 |
-
this.addonSelectedDelegate();
|
222 |
-
}
|
223 |
-
};
|
224 |
-
|
225 |
-
JsDatePick.prototype.setRepopulationDelegate = function(aDelegatedFunction){
|
226 |
-
if (typeof(aDelegatedFunction) == "function"){
|
227 |
-
this.repopulationDelegate = aDelegatedFunction;
|
228 |
-
return true;
|
229 |
-
}
|
230 |
-
return false;
|
231 |
-
};
|
232 |
-
|
233 |
-
JsDatePick.prototype.setConfiguration = function(aConf){
|
234 |
-
this.oConfiguration.isStripped = (aConf["isStripped"] != null) ? aConf["isStripped"] : false;
|
235 |
-
this.oConfiguration.useMode = (aConf["useMode"] != null) ? aConf["useMode"] : 1;
|
236 |
-
this.oConfiguration.selectedDate = (aConf["selectedDate"] != null) ? aConf["selectedDate"] : null;
|
237 |
-
this.oConfiguration.target = (aConf["target"] != null) ? aConf["target"] : null;
|
238 |
-
this.oConfiguration.yearsRange = (aConf["yearsRange"] != null) ? aConf["yearsRange"] : [1971,2100];
|
239 |
-
this.oConfiguration.yearButtons = (aConf["yearButtons"] != null) ? aConf["yearButtons"] : true;
|
240 |
-
this.oConfiguration.monthButtons = (aConf["monthButtons"] != null) ? aConf["monthButtons"] : true;
|
241 |
-
this.oConfiguration.limitToToday = (aConf["limitToToday"] != null) ? aConf["limitToToday"] : 0;
|
242 |
-
this.oConfiguration.field = (aConf["field"] != null) ? aConf["field"] : false;
|
243 |
-
this.oConfiguration.cellColorScheme = (aConf["cellColorScheme"] != null) ? aConf["cellColorScheme"] : "ocean_blue";
|
244 |
-
this.oConfiguration.dateFormat = (aConf["dateFormat"] != null) ? aConf["dateFormat"] : "%m-%d-%Y";
|
245 |
-
this.oConfiguration.imgPath = (aConf["imgPath"] != null) ? aConf["imgPath"] : "img/";
|
246 |
-
this.oConfiguration.weekStartDay = (aConf["weekStartDay"] != null) ? aConf["weekStartDay"] : 1;
|
247 |
-
this.oConfiguration.directionality = (aConf["directionality"] != null) ? aConf["directionality"] : "ltr";
|
248 |
-
this.oConfiguration.animate = (aConf["animate"] != null) ? aConf["animate"] : true;
|
249 |
-
|
250 |
-
this.selectedDayObject = {};
|
251 |
-
this.flag_DayMarkedBeforeRepopulation = false;
|
252 |
-
this.flag_aDayWasSelected = false;
|
253 |
-
this.lastMarkedDayObject = null;
|
254 |
-
|
255 |
-
if (!this.oConfiguration.selectedDate){
|
256 |
-
this.currentYear = this.oCurrentDay.year;
|
257 |
-
this.currentMonth = this.oCurrentDay.month;
|
258 |
-
this.currentDay = this.oCurrentDay.day;
|
259 |
-
}
|
260 |
-
};
|
261 |
-
|
262 |
-
JsDatePick.prototype.resizeCalendar = function(){
|
263 |
-
this.leftWallStrechedElement.style.height = "0px";
|
264 |
-
this.rightWallStrechedElement.style.height = "0px";
|
265 |
-
|
266 |
-
var totalHeight = this.JsDatePickBox.offsetHeight, newStrechedHeight = totalHeight-16;
|
267 |
-
|
268 |
-
if (newStrechedHeight < 0){
|
269 |
-
return;
|
270 |
-
}
|
271 |
-
|
272 |
-
this.leftWallStrechedElement.style.height = newStrechedHeight+"px";
|
273 |
-
this.rightWallStrechedElement.style.height = newStrechedHeight+"px";
|
274 |
-
return true;
|
275 |
-
};
|
276 |
-
|
277 |
-
JsDatePick.prototype.closeCalendar = function(){
|
278 |
-
if ( this.oConfiguration.animate === true ) {
|
279 |
-
jQuery(this.JsDatePickBox).hide(500);
|
280 |
-
} else {
|
281 |
-
this.JsDatePickBox.style.display = "none";
|
282 |
-
}
|
283 |
-
document.onclick=function(){};
|
284 |
-
};
|
285 |
-
|
286 |
-
JsDatePick.prototype.populateFieldWithSelectedDate = function(){
|
287 |
-
jQuery("#"+this.oConfiguration.target).val(this.getSelectedDayFormatted());
|
288 |
-
if (this.lastPickedDateObject){
|
289 |
-
delete(this.lastPickedDateObject);
|
290 |
-
}
|
291 |
-
this.lastPickedDateObject = {};
|
292 |
-
this.lastPickedDateObject.day = this.selectedDayObject.day;
|
293 |
-
this.lastPickedDateObject.month = this.selectedDayObject.month;
|
294 |
-
this.lastPickedDateObject.year = this.selectedDayObject.year;
|
295 |
-
|
296 |
-
this.closeCalendar();
|
297 |
-
};
|
298 |
-
|
299 |
-
JsDatePick.prototype.makeCalendar = function(){
|
300 |
-
var d = document, JsDatePickBox, clearfix, closeButton,leftWall,rightWall,topWall,bottomWall,topCorner,bottomCorner,wall,inputElement,aSpan,aFunc;
|
301 |
-
|
302 |
-
JsDatePickBox = d.createElement("div");
|
303 |
-
clearfix = d.createElement("div");
|
304 |
-
closeButton = d.createElement("div");
|
305 |
-
|
306 |
-
this.setC(JsDatePickBox, "JsDatePickBox");
|
307 |
-
this.setC(clearfix, "clearfix");
|
308 |
-
this.setC(closeButton, "jsDatePickCloseButton");
|
309 |
-
closeButton.setAttribute("globalNumber",this.globalNumber);
|
310 |
-
|
311 |
-
closeButton.onmouseover = function(){
|
312 |
-
var gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
313 |
-
gRef.setTooltipText(g_l10n["CLOSE"]);
|
314 |
-
gRef.setC(this, "jsDatePickCloseButtonOver");
|
315 |
-
};
|
316 |
-
|
317 |
-
closeButton.onmouseout = function(){
|
318 |
-
var gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
319 |
-
gRef.setTooltipText('');
|
320 |
-
gRef.setC(this, "jsDatePickCloseButton");
|
321 |
-
};
|
322 |
-
|
323 |
-
closeButton.onmousedown = function(){
|
324 |
-
var gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
325 |
-
gRef.setTooltipText(g_l10n["CLOSE"]);
|
326 |
-
gRef.setC(this, "jsDatePickCloseButtonDown");
|
327 |
-
};
|
328 |
-
|
329 |
-
closeButton.onmouseup = function(){
|
330 |
-
var gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
331 |
-
gRef.setTooltipText('');
|
332 |
-
gRef.setC(this, "jsDatePickCloseButton");
|
333 |
-
gRef.closeCalendar();
|
334 |
-
};
|
335 |
-
|
336 |
-
this.JsDatePickBox = JsDatePickBox;
|
337 |
-
|
338 |
-
leftWall = d.createElement("div");
|
339 |
-
rightWall = d.createElement("div");
|
340 |
-
topWall = d.createElement("div");
|
341 |
-
bottomWall = d.createElement("div");
|
342 |
-
|
343 |
-
this.setC(topWall, "topWall");
|
344 |
-
this.setC(bottomWall, "bottomWall");
|
345 |
-
|
346 |
-
if (this.isie && this.iever == 6){
|
347 |
-
bottomWall.style.bottom = "-2px";
|
348 |
-
}
|
349 |
-
|
350 |
-
topCorner = d.createElement("div");
|
351 |
-
bottomCorner = d.createElement("div");
|
352 |
-
wall = d.createElement("div");
|
353 |
-
|
354 |
-
this.setC(topCorner, "leftTopCorner");
|
355 |
-
this.setC(bottomCorner, "leftBottomCorner");
|
356 |
-
this.setC(wall, "leftWall");
|
357 |
-
|
358 |
-
this.leftWallStrechedElement = wall;
|
359 |
-
this.leftWall = leftWall;
|
360 |
-
this.rightWall = rightWall;
|
361 |
-
|
362 |
-
leftWall.appendChild(topCorner);
|
363 |
-
leftWall.appendChild(wall);
|
364 |
-
leftWall.appendChild(bottomCorner);
|
365 |
-
|
366 |
-
topCorner = d.createElement("div");
|
367 |
-
bottomCorner = d.createElement("div");
|
368 |
-
wall = d.createElement("div");
|
369 |
-
|
370 |
-
this.setC(topCorner, "rightTopCorner");
|
371 |
-
this.setC(bottomCorner, "rightBottomCorner");
|
372 |
-
this.setC(wall, "rightWall");
|
373 |
-
|
374 |
-
this.rightWallStrechedElement = wall;
|
375 |
-
|
376 |
-
rightWall.appendChild(topCorner);
|
377 |
-
rightWall.appendChild(wall);
|
378 |
-
rightWall.appendChild(bottomCorner);
|
379 |
-
|
380 |
-
if (this.oConfiguration.isStripped){
|
381 |
-
this.setC(leftWall, "hiddenBoxLeftWall");
|
382 |
-
this.setC(rightWall, "hiddenBoxRightWall");
|
383 |
-
} else {
|
384 |
-
this.setC(leftWall, "boxLeftWall");
|
385 |
-
this.setC(rightWall, "boxRightWall");
|
386 |
-
}
|
387 |
-
|
388 |
-
JsDatePickBox.appendChild(leftWall);
|
389 |
-
JsDatePickBox.appendChild(this.getDOMCalendarStripped());
|
390 |
-
JsDatePickBox.appendChild(rightWall);
|
391 |
-
JsDatePickBox.appendChild(clearfix);
|
392 |
-
|
393 |
-
if (!this.oConfiguration.isStripped){
|
394 |
-
JsDatePickBox.appendChild(closeButton);
|
395 |
-
JsDatePickBox.appendChild(topWall);
|
396 |
-
JsDatePickBox.appendChild(bottomWall);
|
397 |
-
}
|
398 |
-
|
399 |
-
if (this.oConfiguration.useMode == 2){
|
400 |
-
if (this.oConfiguration.target != false){
|
401 |
-
if (typeof(jQuery("#"+this.oConfiguration.target)) != null){
|
402 |
-
inputElement = document.getElementById(this.oConfiguration.target);
|
403 |
-
|
404 |
-
aSpan = document.createElement("span");
|
405 |
-
inputElement.parentNode.replaceChild(aSpan,inputElement);
|
406 |
-
aSpan.appendChild(inputElement);
|
407 |
-
|
408 |
-
inputElement.setAttribute("globalNumber",this.globalNumber);
|
409 |
-
inputElement.onclick = function(){ JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")).showCalendar(); };
|
410 |
-
inputElement.onfocus = function(){ JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")).showCalendar(); };
|
411 |
-
jQuery(inputElement).mouseout(function(){
|
412 |
-
jQuery('*').not('JsDatePickBox').live("focus", function() {
|
413 |
-
JsDatePick.getCalInstanceById(inputElement.getAttribute("globalNumber")).closeCalendar();
|
414 |
-
});
|
415 |
-
});
|
416 |
-
|
417 |
-
|
418 |
-
aSpan.style.position = "relative";
|
419 |
-
this.initialZIndex++;
|
420 |
-
|
421 |
-
JsDatePickBox.style.zIndex = this.initialZIndex.toString();
|
422 |
-
JsDatePickBox.style.position = "absolute";
|
423 |
-
JsDatePickBox.style.top = "18px";
|
424 |
-
JsDatePickBox.style.left = "0px";
|
425 |
-
JsDatePickBox.style.display = "none";
|
426 |
-
aSpan.appendChild(JsDatePickBox);
|
427 |
-
|
428 |
-
aFunc = new Function("g_arrayOfUsedJsDatePickCals["+this.globalNumber+"].populateFieldWithSelectedDate();");
|
429 |
-
|
430 |
-
this.setOnSelectedDelegate(aFunc);
|
431 |
-
} else {
|
432 |
-
alert(g_l10n["ERROR_3"]);
|
433 |
-
}
|
434 |
-
}
|
435 |
-
} else {
|
436 |
-
if (this.oConfiguration.target != null){
|
437 |
-
jQuery("#"+this.oConfiguration.target).append(JsDatePickBox);
|
438 |
-
jQuery("#"+this.oConfiguration.target).css("position","relative");
|
439 |
-
JsDatePickBox.style.position = "absolute";
|
440 |
-
JsDatePickBox.style.top = "0px";
|
441 |
-
JsDatePickBox.style.left = "0px";
|
442 |
-
this.resizeCalendar();
|
443 |
-
this.executePopulationDelegateIfExists();
|
444 |
-
} else {
|
445 |
-
alert(g_l10n["ERROR_4"]);
|
446 |
-
}
|
447 |
-
}
|
448 |
-
};
|
449 |
-
|
450 |
-
JsDatePick.prototype.determineFieldDate = function(){
|
451 |
-
var aField,divider,dateMold,array,array2,i,dI,yI,mI,tflag=false,fflag=false;
|
452 |
-
if (this.lastPickedDateObject){
|
453 |
-
this.setSelectedDay({
|
454 |
-
year:parseInt(this.lastPickedDateObject.year),
|
455 |
-
month:parseInt(this.lastPickedDateObject.month,10),
|
456 |
-
day:parseInt(this.lastPickedDateObject.day,10)
|
457 |
-
});
|
458 |
-
} else {
|
459 |
-
aField = jQuery("#"+this.oConfiguration.target);
|
460 |
-
|
461 |
-
if (jQuery.trim(aField.val()).length == 0){
|
462 |
-
this.unsetSelection();
|
463 |
-
if (typeof(this.oConfiguration.selectedDate) == "object" && this.oConfiguration.selectedDate){
|
464 |
-
this.setSelectedDay({
|
465 |
-
year:parseInt(this.oConfiguration.selectedDate.year),
|
466 |
-
month:parseInt(this.oConfiguration.selectedDate.month,10),
|
467 |
-
day:parseInt(this.oConfiguration.selectedDate.day,10)
|
468 |
-
});
|
469 |
-
}
|
470 |
-
} else {
|
471 |
-
if (jQuery.trim(aField.val()).length > 5){
|
472 |
-
divider = this.senseDivider(this.oConfiguration.dateFormat);
|
473 |
-
dateMold = this.oConfiguration.dateFormat;
|
474 |
-
array = jQuery.trim(aField.val()).split(divider);
|
475 |
-
array2 = dateMold.trim().split(divider);
|
476 |
-
i=dI=yI=mI=0;
|
477 |
-
|
478 |
-
for (i=0; i<array2.length; i++){
|
479 |
-
switch (array2[i]){
|
480 |
-
case "%d": case "%j": dI = i; break;
|
481 |
-
case "%m": case "%n": mI = i; break;
|
482 |
-
case "%M": mI = i; tflag=true; break;
|
483 |
-
case "%F": mI = i; fflag=true; break;
|
484 |
-
case "%Y": case "%y": yI = i;
|
485 |
-
}
|
486 |
-
}
|
487 |
-
|
488 |
-
if (tflag){
|
489 |
-
for (i=0; i<12; i++){
|
490 |
-
if (g_l10n["MONTHS"][i].substr(0,3).toUpperCase() == array[mI].toUpperCase()){
|
491 |
-
mI = i+1; break;
|
492 |
-
}
|
493 |
-
}
|
494 |
-
} else if (fflag){
|
495 |
-
for (i=0; i<12; i++){
|
496 |
-
if (g_l10n["MONTHS"][i].toLowerCase() == array[mI].toLowerCase()){
|
497 |
-
mI = i+1; break;
|
498 |
-
}
|
499 |
-
}
|
500 |
-
} else {
|
501 |
-
mI = parseInt(array[mI],10);
|
502 |
-
}
|
503 |
-
|
504 |
-
this.setSelectedDay({
|
505 |
-
year:parseInt(array[yI],10),
|
506 |
-
month:mI,
|
507 |
-
day:parseInt(array[dI],10)
|
508 |
-
});
|
509 |
-
} else {
|
510 |
-
this.unsetSelection();
|
511 |
-
return;
|
512 |
-
}
|
513 |
-
}
|
514 |
-
}
|
515 |
-
};
|
516 |
-
|
517 |
-
JsDatePick.prototype.senseDivider=function(aStr){return aStr.replace("%d","").replace("%j","").replace("%m","").replace("%M","").replace("%n","").replace("%F","").replace("%Y","").replace("%y","").substr(0,1);};
|
518 |
-
|
519 |
-
JsDatePick.prototype.showCalendar = function(){
|
520 |
-
if (this.JsDatePickBox.style.display == "none"){
|
521 |
-
this.determineFieldDate();
|
522 |
-
this.JsDatePickBox.style.display = "block";
|
523 |
-
this.resizeCalendar();
|
524 |
-
if ( this.oConfiguration.animate === true ) {
|
525 |
-
this.JsDatePickBox.style.display = "none";
|
526 |
-
jQuery(this.JsDatePickBox).show(500);
|
527 |
-
}
|
528 |
-
this.executePopulationDelegateIfExists();
|
529 |
-
jQuery(this.JsDatePickBox).mouseover(function(){ document.onclick=function(){}; });
|
530 |
-
jQuery(this.JsDatePickBox).attr("globalCalNumber", this.globalNumber);
|
531 |
-
jQuery(this.JsDatePickBox).mouseout(function(){
|
532 |
-
document.onclick = new Function("g_arrayOfUsedJsDatePickCals["+this.getAttribute("globalCalNumber")+"].closeCalendar();");
|
533 |
-
});
|
534 |
-
} else {
|
535 |
-
return;
|
536 |
-
}
|
537 |
-
};
|
538 |
-
|
539 |
-
JsDatePick.prototype.isAvailable = function(y, m, d){
|
540 |
-
if (y > this.oCurrentDay.year){
|
541 |
-
return false;
|
542 |
-
}
|
543 |
-
|
544 |
-
if (m > this.oCurrentDay.month && y == this.oCurrentDay.year){
|
545 |
-
return false;
|
546 |
-
}
|
547 |
-
|
548 |
-
if (d > this.oCurrentDay.day && m == this.oCurrentDay.month && y == this.oCurrentDay.year ){
|
549 |
-
return false;
|
550 |
-
}
|
551 |
-
|
552 |
-
return true;
|
553 |
-
};
|
554 |
-
|
555 |
-
JsDatePick.prototype.getDOMCalendarStripped = function(){
|
556 |
-
var d = document,boxMain,boxMainInner,clearfix,boxMainCellsContainer,tooltip,weekDaysRow,clearfix2;
|
557 |
-
|
558 |
-
boxMain = d.createElement("div");
|
559 |
-
if (this.oConfiguration.isStripped){
|
560 |
-
this.setC(boxMain, "boxMainStripped");
|
561 |
-
} else {
|
562 |
-
this.setC(boxMain, "boxMain");
|
563 |
-
}
|
564 |
-
|
565 |
-
this.boxMain = boxMain;
|
566 |
-
|
567 |
-
boxMainInner = d.createElement("div");
|
568 |
-
clearfix = d.createElement("div");
|
569 |
-
boxMainCellsContainer = d.createElement("div");
|
570 |
-
tooltip = d.createElement("div");
|
571 |
-
weekDaysRow = d.createElement("div");
|
572 |
-
clearfix2 = d.createElement("div");
|
573 |
-
|
574 |
-
this.setC(clearfix, "clearfix");
|
575 |
-
this.setC(clearfix2, "clearfix");
|
576 |
-
this.setC(boxMainInner, "boxMainInner");
|
577 |
-
this.setC(boxMainCellsContainer, "boxMainCellsContainer");
|
578 |
-
this.setC(tooltip, "tooltip");
|
579 |
-
this.setC(weekDaysRow, "weekDaysRow");
|
580 |
-
|
581 |
-
this.tooltip = tooltip;
|
582 |
-
|
583 |
-
boxMain.appendChild(boxMainInner);
|
584 |
-
|
585 |
-
this.controlsBar = this.getDOMControlBar();
|
586 |
-
this.makeDOMWeekDays(weekDaysRow);
|
587 |
-
|
588 |
-
boxMainInner.appendChild(this.controlsBar);
|
589 |
-
boxMainInner.appendChild(clearfix);
|
590 |
-
boxMainInner.appendChild(tooltip);
|
591 |
-
boxMainInner.appendChild(weekDaysRow);
|
592 |
-
boxMainInner.appendChild(boxMainCellsContainer);
|
593 |
-
boxMainInner.appendChild(clearfix2);
|
594 |
-
|
595 |
-
this.boxMainCellsContainer = boxMainCellsContainer;
|
596 |
-
this.populateMainBox(boxMainCellsContainer);
|
597 |
-
|
598 |
-
return boxMain;
|
599 |
-
};
|
600 |
-
|
601 |
-
JsDatePick.prototype.makeDOMWeekDays = function(aWeekDaysRow){
|
602 |
-
var i=0,d = document,weekDaysArray = g_l10n["DAYS_3"],textNode,weekDay;
|
603 |
-
|
604 |
-
for (i=this.oConfiguration.weekStartDay; i<7; i++){
|
605 |
-
weekDay = d.createElement("div");
|
606 |
-
textNode = d.createTextNode(weekDaysArray[i]);
|
607 |
-
this.setC(weekDay, "weekDay");
|
608 |
-
|
609 |
-
weekDay.appendChild(textNode);
|
610 |
-
aWeekDaysRow.appendChild(weekDay);
|
611 |
-
}
|
612 |
-
|
613 |
-
if (this.oConfiguration.weekStartDay > 0){
|
614 |
-
for (i=0; i<this.oConfiguration.weekStartDay; i++){
|
615 |
-
weekDay = d.createElement("div");
|
616 |
-
textNode = d.createTextNode(weekDaysArray[i]);
|
617 |
-
this.setC(weekDay, "weekDay");
|
618 |
-
|
619 |
-
weekDay.appendChild(textNode);
|
620 |
-
aWeekDaysRow.appendChild(weekDay);
|
621 |
-
}
|
622 |
-
}
|
623 |
-
weekDay.style.marginRight = "0px";
|
624 |
-
};
|
625 |
-
|
626 |
-
JsDatePick.prototype.repopulateMainBox = function(){
|
627 |
-
while (this.boxMainCellsContainer.firstChild){
|
628 |
-
this.boxMainCellsContainer.removeChild(this.boxMainCellsContainer.firstChild);
|
629 |
-
}
|
630 |
-
|
631 |
-
this.populateMainBox(this.boxMainCellsContainer);
|
632 |
-
this.resizeCalendar();
|
633 |
-
this.executePopulationDelegateIfExists();
|
634 |
-
};
|
635 |
-
|
636 |
-
JsDatePick.prototype.executePopulationDelegateIfExists = function(){
|
637 |
-
if (typeof(this.repopulationDelegate) == "function"){
|
638 |
-
this.repopulationDelegate();
|
639 |
-
}
|
640 |
-
};
|
641 |
-
|
642 |
-
JsDatePick.prototype.populateMainBox = function(aMainBox){
|
643 |
-
var d = document,aDayDiv,aTextNode,columnNumber = 1,disabledDayFlag = false,cmpMonth = this.currentMonth-1,oDay,iStamp,skipDays,i,currentColorScheme;
|
644 |
-
|
645 |
-
oDay = new Date(this.currentYear, cmpMonth, 1,1,0,0);
|
646 |
-
iStamp = oDay.getTime();
|
647 |
-
|
648 |
-
this.flag_DayMarkedBeforeRepopulation = false;
|
649 |
-
this.setControlBarText(this.monthsTextualRepresentation[cmpMonth] + ", " + this.currentYear);
|
650 |
-
|
651 |
-
skipDays = parseInt(oDay.getDay())-this.oConfiguration.weekStartDay;
|
652 |
-
if (skipDays < 0){
|
653 |
-
skipDays = skipDays + 7;
|
654 |
-
}
|
655 |
-
|
656 |
-
i=0;
|
657 |
-
for (i=0; i<skipDays; i++){
|
658 |
-
aDayDiv = d.createElement("div");
|
659 |
-
this.setC(aDayDiv, "skipDay");
|
660 |
-
aMainBox.appendChild(aDayDiv);
|
661 |
-
if (columnNumber == 7){
|
662 |
-
columnNumber = 1;
|
663 |
-
} else {
|
664 |
-
columnNumber++;
|
665 |
-
}
|
666 |
-
}
|
667 |
-
|
668 |
-
while (oDay.getMonth() == cmpMonth){
|
669 |
-
disabledDayFlag = false;
|
670 |
-
aDayDiv = d.createElement("div");
|
671 |
-
|
672 |
-
if (this.lastPostedDay){
|
673 |
-
if (this.lastPostedDay == oDay.getDate()){
|
674 |
-
aTextNode = parseInt(this.lastPostedDay,10)+1;
|
675 |
-
} else {
|
676 |
-
aTextNode = d.createTextNode(oDay.getDate());
|
677 |
-
}
|
678 |
-
} else {
|
679 |
-
aTextNode = d.createTextNode(oDay.getDate());
|
680 |
-
}
|
681 |
-
|
682 |
-
aDayDiv.appendChild(aTextNode);
|
683 |
-
aMainBox.appendChild(aDayDiv);
|
684 |
-
|
685 |
-
aDayDiv.setAttribute("globalNumber",this.globalNumber);
|
686 |
-
|
687 |
-
if (columnNumber == 7){
|
688 |
-
if (this.oConfiguration.directionality == "ltr"){
|
689 |
-
aDayDiv.style.marginRight = "0px";
|
690 |
-
} else {
|
691 |
-
aDayDiv.style.marginLeft = "0px";
|
692 |
-
}
|
693 |
-
}
|
694 |
-
|
695 |
-
if (this.isToday(oDay)){
|
696 |
-
aDayDiv.setAttribute("isToday",1);
|
697 |
-
}
|
698 |
-
|
699 |
-
if (this.oConfiguration.limitToToday >= 1){
|
700 |
-
if ( this.isAvailable(this.currentYear, this.currentMonth, parseInt(oDay.getDate()+1) ) ){
|
701 |
-
disabledDayFlag = true;
|
702 |
-
aDayDiv.setAttribute("isJsDatePickDisabled",1);
|
703 |
-
}
|
704 |
-
}
|
705 |
-
else if (this.oConfiguration.limitToToday <= -1){
|
706 |
-
if ( ! this.isAvailable(this.currentYear, this.currentMonth, parseInt(oDay.getDate()) ) ){
|
707 |
-
disabledDayFlag = true;
|
708 |
-
aDayDiv.setAttribute("isJsDatePickDisabled",1);
|
709 |
-
}
|
710 |
-
}
|
711 |
-
|
712 |
-
aDayDiv.onmouseover = function(){
|
713 |
-
var gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")),currentColorScheme;
|
714 |
-
currentColorScheme = gRef.getCurrentColorScheme();
|
715 |
-
|
716 |
-
if (parseInt(this.getAttribute("isSelected")) == 1){
|
717 |
-
return;
|
718 |
-
}
|
719 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
720 |
-
return;
|
721 |
-
}
|
722 |
-
if (parseInt(this.getAttribute("isToday")) == 1){
|
723 |
-
gRef.setC(this, "dayOverToday");
|
724 |
-
this.style.background = "url(" + gRef.oConfiguration.imgPath + currentColorScheme + "_dayOver.gif) left top no-repeat";
|
725 |
-
} else {
|
726 |
-
gRef.setC(this, "dayOver");
|
727 |
-
this.style.background = "url(" + gRef.oConfiguration.imgPath + currentColorScheme + "_dayOver.gif) left top no-repeat";
|
728 |
-
}
|
729 |
-
};
|
730 |
-
|
731 |
-
aDayDiv.onmouseout = function(){
|
732 |
-
var gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")),currentColorScheme;
|
733 |
-
currentColorScheme = gRef.getCurrentColorScheme();
|
734 |
-
|
735 |
-
if (parseInt(this.getAttribute("isSelected")) == 1){
|
736 |
-
return;
|
737 |
-
}
|
738 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
739 |
-
return;
|
740 |
-
}
|
741 |
-
if (parseInt(this.getAttribute("isToday")) == 1){
|
742 |
-
gRef.setC(this, "dayNormalToday");
|
743 |
-
this.style.background = "url(" + gRef.oConfiguration.imgPath + currentColorScheme + "_dayNormal.gif) left top no-repeat";
|
744 |
-
} else {
|
745 |
-
gRef.setC(this, "dayNormal");
|
746 |
-
this.style.background = "url(" + gRef.oConfiguration.imgPath + currentColorScheme + "_dayNormal.gif) left top no-repeat";
|
747 |
-
}
|
748 |
-
};
|
749 |
-
|
750 |
-
aDayDiv.onmousedown = function(){
|
751 |
-
var gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")),currentColorScheme;
|
752 |
-
currentColorScheme = gRef.getCurrentColorScheme();
|
753 |
-
|
754 |
-
if (parseInt(this.getAttribute("isSelected")) == 1){
|
755 |
-
return;
|
756 |
-
}
|
757 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
758 |
-
return;
|
759 |
-
}
|
760 |
-
if (parseInt(this.getAttribute("isToday")) == 1){
|
761 |
-
gRef.setC(this, "dayDownToday");
|
762 |
-
this.style.background = "url(" + gRef.oConfiguration.imgPath + currentColorScheme + "_dayDown.gif) left top no-repeat";
|
763 |
-
} else {
|
764 |
-
gRef.setC(this, "dayDown");
|
765 |
-
this.style.background = "url(" + gRef.oConfiguration.imgPath + currentColorScheme + "_dayDown.gif) left top no-repeat";
|
766 |
-
}
|
767 |
-
};
|
768 |
-
|
769 |
-
aDayDiv.onmouseup = function(){
|
770 |
-
var gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")),currentColorScheme;
|
771 |
-
currentColorScheme = gRef.getCurrentColorScheme();
|
772 |
-
|
773 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
774 |
-
return;
|
775 |
-
}
|
776 |
-
if (parseInt(this.getAttribute("isToday")) == 1){
|
777 |
-
gRef.setC(this, "dayNormalToday");
|
778 |
-
this.style.background = "url(" + gRef.oConfiguration.imgPath + currentColorScheme + "_dayNormal.gif) left top no-repeat";
|
779 |
-
} else {
|
780 |
-
gRef.setC(this, "dayNormal");
|
781 |
-
this.style.background = "url(" + gRef.oConfiguration.imgPath + currentColorScheme + "_dayNormal.gif) left top no-repeat";
|
782 |
-
}
|
783 |
-
|
784 |
-
gRef.setDaySelection(this);
|
785 |
-
gRef.executeOnSelectedDelegateIfExists();
|
786 |
-
};
|
787 |
-
|
788 |
-
if (this.isSelectedDay(oDay.getDate())){
|
789 |
-
aDayDiv.setAttribute("isSelected",1);
|
790 |
-
this.flag_DayMarkedBeforeRepopulation = true;
|
791 |
-
this.lastMarkedDayObject = aDayDiv;
|
792 |
-
|
793 |
-
if (parseInt(aDayDiv.getAttribute("isToday")) == 1){
|
794 |
-
this.setC(aDayDiv, "dayDownToday");
|
795 |
-
aDayDiv.style.background = "url(" + this.oConfiguration.imgPath + this.oConfiguration.cellColorScheme + "_dayDown.gif) left top no-repeat";
|
796 |
-
} else {
|
797 |
-
this.setC(aDayDiv, "dayDown");
|
798 |
-
aDayDiv.style.background = "url(" + this.oConfiguration.imgPath + this.oConfiguration.cellColorScheme + "_dayDown.gif) left top no-repeat";
|
799 |
-
}
|
800 |
-
|
801 |
-
} else {
|
802 |
-
currentColorScheme = this.getCurrentColorScheme();
|
803 |
-
|
804 |
-
if (parseInt(aDayDiv.getAttribute("isToday")) == 1){
|
805 |
-
if (disabledDayFlag){
|
806 |
-
this.setC(aDayDiv, "dayDisabled");
|
807 |
-
aDayDiv.style.background = "url(" + this.oConfiguration.imgPath + this.oConfiguration.cellColorScheme + "_dayNormal.gif) left top no-repeat";
|
808 |
-
} else {
|
809 |
-
this.setC(aDayDiv, "dayNormalToday");
|
810 |
-
aDayDiv.style.background = "url(" + this.oConfiguration.imgPath + this.oConfiguration.cellColorScheme + "_dayNormal.gif) left top no-repeat";
|
811 |
-
}
|
812 |
-
} else {
|
813 |
-
if (disabledDayFlag){
|
814 |
-
this.setC(aDayDiv, "dayDisabled");
|
815 |
-
aDayDiv.style.background = "url(" + this.oConfiguration.imgPath + this.oConfiguration.cellColorScheme + "_dayNormal.gif) left top no-repeat";
|
816 |
-
} else {
|
817 |
-
this.setC(aDayDiv, "dayNormal");
|
818 |
-
aDayDiv.style.background = "url(" + this.oConfiguration.imgPath + this.oConfiguration.cellColorScheme + "_dayNormal.gif) left top no-repeat";
|
819 |
-
}
|
820 |
-
}
|
821 |
-
}
|
822 |
-
|
823 |
-
if (columnNumber == 7){
|
824 |
-
columnNumber = 1;
|
825 |
-
} else {
|
826 |
-
columnNumber++;
|
827 |
-
}
|
828 |
-
iStamp += 86400000;
|
829 |
-
oDay.setTime(iStamp);
|
830 |
-
}
|
831 |
-
|
832 |
-
this.lastPostedDay = null;
|
833 |
-
|
834 |
-
return aMainBox;
|
835 |
-
};
|
836 |
-
|
837 |
-
JsDatePick.prototype.unsetSelection = function(){
|
838 |
-
this.flag_aDayWasSelected = false;
|
839 |
-
this.selectedDayObject = {};
|
840 |
-
this.repopulateMainBox();
|
841 |
-
};
|
842 |
-
|
843 |
-
JsDatePick.prototype.setSelectedDay = function(dateObject){
|
844 |
-
this.flag_aDayWasSelected = true;
|
845 |
-
|
846 |
-
this.selectedDayObject.day = parseInt(dateObject.day,10);
|
847 |
-
this.selectedDayObject.month = parseInt(dateObject.month,10);
|
848 |
-
this.selectedDayObject.year = parseInt(dateObject.year);
|
849 |
-
|
850 |
-
this.currentMonth = dateObject.month;
|
851 |
-
this.currentYear = dateObject.year;
|
852 |
-
|
853 |
-
this.repopulateMainBox();
|
854 |
-
};
|
855 |
-
|
856 |
-
JsDatePick.prototype.isSelectedDay = function(aDate){
|
857 |
-
if (this.flag_aDayWasSelected){
|
858 |
-
if (parseInt(aDate) == this.selectedDayObject.day &&
|
859 |
-
this.currentMonth == this.selectedDayObject.month &&
|
860 |
-
this.currentYear == this.selectedDayObject.year){
|
861 |
-
return true;
|
862 |
-
} else {
|
863 |
-
return false;
|
864 |
-
}
|
865 |
-
}
|
866 |
-
return false;
|
867 |
-
};
|
868 |
-
|
869 |
-
JsDatePick.prototype.getSelectedDay = function(){
|
870 |
-
if (this.flag_aDayWasSelected){
|
871 |
-
return this.selectedDayObject;
|
872 |
-
} else {
|
873 |
-
return false;
|
874 |
-
}
|
875 |
-
};
|
876 |
-
|
877 |
-
JsDatePick.prototype.getSelectedDayFormatted = function(){
|
878 |
-
if (this.flag_aDayWasSelected){
|
879 |
-
|
880 |
-
var dateStr = this.oConfiguration.dateFormat;
|
881 |
-
|
882 |
-
dateStr = dateStr.replace("%d", this.selectedDayObject.day.toString().strpad());
|
883 |
-
dateStr = dateStr.replace("%j", this.selectedDayObject.day);
|
884 |
-
|
885 |
-
dateStr = dateStr.replace("%m", this.selectedDayObject.month.toString().strpad());
|
886 |
-
dateStr = dateStr.replace("%M", g_l10n["MONTHS"][this.selectedDayObject.month-1].substr(0,3).toUpperCase());
|
887 |
-
dateStr = dateStr.replace("%n", this.selectedDayObject.month);
|
888 |
-
dateStr = dateStr.replace("%F", g_l10n["MONTHS"][this.selectedDayObject.month-1]);
|
889 |
-
|
890 |
-
dateStr = dateStr.replace("%Y", this.selectedDayObject.year);
|
891 |
-
dateStr = dateStr.replace("%y", this.selectedDayObject.year.toString().substr(2,2));
|
892 |
-
|
893 |
-
return dateStr;
|
894 |
-
} else {
|
895 |
-
return false;
|
896 |
-
}
|
897 |
-
};
|
898 |
-
|
899 |
-
JsDatePick.prototype.setDaySelection = function(anElement){
|
900 |
-
var currentColorScheme = this.getCurrentColorScheme();
|
901 |
-
|
902 |
-
if (this.flag_DayMarkedBeforeRepopulation){
|
903 |
-
/* Un mark last selected day */
|
904 |
-
jQuery(this.lastMarkedDayObject).attr("isSelected",0);
|
905 |
-
|
906 |
-
if (parseInt(this.lastMarkedDayObject.getAttribute("isToday")) == 1){
|
907 |
-
this.setC(this.lastMarkedDayObject, "dayNormalToday");
|
908 |
-
this.lastMarkedDayObject.style.background = "url(" + this.oConfiguration.imgPath + currentColorScheme + "_dayNormal.gif) left top no-repeat";
|
909 |
-
} else {
|
910 |
-
this.setC(this.lastMarkedDayObject, "dayNormal");
|
911 |
-
this.lastMarkedDayObject.style.background = "url(" + this.oConfiguration.imgPath + currentColorScheme + "_dayNormal.gif) left top no-repeat";
|
912 |
-
}
|
913 |
-
}
|
914 |
-
|
915 |
-
this.flag_aDayWasSelected = true;
|
916 |
-
this.selectedDayObject.year = this.currentYear;
|
917 |
-
this.selectedDayObject.month = this.currentMonth;
|
918 |
-
this.selectedDayObject.day = parseInt(anElement.innerHTML);
|
919 |
-
|
920 |
-
this.flag_DayMarkedBeforeRepopulation = true;
|
921 |
-
this.lastMarkedDayObject = anElement;
|
922 |
-
|
923 |
-
jQuery(anElement).attr("isSelected",1);
|
924 |
-
|
925 |
-
if (parseInt(anElement.getAttribute("isToday")) == 1){
|
926 |
-
this.setC(anElement, "dayDownToday");
|
927 |
-
anElement.style.background = "url(" + this.oConfiguration.imgPath + currentColorScheme + "_dayDown.gif) left top no-repeat";
|
928 |
-
} else {
|
929 |
-
this.setC(anElement, "dayDown");
|
930 |
-
anElement.style.background = "url(" + this.oConfiguration.imgPath + currentColorScheme + "_dayDown.gif) left top no-repeat";
|
931 |
-
}
|
932 |
-
};
|
933 |
-
|
934 |
-
JsDatePick.prototype.isToday = function(aDateObject){
|
935 |
-
var cmpMonth = this.oCurrentDay.month-1;
|
936 |
-
if (aDateObject.getDate() == this.oCurrentDay.day &&
|
937 |
-
aDateObject.getMonth() == cmpMonth &&
|
938 |
-
aDateObject.getFullYear() == this.oCurrentDay.year){
|
939 |
-
return true;
|
940 |
-
}
|
941 |
-
return false;
|
942 |
-
};
|
943 |
-
|
944 |
-
JsDatePick.prototype.setControlBarText = function(aText){
|
945 |
-
var aTextNode = document.createTextNode(aText);
|
946 |
-
jQuery(this.controlsBarTextCell).empty();
|
947 |
-
this.controlsBarTextCell.appendChild(aTextNode);
|
948 |
-
};
|
949 |
-
|
950 |
-
JsDatePick.prototype.setTooltipText = function(aText){
|
951 |
-
jQuery(this.tooltip).empty();
|
952 |
-
var aTextNode = document.createTextNode(aText);
|
953 |
-
this.tooltip.appendChild(aTextNode);
|
954 |
-
};
|
955 |
-
|
956 |
-
JsDatePick.prototype.moveForwardOneYear = function(){
|
957 |
-
var desiredYear = this.currentYear + 1;
|
958 |
-
if (desiredYear <= parseInt(this.oConfiguration.yearsRange[1])){
|
959 |
-
this.currentYear++;
|
960 |
-
this.repopulateMainBox();
|
961 |
-
return true;
|
962 |
-
} else {
|
963 |
-
return false;
|
964 |
-
}
|
965 |
-
};
|
966 |
-
|
967 |
-
JsDatePick.prototype.moveBackOneYear = function(){
|
968 |
-
var desiredYear = this.currentYear - 1;
|
969 |
-
|
970 |
-
if (desiredYear >= parseInt(this.oConfiguration.yearsRange[0])){
|
971 |
-
this.currentYear--;
|
972 |
-
this.repopulateMainBox();
|
973 |
-
return true;
|
974 |
-
} else {
|
975 |
-
return false;
|
976 |
-
}
|
977 |
-
};
|
978 |
-
|
979 |
-
JsDatePick.prototype.moveForwardOneMonth = function(){
|
980 |
-
|
981 |
-
if (this.currentMonth < 12){
|
982 |
-
this.currentMonth++;
|
983 |
-
} else {
|
984 |
-
if (this.moveForwardOneYear()){
|
985 |
-
this.currentMonth = 1;
|
986 |
-
} else {
|
987 |
-
this.currentMonth = 12;
|
988 |
-
}
|
989 |
-
}
|
990 |
-
|
991 |
-
this.repopulateMainBox();
|
992 |
-
};
|
993 |
-
|
994 |
-
JsDatePick.prototype.moveBackOneMonth = function(){
|
995 |
-
|
996 |
-
if (this.currentMonth > 1){
|
997 |
-
this.currentMonth--;
|
998 |
-
} else {
|
999 |
-
if (this.moveBackOneYear()){
|
1000 |
-
this.currentMonth = 12;
|
1001 |
-
} else {
|
1002 |
-
this.currentMonth = 1;
|
1003 |
-
}
|
1004 |
-
}
|
1005 |
-
|
1006 |
-
this.repopulateMainBox();
|
1007 |
-
};
|
1008 |
-
|
1009 |
-
JsDatePick.prototype.getCurrentColorScheme = function(){
|
1010 |
-
return this.oConfiguration.cellColorScheme;
|
1011 |
-
};
|
1012 |
-
|
1013 |
-
JsDatePick.prototype.getDOMControlBar = function(){
|
1014 |
-
var d = document, controlsBar,monthForwardButton,monthBackwardButton,yearForwardButton,yearBackwardButton,controlsBarText;
|
1015 |
-
|
1016 |
-
controlsBar = d.createElement("div");
|
1017 |
-
monthForwardButton = d.createElement("div");
|
1018 |
-
monthBackwardButton = d.createElement("div");
|
1019 |
-
yearForwardButton = d.createElement("div");
|
1020 |
-
yearBackwardButton = d.createElement("div");
|
1021 |
-
controlsBarText = d.createElement("div");
|
1022 |
-
|
1023 |
-
this.setC(controlsBar, "controlsBar");
|
1024 |
-
this.setC(monthForwardButton, "monthForwardButton");
|
1025 |
-
this.setC(monthBackwardButton, "monthBackwardButton");
|
1026 |
-
this.setC(yearForwardButton, "yearForwardButton");
|
1027 |
-
this.setC(yearBackwardButton, "yearBackwardButton");
|
1028 |
-
this.setC(controlsBarText, "controlsBarText");
|
1029 |
-
|
1030 |
-
jQuery(controlsBar).attr("globalNumber",this.globalNumber);
|
1031 |
-
if (this.oConfiguration.monthButtons) {
|
1032 |
-
jQuery(monthForwardButton).attr("globalNumber",this.globalNumber);
|
1033 |
-
jQuery(monthBackwardButton).attr("globalNumber",this.globalNumber);
|
1034 |
-
}
|
1035 |
-
if (this.oConfiguration.yearButtons) {
|
1036 |
-
jQuery(yearBackwardButton).attr("globalNumber",this.globalNumber);
|
1037 |
-
jQuery(yearForwardButton).attr("globalNumber",this.globalNumber);
|
1038 |
-
}
|
1039 |
-
this.controlsBarTextCell = controlsBarText;
|
1040 |
-
|
1041 |
-
if (this.oConfiguration.monthButtons) {
|
1042 |
-
controlsBar.appendChild(monthForwardButton);
|
1043 |
-
controlsBar.appendChild(monthBackwardButton);
|
1044 |
-
}
|
1045 |
-
if (this.oConfiguration.yearButtons) {
|
1046 |
-
controlsBar.appendChild(yearForwardButton);
|
1047 |
-
controlsBar.appendChild(yearBackwardButton);
|
1048 |
-
}
|
1049 |
-
controlsBar.appendChild(controlsBarText);
|
1050 |
-
|
1051 |
-
monthForwardButton.onmouseover = function(){
|
1052 |
-
var gRef,parentElement;
|
1053 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1054 |
-
return;
|
1055 |
-
}
|
1056 |
-
parentElement = this.parentNode;
|
1057 |
-
while (parentElement.className != "controlsBar"){
|
1058 |
-
parentElement = parentElement.parentNode;
|
1059 |
-
}
|
1060 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1061 |
-
gRef.setTooltipText(g_l10n["MONTH_FWD"]);
|
1062 |
-
gRef.setC(this, "monthForwardButtonOver");
|
1063 |
-
};
|
1064 |
-
|
1065 |
-
monthForwardButton.onmouseout = function(){
|
1066 |
-
var parentElement,gRef;
|
1067 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1068 |
-
return;
|
1069 |
-
}
|
1070 |
-
parentElement = this.parentNode;
|
1071 |
-
while (parentElement.className != "controlsBar"){
|
1072 |
-
parentElement = parentElement.parentNode;
|
1073 |
-
}
|
1074 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1075 |
-
gRef.setTooltipText('');
|
1076 |
-
gRef.setC(this, "monthForwardButton");
|
1077 |
-
};
|
1078 |
-
|
1079 |
-
monthForwardButton.onmousedown = function(){
|
1080 |
-
var gRef,parentElement;
|
1081 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1082 |
-
return;
|
1083 |
-
}
|
1084 |
-
parentElement = this.parentNode;
|
1085 |
-
while (parentElement.className != "controlsBar"){
|
1086 |
-
parentElement = parentElement.parentNode;
|
1087 |
-
}
|
1088 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1089 |
-
gRef.setTooltipText(g_l10n["MONTH_FWD"]);
|
1090 |
-
gRef.setC(this, "monthForwardButtonDown");
|
1091 |
-
};
|
1092 |
-
|
1093 |
-
monthForwardButton.onmouseup = function(){
|
1094 |
-
var parentElement,gRef;
|
1095 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1096 |
-
return;
|
1097 |
-
}
|
1098 |
-
parentElement = this.parentNode;
|
1099 |
-
while (parentElement.className != "controlsBar"){
|
1100 |
-
parentElement = parentElement.parentNode;
|
1101 |
-
}
|
1102 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1103 |
-
gRef.setTooltipText(g_l10n["MONTH_FWD"]);
|
1104 |
-
gRef.setC(this, "monthForwardButton");
|
1105 |
-
gRef.moveForwardOneMonth();
|
1106 |
-
};
|
1107 |
-
|
1108 |
-
jQuery(monthForwardButton).click(function(e){ e.preventDefault(); }).focus(function(e){ e.preventDefault(); });
|
1109 |
-
|
1110 |
-
/* Month backward button event handlers */
|
1111 |
-
|
1112 |
-
monthBackwardButton.onmouseover = function(){
|
1113 |
-
var parentElement,gRef;
|
1114 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1115 |
-
return;
|
1116 |
-
}
|
1117 |
-
parentElement = this.parentNode;
|
1118 |
-
while (parentElement.className != "controlsBar"){
|
1119 |
-
parentElement = parentElement.parentNode;
|
1120 |
-
}
|
1121 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1122 |
-
gRef.setTooltipText(g_l10n["MONTH_BCK"]);
|
1123 |
-
gRef.setC(this, "monthBackwardButtonOver");
|
1124 |
-
};
|
1125 |
-
|
1126 |
-
monthBackwardButton.onmouseout = function(){
|
1127 |
-
var parentElement,gRef;
|
1128 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1129 |
-
return;
|
1130 |
-
}
|
1131 |
-
parentElement = this.parentNode;
|
1132 |
-
while (parentElement.className != "controlsBar"){
|
1133 |
-
parentElement = parentElement.parentNode;
|
1134 |
-
}
|
1135 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1136 |
-
gRef.setTooltipText('');
|
1137 |
-
gRef.setC(this, "monthBackwardButton");
|
1138 |
-
};
|
1139 |
-
|
1140 |
-
monthBackwardButton.onmousedown = function(){
|
1141 |
-
var parentElement,gRef;
|
1142 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1143 |
-
return;
|
1144 |
-
}
|
1145 |
-
parentElement = this.parentNode;
|
1146 |
-
while (parentElement.className != "controlsBar"){
|
1147 |
-
parentElement = parentElement.parentNode;
|
1148 |
-
}
|
1149 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1150 |
-
gRef.setTooltipText(g_l10n["MONTH_BCK"]);
|
1151 |
-
gRef.setC(this, "monthBackwardButtonDown");
|
1152 |
-
};
|
1153 |
-
|
1154 |
-
monthBackwardButton.onmouseup = function(){
|
1155 |
-
var parentElement,gRef;
|
1156 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1157 |
-
return;
|
1158 |
-
}
|
1159 |
-
parentElement = this.parentNode;
|
1160 |
-
while (parentElement.className != "controlsBar"){
|
1161 |
-
parentElement = parentElement.parentNode;
|
1162 |
-
}
|
1163 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1164 |
-
gRef.setTooltipText(g_l10n["MONTH_BCK"]);
|
1165 |
-
gRef.setC(this, "monthBackwardButton");
|
1166 |
-
gRef.moveBackOneMonth();
|
1167 |
-
};
|
1168 |
-
|
1169 |
-
/* Year forward button */
|
1170 |
-
|
1171 |
-
yearForwardButton.onmouseover = function(){
|
1172 |
-
var parentElement,gRef;
|
1173 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1174 |
-
return;
|
1175 |
-
}
|
1176 |
-
parentElement = this.parentNode;
|
1177 |
-
while (parentElement.className != "controlsBar"){
|
1178 |
-
parentElement = parentElement.parentNode;
|
1179 |
-
}
|
1180 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1181 |
-
gRef.setTooltipText(g_l10n["YEAR_FWD"]);
|
1182 |
-
gRef.setC(this, "yearForwardButtonOver");
|
1183 |
-
};
|
1184 |
-
|
1185 |
-
yearForwardButton.onmouseout = function(){
|
1186 |
-
var parentElement,gRef;
|
1187 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1188 |
-
return;
|
1189 |
-
}
|
1190 |
-
parentElement = this.parentNode;
|
1191 |
-
while (parentElement.className != "controlsBar"){
|
1192 |
-
parentElement = parentElement.parentNode;
|
1193 |
-
}
|
1194 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1195 |
-
gRef.setTooltipText('');
|
1196 |
-
gRef.setC(this, "yearForwardButton");
|
1197 |
-
};
|
1198 |
-
|
1199 |
-
yearForwardButton.onmousedown = function(){
|
1200 |
-
var parentElement,gRef;
|
1201 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1202 |
-
return;
|
1203 |
-
}
|
1204 |
-
parentElement = this.parentNode;
|
1205 |
-
while (parentElement.className != "controlsBar"){
|
1206 |
-
parentElement = parentElement.parentNode;
|
1207 |
-
}
|
1208 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1209 |
-
gRef.setTooltipText(g_l10n["YEAR_FWD"]);
|
1210 |
-
gRef.setC(this, "yearForwardButtonDown");
|
1211 |
-
};
|
1212 |
-
|
1213 |
-
yearForwardButton.onmouseup = function(){
|
1214 |
-
var parentElement,gRef;
|
1215 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1216 |
-
return;
|
1217 |
-
}
|
1218 |
-
parentElement = this.parentNode;
|
1219 |
-
while (parentElement.className != "controlsBar"){
|
1220 |
-
parentElement = parentElement.parentNode;
|
1221 |
-
}
|
1222 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1223 |
-
gRef.setTooltipText(g_l10n["YEAR_FWD"]);
|
1224 |
-
gRef.setC(this, "yearForwardButton");
|
1225 |
-
gRef.moveForwardOneYear();
|
1226 |
-
};
|
1227 |
-
|
1228 |
-
/* Year backward button */
|
1229 |
-
|
1230 |
-
yearBackwardButton.onmouseover = function(){
|
1231 |
-
var parentElement,gRef;
|
1232 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1233 |
-
return;
|
1234 |
-
}
|
1235 |
-
parentElement = this.parentNode;
|
1236 |
-
while (parentElement.className != "controlsBar"){
|
1237 |
-
parentElement = parentElement.parentNode;
|
1238 |
-
}
|
1239 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1240 |
-
gRef.setTooltipText(g_l10n["YEAR_BCK"]);
|
1241 |
-
gRef.setC(this, "yearBackwardButtonOver");
|
1242 |
-
};
|
1243 |
-
|
1244 |
-
yearBackwardButton.onmouseout = function(){
|
1245 |
-
var parentElement,gRef;
|
1246 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1247 |
-
return;
|
1248 |
-
}
|
1249 |
-
parentElement = this.parentNode;
|
1250 |
-
while (parentElement.className != "controlsBar"){
|
1251 |
-
parentElement = parentElement.parentNode;
|
1252 |
-
}
|
1253 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1254 |
-
gRef.setTooltipText('');
|
1255 |
-
gRef.setC(this, "yearBackwardButton");
|
1256 |
-
};
|
1257 |
-
|
1258 |
-
yearBackwardButton.onmousedown = function(){
|
1259 |
-
var parentElement,gRef;
|
1260 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1261 |
-
return;
|
1262 |
-
}
|
1263 |
-
parentElement = this.parentNode;
|
1264 |
-
while (parentElement.className != "controlsBar"){
|
1265 |
-
parentElement = parentElement.parentNode;
|
1266 |
-
}
|
1267 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1268 |
-
gRef.setTooltipText(g_l10n["YEAR_BCK"]);
|
1269 |
-
gRef.setC(this, "yearBackwardButtonDown");
|
1270 |
-
};
|
1271 |
-
|
1272 |
-
yearBackwardButton.onmouseup = function(){
|
1273 |
-
var parentElement,gRef;
|
1274 |
-
if (parseInt(this.getAttribute("isJsDatePickDisabled")) == 1){
|
1275 |
-
return;
|
1276 |
-
}
|
1277 |
-
parentElement = this.parentNode;
|
1278 |
-
while (parentElement.className != "controlsBar"){
|
1279 |
-
parentElement = parentElement.parentNode;
|
1280 |
-
}
|
1281 |
-
gRef = JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));
|
1282 |
-
gRef.setTooltipText(g_l10n["YEAR_BCK"]);
|
1283 |
-
gRef.setC(this, "yearBackwardButton");
|
1284 |
-
gRef.moveBackOneYear();
|
1285 |
-
};
|
1286 |
-
|
1287 |
-
return controlsBar;
|
1288 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/jsDatePick.jquery.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
if(typeof(g_l10n)==="undefined"){g_l10n=[];g_l10n.MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];g_l10n.DAYS_3=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];g_l10n.MONTH_FWD="Move a month forward";g_l10n.MONTH_BCK="Move a month backward";g_l10n.YEAR_FWD="Move a year forward";g_l10n.YEAR_BCK="Move a year backward";g_l10n.CLOSE="Close the calendar";g_l10n.ERROR_2=g_l10n.ERROR_1="Date object invalid!";g_l10n.ERROR_4=g_l10n.ERROR_3="Target invalid!"}g_arrayOfUsedJsDatePickCalsGlobalNumbers=[];g_arrayOfUsedJsDatePickCals=[];g_currentDateObject={};g_currentDateObject.dateObject=new Date();g_currentDateObject.day=g_currentDateObject.dateObject.getDate();g_currentDateObject.month=g_currentDateObject.dateObject.getMonth()+1;g_currentDateObject.year=g_currentDateObject.dateObject.getFullYear();String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.ltrim=function(){return this.replace(/^\s+/,"")};String.prototype.rtrim=function(){return this.replace(/\s+$/,"")};String.prototype.strpad=function(){return(!isNaN(this)&&this.toString().length==1)?"0"+this:this};JsDatePick=function(a){if(document.all){this.isie=true;this.iever=JsDatePick.getInternetExplorerVersion()}else{this.isie=false}this.oConfiguration={};this.oCurrentDay=g_currentDateObject;this.monthsTextualRepresentation=g_l10n.MONTHS;this.lastPostedDay=null;this.initialZIndex=2;this.globalNumber=this.getUnUsedGlobalNumber();g_arrayOfUsedJsDatePickCals[this.globalNumber]=this;this.setConfiguration(a);this.makeCalendar()};JsDatePick.getCalInstanceById=function(a){return g_arrayOfUsedJsDatePickCals[parseInt(a,10)]};JsDatePick.getInternetExplorerVersion=function(){var c=-1,a,b;if(navigator.appName=="Microsoft Internet Explorer"){a=navigator.userAgent;b=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(b.exec(a)!=null){c=parseFloat(RegExp.$1)}return c}};JsDatePick.prototype.setC=function(a,b){if(this.isie&&this.iever>7){jQuery(a).attr("class",b)}else{a.className=b}};JsDatePick.prototype.getUnUsedGlobalNumber=function(){var a=Math.floor(Math.random()*1000);while(!this.isUnique_GlobalNumber(a)){a=Math.floor(Math.random()*1000)}return a};JsDatePick.prototype.isUnique_GlobalNumber=function(b){var a;for(a=0;a<g_arrayOfUsedJsDatePickCalsGlobalNumbers.length;a++){if(g_arrayOfUsedJsDatePickCalsGlobalNumbers[a]==b){return false}}return true};JsDatePick.prototype.addOnSelectedDelegate=function(a){if(typeof(a)=="function"){this.addonSelectedDelegate=a}return false};JsDatePick.prototype.setOnSelectedDelegate=function(a){if(typeof(a)=="function"){this.onSelectedDelegate=a;return true}return false};JsDatePick.prototype.executeOnSelectedDelegateIfExists=function(){if(typeof(this.onSelectedDelegate)=="function"){this.onSelectedDelegate()}if(typeof(this.addonSelectedDelegate)=="function"){this.addonSelectedDelegate()}};JsDatePick.prototype.setRepopulationDelegate=function(a){if(typeof(a)=="function"){this.repopulationDelegate=a;return true}return false};JsDatePick.prototype.setConfiguration=function(a){this.oConfiguration.isStripped=(a.isStripped!=null)?a.isStripped:false;this.oConfiguration.useMode=(a.useMode!=null)?a.useMode:1;this.oConfiguration.selectedDate=(a.selectedDate!=null)?a.selectedDate:null;this.oConfiguration.target=(a.target!=null)?a.target:null;this.oConfiguration.yearsRange=(a.yearsRange!=null)?a.yearsRange:[1971,2100];this.oConfiguration.yearButtons=(a.yearButtons!=null)?a.yearButtons:true;this.oConfiguration.monthButtons=(a.monthButtons!=null)?a.monthButtons:true;this.oConfiguration.limitToToday=(a.limitToToday!=null)?a.limitToToday:0;this.oConfiguration.field=(a.field!=null)?a.field:false;this.oConfiguration.cellColorScheme=(a.cellColorScheme!=null)?a.cellColorScheme:"ocean_blue";this.oConfiguration.dateFormat=(a.dateFormat!=null)?a.dateFormat:"%m-%d-%Y";this.oConfiguration.imgPath=(a.imgPath!=null)?a.imgPath:"img/";this.oConfiguration.weekStartDay=(a.weekStartDay!=null)?a.weekStartDay:1;this.oConfiguration.directionality=(a.directionality!=null)?a.directionality:"ltr";this.oConfiguration.animate=(a.animate!=null)?a.animate:true;this.selectedDayObject={};this.flag_DayMarkedBeforeRepopulation=false;this.flag_aDayWasSelected=false;this.lastMarkedDayObject=null;if(!this.oConfiguration.selectedDate){this.currentYear=this.oCurrentDay.year;this.currentMonth=this.oCurrentDay.month;this.currentDay=this.oCurrentDay.day}};JsDatePick.prototype.resizeCalendar=function(){this.leftWallStrechedElement.style.height="0px";this.rightWallStrechedElement.style.height="0px";var a=this.JsDatePickBox.offsetHeight,b=a-16;if(b<0){return}this.leftWallStrechedElement.style.height=b+"px";this.rightWallStrechedElement.style.height=b+"px";return true};JsDatePick.prototype.closeCalendar=function(){if(this.oConfiguration.animate===true){jQuery(this.JsDatePickBox).hide(500)}else{this.JsDatePickBox.style.display="none"}document.onclick=function(){}};JsDatePick.prototype.populateFieldWithSelectedDate=function(){jQuery("#"+this.oConfiguration.target).val(this.getSelectedDayFormatted());if(this.lastPickedDateObject){delete (this.lastPickedDateObject)}this.lastPickedDateObject={};this.lastPickedDateObject.day=this.selectedDayObject.day;this.lastPickedDateObject.month=this.selectedDayObject.month;this.lastPickedDateObject.year=this.selectedDayObject.year;this.closeCalendar()};JsDatePick.prototype.makeCalendar=function(){var j=document,e,a,b,k,g,h,f,o,i,m,n,l,c;e=j.createElement("div");a=j.createElement("div");b=j.createElement("div");this.setC(e,"JsDatePickBox");this.setC(a,"clearfix");this.setC(b,"jsDatePickCloseButton");b.setAttribute("globalNumber",this.globalNumber);b.onmouseover=function(){var d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.CLOSE);d.setC(this,"jsDatePickCloseButtonOver")};b.onmouseout=function(){var d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText("");d.setC(this,"jsDatePickCloseButton")};b.onmousedown=function(){var d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.CLOSE);d.setC(this,"jsDatePickCloseButtonDown")};b.onmouseup=function(){var d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText("");d.setC(this,"jsDatePickCloseButton");d.closeCalendar()};this.JsDatePickBox=e;k=j.createElement("div");g=j.createElement("div");h=j.createElement("div");f=j.createElement("div");this.setC(h,"topWall");this.setC(f,"bottomWall");if(this.isie&&this.iever==6){f.style.bottom="-2px"}o=j.createElement("div");i=j.createElement("div");m=j.createElement("div");this.setC(o,"leftTopCorner");this.setC(i,"leftBottomCorner");this.setC(m,"leftWall");this.leftWallStrechedElement=m;this.leftWall=k;this.rightWall=g;k.appendChild(o);k.appendChild(m);k.appendChild(i);o=j.createElement("div");i=j.createElement("div");m=j.createElement("div");this.setC(o,"rightTopCorner");this.setC(i,"rightBottomCorner");this.setC(m,"rightWall");this.rightWallStrechedElement=m;g.appendChild(o);g.appendChild(m);g.appendChild(i);if(this.oConfiguration.isStripped){this.setC(k,"hiddenBoxLeftWall");this.setC(g,"hiddenBoxRightWall")}else{this.setC(k,"boxLeftWall");this.setC(g,"boxRightWall")}e.appendChild(k);e.appendChild(this.getDOMCalendarStripped());e.appendChild(g);e.appendChild(a);if(!this.oConfiguration.isStripped){e.appendChild(b);e.appendChild(h);e.appendChild(f)}if(this.oConfiguration.useMode==2){if(this.oConfiguration.target!=false){if(typeof(jQuery("#"+this.oConfiguration.target))!=null){n=document.getElementById(this.oConfiguration.target);l=document.createElement("span");n.parentNode.replaceChild(l,n);l.appendChild(n);n.setAttribute("globalNumber",this.globalNumber);n.onclick=function(){JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")).showCalendar()};n.onfocus=function(){JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")).showCalendar()};jQuery(n).mouseout(function(){jQuery("*").not("JsDatePickBox").live("focus",function(){JsDatePick.getCalInstanceById(n.getAttribute("globalNumber")).closeCalendar()})});l.style.position="relative";this.initialZIndex++;e.style.zIndex=this.initialZIndex.toString();e.style.position="absolute";e.style.top="18px";e.style.left="0px";e.style.display="none";l.appendChild(e);c=new Function("g_arrayOfUsedJsDatePickCals["+this.globalNumber+"].populateFieldWithSelectedDate();");this.setOnSelectedDelegate(c)}else{alert(g_l10n.ERROR_3)}}}else{if(this.oConfiguration.target!=null){jQuery("#"+this.oConfiguration.target).append(e);jQuery("#"+this.oConfiguration.target).css("position","relative");e.style.position="absolute";e.style.top="0px";e.style.left="0px";this.resizeCalendar();this.executePopulationDelegateIfExists()}else{alert(g_l10n.ERROR_4)}}};JsDatePick.prototype.determineFieldDate=function(){var b,c,e,g,l,d,a,h,k,f=false,j=false;if(this.lastPickedDateObject){this.setSelectedDay({year:parseInt(this.lastPickedDateObject.year),month:parseInt(this.lastPickedDateObject.month,10),day:parseInt(this.lastPickedDateObject.day,10)})}else{b=jQuery("#"+this.oConfiguration.target);if(jQuery.trim(b.val()).length==0){this.unsetSelection();if(typeof(this.oConfiguration.selectedDate)=="object"&&this.oConfiguration.selectedDate){this.setSelectedDay({year:parseInt(this.oConfiguration.selectedDate.year),month:parseInt(this.oConfiguration.selectedDate.month,10),day:parseInt(this.oConfiguration.selectedDate.day,10)})}}else{if(jQuery.trim(b.val()).length>5){c=this.senseDivider(this.oConfiguration.dateFormat);e=this.oConfiguration.dateFormat;g=jQuery.trim(b.val()).split(c);l=e.trim().split(c);d=a=h=k=0;for(d=0;d<l.length;d++){switch(l[d]){case"%d":case"%j":a=d;break;case"%m":case"%n":k=d;break;case"%M":k=d;f=true;break;case"%F":k=d;j=true;break;case"%Y":case"%y":h=d}}if(f){for(d=0;d<12;d++){if(g_l10n.MONTHS[d].substr(0,3).toUpperCase()==g[k].toUpperCase()){k=d+1;break}}}else{if(j){for(d=0;d<12;d++){if(g_l10n.MONTHS[d].toLowerCase()==g[k].toLowerCase()){k=d+1;break}}}else{k=parseInt(g[k],10)}}this.setSelectedDay({year:parseInt(g[h],10),month:k,day:parseInt(g[a],10)})}else{this.unsetSelection();return}}}};JsDatePick.prototype.senseDivider=function(a){return a.replace("%d","").replace("%j","").replace("%m","").replace("%M","").replace("%n","").replace("%F","").replace("%Y","").replace("%y","").substr(0,1)};JsDatePick.prototype.showCalendar=function(){if(this.JsDatePickBox.style.display=="none"){this.determineFieldDate();this.JsDatePickBox.style.display="block";this.resizeCalendar();if(this.oConfiguration.animate===true){this.JsDatePickBox.style.display="none";jQuery(this.JsDatePickBox).show(500)}this.executePopulationDelegateIfExists();jQuery(this.JsDatePickBox).mouseover(function(){document.onclick=function(){}});jQuery(this.JsDatePickBox).attr("globalCalNumber",this.globalNumber);jQuery(this.JsDatePickBox).mouseout(function(){document.onclick=new Function("g_arrayOfUsedJsDatePickCals["+this.getAttribute("globalCalNumber")+"].closeCalendar();")})}else{return}};JsDatePick.prototype.isAvailable=function(c,a,b){if(c>this.oCurrentDay.year){return false}if(a>this.oCurrentDay.month&&c==this.oCurrentDay.year){return false}if(b>this.oCurrentDay.day&&a==this.oCurrentDay.month&&c==this.oCurrentDay.year){return false}return true};JsDatePick.prototype.getDOMCalendarStripped=function(){var h=document,e,i,b,a,f,c,g;e=h.createElement("div");if(this.oConfiguration.isStripped){this.setC(e,"boxMainStripped")}else{this.setC(e,"boxMain")}this.boxMain=e;i=h.createElement("div");b=h.createElement("div");a=h.createElement("div");f=h.createElement("div");c=h.createElement("div");g=h.createElement("div");this.setC(b,"clearfix");this.setC(g,"clearfix");this.setC(i,"boxMainInner");this.setC(a,"boxMainCellsContainer");this.setC(f,"tooltip");this.setC(c,"weekDaysRow");this.tooltip=f;e.appendChild(i);this.controlsBar=this.getDOMControlBar();this.makeDOMWeekDays(c);i.appendChild(this.controlsBar);i.appendChild(b);i.appendChild(f);i.appendChild(c);i.appendChild(a);i.appendChild(g);this.boxMainCellsContainer=a;this.populateMainBox(a);return e};JsDatePick.prototype.makeDOMWeekDays=function(a){var c=0,g=document,f=g_l10n.DAYS_3,e,b;for(c=this.oConfiguration.weekStartDay;c<7;c++){b=g.createElement("div");e=g.createTextNode(f[c]);this.setC(b,"weekDay");b.appendChild(e);a.appendChild(b)}if(this.oConfiguration.weekStartDay>0){for(c=0;c<this.oConfiguration.weekStartDay;c++){b=g.createElement("div");e=g.createTextNode(f[c]);this.setC(b,"weekDay");b.appendChild(e);a.appendChild(b)}}b.style.marginRight="0px"};JsDatePick.prototype.repopulateMainBox=function(){while(this.boxMainCellsContainer.firstChild){this.boxMainCellsContainer.removeChild(this.boxMainCellsContainer.firstChild)}this.populateMainBox(this.boxMainCellsContainer);this.resizeCalendar();this.executePopulationDelegateIfExists()};JsDatePick.prototype.executePopulationDelegateIfExists=function(){if(typeof(this.repopulationDelegate)=="function"){this.repopulationDelegate()}};JsDatePick.prototype.populateMainBox=function(h){var f=document,g,l,c=1,k=false,n=this.currentMonth-1,j,a,m,e,b;j=new Date(this.currentYear,n,1,1,0,0);a=j.getTime();this.flag_DayMarkedBeforeRepopulation=false;this.setControlBarText(this.monthsTextualRepresentation[n]+", "+this.currentYear);m=parseInt(j.getDay())-this.oConfiguration.weekStartDay;if(m<0){m=m+7}e=0;for(e=0;e<m;e++){g=f.createElement("div");this.setC(g,"skipDay");h.appendChild(g);if(c==7){c=1}else{c++}}while(j.getMonth()==n){k=false;g=f.createElement("div");if(this.lastPostedDay){if(this.lastPostedDay==j.getDate()){l=parseInt(this.lastPostedDay,10)+1}else{l=f.createTextNode(j.getDate())}}else{l=f.createTextNode(j.getDate())}g.appendChild(l);h.appendChild(g);g.setAttribute("globalNumber",this.globalNumber);if(c==7){if(this.oConfiguration.directionality=="ltr"){g.style.marginRight="0px"}else{g.style.marginLeft="0px"}}if(this.isToday(j)){g.setAttribute("isToday",1)}if(this.oConfiguration.limitToToday>=1){if(this.isAvailable(this.currentYear,this.currentMonth,parseInt(j.getDate()+1))){k=true;g.setAttribute("isJsDatePickDisabled",1)}}else{if(this.oConfiguration.limitToToday<=-1){if(!this.isAvailable(this.currentYear,this.currentMonth,parseInt(j.getDate()))){k=true;g.setAttribute("isJsDatePickDisabled",1)}}}g.onmouseover=function(){var d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")),i;i=d.getCurrentColorScheme();if(parseInt(this.getAttribute("isSelected"))==1){return}if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}if(parseInt(this.getAttribute("isToday"))==1){d.setC(this,"dayOverToday");this.style.background="url("+d.oConfiguration.imgPath+i+"_dayOver.gif) left top no-repeat"}else{d.setC(this,"dayOver");this.style.background="url("+d.oConfiguration.imgPath+i+"_dayOver.gif) left top no-repeat"}};g.onmouseout=function(){var d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")),i;i=d.getCurrentColorScheme();if(parseInt(this.getAttribute("isSelected"))==1){return}if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}if(parseInt(this.getAttribute("isToday"))==1){d.setC(this,"dayNormalToday");this.style.background="url("+d.oConfiguration.imgPath+i+"_dayNormal.gif) left top no-repeat"}else{d.setC(this,"dayNormal");this.style.background="url("+d.oConfiguration.imgPath+i+"_dayNormal.gif) left top no-repeat"}};g.onmousedown=function(){var d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")),i;i=d.getCurrentColorScheme();if(parseInt(this.getAttribute("isSelected"))==1){return}if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}if(parseInt(this.getAttribute("isToday"))==1){d.setC(this,"dayDownToday");this.style.background="url("+d.oConfiguration.imgPath+i+"_dayDown.gif) left top no-repeat"}else{d.setC(this,"dayDown");this.style.background="url("+d.oConfiguration.imgPath+i+"_dayDown.gif) left top no-repeat"}};g.onmouseup=function(){var d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber")),i;i=d.getCurrentColorScheme();if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}if(parseInt(this.getAttribute("isToday"))==1){d.setC(this,"dayNormalToday");this.style.background="url("+d.oConfiguration.imgPath+i+"_dayNormal.gif) left top no-repeat"}else{d.setC(this,"dayNormal");this.style.background="url("+d.oConfiguration.imgPath+i+"_dayNormal.gif) left top no-repeat"}d.setDaySelection(this);d.executeOnSelectedDelegateIfExists()};if(this.isSelectedDay(j.getDate())){g.setAttribute("isSelected",1);this.flag_DayMarkedBeforeRepopulation=true;this.lastMarkedDayObject=g;if(parseInt(g.getAttribute("isToday"))==1){this.setC(g,"dayDownToday");g.style.background="url("+this.oConfiguration.imgPath+this.oConfiguration.cellColorScheme+"_dayDown.gif) left top no-repeat"}else{this.setC(g,"dayDown");g.style.background="url("+this.oConfiguration.imgPath+this.oConfiguration.cellColorScheme+"_dayDown.gif) left top no-repeat"}}else{b=this.getCurrentColorScheme();if(parseInt(g.getAttribute("isToday"))==1){if(k){this.setC(g,"dayDisabled");g.style.background="url("+this.oConfiguration.imgPath+this.oConfiguration.cellColorScheme+"_dayNormal.gif) left top no-repeat"}else{this.setC(g,"dayNormalToday");g.style.background="url("+this.oConfiguration.imgPath+this.oConfiguration.cellColorScheme+"_dayNormal.gif) left top no-repeat"}}else{if(k){this.setC(g,"dayDisabled");g.style.background="url("+this.oConfiguration.imgPath+this.oConfiguration.cellColorScheme+"_dayNormal.gif) left top no-repeat"}else{this.setC(g,"dayNormal");g.style.background="url("+this.oConfiguration.imgPath+this.oConfiguration.cellColorScheme+"_dayNormal.gif) left top no-repeat"}}}if(c==7){c=1}else{c++}a+=86400000;j.setTime(a)}this.lastPostedDay=null;return h};JsDatePick.prototype.unsetSelection=function(){this.flag_aDayWasSelected=false;this.selectedDayObject={};this.repopulateMainBox()};JsDatePick.prototype.setSelectedDay=function(a){this.flag_aDayWasSelected=true;this.selectedDayObject.day=parseInt(a.day,10);this.selectedDayObject.month=parseInt(a.month,10);this.selectedDayObject.year=parseInt(a.year);this.currentMonth=a.month;this.currentYear=a.year;this.repopulateMainBox()};JsDatePick.prototype.isSelectedDay=function(a){if(this.flag_aDayWasSelected){if(parseInt(a)==this.selectedDayObject.day&&this.currentMonth==this.selectedDayObject.month&&this.currentYear==this.selectedDayObject.year){return true}else{return false}}return false};JsDatePick.prototype.getSelectedDay=function(){if(this.flag_aDayWasSelected){return this.selectedDayObject}else{return false}};JsDatePick.prototype.getSelectedDayFormatted=function(){if(this.flag_aDayWasSelected){var a=this.oConfiguration.dateFormat;a=a.replace("%d",this.selectedDayObject.day.toString().strpad());a=a.replace("%j",this.selectedDayObject.day);a=a.replace("%m",this.selectedDayObject.month.toString().strpad());a=a.replace("%M",g_l10n.MONTHS[this.selectedDayObject.month-1].substr(0,3).toUpperCase());a=a.replace("%n",this.selectedDayObject.month);a=a.replace("%F",g_l10n.MONTHS[this.selectedDayObject.month-1]);a=a.replace("%Y",this.selectedDayObject.year);a=a.replace("%y",this.selectedDayObject.year.toString().substr(2,2));return a}else{return false}};JsDatePick.prototype.setDaySelection=function(a){var b=this.getCurrentColorScheme();if(this.flag_DayMarkedBeforeRepopulation){jQuery(this.lastMarkedDayObject).attr("isSelected",0);if(parseInt(this.lastMarkedDayObject.getAttribute("isToday"))==1){this.setC(this.lastMarkedDayObject,"dayNormalToday");this.lastMarkedDayObject.style.background="url("+this.oConfiguration.imgPath+b+"_dayNormal.gif) left top no-repeat"}else{this.setC(this.lastMarkedDayObject,"dayNormal");this.lastMarkedDayObject.style.background="url("+this.oConfiguration.imgPath+b+"_dayNormal.gif) left top no-repeat"}}this.flag_aDayWasSelected=true;this.selectedDayObject.year=this.currentYear;this.selectedDayObject.month=this.currentMonth;this.selectedDayObject.day=parseInt(a.innerHTML);this.flag_DayMarkedBeforeRepopulation=true;this.lastMarkedDayObject=a;jQuery(a).attr("isSelected",1);if(parseInt(a.getAttribute("isToday"))==1){this.setC(a,"dayDownToday");a.style.background="url("+this.oConfiguration.imgPath+b+"_dayDown.gif) left top no-repeat"}else{this.setC(a,"dayDown");a.style.background="url("+this.oConfiguration.imgPath+b+"_dayDown.gif) left top no-repeat"}};JsDatePick.prototype.isToday=function(a){var b=this.oCurrentDay.month-1;if(a.getDate()==this.oCurrentDay.day&&a.getMonth()==b&&a.getFullYear()==this.oCurrentDay.year){return true}return false};JsDatePick.prototype.setControlBarText=function(a){var b=document.createTextNode(a);jQuery(this.controlsBarTextCell).empty();this.controlsBarTextCell.appendChild(b)};JsDatePick.prototype.setTooltipText=function(a){jQuery(this.tooltip).empty();var b=document.createTextNode(a);this.tooltip.appendChild(b)};JsDatePick.prototype.moveForwardOneYear=function(){var a=this.currentYear+1;if(a<=parseInt(this.oConfiguration.yearsRange[1])){this.currentYear++;this.repopulateMainBox();return true}else{return false}};JsDatePick.prototype.moveBackOneYear=function(){var a=this.currentYear-1;if(a>=parseInt(this.oConfiguration.yearsRange[0])){this.currentYear--;this.repopulateMainBox();return true}else{return false}};JsDatePick.prototype.moveForwardOneMonth=function(){if(this.currentMonth<12){this.currentMonth++}else{if(this.moveForwardOneYear()){this.currentMonth=1}else{this.currentMonth=12}}this.repopulateMainBox()};JsDatePick.prototype.moveBackOneMonth=function(){if(this.currentMonth>1){this.currentMonth--}else{if(this.moveBackOneYear()){this.currentMonth=12}else{this.currentMonth=1}}this.repopulateMainBox()};JsDatePick.prototype.getCurrentColorScheme=function(){return this.oConfiguration.cellColorScheme};JsDatePick.prototype.getDOMControlBar=function(){var h=document,c,f,g,b,a,e;c=h.createElement("div");f=h.createElement("div");g=h.createElement("div");b=h.createElement("div");a=h.createElement("div");e=h.createElement("div");this.setC(c,"controlsBar");this.setC(f,"monthForwardButton");this.setC(g,"monthBackwardButton");this.setC(b,"yearForwardButton");this.setC(a,"yearBackwardButton");this.setC(e,"controlsBarText");jQuery(c).attr("globalNumber",this.globalNumber);if(this.oConfiguration.monthButtons){jQuery(f).attr("globalNumber",this.globalNumber);jQuery(g).attr("globalNumber",this.globalNumber)}if(this.oConfiguration.yearButtons){jQuery(a).attr("globalNumber",this.globalNumber);jQuery(b).attr("globalNumber",this.globalNumber)}this.controlsBarTextCell=e;if(this.oConfiguration.monthButtons){c.appendChild(f);c.appendChild(g)}if(this.oConfiguration.yearButtons){c.appendChild(b);c.appendChild(a)}c.appendChild(e);f.onmouseover=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}d=this.parentNode;while(d.className!="controlsBar"){d=d.parentNode}i=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));i.setTooltipText(g_l10n.MONTH_FWD);i.setC(this,"monthForwardButtonOver")};f.onmouseout=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText("");d.setC(this,"monthForwardButton")};f.onmousedown=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}d=this.parentNode;while(d.className!="controlsBar"){d=d.parentNode}i=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));i.setTooltipText(g_l10n.MONTH_FWD);i.setC(this,"monthForwardButtonDown")};f.onmouseup=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.MONTH_FWD);d.setC(this,"monthForwardButton");d.moveForwardOneMonth()};jQuery(f).click(function(d){d.preventDefault()}).focus(function(d){d.preventDefault()});g.onmouseover=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.MONTH_BCK);d.setC(this,"monthBackwardButtonOver")};g.onmouseout=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText("");d.setC(this,"monthBackwardButton")};g.onmousedown=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.MONTH_BCK);d.setC(this,"monthBackwardButtonDown")};g.onmouseup=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.MONTH_BCK);d.setC(this,"monthBackwardButton");d.moveBackOneMonth()};b.onmouseover=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.YEAR_FWD);d.setC(this,"yearForwardButtonOver")};b.onmouseout=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText("");d.setC(this,"yearForwardButton")};b.onmousedown=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.YEAR_FWD);d.setC(this,"yearForwardButtonDown")};b.onmouseup=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.YEAR_FWD);d.setC(this,"yearForwardButton");d.moveForwardOneYear()};a.onmouseover=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.YEAR_BCK);d.setC(this,"yearBackwardButtonOver")};a.onmouseout=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText("");d.setC(this,"yearBackwardButton")};a.onmousedown=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.YEAR_BCK);d.setC(this,"yearBackwardButtonDown")};a.onmouseup=function(){var i,d;if(parseInt(this.getAttribute("isJsDatePickDisabled"))==1){return}i=this.parentNode;while(i.className!="controlsBar"){i=i.parentNode}d=JsDatePick.getCalInstanceById(this.getAttribute("globalNumber"));d.setTooltipText(g_l10n.YEAR_BCK);d.setC(this,"yearBackwardButton");d.moveBackOneYear()};return c};
|
|
languages/contact-form-7-datepicker-it_IT.mo
DELETED
Binary file
|
languages/contact-form-7-datepicker-it_IT.po
DELETED
@@ -1,314 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: contact-form-7-datepicker\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2011-06-13 11:24+0200\n"
|
6 |
-
"PO-Revision-Date: 2011-07-05 17:29+0100\n"
|
7 |
-
"Last-Translator: Andrea <stardamage@gmail.com>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: \n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
16 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
17 |
-
"X-Poedit-Language: Italian\n"
|
18 |
-
"X-Poedit-Country: ITALY\n"
|
19 |
-
|
20 |
-
#: ../contact-form-7-datepicker.php:110
|
21 |
-
msgid "Datepicker Settings"
|
22 |
-
msgstr "Configurazione di Datepicker"
|
23 |
-
|
24 |
-
#: ../contact-form-7-datepicker.php:192
|
25 |
-
#: ../contact-form-7-datepicker.php:300
|
26 |
-
msgid "Today and future"
|
27 |
-
msgstr "Oggi e date future"
|
28 |
-
|
29 |
-
#: ../contact-form-7-datepicker.php:193
|
30 |
-
#: ../contact-form-7-datepicker.php:302
|
31 |
-
msgid "Today and past"
|
32 |
-
msgstr "Oggi e date passate"
|
33 |
-
|
34 |
-
#: ../contact-form-7-datepicker.php:194
|
35 |
-
msgid "No limit"
|
36 |
-
msgstr "Nessun limite"
|
37 |
-
|
38 |
-
#: ../contact-form-7-datepicker.php:197
|
39 |
-
#: ../contact-form-7-datepicker.php:274
|
40 |
-
#: ../contact-form-7-datepicker.php:414
|
41 |
-
msgid "true"
|
42 |
-
msgstr "vero"
|
43 |
-
|
44 |
-
#: ../contact-form-7-datepicker.php:198
|
45 |
-
msgid "false"
|
46 |
-
msgstr "falso"
|
47 |
-
|
48 |
-
#: ../contact-form-7-datepicker.php:202
|
49 |
-
#: ../contact-form-7-datepicker.php:328
|
50 |
-
msgid "Sunday"
|
51 |
-
msgstr "domenica"
|
52 |
-
|
53 |
-
#: ../contact-form-7-datepicker.php:203
|
54 |
-
msgid "Monday"
|
55 |
-
msgstr "lunedì"
|
56 |
-
|
57 |
-
#: ../contact-form-7-datepicker.php:206
|
58 |
-
#: ../contact-form-7-datepicker.php:363
|
59 |
-
msgid "Left to right"
|
60 |
-
msgstr "Da sinistra a destra"
|
61 |
-
|
62 |
-
#: ../contact-form-7-datepicker.php:207
|
63 |
-
msgid "Right to left"
|
64 |
-
msgstr "Da destra a sinistra"
|
65 |
-
|
66 |
-
#: ../contact-form-7-datepicker.php:214
|
67 |
-
msgid ""
|
68 |
-
"<p>This plugin implements a new <strong>[date]</strong> tag in <a href=\"http://wordpress.org/extend/plugins/contact-form-7/\">Contact Form 7</a> \n"
|
69 |
-
"\t\tthat adds a date field to a form. When clicking the field a calendar pops up enabling your site visitors to easily select any date.<br />\n"
|
70 |
-
"\t\tTo use it simply insert the <strong>[date your-field-name]</strong> or <strong>[date* your-requierd-field-name]</strong> if you want it to be mandatory,\n"
|
71 |
-
"\t\tin your Contact Form 7 edit section.</p>"
|
72 |
-
msgstr ""
|
73 |
-
"<p>Questo plugin implementa un nuovo tag <strong>[date]</strong> in <a href=\"http://wordpress.org/extend/plugins/contact-form-7/\">Contact Form 7</a> \n"
|
74 |
-
"\t\tche aggiunge un campo data a un form. Cliccando sul campo compare un calendaro che permette ai visitatori del tuo sito di scegliere facilmente qualsiasi data.<br />\n"
|
75 |
-
"\t\tPer utilizzarlo è sufficiente inserire <strong>[date nome-del-tuo-campo]</strong> o <strong>[date* nome-del-tuo-campo-obbligatorio]</strong> se vuoi che sia obbligatorio compilarlo,\n"
|
76 |
-
"\t\tnella sezione di modifica del tuo Contact Form 7.</p>"
|
77 |
-
|
78 |
-
#: ../contact-form-7-datepicker.php:223
|
79 |
-
msgid "Color scheme"
|
80 |
-
msgstr "Schema dei colori"
|
81 |
-
|
82 |
-
#: ../contact-form-7-datepicker.php:247
|
83 |
-
msgid "Use Mode"
|
84 |
-
msgstr "Modo d'uso"
|
85 |
-
|
86 |
-
#: ../contact-form-7-datepicker.php:262
|
87 |
-
msgid ""
|
88 |
-
"<p>1 – The calendar's HTML will be directly appended to the field supplied by target<br />\n"
|
89 |
-
"\t\t\t\t\t\t\t2 – The calendar will appear as a popup when the field with the id supplied in target is clicked.</p>"
|
90 |
-
msgstr ""
|
91 |
-
"<p>1 – Il codice HTML del calendario sarà aggiunto direttamente in coda al campo fornito dal target<br />\n"
|
92 |
-
"\t\t\t\t\t\t\t2 – Il calendario appare come popup quando il campo con l'id fornito nel target è cliccato.</p>"
|
93 |
-
|
94 |
-
#: ../contact-form-7-datepicker.php:269
|
95 |
-
msgid "Sripped"
|
96 |
-
msgstr "Sripped"
|
97 |
-
|
98 |
-
#: ../contact-form-7-datepicker.php:289
|
99 |
-
msgid "<p>When set to true the calendar appears without the visual design - usually used with 'Use Mod' 1.</p>"
|
100 |
-
msgstr "<p>Quando settato a vero il calendario appare senza design - è solitamente utilizzato in combinazione col 'Modo d'uso' 1.</p>"
|
101 |
-
|
102 |
-
#: ../contact-form-7-datepicker.php:295
|
103 |
-
msgid "Limit Dates To"
|
104 |
-
msgstr "Limita le date a"
|
105 |
-
|
106 |
-
#: ../contact-form-7-datepicker.php:317
|
107 |
-
msgid "<p>Enables you to limit the possible picking dates according to the current date.</p>"
|
108 |
-
msgstr "<p>Permette di limitare la possibile scelta delle date secondo la data corrente.</p>"
|
109 |
-
|
110 |
-
#: ../contact-form-7-datepicker.php:323
|
111 |
-
msgid "Week Start Day"
|
112 |
-
msgstr "La settimana inizia"
|
113 |
-
|
114 |
-
#: ../contact-form-7-datepicker.php:348
|
115 |
-
msgid "Years Range"
|
116 |
-
msgstr "Intervallo anni"
|
117 |
-
|
118 |
-
#: ../contact-form-7-datepicker.php:358
|
119 |
-
msgid "Text Direction"
|
120 |
-
msgstr "Direzione del testo"
|
121 |
-
|
122 |
-
#: ../contact-form-7-datepicker.php:383
|
123 |
-
msgid "Controls"
|
124 |
-
msgstr "Controlli"
|
125 |
-
|
126 |
-
#: ../contact-form-7-datepicker.php:392
|
127 |
-
msgid "Year Controls"
|
128 |
-
msgstr "Controlli degli anni"
|
129 |
-
|
130 |
-
#: ../contact-form-7-datepicker.php:400
|
131 |
-
msgid "Month Controls"
|
132 |
-
msgstr "Controlli dei mesi"
|
133 |
-
|
134 |
-
#: ../contact-form-7-datepicker.php:403
|
135 |
-
msgid "<p>You can select here what controls would you like to display on the calendar.</p>"
|
136 |
-
msgstr "<p>Puoi scegliere qui quali controlli vuoi che siano mostrati sul calendario"
|
137 |
-
|
138 |
-
#: ../contact-form-7-datepicker.php:409
|
139 |
-
msgid "Animate"
|
140 |
-
msgstr "Animazione"
|
141 |
-
|
142 |
-
#: ../contact-form-7-datepicker.php:429
|
143 |
-
msgid "<p>Animation on display.</p>"
|
144 |
-
msgstr "<p>Animazione quando mostrato.</p>"
|
145 |
-
|
146 |
-
#: ../contact-form-7-datepicker.php:435
|
147 |
-
msgid "Date Format"
|
148 |
-
msgstr "Formato Data"
|
149 |
-
|
150 |
-
#: ../contact-form-7-datepicker.php:441
|
151 |
-
msgid ""
|
152 |
-
"<p>Possible values to use in the date format:<br />\n"
|
153 |
-
"<br />\n"
|
154 |
-
"%d - Day of the month, 2 digits with leading zeros<br />\n"
|
155 |
-
"%j - Day of the month without leading zeros<br />\n"
|
156 |
-
"%m - Numeric representation of a month, with leading zeros<br />\n"
|
157 |
-
"%M - A short textual representation of a month, three letters<br />\n"
|
158 |
-
"%n - Numeric representation of a month, without leading zeros<br />\n"
|
159 |
-
"%F - A full textual representation of a month, such as January or March<br />\n"
|
160 |
-
"%Y - A full numeric representation of a year, 4 digits<br />\n"
|
161 |
-
"%y - A two digit representation of a year<br />\n"
|
162 |
-
"<br />\n"
|
163 |
-
"You can of course put whatever divider you want between them.<br /></p>"
|
164 |
-
msgstr ""
|
165 |
-
"<p>Valori possibili per il formato della data:<br />\n"
|
166 |
-
"<br />\n"
|
167 |
-
"%d - Giorno del mese, 2 caratteri con zeri in testa<br />\n"
|
168 |
-
"%j - Giorno del mese senza zeri in testa<br />\n"
|
169 |
-
"%m - Rappresentazione numerica di un mese, con zeri in testa<br />\n"
|
170 |
-
"%M - Rappresentazione testuale corta del mese, tre lettere<br />\n"
|
171 |
-
"%n - Rappresentazione numerica di un mese, senza zeri in testa<br />\n"
|
172 |
-
"%F - Rappresentazione testuale completa di un mese, ad esempio Gennaio o Marzo<br />\n"
|
173 |
-
"%Y - Rappresentazione numerica completa di un anno, 4 cifre<br />\n"
|
174 |
-
"%y - Rappresentazione a due cifre di un anno<br />\n"
|
175 |
-
"<br />\n"
|
176 |
-
"Puoi ovviamente scegliere qualsiasi carattere per dividere i valori.<br /></p>"
|
177 |
-
|
178 |
-
#: ../contact-form-7-datepicker.php:461
|
179 |
-
msgid "Save Setting"
|
180 |
-
msgstr "Salva Impostazioni"
|
181 |
-
|
182 |
-
#: ../contact-form-7-datepicker.php:650
|
183 |
-
msgid "January"
|
184 |
-
msgstr "Gennaio"
|
185 |
-
|
186 |
-
#: ../contact-form-7-datepicker.php:651
|
187 |
-
msgid "February"
|
188 |
-
msgstr "Febbraio"
|
189 |
-
|
190 |
-
#: ../contact-form-7-datepicker.php:652
|
191 |
-
msgid "March"
|
192 |
-
msgstr "Marzo"
|
193 |
-
|
194 |
-
#: ../contact-form-7-datepicker.php:653
|
195 |
-
msgid "April"
|
196 |
-
msgstr "Aprile"
|
197 |
-
|
198 |
-
#: ../contact-form-7-datepicker.php:654
|
199 |
-
msgid "May"
|
200 |
-
msgstr "Maggio"
|
201 |
-
|
202 |
-
#: ../contact-form-7-datepicker.php:655
|
203 |
-
msgid "June"
|
204 |
-
msgstr "Giugno"
|
205 |
-
|
206 |
-
#: ../contact-form-7-datepicker.php:656
|
207 |
-
msgid "July"
|
208 |
-
msgstr "Luglio"
|
209 |
-
|
210 |
-
#: ../contact-form-7-datepicker.php:657
|
211 |
-
msgid "August"
|
212 |
-
msgstr "Agosto"
|
213 |
-
|
214 |
-
#: ../contact-form-7-datepicker.php:658
|
215 |
-
msgid "September"
|
216 |
-
msgstr "Settembre"
|
217 |
-
|
218 |
-
#: ../contact-form-7-datepicker.php:659
|
219 |
-
msgid "October"
|
220 |
-
msgstr "Ottobre"
|
221 |
-
|
222 |
-
#: ../contact-form-7-datepicker.php:660
|
223 |
-
msgid "November"
|
224 |
-
msgstr "Novembre"
|
225 |
-
|
226 |
-
#: ../contact-form-7-datepicker.php:661
|
227 |
-
msgid "December"
|
228 |
-
msgstr "Dicembre"
|
229 |
-
|
230 |
-
#: ../contact-form-7-datepicker.php:664
|
231 |
-
msgid "Sun"
|
232 |
-
msgstr "Dom"
|
233 |
-
|
234 |
-
#: ../contact-form-7-datepicker.php:665
|
235 |
-
msgid "Mon"
|
236 |
-
msgstr "Lun"
|
237 |
-
|
238 |
-
#: ../contact-form-7-datepicker.php:666
|
239 |
-
msgid "Tue"
|
240 |
-
msgstr "Mar"
|
241 |
-
|
242 |
-
#: ../contact-form-7-datepicker.php:667
|
243 |
-
msgid "Wed"
|
244 |
-
msgstr "Mer"
|
245 |
-
|
246 |
-
#: ../contact-form-7-datepicker.php:668
|
247 |
-
msgid "Thu"
|
248 |
-
msgstr "Gio"
|
249 |
-
|
250 |
-
#: ../contact-form-7-datepicker.php:669
|
251 |
-
msgid "Fri"
|
252 |
-
msgstr "Ven"
|
253 |
-
|
254 |
-
#: ../contact-form-7-datepicker.php:670
|
255 |
-
msgid "Sat"
|
256 |
-
msgstr "Sab"
|
257 |
-
|
258 |
-
#: ../contact-form-7-datepicker.php:672
|
259 |
-
msgid "Move a month forward"
|
260 |
-
msgstr "Sposta un mese in avanti"
|
261 |
-
|
262 |
-
#: ../contact-form-7-datepicker.php:673
|
263 |
-
msgid "Move a month backward"
|
264 |
-
msgstr "Sposta un mese indietro"
|
265 |
-
|
266 |
-
#: ../contact-form-7-datepicker.php:674
|
267 |
-
msgid "Move a year forward"
|
268 |
-
msgstr "Sposta un anno in avanti"
|
269 |
-
|
270 |
-
#: ../contact-form-7-datepicker.php:675
|
271 |
-
msgid "Move a year backward"
|
272 |
-
msgstr "Sposta un anno indietro"
|
273 |
-
|
274 |
-
#: ../contact-form-7-datepicker.php:676
|
275 |
-
msgid "Close the calendar"
|
276 |
-
msgstr "Chiudi il calendario"
|
277 |
-
|
278 |
-
#: ../contact-form-7-datepicker.php:677
|
279 |
-
#: ../contact-form-7-datepicker.php:678
|
280 |
-
msgid "Date object invalid!"
|
281 |
-
msgstr "Oggetto data invalido!"
|
282 |
-
|
283 |
-
#: ../contact-form-7-datepicker.php:679
|
284 |
-
#: ../contact-form-7-datepicker.php:680
|
285 |
-
msgid "Target invalid!"
|
286 |
-
msgstr "Target invalido!"
|
287 |
-
|
288 |
-
#: ../contact-form-7-datepicker.php:706
|
289 |
-
msgid "Date field"
|
290 |
-
msgstr "Campo data"
|
291 |
-
|
292 |
-
#: ../contact-form-7-datepicker.php:733
|
293 |
-
msgid "Required field?"
|
294 |
-
msgstr "Campo obbligatorio?"
|
295 |
-
|
296 |
-
#: ../contact-form-7-datepicker.php:738
|
297 |
-
msgid "Name"
|
298 |
-
msgstr "Nome"
|
299 |
-
|
300 |
-
#: ../contact-form-7-datepicker.php:747
|
301 |
-
#: ../contact-form-7-datepicker.php:752
|
302 |
-
#: ../contact-form-7-datepicker.php:759
|
303 |
-
#: ../contact-form-7-datepicker.php:764
|
304 |
-
msgid "optional"
|
305 |
-
msgstr "Opzionale"
|
306 |
-
|
307 |
-
#: ../contact-form-7-datepicker.php:771
|
308 |
-
msgid "Copy this code and paste it into the form left."
|
309 |
-
msgstr "Copia questo codice e incollalo nel form a sinistra."
|
310 |
-
|
311 |
-
#: ../contact-form-7-datepicker.php:775
|
312 |
-
msgid "And, put this code into the Mail fields below."
|
313 |
-
msgstr "E, inserisci questo codice nei campi Mail sottostanti."
|
314 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/contact-form-7-datepicker-nl_NL.mo
DELETED
Binary file
|
languages/contact-form-7-datepicker-ro_RO.mo
DELETED
Binary file
|
languages/contact-form-7-datepicker-ro_RO.po
DELETED
@@ -1,323 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: contact-form-7-datepicker\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2011-07-29 19:02+0200\n"
|
6 |
-
"PO-Revision-Date: 2011-07-29 19:04+0200\n"
|
7 |
-
"Last-Translator: Aurel Canciu <aurelcanciu@gmail.com>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: \n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
16 |
-
"X-Poedit-Language: English\n"
|
17 |
-
"X-Poedit-SearchPath-0: /home/relu/public_html/wordpress/wp-content/plugins/contact-form-7-datepicker\n"
|
18 |
-
|
19 |
-
#: ../contact-form-7-datepicker.php:121
|
20 |
-
msgid "Datepicker Settings"
|
21 |
-
msgstr "Setări Calendar"
|
22 |
-
|
23 |
-
#: ../contact-form-7-datepicker.php:215
|
24 |
-
#: ../contact-form-7-datepicker.php:323
|
25 |
-
msgid "Today and future"
|
26 |
-
msgstr "Astăzi și viitor"
|
27 |
-
|
28 |
-
#: ../contact-form-7-datepicker.php:216
|
29 |
-
#: ../contact-form-7-datepicker.php:325
|
30 |
-
msgid "Today and past"
|
31 |
-
msgstr "Astăzi și trecut"
|
32 |
-
|
33 |
-
#: ../contact-form-7-datepicker.php:217
|
34 |
-
msgid "No limit"
|
35 |
-
msgstr "Fără limită"
|
36 |
-
|
37 |
-
#: ../contact-form-7-datepicker.php:220
|
38 |
-
#: ../contact-form-7-datepicker.php:297
|
39 |
-
#: ../contact-form-7-datepicker.php:451
|
40 |
-
msgid "true"
|
41 |
-
msgstr "adevărat"
|
42 |
-
|
43 |
-
#: ../contact-form-7-datepicker.php:221
|
44 |
-
msgid "false"
|
45 |
-
msgstr "fals"
|
46 |
-
|
47 |
-
#: ../contact-form-7-datepicker.php:225
|
48 |
-
#: ../contact-form-7-datepicker.php:351
|
49 |
-
msgid "Sunday"
|
50 |
-
msgstr "Duminică"
|
51 |
-
|
52 |
-
#: ../contact-form-7-datepicker.php:226
|
53 |
-
msgid "Monday"
|
54 |
-
msgstr "Luni"
|
55 |
-
|
56 |
-
#: ../contact-form-7-datepicker.php:229
|
57 |
-
#: ../contact-form-7-datepicker.php:386
|
58 |
-
msgid "Left to right"
|
59 |
-
msgstr "Stânga spre dreapta"
|
60 |
-
|
61 |
-
#: ../contact-form-7-datepicker.php:230
|
62 |
-
msgid "Right to left"
|
63 |
-
msgstr "Dreapta spre stânga"
|
64 |
-
|
65 |
-
#: ../contact-form-7-datepicker.php:237
|
66 |
-
msgid ""
|
67 |
-
"<p>This plugin implements a new <strong>[date]</strong> tag in <a href=\"http://wordpress.org/extend/plugins/contact-form-7/\">Contact Form 7</a> \n"
|
68 |
-
"\t\tthat adds a date field to a form. When clicking the field a calendar pops up enabling your site visitors to easily select any date.<br />\n"
|
69 |
-
"\t\tTo use it simply insert the <strong>[date your-field-name]</strong> or <strong>[date* your-requierd-field-name]</strong> if you want it to be mandatory,\n"
|
70 |
-
"\t\tin your Contact Form 7 edit section.</p>"
|
71 |
-
msgstr ""
|
72 |
-
"<p>Acest modul implementează o nouă etichetă <strong>[date]</strong> în <a href=\"http://wordpress.org/extend/plugins/contact-form-7/\">Contact Form 7</a> \n"
|
73 |
-
"\t\tcare adaugă un câmp dată formularului dumneavoastră. Când faceți click pe câmpul respectiv, apare un calendar care permite vizitatorilor site-ului să selecteze cu ușurință orice dată.<br />\n"
|
74 |
-
"\t\tPentru a-l folosi, introduceți eticheta <strong>[date numele-câmpului]</strong> sau <strong>[date* numele-câmpului-necesar]</strong> dacă doriți să fie obligatoriu,\n"
|
75 |
-
"\t\tîn zona de editare a Contact Form 7.</p>"
|
76 |
-
|
77 |
-
#: ../contact-form-7-datepicker.php:246
|
78 |
-
msgid "Color scheme"
|
79 |
-
msgstr "Schemă de culori"
|
80 |
-
|
81 |
-
#: ../contact-form-7-datepicker.php:270
|
82 |
-
msgid "Use Mode"
|
83 |
-
msgstr "Mod de utilizare"
|
84 |
-
|
85 |
-
#: ../contact-form-7-datepicker.php:285
|
86 |
-
msgid ""
|
87 |
-
"<p>1 – The calendar's HTML will be directly appended to the field supplied by target<br />\n"
|
88 |
-
"\t\t\t\t\t\t\t2 – The calendar will appear as a popup when the field with the id supplied in target is clicked.</p>"
|
89 |
-
msgstr ""
|
90 |
-
"<p>1 – Codul HTML al calendarului va fi atașat la câmpul text specificat de țintă<br />\n"
|
91 |
-
"\t\t\t\t\t\t\t2 – Calendarul va apărea ca și un popup când câmpul cu id-ul specificat ca țintă este activat.</p>"
|
92 |
-
|
93 |
-
#: ../contact-form-7-datepicker.php:292
|
94 |
-
msgid "Sripped"
|
95 |
-
msgstr "Fără decor"
|
96 |
-
|
97 |
-
#: ../contact-form-7-datepicker.php:312
|
98 |
-
msgid "<p>When set to true the calendar appears without the visual design - usually used with 'Use Mod' 1.</p>"
|
99 |
-
msgstr "<p>Când este setat ca și adevărat, calendarul apare fără design vizual - de obicei este folosit cu 'Modul de utilizare' 1.</p>"
|
100 |
-
|
101 |
-
#: ../contact-form-7-datepicker.php:318
|
102 |
-
msgid "Limit Dates To"
|
103 |
-
msgstr "Limitează datele la"
|
104 |
-
|
105 |
-
#: ../contact-form-7-datepicker.php:340
|
106 |
-
msgid "<p>Enables you to limit the possible picking dates according to the current date.</p>"
|
107 |
-
msgstr "<p>Oferă posibilitatea de a limita datele care pot fi selectate în funcție de data curentă.</p>"
|
108 |
-
|
109 |
-
#: ../contact-form-7-datepicker.php:346
|
110 |
-
msgid "Week Start Day"
|
111 |
-
msgstr "Prima zi a săptămânii"
|
112 |
-
|
113 |
-
#: ../contact-form-7-datepicker.php:371
|
114 |
-
msgid "Years Range"
|
115 |
-
msgstr "Interval ani"
|
116 |
-
|
117 |
-
#: ../contact-form-7-datepicker.php:381
|
118 |
-
msgid "Text Direction"
|
119 |
-
msgstr "Direcție text"
|
120 |
-
|
121 |
-
#: ../contact-form-7-datepicker.php:406
|
122 |
-
msgid "Controls"
|
123 |
-
msgstr "Controale"
|
124 |
-
|
125 |
-
#: ../contact-form-7-datepicker.php:415
|
126 |
-
msgid "Year Controls"
|
127 |
-
msgstr "Controale An"
|
128 |
-
|
129 |
-
#: ../contact-form-7-datepicker.php:423
|
130 |
-
msgid "Month Controls"
|
131 |
-
msgstr "Controale Lună"
|
132 |
-
|
133 |
-
#: ../contact-form-7-datepicker.php:426
|
134 |
-
msgid "<p>You can select here what controls would you like to display on the calendar.</p>"
|
135 |
-
msgstr "<p>Puteți selecta ce controale doriți să apară pe calendar.</p>"
|
136 |
-
|
137 |
-
#: ../contact-form-7-datepicker.php:432
|
138 |
-
msgid "Selected Date"
|
139 |
-
msgstr ""
|
140 |
-
|
141 |
-
#: ../contact-form-7-datepicker.php:440
|
142 |
-
msgid "<p>You can set here a default selected date and have a look of how the calendar shows up.</p>"
|
143 |
-
msgstr "<p>Puteți selecta aici o dată preselectată și vizualiza calendarul cu setările curente.</p>"
|
144 |
-
|
145 |
-
#: ../contact-form-7-datepicker.php:446
|
146 |
-
msgid "Animate"
|
147 |
-
msgstr "Animare"
|
148 |
-
|
149 |
-
#: ../contact-form-7-datepicker.php:466
|
150 |
-
msgid "<p>Animation on display.</p>"
|
151 |
-
msgstr "<p>Animare la afișare.</p>"
|
152 |
-
|
153 |
-
#: ../contact-form-7-datepicker.php:472
|
154 |
-
msgid "Date Format"
|
155 |
-
msgstr "Format dată"
|
156 |
-
|
157 |
-
#: ../contact-form-7-datepicker.php:478
|
158 |
-
msgid ""
|
159 |
-
"<p>Possible values to use in the date format:<br />\n"
|
160 |
-
"<br />\n"
|
161 |
-
"%d - Day of the month, 2 digits with leading zeros<br />\n"
|
162 |
-
"%j - Day of the month without leading zeros<br />\n"
|
163 |
-
"%m - Numeric representation of a month, with leading zeros<br />\n"
|
164 |
-
"%M - A short textual representation of a month, three letters<br />\n"
|
165 |
-
"%n - Numeric representation of a month, without leading zeros<br />\n"
|
166 |
-
"%F - A full textual representation of a month, such as January or March<br />\n"
|
167 |
-
"%Y - A full numeric representation of a year, 4 digits<br />\n"
|
168 |
-
"%y - A two digit representation of a year<br />\n"
|
169 |
-
"<br />\n"
|
170 |
-
"You can of course put whatever divider you want between them.<br /></p>"
|
171 |
-
msgstr ""
|
172 |
-
"<p>Valori posibile pentru formatul datei:<br />\n"
|
173 |
-
"<br />\n"
|
174 |
-
"%d - Ziua din lună, 2 cifre cu zero<br />\n"
|
175 |
-
"%j - Ziua din lună fără zero<br />\n"
|
176 |
-
"%m - Reprezentarea numerică a unei luni, cu zero<br />\n"
|
177 |
-
"%M - O reprezentare textuală scurtă a unei luni, trei litere<br />\n"
|
178 |
-
"%n - Reprezentarea numerică a unei luni, fără zero<br />\n"
|
179 |
-
"%F - O reprezentare textuală întreagă a unei luni, ca și Ianuarie sau Martie<br />\n"
|
180 |
-
"%Y - O reprezentare numerică întreagă a unui an, 4 cifre<br />\n"
|
181 |
-
"%y - O reprezentare a unui an din două cifre<br />\n"
|
182 |
-
"<br />\n"
|
183 |
-
"Puteți desigur să introduceți orice separator doriți între valori.<br /></p>"
|
184 |
-
|
185 |
-
#: ../contact-form-7-datepicker.php:498
|
186 |
-
msgid "Save Setting"
|
187 |
-
msgstr "Salvează setări"
|
188 |
-
|
189 |
-
#: ../contact-form-7-datepicker.php:753
|
190 |
-
msgid "January"
|
191 |
-
msgstr "Ianuarie"
|
192 |
-
|
193 |
-
#: ../contact-form-7-datepicker.php:754
|
194 |
-
msgid "February"
|
195 |
-
msgstr "Februarie"
|
196 |
-
|
197 |
-
#: ../contact-form-7-datepicker.php:755
|
198 |
-
msgid "March"
|
199 |
-
msgstr "Martie"
|
200 |
-
|
201 |
-
#: ../contact-form-7-datepicker.php:756
|
202 |
-
msgid "April"
|
203 |
-
msgstr "Aprilie"
|
204 |
-
|
205 |
-
#: ../contact-form-7-datepicker.php:757
|
206 |
-
msgid "May"
|
207 |
-
msgstr "Mai"
|
208 |
-
|
209 |
-
#: ../contact-form-7-datepicker.php:758
|
210 |
-
msgid "June"
|
211 |
-
msgstr "Iunie"
|
212 |
-
|
213 |
-
#: ../contact-form-7-datepicker.php:759
|
214 |
-
msgid "July"
|
215 |
-
msgstr "Iulie"
|
216 |
-
|
217 |
-
#: ../contact-form-7-datepicker.php:760
|
218 |
-
msgid "August"
|
219 |
-
msgstr "August"
|
220 |
-
|
221 |
-
#: ../contact-form-7-datepicker.php:761
|
222 |
-
msgid "September"
|
223 |
-
msgstr "Septembrie"
|
224 |
-
|
225 |
-
#: ../contact-form-7-datepicker.php:762
|
226 |
-
msgid "October"
|
227 |
-
msgstr "Octombrie"
|
228 |
-
|
229 |
-
#: ../contact-form-7-datepicker.php:763
|
230 |
-
msgid "November"
|
231 |
-
msgstr "Noiembrie"
|
232 |
-
|
233 |
-
#: ../contact-form-7-datepicker.php:764
|
234 |
-
msgid "December"
|
235 |
-
msgstr "Decembrie"
|
236 |
-
|
237 |
-
#: ../contact-form-7-datepicker.php:767
|
238 |
-
msgid "Sun"
|
239 |
-
msgstr "Dum"
|
240 |
-
|
241 |
-
#: ../contact-form-7-datepicker.php:768
|
242 |
-
msgid "Mon"
|
243 |
-
msgstr "Lun"
|
244 |
-
|
245 |
-
#: ../contact-form-7-datepicker.php:769
|
246 |
-
msgid "Tue"
|
247 |
-
msgstr "Mar"
|
248 |
-
|
249 |
-
#: ../contact-form-7-datepicker.php:770
|
250 |
-
msgid "Wed"
|
251 |
-
msgstr "Mie"
|
252 |
-
|
253 |
-
#: ../contact-form-7-datepicker.php:771
|
254 |
-
msgid "Thu"
|
255 |
-
msgstr "Joi"
|
256 |
-
|
257 |
-
#: ../contact-form-7-datepicker.php:772
|
258 |
-
msgid "Fri"
|
259 |
-
msgstr "Vin"
|
260 |
-
|
261 |
-
#: ../contact-form-7-datepicker.php:773
|
262 |
-
msgid "Sat"
|
263 |
-
msgstr "Sâm"
|
264 |
-
|
265 |
-
#: ../contact-form-7-datepicker.php:775
|
266 |
-
msgid "Move a month forward"
|
267 |
-
msgstr "Înaintează cu o lună"
|
268 |
-
|
269 |
-
#: ../contact-form-7-datepicker.php:776
|
270 |
-
msgid "Move a month backward"
|
271 |
-
msgstr "Întoarce cu o lună"
|
272 |
-
|
273 |
-
#: ../contact-form-7-datepicker.php:777
|
274 |
-
msgid "Move a year forward"
|
275 |
-
msgstr "Înaintează cu un an"
|
276 |
-
|
277 |
-
#: ../contact-form-7-datepicker.php:778
|
278 |
-
msgid "Move a year backward"
|
279 |
-
msgstr "Întoarce cu un an"
|
280 |
-
|
281 |
-
#: ../contact-form-7-datepicker.php:779
|
282 |
-
msgid "Close the calendar"
|
283 |
-
msgstr "Închide calendarul"
|
284 |
-
|
285 |
-
#: ../contact-form-7-datepicker.php:780
|
286 |
-
#: ../contact-form-7-datepicker.php:781
|
287 |
-
msgid "Date object invalid!"
|
288 |
-
msgstr "Obiect dată invalid!"
|
289 |
-
|
290 |
-
#: ../contact-form-7-datepicker.php:782
|
291 |
-
#: ../contact-form-7-datepicker.php:783
|
292 |
-
msgid "Target invalid!"
|
293 |
-
msgstr "Țintă nevalidă!"
|
294 |
-
|
295 |
-
#: ../contact-form-7-datepicker.php:810
|
296 |
-
msgid "Date field"
|
297 |
-
msgstr "Câmp dată"
|
298 |
-
|
299 |
-
#: ../contact-form-7-datepicker.php:837
|
300 |
-
msgid "Required field?"
|
301 |
-
msgstr ""
|
302 |
-
|
303 |
-
#: ../contact-form-7-datepicker.php:842
|
304 |
-
msgid "Name"
|
305 |
-
msgstr ""
|
306 |
-
|
307 |
-
#: ../contact-form-7-datepicker.php:851
|
308 |
-
#: ../contact-form-7-datepicker.php:856
|
309 |
-
#: ../contact-form-7-datepicker.php:863
|
310 |
-
#: ../contact-form-7-datepicker.php:868
|
311 |
-
msgid "optional"
|
312 |
-
msgstr ""
|
313 |
-
|
314 |
-
#: ../contact-form-7-datepicker.php:875
|
315 |
-
msgid "Copy this code and paste it into the form left."
|
316 |
-
msgstr ""
|
317 |
-
|
318 |
-
#: ../contact-form-7-datepicker.php:879
|
319 |
-
msgid "And, put this code into the Mail fields below."
|
320 |
-
msgstr ""
|
321 |
-
|
322 |
-
#~ msgid "Today and before"
|
323 |
-
#~ msgstr "Astăzi și trecut"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/contact-form-7-datepicker.pot
DELETED
@@ -1,304 +0,0 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: contact-form-7-datepicker\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2011-07-29 19:02+0200\n"
|
6 |
-
"PO-Revision-Date: 2011-07-29 19:02+0200\n"
|
7 |
-
"Last-Translator: Aurel Canciu <aurelcanciu@gmail.com>\n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"Language: \n"
|
10 |
-
"MIME-Version: 1.0\n"
|
11 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
-
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
-
"X-Poedit-Basepath: .\n"
|
15 |
-
"Plural-Forms: nplurals=1; plural=0;\n"
|
16 |
-
"X-Poedit-Language: English\n"
|
17 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
18 |
-
"X-Poedit-SearchPath-0: ..\n"
|
19 |
-
|
20 |
-
#: ../contact-form-7-datepicker.php:121
|
21 |
-
msgid "Datepicker Settings"
|
22 |
-
msgstr ""
|
23 |
-
|
24 |
-
#: ../contact-form-7-datepicker.php:215
|
25 |
-
#: ../contact-form-7-datepicker.php:323
|
26 |
-
msgid "Today and future"
|
27 |
-
msgstr ""
|
28 |
-
|
29 |
-
#: ../contact-form-7-datepicker.php:216
|
30 |
-
#: ../contact-form-7-datepicker.php:325
|
31 |
-
msgid "Today and past"
|
32 |
-
msgstr ""
|
33 |
-
|
34 |
-
#: ../contact-form-7-datepicker.php:217
|
35 |
-
msgid "No limit"
|
36 |
-
msgstr ""
|
37 |
-
|
38 |
-
#: ../contact-form-7-datepicker.php:220
|
39 |
-
#: ../contact-form-7-datepicker.php:297
|
40 |
-
#: ../contact-form-7-datepicker.php:451
|
41 |
-
msgid "true"
|
42 |
-
msgstr ""
|
43 |
-
|
44 |
-
#: ../contact-form-7-datepicker.php:221
|
45 |
-
msgid "false"
|
46 |
-
msgstr ""
|
47 |
-
|
48 |
-
#: ../contact-form-7-datepicker.php:225
|
49 |
-
#: ../contact-form-7-datepicker.php:351
|
50 |
-
msgid "Sunday"
|
51 |
-
msgstr ""
|
52 |
-
|
53 |
-
#: ../contact-form-7-datepicker.php:226
|
54 |
-
msgid "Monday"
|
55 |
-
msgstr ""
|
56 |
-
|
57 |
-
#: ../contact-form-7-datepicker.php:229
|
58 |
-
#: ../contact-form-7-datepicker.php:386
|
59 |
-
msgid "Left to right"
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: ../contact-form-7-datepicker.php:230
|
63 |
-
msgid "Right to left"
|
64 |
-
msgstr ""
|
65 |
-
|
66 |
-
#: ../contact-form-7-datepicker.php:237
|
67 |
-
msgid ""
|
68 |
-
"<p>This plugin implements a new <strong>[date]</strong> tag in <a href=\"http://wordpress.org/extend/plugins/contact-form-7/\">Contact Form 7</a> \n"
|
69 |
-
"\t\tthat adds a date field to a form. When clicking the field a calendar pops up enabling your site visitors to easily select any date.<br />\n"
|
70 |
-
"\t\tTo use it simply insert the <strong>[date your-field-name]</strong> or <strong>[date* your-requierd-field-name]</strong> if you want it to be mandatory,\n"
|
71 |
-
"\t\tin your Contact Form 7 edit section.</p>"
|
72 |
-
msgstr ""
|
73 |
-
|
74 |
-
#: ../contact-form-7-datepicker.php:246
|
75 |
-
msgid "Color scheme"
|
76 |
-
msgstr ""
|
77 |
-
|
78 |
-
#: ../contact-form-7-datepicker.php:270
|
79 |
-
msgid "Use Mode"
|
80 |
-
msgstr ""
|
81 |
-
|
82 |
-
#: ../contact-form-7-datepicker.php:285
|
83 |
-
msgid ""
|
84 |
-
"<p>1 – The calendar's HTML will be directly appended to the field supplied by target<br />\n"
|
85 |
-
"\t\t\t\t\t\t\t2 – The calendar will appear as a popup when the field with the id supplied in target is clicked.</p>"
|
86 |
-
msgstr ""
|
87 |
-
|
88 |
-
#: ../contact-form-7-datepicker.php:292
|
89 |
-
msgid "Sripped"
|
90 |
-
msgstr ""
|
91 |
-
|
92 |
-
#: ../contact-form-7-datepicker.php:312
|
93 |
-
msgid "<p>When set to true the calendar appears without the visual design - usually used with 'Use Mod' 1.</p>"
|
94 |
-
msgstr ""
|
95 |
-
|
96 |
-
#: ../contact-form-7-datepicker.php:318
|
97 |
-
msgid "Limit Dates To"
|
98 |
-
msgstr ""
|
99 |
-
|
100 |
-
#: ../contact-form-7-datepicker.php:340
|
101 |
-
msgid "<p>Enables you to limit the possible picking dates according to the current date.</p>"
|
102 |
-
msgstr ""
|
103 |
-
|
104 |
-
#: ../contact-form-7-datepicker.php:346
|
105 |
-
msgid "Week Start Day"
|
106 |
-
msgstr ""
|
107 |
-
|
108 |
-
#: ../contact-form-7-datepicker.php:371
|
109 |
-
msgid "Years Range"
|
110 |
-
msgstr ""
|
111 |
-
|
112 |
-
#: ../contact-form-7-datepicker.php:381
|
113 |
-
msgid "Text Direction"
|
114 |
-
msgstr ""
|
115 |
-
|
116 |
-
#: ../contact-form-7-datepicker.php:406
|
117 |
-
msgid "Controls"
|
118 |
-
msgstr ""
|
119 |
-
|
120 |
-
#: ../contact-form-7-datepicker.php:415
|
121 |
-
msgid "Year Controls"
|
122 |
-
msgstr ""
|
123 |
-
|
124 |
-
#: ../contact-form-7-datepicker.php:423
|
125 |
-
msgid "Month Controls"
|
126 |
-
msgstr ""
|
127 |
-
|
128 |
-
#: ../contact-form-7-datepicker.php:426
|
129 |
-
msgid "<p>You can select here what controls would you like to display on the calendar.</p>"
|
130 |
-
msgstr ""
|
131 |
-
|
132 |
-
#: ../contact-form-7-datepicker.php:432
|
133 |
-
msgid "Selected Date"
|
134 |
-
msgstr ""
|
135 |
-
|
136 |
-
#: ../contact-form-7-datepicker.php:440
|
137 |
-
msgid "<p>You can set here a default selected date and have a look of how the calendar shows up.</p>"
|
138 |
-
msgstr ""
|
139 |
-
|
140 |
-
#: ../contact-form-7-datepicker.php:446
|
141 |
-
msgid "Animate"
|
142 |
-
msgstr ""
|
143 |
-
|
144 |
-
#: ../contact-form-7-datepicker.php:466
|
145 |
-
msgid "<p>Animation on display.</p>"
|
146 |
-
msgstr ""
|
147 |
-
|
148 |
-
#: ../contact-form-7-datepicker.php:472
|
149 |
-
msgid "Date Format"
|
150 |
-
msgstr ""
|
151 |
-
|
152 |
-
#: ../contact-form-7-datepicker.php:478
|
153 |
-
msgid ""
|
154 |
-
"<p>Possible values to use in the date format:<br />\n"
|
155 |
-
"<br />\n"
|
156 |
-
"%d - Day of the month, 2 digits with leading zeros<br />\n"
|
157 |
-
"%j - Day of the month without leading zeros<br />\n"
|
158 |
-
"%m - Numeric representation of a month, with leading zeros<br />\n"
|
159 |
-
"%M - A short textual representation of a month, three letters<br />\n"
|
160 |
-
"%n - Numeric representation of a month, without leading zeros<br />\n"
|
161 |
-
"%F - A full textual representation of a month, such as January or March<br />\n"
|
162 |
-
"%Y - A full numeric representation of a year, 4 digits<br />\n"
|
163 |
-
"%y - A two digit representation of a year<br />\n"
|
164 |
-
"<br />\n"
|
165 |
-
"You can of course put whatever divider you want between them.<br /></p>"
|
166 |
-
msgstr ""
|
167 |
-
|
168 |
-
#: ../contact-form-7-datepicker.php:498
|
169 |
-
msgid "Save Setting"
|
170 |
-
msgstr ""
|
171 |
-
|
172 |
-
#: ../contact-form-7-datepicker.php:753
|
173 |
-
msgid "January"
|
174 |
-
msgstr ""
|
175 |
-
|
176 |
-
#: ../contact-form-7-datepicker.php:754
|
177 |
-
msgid "February"
|
178 |
-
msgstr ""
|
179 |
-
|
180 |
-
#: ../contact-form-7-datepicker.php:755
|
181 |
-
msgid "March"
|
182 |
-
msgstr ""
|
183 |
-
|
184 |
-
#: ../contact-form-7-datepicker.php:756
|
185 |
-
msgid "April"
|
186 |
-
msgstr ""
|
187 |
-
|
188 |
-
#: ../contact-form-7-datepicker.php:757
|
189 |
-
msgid "May"
|
190 |
-
msgstr ""
|
191 |
-
|
192 |
-
#: ../contact-form-7-datepicker.php:758
|
193 |
-
msgid "June"
|
194 |
-
msgstr ""
|
195 |
-
|
196 |
-
#: ../contact-form-7-datepicker.php:759
|
197 |
-
msgid "July"
|
198 |
-
msgstr ""
|
199 |
-
|
200 |
-
#: ../contact-form-7-datepicker.php:760
|
201 |
-
msgid "August"
|
202 |
-
msgstr ""
|
203 |
-
|
204 |
-
#: ../contact-form-7-datepicker.php:761
|
205 |
-
msgid "September"
|
206 |
-
msgstr ""
|
207 |
-
|
208 |
-
#: ../contact-form-7-datepicker.php:762
|
209 |
-
msgid "October"
|
210 |
-
msgstr ""
|
211 |
-
|
212 |
-
#: ../contact-form-7-datepicker.php:763
|
213 |
-
msgid "November"
|
214 |
-
msgstr ""
|
215 |
-
|
216 |
-
#: ../contact-form-7-datepicker.php:764
|
217 |
-
msgid "December"
|
218 |
-
msgstr ""
|
219 |
-
|
220 |
-
#: ../contact-form-7-datepicker.php:767
|
221 |
-
msgid "Sun"
|
222 |
-
msgstr ""
|
223 |
-
|
224 |
-
#: ../contact-form-7-datepicker.php:768
|
225 |
-
msgid "Mon"
|
226 |
-
msgstr ""
|
227 |
-
|
228 |
-
#: ../contact-form-7-datepicker.php:769
|
229 |
-
msgid "Tue"
|
230 |
-
msgstr ""
|
231 |
-
|
232 |
-
#: ../contact-form-7-datepicker.php:770
|
233 |
-
msgid "Wed"
|
234 |
-
msgstr ""
|
235 |
-
|
236 |
-
#: ../contact-form-7-datepicker.php:771
|
237 |
-
msgid "Thu"
|
238 |
-
msgstr ""
|
239 |
-
|
240 |
-
#: ../contact-form-7-datepicker.php:772
|
241 |
-
msgid "Fri"
|
242 |
-
msgstr ""
|
243 |
-
|
244 |
-
#: ../contact-form-7-datepicker.php:773
|
245 |
-
msgid "Sat"
|
246 |
-
msgstr ""
|
247 |
-
|
248 |
-
#: ../contact-form-7-datepicker.php:775
|
249 |
-
msgid "Move a month forward"
|
250 |
-
msgstr ""
|
251 |
-
|
252 |
-
#: ../contact-form-7-datepicker.php:776
|
253 |
-
msgid "Move a month backward"
|
254 |
-
msgstr ""
|
255 |
-
|
256 |
-
#: ../contact-form-7-datepicker.php:777
|
257 |
-
msgid "Move a year forward"
|
258 |
-
msgstr ""
|
259 |
-
|
260 |
-
#: ../contact-form-7-datepicker.php:778
|
261 |
-
msgid "Move a year backward"
|
262 |
-
msgstr ""
|
263 |
-
|
264 |
-
#: ../contact-form-7-datepicker.php:779
|
265 |
-
msgid "Close the calendar"
|
266 |
-
msgstr ""
|
267 |
-
|
268 |
-
#: ../contact-form-7-datepicker.php:780
|
269 |
-
#: ../contact-form-7-datepicker.php:781
|
270 |
-
msgid "Date object invalid!"
|
271 |
-
msgstr ""
|
272 |
-
|
273 |
-
#: ../contact-form-7-datepicker.php:782
|
274 |
-
#: ../contact-form-7-datepicker.php:783
|
275 |
-
msgid "Target invalid!"
|
276 |
-
msgstr ""
|
277 |
-
|
278 |
-
#: ../contact-form-7-datepicker.php:810
|
279 |
-
msgid "Date field"
|
280 |
-
msgstr ""
|
281 |
-
|
282 |
-
#: ../contact-form-7-datepicker.php:837
|
283 |
-
msgid "Required field?"
|
284 |
-
msgstr ""
|
285 |
-
|
286 |
-
#: ../contact-form-7-datepicker.php:842
|
287 |
-
msgid "Name"
|
288 |
-
msgstr ""
|
289 |
-
|
290 |
-
#: ../contact-form-7-datepicker.php:851
|
291 |
-
#: ../contact-form-7-datepicker.php:856
|
292 |
-
#: ../contact-form-7-datepicker.php:863
|
293 |
-
#: ../contact-form-7-datepicker.php:868
|
294 |
-
msgid "optional"
|
295 |
-
msgstr ""
|
296 |
-
|
297 |
-
#: ../contact-form-7-datepicker.php:875
|
298 |
-
msgid "Copy this code and paste it into the form left."
|
299 |
-
msgstr ""
|
300 |
-
|
301 |
-
#: ../contact-form-7-datepicker.php:879
|
302 |
-
msgid "And, put this code into the Mail fields below."
|
303 |
-
msgstr ""
|
304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: shockware
|
3 |
Donate link:
|
4 |
-
Tags: wordpress, datepicker, calendar, contact form 7, forms
|
5 |
Requires at least: WordPress 2.9
|
6 |
-
Tested up to: WordPress 3.
|
7 |
-
Stable tag: 0
|
8 |
|
9 |
-
|
|
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
This plugin is somewhat a fork of [Contact Form 7 Calendar](http://wordpress.org/extend/plugins/cf7-calendar/) by [harrysudana](http://profiles.wordpress.org/users/harrysudana/).
|
17 |
|
18 |
== Installation ==
|
19 |
|
@@ -21,44 +20,22 @@ Please follow the [standard installation procedure for WordPress plugins](http:/
|
|
21 |
|
22 |
== Frequently Asked Questions ==
|
23 |
|
24 |
-
= How to use the [date] and [date*] tags in CF7? =
|
25 |
-
|
26 |
-
These shortcodes have the same syntax as any other CF7 text input field shortcode
|
27 |
-
`[date name_of_field (id:id_of_field class:classes_of_field integer_size/integer_maxlength "value")]`
|
28 |
-
|
29 |
-
If you do not provide an **id:** the plugin will use the **name_of_field**. Everything between the parenthesis is optional (do not include parenthesis, I've wrapped everything in parenthesis just to mark attributes that are optional).
|
30 |
-
|
31 |
-
= Can I use the datepicker outside of CF7? =
|
32 |
-
|
33 |
-
Yes you can! Just use the new **[datepicker]** shortcode for that.
|
34 |
-
`[datepicker name="name_of_field" (id="id_of_field" class="classes_of_field" newfield="true/false" value="YYYY-MM-DD")]`
|
35 |
-
|
36 |
-
Again, everything wrapped between parenthesis is optional.
|
37 |
-
|
38 |
-
- **name**: name of the input field you want to append the datepicker to
|
39 |
-
- **id**: id of the input field you want to append the datepicker to
|
40 |
-
- **class**: the CSS classes of the input field
|
41 |
-
- **newfield**: specify weather you are appending to an existing input field (false) or create a new input field to append to (true) (default value is true)
|
42 |
-
- **value**: the preselected value of the input field
|
43 |
-
|
44 |
-
If you choose to append to an already existent input field (**newfield**="false"), I recommend you use both name and id (both with the values of the existing input field's attribute values)
|
45 |
-
|
46 |
-
For the **value** attribute you can use any date format that can be used as a HTML attribute value, I recommend you use the ISO 8601 (YYYY-MM-DD) date format (ex: 2011-07-30). More info [here](http://php.net/manual/en/function.strtotime.php#refsect1-function.strtotime-notes)
|
47 |
|
48 |
= Where do I submit a bug? =
|
49 |
|
50 |
You can [open an issue on github](https://github.com/relu/contact-form-7-datepicker/issues) or just contact me via email.
|
51 |
|
52 |
-
= I've translated this plugin, how can I share my translation? =
|
53 |
-
|
54 |
-
You can contact me anywhere and I'll add them to the project :)
|
55 |
-
|
56 |
== Screenshots ==
|
57 |
|
58 |
1. The datepicker in action
|
|
|
|
|
59 |
|
60 |
== Changelog ==
|
61 |
|
|
|
|
|
|
|
62 |
= 0.7.4 =
|
63 |
* Bugfix:
|
64 |
- datepicker shortcode works now if contact form 7 is not installed
|
@@ -146,6 +123,12 @@ First release
|
|
146 |
|
147 |
== Upgrade Notice ==
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
= 0.7.1 =
|
150 |
|
151 |
If you installed 0.7, do upgrade quick! This will fix all issues!
|
1 |
=== Plugin Name ===
|
2 |
Contributors: shockware
|
3 |
Donate link:
|
4 |
+
Tags: wordpress, datepicker, calendar, contact form 7, forms, jqueryui
|
5 |
Requires at least: WordPress 2.9
|
6 |
+
Tested up to: WordPress 3.4.2
|
7 |
+
Stable tag: 2.0
|
8 |
|
9 |
+
Easily add a date field using jQuery UI's datepicker to your CF7 forms.
|
10 |
+
This plugin depends on Contact Form 7.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Enables adding a date field for Contact Form 7 Wordpress Plugin using jQuery UI's
|
15 |
+
datepicker.
|
|
|
|
|
16 |
|
17 |
== Installation ==
|
18 |
|
20 |
|
21 |
== Frequently Asked Questions ==
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
= Where do I submit a bug? =
|
25 |
|
26 |
You can [open an issue on github](https://github.com/relu/contact-form-7-datepicker/issues) or just contact me via email.
|
27 |
|
|
|
|
|
|
|
|
|
28 |
== Screenshots ==
|
29 |
|
30 |
1. The datepicker in action
|
31 |
+
2. Change themes
|
32 |
+
3. Date field generator
|
33 |
|
34 |
== Changelog ==
|
35 |
|
36 |
+
= 2.0 =
|
37 |
+
* Complete rewrite, using jquery-ui's datepicker
|
38 |
+
|
39 |
= 0.7.4 =
|
40 |
* Bugfix:
|
41 |
- datepicker shortcode works now if contact form 7 is not installed
|
123 |
|
124 |
== Upgrade Notice ==
|
125 |
|
126 |
+
= 2.0 =
|
127 |
+
|
128 |
+
The plugin has been completely rewritten and the older version is no longer
|
129 |
+
supported. This version uses jQueryUI's datepicker.
|
130 |
+
You will have to regenerate all of your date fields.
|
131 |
+
|
132 |
= 0.7.1 =
|
133 |
|
134 |
If you installed 0.7, do upgrade quick! This will fix all issues!
|
screenshot-1.png
ADDED
Binary file
|
screenshot-2.png
ADDED
Binary file
|
screenshot-3.png
ADDED
Binary file
|