Version Description
- Complete rewrite, using jquery-ui's datepicker
Download this release
Release Info
Developer | shockware |
Plugin | ![]() |
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 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|