Version Description
- Several security patches brought
- WARNING : somes parameters will be reinitilized, please check all
Download this release
Release Info
Developer | Florent73 |
Plugin | WP Maintenance |
Version | 6.0.8 |
Comparing to | |
See all releases |
Code changes from version 6.0.7 to 6.0.8
- classes/countdown.php +28 -21
- classes/wp-maintenance.php +222 -189
- css/wpm-admin.css +3 -77
- css/wpm-responsiveslides.css +0 -1
- css/wpm-slideshow.css +0 -1
- includes/functions.php +42 -90
- includes/shortcodes.php +23 -14
- js/lib/jquery.1.7.0.js +0 -9300
- js/wpm-cpt-script.js +1 -1
- js/wpm-responsiveslides.min.js +0 -8
- languages/wp-maintenance-fr_FR.mo +0 -0
- languages/wp-maintenance-fr_FR.po +417 -423
- languages/wp-maintenance.pot +260 -402
- readme.txt +7 -3
- socialicons/128x128/about_me.png +0 -0
- socialicons/128x128/facebook.png +0 -0
- socialicons/128x128/flickr.png +0 -0
- socialicons/128x128/google_plus.png +0 -0
- socialicons/128x128/instagram.png +0 -0
- socialicons/128x128/linkedin.png +0 -0
- socialicons/128x128/pinterest.png +0 -0
- socialicons/128x128/soundcloud.png +0 -0
- socialicons/128x128/twitter.png +0 -0
- socialicons/128x128/vimeo.png +0 -0
- socialicons/128x128/youtube.png +0 -0
- socialicons/16x16/about_me.png +0 -0
- socialicons/16x16/facebook.png +0 -0
- socialicons/16x16/flickr.png +0 -0
- socialicons/16x16/google_plus.png +0 -0
- socialicons/16x16/instagram.png +0 -0
- socialicons/16x16/linkedin.png +0 -0
- socialicons/16x16/pinterest.png +0 -0
- socialicons/16x16/soundcloud.png +0 -0
- socialicons/16x16/twitter.png +0 -0
- socialicons/16x16/vimeo.png +0 -0
- socialicons/16x16/youtube.png +0 -0
- socialicons/24x24/about_me.png +0 -0
- socialicons/24x24/facebook.png +0 -0
- socialicons/24x24/flickr.png +0 -0
- socialicons/24x24/google_plus.png +0 -0
- socialicons/24x24/instagram.png +0 -0
- socialicons/24x24/linkedin.png +0 -0
- socialicons/24x24/pinterest.png +0 -0
- socialicons/24x24/soundcloud.png +0 -0
- socialicons/24x24/twitter.png +0 -0
- socialicons/24x24/vimeo.png +0 -0
- socialicons/24x24/youtube.png +0 -0
- socialicons/32x32/about_me.png +0 -0
- socialicons/32x32/facebook.png +0 -0
- socialicons/32x32/flickr.png +0 -0
- socialicons/32x32/google_plus.png +0 -0
- socialicons/32x32/instagram.png +0 -0
- socialicons/32x32/linkedin.png +0 -0
- socialicons/32x32/pinterest.png +0 -0
- socialicons/32x32/soundcloud.png +0 -0
- socialicons/32x32/twitter.png +0 -0
- socialicons/32x32/vimeo.png +0 -0
- socialicons/32x32/youtube.png +0 -0
- socialicons/48x48/about_me.png +0 -0
- socialicons/48x48/facebook.png +0 -0
- socialicons/48x48/flickr.png +0 -0
- socialicons/48x48/google_plus.png +0 -0
- socialicons/48x48/instagram.png +0 -0
- socialicons/48x48/linkedin.png +0 -0
- socialicons/48x48/pinterest.png +0 -0
- socialicons/48x48/soundcloud.png +0 -0
- socialicons/48x48/twitter.png +0 -0
- socialicons/48x48/vimeo.png +0 -0
- socialicons/48x48/youtube.png +0 -0
- socialicons/64x64/about_me.png +0 -0
- socialicons/64x64/facebook.png +0 -0
- socialicons/64x64/flickr.png +0 -0
- socialicons/64x64/google_plus.png +0 -0
- socialicons/64x64/instagram.png +0 -0
- socialicons/64x64/linkedin.png +0 -0
- socialicons/64x64/pinterest.png +0 -0
- socialicons/64x64/soundcloud.png +0 -0
- socialicons/64x64/twitter.png +0 -0
- socialicons/64x64/vimeo.png +0 -0
- socialicons/64x64/youtube.png +0 -0
- socialicons/style1/128/email.png +0 -0
- socialicons/style1/256/email.png +0 -0
- socialicons/style1/32/email.png +0 -0
- socialicons/style1/512/email.png +0 -0
- socialicons/style1/64/email.png +0 -0
- socialicons/style2/128/email.png +0 -0
- socialicons/style2/256/email.png +0 -0
- socialicons/style2/32/email.png +0 -0
- socialicons/style2/512/email.png +0 -0
- socialicons/style2/64/email.png +0 -0
- socialicons/style3/128/email.png +0 -0
- socialicons/style3/256/email.png +0 -0
- socialicons/style3/32/email.png +0 -0
- socialicons/style3/512/email.png +0 -0
- socialicons/style3/64/email.png +0 -0
- socialicons/style4/128/email.png +0 -0
- socialicons/style4/256/email.png +0 -0
- socialicons/style4/32/email.png +0 -0
- socialicons/style4/512/email.png +0 -0
- socialicons/style4/64/email.png +0 -0
- socialicons/style4/icon.afphoto +0 -0
- socialicons/style5/128/email.png +0 -0
- socialicons/style5/256/email.png +0 -0
- socialicons/style5/32/email.png +0 -0
- socialicons/style5/512/email.png +0 -0
- socialicons/style5/64/email.png +0 -0
- socialicons/style6/128/{social-036_android.png → android.png} +0 -0
- socialicons/style6/128/{social-016_apple.png → apple.png} +0 -0
- socialicons/style6/128/{social-037_behance.png → behance.png} +0 -0
- socialicons/style6/128/{social-025_blogger.png → blogger.png} +0 -0
- socialicons/style6/128/{social-022_deviantart.png → deviantart.png} +0 -0
- socialicons/style6/128/{social-002_dribbble.png → dribbble.png} +0 -0
- socialicons/style6/128/email.png +0 -0
- socialicons/style6/128/{social-050_evernote.png → evernote.png} +0 -0
- socialicons/style6/128/{social-006_facebook.png → facebook.png} +0 -0
- socialicons/style6/128/{social-004_flickr.png → flickr.png} +0 -0
- socialicons/style6/128/{social-038_instagram.png → instagram.png} +0 -0
- socialicons/style6/128/{social-011_linkedin.png → linkedin.png} +0 -0
- socialicons/style6/128/{social-029_paypal.png → paypal.png} +0 -0
- socialicons/style6/128/{social-033_pinterest.png → pinterest.png} +0 -0
- socialicons/style6/128/{social-007_skype.png → skype.png} +0 -0
- socialicons/style6/128/social-005_twitter.png +0 -0
- socialicons/style6/128/social-040_google_plus.png +0 -0
- socialicons/style6/128/{social-034_soundcloud.png → soundcloud.png} +0 -0
- socialicons/style6/128/{social-015_tumblr.png → tumblr.png} +0 -0
- socialicons/style6/128/{social-003_twitter.png → twitter.png} +0 -0
- socialicons/style6/128/{social-013_vimeo.png → vimeo.png} +0 -0
- socialicons/style6/128/{social-032_windows8.png → windows8.png} +0 -0
- socialicons/style6/128/{social-026_wordpress.png → wordpress.png} +0 -0
- socialicons/style6/128/{social-018_youtube.png → youtube.png} +0 -0
- socialicons/style6/256/{social-036_android.png → android.png} +0 -0
- socialicons/style6/256/{social-016_apple.png → apple.png} +0 -0
- socialicons/style6/256/{social-037_behance.png → behance.png} +0 -0
- socialicons/style6/256/{social-025_blogger.png → blogger.png} +0 -0
- socialicons/style6/256/{social-019_delicious.png → delicious.png} +0 -0
- socialicons/style6/256/{social-022_deviantart.png → deviantart.png} +0 -0
- socialicons/style6/256/{social-002_dribbble.png → dribbble.png} +0 -0
- socialicons/style6/256/email.png +0 -0
- socialicons/style6/256/{social-050_evernote.png → evernote.png} +0 -0
- socialicons/style6/256/{social-006_facebook.png → facebook.png} +0 -0
- socialicons/style6/256/{social-004_flickr.png → flickr.png} +0 -0
- socialicons/style6/256/{social-038_instagram.png → instagram.png} +0 -0
- socialicons/style6/256/{social-011_linkedin.png → linkedin.png} +0 -0
- socialicons/style6/256/{social-029_paypal.png → paypal.png} +0 -0
- socialicons/style6/256/{social-033_pinterest.png → pinterest.png} +0 -0
- socialicons/style6/256/{social-020_rss.png → rss.png} +0 -0
- socialicons/style6/256/{social-007_skype.png → skype.png} +0 -0
- socialicons/style6/256/social-005_twitter.png +0 -0
- socialicons/style6/256/social-040_google_plus.png +0 -0
- socialicons/style6/256/{social-034_soundcloud.png → soundcloud.png} +0 -0
- socialicons/style6/256/{social-015_tumblr.png → tumblr.png} +0 -0
- socialicons/style6/256/{social-003_twitter.png → twitter.png} +0 -0
- socialicons/style6/256/{social-013_vimeo.png → vimeo.png} +0 -0
- socialicons/style6/256/{social-032_windows8.png → windows8.png} +0 -0
- socialicons/style6/256/{social-026_wordpress.png → wordpress.png} +0 -0
- socialicons/style6/256/{social-018_youtube.png → youtube.png} +0 -0
- socialicons/style6/32/email.png +0 -0
- socialicons/style6/512/{social-036_android.png → android.png} +0 -0
- socialicons/style6/512/{social-016_apple.png → apple.png} +0 -0
- socialicons/style6/512/{social-037_behance.png → behance.png} +0 -0
- socialicons/style6/512/{social-025_blogger.png → blogger.png} +0 -0
- socialicons/style6/512/{social-022_deviantart.png → deviantart.png} +0 -0
- socialicons/style6/512/{social-002_dribbble.png → dribbble.png} +0 -0
- socialicons/style6/512/email.png +0 -0
- socialicons/style6/512/{social-050_evernote.png → evernote.png} +0 -0
- socialicons/style6/512/{social-006_facebook.png → facebook.png} +0 -0
- socialicons/style6/512/{social-004_flickr.png → flickr.png} +0 -0
- socialicons/style6/512/{social-009_google.png → google.png} +0 -0
- socialicons/style6/512/{social-038_instagram.png → instagram.png} +0 -0
- socialicons/style6/512/{social-011_linkedin.png → linkedin.png} +0 -0
- socialicons/style6/512/{social-029_paypal.png → paypal.png} +0 -0
- socialicons/style6/512/{social-033_pinterest.png → pinterest.png} +0 -0
- socialicons/style6/512/social-040_google_plus.png +0 -0
- socialicons/style6/512/{social-034_soundcloud.png → soundcloud.png} +0 -0
- socialicons/style6/512/{social-015_tumblr.png → tumblr.png} +0 -0
- socialicons/style6/512/{social-005_twitter.png → twitter.png} +0 -0
- socialicons/style6/512/{social-013_vimeo.png → vimeo.png} +0 -0
- socialicons/style6/512/{social-032_windows8.png → windows8.png} +0 -0
- socialicons/style6/512/{social-026_wordpress.png → wordpress.png} +0 -0
- socialicons/style6/512/{social-018_youtube.png → youtube.png} +0 -0
- socialicons/style6/64/email.png +0 -0
- themes/default/functions.php +112 -98
- themes/default/index2.php +1 -6
- views/wp-maintenance-colors.php +87 -73
- views/wp-maintenance-countdown.php +29 -35
- views/wp-maintenance-css.php +13 -12
- views/wp-maintenance-dashboard.php +22 -22
- views/wp-maintenance-footer.php +18 -14
- views/wp-maintenance-picture.php +49 -43
- views/wp-maintenance-seo.php +18 -15
- views/wp-maintenance-settings.php +24 -43
- views/wp-maintenance-socialnetworks.php +49 -50
- wp-maintenance.php +3 -3
classes/countdown.php
CHANGED
@@ -8,41 +8,48 @@ class WPM_Countdown extends WP_maintenance {
|
|
8 |
|
9 |
public static function display($date = '') {
|
10 |
|
11 |
-
// Récupère les paramètres sauvegardés
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
// Récupère si le status est actif ou non
|
14 |
$statusActive = get_option('wp_maintenance_active');
|
15 |
$Counter = '';
|
16 |
|
17 |
/*********** AJOUT COMPTEUR SUIVANT LES PARAMETRES *********/
|
18 |
-
if( isset($
|
19 |
|
20 |
-
if( isset($
|
21 |
|
22 |
-
if( !isset($
|
23 |
|
24 |
$Counter = '
|
25 |
<div id="countdown">
|
26 |
<script language="JavaScript">
|
27 |
TargetDate = "'.$date.'";
|
28 |
-
BackColor = "'.$
|
29 |
-
FontSize = "'.$
|
30 |
-
ForeColor = "'.$
|
31 |
-
Disable = "'.$
|
32 |
UrlDisable = "'.get_option( 'siteurl').'";
|
33 |
-
FontFamily = "'.wpm_format_font($
|
|
|
34 |
CountActive = true;
|
35 |
CountStepper = -1;
|
36 |
LeadingZero = true;
|
37 |
';
|
38 |
$Counter .= " DisplayFormat = '<div id=\"wpm-cpt-day\">%%D%%<br /><span id=\"wpm-cpt-days-span\">".__('Days', 'wp-maintenance')."</span></div><div class=\"wpm_ctp_sep\" style=\"float:left;\">:</div><div id=\"wpm-cpt-hours\">%%H%%<br /><span id=\"wpm-cpt-hours-span\">".__('Hours', 'wp-maintenance')."</span></div><div class=\"wpm_ctp_sep\" style=\"float:left;\">:</div><div id=\"wpm-cpt-minutes\">%%M%%<br /><span id=\"wpm-cpt-minutes-span\">".__('Minutes', 'wp-maintenance')."</span></div>";
|
39 |
-
if( isset($
|
40 |
$Counter .= '<div class="wpm_ctp_sep" style="float:left;">:</div><div id="wpm-cpt-seconds">%%S%%<br /><span id="wpm-cpt-seconds-span">'.__('Seconds', 'wp-maintenance').'</span></div>';
|
41 |
}
|
42 |
$Counter .= "';";
|
43 |
-
if( isset($
|
44 |
$Counter .= '
|
45 |
-
FinishMessage = "'.trim( stripslashes( preg_replace("/(\r\n|\n|\r)/", "", $
|
46 |
} else {
|
47 |
$Counter .= '
|
48 |
FinishMessage = " ";';
|
@@ -50,7 +57,7 @@ class WPM_Countdown extends WP_maintenance {
|
|
50 |
$Counter .= '
|
51 |
</script>';
|
52 |
$Counter .= '
|
53 |
-
<script language="JavaScript" src="'.
|
54 |
</div>';
|
55 |
}
|
56 |
}
|
@@ -61,31 +68,31 @@ class WPM_Countdown extends WP_maintenance {
|
|
61 |
public static function css() {
|
62 |
|
63 |
// Récupère les paramètres sauvegardés
|
64 |
-
$
|
65 |
$wpmStyle = '';
|
66 |
-
if( isset($
|
67 |
$wpmStyle .= '
|
68 |
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds {}
|
69 |
.cptR-rec_countdown {';
|
70 |
-
if( isset($
|
71 |
-
if( isset($
|
72 |
$wpmStyle .= '
|
73 |
}
|
74 |
|
75 |
@media screen and (min-width: 200px) and (max-width: 480px) {
|
76 |
|
77 |
.cptR-rec_countdown {';
|
78 |
-
if( isset($
|
79 |
$wpmStyle .= '}
|
80 |
div.bloc {';
|
81 |
-
if( isset($
|
82 |
$wpmStyle .= '}
|
83 |
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds { }
|
84 |
|
85 |
}
|
86 |
@media (max-width: 640px) {
|
87 |
.cptR-rec_countdown {';
|
88 |
-
if( isset($
|
89 |
$wpmStyle .= 'text-align:center;}
|
90 |
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds {text-align:center;}
|
91 |
}';
|
8 |
|
9 |
public static function display($date = '') {
|
10 |
|
11 |
+
// Récupère les paramètres sauvegardés COUNTDOWN
|
12 |
+
if(get_option('wp_maintenance_settings_countdown')) { extract(get_option('wp_maintenance_settings_countdown')); }
|
13 |
+
$paramsCountdown = get_option('wp_maintenance_settings_countdown');
|
14 |
+
|
15 |
+
// Récupère les paramètres sauvegardés COLORS
|
16 |
+
if(get_option('wp_maintenance_settings_colors')) { extract(get_option('wp_maintenance_settings_colors')); }
|
17 |
+
$paramsColors = get_option('wp_maintenance_settings_colors');
|
18 |
+
|
19 |
// Récupère si le status est actif ou non
|
20 |
$statusActive = get_option('wp_maintenance_active');
|
21 |
$Counter = '';
|
22 |
|
23 |
/*********** AJOUT COMPTEUR SUIVANT LES PARAMETRES *********/
|
24 |
+
if( isset($paramsCountdown['active_cpt']) && $paramsCountdown['active_cpt']==1 && !empty($date) ) {
|
25 |
|
26 |
+
if( isset($paramsCountdown['cptdate']) && !empty($paramsCountdown['cptdate']) ) {
|
27 |
|
28 |
+
if( !isset($paramsCountdown['disable']) || $statusActive==0 ) { $paramsCountdown['disable'] = 0; }
|
29 |
|
30 |
$Counter = '
|
31 |
<div id="countdown">
|
32 |
<script language="JavaScript">
|
33 |
TargetDate = "'.$date.'";
|
34 |
+
BackColor = "'.$paramsColors['color_cpt_bg'].'";
|
35 |
+
FontSize = "'.$paramsColors['date_cpt_size'].'";
|
36 |
+
ForeColor = "'.$paramsColors['color_cpt'].'";
|
37 |
+
Disable = "'.$paramsCountdown['disable'].'";
|
38 |
UrlDisable = "'.get_option( 'siteurl').'";
|
39 |
+
FontFamily = "'.wpm_format_font($paramsColors['font_cpt']).'";
|
40 |
+
FontTextSize = "'.$paramsColors['cpt_end_size'].'";
|
41 |
CountActive = true;
|
42 |
CountStepper = -1;
|
43 |
LeadingZero = true;
|
44 |
';
|
45 |
$Counter .= " DisplayFormat = '<div id=\"wpm-cpt-day\">%%D%%<br /><span id=\"wpm-cpt-days-span\">".__('Days', 'wp-maintenance')."</span></div><div class=\"wpm_ctp_sep\" style=\"float:left;\">:</div><div id=\"wpm-cpt-hours\">%%H%%<br /><span id=\"wpm-cpt-hours-span\">".__('Hours', 'wp-maintenance')."</span></div><div class=\"wpm_ctp_sep\" style=\"float:left;\">:</div><div id=\"wpm-cpt-minutes\">%%M%%<br /><span id=\"wpm-cpt-minutes-span\">".__('Minutes', 'wp-maintenance')."</span></div>";
|
46 |
+
if( isset($paramsCountdown['active_cpt_s']) && $paramsCountdown['active_cpt_s']==1 ) {
|
47 |
$Counter .= '<div class="wpm_ctp_sep" style="float:left;">:</div><div id="wpm-cpt-seconds">%%S%%<br /><span id="wpm-cpt-seconds-span">'.__('Seconds', 'wp-maintenance').'</span></div>';
|
48 |
}
|
49 |
$Counter .= "';";
|
50 |
+
if( isset($paramsCountdown['message_cpt_fin']) && $paramsCountdown['message_cpt_fin']!='' ) {
|
51 |
$Counter .= '
|
52 |
+
FinishMessage = "'.trim( stripslashes( preg_replace("/(\r\n|\n|\r)/", "", $paramsCountdown['message_cpt_fin']) ) ).'";';
|
53 |
} else {
|
54 |
$Counter .= '
|
55 |
FinishMessage = " ";';
|
57 |
$Counter .= '
|
58 |
</script>';
|
59 |
$Counter .= '
|
60 |
+
<script language="JavaScript" src="'.plugins_url( '../js/wpm-cpt-script.js', __FILE__ ).'"></script>
|
61 |
</div>';
|
62 |
}
|
63 |
}
|
68 |
public static function css() {
|
69 |
|
70 |
// Récupère les paramètres sauvegardés
|
71 |
+
$paramsCountdown = wp_maintenance::wpm_get_options();
|
72 |
$wpmStyle = '';
|
73 |
+
if( isset($paramsCountdown['active_cpt']) && $paramsCountdown['active_cpt']==1) {
|
74 |
$wpmStyle .= '
|
75 |
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds {}
|
76 |
.cptR-rec_countdown {';
|
77 |
+
if( isset($paramsCountdown['date_cpt_size']) ) { $wpmStyle .= 'font-size:'.$paramsCountdown['date_cpt_size'].'px;'; }
|
78 |
+
if( isset($paramsCountdown['font_cpt']) ) { $wpmStyle .= 'font-family: '.wpm_format_font($paramsCountdown['font_cpt']).', serif;'; }
|
79 |
$wpmStyle .= '
|
80 |
}
|
81 |
|
82 |
@media screen and (min-width: 200px) and (max-width: 480px) {
|
83 |
|
84 |
.cptR-rec_countdown {';
|
85 |
+
if( isset($paramsCountdown['date_cpt_size']) ) { $wpmStyle .= 'font-size:'.($paramsCountdown['date_cpt_size']*0.6).'px;'; }
|
86 |
$wpmStyle .= '}
|
87 |
div.bloc {';
|
88 |
+
if( isset($paramsCountdown['font_bottom_size']) ) { $wpmStyle .= 'font-size: '.($paramsCountdown['font_bottom_size']*0.8).'px;'; }
|
89 |
$wpmStyle .= '}
|
90 |
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds { }
|
91 |
|
92 |
}
|
93 |
@media (max-width: 640px) {
|
94 |
.cptR-rec_countdown {';
|
95 |
+
if( isset($paramsCountdown['date_cpt_size']) ) { $wpmStyle .= 'font-size:'.($paramsCountdown['date_cpt_size']*0.5).'px;'; }
|
96 |
$wpmStyle .= 'text-align:center;}
|
97 |
#wpm-cpt-day, #wpm-cpt-hours, #wpm-cpt-minutes, #wpm-cpt-seconds {text-align:center;}
|
98 |
}';
|
classes/wp-maintenance.php
CHANGED
@@ -32,15 +32,13 @@ class WP_maintenance {
|
|
32 |
add_action( 'admin_head', array( &$this, 'wpm_admin_head') );
|
33 |
add_action( 'admin_bar_menu', array( &$this, 'wpm_add_menu_admin_bar'), 999 );
|
34 |
add_action( 'admin_footer', array( &$this, 'wpm_print_footer_scripts') );
|
35 |
-
add_action( '
|
36 |
-
add_action( 'admin_init', array( &$this, 'wpm_process_settings_export') );
|
37 |
-
add_action( 'after_setup_theme', array( &$this, 'wpm_theme_add_editor_styles') );
|
38 |
}
|
39 |
|
40 |
}
|
41 |
|
42 |
function wpm_theme_add_editor_styles() {
|
43 |
-
add_editor_style(
|
44 |
}
|
45 |
|
46 |
/**
|
@@ -53,105 +51,208 @@ class WP_maintenance {
|
|
53 |
|
54 |
public static function wpm_dashboard_install() {
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
'
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
61 |
'titre_maintenance' => __('This site is down for maintenance', 'wp-maintenance'),
|
62 |
'text_maintenance' => __('Come back quickly!', 'wp-maintenance'),
|
63 |
-
'
|
64 |
-
'
|
65 |
-
'
|
66 |
-
'
|
67 |
-
'
|
68 |
-
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
'font_title_style' => '',
|
|
|
|
|
|
|
|
|
71 |
'font_text_style' => '',
|
72 |
-
'
|
73 |
-
'
|
74 |
-
'
|
75 |
-
'font_text_weigth' => 'normal',
|
76 |
-
'font_bottom_size' => 12,
|
77 |
-
'font_bottom_weigth' => 'normal',
|
78 |
-
'font_bottom_style' => '',
|
79 |
-
'font_cpt' => 'PT Sans',
|
80 |
'color_cpt' => '#333333',
|
81 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
'color_field_text' => '#333333',
|
83 |
-
'color_text_button' => '#ffffff',
|
84 |
-
'color_field_background' => '#F1F1F1',
|
85 |
'color_field_border' => '#333333',
|
86 |
-
'
|
87 |
-
'
|
88 |
'color_button' => '#1e73be',
|
89 |
-
'
|
90 |
-
'
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
'
|
98 |
-
|
99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
'b_enable_image' => 0,
|
|
|
101 |
'b_opacity_image' => '0.2',
|
102 |
-
'
|
103 |
-
'
|
104 |
-
'
|
105 |
-
'color_bg_header' => '#ffffff',
|
106 |
-
'add_wplogin_title' => '',
|
107 |
-
'headercode' => '',
|
108 |
-
'message_cpt_fin' => '',
|
109 |
-
'b_repeat_image' => '',
|
110 |
-
'color_cpt_bg' => '',
|
111 |
-
'font_end_cpt' => 'PT Sans',
|
112 |
-
'cpt_end_size' => 3,
|
113 |
-
'container_active' => 0,
|
114 |
-
'container_color' => '#ffffff',
|
115 |
-
'container_opacity' => '0.5',
|
116 |
-
'container_width' => 80,
|
117 |
-
'dashboard_delete_db' => 1,
|
118 |
-
'error_503' => 1,
|
119 |
-
'enable_footer' => 0
|
120 |
-
|
121 |
);
|
122 |
-
|
123 |
-
if (
|
124 |
-
foreach ($
|
125 |
-
$
|
126 |
}
|
127 |
-
add_option('
|
128 |
}
|
129 |
|
130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
-
|
133 |
-
|
|
|
134 |
}
|
135 |
|
136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
|
|
|
|
138 |
'enable' => 0,
|
139 |
-
'texte' => 'Follow me on',
|
140 |
-
'style' => 'style1',
|
141 |
'size' => 64,
|
|
|
142 |
'position' => 'bottom',
|
143 |
'align' => 'center',
|
144 |
'theme' => ''
|
145 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
}
|
152 |
-
add_option('
|
153 |
}
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
}
|
157 |
|
@@ -166,11 +267,14 @@ class WP_maintenance {
|
|
166 |
|
167 |
delete_option('wp_maintenance_settings');
|
168 |
delete_option('wp_maintenance_version');
|
169 |
-
delete_option('
|
170 |
-
delete_option('
|
171 |
-
delete_option('
|
|
|
|
|
|
|
|
|
172 |
delete_option('wp_maintenance_social_options');
|
173 |
-
delete_option('wp_maintenance_social');
|
174 |
delete_option('wp_maintenance_ipaddresses');
|
175 |
|
176 |
}
|
@@ -209,10 +313,10 @@ class WP_maintenance {
|
|
209 |
global $_wp_admin_css_colors;
|
210 |
// Add Style for all admin
|
211 |
echo '
|
212 |
-
<style>#wpadminbar .wpmbackground-on > .ab-item{ color:#fff;background-color: #f44; }#wpadminbar .wpmbackground-on .ab-icon:before { content: "\
|
213 |
';
|
214 |
if (isset($_GET['page']) && strpos($_GET['page'], 'wp-maintenance') !==false) {
|
215 |
-
echo '<link rel="stylesheet" type="text/css" media="all" href="' .
|
216 |
|
217 |
} else {
|
218 |
echo '
|
@@ -335,18 +439,9 @@ class WP_maintenance {
|
|
335 |
wp_enqueue_script('quicktags');
|
336 |
}
|
337 |
|
338 |
-
public static function wpm_get_options() {
|
339 |
-
|
340 |
-
// Récupère les paramètres sauvegardés
|
341 |
-
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
342 |
-
$paramMMode = get_option('wp_maintenance_settings');
|
343 |
-
|
344 |
-
return $paramMMode;
|
345 |
-
}
|
346 |
-
|
347 |
function wpm_add_admin() {
|
348 |
|
349 |
-
add_menu_page( 'WP Maintenance Settings', 'WP Maintenance', 'manage_options', 'wp-maintenance', array( $this, 'wpm_dashboard_page'),
|
350 |
add_submenu_page( 'wp-maintenance', 'WP Maintenance > '.__('General', 'wp-maintenance'), __('General', 'wp-maintenance'), 'manage_options', 'wp-maintenance', array( $this, 'wpm_dashboard_page') );
|
351 |
add_submenu_page( 'wp-maintenance', 'WP Maintenance > '.__('Colors & Fonts', 'wp-maintenance'), __('Colors & Fonts', 'wp-maintenance'), 'manage_options', 'wp-maintenance-colors', array( $this, 'wpm_colors_page') );
|
352 |
add_submenu_page( 'wp-maintenance', 'WP Maintenance > '.__('Pictures', 'wp-maintenance'), __('Pictures', 'wp-maintenance'), 'manage_options', 'wp-maintenance-picture', array( $this, 'wpm_picture_page') );
|
@@ -365,24 +460,24 @@ class WP_maintenance {
|
|
365 |
wp_enqueue_script('media-upload');
|
366 |
wp_enqueue_script('thickbox');
|
367 |
|
368 |
-
wp_register_script('wpm-my-upload',
|
369 |
wp_enqueue_script('wpm-my-upload');
|
370 |
|
371 |
-
wp_enqueue_style('jquery-defaut-style',
|
372 |
-
wp_enqueue_style('jquery-date-style',
|
373 |
-
wp_enqueue_style('jquery-time-style',
|
374 |
-
wp_enqueue_style('jquery-fontselect-style',
|
375 |
|
376 |
wp_enqueue_style( 'wp-color-picker' );
|
377 |
-
wp_enqueue_script( 'my-script-handle',
|
378 |
|
379 |
wp_enqueue_style('thickbox');
|
380 |
|
381 |
/* Image picker */
|
382 |
wp_enqueue_style('imagepicker');
|
383 |
-
wp_enqueue_style('imagepicker',
|
384 |
|
385 |
-
wp_register_script('imagepickerjs',
|
386 |
wp_enqueue_script('imagepickerjs');
|
387 |
|
388 |
$wpm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/css'));
|
@@ -391,8 +486,10 @@ class WP_maintenance {
|
|
391 |
wp_enqueue_script('wp-theme-plugin-editor');
|
392 |
wp_enqueue_style('wp-codemirror');
|
393 |
|
394 |
-
wp_register_script('wpm_sticky',
|
395 |
wp_enqueue_script('wpm_sticky');
|
|
|
|
|
396 |
|
397 |
// If you're not including an image upload then you can leave this function call out
|
398 |
wp_enqueue_media();
|
@@ -403,9 +500,12 @@ class WP_maintenance {
|
|
403 |
'title' => __( 'Choose Image', 'wp-maintenance' ),
|
404 |
) );
|
405 |
|
406 |
-
wp_register_script('wpm-admin-fontselect',
|
407 |
wp_enqueue_script('wpm-admin-fontselect');
|
408 |
|
|
|
|
|
|
|
409 |
}
|
410 |
|
411 |
}
|
@@ -492,90 +592,17 @@ class WP_maintenance {
|
|
492 |
function wpm_print_footer_scripts() {
|
493 |
|
494 |
if (isset($_GET['page']) && strpos($_GET['page'], 'wp-maintenance') !==false) {
|
495 |
-
wp_register_script('wpm-picker',
|
496 |
wp_enqueue_script('wpm-picker');
|
497 |
-
wp_register_script('wpm-datepicker',
|
498 |
wp_enqueue_script('wpm-datepicker');
|
499 |
-
wp_register_script('wpm-timepicker',
|
500 |
wp_enqueue_script('wpm-timepicker');
|
501 |
-
wp_register_script('wpm-legacy',
|
502 |
wp_enqueue_script('wpm-legacy');
|
503 |
}
|
504 |
}
|
505 |
|
506 |
-
/**
|
507 |
-
* Process a settings export that generates a .json file of the erident settings
|
508 |
-
*/
|
509 |
-
function wpm_process_settings_export() {
|
510 |
-
|
511 |
-
if( empty( $_POST['wpm_action'] ) || 'export_settings' != $_POST['wpm_action'] )
|
512 |
-
return;
|
513 |
-
|
514 |
-
if( ! wp_verify_nonce( $_POST['wpm_export_nonce'], 'wpm_export_nonce' ) )
|
515 |
-
return;
|
516 |
-
|
517 |
-
if( ! current_user_can( 'manage_options' ) )
|
518 |
-
return;
|
519 |
-
|
520 |
-
$settingsJson = array(
|
521 |
-
'settings' => get_option('wp_maintenance_settings'),
|
522 |
-
'social' => get_option('wp_maintenance_social'),
|
523 |
-
'social_options' => get_option('wp_maintenance_social_options'),
|
524 |
-
'limit' => get_option('wp_maintenance_limit'),
|
525 |
-
'ipaddresses' => get_option('wp_maintenance_ipaddresses'),
|
526 |
-
'style' => get_option('wp_maintenance_style')
|
527 |
-
);
|
528 |
-
|
529 |
-
ignore_user_abort( true );
|
530 |
-
|
531 |
-
nocache_headers();
|
532 |
-
header( 'Content-Type: application/json; charset=utf-8' );
|
533 |
-
header( 'Content-Disposition: attachment; filename=wp-maintenance-' . date( 'm-d-Y' ) . '.json' );
|
534 |
-
header( "Expires: 0" );
|
535 |
-
|
536 |
-
echo json_encode( $settingsJson );
|
537 |
-
exit;
|
538 |
-
}
|
539 |
-
|
540 |
-
|
541 |
-
/**
|
542 |
-
* Process a settings import from a json file
|
543 |
-
*/
|
544 |
-
function wpm_process_settings_import() {
|
545 |
-
|
546 |
-
if( empty( $_POST['wpm_action'] ) || 'import_settings' != $_POST['wpm_action'] )
|
547 |
-
return;
|
548 |
-
|
549 |
-
if( ! wp_verify_nonce( $_POST['wpm_import_nonce'], 'wpm_import_nonce' ) )
|
550 |
-
return;
|
551 |
-
|
552 |
-
if( ! current_user_can( 'manage_options' ) )
|
553 |
-
return;
|
554 |
-
|
555 |
-
$extensionExploded = explode('.', esc_url($_FILES['wpm_import_file']['name']));
|
556 |
-
$extension = strtolower(end($extensionExploded));
|
557 |
-
|
558 |
-
if( $extension != 'json' ) {
|
559 |
-
wp_die( __( 'Please upload a valid .json file' ) );
|
560 |
-
}
|
561 |
-
|
562 |
-
$import_file = $_FILES['wpm_import_file']['tmp_name'];
|
563 |
-
|
564 |
-
if( empty( $import_file ) ) {
|
565 |
-
wp_die( __( 'Please upload a file to import', 'wp-maintenance' ) );
|
566 |
-
}
|
567 |
-
|
568 |
-
// Retrieve the settings from the file and convert the json object to an array.
|
569 |
-
$settings = (array) json_decode( file_get_contents( $import_file ), true);
|
570 |
-
|
571 |
-
foreach($settings as $name=>$value) {
|
572 |
-
update_option('wp_maintenance_'.$name, $value);
|
573 |
-
}
|
574 |
-
|
575 |
-
echo '<div id="message" class="updated fade"><p><strong>' . __('New settings imported successfully!', 'wp-maintenance') . '</strong></p></div>';
|
576 |
-
|
577 |
-
}
|
578 |
-
|
579 |
/* Check le Mode Maintenance si on doit l'activer ou non */
|
580 |
function wpm_check_active() {
|
581 |
|
@@ -652,13 +679,19 @@ class WP_maintenance {
|
|
652 |
|
653 |
$paramSocialOption = get_option('wp_maintenance_social_options');
|
654 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
655 |
/* on doit retourner 12/31/2020 5:00 AM */
|
656 |
$dateNow = strtotime(date("Y-m-d H:i:s")) + 3600 * get_option('gmt_offset');
|
657 |
-
if(
|
658 |
-
$dateFinCpt = strtotime( date(
|
659 |
-
|
660 |
-
$dateFinCpt = strtotime( date( str_replace('/', '-', $paramMMode['cptdate']).' '.$paramMMode['cpttime'].':00') );
|
661 |
-
$dateCpt = date( 'm/d/Y h:i A', strtotime( $paramMMode['cptdate'].' '.$paramMMode['cpttime'] ) );
|
662 |
} else {
|
663 |
$dateCpt = '';
|
664 |
}
|
@@ -674,13 +707,13 @@ class WP_maintenance {
|
|
674 |
$urlTpl = '';
|
675 |
}
|
676 |
|
677 |
-
if( isset($
|
678 |
include_once( $urlTpl );
|
679 |
die();
|
680 |
}
|
681 |
|
682 |
/* Si on désactive le mode maintenance en fin de compte à rebours */
|
683 |
-
if( ( isset($
|
684 |
|
685 |
if( $dateNow > $dateFinCpt ) {
|
686 |
$ChangeStatus = wpm_change_active();
|
@@ -690,8 +723,8 @@ class WP_maintenance {
|
|
690 |
|
691 |
$statusPageActive = 1;
|
692 |
/*Désactive le mode maintenance pour les PAGE ID définies */
|
693 |
-
if( isset($
|
694 |
-
$listPageId = explode(',', $
|
695 |
foreach($listPageId as $keyPageId => $valPageId) {
|
696 |
if( isset($post->ID) && trim($valPageId) == $post->ID ) {
|
697 |
$statusPageActive = 0;
|
@@ -722,7 +755,7 @@ class WP_maintenance {
|
|
722 |
nocache_headers();
|
723 |
if ($statusPageActive == 1) {
|
724 |
|
725 |
-
if( isset($
|
726 |
header('HTTP/1.1 503 Service Temporarily Unavailable');
|
727 |
header('Status: 503 Service Temporarily Unavailable');
|
728 |
header('Retry-After: 86400'); // retry in a day
|
32 |
add_action( 'admin_head', array( &$this, 'wpm_admin_head') );
|
33 |
add_action( 'admin_bar_menu', array( &$this, 'wpm_add_menu_admin_bar'), 999 );
|
34 |
add_action( 'admin_footer', array( &$this, 'wpm_print_footer_scripts') );
|
35 |
+
//add_action( 'after_setup_theme', array( &$this, 'wpm_theme_add_editor_styles') );
|
|
|
|
|
36 |
}
|
37 |
|
38 |
}
|
39 |
|
40 |
function wpm_theme_add_editor_styles() {
|
41 |
+
//add_editor_style( WPM_URL.'css/custom-editor-style.css' );
|
42 |
}
|
43 |
|
44 |
/**
|
51 |
|
52 |
public static function wpm_dashboard_install() {
|
53 |
|
54 |
+
|
55 |
+
if ( get_option('wp_maintenance_active', false) == false or get_option('wp_maintenance_active')=='' ) {
|
56 |
+
add_option('wp_maintenance_active', 0);
|
57 |
+
}
|
58 |
+
|
59 |
+
if ( get_option('wp_maintenance_style', false) == false or get_option('wp_maintenance_style')=='' ) {
|
60 |
+
add_option('wp_maintenance_style', wpm_print_style());
|
61 |
+
}
|
62 |
+
|
63 |
+
$wpmAdminOptions = array(
|
64 |
'titre_maintenance' => __('This site is down for maintenance', 'wp-maintenance'),
|
65 |
'text_maintenance' => __('Come back quickly!', 'wp-maintenance'),
|
66 |
+
'newletter' => 0,
|
67 |
+
'title_newletter' => '',
|
68 |
+
'code_newletter' => '',
|
69 |
+
'type_newletter' => 'shortcode',
|
70 |
+
'iframe_newletter' => ''
|
71 |
+
);
|
72 |
+
if ( get_option('wp_maintenance_settings', false) == false or get_option('wp_maintenance_settings')=='' ) {
|
73 |
+
foreach ($wpmAdminOptions as $keyAdminOptions => $optionAdminOptions) {
|
74 |
+
$wpmAdminOptions[$keyAdminOptions] = $optionAdminOptions;
|
75 |
+
}
|
76 |
+
add_option('wp_maintenance_settings', $wpmAdminOptions);
|
77 |
+
}
|
78 |
+
|
79 |
+
/* DEFINITION PARAMS COLORS */
|
80 |
+
$wpmSetsColorsOptions = array(
|
81 |
+
'color_bg' => "#f1f1f1",
|
82 |
+
'color_bg_header' => '#ffffff',
|
83 |
+
'color_title' => '#333333',
|
84 |
+
'font_title' => 'Anton',
|
85 |
+
'font_title_size' => '16',
|
86 |
+
'font_title_weigth' => '',
|
87 |
'font_title_style' => '',
|
88 |
+
'color_txt' => '#333333',
|
89 |
+
'font_text' => 'Anton',
|
90 |
+
'font_text_size' => '16',
|
91 |
+
'font_text_weigth' => '',
|
92 |
'font_text_style' => '',
|
93 |
+
'container_active' => 0,
|
94 |
+
'container_colorcontainer_opacity' => '0.5',
|
95 |
+
'container_width' => '80',
|
|
|
|
|
|
|
|
|
|
|
96 |
'color_cpt' => '#333333',
|
97 |
+
'color_cpt_bg' => '#ffffff',
|
98 |
+
'font_cpt' => 'Pacifico',
|
99 |
+
'date_cpt_size' => '6',
|
100 |
+
'font_end_cpt' => 'Pacifico',
|
101 |
+
'cpt_end_size' => '2',
|
102 |
+
'color_text_bottom' => '#ffffff',
|
103 |
+
'color_bg_bottom' => '#333333',
|
104 |
+
'font_text_bottom' => 'PT+Sans',
|
105 |
+
'font_bottom_size' => '12',
|
106 |
+
'font_bottom_weigth' => '',
|
107 |
+
'font_bottom_style' => '',
|
108 |
+
'newletter' => 0,
|
109 |
+
'newletter_font_text' => 'PT+Sans',
|
110 |
+
'newletter_size' => '14',
|
111 |
+
'newletter_font_weigth' => '',
|
112 |
+
'newletter_font_style' => '',
|
113 |
'color_field_text' => '#333333',
|
|
|
|
|
114 |
'color_field_border' => '#333333',
|
115 |
+
'color_field_background' => '#CCCCCC',
|
116 |
+
'color_text_button' => '#ffffff',
|
117 |
'color_button' => '#1e73be',
|
118 |
+
'color_button_hover' => '#ffffff',
|
119 |
+
'color_button_onclick' => '#ffffff'
|
120 |
+
);
|
121 |
+
|
122 |
+
if ( get_option('wp_maintenance_settings_colors', false) == false or get_option('wp_maintenance_settings_colors')=='' ) {
|
123 |
+
foreach ($wpmSetsColorsOptions as $keyColorsOptions => $optionColorsOptions) {
|
124 |
+
$wpmSetsColorsOptions[$keyColorsOptions] = $optionColorsOptions;
|
125 |
+
}
|
126 |
+
add_option('wp_maintenance_settings_colors', $wpmSetsColorsOptions);
|
127 |
+
}
|
128 |
+
|
129 |
+
/* DEFINITION PARAMS PICTURE */
|
130 |
+
$wpmSetsPicturesOptions = array(
|
131 |
+
|
132 |
+
'image' => plugin_dir_url( __DIR__ ).'images/default2.png',
|
133 |
+
'image_width' => 450,
|
134 |
+
'image_height' => 450,
|
135 |
'b_enable_image' => 0,
|
136 |
+
'b_image' => '',
|
137 |
'b_opacity_image' => '0.2',
|
138 |
+
'b_repeat_image' => 'repeat',
|
139 |
+
'b_fixed_image' => 1,
|
140 |
+
'b_pattern' => 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
);
|
142 |
+
|
143 |
+
if ( get_option('wp_maintenance_settings_picture', false) == false or get_option('wp_maintenance_settings_picture')=='' ) {
|
144 |
+
foreach ($wpmSetsPicturesOptions as $keyPicturesOptions => $optionPicturesOptions) {
|
145 |
+
$wpmSetsPicturesOptions[$keyPicturesOptions] = $optionPicturesOptions;
|
146 |
}
|
147 |
+
add_option('wp_maintenance_settings_picture', $wpmSetsPicturesOptions);
|
148 |
}
|
149 |
|
150 |
+
/* DEFINITION PARAMS COUNTDOWN */
|
151 |
+
$wpmSetsCountdownOptions = array(
|
152 |
+
'active_cpt' => 0,
|
153 |
+
'date_cpt_hh' => '',
|
154 |
+
'cptdate' => '',
|
155 |
+
'cpttime' => '',
|
156 |
+
'active_cpt_s' => '',
|
157 |
+
'disable' => '',
|
158 |
+
'message_cpt_fin' => ''
|
159 |
+
);
|
160 |
+
if ( get_option('wp_maintenance_settings_countdown', false) == false or get_option('wp_maintenance_settings_countdown')=='' ) {
|
161 |
+
foreach ($wpmSetsCountdownOptions as $keyCountdownOptions => $optionCountdownOptions) {
|
162 |
+
$wpmSetsCountdownOptions[$keyCountdownOptions] = $optionCountdownOptions;
|
163 |
+
}
|
164 |
+
add_option('wp_maintenance_settings_countdown', $wpmSetsCountdownOptions);
|
165 |
+
}
|
166 |
|
167 |
+
/* DEFINITION PARAMS CSS */
|
168 |
+
if ( get_option('wp_maintenance_settings_css', false) == false or get_option('wp_maintenance_settings_css')=='' ) {
|
169 |
+
add_option('wp_maintenance_settings_css', wpm_print_style() );
|
170 |
}
|
171 |
|
172 |
+
/* DEFINITION PARAMS SEO */
|
173 |
+
$wpmSetsSeoOptions = array(
|
174 |
+
'enable_seo' => 0,
|
175 |
+
'seo_title' => '',
|
176 |
+
'seo_description' => '',
|
177 |
+
'favicon' => ''
|
178 |
+
);
|
179 |
+
if ( get_option('wp_maintenance_settings_seo', false) == false or get_option('wp_maintenance_settings_seo')=='' ) {
|
180 |
+
foreach ($wpmSetsSeoOptions as $keySeoOptions => $optionSeoOptions) {
|
181 |
+
$wpmSetsSeoOptions[$keySeoOptions] = $optionSeoOptions;
|
182 |
+
}
|
183 |
+
add_option('wp_maintenance_settings_seo', $wpmSetsSeoOptions);
|
184 |
+
}
|
185 |
|
186 |
+
/* DEFINITION PARAMS SOCIAL NETWORKS */
|
187 |
+
$wpmSocialsNetworksOptions = array(
|
188 |
'enable' => 0,
|
189 |
+
'texte' => __('Follow me on', 'wp-maintenance'),
|
|
|
190 |
'size' => 64,
|
191 |
+
'style' => 'style1',
|
192 |
'position' => 'bottom',
|
193 |
'align' => 'center',
|
194 |
'theme' => ''
|
195 |
);
|
196 |
+
if ( get_option('wp_maintenance_settings_socialnetworks', false) == false or get_option('wp_maintenance_settings_socialnetworks')=='' ) {
|
197 |
+
foreach ($wpmSocialsNetworksOptions as $keyNetworksOptions => $optionNetworksOptions) {
|
198 |
+
$wpmSocialsNetworksOptions[$keyNetworksOptions] = $optionNetworksOptions;
|
199 |
+
}
|
200 |
+
add_option('wp_maintenance_settings_socialnetworks', $wpmSocialsNetworksOptions);
|
201 |
+
}
|
202 |
+
|
203 |
+
/* DEFINITION PARAMS LIST SOCIAL NETWORKS */
|
204 |
+
$wpmListSocialsNetworksOptions = array(
|
205 |
+
'facebook' => '',
|
206 |
+
'twitter' => '',
|
207 |
+
'linkedin' => '',
|
208 |
+
'flickr' => '',
|
209 |
+
'youtube' => '',
|
210 |
+
'pinterest' => '',
|
211 |
+
'vimeo' => '',
|
212 |
+
'instagram' => '',
|
213 |
+
'about_me' => '',
|
214 |
+
'soundcloud' => '',
|
215 |
+
'skype' => '',
|
216 |
+
'tumblr' => '',
|
217 |
+
'blogger' => '',
|
218 |
+
'paypal' => '',
|
219 |
+
'email' => '',
|
220 |
+
);
|
221 |
+
if ( get_option('wp_maintenance_list_socialnetworks', false) == false or get_option('wp_maintenance_list_socialnetworks')=='' ) {
|
222 |
+
foreach ($wpmListSocialsNetworksOptions as $keyListNetworksOptions => $optionListNetworksOptions) {
|
223 |
+
$wpmListSocialsNetworksOptions[$keyListNetworksOptions] = $optionListNetworksOptions;
|
224 |
+
}
|
225 |
+
add_option('wp_maintenance_list_socialnetworks', $wpmListSocialsNetworksOptions);
|
226 |
+
}
|
227 |
|
228 |
+
/* DEFINITION PARAMS FOOTER */
|
229 |
+
$wpmSetsFootersOptions = array(
|
230 |
+
'enable_footer' => 0,
|
231 |
+
'text_bt_maintenance' => '',
|
232 |
+
'add_wplogin' => 0,
|
233 |
+
'add_wplogin_title' => ''
|
234 |
+
);
|
235 |
+
if ( get_option('wp_maintenance_settings_footer', false) == false or get_option('wp_maintenance_settings_footer')=='' ) {
|
236 |
+
foreach ($wpmSetsFootersOptions as $keyFootersOptions => $optionFootersOptions) {
|
237 |
+
$wpmSetsFootersOptions[$keyFootersOptions] = $optionFootersOptions;
|
238 |
}
|
239 |
+
add_option('wp_maintenance_settings_footer', $wpmSetsFootersOptions);
|
240 |
}
|
241 |
+
|
242 |
+
/* DEFINITION PARAMS SETTINGS */
|
243 |
+
$wpmSetsOptions = array(
|
244 |
+
'pageperso' => 0,
|
245 |
+
'dashboard_delete_db' => 0,
|
246 |
+
'error_503' => 1,
|
247 |
+
'id_pages' => '',
|
248 |
+
'headercode' => ''
|
249 |
+
);
|
250 |
+
if ( get_option('wp_maintenance_settings_options', false) == false or get_option('wp_maintenance_settings_options')=='' ) {
|
251 |
+
foreach ($wpmSetsOptions as $keySetsOptions => $optionSetsOptions) {
|
252 |
+
$wpmSetsOptions[$keySetsOptions] = $optionSetsOptions;
|
253 |
+
}
|
254 |
+
add_option('wp_maintenance_settings_options', $wpmSetsOptions);
|
255 |
+
}
|
256 |
|
257 |
}
|
258 |
|
267 |
|
268 |
delete_option('wp_maintenance_settings');
|
269 |
delete_option('wp_maintenance_version');
|
270 |
+
delete_option('wp_maintenance_settings_colors');
|
271 |
+
delete_option('wp_maintenance_settings_countdown');
|
272 |
+
delete_option('wp_maintenance_settings_seo');
|
273 |
+
delete_option('wp_maintenance_settings_socialnetworks');
|
274 |
+
delete_option('wp_maintenance_settings_footer');
|
275 |
+
delete_option('wp_maintenance_settings_options');
|
276 |
+
delete_option('wp_maintenance_limit');
|
277 |
delete_option('wp_maintenance_social_options');
|
|
|
278 |
delete_option('wp_maintenance_ipaddresses');
|
279 |
|
280 |
}
|
313 |
global $_wp_admin_css_colors;
|
314 |
// Add Style for all admin
|
315 |
echo '
|
316 |
+
<style>#wpadminbar .wpmbackground-on > .ab-item{ color:#fff;background-color: #f44; }#wpadminbar .wpmbackground-on .ab-icon:before { content: "\f107";top: 2px;color:#fff !important; }#wpadminbar .wpmbackground-on:hover > .ab-item{ background-color: #a30 !important;color:#fff !important; }#wpadminbar .wpmbackground-off > .ab-item{ color:#fff; }#wpadminbar .wpmbackground-off .ab-icon:before { content: "\f107";top: 2px;color:#fff !important; }</style>
|
317 |
';
|
318 |
if (isset($_GET['page']) && strpos($_GET['page'], 'wp-maintenance') !==false) {
|
319 |
+
//echo '<link rel="stylesheet" type="text/css" media="all" href="' .WPM_URL.'css/wpm-admin.css'.'">';
|
320 |
|
321 |
} else {
|
322 |
echo '
|
439 |
wp_enqueue_script('quicktags');
|
440 |
}
|
441 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
442 |
function wpm_add_admin() {
|
443 |
|
444 |
+
add_menu_page( 'WP Maintenance Settings', 'WP Maintenance', 'manage_options', 'wp-maintenance', array( $this, 'wpm_dashboard_page'), WPM_URL.'images/wpm-menu-icon.png' );
|
445 |
add_submenu_page( 'wp-maintenance', 'WP Maintenance > '.__('General', 'wp-maintenance'), __('General', 'wp-maintenance'), 'manage_options', 'wp-maintenance', array( $this, 'wpm_dashboard_page') );
|
446 |
add_submenu_page( 'wp-maintenance', 'WP Maintenance > '.__('Colors & Fonts', 'wp-maintenance'), __('Colors & Fonts', 'wp-maintenance'), 'manage_options', 'wp-maintenance-colors', array( $this, 'wpm_colors_page') );
|
447 |
add_submenu_page( 'wp-maintenance', 'WP Maintenance > '.__('Pictures', 'wp-maintenance'), __('Pictures', 'wp-maintenance'), 'manage_options', 'wp-maintenance-picture', array( $this, 'wpm_picture_page') );
|
460 |
wp_enqueue_script('media-upload');
|
461 |
wp_enqueue_script('thickbox');
|
462 |
|
463 |
+
wp_register_script('wpm-my-upload', WPM_URL.'js/wpm-script.js', array('jquery','media-upload','thickbox'));
|
464 |
wp_enqueue_script('wpm-my-upload');
|
465 |
|
466 |
+
wp_enqueue_style('jquery-defaut-style', WPM_URL.'js/lib/themes/default.css');
|
467 |
+
wp_enqueue_style('jquery-date-style', WPM_URL.'js/lib/themes/default.date.css');
|
468 |
+
wp_enqueue_style('jquery-time-style', WPM_URL.'js/lib/themes/default.time.css');
|
469 |
+
wp_enqueue_style('jquery-fontselect-style', WPM_URL.'js/fontselect/fontselect.css');
|
470 |
|
471 |
wp_enqueue_style( 'wp-color-picker' );
|
472 |
+
wp_enqueue_script( 'my-script-handle', WPM_URL.'js/wpm-color-options.js', array( 'wp-color-picker' ), false, true );
|
473 |
|
474 |
wp_enqueue_style('thickbox');
|
475 |
|
476 |
/* Image picker */
|
477 |
wp_enqueue_style('imagepicker');
|
478 |
+
wp_enqueue_style('imagepicker', WPM_URL.'css/image-picker.css');
|
479 |
|
480 |
+
wp_register_script('imagepickerjs', WPM_URL.'js/image-picker.min.js', 'jquery', WPM_VERSION);
|
481 |
wp_enqueue_script('imagepickerjs');
|
482 |
|
483 |
$wpm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/css'));
|
486 |
wp_enqueue_script('wp-theme-plugin-editor');
|
487 |
wp_enqueue_style('wp-codemirror');
|
488 |
|
489 |
+
wp_register_script('wpm_sticky', WPM_URL.'js/jquery.sticky.js', 'jquery', WPM_VERSION);
|
490 |
wp_enqueue_script('wpm_sticky');
|
491 |
+
|
492 |
+
wp_enqueue_script( 'emosm-leafletprovidersjs', WPM_URL.'js/jquery.sortable.js', 'jquery', WPM_VERSION);
|
493 |
|
494 |
// If you're not including an image upload then you can leave this function call out
|
495 |
wp_enqueue_media();
|
500 |
'title' => __( 'Choose Image', 'wp-maintenance' ),
|
501 |
) );
|
502 |
|
503 |
+
wp_register_script('wpm-admin-fontselect', WPM_URL.'js/fontselect/jquery.fontselect.min.js' );
|
504 |
wp_enqueue_script('wpm-admin-fontselect');
|
505 |
|
506 |
+
wp_enqueue_style('admincss');
|
507 |
+
wp_enqueue_style('admincss', WPM_URL.'css/wpm-admin.css');
|
508 |
+
|
509 |
}
|
510 |
|
511 |
}
|
592 |
function wpm_print_footer_scripts() {
|
593 |
|
594 |
if (isset($_GET['page']) && strpos($_GET['page'], 'wp-maintenance') !==false) {
|
595 |
+
wp_register_script('wpm-picker', WPM_URL.'js/lib/picker.js' );
|
596 |
wp_enqueue_script('wpm-picker');
|
597 |
+
wp_register_script('wpm-datepicker', WPM_URL.'js/lib/picker.date.js' );
|
598 |
wp_enqueue_script('wpm-datepicker');
|
599 |
+
wp_register_script('wpm-timepicker', WPM_URL.'js/lib/picker.time.js' );
|
600 |
wp_enqueue_script('wpm-timepicker');
|
601 |
+
wp_register_script('wpm-legacy', WPM_URL.'js/lib/legacy.js' );
|
602 |
wp_enqueue_script('wpm-legacy');
|
603 |
}
|
604 |
}
|
605 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
606 |
/* Check le Mode Maintenance si on doit l'activer ou non */
|
607 |
function wpm_check_active() {
|
608 |
|
679 |
|
680 |
$paramSocialOption = get_option('wp_maintenance_social_options');
|
681 |
|
682 |
+
// Récupère les paramètres sauvegardés Options
|
683 |
+
if(get_option('wp_maintenance_settings_options')) { extract(get_option('wp_maintenance_settings_options')); }
|
684 |
+
$paramsOptions = get_option('wp_maintenance_settings_options');
|
685 |
+
|
686 |
+
// Récupère les paramètres sauvegardés compte à rebours
|
687 |
+
if(get_option('wp_maintenance_settings_countdown')) { extract(get_option('wp_maintenance_settings_countdown')); }
|
688 |
+
$paramsCountdown = get_option('wp_maintenance_settings_countdown');
|
689 |
+
|
690 |
/* on doit retourner 12/31/2020 5:00 AM */
|
691 |
$dateNow = strtotime(date("Y-m-d H:i:s")) + 3600 * get_option('gmt_offset');
|
692 |
+
if( isset($paramsCountdown['cptdate']) && !empty($paramsCountdown['cptdate']) ) {
|
693 |
+
$dateFinCpt = strtotime( date( str_replace('/', '-', $paramsCountdown['cptdate']).' '.$paramsCountdown['cpttime'].':00') );
|
694 |
+
$dateCpt = date( 'm/d/Y h:i A', strtotime( $paramsCountdown['cptdate'].' '.$paramsCountdown['cpttime'] ) );
|
|
|
|
|
695 |
} else {
|
696 |
$dateCpt = '';
|
697 |
}
|
707 |
$urlTpl = '';
|
708 |
}
|
709 |
|
710 |
+
if( isset($paramsOptions['pageperso']) && $paramsOptions['pageperso']==1 && $urlTpl !== '' ) {
|
711 |
include_once( $urlTpl );
|
712 |
die();
|
713 |
}
|
714 |
|
715 |
/* Si on désactive le mode maintenance en fin de compte à rebours */
|
716 |
+
if( ( isset($paramsCountdown['disable']) && $paramsCountdown['disable']==1 ) && $this->wpm_check_active() == 1 ) {
|
717 |
|
718 |
if( $dateNow > $dateFinCpt ) {
|
719 |
$ChangeStatus = wpm_change_active();
|
723 |
|
724 |
$statusPageActive = 1;
|
725 |
/*Désactive le mode maintenance pour les PAGE ID définies */
|
726 |
+
if( isset($paramsOptions['id_pages']) && !empty($paramsOptions['id_pages']) ) {
|
727 |
+
$listPageId = explode(',', $paramsOptions['id_pages']);
|
728 |
foreach($listPageId as $keyPageId => $valPageId) {
|
729 |
if( isset($post->ID) && trim($valPageId) == $post->ID ) {
|
730 |
$statusPageActive = 0;
|
755 |
nocache_headers();
|
756 |
if ($statusPageActive == 1) {
|
757 |
|
758 |
+
if( isset($paramsOptions['error_503']) && $paramsOptions['error_503']== 1 ) {
|
759 |
header('HTTP/1.1 503 Service Temporarily Unavailable');
|
760 |
header('Status: 503 Service Temporarily Unavailable');
|
761 |
header('Retry-After: 86400'); // retry in a day
|
css/wpm-admin.css
CHANGED
@@ -1,78 +1,4 @@
|
|
1 |
#pattern{text-align:left;margin:5px 0;word-spacing:-1em;list-style-type:none}#pattern li{display:inline-block;list-style:none;margin-right:15px;text-align:center}#pattern li.current{background:#6c0;color:#fff}.wpmdashicons{position:absolute;right:35px;top:24px;font-size:40px;opacity:.2}.wp-maintenance-flex,.wp-maintenance-flex-spaced{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center}.wp-maintenance-flex-top{-webkit-box-align:initial;-webkit-align-items:initial;-ms-flex-align:initial;-ms-grid-row-align:initial;align-items:initial}.wp-maintenance-wrapper{max-width:100%;padding-top:10px;overflow:hidden}.wp-maintenance-modules-sidebar{-ms-flex-preferred-size:240px;flex-basis:240px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:0;flex-grow:0;width:240px;padding:0;border:none;border-radius:3px;background:#414548;color:#f2f2f6;margin-right:-2px}.wp-maintenance-modules-list-links{margin:0;padding:0;list-style:none}[class*=" wp-maintenance-"],[class^=wp-maintenance-]{box-sizing:border-box}.wp-maintenance-modules-list-links li{display:block;margin:0;padding:0;height:80px}.wp-maintenance-modules-list-links a{position:relative;display:block;padding:16px 55px 15px 15px;border-top:1px solid rgba(255,255,255,.15);color:#d6d5aa;overflow:hidden;font-weight:500;text-decoration:none;transition:all .275s;height:47px}[class^=wp-maintenance-] input[type=email],[class^=wp-maintenance-] input[type=number],[class^=wp-maintenance-] input[type=password],[class^=wp-maintenance-] input[type=tel],[class^=wp-maintenance-] input[type=text],[class^=wp-maintenance-] input[type=url]{border:2px solid #D6D5AA;font-size:13px;padding:7px 10px;height:auto;box-shadow:none}.wp-maintenance-input{padding:7px 10px;font-size:13px;border:2px solid #D6D5AA;background-color:#fff;height:auto;box-shadow:none}.wp-maintenance-input:active,.wp-maintenance-input:focus{outline:0;border:2px solid #D6D5AA;background-color:#fff;box-shadow:none}.wp-maintenance-modules-sidebar a.active{background:rgba(255,255,255,.15)}.wp-maintenance-modules-sidebar a:hover{background:rgba(255,255,255,.15)}.wp-maintenance-modules-list-links{margin:0;padding:0;list-style:none}.wp-maintenance-modules-list-links .wp-maintenance-tab-name{font-size:13px}.wp-maintenance-modules-list-links a span{display:block}.wp-maintenance-modules-list-links .wp-maintenance-tab-name{font-size:13px}.wp-maintenance-modules-list-links a span{display:block}.wp-maintenance-modules-list-links .wp-maintenance-tab-summary{position:relative;z-index:1;color:#fff;font-size:11px;text-shadow:0 0 2px #222}.wp-maintenance-tab-content{width:100%;position:relative;background:#fff;border-radius:0 3px 3px 0;border:1px solid #ccc}.wp-maintenance-tab-content-header{position:relative;padding:15px 175px 18px 20px;background:#f2f2f6;color:#5a626f;border-bottom:2px solid #848838;font-size:22px}.wp-maintenance-module-options-block{padding:15px 20px;border-top: 2px solid #848838;}.wp-maintenance-sideads{-ms-flex-preferred-size:280px;flex-basis:280px;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;width:280px;margin-left:20px;min-width:0}.wp-maintenance-bordered{border:1px solid #ccc}.wp-maintenance-ad-header{padding:10px 25px;border-bottom:1px solid #ccc;background:#D6D5AA}.wp-maintenance-ad-content{background:#fff;line-height:0}.wp-maintenance-ad-content-padded{padding:20px 25px 18px}.wp-maintenance-settings-section-header{margin:25px 0 25px}.wp-maintenance-settings-section-title{font-size:18px;margin-bottom:0;color:#848838;text-transform:uppercase}label.wp-maintenance-setting-row-title{display:block}.wp-maintenance-setting-row-title{margin:10px 0;font-size:14px;font-weight:400;color:#848838}.wp-maintenance-fieldset-item{padding:15px;border:2px solid #D6D5AA;border-radius:2px}.wp-maintenance-container{display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-maintenance-label-text{position:relative;display:inline-block;padding-left:32px;margin:.3em 0}.wp-maintenance-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.wp-maintenance-checkmark{position:absolute;top:0;left:0;height:25px;width:25px;border-radius:2px;border:2px solid #D6D5AA}.wp-maintenance-container:hover input~.wp-maintenance-checkmark{background-color:#ccc;border:2px solid #D6D5AA}.wp-maintenance-container input:checked~.wp-maintenance-checkmark{background-color:#848838;border:1px solid #D6D5AA}.wp-maintenance-checkmark:after{content:"";position:absolute;display:none;border:2px solid #D6D5AA}.wp-maintenance-container input:checked~.checkmark:after{display:block}.wp-maintenance-container .checkmark:after{top:9px;left:9px;width:8px;height:8px;border-radius:50%;background:#fff;border:2px solid #D6D5AA}.wp-maintenance-container input:checked~.wp-maintenance-checkmark:after{display:block}.wp-maintenance-container .wp-maintenance-checkmark:after{left:7px;top:2px;width:5px;height:10px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.wp-maintenance-tc-title{margin-top:1em;font-size:25px;margin-left:0;font-weight:600;color:#393e46}.wp-maintenance-button .wp-maintenance-button,.wp-maintenance-button-primary,.wp-maintenance-button-secondary .wp-maintenance-button-secondary,.wp-maintenance-button-tertiary .wp-maintenance-button-tertiary{display:inline-block;height:auto;margin:.1em 0;padding:7px 20px 8px;border:0;font-size:14px;line-height:1.5;font-weight:700;text-transform:uppercase;color:#fff;text-decoration:none;text-shadow:none;box-shadow:none;white-space:nowrap;border-radius:3px;-webkit-appearance:none;cursor:pointer;background:#848838}.wp-maintenance-button .wp-maintenance-button-primary:hover{background:#d6d5aa;color:#848838}.wp-maintenance-ad-content>:first-child,p.submit{margin-top:0}p.submit{text-align:left;max-width:100%;margin-top:20px;padding-top:10px}.submit{padding:1.5em 0;margin:5px 0;border-bottom-left-radius:3px;border-bottom-right-radius:3px;border:none}.wp-maintenance-module-options-block [class^=wp-maintenance-button]{font-weight:700;font-size:1.2em;letter-spacing:.075em;color:#fff}.wp-maintenance-button-primary .wp-maintenance-button-primary{background:#848838}[class^=wp-maintenance-] ::selection{background:#848838;color:#fff}.wp-maintenance-encadre{margin-top:2em;width:80%;margin-left:auto;margin-right:auto;padding:15px;border:2px solid #D6D5AA;border-radius:2px;text-align:center}.wp-maintenance-setting-row{padding:5px 20px 5px 18px;border-top:0;background:#fff}.wp-maintenance-setting-row>h3{color:#848838}.wpm-container{position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;font-size:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:12px}.wpm-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.wpm-checkmark{position:absolute;top:0;left:0;height:20px;width:20px;border:2px solid #D6D5AA;border-radius:50%}.wpm-container:hover input~.wpm-checkmark{background-color:#ccc}.wpm-container input:checked~.wpm-checkmark{background-color:#848838}.wpm-checkmark:after{content:"";position:absolute;display:none}.wpm-container input:checked~.wpm-checkmark:after{display:block}.wpm-container .wpm-checkmark:after{left:8px;top:3px;width:3px;height:9px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.pattern-used{width:200px;height:200px;border:1px solid #ddd;margin-left:auto;margin-right:auto}.wp-core-ui .button,.wp-core-ui .button-secondary{color:#eee;border-color:#eee;background:#848838}.wp-core-ui .button-secondary:hover,.wp-core-ui .button.hover,.wp-core-ui .button:hover{background:#f1f1f1;border-color:#eee;color:#848838}.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{background:#f3f5f6;border-color:#eee;color:#eee;box-shadow:0 0 0 1px #eee;outline:2px solid transparent;outline-offset:0;color:#848838}.wp-core-ui .button-secondary:active,.wp-core-ui .button:active{background:#f3f5f6;border-color:#7e8993;box-shadow:none;color:#848838}.wp-core-ui .button.active,.wp-core-ui .button.active:hover{background-color:#f3f5f6;color:#eee;border-color:#eee;box-shadow:inset 0 2px 5px -3px #eee;color:#848838}.wp-core-ui .button.active:focus{border-color:#eee;box-shadow:inset 0 2px 5px -3px #eee,0 0 0 1px #eee;color:#848838}
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
margin: 0 auto;
|
6 |
-
background-color: white;
|
7 |
-
position: sticky;
|
8 |
-
top: 0px;
|
9 |
-
}
|
10 |
-
.conteneur-nav{
|
11 |
-
position: absolute;
|
12 |
-
width: 100%;
|
13 |
-
}
|
14 |
-
nav input[type=checkbox]{
|
15 |
-
display: none;
|
16 |
-
}
|
17 |
-
nav label{
|
18 |
-
display: inline-block;
|
19 |
-
width: 100%;
|
20 |
-
padding: 10px 0px;
|
21 |
-
text-align: center;
|
22 |
-
background-color: gold;
|
23 |
-
}
|
24 |
-
nav ul{
|
25 |
-
display: none;
|
26 |
-
list-style-type: none;
|
27 |
-
background-color: #555;
|
28 |
-
}
|
29 |
-
nav input[type=checkbox]:checked + ul{
|
30 |
-
display: flex;
|
31 |
-
flex-flow : column wrap;
|
32 |
-
}
|
33 |
-
nav ul li{
|
34 |
-
flex: 1 1 auto;
|
35 |
-
text-align: center;
|
36 |
-
}
|
37 |
-
nav > div > ul > li > a{
|
38 |
-
color: white;
|
39 |
-
}
|
40 |
-
nav a{
|
41 |
-
display: block;
|
42 |
-
text-decoration: none;
|
43 |
-
color: black;
|
44 |
-
padding: 10px 0px;
|
45 |
-
}
|
46 |
-
|
47 |
-
@media screen and (min-width: 980px){
|
48 |
-
.conteneur-nav{
|
49 |
-
position: static;
|
50 |
-
}
|
51 |
-
nav label, nav input{
|
52 |
-
display: none;
|
53 |
-
}
|
54 |
-
nav input[type=checkbox]:checked + ul, nav ul{
|
55 |
-
display: flex;
|
56 |
-
flex-flow: row wrap;
|
57 |
-
}
|
58 |
-
nav ul li{
|
59 |
-
position: relative;
|
60 |
-
padding-top: 1.8em;
|
61 |
-
background-color: #D6D5AA;
|
62 |
-
margin-bottom: 0px!important;
|
63 |
-
}
|
64 |
-
nav > div > ul > li > a{
|
65 |
-
color: #848838;
|
66 |
-
}
|
67 |
-
nav a{
|
68 |
-
border-bottom: 2px solid transparent;
|
69 |
-
}
|
70 |
-
nav a:hover{
|
71 |
-
color: #848838;
|
72 |
-
border-bottom: 2px solid #848838;
|
73 |
-
}
|
74 |
-
.deroulant > a::after{
|
75 |
-
content:" ▼";
|
76 |
-
font-size: 12px;
|
77 |
-
}
|
78 |
-
}
|
1 |
#pattern{text-align:left;margin:5px 0;word-spacing:-1em;list-style-type:none}#pattern li{display:inline-block;list-style:none;margin-right:15px;text-align:center}#pattern li.current{background:#6c0;color:#fff}.wpmdashicons{position:absolute;right:35px;top:24px;font-size:40px;opacity:.2}.wp-maintenance-flex,.wp-maintenance-flex-spaced{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center}.wp-maintenance-flex-top{-webkit-box-align:initial;-webkit-align-items:initial;-ms-flex-align:initial;-ms-grid-row-align:initial;align-items:initial}.wp-maintenance-wrapper{max-width:100%;padding-top:10px;overflow:hidden}.wp-maintenance-modules-sidebar{-ms-flex-preferred-size:240px;flex-basis:240px;-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:0;flex-grow:0;width:240px;padding:0;border:none;border-radius:3px;background:#414548;color:#f2f2f6;margin-right:-2px}.wp-maintenance-modules-list-links{margin:0;padding:0;list-style:none}[class*=" wp-maintenance-"],[class^=wp-maintenance-]{box-sizing:border-box}.wp-maintenance-modules-list-links li{display:block;margin:0;padding:0;height:80px}.wp-maintenance-modules-list-links a{position:relative;display:block;padding:16px 55px 15px 15px;border-top:1px solid rgba(255,255,255,.15);color:#d6d5aa;overflow:hidden;font-weight:500;text-decoration:none;transition:all .275s;height:47px}[class^=wp-maintenance-] input[type=email],[class^=wp-maintenance-] input[type=number],[class^=wp-maintenance-] input[type=password],[class^=wp-maintenance-] input[type=tel],[class^=wp-maintenance-] input[type=text],[class^=wp-maintenance-] input[type=url]{border:2px solid #D6D5AA;font-size:13px;padding:7px 10px;height:auto;box-shadow:none}.wp-maintenance-input{padding:7px 10px;font-size:13px;border:2px solid #D6D5AA;background-color:#fff;height:auto;box-shadow:none}.wp-maintenance-input:active,.wp-maintenance-input:focus{outline:0;border:2px solid #D6D5AA;background-color:#fff;box-shadow:none}.wp-maintenance-modules-sidebar a.active{background:rgba(255,255,255,.15)}.wp-maintenance-modules-sidebar a:hover{background:rgba(255,255,255,.15)}.wp-maintenance-modules-list-links{margin:0;padding:0;list-style:none}.wp-maintenance-modules-list-links .wp-maintenance-tab-name{font-size:13px}.wp-maintenance-modules-list-links a span{display:block}.wp-maintenance-modules-list-links .wp-maintenance-tab-name{font-size:13px}.wp-maintenance-modules-list-links a span{display:block}.wp-maintenance-modules-list-links .wp-maintenance-tab-summary{position:relative;z-index:1;color:#fff;font-size:11px;text-shadow:0 0 2px #222}.wp-maintenance-tab-content{width:100%;position:relative;background:#fff;border-radius:0 3px 3px 0;border:1px solid #ccc}.wp-maintenance-tab-content-header{position:relative;padding:15px 175px 18px 20px;background:#f2f2f6;color:#5a626f;border-bottom:2px solid #848838;font-size:22px}.wp-maintenance-module-options-block{padding:15px 20px;border-top: 2px solid #848838;}.wp-maintenance-sideads{-ms-flex-preferred-size:280px;flex-basis:280px;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;width:280px;margin-left:20px;min-width:0}.wp-maintenance-bordered{border:1px solid #ccc}.wp-maintenance-ad-header{padding:10px 25px;border-bottom:1px solid #ccc;background:#D6D5AA}.wp-maintenance-ad-content{background:#fff;line-height:0}.wp-maintenance-ad-content-padded{padding:20px 25px 18px}.wp-maintenance-settings-section-header{margin:25px 0 25px}.wp-maintenance-settings-section-title{font-size:18px;margin-bottom:0;color:#848838;text-transform:uppercase}label.wp-maintenance-setting-row-title{display:block}.wp-maintenance-setting-row-title{margin:10px 0;font-size:14px;font-weight:400;color:#848838}.wp-maintenance-fieldset-item{padding:15px;border:2px solid #D6D5AA;border-radius:2px}.wp-maintenance-container{display:inline-block;position:relative;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-maintenance-label-text{position:relative;display:inline-block;padding-left:32px;margin:.3em 0}.wp-maintenance-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.wp-maintenance-checkmark{position:absolute;top:0;left:0;height:25px;width:25px;border-radius:2px;border:2px solid #D6D5AA}.wp-maintenance-container:hover input~.wp-maintenance-checkmark{background-color:#ccc;border:2px solid #D6D5AA}.wp-maintenance-container input:checked~.wp-maintenance-checkmark{background-color:#848838;border:1px solid #D6D5AA}.wp-maintenance-checkmark:after{content:"";position:absolute;display:none;border:2px solid #D6D5AA}.wp-maintenance-container input:checked~.checkmark:after{display:block}.wp-maintenance-container .checkmark:after{top:9px;left:9px;width:8px;height:8px;border-radius:50%;background:#fff;border:2px solid #D6D5AA}.wp-maintenance-container input:checked~.wp-maintenance-checkmark:after{display:block}.wp-maintenance-container .wp-maintenance-checkmark:after{left:7px;top:2px;width:5px;height:10px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.wp-maintenance-tc-title{margin-top:1em;font-size:25px;margin-left:0;font-weight:600;color:#393e46}.wp-maintenance-button .wp-maintenance-button,.wp-maintenance-button-primary,.wp-maintenance-button-secondary .wp-maintenance-button-secondary,.wp-maintenance-button-tertiary .wp-maintenance-button-tertiary{display:inline-block;height:auto;margin:.1em 0;padding:7px 20px 8px;border:0;font-size:14px;line-height:1.5;font-weight:700;text-transform:uppercase;color:#fff;text-decoration:none;text-shadow:none;box-shadow:none;white-space:nowrap;border-radius:3px;-webkit-appearance:none;cursor:pointer;background:#848838}.wp-maintenance-button .wp-maintenance-button-primary:hover{background:#d6d5aa;color:#848838}.wp-maintenance-ad-content>:first-child,p.submit{margin-top:0}p.submit{text-align:left;max-width:100%;margin-top:20px;padding-top:10px}.submit{padding:1.5em 0;margin:5px 0;border-bottom-left-radius:3px;border-bottom-right-radius:3px;border:none}.wp-maintenance-module-options-block [class^=wp-maintenance-button]{font-weight:700;font-size:1.2em;letter-spacing:.075em;color:#fff}.wp-maintenance-button-primary .wp-maintenance-button-primary{background:#848838}[class^=wp-maintenance-] ::selection{background:#848838;color:#fff}.wp-maintenance-encadre{margin-top:2em;width:80%;margin-left:auto;margin-right:auto;padding:15px;border:2px solid #D6D5AA;border-radius:2px;text-align:center}.wp-maintenance-setting-row{padding:5px 20px 5px 18px;border-top:0;background:#fff}.wp-maintenance-setting-row>h3{color:#848838}.wpm-container{position:relative;padding-left:35px;margin-bottom:12px;cursor:pointer;font-size:15px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:12px}.wpm-container input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}.wpm-checkmark{position:absolute;top:0;left:0;height:20px;width:20px;border:2px solid #D6D5AA;border-radius:50%}.wpm-container:hover input~.wpm-checkmark{background-color:#ccc}.wpm-container input:checked~.wpm-checkmark{background-color:#848838}.wpm-checkmark:after{content:"";position:absolute;display:none}.wpm-container input:checked~.wpm-checkmark:after{display:block}.wpm-container .wpm-checkmark:after{left:8px;top:3px;width:3px;height:9px;border:solid #fff;border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.pattern-used{width:200px;height:200px;border:1px solid #ddd;margin-left:auto;margin-right:auto}.wp-core-ui .button,.wp-core-ui .button-secondary{color:#eee;border-color:#eee;background:#848838}.wp-core-ui .button-secondary:hover,.wp-core-ui .button.hover,.wp-core-ui .button:hover{background:#f1f1f1;border-color:#eee;color:#848838}.wp-core-ui .button-secondary:focus,.wp-core-ui .button.focus,.wp-core-ui .button:focus{background:#f3f5f6;border-color:#eee;color:#eee;box-shadow:0 0 0 1px #eee;outline:2px solid transparent;outline-offset:0;color:#848838}.wp-core-ui .button-secondary:active,.wp-core-ui .button:active{background:#f3f5f6;border-color:#7e8993;box-shadow:none;color:#848838}.wp-core-ui .button.active,.wp-core-ui .button.active:hover{background-color:#f3f5f6;color:#eee;border-color:#eee;box-shadow:inset 0 2px 5px -3px #eee;color:#848838}.wp-core-ui .button.active:focus{border-color:#eee;box-shadow:inset 0 2px 5px -3px #eee,0 0 0 1px #eee;color:#848838}
|
2 |
+
nav{width:100%;margin:0 auto;background-color:#fff;position:sticky;top:0}.conteneur-nav{position:absolute;width:100%}nav input[type=checkbox]{display:none}nav label{display:inline-block;width:100%;padding:10px 0;text-align:center;background-color:gold}nav ul{display:none;list-style-type:none;background-color:#555}nav input[type=checkbox]:checked+ul{display:flex;flex-flow:column wrap}nav ul li{flex:1 1 auto;text-align:center}nav>div>ul>li>a{color:#fff}nav a{display:block;text-decoration:none;color:#000;padding:10px 0}@media screen and (min-width:980px){.conteneur-nav{position:static}nav input,nav label{display:none}nav input[type=checkbox]:checked+ul,nav ul{display:flex;flex-flow:row wrap}nav ul li{position:relative;padding-top:1.8em;background-color:#d6d5aa;margin-bottom:0!important}nav>div>ul>li>a{color:#848838}nav a{border-bottom:2px solid transparent}nav a:hover{color:#848838;border-bottom:2px solid #848838}.deroulant>a::after{content:" ▼";font-size:12px}}
|
3 |
+
.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #666;background:#848838;font-weight:700;color:#eee}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-corner-all,.ui-corner-bottom,.ui-corner-br,.ui-corner-right{border-bottom-right-radius:6px}.ui-corner-all,.ui-corner-bl,.ui-corner-bottom,.ui-corner-left{border-bottom-left-radius:6px}.ui-corner-all,.ui-corner-right,.ui-corner-top,.ui-corner-tr{border-top-right-radius:6px}.ui-corner-all,.ui-corner-left,.ui-corner-tl,.ui-corner-top{border-top-left-radius:6px}.ui-corner-all,.ui-corner-bottom,.ui-corner-br,.ui-corner-right{border-bottom-right-radius:6px}.ui-corner-all,.ui-corner-bl,.ui-corner-bottom,.ui-corner-left{border-bottom-left-radius:6px}.ui-corner-all,.ui-corner-right,.ui-corner-top,.ui-corner-tr{border-top-right-radius:6px}.ui-corner-all,.ui-corner-left,.ui-corner-tl,.ui-corner-top{border-top-left-radius:6px}.ui-widget-content{border:1px solid #666;background:#ccc;color:#fff}.ui-widget{font-family:Segoe UI,Arial,sans-serif;font-size:1.1em}.ui-slider-horizontal{height:.8em}.ui-slider{position:relative;text-align:left}
|
4 |
+
.headerpage{font-size: 23px;font-weight: 400;padding: 9px 15px 4px 0px;line-height: 29px;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css/wpm-responsiveslides.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.callbacks,.events,.rslides{list-style:none}.callbacks_container{position:relative;margin:0 auto}.callbacks{position:relative;overflow:hidden;width:100%;padding:0;margin:0}.callbacks li{position:absolute;width:100%;left:0;top:0}.callbacks img{display:block;position:relative;z-index:1;height:auto;width:100%;border:0}.callbacks .caption{display:block;position:absolute;z-index:2;font-size:20px;text-shadow:none;color:#fff;background:#000;background:rgba(0,0,0,.8);left:0;right:0;bottom:0;padding:10px 20px;margin:0;max-width:none}.callbacks_nav{position:absolute;-webkit-tap-highlight-color:transparent;top:52%;left:0;opacity:.7;z-index:3;text-indent:-9999px;overflow:hidden;text-decoration:none;height:61px;width:38px;margin-top:-45px}.callbacks_nav:active{opacity:1}.callbacks_nav.next{left:auto;background-position:right top;right:0}#slider3-pager a{display:inline-block;padding:0}#slider3-pager img{float:left}#slider3-pager .rslides_here a{background:0 0;box-shadow:0 0 0 2px #666}@media screen and (max-width:600px){.callbacks_nav{top:47%}}.rslides{position:relative;overflow:hidden;width:100%;padding:0;margin:0}.rslides li{-webkit-backface-visibility:hidden;position:absolute;display:none;width:100%;left:0;top:0}.rslides li:first-child{position:relative;display:block;float:left}.rslides img{display:block;height:auto;float:left;width:100%;border:0}
|
|
css/wpm-slideshow.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
*{margin:0;padding:0}.rslides{margin:0 auto}.rslides_container{margin-bottom:50px;position:relative;float:left;width:100%}.centered-btns_nav{z-index:3;position:absolute;-webkit-tap-highlight-color:transparent;top:50%;left:0;opacity:.7;text-indent:-9999px;overflow:hidden;text-decoration:none;height:61px;width:38px;margin-top:-45px}.large-btns_nav,.transparent-btns_nav{z-index:3;position:absolute;-webkit-tap-highlight-color:transparent;top:0;text-indent:-9999px;overflow:hidden}.centered-btns_nav:active{opacity:1}.centered-btns_nav.next{left:auto;background-position:right top;right:0}.transparent-btns_nav{left:0;display:block;background:#fff;opacity:0;filter:alpha(opacity=1);width:48%;height:91%}.transparent-btns_nav.next{left:auto;right:0}.large-btns_nav{opacity:.6;bottom:0;left:0;width:38px}.large-btns_nav:active{opacity:1}.large-btns_nav.next{left:auto;background-position:right 50%;right:0}.centered-btns_nav:focus,.large-btns_nav:focus,.transparent-btns_nav:focus{outline:0}.centered-btns_tabs,.large-btns_tabs,.transparent-btns_tabs{margin-top:10px;text-align:center}.centered-btns_tabs li,.large-btns_tabs li,.transparent-btns_tabs li{display:inline;float:none;margin-right:5px}.centered-btns_tabs a,.large-btns_tabs a,.transparent-btns_tabs a{text-indent:-9999px;overflow:hidden;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;background:#ccc;background:rgba(0,0,0,.2);display:inline-block;-webkit-box-shadow:inset 0 0 2px 0 rgba(0,0,0,.3);-moz-box-shadow:inset 0 0 2px 0 rgba(0,0,0,.3);box-shadow:inset 0 0 2px 0 rgba(0,0,0,.3);width:9px;height:9px}.centered-btns_here a,.large-btns_here a,.transparent-btns_here a{background:#222;background:rgba(0,0,0,.8)}
|
|
includes/functions.php
CHANGED
@@ -3,15 +3,30 @@
|
|
3 |
defined( 'ABSPATH' )
|
4 |
or die( 'No direct load ! ' );
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
</h2>';
|
11 |
-
if( $message == 1 ) {
|
12 |
-
$getHeader .= '<div id="message" class="updated fade"><p><strong>'.__('Options saved.', 'wp-maintenance').'</strong></p></div>';
|
13 |
}
|
14 |
-
|
15 |
}
|
16 |
|
17 |
function wpm_get_nav2() {
|
@@ -97,78 +112,6 @@ function wpm_get_nav2() {
|
|
97 |
return $getDashicons;
|
98 |
}
|
99 |
|
100 |
-
function wpm_update_settings($tabPost) {
|
101 |
-
|
102 |
-
// Récupère les paramètres sauvegardés Temporairement
|
103 |
-
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
104 |
-
$paramTemp = get_option('wp_maintenance_settings');
|
105 |
-
|
106 |
-
// Je recupère le tableau temporaire des données
|
107 |
-
if( isset($paramTemp) && !empty($paramTemp) ) {
|
108 |
-
foreach($paramTemp as $variable=>$value) {
|
109 |
-
//var_dump($variable.' =====> '.$value.'<br />');
|
110 |
-
|
111 |
-
// pour chaque clé du tableau de regarde si elle existe déjà
|
112 |
-
if ( array_key_exists($variable, $paramTemp) ) {
|
113 |
-
// Si la clé est la même que venant du post je la change
|
114 |
-
if( isset($tabPost[$variable]) ) {
|
115 |
-
array_fill_keys($paramTemp, $tabPost[$variable]);
|
116 |
-
}
|
117 |
-
}
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
if( isset($paramTemp) && is_array($paramTemp) ) {
|
122 |
-
// Si le tableau temporaire existe je le fusionne avec les données $_POST["wp_maintenance_settings"]
|
123 |
-
$paramData = array_merge($paramTemp, $tabPost);
|
124 |
-
} else {
|
125 |
-
// Sinon je garde le $_POST["wp_maintenance_settings"] en cours
|
126 |
-
$paramData = $tabPost;
|
127 |
-
}
|
128 |
-
if(update_option('wp_maintenance_settings', $paramData)) {
|
129 |
-
return true;
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
function wpm_sidebar() {
|
134 |
-
|
135 |
-
$wpmSidebar = '<div id="wpm-column2">';
|
136 |
-
|
137 |
-
/* ABOUT */
|
138 |
-
$wpmSidebar .= '<div style="border: 1px solid #ddd;background-color:#fff;padding:10px;text-align:center;margin-bottom:5px;">'.__('ABOUT', 'wp-maintenance').'</div>';
|
139 |
-
|
140 |
-
$wpmSidebar .= '<div style="text-align:justify;background-color:#fff;padding:10px;margin-bottom: 10px;">'.__('This plugin has been developed for you for free by <a href="https://restezconnectes.fr" target="_blank">Florent Maillefaud</a>. It is royalty free, you can take it, modify it, distribute it as you see fit.', 'wp-maintenance').'<br /><br />';
|
141 |
-
$wpmSidebar .= ''.__('Visit', 'wp-maintenance').' <a href="https://madeby.restezconnectes.fr" target="_blank">WP Maintenance</a>, '.__('try the demo of the plugin, talk about this plugin to your surroundings!', 'wp-maintenance').'<br /><br />';
|
142 |
-
/* FAIRE UN DON SUR PAYPAL */
|
143 |
-
$wpmSidebar .= ''.__('Support this extension and my other developments (French Paypal):', 'wp-maintenance').'<br /><br />
|
144 |
-
<div style="width:220px;margin-left:auto;margin-right:auto;padding:5px;">
|
145 |
-
<a href="https://paypal.me/RestezConnectes/20" target="_blank" class="wpmclassname">
|
146 |
-
<img src="'.WPM_PLUGIN_URL.'images/donate.png" valign="bottom" width="64" /> Donate now!
|
147 |
-
</a>
|
148 |
-
</div>
|
149 |
-
</div>';
|
150 |
-
/* FIN FAIRE UN DON */
|
151 |
-
|
152 |
-
/* END ABOUT */
|
153 |
-
|
154 |
-
/* DISCOVER*/
|
155 |
-
$wpmSidebar .= '<div style="border: 1px solid #ddd;background-color:#fff;padding:10px;text-align:center;margin-bottom:5px;">'.__('DISCOVER', 'wp-maintenance').'</div>';
|
156 |
-
|
157 |
-
$imagePub = array(
|
158 |
-
'extension-send-pdf-for-cf7.png' => 'https://wordpress.org/plugins/send-pdf-for-contact-form-7/'
|
159 |
-
);
|
160 |
-
|
161 |
-
foreach( $imagePub as $img=>$link ) {
|
162 |
-
$wpmSidebar .= '<a href="'.$link.'" target="_blank"><img src="'.WPM_PLUGIN_URL.'images/'.$img.'" /></a>';
|
163 |
-
}
|
164 |
-
/* END DISCOVER */
|
165 |
-
|
166 |
-
$wpmSidebar .= '</div>'; // Div general
|
167 |
-
$wpmSidebar .= '<div class="clear"></div>';
|
168 |
-
|
169 |
-
return $wpmSidebar;
|
170 |
-
}
|
171 |
-
|
172 |
function wpm_footer() {
|
173 |
|
174 |
$wpmFooter = '
|
@@ -200,11 +143,11 @@ function wpm_get_ip() {
|
|
200 |
}
|
201 |
// IP derrière un proxy
|
202 |
elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
203 |
-
return $_SERVER['HTTP_X_FORWARDED_FOR'];
|
204 |
}
|
205 |
// Sinon : IP normale
|
206 |
else {
|
207 |
-
return (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '');
|
208 |
}
|
209 |
|
210 |
}
|
@@ -218,14 +161,12 @@ function wpm_change_active($value = 0) {
|
|
218 |
}
|
219 |
}
|
220 |
|
221 |
-
function wpm_array_value_count
|
|
|
222 |
$count = 0;
|
223 |
-
|
224 |
-
|
225 |
-
{
|
226 |
-
if($value) { $count++; }
|
227 |
}
|
228 |
-
|
229 |
return $count;
|
230 |
}
|
231 |
|
@@ -346,11 +287,11 @@ function wpm_format_font($font) {
|
|
346 |
function wpm_compress($buffer) {
|
347 |
|
348 |
// Récupère les paramètres sauvegardés
|
349 |
-
if(get_option('
|
350 |
-
$o = get_option('
|
351 |
|
352 |
$variables_css = array(
|
353 |
-
"#_COLORTXT" => esc_html($o['
|
354 |
"#_COLORBG" => esc_html($o['color_field_background']),
|
355 |
"#_COLORBORDER" => esc_html($o['color_field_border']),
|
356 |
"#_COLORBUTTON" => esc_html($o['color_button']),
|
@@ -423,6 +364,17 @@ header {background: #_COLORHEAD;}
|
|
423 |
.wpm_newletter {text-align:center;}
|
424 |
#countdown {clear:both;margin-left:auto;margin-right:auto;text-align: center;}
|
425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
';
|
427 |
}
|
428 |
|
3 |
defined( 'ABSPATH' )
|
4 |
or die( 'No direct load ! ' );
|
5 |
|
6 |
+
function wpm_update_settings($tabSettings, $nameOption = '', $type = 1) {
|
7 |
+
|
8 |
+
if( empty($nameOption) || $nameOption =='' ) { return false; }
|
9 |
+
|
10 |
+
if( isset($tabSettings) && is_array($tabSettings) ) {
|
11 |
+
$newTabSettings = array();
|
12 |
+
foreach($tabSettings as $nameSettings => $valueSettings ) {
|
13 |
+
if( $type == 3 ) {
|
14 |
+
if( $nameSettings == 'email') {
|
15 |
+
$newTabSettings[$nameSettings] = sanitize_email($valueSettings);
|
16 |
+
} else {
|
17 |
+
$newTabSettings[$nameSettings] = strip_tags( stripslashes( esc_url_raw($valueSettings) ) );
|
18 |
+
}
|
19 |
+
} else {
|
20 |
+
$newTabSettings[$nameSettings] = sanitize_textarea_field($valueSettings);
|
21 |
+
}
|
22 |
+
}
|
23 |
+
update_option($nameOption, $newTabSettings );
|
24 |
|
25 |
+
return true;
|
26 |
+
} else {
|
27 |
+
return false;
|
|
|
|
|
|
|
28 |
}
|
29 |
+
|
30 |
}
|
31 |
|
32 |
function wpm_get_nav2() {
|
112 |
return $getDashicons;
|
113 |
}
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
function wpm_footer() {
|
116 |
|
117 |
$wpmFooter = '
|
143 |
}
|
144 |
// IP derrière un proxy
|
145 |
elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
146 |
+
return esc_url($_SERVER['HTTP_X_FORWARDED_FOR']);
|
147 |
}
|
148 |
// Sinon : IP normale
|
149 |
else {
|
150 |
+
return (isset($_SERVER['REMOTE_ADDR']) ? esc_url($_SERVER['REMOTE_ADDR']) : '');
|
151 |
}
|
152 |
|
153 |
}
|
161 |
}
|
162 |
}
|
163 |
|
164 |
+
function wpm_array_value_count($array) {
|
165 |
+
|
166 |
$count = 0;
|
167 |
+
foreach ($array as $key => $value) {
|
168 |
+
if( isset($value) && $value!='') { $count++; }
|
|
|
|
|
169 |
}
|
|
|
170 |
return $count;
|
171 |
}
|
172 |
|
287 |
function wpm_compress($buffer) {
|
288 |
|
289 |
// Récupère les paramètres sauvegardés
|
290 |
+
if(get_option('wp_maintenance_settings_colors')) { extract(get_option('wp_maintenance_settings_colors')); }
|
291 |
+
$o = get_option('wp_maintenance_settings_colors');
|
292 |
|
293 |
$variables_css = array(
|
294 |
+
"#_COLORTXT" => esc_html($o['color_txt']),
|
295 |
"#_COLORBG" => esc_html($o['color_field_background']),
|
296 |
"#_COLORBORDER" => esc_html($o['color_field_border']),
|
297 |
"#_COLORBUTTON" => esc_html($o['color_button']),
|
364 |
.wpm_newletter {text-align:center;}
|
365 |
#countdown {clear:both;margin-left:auto;margin-right:auto;text-align: center;}
|
366 |
|
367 |
+
.footer-basic p a {
|
368 |
+
color:#_COLOR_TXT_BT;
|
369 |
+
text-decoration:none;
|
370 |
+
}
|
371 |
+
.footer-basic .copyright {
|
372 |
+
margin-top:15px;
|
373 |
+
text-align:center;
|
374 |
+
font-size:13px;
|
375 |
+
color:#aaa;
|
376 |
+
margin-bottom:0;
|
377 |
+
}
|
378 |
';
|
379 |
}
|
380 |
|
includes/shortcodes.php
CHANGED
@@ -5,16 +5,17 @@ defined( 'ABSPATH' )
|
|
5 |
|
6 |
function wpm_social_shortcode( $atts ) {
|
7 |
|
8 |
-
if(get_option('
|
9 |
-
$paramSocial = get_option('
|
10 |
-
|
11 |
-
$
|
12 |
-
$
|
|
|
13 |
// Si on est en mobile on réduit les icones
|
14 |
if ( wp_is_mobile() ) {
|
15 |
-
$
|
16 |
}
|
17 |
-
|
18 |
// Attributes
|
19 |
extract( shortcode_atts(
|
20 |
array(
|
@@ -22,18 +23,26 @@ function wpm_social_shortcode( $atts ) {
|
|
22 |
'enable' => 0
|
23 |
), $atts )
|
24 |
);
|
25 |
-
if($
|
26 |
-
$srcIcon = get_stylesheet_directory_uri().'/'.esc_html($
|
27 |
-
$iconSize = 'width='.$
|
28 |
} else {
|
29 |
-
$srcIcon =
|
30 |
$iconSize = '';
|
31 |
}
|
32 |
-
|
|
|
33 |
$contentSocial .= '<div id="wpm-social-footer" class="wpm_social"><ul class="wpm_horizontal">';
|
34 |
-
foreach($
|
35 |
if($socialUrl!='') {
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
38 |
}
|
39 |
$contentSocial .='</ul></div>';
|
5 |
|
6 |
function wpm_social_shortcode( $atts ) {
|
7 |
|
8 |
+
if(get_option('wp_maintenance_settings_socialnetworks')) { extract(get_option('wp_maintenance_settings_socialnetworks')); }
|
9 |
+
$paramSocial = get_option('wp_maintenance_settings_socialnetworks');
|
10 |
+
|
11 |
+
$paramList = get_option('wp_maintenance_list_socialnetworks');
|
12 |
+
$countSocial = wpm_array_value_count($paramList);
|
13 |
+
|
14 |
// Si on est en mobile on réduit les icones
|
15 |
if ( wp_is_mobile() ) {
|
16 |
+
$paramSocial['size'] = 32;
|
17 |
}
|
18 |
+
|
19 |
// Attributes
|
20 |
extract( shortcode_atts(
|
21 |
array(
|
23 |
'enable' => 0
|
24 |
), $atts )
|
25 |
);
|
26 |
+
if($paramSocial['theme']!='') {
|
27 |
+
$srcIcon = get_stylesheet_directory_uri().'/'.esc_html($paramSocial['theme']).'/';
|
28 |
+
$iconSize = 'width='.$paramSocial['size'];
|
29 |
} else {
|
30 |
+
$srcIcon = plugin_dir_url( __DIR__ ).'socialicons/'.$paramSocial['style'].'/'.$paramSocial['size'].'/';
|
31 |
$iconSize = '';
|
32 |
}
|
33 |
+
$contentSocial = '';
|
34 |
+
if( isset($paramSocial['enable']) && $paramSocial['enable']==1 && $countSocial>=1) {
|
35 |
$contentSocial .= '<div id="wpm-social-footer" class="wpm_social"><ul class="wpm_horizontal">';
|
36 |
+
foreach($paramList as $socialName=>$socialUrl) {
|
37 |
if($socialUrl!='') {
|
38 |
+
if( $socialName == 'email' ){
|
39 |
+
$socialUrl = 'mailto:'.esc_html($socialUrl);
|
40 |
+
$texte = __('Send me a', 'wp-maintenance');
|
41 |
+
} else {
|
42 |
+
$socialUrl = esc_url($socialUrl);
|
43 |
+
$texte = esc_html($paramSocial['texte']);
|
44 |
+
}
|
45 |
+
$contentSocial .= '<li><a href="'.$socialUrl.'" target="_blank"><img src="'.esc_url($srcIcon.$socialName).'.png" alt="'.$texte.' '.ucfirst(esc_html($socialName)).'" '.$iconSize.' title="'.$texte.' '.ucfirst(esc_html($socialName)).'" /></a></li>';
|
46 |
}
|
47 |
}
|
48 |
$contentSocial .='</ul></div>';
|
js/lib/jquery.1.7.0.js
DELETED
@@ -1,9300 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery JavaScript Library v1.7
|
3 |
-
* http://jquery.com/
|
4 |
-
*
|
5 |
-
* Copyright 2011, John Resig
|
6 |
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
7 |
-
* http://jquery.org/license
|
8 |
-
*
|
9 |
-
* Includes Sizzle.js
|
10 |
-
* http://sizzlejs.com/
|
11 |
-
* Copyright 2011, The Dojo Foundation
|
12 |
-
* Released under the MIT, BSD, and GPL Licenses.
|
13 |
-
*
|
14 |
-
* Date: Thu Nov 3 16:18:21 2011 -0400
|
15 |
-
*/
|
16 |
-
(function( window, undefined ) {
|
17 |
-
|
18 |
-
// Use the correct document accordingly with window argument (sandbox)
|
19 |
-
var document = window.document,
|
20 |
-
navigator = window.navigator,
|
21 |
-
location = window.location;
|
22 |
-
var jQuery = (function() {
|
23 |
-
|
24 |
-
// Define a local copy of jQuery
|
25 |
-
var jQuery = function( selector, context ) {
|
26 |
-
// The jQuery object is actually just the init constructor 'enhanced'
|
27 |
-
return new jQuery.fn.init( selector, context, rootjQuery );
|
28 |
-
},
|
29 |
-
|
30 |
-
// Map over jQuery in case of overwrite
|
31 |
-
_jQuery = window.jQuery,
|
32 |
-
|
33 |
-
// Map over the $ in case of overwrite
|
34 |
-
_$ = window.$,
|
35 |
-
|
36 |
-
// A central reference to the root jQuery(document)
|
37 |
-
rootjQuery,
|
38 |
-
|
39 |
-
// A simple way to check for HTML strings or ID strings
|
40 |
-
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
|
41 |
-
quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
|
42 |
-
|
43 |
-
// Check if a string has a non-whitespace character in it
|
44 |
-
rnotwhite = /\S/,
|
45 |
-
|
46 |
-
// Used for trimming whitespace
|
47 |
-
trimLeft = /^\s+/,
|
48 |
-
trimRight = /\s+$/,
|
49 |
-
|
50 |
-
// Check for digits
|
51 |
-
rdigit = /\d/,
|
52 |
-
|
53 |
-
// Match a standalone tag
|
54 |
-
rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
|
55 |
-
|
56 |
-
// JSON RegExp
|
57 |
-
rvalidchars = /^[\],:{}\s]*$/,
|
58 |
-
rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
|
59 |
-
rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
|
60 |
-
rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
|
61 |
-
|
62 |
-
// Useragent RegExp
|
63 |
-
rwebkit = /(webkit)[ \/]([\w.]+)/,
|
64 |
-
ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
|
65 |
-
rmsie = /(msie) ([\w.]+)/,
|
66 |
-
rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
|
67 |
-
|
68 |
-
// Matches dashed string for camelizing
|
69 |
-
rdashAlpha = /-([a-z]|[0-9])/ig,
|
70 |
-
rmsPrefix = /^-ms-/,
|
71 |
-
|
72 |
-
// Used by jQuery.camelCase as callback to replace()
|
73 |
-
fcamelCase = function( all, letter ) {
|
74 |
-
return ( letter + "" ).toUpperCase();
|
75 |
-
},
|
76 |
-
|
77 |
-
// Keep a UserAgent string for use with jQuery.browser
|
78 |
-
userAgent = navigator.userAgent,
|
79 |
-
|
80 |
-
// For matching the engine and version of the browser
|
81 |
-
browserMatch,
|
82 |
-
|
83 |
-
// The deferred used on DOM ready
|
84 |
-
readyList,
|
85 |
-
|
86 |
-
// The ready event handler
|
87 |
-
DOMContentLoaded,
|
88 |
-
|
89 |
-
// Save a reference to some core methods
|
90 |
-
toString = Object.prototype.toString,
|
91 |
-
hasOwn = Object.prototype.hasOwnProperty,
|
92 |
-
push = Array.prototype.push,
|
93 |
-
slice = Array.prototype.slice,
|
94 |
-
trim = String.prototype.trim,
|
95 |
-
indexOf = Array.prototype.indexOf,
|
96 |
-
|
97 |
-
// [[Class]] -> type pairs
|
98 |
-
class2type = {};
|
99 |
-
|
100 |
-
jQuery.fn = jQuery.prototype = {
|
101 |
-
constructor: jQuery,
|
102 |
-
init: function( selector, context, rootjQuery ) {
|
103 |
-
var match, elem, ret, doc;
|
104 |
-
|
105 |
-
// Handle $(""), $(null), or $(undefined)
|
106 |
-
if ( !selector ) {
|
107 |
-
return this;
|
108 |
-
}
|
109 |
-
|
110 |
-
// Handle $(DOMElement)
|
111 |
-
if ( selector.nodeType ) {
|
112 |
-
this.context = this[0] = selector;
|
113 |
-
this.length = 1;
|
114 |
-
return this;
|
115 |
-
}
|
116 |
-
|
117 |
-
// The body element only exists once, optimize finding it
|
118 |
-
if ( selector === "body" && !context && document.body ) {
|
119 |
-
this.context = document;
|
120 |
-
this[0] = document.body;
|
121 |
-
this.selector = selector;
|
122 |
-
this.length = 1;
|
123 |
-
return this;
|
124 |
-
}
|
125 |
-
|
126 |
-
// Handle HTML strings
|
127 |
-
if ( typeof selector === "string" ) {
|
128 |
-
// Are we dealing with HTML string or an ID?
|
129 |
-
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
|
130 |
-
// Assume that strings that start and end with <> are HTML and skip the regex check
|
131 |
-
match = [ null, selector, null ];
|
132 |
-
|
133 |
-
} else {
|
134 |
-
match = quickExpr.exec( selector );
|
135 |
-
}
|
136 |
-
|
137 |
-
// Verify a match, and that no context was specified for #id
|
138 |
-
if ( match && (match[1] || !context) ) {
|
139 |
-
|
140 |
-
// HANDLE: $(html) -> $(array)
|
141 |
-
if ( match[1] ) {
|
142 |
-
context = context instanceof jQuery ? context[0] : context;
|
143 |
-
doc = ( context ? context.ownerDocument || context : document );
|
144 |
-
|
145 |
-
// If a single string is passed in and it's a single tag
|
146 |
-
// just do a createElement and skip the rest
|
147 |
-
ret = rsingleTag.exec( selector );
|
148 |
-
|
149 |
-
if ( ret ) {
|
150 |
-
if ( jQuery.isPlainObject( context ) ) {
|
151 |
-
selector = [ document.createElement( ret[1] ) ];
|
152 |
-
jQuery.fn.attr.call( selector, context, true );
|
153 |
-
|
154 |
-
} else {
|
155 |
-
selector = [ doc.createElement( ret[1] ) ];
|
156 |
-
}
|
157 |
-
|
158 |
-
} else {
|
159 |
-
ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
|
160 |
-
selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
|
161 |
-
}
|
162 |
-
|
163 |
-
return jQuery.merge( this, selector );
|
164 |
-
|
165 |
-
// HANDLE: $("#id")
|
166 |
-
} else {
|
167 |
-
elem = document.getElementById( match[2] );
|
168 |
-
|
169 |
-
// Check parentNode to catch when Blackberry 4.6 returns
|
170 |
-
// nodes that are no longer in the document #6963
|
171 |
-
if ( elem && elem.parentNode ) {
|
172 |
-
// Handle the case where IE and Opera return items
|
173 |
-
// by name instead of ID
|
174 |
-
if ( elem.id !== match[2] ) {
|
175 |
-
return rootjQuery.find( selector );
|
176 |
-
}
|
177 |
-
|
178 |
-
// Otherwise, we inject the element directly into the jQuery object
|
179 |
-
this.length = 1;
|
180 |
-
this[0] = elem;
|
181 |
-
}
|
182 |
-
|
183 |
-
this.context = document;
|
184 |
-
this.selector = selector;
|
185 |
-
return this;
|
186 |
-
}
|
187 |
-
|
188 |
-
// HANDLE: $(expr, $(...))
|
189 |
-
} else if ( !context || context.jquery ) {
|
190 |
-
return ( context || rootjQuery ).find( selector );
|
191 |
-
|
192 |
-
// HANDLE: $(expr, context)
|
193 |
-
// (which is just equivalent to: $(context).find(expr)
|
194 |
-
} else {
|
195 |
-
return this.constructor( context ).find( selector );
|
196 |
-
}
|
197 |
-
|
198 |
-
// HANDLE: $(function)
|
199 |
-
// Shortcut for document ready
|
200 |
-
} else if ( jQuery.isFunction( selector ) ) {
|
201 |
-
return rootjQuery.ready( selector );
|
202 |
-
}
|
203 |
-
|
204 |
-
if ( selector.selector !== undefined ) {
|
205 |
-
this.selector = selector.selector;
|
206 |
-
this.context = selector.context;
|
207 |
-
}
|
208 |
-
|
209 |
-
return jQuery.makeArray( selector, this );
|
210 |
-
},
|
211 |
-
|
212 |
-
// Start with an empty selector
|
213 |
-
selector: "",
|
214 |
-
|
215 |
-
// The current version of jQuery being used
|
216 |
-
jquery: "1.7",
|
217 |
-
|
218 |
-
// The default length of a jQuery object is 0
|
219 |
-
length: 0,
|
220 |
-
|
221 |
-
// The number of elements contained in the matched element set
|
222 |
-
size: function() {
|
223 |
-
return this.length;
|
224 |
-
},
|
225 |
-
|
226 |
-
toArray: function() {
|
227 |
-
return slice.call( this, 0 );
|
228 |
-
},
|
229 |
-
|
230 |
-
// Get the Nth element in the matched element set OR
|
231 |
-
// Get the whole matched element set as a clean array
|
232 |
-
get: function( num ) {
|
233 |
-
return num == null ?
|
234 |
-
|
235 |
-
// Return a 'clean' array
|
236 |
-
this.toArray() :
|
237 |
-
|
238 |
-
// Return just the object
|
239 |
-
( num < 0 ? this[ this.length + num ] : this[ num ] );
|
240 |
-
},
|
241 |
-
|
242 |
-
// Take an array of elements and push it onto the stack
|
243 |
-
// (returning the new matched element set)
|
244 |
-
pushStack: function( elems, name, selector ) {
|
245 |
-
// Build a new jQuery matched element set
|
246 |
-
var ret = this.constructor();
|
247 |
-
|
248 |
-
if ( jQuery.isArray( elems ) ) {
|
249 |
-
push.apply( ret, elems );
|
250 |
-
|
251 |
-
} else {
|
252 |
-
jQuery.merge( ret, elems );
|
253 |
-
}
|
254 |
-
|
255 |
-
// Add the old object onto the stack (as a reference)
|
256 |
-
ret.prevObject = this;
|
257 |
-
|
258 |
-
ret.context = this.context;
|
259 |
-
|
260 |
-
if ( name === "find" ) {
|
261 |
-
ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
|
262 |
-
} else if ( name ) {
|
263 |
-
ret.selector = this.selector + "." + name + "(" + selector + ")";
|
264 |
-
}
|
265 |
-
|
266 |
-
// Return the newly-formed element set
|
267 |
-
return ret;
|
268 |
-
},
|
269 |
-
|
270 |
-
// Execute a callback for every element in the matched set.
|
271 |
-
// (You can seed the arguments with an array of args, but this is
|
272 |
-
// only used internally.)
|
273 |
-
each: function( callback, args ) {
|
274 |
-
return jQuery.each( this, callback, args );
|
275 |
-
},
|
276 |
-
|
277 |
-
ready: function( fn ) {
|
278 |
-
// Attach the listeners
|
279 |
-
jQuery.bindReady();
|
280 |
-
|
281 |
-
// Add the callback
|
282 |
-
readyList.add( fn );
|
283 |
-
|
284 |
-
return this;
|
285 |
-
},
|
286 |
-
|
287 |
-
eq: function( i ) {
|
288 |
-
return i === -1 ?
|
289 |
-
this.slice( i ) :
|
290 |
-
this.slice( i, +i + 1 );
|
291 |
-
},
|
292 |
-
|
293 |
-
first: function() {
|
294 |
-
return this.eq( 0 );
|
295 |
-
},
|
296 |
-
|
297 |
-
last: function() {
|
298 |
-
return this.eq( -1 );
|
299 |
-
},
|
300 |
-
|
301 |
-
slice: function() {
|
302 |
-
return this.pushStack( slice.apply( this, arguments ),
|
303 |
-
"slice", slice.call(arguments).join(",") );
|
304 |
-
},
|
305 |
-
|
306 |
-
map: function( callback ) {
|
307 |
-
return this.pushStack( jQuery.map(this, function( elem, i ) {
|
308 |
-
return callback.call( elem, i, elem );
|
309 |
-
}));
|
310 |
-
},
|
311 |
-
|
312 |
-
end: function() {
|
313 |
-
return this.prevObject || this.constructor(null);
|
314 |
-
},
|
315 |
-
|
316 |
-
// For internal use only.
|
317 |
-
// Behaves like an Array's method, not like a jQuery method.
|
318 |
-
push: push,
|
319 |
-
sort: [].sort,
|
320 |
-
splice: [].splice
|
321 |
-
};
|
322 |
-
|
323 |
-
// Give the init function the jQuery prototype for later instantiation
|
324 |
-
jQuery.fn.init.prototype = jQuery.fn;
|
325 |
-
|
326 |
-
jQuery.extend = jQuery.fn.extend = function() {
|
327 |
-
var options, name, src, copy, copyIsArray, clone,
|
328 |
-
target = arguments[0] || {},
|
329 |
-
i = 1,
|
330 |
-
length = arguments.length,
|
331 |
-
deep = false;
|
332 |
-
|
333 |
-
// Handle a deep copy situation
|
334 |
-
if ( typeof target === "boolean" ) {
|
335 |
-
deep = target;
|
336 |
-
target = arguments[1] || {};
|
337 |
-
// skip the boolean and the target
|
338 |
-
i = 2;
|
339 |
-
}
|
340 |
-
|
341 |
-
// Handle case when target is a string or something (possible in deep copy)
|
342 |
-
if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
|
343 |
-
target = {};
|
344 |
-
}
|
345 |
-
|
346 |
-
// extend jQuery itself if only one argument is passed
|
347 |
-
if ( length === i ) {
|
348 |
-
target = this;
|
349 |
-
--i;
|
350 |
-
}
|
351 |
-
|
352 |
-
for ( ; i < length; i++ ) {
|
353 |
-
// Only deal with non-null/undefined values
|
354 |
-
if ( (options = arguments[ i ]) != null ) {
|
355 |
-
// Extend the base object
|
356 |
-
for ( name in options ) {
|
357 |
-
src = target[ name ];
|
358 |
-
copy = options[ name ];
|
359 |
-
|
360 |
-
// Prevent never-ending loop
|
361 |
-
if ( target === copy ) {
|
362 |
-
continue;
|
363 |
-
}
|
364 |
-
|
365 |
-
// Recurse if we're merging plain objects or arrays
|
366 |
-
if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
|
367 |
-
if ( copyIsArray ) {
|
368 |
-
copyIsArray = false;
|
369 |
-
clone = src && jQuery.isArray(src) ? src : [];
|
370 |
-
|
371 |
-
} else {
|
372 |
-
clone = src && jQuery.isPlainObject(src) ? src : {};
|
373 |
-
}
|
374 |
-
|
375 |
-
// Never move original objects, clone them
|
376 |
-
target[ name ] = jQuery.extend( deep, clone, copy );
|
377 |
-
|
378 |
-
// Don't bring in undefined values
|
379 |
-
} else if ( copy !== undefined ) {
|
380 |
-
target[ name ] = copy;
|
381 |
-
}
|
382 |
-
}
|
383 |
-
}
|
384 |
-
}
|
385 |
-
|
386 |
-
// Return the modified object
|
387 |
-
return target;
|
388 |
-
};
|
389 |
-
|
390 |
-
jQuery.extend({
|
391 |
-
noConflict: function( deep ) {
|
392 |
-
if ( window.$ === jQuery ) {
|
393 |
-
window.$ = _$;
|
394 |
-
}
|
395 |
-
|
396 |
-
if ( deep && window.jQuery === jQuery ) {
|
397 |
-
window.jQuery = _jQuery;
|
398 |
-
}
|
399 |
-
|
400 |
-
return jQuery;
|
401 |
-
},
|
402 |
-
|
403 |
-
// Is the DOM ready to be used? Set to true once it occurs.
|
404 |
-
isReady: false,
|
405 |
-
|
406 |
-
// A counter to track how many items to wait for before
|
407 |
-
// the ready event fires. See #6781
|
408 |
-
readyWait: 1,
|
409 |
-
|
410 |
-
// Hold (or release) the ready event
|
411 |
-
holdReady: function( hold ) {
|
412 |
-
if ( hold ) {
|
413 |
-
jQuery.readyWait++;
|
414 |
-
} else {
|
415 |
-
jQuery.ready( true );
|
416 |
-
}
|
417 |
-
},
|
418 |
-
|
419 |
-
// Handle when the DOM is ready
|
420 |
-
ready: function( wait ) {
|
421 |
-
// Either a released hold or an DOMready/load event and not yet ready
|
422 |
-
if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
|
423 |
-
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
|
424 |
-
if ( !document.body ) {
|
425 |
-
return setTimeout( jQuery.ready, 1 );
|
426 |
-
}
|
427 |
-
|
428 |
-
// Remember that the DOM is ready
|
429 |
-
jQuery.isReady = true;
|
430 |
-
|
431 |
-
// If a normal DOM Ready event fired, decrement, and wait if need be
|
432 |
-
if ( wait !== true && --jQuery.readyWait > 0 ) {
|
433 |
-
return;
|
434 |
-
}
|
435 |
-
|
436 |
-
// If there are functions bound, to execute
|
437 |
-
readyList.fireWith( document, [ jQuery ] );
|
438 |
-
|
439 |
-
// Trigger any bound ready events
|
440 |
-
if ( jQuery.fn.trigger ) {
|
441 |
-
jQuery( document ).trigger( "ready" ).unbind( "ready" );
|
442 |
-
}
|
443 |
-
}
|
444 |
-
},
|
445 |
-
|
446 |
-
bindReady: function() {
|
447 |
-
if ( readyList ) {
|
448 |
-
return;
|
449 |
-
}
|
450 |
-
|
451 |
-
readyList = jQuery.Callbacks( "once memory" );
|
452 |
-
|
453 |
-
// Catch cases where $(document).ready() is called after the
|
454 |
-
// browser event has already occurred.
|
455 |
-
if ( document.readyState === "complete" ) {
|
456 |
-
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
457 |
-
return setTimeout( jQuery.ready, 1 );
|
458 |
-
}
|
459 |
-
|
460 |
-
// Mozilla, Opera and webkit nightlies currently support this event
|
461 |
-
if ( document.addEventListener ) {
|
462 |
-
// Use the handy event callback
|
463 |
-
document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
|
464 |
-
|
465 |
-
// A fallback to window.onload, that will always work
|
466 |
-
window.addEventListener( "load", jQuery.ready, false );
|
467 |
-
|
468 |
-
// If IE event model is used
|
469 |
-
} else if ( document.attachEvent ) {
|
470 |
-
// ensure firing before onload,
|
471 |
-
// maybe late but safe also for iframes
|
472 |
-
document.attachEvent( "onreadystatechange", DOMContentLoaded );
|
473 |
-
|
474 |
-
// A fallback to window.onload, that will always work
|
475 |
-
window.attachEvent( "onload", jQuery.ready );
|
476 |
-
|
477 |
-
// If IE and not a frame
|
478 |
-
// continually check to see if the document is ready
|
479 |
-
var toplevel = false;
|
480 |
-
|
481 |
-
try {
|
482 |
-
toplevel = window.frameElement == null;
|
483 |
-
} catch(e) {}
|
484 |
-
|
485 |
-
if ( document.documentElement.doScroll && toplevel ) {
|
486 |
-
doScrollCheck();
|
487 |
-
}
|
488 |
-
}
|
489 |
-
},
|
490 |
-
|
491 |
-
// See test/unit/core.js for details concerning isFunction.
|
492 |
-
// Since version 1.3, DOM methods and functions like alert
|
493 |
-
// aren't supported. They return false on IE (#2968).
|
494 |
-
isFunction: function( obj ) {
|
495 |
-
return jQuery.type(obj) === "function";
|
496 |
-
},
|
497 |
-
|
498 |
-
isArray: Array.isArray || function( obj ) {
|
499 |
-
return jQuery.type(obj) === "array";
|
500 |
-
},
|
501 |
-
|
502 |
-
// A crude way of determining if an object is a window
|
503 |
-
isWindow: function( obj ) {
|
504 |
-
return obj && typeof obj === "object" && "setInterval" in obj;
|
505 |
-
},
|
506 |
-
|
507 |
-
isNumeric: function( obj ) {
|
508 |
-
return obj != null && rdigit.test( obj ) && !isNaN( obj );
|
509 |
-
},
|
510 |
-
|
511 |
-
type: function( obj ) {
|
512 |
-
return obj == null ?
|
513 |
-
String( obj ) :
|
514 |
-
class2type[ toString.call(obj) ] || "object";
|
515 |
-
},
|
516 |
-
|
517 |
-
isPlainObject: function( obj ) {
|
518 |
-
// Must be an Object.
|
519 |
-
// Because of IE, we also have to check the presence of the constructor property.
|
520 |
-
// Make sure that DOM nodes and window objects don't pass through, as well
|
521 |
-
if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
|
522 |
-
return false;
|
523 |
-
}
|
524 |
-
|
525 |
-
try {
|
526 |
-
// Not own constructor property must be Object
|
527 |
-
if ( obj.constructor &&
|
528 |
-
!hasOwn.call(obj, "constructor") &&
|
529 |
-
!hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
|
530 |
-
return false;
|
531 |
-
}
|
532 |
-
} catch ( e ) {
|
533 |
-
// IE8,9 Will throw exceptions on certain host objects #9897
|
534 |
-
return false;
|
535 |
-
}
|
536 |
-
|
537 |
-
// Own properties are enumerated firstly, so to speed up,
|
538 |
-
// if last one is own, then all properties are own.
|
539 |
-
|
540 |
-
var key;
|
541 |
-
for ( key in obj ) {}
|
542 |
-
|
543 |
-
return key === undefined || hasOwn.call( obj, key );
|
544 |
-
},
|
545 |
-
|
546 |
-
isEmptyObject: function( obj ) {
|
547 |
-
for ( var name in obj ) {
|
548 |
-
return false;
|
549 |
-
}
|
550 |
-
return true;
|
551 |
-
},
|
552 |
-
|
553 |
-
error: function( msg ) {
|
554 |
-
throw msg;
|
555 |
-
},
|
556 |
-
|
557 |
-
parseJSON: function( data ) {
|
558 |
-
if ( typeof data !== "string" || !data ) {
|
559 |
-
return null;
|
560 |
-
}
|
561 |
-
|
562 |
-
// Make sure leading/trailing whitespace is removed (IE can't handle it)
|
563 |
-
data = jQuery.trim( data );
|
564 |
-
|
565 |
-
// Attempt to parse using the native JSON parser first
|
566 |
-
if ( window.JSON && window.JSON.parse ) {
|
567 |
-
return window.JSON.parse( data );
|
568 |
-
}
|
569 |
-
|
570 |
-
// Make sure the incoming data is actual JSON
|
571 |
-
// Logic borrowed from http://json.org/json2.js
|
572 |
-
if ( rvalidchars.test( data.replace( rvalidescape, "@" )
|
573 |
-
.replace( rvalidtokens, "]" )
|
574 |
-
.replace( rvalidbraces, "")) ) {
|
575 |
-
|
576 |
-
return ( new Function( "return " + data ) )();
|
577 |
-
|
578 |
-
}
|
579 |
-
jQuery.error( "Invalid JSON: " + data );
|
580 |
-
},
|
581 |
-
|
582 |
-
// Cross-browser xml parsing
|
583 |
-
parseXML: function( data ) {
|
584 |
-
var xml, tmp;
|
585 |
-
try {
|
586 |
-
if ( window.DOMParser ) { // Standard
|
587 |
-
tmp = new DOMParser();
|
588 |
-
xml = tmp.parseFromString( data , "text/xml" );
|
589 |
-
} else { // IE
|
590 |
-
xml = new ActiveXObject( "Microsoft.XMLDOM" );
|
591 |
-
xml.async = "false";
|
592 |
-
xml.loadXML( data );
|
593 |
-
}
|
594 |
-
} catch( e ) {
|
595 |
-
xml = undefined;
|
596 |
-
}
|
597 |
-
if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
|
598 |
-
jQuery.error( "Invalid XML: " + data );
|
599 |
-
}
|
600 |
-
return xml;
|
601 |
-
},
|
602 |
-
|
603 |
-
noop: function() {},
|
604 |
-
|
605 |
-
// Evaluates a script in a global context
|
606 |
-
// Workarounds based on findings by Jim Driscoll
|
607 |
-
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
|
608 |
-
globalEval: function( data ) {
|
609 |
-
if ( data && rnotwhite.test( data ) ) {
|
610 |
-
// We use execScript on Internet Explorer
|
611 |
-
// We use an anonymous function so that context is window
|
612 |
-
// rather than jQuery in Firefox
|
613 |
-
( window.execScript || function( data ) {
|
614 |
-
window[ "eval" ].call( window, data );
|
615 |
-
} )( data );
|
616 |
-
}
|
617 |
-
},
|
618 |
-
|
619 |
-
// Convert dashed to camelCase; used by the css and data modules
|
620 |
-
// Microsoft forgot to hump their vendor prefix (#9572)
|
621 |
-
camelCase: function( string ) {
|
622 |
-
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
623 |
-
},
|
624 |
-
|
625 |
-
nodeName: function( elem, name ) {
|
626 |
-
return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
|
627 |
-
},
|
628 |
-
|
629 |
-
// args is for internal usage only
|
630 |
-
each: function( object, callback, args ) {
|
631 |
-
var name, i = 0,
|
632 |
-
length = object.length,
|
633 |
-
isObj = length === undefined || jQuery.isFunction( object );
|
634 |
-
|
635 |
-
if ( args ) {
|
636 |
-
if ( isObj ) {
|
637 |
-
for ( name in object ) {
|
638 |
-
if ( callback.apply( object[ name ], args ) === false ) {
|
639 |
-
break;
|
640 |
-
}
|
641 |
-
}
|
642 |
-
} else {
|
643 |
-
for ( ; i < length; ) {
|
644 |
-
if ( callback.apply( object[ i++ ], args ) === false ) {
|
645 |
-
break;
|
646 |
-
}
|
647 |
-
}
|
648 |
-
}
|
649 |
-
|
650 |
-
// A special, fast, case for the most common use of each
|
651 |
-
} else {
|
652 |
-
if ( isObj ) {
|
653 |
-
for ( name in object ) {
|
654 |
-
if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
|
655 |
-
break;
|
656 |
-
}
|
657 |
-
}
|
658 |
-
} else {
|
659 |
-
for ( ; i < length; ) {
|
660 |
-
if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
|
661 |
-
break;
|
662 |
-
}
|
663 |
-
}
|
664 |
-
}
|
665 |
-
}
|
666 |
-
|
667 |
-
return object;
|
668 |
-
},
|
669 |
-
|
670 |
-
// Use native String.trim function wherever possible
|
671 |
-
trim: trim ?
|
672 |
-
function( text ) {
|
673 |
-
return text == null ?
|
674 |
-
"" :
|
675 |
-
trim.call( text );
|
676 |
-
} :
|
677 |
-
|
678 |
-
// Otherwise use our own trimming functionality
|
679 |
-
function( text ) {
|
680 |
-
return text == null ?
|
681 |
-
"" :
|
682 |
-
text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
|
683 |
-
},
|
684 |
-
|
685 |
-
// results is for internal usage only
|
686 |
-
makeArray: function( array, results ) {
|
687 |
-
var ret = results || [];
|
688 |
-
|
689 |
-
if ( array != null ) {
|
690 |
-
// The window, strings (and functions) also have 'length'
|
691 |
-
// The extra typeof function check is to prevent crashes
|
692 |
-
// in Safari 2 (See: #3039)
|
693 |
-
// Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
|
694 |
-
var type = jQuery.type( array );
|
695 |
-
|
696 |
-
if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
|
697 |
-
push.call( ret, array );
|
698 |
-
} else {
|
699 |
-
jQuery.merge( ret, array );
|
700 |
-
}
|
701 |
-
}
|
702 |
-
|
703 |
-
return ret;
|
704 |
-
},
|
705 |
-
|
706 |
-
inArray: function( elem, array, i ) {
|
707 |
-
var len;
|
708 |
-
|
709 |
-
if ( array ) {
|
710 |
-
if ( indexOf ) {
|
711 |
-
return indexOf.call( array, elem, i );
|
712 |
-
}
|
713 |
-
|
714 |
-
len = array.length;
|
715 |
-
i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
|
716 |
-
|
717 |
-
for ( ; i < len; i++ ) {
|
718 |
-
// Skip accessing in sparse arrays
|
719 |
-
if ( i in array && array[ i ] === elem ) {
|
720 |
-
return i;
|
721 |
-
}
|
722 |
-
}
|
723 |
-
}
|
724 |
-
|
725 |
-
return -1;
|
726 |
-
},
|
727 |
-
|
728 |
-
merge: function( first, second ) {
|
729 |
-
var i = first.length,
|
730 |
-
j = 0;
|
731 |
-
|
732 |
-
if ( typeof second.length === "number" ) {
|
733 |
-
for ( var l = second.length; j < l; j++ ) {
|
734 |
-
first[ i++ ] = second[ j ];
|
735 |
-
}
|
736 |
-
|
737 |
-
} else {
|
738 |
-
while ( second[j] !== undefined ) {
|
739 |
-
first[ i++ ] = second[ j++ ];
|
740 |
-
}
|
741 |
-
}
|
742 |
-
|
743 |
-
first.length = i;
|
744 |
-
|
745 |
-
return first;
|
746 |
-
},
|
747 |
-
|
748 |
-
grep: function( elems, callback, inv ) {
|
749 |
-
var ret = [], retVal;
|
750 |
-
inv = !!inv;
|
751 |
-
|
752 |
-
// Go through the array, only saving the items
|
753 |
-
// that pass the validator function
|
754 |
-
for ( var i = 0, length = elems.length; i < length; i++ ) {
|
755 |
-
retVal = !!callback( elems[ i ], i );
|
756 |
-
if ( inv !== retVal ) {
|
757 |
-
ret.push( elems[ i ] );
|
758 |
-
}
|
759 |
-
}
|
760 |
-
|
761 |
-
return ret;
|
762 |
-
},
|
763 |
-
|
764 |
-
// arg is for internal usage only
|
765 |
-
map: function( elems, callback, arg ) {
|
766 |
-
var value, key, ret = [],
|
767 |
-
i = 0,
|
768 |
-
length = elems.length,
|
769 |
-
// jquery objects are treated as arrays
|
770 |
-
isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
|
771 |
-
|
772 |
-
// Go through the array, translating each of the items to their
|
773 |
-
if ( isArray ) {
|
774 |
-
for ( ; i < length; i++ ) {
|
775 |
-
value = callback( elems[ i ], i, arg );
|
776 |
-
|
777 |
-
if ( value != null ) {
|
778 |
-
ret[ ret.length ] = value;
|
779 |
-
}
|
780 |
-
}
|
781 |
-
|
782 |
-
// Go through every key on the object,
|
783 |
-
} else {
|
784 |
-
for ( key in elems ) {
|
785 |
-
value = callback( elems[ key ], key, arg );
|
786 |
-
|
787 |
-
if ( value != null ) {
|
788 |
-
ret[ ret.length ] = value;
|
789 |
-
}
|
790 |
-
}
|
791 |
-
}
|
792 |
-
|
793 |
-
// Flatten any nested arrays
|
794 |
-
return ret.concat.apply( [], ret );
|
795 |
-
},
|
796 |
-
|
797 |
-
// A global GUID counter for objects
|
798 |
-
guid: 1,
|
799 |
-
|
800 |
-
// Bind a function to a context, optionally partially applying any
|
801 |
-
// arguments.
|
802 |
-
proxy: function( fn, context ) {
|
803 |
-
if ( typeof context === "string" ) {
|
804 |
-
var tmp = fn[ context ];
|
805 |
-
context = fn;
|
806 |
-
fn = tmp;
|
807 |
-
}
|
808 |
-
|
809 |
-
// Quick check to determine if target is callable, in the spec
|
810 |
-
// this throws a TypeError, but we will just return undefined.
|
811 |
-
if ( !jQuery.isFunction( fn ) ) {
|
812 |
-
return undefined;
|
813 |
-
}
|
814 |
-
|
815 |
-
// Simulated bind
|
816 |
-
var args = slice.call( arguments, 2 ),
|
817 |
-
proxy = function() {
|
818 |
-
return fn.apply( context, args.concat( slice.call( arguments ) ) );
|
819 |
-
};
|
820 |
-
|
821 |
-
// Set the guid of unique handler to the same of original handler, so it can be removed
|
822 |
-
proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
|
823 |
-
|
824 |
-
return proxy;
|
825 |
-
},
|
826 |
-
|
827 |
-
// Mutifunctional method to get and set values to a collection
|
828 |
-
// The value/s can optionally be executed if it's a function
|
829 |
-
access: function( elems, key, value, exec, fn, pass ) {
|
830 |
-
var length = elems.length;
|
831 |
-
|
832 |
-
// Setting many attributes
|
833 |
-
if ( typeof key === "object" ) {
|
834 |
-
for ( var k in key ) {
|
835 |
-
jQuery.access( elems, k, key[k], exec, fn, value );
|
836 |
-
}
|
837 |
-
return elems;
|
838 |
-
}
|
839 |
-
|
840 |
-
// Setting one attribute
|
841 |
-
if ( value !== undefined ) {
|
842 |
-
// Optionally, function values get executed if exec is true
|
843 |
-
exec = !pass && exec && jQuery.isFunction(value);
|
844 |
-
|
845 |
-
for ( var i = 0; i < length; i++ ) {
|
846 |
-
fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
|
847 |
-
}
|
848 |
-
|
849 |
-
return elems;
|
850 |
-
}
|
851 |
-
|
852 |
-
// Getting an attribute
|
853 |
-
return length ? fn( elems[0], key ) : undefined;
|
854 |
-
},
|
855 |
-
|
856 |
-
now: function() {
|
857 |
-
return ( new Date() ).getTime();
|
858 |
-
},
|
859 |
-
|
860 |
-
// Use of jQuery.browser is frowned upon.
|
861 |
-
// More details: http://docs.jquery.com/Utilities/jQuery.browser
|
862 |
-
uaMatch: function( ua ) {
|
863 |
-
ua = ua.toLowerCase();
|
864 |
-
|
865 |
-
var match = rwebkit.exec( ua ) ||
|
866 |
-
ropera.exec( ua ) ||
|
867 |
-
rmsie.exec( ua ) ||
|
868 |
-
ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
|
869 |
-
[];
|
870 |
-
|
871 |
-
return { browser: match[1] || "", version: match[2] || "0" };
|
872 |
-
},
|
873 |
-
|
874 |
-
sub: function() {
|
875 |
-
function jQuerySub( selector, context ) {
|
876 |
-
return new jQuerySub.fn.init( selector, context );
|
877 |
-
}
|
878 |
-
jQuery.extend( true, jQuerySub, this );
|
879 |
-
jQuerySub.superclass = this;
|
880 |
-
jQuerySub.fn = jQuerySub.prototype = this();
|
881 |
-
jQuerySub.fn.constructor = jQuerySub;
|
882 |
-
jQuerySub.sub = this.sub;
|
883 |
-
jQuerySub.fn.init = function init( selector, context ) {
|
884 |
-
if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
|
885 |
-
context = jQuerySub( context );
|
886 |
-
}
|
887 |
-
|
888 |
-
return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
|
889 |
-
};
|
890 |
-
jQuerySub.fn.init.prototype = jQuerySub.fn;
|
891 |
-
var rootjQuerySub = jQuerySub(document);
|
892 |
-
return jQuerySub;
|
893 |
-
},
|
894 |
-
|
895 |
-
browser: {}
|
896 |
-
});
|
897 |
-
|
898 |
-
// Populate the class2type map
|
899 |
-
jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
|
900 |
-
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
901 |
-
});
|
902 |
-
|
903 |
-
browserMatch = jQuery.uaMatch( userAgent );
|
904 |
-
if ( browserMatch.browser ) {
|
905 |
-
jQuery.browser[ browserMatch.browser ] = true;
|
906 |
-
jQuery.browser.version = browserMatch.version;
|
907 |
-
}
|
908 |
-
|
909 |
-
// Deprecated, use jQuery.browser.webkit instead
|
910 |
-
if ( jQuery.browser.webkit ) {
|
911 |
-
jQuery.browser.safari = true;
|
912 |
-
}
|
913 |
-
|
914 |
-
// IE doesn't match non-breaking spaces with \s
|
915 |
-
if ( rnotwhite.test( "\xA0" ) ) {
|
916 |
-
trimLeft = /^[\s\xA0]+/;
|
917 |
-
trimRight = /[\s\xA0]+$/;
|
918 |
-
}
|
919 |
-
|
920 |
-
// All jQuery objects should point back to these
|
921 |
-
rootjQuery = jQuery(document);
|
922 |
-
|
923 |
-
// Cleanup functions for the document ready method
|
924 |
-
if ( document.addEventListener ) {
|
925 |
-
DOMContentLoaded = function() {
|
926 |
-
document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
|
927 |
-
jQuery.ready();
|
928 |
-
};
|
929 |
-
|
930 |
-
} else if ( document.attachEvent ) {
|
931 |
-
DOMContentLoaded = function() {
|
932 |
-
// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
|
933 |
-
if ( document.readyState === "complete" ) {
|
934 |
-
document.detachEvent( "onreadystatechange", DOMContentLoaded );
|
935 |
-
jQuery.ready();
|
936 |
-
}
|
937 |
-
};
|
938 |
-
}
|
939 |
-
|
940 |
-
// The DOM ready check for Internet Explorer
|
941 |
-
function doScrollCheck() {
|
942 |
-
if ( jQuery.isReady ) {
|
943 |
-
return;
|
944 |
-
}
|
945 |
-
|
946 |
-
try {
|
947 |
-
// If IE is used, use the trick by Diego Perini
|
948 |
-
// http://javascript.nwbox.com/IEContentLoaded/
|
949 |
-
document.documentElement.doScroll("left");
|
950 |
-
} catch(e) {
|
951 |
-
setTimeout( doScrollCheck, 1 );
|
952 |
-
return;
|
953 |
-
}
|
954 |
-
|
955 |
-
// and execute any waiting functions
|
956 |
-
jQuery.ready();
|
957 |
-
}
|
958 |
-
|
959 |
-
// Expose jQuery as an AMD module, but only for AMD loaders that
|
960 |
-
// understand the issues with loading multiple versions of jQuery
|
961 |
-
// in a page that all might call define(). The loader will indicate
|
962 |
-
// they have special allowances for multiple jQuery versions by
|
963 |
-
// specifying define.amd.jQuery = true. Register as a named module,
|
964 |
-
// since jQuery can be concatenated with other files that may use define,
|
965 |
-
// but not use a proper concatenation script that understands anonymous
|
966 |
-
// AMD modules. A named AMD is safest and most robust way to register.
|
967 |
-
// Lowercase jquery is used because AMD module names are derived from
|
968 |
-
// file names, and jQuery is normally delivered in a lowercase file name.
|
969 |
-
if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
970 |
-
define( "jquery", [], function () { return jQuery; } );
|
971 |
-
}
|
972 |
-
|
973 |
-
return jQuery;
|
974 |
-
|
975 |
-
})();
|
976 |
-
|
977 |
-
|
978 |
-
// String to Object flags format cache
|
979 |
-
var flagsCache = {};
|
980 |
-
|
981 |
-
// Convert String-formatted flags into Object-formatted ones and store in cache
|
982 |
-
function createFlags( flags ) {
|
983 |
-
var object = flagsCache[ flags ] = {},
|
984 |
-
i, length;
|
985 |
-
flags = flags.split( /\s+/ );
|
986 |
-
for ( i = 0, length = flags.length; i < length; i++ ) {
|
987 |
-
object[ flags[i] ] = true;
|
988 |
-
}
|
989 |
-
return object;
|
990 |
-
}
|
991 |
-
|
992 |
-
/*
|
993 |
-
* Create a callback list using the following parameters:
|
994 |
-
*
|
995 |
-
* flags: an optional list of space-separated flags that will change how
|
996 |
-
* the callback list behaves
|
997 |
-
*
|
998 |
-
* By default a callback list will act like an event callback list and can be
|
999 |
-
* "fired" multiple times.
|
1000 |
-
*
|
1001 |
-
* Possible flags:
|
1002 |
-
*
|
1003 |
-
* once: will ensure the callback list can only be fired once (like a Deferred)
|
1004 |
-
*
|
1005 |
-
* memory: will keep track of previous values and will call any callback added
|
1006 |
-
* after the list has been fired right away with the latest "memorized"
|
1007 |
-
* values (like a Deferred)
|
1008 |
-
*
|
1009 |
-
* unique: will ensure a callback can only be added once (no duplicate in the list)
|
1010 |
-
*
|
1011 |
-
* stopOnFalse: interrupt callings when a callback returns false
|
1012 |
-
*
|
1013 |
-
*/
|
1014 |
-
jQuery.Callbacks = function( flags ) {
|
1015 |
-
|
1016 |
-
// Convert flags from String-formatted to Object-formatted
|
1017 |
-
// (we check in cache first)
|
1018 |
-
flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
|
1019 |
-
|
1020 |
-
var // Actual callback list
|
1021 |
-
list = [],
|
1022 |
-
// Stack of fire calls for repeatable lists
|
1023 |
-
stack = [],
|
1024 |
-
// Last fire value (for non-forgettable lists)
|
1025 |
-
memory,
|
1026 |
-
// Flag to know if list is currently firing
|
1027 |
-
firing,
|
1028 |
-
// First callback to fire (used internally by add and fireWith)
|
1029 |
-
firingStart,
|
1030 |
-
// End of the loop when firing
|
1031 |
-
firingLength,
|
1032 |
-
// Index of currently firing callback (modified by remove if needed)
|
1033 |
-
firingIndex,
|
1034 |
-
// Add one or several callbacks to the list
|
1035 |
-
add = function( args ) {
|
1036 |
-
var i,
|
1037 |
-
length,
|
1038 |
-
elem,
|
1039 |
-
type,
|
1040 |
-
actual;
|
1041 |
-
for ( i = 0, length = args.length; i < length; i++ ) {
|
1042 |
-
elem = args[ i ];
|
1043 |
-
type = jQuery.type( elem );
|
1044 |
-
if ( type === "array" ) {
|
1045 |
-
// Inspect recursively
|
1046 |
-
add( elem );
|
1047 |
-
} else if ( type === "function" ) {
|
1048 |
-
// Add if not in unique mode and callback is not in
|
1049 |
-
if ( !flags.unique || !self.has( elem ) ) {
|
1050 |
-
list.push( elem );
|
1051 |
-
}
|
1052 |
-
}
|
1053 |
-
}
|
1054 |
-
},
|
1055 |
-
// Fire callbacks
|
1056 |
-
fire = function( context, args ) {
|
1057 |
-
args = args || [];
|
1058 |
-
memory = !flags.memory || [ context, args ];
|
1059 |
-
firing = true;
|
1060 |
-
firingIndex = firingStart || 0;
|
1061 |
-
firingStart = 0;
|
1062 |
-
firingLength = list.length;
|
1063 |
-
for ( ; list && firingIndex < firingLength; firingIndex++ ) {
|
1064 |
-
if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
|
1065 |
-
memory = true; // Mark as halted
|
1066 |
-
break;
|
1067 |
-
}
|
1068 |
-
}
|
1069 |
-
firing = false;
|
1070 |
-
if ( list ) {
|
1071 |
-
if ( !flags.once ) {
|
1072 |
-
if ( stack && stack.length ) {
|
1073 |
-
memory = stack.shift();
|
1074 |
-
self.fireWith( memory[ 0 ], memory[ 1 ] );
|
1075 |
-
}
|
1076 |
-
} else if ( memory === true ) {
|
1077 |
-
self.disable();
|
1078 |
-
} else {
|
1079 |
-
list = [];
|
1080 |
-
}
|
1081 |
-
}
|
1082 |
-
},
|
1083 |
-
// Actual Callbacks object
|
1084 |
-
self = {
|
1085 |
-
// Add a callback or a collection of callbacks to the list
|
1086 |
-
add: function() {
|
1087 |
-
if ( list ) {
|
1088 |
-
var length = list.length;
|
1089 |
-
add( arguments );
|
1090 |
-
// Do we need to add the callbacks to the
|
1091 |
-
// current firing batch?
|
1092 |
-
if ( firing ) {
|
1093 |
-
firingLength = list.length;
|
1094 |
-
// With memory, if we're not firing then
|
1095 |
-
// we should call right away, unless previous
|
1096 |
-
// firing was halted (stopOnFalse)
|
1097 |
-
} else if ( memory && memory !== true ) {
|
1098 |
-
firingStart = length;
|
1099 |
-
fire( memory[ 0 ], memory[ 1 ] );
|
1100 |
-
}
|
1101 |
-
}
|
1102 |
-
return this;
|
1103 |
-
},
|
1104 |
-
// Remove a callback from the list
|
1105 |
-
remove: function() {
|
1106 |
-
if ( list ) {
|
1107 |
-
var args = arguments,
|
1108 |
-
argIndex = 0,
|
1109 |
-
argLength = args.length;
|
1110 |
-
for ( ; argIndex < argLength ; argIndex++ ) {
|
1111 |
-
for ( var i = 0; i < list.length; i++ ) {
|
1112 |
-
if ( args[ argIndex ] === list[ i ] ) {
|
1113 |
-
// Handle firingIndex and firingLength
|
1114 |
-
if ( firing ) {
|
1115 |
-
if ( i <= firingLength ) {
|
1116 |
-
firingLength--;
|
1117 |
-
if ( i <= firingIndex ) {
|
1118 |
-
firingIndex--;
|
1119 |
-
}
|
1120 |
-
}
|
1121 |
-
}
|
1122 |
-
// Remove the element
|
1123 |
-
list.splice( i--, 1 );
|
1124 |
-
// If we have some unicity property then
|
1125 |
-
// we only need to do this once
|
1126 |
-
if ( flags.unique ) {
|
1127 |
-
break;
|
1128 |
-
}
|
1129 |
-
}
|
1130 |
-
}
|
1131 |
-
}
|
1132 |
-
}
|
1133 |
-
return this;
|
1134 |
-
},
|
1135 |
-
// Control if a given callback is in the list
|
1136 |
-
has: function( fn ) {
|
1137 |
-
if ( list ) {
|
1138 |
-
var i = 0,
|
1139 |
-
length = list.length;
|
1140 |
-
for ( ; i < length; i++ ) {
|
1141 |
-
if ( fn === list[ i ] ) {
|
1142 |
-
return true;
|
1143 |
-
}
|
1144 |
-
}
|
1145 |
-
}
|
1146 |
-
return false;
|
1147 |
-
},
|
1148 |
-
// Remove all callbacks from the list
|
1149 |
-
empty: function() {
|
1150 |
-
list = [];
|
1151 |
-
return this;
|
1152 |
-
},
|
1153 |
-
// Have the list do nothing anymore
|
1154 |
-
disable: function() {
|
1155 |
-
list = stack = memory = undefined;
|
1156 |
-
return this;
|
1157 |
-
},
|
1158 |
-
// Is it disabled?
|
1159 |
-
disabled: function() {
|
1160 |
-
return !list;
|
1161 |
-
},
|
1162 |
-
// Lock the list in its current state
|
1163 |
-
lock: function() {
|
1164 |
-
stack = undefined;
|
1165 |
-
if ( !memory || memory === true ) {
|
1166 |
-
self.disable();
|
1167 |
-
}
|
1168 |
-
return this;
|
1169 |
-
},
|
1170 |
-
// Is it locked?
|
1171 |
-
locked: function() {
|
1172 |
-
return !stack;
|
1173 |
-
},
|
1174 |
-
// Call all callbacks with the given context and arguments
|
1175 |
-
fireWith: function( context, args ) {
|
1176 |
-
if ( stack ) {
|
1177 |
-
if ( firing ) {
|
1178 |
-
if ( !flags.once ) {
|
1179 |
-
stack.push( [ context, args ] );
|
1180 |
-
}
|
1181 |
-
} else if ( !( flags.once && memory ) ) {
|
1182 |
-
fire( context, args );
|
1183 |
-
}
|
1184 |
-
}
|
1185 |
-
return this;
|
1186 |
-
},
|
1187 |
-
// Call all the callbacks with the given arguments
|
1188 |
-
fire: function() {
|
1189 |
-
self.fireWith( this, arguments );
|
1190 |
-
return this;
|
1191 |
-
},
|
1192 |
-
// To know if the callbacks have already been called at least once
|
1193 |
-
fired: function() {
|
1194 |
-
return !!memory;
|
1195 |
-
}
|
1196 |
-
};
|
1197 |
-
|
1198 |
-
return self;
|
1199 |
-
};
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
var // Static reference to slice
|
1205 |
-
sliceDeferred = [].slice;
|
1206 |
-
|
1207 |
-
jQuery.extend({
|
1208 |
-
|
1209 |
-
Deferred: function( func ) {
|
1210 |
-
var doneList = jQuery.Callbacks( "once memory" ),
|
1211 |
-
failList = jQuery.Callbacks( "once memory" ),
|
1212 |
-
progressList = jQuery.Callbacks( "memory" ),
|
1213 |
-
state = "pending",
|
1214 |
-
lists = {
|
1215 |
-
resolve: doneList,
|
1216 |
-
reject: failList,
|
1217 |
-
notify: progressList
|
1218 |
-
},
|
1219 |
-
promise = {
|
1220 |
-
done: doneList.add,
|
1221 |
-
fail: failList.add,
|
1222 |
-
progress: progressList.add,
|
1223 |
-
|
1224 |
-
state: function() {
|
1225 |
-
return state;
|
1226 |
-
},
|
1227 |
-
|
1228 |
-
// Deprecated
|
1229 |
-
isResolved: doneList.fired,
|
1230 |
-
isRejected: failList.fired,
|
1231 |
-
|
1232 |
-
then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
|
1233 |
-
deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
|
1234 |
-
return this;
|
1235 |
-
},
|
1236 |
-
always: function() {
|
1237 |
-
return deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
|
1238 |
-
},
|
1239 |
-
pipe: function( fnDone, fnFail, fnProgress ) {
|
1240 |
-
return jQuery.Deferred(function( newDefer ) {
|
1241 |
-
jQuery.each( {
|
1242 |
-
done: [ fnDone, "resolve" ],
|
1243 |
-
fail: [ fnFail, "reject" ],
|
1244 |
-
progress: [ fnProgress, "notify" ]
|
1245 |
-
}, function( handler, data ) {
|
1246 |
-
var fn = data[ 0 ],
|
1247 |
-
action = data[ 1 ],
|
1248 |
-
returned;
|
1249 |
-
if ( jQuery.isFunction( fn ) ) {
|
1250 |
-
deferred[ handler ](function() {
|
1251 |
-
returned = fn.apply( this, arguments );
|
1252 |
-
if ( returned && jQuery.isFunction( returned.promise ) ) {
|
1253 |
-
returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
|
1254 |
-
} else {
|
1255 |
-
newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
|
1256 |
-
}
|
1257 |
-
});
|
1258 |
-
} else {
|
1259 |
-
deferred[ handler ]( newDefer[ action ] );
|
1260 |
-
}
|
1261 |
-
});
|
1262 |
-
}).promise();
|
1263 |
-
},
|
1264 |
-
// Get a promise for this deferred
|
1265 |
-
// If obj is provided, the promise aspect is added to the object
|
1266 |
-
promise: function( obj ) {
|
1267 |
-
if ( obj == null ) {
|
1268 |
-
obj = promise;
|
1269 |
-
} else {
|
1270 |
-
for ( var key in promise ) {
|
1271 |
-
obj[ key ] = promise[ key ];
|
1272 |
-
}
|
1273 |
-
}
|
1274 |
-
return obj;
|
1275 |
-
}
|
1276 |
-
},
|
1277 |
-
deferred = promise.promise({}),
|
1278 |
-
key;
|
1279 |
-
|
1280 |
-
for ( key in lists ) {
|
1281 |
-
deferred[ key ] = lists[ key ].fire;
|
1282 |
-
deferred[ key + "With" ] = lists[ key ].fireWith;
|
1283 |
-
}
|
1284 |
-
|
1285 |
-
// Handle state
|
1286 |
-
deferred.done( function() {
|
1287 |
-
state = "resolved";
|
1288 |
-
}, failList.disable, progressList.lock ).fail( function() {
|
1289 |
-
state = "rejected";
|
1290 |
-
}, doneList.disable, progressList.lock );
|
1291 |
-
|
1292 |
-
// Call given func if any
|
1293 |
-
if ( func ) {
|
1294 |
-
func.call( deferred, deferred );
|
1295 |
-
}
|
1296 |
-
|
1297 |
-
// All done!
|
1298 |
-
return deferred;
|
1299 |
-
},
|
1300 |
-
|
1301 |
-
// Deferred helper
|
1302 |
-
when: function( firstParam ) {
|
1303 |
-
var args = sliceDeferred.call( arguments, 0 ),
|
1304 |
-
i = 0,
|
1305 |
-
length = args.length,
|
1306 |
-
pValues = new Array( length ),
|
1307 |
-
count = length,
|
1308 |
-
pCount = length,
|
1309 |
-
deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
|
1310 |
-
firstParam :
|
1311 |
-
jQuery.Deferred(),
|
1312 |
-
promise = deferred.promise();
|
1313 |
-
function resolveFunc( i ) {
|
1314 |
-
return function( value ) {
|
1315 |
-
args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
|
1316 |
-
if ( !( --count ) ) {
|
1317 |
-
deferred.resolveWith( deferred, args );
|
1318 |
-
}
|
1319 |
-
};
|
1320 |
-
}
|
1321 |
-
function progressFunc( i ) {
|
1322 |
-
return function( value ) {
|
1323 |
-
pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
|
1324 |
-
deferred.notifyWith( promise, pValues );
|
1325 |
-
};
|
1326 |
-
}
|
1327 |
-
if ( length > 1 ) {
|
1328 |
-
for ( ; i < length; i++ ) {
|
1329 |
-
if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
|
1330 |
-
args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
|
1331 |
-
} else {
|
1332 |
-
--count;
|
1333 |
-
}
|
1334 |
-
}
|
1335 |
-
if ( !count ) {
|
1336 |
-
deferred.resolveWith( deferred, args );
|
1337 |
-
}
|
1338 |
-
} else if ( deferred !== firstParam ) {
|
1339 |
-
deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
|
1340 |
-
}
|
1341 |
-
return promise;
|
1342 |
-
}
|
1343 |
-
});
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
jQuery.support = (function() {
|
1349 |
-
|
1350 |
-
var div = document.createElement( "div" ),
|
1351 |
-
documentElement = document.documentElement,
|
1352 |
-
all,
|
1353 |
-
a,
|
1354 |
-
select,
|
1355 |
-
opt,
|
1356 |
-
input,
|
1357 |
-
marginDiv,
|
1358 |
-
support,
|
1359 |
-
fragment,
|
1360 |
-
body,
|
1361 |
-
testElementParent,
|
1362 |
-
testElement,
|
1363 |
-
testElementStyle,
|
1364 |
-
tds,
|
1365 |
-
events,
|
1366 |
-
eventName,
|
1367 |
-
i,
|
1368 |
-
isSupported;
|
1369 |
-
|
1370 |
-
// Preliminary tests
|
1371 |
-
div.setAttribute("className", "t");
|
1372 |
-
div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>";
|
1373 |
-
|
1374 |
-
|
1375 |
-
all = div.getElementsByTagName( "*" );
|
1376 |
-
a = div.getElementsByTagName( "a" )[ 0 ];
|
1377 |
-
|
1378 |
-
// Can't get basic test support
|
1379 |
-
if ( !all || !all.length || !a ) {
|
1380 |
-
return {};
|
1381 |
-
}
|
1382 |
-
|
1383 |
-
// First batch of supports tests
|
1384 |
-
select = document.createElement( "select" );
|
1385 |
-
opt = select.appendChild( document.createElement("option") );
|
1386 |
-
input = div.getElementsByTagName( "input" )[ 0 ];
|
1387 |
-
|
1388 |
-
support = {
|
1389 |
-
// IE strips leading whitespace when .innerHTML is used
|
1390 |
-
leadingWhitespace: ( div.firstChild.nodeType === 3 ),
|
1391 |
-
|
1392 |
-
// Make sure that tbody elements aren't automatically inserted
|
1393 |
-
// IE will insert them into empty tables
|
1394 |
-
tbody: !div.getElementsByTagName( "tbody" ).length,
|
1395 |
-
|
1396 |
-
// Make sure that link elements get serialized correctly by innerHTML
|
1397 |
-
// This requires a wrapper element in IE
|
1398 |
-
htmlSerialize: !!div.getElementsByTagName( "link" ).length,
|
1399 |
-
|
1400 |
-
// Get the style information from getAttribute
|
1401 |
-
// (IE uses .cssText instead)
|
1402 |
-
style: /top/.test( a.getAttribute("style") ),
|
1403 |
-
|
1404 |
-
// Make sure that URLs aren't manipulated
|
1405 |
-
// (IE normalizes it by default)
|
1406 |
-
hrefNormalized: ( a.getAttribute( "href" ) === "/a" ),
|
1407 |
-
|
1408 |
-
// Make sure that element opacity exists
|
1409 |
-
// (IE uses filter instead)
|
1410 |
-
// Use a regex to work around a WebKit issue. See #5145
|
1411 |
-
opacity: /^0.55/.test( a.style.opacity ),
|
1412 |
-
|
1413 |
-
// Verify style float existence
|
1414 |
-
// (IE uses styleFloat instead of cssFloat)
|
1415 |
-
cssFloat: !!a.style.cssFloat,
|
1416 |
-
|
1417 |
-
// Make sure unknown elements (like HTML5 elems) are handled appropriately
|
1418 |
-
unknownElems: !!div.getElementsByTagName( "nav" ).length,
|
1419 |
-
|
1420 |
-
// Make sure that if no value is specified for a checkbox
|
1421 |
-
// that it defaults to "on".
|
1422 |
-
// (WebKit defaults to "" instead)
|
1423 |
-
checkOn: ( input.value === "on" ),
|
1424 |
-
|
1425 |
-
// Make sure that a selected-by-default option has a working selected property.
|
1426 |
-
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
|
1427 |
-
optSelected: opt.selected,
|
1428 |
-
|
1429 |
-
// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
|
1430 |
-
getSetAttribute: div.className !== "t",
|
1431 |
-
|
1432 |
-
// Tests for enctype support on a form(#6743)
|
1433 |
-
enctype: !!document.createElement("form").enctype,
|
1434 |
-
|
1435 |
-
// Will be defined later
|
1436 |
-
submitBubbles: true,
|
1437 |
-
changeBubbles: true,
|
1438 |
-
focusinBubbles: false,
|
1439 |
-
deleteExpando: true,
|
1440 |
-
noCloneEvent: true,
|
1441 |
-
inlineBlockNeedsLayout: false,
|
1442 |
-
shrinkWrapBlocks: false,
|
1443 |
-
reliableMarginRight: true
|
1444 |
-
};
|
1445 |
-
|
1446 |
-
// Make sure checked status is properly cloned
|
1447 |
-
input.checked = true;
|
1448 |
-
support.noCloneChecked = input.cloneNode( true ).checked;
|
1449 |
-
|
1450 |
-
// Make sure that the options inside disabled selects aren't marked as disabled
|
1451 |
-
// (WebKit marks them as disabled)
|
1452 |
-
select.disabled = true;
|
1453 |
-
support.optDisabled = !opt.disabled;
|
1454 |
-
|
1455 |
-
// Test to see if it's possible to delete an expando from an element
|
1456 |
-
// Fails in Internet Explorer
|
1457 |
-
try {
|
1458 |
-
delete div.test;
|
1459 |
-
} catch( e ) {
|
1460 |
-
support.deleteExpando = false;
|
1461 |
-
}
|
1462 |
-
|
1463 |
-
if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
|
1464 |
-
div.attachEvent( "onclick", function() {
|
1465 |
-
// Cloning a node shouldn't copy over any
|
1466 |
-
// bound event handlers (IE does this)
|
1467 |
-
support.noCloneEvent = false;
|
1468 |
-
});
|
1469 |
-
div.cloneNode( true ).fireEvent( "onclick" );
|
1470 |
-
}
|
1471 |
-
|
1472 |
-
// Check if a radio maintains its value
|
1473 |
-
// after being appended to the DOM
|
1474 |
-
input = document.createElement("input");
|
1475 |
-
input.value = "t";
|
1476 |
-
input.setAttribute("type", "radio");
|
1477 |
-
support.radioValue = input.value === "t";
|
1478 |
-
|
1479 |
-
input.setAttribute("checked", "checked");
|
1480 |
-
div.appendChild( input );
|
1481 |
-
fragment = document.createDocumentFragment();
|
1482 |
-
fragment.appendChild( div.lastChild );
|
1483 |
-
|
1484 |
-
// WebKit doesn't clone checked state correctly in fragments
|
1485 |
-
support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
|
1486 |
-
|
1487 |
-
div.innerHTML = "";
|
1488 |
-
|
1489 |
-
// Figure out if the W3C box model works as expected
|
1490 |
-
div.style.width = div.style.paddingLeft = "1px";
|
1491 |
-
|
1492 |
-
// We don't want to do body-related feature tests on frameset
|
1493 |
-
// documents, which lack a body. So we use
|
1494 |
-
// document.getElementsByTagName("body")[0], which is undefined in
|
1495 |
-
// frameset documents, while document.body isn’t. (7398)
|
1496 |
-
body = document.getElementsByTagName("body")[ 0 ];
|
1497 |
-
// We use our own, invisible, body unless the body is already present
|
1498 |
-
// in which case we use a div (#9239)
|
1499 |
-
testElement = document.createElement( body ? "div" : "body" );
|
1500 |
-
testElementStyle = {
|
1501 |
-
visibility: "hidden",
|
1502 |
-
width: 0,
|
1503 |
-
height: 0,
|
1504 |
-
border: 0,
|
1505 |
-
margin: 0,
|
1506 |
-
background: "none"
|
1507 |
-
};
|
1508 |
-
if ( body ) {
|
1509 |
-
jQuery.extend( testElementStyle, {
|
1510 |
-
position: "absolute",
|
1511 |
-
left: "-999px",
|
1512 |
-
top: "-999px"
|
1513 |
-
});
|
1514 |
-
}
|
1515 |
-
for ( i in testElementStyle ) {
|
1516 |
-
testElement.style[ i ] = testElementStyle[ i ];
|
1517 |
-
}
|
1518 |
-
testElement.appendChild( div );
|
1519 |
-
testElementParent = body || documentElement;
|
1520 |
-
testElementParent.insertBefore( testElement, testElementParent.firstChild );
|
1521 |
-
|
1522 |
-
// Check if a disconnected checkbox will retain its checked
|
1523 |
-
// value of true after appended to the DOM (IE6/7)
|
1524 |
-
support.appendChecked = input.checked;
|
1525 |
-
|
1526 |
-
support.boxModel = div.offsetWidth === 2;
|
1527 |
-
|
1528 |
-
if ( "zoom" in div.style ) {
|
1529 |
-
// Check if natively block-level elements act like inline-block
|
1530 |
-
// elements when setting their display to 'inline' and giving
|
1531 |
-
// them layout
|
1532 |
-
// (IE < 8 does this)
|
1533 |
-
div.style.display = "inline";
|
1534 |
-
div.style.zoom = 1;
|
1535 |
-
support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
|
1536 |
-
|
1537 |
-
// Check if elements with layout shrink-wrap their children
|
1538 |
-
// (IE 6 does this)
|
1539 |
-
div.style.display = "";
|
1540 |
-
div.innerHTML = "<div style='width:4px;'></div>";
|
1541 |
-
support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
|
1542 |
-
}
|
1543 |
-
|
1544 |
-
div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
|
1545 |
-
tds = div.getElementsByTagName( "td" );
|
1546 |
-
|
1547 |
-
// Check if table cells still have offsetWidth/Height when they are set
|
1548 |
-
// to display:none and there are still other visible table cells in a
|
1549 |
-
// table row; if so, offsetWidth/Height are not reliable for use when
|
1550 |
-
// determining if an element has been hidden directly using
|
1551 |
-
// display:none (it is still safe to use offsets if a parent element is
|
1552 |
-
// hidden; don safety goggles and see bug #4512 for more information).
|
1553 |
-
// (only IE 8 fails this test)
|
1554 |
-
isSupported = ( tds[ 0 ].offsetHeight === 0 );
|
1555 |
-
|
1556 |
-
tds[ 0 ].style.display = "";
|
1557 |
-
tds[ 1 ].style.display = "none";
|
1558 |
-
|
1559 |
-
// Check if empty table cells still have offsetWidth/Height
|
1560 |
-
// (IE < 8 fail this test)
|
1561 |
-
support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
|
1562 |
-
div.innerHTML = "";
|
1563 |
-
|
1564 |
-
// Check if div with explicit width and no margin-right incorrectly
|
1565 |
-
// gets computed margin-right based on width of container. For more
|
1566 |
-
// info see bug #3333
|
1567 |
-
// Fails in WebKit before Feb 2011 nightlies
|
1568 |
-
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
1569 |
-
if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
1570 |
-
marginDiv = document.createElement( "div" );
|
1571 |
-
marginDiv.style.width = "0";
|
1572 |
-
marginDiv.style.marginRight = "0";
|
1573 |
-
div.appendChild( marginDiv );
|
1574 |
-
support.reliableMarginRight =
|
1575 |
-
( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
|
1576 |
-
}
|
1577 |
-
|
1578 |
-
// Technique from Juriy Zaytsev
|
1579 |
-
// http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
|
1580 |
-
// We only care about the case where non-standard event systems
|
1581 |
-
// are used, namely in IE. Short-circuiting here helps us to
|
1582 |
-
// avoid an eval call (in setAttribute) which can cause CSP
|
1583 |
-
// to go haywire. See: https://developer.mozilla.org/en/Security/CSP
|
1584 |
-
if ( div.attachEvent ) {
|
1585 |
-
for( i in {
|
1586 |
-
submit: 1,
|
1587 |
-
change: 1,
|
1588 |
-
focusin: 1
|
1589 |
-
} ) {
|
1590 |
-
eventName = "on" + i;
|
1591 |
-
isSupported = ( eventName in div );
|
1592 |
-
if ( !isSupported ) {
|
1593 |
-
div.setAttribute( eventName, "return;" );
|
1594 |
-
isSupported = ( typeof div[ eventName ] === "function" );
|
1595 |
-
}
|
1596 |
-
support[ i + "Bubbles" ] = isSupported;
|
1597 |
-
}
|
1598 |
-
}
|
1599 |
-
|
1600 |
-
// Run fixed position tests at doc ready to avoid a crash
|
1601 |
-
// related to the invisible body in IE8
|
1602 |
-
jQuery(function() {
|
1603 |
-
var container, outer, inner, table, td, offsetSupport,
|
1604 |
-
conMarginTop = 1,
|
1605 |
-
ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",
|
1606 |
-
vb = "visibility:hidden;border:0;",
|
1607 |
-
style = "style='" + ptlm + "border:5px solid #000;padding:0;'",
|
1608 |
-
html = "<div " + style + "><div></div></div>" +
|
1609 |
-
"<table " + style + " cellpadding='0' cellspacing='0'>" +
|
1610 |
-
"<tr><td></td></tr></table>";
|
1611 |
-
|
1612 |
-
// Reconstruct a container
|
1613 |
-
body = document.getElementsByTagName("body")[0];
|
1614 |
-
if ( !body ) {
|
1615 |
-
// Return for frameset docs that don't have a body
|
1616 |
-
// These tests cannot be done
|
1617 |
-
return;
|
1618 |
-
}
|
1619 |
-
|
1620 |
-
container = document.createElement("div");
|
1621 |
-
container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
|
1622 |
-
body.insertBefore( container, body.firstChild );
|
1623 |
-
|
1624 |
-
// Construct a test element
|
1625 |
-
testElement = document.createElement("div");
|
1626 |
-
testElement.style.cssText = ptlm + vb;
|
1627 |
-
|
1628 |
-
testElement.innerHTML = html;
|
1629 |
-
container.appendChild( testElement );
|
1630 |
-
outer = testElement.firstChild;
|
1631 |
-
inner = outer.firstChild;
|
1632 |
-
td = outer.nextSibling.firstChild.firstChild;
|
1633 |
-
|
1634 |
-
offsetSupport = {
|
1635 |
-
doesNotAddBorder: ( inner.offsetTop !== 5 ),
|
1636 |
-
doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
|
1637 |
-
};
|
1638 |
-
|
1639 |
-
inner.style.position = "fixed";
|
1640 |
-
inner.style.top = "20px";
|
1641 |
-
|
1642 |
-
// safari subtracts parent border width here which is 5px
|
1643 |
-
offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
|
1644 |
-
inner.style.position = inner.style.top = "";
|
1645 |
-
|
1646 |
-
outer.style.overflow = "hidden";
|
1647 |
-
outer.style.position = "relative";
|
1648 |
-
|
1649 |
-
offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
|
1650 |
-
offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
|
1651 |
-
|
1652 |
-
body.removeChild( container );
|
1653 |
-
testElement = container = null;
|
1654 |
-
|
1655 |
-
jQuery.extend( support, offsetSupport );
|
1656 |
-
});
|
1657 |
-
|
1658 |
-
testElement.innerHTML = "";
|
1659 |
-
testElementParent.removeChild( testElement );
|
1660 |
-
|
1661 |
-
// Null connected elements to avoid leaks in IE
|
1662 |
-
testElement = fragment = select = opt = body = marginDiv = div = input = null;
|
1663 |
-
|
1664 |
-
return support;
|
1665 |
-
})();
|
1666 |
-
|
1667 |
-
// Keep track of boxModel
|
1668 |
-
jQuery.boxModel = jQuery.support.boxModel;
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
var rbrace = /^(?:\{.*\}|\[.*\])$/,
|
1674 |
-
rmultiDash = /([A-Z])/g;
|
1675 |
-
|
1676 |
-
jQuery.extend({
|
1677 |
-
cache: {},
|
1678 |
-
|
1679 |
-
// Please use with caution
|
1680 |
-
uuid: 0,
|
1681 |
-
|
1682 |
-
// Unique for each copy of jQuery on the page
|
1683 |
-
// Non-digits removed to match rinlinejQuery
|
1684 |
-
expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
|
1685 |
-
|
1686 |
-
// The following elements throw uncatchable exceptions if you
|
1687 |
-
// attempt to add expando properties to them.
|
1688 |
-
noData: {
|
1689 |
-
"embed": true,
|
1690 |
-
// Ban all objects except for Flash (which handle expandos)
|
1691 |
-
"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
|
1692 |
-
"applet": true
|
1693 |
-
},
|
1694 |
-
|
1695 |
-
hasData: function( elem ) {
|
1696 |
-
elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
|
1697 |
-
return !!elem && !isEmptyDataObject( elem );
|
1698 |
-
},
|
1699 |
-
|
1700 |
-
data: function( elem, name, data, pvt /* Internal Use Only */ ) {
|
1701 |
-
if ( !jQuery.acceptData( elem ) ) {
|
1702 |
-
return;
|
1703 |
-
}
|
1704 |
-
|
1705 |
-
var privateCache, thisCache, ret,
|
1706 |
-
internalKey = jQuery.expando,
|
1707 |
-
getByName = typeof name === "string",
|
1708 |
-
|
1709 |
-
// We have to handle DOM nodes and JS objects differently because IE6-7
|
1710 |
-
// can't GC object references properly across the DOM-JS boundary
|
1711 |
-
isNode = elem.nodeType,
|
1712 |
-
|
1713 |
-
// Only DOM nodes need the global jQuery cache; JS object data is
|
1714 |
-
// attached directly to the object so GC can occur automatically
|
1715 |
-
cache = isNode ? jQuery.cache : elem,
|
1716 |
-
|
1717 |
-
// Only defining an ID for JS objects if its cache already exists allows
|
1718 |
-
// the code to shortcut on the same path as a DOM node with no cache
|
1719 |
-
id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando,
|
1720 |
-
isEvents = name === "events";
|
1721 |
-
|
1722 |
-
// Avoid doing any more work than we need to when trying to get data on an
|
1723 |
-
// object that has no data at all
|
1724 |
-
if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
|
1725 |
-
return;
|
1726 |
-
}
|
1727 |
-
|
1728 |
-
if ( !id ) {
|
1729 |
-
// Only DOM nodes need a new unique ID for each element since their data
|
1730 |
-
// ends up in the global cache
|
1731 |
-
if ( isNode ) {
|
1732 |
-
elem[ jQuery.expando ] = id = ++jQuery.uuid;
|
1733 |
-
} else {
|
1734 |
-
id = jQuery.expando;
|
1735 |
-
}
|
1736 |
-
}
|
1737 |
-
|
1738 |
-
if ( !cache[ id ] ) {
|
1739 |
-
cache[ id ] = {};
|
1740 |
-
|
1741 |
-
// Avoids exposing jQuery metadata on plain JS objects when the object
|
1742 |
-
// is serialized using JSON.stringify
|
1743 |
-
if ( !isNode ) {
|
1744 |
-
cache[ id ].toJSON = jQuery.noop;
|
1745 |
-
}
|
1746 |
-
}
|
1747 |
-
|
1748 |
-
// An object can be passed to jQuery.data instead of a key/value pair; this gets
|
1749 |
-
// shallow copied over onto the existing cache
|
1750 |
-
if ( typeof name === "object" || typeof name === "function" ) {
|
1751 |
-
if ( pvt ) {
|
1752 |
-
cache[ id ] = jQuery.extend( cache[ id ], name );
|
1753 |
-
} else {
|
1754 |
-
cache[ id ].data = jQuery.extend( cache[ id ].data, name );
|
1755 |
-
}
|
1756 |
-
}
|
1757 |
-
|
1758 |
-
privateCache = thisCache = cache[ id ];
|
1759 |
-
|
1760 |
-
// jQuery data() is stored in a separate object inside the object's internal data
|
1761 |
-
// cache in order to avoid key collisions between internal data and user-defined
|
1762 |
-
// data.
|
1763 |
-
if ( !pvt ) {
|
1764 |
-
if ( !thisCache.data ) {
|
1765 |
-
thisCache.data = {};
|
1766 |
-
}
|
1767 |
-
|
1768 |
-
thisCache = thisCache.data;
|
1769 |
-
}
|
1770 |
-
|
1771 |
-
if ( data !== undefined ) {
|
1772 |
-
thisCache[ jQuery.camelCase( name ) ] = data;
|
1773 |
-
}
|
1774 |
-
|
1775 |
-
// Users should not attempt to inspect the internal events object using jQuery.data,
|
1776 |
-
// it is undocumented and subject to change. But does anyone listen? No.
|
1777 |
-
if ( isEvents && !thisCache[ name ] ) {
|
1778 |
-
return privateCache.events;
|
1779 |
-
}
|
1780 |
-
|
1781 |
-
// Check for both converted-to-camel and non-converted data property names
|
1782 |
-
// If a data property was specified
|
1783 |
-
if ( getByName ) {
|
1784 |
-
|
1785 |
-
// First Try to find as-is property data
|
1786 |
-
ret = thisCache[ name ];
|
1787 |
-
|
1788 |
-
// Test for null|undefined property data
|
1789 |
-
if ( ret == null ) {
|
1790 |
-
|
1791 |
-
// Try to find the camelCased property
|
1792 |
-
ret = thisCache[ jQuery.camelCase( name ) ];
|
1793 |
-
}
|
1794 |
-
} else {
|
1795 |
-
ret = thisCache;
|
1796 |
-
}
|
1797 |
-
|
1798 |
-
return ret;
|
1799 |
-
},
|
1800 |
-
|
1801 |
-
removeData: function( elem, name, pvt /* Internal Use Only */ ) {
|
1802 |
-
if ( !jQuery.acceptData( elem ) ) {
|
1803 |
-
return;
|
1804 |
-
}
|
1805 |
-
|
1806 |
-
var thisCache, i, l,
|
1807 |
-
|
1808 |
-
// Reference to internal data cache key
|
1809 |
-
internalKey = jQuery.expando,
|
1810 |
-
|
1811 |
-
isNode = elem.nodeType,
|
1812 |
-
|
1813 |
-
// See jQuery.data for more information
|
1814 |
-
cache = isNode ? jQuery.cache : elem,
|
1815 |
-
|
1816 |
-
// See jQuery.data for more information
|
1817 |
-
id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
|
1818 |
-
|
1819 |
-
// If there is already no cache entry for this object, there is no
|
1820 |
-
// purpose in continuing
|
1821 |
-
if ( !cache[ id ] ) {
|
1822 |
-
return;
|
1823 |
-
}
|
1824 |
-
|
1825 |
-
if ( name ) {
|
1826 |
-
|
1827 |
-
thisCache = pvt ? cache[ id ] : cache[ id ].data;
|
1828 |
-
|
1829 |
-
if ( thisCache ) {
|
1830 |
-
|
1831 |
-
// Support space separated names
|
1832 |
-
if ( jQuery.isArray( name ) ) {
|
1833 |
-
name = name;
|
1834 |
-
} else if ( name in thisCache ) {
|
1835 |
-
name = [ name ];
|
1836 |
-
} else {
|
1837 |
-
|
1838 |
-
// split the camel cased version by spaces
|
1839 |
-
name = jQuery.camelCase( name );
|
1840 |
-
if ( name in thisCache ) {
|
1841 |
-
name = [ name ];
|
1842 |
-
} else {
|
1843 |
-
name = name.split( " " );
|
1844 |
-
}
|
1845 |
-
}
|
1846 |
-
|
1847 |
-
for ( i = 0, l = name.length; i < l; i++ ) {
|
1848 |
-
delete thisCache[ name[i] ];
|
1849 |
-
}
|
1850 |
-
|
1851 |
-
// If there is no data left in the cache, we want to continue
|
1852 |
-
// and let the cache object itself get destroyed
|
1853 |
-
if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
|
1854 |
-
return;
|
1855 |
-
}
|
1856 |
-
}
|
1857 |
-
}
|
1858 |
-
|
1859 |
-
// See jQuery.data for more information
|
1860 |
-
if ( !pvt ) {
|
1861 |
-
delete cache[ id ].data;
|
1862 |
-
|
1863 |
-
// Don't destroy the parent cache unless the internal data object
|
1864 |
-
// had been the only thing left in it
|
1865 |
-
if ( !isEmptyDataObject(cache[ id ]) ) {
|
1866 |
-
return;
|
1867 |
-
}
|
1868 |
-
}
|
1869 |
-
|
1870 |
-
// Browsers that fail expando deletion also refuse to delete expandos on
|
1871 |
-
// the window, but it will allow it on all other JS objects; other browsers
|
1872 |
-
// don't care
|
1873 |
-
// Ensure that `cache` is not a window object #10080
|
1874 |
-
if ( jQuery.support.deleteExpando || !cache.setInterval ) {
|
1875 |
-
delete cache[ id ];
|
1876 |
-
} else {
|
1877 |
-
cache[ id ] = null;
|
1878 |
-
}
|
1879 |
-
|
1880 |
-
// We destroyed the cache and need to eliminate the expando on the node to avoid
|
1881 |
-
// false lookups in the cache for entries that no longer exist
|
1882 |
-
if ( isNode ) {
|
1883 |
-
// IE does not allow us to delete expando properties from nodes,
|
1884 |
-
// nor does it have a removeAttribute function on Document nodes;
|
1885 |
-
// we must handle all of these cases
|
1886 |
-
if ( jQuery.support.deleteExpando ) {
|
1887 |
-
delete elem[ jQuery.expando ];
|
1888 |
-
} else if ( elem.removeAttribute ) {
|
1889 |
-
elem.removeAttribute( jQuery.expando );
|
1890 |
-
} else {
|
1891 |
-
elem[ jQuery.expando ] = null;
|
1892 |
-
}
|
1893 |
-
}
|
1894 |
-
},
|
1895 |
-
|
1896 |
-
// For internal use only.
|
1897 |
-
_data: function( elem, name, data ) {
|
1898 |
-
return jQuery.data( elem, name, data, true );
|
1899 |
-
},
|
1900 |
-
|
1901 |
-
// A method for determining if a DOM node can handle the data expando
|
1902 |
-
acceptData: function( elem ) {
|
1903 |
-
if ( elem.nodeName ) {
|
1904 |
-
var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
|
1905 |
-
|
1906 |
-
if ( match ) {
|
1907 |
-
return !(match === true || elem.getAttribute("classid") !== match);
|
1908 |
-
}
|
1909 |
-
}
|
1910 |
-
|
1911 |
-
return true;
|
1912 |
-
}
|
1913 |
-
});
|
1914 |
-
|
1915 |
-
jQuery.fn.extend({
|
1916 |
-
data: function( key, value ) {
|
1917 |
-
var parts, attr, name,
|
1918 |
-
data = null;
|
1919 |
-
|
1920 |
-
if ( typeof key === "undefined" ) {
|
1921 |
-
if ( this.length ) {
|
1922 |
-
data = jQuery.data( this[0] );
|
1923 |
-
|
1924 |
-
if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) {
|
1925 |
-
attr = this[0].attributes;
|
1926 |
-
for ( var i = 0, l = attr.length; i < l; i++ ) {
|
1927 |
-
name = attr[i].name;
|
1928 |
-
|
1929 |
-
if ( name.indexOf( "data-" ) === 0 ) {
|
1930 |
-
name = jQuery.camelCase( name.substring(5) );
|
1931 |
-
|
1932 |
-
dataAttr( this[0], name, data[ name ] );
|
1933 |
-
}
|
1934 |
-
}
|
1935 |
-
jQuery._data( this[0], "parsedAttrs", true );
|
1936 |
-
}
|
1937 |
-
}
|
1938 |
-
|
1939 |
-
return data;
|
1940 |
-
|
1941 |
-
} else if ( typeof key === "object" ) {
|
1942 |
-
return this.each(function() {
|
1943 |
-
jQuery.data( this, key );
|
1944 |
-
});
|
1945 |
-
}
|
1946 |
-
|
1947 |
-
parts = key.split(".");
|
1948 |
-
parts[1] = parts[1] ? "." + parts[1] : "";
|
1949 |
-
|
1950 |
-
if ( value === undefined ) {
|
1951 |
-
data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
|
1952 |
-
|
1953 |
-
// Try to fetch any internally stored data first
|
1954 |
-
if ( data === undefined && this.length ) {
|
1955 |
-
data = jQuery.data( this[0], key );
|
1956 |
-
data = dataAttr( this[0], key, data );
|
1957 |
-
}
|
1958 |
-
|
1959 |
-
return data === undefined && parts[1] ?
|
1960 |
-
this.data( parts[0] ) :
|
1961 |
-
data;
|
1962 |
-
|
1963 |
-
} else {
|
1964 |
-
return this.each(function() {
|
1965 |
-
var $this = jQuery( this ),
|
1966 |
-
args = [ parts[0], value ];
|
1967 |
-
|
1968 |
-
$this.triggerHandler( "setData" + parts[1] + "!", args );
|
1969 |
-
jQuery.data( this, key, value );
|
1970 |
-
$this.triggerHandler( "changeData" + parts[1] + "!", args );
|
1971 |
-
});
|
1972 |
-
}
|
1973 |
-
},
|
1974 |
-
|
1975 |
-
removeData: function( key ) {
|
1976 |
-
return this.each(function() {
|
1977 |
-
jQuery.removeData( this, key );
|
1978 |
-
});
|
1979 |
-
}
|
1980 |
-
});
|
1981 |
-
|
1982 |
-
function dataAttr( elem, key, data ) {
|
1983 |
-
// If nothing was found internally, try to fetch any
|
1984 |
-
// data from the HTML5 data-* attribute
|
1985 |
-
if ( data === undefined && elem.nodeType === 1 ) {
|
1986 |
-
|
1987 |
-
var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
|
1988 |
-
|
1989 |
-
data = elem.getAttribute( name );
|
1990 |
-
|
1991 |
-
if ( typeof data === "string" ) {
|
1992 |
-
try {
|
1993 |
-
data = data === "true" ? true :
|
1994 |
-
data === "false" ? false :
|
1995 |
-
data === "null" ? null :
|
1996 |
-
jQuery.isNumeric( data ) ? parseFloat( data ) :
|
1997 |
-
rbrace.test( data ) ? jQuery.parseJSON( data ) :
|
1998 |
-
data;
|
1999 |
-
} catch( e ) {}
|
2000 |
-
|
2001 |
-
// Make sure we set the data so it isn't changed later
|
2002 |
-
jQuery.data( elem, key, data );
|
2003 |
-
|
2004 |
-
} else {
|
2005 |
-
data = undefined;
|
2006 |
-
}
|
2007 |
-
}
|
2008 |
-
|
2009 |
-
return data;
|
2010 |
-
}
|
2011 |
-
|
2012 |
-
// checks a cache object for emptiness
|
2013 |
-
function isEmptyDataObject( obj ) {
|
2014 |
-
for ( var name in obj ) {
|
2015 |
-
|
2016 |
-
// if the public data object is empty, the private is still empty
|
2017 |
-
if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
|
2018 |
-
continue;
|
2019 |
-
}
|
2020 |
-
if ( name !== "toJSON" ) {
|
2021 |
-
return false;
|
2022 |
-
}
|
2023 |
-
}
|
2024 |
-
|
2025 |
-
return true;
|
2026 |
-
}
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
function handleQueueMarkDefer( elem, type, src ) {
|
2032 |
-
var deferDataKey = type + "defer",
|
2033 |
-
queueDataKey = type + "queue",
|
2034 |
-
markDataKey = type + "mark",
|
2035 |
-
defer = jQuery._data( elem, deferDataKey );
|
2036 |
-
if ( defer &&
|
2037 |
-
( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
|
2038 |
-
( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
|
2039 |
-
// Give room for hard-coded callbacks to fire first
|
2040 |
-
// and eventually mark/queue something else on the element
|
2041 |
-
setTimeout( function() {
|
2042 |
-
if ( !jQuery._data( elem, queueDataKey ) &&
|
2043 |
-
!jQuery._data( elem, markDataKey ) ) {
|
2044 |
-
jQuery.removeData( elem, deferDataKey, true );
|
2045 |
-
defer.fire();
|
2046 |
-
}
|
2047 |
-
}, 0 );
|
2048 |
-
}
|
2049 |
-
}
|
2050 |
-
|
2051 |
-
jQuery.extend({
|
2052 |
-
|
2053 |
-
_mark: function( elem, type ) {
|
2054 |
-
if ( elem ) {
|
2055 |
-
type = ( type || "fx" ) + "mark";
|
2056 |
-
jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
|
2057 |
-
}
|
2058 |
-
},
|
2059 |
-
|
2060 |
-
_unmark: function( force, elem, type ) {
|
2061 |
-
if ( force !== true ) {
|
2062 |
-
type = elem;
|
2063 |
-
elem = force;
|
2064 |
-
force = false;
|
2065 |
-
}
|
2066 |
-
if ( elem ) {
|
2067 |
-
type = type || "fx";
|
2068 |
-
var key = type + "mark",
|
2069 |
-
count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
|
2070 |
-
if ( count ) {
|
2071 |
-
jQuery._data( elem, key, count );
|
2072 |
-
} else {
|
2073 |
-
jQuery.removeData( elem, key, true );
|
2074 |
-
handleQueueMarkDefer( elem, type, "mark" );
|
2075 |
-
}
|
2076 |
-
}
|
2077 |
-
},
|
2078 |
-
|
2079 |
-
queue: function( elem, type, data ) {
|
2080 |
-
var q;
|
2081 |
-
if ( elem ) {
|
2082 |
-
type = ( type || "fx" ) + "queue";
|
2083 |
-
q = jQuery._data( elem, type );
|
2084 |
-
|
2085 |
-
// Speed up dequeue by getting out quickly if this is just a lookup
|
2086 |
-
if ( data ) {
|
2087 |
-
if ( !q || jQuery.isArray(data) ) {
|
2088 |
-
q = jQuery._data( elem, type, jQuery.makeArray(data) );
|
2089 |
-
} else {
|
2090 |
-
q.push( data );
|
2091 |
-
}
|
2092 |
-
}
|
2093 |
-
return q || [];
|
2094 |
-
}
|
2095 |
-
},
|
2096 |
-
|
2097 |
-
dequeue: function( elem, type ) {
|
2098 |
-
type = type || "fx";
|
2099 |
-
|
2100 |
-
var queue = jQuery.queue( elem, type ),
|
2101 |
-
fn = queue.shift(),
|
2102 |
-
hooks = {};
|
2103 |
-
|
2104 |
-
// If the fx queue is dequeued, always remove the progress sentinel
|
2105 |
-
if ( fn === "inprogress" ) {
|
2106 |
-
fn = queue.shift();
|
2107 |
-
}
|
2108 |
-
|
2109 |
-
if ( fn ) {
|
2110 |
-
// Add a progress sentinel to prevent the fx queue from being
|
2111 |
-
// automatically dequeued
|
2112 |
-
if ( type === "fx" ) {
|
2113 |
-
queue.unshift( "inprogress" );
|
2114 |
-
}
|
2115 |
-
|
2116 |
-
jQuery._data( elem, type + ".run", hooks );
|
2117 |
-
fn.call( elem, function() {
|
2118 |
-
jQuery.dequeue( elem, type );
|
2119 |
-
}, hooks );
|
2120 |
-
}
|
2121 |
-
|
2122 |
-
if ( !queue.length ) {
|
2123 |
-
jQuery.removeData( elem, type + "queue " + type + ".run", true );
|
2124 |
-
handleQueueMarkDefer( elem, type, "queue" );
|
2125 |
-
}
|
2126 |
-
}
|
2127 |
-
});
|
2128 |
-
|
2129 |
-
jQuery.fn.extend({
|
2130 |
-
queue: function( type, data ) {
|
2131 |
-
if ( typeof type !== "string" ) {
|
2132 |
-
data = type;
|
2133 |
-
type = "fx";
|
2134 |
-
}
|
2135 |
-
|
2136 |
-
if ( data === undefined ) {
|
2137 |
-
return jQuery.queue( this[0], type );
|
2138 |
-
}
|
2139 |
-
return this.each(function() {
|
2140 |
-
var queue = jQuery.queue( this, type, data );
|
2141 |
-
|
2142 |
-
if ( type === "fx" && queue[0] !== "inprogress" ) {
|
2143 |
-
jQuery.dequeue( this, type );
|
2144 |
-
}
|
2145 |
-
});
|
2146 |
-
},
|
2147 |
-
dequeue: function( type ) {
|
2148 |
-
return this.each(function() {
|
2149 |
-
jQuery.dequeue( this, type );
|
2150 |
-
});
|
2151 |
-
},
|
2152 |
-
// Based off of the plugin by Clint Helfers, with permission.
|
2153 |
-
// http://blindsignals.com/index.php/2009/07/jquery-delay/
|
2154 |
-
delay: function( time, type ) {
|
2155 |
-
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
|
2156 |
-
type = type || "fx";
|
2157 |
-
|
2158 |
-
return this.queue( type, function( next, hooks ) {
|
2159 |
-
var timeout = setTimeout( next, time );
|
2160 |
-
hooks.stop = function() {
|
2161 |
-
clearTimeout( timeout );
|
2162 |
-
};
|
2163 |
-
});
|
2164 |
-
},
|
2165 |
-
clearQueue: function( type ) {
|
2166 |
-
return this.queue( type || "fx", [] );
|
2167 |
-
},
|
2168 |
-
// Get a promise resolved when queues of a certain type
|
2169 |
-
// are emptied (fx is the type by default)
|
2170 |
-
promise: function( type, object ) {
|
2171 |
-
if ( typeof type !== "string" ) {
|
2172 |
-
object = type;
|
2173 |
-
type = undefined;
|
2174 |
-
}
|
2175 |
-
type = type || "fx";
|
2176 |
-
var defer = jQuery.Deferred(),
|
2177 |
-
elements = this,
|
2178 |
-
i = elements.length,
|
2179 |
-
count = 1,
|
2180 |
-
deferDataKey = type + "defer",
|
2181 |
-
queueDataKey = type + "queue",
|
2182 |
-
markDataKey = type + "mark",
|
2183 |
-
tmp;
|
2184 |
-
function resolve() {
|
2185 |
-
if ( !( --count ) ) {
|
2186 |
-
defer.resolveWith( elements, [ elements ] );
|
2187 |
-
}
|
2188 |
-
}
|
2189 |
-
while( i-- ) {
|
2190 |
-
if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
|
2191 |
-
( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
|
2192 |
-
jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
|
2193 |
-
jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
|
2194 |
-
count++;
|
2195 |
-
tmp.add( resolve );
|
2196 |
-
}
|
2197 |
-
}
|
2198 |
-
resolve();
|
2199 |
-
return defer.promise();
|
2200 |
-
}
|
2201 |
-
});
|
2202 |
-
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
var rclass = /[\n\t\r]/g,
|
2207 |
-
rspace = /\s+/,
|
2208 |
-
rreturn = /\r/g,
|
2209 |
-
rtype = /^(?:button|input)$/i,
|
2210 |
-
rfocusable = /^(?:button|input|object|select|textarea)$/i,
|
2211 |
-
rclickable = /^a(?:rea)?$/i,
|
2212 |
-
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
|
2213 |
-
getSetAttribute = jQuery.support.getSetAttribute,
|
2214 |
-
nodeHook, boolHook, fixSpecified;
|
2215 |
-
|
2216 |
-
jQuery.fn.extend({
|
2217 |
-
attr: function( name, value ) {
|
2218 |
-
return jQuery.access( this, name, value, true, jQuery.attr );
|
2219 |
-
},
|
2220 |
-
|
2221 |
-
removeAttr: function( name ) {
|
2222 |
-
return this.each(function() {
|
2223 |
-
jQuery.removeAttr( this, name );
|
2224 |
-
});
|
2225 |
-
},
|
2226 |
-
|
2227 |
-
prop: function( name, value ) {
|
2228 |
-
return jQuery.access( this, name, value, true, jQuery.prop );
|
2229 |
-
},
|
2230 |
-
|
2231 |
-
removeProp: function( name ) {
|
2232 |
-
name = jQuery.propFix[ name ] || name;
|
2233 |
-
return this.each(function() {
|
2234 |
-
// try/catch handles cases where IE balks (such as removing a property on window)
|
2235 |
-
try {
|
2236 |
-
this[ name ] = undefined;
|
2237 |
-
delete this[ name ];
|
2238 |
-
} catch( e ) {}
|
2239 |
-
});
|
2240 |
-
},
|
2241 |
-
|
2242 |
-
addClass: function( value ) {
|
2243 |
-
var classNames, i, l, elem,
|
2244 |
-
setClass, c, cl;
|
2245 |
-
|
2246 |
-
if ( jQuery.isFunction( value ) ) {
|
2247 |
-
return this.each(function( j ) {
|
2248 |
-
jQuery( this ).addClass( value.call(this, j, this.className) );
|
2249 |
-
});
|
2250 |
-
}
|
2251 |
-
|
2252 |
-
if ( value && typeof value === "string" ) {
|
2253 |
-
classNames = value.split( rspace );
|
2254 |
-
|
2255 |
-
for ( i = 0, l = this.length; i < l; i++ ) {
|
2256 |
-
elem = this[ i ];
|
2257 |
-
|
2258 |
-
if ( elem.nodeType === 1 ) {
|
2259 |
-
if ( !elem.className && classNames.length === 1 ) {
|
2260 |
-
elem.className = value;
|
2261 |
-
|
2262 |
-
} else {
|
2263 |
-
setClass = " " + elem.className + " ";
|
2264 |
-
|
2265 |
-
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
|
2266 |
-
if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
|
2267 |
-
setClass += classNames[ c ] + " ";
|
2268 |
-
}
|
2269 |
-
}
|
2270 |
-
elem.className = jQuery.trim( setClass );
|
2271 |
-
}
|
2272 |
-
}
|
2273 |
-
}
|
2274 |
-
}
|
2275 |
-
|
2276 |
-
return this;
|
2277 |
-
},
|
2278 |
-
|
2279 |
-
removeClass: function( value ) {
|
2280 |
-
var classNames, i, l, elem, className, c, cl;
|
2281 |
-
|
2282 |
-
if ( jQuery.isFunction( value ) ) {
|
2283 |
-
return this.each(function( j ) {
|
2284 |
-
jQuery( this ).removeClass( value.call(this, j, this.className) );
|
2285 |
-
});
|
2286 |
-
}
|
2287 |
-
|
2288 |
-
if ( (value && typeof value === "string") || value === undefined ) {
|
2289 |
-
classNames = ( value || "" ).split( rspace );
|
2290 |
-
|
2291 |
-
for ( i = 0, l = this.length; i < l; i++ ) {
|
2292 |
-
elem = this[ i ];
|
2293 |
-
|
2294 |
-
if ( elem.nodeType === 1 && elem.className ) {
|
2295 |
-
if ( value ) {
|
2296 |
-
className = (" " + elem.className + " ").replace( rclass, " " );
|
2297 |
-
for ( c = 0, cl = classNames.length; c < cl; c++ ) {
|
2298 |
-
className = className.replace(" " + classNames[ c ] + " ", " ");
|
2299 |
-
}
|
2300 |
-
elem.className = jQuery.trim( className );
|
2301 |
-
|
2302 |
-
} else {
|
2303 |
-
elem.className = "";
|
2304 |
-
}
|
2305 |
-
}
|
2306 |
-
}
|
2307 |
-
}
|
2308 |
-
|
2309 |
-
return this;
|
2310 |
-
},
|
2311 |
-
|
2312 |
-
toggleClass: function( value, stateVal ) {
|
2313 |
-
var type = typeof value,
|
2314 |
-
isBool = typeof stateVal === "boolean";
|
2315 |
-
|
2316 |
-
if ( jQuery.isFunction( value ) ) {
|
2317 |
-
return this.each(function( i ) {
|
2318 |
-
jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
|
2319 |
-
});
|
2320 |
-
}
|
2321 |
-
|
2322 |
-
return this.each(function() {
|
2323 |
-
if ( type === "string" ) {
|
2324 |
-
// toggle individual class names
|
2325 |
-
var className,
|
2326 |
-
i = 0,
|
2327 |
-
self = jQuery( this ),
|
2328 |
-
state = stateVal,
|
2329 |
-
classNames = value.split( rspace );
|
2330 |
-
|
2331 |
-
while ( (className = classNames[ i++ ]) ) {
|
2332 |
-
// check each className given, space seperated list
|
2333 |
-
state = isBool ? state : !self.hasClass( className );
|
2334 |
-
self[ state ? "addClass" : "removeClass" ]( className );
|
2335 |
-
}
|
2336 |
-
|
2337 |
-
} else if ( type === "undefined" || type === "boolean" ) {
|
2338 |
-
if ( this.className ) {
|
2339 |
-
// store className if set
|
2340 |
-
jQuery._data( this, "__className__", this.className );
|
2341 |
-
}
|
2342 |
-
|
2343 |
-
// toggle whole className
|
2344 |
-
this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
|
2345 |
-
}
|
2346 |
-
});
|
2347 |
-
},
|
2348 |
-
|
2349 |
-
hasClass: function( selector ) {
|
2350 |
-
var className = " " + selector + " ",
|
2351 |
-
i = 0,
|
2352 |
-
l = this.length;
|
2353 |
-
for ( ; i < l; i++ ) {
|
2354 |
-
if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
|
2355 |
-
return true;
|
2356 |
-
}
|
2357 |
-
}
|
2358 |
-
|
2359 |
-
return false;
|
2360 |
-
},
|
2361 |
-
|
2362 |
-
val: function( value ) {
|
2363 |
-
var hooks, ret, isFunction,
|
2364 |
-
elem = this[0];
|
2365 |
-
|
2366 |
-
if ( !arguments.length ) {
|
2367 |
-
if ( elem ) {
|
2368 |
-
hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
|
2369 |
-
|
2370 |
-
if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
|
2371 |
-
return ret;
|
2372 |
-
}
|
2373 |
-
|
2374 |
-
ret = elem.value;
|
2375 |
-
|
2376 |
-
return typeof ret === "string" ?
|
2377 |
-
// handle most common string cases
|
2378 |
-
ret.replace(rreturn, "") :
|
2379 |
-
// handle cases where value is null/undef or number
|
2380 |
-
ret == null ? "" : ret;
|
2381 |
-
}
|
2382 |
-
|
2383 |
-
return undefined;
|
2384 |
-
}
|
2385 |
-
|
2386 |
-
isFunction = jQuery.isFunction( value );
|
2387 |
-
|
2388 |
-
return this.each(function( i ) {
|
2389 |
-
var self = jQuery(this), val;
|
2390 |
-
|
2391 |
-
if ( this.nodeType !== 1 ) {
|
2392 |
-
return;
|
2393 |
-
}
|
2394 |
-
|
2395 |
-
if ( isFunction ) {
|
2396 |
-
val = value.call( this, i, self.val() );
|
2397 |
-
} else {
|
2398 |
-
val = value;
|
2399 |
-
}
|
2400 |
-
|
2401 |
-
// Treat null/undefined as ""; convert numbers to string
|
2402 |
-
if ( val == null ) {
|
2403 |
-
val = "";
|
2404 |
-
} else if ( typeof val === "number" ) {
|
2405 |
-
val += "";
|
2406 |
-
} else if ( jQuery.isArray( val ) ) {
|
2407 |
-
val = jQuery.map(val, function ( value ) {
|
2408 |
-
return value == null ? "" : value + "";
|
2409 |
-
});
|
2410 |
-
}
|
2411 |
-
|
2412 |
-
hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
|
2413 |
-
|
2414 |
-
// If set returns undefined, fall back to normal setting
|
2415 |
-
if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
|
2416 |
-
this.value = val;
|
2417 |
-
}
|
2418 |
-
});
|
2419 |
-
}
|
2420 |
-
});
|
2421 |
-
|
2422 |
-
jQuery.extend({
|
2423 |
-
valHooks: {
|
2424 |
-
option: {
|
2425 |
-
get: function( elem ) {
|
2426 |
-
// attributes.value is undefined in Blackberry 4.7 but
|
2427 |
-
// uses .value. See #6932
|
2428 |
-
var val = elem.attributes.value;
|
2429 |
-
return !val || val.specified ? elem.value : elem.text;
|
2430 |
-
}
|
2431 |
-
},
|
2432 |
-
select: {
|
2433 |
-
get: function( elem ) {
|
2434 |
-
var value, i, max, option,
|
2435 |
-
index = elem.selectedIndex,
|
2436 |
-
values = [],
|
2437 |
-
options = elem.options,
|
2438 |
-
one = elem.type === "select-one";
|
2439 |
-
|
2440 |
-
// Nothing was selected
|
2441 |
-
if ( index < 0 ) {
|
2442 |
-
return null;
|
2443 |
-
}
|
2444 |
-
|
2445 |
-
// Loop through all the selected options
|
2446 |
-
i = one ? index : 0;
|
2447 |
-
max = one ? index + 1 : options.length;
|
2448 |
-
for ( ; i < max; i++ ) {
|
2449 |
-
option = options[ i ];
|
2450 |
-
|
2451 |
-
// Don't return options that are disabled or in a disabled optgroup
|
2452 |
-
if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
|
2453 |
-
(!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
|
2454 |
-
|
2455 |
-
// Get the specific value for the option
|
2456 |
-
value = jQuery( option ).val();
|
2457 |
-
|
2458 |
-
// We don't need an array for one selects
|
2459 |
-
if ( one ) {
|
2460 |
-
return value;
|
2461 |
-
}
|
2462 |
-
|
2463 |
-
// Multi-Selects return an array
|
2464 |
-
values.push( value );
|
2465 |
-
}
|
2466 |
-
}
|
2467 |
-
|
2468 |
-
// Fixes Bug #2551 -- select.val() broken in IE after form.reset()
|
2469 |
-
if ( one && !values.length && options.length ) {
|
2470 |
-
return jQuery( options[ index ] ).val();
|
2471 |
-
}
|
2472 |
-
|
2473 |
-
return values;
|
2474 |
-
},
|
2475 |
-
|
2476 |
-
set: function( elem, value ) {
|
2477 |
-
var values = jQuery.makeArray( value );
|
2478 |
-
|
2479 |
-
jQuery(elem).find("option").each(function() {
|
2480 |
-
this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
|
2481 |
-
});
|
2482 |
-
|
2483 |
-
if ( !values.length ) {
|
2484 |
-
elem.selectedIndex = -1;
|
2485 |
-
}
|
2486 |
-
return values;
|
2487 |
-
}
|
2488 |
-
}
|
2489 |
-
},
|
2490 |
-
|
2491 |
-
attrFn: {
|
2492 |
-
val: true,
|
2493 |
-
css: true,
|
2494 |
-
html: true,
|
2495 |
-
text: true,
|
2496 |
-
data: true,
|
2497 |
-
width: true,
|
2498 |
-
height: true,
|
2499 |
-
offset: true
|
2500 |
-
},
|
2501 |
-
|
2502 |
-
attr: function( elem, name, value, pass ) {
|
2503 |
-
var ret, hooks, notxml,
|
2504 |
-
nType = elem.nodeType;
|
2505 |
-
|
2506 |
-
// don't get/set attributes on text, comment and attribute nodes
|
2507 |
-
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
2508 |
-
return undefined;
|
2509 |
-
}
|
2510 |
-
|
2511 |
-
if ( pass && name in jQuery.attrFn ) {
|
2512 |
-
return jQuery( elem )[ name ]( value );
|
2513 |
-
}
|
2514 |
-
|
2515 |
-
// Fallback to prop when attributes are not supported
|
2516 |
-
if ( !("getAttribute" in elem) ) {
|
2517 |
-
return jQuery.prop( elem, name, value );
|
2518 |
-
}
|
2519 |
-
|
2520 |
-
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
2521 |
-
|
2522 |
-
// All attributes are lowercase
|
2523 |
-
// Grab necessary hook if one is defined
|
2524 |
-
if ( notxml ) {
|
2525 |
-
name = name.toLowerCase();
|
2526 |
-
hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
|
2527 |
-
}
|
2528 |
-
|
2529 |
-
if ( value !== undefined ) {
|
2530 |
-
|
2531 |
-
if ( value === null ) {
|
2532 |
-
jQuery.removeAttr( elem, name );
|
2533 |
-
return undefined;
|
2534 |
-
|
2535 |
-
} else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
2536 |
-
return ret;
|
2537 |
-
|
2538 |
-
} else {
|
2539 |
-
elem.setAttribute( name, "" + value );
|
2540 |
-
return value;
|
2541 |
-
}
|
2542 |
-
|
2543 |
-
} else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
|
2544 |
-
return ret;
|
2545 |
-
|
2546 |
-
} else {
|
2547 |
-
|
2548 |
-
ret = elem.getAttribute( name );
|
2549 |
-
|
2550 |
-
// Non-existent attributes return null, we normalize to undefined
|
2551 |
-
return ret === null ?
|
2552 |
-
undefined :
|
2553 |
-
ret;
|
2554 |
-
}
|
2555 |
-
},
|
2556 |
-
|
2557 |
-
removeAttr: function( elem, value ) {
|
2558 |
-
var propName, attrNames, name, l,
|
2559 |
-
i = 0;
|
2560 |
-
|
2561 |
-
if ( elem.nodeType === 1 ) {
|
2562 |
-
attrNames = ( value || "" ).split( rspace );
|
2563 |
-
l = attrNames.length;
|
2564 |
-
|
2565 |
-
for ( ; i < l; i++ ) {
|
2566 |
-
name = attrNames[ i ].toLowerCase();
|
2567 |
-
propName = jQuery.propFix[ name ] || name;
|
2568 |
-
|
2569 |
-
// See #9699 for explanation of this approach (setting first, then removal)
|
2570 |
-
jQuery.attr( elem, name, "" );
|
2571 |
-
elem.removeAttribute( getSetAttribute ? name : propName );
|
2572 |
-
|
2573 |
-
// Set corresponding property to false for boolean attributes
|
2574 |
-
if ( rboolean.test( name ) && propName in elem ) {
|
2575 |
-
elem[ propName ] = false;
|
2576 |
-
}
|
2577 |
-
}
|
2578 |
-
}
|
2579 |
-
},
|
2580 |
-
|
2581 |
-
attrHooks: {
|
2582 |
-
type: {
|
2583 |
-
set: function( elem, value ) {
|
2584 |
-
// We can't allow the type property to be changed (since it causes problems in IE)
|
2585 |
-
if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
|
2586 |
-
jQuery.error( "type property can't be changed" );
|
2587 |
-
} else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
|
2588 |
-
// Setting the type on a radio button after the value resets the value in IE6-9
|
2589 |
-
// Reset value to it's default in case type is set after value
|
2590 |
-
// This is for element creation
|
2591 |
-
var val = elem.value;
|
2592 |
-
elem.setAttribute( "type", value );
|
2593 |
-
if ( val ) {
|
2594 |
-
elem.value = val;
|
2595 |
-
}
|
2596 |
-
return value;
|
2597 |
-
}
|
2598 |
-
}
|
2599 |
-
},
|
2600 |
-
// Use the value property for back compat
|
2601 |
-
// Use the nodeHook for button elements in IE6/7 (#1954)
|
2602 |
-
value: {
|
2603 |
-
get: function( elem, name ) {
|
2604 |
-
if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
|
2605 |
-
return nodeHook.get( elem, name );
|
2606 |
-
}
|
2607 |
-
return name in elem ?
|
2608 |
-
elem.value :
|
2609 |
-
null;
|
2610 |
-
},
|
2611 |
-
set: function( elem, value, name ) {
|
2612 |
-
if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
|
2613 |
-
return nodeHook.set( elem, value, name );
|
2614 |
-
}
|
2615 |
-
// Does not return so that setAttribute is also used
|
2616 |
-
elem.value = value;
|
2617 |
-
}
|
2618 |
-
}
|
2619 |
-
},
|
2620 |
-
|
2621 |
-
propFix: {
|
2622 |
-
tabindex: "tabIndex",
|
2623 |
-
readonly: "readOnly",
|
2624 |
-
"for": "htmlFor",
|
2625 |
-
"class": "className",
|
2626 |
-
maxlength: "maxLength",
|
2627 |
-
cellspacing: "cellSpacing",
|
2628 |
-
cellpadding: "cellPadding",
|
2629 |
-
rowspan: "rowSpan",
|
2630 |
-
colspan: "colSpan",
|
2631 |
-
usemap: "useMap",
|
2632 |
-
frameborder: "frameBorder",
|
2633 |
-
contenteditable: "contentEditable"
|
2634 |
-
},
|
2635 |
-
|
2636 |
-
prop: function( elem, name, value ) {
|
2637 |
-
var ret, hooks, notxml,
|
2638 |
-
nType = elem.nodeType;
|
2639 |
-
|
2640 |
-
// don't get/set properties on text, comment and attribute nodes
|
2641 |
-
if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
|
2642 |
-
return undefined;
|
2643 |
-
}
|
2644 |
-
|
2645 |
-
notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
|
2646 |
-
|
2647 |
-
if ( notxml ) {
|
2648 |
-
// Fix name and attach hooks
|
2649 |
-
name = jQuery.propFix[ name ] || name;
|
2650 |
-
hooks = jQuery.propHooks[ name ];
|
2651 |
-
}
|
2652 |
-
|
2653 |
-
if ( value !== undefined ) {
|
2654 |
-
if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
|
2655 |
-
return ret;
|
2656 |
-
|
2657 |
-
} else {
|
2658 |
-
return ( elem[ name ] = value );
|
2659 |
-
}
|
2660 |
-
|
2661 |
-
} else {
|
2662 |
-
if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
|
2663 |
-
return ret;
|
2664 |
-
|
2665 |
-
} else {
|
2666 |
-
return elem[ name ];
|
2667 |
-
}
|
2668 |
-
}
|
2669 |
-
},
|
2670 |
-
|
2671 |
-
propHooks: {
|
2672 |
-
tabIndex: {
|
2673 |
-
get: function( elem ) {
|
2674 |
-
// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
|
2675 |
-
// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
2676 |
-
var attributeNode = elem.getAttributeNode("tabindex");
|
2677 |
-
|
2678 |
-
return attributeNode && attributeNode.specified ?
|
2679 |
-
parseInt( attributeNode.value, 10 ) :
|
2680 |
-
rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
|
2681 |
-
0 :
|
2682 |
-
undefined;
|
2683 |
-
}
|
2684 |
-
}
|
2685 |
-
}
|
2686 |
-
});
|
2687 |
-
|
2688 |
-
// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
|
2689 |
-
jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
|
2690 |
-
|
2691 |
-
// Hook for boolean attributes
|
2692 |
-
boolHook = {
|
2693 |
-
get: function( elem, name ) {
|
2694 |
-
// Align boolean attributes with corresponding properties
|
2695 |
-
// Fall back to attribute presence where some booleans are not supported
|
2696 |
-
var attrNode,
|
2697 |
-
property = jQuery.prop( elem, name );
|
2698 |
-
return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
|
2699 |
-
name.toLowerCase() :
|
2700 |
-
undefined;
|
2701 |
-
},
|
2702 |
-
set: function( elem, value, name ) {
|
2703 |
-
var propName;
|
2704 |
-
if ( value === false ) {
|
2705 |
-
// Remove boolean attributes when set to false
|
2706 |
-
jQuery.removeAttr( elem, name );
|
2707 |
-
} else {
|
2708 |
-
// value is true since we know at this point it's type boolean and not false
|
2709 |
-
// Set boolean attributes to the same name and set the DOM property
|
2710 |
-
propName = jQuery.propFix[ name ] || name;
|
2711 |
-
if ( propName in elem ) {
|
2712 |
-
// Only set the IDL specifically if it already exists on the element
|
2713 |
-
elem[ propName ] = true;
|
2714 |
-
}
|
2715 |
-
|
2716 |
-
elem.setAttribute( name, name.toLowerCase() );
|
2717 |
-
}
|
2718 |
-
return name;
|
2719 |
-
}
|
2720 |
-
};
|
2721 |
-
|
2722 |
-
// IE6/7 do not support getting/setting some attributes with get/setAttribute
|
2723 |
-
if ( !getSetAttribute ) {
|
2724 |
-
|
2725 |
-
fixSpecified = {
|
2726 |
-
name: true,
|
2727 |
-
id: true
|
2728 |
-
};
|
2729 |
-
|
2730 |
-
// Use this for any attribute in IE6/7
|
2731 |
-
// This fixes almost every IE6/7 issue
|
2732 |
-
nodeHook = jQuery.valHooks.button = {
|
2733 |
-
get: function( elem, name ) {
|
2734 |
-
var ret;
|
2735 |
-
ret = elem.getAttributeNode( name );
|
2736 |
-
return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
|
2737 |
-
ret.nodeValue :
|
2738 |
-
undefined;
|
2739 |
-
},
|
2740 |
-
set: function( elem, value, name ) {
|
2741 |
-
// Set the existing or create a new attribute node
|
2742 |
-
var ret = elem.getAttributeNode( name );
|
2743 |
-
if ( !ret ) {
|
2744 |
-
ret = document.createAttribute( name );
|
2745 |
-
elem.setAttributeNode( ret );
|
2746 |
-
}
|
2747 |
-
return ( ret.nodeValue = value + "" );
|
2748 |
-
}
|
2749 |
-
};
|
2750 |
-
|
2751 |
-
// Apply the nodeHook to tabindex
|
2752 |
-
jQuery.attrHooks.tabindex.set = nodeHook.set;
|
2753 |
-
|
2754 |
-
// Set width and height to auto instead of 0 on empty string( Bug #8150 )
|
2755 |
-
// This is for removals
|
2756 |
-
jQuery.each([ "width", "height" ], function( i, name ) {
|
2757 |
-
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
|
2758 |
-
set: function( elem, value ) {
|
2759 |
-
if ( value === "" ) {
|
2760 |
-
elem.setAttribute( name, "auto" );
|
2761 |
-
return value;
|
2762 |
-
}
|
2763 |
-
}
|
2764 |
-
});
|
2765 |
-
});
|
2766 |
-
|
2767 |
-
// Set contenteditable to false on removals(#10429)
|
2768 |
-
// Setting to empty string throws an error as an invalid value
|
2769 |
-
jQuery.attrHooks.contenteditable = {
|
2770 |
-
get: nodeHook.get,
|
2771 |
-
set: function( elem, value, name ) {
|
2772 |
-
if ( value === "" ) {
|
2773 |
-
value = "false";
|
2774 |
-
}
|
2775 |
-
nodeHook.set( elem, value, name );
|
2776 |
-
}
|
2777 |
-
};
|
2778 |
-
}
|
2779 |
-
|
2780 |
-
|
2781 |
-
// Some attributes require a special call on IE
|
2782 |
-
if ( !jQuery.support.hrefNormalized ) {
|
2783 |
-
jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
|
2784 |
-
jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
|
2785 |
-
get: function( elem ) {
|
2786 |
-
var ret = elem.getAttribute( name, 2 );
|
2787 |
-
return ret === null ? undefined : ret;
|
2788 |
-
}
|
2789 |
-
});
|
2790 |
-
});
|
2791 |
-
}
|
2792 |
-
|
2793 |
-
if ( !jQuery.support.style ) {
|
2794 |
-
jQuery.attrHooks.style = {
|
2795 |
-
get: function( elem ) {
|
2796 |
-
// Return undefined in the case of empty string
|
2797 |
-
// Normalize to lowercase since IE uppercases css property names
|
2798 |
-
return elem.style.cssText.toLowerCase() || undefined;
|
2799 |
-
},
|
2800 |
-
set: function( elem, value ) {
|
2801 |
-
return ( elem.style.cssText = "" + value );
|
2802 |
-
}
|
2803 |
-
};
|
2804 |
-
}
|
2805 |
-
|
2806 |
-
// Safari mis-reports the default selected property of an option
|
2807 |
-
// Accessing the parent's selectedIndex property fixes it
|
2808 |
-
if ( !jQuery.support.optSelected ) {
|
2809 |
-
jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
|
2810 |
-
get: function( elem ) {
|
2811 |
-
var parent = elem.parentNode;
|
2812 |
-
|
2813 |
-
if ( parent ) {
|
2814 |
-
parent.selectedIndex;
|
2815 |
-
|
2816 |
-
// Make sure that it also works with optgroups, see #5701
|
2817 |
-
if ( parent.parentNode ) {
|
2818 |
-
parent.parentNode.selectedIndex;
|
2819 |
-
}
|
2820 |
-
}
|
2821 |
-
return null;
|
2822 |
-
}
|
2823 |
-
});
|
2824 |
-
}
|
2825 |
-
|
2826 |
-
// IE6/7 call enctype encoding
|
2827 |
-
if ( !jQuery.support.enctype ) {
|
2828 |
-
jQuery.propFix.enctype = "encoding";
|
2829 |
-
}
|
2830 |
-
|
2831 |
-
// Radios and checkboxes getter/setter
|
2832 |
-
if ( !jQuery.support.checkOn ) {
|
2833 |
-
jQuery.each([ "radio", "checkbox" ], function() {
|
2834 |
-
jQuery.valHooks[ this ] = {
|
2835 |
-
get: function( elem ) {
|
2836 |
-
// Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
|
2837 |
-
return elem.getAttribute("value") === null ? "on" : elem.value;
|
2838 |
-
}
|
2839 |
-
};
|
2840 |
-
});
|
2841 |
-
}
|
2842 |
-
jQuery.each([ "radio", "checkbox" ], function() {
|
2843 |
-
jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
|
2844 |
-
set: function( elem, value ) {
|
2845 |
-
if ( jQuery.isArray( value ) ) {
|
2846 |
-
return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
|
2847 |
-
}
|
2848 |
-
}
|
2849 |
-
});
|
2850 |
-
});
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
var rnamespaces = /\.(.*)$/,
|
2856 |
-
rformElems = /^(?:textarea|input|select)$/i,
|
2857 |
-
rperiod = /\./g,
|
2858 |
-
rspaces = / /g,
|
2859 |
-
rescape = /[^\w\s.|`]/g,
|
2860 |
-
rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
|
2861 |
-
rhoverHack = /\bhover(\.\S+)?/,
|
2862 |
-
rkeyEvent = /^key/,
|
2863 |
-
rmouseEvent = /^(?:mouse|contextmenu)|click/,
|
2864 |
-
rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
|
2865 |
-
quickParse = function( selector ) {
|
2866 |
-
var quick = rquickIs.exec( selector );
|
2867 |
-
if ( quick ) {
|
2868 |
-
// 0 1 2 3
|
2869 |
-
// [ _, tag, id, class ]
|
2870 |
-
quick[1] = ( quick[1] || "" ).toLowerCase();
|
2871 |
-
quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
|
2872 |
-
}
|
2873 |
-
return quick;
|
2874 |
-
},
|
2875 |
-
quickIs = function( elem, m ) {
|
2876 |
-
return (
|
2877 |
-
(!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
|
2878 |
-
(!m[2] || elem.id === m[2]) &&
|
2879 |
-
(!m[3] || m[3].test( elem.className ))
|
2880 |
-
);
|
2881 |
-
},
|
2882 |
-
hoverHack = function( events ) {
|
2883 |
-
return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
|
2884 |
-
};
|
2885 |
-
|
2886 |
-
/*
|
2887 |
-
* Helper functions for managing events -- not part of the public interface.
|
2888 |
-
* Props to Dean Edwards' addEvent library for many of the ideas.
|
2889 |
-
*/
|
2890 |
-
jQuery.event = {
|
2891 |
-
|
2892 |
-
add: function( elem, types, handler, data, selector ) {
|
2893 |
-
|
2894 |
-
var elemData, eventHandle, events,
|
2895 |
-
t, tns, type, namespaces, handleObj,
|
2896 |
-
handleObjIn, quick, handlers, special;
|
2897 |
-
|
2898 |
-
// Don't attach events to noData or text/comment nodes (allow plain objects tho)
|
2899 |
-
if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
|
2900 |
-
return;
|
2901 |
-
}
|
2902 |
-
|
2903 |
-
// Caller can pass in an object of custom data in lieu of the handler
|
2904 |
-
if ( handler.handler ) {
|
2905 |
-
handleObjIn = handler;
|
2906 |
-
handler = handleObjIn.handler;
|
2907 |
-
}
|
2908 |
-
|
2909 |
-
// Make sure that the handler has a unique ID, used to find/remove it later
|
2910 |
-
if ( !handler.guid ) {
|
2911 |
-
handler.guid = jQuery.guid++;
|
2912 |
-
}
|
2913 |
-
|
2914 |
-
// Init the element's event structure and main handler, if this is the first
|
2915 |
-
events = elemData.events;
|
2916 |
-
if ( !events ) {
|
2917 |
-
elemData.events = events = {};
|
2918 |
-
}
|
2919 |
-
eventHandle = elemData.handle;
|
2920 |
-
if ( !eventHandle ) {
|
2921 |
-
elemData.handle = eventHandle = function( e ) {
|
2922 |
-
// Discard the second event of a jQuery.event.trigger() and
|
2923 |
-
// when an event is called after a page has unloaded
|
2924 |
-
return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
|
2925 |
-
jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
|
2926 |
-
undefined;
|
2927 |
-
};
|
2928 |
-
// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
|
2929 |
-
eventHandle.elem = elem;
|
2930 |
-
}
|
2931 |
-
|
2932 |
-
// Handle multiple events separated by a space
|
2933 |
-
// jQuery(...).bind("mouseover mouseout", fn);
|
2934 |
-
types = hoverHack(types).split( " " );
|
2935 |
-
for ( t = 0; t < types.length; t++ ) {
|
2936 |
-
|
2937 |
-
tns = rtypenamespace.exec( types[t] ) || [];
|
2938 |
-
type = tns[1];
|
2939 |
-
namespaces = ( tns[2] || "" ).split( "." ).sort();
|
2940 |
-
|
2941 |
-
// If event changes its type, use the special event handlers for the changed type
|
2942 |
-
special = jQuery.event.special[ type ] || {};
|
2943 |
-
|
2944 |
-
// If selector defined, determine special event api type, otherwise given type
|
2945 |
-
type = ( selector ? special.delegateType : special.bindType ) || type;
|
2946 |
-
|
2947 |
-
// Update special based on newly reset type
|
2948 |
-
special = jQuery.event.special[ type ] || {};
|
2949 |
-
|
2950 |
-
// handleObj is passed to all event handlers
|
2951 |
-
handleObj = jQuery.extend({
|
2952 |
-
type: type,
|
2953 |
-
origType: tns[1],
|
2954 |
-
data: data,
|
2955 |
-
handler: handler,
|
2956 |
-
guid: handler.guid,
|
2957 |
-
selector: selector,
|
2958 |
-
namespace: namespaces.join(".")
|
2959 |
-
}, handleObjIn );
|
2960 |
-
|
2961 |
-
// Delegated event; pre-analyze selector so it's processed quickly on event dispatch
|
2962 |
-
if ( selector ) {
|
2963 |
-
handleObj.quick = quickParse( selector );
|
2964 |
-
if ( !handleObj.quick && jQuery.expr.match.POS.test( selector ) ) {
|
2965 |
-
handleObj.isPositional = true;
|
2966 |
-
}
|
2967 |
-
}
|
2968 |
-
|
2969 |
-
// Init the event handler queue if we're the first
|
2970 |
-
handlers = events[ type ];
|
2971 |
-
if ( !handlers ) {
|
2972 |
-
handlers = events[ type ] = [];
|
2973 |
-
handlers.delegateCount = 0;
|
2974 |
-
|
2975 |
-
// Only use addEventListener/attachEvent if the special events handler returns false
|
2976 |
-
if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
|
2977 |
-
// Bind the global event handler to the element
|
2978 |
-
if ( elem.addEventListener ) {
|
2979 |
-
elem.addEventListener( type, eventHandle, false );
|
2980 |
-
|
2981 |
-
} else if ( elem.attachEvent ) {
|
2982 |
-
elem.attachEvent( "on" + type, eventHandle );
|
2983 |
-
}
|
2984 |
-
}
|
2985 |
-
}
|
2986 |
-
|
2987 |
-
if ( special.add ) {
|
2988 |
-
special.add.call( elem, handleObj );
|
2989 |
-
|
2990 |
-
if ( !handleObj.handler.guid ) {
|
2991 |
-
handleObj.handler.guid = handler.guid;
|
2992 |
-
}
|
2993 |
-
}
|
2994 |
-
|
2995 |
-
// Add to the element's handler list, delegates in front
|
2996 |
-
if ( selector ) {
|
2997 |
-
handlers.splice( handlers.delegateCount++, 0, handleObj );
|
2998 |
-
} else {
|
2999 |
-
handlers.push( handleObj );
|
3000 |
-
}
|
3001 |
-
|
3002 |
-
// Keep track of which events have ever been used, for event optimization
|
3003 |
-
jQuery.event.global[ type ] = true;
|
3004 |
-
}
|
3005 |
-
|
3006 |
-
// Nullify elem to prevent memory leaks in IE
|
3007 |
-
elem = null;
|
3008 |
-
},
|
3009 |
-
|
3010 |
-
global: {},
|
3011 |
-
|
3012 |
-
// Detach an event or set of events from an element
|
3013 |
-
remove: function( elem, types, handler, selector ) {
|
3014 |
-
|
3015 |
-
var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
|
3016 |
-
t, tns, type, namespaces, origCount,
|
3017 |
-
j, events, special, handle, eventType, handleObj;
|
3018 |
-
|
3019 |
-
if ( !elemData || !(events = elemData.events) ) {
|
3020 |
-
return;
|
3021 |
-
}
|
3022 |
-
|
3023 |
-
// Once for each type.namespace in types; type may be omitted
|
3024 |
-
types = hoverHack( types || "" ).split(" ");
|
3025 |
-
for ( t = 0; t < types.length; t++ ) {
|
3026 |
-
tns = rtypenamespace.exec( types[t] ) || [];
|
3027 |
-
type = tns[1];
|
3028 |
-
namespaces = tns[2];
|
3029 |
-
|
3030 |
-
// Unbind all events (on this namespace, if provided) for the element
|
3031 |
-
if ( !type ) {
|
3032 |
-
namespaces = namespaces? "." + namespaces : "";
|
3033 |
-
for ( j in events ) {
|
3034 |
-
jQuery.event.remove( elem, j + namespaces, handler, selector );
|
3035 |
-
}
|
3036 |
-
return;
|
3037 |
-
}
|
3038 |
-
|
3039 |
-
special = jQuery.event.special[ type ] || {};
|
3040 |
-
type = ( selector? special.delegateType : special.bindType ) || type;
|
3041 |
-
eventType = events[ type ] || [];
|
3042 |
-
origCount = eventType.length;
|
3043 |
-
namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
|
3044 |
-
|
3045 |
-
// Only need to loop for special events or selective removal
|
3046 |
-
if ( handler || namespaces || selector || special.remove ) {
|
3047 |
-
for ( j = 0; j < eventType.length; j++ ) {
|
3048 |
-
handleObj = eventType[ j ];
|
3049 |
-
|
3050 |
-
if ( !handler || handler.guid === handleObj.guid ) {
|
3051 |
-
if ( !namespaces || namespaces.test( handleObj.namespace ) ) {
|
3052 |
-
if ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) {
|
3053 |
-
eventType.splice( j--, 1 );
|
3054 |
-
|
3055 |
-
if ( handleObj.selector ) {
|
3056 |
-
eventType.delegateCount--;
|
3057 |
-
}
|
3058 |
-
if ( special.remove ) {
|
3059 |
-
special.remove.call( elem, handleObj );
|
3060 |
-
}
|
3061 |
-
}
|
3062 |
-
}
|
3063 |
-
}
|
3064 |
-
}
|
3065 |
-
} else {
|
3066 |
-
// Removing all events
|
3067 |
-
eventType.length = 0;
|
3068 |
-
}
|
3069 |
-
|
3070 |
-
// Remove generic event handler if we removed something and no more handlers exist
|
3071 |
-
// (avoids potential for endless recursion during removal of special event handlers)
|
3072 |
-
if ( eventType.length === 0 && origCount !== eventType.length ) {
|
3073 |
-
if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
|
3074 |
-
jQuery.removeEvent( elem, type, elemData.handle );
|
3075 |
-
}
|
3076 |
-
|
3077 |
-
delete events[ type ];
|
3078 |
-
}
|
3079 |
-
}
|
3080 |
-
|
3081 |
-
// Remove the expando if it's no longer used
|
3082 |
-
if ( jQuery.isEmptyObject( events ) ) {
|
3083 |
-
handle = elemData.handle;
|
3084 |
-
if ( handle ) {
|
3085 |
-
handle.elem = null;
|
3086 |
-
}
|
3087 |
-
|
3088 |
-
// removeData also checks for emptiness and clears the expando if empty
|
3089 |
-
// so use it instead of delete
|
3090 |
-
jQuery.removeData( elem, [ "events", "handle" ], true );
|
3091 |
-
}
|
3092 |
-
},
|
3093 |
-
|
3094 |
-
// Events that are safe to short-circuit if no handlers are attached.
|
3095 |
-
// Native DOM events should not be added, they may have inline handlers.
|
3096 |
-
customEvent: {
|
3097 |
-
"getData": true,
|
3098 |
-
"setData": true,
|
3099 |
-
"changeData": true
|
3100 |
-
},
|
3101 |
-
|
3102 |
-
trigger: function( event, data, elem, onlyHandlers ) {
|
3103 |
-
// Don't do events on text and comment nodes
|
3104 |
-
if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
|
3105 |
-
return;
|
3106 |
-
}
|
3107 |
-
|
3108 |
-
// Event object or event type
|
3109 |
-
var type = event.type || event,
|
3110 |
-
namespaces = [],
|
3111 |
-
cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
|
3112 |
-
|
3113 |
-
if ( type.indexOf( "!" ) >= 0 ) {
|
3114 |
-
// Exclusive events trigger only for the exact event (no namespaces)
|
3115 |
-
type = type.slice(0, -1);
|
3116 |
-
exclusive = true;
|
3117 |
-
}
|
3118 |
-
|
3119 |
-
if ( type.indexOf( "." ) >= 0 ) {
|
3120 |
-
// Namespaced trigger; create a regexp to match event type in handle()
|
3121 |
-
namespaces = type.split(".");
|
3122 |
-
type = namespaces.shift();
|
3123 |
-
namespaces.sort();
|
3124 |
-
}
|
3125 |
-
|
3126 |
-
if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
|
3127 |
-
// No jQuery handlers for this event type, and it can't have inline handlers
|
3128 |
-
return;
|
3129 |
-
}
|
3130 |
-
|
3131 |
-
// Caller can pass in an Event, Object, or just an event type string
|
3132 |
-
event = typeof event === "object" ?
|
3133 |
-
// jQuery.Event object
|
3134 |
-
event[ jQuery.expando ] ? event :
|
3135 |
-
// Object literal
|
3136 |
-
new jQuery.Event( type, event ) :
|
3137 |
-
// Just the event type (string)
|
3138 |
-
new jQuery.Event( type );
|
3139 |
-
|
3140 |
-
event.type = type;
|
3141 |
-
event.isTrigger = true;
|
3142 |
-
event.exclusive = exclusive;
|
3143 |
-
event.namespace = namespaces.join( "." );
|
3144 |
-
event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
|
3145 |
-
ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
|
3146 |
-
|
3147 |
-
// triggerHandler() and global events don't bubble or run the default action
|
3148 |
-
if ( onlyHandlers || !elem ) {
|
3149 |
-
event.preventDefault();
|
3150 |
-
}
|
3151 |
-
|
3152 |
-
// Handle a global trigger
|
3153 |
-
if ( !elem ) {
|
3154 |
-
|
3155 |
-
// TODO: Stop taunting the data cache; remove global events and always attach to document
|
3156 |
-
cache = jQuery.cache;
|
3157 |
-
for ( i in cache ) {
|
3158 |
-
if ( cache[ i ].events && cache[ i ].events[ type ] ) {
|
3159 |
-
jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
|
3160 |
-
}
|
3161 |
-
}
|
3162 |
-
return;
|
3163 |
-
}
|
3164 |
-
|
3165 |
-
// Clean up the event in case it is being reused
|
3166 |
-
event.result = undefined;
|
3167 |
-
if ( !event.target ) {
|
3168 |
-
event.target = elem;
|
3169 |
-
}
|
3170 |
-
|
3171 |
-
// Clone any incoming data and prepend the event, creating the handler arg list
|
3172 |
-
data = data != null ? jQuery.makeArray( data ) : [];
|
3173 |
-
data.unshift( event );
|
3174 |
-
|
3175 |
-
// Allow special events to draw outside the lines
|
3176 |
-
special = jQuery.event.special[ type ] || {};
|
3177 |
-
if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
|
3178 |
-
return;
|
3179 |
-
}
|
3180 |
-
|
3181 |
-
// Determine event propagation path in advance, per W3C events spec (#9951)
|
3182 |
-
// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
|
3183 |
-
eventPath = [[ elem, special.bindType || type ]];
|
3184 |
-
if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
|
3185 |
-
|
3186 |
-
bubbleType = special.delegateType || type;
|
3187 |
-
old = null;
|
3188 |
-
for ( cur = elem.parentNode; cur; cur = cur.parentNode ) {
|
3189 |
-
eventPath.push([ cur, bubbleType ]);
|
3190 |
-
old = cur;
|
3191 |
-
}
|
3192 |
-
|
3193 |
-
// Only add window if we got to document (e.g., not plain obj or detached DOM)
|
3194 |
-
if ( old && old === elem.ownerDocument ) {
|
3195 |
-
eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
|
3196 |
-
}
|
3197 |
-
}
|
3198 |
-
|
3199 |
-
// Fire handlers on the event path
|
3200 |
-
for ( i = 0; i < eventPath.length; i++ ) {
|
3201 |
-
|
3202 |
-
cur = eventPath[i][0];
|
3203 |
-
event.type = eventPath[i][1];
|
3204 |
-
|
3205 |
-
handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
|
3206 |
-
if ( handle ) {
|
3207 |
-
handle.apply( cur, data );
|
3208 |
-
}
|
3209 |
-
handle = ontype && cur[ ontype ];
|
3210 |
-
if ( handle && jQuery.acceptData( cur ) ) {
|
3211 |
-
handle.apply( cur, data );
|
3212 |
-
}
|
3213 |
-
|
3214 |
-
if ( event.isPropagationStopped() ) {
|
3215 |
-
break;
|
3216 |
-
}
|
3217 |
-
}
|
3218 |
-
event.type = type;
|
3219 |
-
|
3220 |
-
// If nobody prevented the default action, do it now
|
3221 |
-
if ( !event.isDefaultPrevented() ) {
|
3222 |
-
|
3223 |
-
if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
|
3224 |
-
!(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
|
3225 |
-
|
3226 |
-
// Call a native DOM method on the target with the same name name as the event.
|
3227 |
-
// Can't use an .isFunction() check here because IE6/7 fails that test.
|
3228 |
-
// Don't do default actions on window, that's where global variables be (#6170)
|
3229 |
-
// IE<9 dies on focus/blur to hidden element (#1486)
|
3230 |
-
if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
|
3231 |
-
|
3232 |
-
// Don't re-trigger an onFOO event when we call its FOO() method
|
3233 |
-
old = elem[ ontype ];
|
3234 |
-
|
3235 |
-
if ( old ) {
|
3236 |
-
elem[ ontype ] = null;
|
3237 |
-
}
|
3238 |
-
|
3239 |
-
// Prevent re-triggering of the same event, since we already bubbled it above
|
3240 |
-
jQuery.event.triggered = type;
|
3241 |
-
elem[ type ]();
|
3242 |
-
jQuery.event.triggered = undefined;
|
3243 |
-
|
3244 |
-
if ( old ) {
|
3245 |
-
elem[ ontype ] = old;
|
3246 |
-
}
|
3247 |
-
}
|
3248 |
-
}
|
3249 |
-
}
|
3250 |
-
|
3251 |
-
return event.result;
|
3252 |
-
},
|
3253 |
-
|
3254 |
-
dispatch: function( event ) {
|
3255 |
-
|
3256 |
-
// Make a writable jQuery.Event from the native event object
|
3257 |
-
event = jQuery.event.fix( event || window.event );
|
3258 |
-
|
3259 |
-
var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
|
3260 |
-
delegateCount = handlers.delegateCount,
|
3261 |
-
args = [].slice.call( arguments, 0 ),
|
3262 |
-
run_all = !event.exclusive && !event.namespace,
|
3263 |
-
specialHandle = ( jQuery.event.special[ event.type ] || {} ).handle,
|
3264 |
-
handlerQueue = [],
|
3265 |
-
i, j, cur, ret, selMatch, matched, matches, handleObj, sel, hit, related;
|
3266 |
-
|
3267 |
-
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
3268 |
-
args[0] = event;
|
3269 |
-
event.delegateTarget = this;
|
3270 |
-
|
3271 |
-
// Determine handlers that should run if there are delegated events
|
3272 |
-
// Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861)
|
3273 |
-
if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) {
|
3274 |
-
|
3275 |
-
for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
|
3276 |
-
selMatch = {};
|
3277 |
-
matches = [];
|
3278 |
-
for ( i = 0; i < delegateCount; i++ ) {
|
3279 |
-
handleObj = handlers[ i ];
|
3280 |
-
sel = handleObj.selector;
|
3281 |
-
hit = selMatch[ sel ];
|
3282 |
-
|
3283 |
-
if ( handleObj.isPositional ) {
|
3284 |
-
// Since .is() does not work for positionals; see http://jsfiddle.net/eJ4yd/3/
|
3285 |
-
hit = ( hit || (selMatch[ sel ] = jQuery( sel )) ).index( cur ) >= 0;
|
3286 |
-
} else if ( hit === undefined ) {
|
3287 |
-
hit = selMatch[ sel ] = ( handleObj.quick ? quickIs( cur, handleObj.quick ) : jQuery( cur ).is( sel ) );
|
3288 |
-
}
|
3289 |
-
if ( hit ) {
|
3290 |
-
matches.push( handleObj );
|
3291 |
-
}
|
3292 |
-
}
|
3293 |
-
if ( matches.length ) {
|
3294 |
-
handlerQueue.push({ elem: cur, matches: matches });
|
3295 |
-
}
|
3296 |
-
}
|
3297 |
-
}
|
3298 |
-
|
3299 |
-
// Add the remaining (directly-bound) handlers
|
3300 |
-
if ( handlers.length > delegateCount ) {
|
3301 |
-
handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
|
3302 |
-
}
|
3303 |
-
|
3304 |
-
// Run delegates first; they may want to stop propagation beneath us
|
3305 |
-
for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
|
3306 |
-
matched = handlerQueue[ i ];
|
3307 |
-
event.currentTarget = matched.elem;
|
3308 |
-
|
3309 |
-
for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
|
3310 |
-
handleObj = matched.matches[ j ];
|
3311 |
-
|
3312 |
-
// Triggered event must either 1) be non-exclusive and have no namespace, or
|
3313 |
-
// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
|
3314 |
-
if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
|
3315 |
-
|
3316 |
-
event.data = handleObj.data;
|
3317 |
-
event.handleObj = handleObj;
|
3318 |
-
|
3319 |
-
ret = ( specialHandle || handleObj.handler ).apply( matched.elem, args );
|
3320 |
-
|
3321 |
-
if ( ret !== undefined ) {
|
3322 |
-
event.result = ret;
|
3323 |
-
if ( ret === false ) {
|
3324 |
-
event.preventDefault();
|
3325 |
-
event.stopPropagation();
|
3326 |
-
}
|
3327 |
-
}
|
3328 |
-
}
|
3329 |
-
}
|
3330 |
-
}
|
3331 |
-
|
3332 |
-
return event.result;
|
3333 |
-
},
|
3334 |
-
|
3335 |
-
// Includes some event props shared by KeyEvent and MouseEvent
|
3336 |
-
// *** attrChange attrName relatedNode srcElement are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
|
3337 |
-
props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
|
3338 |
-
|
3339 |
-
fixHooks: {},
|
3340 |
-
|
3341 |
-
keyHooks: {
|
3342 |
-
props: "char charCode key keyCode".split(" "),
|
3343 |
-
filter: function( event, original ) {
|
3344 |
-
|
3345 |
-
// Add which for key events
|
3346 |
-
if ( event.which == null ) {
|
3347 |
-
event.which = original.charCode != null ? original.charCode : original.keyCode;
|
3348 |
-
}
|
3349 |
-
|
3350 |
-
return event;
|
3351 |
-
}
|
3352 |
-
},
|
3353 |
-
|
3354 |
-
mouseHooks: {
|
3355 |
-
props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),
|
3356 |
-
filter: function( event, original ) {
|
3357 |
-
var eventDoc, doc, body,
|
3358 |
-
button = original.button,
|
3359 |
-
fromElement = original.fromElement;
|
3360 |
-
|
3361 |
-
// Calculate pageX/Y if missing and clientX/Y available
|
3362 |
-
if ( event.pageX == null && original.clientX != null ) {
|
3363 |
-
eventDoc = event.target.ownerDocument || document;
|
3364 |
-
doc = eventDoc.documentElement;
|
3365 |
-
body = eventDoc.body;
|
3366 |
-
|
3367 |
-
event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
|
3368 |
-
event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
|
3369 |
-
}
|
3370 |
-
|
3371 |
-
// Add relatedTarget, if necessary
|
3372 |
-
if ( !event.relatedTarget && fromElement ) {
|
3373 |
-
event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
|
3374 |
-
}
|
3375 |
-
|
3376 |
-
// Add which for click: 1 === left; 2 === middle; 3 === right
|
3377 |
-
// Note: button is not normalized, so don't use it
|
3378 |
-
if ( !event.which && button !== undefined ) {
|
3379 |
-
event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
|
3380 |
-
}
|
3381 |
-
|
3382 |
-
return event;
|
3383 |
-
}
|
3384 |
-
},
|
3385 |
-
|
3386 |
-
fix: function( event ) {
|
3387 |
-
if ( event[ jQuery.expando ] ) {
|
3388 |
-
return event;
|
3389 |
-
}
|
3390 |
-
|
3391 |
-
// Create a writable copy of the event object and normalize some properties
|
3392 |
-
var i, prop,
|
3393 |
-
originalEvent = event,
|
3394 |
-
fixHook = jQuery.event.fixHooks[ event.type ] || {},
|
3395 |
-
copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
|
3396 |
-
|
3397 |
-
event = jQuery.Event( originalEvent );
|
3398 |
-
|
3399 |
-
for ( i = copy.length; i; ) {
|
3400 |
-
prop = copy[ --i ];
|
3401 |
-
event[ prop ] = originalEvent[ prop ];
|
3402 |
-
}
|
3403 |
-
|
3404 |
-
// Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
|
3405 |
-
if ( !event.target ) {
|
3406 |
-
event.target = originalEvent.srcElement || document;
|
3407 |
-
}
|
3408 |
-
|
3409 |
-
// Target should not be a text node (#504, Safari)
|
3410 |
-
if ( event.target.nodeType === 3 ) {
|
3411 |
-
event.target = event.target.parentNode;
|
3412 |
-
}
|
3413 |
-
|
3414 |
-
// For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
|
3415 |
-
if ( event.metaKey === undefined ) {
|
3416 |
-
event.metaKey = event.ctrlKey;
|
3417 |
-
}
|
3418 |
-
|
3419 |
-
return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
|
3420 |
-
},
|
3421 |
-
|
3422 |
-
special: {
|
3423 |
-
ready: {
|
3424 |
-
// Make sure the ready event is setup
|
3425 |
-
setup: jQuery.bindReady
|
3426 |
-
},
|
3427 |
-
|
3428 |
-
focus: {
|
3429 |
-
delegateType: "focusin",
|
3430 |
-
noBubble: true
|
3431 |
-
},
|
3432 |
-
blur: {
|
3433 |
-
delegateType: "focusout",
|
3434 |
-
noBubble: true
|
3435 |
-
},
|
3436 |
-
|
3437 |
-
beforeunload: {
|
3438 |
-
setup: function( data, namespaces, eventHandle ) {
|
3439 |
-
// We only want to do this special case on windows
|
3440 |
-
if ( jQuery.isWindow( this ) ) {
|
3441 |
-
this.onbeforeunload = eventHandle;
|
3442 |
-
}
|
3443 |
-
},
|
3444 |
-
|
3445 |
-
teardown: function( namespaces, eventHandle ) {
|
3446 |
-
if ( this.onbeforeunload === eventHandle ) {
|
3447 |
-
this.onbeforeunload = null;
|
3448 |
-
}
|
3449 |
-
}
|
3450 |
-
}
|
3451 |
-
},
|
3452 |
-
|
3453 |
-
simulate: function( type, elem, event, bubble ) {
|
3454 |
-
// Piggyback on a donor event to simulate a different one.
|
3455 |
-
// Fake originalEvent to avoid donor's stopPropagation, but if the
|
3456 |
-
// simulated event prevents default then we do the same on the donor.
|
3457 |
-
var e = jQuery.extend(
|
3458 |
-
new jQuery.Event(),
|
3459 |
-
event,
|
3460 |
-
{ type: type,
|
3461 |
-
isSimulated: true,
|
3462 |
-
originalEvent: {}
|
3463 |
-
}
|
3464 |
-
);
|
3465 |
-
if ( bubble ) {
|
3466 |
-
jQuery.event.trigger( e, null, elem );
|
3467 |
-
} else {
|
3468 |
-
jQuery.event.dispatch.call( elem, e );
|
3469 |
-
}
|
3470 |
-
if ( e.isDefaultPrevented() ) {
|
3471 |
-
event.preventDefault();
|
3472 |
-
}
|
3473 |
-
}
|
3474 |
-
};
|
3475 |
-
|
3476 |
-
// Some plugins are using, but it's undocumented/deprecated and will be removed.
|
3477 |
-
// The 1.7 special event interface should provide all the hooks needed now.
|
3478 |
-
jQuery.event.handle = jQuery.event.dispatch;
|
3479 |
-
|
3480 |
-
jQuery.removeEvent = document.removeEventListener ?
|
3481 |
-
function( elem, type, handle ) {
|
3482 |
-
if ( elem.removeEventListener ) {
|
3483 |
-
elem.removeEventListener( type, handle, false );
|
3484 |
-
}
|
3485 |
-
} :
|
3486 |
-
function( elem, type, handle ) {
|
3487 |
-
if ( elem.detachEvent ) {
|
3488 |
-
elem.detachEvent( "on" + type, handle );
|
3489 |
-
}
|
3490 |
-
};
|
3491 |
-
|
3492 |
-
jQuery.Event = function( src, props ) {
|
3493 |
-
// Allow instantiation without the 'new' keyword
|
3494 |
-
if ( !(this instanceof jQuery.Event) ) {
|
3495 |
-
return new jQuery.Event( src, props );
|
3496 |
-
}
|
3497 |
-
|
3498 |
-
// Event object
|
3499 |
-
if ( src && src.type ) {
|
3500 |
-
this.originalEvent = src;
|
3501 |
-
this.type = src.type;
|
3502 |
-
|
3503 |
-
// Events bubbling up the document may have been marked as prevented
|
3504 |
-
// by a handler lower down the tree; reflect the correct value.
|
3505 |
-
this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
|
3506 |
-
src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
|
3507 |
-
|
3508 |
-
// Event type
|
3509 |
-
} else {
|
3510 |
-
this.type = src;
|
3511 |
-
}
|
3512 |
-
|
3513 |
-
// Put explicitly provided properties onto the event object
|
3514 |
-
if ( props ) {
|
3515 |
-
jQuery.extend( this, props );
|
3516 |
-
}
|
3517 |
-
|
3518 |
-
// Create a timestamp if incoming event doesn't have one
|
3519 |
-
this.timeStamp = src && src.timeStamp || jQuery.now();
|
3520 |
-
|
3521 |
-
// Mark it as fixed
|
3522 |
-
this[ jQuery.expando ] = true;
|
3523 |
-
};
|
3524 |
-
|
3525 |
-
function returnFalse() {
|
3526 |
-
return false;
|
3527 |
-
}
|
3528 |
-
function returnTrue() {
|
3529 |
-
return true;
|
3530 |
-
}
|
3531 |
-
|
3532 |
-
// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
|
3533 |
-
// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
|
3534 |
-
jQuery.Event.prototype = {
|
3535 |
-
preventDefault: function() {
|
3536 |
-
this.isDefaultPrevented = returnTrue;
|
3537 |
-
|
3538 |
-
var e = this.originalEvent;
|
3539 |
-
if ( !e ) {
|
3540 |
-
return;
|
3541 |
-
}
|
3542 |
-
|
3543 |
-
// if preventDefault exists run it on the original event
|
3544 |
-
if ( e.preventDefault ) {
|
3545 |
-
e.preventDefault();
|
3546 |
-
|
3547 |
-
// otherwise set the returnValue property of the original event to false (IE)
|
3548 |
-
} else {
|
3549 |
-
e.returnValue = false;
|
3550 |
-
}
|
3551 |
-
},
|
3552 |
-
stopPropagation: function() {
|
3553 |
-
this.isPropagationStopped = returnTrue;
|
3554 |
-
|
3555 |
-
var e = this.originalEvent;
|
3556 |
-
if ( !e ) {
|
3557 |
-
return;
|
3558 |
-
}
|
3559 |
-
// if stopPropagation exists run it on the original event
|
3560 |
-
if ( e.stopPropagation ) {
|
3561 |
-
e.stopPropagation();
|
3562 |
-
}
|
3563 |
-
// otherwise set the cancelBubble property of the original event to true (IE)
|
3564 |
-
e.cancelBubble = true;
|
3565 |
-
},
|
3566 |
-
stopImmediatePropagation: function() {
|
3567 |
-
this.isImmediatePropagationStopped = returnTrue;
|
3568 |
-
this.stopPropagation();
|
3569 |
-
},
|
3570 |
-
isDefaultPrevented: returnFalse,
|
3571 |
-
isPropagationStopped: returnFalse,
|
3572 |
-
isImmediatePropagationStopped: returnFalse
|
3573 |
-
};
|
3574 |
-
|
3575 |
-
// Create mouseenter/leave events using mouseover/out and event-time checks
|
3576 |
-
jQuery.each({
|
3577 |
-
mouseenter: "mouseover",
|
3578 |
-
mouseleave: "mouseout"
|
3579 |
-
}, function( orig, fix ) {
|
3580 |
-
jQuery.event.special[ orig ] = jQuery.event.special[ fix ] = {
|
3581 |
-
delegateType: fix,
|
3582 |
-
bindType: fix,
|
3583 |
-
|
3584 |
-
handle: function( event ) {
|
3585 |
-
var target = this,
|
3586 |
-
related = event.relatedTarget,
|
3587 |
-
handleObj = event.handleObj,
|
3588 |
-
selector = handleObj.selector,
|
3589 |
-
oldType, ret;
|
3590 |
-
|
3591 |
-
// For a real mouseover/out, always call the handler; for
|
3592 |
-
// mousenter/leave call the handler if related is outside the target.
|
3593 |
-
// NB: No relatedTarget if the mouse left/entered the browser window
|
3594 |
-
if ( !related || handleObj.origType === event.type || (related !== target && !jQuery.contains( target, related )) ) {
|
3595 |
-
oldType = event.type;
|
3596 |
-
event.type = handleObj.origType;
|
3597 |
-
ret = handleObj.handler.apply( this, arguments );
|
3598 |
-
event.type = oldType;
|
3599 |
-
}
|
3600 |
-
return ret;
|
3601 |
-
}
|
3602 |
-
};
|
3603 |
-
});
|
3604 |
-
|
3605 |
-
// IE submit delegation
|
3606 |
-
if ( !jQuery.support.submitBubbles ) {
|
3607 |
-
|
3608 |
-
jQuery.event.special.submit = {
|
3609 |
-
setup: function() {
|
3610 |
-
// Only need this for delegated form submit events
|
3611 |
-
if ( jQuery.nodeName( this, "form" ) ) {
|
3612 |
-
return false;
|
3613 |
-
}
|
3614 |
-
|
3615 |
-
// Lazy-add a submit handler when a descendant form may potentially be submitted
|
3616 |
-
jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
|
3617 |
-
// Node name check avoids a VML-related crash in IE (#9807)
|
3618 |
-
var elem = e.target,
|
3619 |
-
form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
|
3620 |
-
if ( form && !form._submit_attached ) {
|
3621 |
-
jQuery.event.add( form, "submit._submit", function( event ) {
|
3622 |
-
// Form was submitted, bubble the event up the tree
|
3623 |
-
if ( this.parentNode ) {
|
3624 |
-
jQuery.event.simulate( "submit", this.parentNode, event, true );
|
3625 |
-
}
|
3626 |
-
});
|
3627 |
-
form._submit_attached = true;
|
3628 |
-
}
|
3629 |
-
});
|
3630 |
-
// return undefined since we don't need an event listener
|
3631 |
-
},
|
3632 |
-
|
3633 |
-
teardown: function() {
|
3634 |
-
// Only need this for delegated form submit events
|
3635 |
-
if ( jQuery.nodeName( this, "form" ) ) {
|
3636 |
-
return false;
|
3637 |
-
}
|
3638 |
-
|
3639 |
-
// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
|
3640 |
-
jQuery.event.remove( this, "._submit" );
|
3641 |
-
}
|
3642 |
-
};
|
3643 |
-
}
|
3644 |
-
|
3645 |
-
// IE change delegation and checkbox/radio fix
|
3646 |
-
if ( !jQuery.support.changeBubbles ) {
|
3647 |
-
|
3648 |
-
jQuery.event.special.change = {
|
3649 |
-
|
3650 |
-
setup: function() {
|
3651 |
-
|
3652 |
-
if ( rformElems.test( this.nodeName ) ) {
|
3653 |
-
// IE doesn't fire change on a check/radio until blur; trigger it on click
|
3654 |
-
// after a propertychange. Eat the blur-change in special.change.handle.
|
3655 |
-
// This still fires onchange a second time for check/radio after blur.
|
3656 |
-
if ( this.type === "checkbox" || this.type === "radio" ) {
|
3657 |
-
jQuery.event.add( this, "propertychange._change", function( event ) {
|
3658 |
-
if ( event.originalEvent.propertyName === "checked" ) {
|
3659 |
-
this._just_changed = true;
|
3660 |
-
}
|
3661 |
-
});
|
3662 |
-
jQuery.event.add( this, "click._change", function( event ) {
|
3663 |
-
if ( this._just_changed ) {
|
3664 |
-
this._just_changed = false;
|
3665 |
-
jQuery.event.simulate( "change", this, event, true );
|
3666 |
-
}
|
3667 |
-
});
|
3668 |
-
}
|
3669 |
-
return false;
|
3670 |
-
}
|
3671 |
-
// Delegated event; lazy-add a change handler on descendant inputs
|
3672 |
-
jQuery.event.add( this, "beforeactivate._change", function( e ) {
|
3673 |
-
var elem = e.target;
|
3674 |
-
|
3675 |
-
if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
|
3676 |
-
jQuery.event.add( elem, "change._change", function( event ) {
|
3677 |
-
if ( this.parentNode && !event.isSimulated ) {
|
3678 |
-
jQuery.event.simulate( "change", this.parentNode, event, true );
|
3679 |
-
}
|
3680 |
-
});
|
3681 |
-
elem._change_attached = true;
|
3682 |
-
}
|
3683 |
-
});
|
3684 |
-
},
|
3685 |
-
|
3686 |
-
handle: function( event ) {
|
3687 |
-
var elem = event.target;
|
3688 |
-
|
3689 |
-
// Swallow native change events from checkbox/radio, we already triggered them above
|
3690 |
-
if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
|
3691 |
-
return event.handleObj.handler.apply( this, arguments );
|
3692 |
-
}
|
3693 |
-
},
|
3694 |
-
|
3695 |
-
teardown: function() {
|
3696 |
-
jQuery.event.remove( this, "._change" );
|
3697 |
-
|
3698 |
-
return rformElems.test( this.nodeName );
|
3699 |
-
}
|
3700 |
-
};
|
3701 |
-
}
|
3702 |
-
|
3703 |
-
// Create "bubbling" focus and blur events
|
3704 |
-
if ( !jQuery.support.focusinBubbles ) {
|
3705 |
-
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
|
3706 |
-
|
3707 |
-
// Attach a single capturing handler while someone wants focusin/focusout
|
3708 |
-
var attaches = 0,
|
3709 |
-
handler = function( event ) {
|
3710 |
-
jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
|
3711 |
-
};
|
3712 |
-
|
3713 |
-
jQuery.event.special[ fix ] = {
|
3714 |
-
setup: function() {
|
3715 |
-
if ( attaches++ === 0 ) {
|
3716 |
-
document.addEventListener( orig, handler, true );
|
3717 |
-
}
|
3718 |
-
},
|
3719 |
-
teardown: function() {
|
3720 |
-
if ( --attaches === 0 ) {
|
3721 |
-
document.removeEventListener( orig, handler, true );
|
3722 |
-
}
|
3723 |
-
}
|
3724 |
-
};
|
3725 |
-
});
|
3726 |
-
}
|
3727 |
-
|
3728 |
-
jQuery.fn.extend({
|
3729 |
-
|
3730 |
-
on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
|
3731 |
-
var origFn, type;
|
3732 |
-
|
3733 |
-
// Types can be a map of types/handlers
|
3734 |
-
if ( typeof types === "object" ) {
|
3735 |
-
// ( types-Object, selector, data )
|
3736 |
-
if ( typeof selector !== "string" ) {
|
3737 |
-
// ( types-Object, data )
|
3738 |
-
data = selector;
|
3739 |
-
selector = undefined;
|
3740 |
-
}
|
3741 |
-
for ( type in types ) {
|
3742 |
-
this.on( type, selector, data, types[ type ], one );
|
3743 |
-
}
|
3744 |
-
return this;
|
3745 |
-
}
|
3746 |
-
|
3747 |
-
if ( data == null && fn == null ) {
|
3748 |
-
// ( types, fn )
|
3749 |
-
fn = selector;
|
3750 |
-
data = selector = undefined;
|
3751 |
-
} else if ( fn == null ) {
|
3752 |
-
if ( typeof selector === "string" ) {
|
3753 |
-
// ( types, selector, fn )
|
3754 |
-
fn = data;
|
3755 |
-
data = undefined;
|
3756 |
-
} else {
|
3757 |
-
// ( types, data, fn )
|
3758 |
-
fn = data;
|
3759 |
-
data = selector;
|
3760 |
-
selector = undefined;
|
3761 |
-
}
|
3762 |
-
}
|
3763 |
-
if ( fn === false ) {
|
3764 |
-
fn = returnFalse;
|
3765 |
-
} else if ( !fn ) {
|
3766 |
-
return this;
|
3767 |
-
}
|
3768 |
-
|
3769 |
-
if ( one === 1 ) {
|
3770 |
-
origFn = fn;
|
3771 |
-
fn = function( event ) {
|
3772 |
-
// Can use an empty set, since event contains the info
|
3773 |
-
jQuery().off( event );
|
3774 |
-
return origFn.apply( this, arguments );
|
3775 |
-
};
|
3776 |
-
// Use same guid so caller can remove using origFn
|
3777 |
-
fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
|
3778 |
-
}
|
3779 |
-
return this.each( function() {
|
3780 |
-
jQuery.event.add( this, types, fn, data, selector );
|
3781 |
-
});
|
3782 |
-
},
|
3783 |
-
one: function( types, selector, data, fn ) {
|
3784 |
-
return this.on.call( this, types, selector, data, fn, 1 );
|
3785 |
-
},
|
3786 |
-
off: function( types, selector, fn ) {
|
3787 |
-
if ( types && types.preventDefault && types.handleObj ) {
|
3788 |
-
// ( event ) dispatched jQuery.Event
|
3789 |
-
var handleObj = types.handleObj;
|
3790 |
-
jQuery( types.delegateTarget ).off(
|
3791 |
-
handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
|
3792 |
-
handleObj.selector,
|
3793 |
-
handleObj.handler
|
3794 |
-
);
|
3795 |
-
return this;
|
3796 |
-
}
|
3797 |
-
if ( typeof types === "object" ) {
|
3798 |
-
// ( types-object [, selector] )
|
3799 |
-
for ( var type in types ) {
|
3800 |
-
this.off( type, selector, types[ type ] );
|
3801 |
-
}
|
3802 |
-
return this;
|
3803 |
-
}
|
3804 |
-
if ( selector === false || typeof selector === "function" ) {
|
3805 |
-
// ( types [, fn] )
|
3806 |
-
fn = selector;
|
3807 |
-
selector = undefined;
|
3808 |
-
}
|
3809 |
-
if ( fn === false ) {
|
3810 |
-
fn = returnFalse;
|
3811 |
-
}
|
3812 |
-
return this.each(function() {
|
3813 |
-
jQuery.event.remove( this, types, fn, selector );
|
3814 |
-
});
|
3815 |
-
},
|
3816 |
-
|
3817 |
-
bind: function( types, data, fn ) {
|
3818 |
-
return this.on( types, null, data, fn );
|
3819 |
-
},
|
3820 |
-
unbind: function( types, fn ) {
|
3821 |
-
return this.off( types, null, fn );
|
3822 |
-
},
|
3823 |
-
|
3824 |
-
live: function( types, data, fn ) {
|
3825 |
-
jQuery( this.context ).on( types, this.selector, data, fn );
|
3826 |
-
return this;
|
3827 |
-
},
|
3828 |
-
die: function( types, fn ) {
|
3829 |
-
jQuery( this.context ).off( types, this.selector || "**", fn );
|
3830 |
-
return this;
|
3831 |
-
},
|
3832 |
-
|
3833 |
-
delegate: function( selector, types, data, fn ) {
|
3834 |
-
return this.on( types, selector, data, fn );
|
3835 |
-
},
|
3836 |
-
undelegate: function( selector, types, fn ) {
|
3837 |
-
// ( namespace ) or ( selector, types [, fn] )
|
3838 |
-
return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
|
3839 |
-
},
|
3840 |
-
|
3841 |
-
trigger: function( type, data ) {
|
3842 |
-
return this.each(function() {
|
3843 |
-
jQuery.event.trigger( type, data, this );
|
3844 |
-
});
|
3845 |
-
},
|
3846 |
-
triggerHandler: function( type, data ) {
|
3847 |
-
if ( this[0] ) {
|
3848 |
-
return jQuery.event.trigger( type, data, this[0], true );
|
3849 |
-
}
|
3850 |
-
},
|
3851 |
-
|
3852 |
-
toggle: function( fn ) {
|
3853 |
-
// Save reference to arguments for access in closure
|
3854 |
-
var args = arguments,
|
3855 |
-
guid = fn.guid || jQuery.guid++,
|
3856 |
-
i = 0,
|
3857 |
-
toggler = function( event ) {
|
3858 |
-
// Figure out which function to execute
|
3859 |
-
var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
|
3860 |
-
jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
|
3861 |
-
|
3862 |
-
// Make sure that clicks stop
|
3863 |
-
event.preventDefault();
|
3864 |
-
|
3865 |
-
// and execute the function
|
3866 |
-
return args[ lastToggle ].apply( this, arguments ) || false;
|
3867 |
-
};
|
3868 |
-
|
3869 |
-
// link all the functions, so any of them can unbind this click handler
|
3870 |
-
toggler.guid = guid;
|
3871 |
-
while ( i < args.length ) {
|
3872 |
-
args[ i++ ].guid = guid;
|
3873 |
-
}
|
3874 |
-
|
3875 |
-
return this.click( toggler );
|
3876 |
-
},
|
3877 |
-
|
3878 |
-
hover: function( fnOver, fnOut ) {
|
3879 |
-
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
3880 |
-
}
|
3881 |
-
});
|
3882 |
-
|
3883 |
-
jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
|
3884 |
-
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
3885 |
-
"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
|
3886 |
-
|
3887 |
-
// Handle event binding
|
3888 |
-
jQuery.fn[ name ] = function( data, fn ) {
|
3889 |
-
if ( fn == null ) {
|
3890 |
-
fn = data;
|
3891 |
-
data = null;
|
3892 |
-
}
|
3893 |
-
|
3894 |
-
return arguments.length > 0 ?
|
3895 |
-
this.bind( name, data, fn ) :
|
3896 |
-
this.trigger( name );
|
3897 |
-
};
|
3898 |
-
|
3899 |
-
if ( jQuery.attrFn ) {
|
3900 |
-
jQuery.attrFn[ name ] = true;
|
3901 |
-
}
|
3902 |
-
|
3903 |
-
if ( rkeyEvent.test( name ) ) {
|
3904 |
-
jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
|
3905 |
-
}
|
3906 |
-
|
3907 |
-
if ( rmouseEvent.test( name ) ) {
|
3908 |
-
jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
|
3909 |
-
}
|
3910 |
-
});
|
3911 |
-
|
3912 |
-
|
3913 |
-
|
3914 |
-
/*!
|
3915 |
-
* Sizzle CSS Selector Engine
|
3916 |
-
* Copyright 2011, The Dojo Foundation
|
3917 |
-
* Released under the MIT, BSD, and GPL Licenses.
|
3918 |
-
* More information: http://sizzlejs.com/
|
3919 |
-
*/
|
3920 |
-
(function(){
|
3921 |
-
|
3922 |
-
var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
|
3923 |
-
expando = "sizcache" + (Math.random() + '').replace('.', ''),
|
3924 |
-
done = 0,
|
3925 |
-
toString = Object.prototype.toString,
|
3926 |
-
hasDuplicate = false,
|
3927 |
-
baseHasDuplicate = true,
|
3928 |
-
rBackslash = /\\/g,
|
3929 |
-
rReturn = /\r\n/g,
|
3930 |
-
rNonWord = /\W/;
|
3931 |
-
|
3932 |
-
// Here we check if the JavaScript engine is using some sort of
|
3933 |
-
// optimization where it does not always call our comparision
|
3934 |
-
// function. If that is the case, discard the hasDuplicate value.
|
3935 |
-
// Thus far that includes Google Chrome.
|
3936 |
-
[0, 0].sort(function() {
|
3937 |
-
baseHasDuplicate = false;
|
3938 |
-
return 0;
|
3939 |
-
});
|
3940 |
-
|
3941 |
-
var Sizzle = function( selector, context, results, seed ) {
|
3942 |
-
results = results || [];
|
3943 |
-
context = context || document;
|
3944 |
-
|
3945 |
-
var origContext = context;
|
3946 |
-
|
3947 |
-
if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
|
3948 |
-
return [];
|
3949 |
-
}
|
3950 |
-
|
3951 |
-
if ( !selector || typeof selector !== "string" ) {
|
3952 |
-
return results;
|
3953 |
-
}
|
3954 |
-
|
3955 |
-
var m, set, checkSet, extra, ret, cur, pop, i,
|
3956 |
-
prune = true,
|
3957 |
-
contextXML = Sizzle.isXML( context ),
|
3958 |
-
parts = [],
|
3959 |
-
soFar = selector;
|
3960 |
-
|
3961 |
-
// Reset the position of the chunker regexp (start from head)
|
3962 |
-
do {
|
3963 |
-
chunker.exec( "" );
|
3964 |
-
m = chunker.exec( soFar );
|
3965 |
-
|
3966 |
-
if ( m ) {
|
3967 |
-
soFar = m[3];
|
3968 |
-
|
3969 |
-
parts.push( m[1] );
|
3970 |
-
|
3971 |
-
if ( m[2] ) {
|
3972 |
-
extra = m[3];
|
3973 |
-
break;
|
3974 |
-
}
|
3975 |
-
}
|
3976 |
-
} while ( m );
|
3977 |
-
|
3978 |
-
if ( parts.length > 1 && origPOS.exec( selector ) ) {
|
3979 |
-
|
3980 |
-
if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
|
3981 |
-
set = posProcess( parts[0] + parts[1], context, seed );
|
3982 |
-
|
3983 |
-
} else {
|
3984 |
-
set = Expr.relative[ parts[0] ] ?
|
3985 |
-
[ context ] :
|
3986 |
-
Sizzle( parts.shift(), context );
|
3987 |
-
|
3988 |
-
while ( parts.length ) {
|
3989 |
-
selector = parts.shift();
|
3990 |
-
|
3991 |
-
if ( Expr.relative[ selector ] ) {
|
3992 |
-
selector += parts.shift();
|
3993 |
-
}
|
3994 |
-
|
3995 |
-
set = posProcess( selector, set, seed );
|
3996 |
-
}
|
3997 |
-
}
|
3998 |
-
|
3999 |
-
} else {
|
4000 |
-
// Take a shortcut and set the context if the root selector is an ID
|
4001 |
-
// (but not if it'll be faster if the inner selector is an ID)
|
4002 |
-
if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
|
4003 |
-
Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
|
4004 |
-
|
4005 |
-
ret = Sizzle.find( parts.shift(), context, contextXML );
|
4006 |
-
context = ret.expr ?
|
4007 |
-
Sizzle.filter( ret.expr, ret.set )[0] :
|
4008 |
-
ret.set[0];
|
4009 |
-
}
|
4010 |
-
|
4011 |
-
if ( context ) {
|
4012 |
-
ret = seed ?
|
4013 |
-
{ expr: parts.pop(), set: makeArray(seed) } :
|
4014 |
-
Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
|
4015 |
-
|
4016 |
-
set = ret.expr ?
|
4017 |
-
Sizzle.filter( ret.expr, ret.set ) :
|
4018 |
-
ret.set;
|
4019 |
-
|
4020 |
-
if ( parts.length > 0 ) {
|
4021 |
-
checkSet = makeArray( set );
|
4022 |
-
|
4023 |
-
} else {
|
4024 |
-
prune = false;
|
4025 |
-
}
|
4026 |
-
|
4027 |
-
while ( parts.length ) {
|
4028 |
-
cur = parts.pop();
|
4029 |
-
pop = cur;
|
4030 |
-
|
4031 |
-
if ( !Expr.relative[ cur ] ) {
|
4032 |
-
cur = "";
|
4033 |
-
} else {
|
4034 |
-
pop = parts.pop();
|
4035 |
-
}
|
4036 |
-
|
4037 |
-
if ( pop == null ) {
|
4038 |
-
pop = context;
|
4039 |
-
}
|
4040 |
-
|
4041 |
-
Expr.relative[ cur ]( checkSet, pop, contextXML );
|
4042 |
-
}
|
4043 |
-
|
4044 |
-
} else {
|
4045 |
-
checkSet = parts = [];
|
4046 |
-
}
|
4047 |
-
}
|
4048 |
-
|
4049 |
-
if ( !checkSet ) {
|
4050 |
-
checkSet = set;
|
4051 |
-
}
|
4052 |
-
|
4053 |
-
if ( !checkSet ) {
|
4054 |
-
Sizzle.error( cur || selector );
|
4055 |
-
}
|
4056 |
-
|
4057 |
-
if ( toString.call(checkSet) === "[object Array]" ) {
|
4058 |
-
if ( !prune ) {
|
4059 |
-
results.push.apply( results, checkSet );
|
4060 |
-
|
4061 |
-
} else if ( context && context.nodeType === 1 ) {
|
4062 |
-
for ( i = 0; checkSet[i] != null; i++ ) {
|
4063 |
-
if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
|
4064 |
-
results.push( set[i] );
|
4065 |
-
}
|
4066 |
-
}
|
4067 |
-
|
4068 |
-
} else {
|
4069 |
-
for ( i = 0; checkSet[i] != null; i++ ) {
|
4070 |
-
if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
|
4071 |
-
results.push( set[i] );
|
4072 |
-
}
|
4073 |
-
}
|
4074 |
-
}
|
4075 |
-
|
4076 |
-
} else {
|
4077 |
-
makeArray( checkSet, results );
|
4078 |
-
}
|
4079 |
-
|
4080 |
-
if ( extra ) {
|
4081 |
-
Sizzle( extra, origContext, results, seed );
|
4082 |
-
Sizzle.uniqueSort( results );
|
4083 |
-
}
|
4084 |
-
|
4085 |
-
return results;
|
4086 |
-
};
|
4087 |
-
|
4088 |
-
Sizzle.uniqueSort = function( results ) {
|
4089 |
-
if ( sortOrder ) {
|
4090 |
-
hasDuplicate = baseHasDuplicate;
|
4091 |
-
results.sort( sortOrder );
|
4092 |
-
|
4093 |
-
if ( hasDuplicate ) {
|
4094 |
-
for ( var i = 1; i < results.length; i++ ) {
|
4095 |
-
if ( results[i] === results[ i - 1 ] ) {
|
4096 |
-
results.splice( i--, 1 );
|
4097 |
-
}
|
4098 |
-
}
|
4099 |
-
}
|
4100 |
-
}
|
4101 |
-
|
4102 |
-
return results;
|
4103 |
-
};
|
4104 |
-
|
4105 |
-
Sizzle.matches = function( expr, set ) {
|
4106 |
-
return Sizzle( expr, null, null, set );
|
4107 |
-
};
|
4108 |
-
|
4109 |
-
Sizzle.matchesSelector = function( node, expr ) {
|
4110 |
-
return Sizzle( expr, null, null, [node] ).length > 0;
|
4111 |
-
};
|
4112 |
-
|
4113 |
-
Sizzle.find = function( expr, context, isXML ) {
|
4114 |
-
var set, i, len, match, type, left;
|
4115 |
-
|
4116 |
-
if ( !expr ) {
|
4117 |
-
return [];
|
4118 |
-
}
|
4119 |
-
|
4120 |
-
for ( i = 0, len = Expr.order.length; i < len; i++ ) {
|
4121 |
-
type = Expr.order[i];
|
4122 |
-
|
4123 |
-
if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
|
4124 |
-
left = match[1];
|
4125 |
-
match.splice( 1, 1 );
|
4126 |
-
|
4127 |
-
if ( left.substr( left.length - 1 ) !== "\\" ) {
|
4128 |
-
match[1] = (match[1] || "").replace( rBackslash, "" );
|
4129 |
-
set = Expr.find[ type ]( match, context, isXML );
|
4130 |
-
|
4131 |
-
if ( set != null ) {
|
4132 |
-
expr = expr.replace( Expr.match[ type ], "" );
|
4133 |
-
break;
|
4134 |
-
}
|
4135 |
-
}
|
4136 |
-
}
|
4137 |
-
}
|
4138 |
-
|
4139 |
-
if ( !set ) {
|
4140 |
-
set = typeof context.getElementsByTagName !== "undefined" ?
|
4141 |
-
context.getElementsByTagName( "*" ) :
|
4142 |
-
[];
|
4143 |
-
}
|
4144 |
-
|
4145 |
-
return { set: set, expr: expr };
|
4146 |
-
};
|
4147 |
-
|
4148 |
-
Sizzle.filter = function( expr, set, inplace, not ) {
|
4149 |
-
var match, anyFound,
|
4150 |
-
type, found, item, filter, left,
|
4151 |
-
i, pass,
|
4152 |
-
old = expr,
|
4153 |
-
result = [],
|
4154 |
-
curLoop = set,
|
4155 |
-
isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
|
4156 |
-
|
4157 |
-
while ( expr && set.length ) {
|
4158 |
-
for ( type in Expr.filter ) {
|
4159 |
-
if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
|
4160 |
-
filter = Expr.filter[ type ];
|
4161 |
-
left = match[1];
|
4162 |
-
|
4163 |
-
anyFound = false;
|
4164 |
-
|
4165 |
-
match.splice(1,1);
|
4166 |
-
|
4167 |
-
if ( left.substr( left.length - 1 ) === "\\" ) {
|
4168 |
-
continue;
|
4169 |
-
}
|
4170 |
-
|
4171 |
-
if ( curLoop === result ) {
|
4172 |
-
result = [];
|
4173 |
-
}
|
4174 |
-
|
4175 |
-
if ( Expr.preFilter[ type ] ) {
|
4176 |
-
match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
|
4177 |
-
|
4178 |
-
if ( !match ) {
|
4179 |
-
anyFound = found = true;
|
4180 |
-
|
4181 |
-
} else if ( match === true ) {
|
4182 |
-
continue;
|
4183 |
-
}
|
4184 |
-
}
|
4185 |
-
|
4186 |
-
if ( match ) {
|
4187 |
-
for ( i = 0; (item = curLoop[i]) != null; i++ ) {
|
4188 |
-
if ( item ) {
|
4189 |
-
found = filter( item, match, i, curLoop );
|
4190 |
-
pass = not ^ found;
|
4191 |
-
|
4192 |
-
if ( inplace && found != null ) {
|
4193 |
-
if ( pass ) {
|
4194 |
-
anyFound = true;
|
4195 |
-
|
4196 |
-
} else {
|
4197 |
-
curLoop[i] = false;
|
4198 |
-
}
|
4199 |
-
|
4200 |
-
} else if ( pass ) {
|
4201 |
-
result.push( item );
|
4202 |
-
anyFound = true;
|
4203 |
-
}
|
4204 |
-
}
|
4205 |
-
}
|
4206 |
-
}
|
4207 |
-
|
4208 |
-
if ( found !== undefined ) {
|
4209 |
-
if ( !inplace ) {
|
4210 |
-
curLoop = result;
|
4211 |
-
}
|
4212 |
-
|
4213 |
-
expr = expr.replace( Expr.match[ type ], "" );
|
4214 |
-
|
4215 |
-
if ( !anyFound ) {
|
4216 |
-
return [];
|
4217 |
-
}
|
4218 |
-
|
4219 |
-
break;
|
4220 |
-
}
|
4221 |
-
}
|
4222 |
-
}
|
4223 |
-
|
4224 |
-
// Improper expression
|
4225 |
-
if ( expr === old ) {
|
4226 |
-
if ( anyFound == null ) {
|
4227 |
-
Sizzle.error( expr );
|
4228 |
-
|
4229 |
-
} else {
|
4230 |
-
break;
|
4231 |
-
}
|
4232 |
-
}
|
4233 |
-
|
4234 |
-
old = expr;
|
4235 |
-
}
|
4236 |
-
|
4237 |
-
return curLoop;
|
4238 |
-
};
|
4239 |
-
|
4240 |
-
Sizzle.error = function( msg ) {
|
4241 |
-
throw "Syntax error, unrecognized expression: " + msg;
|
4242 |
-
};
|
4243 |
-
|
4244 |
-
/**
|
4245 |
-
* Utility function for retreiving the text value of an array of DOM nodes
|
4246 |
-
* @param {Array|Element} elem
|
4247 |
-
*/
|
4248 |
-
var getText = Sizzle.getText = function( elem ) {
|
4249 |
-
var i, node,
|
4250 |
-
nodeType = elem.nodeType,
|
4251 |
-
ret = "";
|
4252 |
-
|
4253 |
-
if ( nodeType ) {
|
4254 |
-
if ( nodeType === 1 ) {
|
4255 |
-
// Use textContent || innerText for elements
|
4256 |
-
if ( typeof elem.textContent === 'string' ) {
|
4257 |
-
return elem.textContent;
|
4258 |
-
} else if ( typeof elem.innerText === 'string' ) {
|
4259 |
-
// Replace IE's carriage returns
|
4260 |
-
return elem.innerText.replace( rReturn, '' );
|
4261 |
-
} else {
|
4262 |
-
// Traverse it's children
|
4263 |
-
for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
|
4264 |
-
ret += getText( elem );
|
4265 |
-
}
|
4266 |
-
}
|
4267 |
-
} else if ( nodeType === 3 || nodeType === 4 ) {
|
4268 |
-
return elem.nodeValue;
|
4269 |
-
}
|
4270 |
-
} else {
|
4271 |
-
|
4272 |
-
// If no nodeType, this is expected to be an array
|
4273 |
-
for ( i = 0; (node = elem[i]); i++ ) {
|
4274 |
-
// Do not traverse comment nodes
|
4275 |
-
if ( node.nodeType !== 8 ) {
|
4276 |
-
ret += getText( node );
|
4277 |
-
}
|
4278 |
-
}
|
4279 |
-
}
|
4280 |
-
return ret;
|
4281 |
-
};
|
4282 |
-
|
4283 |
-
var Expr = Sizzle.selectors = {
|
4284 |
-
order: [ "ID", "NAME", "TAG" ],
|
4285 |
-
|
4286 |
-
match: {
|
4287 |
-
ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
|
4288 |
-
CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
|
4289 |
-
NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
|
4290 |
-
ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
|
4291 |
-
TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
|
4292 |
-
CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
|
4293 |
-
POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
|
4294 |
-
PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
|
4295 |
-
},
|
4296 |
-
|
4297 |
-
leftMatch: {},
|
4298 |
-
|
4299 |
-
attrMap: {
|
4300 |
-
"class": "className",
|
4301 |
-
"for": "htmlFor"
|
4302 |
-
},
|
4303 |
-
|
4304 |
-
attrHandle: {
|
4305 |
-
href: function( elem ) {
|
4306 |
-
return elem.getAttribute( "href" );
|
4307 |
-
},
|
4308 |
-
type: function( elem ) {
|
4309 |
-
return elem.getAttribute( "type" );
|
4310 |
-
}
|
4311 |
-
},
|
4312 |
-
|
4313 |
-
relative: {
|
4314 |
-
"+": function(checkSet, part){
|
4315 |
-
var isPartStr = typeof part === "string",
|
4316 |
-
isTag = isPartStr && !rNonWord.test( part ),
|
4317 |
-
isPartStrNotTag = isPartStr && !isTag;
|
4318 |
-
|
4319 |
-
if ( isTag ) {
|
4320 |
-
part = part.toLowerCase();
|
4321 |
-
}
|
4322 |
-
|
4323 |
-
for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
|
4324 |
-
if ( (elem = checkSet[i]) ) {
|
4325 |
-
while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
|
4326 |
-
|
4327 |
-
checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
|
4328 |
-
elem || false :
|
4329 |
-
elem === part;
|
4330 |
-
}
|
4331 |
-
}
|
4332 |
-
|
4333 |
-
if ( isPartStrNotTag ) {
|
4334 |
-
Sizzle.filter( part, checkSet, true );
|
4335 |
-
}
|
4336 |
-
},
|
4337 |
-
|
4338 |
-
">": function( checkSet, part ) {
|
4339 |
-
var elem,
|
4340 |
-
isPartStr = typeof part === "string",
|
4341 |
-
i = 0,
|
4342 |
-
l = checkSet.length;
|
4343 |
-
|
4344 |
-
if ( isPartStr && !rNonWord.test( part ) ) {
|
4345 |
-
part = part.toLowerCase();
|
4346 |
-
|
4347 |
-
for ( ; i < l; i++ ) {
|
4348 |
-
elem = checkSet[i];
|
4349 |
-
|
4350 |
-
if ( elem ) {
|
4351 |
-
var parent = elem.parentNode;
|
4352 |
-
checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
|
4353 |
-
}
|
4354 |
-
}
|
4355 |
-
|
4356 |
-
} else {
|
4357 |
-
for ( ; i < l; i++ ) {
|
4358 |
-
elem = checkSet[i];
|
4359 |
-
|
4360 |
-
if ( elem ) {
|
4361 |
-
checkSet[i] = isPartStr ?
|
4362 |
-
elem.parentNode :
|
4363 |
-
elem.parentNode === part;
|
4364 |
-
}
|
4365 |
-
}
|
4366 |
-
|
4367 |
-
if ( isPartStr ) {
|
4368 |
-
Sizzle.filter( part, checkSet, true );
|
4369 |
-
}
|
4370 |
-
}
|
4371 |
-
},
|
4372 |
-
|
4373 |
-
"": function(checkSet, part, isXML){
|
4374 |
-
var nodeCheck,
|
4375 |
-
doneName = done++,
|
4376 |
-
checkFn = dirCheck;
|
4377 |
-
|
4378 |
-
if ( typeof part === "string" && !rNonWord.test( part ) ) {
|
4379 |
-
part = part.toLowerCase();
|
4380 |
-
nodeCheck = part;
|
4381 |
-
checkFn = dirNodeCheck;
|
4382 |
-
}
|
4383 |
-
|
4384 |
-
checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
|
4385 |
-
},
|
4386 |
-
|
4387 |
-
"~": function( checkSet, part, isXML ) {
|
4388 |
-
var nodeCheck,
|
4389 |
-
doneName = done++,
|
4390 |
-
checkFn = dirCheck;
|
4391 |
-
|
4392 |
-
if ( typeof part === "string" && !rNonWord.test( part ) ) {
|
4393 |
-
part = part.toLowerCase();
|
4394 |
-
nodeCheck = part;
|
4395 |
-
checkFn = dirNodeCheck;
|
4396 |
-
}
|
4397 |
-
|
4398 |
-
checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
|
4399 |
-
}
|
4400 |
-
},
|
4401 |
-
|
4402 |
-
find: {
|
4403 |
-
ID: function( match, context, isXML ) {
|
4404 |
-
if ( typeof context.getElementById !== "undefined" && !isXML ) {
|
4405 |
-
var m = context.getElementById(match[1]);
|
4406 |
-
// Check parentNode to catch when Blackberry 4.6 returns
|
4407 |
-
// nodes that are no longer in the document #6963
|
4408 |
-
return m && m.parentNode ? [m] : [];
|
4409 |
-
}
|
4410 |
-
},
|
4411 |
-
|
4412 |
-
NAME: function( match, context ) {
|
4413 |
-
if ( typeof context.getElementsByName !== "undefined" ) {
|
4414 |
-
var ret = [],
|
4415 |
-
results = context.getElementsByName( match[1] );
|
4416 |
-
|
4417 |
-
for ( var i = 0, l = results.length; i < l; i++ ) {
|
4418 |
-
if ( results[i].getAttribute("name") === match[1] ) {
|
4419 |
-
ret.push( results[i] );
|
4420 |
-
}
|
4421 |
-
}
|
4422 |
-
|
4423 |
-
return ret.length === 0 ? null : ret;
|
4424 |
-
}
|
4425 |
-
},
|
4426 |
-
|
4427 |
-
TAG: function( match, context ) {
|
4428 |
-
if ( typeof context.getElementsByTagName !== "undefined" ) {
|
4429 |
-
return context.getElementsByTagName( match[1] );
|
4430 |
-
}
|
4431 |
-
}
|
4432 |
-
},
|
4433 |
-
preFilter: {
|
4434 |
-
CLASS: function( match, curLoop, inplace, result, not, isXML ) {
|
4435 |
-
match = " " + match[1].replace( rBackslash, "" ) + " ";
|
4436 |
-
|
4437 |
-
if ( isXML ) {
|
4438 |
-
return match;
|
4439 |
-
}
|
4440 |
-
|
4441 |
-
for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
|
4442 |
-
if ( elem ) {
|
4443 |
-
if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
|
4444 |
-
if ( !inplace ) {
|
4445 |
-
result.push( elem );
|
4446 |
-
}
|
4447 |
-
|
4448 |
-
} else if ( inplace ) {
|
4449 |
-
curLoop[i] = false;
|
4450 |
-
}
|
4451 |
-
}
|
4452 |
-
}
|
4453 |
-
|
4454 |
-
return false;
|
4455 |
-
},
|
4456 |
-
|
4457 |
-
ID: function( match ) {
|
4458 |
-
return match[1].replace( rBackslash, "" );
|
4459 |
-
},
|
4460 |
-
|
4461 |
-
TAG: function( match, curLoop ) {
|
4462 |
-
return match[1].replace( rBackslash, "" ).toLowerCase();
|
4463 |
-
},
|
4464 |
-
|
4465 |
-
CHILD: function( match ) {
|
4466 |
-
if ( match[1] === "nth" ) {
|
4467 |
-
if ( !match[2] ) {
|
4468 |
-
Sizzle.error( match[0] );
|
4469 |
-
}
|
4470 |
-
|
4471 |
-
match[2] = match[2].replace(/^\+|\s*/g, '');
|
4472 |
-
|
4473 |
-
// parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
|
4474 |
-
var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
|
4475 |
-
match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
|
4476 |
-
!/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
|
4477 |
-
|
4478 |
-
// calculate the numbers (first)n+(last) including if they are negative
|
4479 |
-
match[2] = (test[1] + (test[2] || 1)) - 0;
|
4480 |
-
match[3] = test[3] - 0;
|
4481 |
-
}
|
4482 |
-
else if ( match[2] ) {
|
4483 |
-
Sizzle.error( match[0] );
|
4484 |
-
}
|
4485 |
-
|
4486 |
-
// TODO: Move to normal caching system
|
4487 |
-
match[0] = done++;
|
4488 |
-
|
4489 |
-
return match;
|
4490 |
-
},
|
4491 |
-
|
4492 |
-
ATTR: function( match, curLoop, inplace, result, not, isXML ) {
|
4493 |
-
var name = match[1] = match[1].replace( rBackslash, "" );
|
4494 |
-
|
4495 |
-
if ( !isXML && Expr.attrMap[name] ) {
|
4496 |
-
match[1] = Expr.attrMap[name];
|
4497 |
-
}
|
4498 |
-
|
4499 |
-
// Handle if an un-quoted value was used
|
4500 |
-
match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
|
4501 |
-
|
4502 |
-
if ( match[2] === "~=" ) {
|
4503 |
-
match[4] = " " + match[4] + " ";
|
4504 |
-
}
|
4505 |
-
|
4506 |
-
return match;
|
4507 |
-
},
|
4508 |
-
|
4509 |
-
PSEUDO: function( match, curLoop, inplace, result, not ) {
|
4510 |
-
if ( match[1] === "not" ) {
|
4511 |
-
// If we're dealing with a complex expression, or a simple one
|
4512 |
-
if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
|
4513 |
-
match[3] = Sizzle(match[3], null, null, curLoop);
|
4514 |
-
|
4515 |
-
} else {
|
4516 |
-
var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
|
4517 |
-
|
4518 |
-
if ( !inplace ) {
|
4519 |
-
result.push.apply( result, ret );
|
4520 |
-
}
|
4521 |
-
|
4522 |
-
return false;
|
4523 |
-
}
|
4524 |
-
|
4525 |
-
} else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
|
4526 |
-
return true;
|
4527 |
-
}
|
4528 |
-
|
4529 |
-
return match;
|
4530 |
-
},
|
4531 |
-
|
4532 |
-
POS: function( match ) {
|
4533 |
-
match.unshift( true );
|
4534 |
-
|
4535 |
-
return match;
|
4536 |
-
}
|
4537 |
-
},
|
4538 |
-
|
4539 |
-
filters: {
|
4540 |
-
enabled: function( elem ) {
|
4541 |
-
return elem.disabled === false && elem.type !== "hidden";
|
4542 |
-
},
|
4543 |
-
|
4544 |
-
disabled: function( elem ) {
|
4545 |
-
return elem.disabled === true;
|
4546 |
-
},
|
4547 |
-
|
4548 |
-
checked: function( elem ) {
|
4549 |
-
return elem.checked === true;
|
4550 |
-
},
|
4551 |
-
|
4552 |
-
selected: function( elem ) {
|
4553 |
-
// Accessing this property makes selected-by-default
|
4554 |
-
// options in Safari work properly
|
4555 |
-
if ( elem.parentNode ) {
|
4556 |
-
elem.parentNode.selectedIndex;
|
4557 |
-
}
|
4558 |
-
|
4559 |
-
return elem.selected === true;
|
4560 |
-
},
|
4561 |
-
|
4562 |
-
parent: function( elem ) {
|
4563 |
-
return !!elem.firstChild;
|
4564 |
-
},
|
4565 |
-
|
4566 |
-
empty: function( elem ) {
|
4567 |
-
return !elem.firstChild;
|
4568 |
-
},
|
4569 |
-
|
4570 |
-
has: function( elem, i, match ) {
|
4571 |
-
return !!Sizzle( match[3], elem ).length;
|
4572 |
-
},
|
4573 |
-
|
4574 |
-
header: function( elem ) {
|
4575 |
-
return (/h\d/i).test( elem.nodeName );
|
4576 |
-
},
|
4577 |
-
|
4578 |
-
text: function( elem ) {
|
4579 |
-
var attr = elem.getAttribute( "type" ), type = elem.type;
|
4580 |
-
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
|
4581 |
-
// use getAttribute instead to test this case
|
4582 |
-
return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
|
4583 |
-
},
|
4584 |
-
|
4585 |
-
radio: function( elem ) {
|
4586 |
-
return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
|
4587 |
-
},
|
4588 |
-
|
4589 |
-
checkbox: function( elem ) {
|
4590 |
-
return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
|
4591 |
-
},
|
4592 |
-
|
4593 |
-
file: function( elem ) {
|
4594 |
-
return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
|
4595 |
-
},
|
4596 |
-
|
4597 |
-
password: function( elem ) {
|
4598 |
-
return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
|
4599 |
-
},
|
4600 |
-
|
4601 |
-
submit: function( elem ) {
|
4602 |
-
var name = elem.nodeName.toLowerCase();
|
4603 |
-
return (name === "input" || name === "button") && "submit" === elem.type;
|
4604 |
-
},
|
4605 |
-
|
4606 |
-
image: function( elem ) {
|
4607 |
-
return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
|
4608 |
-
},
|
4609 |
-
|
4610 |
-
reset: function( elem ) {
|
4611 |
-
var name = elem.nodeName.toLowerCase();
|
4612 |
-
return (name === "input" || name === "button") && "reset" === elem.type;
|
4613 |
-
},
|
4614 |
-
|
4615 |
-
button: function( elem ) {
|
4616 |
-
var name = elem.nodeName.toLowerCase();
|
4617 |
-
return name === "input" && "button" === elem.type || name === "button";
|
4618 |
-
},
|
4619 |
-
|
4620 |
-
input: function( elem ) {
|
4621 |
-
return (/input|select|textarea|button/i).test( elem.nodeName );
|
4622 |
-
},
|
4623 |
-
|
4624 |
-
focus: function( elem ) {
|
4625 |
-
return elem === elem.ownerDocument.activeElement;
|
4626 |
-
}
|
4627 |
-
},
|
4628 |
-
setFilters: {
|
4629 |
-
first: function( elem, i ) {
|
4630 |
-
return i === 0;
|
4631 |
-
},
|
4632 |
-
|
4633 |
-
last: function( elem, i, match, array ) {
|
4634 |
-
return i === array.length - 1;
|
4635 |
-
},
|
4636 |
-
|
4637 |
-
even: function( elem, i ) {
|
4638 |
-
return i % 2 === 0;
|
4639 |
-
},
|
4640 |
-
|
4641 |
-
odd: function( elem, i ) {
|
4642 |
-
return i % 2 === 1;
|
4643 |
-
},
|
4644 |
-
|
4645 |
-
lt: function( elem, i, match ) {
|
4646 |
-
return i < match[3] - 0;
|
4647 |
-
},
|
4648 |
-
|
4649 |
-
gt: function( elem, i, match ) {
|
4650 |
-
return i > match[3] - 0;
|
4651 |
-
},
|
4652 |
-
|
4653 |
-
nth: function( elem, i, match ) {
|
4654 |
-
return match[3] - 0 === i;
|
4655 |
-
},
|
4656 |
-
|
4657 |
-
eq: function( elem, i, match ) {
|
4658 |
-
return match[3] - 0 === i;
|
4659 |
-
}
|
4660 |
-
},
|
4661 |
-
filter: {
|
4662 |
-
PSEUDO: function( elem, match, i, array ) {
|
4663 |
-
var name = match[1],
|
4664 |
-
filter = Expr.filters[ name ];
|
4665 |
-
|
4666 |
-
if ( filter ) {
|
4667 |
-
return filter( elem, i, match, array );
|
4668 |
-
|
4669 |
-
} else if ( name === "contains" ) {
|
4670 |
-
return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
|
4671 |
-
|
4672 |
-
} else if ( name === "not" ) {
|
4673 |
-
var not = match[3];
|
4674 |
-
|
4675 |
-
for ( var j = 0, l = not.length; j < l; j++ ) {
|
4676 |
-
if ( not[j] === elem ) {
|
4677 |
-
return false;
|
4678 |
-
}
|
4679 |
-
}
|
4680 |
-
|
4681 |
-
return true;
|
4682 |
-
|
4683 |
-
} else {
|
4684 |
-
Sizzle.error( name );
|
4685 |
-
}
|
4686 |
-
},
|
4687 |
-
|
4688 |
-
CHILD: function( elem, match ) {
|
4689 |
-
var first, last,
|
4690 |
-
doneName, parent, cache,
|
4691 |
-
count, diff,
|
4692 |
-
type = match[1],
|
4693 |
-
node = elem;
|
4694 |
-
|
4695 |
-
switch ( type ) {
|
4696 |
-
case "only":
|
4697 |
-
case "first":
|
4698 |
-
while ( (node = node.previousSibling) ) {
|
4699 |
-
if ( node.nodeType === 1 ) {
|
4700 |
-
return false;
|
4701 |
-
}
|
4702 |
-
}
|
4703 |
-
|
4704 |
-
if ( type === "first" ) {
|
4705 |
-
return true;
|
4706 |
-
}
|
4707 |
-
|
4708 |
-
node = elem;
|
4709 |
-
|
4710 |
-
case "last":
|
4711 |
-
while ( (node = node.nextSibling) ) {
|
4712 |
-
if ( node.nodeType === 1 ) {
|
4713 |
-
return false;
|
4714 |
-
}
|
4715 |
-
}
|
4716 |
-
|
4717 |
-
return true;
|
4718 |
-
|
4719 |
-
case "nth":
|
4720 |
-
first = match[2];
|
4721 |
-
last = match[3];
|
4722 |
-
|
4723 |
-
if ( first === 1 && last === 0 ) {
|
4724 |
-
return true;
|
4725 |
-
}
|
4726 |
-
|
4727 |
-
doneName = match[0];
|
4728 |
-
parent = elem.parentNode;
|
4729 |
-
|
4730 |
-
if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
|
4731 |
-
count = 0;
|
4732 |
-
|
4733 |
-
for ( node = parent.firstChild; node; node = node.nextSibling ) {
|
4734 |
-
if ( node.nodeType === 1 ) {
|
4735 |
-
node.nodeIndex = ++count;
|
4736 |
-
}
|
4737 |
-
}
|
4738 |
-
|
4739 |
-
parent[ expando ] = doneName;
|
4740 |
-
}
|
4741 |
-
|
4742 |
-
diff = elem.nodeIndex - last;
|
4743 |
-
|
4744 |
-
if ( first === 0 ) {
|
4745 |
-
return diff === 0;
|
4746 |
-
|
4747 |
-
} else {
|
4748 |
-
return ( diff % first === 0 && diff / first >= 0 );
|
4749 |
-
}
|
4750 |
-
}
|
4751 |
-
},
|
4752 |
-
|
4753 |
-
ID: function( elem, match ) {
|
4754 |
-
return elem.nodeType === 1 && elem.getAttribute("id") === match;
|
4755 |
-
},
|
4756 |
-
|
4757 |
-
TAG: function( elem, match ) {
|
4758 |
-
return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
|
4759 |
-
},
|
4760 |
-
|
4761 |
-
CLASS: function( elem, match ) {
|
4762 |
-
return (" " + (elem.className || elem.getAttribute("class")) + " ")
|
4763 |
-
.indexOf( match ) > -1;
|
4764 |
-
},
|
4765 |
-
|
4766 |
-
ATTR: function( elem, match ) {
|
4767 |
-
var name = match[1],
|
4768 |
-
result = Sizzle.attr ?
|
4769 |
-
Sizzle.attr( elem, name ) :
|
4770 |
-
Expr.attrHandle[ name ] ?
|
4771 |
-
Expr.attrHandle[ name ]( elem ) :
|
4772 |
-
elem[ name ] != null ?
|
4773 |
-
elem[ name ] :
|
4774 |
-
elem.getAttribute( name ),
|
4775 |
-
value = result + "",
|
4776 |
-
type = match[2],
|
4777 |
-
check = match[4];
|
4778 |
-
|
4779 |
-
return result == null ?
|
4780 |
-
type === "!=" :
|
4781 |
-
!type && Sizzle.attr ?
|
4782 |
-
result != null :
|
4783 |
-
type === "=" ?
|
4784 |
-
value === check :
|
4785 |
-
type === "*=" ?
|
4786 |
-
value.indexOf(check) >= 0 :
|
4787 |
-
type === "~=" ?
|
4788 |
-
(" " + value + " ").indexOf(check) >= 0 :
|
4789 |
-
!check ?
|
4790 |
-
value && result !== false :
|
4791 |
-
type === "!=" ?
|
4792 |
-
value !== check :
|
4793 |
-
type === "^=" ?
|
4794 |
-
value.indexOf(check) === 0 :
|
4795 |
-
type === "$=" ?
|
4796 |
-
value.substr(value.length - check.length) === check :
|
4797 |
-
type === "|=" ?
|
4798 |
-
value === check || value.substr(0, check.length + 1) === check + "-" :
|
4799 |
-
false;
|
4800 |
-
},
|
4801 |
-
|
4802 |
-
POS: function( elem, match, i, array ) {
|
4803 |
-
var name = match[2],
|
4804 |
-
filter = Expr.setFilters[ name ];
|
4805 |
-
|
4806 |
-
if ( filter ) {
|
4807 |
-
return filter( elem, i, match, array );
|
4808 |
-
}
|
4809 |
-
}
|
4810 |
-
}
|
4811 |
-
};
|
4812 |
-
|
4813 |
-
var origPOS = Expr.match.POS,
|
4814 |
-
fescape = function(all, num){
|
4815 |
-
return "\\" + (num - 0 + 1);
|
4816 |
-
};
|
4817 |
-
|
4818 |
-
for ( var type in Expr.match ) {
|
4819 |
-
Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
|
4820 |
-
Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
|
4821 |
-
}
|
4822 |
-
|
4823 |
-
var makeArray = function( array, results ) {
|
4824 |
-
array = Array.prototype.slice.call( array, 0 );
|
4825 |
-
|
4826 |
-
if ( results ) {
|
4827 |
-
results.push.apply( results, array );
|
4828 |
-
return results;
|
4829 |
-
}
|
4830 |
-
|
4831 |
-
return array;
|
4832 |
-
};
|
4833 |
-
|
4834 |
-
// Perform a simple check to determine if the browser is capable of
|
4835 |
-
// converting a NodeList to an array using builtin methods.
|
4836 |
-
// Also verifies that the returned array holds DOM nodes
|
4837 |
-
// (which is not the case in the Blackberry browser)
|
4838 |
-
try {
|
4839 |
-
Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
|
4840 |
-
|
4841 |
-
// Provide a fallback method if it does not work
|
4842 |
-
} catch( e ) {
|
4843 |
-
makeArray = function( array, results ) {
|
4844 |
-
var i = 0,
|
4845 |
-
ret = results || [];
|
4846 |
-
|
4847 |
-
if ( toString.call(array) === "[object Array]" ) {
|
4848 |
-
Array.prototype.push.apply( ret, array );
|
4849 |
-
|
4850 |
-
} else {
|
4851 |
-
if ( typeof array.length === "number" ) {
|
4852 |
-
for ( var l = array.length; i < l; i++ ) {
|
4853 |
-
ret.push( array[i] );
|
4854 |
-
}
|
4855 |
-
|
4856 |
-
} else {
|
4857 |
-
for ( ; array[i]; i++ ) {
|
4858 |
-
ret.push( array[i] );
|
4859 |
-
}
|
4860 |
-
}
|
4861 |
-
}
|
4862 |
-
|
4863 |
-
return ret;
|
4864 |
-
};
|
4865 |
-
}
|
4866 |
-
|
4867 |
-
var sortOrder, siblingCheck;
|
4868 |
-
|
4869 |
-
if ( document.documentElement.compareDocumentPosition ) {
|
4870 |
-
sortOrder = function( a, b ) {
|
4871 |
-
if ( a === b ) {
|
4872 |
-
hasDuplicate = true;
|
4873 |
-
return 0;
|
4874 |
-
}
|
4875 |
-
|
4876 |
-
if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
|
4877 |
-
return a.compareDocumentPosition ? -1 : 1;
|
4878 |
-
}
|
4879 |
-
|
4880 |
-
return a.compareDocumentPosition(b) & 4 ? -1 : 1;
|
4881 |
-
};
|
4882 |
-
|
4883 |
-
} else {
|
4884 |
-
sortOrder = function( a, b ) {
|
4885 |
-
// The nodes are identical, we can exit early
|
4886 |
-
if ( a === b ) {
|
4887 |
-
hasDuplicate = true;
|
4888 |
-
return 0;
|
4889 |
-
|
4890 |
-
// Fallback to using sourceIndex (in IE) if it's available on both nodes
|
4891 |
-
} else if ( a.sourceIndex && b.sourceIndex ) {
|
4892 |
-
return a.sourceIndex - b.sourceIndex;
|
4893 |
-
}
|
4894 |
-
|
4895 |
-
var al, bl,
|
4896 |
-
ap = [],
|
4897 |
-
bp = [],
|
4898 |
-
aup = a.parentNode,
|
4899 |
-
bup = b.parentNode,
|
4900 |
-
cur = aup;
|
4901 |
-
|
4902 |
-
// If the nodes are siblings (or identical) we can do a quick check
|
4903 |
-
if ( aup === bup ) {
|
4904 |
-
return siblingCheck( a, b );
|
4905 |
-
|
4906 |
-
// If no parents were found then the nodes are disconnected
|
4907 |
-
} else if ( !aup ) {
|
4908 |
-
return -1;
|
4909 |
-
|
4910 |
-
} else if ( !bup ) {
|
4911 |
-
return 1;
|
4912 |
-
}
|
4913 |
-
|
4914 |
-
// Otherwise they're somewhere else in the tree so we need
|
4915 |
-
// to build up a full list of the parentNodes for comparison
|
4916 |
-
while ( cur ) {
|
4917 |
-
ap.unshift( cur );
|
4918 |
-
cur = cur.parentNode;
|
4919 |
-
}
|
4920 |
-
|
4921 |
-
cur = bup;
|
4922 |
-
|
4923 |
-
while ( cur ) {
|
4924 |
-
bp.unshift( cur );
|
4925 |
-
cur = cur.parentNode;
|
4926 |
-
}
|
4927 |
-
|
4928 |
-
al = ap.length;
|
4929 |
-
bl = bp.length;
|
4930 |
-
|
4931 |
-
// Start walking down the tree looking for a discrepancy
|
4932 |
-
for ( var i = 0; i < al && i < bl; i++ ) {
|
4933 |
-
if ( ap[i] !== bp[i] ) {
|
4934 |
-
return siblingCheck( ap[i], bp[i] );
|
4935 |
-
}
|
4936 |
-
}
|
4937 |
-
|
4938 |
-
// We ended someplace up the tree so do a sibling check
|
4939 |
-
return i === al ?
|
4940 |
-
siblingCheck( a, bp[i], -1 ) :
|
4941 |
-
siblingCheck( ap[i], b, 1 );
|
4942 |
-
};
|
4943 |
-
|
4944 |
-
siblingCheck = function( a, b, ret ) {
|
4945 |
-
if ( a === b ) {
|
4946 |
-
return ret;
|
4947 |
-
}
|
4948 |
-
|
4949 |
-
var cur = a.nextSibling;
|
4950 |
-
|
4951 |
-
while ( cur ) {
|
4952 |
-
if ( cur === b ) {
|
4953 |
-
return -1;
|
4954 |
-
}
|
4955 |
-
|
4956 |
-
cur = cur.nextSibling;
|
4957 |
-
}
|
4958 |
-
|
4959 |
-
return 1;
|
4960 |
-
};
|
4961 |
-
}
|
4962 |
-
|
4963 |
-
// Check to see if the browser returns elements by name when
|
4964 |
-
// querying by getElementById (and provide a workaround)
|
4965 |
-
(function(){
|
4966 |
-
// We're going to inject a fake input element with a specified name
|
4967 |
-
var form = document.createElement("div"),
|
4968 |
-
id = "script" + (new Date()).getTime(),
|
4969 |
-
root = document.documentElement;
|
4970 |
-
|
4971 |
-
form.innerHTML = "<a name='" + id + "'/>";
|
4972 |
-
|
4973 |
-
// Inject it into the root element, check its status, and remove it quickly
|
4974 |
-
root.insertBefore( form, root.firstChild );
|
4975 |
-
|
4976 |
-
// The workaround has to do additional checks after a getElementById
|
4977 |
-
// Which slows things down for other browsers (hence the branching)
|
4978 |
-
if ( document.getElementById( id ) ) {
|
4979 |
-
Expr.find.ID = function( match, context, isXML ) {
|
4980 |
-
if ( typeof context.getElementById !== "undefined" && !isXML ) {
|
4981 |
-
var m = context.getElementById(match[1]);
|
4982 |
-
|
4983 |
-
return m ?
|
4984 |
-
m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
|
4985 |
-
[m] :
|
4986 |
-
undefined :
|
4987 |
-
[];
|
4988 |
-
}
|
4989 |
-
};
|
4990 |
-
|
4991 |
-
Expr.filter.ID = function( elem, match ) {
|
4992 |
-
var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
|
4993 |
-
|
4994 |
-
return elem.nodeType === 1 && node && node.nodeValue === match;
|
4995 |
-
};
|
4996 |
-
}
|
4997 |
-
|
4998 |
-
root.removeChild( form );
|
4999 |
-
|
5000 |
-
// release memory in IE
|
5001 |
-
root = form = null;
|
5002 |
-
})();
|
5003 |
-
|
5004 |
-
(function(){
|
5005 |
-
// Check to see if the browser returns only elements
|
5006 |
-
// when doing getElementsByTagName("*")
|
5007 |
-
|
5008 |
-
// Create a fake element
|
5009 |
-
var div = document.createElement("div");
|
5010 |
-
div.appendChild( document.createComment("") );
|
5011 |
-
|
5012 |
-
// Make sure no comments are found
|
5013 |
-
if ( div.getElementsByTagName("*").length > 0 ) {
|
5014 |
-
Expr.find.TAG = function( match, context ) {
|
5015 |
-
var results = context.getElementsByTagName( match[1] );
|
5016 |
-
|
5017 |
-
// Filter out possible comments
|
5018 |
-
if ( match[1] === "*" ) {
|
5019 |
-
var tmp = [];
|
5020 |
-
|
5021 |
-
for ( var i = 0; results[i]; i++ ) {
|
5022 |
-
if ( results[i].nodeType === 1 ) {
|
5023 |
-
tmp.push( results[i] );
|
5024 |
-
}
|
5025 |
-
}
|
5026 |
-
|
5027 |
-
results = tmp;
|
5028 |
-
}
|
5029 |
-
|
5030 |
-
return results;
|
5031 |
-
};
|
5032 |
-
}
|
5033 |
-
|
5034 |
-
// Check to see if an attribute returns normalized href attributes
|
5035 |
-
div.innerHTML = "<a href='#'></a>";
|
5036 |
-
|
5037 |
-
if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
|
5038 |
-
div.firstChild.getAttribute("href") !== "#" ) {
|
5039 |
-
|
5040 |
-
Expr.attrHandle.href = function( elem ) {
|
5041 |
-
return elem.getAttribute( "href", 2 );
|
5042 |
-
};
|
5043 |
-
}
|
5044 |
-
|
5045 |
-
// release memory in IE
|
5046 |
-
div = null;
|
5047 |
-
})();
|
5048 |
-
|
5049 |
-
if ( document.querySelectorAll ) {
|
5050 |
-
(function(){
|
5051 |
-
var oldSizzle = Sizzle,
|
5052 |
-
div = document.createElement("div"),
|
5053 |
-
id = "__sizzle__";
|
5054 |
-
|
5055 |
-
div.innerHTML = "<p class='TEST'></p>";
|
5056 |
-
|
5057 |
-
// Safari can't handle uppercase or unicode characters when
|
5058 |
-
// in quirks mode.
|
5059 |
-
if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
|
5060 |
-
return;
|
5061 |
-
}
|
5062 |
-
|
5063 |
-
Sizzle = function( query, context, extra, seed ) {
|
5064 |
-
context = context || document;
|
5065 |
-
|
5066 |
-
// Only use querySelectorAll on non-XML documents
|
5067 |
-
// (ID selectors don't work in non-HTML documents)
|
5068 |
-
if ( !seed && !Sizzle.isXML(context) ) {
|
5069 |
-
// See if we find a selector to speed up
|
5070 |
-
var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
|
5071 |
-
|
5072 |
-
if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
|
5073 |
-
// Speed-up: Sizzle("TAG")
|
5074 |
-
if ( match[1] ) {
|
5075 |
-
return makeArray( context.getElementsByTagName( query ), extra );
|
5076 |
-
|
5077 |
-
// Speed-up: Sizzle(".CLASS")
|
5078 |
-
} else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
|
5079 |
-
return makeArray( context.getElementsByClassName( match[2] ), extra );
|
5080 |
-
}
|
5081 |
-
}
|
5082 |
-
|
5083 |
-
if ( context.nodeType === 9 ) {
|
5084 |
-
// Speed-up: Sizzle("body")
|
5085 |
-
// The body element only exists once, optimize finding it
|
5086 |
-
if ( query === "body" && context.body ) {
|
5087 |
-
return makeArray( [ context.body ], extra );
|
5088 |
-
|
5089 |
-
// Speed-up: Sizzle("#ID")
|
5090 |
-
} else if ( match && match[3] ) {
|
5091 |
-
var elem = context.getElementById( match[3] );
|
5092 |
-
|
5093 |
-
// Check parentNode to catch when Blackberry 4.6 returns
|
5094 |
-
// nodes that are no longer in the document #6963
|
5095 |
-
if ( elem && elem.parentNode ) {
|
5096 |
-
// Handle the case where IE and Opera return items
|
5097 |
-
// by name instead of ID
|
5098 |
-
if ( elem.id === match[3] ) {
|
5099 |
-
return makeArray( [ elem ], extra );
|
5100 |
-
}
|
5101 |
-
|
5102 |
-
} else {
|
5103 |
-
return makeArray( [], extra );
|
5104 |
-
}
|
5105 |
-
}
|
5106 |
-
|
5107 |
-
try {
|
5108 |
-
return makeArray( context.querySelectorAll(query), extra );
|
5109 |
-
} catch(qsaError) {}
|
5110 |
-
|
5111 |
-
// qSA works strangely on Element-rooted queries
|
5112 |
-
// We can work around this by specifying an extra ID on the root
|
5113 |
-
// and working up from there (Thanks to Andrew Dupont for the technique)
|
5114 |
-
// IE 8 doesn't work on object elements
|
5115 |
-
} else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
|
5116 |
-
var oldContext = context,
|
5117 |
-
old = context.getAttribute( "id" ),
|
5118 |
-
nid = old || id,
|
5119 |
-
hasParent = context.parentNode,
|
5120 |
-
relativeHierarchySelector = /^\s*[+~]/.test( query );
|
5121 |
-
|
5122 |
-
if ( !old ) {
|
5123 |
-
context.setAttribute( "id", nid );
|
5124 |
-
} else {
|
5125 |
-
nid = nid.replace( /'/g, "\\$&" );
|
5126 |
-
}
|
5127 |
-
if ( relativeHierarchySelector && hasParent ) {
|
5128 |
-
context = context.parentNode;
|
5129 |
-
}
|
5130 |
-
|
5131 |
-
try {
|
5132 |
-
if ( !relativeHierarchySelector || hasParent ) {
|
5133 |
-
return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
|
5134 |
-
}
|
5135 |
-
|
5136 |
-
} catch(pseudoError) {
|
5137 |
-
} finally {
|
5138 |
-
if ( !old ) {
|
5139 |
-
oldContext.removeAttribute( "id" );
|
5140 |
-
}
|
5141 |
-
}
|
5142 |
-
}
|
5143 |
-
}
|
5144 |
-
|
5145 |
-
return oldSizzle(query, context, extra, seed);
|
5146 |
-
};
|
5147 |
-
|
5148 |
-
for ( var prop in oldSizzle ) {
|
5149 |
-
Sizzle[ prop ] = oldSizzle[ prop ];
|
5150 |
-
}
|
5151 |
-
|
5152 |
-
// release memory in IE
|
5153 |
-
div = null;
|
5154 |
-
})();
|
5155 |
-
}
|
5156 |
-
|
5157 |
-
(function(){
|
5158 |
-
var html = document.documentElement,
|
5159 |
-
matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
|
5160 |
-
|
5161 |
-
if ( matches ) {
|
5162 |
-
// Check to see if it's possible to do matchesSelector
|
5163 |
-
// on a disconnected node (IE 9 fails this)
|
5164 |
-
var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
|
5165 |
-
pseudoWorks = false;
|
5166 |
-
|
5167 |
-
try {
|
5168 |
-
// This should fail with an exception
|
5169 |
-
// Gecko does not error, returns false instead
|
5170 |
-
matches.call( document.documentElement, "[test!='']:sizzle" );
|
5171 |
-
|
5172 |
-
} catch( pseudoError ) {
|
5173 |
-
pseudoWorks = true;
|
5174 |
-
}
|
5175 |
-
|
5176 |
-
Sizzle.matchesSelector = function( node, expr ) {
|
5177 |
-
// Make sure that attribute selectors are quoted
|
5178 |
-
expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
|
5179 |
-
|
5180 |
-
if ( !Sizzle.isXML( node ) ) {
|
5181 |
-
try {
|
5182 |
-
if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
|
5183 |
-
var ret = matches.call( node, expr );
|
5184 |
-
|
5185 |
-
// IE 9's matchesSelector returns false on disconnected nodes
|
5186 |
-
if ( ret || !disconnectedMatch ||
|
5187 |
-
// As well, disconnected nodes are said to be in a document
|
5188 |
-
// fragment in IE 9, so check for that
|
5189 |
-
node.document && node.document.nodeType !== 11 ) {
|
5190 |
-
return ret;
|
5191 |
-
}
|
5192 |
-
}
|
5193 |
-
} catch(e) {}
|
5194 |
-
}
|
5195 |
-
|
5196 |
-
return Sizzle(expr, null, null, [node]).length > 0;
|
5197 |
-
};
|
5198 |
-
}
|
5199 |
-
})();
|
5200 |
-
|
5201 |
-
(function(){
|
5202 |
-
var div = document.createElement("div");
|
5203 |
-
|
5204 |
-
div.innerHTML = "<div class='test e'></div><div class='test'></div>";
|
5205 |
-
|
5206 |
-
// Opera can't find a second classname (in 9.6)
|
5207 |
-
// Also, make sure that getElementsByClassName actually exists
|
5208 |
-
if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
|
5209 |
-
return;
|
5210 |
-
}
|
5211 |
-
|
5212 |
-
// Safari caches class attributes, doesn't catch changes (in 3.2)
|
5213 |
-
div.lastChild.className = "e";
|
5214 |
-
|
5215 |
-
if ( div.getElementsByClassName("e").length === 1 ) {
|
5216 |
-
return;
|
5217 |
-
}
|
5218 |
-
|
5219 |
-
Expr.order.splice(1, 0, "CLASS");
|
5220 |
-
Expr.find.CLASS = function( match, context, isXML ) {
|
5221 |
-
if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
|
5222 |
-
return context.getElementsByClassName(match[1]);
|
5223 |
-
}
|
5224 |
-
};
|
5225 |
-
|
5226 |
-
// release memory in IE
|
5227 |
-
div = null;
|
5228 |
-
})();
|
5229 |
-
|
5230 |
-
function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
|
5231 |
-
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
|
5232 |
-
var elem = checkSet[i];
|
5233 |
-
|
5234 |
-
if ( elem ) {
|
5235 |
-
var match = false;
|
5236 |
-
|
5237 |
-
elem = elem[dir];
|
5238 |
-
|
5239 |
-
while ( elem ) {
|
5240 |
-
if ( elem[ expando ] === doneName ) {
|
5241 |
-
match = checkSet[elem.sizset];
|
5242 |
-
break;
|
5243 |
-
}
|
5244 |
-
|
5245 |
-
if ( elem.nodeType === 1 && !isXML ){
|
5246 |
-
elem[ expando ] = doneName;
|
5247 |
-
elem.sizset = i;
|
5248 |
-
}
|
5249 |
-
|
5250 |
-
if ( elem.nodeName.toLowerCase() === cur ) {
|
5251 |
-
match = elem;
|
5252 |
-
break;
|
5253 |
-
}
|
5254 |
-
|
5255 |
-
elem = elem[dir];
|
5256 |
-
}
|
5257 |
-
|
5258 |
-
checkSet[i] = match;
|
5259 |
-
}
|
5260 |
-
}
|
5261 |
-
}
|
5262 |
-
|
5263 |
-
function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
|
5264 |
-
for ( var i = 0, l = checkSet.length; i < l; i++ ) {
|
5265 |
-
var elem = checkSet[i];
|
5266 |
-
|
5267 |
-
if ( elem ) {
|
5268 |
-
var match = false;
|
5269 |
-
|
5270 |
-
elem = elem[dir];
|
5271 |
-
|
5272 |
-
while ( elem ) {
|
5273 |
-
if ( elem[ expando ] === doneName ) {
|
5274 |
-
match = checkSet[elem.sizset];
|
5275 |
-
break;
|
5276 |
-
}
|
5277 |
-
|
5278 |
-
if ( elem.nodeType === 1 ) {
|
5279 |
-
if ( !isXML ) {
|
5280 |
-
elem[ expando ] = doneName;
|
5281 |
-
elem.sizset = i;
|
5282 |
-
}
|
5283 |
-
|
5284 |
-
if ( typeof cur !== "string" ) {
|
5285 |
-
if ( elem === cur ) {
|
5286 |
-
match = true;
|
5287 |
-
break;
|
5288 |
-
}
|
5289 |
-
|
5290 |
-
} else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
|
5291 |
-
match = elem;
|
5292 |
-
break;
|
5293 |
-
}
|
5294 |
-
}
|
5295 |
-
|
5296 |
-
elem = elem[dir];
|
5297 |
-
}
|
5298 |
-
|
5299 |
-
checkSet[i] = match;
|
5300 |
-
}
|
5301 |
-
}
|
5302 |
-
}
|
5303 |
-
|
5304 |
-
if ( document.documentElement.contains ) {
|
5305 |
-
Sizzle.contains = function( a, b ) {
|
5306 |
-
return a !== b && (a.contains ? a.contains(b) : true);
|
5307 |
-
};
|
5308 |
-
|
5309 |
-
} else if ( document.documentElement.compareDocumentPosition ) {
|
5310 |
-
Sizzle.contains = function( a, b ) {
|
5311 |
-
return !!(a.compareDocumentPosition(b) & 16);
|
5312 |
-
};
|
5313 |
-
|
5314 |
-
} else {
|
5315 |
-
Sizzle.contains = function() {
|
5316 |
-
return false;
|
5317 |
-
};
|
5318 |
-
}
|
5319 |
-
|
5320 |
-
Sizzle.isXML = function( elem ) {
|
5321 |
-
// documentElement is verified for cases where it doesn't yet exist
|
5322 |
-
// (such as loading iframes in IE - #4833)
|
5323 |
-
var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
|
5324 |
-
|
5325 |
-
return documentElement ? documentElement.nodeName !== "HTML" : false;
|
5326 |
-
};
|
5327 |
-
|
5328 |
-
var posProcess = function( selector, context, seed ) {
|
5329 |
-
var match,
|
5330 |
-
tmpSet = [],
|
5331 |
-
later = "",
|
5332 |
-
root = context.nodeType ? [context] : context;
|
5333 |
-
|
5334 |
-
// Position selectors must be done after the filter
|
5335 |
-
// And so must :not(positional) so we move all PSEUDOs to the end
|
5336 |
-
while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
|
5337 |
-
later += match[0];
|
5338 |
-
selector = selector.replace( Expr.match.PSEUDO, "" );
|
5339 |
-
}
|
5340 |
-
|
5341 |
-
selector = Expr.relative[selector] ? selector + "*" : selector;
|
5342 |
-
|
5343 |
-
for ( var i = 0, l = root.length; i < l; i++ ) {
|
5344 |
-
Sizzle( selector, root[i], tmpSet, seed );
|
5345 |
-
}
|
5346 |
-
|
5347 |
-
return Sizzle.filter( later, tmpSet );
|
5348 |
-
};
|
5349 |
-
|
5350 |
-
// EXPOSE
|
5351 |
-
// Override sizzle attribute retrieval
|
5352 |
-
Sizzle.attr = jQuery.attr;
|
5353 |
-
Sizzle.selectors.attrMap = {};
|
5354 |
-
jQuery.find = Sizzle;
|
5355 |
-
jQuery.expr = Sizzle.selectors;
|
5356 |
-
jQuery.expr[":"] = jQuery.expr.filters;
|
5357 |
-
jQuery.unique = Sizzle.uniqueSort;
|
5358 |
-
jQuery.text = Sizzle.getText;
|
5359 |
-
jQuery.isXMLDoc = Sizzle.isXML;
|
5360 |
-
jQuery.contains = Sizzle.contains;
|
5361 |
-
|
5362 |
-
|
5363 |
-
})();
|
5364 |
-
|
5365 |
-
|
5366 |
-
var runtil = /Until$/,
|
5367 |
-
rparentsprev = /^(?:parents|prevUntil|prevAll)/,
|
5368 |
-
// Note: This RegExp should be improved, or likely pulled from Sizzle
|
5369 |
-
rmultiselector = /,/,
|
5370 |
-
isSimple = /^.[^:#\[\.,]*$/,
|
5371 |
-
slice = Array.prototype.slice,
|
5372 |
-
POS = jQuery.expr.match.POS,
|
5373 |
-
// methods guaranteed to produce a unique set when starting from a unique set
|
5374 |
-
guaranteedUnique = {
|
5375 |
-
children: true,
|
5376 |
-
contents: true,
|
5377 |
-
next: true,
|
5378 |
-
prev: true
|
5379 |
-
};
|
5380 |
-
|
5381 |
-
jQuery.fn.extend({
|
5382 |
-
find: function( selector ) {
|
5383 |
-
var self = this,
|
5384 |
-
i, l;
|
5385 |
-
|
5386 |
-
if ( typeof selector !== "string" ) {
|
5387 |
-
return jQuery( selector ).filter(function() {
|
5388 |
-
for ( i = 0, l = self.length; i < l; i++ ) {
|
5389 |
-
if ( jQuery.contains( self[ i ], this ) ) {
|
5390 |
-
return true;
|
5391 |
-
}
|
5392 |
-
}
|
5393 |
-
});
|
5394 |
-
}
|
5395 |
-
|
5396 |
-
var ret = this.pushStack( "", "find", selector ),
|
5397 |
-
length, n, r;
|
5398 |
-
|
5399 |
-
for ( i = 0, l = this.length; i < l; i++ ) {
|
5400 |
-
length = ret.length;
|
5401 |
-
jQuery.find( selector, this[i], ret );
|
5402 |
-
|
5403 |
-
if ( i > 0 ) {
|
5404 |
-
// Make sure that the results are unique
|
5405 |
-
for ( n = length; n < ret.length; n++ ) {
|
5406 |
-
for ( r = 0; r < length; r++ ) {
|
5407 |
-
if ( ret[r] === ret[n] ) {
|
5408 |
-
ret.splice(n--, 1);
|
5409 |
-
break;
|
5410 |
-
}
|
5411 |
-
}
|
5412 |
-
}
|
5413 |
-
}
|
5414 |
-
}
|
5415 |
-
|
5416 |
-
return ret;
|
5417 |
-
},
|
5418 |
-
|
5419 |
-
has: function( target ) {
|
5420 |
-
var targets = jQuery( target );
|
5421 |
-
return this.filter(function() {
|
5422 |
-
for ( var i = 0, l = targets.length; i < l; i++ ) {
|
5423 |
-
if ( jQuery.contains( this, targets[i] ) ) {
|
5424 |
-
return true;
|
5425 |
-
}
|
5426 |
-
}
|
5427 |
-
});
|
5428 |
-
},
|
5429 |
-
|
5430 |
-
not: function( selector ) {
|
5431 |
-
return this.pushStack( winnow(this, selector, false), "not", selector);
|
5432 |
-
},
|
5433 |
-
|
5434 |
-
filter: function( selector ) {
|
5435 |
-
return this.pushStack( winnow(this, selector, true), "filter", selector );
|
5436 |
-
},
|
5437 |
-
|
5438 |
-
is: function( selector ) {
|
5439 |
-
return !!selector && (
|
5440 |
-
typeof selector === "string" ?
|
5441 |
-
// If this is a positional selector, check membership in the returned set
|
5442 |
-
// so $("p:first").is("p:last") won't return true for a doc with two "p".
|
5443 |
-
POS.test( selector ) ?
|
5444 |
-
jQuery( selector, this.context ).index( this[0] ) >= 0 :
|
5445 |
-
jQuery.filter( selector, this ).length > 0 :
|
5446 |
-
this.filter( selector ).length > 0 );
|
5447 |
-
},
|
5448 |
-
|
5449 |
-
closest: function( selectors, context ) {
|
5450 |
-
var ret = [], i, l, cur = this[0];
|
5451 |
-
|
5452 |
-
// Array (deprecated as of jQuery 1.7)
|
5453 |
-
if ( jQuery.isArray( selectors ) ) {
|
5454 |
-
var level = 1;
|
5455 |
-
|
5456 |
-
while ( cur && cur.ownerDocument && cur !== context ) {
|
5457 |
-
for ( i = 0; i < selectors.length; i++ ) {
|
5458 |
-
|
5459 |
-
if ( jQuery( cur ).is( selectors[ i ] ) ) {
|
5460 |
-
ret.push({ selector: selectors[ i ], elem: cur, level: level });
|
5461 |
-
}
|
5462 |
-
}
|
5463 |
-
|
5464 |
-
cur = cur.parentNode;
|
5465 |
-
level++;
|
5466 |
-
}
|
5467 |
-
|
5468 |
-
return ret;
|
5469 |
-
}
|
5470 |
-
|
5471 |
-
// String
|
5472 |
-
var pos = POS.test( selectors ) || typeof selectors !== "string" ?
|
5473 |
-
jQuery( selectors, context || this.context ) :
|
5474 |
-
0;
|
5475 |
-
|
5476 |
-
for ( i = 0, l = this.length; i < l; i++ ) {
|
5477 |
-
cur = this[i];
|
5478 |
-
|
5479 |
-
while ( cur ) {
|
5480 |
-
if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
|
5481 |
-
ret.push( cur );
|
5482 |
-
break;
|
5483 |
-
|
5484 |
-
} else {
|
5485 |
-
cur = cur.parentNode;
|
5486 |
-
if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
|
5487 |
-
break;
|
5488 |
-
}
|
5489 |
-
}
|
5490 |
-
}
|
5491 |
-
}
|
5492 |
-
|
5493 |
-
ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
|
5494 |
-
|
5495 |
-
return this.pushStack( ret, "closest", selectors );
|
5496 |
-
},
|
5497 |
-
|
5498 |
-
// Determine the position of an element within
|
5499 |
-
// the matched set of elements
|
5500 |
-
index: function( elem ) {
|
5501 |
-
|
5502 |
-
// No argument, return index in parent
|
5503 |
-
if ( !elem ) {
|
5504 |
-
return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
|
5505 |
-
}
|
5506 |
-
|
5507 |
-
// index in selector
|
5508 |
-
if ( typeof elem === "string" ) {
|
5509 |
-
return jQuery.inArray( this[0], jQuery( elem ) );
|
5510 |
-
}
|
5511 |
-
|
5512 |
-
// Locate the position of the desired element
|
5513 |
-
return jQuery.inArray(
|
5514 |
-
// If it receives a jQuery object, the first element is used
|
5515 |
-
elem.jquery ? elem[0] : elem, this );
|
5516 |
-
},
|
5517 |
-
|
5518 |
-
add: function( selector, context ) {
|
5519 |
-
var set = typeof selector === "string" ?
|
5520 |
-
jQuery( selector, context ) :
|
5521 |
-
jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
|
5522 |
-
all = jQuery.merge( this.get(), set );
|
5523 |
-
|
5524 |
-
return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
|
5525 |
-
all :
|
5526 |
-
jQuery.unique( all ) );
|
5527 |
-
},
|
5528 |
-
|
5529 |
-
andSelf: function() {
|
5530 |
-
return this.add( this.prevObject );
|
5531 |
-
}
|
5532 |
-
});
|
5533 |
-
|
5534 |
-
// A painfully simple check to see if an element is disconnected
|
5535 |
-
// from a document (should be improved, where feasible).
|
5536 |
-
function isDisconnected( node ) {
|
5537 |
-
return !node || !node.parentNode || node.parentNode.nodeType === 11;
|
5538 |
-
}
|
5539 |
-
|
5540 |
-
jQuery.each({
|
5541 |
-
parent: function( elem ) {
|
5542 |
-
var parent = elem.parentNode;
|
5543 |
-
return parent && parent.nodeType !== 11 ? parent : null;
|
5544 |
-
},
|
5545 |
-
parents: function( elem ) {
|
5546 |
-
return jQuery.dir( elem, "parentNode" );
|
5547 |
-
},
|
5548 |
-
parentsUntil: function( elem, i, until ) {
|
5549 |
-
return jQuery.dir( elem, "parentNode", until );
|
5550 |
-
},
|
5551 |
-
next: function( elem ) {
|
5552 |
-
return jQuery.nth( elem, 2, "nextSibling" );
|
5553 |
-
},
|
5554 |
-
prev: function( elem ) {
|
5555 |
-
return jQuery.nth( elem, 2, "previousSibling" );
|
5556 |
-
},
|
5557 |
-
nextAll: function( elem ) {
|
5558 |
-
return jQuery.dir( elem, "nextSibling" );
|
5559 |
-
},
|
5560 |
-
prevAll: function( elem ) {
|
5561 |
-
return jQuery.dir( elem, "previousSibling" );
|
5562 |
-
},
|
5563 |
-
nextUntil: function( elem, i, until ) {
|
5564 |
-
return jQuery.dir( elem, "nextSibling", until );
|
5565 |
-
},
|
5566 |
-
prevUntil: function( elem, i, until ) {
|
5567 |
-
return jQuery.dir( elem, "previousSibling", until );
|
5568 |
-
},
|
5569 |
-
siblings: function( elem ) {
|
5570 |
-
return jQuery.sibling( elem.parentNode.firstChild, elem );
|
5571 |
-
},
|
5572 |
-
children: function( elem ) {
|
5573 |
-
return jQuery.sibling( elem.firstChild );
|
5574 |
-
},
|
5575 |
-
contents: function( elem ) {
|
5576 |
-
return jQuery.nodeName( elem, "iframe" ) ?
|
5577 |
-
elem.contentDocument || elem.contentWindow.document :
|
5578 |
-
jQuery.makeArray( elem.childNodes );
|
5579 |
-
}
|
5580 |
-
}, function( name, fn ) {
|
5581 |
-
jQuery.fn[ name ] = function( until, selector ) {
|
5582 |
-
var ret = jQuery.map( this, fn, until ),
|
5583 |
-
// The variable 'args' was introduced in
|
5584 |
-
// https://github.com/jquery/jquery/commit/52a0238
|
5585 |
-
// to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed.
|
5586 |
-
// http://code.google.com/p/v8/issues/detail?id=1050
|
5587 |
-
args = slice.call(arguments);
|
5588 |
-
|
5589 |
-
if ( !runtil.test( name ) ) {
|
5590 |
-
selector = until;
|
5591 |
-
}
|
5592 |
-
|
5593 |
-
if ( selector && typeof selector === "string" ) {
|
5594 |
-
ret = jQuery.filter( selector, ret );
|
5595 |
-
}
|
5596 |
-
|
5597 |
-
ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
|
5598 |
-
|
5599 |
-
if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
|
5600 |
-
ret = ret.reverse();
|
5601 |
-
}
|
5602 |
-
|
5603 |
-
return this.pushStack( ret, name, args.join(",") );
|
5604 |
-
};
|
5605 |
-
});
|
5606 |
-
|
5607 |
-
jQuery.extend({
|
5608 |
-
filter: function( expr, elems, not ) {
|
5609 |
-
if ( not ) {
|
5610 |
-
expr = ":not(" + expr + ")";
|
5611 |
-
}
|
5612 |
-
|
5613 |
-
return elems.length === 1 ?
|
5614 |
-
jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
|
5615 |
-
jQuery.find.matches(expr, elems);
|
5616 |
-
},
|
5617 |
-
|
5618 |
-
dir: function( elem, dir, until ) {
|
5619 |
-
var matched = [],
|
5620 |
-
cur = elem[ dir ];
|
5621 |
-
|
5622 |
-
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
|
5623 |
-
if ( cur.nodeType === 1 ) {
|
5624 |
-
matched.push( cur );
|
5625 |
-
}
|
5626 |
-
cur = cur[dir];
|
5627 |
-
}
|
5628 |
-
return matched;
|
5629 |
-
},
|
5630 |
-
|
5631 |
-
nth: function( cur, result, dir, elem ) {
|
5632 |
-
result = result || 1;
|
5633 |
-
var num = 0;
|
5634 |
-
|
5635 |
-
for ( ; cur; cur = cur[dir] ) {
|
5636 |
-
if ( cur.nodeType === 1 && ++num === result ) {
|
5637 |
-
break;
|
5638 |
-
}
|
5639 |
-
}
|
5640 |
-
|
5641 |
-
return cur;
|
5642 |
-
},
|
5643 |
-
|
5644 |
-
sibling: function( n, elem ) {
|
5645 |
-
var r = [];
|
5646 |
-
|
5647 |
-
for ( ; n; n = n.nextSibling ) {
|
5648 |
-
if ( n.nodeType === 1 && n !== elem ) {
|
5649 |
-
r.push( n );
|
5650 |
-
}
|
5651 |
-
}
|
5652 |
-
|
5653 |
-
return r;
|
5654 |
-
}
|
5655 |
-
});
|
5656 |
-
|
5657 |
-
// Implement the identical functionality for filter and not
|
5658 |
-
function winnow( elements, qualifier, keep ) {
|
5659 |
-
|
5660 |
-
// Can't pass null or undefined to indexOf in Firefox 4
|
5661 |
-
// Set to 0 to skip string check
|
5662 |
-
qualifier = qualifier || 0;
|
5663 |
-
|
5664 |
-
if ( jQuery.isFunction( qualifier ) ) {
|
5665 |
-
return jQuery.grep(elements, function( elem, i ) {
|
5666 |
-
var retVal = !!qualifier.call( elem, i, elem );
|
5667 |
-
return retVal === keep;
|
5668 |
-
});
|
5669 |
-
|
5670 |
-
} else if ( qualifier.nodeType ) {
|
5671 |
-
return jQuery.grep(elements, function( elem, i ) {
|
5672 |
-
return ( elem === qualifier ) === keep;
|
5673 |
-
});
|
5674 |
-
|
5675 |
-
} else if ( typeof qualifier === "string" ) {
|
5676 |
-
var filtered = jQuery.grep(elements, function( elem ) {
|
5677 |
-
return elem.nodeType === 1;
|
5678 |
-
});
|
5679 |
-
|
5680 |
-
if ( isSimple.test( qualifier ) ) {
|
5681 |
-
return jQuery.filter(qualifier, filtered, !keep);
|
5682 |
-
} else {
|
5683 |
-
qualifier = jQuery.filter( qualifier, filtered );
|
5684 |
-
}
|
5685 |
-
}
|
5686 |
-
|
5687 |
-
return jQuery.grep(elements, function( elem, i ) {
|
5688 |
-
return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
|
5689 |
-
});
|
5690 |
-
}
|
5691 |
-
|
5692 |
-
|
5693 |
-
|
5694 |
-
|
5695 |
-
function createSafeFragment( document ) {
|
5696 |
-
var list = nodeNames.split( " " ),
|
5697 |
-
safeFrag = document.createDocumentFragment();
|
5698 |
-
|
5699 |
-
if ( safeFrag.createElement ) {
|
5700 |
-
while ( list.length ) {
|
5701 |
-
safeFrag.createElement(
|
5702 |
-
list.pop()
|
5703 |
-
);
|
5704 |
-
}
|
5705 |
-
}
|
5706 |
-
return safeFrag;
|
5707 |
-
}
|
5708 |
-
|
5709 |
-
var nodeNames = "abbr article aside audio canvas datalist details figcaption figure footer " +
|
5710 |
-
"header hgroup mark meter nav output progress section summary time video",
|
5711 |
-
rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
|
5712 |
-
rleadingWhitespace = /^\s+/,
|
5713 |
-
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
|
5714 |
-
rtagName = /<([\w:]+)/,
|
5715 |
-
rtbody = /<tbody/i,
|
5716 |
-
rhtml = /<|&#?\w+;/,
|
5717 |
-
rnoInnerhtml = /<(?:script|style)/i,
|
5718 |
-
rnocache = /<(?:script|object|embed|option|style)/i,
|
5719 |
-
rnoshimcache = new RegExp("<(?:" + nodeNames.replace(" ", "|") + ")", "i"),
|
5720 |
-
// checked="checked" or checked
|
5721 |
-
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
5722 |
-
rscriptType = /\/(java|ecma)script/i,
|
5723 |
-
rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
|
5724 |
-
wrapMap = {
|
5725 |
-
option: [ 1, "<select multiple='multiple'>", "</select>" ],
|
5726 |
-
legend: [ 1, "<fieldset>", "</fieldset>" ],
|
5727 |
-
thead: [ 1, "<table>", "</table>" ],
|
5728 |
-
tr: [ 2, "<table><tbody>", "</tbody></table>" ],
|
5729 |
-
td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
|
5730 |
-
col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
|
5731 |
-
area: [ 1, "<map>", "</map>" ],
|
5732 |
-
_default: [ 0, "", "" ]
|
5733 |
-
},
|
5734 |
-
safeFragment = createSafeFragment( document );
|
5735 |
-
|
5736 |
-
wrapMap.optgroup = wrapMap.option;
|
5737 |
-
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
|
5738 |
-
wrapMap.th = wrapMap.td;
|
5739 |
-
|
5740 |
-
// IE can't serialize <link> and <script> tags normally
|
5741 |
-
if ( !jQuery.support.htmlSerialize ) {
|
5742 |
-
wrapMap._default = [ 1, "div<div>", "</div>" ];
|
5743 |
-
}
|
5744 |
-
|
5745 |
-
jQuery.fn.extend({
|
5746 |
-
text: function( text ) {
|
5747 |
-
if ( jQuery.isFunction(text) ) {
|
5748 |
-
return this.each(function(i) {
|
5749 |
-
var self = jQuery( this );
|
5750 |
-
|
5751 |
-
self.text( text.call(this, i, self.text()) );
|
5752 |
-
});
|
5753 |
-
}
|
5754 |
-
|
5755 |
-
if ( typeof text !== "object" && text !== undefined ) {
|
5756 |
-
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
|
5757 |
-
}
|
5758 |
-
|
5759 |
-
return jQuery.text( this );
|
5760 |
-
},
|
5761 |
-
|
5762 |
-
wrapAll: function( html ) {
|
5763 |
-
if ( jQuery.isFunction( html ) ) {
|
5764 |
-
return this.each(function(i) {
|
5765 |
-
jQuery(this).wrapAll( html.call(this, i) );
|
5766 |
-
});
|
5767 |
-
}
|
5768 |
-
|
5769 |
-
if ( this[0] ) {
|
5770 |
-
// The elements to wrap the target around
|
5771 |
-
var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
|
5772 |
-
|
5773 |
-
if ( this[0].parentNode ) {
|
5774 |
-
wrap.insertBefore( this[0] );
|
5775 |
-
}
|
5776 |
-
|
5777 |
-
wrap.map(function() {
|
5778 |
-
var elem = this;
|
5779 |
-
|
5780 |
-
while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
|
5781 |
-
elem = elem.firstChild;
|
5782 |
-
}
|
5783 |
-
|
5784 |
-
return elem;
|
5785 |
-
}).append( this );
|
5786 |
-
}
|
5787 |
-
|
5788 |
-
return this;
|
5789 |
-
},
|
5790 |
-
|
5791 |
-
wrapInner: function( html ) {
|
5792 |
-
if ( jQuery.isFunction( html ) ) {
|
5793 |
-
return this.each(function(i) {
|
5794 |
-
jQuery(this).wrapInner( html.call(this, i) );
|
5795 |
-
});
|
5796 |
-
}
|
5797 |
-
|
5798 |
-
return this.each(function() {
|
5799 |
-
var self = jQuery( this ),
|
5800 |
-
contents = self.contents();
|
5801 |
-
|
5802 |
-
if ( contents.length ) {
|
5803 |
-
contents.wrapAll( html );
|
5804 |
-
|
5805 |
-
} else {
|
5806 |
-
self.append( html );
|
5807 |
-
}
|
5808 |
-
});
|
5809 |
-
},
|
5810 |
-
|
5811 |
-
wrap: function( html ) {
|
5812 |
-
return this.each(function() {
|
5813 |
-
jQuery( this ).wrapAll( html );
|
5814 |
-
});
|
5815 |
-
},
|
5816 |
-
|
5817 |
-
unwrap: function() {
|
5818 |
-
return this.parent().each(function() {
|
5819 |
-
if ( !jQuery.nodeName( this, "body" ) ) {
|
5820 |
-
jQuery( this ).replaceWith( this.childNodes );
|
5821 |
-
}
|
5822 |
-
}).end();
|
5823 |
-
},
|
5824 |
-
|
5825 |
-
append: function() {
|
5826 |
-
return this.domManip(arguments, true, function( elem ) {
|
5827 |
-
if ( this.nodeType === 1 ) {
|
5828 |
-
this.appendChild( elem );
|
5829 |
-
}
|
5830 |
-
});
|
5831 |
-
},
|
5832 |
-
|
5833 |
-
prepend: function() {
|
5834 |
-
return this.domManip(arguments, true, function( elem ) {
|
5835 |
-
if ( this.nodeType === 1 ) {
|
5836 |
-
this.insertBefore( elem, this.firstChild );
|
5837 |
-
}
|
5838 |
-
});
|
5839 |
-
},
|
5840 |
-
|
5841 |
-
before: function() {
|
5842 |
-
if ( this[0] && this[0].parentNode ) {
|
5843 |
-
return this.domManip(arguments, false, function( elem ) {
|
5844 |
-
this.parentNode.insertBefore( elem, this );
|
5845 |
-
});
|
5846 |
-
} else if ( arguments.length ) {
|
5847 |
-
var set = jQuery(arguments[0]);
|
5848 |
-
set.push.apply( set, this.toArray() );
|
5849 |
-
return this.pushStack( set, "before", arguments );
|
5850 |
-
}
|
5851 |
-
},
|
5852 |
-
|
5853 |
-
after: function() {
|
5854 |
-
if ( this[0] && this[0].parentNode ) {
|
5855 |
-
return this.domManip(arguments, false, function( elem ) {
|
5856 |
-
this.parentNode.insertBefore( elem, this.nextSibling );
|
5857 |
-
});
|
5858 |
-
} else if ( arguments.length ) {
|
5859 |
-
var set = this.pushStack( this, "after", arguments );
|
5860 |
-
set.push.apply( set, jQuery(arguments[0]).toArray() );
|
5861 |
-
return set;
|
5862 |
-
}
|
5863 |
-
},
|
5864 |
-
|
5865 |
-
// keepData is for internal use only--do not document
|
5866 |
-
remove: function( selector, keepData ) {
|
5867 |
-
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
|
5868 |
-
if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
|
5869 |
-
if ( !keepData && elem.nodeType === 1 ) {
|
5870 |
-
jQuery.cleanData( elem.getElementsByTagName("*") );
|
5871 |
-
jQuery.cleanData( [ elem ] );
|
5872 |
-
}
|
5873 |
-
|
5874 |
-
if ( elem.parentNode ) {
|
5875 |
-
elem.parentNode.removeChild( elem );
|
5876 |
-
}
|
5877 |
-
}
|
5878 |
-
}
|
5879 |
-
|
5880 |
-
return this;
|
5881 |
-
},
|
5882 |
-
|
5883 |
-
empty: function() {
|
5884 |
-
for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
|
5885 |
-
// Remove element nodes and prevent memory leaks
|
5886 |
-
if ( elem.nodeType === 1 ) {
|
5887 |
-
jQuery.cleanData( elem.getElementsByTagName("*") );
|
5888 |
-
}
|
5889 |
-
|
5890 |
-
// Remove any remaining nodes
|
5891 |
-
while ( elem.firstChild ) {
|
5892 |
-
elem.removeChild( elem.firstChild );
|
5893 |
-
}
|
5894 |
-
}
|
5895 |
-
|
5896 |
-
return this;
|
5897 |
-
},
|
5898 |
-
|
5899 |
-
clone: function( dataAndEvents, deepDataAndEvents ) {
|
5900 |
-
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
|
5901 |
-
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
|
5902 |
-
|
5903 |
-
return this.map( function () {
|
5904 |
-
return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
|
5905 |
-
});
|
5906 |
-
},
|
5907 |
-
|
5908 |
-
html: function( value ) {
|
5909 |
-
if ( value === undefined ) {
|
5910 |
-
return this[0] && this[0].nodeType === 1 ?
|
5911 |
-
this[0].innerHTML.replace(rinlinejQuery, "") :
|
5912 |
-
null;
|
5913 |
-
|
5914 |
-
// See if we can take a shortcut and just use innerHTML
|
5915 |
-
} else if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
|
5916 |
-
(jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
|
5917 |
-
!wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
|
5918 |
-
|
5919 |
-
value = value.replace(rxhtmlTag, "<$1></$2>");
|
5920 |
-
|
5921 |
-
try {
|
5922 |
-
for ( var i = 0, l = this.length; i < l; i++ ) {
|
5923 |
-
// Remove element nodes and prevent memory leaks
|
5924 |
-
if ( this[i].nodeType === 1 ) {
|
5925 |
-
jQuery.cleanData( this[i].getElementsByTagName("*") );
|
5926 |
-
this[i].innerHTML = value;
|
5927 |
-
}
|
5928 |
-
}
|
5929 |
-
|
5930 |
-
// If using innerHTML throws an exception, use the fallback method
|
5931 |
-
} catch(e) {
|
5932 |
-
this.empty().append( value );
|
5933 |
-
}
|
5934 |
-
|
5935 |
-
} else if ( jQuery.isFunction( value ) ) {
|
5936 |
-
this.each(function(i){
|
5937 |
-
var self = jQuery( this );
|
5938 |
-
|
5939 |
-
self.html( value.call(this, i, self.html()) );
|
5940 |
-
});
|
5941 |
-
|
5942 |
-
} else {
|
5943 |
-
this.empty().append( value );
|
5944 |
-
}
|
5945 |
-
|
5946 |
-
return this;
|
5947 |
-
},
|
5948 |
-
|
5949 |
-
replaceWith: function( value ) {
|
5950 |
-
if ( this[0] && this[0].parentNode ) {
|
5951 |
-
// Make sure that the elements are removed from the DOM before they are inserted
|
5952 |
-
// this can help fix replacing a parent with child elements
|
5953 |
-
if ( jQuery.isFunction( value ) ) {
|
5954 |
-
return this.each(function(i) {
|
5955 |
-
var self = jQuery(this), old = self.html();
|
5956 |
-
self.replaceWith( value.call( this, i, old ) );
|
5957 |
-
});
|
5958 |
-
}
|
5959 |
-
|
5960 |
-
if ( typeof value !== "string" ) {
|
5961 |
-
value = jQuery( value ).detach();
|
5962 |
-
}
|
5963 |
-
|
5964 |
-
return this.each(function() {
|
5965 |
-
var next = this.nextSibling,
|
5966 |
-
parent = this.parentNode;
|
5967 |
-
|
5968 |
-
jQuery( this ).remove();
|
5969 |
-
|
5970 |
-
if ( next ) {
|
5971 |
-
jQuery(next).before( value );
|
5972 |
-
} else {
|
5973 |
-
jQuery(parent).append( value );
|
5974 |
-
}
|
5975 |
-
});
|
5976 |
-
} else {
|
5977 |
-
return this.length ?
|
5978 |
-
this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
|
5979 |
-
this;
|
5980 |
-
}
|
5981 |
-
},
|
5982 |
-
|
5983 |
-
detach: function( selector ) {
|
5984 |
-
return this.remove( selector, true );
|
5985 |
-
},
|
5986 |
-
|
5987 |
-
domManip: function( args, table, callback ) {
|
5988 |
-
var results, first, fragment, parent,
|
5989 |
-
value = args[0],
|
5990 |
-
scripts = [];
|
5991 |
-
|
5992 |
-
// We can't cloneNode fragments that contain checked, in WebKit
|
5993 |
-
if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
|
5994 |
-
return this.each(function() {
|
5995 |
-
jQuery(this).domManip( args, table, callback, true );
|
5996 |
-
});
|
5997 |
-
}
|
5998 |
-
|
5999 |
-
if ( jQuery.isFunction(value) ) {
|
6000 |
-
return this.each(function(i) {
|
6001 |
-
var self = jQuery(this);
|
6002 |
-
args[0] = value.call(this, i, table ? self.html() : undefined);
|
6003 |
-
self.domManip( args, table, callback );
|
6004 |
-
});
|
6005 |
-
}
|
6006 |
-
|
6007 |
-
if ( this[0] ) {
|
6008 |
-
parent = value && value.parentNode;
|
6009 |
-
|
6010 |
-
// If we're in a fragment, just use that instead of building a new one
|
6011 |
-
if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
|
6012 |
-
results = { fragment: parent };
|
6013 |
-
|
6014 |
-
} else {
|
6015 |
-
results = jQuery.buildFragment( args, this, scripts );
|
6016 |
-
}
|
6017 |
-
|
6018 |
-
fragment = results.fragment;
|
6019 |
-
|
6020 |
-
if ( fragment.childNodes.length === 1 ) {
|
6021 |
-
first = fragment = fragment.firstChild;
|
6022 |
-
} else {
|
6023 |
-
first = fragment.firstChild;
|
6024 |
-
}
|
6025 |
-
|
6026 |
-
if ( first ) {
|
6027 |
-
table = table && jQuery.nodeName( first, "tr" );
|
6028 |
-
|
6029 |
-
for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
|
6030 |
-
callback.call(
|
6031 |
-
table ?
|
6032 |
-
root(this[i], first) :
|
6033 |
-
this[i],
|
6034 |
-
// Make sure that we do not leak memory by inadvertently discarding
|
6035 |
-
// the original fragment (which might have attached data) instead of
|
6036 |
-
// using it; in addition, use the original fragment object for the last
|
6037 |
-
// item instead of first because it can end up being emptied incorrectly
|
6038 |
-
// in certain situations (Bug #8070).
|
6039 |
-
// Fragments from the fragment cache must always be cloned and never used
|
6040 |
-
// in place.
|
6041 |
-
results.cacheable || ( l > 1 && i < lastIndex ) ?
|
6042 |
-
jQuery.clone( fragment, true, true ) :
|
6043 |
-
fragment
|
6044 |
-
);
|
6045 |
-
}
|
6046 |
-
}
|
6047 |
-
|
6048 |
-
if ( scripts.length ) {
|
6049 |
-
jQuery.each( scripts, evalScript );
|
6050 |
-
}
|
6051 |
-
}
|
6052 |
-
|
6053 |
-
return this;
|
6054 |
-
}
|
6055 |
-
});
|
6056 |
-
|
6057 |
-
function root( elem, cur ) {
|
6058 |
-
return jQuery.nodeName(elem, "table") ?
|
6059 |
-
(elem.getElementsByTagName("tbody")[0] ||
|
6060 |
-
elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
|
6061 |
-
elem;
|
6062 |
-
}
|
6063 |
-
|
6064 |
-
function cloneCopyEvent( src, dest ) {
|
6065 |
-
|
6066 |
-
if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
|
6067 |
-
return;
|
6068 |
-
}
|
6069 |
-
|
6070 |
-
var type, i, l,
|
6071 |
-
oldData = jQuery._data( src ),
|
6072 |
-
curData = jQuery._data( dest, oldData ),
|
6073 |
-
events = oldData.events;
|
6074 |
-
|
6075 |
-
if ( events ) {
|
6076 |
-
delete curData.handle;
|
6077 |
-
curData.events = {};
|
6078 |
-
|
6079 |
-
for ( type in events ) {
|
6080 |
-
for ( i = 0, l = events[ type ].length; i < l; i++ ) {
|
6081 |
-
jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
|
6082 |
-
}
|
6083 |
-
}
|
6084 |
-
}
|
6085 |
-
|
6086 |
-
// make the cloned public data object a copy from the original
|
6087 |
-
if ( curData.data ) {
|
6088 |
-
curData.data = jQuery.extend( {}, curData.data );
|
6089 |
-
}
|
6090 |
-
}
|
6091 |
-
|
6092 |
-
function cloneFixAttributes( src, dest ) {
|
6093 |
-
var nodeName;
|
6094 |
-
|
6095 |
-
// We do not need to do anything for non-Elements
|
6096 |
-
if ( dest.nodeType !== 1 ) {
|
6097 |
-
return;
|
6098 |
-
}
|
6099 |
-
|
6100 |
-
// clearAttributes removes the attributes, which we don't want,
|
6101 |
-
// but also removes the attachEvent events, which we *do* want
|
6102 |
-
if ( dest.clearAttributes ) {
|
6103 |
-
dest.clearAttributes();
|
6104 |
-
}
|
6105 |
-
|
6106 |
-
// mergeAttributes, in contrast, only merges back on the
|
6107 |
-
// original attributes, not the events
|
6108 |
-
if ( dest.mergeAttributes ) {
|
6109 |
-
dest.mergeAttributes( src );
|
6110 |
-
}
|
6111 |
-
|
6112 |
-
nodeName = dest.nodeName.toLowerCase();
|
6113 |
-
|
6114 |
-
// IE6-8 fail to clone children inside object elements that use
|
6115 |
-
// the proprietary classid attribute value (rather than the type
|
6116 |
-
// attribute) to identify the type of content to display
|
6117 |
-
if ( nodeName === "object" ) {
|
6118 |
-
dest.outerHTML = src.outerHTML;
|
6119 |
-
|
6120 |
-
} else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
|
6121 |
-
// IE6-8 fails to persist the checked state of a cloned checkbox
|
6122 |
-
// or radio button. Worse, IE6-7 fail to give the cloned element
|
6123 |
-
// a checked appearance if the defaultChecked value isn't also set
|
6124 |
-
if ( src.checked ) {
|
6125 |
-
dest.defaultChecked = dest.checked = src.checked;
|
6126 |
-
}
|
6127 |
-
|
6128 |
-
// IE6-7 get confused and end up setting the value of a cloned
|
6129 |
-
// checkbox/radio button to an empty string instead of "on"
|
6130 |
-
if ( dest.value !== src.value ) {
|
6131 |
-
dest.value = src.value;
|
6132 |
-
}
|
6133 |
-
|
6134 |
-
// IE6-8 fails to return the selected option to the default selected
|
6135 |
-
// state when cloning options
|
6136 |
-
} else if ( nodeName === "option" ) {
|
6137 |
-
dest.selected = src.defaultSelected;
|
6138 |
-
|
6139 |
-
// IE6-8 fails to set the defaultValue to the correct value when
|
6140 |
-
// cloning other types of input fields
|
6141 |
-
} else if ( nodeName === "input" || nodeName === "textarea" ) {
|
6142 |
-
dest.defaultValue = src.defaultValue;
|
6143 |
-
}
|
6144 |
-
|
6145 |
-
// Event data gets referenced instead of copied if the expando
|
6146 |
-
// gets copied too
|
6147 |
-
dest.removeAttribute( jQuery.expando );
|
6148 |
-
}
|
6149 |
-
|
6150 |
-
jQuery.buildFragment = function( args, nodes, scripts ) {
|
6151 |
-
var fragment, cacheable, cacheresults, doc,
|
6152 |
-
first = args[ 0 ];
|
6153 |
-
|
6154 |
-
// nodes may contain either an explicit document object,
|
6155 |
-
// a jQuery collection or context object.
|
6156 |
-
// If nodes[0] contains a valid object to assign to doc
|
6157 |
-
if ( nodes && nodes[0] ) {
|
6158 |
-
doc = nodes[0].ownerDocument || nodes[0];
|
6159 |
-
}
|
6160 |
-
|
6161 |
-
// Ensure that an attr object doesn't incorrectly stand in as a document object
|
6162 |
-
// Chrome and Firefox seem to allow this to occur and will throw exception
|
6163 |
-
// Fixes #8950
|
6164 |
-
if ( !doc.createDocumentFragment ) {
|
6165 |
-
doc = document;
|
6166 |
-
}
|
6167 |
-
|
6168 |
-
// Only cache "small" (1/2 KB) HTML strings that are associated with the main document
|
6169 |
-
// Cloning options loses the selected state, so don't cache them
|
6170 |
-
// IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
|
6171 |
-
// Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
|
6172 |
-
// Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
|
6173 |
-
if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
|
6174 |
-
first.charAt(0) === "<" && !rnocache.test( first ) &&
|
6175 |
-
(jQuery.support.checkClone || !rchecked.test( first )) &&
|
6176 |
-
(!jQuery.support.unknownElems && rnoshimcache.test( first )) ) {
|
6177 |
-
|
6178 |
-
cacheable = true;
|
6179 |
-
|
6180 |
-
cacheresults = jQuery.fragments[ first ];
|
6181 |
-
if ( cacheresults && cacheresults !== 1 ) {
|
6182 |
-
fragment = cacheresults;
|
6183 |
-
}
|
6184 |
-
}
|
6185 |
-
|
6186 |
-
if ( !fragment ) {
|
6187 |
-
fragment = doc.createDocumentFragment();
|
6188 |
-
jQuery.clean( args, doc, fragment, scripts );
|
6189 |
-
}
|
6190 |
-
|
6191 |
-
if ( cacheable ) {
|
6192 |
-
jQuery.fragments[ first ] = cacheresults ? fragment : 1;
|
6193 |
-
}
|
6194 |
-
|
6195 |
-
return { fragment: fragment, cacheable: cacheable };
|
6196 |
-
};
|
6197 |
-
|
6198 |
-
jQuery.fragments = {};
|
6199 |
-
|
6200 |
-
jQuery.each({
|
6201 |
-
appendTo: "append",
|
6202 |
-
prependTo: "prepend",
|
6203 |
-
insertBefore: "before",
|
6204 |
-
insertAfter: "after",
|
6205 |
-
replaceAll: "replaceWith"
|
6206 |
-
}, function( name, original ) {
|
6207 |
-
jQuery.fn[ name ] = function( selector ) {
|
6208 |
-
var ret = [],
|
6209 |
-
insert = jQuery( selector ),
|
6210 |
-
parent = this.length === 1 && this[0].parentNode;
|
6211 |
-
|
6212 |
-
if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
|
6213 |
-
insert[ original ]( this[0] );
|
6214 |
-
return this;
|
6215 |
-
|
6216 |
-
} else {
|
6217 |
-
for ( var i = 0, l = insert.length; i < l; i++ ) {
|
6218 |
-
var elems = ( i > 0 ? this.clone(true) : this ).get();
|
6219 |
-
jQuery( insert[i] )[ original ]( elems );
|
6220 |
-
ret = ret.concat( elems );
|
6221 |
-
}
|
6222 |
-
|
6223 |
-
return this.pushStack( ret, name, insert.selector );
|
6224 |
-
}
|
6225 |
-
};
|
6226 |
-
});
|
6227 |
-
|
6228 |
-
function getAll( elem ) {
|
6229 |
-
if ( typeof elem.getElementsByTagName !== "undefined" ) {
|
6230 |
-
return elem.getElementsByTagName( "*" );
|
6231 |
-
|
6232 |
-
} else if ( typeof elem.querySelectorAll !== "undefined" ) {
|
6233 |
-
return elem.querySelectorAll( "*" );
|
6234 |
-
|
6235 |
-
} else {
|
6236 |
-
return [];
|
6237 |
-
}
|
6238 |
-
}
|
6239 |
-
|
6240 |
-
// Used in clean, fixes the defaultChecked property
|
6241 |
-
function fixDefaultChecked( elem ) {
|
6242 |
-
if ( elem.type === "checkbox" || elem.type === "radio" ) {
|
6243 |
-
elem.defaultChecked = elem.checked;
|
6244 |
-
}
|
6245 |
-
}
|
6246 |
-
// Finds all inputs and passes them to fixDefaultChecked
|
6247 |
-
function findInputs( elem ) {
|
6248 |
-
var nodeName = ( elem.nodeName || "" ).toLowerCase();
|
6249 |
-
if ( nodeName === "input" ) {
|
6250 |
-
fixDefaultChecked( elem );
|
6251 |
-
// Skip scripts, get other children
|
6252 |
-
} else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
|
6253 |
-
jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
|
6254 |
-
}
|
6255 |
-
}
|
6256 |
-
|
6257 |
-
jQuery.extend({
|
6258 |
-
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
|
6259 |
-
var clone = elem.cloneNode(true),
|
6260 |
-
srcElements,
|
6261 |
-
destElements,
|
6262 |
-
i;
|
6263 |
-
|
6264 |
-
if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
|
6265 |
-
(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
|
6266 |
-
// IE copies events bound via attachEvent when using cloneNode.
|
6267 |
-
// Calling detachEvent on the clone will also remove the events
|
6268 |
-
// from the original. In order to get around this, we use some
|
6269 |
-
// proprietary methods to clear the events. Thanks to MooTools
|
6270 |
-
// guys for this hotness.
|
6271 |
-
|
6272 |
-
cloneFixAttributes( elem, clone );
|
6273 |
-
|
6274 |
-
// Using Sizzle here is crazy slow, so we use getElementsByTagName
|
6275 |
-
// instead
|
6276 |
-
srcElements = getAll( elem );
|
6277 |
-
destElements = getAll( clone );
|
6278 |
-
|
6279 |
-
// Weird iteration because IE will replace the length property
|
6280 |
-
// with an element if you are cloning the body and one of the
|
6281 |
-
// elements on the page has a name or id of "length"
|
6282 |
-
for ( i = 0; srcElements[i]; ++i ) {
|
6283 |
-
// Ensure that the destination node is not null; Fixes #9587
|
6284 |
-
if ( destElements[i] ) {
|
6285 |
-
cloneFixAttributes( srcElements[i], destElements[i] );
|
6286 |
-
}
|
6287 |
-
}
|
6288 |
-
}
|
6289 |
-
|
6290 |
-
// Copy the events from the original to the clone
|
6291 |
-
if ( dataAndEvents ) {
|
6292 |
-
cloneCopyEvent( elem, clone );
|
6293 |
-
|
6294 |
-
if ( deepDataAndEvents ) {
|
6295 |
-
srcElements = getAll( elem );
|
6296 |
-
destElements = getAll( clone );
|
6297 |
-
|
6298 |
-
for ( i = 0; srcElements[i]; ++i ) {
|
6299 |
-
cloneCopyEvent( srcElements[i], destElements[i] );
|
6300 |
-
}
|
6301 |
-
}
|
6302 |
-
}
|
6303 |
-
|
6304 |
-
srcElements = destElements = null;
|
6305 |
-
|
6306 |
-
// Return the cloned set
|
6307 |
-
return clone;
|
6308 |
-
},
|
6309 |
-
|
6310 |
-
clean: function( elems, context, fragment, scripts ) {
|
6311 |
-
var checkScriptType;
|
6312 |
-
|
6313 |
-
context = context || document;
|
6314 |
-
|
6315 |
-
// !context.createElement fails in IE with an error but returns typeof 'object'
|
6316 |
-
if ( typeof context.createElement === "undefined" ) {
|
6317 |
-
context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
|
6318 |
-
}
|
6319 |
-
|
6320 |
-
var ret = [], j;
|
6321 |
-
|
6322 |
-
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
6323 |
-
if ( typeof elem === "number" ) {
|
6324 |
-
elem += "";
|
6325 |
-
}
|
6326 |
-
|
6327 |
-
if ( !elem ) {
|
6328 |
-
continue;
|
6329 |
-
}
|
6330 |
-
|
6331 |
-
// Convert html string into DOM nodes
|
6332 |
-
if ( typeof elem === "string" ) {
|
6333 |
-
if ( !rhtml.test( elem ) ) {
|
6334 |
-
elem = context.createTextNode( elem );
|
6335 |
-
} else {
|
6336 |
-
// Fix "XHTML"-style tags in all browsers
|
6337 |
-
elem = elem.replace(rxhtmlTag, "<$1></$2>");
|
6338 |
-
|
6339 |
-
// Trim whitespace, otherwise indexOf won't work as expected
|
6340 |
-
var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
|
6341 |
-
wrap = wrapMap[ tag ] || wrapMap._default,
|
6342 |
-
depth = wrap[0],
|
6343 |
-
div = context.createElement("div");
|
6344 |
-
|
6345 |
-
// Append wrapper element to unknown element safe doc fragment
|
6346 |
-
if ( context === document ) {
|
6347 |
-
// Use the fragment we've already created for this document
|
6348 |
-
safeFragment.appendChild( div );
|
6349 |
-
} else {
|
6350 |
-
// Use a fragment created with the owner document
|
6351 |
-
createSafeFragment( context ).appendChild( div );
|
6352 |
-
}
|
6353 |
-
|
6354 |
-
// Go to html and back, then peel off extra wrappers
|
6355 |
-
div.innerHTML = wrap[1] + elem + wrap[2];
|
6356 |
-
|
6357 |
-
// Move to the right depth
|
6358 |
-
while ( depth-- ) {
|
6359 |
-
div = div.lastChild;
|
6360 |
-
}
|
6361 |
-
|
6362 |
-
// Remove IE's autoinserted <tbody> from table fragments
|
6363 |
-
if ( !jQuery.support.tbody ) {
|
6364 |
-
|
6365 |
-
// String was a <table>, *may* have spurious <tbody>
|
6366 |
-
var hasBody = rtbody.test(elem),
|
6367 |
-
tbody = tag === "table" && !hasBody ?
|
6368 |
-
div.firstChild && div.firstChild.childNodes :
|
6369 |
-
|
6370 |
-
// String was a bare <thead> or <tfoot>
|
6371 |
-
wrap[1] === "<table>" && !hasBody ?
|
6372 |
-
div.childNodes :
|
6373 |
-
[];
|
6374 |
-
|
6375 |
-
for ( j = tbody.length - 1; j >= 0 ; --j ) {
|
6376 |
-
if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
|
6377 |
-
tbody[ j ].parentNode.removeChild( tbody[ j ] );
|
6378 |
-
}
|
6379 |
-
}
|
6380 |
-
}
|
6381 |
-
|
6382 |
-
// IE completely kills leading whitespace when innerHTML is used
|
6383 |
-
if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
|
6384 |
-
div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
|
6385 |
-
}
|
6386 |
-
|
6387 |
-
elem = div.childNodes;
|
6388 |
-
}
|
6389 |
-
}
|
6390 |
-
|
6391 |
-
// Resets defaultChecked for any radios and checkboxes
|
6392 |
-
// about to be appended to the DOM in IE 6/7 (#8060)
|
6393 |
-
var len;
|
6394 |
-
if ( !jQuery.support.appendChecked ) {
|
6395 |
-
if ( elem[0] && typeof (len = elem.length) === "number" ) {
|
6396 |
-
for ( j = 0; j < len; j++ ) {
|
6397 |
-
findInputs( elem[j] );
|
6398 |
-
}
|
6399 |
-
} else {
|
6400 |
-
findInputs( elem );
|
6401 |
-
}
|
6402 |
-
}
|
6403 |
-
|
6404 |
-
if ( elem.nodeType ) {
|
6405 |
-
ret.push( elem );
|
6406 |
-
} else {
|
6407 |
-
ret = jQuery.merge( ret, elem );
|
6408 |
-
}
|
6409 |
-
}
|
6410 |
-
|
6411 |
-
if ( fragment ) {
|
6412 |
-
checkScriptType = function( elem ) {
|
6413 |
-
return !elem.type || rscriptType.test( elem.type );
|
6414 |
-
};
|
6415 |
-
for ( i = 0; ret[i]; i++ ) {
|
6416 |
-
if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
|
6417 |
-
scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
|
6418 |
-
|
6419 |
-
} else {
|
6420 |
-
if ( ret[i].nodeType === 1 ) {
|
6421 |
-
var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
|
6422 |
-
|
6423 |
-
ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
|
6424 |
-
}
|
6425 |
-
fragment.appendChild( ret[i] );
|
6426 |
-
}
|
6427 |
-
}
|
6428 |
-
}
|
6429 |
-
|
6430 |
-
return ret;
|
6431 |
-
},
|
6432 |
-
|
6433 |
-
cleanData: function( elems ) {
|
6434 |
-
var data, id,
|
6435 |
-
cache = jQuery.cache,
|
6436 |
-
special = jQuery.event.special,
|
6437 |
-
deleteExpando = jQuery.support.deleteExpando;
|
6438 |
-
|
6439 |
-
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
|
6440 |
-
if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
|
6441 |
-
continue;
|
6442 |
-
}
|
6443 |
-
|
6444 |
-
id = elem[ jQuery.expando ];
|
6445 |
-
|
6446 |
-
if ( id ) {
|
6447 |
-
data = cache[ id ];
|
6448 |
-
|
6449 |
-
if ( data && data.events ) {
|
6450 |
-
for ( var type in data.events ) {
|
6451 |
-
if ( special[ type ] ) {
|
6452 |
-
jQuery.event.remove( elem, type );
|
6453 |
-
|
6454 |
-
// This is a shortcut to avoid jQuery.event.remove's overhead
|
6455 |
-
} else {
|
6456 |
-
jQuery.removeEvent( elem, type, data.handle );
|
6457 |
-
}
|
6458 |
-
}
|
6459 |
-
|
6460 |
-
// Null the DOM reference to avoid IE6/7/8 leak (#7054)
|
6461 |
-
if ( data.handle ) {
|
6462 |
-
data.handle.elem = null;
|
6463 |
-
}
|
6464 |
-
}
|
6465 |
-
|
6466 |
-
if ( deleteExpando ) {
|
6467 |
-
delete elem[ jQuery.expando ];
|
6468 |
-
|
6469 |
-
} else if ( elem.removeAttribute ) {
|
6470 |
-
elem.removeAttribute( jQuery.expando );
|
6471 |
-
}
|
6472 |
-
|
6473 |
-
delete cache[ id ];
|
6474 |
-
}
|
6475 |
-
}
|
6476 |
-
}
|
6477 |
-
});
|
6478 |
-
|
6479 |
-
function evalScript( i, elem ) {
|
6480 |
-
if ( elem.src ) {
|
6481 |
-
jQuery.ajax({
|
6482 |
-
url: elem.src,
|
6483 |
-
async: false,
|
6484 |
-
dataType: "script"
|
6485 |
-
});
|
6486 |
-
} else {
|
6487 |
-
jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
|
6488 |
-
}
|
6489 |
-
|
6490 |
-
if ( elem.parentNode ) {
|
6491 |
-
elem.parentNode.removeChild( elem );
|
6492 |
-
}
|
6493 |
-
}
|
6494 |
-
|
6495 |
-
|
6496 |
-
|
6497 |
-
|
6498 |
-
var ralpha = /alpha\([^)]*\)/i,
|
6499 |
-
ropacity = /opacity=([^)]*)/,
|
6500 |
-
// fixed for IE9, see #8346
|
6501 |
-
rupper = /([A-Z]|^ms)/g,
|
6502 |
-
rnumpx = /^-?\d+(?:px)?$/i,
|
6503 |
-
rnum = /^-?\d/,
|
6504 |
-
rrelNum = /^([\-+])=([\-+.\de]+)/,
|
6505 |
-
|
6506 |
-
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
6507 |
-
cssWidth = [ "Left", "Right" ],
|
6508 |
-
cssHeight = [ "Top", "Bottom" ],
|
6509 |
-
curCSS,
|
6510 |
-
|
6511 |
-
getComputedStyle,
|
6512 |
-
currentStyle;
|
6513 |
-
|
6514 |
-
jQuery.fn.css = function( name, value ) {
|
6515 |
-
// Setting 'undefined' is a no-op
|
6516 |
-
if ( arguments.length === 2 && value === undefined ) {
|
6517 |
-
return this;
|
6518 |
-
}
|
6519 |
-
|
6520 |
-
return jQuery.access( this, name, value, true, function( elem, name, value ) {
|
6521 |
-
return value !== undefined ?
|
6522 |
-
jQuery.style( elem, name, value ) :
|
6523 |
-
jQuery.css( elem, name );
|
6524 |
-
});
|
6525 |
-
};
|
6526 |
-
|
6527 |
-
jQuery.extend({
|
6528 |
-
// Add in style property hooks for overriding the default
|
6529 |
-
// behavior of getting and setting a style property
|
6530 |
-
cssHooks: {
|
6531 |
-
opacity: {
|
6532 |
-
get: function( elem, computed ) {
|
6533 |
-
if ( computed ) {
|
6534 |
-
// We should always get a number back from opacity
|
6535 |
-
var ret = curCSS( elem, "opacity", "opacity" );
|
6536 |
-
return ret === "" ? "1" : ret;
|
6537 |
-
|
6538 |
-
} else {
|
6539 |
-
return elem.style.opacity;
|
6540 |
-
}
|
6541 |
-
}
|
6542 |
-
}
|
6543 |
-
},
|
6544 |
-
|
6545 |
-
// Exclude the following css properties to add px
|
6546 |
-
cssNumber: {
|
6547 |
-
"fillOpacity": true,
|
6548 |
-
"fontWeight": true,
|
6549 |
-
"lineHeight": true,
|
6550 |
-
"opacity": true,
|
6551 |
-
"orphans": true,
|
6552 |
-
"widows": true,
|
6553 |
-
"zIndex": true,
|
6554 |
-
"zoom": true
|
6555 |
-
},
|
6556 |
-
|
6557 |
-
// Add in properties whose names you wish to fix before
|
6558 |
-
// setting or getting the value
|
6559 |
-
cssProps: {
|
6560 |
-
// normalize float css property
|
6561 |
-
"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
|
6562 |
-
},
|
6563 |
-
|
6564 |
-
// Get and set the style property on a DOM Node
|
6565 |
-
style: function( elem, name, value, extra ) {
|
6566 |
-
// Don't set styles on text and comment nodes
|
6567 |
-
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
|
6568 |
-
return;
|
6569 |
-
}
|
6570 |
-
|
6571 |
-
// Make sure that we're working with the right name
|
6572 |
-
var ret, type, origName = jQuery.camelCase( name ),
|
6573 |
-
style = elem.style, hooks = jQuery.cssHooks[ origName ];
|
6574 |
-
|
6575 |
-
name = jQuery.cssProps[ origName ] || origName;
|
6576 |
-
|
6577 |
-
// Check if we're setting a value
|
6578 |
-
if ( value !== undefined ) {
|
6579 |
-
type = typeof value;
|
6580 |
-
|
6581 |
-
// convert relative number strings (+= or -=) to relative numbers. #7345
|
6582 |
-
if ( type === "string" && (ret = rrelNum.exec( value )) ) {
|
6583 |
-
value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
|
6584 |
-
// Fixes bug #9237
|
6585 |
-
type = "number";
|
6586 |
-
}
|
6587 |
-
|
6588 |
-
// Make sure that NaN and null values aren't set. See: #7116
|
6589 |
-
if ( value == null || type === "number" && isNaN( value ) ) {
|
6590 |
-
return;
|
6591 |
-
}
|
6592 |
-
|
6593 |
-
// If a number was passed in, add 'px' to the (except for certain CSS properties)
|
6594 |
-
if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
|
6595 |
-
value += "px";
|
6596 |
-
}
|
6597 |
-
|
6598 |
-
// If a hook was provided, use that value, otherwise just set the specified value
|
6599 |
-
if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
|
6600 |
-
// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
|
6601 |
-
// Fixes bug #5509
|
6602 |
-
try {
|
6603 |
-
style[ name ] = value;
|
6604 |
-
} catch(e) {}
|
6605 |
-
}
|
6606 |
-
|
6607 |
-
} else {
|
6608 |
-
// If a hook was provided get the non-computed value from there
|
6609 |
-
if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
|
6610 |
-
return ret;
|
6611 |
-
}
|
6612 |
-
|
6613 |
-
// Otherwise just get the value from the style object
|
6614 |
-
return style[ name ];
|
6615 |
-
}
|
6616 |
-
},
|
6617 |
-
|
6618 |
-
css: function( elem, name, extra ) {
|
6619 |
-
var ret, hooks;
|
6620 |
-
|
6621 |
-
// Make sure that we're working with the right name
|
6622 |
-
name = jQuery.camelCase( name );
|
6623 |
-
hooks = jQuery.cssHooks[ name ];
|
6624 |
-
name = jQuery.cssProps[ name ] || name;
|
6625 |
-
|
6626 |
-
// cssFloat needs a special treatment
|
6627 |
-
if ( name === "cssFloat" ) {
|
6628 |
-
name = "float";
|
6629 |
-
}
|
6630 |
-
|
6631 |
-
// If a hook was provided get the computed value from there
|
6632 |
-
if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
|
6633 |
-
return ret;
|
6634 |
-
|
6635 |
-
// Otherwise, if a way to get the computed value exists, use that
|
6636 |
-
} else if ( curCSS ) {
|
6637 |
-
return curCSS( elem, name );
|
6638 |
-
}
|
6639 |
-
},
|
6640 |
-
|
6641 |
-
// A method for quickly swapping in/out CSS properties to get correct calculations
|
6642 |
-
swap: function( elem, options, callback ) {
|
6643 |
-
var old = {};
|
6644 |
-
|
6645 |
-
// Remember the old values, and insert the new ones
|
6646 |
-
for ( var name in options ) {
|
6647 |
-
old[ name ] = elem.style[ name ];
|
6648 |
-
elem.style[ name ] = options[ name ];
|
6649 |
-
}
|
6650 |
-
|
6651 |
-
callback.call( elem );
|
6652 |
-
|
6653 |
-
// Revert the old values
|
6654 |
-
for ( name in options ) {
|
6655 |
-
elem.style[ name ] = old[ name ];
|
6656 |
-
}
|
6657 |
-
}
|
6658 |
-
});
|
6659 |
-
|
6660 |
-
// DEPRECATED, Use jQuery.css() instead
|
6661 |
-
jQuery.curCSS = jQuery.css;
|
6662 |
-
|
6663 |
-
jQuery.each(["height", "width"], function( i, name ) {
|
6664 |
-
jQuery.cssHooks[ name ] = {
|
6665 |
-
get: function( elem, computed, extra ) {
|
6666 |
-
var val;
|
6667 |
-
|
6668 |
-
if ( computed ) {
|
6669 |
-
if ( elem.offsetWidth !== 0 ) {
|
6670 |
-
return getWH( elem, name, extra );
|
6671 |
-
} else {
|
6672 |
-
jQuery.swap( elem, cssShow, function() {
|
6673 |
-
val = getWH( elem, name, extra );
|
6674 |
-
});
|
6675 |
-
}
|
6676 |
-
|
6677 |
-
return val;
|
6678 |
-
}
|
6679 |
-
},
|
6680 |
-
|
6681 |
-
set: function( elem, value ) {
|
6682 |
-
if ( rnumpx.test( value ) ) {
|
6683 |
-
// ignore negative width and height values #1599
|
6684 |
-
value = parseFloat( value );
|
6685 |
-
|
6686 |
-
if ( value >= 0 ) {
|
6687 |
-
return value + "px";
|
6688 |
-
}
|
6689 |
-
|
6690 |
-
} else {
|
6691 |
-
return value;
|
6692 |
-
}
|
6693 |
-
}
|
6694 |
-
};
|
6695 |
-
});
|
6696 |
-
|
6697 |
-
if ( !jQuery.support.opacity ) {
|
6698 |
-
jQuery.cssHooks.opacity = {
|
6699 |
-
get: function( elem, computed ) {
|
6700 |
-
// IE uses filters for opacity
|
6701 |
-
return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
|
6702 |
-
( parseFloat( RegExp.$1 ) / 100 ) + "" :
|
6703 |
-
computed ? "1" : "";
|
6704 |
-
},
|
6705 |
-
|
6706 |
-
set: function( elem, value ) {
|
6707 |
-
var style = elem.style,
|
6708 |
-
currentStyle = elem.currentStyle,
|
6709 |
-
opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
|
6710 |
-
filter = currentStyle && currentStyle.filter || style.filter || "";
|
6711 |
-
|
6712 |
-
// IE has trouble with opacity if it does not have layout
|
6713 |
-
// Force it by setting the zoom level
|
6714 |
-
style.zoom = 1;
|
6715 |
-
|
6716 |
-
// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
|
6717 |
-
if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
|
6718 |
-
|
6719 |
-
// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
|
6720 |
-
// if "filter:" is present at all, clearType is disabled, we want to avoid this
|
6721 |
-
// style.removeAttribute is IE Only, but so apparently is this code path...
|
6722 |
-
style.removeAttribute( "filter" );
|
6723 |
-
|
6724 |
-
// if there there is no filter style applied in a css rule, we are done
|
6725 |
-
if ( currentStyle && !currentStyle.filter ) {
|
6726 |
-
return;
|
6727 |
-
}
|
6728 |
-
}
|
6729 |
-
|
6730 |
-
// otherwise, set new filter values
|
6731 |
-
style.filter = ralpha.test( filter ) ?
|
6732 |
-
filter.replace( ralpha, opacity ) :
|
6733 |
-
filter + " " + opacity;
|
6734 |
-
}
|
6735 |
-
};
|
6736 |
-
}
|
6737 |
-
|
6738 |
-
jQuery(function() {
|
6739 |
-
// This hook cannot be added until DOM ready because the support test
|
6740 |
-
// for it is not run until after DOM ready
|
6741 |
-
if ( !jQuery.support.reliableMarginRight ) {
|
6742 |
-
jQuery.cssHooks.marginRight = {
|
6743 |
-
get: function( elem, computed ) {
|
6744 |
-
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
|
6745 |
-
// Work around by temporarily setting element display to inline-block
|
6746 |
-
var ret;
|
6747 |
-
jQuery.swap( elem, { "display": "inline-block" }, function() {
|
6748 |
-
if ( computed ) {
|
6749 |
-
ret = curCSS( elem, "margin-right", "marginRight" );
|
6750 |
-
} else {
|
6751 |
-
ret = elem.style.marginRight;
|
6752 |
-
}
|
6753 |
-
});
|
6754 |
-
return ret;
|
6755 |
-
}
|
6756 |
-
};
|
6757 |
-
}
|
6758 |
-
});
|
6759 |
-
|
6760 |
-
if ( document.defaultView && document.defaultView.getComputedStyle ) {
|
6761 |
-
getComputedStyle = function( elem, name ) {
|
6762 |
-
var ret, defaultView, computedStyle;
|
6763 |
-
|
6764 |
-
name = name.replace( rupper, "-$1" ).toLowerCase();
|
6765 |
-
|
6766 |
-
if ( !(defaultView = elem.ownerDocument.defaultView) ) {
|
6767 |
-
return undefined;
|
6768 |
-
}
|
6769 |
-
|
6770 |
-
if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
|
6771 |
-
ret = computedStyle.getPropertyValue( name );
|
6772 |
-
if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
|
6773 |
-
ret = jQuery.style( elem, name );
|
6774 |
-
}
|
6775 |
-
}
|
6776 |
-
|
6777 |
-
return ret;
|
6778 |
-
};
|
6779 |
-
}
|
6780 |
-
|
6781 |
-
if ( document.documentElement.currentStyle ) {
|
6782 |
-
currentStyle = function( elem, name ) {
|
6783 |
-
var left, rsLeft, uncomputed,
|
6784 |
-
ret = elem.currentStyle && elem.currentStyle[ name ],
|
6785 |
-
style = elem.style;
|
6786 |
-
|
6787 |
-
// Avoid setting ret to empty string here
|
6788 |
-
// so we don't default to auto
|
6789 |
-
if ( ret === null && style && (uncomputed = style[ name ]) ) {
|
6790 |
-
ret = uncomputed;
|
6791 |
-
}
|
6792 |
-
|
6793 |
-
// From the awesome hack by Dean Edwards
|
6794 |
-
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
|
6795 |
-
|
6796 |
-
// If we're not dealing with a regular pixel number
|
6797 |
-
// but a number that has a weird ending, we need to convert it to pixels
|
6798 |
-
if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
|
6799 |
-
|
6800 |
-
// Remember the original values
|
6801 |
-
left = style.left;
|
6802 |
-
rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
|
6803 |
-
|
6804 |
-
// Put in the new values to get a computed value out
|
6805 |
-
if ( rsLeft ) {
|
6806 |
-
elem.runtimeStyle.left = elem.currentStyle.left;
|
6807 |
-
}
|
6808 |
-
style.left = name === "fontSize" ? "1em" : ( ret || 0 );
|
6809 |
-
ret = style.pixelLeft + "px";
|
6810 |
-
|
6811 |
-
// Revert the changed values
|
6812 |
-
style.left = left;
|
6813 |
-
if ( rsLeft ) {
|
6814 |
-
elem.runtimeStyle.left = rsLeft;
|
6815 |
-
}
|
6816 |
-
}
|
6817 |
-
|
6818 |
-
return ret === "" ? "auto" : ret;
|
6819 |
-
};
|
6820 |
-
}
|
6821 |
-
|
6822 |
-
curCSS = getComputedStyle || currentStyle;
|
6823 |
-
|
6824 |
-
function getWH( elem, name, extra ) {
|
6825 |
-
|
6826 |
-
// Start with offset property
|
6827 |
-
var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
|
6828 |
-
which = name === "width" ? cssWidth : cssHeight;
|
6829 |
-
|
6830 |
-
if ( val > 0 ) {
|
6831 |
-
if ( extra !== "border" ) {
|
6832 |
-
jQuery.each( which, function() {
|
6833 |
-
if ( !extra ) {
|
6834 |
-
val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
|
6835 |
-
}
|
6836 |
-
if ( extra === "margin" ) {
|
6837 |
-
val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
|
6838 |
-
} else {
|
6839 |
-
val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
|
6840 |
-
}
|
6841 |
-
});
|
6842 |
-
}
|
6843 |
-
|
6844 |
-
return val + "px";
|
6845 |
-
}
|
6846 |
-
|
6847 |
-
// Fall back to computed then uncomputed css if necessary
|
6848 |
-
val = curCSS( elem, name, name );
|
6849 |
-
if ( val < 0 || val == null ) {
|
6850 |
-
val = elem.style[ name ] || 0;
|
6851 |
-
}
|
6852 |
-
// Normalize "", auto, and prepare for extra
|
6853 |
-
val = parseFloat( val ) || 0;
|
6854 |
-
|
6855 |
-
// Add padding, border, margin
|
6856 |
-
if ( extra ) {
|
6857 |
-
jQuery.each( which, function() {
|
6858 |
-
val += parseFloat( jQuery.css( elem, "padding" + this ) ) || 0;
|
6859 |
-
if ( extra !== "padding" ) {
|
6860 |
-
val += parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0;
|
6861 |
-
}
|
6862 |
-
if ( extra === "margin" ) {
|
6863 |
-
val += parseFloat( jQuery.css( elem, extra + this ) ) || 0;
|
6864 |
-
}
|
6865 |
-
});
|
6866 |
-
}
|
6867 |
-
|
6868 |
-
return val + "px";
|
6869 |
-
}
|
6870 |
-
|
6871 |
-
if ( jQuery.expr && jQuery.expr.filters ) {
|
6872 |
-
jQuery.expr.filters.hidden = function( elem ) {
|
6873 |
-
var width = elem.offsetWidth,
|
6874 |
-
height = elem.offsetHeight;
|
6875 |
-
|
6876 |
-
return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
|
6877 |
-
};
|
6878 |
-
|
6879 |
-
jQuery.expr.filters.visible = function( elem ) {
|
6880 |
-
return !jQuery.expr.filters.hidden( elem );
|
6881 |
-
};
|
6882 |
-
}
|
6883 |
-
|
6884 |
-
|
6885 |
-
|
6886 |
-
|
6887 |
-
var r20 = /%20/g,
|
6888 |
-
rbracket = /\[\]$/,
|
6889 |
-
rCRLF = /\r?\n/g,
|
6890 |
-
rhash = /#.*$/,
|
6891 |
-
rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
|
6892 |
-
rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
|
6893 |
-
// #7653, #8125, #8152: local protocol detection
|
6894 |
-
rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
|
6895 |
-
rnoContent = /^(?:GET|HEAD)$/,
|
6896 |
-
rprotocol = /^\/\//,
|
6897 |
-
rquery = /\?/,
|
6898 |
-
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
|
6899 |
-
rselectTextarea = /^(?:select|textarea)/i,
|
6900 |
-
rspacesAjax = /\s+/,
|
6901 |
-
rts = /([?&])_=[^&]*/,
|
6902 |
-
rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
|
6903 |
-
|
6904 |
-
// Keep a copy of the old load method
|
6905 |
-
_load = jQuery.fn.load,
|
6906 |
-
|
6907 |
-
/* Prefilters
|
6908 |
-
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
|
6909 |
-
* 2) These are called:
|
6910 |
-
* - BEFORE asking for a transport
|
6911 |
-
* - AFTER param serialization (s.data is a string if s.processData is true)
|
6912 |
-
* 3) key is the dataType
|
6913 |
-
* 4) the catchall symbol "*" can be used
|
6914 |
-
* 5) execution will start with transport dataType and THEN continue down to "*" if needed
|
6915 |
-
*/
|
6916 |
-
prefilters = {},
|
6917 |
-
|
6918 |
-
/* Transports bindings
|
6919 |
-
* 1) key is the dataType
|
6920 |
-
* 2) the catchall symbol "*" can be used
|
6921 |
-
* 3) selection will start with transport dataType and THEN go to "*" if needed
|
6922 |
-
*/
|
6923 |
-
transports = {},
|
6924 |
-
|
6925 |
-
// Document location
|
6926 |
-
ajaxLocation,
|
6927 |
-
|
6928 |
-
// Document location segments
|
6929 |
-
ajaxLocParts,
|
6930 |
-
|
6931 |
-
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
6932 |
-
allTypes = ["*/"] + ["*"];
|
6933 |
-
|
6934 |
-
// #8138, IE may throw an exception when accessing
|
6935 |
-
// a field from window.location if document.domain has been set
|
6936 |
-
try {
|
6937 |
-
ajaxLocation = location.href;
|
6938 |
-
} catch( e ) {
|
6939 |
-
// Use the href attribute of an A element
|
6940 |
-
// since IE will modify it given document.location
|
6941 |
-
ajaxLocation = document.createElement( "a" );
|
6942 |
-
ajaxLocation.href = "";
|
6943 |
-
ajaxLocation = ajaxLocation.href;
|
6944 |
-
}
|
6945 |
-
|
6946 |
-
// Segment location into parts
|
6947 |
-
ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
|
6948 |
-
|
6949 |
-
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
6950 |
-
function addToPrefiltersOrTransports( structure ) {
|
6951 |
-
|
6952 |
-
// dataTypeExpression is optional and defaults to "*"
|
6953 |
-
return function( dataTypeExpression, func ) {
|
6954 |
-
|
6955 |
-
if ( typeof dataTypeExpression !== "string" ) {
|
6956 |
-
func = dataTypeExpression;
|
6957 |
-
dataTypeExpression = "*";
|
6958 |
-
}
|
6959 |
-
|
6960 |
-
if ( jQuery.isFunction( func ) ) {
|
6961 |
-
var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
|
6962 |
-
i = 0,
|
6963 |
-
length = dataTypes.length,
|
6964 |
-
dataType,
|
6965 |
-
list,
|
6966 |
-
placeBefore;
|
6967 |
-
|
6968 |
-
// For each dataType in the dataTypeExpression
|
6969 |
-
for ( ; i < length; i++ ) {
|
6970 |
-
dataType = dataTypes[ i ];
|
6971 |
-
// We control if we're asked to add before
|
6972 |
-
// any existing element
|
6973 |
-
placeBefore = /^\+/.test( dataType );
|
6974 |
-
if ( placeBefore ) {
|
6975 |
-
dataType = dataType.substr( 1 ) || "*";
|
6976 |
-
}
|
6977 |
-
list = structure[ dataType ] = structure[ dataType ] || [];
|
6978 |
-
// then we add to the structure accordingly
|
6979 |
-
list[ placeBefore ? "unshift" : "push" ]( func );
|
6980 |
-
}
|
6981 |
-
}
|
6982 |
-
};
|
6983 |
-
}
|
6984 |
-
|
6985 |
-
// Base inspection function for prefilters and transports
|
6986 |
-
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
|
6987 |
-
dataType /* internal */, inspected /* internal */ ) {
|
6988 |
-
|
6989 |
-
dataType = dataType || options.dataTypes[ 0 ];
|
6990 |
-
inspected = inspected || {};
|
6991 |
-
|
6992 |
-
inspected[ dataType ] = true;
|
6993 |
-
|
6994 |
-
var list = structure[ dataType ],
|
6995 |
-
i = 0,
|
6996 |
-
length = list ? list.length : 0,
|
6997 |
-
executeOnly = ( structure === prefilters ),
|
6998 |
-
selection;
|
6999 |
-
|
7000 |
-
for ( ; i < length && ( executeOnly || !selection ); i++ ) {
|
7001 |
-
selection = list[ i ]( options, originalOptions, jqXHR );
|
7002 |
-
// If we got redirected to another dataType
|
7003 |
-
// we try there if executing only and not done already
|
7004 |
-
if ( typeof selection === "string" ) {
|
7005 |
-
if ( !executeOnly || inspected[ selection ] ) {
|
7006 |
-
selection = undefined;
|
7007 |
-
} else {
|
7008 |
-
options.dataTypes.unshift( selection );
|
7009 |
-
selection = inspectPrefiltersOrTransports(
|
7010 |
-
structure, options, originalOptions, jqXHR, selection, inspected );
|
7011 |
-
}
|
7012 |
-
}
|
7013 |
-
}
|
7014 |
-
// If we're only executing or nothing was selected
|
7015 |
-
// we try the catchall dataType if not done already
|
7016 |
-
if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
|
7017 |
-
selection = inspectPrefiltersOrTransports(
|
7018 |
-
structure, options, originalOptions, jqXHR, "*", inspected );
|
7019 |
-
}
|
7020 |
-
// unnecessary when only executing (prefilters)
|
7021 |
-
// but it'll be ignored by the caller in that case
|
7022 |
-
return selection;
|
7023 |
-
}
|
7024 |
-
|
7025 |
-
// A special extend for ajax options
|
7026 |
-
// that takes "flat" options (not to be deep extended)
|
7027 |
-
// Fixes #9887
|
7028 |
-
function ajaxExtend( target, src ) {
|
7029 |
-
var key, deep,
|
7030 |
-
flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
7031 |
-
for ( key in src ) {
|
7032 |
-
if ( src[ key ] !== undefined ) {
|
7033 |
-
( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
|
7034 |
-
}
|
7035 |
-
}
|
7036 |
-
if ( deep ) {
|
7037 |
-
jQuery.extend( true, target, deep );
|
7038 |
-
}
|
7039 |
-
}
|
7040 |
-
|
7041 |
-
jQuery.fn.extend({
|
7042 |
-
load: function( url, params, callback ) {
|
7043 |
-
if ( typeof url !== "string" && _load ) {
|
7044 |
-
return _load.apply( this, arguments );
|
7045 |
-
|
7046 |
-
// Don't do a request if no elements are being requested
|
7047 |
-
} else if ( !this.length ) {
|
7048 |
-
return this;
|
7049 |
-
}
|
7050 |
-
|
7051 |
-
var off = url.indexOf( " " );
|
7052 |
-
if ( off >= 0 ) {
|
7053 |
-
var selector = url.slice( off, url.length );
|
7054 |
-
url = url.slice( 0, off );
|
7055 |
-
}
|
7056 |
-
|
7057 |
-
// Default to a GET request
|
7058 |
-
var type = "GET";
|
7059 |
-
|
7060 |
-
// If the second parameter was provided
|
7061 |
-
if ( params ) {
|
7062 |
-
// If it's a function
|
7063 |
-
if ( jQuery.isFunction( params ) ) {
|
7064 |
-
// We assume that it's the callback
|
7065 |
-
callback = params;
|
7066 |
-
params = undefined;
|
7067 |
-
|
7068 |
-
// Otherwise, build a param string
|
7069 |
-
} else if ( typeof params === "object" ) {
|
7070 |
-
params = jQuery.param( params, jQuery.ajaxSettings.traditional );
|
7071 |
-
type = "POST";
|
7072 |
-
}
|
7073 |
-
}
|
7074 |
-
|
7075 |
-
var self = this;
|
7076 |
-
|
7077 |
-
// Request the remote document
|
7078 |
-
jQuery.ajax({
|
7079 |
-
url: url,
|
7080 |
-
type: type,
|
7081 |
-
dataType: "html",
|
7082 |
-
data: params,
|
7083 |
-
// Complete callback (responseText is used internally)
|
7084 |
-
complete: function( jqXHR, status, responseText ) {
|
7085 |
-
// Store the response as specified by the jqXHR object
|
7086 |
-
responseText = jqXHR.responseText;
|
7087 |
-
// If successful, inject the HTML into all the matched elements
|
7088 |
-
if ( jqXHR.isResolved() ) {
|
7089 |
-
// #4825: Get the actual response in case
|
7090 |
-
// a dataFilter is present in ajaxSettings
|
7091 |
-
jqXHR.done(function( r ) {
|
7092 |
-
responseText = r;
|
7093 |
-
});
|
7094 |
-
// See if a selector was specified
|
7095 |
-
self.html( selector ?
|
7096 |
-
// Create a dummy div to hold the results
|
7097 |
-
jQuery("<div>")
|
7098 |
-
// inject the contents of the document in, removing the scripts
|
7099 |
-
// to avoid any 'Permission Denied' errors in IE
|
7100 |
-
.append(responseText.replace(rscript, ""))
|
7101 |
-
|
7102 |
-
// Locate the specified elements
|
7103 |
-
.find(selector) :
|
7104 |
-
|
7105 |
-
// If not, just inject the full result
|
7106 |
-
responseText );
|
7107 |
-
}
|
7108 |
-
|
7109 |
-
if ( callback ) {
|
7110 |
-
self.each( callback, [ responseText, status, jqXHR ] );
|
7111 |
-
}
|
7112 |
-
}
|
7113 |
-
});
|
7114 |
-
|
7115 |
-
return this;
|
7116 |
-
},
|
7117 |
-
|
7118 |
-
serialize: function() {
|
7119 |
-
return jQuery.param( this.serializeArray() );
|
7120 |
-
},
|
7121 |
-
|
7122 |
-
serializeArray: function() {
|
7123 |
-
return this.map(function(){
|
7124 |
-
return this.elements ? jQuery.makeArray( this.elements ) : this;
|
7125 |
-
})
|
7126 |
-
.filter(function(){
|
7127 |
-
return this.name && !this.disabled &&
|
7128 |
-
( this.checked || rselectTextarea.test( this.nodeName ) ||
|
7129 |
-
rinput.test( this.type ) );
|
7130 |
-
})
|
7131 |
-
.map(function( i, elem ){
|
7132 |
-
var val = jQuery( this ).val();
|
7133 |
-
|
7134 |
-
return val == null ?
|
7135 |
-
null :
|
7136 |
-
jQuery.isArray( val ) ?
|
7137 |
-
jQuery.map( val, function( val, i ){
|
7138 |
-
return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
7139 |
-
}) :
|
7140 |
-
{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
|
7141 |
-
}).get();
|
7142 |
-
}
|
7143 |
-
});
|
7144 |
-
|
7145 |
-
// Attach a bunch of functions for handling common AJAX events
|
7146 |
-
jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
|
7147 |
-
jQuery.fn[ o ] = function( f ){
|
7148 |
-
return this.bind( o, f );
|
7149 |
-
};
|
7150 |
-
});
|
7151 |
-
|
7152 |
-
jQuery.each( [ "get", "post" ], function( i, method ) {
|
7153 |
-
jQuery[ method ] = function( url, data, callback, type ) {
|
7154 |
-
// shift arguments if data argument was omitted
|
7155 |
-
if ( jQuery.isFunction( data ) ) {
|
7156 |
-
type = type || callback;
|
7157 |
-
callback = data;
|
7158 |
-
data = undefined;
|
7159 |
-
}
|
7160 |
-
|
7161 |
-
return jQuery.ajax({
|
7162 |
-
type: method,
|
7163 |
-
url: url,
|
7164 |
-
data: data,
|
7165 |
-
success: callback,
|
7166 |
-
dataType: type
|
7167 |
-
});
|
7168 |
-
};
|
7169 |
-
});
|
7170 |
-
|
7171 |
-
jQuery.extend({
|
7172 |
-
|
7173 |
-
getScript: function( url, callback ) {
|
7174 |
-
return jQuery.get( url, undefined, callback, "script" );
|
7175 |
-
},
|
7176 |
-
|
7177 |
-
getJSON: function( url, data, callback ) {
|
7178 |
-
return jQuery.get( url, data, callback, "json" );
|
7179 |
-
},
|
7180 |
-
|
7181 |
-
// Creates a full fledged settings object into target
|
7182 |
-
// with both ajaxSettings and settings fields.
|
7183 |
-
// If target is omitted, writes into ajaxSettings.
|
7184 |
-
ajaxSetup: function( target, settings ) {
|
7185 |
-
if ( settings ) {
|
7186 |
-
// Building a settings object
|
7187 |
-
ajaxExtend( target, jQuery.ajaxSettings );
|
7188 |
-
} else {
|
7189 |
-
// Extending ajaxSettings
|
7190 |
-
settings = target;
|
7191 |
-
target = jQuery.ajaxSettings;
|
7192 |
-
}
|
7193 |
-
ajaxExtend( target, settings );
|
7194 |
-
return target;
|
7195 |
-
},
|
7196 |
-
|
7197 |
-
ajaxSettings: {
|
7198 |
-
url: ajaxLocation,
|
7199 |
-
isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
|
7200 |
-
global: true,
|
7201 |
-
type: "GET",
|
7202 |
-
contentType: "application/x-www-form-urlencoded",
|
7203 |
-
processData: true,
|
7204 |
-
async: true,
|
7205 |
-
/*
|
7206 |
-
timeout: 0,
|
7207 |
-
data: null,
|
7208 |
-
dataType: null,
|
7209 |
-
username: null,
|
7210 |
-
password: null,
|
7211 |
-
cache: null,
|
7212 |
-
traditional: false,
|
7213 |
-
headers: {},
|
7214 |
-
*/
|
7215 |
-
|
7216 |
-
accepts: {
|
7217 |
-
xml: "application/xml, text/xml",
|
7218 |
-
html: "text/html",
|
7219 |
-
text: "text/plain",
|
7220 |
-
json: "application/json, text/javascript",
|
7221 |
-
"*": allTypes
|
7222 |
-
},
|
7223 |
-
|
7224 |
-
contents: {
|
7225 |
-
xml: /xml/,
|
7226 |
-
html: /html/,
|
7227 |
-
json: /json/
|
7228 |
-
},
|
7229 |
-
|
7230 |
-
responseFields: {
|
7231 |
-
xml: "responseXML",
|
7232 |
-
text: "responseText"
|
7233 |
-
},
|
7234 |
-
|
7235 |
-
// List of data converters
|
7236 |
-
// 1) key format is "source_type destination_type" (a single space in-between)
|
7237 |
-
// 2) the catchall symbol "*" can be used for source_type
|
7238 |
-
converters: {
|
7239 |
-
|
7240 |
-
// Convert anything to text
|
7241 |
-
"* text": window.String,
|
7242 |
-
|
7243 |
-
// Text to html (true = no transformation)
|
7244 |
-
"text html": true,
|
7245 |
-
|
7246 |
-
// Evaluate text as a json expression
|
7247 |
-
"text json": jQuery.parseJSON,
|
7248 |
-
|
7249 |
-
// Parse text as xml
|
7250 |
-
"text xml": jQuery.parseXML
|
7251 |
-
},
|
7252 |
-
|
7253 |
-
// For options that shouldn't be deep extended:
|
7254 |
-
// you can add your own custom options here if
|
7255 |
-
// and when you create one that shouldn't be
|
7256 |
-
// deep extended (see ajaxExtend)
|
7257 |
-
flatOptions: {
|
7258 |
-
context: true,
|
7259 |
-
url: true
|
7260 |
-
}
|
7261 |
-
},
|
7262 |
-
|
7263 |
-
ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
|
7264 |
-
ajaxTransport: addToPrefiltersOrTransports( transports ),
|
7265 |
-
|
7266 |
-
// Main method
|
7267 |
-
ajax: function( url, options ) {
|
7268 |
-
|
7269 |
-
// If url is an object, simulate pre-1.5 signature
|
7270 |
-
if ( typeof url === "object" ) {
|
7271 |
-
options = url;
|
7272 |
-
url = undefined;
|
7273 |
-
}
|
7274 |
-
|
7275 |
-
// Force options to be an object
|
7276 |
-
options = options || {};
|
7277 |
-
|
7278 |
-
var // Create the final options object
|
7279 |
-
s = jQuery.ajaxSetup( {}, options ),
|
7280 |
-
// Callbacks context
|
7281 |
-
callbackContext = s.context || s,
|
7282 |
-
// Context for global events
|
7283 |
-
// It's the callbackContext if one was provided in the options
|
7284 |
-
// and if it's a DOM node or a jQuery collection
|
7285 |
-
globalEventContext = callbackContext !== s &&
|
7286 |
-
( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
|
7287 |
-
jQuery( callbackContext ) : jQuery.event,
|
7288 |
-
// Deferreds
|
7289 |
-
deferred = jQuery.Deferred(),
|
7290 |
-
completeDeferred = jQuery.Callbacks( "once memory" ),
|
7291 |
-
// Status-dependent callbacks
|
7292 |
-
statusCode = s.statusCode || {},
|
7293 |
-
// ifModified key
|
7294 |
-
ifModifiedKey,
|
7295 |
-
// Headers (they are sent all at once)
|
7296 |
-
requestHeaders = {},
|
7297 |
-
requestHeadersNames = {},
|
7298 |
-
// Response headers
|
7299 |
-
responseHeadersString,
|
7300 |
-
responseHeaders,
|
7301 |
-
// transport
|
7302 |
-
transport,
|
7303 |
-
// timeout handle
|
7304 |
-
timeoutTimer,
|
7305 |
-
// Cross-domain detection vars
|
7306 |
-
parts,
|
7307 |
-
// The jqXHR state
|
7308 |
-
state = 0,
|
7309 |
-
// To know if global events are to be dispatched
|
7310 |
-
fireGlobals,
|
7311 |
-
// Loop variable
|
7312 |
-
i,
|
7313 |
-
// Fake xhr
|
7314 |
-
jqXHR = {
|
7315 |
-
|
7316 |
-
readyState: 0,
|
7317 |
-
|
7318 |
-
// Caches the header
|
7319 |
-
setRequestHeader: function( name, value ) {
|
7320 |
-
if ( !state ) {
|
7321 |
-
var lname = name.toLowerCase();
|
7322 |
-
name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
|
7323 |
-
requestHeaders[ name ] = value;
|
7324 |
-
}
|
7325 |
-
return this;
|
7326 |
-
},
|
7327 |
-
|
7328 |
-
// Raw string
|
7329 |
-
getAllResponseHeaders: function() {
|
7330 |
-
return state === 2 ? responseHeadersString : null;
|
7331 |
-
},
|
7332 |
-
|
7333 |
-
// Builds headers hashtable if needed
|
7334 |
-
getResponseHeader: function( key ) {
|
7335 |
-
var match;
|
7336 |
-
if ( state === 2 ) {
|
7337 |
-
if ( !responseHeaders ) {
|
7338 |
-
responseHeaders = {};
|
7339 |
-
while( ( match = rheaders.exec( responseHeadersString ) ) ) {
|
7340 |
-
responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
|
7341 |
-
}
|
7342 |
-
}
|
7343 |
-
match = responseHeaders[ key.toLowerCase() ];
|
7344 |
-
}
|
7345 |
-
return match === undefined ? null : match;
|
7346 |
-
},
|
7347 |
-
|
7348 |
-
// Overrides response content-type header
|
7349 |
-
overrideMimeType: function( type ) {
|
7350 |
-
if ( !state ) {
|
7351 |
-
s.mimeType = type;
|
7352 |
-
}
|
7353 |
-
return this;
|
7354 |
-
},
|
7355 |
-
|
7356 |
-
// Cancel the request
|
7357 |
-
abort: function( statusText ) {
|
7358 |
-
statusText = statusText || "abort";
|
7359 |
-
if ( transport ) {
|
7360 |
-
transport.abort( statusText );
|
7361 |
-
}
|
7362 |
-
done( 0, statusText );
|
7363 |
-
return this;
|
7364 |
-
}
|
7365 |
-
};
|
7366 |
-
|
7367 |
-
// Callback for when everything is done
|
7368 |
-
// It is defined here because jslint complains if it is declared
|
7369 |
-
// at the end of the function (which would be more logical and readable)
|
7370 |
-
function done( status, nativeStatusText, responses, headers ) {
|
7371 |
-
|
7372 |
-
// Called once
|
7373 |
-
if ( state === 2 ) {
|
7374 |
-
return;
|
7375 |
-
}
|
7376 |
-
|
7377 |
-
// State is "done" now
|
7378 |
-
state = 2;
|
7379 |
-
|
7380 |
-
// Clear timeout if it exists
|
7381 |
-
if ( timeoutTimer ) {
|
7382 |
-
clearTimeout( timeoutTimer );
|
7383 |
-
}
|
7384 |
-
|
7385 |
-
// Dereference transport for early garbage collection
|
7386 |
-
// (no matter how long the jqXHR object will be used)
|
7387 |
-
transport = undefined;
|
7388 |
-
|
7389 |
-
// Cache response headers
|
7390 |
-
responseHeadersString = headers || "";
|
7391 |
-
|
7392 |
-
// Set readyState
|
7393 |
-
jqXHR.readyState = status > 0 ? 4 : 0;
|
7394 |
-
|
7395 |
-
var isSuccess,
|
7396 |
-
success,
|
7397 |
-
error,
|
7398 |
-
statusText = nativeStatusText,
|
7399 |
-
response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
|
7400 |
-
lastModified,
|
7401 |
-
etag;
|
7402 |
-
|
7403 |
-
// If successful, handle type chaining
|
7404 |
-
if ( status >= 200 && status < 300 || status === 304 ) {
|
7405 |
-
|
7406 |
-
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
7407 |
-
if ( s.ifModified ) {
|
7408 |
-
|
7409 |
-
if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
|
7410 |
-
jQuery.lastModified[ ifModifiedKey ] = lastModified;
|
7411 |
-
}
|
7412 |
-
if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
|
7413 |
-
jQuery.etag[ ifModifiedKey ] = etag;
|
7414 |
-
}
|
7415 |
-
}
|
7416 |
-
|
7417 |
-
// If not modified
|
7418 |
-
if ( status === 304 ) {
|
7419 |
-
|
7420 |
-
statusText = "notmodified";
|
7421 |
-
isSuccess = true;
|
7422 |
-
|
7423 |
-
// If we have data
|
7424 |
-
} else {
|
7425 |
-
|
7426 |
-
try {
|
7427 |
-
success = ajaxConvert( s, response );
|
7428 |
-
statusText = "success";
|
7429 |
-
isSuccess = true;
|
7430 |
-
} catch(e) {
|
7431 |
-
// We have a parsererror
|
7432 |
-
statusText = "parsererror";
|
7433 |
-
error = e;
|
7434 |
-
}
|
7435 |
-
}
|
7436 |
-
} else {
|
7437 |
-
// We extract error from statusText
|
7438 |
-
// then normalize statusText and status for non-aborts
|
7439 |
-
error = statusText;
|
7440 |
-
if ( !statusText || status ) {
|
7441 |
-
statusText = "error";
|
7442 |
-
if ( status < 0 ) {
|
7443 |
-
status = 0;
|
7444 |
-
}
|
7445 |
-
}
|
7446 |
-
}
|
7447 |
-
|
7448 |
-
// Set data for the fake xhr object
|
7449 |
-
jqXHR.status = status;
|
7450 |
-
jqXHR.statusText = "" + ( nativeStatusText || statusText );
|
7451 |
-
|
7452 |
-
// Success/Error
|
7453 |
-
if ( isSuccess ) {
|
7454 |
-
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
|
7455 |
-
} else {
|
7456 |
-
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
|
7457 |
-
}
|
7458 |
-
|
7459 |
-
// Status-dependent callbacks
|
7460 |
-
jqXHR.statusCode( statusCode );
|
7461 |
-
statusCode = undefined;
|
7462 |
-
|
7463 |
-
if ( fireGlobals ) {
|
7464 |
-
globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
|
7465 |
-
[ jqXHR, s, isSuccess ? success : error ] );
|
7466 |
-
}
|
7467 |
-
|
7468 |
-
// Complete
|
7469 |
-
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
|
7470 |
-
|
7471 |
-
if ( fireGlobals ) {
|
7472 |
-
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
7473 |
-
// Handle the global AJAX counter
|
7474 |
-
if ( !( --jQuery.active ) ) {
|
7475 |
-
jQuery.event.trigger( "ajaxStop" );
|
7476 |
-
}
|
7477 |
-
}
|
7478 |
-
}
|
7479 |
-
|
7480 |
-
// Attach deferreds
|
7481 |
-
deferred.promise( jqXHR );
|
7482 |
-
jqXHR.success = jqXHR.done;
|
7483 |
-
jqXHR.error = jqXHR.fail;
|
7484 |
-
jqXHR.complete = completeDeferred.add;
|
7485 |
-
|
7486 |
-
// Status-dependent callbacks
|
7487 |
-
jqXHR.statusCode = function( map ) {
|
7488 |
-
if ( map ) {
|
7489 |
-
var tmp;
|
7490 |
-
if ( state < 2 ) {
|
7491 |
-
for ( tmp in map ) {
|
7492 |
-
statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
|
7493 |
-
}
|
7494 |
-
} else {
|
7495 |
-
tmp = map[ jqXHR.status ];
|
7496 |
-
jqXHR.then( tmp, tmp );
|
7497 |
-
}
|
7498 |
-
}
|
7499 |
-
return this;
|
7500 |
-
};
|
7501 |
-
|
7502 |
-
// Remove hash character (#7531: and string promotion)
|
7503 |
-
// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
|
7504 |
-
// We also use the url parameter if available
|
7505 |
-
s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
|
7506 |
-
|
7507 |
-
// Extract dataTypes list
|
7508 |
-
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
|
7509 |
-
|
7510 |
-
// Determine if a cross-domain request is in order
|
7511 |
-
if ( s.crossDomain == null ) {
|
7512 |
-
parts = rurl.exec( s.url.toLowerCase() );
|
7513 |
-
s.crossDomain = !!( parts &&
|
7514 |
-
( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
|
7515 |
-
( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
|
7516 |
-
( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
|
7517 |
-
);
|
7518 |
-
}
|
7519 |
-
|
7520 |
-
// Convert data if not already a string
|
7521 |
-
if ( s.data && s.processData && typeof s.data !== "string" ) {
|
7522 |
-
s.data = jQuery.param( s.data, s.traditional );
|
7523 |
-
}
|
7524 |
-
|
7525 |
-
// Apply prefilters
|
7526 |
-
inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
|
7527 |
-
|
7528 |
-
// If request was aborted inside a prefiler, stop there
|
7529 |
-
if ( state === 2 ) {
|
7530 |
-
return false;
|
7531 |
-
}
|
7532 |
-
|
7533 |
-
// We can fire global events as of now if asked to
|
7534 |
-
fireGlobals = s.global;
|
7535 |
-
|
7536 |
-
// Uppercase the type
|
7537 |
-
s.type = s.type.toUpperCase();
|
7538 |
-
|
7539 |
-
// Determine if request has content
|
7540 |
-
s.hasContent = !rnoContent.test( s.type );
|
7541 |
-
|
7542 |
-
// Watch for a new set of requests
|
7543 |
-
if ( fireGlobals && jQuery.active++ === 0 ) {
|
7544 |
-
jQuery.event.trigger( "ajaxStart" );
|
7545 |
-
}
|
7546 |
-
|
7547 |
-
// More options handling for requests with no content
|
7548 |
-
if ( !s.hasContent ) {
|
7549 |
-
|
7550 |
-
// If data is available, append data to url
|
7551 |
-
if ( s.data ) {
|
7552 |
-
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
|
7553 |
-
// #9682: remove data so that it's not used in an eventual retry
|
7554 |
-
delete s.data;
|
7555 |
-
}
|
7556 |
-
|
7557 |
-
// Get ifModifiedKey before adding the anti-cache parameter
|
7558 |
-
ifModifiedKey = s.url;
|
7559 |
-
|
7560 |
-
// Add anti-cache in url if needed
|
7561 |
-
if ( s.cache === false ) {
|
7562 |
-
|
7563 |
-
var ts = jQuery.now(),
|
7564 |
-
// try replacing _= if it is there
|
7565 |
-
ret = s.url.replace( rts, "$1_=" + ts );
|
7566 |
-
|
7567 |
-
// if nothing was replaced, add timestamp to the end
|
7568 |
-
s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
|
7569 |
-
}
|
7570 |
-
}
|
7571 |
-
|
7572 |
-
// Set the correct header, if data is being sent
|
7573 |
-
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
|
7574 |
-
jqXHR.setRequestHeader( "Content-Type", s.contentType );
|
7575 |
-
}
|
7576 |
-
|
7577 |
-
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
7578 |
-
if ( s.ifModified ) {
|
7579 |
-
ifModifiedKey = ifModifiedKey || s.url;
|
7580 |
-
if ( jQuery.lastModified[ ifModifiedKey ] ) {
|
7581 |
-
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
|
7582 |
-
}
|
7583 |
-
if ( jQuery.etag[ ifModifiedKey ] ) {
|
7584 |
-
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
|
7585 |
-
}
|
7586 |
-
}
|
7587 |
-
|
7588 |
-
// Set the Accepts header for the server, depending on the dataType
|
7589 |
-
jqXHR.setRequestHeader(
|
7590 |
-
"Accept",
|
7591 |
-
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
|
7592 |
-
s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
|
7593 |
-
s.accepts[ "*" ]
|
7594 |
-
);
|
7595 |
-
|
7596 |
-
// Check for headers option
|
7597 |
-
for ( i in s.headers ) {
|
7598 |
-
jqXHR.setRequestHeader( i, s.headers[ i ] );
|
7599 |
-
}
|
7600 |
-
|
7601 |
-
// Allow custom headers/mimetypes and early abort
|
7602 |
-
if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
|
7603 |
-
// Abort if not done already
|
7604 |
-
jqXHR.abort();
|
7605 |
-
return false;
|
7606 |
-
|
7607 |
-
}
|
7608 |
-
|
7609 |
-
// Install callbacks on deferreds
|
7610 |
-
for ( i in { success: 1, error: 1, complete: 1 } ) {
|
7611 |
-
jqXHR[ i ]( s[ i ] );
|
7612 |
-
}
|
7613 |
-
|
7614 |
-
// Get transport
|
7615 |
-
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
|
7616 |
-
|
7617 |
-
// If no transport, we auto-abort
|
7618 |
-
if ( !transport ) {
|
7619 |
-
done( -1, "No Transport" );
|
7620 |
-
} else {
|
7621 |
-
jqXHR.readyState = 1;
|
7622 |
-
// Send global event
|
7623 |
-
if ( fireGlobals ) {
|
7624 |
-
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
|
7625 |
-
}
|
7626 |
-
// Timeout
|
7627 |
-
if ( s.async && s.timeout > 0 ) {
|
7628 |
-
timeoutTimer = setTimeout( function(){
|
7629 |
-
jqXHR.abort( "timeout" );
|
7630 |
-
}, s.timeout );
|
7631 |
-
}
|
7632 |
-
|
7633 |
-
try {
|
7634 |
-
state = 1;
|
7635 |
-
transport.send( requestHeaders, done );
|
7636 |
-
} catch (e) {
|
7637 |
-
// Propagate exception as error if not done
|
7638 |
-
if ( state < 2 ) {
|
7639 |
-
done( -1, e );
|
7640 |
-
// Simply rethrow otherwise
|
7641 |
-
} else {
|
7642 |
-
jQuery.error( e );
|
7643 |
-
}
|
7644 |
-
}
|
7645 |
-
}
|
7646 |
-
|
7647 |
-
return jqXHR;
|
7648 |
-
},
|
7649 |
-
|
7650 |
-
// Serialize an array of form elements or a set of
|
7651 |
-
// key/values into a query string
|
7652 |
-
param: function( a, traditional ) {
|
7653 |
-
var s = [],
|
7654 |
-
add = function( key, value ) {
|
7655 |
-
// If value is a function, invoke it and return its value
|
7656 |
-
value = jQuery.isFunction( value ) ? value() : value;
|
7657 |
-
s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
|
7658 |
-
};
|
7659 |
-
|
7660 |
-
// Set traditional to true for jQuery <= 1.3.2 behavior.
|
7661 |
-
if ( traditional === undefined ) {
|
7662 |
-
traditional = jQuery.ajaxSettings.traditional;
|
7663 |
-
}
|
7664 |
-
|
7665 |
-
// If an array was passed in, assume that it is an array of form elements.
|
7666 |
-
if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
|
7667 |
-
// Serialize the form elements
|
7668 |
-
jQuery.each( a, function() {
|
7669 |
-
add( this.name, this.value );
|
7670 |
-
});
|
7671 |
-
|
7672 |
-
} else {
|
7673 |
-
// If traditional, encode the "old" way (the way 1.3.2 or older
|
7674 |
-
// did it), otherwise encode params recursively.
|
7675 |
-
for ( var prefix in a ) {
|
7676 |
-
buildParams( prefix, a[ prefix ], traditional, add );
|
7677 |
-
}
|
7678 |
-
}
|
7679 |
-
|
7680 |
-
// Return the resulting serialization
|
7681 |
-
return s.join( "&" ).replace( r20, "+" );
|
7682 |
-
}
|
7683 |
-
});
|
7684 |
-
|
7685 |
-
function buildParams( prefix, obj, traditional, add ) {
|
7686 |
-
if ( jQuery.isArray( obj ) ) {
|
7687 |
-
// Serialize array item.
|
7688 |
-
jQuery.each( obj, function( i, v ) {
|
7689 |
-
if ( traditional || rbracket.test( prefix ) ) {
|
7690 |
-
// Treat each array item as a scalar.
|
7691 |
-
add( prefix, v );
|
7692 |
-
|
7693 |
-
} else {
|
7694 |
-
// If array item is non-scalar (array or object), encode its
|
7695 |
-
// numeric index to resolve deserialization ambiguity issues.
|
7696 |
-
// Note that rack (as of 1.0.0) can't currently deserialize
|
7697 |
-
// nested arrays properly, and attempting to do so may cause
|
7698 |
-
// a server error. Possible fixes are to modify rack's
|
7699 |
-
// deserialization algorithm or to provide an option or flag
|
7700 |
-
// to force array serialization to be shallow.
|
7701 |
-
buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
|
7702 |
-
}
|
7703 |
-
});
|
7704 |
-
|
7705 |
-
} else if ( !traditional && obj != null && typeof obj === "object" ) {
|
7706 |
-
// Serialize object item.
|
7707 |
-
for ( var name in obj ) {
|
7708 |
-
buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
|
7709 |
-
}
|
7710 |
-
|
7711 |
-
} else {
|
7712 |
-
// Serialize scalar item.
|
7713 |
-
add( prefix, obj );
|
7714 |
-
}
|
7715 |
-
}
|
7716 |
-
|
7717 |
-
// This is still on the jQuery object... for now
|
7718 |
-
// Want to move this to jQuery.ajax some day
|
7719 |
-
jQuery.extend({
|
7720 |
-
|
7721 |
-
// Counter for holding the number of active queries
|
7722 |
-
active: 0,
|
7723 |
-
|
7724 |
-
// Last-Modified header cache for next request
|
7725 |
-
lastModified: {},
|
7726 |
-
etag: {}
|
7727 |
-
|
7728 |
-
});
|
7729 |
-
|
7730 |
-
/* Handles responses to an ajax request:
|
7731 |
-
* - sets all responseXXX fields accordingly
|
7732 |
-
* - finds the right dataType (mediates between content-type and expected dataType)
|
7733 |
-
* - returns the corresponding response
|
7734 |
-
*/
|
7735 |
-
function ajaxHandleResponses( s, jqXHR, responses ) {
|
7736 |
-
|
7737 |
-
var contents = s.contents,
|
7738 |
-
dataTypes = s.dataTypes,
|
7739 |
-
responseFields = s.responseFields,
|
7740 |
-
ct,
|
7741 |
-
type,
|
7742 |
-
finalDataType,
|
7743 |
-
firstDataType;
|
7744 |
-
|
7745 |
-
// Fill responseXXX fields
|
7746 |
-
for ( type in responseFields ) {
|
7747 |
-
if ( type in responses ) {
|
7748 |
-
jqXHR[ responseFields[type] ] = responses[ type ];
|
7749 |
-
}
|
7750 |
-
}
|
7751 |
-
|
7752 |
-
// Remove auto dataType and get content-type in the process
|
7753 |
-
while( dataTypes[ 0 ] === "*" ) {
|
7754 |
-
dataTypes.shift();
|
7755 |
-
if ( ct === undefined ) {
|
7756 |
-
ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
|
7757 |
-
}
|
7758 |
-
}
|
7759 |
-
|
7760 |
-
// Check if we're dealing with a known content-type
|
7761 |
-
if ( ct ) {
|
7762 |
-
for ( type in contents ) {
|
7763 |
-
if ( contents[ type ] && contents[ type ].test( ct ) ) {
|
7764 |
-
dataTypes.unshift( type );
|
7765 |
-
break;
|
7766 |
-
}
|
7767 |
-
}
|
7768 |
-
}
|
7769 |
-
|
7770 |
-
// Check to see if we have a response for the expected dataType
|
7771 |
-
if ( dataTypes[ 0 ] in responses ) {
|
7772 |
-
finalDataType = dataTypes[ 0 ];
|
7773 |
-
} else {
|
7774 |
-
// Try convertible dataTypes
|
7775 |
-
for ( type in responses ) {
|
7776 |
-
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
|
7777 |
-
finalDataType = type;
|
7778 |
-
break;
|
7779 |
-
}
|
7780 |
-
if ( !firstDataType ) {
|
7781 |
-
firstDataType = type;
|
7782 |
-
}
|
7783 |
-
}
|
7784 |
-
// Or just use first one
|
7785 |
-
finalDataType = finalDataType || firstDataType;
|
7786 |
-
}
|
7787 |
-
|
7788 |
-
// If we found a dataType
|
7789 |
-
// We add the dataType to the list if needed
|
7790 |
-
// and return the corresponding response
|
7791 |
-
if ( finalDataType ) {
|
7792 |
-
if ( finalDataType !== dataTypes[ 0 ] ) {
|
7793 |
-
dataTypes.unshift( finalDataType );
|
7794 |
-
}
|
7795 |
-
return responses[ finalDataType ];
|
7796 |
-
}
|
7797 |
-
}
|
7798 |
-
|
7799 |
-
// Chain conversions given the request and the original response
|
7800 |
-
function ajaxConvert( s, response ) {
|
7801 |
-
|
7802 |
-
// Apply the dataFilter if provided
|
7803 |
-
if ( s.dataFilter ) {
|
7804 |
-
response = s.dataFilter( response, s.dataType );
|
7805 |
-
}
|
7806 |
-
|
7807 |
-
var dataTypes = s.dataTypes,
|
7808 |
-
converters = {},
|
7809 |
-
i,
|
7810 |
-
key,
|
7811 |
-
length = dataTypes.length,
|
7812 |
-
tmp,
|
7813 |
-
// Current and previous dataTypes
|
7814 |
-
current = dataTypes[ 0 ],
|
7815 |
-
prev,
|
7816 |
-
// Conversion expression
|
7817 |
-
conversion,
|
7818 |
-
// Conversion function
|
7819 |
-
conv,
|
7820 |
-
// Conversion functions (transitive conversion)
|
7821 |
-
conv1,
|
7822 |
-
conv2;
|
7823 |
-
|
7824 |
-
// For each dataType in the chain
|
7825 |
-
for ( i = 1; i < length; i++ ) {
|
7826 |
-
|
7827 |
-
// Create converters map
|
7828 |
-
// with lowercased keys
|
7829 |
-
if ( i === 1 ) {
|
7830 |
-
for ( key in s.converters ) {
|
7831 |
-
if ( typeof key === "string" ) {
|
7832 |
-
converters[ key.toLowerCase() ] = s.converters[ key ];
|
7833 |
-
}
|
7834 |
-
}
|
7835 |
-
}
|
7836 |
-
|
7837 |
-
// Get the dataTypes
|
7838 |
-
prev = current;
|
7839 |
-
current = dataTypes[ i ];
|
7840 |
-
|
7841 |
-
// If current is auto dataType, update it to prev
|
7842 |
-
if ( current === "*" ) {
|
7843 |
-
current = prev;
|
7844 |
-
// If no auto and dataTypes are actually different
|
7845 |
-
} else if ( prev !== "*" && prev !== current ) {
|
7846 |
-
|
7847 |
-
// Get the converter
|
7848 |
-
conversion = prev + " " + current;
|
7849 |
-
conv = converters[ conversion ] || converters[ "* " + current ];
|
7850 |
-
|
7851 |
-
// If there is no direct converter, search transitively
|
7852 |
-
if ( !conv ) {
|
7853 |
-
conv2 = undefined;
|
7854 |
-
for ( conv1 in converters ) {
|
7855 |
-
tmp = conv1.split( " " );
|
7856 |
-
if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
|
7857 |
-
conv2 = converters[ tmp[1] + " " + current ];
|
7858 |
-
if ( conv2 ) {
|
7859 |
-
conv1 = converters[ conv1 ];
|
7860 |
-
if ( conv1 === true ) {
|
7861 |
-
conv = conv2;
|
7862 |
-
} else if ( conv2 === true ) {
|
7863 |
-
conv = conv1;
|
7864 |
-
}
|
7865 |
-
break;
|
7866 |
-
}
|
7867 |
-
}
|
7868 |
-
}
|
7869 |
-
}
|
7870 |
-
// If we found no converter, dispatch an error
|
7871 |
-
if ( !( conv || conv2 ) ) {
|
7872 |
-
jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
|
7873 |
-
}
|
7874 |
-
// If found converter is not an equivalence
|
7875 |
-
if ( conv !== true ) {
|
7876 |
-
// Convert with 1 or 2 converters accordingly
|
7877 |
-
response = conv ? conv( response ) : conv2( conv1(response) );
|
7878 |
-
}
|
7879 |
-
}
|
7880 |
-
}
|
7881 |
-
return response;
|
7882 |
-
}
|
7883 |
-
|
7884 |
-
|
7885 |
-
|
7886 |
-
|
7887 |
-
var jsc = jQuery.now(),
|
7888 |
-
jsre = /(\=)\?(&|$)|\?\?/i;
|
7889 |
-
|
7890 |
-
// Default jsonp settings
|
7891 |
-
jQuery.ajaxSetup({
|
7892 |
-
jsonp: "callback",
|
7893 |
-
jsonpCallback: function() {
|
7894 |
-
return jQuery.expando + "_" + ( jsc++ );
|
7895 |
-
}
|
7896 |
-
});
|
7897 |
-
|
7898 |
-
// Detect, normalize options and install callbacks for jsonp requests
|
7899 |
-
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
7900 |
-
|
7901 |
-
var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
|
7902 |
-
( typeof s.data === "string" );
|
7903 |
-
|
7904 |
-
if ( s.dataTypes[ 0 ] === "jsonp" ||
|
7905 |
-
s.jsonp !== false && ( jsre.test( s.url ) ||
|
7906 |
-
inspectData && jsre.test( s.data ) ) ) {
|
7907 |
-
|
7908 |
-
var responseContainer,
|
7909 |
-
jsonpCallback = s.jsonpCallback =
|
7910 |
-
jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
|
7911 |
-
previous = window[ jsonpCallback ],
|
7912 |
-
url = s.url,
|
7913 |
-
data = s.data,
|
7914 |
-
replace = "$1" + jsonpCallback + "$2";
|
7915 |
-
|
7916 |
-
if ( s.jsonp !== false ) {
|
7917 |
-
url = url.replace( jsre, replace );
|
7918 |
-
if ( s.url === url ) {
|
7919 |
-
if ( inspectData ) {
|
7920 |
-
data = data.replace( jsre, replace );
|
7921 |
-
}
|
7922 |
-
if ( s.data === data ) {
|
7923 |
-
// Add callback manually
|
7924 |
-
url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
|
7925 |
-
}
|
7926 |
-
}
|
7927 |
-
}
|
7928 |
-
|
7929 |
-
s.url = url;
|
7930 |
-
s.data = data;
|
7931 |
-
|
7932 |
-
// Install callback
|
7933 |
-
window[ jsonpCallback ] = function( response ) {
|
7934 |
-
responseContainer = [ response ];
|
7935 |
-
};
|
7936 |
-
|
7937 |
-
// Clean-up function
|
7938 |
-
jqXHR.always(function() {
|
7939 |
-
// Set callback back to previous value
|
7940 |
-
window[ jsonpCallback ] = previous;
|
7941 |
-
// Call if it was a function and we have a response
|
7942 |
-
if ( responseContainer && jQuery.isFunction( previous ) ) {
|
7943 |
-
window[ jsonpCallback ]( responseContainer[ 0 ] );
|
7944 |
-
}
|
7945 |
-
});
|
7946 |
-
|
7947 |
-
// Use data converter to retrieve json after script execution
|
7948 |
-
s.converters["script json"] = function() {
|
7949 |
-
if ( !responseContainer ) {
|
7950 |
-
jQuery.error( jsonpCallback + " was not called" );
|
7951 |
-
}
|
7952 |
-
return responseContainer[ 0 ];
|
7953 |
-
};
|
7954 |
-
|
7955 |
-
// force json dataType
|
7956 |
-
s.dataTypes[ 0 ] = "json";
|
7957 |
-
|
7958 |
-
// Delegate to script
|
7959 |
-
return "script";
|
7960 |
-
}
|
7961 |
-
});
|
7962 |
-
|
7963 |
-
|
7964 |
-
|
7965 |
-
|
7966 |
-
// Install script dataType
|
7967 |
-
jQuery.ajaxSetup({
|
7968 |
-
accepts: {
|
7969 |
-
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
|
7970 |
-
},
|
7971 |
-
contents: {
|
7972 |
-
script: /javascript|ecmascript/
|
7973 |
-
},
|
7974 |
-
converters: {
|
7975 |
-
"text script": function( text ) {
|
7976 |
-
jQuery.globalEval( text );
|
7977 |
-
return text;
|
7978 |
-
}
|
7979 |
-
}
|
7980 |
-
});
|
7981 |
-
|
7982 |
-
// Handle cache's special case and global
|
7983 |
-
jQuery.ajaxPrefilter( "script", function( s ) {
|
7984 |
-
if ( s.cache === undefined ) {
|
7985 |
-
s.cache = false;
|
7986 |
-
}
|
7987 |
-
if ( s.crossDomain ) {
|
7988 |
-
s.type = "GET";
|
7989 |
-
s.global = false;
|
7990 |
-
}
|
7991 |
-
});
|
7992 |
-
|
7993 |
-
// Bind script tag hack transport
|
7994 |
-
jQuery.ajaxTransport( "script", function(s) {
|
7995 |
-
|
7996 |
-
// This transport only deals with cross domain requests
|
7997 |
-
if ( s.crossDomain ) {
|
7998 |
-
|
7999 |
-
var script,
|
8000 |
-
head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
|
8001 |
-
|
8002 |
-
return {
|
8003 |
-
|
8004 |
-
send: function( _, callback ) {
|
8005 |
-
|
8006 |
-
script = document.createElement( "script" );
|
8007 |
-
|
8008 |
-
script.async = "async";
|
8009 |
-
|
8010 |
-
if ( s.scriptCharset ) {
|
8011 |
-
script.charset = s.scriptCharset;
|
8012 |
-
}
|
8013 |
-
|
8014 |
-
script.src = s.url;
|
8015 |
-
|
8016 |
-
// Attach handlers for all browsers
|
8017 |
-
script.onload = script.onreadystatechange = function( _, isAbort ) {
|
8018 |
-
|
8019 |
-
if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
|
8020 |
-
|
8021 |
-
// Handle memory leak in IE
|
8022 |
-
script.onload = script.onreadystatechange = null;
|
8023 |
-
|
8024 |
-
// Remove the script
|
8025 |
-
if ( head && script.parentNode ) {
|
8026 |
-
head.removeChild( script );
|
8027 |
-
}
|
8028 |
-
|
8029 |
-
// Dereference the script
|
8030 |
-
script = undefined;
|
8031 |
-
|
8032 |
-
// Callback if not abort
|
8033 |
-
if ( !isAbort ) {
|
8034 |
-
callback( 200, "success" );
|
8035 |
-
}
|
8036 |
-
}
|
8037 |
-
};
|
8038 |
-
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
|
8039 |
-
// This arises when a base node is used (#2709 and #4378).
|
8040 |
-
head.insertBefore( script, head.firstChild );
|
8041 |
-
},
|
8042 |
-
|
8043 |
-
abort: function() {
|
8044 |
-
if ( script ) {
|
8045 |
-
script.onload( 0, 1 );
|
8046 |
-
}
|
8047 |
-
}
|
8048 |
-
};
|
8049 |
-
}
|
8050 |
-
});
|
8051 |
-
|
8052 |
-
|
8053 |
-
|
8054 |
-
|
8055 |
-
var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
|
8056 |
-
xhrOnUnloadAbort = window.ActiveXObject ? function() {
|
8057 |
-
// Abort all pending requests
|
8058 |
-
for ( var key in xhrCallbacks ) {
|
8059 |
-
xhrCallbacks[ key ]( 0, 1 );
|
8060 |
-
}
|
8061 |
-
} : false,
|
8062 |
-
xhrId = 0,
|
8063 |
-
xhrCallbacks;
|
8064 |
-
|
8065 |
-
// Functions to create xhrs
|
8066 |
-
function createStandardXHR() {
|
8067 |
-
try {
|
8068 |
-
return new window.XMLHttpRequest();
|
8069 |
-
} catch( e ) {}
|
8070 |
-
}
|
8071 |
-
|
8072 |
-
function createActiveXHR() {
|
8073 |
-
try {
|
8074 |
-
return new window.ActiveXObject( "Microsoft.XMLHTTP" );
|
8075 |
-
} catch( e ) {}
|
8076 |
-
}
|
8077 |
-
|
8078 |
-
// Create the request object
|
8079 |
-
// (This is still attached to ajaxSettings for backward compatibility)
|
8080 |
-
jQuery.ajaxSettings.xhr = window.ActiveXObject ?
|
8081 |
-
/* Microsoft failed to properly
|
8082 |
-
* implement the XMLHttpRequest in IE7 (can't request local files),
|
8083 |
-
* so we use the ActiveXObject when it is available
|
8084 |
-
* Additionally XMLHttpRequest can be disabled in IE7/IE8 so
|
8085 |
-
* we need a fallback.
|
8086 |
-
*/
|
8087 |
-
function() {
|
8088 |
-
return !this.isLocal && createStandardXHR() || createActiveXHR();
|
8089 |
-
} :
|
8090 |
-
// For all other browsers, use the standard XMLHttpRequest object
|
8091 |
-
createStandardXHR;
|
8092 |
-
|
8093 |
-
// Determine support properties
|
8094 |
-
(function( xhr ) {
|
8095 |
-
jQuery.extend( jQuery.support, {
|
8096 |
-
ajax: !!xhr,
|
8097 |
-
cors: !!xhr && ( "withCredentials" in xhr )
|
8098 |
-
});
|
8099 |
-
})( jQuery.ajaxSettings.xhr() );
|
8100 |
-
|
8101 |
-
// Create transport if the browser can provide an xhr
|
8102 |
-
if ( jQuery.support.ajax ) {
|
8103 |
-
|
8104 |
-
jQuery.ajaxTransport(function( s ) {
|
8105 |
-
// Cross domain only allowed if supported through XMLHttpRequest
|
8106 |
-
if ( !s.crossDomain || jQuery.support.cors ) {
|
8107 |
-
|
8108 |
-
var callback;
|
8109 |
-
|
8110 |
-
return {
|
8111 |
-
send: function( headers, complete ) {
|
8112 |
-
|
8113 |
-
// Get a new xhr
|
8114 |
-
var xhr = s.xhr(),
|
8115 |
-
handle,
|
8116 |
-
i;
|
8117 |
-
|
8118 |
-
// Open the socket
|
8119 |
-
// Passing null username, generates a login popup on Opera (#2865)
|
8120 |
-
if ( s.username ) {
|
8121 |
-
xhr.open( s.type, s.url, s.async, s.username, s.password );
|
8122 |
-
} else {
|
8123 |
-
xhr.open( s.type, s.url, s.async );
|
8124 |
-
}
|
8125 |
-
|
8126 |
-
// Apply custom fields if provided
|
8127 |
-
if ( s.xhrFields ) {
|
8128 |
-
for ( i in s.xhrFields ) {
|
8129 |
-
xhr[ i ] = s.xhrFields[ i ];
|
8130 |
-
}
|
8131 |
-
}
|
8132 |
-
|
8133 |
-
// Override mime type if needed
|
8134 |
-
if ( s.mimeType && xhr.overrideMimeType ) {
|
8135 |
-
xhr.overrideMimeType( s.mimeType );
|
8136 |
-
}
|
8137 |
-
|
8138 |
-
// X-Requested-With header
|
8139 |
-
// For cross-domain requests, seeing as conditions for a preflight are
|
8140 |
-
// akin to a jigsaw puzzle, we simply never set it to be sure.
|
8141 |
-
// (it can always be set on a per-request basis or even using ajaxSetup)
|
8142 |
-
// For same-domain requests, won't change header if already provided.
|
8143 |
-
if ( !s.crossDomain && !headers["X-Requested-With"] ) {
|
8144 |
-
headers[ "X-Requested-With" ] = "XMLHttpRequest";
|
8145 |
-
}
|
8146 |
-
|
8147 |
-
// Need an extra try/catch for cross domain requests in Firefox 3
|
8148 |
-
try {
|
8149 |
-
for ( i in headers ) {
|
8150 |
-
xhr.setRequestHeader( i, headers[ i ] );
|
8151 |
-
}
|
8152 |
-
} catch( _ ) {}
|
8153 |
-
|
8154 |
-
// Do send the request
|
8155 |
-
// This may raise an exception which is actually
|
8156 |
-
// handled in jQuery.ajax (so no try/catch here)
|
8157 |
-
xhr.send( ( s.hasContent && s.data ) || null );
|
8158 |
-
|
8159 |
-
// Listener
|
8160 |
-
callback = function( _, isAbort ) {
|
8161 |
-
|
8162 |
-
var status,
|
8163 |
-
statusText,
|
8164 |
-
responseHeaders,
|
8165 |
-
responses,
|
8166 |
-
xml;
|
8167 |
-
|
8168 |
-
// Firefox throws exceptions when accessing properties
|
8169 |
-
// of an xhr when a network error occured
|
8170 |
-
// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
|
8171 |
-
try {
|
8172 |
-
|
8173 |
-
// Was never called and is aborted or complete
|
8174 |
-
if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
|
8175 |
-
|
8176 |
-
// Only called once
|
8177 |
-
callback = undefined;
|
8178 |
-
|
8179 |
-
// Do not keep as active anymore
|
8180 |
-
if ( handle ) {
|
8181 |
-
xhr.onreadystatechange = jQuery.noop;
|
8182 |
-
if ( xhrOnUnloadAbort ) {
|
8183 |
-
delete xhrCallbacks[ handle ];
|
8184 |
-
}
|
8185 |
-
}
|
8186 |
-
|
8187 |
-
// If it's an abort
|
8188 |
-
if ( isAbort ) {
|
8189 |
-
// Abort it manually if needed
|
8190 |
-
if ( xhr.readyState !== 4 ) {
|
8191 |
-
xhr.abort();
|
8192 |
-
}
|
8193 |
-
} else {
|
8194 |
-
status = xhr.status;
|
8195 |
-
responseHeaders = xhr.getAllResponseHeaders();
|
8196 |
-
responses = {};
|
8197 |
-
xml = xhr.responseXML;
|
8198 |
-
|
8199 |
-
// Construct response list
|
8200 |
-
if ( xml && xml.documentElement /* #4958 */ ) {
|
8201 |
-
responses.xml = xml;
|
8202 |
-
}
|
8203 |
-
responses.text = xhr.responseText;
|
8204 |
-
|
8205 |
-
// Firefox throws an exception when accessing
|
8206 |
-
// statusText for faulty cross-domain requests
|
8207 |
-
try {
|
8208 |
-
statusText = xhr.statusText;
|
8209 |
-
} catch( e ) {
|
8210 |
-
// We normalize with Webkit giving an empty statusText
|
8211 |
-
statusText = "";
|
8212 |
-
}
|
8213 |
-
|
8214 |
-
// Filter status for non standard behaviors
|
8215 |
-
|
8216 |
-
// If the request is local and we have data: assume a success
|
8217 |
-
// (success with no data won't get notified, that's the best we
|
8218 |
-
// can do given current implementations)
|
8219 |
-
if ( !status && s.isLocal && !s.crossDomain ) {
|
8220 |
-
status = responses.text ? 200 : 404;
|
8221 |
-
// IE - #1450: sometimes returns 1223 when it should be 204
|
8222 |
-
} else if ( status === 1223 ) {
|
8223 |
-
status = 204;
|
8224 |
-
}
|
8225 |
-
}
|
8226 |
-
}
|
8227 |
-
} catch( firefoxAccessException ) {
|
8228 |
-
if ( !isAbort ) {
|
8229 |
-
complete( -1, firefoxAccessException );
|
8230 |
-
}
|
8231 |
-
}
|
8232 |
-
|
8233 |
-
// Call complete if needed
|
8234 |
-
if ( responses ) {
|
8235 |
-
complete( status, statusText, responses, responseHeaders );
|
8236 |
-
}
|
8237 |
-
};
|
8238 |
-
|
8239 |
-
// if we're in sync mode or it's in cache
|
8240 |
-
// and has been retrieved directly (IE6 & IE7)
|
8241 |
-
// we need to manually fire the callback
|
8242 |
-
if ( !s.async || xhr.readyState === 4 ) {
|
8243 |
-
callback();
|
8244 |
-
} else {
|
8245 |
-
handle = ++xhrId;
|
8246 |
-
if ( xhrOnUnloadAbort ) {
|
8247 |
-
// Create the active xhrs callbacks list if needed
|
8248 |
-
// and attach the unload handler
|
8249 |
-
if ( !xhrCallbacks ) {
|
8250 |
-
xhrCallbacks = {};
|
8251 |
-
jQuery( window ).unload( xhrOnUnloadAbort );
|
8252 |
-
}
|
8253 |
-
// Add to list of active xhrs callbacks
|
8254 |
-
xhrCallbacks[ handle ] = callback;
|
8255 |
-
}
|
8256 |
-
xhr.onreadystatechange = callback;
|
8257 |
-
}
|
8258 |
-
},
|
8259 |
-
|
8260 |
-
abort: function() {
|
8261 |
-
if ( callback ) {
|
8262 |
-
callback(0,1);
|
8263 |
-
}
|
8264 |
-
}
|
8265 |
-
};
|
8266 |
-
}
|
8267 |
-
});
|
8268 |
-
}
|
8269 |
-
|
8270 |
-
|
8271 |
-
|
8272 |
-
|
8273 |
-
var elemdisplay = {},
|
8274 |
-
iframe, iframeDoc,
|
8275 |
-
rfxtypes = /^(?:toggle|show|hide)$/,
|
8276 |
-
rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
|
8277 |
-
timerId,
|
8278 |
-
fxAttrs = [
|
8279 |
-
// height animations
|
8280 |
-
[ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
|
8281 |
-
// width animations
|
8282 |
-
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
|
8283 |
-
// opacity animations
|
8284 |
-
[ "opacity" ]
|
8285 |
-
],
|
8286 |
-
fxNow;
|
8287 |
-
|
8288 |
-
jQuery.fn.extend({
|
8289 |
-
show: function( speed, easing, callback ) {
|
8290 |
-
var elem, display;
|
8291 |
-
|
8292 |
-
if ( speed || speed === 0 ) {
|
8293 |
-
return this.animate( genFx("show", 3), speed, easing, callback );
|
8294 |
-
|
8295 |
-
} else {
|
8296 |
-
for ( var i = 0, j = this.length; i < j; i++ ) {
|
8297 |
-
elem = this[ i ];
|
8298 |
-
|
8299 |
-
if ( elem.style ) {
|
8300 |
-
display = elem.style.display;
|
8301 |
-
|
8302 |
-
// Reset the inline display of this element to learn if it is
|
8303 |
-
// being hidden by cascaded rules or not
|
8304 |
-
if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
|
8305 |
-
display = elem.style.display = "";
|
8306 |
-
}
|
8307 |
-
|
8308 |
-
// Set elements which have been overridden with display: none
|
8309 |
-
// in a stylesheet to whatever the default browser style is
|
8310 |
-
// for such an element
|
8311 |
-
if ( display === "" && jQuery.css(elem, "display") === "none" ) {
|
8312 |
-
jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
|
8313 |
-
}
|
8314 |
-
}
|
8315 |
-
}
|
8316 |
-
|
8317 |
-
// Set the display of most of the elements in a second loop
|
8318 |
-
// to avoid the constant reflow
|
8319 |
-
for ( i = 0; i < j; i++ ) {
|
8320 |
-
elem = this[ i ];
|
8321 |
-
|
8322 |
-
if ( elem.style ) {
|
8323 |
-
display = elem.style.display;
|
8324 |
-
|
8325 |
-
if ( display === "" || display === "none" ) {
|
8326 |
-
elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
|
8327 |
-
}
|
8328 |
-
}
|
8329 |
-
}
|
8330 |
-
|
8331 |
-
return this;
|
8332 |
-
}
|
8333 |
-
},
|
8334 |
-
|
8335 |
-
hide: function( speed, easing, callback ) {
|
8336 |
-
if ( speed || speed === 0 ) {
|
8337 |
-
return this.animate( genFx("hide", 3), speed, easing, callback);
|
8338 |
-
|
8339 |
-
} else {
|
8340 |
-
var elem, display,
|
8341 |
-
i = 0,
|
8342 |
-
j = this.length;
|
8343 |
-
|
8344 |
-
for ( ; i < j; i++ ) {
|
8345 |
-
elem = this[i];
|
8346 |
-
if ( elem.style ) {
|
8347 |
-
display = jQuery.css( elem, "display" );
|
8348 |
-
|
8349 |
-
if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
|
8350 |
-
jQuery._data( elem, "olddisplay", display );
|
8351 |
-
}
|
8352 |
-
}
|
8353 |
-
}
|
8354 |
-
|
8355 |
-
// Set the display of the elements in a second loop
|
8356 |
-
// to avoid the constant reflow
|
8357 |
-
for ( i = 0; i < j; i++ ) {
|
8358 |
-
if ( this[i].style ) {
|
8359 |
-
this[i].style.display = "none";
|
8360 |
-
}
|
8361 |
-
}
|
8362 |
-
|
8363 |
-
return this;
|
8364 |
-
}
|
8365 |
-
},
|
8366 |
-
|
8367 |
-
// Save the old toggle function
|
8368 |
-
_toggle: jQuery.fn.toggle,
|
8369 |
-
|
8370 |
-
toggle: function( fn, fn2, callback ) {
|
8371 |
-
var bool = typeof fn === "boolean";
|
8372 |
-
|
8373 |
-
if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
|
8374 |
-
this._toggle.apply( this, arguments );
|
8375 |
-
|
8376 |
-
} else if ( fn == null || bool ) {
|
8377 |
-
this.each(function() {
|
8378 |
-
var state = bool ? fn : jQuery(this).is(":hidden");
|
8379 |
-
jQuery(this)[ state ? "show" : "hide" ]();
|
8380 |
-
});
|
8381 |
-
|
8382 |
-
} else {
|
8383 |
-
this.animate(genFx("toggle", 3), fn, fn2, callback);
|
8384 |
-
}
|
8385 |
-
|
8386 |
-
return this;
|
8387 |
-
},
|
8388 |
-
|
8389 |
-
fadeTo: function( speed, to, easing, callback ) {
|
8390 |
-
return this.filter(":hidden").css("opacity", 0).show().end()
|
8391 |
-
.animate({opacity: to}, speed, easing, callback);
|
8392 |
-
},
|
8393 |
-
|
8394 |
-
animate: function( prop, speed, easing, callback ) {
|
8395 |
-
var optall = jQuery.speed( speed, easing, callback );
|
8396 |
-
|
8397 |
-
if ( jQuery.isEmptyObject( prop ) ) {
|
8398 |
-
return this.each( optall.complete, [ false ] );
|
8399 |
-
}
|
8400 |
-
|
8401 |
-
// Do not change referenced properties as per-property easing will be lost
|
8402 |
-
prop = jQuery.extend( {}, prop );
|
8403 |
-
|
8404 |
-
function doAnimation() {
|
8405 |
-
// XXX 'this' does not always have a nodeName when running the
|
8406 |
-
// test suite
|
8407 |
-
|
8408 |
-
if ( optall.queue === false ) {
|
8409 |
-
jQuery._mark( this );
|
8410 |
-
}
|
8411 |
-
|
8412 |
-
var opt = jQuery.extend( {}, optall ),
|
8413 |
-
isElement = this.nodeType === 1,
|
8414 |
-
hidden = isElement && jQuery(this).is(":hidden"),
|
8415 |
-
name, val, p, e,
|
8416 |
-
parts, start, end, unit,
|
8417 |
-
method;
|
8418 |
-
|
8419 |
-
// will store per property easing and be used to determine when an animation is complete
|
8420 |
-
opt.animatedProperties = {};
|
8421 |
-
|
8422 |
-
for ( p in prop ) {
|
8423 |
-
|
8424 |
-
// property name normalization
|
8425 |
-
name = jQuery.camelCase( p );
|
8426 |
-
if ( p !== name ) {
|
8427 |
-
prop[ name ] = prop[ p ];
|
8428 |
-
delete prop[ p ];
|
8429 |
-
}
|
8430 |
-
|
8431 |
-
val = prop[ name ];
|
8432 |
-
|
8433 |
-
// easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
|
8434 |
-
if ( jQuery.isArray( val ) ) {
|
8435 |
-
opt.animatedProperties[ name ] = val[ 1 ];
|
8436 |
-
val = prop[ name ] = val[ 0 ];
|
8437 |
-
} else {
|
8438 |
-
opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
|
8439 |
-
}
|
8440 |
-
|
8441 |
-
if ( val === "hide" && hidden || val === "show" && !hidden ) {
|
8442 |
-
return opt.complete.call( this );
|
8443 |
-
}
|
8444 |
-
|
8445 |
-
if ( isElement && ( name === "height" || name === "width" ) ) {
|
8446 |
-
// Make sure that nothing sneaks out
|
8447 |
-
// Record all 3 overflow attributes because IE does not
|
8448 |
-
// change the overflow attribute when overflowX and
|
8449 |
-
// overflowY are set to the same value
|
8450 |
-
opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
|
8451 |
-
|
8452 |
-
// Set display property to inline-block for height/width
|
8453 |
-
// animations on inline elements that are having width/height animated
|
8454 |
-
if ( jQuery.css( this, "display" ) === "inline" &&
|
8455 |
-
jQuery.css( this, "float" ) === "none" ) {
|
8456 |
-
|
8457 |
-
// inline-level elements accept inline-block;
|
8458 |
-
// block-level elements need to be inline with layout
|
8459 |
-
if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
|
8460 |
-
this.style.display = "inline-block";
|
8461 |
-
|
8462 |
-
} else {
|
8463 |
-
this.style.zoom = 1;
|
8464 |
-
}
|
8465 |
-
}
|
8466 |
-
}
|
8467 |
-
}
|
8468 |
-
|
8469 |
-
if ( opt.overflow != null ) {
|
8470 |
-
this.style.overflow = "hidden";
|
8471 |
-
}
|
8472 |
-
|
8473 |
-
for ( p in prop ) {
|
8474 |
-
e = new jQuery.fx( this, opt, p );
|
8475 |
-
val = prop[ p ];
|
8476 |
-
|
8477 |
-
if ( rfxtypes.test( val ) ) {
|
8478 |
-
|
8479 |
-
// Tracks whether to show or hide based on private
|
8480 |
-
// data attached to the element
|
8481 |
-
method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
|
8482 |
-
if ( method ) {
|
8483 |
-
jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
|
8484 |
-
e[ method ]();
|
8485 |
-
} else {
|
8486 |
-
e[ val ]();
|
8487 |
-
}
|
8488 |
-
|
8489 |
-
} else {
|
8490 |
-
parts = rfxnum.exec( val );
|
8491 |
-
start = e.cur();
|
8492 |
-
|
8493 |
-
if ( parts ) {
|
8494 |
-
end = parseFloat( parts[2] );
|
8495 |
-
unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
|
8496 |
-
|
8497 |
-
// We need to compute starting value
|
8498 |
-
if ( unit !== "px" ) {
|
8499 |
-
jQuery.style( this, p, (end || 1) + unit);
|
8500 |
-
start = ( (end || 1) / e.cur() ) * start;
|
8501 |
-
jQuery.style( this, p, start + unit);
|
8502 |
-
}
|
8503 |
-
|
8504 |
-
// If a +=/-= token was provided, we're doing a relative animation
|
8505 |
-
if ( parts[1] ) {
|
8506 |
-
end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
|
8507 |
-
}
|
8508 |
-
|
8509 |
-
e.custom( start, end, unit );
|
8510 |
-
|
8511 |
-
} else {
|
8512 |
-
e.custom( start, val, "" );
|
8513 |
-
}
|
8514 |
-
}
|
8515 |
-
}
|
8516 |
-
|
8517 |
-
// For JS strict compliance
|
8518 |
-
return true;
|
8519 |
-
}
|
8520 |
-
|
8521 |
-
return optall.queue === false ?
|
8522 |
-
this.each( doAnimation ) :
|
8523 |
-
this.queue( optall.queue, doAnimation );
|
8524 |
-
},
|
8525 |
-
|
8526 |
-
stop: function( type, clearQueue, gotoEnd ) {
|
8527 |
-
if ( typeof type !== "string" ) {
|
8528 |
-
gotoEnd = clearQueue;
|
8529 |
-
clearQueue = type;
|
8530 |
-
type = undefined;
|
8531 |
-
}
|
8532 |
-
if ( clearQueue && type !== false ) {
|
8533 |
-
this.queue( type || "fx", [] );
|
8534 |
-
}
|
8535 |
-
|
8536 |
-
return this.each(function() {
|
8537 |
-
var i,
|
8538 |
-
hadTimers = false,
|
8539 |
-
timers = jQuery.timers,
|
8540 |
-
data = jQuery._data( this );
|
8541 |
-
|
8542 |
-
// clear marker counters if we know they won't be
|
8543 |
-
if ( !gotoEnd ) {
|
8544 |
-
jQuery._unmark( true, this );
|
8545 |
-
}
|
8546 |
-
|
8547 |
-
function stopQueue( elem, data, i ) {
|
8548 |
-
var hooks = data[ i ];
|
8549 |
-
jQuery.removeData( elem, i, true );
|
8550 |
-
hooks.stop( gotoEnd );
|
8551 |
-
}
|
8552 |
-
|
8553 |
-
if ( type == null ) {
|
8554 |
-
for ( i in data ) {
|
8555 |
-
if ( data[ i ].stop && i.indexOf(".run") === i.length - 4 ) {
|
8556 |
-
stopQueue( this, data, i );
|
8557 |
-
}
|
8558 |
-
}
|
8559 |
-
} else if ( data[ i = type + ".run" ] && data[ i ].stop ){
|
8560 |
-
stopQueue( this, data, i );
|
8561 |
-
}
|
8562 |
-
|
8563 |
-
for ( i = timers.length; i--; ) {
|
8564 |
-
if ( timers[ i ].elem === this && (type == null || timers[ i ].queue === type) ) {
|
8565 |
-
if ( gotoEnd ) {
|
8566 |
-
|
8567 |
-
// force the next step to be the last
|
8568 |
-
timers[ i ]( true );
|
8569 |
-
} else {
|
8570 |
-
timers[ i ].saveState();
|
8571 |
-
}
|
8572 |
-
hadTimers = true;
|
8573 |
-
timers.splice( i, 1 );
|
8574 |
-
}
|
8575 |
-
}
|
8576 |
-
|
8577 |
-
// start the next in the queue if the last step wasn't forced
|
8578 |
-
// timers currently will call their complete callbacks, which will dequeue
|
8579 |
-
// but only if they were gotoEnd
|
8580 |
-
if ( !( gotoEnd && hadTimers ) ) {
|
8581 |
-
jQuery.dequeue( this, type );
|
8582 |
-
}
|
8583 |
-
});
|
8584 |
-
}
|
8585 |
-
|
8586 |
-
});
|
8587 |
-
|
8588 |
-
// Animations created synchronously will run synchronously
|
8589 |
-
function createFxNow() {
|
8590 |
-
setTimeout( clearFxNow, 0 );
|
8591 |
-
return ( fxNow = jQuery.now() );
|
8592 |
-
}
|
8593 |
-
|
8594 |
-
function clearFxNow() {
|
8595 |
-
fxNow = undefined;
|
8596 |
-
}
|
8597 |
-
|
8598 |
-
// Generate parameters to create a standard animation
|
8599 |
-
function genFx( type, num ) {
|
8600 |
-
var obj = {};
|
8601 |
-
|
8602 |
-
jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
|
8603 |
-
obj[ this ] = type;
|
8604 |
-
});
|
8605 |
-
|
8606 |
-
return obj;
|
8607 |
-
}
|
8608 |
-
|
8609 |
-
// Generate shortcuts for custom animations
|
8610 |
-
jQuery.each({
|
8611 |
-
slideDown: genFx( "show", 1 ),
|
8612 |
-
slideUp: genFx( "hide", 1 ),
|
8613 |
-
slideToggle: genFx( "toggle", 1 ),
|
8614 |
-
fadeIn: { opacity: "show" },
|
8615 |
-
fadeOut: { opacity: "hide" },
|
8616 |
-
fadeToggle: { opacity: "toggle" }
|
8617 |
-
}, function( name, props ) {
|
8618 |
-
jQuery.fn[ name ] = function( speed, easing, callback ) {
|
8619 |
-
return this.animate( props, speed, easing, callback );
|
8620 |
-
};
|
8621 |
-
});
|
8622 |
-
|
8623 |
-
jQuery.extend({
|
8624 |
-
speed: function( speed, easing, fn ) {
|
8625 |
-
var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
|
8626 |
-
complete: fn || !fn && easing ||
|
8627 |
-
jQuery.isFunction( speed ) && speed,
|
8628 |
-
duration: speed,
|
8629 |
-
easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
|
8630 |
-
};
|
8631 |
-
|
8632 |
-
opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
|
8633 |
-
opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
|
8634 |
-
|
8635 |
-
// normalize opt.queue - true/undefined/null -> "fx"
|
8636 |
-
if ( opt.queue == null || opt.queue === true ) {
|
8637 |
-
opt.queue = "fx";
|
8638 |
-
}
|
8639 |
-
|
8640 |
-
// Queueing
|
8641 |
-
opt.old = opt.complete;
|
8642 |
-
|
8643 |
-
opt.complete = function( noUnmark ) {
|
8644 |
-
if ( jQuery.isFunction( opt.old ) ) {
|
8645 |
-
opt.old.call( this );
|
8646 |
-
}
|
8647 |
-
|
8648 |
-
if ( opt.queue ) {
|
8649 |
-
jQuery.dequeue( this, opt.queue );
|
8650 |
-
} else if ( noUnmark !== false ) {
|
8651 |
-
jQuery._unmark( this );
|
8652 |
-
}
|
8653 |
-
};
|
8654 |
-
|
8655 |
-
return opt;
|
8656 |
-
},
|
8657 |
-
|
8658 |
-
easing: {
|
8659 |
-
linear: function( p, n, firstNum, diff ) {
|
8660 |
-
return firstNum + diff * p;
|
8661 |
-
},
|
8662 |
-
swing: function( p, n, firstNum, diff ) {
|
8663 |
-
return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum;
|
8664 |
-
}
|
8665 |
-
},
|
8666 |
-
|
8667 |
-
timers: [],
|
8668 |
-
|
8669 |
-
fx: function( elem, options, prop ) {
|
8670 |
-
this.options = options;
|
8671 |
-
this.elem = elem;
|
8672 |
-
this.prop = prop;
|
8673 |
-
|
8674 |
-
options.orig = options.orig || {};
|
8675 |
-
}
|
8676 |
-
|
8677 |
-
});
|
8678 |
-
|
8679 |
-
jQuery.fx.prototype = {
|
8680 |
-
// Simple function for setting a style value
|
8681 |
-
update: function() {
|
8682 |
-
if ( this.options.step ) {
|
8683 |
-
this.options.step.call( this.elem, this.now, this );
|
8684 |
-
}
|
8685 |
-
|
8686 |
-
( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
|
8687 |
-
},
|
8688 |
-
|
8689 |
-
// Get the current size
|
8690 |
-
cur: function() {
|
8691 |
-
if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
|
8692 |
-
return this.elem[ this.prop ];
|
8693 |
-
}
|
8694 |
-
|
8695 |
-
var parsed,
|
8696 |
-
r = jQuery.css( this.elem, this.prop );
|
8697 |
-
// Empty strings, null, undefined and "auto" are converted to 0,
|
8698 |
-
// complex values such as "rotate(1rad)" are returned as is,
|
8699 |
-
// simple values such as "10px" are parsed to Float.
|
8700 |
-
return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
|
8701 |
-
},
|
8702 |
-
|
8703 |
-
// Start an animation from one number to another
|
8704 |
-
custom: function( from, to, unit ) {
|
8705 |
-
var self = this,
|
8706 |
-
fx = jQuery.fx;
|
8707 |
-
|
8708 |
-
this.startTime = fxNow || createFxNow();
|
8709 |
-
this.end = to;
|
8710 |
-
this.now = this.start = from;
|
8711 |
-
this.pos = this.state = 0;
|
8712 |
-
this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
|
8713 |
-
|
8714 |
-
function t( gotoEnd ) {
|
8715 |
-
return self.step( gotoEnd );
|
8716 |
-
}
|
8717 |
-
|
8718 |
-
t.queue = this.options.queue;
|
8719 |
-
t.elem = this.elem;
|
8720 |
-
t.saveState = function() {
|
8721 |
-
if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
|
8722 |
-
jQuery._data( self.elem, "fxshow" + self.prop, self.start );
|
8723 |
-
}
|
8724 |
-
};
|
8725 |
-
|
8726 |
-
if ( t() && jQuery.timers.push(t) && !timerId ) {
|
8727 |
-
timerId = setInterval( fx.tick, fx.interval );
|
8728 |
-
}
|
8729 |
-
},
|
8730 |
-
|
8731 |
-
// Simple 'show' function
|
8732 |
-
show: function() {
|
8733 |
-
var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
|
8734 |
-
|
8735 |
-
// Remember where we started, so that we can go back to it later
|
8736 |
-
this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
|
8737 |
-
this.options.show = true;
|
8738 |
-
|
8739 |
-
// Begin the animation
|
8740 |
-
// Make sure that we start at a small width/height to avoid any flash of content
|
8741 |
-
if ( dataShow !== undefined ) {
|
8742 |
-
// This show is picking up where a previous hide or show left off
|
8743 |
-
this.custom( this.cur(), dataShow );
|
8744 |
-
} else {
|
8745 |
-
this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
|
8746 |
-
}
|
8747 |
-
|
8748 |
-
// Start by showing the element
|
8749 |
-
jQuery( this.elem ).show();
|
8750 |
-
},
|
8751 |
-
|
8752 |
-
// Simple 'hide' function
|
8753 |
-
hide: function() {
|
8754 |
-
// Remember where we started, so that we can go back to it later
|
8755 |
-
this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
|
8756 |
-
this.options.hide = true;
|
8757 |
-
|
8758 |
-
// Begin the animation
|
8759 |
-
this.custom( this.cur(), 0 );
|
8760 |
-
},
|
8761 |
-
|
8762 |
-
// Each step of an animation
|
8763 |
-
step: function( gotoEnd ) {
|
8764 |
-
var p, n, complete,
|
8765 |
-
t = fxNow || createFxNow(),
|
8766 |
-
done = true,
|
8767 |
-
elem = this.elem,
|
8768 |
-
options = this.options;
|
8769 |
-
|
8770 |
-
if ( gotoEnd || t >= options.duration + this.startTime ) {
|
8771 |
-
this.now = this.end;
|
8772 |
-
this.pos = this.state = 1;
|
8773 |
-
this.update();
|
8774 |
-
|
8775 |
-
options.animatedProperties[ this.prop ] = true;
|
8776 |
-
|
8777 |
-
for ( p in options.animatedProperties ) {
|
8778 |
-
if ( options.animatedProperties[ p ] !== true ) {
|
8779 |
-
done = false;
|
8780 |
-
}
|
8781 |
-
}
|
8782 |
-
|
8783 |
-
if ( done ) {
|
8784 |
-
// Reset the overflow
|
8785 |
-
if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
|
8786 |
-
|
8787 |
-
jQuery.each( [ "", "X", "Y" ], function( index, value ) {
|
8788 |
-
elem.style[ "overflow" + value ] = options.overflow[ index ];
|
8789 |
-
});
|
8790 |
-
}
|
8791 |
-
|
8792 |
-
// Hide the element if the "hide" operation was done
|
8793 |
-
if ( options.hide ) {
|
8794 |
-
jQuery( elem ).hide();
|
8795 |
-
}
|
8796 |
-
|
8797 |
-
// Reset the properties, if the item has been hidden or shown
|
8798 |
-
if ( options.hide || options.show ) {
|
8799 |
-
for ( p in options.animatedProperties ) {
|
8800 |
-
jQuery.style( elem, p, options.orig[ p ] );
|
8801 |
-
jQuery.removeData( elem, "fxshow" + p, true );
|
8802 |
-
// Toggle data is no longer needed
|
8803 |
-
jQuery.removeData( elem, "toggle" + p, true );
|
8804 |
-
}
|
8805 |
-
}
|
8806 |
-
|
8807 |
-
// Execute the complete function
|
8808 |
-
// in the event that the complete function throws an exception
|
8809 |
-
// we must ensure it won't be called twice. #5684
|
8810 |
-
|
8811 |
-
complete = options.complete;
|
8812 |
-
if ( complete ) {
|
8813 |
-
|
8814 |
-
options.complete = false;
|
8815 |
-
complete.call( elem );
|
8816 |
-
}
|
8817 |
-
}
|
8818 |
-
|
8819 |
-
return false;
|
8820 |
-
|
8821 |
-
} else {
|
8822 |
-
// classical easing cannot be used with an Infinity duration
|
8823 |
-
if ( options.duration == Infinity ) {
|
8824 |
-
this.now = t;
|
8825 |
-
} else {
|
8826 |
-
n = t - this.startTime;
|
8827 |
-
this.state = n / options.duration;
|
8828 |
-
|
8829 |
-
// Perform the easing function, defaults to swing
|
8830 |
-
this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
|
8831 |
-
this.now = this.start + ( (this.end - this.start) * this.pos );
|
8832 |
-
}
|
8833 |
-
// Perform the next step of the animation
|
8834 |
-
this.update();
|
8835 |
-
}
|
8836 |
-
|
8837 |
-
return true;
|
8838 |
-
}
|
8839 |
-
};
|
8840 |
-
|
8841 |
-
jQuery.extend( jQuery.fx, {
|
8842 |
-
tick: function() {
|
8843 |
-
var timer,
|
8844 |
-
timers = jQuery.timers,
|
8845 |
-
i = 0;
|
8846 |
-
|
8847 |
-
for ( ; i < timers.length; i++ ) {
|
8848 |
-
timer = timers[ i ];
|
8849 |
-
// Checks the timer has not already been removed
|
8850 |
-
if ( !timer() && timers[ i ] === timer ) {
|
8851 |
-
timers.splice( i--, 1 );
|
8852 |
-
}
|
8853 |
-
}
|
8854 |
-
|
8855 |
-
if ( !timers.length ) {
|
8856 |
-
jQuery.fx.stop();
|
8857 |
-
}
|
8858 |
-
},
|
8859 |
-
|
8860 |
-
interval: 13,
|
8861 |
-
|
8862 |
-
stop: function() {
|
8863 |
-
clearInterval( timerId );
|
8864 |
-
timerId = null;
|
8865 |
-
},
|
8866 |
-
|
8867 |
-
speeds: {
|
8868 |
-
slow: 600,
|
8869 |
-
fast: 200,
|
8870 |
-
// Default speed
|
8871 |
-
_default: 400
|
8872 |
-
},
|
8873 |
-
|
8874 |
-
step: {
|
8875 |
-
opacity: function( fx ) {
|
8876 |
-
jQuery.style( fx.elem, "opacity", fx.now );
|
8877 |
-
},
|
8878 |
-
|
8879 |
-
_default: function( fx ) {
|
8880 |
-
if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
|
8881 |
-
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
|
8882 |
-
} else {
|
8883 |
-
fx.elem[ fx.prop ] = fx.now;
|
8884 |
-
}
|
8885 |
-
}
|
8886 |
-
}
|
8887 |
-
});
|
8888 |
-
|
8889 |
-
// Adds width/height step functions
|
8890 |
-
// Do not set anything below 0
|
8891 |
-
jQuery.each([ "width", "height" ], function( i, prop ) {
|
8892 |
-
jQuery.fx.step[ prop ] = function( fx ) {
|
8893 |
-
jQuery.style( fx.elem, prop, Math.max(0, fx.now) );
|
8894 |
-
};
|
8895 |
-
});
|
8896 |
-
|
8897 |
-
if ( jQuery.expr && jQuery.expr.filters ) {
|
8898 |
-
jQuery.expr.filters.animated = function( elem ) {
|
8899 |
-
return jQuery.grep(jQuery.timers, function( fn ) {
|
8900 |
-
return elem === fn.elem;
|
8901 |
-
}).length;
|
8902 |
-
};
|
8903 |
-
}
|
8904 |
-
|
8905 |
-
// Try to restore the default display value of an element
|
8906 |
-
function defaultDisplay( nodeName ) {
|
8907 |
-
|
8908 |
-
if ( !elemdisplay[ nodeName ] ) {
|
8909 |
-
|
8910 |
-
var body = document.body,
|
8911 |
-
elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
|
8912 |
-
display = elem.css( "display" );
|
8913 |
-
elem.remove();
|
8914 |
-
|
8915 |
-
// If the simple way fails,
|
8916 |
-
// get element's real default display by attaching it to a temp iframe
|
8917 |
-
if ( display === "none" || display === "" ) {
|
8918 |
-
// No iframe to use yet, so create it
|
8919 |
-
if ( !iframe ) {
|
8920 |
-
iframe = document.createElement( "iframe" );
|
8921 |
-
iframe.frameBorder = iframe.width = iframe.height = 0;
|
8922 |
-
}
|
8923 |
-
|
8924 |
-
body.appendChild( iframe );
|
8925 |
-
|
8926 |
-
// Create a cacheable copy of the iframe document on first call.
|
8927 |
-
// IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
|
8928 |
-
// document to it; WebKit & Firefox won't allow reusing the iframe document.
|
8929 |
-
if ( !iframeDoc || !iframe.createElement ) {
|
8930 |
-
iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
|
8931 |
-
iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
|
8932 |
-
iframeDoc.close();
|
8933 |
-
}
|
8934 |
-
|
8935 |
-
elem = iframeDoc.createElement( nodeName );
|
8936 |
-
|
8937 |
-
iframeDoc.body.appendChild( elem );
|
8938 |
-
|
8939 |
-
display = jQuery.css( elem, "display" );
|
8940 |
-
body.removeChild( iframe );
|
8941 |
-
}
|
8942 |
-
|
8943 |
-
// Store the correct default display
|
8944 |
-
elemdisplay[ nodeName ] = display;
|
8945 |
-
}
|
8946 |
-
|
8947 |
-
return elemdisplay[ nodeName ];
|
8948 |
-
}
|
8949 |
-
|
8950 |
-
|
8951 |
-
|
8952 |
-
|
8953 |
-
var rtable = /^t(?:able|d|h)$/i,
|
8954 |
-
rroot = /^(?:body|html)$/i;
|
8955 |
-
|
8956 |
-
if ( "getBoundingClientRect" in document.documentElement ) {
|
8957 |
-
jQuery.fn.offset = function( options ) {
|
8958 |
-
var elem = this[0], box;
|
8959 |
-
|
8960 |
-
if ( options ) {
|
8961 |
-
return this.each(function( i ) {
|
8962 |
-
jQuery.offset.setOffset( this, options, i );
|
8963 |
-
});
|
8964 |
-
}
|
8965 |
-
|
8966 |
-
if ( !elem || !elem.ownerDocument ) {
|
8967 |
-
return null;
|
8968 |
-
}
|
8969 |
-
|
8970 |
-
if ( elem === elem.ownerDocument.body ) {
|
8971 |
-
return jQuery.offset.bodyOffset( elem );
|
8972 |
-
}
|
8973 |
-
|
8974 |
-
try {
|
8975 |
-
box = elem.getBoundingClientRect();
|
8976 |
-
} catch(e) {}
|
8977 |
-
|
8978 |
-
var doc = elem.ownerDocument,
|
8979 |
-
docElem = doc.documentElement;
|
8980 |
-
|
8981 |
-
// Make sure we're not dealing with a disconnected DOM node
|
8982 |
-
if ( !box || !jQuery.contains( docElem, elem ) ) {
|
8983 |
-
return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
|
8984 |
-
}
|
8985 |
-
|
8986 |
-
var body = doc.body,
|
8987 |
-
win = getWindow(doc),
|
8988 |
-
clientTop = docElem.clientTop || body.clientTop || 0,
|
8989 |
-
clientLeft = docElem.clientLeft || body.clientLeft || 0,
|
8990 |
-
scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop,
|
8991 |
-
scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
|
8992 |
-
top = box.top + scrollTop - clientTop,
|
8993 |
-
left = box.left + scrollLeft - clientLeft;
|
8994 |
-
|
8995 |
-
return { top: top, left: left };
|
8996 |
-
};
|
8997 |
-
|
8998 |
-
} else {
|
8999 |
-
jQuery.fn.offset = function( options ) {
|
9000 |
-
var elem = this[0];
|
9001 |
-
|
9002 |
-
if ( options ) {
|
9003 |
-
return this.each(function( i ) {
|
9004 |
-
jQuery.offset.setOffset( this, options, i );
|
9005 |
-
});
|
9006 |
-
}
|
9007 |
-
|
9008 |
-
if ( !elem || !elem.ownerDocument ) {
|
9009 |
-
return null;
|
9010 |
-
}
|
9011 |
-
|
9012 |
-
if ( elem === elem.ownerDocument.body ) {
|
9013 |
-
return jQuery.offset.bodyOffset( elem );
|
9014 |
-
}
|
9015 |
-
|
9016 |
-
var computedStyle,
|
9017 |
-
offsetParent = elem.offsetParent,
|
9018 |
-
prevOffsetParent = elem,
|
9019 |
-
doc = elem.ownerDocument,
|
9020 |
-
docElem = doc.documentElement,
|
9021 |
-
body = doc.body,
|
9022 |
-
defaultView = doc.defaultView,
|
9023 |
-
prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
|
9024 |
-
top = elem.offsetTop,
|
9025 |
-
left = elem.offsetLeft;
|
9026 |
-
|
9027 |
-
while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
|
9028 |
-
if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
|
9029 |
-
break;
|
9030 |
-
}
|
9031 |
-
|
9032 |
-
computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
|
9033 |
-
top -= elem.scrollTop;
|
9034 |
-
left -= elem.scrollLeft;
|
9035 |
-
|
9036 |
-
if ( elem === offsetParent ) {
|
9037 |
-
top += elem.offsetTop;
|
9038 |
-
left += elem.offsetLeft;
|
9039 |
-
|
9040 |
-
if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
|
9041 |
-
top += parseFloat( computedStyle.borderTopWidth ) || 0;
|
9042 |
-
left += parseFloat( computedStyle.borderLeftWidth ) || 0;
|
9043 |
-
}
|
9044 |
-
|
9045 |
-
prevOffsetParent = offsetParent;
|
9046 |
-
offsetParent = elem.offsetParent;
|
9047 |
-
}
|
9048 |
-
|
9049 |
-
if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
|
9050 |
-
top += parseFloat( computedStyle.borderTopWidth ) || 0;
|
9051 |
-
left += parseFloat( computedStyle.borderLeftWidth ) || 0;
|
9052 |
-
}
|
9053 |
-
|
9054 |
-
prevComputedStyle = computedStyle;
|
9055 |
-
}
|
9056 |
-
|
9057 |
-
if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
|
9058 |
-
top += body.offsetTop;
|
9059 |
-
left += body.offsetLeft;
|
9060 |
-
}
|
9061 |
-
|
9062 |
-
if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
|
9063 |
-
top += Math.max( docElem.scrollTop, body.scrollTop );
|
9064 |
-
left += Math.max( docElem.scrollLeft, body.scrollLeft );
|
9065 |
-
}
|
9066 |
-
|
9067 |
-
return { top: top, left: left };
|
9068 |
-
};
|
9069 |
-
}
|
9070 |
-
|
9071 |
-
jQuery.offset = {
|
9072 |
-
|
9073 |
-
bodyOffset: function( body ) {
|
9074 |
-
var top = body.offsetTop,
|
9075 |
-
left = body.offsetLeft;
|
9076 |
-
|
9077 |
-
if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
|
9078 |
-
top += parseFloat( jQuery.css(body, "marginTop") ) || 0;
|
9079 |
-
left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
|
9080 |
-
}
|
9081 |
-
|
9082 |
-
return { top: top, left: left };
|
9083 |
-
},
|
9084 |
-
|
9085 |
-
setOffset: function( elem, options, i ) {
|
9086 |
-
var position = jQuery.css( elem, "position" );
|
9087 |
-
|
9088 |
-
// set position first, in-case top/left are set even on static elem
|
9089 |
-
if ( position === "static" ) {
|
9090 |
-
elem.style.position = "relative";
|
9091 |
-
}
|
9092 |
-
|
9093 |
-
var curElem = jQuery( elem ),
|
9094 |
-
curOffset = curElem.offset(),
|
9095 |
-
curCSSTop = jQuery.css( elem, "top" ),
|
9096 |
-
curCSSLeft = jQuery.css( elem, "left" ),
|
9097 |
-
calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
|
9098 |
-
props = {}, curPosition = {}, curTop, curLeft;
|
9099 |
-
|
9100 |
-
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
|
9101 |
-
if ( calculatePosition ) {
|
9102 |
-
curPosition = curElem.position();
|
9103 |
-
curTop = curPosition.top;
|
9104 |
-
curLeft = curPosition.left;
|
9105 |
-
} else {
|
9106 |
-
curTop = parseFloat( curCSSTop ) || 0;
|
9107 |
-
curLeft = parseFloat( curCSSLeft ) || 0;
|
9108 |
-
}
|
9109 |
-
|
9110 |
-
if ( jQuery.isFunction( options ) ) {
|
9111 |
-
options = options.call( elem, i, curOffset );
|
9112 |
-
}
|
9113 |
-
|
9114 |
-
if ( options.top != null ) {
|
9115 |
-
props.top = ( options.top - curOffset.top ) + curTop;
|
9116 |
-
}
|
9117 |
-
if ( options.left != null ) {
|
9118 |
-
props.left = ( options.left - curOffset.left ) + curLeft;
|
9119 |
-
}
|
9120 |
-
|
9121 |
-
if ( "using" in options ) {
|
9122 |
-
options.using.call( elem, props );
|
9123 |
-
} else {
|
9124 |
-
curElem.css( props );
|
9125 |
-
}
|
9126 |
-
}
|
9127 |
-
};
|
9128 |
-
|
9129 |
-
|
9130 |
-
jQuery.fn.extend({
|
9131 |
-
|
9132 |
-
position: function() {
|
9133 |
-
if ( !this[0] ) {
|
9134 |
-
return null;
|
9135 |
-
}
|
9136 |
-
|
9137 |
-
var elem = this[0],
|
9138 |
-
|
9139 |
-
// Get *real* offsetParent
|
9140 |
-
offsetParent = this.offsetParent(),
|
9141 |
-
|
9142 |
-
// Get correct offsets
|
9143 |
-
offset = this.offset(),
|
9144 |
-
parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
|
9145 |
-
|
9146 |
-
// Subtract element margins
|
9147 |
-
// note: when an element has margin: auto the offsetLeft and marginLeft
|
9148 |
-
// are the same in Safari causing offset.left to incorrectly be 0
|
9149 |
-
offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
|
9150 |
-
offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
|
9151 |
-
|
9152 |
-
// Add offsetParent borders
|
9153 |
-
parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
|
9154 |
-
parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
|
9155 |
-
|
9156 |
-
// Subtract the two offsets
|
9157 |
-
return {
|
9158 |
-
top: offset.top - parentOffset.top,
|
9159 |
-
left: offset.left - parentOffset.left
|
9160 |
-
};
|
9161 |
-
},
|
9162 |
-
|
9163 |
-
offsetParent: function() {
|
9164 |
-
return this.map(function() {
|
9165 |
-
var offsetParent = this.offsetParent || document.body;
|
9166 |
-
while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
|
9167 |
-
offsetParent = offsetParent.offsetParent;
|
9168 |
-
}
|
9169 |
-
return offsetParent;
|
9170 |
-
});
|
9171 |
-
}
|
9172 |
-
});
|
9173 |
-
|
9174 |
-
|
9175 |
-
// Create scrollLeft and scrollTop methods
|
9176 |
-
jQuery.each( ["Left", "Top"], function( i, name ) {
|
9177 |
-
var method = "scroll" + name;
|
9178 |
-
|
9179 |
-
jQuery.fn[ method ] = function( val ) {
|
9180 |
-
var elem, win;
|
9181 |
-
|
9182 |
-
if ( val === undefined ) {
|
9183 |
-
elem = this[ 0 ];
|
9184 |
-
|
9185 |
-
if ( !elem ) {
|
9186 |
-
return null;
|
9187 |
-
}
|
9188 |
-
|
9189 |
-
win = getWindow( elem );
|
9190 |
-
|
9191 |
-
// Return the scroll offset
|
9192 |
-
return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
|
9193 |
-
jQuery.support.boxModel && win.document.documentElement[ method ] ||
|
9194 |
-
win.document.body[ method ] :
|
9195 |
-
elem[ method ];
|
9196 |
-
}
|
9197 |
-
|
9198 |
-
// Set the scroll offset
|
9199 |
-
return this.each(function() {
|
9200 |
-
win = getWindow( this );
|
9201 |
-
|
9202 |
-
if ( win ) {
|
9203 |
-
win.scrollTo(
|
9204 |
-
!i ? val : jQuery( win ).scrollLeft(),
|
9205 |
-
i ? val : jQuery( win ).scrollTop()
|
9206 |
-
);
|
9207 |
-
|
9208 |
-
} else {
|
9209 |
-
this[ method ] = val;
|
9210 |
-
}
|
9211 |
-
});
|
9212 |
-
};
|
9213 |
-
});
|
9214 |
-
|
9215 |
-
function getWindow( elem ) {
|
9216 |
-
return jQuery.isWindow( elem ) ?
|
9217 |
-
elem :
|
9218 |
-
elem.nodeType === 9 ?
|
9219 |
-
elem.defaultView || elem.parentWindow :
|
9220 |
-
false;
|
9221 |
-
}
|
9222 |
-
|
9223 |
-
|
9224 |
-
|
9225 |
-
|
9226 |
-
// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
|
9227 |
-
jQuery.each([ "Height", "Width" ], function( i, name ) {
|
9228 |
-
|
9229 |
-
var type = name.toLowerCase();
|
9230 |
-
|
9231 |
-
// innerHeight and innerWidth
|
9232 |
-
jQuery.fn[ "inner" + name ] = function() {
|
9233 |
-
var elem = this[0];
|
9234 |
-
return elem ?
|
9235 |
-
elem.style ?
|
9236 |
-
parseFloat( jQuery.css( elem, type, "padding" ) ) :
|
9237 |
-
this[ type ]() :
|
9238 |
-
null;
|
9239 |
-
};
|
9240 |
-
|
9241 |
-
// outerHeight and outerWidth
|
9242 |
-
jQuery.fn[ "outer" + name ] = function( margin ) {
|
9243 |
-
var elem = this[0];
|
9244 |
-
return elem ?
|
9245 |
-
elem.style ?
|
9246 |
-
parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
|
9247 |
-
this[ type ]() :
|
9248 |
-
null;
|
9249 |
-
};
|
9250 |
-
|
9251 |
-
jQuery.fn[ type ] = function( size ) {
|
9252 |
-
// Get window width or height
|
9253 |
-
var elem = this[0];
|
9254 |
-
if ( !elem ) {
|
9255 |
-
return size == null ? null : this;
|
9256 |
-
}
|
9257 |
-
|
9258 |
-
if ( jQuery.isFunction( size ) ) {
|
9259 |
-
return this.each(function( i ) {
|
9260 |
-
var self = jQuery( this );
|
9261 |
-
self[ type ]( size.call( this, i, self[ type ]() ) );
|
9262 |
-
});
|
9263 |
-
}
|
9264 |
-
|
9265 |
-
if ( jQuery.isWindow( elem ) ) {
|
9266 |
-
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
|
9267 |
-
// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
|
9268 |
-
var docElemProp = elem.document.documentElement[ "client" + name ],
|
9269 |
-
body = elem.document.body;
|
9270 |
-
return elem.document.compatMode === "CSS1Compat" && docElemProp ||
|
9271 |
-
body && body[ "client" + name ] || docElemProp;
|
9272 |
-
|
9273 |
-
// Get document width or height
|
9274 |
-
} else if ( elem.nodeType === 9 ) {
|
9275 |
-
// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
|
9276 |
-
return Math.max(
|
9277 |
-
elem.documentElement["client" + name],
|
9278 |
-
elem.body["scroll" + name], elem.documentElement["scroll" + name],
|
9279 |
-
elem.body["offset" + name], elem.documentElement["offset" + name]
|
9280 |
-
);
|
9281 |
-
|
9282 |
-
// Get or set width or height on the element
|
9283 |
-
} else if ( size === undefined ) {
|
9284 |
-
var orig = jQuery.css( elem, type ),
|
9285 |
-
ret = parseFloat( orig );
|
9286 |
-
|
9287 |
-
return jQuery.isNumeric( ret ) ? ret : orig;
|
9288 |
-
|
9289 |
-
// Set the width or height on the element (default to pixels if value is unitless)
|
9290 |
-
} else {
|
9291 |
-
return this.css( type, typeof size === "string" ? size : size + "px" );
|
9292 |
-
}
|
9293 |
-
};
|
9294 |
-
|
9295 |
-
});
|
9296 |
-
|
9297 |
-
|
9298 |
-
// Expose jQuery to the global object
|
9299 |
-
window.jQuery = window.$ = jQuery;
|
9300 |
-
})( window );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/wpm-cpt-script.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function calcage(e,t,n){return s=(Math.floor(e/t)%n).toString(),LeadingZero&&s.length<2&&(s="0"+s),"<b>"+s+"</b>"}function CountBack(e){return 0>e?void(1==Disable?document.location.replace(UrlDisable):document.getElementById("cntdwn").innerHTML=FinishMessage):(DisplayStr=DisplayFormat.replace(/%%D%%/g,calcage(e,86400,1e5)),DisplayStr=DisplayStr.replace(/%%H%%/g,calcage(e,3600,24)),DisplayStr=DisplayStr.replace(/%%M%%/g,calcage(e,60,60)),DisplayStr=DisplayStr.replace(/%%S%%/g,calcage(e,1,60)),document.getElementById("cntdwn").innerHTML=DisplayStr,void(CountActive&&setTimeout("CountBack("+(e+CountStepper)+")",SetTimeOutPeriod)))}function putspan(e,t){document.write("<div class='cptR-rec_countdown'><span id='cntdwn' style='font-family:"+FontFamily+";background-color:"+e+"; color:"+t+"; font-size:"+
|
1 |
+
function calcage(e,t,n){return s=(Math.floor(e/t)%n).toString(),LeadingZero&&s.length<2&&(s="0"+s),"<b>"+s+"</b>"}function CountBack(e){return 0>e?void(1==Disable?document.location.replace(UrlDisable):document.getElementById("cntdwn").innerHTML=FinishMessage):(DisplayStr=DisplayFormat.replace(/%%D%%/g,calcage(e,86400,1e5)),DisplayStr=DisplayStr.replace(/%%H%%/g,calcage(e,3600,24)),DisplayStr=DisplayStr.replace(/%%M%%/g,calcage(e,60,60)),DisplayStr=DisplayStr.replace(/%%S%%/g,calcage(e,1,60)),document.getElementById("cntdwn").innerHTML=DisplayStr,void(CountActive&&setTimeout("CountBack("+(e+CountStepper)+")",SetTimeOutPeriod)))}function putspan(e,t){document.write("<div class='cptR-rec_countdown'><span id='cntdwn' style='font-family:"+FontFamily+";background-color:"+e+"; color:"+t+"; font-size:"+FontTextSize+"vw;'></span></div>")}"undefined"==typeof BackColor&&(BackColor=""),"undefined"==typeof ForeColor&&(ForeColor="black"),"undefined"==typeof FontSize&&(FontSize="10"),"undefined"==typeof TargetDate&&(TargetDate="12/31/2020 5:00 AM"),"undefined"==typeof DisplayFormat&&(DisplayFormat="%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."),"undefined"==typeof CountActive&&(CountActive=!0),"undefined"==typeof FinishMessage&&(FinishMessage=""),"number"!=typeof CountStepper&&(CountStepper=-1),"undefined"==typeof LeadingZero&&(LeadingZero=!0),"undefined"==typeof Disable&&(Disable=""),"undefined"==typeof FontFamily&&(FontFamily="Pacifico"),CountStepper=Math.ceil(CountStepper),0==CountStepper&&(CountActive=!1);var SetTimeOutPeriod=1e3*(Math.abs(CountStepper)-1)+990;putspan(BackColor,ForeColor,FontSize);var dthen=new Date(TargetDate),dnow=new Date;CountStepper>0?ddiff=new Date(dnow-dthen):ddiff=new Date(dthen-dnow),gsecs=Math.floor(ddiff.valueOf()/1e3),CountBack(gsecs);
|
js/wpm-responsiveslides.min.js
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
/*! http://responsiveslides.com v1.54 by @viljamis */
|
2 |
-
(function(c,I,B){c.fn.responsiveSlides=function(l){var a=c.extend({auto:!0,speed:500,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!0,prevText:"Previous",nextText:"Next",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:c.noop,after:c.noop},l);return this.each(function(){B++;var f=c(this),s,r,t,m,p,q,n=0,e=f.children(),C=e.size(),h=parseFloat(a.speed),D=parseFloat(a.timeout),u=parseFloat(a.maxwidth),g=a.namespace,d=g+B,E=g+"_nav "+d+"_nav",v=g+"_here",j=d+"_on",
|
3 |
-
w=d+"_s",k=c("<ul class='"+g+"_tabs "+d+"_tabs' />"),x={"float":"left",position:"relative",opacity:1,zIndex:2},y={"float":"none",position:"absolute",opacity:0,zIndex:1},F=function(){var b=(document.body||document.documentElement).style,a="transition";if("string"===typeof b[a])return!0;s=["Moz","Webkit","Khtml","O","ms"];var a=a.charAt(0).toUpperCase()+a.substr(1),c;for(c=0;c<s.length;c++)if("string"===typeof b[s[c]+a])return!0;return!1}(),z=function(b){a.before(b);F?(e.removeClass(j).css(y).eq(b).addClass(j).css(x),
|
4 |
-
n=b,setTimeout(function(){a.after(b)},h)):e.stop().fadeOut(h,function(){c(this).removeClass(j).css(y).css("opacity",1)}).eq(b).fadeIn(h,function(){c(this).addClass(j).css(x);a.after(b);n=b})};a.random&&(e.sort(function(){return Math.round(Math.random())-0.5}),f.empty().append(e));e.each(function(a){this.id=w+a});f.addClass(g+" "+d);l&&l.maxwidth&&f.css("max-width",u);e.hide().css(y).eq(0).addClass(j).css(x).show();F&&e.show().css({"-webkit-transition":"opacity "+h+"ms ease-in-out","-moz-transition":"opacity "+
|
5 |
-
h+"ms ease-in-out","-o-transition":"opacity "+h+"ms ease-in-out",transition:"opacity "+h+"ms ease-in-out"});if(1<e.size()){if(D<h+100)return;if(a.pager&&!a.manualControls){var A=[];e.each(function(a){a+=1;A+="<li><a href='#' class='"+w+a+"'>"+a+"</a></li>"});k.append(A);l.navContainer?c(a.navContainer).append(k):f.after(k)}a.manualControls&&(k=c(a.manualControls),k.addClass(g+"_tabs "+d+"_tabs"));(a.pager||a.manualControls)&&k.find("li").each(function(a){c(this).addClass(w+(a+1))});if(a.pager||a.manualControls)q=
|
6 |
-
k.find("a"),r=function(a){q.closest("li").removeClass(v).eq(a).addClass(v)};a.auto&&(t=function(){p=setInterval(function(){e.stop(!0,!0);var b=n+1<C?n+1:0;(a.pager||a.manualControls)&&r(b);z(b)},D)},t());m=function(){a.auto&&(clearInterval(p),t())};a.pause&&f.hover(function(){clearInterval(p)},function(){m()});if(a.pager||a.manualControls)q.bind("click",function(b){b.preventDefault();a.pauseControls||m();b=q.index(this);n===b||c("."+j).queue("fx").length||(r(b),z(b))}).eq(0).closest("li").addClass(v),
|
7 |
-
a.pauseControls&&q.hover(function(){clearInterval(p)},function(){m()});if(a.nav){g="<a href='#' class='"+E+" prev'>"+a.prevText+"</a><a href='#' class='"+E+" next'>"+a.nextText+"</a>";l.navContainer?c(a.navContainer).append(g):f.after(g);var d=c("."+d+"_nav"),G=d.filter(".prev");d.bind("click",function(b){b.preventDefault();b=c("."+j);if(!b.queue("fx").length){var d=e.index(b);b=d-1;d=d+1<C?n+1:0;z(c(this)[0]===G[0]?b:d);if(a.pager||a.manualControls)r(c(this)[0]===G[0]?b:d);a.pauseControls||m()}});
|
8 |
-
a.pauseControls&&d.hover(function(){clearInterval(p)},function(){m()})}}if("undefined"===typeof document.body.style.maxWidth&&l.maxwidth){var H=function(){f.css("width","100%");f.width()>u&&f.css("width",u)};H();c(I).bind("resize",function(){H()})}})}})(jQuery,this,0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/wp-maintenance-fr_FR.mo
CHANGED
Binary file
|
languages/wp-maintenance-fr_FR.po
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP Maintenance\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: fr_FR\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 2.4.3\n"
|
13 |
-
"X-Poedit-Basepath: ..\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
|
|
|
15 |
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
16 |
"X-Poedit-WPHeader: wp-maintenance.php\n"
|
17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
@@ -21,483 +21,429 @@ msgstr ""
|
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
-
#: classes/countdown.php:
|
25 |
msgid "Days"
|
26 |
msgstr "Jours"
|
27 |
|
28 |
-
#: classes/countdown.php:
|
29 |
msgid "Hours"
|
30 |
msgstr "Heures"
|
31 |
|
32 |
-
#: classes/countdown.php:
|
33 |
msgid "Minutes"
|
34 |
msgstr "Minutes"
|
35 |
|
36 |
-
#: classes/countdown.php:
|
37 |
msgid "Seconds"
|
38 |
msgstr "Secondes"
|
39 |
|
40 |
-
#: classes/
|
41 |
-
msgid "Previous"
|
42 |
-
msgstr "Précédent"
|
43 |
-
|
44 |
-
#: classes/slider.php:100
|
45 |
-
msgid "Next"
|
46 |
-
msgstr "Suivant"
|
47 |
-
|
48 |
-
#: classes/wp-maintenance.php:68
|
49 |
msgid "This site is down for maintenance"
|
50 |
msgstr "Ce site est fermé pour maintenance"
|
51 |
|
52 |
-
#: classes/wp-maintenance.php:
|
53 |
msgid "Come back quickly!"
|
54 |
msgstr "Nous revenons rapidement !"
|
55 |
|
56 |
-
#: classes/wp-maintenance.php:
|
57 |
-
|
|
|
|
|
|
|
|
|
|
|
58 |
msgid "Settings"
|
59 |
msgstr "Réglages"
|
60 |
|
|
|
|
|
|
|
|
|
61 |
#. Plugin Name of the plugin/theme
|
62 |
-
#: classes/wp-maintenance.php:
|
63 |
msgid "WP Maintenance"
|
64 |
msgstr "WP Maintenance"
|
65 |
|
66 |
-
#: classes/wp-maintenance.php:
|
67 |
msgid "Colors"
|
68 |
msgstr "Couleurs"
|
69 |
|
70 |
-
#: classes/wp-maintenance.php:
|
71 |
-
#: includes/functions.php:
|
72 |
msgid "Pictures"
|
73 |
msgstr "Images"
|
74 |
|
75 |
-
#: classes/wp-maintenance.php:
|
76 |
msgid "Countdown"
|
77 |
msgstr "Compte à rebours"
|
78 |
|
79 |
-
#: classes/wp-maintenance.php:
|
80 |
-
#: views/wp-maintenance-css.php:42
|
81 |
msgid "CSS"
|
82 |
msgstr "CSS"
|
83 |
|
84 |
-
#: classes/wp-maintenance.php:
|
85 |
-
#: includes/functions.php:
|
86 |
msgid "Footer"
|
87 |
msgstr "Pied de page"
|
88 |
|
89 |
-
#: classes/wp-maintenance.php:
|
90 |
-
#: includes/functions.php:
|
91 |
msgid "SEO"
|
92 |
msgstr "SEO"
|
93 |
|
94 |
-
#: classes/wp-maintenance.php:
|
95 |
-
#: includes/functions.php:
|
96 |
msgid "Social Networks"
|
97 |
msgstr "Réseaux sociaux"
|
98 |
|
99 |
-
#: classes/wp-maintenance.php:
|
100 |
msgid "General"
|
101 |
msgstr "Général"
|
102 |
|
103 |
-
#: classes/wp-maintenance.php:
|
104 |
msgid "Colors & Fonts"
|
105 |
msgstr "Couleurs & Polices"
|
106 |
|
107 |
-
#: classes/wp-maintenance.php:
|
108 |
msgid "CountDown"
|
109 |
msgstr "Compte à rebours"
|
110 |
|
111 |
-
#: classes/wp-maintenance.php:
|
112 |
msgid "CSS Style"
|
113 |
msgstr "Style CSS"
|
114 |
|
115 |
-
#: classes/wp-maintenance.php:
|
116 |
msgid "Choose This Image"
|
117 |
msgstr "Choisir cette image"
|
118 |
|
119 |
-
#: classes/wp-maintenance.php:
|
120 |
msgid "Choose Image"
|
121 |
msgstr "Choisir une image"
|
122 |
|
123 |
-
#: classes/wp-maintenance.php:
|
124 |
-
#: classes/wp-maintenance.php:
|
125 |
-
#: classes/wp-maintenance.php:
|
126 |
-
#: classes/wp-maintenance.php:
|
127 |
-
#: classes/wp-maintenance.php:
|
128 |
msgid "You do not have sufficient privileges to access this page."
|
129 |
msgstr ""
|
130 |
"Vous n'avez pas les autorisations suffisantes pour accéder à cette page."
|
131 |
|
132 |
-
#:
|
133 |
-
msgid "Please upload a valid .json file"
|
134 |
-
msgstr "Veuillez téléverser un fichier .json valide"
|
135 |
-
|
136 |
-
#: classes/wp-maintenance.php:598
|
137 |
-
msgid "Please upload a file to import"
|
138 |
-
msgstr "Veuillez téléverser un fichier à importer"
|
139 |
-
|
140 |
-
#: classes/wp-maintenance.php:608
|
141 |
-
msgid "New settings imported successfully!"
|
142 |
-
msgstr "Nouveaux paramètres importés avec succès !"
|
143 |
-
|
144 |
-
#: includes/functions.php:9
|
145 |
-
msgid "WP Maintenance - Settings"
|
146 |
-
msgstr "WP Maintenance - Paramètres"
|
147 |
-
|
148 |
-
#: includes/functions.php:12
|
149 |
-
msgid "Options saved."
|
150 |
-
msgstr "Options sauvegardées."
|
151 |
-
|
152 |
-
#: includes/functions.php:30 themes/default/functions.php:63
|
153 |
-
#: views/wp-maintenance-dashboard.php:40
|
154 |
msgid "Dashboard"
|
155 |
msgstr "Tableau de bord"
|
156 |
|
157 |
-
#: includes/functions.php:
|
158 |
msgid "Here, the beginning..."
|
159 |
msgstr "Ici, le commencement…"
|
160 |
|
161 |
-
#: includes/functions.php:
|
162 |
msgid "Colors and Fonts"
|
163 |
msgstr "Couleurs et polices"
|
164 |
|
165 |
-
#: includes/functions.php:
|
166 |
msgid "Have a creative mind"
|
167 |
msgstr "Ayez un esprit créatif"
|
168 |
|
169 |
-
#: includes/functions.php:
|
170 |
msgid "Are we playing with the images?"
|
171 |
msgstr "Est-ce qu’on joue avec les images ?"
|
172 |
|
173 |
-
#: includes/functions.php:
|
174 |
msgid "Stop the time... or not!"
|
175 |
msgstr "Arrêtez le temps... Ou pas!"
|
176 |
|
177 |
-
#: includes/functions.php:
|
178 |
msgid "Customize the style sheet"
|
179 |
msgstr "Personnaliser la feuille de style"
|
180 |
|
181 |
-
#: includes/functions.php:
|
182 |
msgid "Keep your site optimized"
|
183 |
msgstr "Gardez votre site optimisé"
|
184 |
|
185 |
-
#: includes/functions.php:
|
186 |
msgid "Adding social networks icons"
|
187 |
msgstr "Ajout d’icônes de réseaux sociaux"
|
188 |
|
189 |
-
#: includes/functions.php:
|
190 |
msgid "Here, we are talking about the footer"
|
191 |
msgstr "Ici, nous parlons du pied de page"
|
192 |
|
193 |
-
#: includes/functions.php:
|
194 |
msgid "A few additional options"
|
195 |
msgstr "Quelques options supplémentaires"
|
196 |
|
197 |
-
#: includes/functions.php:
|
198 |
-
msgid "Visit the WP Maintenance page project."
|
199 |
-
msgstr "Visitez le projet de page de WP Maintenance."
|
200 |
-
|
201 |
-
#: includes/functions.php:86
|
202 |
msgid "Preview page"
|
203 |
msgstr "Aperçu"
|
204 |
|
205 |
-
#: includes/functions.php:
|
206 |
-
msgid ""
|
207 |
-
"This plugin has been developed for you for free by <a href=\"https://"
|
208 |
-
"restezconnectes.fr\" target=\"_blank\" style=\"color:#D6D5AA;\">Florent "
|
209 |
-
"Maillefaud</a>. It is royalty free, you can take it, modify it, distribute "
|
210 |
-
"it as you see fit."
|
211 |
-
msgstr ""
|
212 |
-
"Cette extension a été développée gratuitement pour vous par <a href="
|
213 |
-
"\"https://restezconnectes.fr\" target=\"_blank\">Florent Maillefaud</a>. "
|
214 |
-
"Elle est libre de droits, vous pouvez la prendre, la modifier, la distribuer "
|
215 |
-
"comme bon vous semble."
|
216 |
-
|
217 |
-
#: includes/functions.php:107 includes/functions.php:161
|
218 |
-
msgid "Support this extension and my other developments (French Paypal):"
|
219 |
-
msgstr "Soutenez cette extension et mes autres développements (PayPal) :"
|
220 |
-
|
221 |
-
#: includes/functions.php:109
|
222 |
-
msgid "Donate now!"
|
223 |
-
msgstr "Donner maintenant !"
|
224 |
-
|
225 |
-
#: includes/functions.php:156
|
226 |
-
msgid "ABOUT"
|
227 |
-
msgstr "A PROPOS"
|
228 |
-
|
229 |
-
#: includes/functions.php:158
|
230 |
-
msgid ""
|
231 |
-
"This plugin has been developed for you for free by <a href=\"https://"
|
232 |
-
"restezconnectes.fr\" target=\"_blank\">Florent Maillefaud</a>. It is royalty "
|
233 |
-
"free, you can take it, modify it, distribute it as you see fit."
|
234 |
-
msgstr ""
|
235 |
-
"Cette extension a été développée gratuitement pour vous par <a href="
|
236 |
-
"\"https://restezconnectes.fr\" target=\"_blank\">Florent Maillefaud</a>. "
|
237 |
-
"Elle est libre de droits, vous pouvez la prendre, la modifier, la distribuer "
|
238 |
-
"comme bon vous semble."
|
239 |
-
|
240 |
-
#: includes/functions.php:159
|
241 |
-
msgid "Visit"
|
242 |
-
msgstr "Visitez"
|
243 |
-
|
244 |
-
#: includes/functions.php:159
|
245 |
-
msgid ""
|
246 |
-
"try the demo of the plugin, talk about this plugin to your surroundings!"
|
247 |
-
msgstr "essayez la démo de cette extension et parlez-en à votre entourage !"
|
248 |
-
|
249 |
-
#: includes/functions.php:173
|
250 |
-
msgid "DISCOVER"
|
251 |
-
msgstr "DÉCOUVRIR"
|
252 |
-
|
253 |
-
#: includes/functions.php:194
|
254 |
msgid "is brought to you by"
|
255 |
msgstr "vous est proposé par"
|
256 |
|
257 |
-
#: includes/functions.php:
|
258 |
msgid "If you found this plugin useful"
|
259 |
msgstr "Si vous avez trouvé cette extension utile"
|
260 |
|
261 |
-
#: includes/functions.php:
|
262 |
msgid "give it 5 ★ on WordPress.org"
|
263 |
msgstr "donnez-lui 5 ★ sur WordPress.org"
|
264 |
|
265 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
msgid "Choice general colors"
|
267 |
msgstr "Choix des couleurs générales"
|
268 |
|
269 |
-
#: views/wp-maintenance-colors.php:
|
270 |
msgid "Background page color"
|
271 |
msgstr "Couleur du fond de page"
|
272 |
|
273 |
-
#: views/wp-maintenance-colors.php:
|
274 |
msgid "Header color"
|
275 |
msgstr "Couleur d’en-tête"
|
276 |
|
277 |
-
#: views/wp-maintenance-colors.php:
|
278 |
-
#: views/wp-maintenance-colors.php:
|
279 |
-
#: views/wp-maintenance-colors.php:
|
280 |
-
#: views/wp-maintenance-colors.php:
|
281 |
-
#: views/wp-maintenance-countdown.php:
|
282 |
-
#: views/wp-maintenance-css.php:
|
283 |
-
#: views/wp-maintenance-dashboard.php:
|
284 |
-
#: views/wp-maintenance-footer.php:
|
285 |
-
#: views/wp-maintenance-picture.php:
|
286 |
-
#: views/wp-maintenance-picture.php:
|
287 |
-
#: views/wp-maintenance-seo.php:
|
288 |
-
#: views/wp-maintenance-
|
289 |
-
#: views/wp-maintenance-settings.php:
|
290 |
-
#: views/wp-maintenance-settings.php:
|
291 |
-
#: views/wp-maintenance-
|
292 |
-
#: views/wp-maintenance-socialnetworks.php:
|
293 |
-
#: views/wp-maintenance-socialnetworks.php:
|
294 |
-
#: views/wp-maintenance-socialnetworks.php:
|
295 |
-
#: views/wp-maintenance-socialnetworks.php:170
|
296 |
msgid "Save"
|
297 |
msgstr "Enregistrer"
|
298 |
|
299 |
-
#: views/wp-maintenance-colors.php:
|
300 |
msgid "Title Settings"
|
301 |
msgstr "Réglages du titre"
|
302 |
|
303 |
-
#: views/wp-maintenance-colors.php:
|
304 |
msgid "Choice title font and color"
|
305 |
msgstr "Choisir les polices et couleurs des titres"
|
306 |
|
307 |
-
#: views/wp-maintenance-colors.php:
|
308 |
msgid "Set the color and font of the title"
|
309 |
msgstr "Définir la couleur et la police du titre"
|
310 |
|
311 |
-
#: views/wp-maintenance-colors.php:
|
312 |
msgid "Choose font color"
|
313 |
msgstr "Choisissez la couleur de la police"
|
314 |
|
315 |
-
#: views/wp-maintenance-colors.php:
|
316 |
-
#: views/wp-maintenance-colors.php:
|
317 |
msgid "Choose Size and Style"
|
318 |
msgstr "Choisissez la taille et le style"
|
319 |
|
320 |
-
#: views/wp-maintenance-colors.php:
|
321 |
-
#: views/wp-maintenance-colors.php:
|
322 |
msgid "bold"
|
323 |
msgstr "gras"
|
324 |
|
325 |
-
#: views/wp-maintenance-colors.php:
|
326 |
-
#: views/wp-maintenance-colors.php:
|
327 |
msgid "Italic"
|
328 |
msgstr "Italique"
|
329 |
|
330 |
-
#: views/wp-maintenance-colors.php:
|
331 |
msgid "Text Settings"
|
332 |
msgstr "Paramètres du texte"
|
333 |
|
334 |
-
#: views/wp-maintenance-colors.php:
|
335 |
msgid "Choice text font and color"
|
336 |
msgstr "Choix des polices et couleurs des textes"
|
337 |
|
338 |
-
#: views/wp-maintenance-colors.php:
|
339 |
msgid "Set the color and font of the text"
|
340 |
msgstr "Définir la couleur et la police du texte"
|
341 |
|
342 |
-
#: views/wp-maintenance-colors.php:
|
343 |
msgid "Frame Settings"
|
344 |
msgstr "Paramètres du cadre"
|
345 |
|
346 |
-
#: views/wp-maintenance-colors.php:
|
347 |
msgid "Yes, enable frame"
|
348 |
msgstr "Oui, activer le cadre"
|
349 |
|
350 |
-
#: views/wp-maintenance-colors.php:
|
351 |
msgid "Choice frame color and style"
|
352 |
msgstr "Choisir la couleur et le style du cadre"
|
353 |
|
354 |
-
#: views/wp-maintenance-colors.php:
|
355 |
msgid "Choose frame color"
|
356 |
msgstr "Choisir les couleurs du cadre"
|
357 |
|
358 |
-
#: views/wp-maintenance-colors.php:
|
359 |
msgid "Choose Style"
|
360 |
msgstr "Choisissez le style"
|
361 |
|
362 |
-
#: views/wp-maintenance-colors.php:
|
363 |
msgid "Opacity"
|
364 |
msgstr "Opacité"
|
365 |
|
366 |
-
#: views/wp-maintenance-colors.php:
|
367 |
msgid "Width"
|
368 |
msgstr "Largeur"
|
369 |
|
370 |
-
#: views/wp-maintenance-colors.php:
|
371 |
msgid "Countdown Settings"
|
372 |
msgstr "Paramètres du compte à rebours"
|
373 |
|
374 |
-
#: views/wp-maintenance-colors.php:
|
375 |
msgid "Choice Countdown font, colors and style"
|
376 |
msgstr "Choix des polices et couleurs du compte à rebours"
|
377 |
|
378 |
-
#: views/wp-maintenance-colors.php:
|
379 |
msgid "Countdown text color"
|
380 |
msgstr "Couleur du texte du compteur"
|
381 |
|
382 |
-
#: views/wp-maintenance-colors.php:
|
383 |
msgid "Countdown background color"
|
384 |
msgstr "Couleur du fond du compteur"
|
385 |
|
386 |
-
#: views/wp-maintenance-colors.php:
|
387 |
msgid "Choose font"
|
388 |
msgstr "Choisissez la police"
|
389 |
|
390 |
-
#: views/wp-maintenance-colors.php:
|
|
|
|
|
|
|
|
|
391 |
msgid "Footer settings"
|
392 |
msgstr "Paramètres du pied de page"
|
393 |
|
394 |
-
#: views/wp-maintenance-colors.php:
|
395 |
msgid "Choice footer font, colors and style"
|
396 |
msgstr "Choix des polices, couleurs et le style du pied de page"
|
397 |
|
398 |
-
#: views/wp-maintenance-colors.php:
|
399 |
msgid "Text color"
|
400 |
msgstr "Couleur du texte"
|
401 |
|
402 |
-
#: views/wp-maintenance-colors.php:
|
403 |
msgid "Background color"
|
404 |
msgstr "Couleur du fond"
|
405 |
|
406 |
-
#: views/wp-maintenance-colors.php:
|
407 |
msgid "Form color settings"
|
408 |
msgstr "Paramètres de couleur du formulaire"
|
409 |
|
410 |
-
#: views/wp-maintenance-colors.php:
|
411 |
msgid "Choice form colors"
|
412 |
msgstr "Choisir les couleurs du formulaire"
|
413 |
|
414 |
-
#: views/wp-maintenance-colors.php:
|
415 |
msgid "Field text color"
|
416 |
msgstr "Couleur du texte dans les champs"
|
417 |
|
418 |
-
#: views/wp-maintenance-colors.php:
|
419 |
msgid "Field border color"
|
420 |
msgstr "Couleur de bordure des champs"
|
421 |
|
422 |
-
#: views/wp-maintenance-colors.php:
|
423 |
msgid "Field background color"
|
424 |
msgstr "Couleur de fond des champs"
|
425 |
|
426 |
-
#: views/wp-maintenance-colors.php:
|
427 |
msgid "Button text color"
|
428 |
msgstr "Couleur du texte dans le bouton"
|
429 |
|
430 |
-
#: views/wp-maintenance-colors.php:
|
431 |
msgid "Button color"
|
432 |
msgstr "Couleur du bouton"
|
433 |
|
434 |
-
#: views/wp-maintenance-colors.php:
|
435 |
msgid "Button color hover"
|
436 |
msgstr "Couleur du bouton au survol"
|
437 |
|
438 |
-
#: views/wp-maintenance-colors.php:
|
439 |
msgid "Button color onclick"
|
440 |
msgstr "Couleur du bouton au click"
|
441 |
|
442 |
-
#: views/wp-maintenance-colors.php:
|
443 |
#, php-format
|
444 |
msgid "Enable %s to customize the forms"
|
445 |
msgstr "Activer %s pour personnaliser les formulaires"
|
446 |
|
447 |
-
#: views/wp-maintenance-colors.php:
|
448 |
msgid "newsletter option"
|
449 |
msgstr "options de newsletter"
|
450 |
|
451 |
-
#: views/wp-maintenance-colors.php:
|
452 |
msgid "Enable Mailpoet or MailChimp extensions to customize the forms"
|
453 |
msgstr ""
|
454 |
"Activer les extensions Mailpoet ou MailChimp personnaliser les formulaires"
|
455 |
|
456 |
-
#: views/wp-maintenance-countdown.php:
|
457 |
-
msgid "Countdown settings"
|
458 |
-
msgstr "Paramètres du compte à rebours"
|
459 |
-
|
460 |
-
#: views/wp-maintenance-countdown.php:59
|
461 |
msgid "Enable a countdown"
|
462 |
msgstr "Activer un compte à rebours"
|
463 |
|
464 |
-
#: views/wp-maintenance-countdown.php:
|
465 |
msgid "Yes, enable a countdown"
|
466 |
msgstr "Oui, activer un compte à rebours"
|
467 |
|
468 |
-
#: views/wp-maintenance-countdown.php:
|
469 |
msgid "Date/time Launch"
|
470 |
msgstr "Date / heure du lancement"
|
471 |
|
472 |
-
#: views/wp-maintenance-countdown.php:
|
473 |
msgid "Select the launch date/time"
|
474 |
msgstr "Sélectionner une date et heure de lancement"
|
475 |
|
476 |
-
#: views/wp-maintenance-countdown.php:
|
477 |
msgid "at"
|
478 |
msgstr "à"
|
479 |
|
480 |
-
#: views/wp-maintenance-countdown.php:
|
481 |
msgid "Others Settings"
|
482 |
msgstr "Autres paramètres"
|
483 |
|
484 |
-
#: views/wp-maintenance-countdown.php:
|
485 |
msgid "Enable seconds ?"
|
486 |
msgstr "Afficher les secondes ?"
|
487 |
|
488 |
-
#: views/wp-maintenance-countdown.php:
|
489 |
msgid "Yes, enable seconds"
|
490 |
msgstr "Oui, activer les secondes"
|
491 |
|
492 |
-
#: views/wp-maintenance-countdown.php:
|
493 |
msgid "Disable maintenance mode at the end of the countdown?"
|
494 |
msgstr "Désactiver le mode maintenance à la fin du compte à rebours ?"
|
495 |
|
496 |
-
#: views/wp-maintenance-countdown.php:
|
497 |
msgid "Yes, disable maintenance mode at the end of countdown"
|
498 |
msgstr "Oui, désactiver le mode maintenance à la fin du compte à rebours"
|
499 |
|
500 |
-
#: views/wp-maintenance-countdown.php:
|
501 |
msgid "End message after end countdown"
|
502 |
msgstr "Message de fin après le compte à rebours"
|
503 |
|
@@ -606,7 +552,7 @@ msgstr "Sélectionner un mois"
|
|
606 |
msgid "Select a year"
|
607 |
msgstr "Sélectionner une année"
|
608 |
|
609 |
-
#: views/wp-maintenance-css.php:
|
610 |
msgid "The Style Sheet has been reset!"
|
611 |
msgstr "La feuille de style a bien été réinitilisée !"
|
612 |
|
@@ -620,7 +566,7 @@ msgstr ""
|
|
620 |
"Cliquez sur « Réinitialisation » et « Enregistrer » pour récupérer la "
|
621 |
"feuille de style par défaut."
|
622 |
|
623 |
-
#: views/wp-maintenance-css.php:
|
624 |
msgid "Yes, reset style sheet"
|
625 |
msgstr "Oui, réinitialisez la feuille de style"
|
626 |
|
@@ -648,113 +594,113 @@ msgstr "Utiliser ce code pour la taille du compte à rebours"
|
|
648 |
msgid "Use this code for countdown color"
|
649 |
msgstr "Utiliser ce code pour la couleur du texte du compte à rebours"
|
650 |
|
651 |
-
#: views/wp-maintenance-css.php:
|
|
|
|
|
|
|
|
|
652 |
msgid "Need CSS code for MailPoet plugin?"
|
653 |
msgstr "Besoin de code CSS pour le plugin MailPoet ?"
|
654 |
|
655 |
-
#: views/wp-maintenance-css.php:
|
656 |
msgid "Click for select all"
|
657 |
msgstr "Cliquez pour tout sélectionner"
|
658 |
|
659 |
-
#: views/wp-maintenance-css.php:
|
660 |
msgid "Need CSS code for MailChimp plugin?"
|
661 |
msgstr "Besoin de code CSS pour le plugin MailChimp ?"
|
662 |
|
663 |
-
#: views/wp-maintenance-dashboard.php:
|
664 |
msgid "Activate maintenance mode"
|
665 |
msgstr "Activer le mode maintenance"
|
666 |
|
667 |
-
#: views/wp-maintenance-dashboard.php:
|
668 |
msgid "Yes, enable maintenance mode"
|
669 |
msgstr "Oui, activer le mode maintenance"
|
670 |
|
671 |
-
#: views/wp-maintenance-dashboard.php:
|
672 |
msgid "Title and text"
|
673 |
msgstr "Titre et texte"
|
674 |
|
675 |
-
#: views/wp-maintenance-dashboard.php:
|
676 |
msgid "Activate newsletter block"
|
677 |
msgstr "Activer un encart newsletter"
|
678 |
|
679 |
-
#: views/wp-maintenance-dashboard.php:
|
680 |
msgid "Yes, enable newsletter block"
|
681 |
msgstr "Oui, activer un encart newsletter"
|
682 |
|
683 |
-
#: views/wp-maintenance-dashboard.php:
|
684 |
msgid "Enter title for the newletter block"
|
685 |
msgstr "Entrez un titre pour l'encart de la newsletter"
|
686 |
|
687 |
-
#: views/wp-maintenance-dashboard.php:
|
688 |
msgid "Type of the newletter block"
|
689 |
msgstr "Type d’encart newsletter"
|
690 |
|
691 |
-
#: views/wp-maintenance-dashboard.php:
|
692 |
msgid "Enter your newletter shortcode here:"
|
693 |
msgstr "Entrez le Shortcode de la newletter ici :"
|
694 |
|
695 |
-
#: views/wp-maintenance-dashboard.php:
|
696 |
msgid "Or enter your newletter iframe code here:"
|
697 |
msgstr "Ou entrez le code iframe de la newsletter ici :"
|
698 |
|
699 |
-
#: views/wp-maintenance-footer.php:
|
700 |
msgid "Enable Footer?"
|
701 |
msgstr "Activer le pied de page ?"
|
702 |
|
703 |
-
#: views/wp-maintenance-footer.php:
|
704 |
msgid "Yes, enable footer"
|
705 |
msgstr "Oui, activer le pied de page"
|
706 |
|
707 |
-
#: views/wp-maintenance-footer.php:
|
708 |
msgid "Text in the footer"
|
709 |
msgstr "Texte dans le pied de page"
|
710 |
|
711 |
-
#: views/wp-maintenance-footer.php:
|
712 |
msgid "Add a link to dashboard in the footer?"
|
713 |
msgstr "Ajouter un lien vers le tableau de bord dans le pied de page ?"
|
714 |
|
715 |
-
#: views/wp-maintenance-footer.php:
|
716 |
msgid "Yes, show text and link to go to the dashboard"
|
717 |
msgstr "Oui, afficher le texte et le lien pour aller au tableau de bord"
|
718 |
|
719 |
-
#: views/wp-maintenance-footer.php:
|
720 |
-
msgid "Enter your text and
|
721 |
-
msgstr "Entrez votre texte et le code court
|
722 |
|
723 |
-
#: views/wp-maintenance-footer.php:
|
724 |
-
msgid "Eg: connect to
|
725 |
-
msgstr "Ex : Connectez
|
726 |
|
727 |
-
#: views/wp-maintenance-footer.php:
|
728 |
msgid ""
|
729 |
-
"(
|
730 |
"\"Dashboard\")"
|
731 |
msgstr ""
|
732 |
-
"(
|
733 |
"celui-ci)"
|
734 |
|
735 |
-
#: views/wp-maintenance-picture.php:
|
736 |
-
msgid "Picture Options"
|
737 |
-
msgstr "Options d’image"
|
738 |
-
|
739 |
-
#: views/wp-maintenance-picture.php:98
|
740 |
msgid "Header picture"
|
741 |
msgstr "Image d'entête"
|
742 |
|
743 |
-
#: views/wp-maintenance-picture.php:
|
744 |
msgid "Choice you picture for header page"
|
745 |
msgstr "Choix de votre image pour l’en-tête de page"
|
746 |
|
747 |
-
#: views/wp-maintenance-picture.php:
|
748 |
-
#: views/wp-maintenance-seo.php:
|
749 |
msgid "Enter a URL or upload an image"
|
750 |
msgstr "Entrez une url ou mettez en ligne une image"
|
751 |
|
752 |
-
#: views/wp-maintenance-picture.php:
|
753 |
-
#: views/wp-maintenance-
|
754 |
msgid "Media Image Library"
|
755 |
msgstr "Bibliothèque d'Images"
|
756 |
|
757 |
-
#: views/wp-maintenance-picture.php:
|
758 |
msgid ""
|
759 |
"URL path to image to replace default picture. (You can upload your image "
|
760 |
"with the WordPress media uploader)"
|
@@ -762,160 +708,96 @@ msgstr ""
|
|
762 |
"Url de l'image pour remplacer le logo WordPress par défaut. (Vous pouvez "
|
763 |
"envoyer votre image avec l'outil d'envoi de médias interne à WordPress)"
|
764 |
|
765 |
-
#: views/wp-maintenance-picture.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
msgid "You use this picture:"
|
767 |
msgstr "Image actuelle :"
|
768 |
|
769 |
-
#: views/wp-maintenance-picture.php:
|
770 |
msgid "Remove"
|
771 |
msgstr "Supprimer"
|
772 |
|
773 |
-
#: views/wp-maintenance-picture.php:
|
774 |
msgid "Background picture"
|
775 |
msgstr "Image d’arrière-plan"
|
776 |
|
777 |
-
#: views/wp-maintenance-picture.php:
|
778 |
msgid "Disable background or pattern picture"
|
779 |
msgstr "Désactiver l’image d’arrière-plan ou de motif"
|
780 |
|
781 |
-
#: views/wp-maintenance-picture.php:
|
782 |
msgid "Yes, activate picture background"
|
783 |
msgstr "Oui, activez une image l’arrière-plan"
|
784 |
|
785 |
-
#: views/wp-maintenance-picture.php:
|
786 |
msgid "You use this background picture:"
|
787 |
msgstr "Image de fond actuelle :"
|
788 |
|
789 |
-
#: views/wp-maintenance-picture.php:
|
790 |
msgid "Background picture options"
|
791 |
msgstr "Options de l'image de fond"
|
792 |
|
793 |
-
#: views/wp-maintenance-picture.php:
|
794 |
msgid "Background Opacity"
|
795 |
msgstr "Opacité de l’arrière-plan"
|
796 |
|
797 |
-
#: views/wp-maintenance-picture.php:
|
798 |
msgid "Fix the background picture"
|
799 |
msgstr "Image de fond fixe"
|
800 |
|
801 |
-
#: views/wp-maintenance-picture.php:
|
802 |
msgid "Pattern picture"
|
803 |
msgstr "Image de motif"
|
804 |
|
805 |
-
#: views/wp-maintenance-picture.php:
|
806 |
msgid "Yes, activate pattern background"
|
807 |
msgstr "Oui, activez un motif de fond"
|
808 |
|
809 |
-
#: views/wp-maintenance-picture.php:
|
810 |
msgid "Choose a pattern"
|
811 |
msgstr "Choisissez un motif de fond"
|
812 |
|
813 |
-
#: views/wp-maintenance-picture.php:
|
814 |
msgid "NO PATTERN"
|
815 |
msgstr "AUCUN PATTERN"
|
816 |
|
817 |
-
#: views/wp-maintenance-picture.php:
|
818 |
msgid "You use this pattern"
|
819 |
msgstr "Vous utilisez ce modèle"
|
820 |
|
821 |
-
#: views/wp-maintenance-
|
822 |
-
msgid "Slider"
|
823 |
-
msgstr "Diaporama"
|
824 |
-
|
825 |
-
#: views/wp-maintenance-picture.php:214
|
826 |
-
msgid "Yes, enable Slider"
|
827 |
-
msgstr "Oui, activer le diaporama"
|
828 |
-
|
829 |
-
#: views/wp-maintenance-picture.php:220 views/wp-maintenance-picture.php:222
|
830 |
-
msgid "Slider options"
|
831 |
-
msgstr "Options du diaporama"
|
832 |
-
|
833 |
-
#: views/wp-maintenance-picture.php:234
|
834 |
-
msgid "Speed:"
|
835 |
-
msgstr "Vitesse :"
|
836 |
-
|
837 |
-
#: views/wp-maintenance-picture.php:235
|
838 |
-
msgid "Width:"
|
839 |
-
msgstr "Largeur :"
|
840 |
-
|
841 |
-
#: views/wp-maintenance-picture.php:239
|
842 |
-
msgid "Display Auto Slider"
|
843 |
-
msgstr "Afficher le diaporama en auto"
|
844 |
-
|
845 |
-
#: views/wp-maintenance-picture.php:240 views/wp-maintenance-picture.php:248
|
846 |
-
msgid "Yes"
|
847 |
-
msgstr "Oui"
|
848 |
-
|
849 |
-
#: views/wp-maintenance-picture.php:242 views/wp-maintenance-picture.php:249
|
850 |
-
msgid "No"
|
851 |
-
msgstr "Non"
|
852 |
-
|
853 |
-
#: views/wp-maintenance-picture.php:247
|
854 |
-
msgid "Display button navigation"
|
855 |
-
msgstr "Afficher les boutons navigation"
|
856 |
-
|
857 |
-
#: views/wp-maintenance-picture.php:252
|
858 |
-
#: views/wp-maintenance-socialnetworks.php:138
|
859 |
-
msgid "Position"
|
860 |
-
msgstr "Position"
|
861 |
-
|
862 |
-
#: views/wp-maintenance-picture.php:254
|
863 |
-
msgid "Above logo"
|
864 |
-
msgstr "Au-dessus du logo"
|
865 |
-
|
866 |
-
#: views/wp-maintenance-picture.php:255
|
867 |
-
msgid "Below logo"
|
868 |
-
msgstr "Au-dessous du logo"
|
869 |
-
|
870 |
-
#: views/wp-maintenance-picture.php:256
|
871 |
-
msgid "Below title & text"
|
872 |
-
msgstr "Au-dessous du titre & texte"
|
873 |
-
|
874 |
-
#: views/wp-maintenance-picture.php:261
|
875 |
-
msgid "Choose picture"
|
876 |
-
msgstr "Choisissez l’image"
|
877 |
-
|
878 |
-
#: views/wp-maintenance-picture.php:292
|
879 |
-
msgid "Text:"
|
880 |
-
msgstr "Texte :"
|
881 |
-
|
882 |
-
#: views/wp-maintenance-picture.php:293
|
883 |
-
msgid "Link:"
|
884 |
-
msgstr "Lien :"
|
885 |
-
|
886 |
-
#: views/wp-maintenance-picture.php:295
|
887 |
-
msgid "Delete this slide"
|
888 |
-
msgstr "Supprimer ce slide"
|
889 |
-
|
890 |
-
#: views/wp-maintenance-seo.php:33
|
891 |
-
msgid "SEO options"
|
892 |
-
msgstr "Options SEO"
|
893 |
-
|
894 |
-
#: views/wp-maintenance-seo.php:43
|
895 |
msgid "Active SEO settings?"
|
896 |
msgstr "Activer les paramètres SEO ?"
|
897 |
|
898 |
-
#: views/wp-maintenance-seo.php:
|
899 |
msgid "Yes, active SEO"
|
900 |
msgstr "Oui, activer le SEO"
|
901 |
|
902 |
-
#: views/wp-maintenance-seo.php:
|
903 |
msgid "SEO Title & Description"
|
904 |
msgstr "Titre et description SEO"
|
905 |
|
906 |
-
#: views/wp-maintenance-seo.php:
|
907 |
msgid "SEO Meta Title"
|
908 |
msgstr "Méta Titre SEO"
|
909 |
|
910 |
-
#: views/wp-maintenance-seo.php:
|
911 |
msgid "SEO Meta Description"
|
912 |
msgstr "Méta description SEO"
|
913 |
|
914 |
-
#: views/wp-maintenance-seo.php:
|
915 |
msgid "Add a favicon"
|
916 |
msgstr "Ajouter un favicon"
|
917 |
|
918 |
-
#: views/wp-maintenance-seo.php:
|
919 |
msgid ""
|
920 |
"Favicons are displayed in a browser tab. Need Help <a href=\"https://"
|
921 |
"realfavicongenerator.net/\" target=\"_blank\">creating a favicon</a>?"
|
@@ -924,48 +806,30 @@ msgstr ""
|
|
924 |
"sur la <a href=\"http://tools.dynamicdrive.com/favicon/\" target=\"_blank"
|
925 |
"\">création d’un favicon</a> ?"
|
926 |
|
927 |
-
#: views/wp-maintenance-seo.php:
|
928 |
msgid "You use this favicon:"
|
929 |
msgstr "Vous utilisez ce favicon :"
|
930 |
|
931 |
-
#: views/wp-maintenance-
|
932 |
-
msgid "Analytics Code"
|
933 |
-
msgstr "Code Analytics"
|
934 |
-
|
935 |
-
#: views/wp-maintenance-seo.php:89
|
936 |
-
msgid "Enter your analytics tracking code here:"
|
937 |
-
msgstr "Enter votre ID de suivi Analytics ici :"
|
938 |
-
|
939 |
-
#: views/wp-maintenance-settings.php:67
|
940 |
-
msgid "Generals Settings"
|
941 |
-
msgstr "Paramètres généraux"
|
942 |
-
|
943 |
-
#: views/wp-maintenance-settings.php:75
|
944 |
msgid "Theme maintenance page"
|
945 |
msgstr "Page maintenance du thème"
|
946 |
|
947 |
-
#: views/wp-maintenance-settings.php:
|
948 |
msgid "Yes, I use a theme maintenance page"
|
949 |
msgstr "Oui, j’utilise une page de maintenance de mon thème"
|
950 |
|
951 |
-
#: views/wp-maintenance-settings.php:
|
952 |
-
msgid "You can use this shortcode to include Google Analytics code:"
|
953 |
-
msgstr ""
|
954 |
-
"Vous pouvez utiliser ce Shortcode pour include le code Google Analytics sur "
|
955 |
-
"votre page :"
|
956 |
-
|
957 |
-
#: views/wp-maintenance-settings.php:84
|
958 |
msgid "You can use this shortcode to include Social Networks icons:"
|
959 |
msgstr ""
|
960 |
"Vous pouvez utiliser ce Shortcode pour include les icons des réseaux sociaux "
|
961 |
"sur votre page :"
|
962 |
|
963 |
-
#: views/wp-maintenance-settings.php:
|
964 |
msgid "Delete custom settings upon plugin deactivation?"
|
965 |
msgstr ""
|
966 |
"Effacer les réglages personnalisés lors de la désactivation de l'extension ?"
|
967 |
|
968 |
-
#: views/wp-maintenance-settings.php:
|
969 |
msgid ""
|
970 |
"Yes, all custom settings will be deleted from database upon plugin "
|
971 |
"deactivation"
|
@@ -973,11 +837,11 @@ msgstr ""
|
|
973 |
"Oui, tous les paramètres personnalisés seront supprimés de la base de "
|
974 |
"données lors de la désactivation plugin"
|
975 |
|
976 |
-
#: views/wp-maintenance-settings.php:
|
977 |
msgid "Display code HTTP Error 503?"
|
978 |
msgstr "Afficher Code Erreur HTTP 503 ?"
|
979 |
|
980 |
-
#: views/wp-maintenance-settings.php:
|
981 |
msgid ""
|
982 |
"Yes, inform visitors and search engines that my site is temporarily "
|
983 |
"unavailable."
|
@@ -985,19 +849,19 @@ msgstr ""
|
|
985 |
"Oui, informer les visiteurs et les moteurs de recherche que mon site est "
|
986 |
"temporairement indisponible."
|
987 |
|
988 |
-
#: views/wp-maintenance-settings.php:
|
989 |
msgid "Roles and Capabilities"
|
990 |
msgstr "Rôles et capacités"
|
991 |
|
992 |
-
#: views/wp-maintenance-settings.php:
|
993 |
msgid "Allow the site to display these roles"
|
994 |
msgstr "Autoriser l'affichage du site à ces rôles"
|
995 |
|
996 |
-
#: views/wp-maintenance-settings.php:
|
997 |
msgid "IP autorized"
|
998 |
msgstr "IP autorisées"
|
999 |
|
1000 |
-
#: views/wp-maintenance-settings.php:
|
1001 |
msgid ""
|
1002 |
"Allow the site to display these IP addresses. Please, enter one IP address "
|
1003 |
"by line"
|
@@ -1005,11 +869,11 @@ msgstr ""
|
|
1005 |
"Autoriser l'affichage du site à ces adresses IP. Merci d'entrer 1 adresse IP "
|
1006 |
"par ligne"
|
1007 |
|
1008 |
-
#: views/wp-maintenance-settings.php:
|
1009 |
msgid "ID pages autorized"
|
1010 |
msgstr "ID de pages autorisées"
|
1011 |
|
1012 |
-
#: views/wp-maintenance-settings.php:
|
1013 |
msgid ""
|
1014 |
"Allow the site to display these ID pages. Please, enter the ID pages "
|
1015 |
"separate with comma"
|
@@ -1017,11 +881,11 @@ msgstr ""
|
|
1017 |
"Autoriser le site à afficher des pages d'ID. Merci d'entrer les ID de pages "
|
1018 |
"séparées par une virgule"
|
1019 |
|
1020 |
-
#: views/wp-maintenance-settings.php:
|
1021 |
msgid "Header Code"
|
1022 |
msgstr "Code pour l’entête"
|
1023 |
|
1024 |
-
#: views/wp-maintenance-settings.php:
|
1025 |
msgid ""
|
1026 |
"The following code will add to the <head> tag. Useful if you need to add "
|
1027 |
"additional scripts such as CSS or JS"
|
@@ -1029,102 +893,86 @@ msgstr ""
|
|
1029 |
"Le code suivant va être ajouter à la balise <head>. Très utile si vous avez "
|
1030 |
"besoin d'ajouter des scripts supplémentaires tels que CSS ou JS"
|
1031 |
|
1032 |
-
#: views/wp-maintenance-
|
1033 |
-
msgid "Export / Import Settings"
|
1034 |
-
msgstr "Réglages d’exportation / importation"
|
1035 |
-
|
1036 |
-
#: views/wp-maintenance-settings.php:167
|
1037 |
-
msgid "Export Settings"
|
1038 |
-
msgstr "Exporter les paramètres"
|
1039 |
-
|
1040 |
-
#: views/wp-maintenance-settings.php:171
|
1041 |
-
msgid "Export"
|
1042 |
-
msgstr "Exporter"
|
1043 |
-
|
1044 |
-
#: views/wp-maintenance-settings.php:176
|
1045 |
-
msgid ""
|
1046 |
-
"Import the plugin settings from a .json file. This file can be obtained by "
|
1047 |
-
"exporting the settings on another site using the form above"
|
1048 |
-
msgstr ""
|
1049 |
-
"Importer les paramètres du plugin depuis un fichier .json. Ce fichier peut "
|
1050 |
-
"être obtenu en exportant les paramètres sur un autre site en utilisant le "
|
1051 |
-
"formulaire ci-dessus"
|
1052 |
-
|
1053 |
-
#: views/wp-maintenance-settings.php:181
|
1054 |
-
msgid "Import"
|
1055 |
-
msgstr "Importer"
|
1056 |
-
|
1057 |
-
#: views/wp-maintenance-socialnetworks.php:56
|
1058 |
msgid "Enable social networks"
|
1059 |
msgstr "Activer les réseaux sociaux"
|
1060 |
|
1061 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1062 |
msgid "Yes, enable social networks options"
|
1063 |
msgstr "Oui, activer les options de réseaux sociaux"
|
1064 |
|
1065 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1066 |
msgid "List of Social networks"
|
1067 |
msgstr "Liste des réseaux sociaux"
|
1068 |
|
1069 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1070 |
msgid "Enter text for the title icons"
|
1071 |
msgstr "Entrez un texte pour la balise title des icônes"
|
1072 |
|
1073 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1074 |
-
msgid "Follow me on"
|
1075 |
-
msgstr "Suivez-moi sur"
|
1076 |
-
|
1077 |
-
#: views/wp-maintenance-socialnetworks.php:78
|
1078 |
msgid "Drad and drop the lines to put in the order you want"
|
1079 |
msgstr ""
|
1080 |
"Cliquez et glisser les lignes pour mettre dans l'ordre que vous souhaitez"
|
1081 |
|
1082 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1083 |
msgid "Social Networks Style"
|
1084 |
msgstr "Style pour les réseaux sociaux"
|
1085 |
|
1086 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1087 |
msgid "Choose icons size"
|
1088 |
msgstr "Choisissez la taille des icônes"
|
1089 |
|
1090 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1091 |
msgid "Choose icons style"
|
1092 |
msgstr "Choisissez le style des icônes"
|
1093 |
|
1094 |
-
#: views/wp-maintenance-socialnetworks.php:
|
|
|
|
|
|
|
|
|
1095 |
msgid "Top"
|
1096 |
msgstr "Haut"
|
1097 |
|
1098 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1099 |
msgid "Bottom"
|
1100 |
msgstr "Bas"
|
1101 |
|
1102 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1103 |
msgid "Align"
|
1104 |
msgstr "Alignement"
|
1105 |
|
1106 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1107 |
msgid "Left"
|
1108 |
msgstr "Gauche"
|
1109 |
|
1110 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1111 |
msgid "Center"
|
1112 |
msgstr "Centre"
|
1113 |
|
1114 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1115 |
msgid "Right"
|
1116 |
msgstr "Droite"
|
1117 |
|
1118 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1119 |
msgid "You have your own icons? Enter the folder name of your theme here"
|
1120 |
msgstr ""
|
1121 |
"Vous avez vos propres icônes ? Entrez le nom du dossier de votre thème ici"
|
1122 |
|
1123 |
-
#: views/wp-maintenance-socialnetworks.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1124 |
msgid "Reset Social Networks Icons Options"
|
1125 |
msgstr "Réinitialiser les paramètres des icônes des réseaux sociaux"
|
1126 |
|
1127 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1128 |
msgid "Yes, reset Social Networks Icons?"
|
1129 |
msgstr "Oui, réinitialiser les icônes des réseaux sociaux?"
|
1130 |
|
@@ -1150,6 +998,152 @@ msgstr "Florent Maillefaud"
|
|
1150 |
msgid "https://madeby.restezconnectes.fr"
|
1151 |
msgstr "https://madeby.restezconnectes.fr"
|
1152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1153 |
#~ msgid "You use a pattern. Remove pattern for use image background."
|
1154 |
#~ msgstr ""
|
1155 |
#~ "Vous utilisez un motif. Supprimer le modèle pour utiliser l’arrière-plan "
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP Maintenance\n"
|
4 |
+
"POT-Creation-Date: 2022-06-05 17:13+0200\n"
|
5 |
+
"PO-Revision-Date: 2022-06-05 17:13+0200\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"Language: fr_FR\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
|
12 |
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
13 |
+
"X-Generator: Poedit 3.0.1\n"
|
14 |
+
"X-Poedit-Basepath: ..\n"
|
15 |
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
|
16 |
"X-Poedit-WPHeader: wp-maintenance.php\n"
|
17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
21 |
"X-Poedit-SearchPath-0: .\n"
|
22 |
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
23 |
|
24 |
+
#: classes/countdown.php:45
|
25 |
msgid "Days"
|
26 |
msgstr "Jours"
|
27 |
|
28 |
+
#: classes/countdown.php:45
|
29 |
msgid "Hours"
|
30 |
msgstr "Heures"
|
31 |
|
32 |
+
#: classes/countdown.php:45
|
33 |
msgid "Minutes"
|
34 |
msgstr "Minutes"
|
35 |
|
36 |
+
#: classes/countdown.php:47
|
37 |
msgid "Seconds"
|
38 |
msgstr "Secondes"
|
39 |
|
40 |
+
#: classes/wp-maintenance.php:64
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
msgid "This site is down for maintenance"
|
42 |
msgstr "Ce site est fermé pour maintenance"
|
43 |
|
44 |
+
#: classes/wp-maintenance.php:65
|
45 |
msgid "Come back quickly!"
|
46 |
msgstr "Nous revenons rapidement !"
|
47 |
|
48 |
+
#: classes/wp-maintenance.php:189 views/wp-maintenance-socialnetworks.php:78
|
49 |
+
msgid "Follow me on"
|
50 |
+
msgstr "Suivez-moi sur"
|
51 |
+
|
52 |
+
#: classes/wp-maintenance.php:262 classes/wp-maintenance.php:276
|
53 |
+
#: classes/wp-maintenance.php:398 classes/wp-maintenance.php:428
|
54 |
+
#: includes/functions.php:93
|
55 |
msgid "Settings"
|
56 |
msgstr "Réglages"
|
57 |
|
58 |
+
#: classes/wp-maintenance.php:265
|
59 |
+
msgid "Uninstall"
|
60 |
+
msgstr "Désinstaller"
|
61 |
+
|
62 |
#. Plugin Name of the plugin/theme
|
63 |
+
#: classes/wp-maintenance.php:305 includes/functions.php:119
|
64 |
msgid "WP Maintenance"
|
65 |
msgstr "WP Maintenance"
|
66 |
|
67 |
+
#: classes/wp-maintenance.php:328
|
68 |
msgid "Colors"
|
69 |
msgstr "Couleurs"
|
70 |
|
71 |
+
#: classes/wp-maintenance.php:338 classes/wp-maintenance.php:422
|
72 |
+
#: includes/functions.php:57
|
73 |
msgid "Pictures"
|
74 |
msgstr "Images"
|
75 |
|
76 |
+
#: classes/wp-maintenance.php:348 includes/functions.php:63
|
77 |
msgid "Countdown"
|
78 |
msgstr "Compte à rebours"
|
79 |
|
80 |
+
#: classes/wp-maintenance.php:358 includes/functions.php:69
|
|
|
81 |
msgid "CSS"
|
82 |
msgstr "CSS"
|
83 |
|
84 |
+
#: classes/wp-maintenance.php:368 classes/wp-maintenance.php:427
|
85 |
+
#: includes/functions.php:87
|
86 |
msgid "Footer"
|
87 |
msgstr "Pied de page"
|
88 |
|
89 |
+
#: classes/wp-maintenance.php:378 classes/wp-maintenance.php:425
|
90 |
+
#: includes/functions.php:75
|
91 |
msgid "SEO"
|
92 |
msgstr "SEO"
|
93 |
|
94 |
+
#: classes/wp-maintenance.php:388 classes/wp-maintenance.php:426
|
95 |
+
#: includes/functions.php:81
|
96 |
msgid "Social Networks"
|
97 |
msgstr "Réseaux sociaux"
|
98 |
|
99 |
+
#: classes/wp-maintenance.php:420
|
100 |
msgid "General"
|
101 |
msgstr "Général"
|
102 |
|
103 |
+
#: classes/wp-maintenance.php:421
|
104 |
msgid "Colors & Fonts"
|
105 |
msgstr "Couleurs & Polices"
|
106 |
|
107 |
+
#: classes/wp-maintenance.php:423
|
108 |
msgid "CountDown"
|
109 |
msgstr "Compte à rebours"
|
110 |
|
111 |
+
#: classes/wp-maintenance.php:424
|
112 |
msgid "CSS Style"
|
113 |
msgstr "Style CSS"
|
114 |
|
115 |
+
#: classes/wp-maintenance.php:474
|
116 |
msgid "Choose This Image"
|
117 |
msgstr "Choisir cette image"
|
118 |
|
119 |
+
#: classes/wp-maintenance.php:475
|
120 |
msgid "Choose Image"
|
121 |
msgstr "Choisir une image"
|
122 |
|
123 |
+
#: classes/wp-maintenance.php:492 classes/wp-maintenance.php:500
|
124 |
+
#: classes/wp-maintenance.php:508 classes/wp-maintenance.php:517
|
125 |
+
#: classes/wp-maintenance.php:526 classes/wp-maintenance.php:535
|
126 |
+
#: classes/wp-maintenance.php:544 classes/wp-maintenance.php:553
|
127 |
+
#: classes/wp-maintenance.php:562
|
128 |
msgid "You do not have sufficient privileges to access this page."
|
129 |
msgstr ""
|
130 |
"Vous n'avez pas les autorisations suffisantes pour accéder à cette page."
|
131 |
|
132 |
+
#: includes/functions.php:45 themes/default/functions.php:61
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
msgid "Dashboard"
|
134 |
msgstr "Tableau de bord"
|
135 |
|
136 |
+
#: includes/functions.php:46
|
137 |
msgid "Here, the beginning..."
|
138 |
msgstr "Ici, le commencement…"
|
139 |
|
140 |
+
#: includes/functions.php:51
|
141 |
msgid "Colors and Fonts"
|
142 |
msgstr "Couleurs et polices"
|
143 |
|
144 |
+
#: includes/functions.php:52
|
145 |
msgid "Have a creative mind"
|
146 |
msgstr "Ayez un esprit créatif"
|
147 |
|
148 |
+
#: includes/functions.php:58
|
149 |
msgid "Are we playing with the images?"
|
150 |
msgstr "Est-ce qu’on joue avec les images ?"
|
151 |
|
152 |
+
#: includes/functions.php:64
|
153 |
msgid "Stop the time... or not!"
|
154 |
msgstr "Arrêtez le temps... Ou pas!"
|
155 |
|
156 |
+
#: includes/functions.php:70
|
157 |
msgid "Customize the style sheet"
|
158 |
msgstr "Personnaliser la feuille de style"
|
159 |
|
160 |
+
#: includes/functions.php:76
|
161 |
msgid "Keep your site optimized"
|
162 |
msgstr "Gardez votre site optimisé"
|
163 |
|
164 |
+
#: includes/functions.php:82
|
165 |
msgid "Adding social networks icons"
|
166 |
msgstr "Ajout d’icônes de réseaux sociaux"
|
167 |
|
168 |
+
#: includes/functions.php:88
|
169 |
msgid "Here, we are talking about the footer"
|
170 |
msgstr "Ici, nous parlons du pied de page"
|
171 |
|
172 |
+
#: includes/functions.php:94
|
173 |
msgid "A few additional options"
|
174 |
msgstr "Quelques options supplémentaires"
|
175 |
|
176 |
+
#: includes/functions.php:109
|
|
|
|
|
|
|
|
|
177 |
msgid "Preview page"
|
178 |
msgstr "Aperçu"
|
179 |
|
180 |
+
#: includes/functions.php:119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
msgid "is brought to you by"
|
182 |
msgstr "vous est proposé par"
|
183 |
|
184 |
+
#: includes/functions.php:119
|
185 |
msgid "If you found this plugin useful"
|
186 |
msgstr "Si vous avez trouvé cette extension utile"
|
187 |
|
188 |
+
#: includes/functions.php:119
|
189 |
msgid "give it 5 ★ on WordPress.org"
|
190 |
msgstr "donnez-lui 5 ★ sur WordPress.org"
|
191 |
|
192 |
+
#: includes/shortcodes.php:40
|
193 |
+
msgid "Send me a"
|
194 |
+
msgstr "Envoyez-moi un"
|
195 |
+
|
196 |
+
#: views/wp-maintenance-colors.php:39 views/wp-maintenance-countdown.php:25
|
197 |
+
#: views/wp-maintenance-css.php:32 views/wp-maintenance-dashboard.php:29
|
198 |
+
#: views/wp-maintenance-footer.php:25 views/wp-maintenance-picture.php:64
|
199 |
+
#: views/wp-maintenance-seo.php:24 views/wp-maintenance-settings.php:59
|
200 |
+
#: views/wp-maintenance-socialnetworks.php:38
|
201 |
+
msgid "WP Maintenance - Settings"
|
202 |
+
msgstr "WP Maintenance - Paramètres"
|
203 |
+
|
204 |
+
#: views/wp-maintenance-colors.php:41 views/wp-maintenance-countdown.php:27
|
205 |
+
#: views/wp-maintenance-css.php:34 views/wp-maintenance-dashboard.php:31
|
206 |
+
#: views/wp-maintenance-footer.php:27 views/wp-maintenance-picture.php:66
|
207 |
+
#: views/wp-maintenance-seo.php:26 views/wp-maintenance-settings.php:61
|
208 |
+
#: views/wp-maintenance-socialnetworks.php:40
|
209 |
+
msgid "Options saved."
|
210 |
+
msgstr "Options sauvegardées."
|
211 |
+
|
212 |
+
#: views/wp-maintenance-colors.php:59
|
213 |
msgid "Choice general colors"
|
214 |
msgstr "Choix des couleurs générales"
|
215 |
|
216 |
+
#: views/wp-maintenance-colors.php:62
|
217 |
msgid "Background page color"
|
218 |
msgstr "Couleur du fond de page"
|
219 |
|
220 |
+
#: views/wp-maintenance-colors.php:64
|
221 |
msgid "Header color"
|
222 |
msgstr "Couleur d’en-tête"
|
223 |
|
224 |
+
#: views/wp-maintenance-colors.php:68 views/wp-maintenance-colors.php:110
|
225 |
+
#: views/wp-maintenance-colors.php:152 views/wp-maintenance-colors.php:181
|
226 |
+
#: views/wp-maintenance-colors.php:228 views/wp-maintenance-colors.php:273
|
227 |
+
#: views/wp-maintenance-colors.php:342 views/wp-maintenance-countdown.php:51
|
228 |
+
#: views/wp-maintenance-countdown.php:94 views/wp-maintenance-countdown.php:137
|
229 |
+
#: views/wp-maintenance-css.php:61 views/wp-maintenance-dashboard.php:56
|
230 |
+
#: views/wp-maintenance-dashboard.php:81 views/wp-maintenance-dashboard.php:109
|
231 |
+
#: views/wp-maintenance-footer.php:75 views/wp-maintenance-footer.php:98
|
232 |
+
#: views/wp-maintenance-picture.php:102 views/wp-maintenance-picture.php:158
|
233 |
+
#: views/wp-maintenance-picture.php:198 views/wp-maintenance-seo.php:55
|
234 |
+
#: views/wp-maintenance-seo.php:69 views/wp-maintenance-seo.php:88
|
235 |
+
#: views/wp-maintenance-settings.php:106 views/wp-maintenance-settings.php:133
|
236 |
+
#: views/wp-maintenance-settings.php:147 views/wp-maintenance-settings.php:161
|
237 |
+
#: views/wp-maintenance-settings.php:175
|
238 |
+
#: views/wp-maintenance-socialnetworks.php:68
|
239 |
+
#: views/wp-maintenance-socialnetworks.php:135
|
240 |
+
#: views/wp-maintenance-socialnetworks.php:198
|
241 |
+
#: views/wp-maintenance-socialnetworks.php:211
|
|
|
242 |
msgid "Save"
|
243 |
msgstr "Enregistrer"
|
244 |
|
245 |
+
#: views/wp-maintenance-colors.php:75
|
246 |
msgid "Title Settings"
|
247 |
msgstr "Réglages du titre"
|
248 |
|
249 |
+
#: views/wp-maintenance-colors.php:78
|
250 |
msgid "Choice title font and color"
|
251 |
msgstr "Choisir les polices et couleurs des titres"
|
252 |
|
253 |
+
#: views/wp-maintenance-colors.php:79
|
254 |
msgid "Set the color and font of the title"
|
255 |
msgstr "Définir la couleur et la police du titre"
|
256 |
|
257 |
+
#: views/wp-maintenance-colors.php:82 views/wp-maintenance-colors.php:124
|
258 |
msgid "Choose font color"
|
259 |
msgstr "Choisissez la couleur de la police"
|
260 |
|
261 |
+
#: views/wp-maintenance-colors.php:87 views/wp-maintenance-colors.php:129
|
262 |
+
#: views/wp-maintenance-colors.php:250 views/wp-maintenance-colors.php:293
|
263 |
msgid "Choose Size and Style"
|
264 |
msgstr "Choisissez la taille et le style"
|
265 |
|
266 |
+
#: views/wp-maintenance-colors.php:97 views/wp-maintenance-colors.php:139
|
267 |
+
#: views/wp-maintenance-colors.php:260 views/wp-maintenance-colors.php:303
|
268 |
msgid "bold"
|
269 |
msgstr "gras"
|
270 |
|
271 |
+
#: views/wp-maintenance-colors.php:102 views/wp-maintenance-colors.php:144
|
272 |
+
#: views/wp-maintenance-colors.php:265 views/wp-maintenance-colors.php:308
|
273 |
msgid "Italic"
|
274 |
msgstr "Italique"
|
275 |
|
276 |
+
#: views/wp-maintenance-colors.php:117
|
277 |
msgid "Text Settings"
|
278 |
msgstr "Paramètres du texte"
|
279 |
|
280 |
+
#: views/wp-maintenance-colors.php:120
|
281 |
msgid "Choice text font and color"
|
282 |
msgstr "Choix des polices et couleurs des textes"
|
283 |
|
284 |
+
#: views/wp-maintenance-colors.php:121
|
285 |
msgid "Set the color and font of the text"
|
286 |
msgstr "Définir la couleur et la police du texte"
|
287 |
|
288 |
+
#: views/wp-maintenance-colors.php:158
|
289 |
msgid "Frame Settings"
|
290 |
msgstr "Paramètres du cadre"
|
291 |
|
292 |
+
#: views/wp-maintenance-colors.php:162
|
293 |
msgid "Yes, enable frame"
|
294 |
msgstr "Oui, activer le cadre"
|
295 |
|
296 |
+
#: views/wp-maintenance-colors.php:168
|
297 |
msgid "Choice frame color and style"
|
298 |
msgstr "Choisir la couleur et le style du cadre"
|
299 |
|
300 |
+
#: views/wp-maintenance-colors.php:171
|
301 |
msgid "Choose frame color"
|
302 |
msgstr "Choisir les couleurs du cadre"
|
303 |
|
304 |
+
#: views/wp-maintenance-colors.php:176
|
305 |
msgid "Choose Style"
|
306 |
msgstr "Choisissez le style"
|
307 |
|
308 |
+
#: views/wp-maintenance-colors.php:177
|
309 |
msgid "Opacity"
|
310 |
msgstr "Opacité"
|
311 |
|
312 |
+
#: views/wp-maintenance-colors.php:178
|
313 |
msgid "Width"
|
314 |
msgstr "Largeur"
|
315 |
|
316 |
+
#: views/wp-maintenance-colors.php:190
|
317 |
msgid "Countdown Settings"
|
318 |
msgstr "Paramètres du compte à rebours"
|
319 |
|
320 |
+
#: views/wp-maintenance-colors.php:193
|
321 |
msgid "Choice Countdown font, colors and style"
|
322 |
msgstr "Choix des polices et couleurs du compte à rebours"
|
323 |
|
324 |
+
#: views/wp-maintenance-colors.php:196
|
325 |
msgid "Countdown text color"
|
326 |
msgstr "Couleur du texte du compteur"
|
327 |
|
328 |
+
#: views/wp-maintenance-colors.php:201
|
329 |
msgid "Countdown background color"
|
330 |
msgstr "Couleur du fond du compteur"
|
331 |
|
332 |
+
#: views/wp-maintenance-colors.php:206
|
333 |
msgid "Choose font"
|
334 |
msgstr "Choisissez la police"
|
335 |
|
336 |
+
#: views/wp-maintenance-colors.php:218
|
337 |
+
msgid "Choose font for end text"
|
338 |
+
msgstr "Choisir la police pour le texte de fin"
|
339 |
+
|
340 |
+
#: views/wp-maintenance-colors.php:235
|
341 |
msgid "Footer settings"
|
342 |
msgstr "Paramètres du pied de page"
|
343 |
|
344 |
+
#: views/wp-maintenance-colors.php:237
|
345 |
msgid "Choice footer font, colors and style"
|
346 |
msgstr "Choix des polices, couleurs et le style du pied de page"
|
347 |
|
348 |
+
#: views/wp-maintenance-colors.php:240
|
349 |
msgid "Text color"
|
350 |
msgstr "Couleur du texte"
|
351 |
|
352 |
+
#: views/wp-maintenance-colors.php:245
|
353 |
msgid "Background color"
|
354 |
msgstr "Couleur du fond"
|
355 |
|
356 |
+
#: views/wp-maintenance-colors.php:280
|
357 |
msgid "Form color settings"
|
358 |
msgstr "Paramètres de couleur du formulaire"
|
359 |
|
360 |
+
#: views/wp-maintenance-colors.php:282
|
361 |
msgid "Choice form colors"
|
362 |
msgstr "Choisir les couleurs du formulaire"
|
363 |
|
364 |
+
#: views/wp-maintenance-colors.php:321
|
365 |
msgid "Field text color"
|
366 |
msgstr "Couleur du texte dans les champs"
|
367 |
|
368 |
+
#: views/wp-maintenance-colors.php:323
|
369 |
msgid "Field border color"
|
370 |
msgstr "Couleur de bordure des champs"
|
371 |
|
372 |
+
#: views/wp-maintenance-colors.php:325
|
373 |
msgid "Field background color"
|
374 |
msgstr "Couleur de fond des champs"
|
375 |
|
376 |
+
#: views/wp-maintenance-colors.php:327
|
377 |
msgid "Button text color"
|
378 |
msgstr "Couleur du texte dans le bouton"
|
379 |
|
380 |
+
#: views/wp-maintenance-colors.php:331
|
381 |
msgid "Button color"
|
382 |
msgstr "Couleur du bouton"
|
383 |
|
384 |
+
#: views/wp-maintenance-colors.php:333
|
385 |
msgid "Button color hover"
|
386 |
msgstr "Couleur du bouton au survol"
|
387 |
|
388 |
+
#: views/wp-maintenance-colors.php:335
|
389 |
msgid "Button color onclick"
|
390 |
msgstr "Couleur du bouton au click"
|
391 |
|
392 |
+
#: views/wp-maintenance-colors.php:346
|
393 |
#, php-format
|
394 |
msgid "Enable %s to customize the forms"
|
395 |
msgstr "Activer %s pour personnaliser les formulaires"
|
396 |
|
397 |
+
#: views/wp-maintenance-colors.php:346
|
398 |
msgid "newsletter option"
|
399 |
msgstr "options de newsletter"
|
400 |
|
401 |
+
#: views/wp-maintenance-colors.php:350
|
402 |
msgid "Enable Mailpoet or MailChimp extensions to customize the forms"
|
403 |
msgstr ""
|
404 |
"Activer les extensions Mailpoet ou MailChimp personnaliser les formulaires"
|
405 |
|
406 |
+
#: views/wp-maintenance-countdown.php:44
|
|
|
|
|
|
|
|
|
407 |
msgid "Enable a countdown"
|
408 |
msgstr "Activer un compte à rebours"
|
409 |
|
410 |
+
#: views/wp-maintenance-countdown.php:46
|
411 |
msgid "Yes, enable a countdown"
|
412 |
msgstr "Oui, activer un compte à rebours"
|
413 |
|
414 |
+
#: views/wp-maintenance-countdown.php:56
|
415 |
msgid "Date/time Launch"
|
416 |
msgstr "Date / heure du lancement"
|
417 |
|
418 |
+
#: views/wp-maintenance-countdown.php:59
|
419 |
msgid "Select the launch date/time"
|
420 |
msgstr "Sélectionner une date et heure de lancement"
|
421 |
|
422 |
+
#: views/wp-maintenance-countdown.php:91
|
423 |
msgid "at"
|
424 |
msgstr "à"
|
425 |
|
426 |
+
#: views/wp-maintenance-countdown.php:99
|
427 |
msgid "Others Settings"
|
428 |
msgstr "Autres paramètres"
|
429 |
|
430 |
+
#: views/wp-maintenance-countdown.php:102
|
431 |
msgid "Enable seconds ?"
|
432 |
msgstr "Afficher les secondes ?"
|
433 |
|
434 |
+
#: views/wp-maintenance-countdown.php:105
|
435 |
msgid "Yes, enable seconds"
|
436 |
msgstr "Oui, activer les secondes"
|
437 |
|
438 |
+
#: views/wp-maintenance-countdown.php:110
|
439 |
msgid "Disable maintenance mode at the end of the countdown?"
|
440 |
msgstr "Désactiver le mode maintenance à la fin du compte à rebours ?"
|
441 |
|
442 |
+
#: views/wp-maintenance-countdown.php:112
|
443 |
msgid "Yes, disable maintenance mode at the end of countdown"
|
444 |
msgstr "Oui, désactiver le mode maintenance à la fin du compte à rebours"
|
445 |
|
446 |
+
#: views/wp-maintenance-countdown.php:117
|
447 |
msgid "End message after end countdown"
|
448 |
msgstr "Message de fin après le compte à rebours"
|
449 |
|
552 |
msgid "Select a year"
|
553 |
msgstr "Sélectionner une année"
|
554 |
|
555 |
+
#: views/wp-maintenance-css.php:18
|
556 |
msgid "The Style Sheet has been reset!"
|
557 |
msgstr "La feuille de style a bien été réinitilisée !"
|
558 |
|
566 |
"Cliquez sur « Réinitialisation » et « Enregistrer » pour récupérer la "
|
567 |
"feuille de style par défaut."
|
568 |
|
569 |
+
#: views/wp-maintenance-css.php:55
|
570 |
msgid "Yes, reset style sheet"
|
571 |
msgstr "Oui, réinitialisez la feuille de style"
|
572 |
|
594 |
msgid "Use this code for countdown color"
|
595 |
msgstr "Utiliser ce code pour la couleur du texte du compte à rebours"
|
596 |
|
597 |
+
#: views/wp-maintenance-css.php:72
|
598 |
+
msgid "Use this code for bottom text color"
|
599 |
+
msgstr "Utiliser ce code pour la couleur du texte de bas de page"
|
600 |
+
|
601 |
+
#: views/wp-maintenance-css.php:76
|
602 |
msgid "Need CSS code for MailPoet plugin?"
|
603 |
msgstr "Besoin de code CSS pour le plugin MailPoet ?"
|
604 |
|
605 |
+
#: views/wp-maintenance-css.php:77 views/wp-maintenance-css.php:92
|
606 |
msgid "Click for select all"
|
607 |
msgstr "Cliquez pour tout sélectionner"
|
608 |
|
609 |
+
#: views/wp-maintenance-css.php:91
|
610 |
msgid "Need CSS code for MailChimp plugin?"
|
611 |
msgstr "Besoin de code CSS pour le plugin MailChimp ?"
|
612 |
|
613 |
+
#: views/wp-maintenance-dashboard.php:48
|
614 |
msgid "Activate maintenance mode"
|
615 |
msgstr "Activer le mode maintenance"
|
616 |
|
617 |
+
#: views/wp-maintenance-dashboard.php:51
|
618 |
msgid "Yes, enable maintenance mode"
|
619 |
msgstr "Oui, activer le mode maintenance"
|
620 |
|
621 |
+
#: views/wp-maintenance-dashboard.php:61
|
622 |
msgid "Title and text"
|
623 |
msgstr "Titre et texte"
|
624 |
|
625 |
+
#: views/wp-maintenance-dashboard.php:87
|
626 |
msgid "Activate newsletter block"
|
627 |
msgstr "Activer un encart newsletter"
|
628 |
|
629 |
+
#: views/wp-maintenance-dashboard.php:89
|
630 |
msgid "Yes, enable newsletter block"
|
631 |
msgstr "Oui, activer un encart newsletter"
|
632 |
|
633 |
+
#: views/wp-maintenance-dashboard.php:96
|
634 |
msgid "Enter title for the newletter block"
|
635 |
msgstr "Entrez un titre pour l'encart de la newsletter"
|
636 |
|
637 |
+
#: views/wp-maintenance-dashboard.php:101
|
638 |
msgid "Type of the newletter block"
|
639 |
msgstr "Type d’encart newsletter"
|
640 |
|
641 |
+
#: views/wp-maintenance-dashboard.php:102
|
642 |
msgid "Enter your newletter shortcode here:"
|
643 |
msgstr "Entrez le Shortcode de la newletter ici :"
|
644 |
|
645 |
+
#: views/wp-maintenance-dashboard.php:104
|
646 |
msgid "Or enter your newletter iframe code here:"
|
647 |
msgstr "Ou entrez le code iframe de la newsletter ici :"
|
648 |
|
649 |
+
#: views/wp-maintenance-footer.php:45
|
650 |
msgid "Enable Footer?"
|
651 |
msgstr "Activer le pied de page ?"
|
652 |
|
653 |
+
#: views/wp-maintenance-footer.php:49
|
654 |
msgid "Yes, enable footer"
|
655 |
msgstr "Oui, activer le pied de page"
|
656 |
|
657 |
+
#: views/wp-maintenance-footer.php:56
|
658 |
msgid "Text in the footer"
|
659 |
msgstr "Texte dans le pied de page"
|
660 |
|
661 |
+
#: views/wp-maintenance-footer.php:82
|
662 |
msgid "Add a link to dashboard in the footer?"
|
663 |
msgstr "Ajouter un lien vers le tableau de bord dans le pied de page ?"
|
664 |
|
665 |
+
#: views/wp-maintenance-footer.php:86
|
666 |
msgid "Yes, show text and link to go to the dashboard"
|
667 |
msgstr "Oui, afficher le texte et le lien pour aller au tableau de bord"
|
668 |
|
669 |
+
#: views/wp-maintenance-footer.php:93
|
670 |
+
msgid "Enter your text and #DASHBOARD shortcode"
|
671 |
+
msgstr "Entrez votre texte et le code court #DASHBOARD"
|
672 |
|
673 |
+
#: views/wp-maintenance-footer.php:95
|
674 |
+
msgid "Eg: connect to #DASHBOARD here!"
|
675 |
+
msgstr "Ex : Connectez vous au #DASHBOARD% ici !"
|
676 |
|
677 |
+
#: views/wp-maintenance-footer.php:95
|
678 |
msgid ""
|
679 |
+
"(#DASHBOARD will be replaced with the link to the dashboard and the word "
|
680 |
"\"Dashboard\")"
|
681 |
msgstr ""
|
682 |
+
"(#DASHBOARD sera remplacé par le mot \"Tableau de bord\" et le lien vers "
|
683 |
"celui-ci)"
|
684 |
|
685 |
+
#: views/wp-maintenance-picture.php:84
|
|
|
|
|
|
|
|
|
686 |
msgid "Header picture"
|
687 |
msgstr "Image d'entête"
|
688 |
|
689 |
+
#: views/wp-maintenance-picture.php:87
|
690 |
msgid "Choice you picture for header page"
|
691 |
msgstr "Choix de votre image pour l’en-tête de page"
|
692 |
|
693 |
+
#: views/wp-maintenance-picture.php:89 views/wp-maintenance-picture.php:125
|
694 |
+
#: views/wp-maintenance-seo.php:78
|
695 |
msgid "Enter a URL or upload an image"
|
696 |
msgstr "Entrez une url ou mettez en ligne une image"
|
697 |
|
698 |
+
#: views/wp-maintenance-picture.php:91 views/wp-maintenance-picture.php:126
|
699 |
+
#: views/wp-maintenance-seo.php:79
|
700 |
msgid "Media Image Library"
|
701 |
msgstr "Bibliothèque d'Images"
|
702 |
|
703 |
+
#: views/wp-maintenance-picture.php:92
|
704 |
msgid ""
|
705 |
"URL path to image to replace default picture. (You can upload your image "
|
706 |
"with the WordPress media uploader)"
|
708 |
"Url de l'image pour remplacer le logo WordPress par défaut. (Vous pouvez "
|
709 |
"envoyer votre image avec l'outil d'envoi de médias interne à WordPress)"
|
710 |
|
711 |
+
#: views/wp-maintenance-picture.php:93
|
712 |
+
msgid "Width:"
|
713 |
+
msgstr "Largeur :"
|
714 |
+
|
715 |
+
#: views/wp-maintenance-picture.php:94
|
716 |
+
msgid "Height:"
|
717 |
+
msgstr "Hauteur :"
|
718 |
+
|
719 |
+
#: views/wp-maintenance-picture.php:97
|
720 |
+
#: views/wp-maintenance-socialnetworks.php:193
|
721 |
msgid "You use this picture:"
|
722 |
msgstr "Image actuelle :"
|
723 |
|
724 |
+
#: views/wp-maintenance-picture.php:97 views/wp-maintenance-picture.php:133
|
725 |
msgid "Remove"
|
726 |
msgstr "Supprimer"
|
727 |
|
728 |
+
#: views/wp-maintenance-picture.php:108
|
729 |
msgid "Background picture"
|
730 |
msgstr "Image d’arrière-plan"
|
731 |
|
732 |
+
#: views/wp-maintenance-picture.php:111
|
733 |
msgid "Disable background or pattern picture"
|
734 |
msgstr "Désactiver l’image d’arrière-plan ou de motif"
|
735 |
|
736 |
+
#: views/wp-maintenance-picture.php:118
|
737 |
msgid "Yes, activate picture background"
|
738 |
msgstr "Oui, activez une image l’arrière-plan"
|
739 |
|
740 |
+
#: views/wp-maintenance-picture.php:129
|
741 |
msgid "You use this background picture:"
|
742 |
msgstr "Image de fond actuelle :"
|
743 |
|
744 |
+
#: views/wp-maintenance-picture.php:139
|
745 |
msgid "Background picture options"
|
746 |
msgstr "Options de l'image de fond"
|
747 |
|
748 |
+
#: views/wp-maintenance-picture.php:147
|
749 |
msgid "Background Opacity"
|
750 |
msgstr "Opacité de l’arrière-plan"
|
751 |
|
752 |
+
#: views/wp-maintenance-picture.php:152
|
753 |
msgid "Fix the background picture"
|
754 |
msgstr "Image de fond fixe"
|
755 |
|
756 |
+
#: views/wp-maintenance-picture.php:164
|
757 |
msgid "Pattern picture"
|
758 |
msgstr "Image de motif"
|
759 |
|
760 |
+
#: views/wp-maintenance-picture.php:168
|
761 |
msgid "Yes, activate pattern background"
|
762 |
msgstr "Oui, activez un motif de fond"
|
763 |
|
764 |
+
#: views/wp-maintenance-picture.php:176
|
765 |
msgid "Choose a pattern"
|
766 |
msgstr "Choisissez un motif de fond"
|
767 |
|
768 |
+
#: views/wp-maintenance-picture.php:179
|
769 |
msgid "NO PATTERN"
|
770 |
msgstr "AUCUN PATTERN"
|
771 |
|
772 |
+
#: views/wp-maintenance-picture.php:192
|
773 |
msgid "You use this pattern"
|
774 |
msgstr "Vous utilisez ce modèle"
|
775 |
|
776 |
+
#: views/wp-maintenance-seo.php:44
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
777 |
msgid "Active SEO settings?"
|
778 |
msgstr "Activer les paramètres SEO ?"
|
779 |
|
780 |
+
#: views/wp-maintenance-seo.php:48
|
781 |
msgid "Yes, active SEO"
|
782 |
msgstr "Oui, activer le SEO"
|
783 |
|
784 |
+
#: views/wp-maintenance-seo.php:57
|
785 |
msgid "SEO Title & Description"
|
786 |
msgstr "Titre et description SEO"
|
787 |
|
788 |
+
#: views/wp-maintenance-seo.php:60
|
789 |
msgid "SEO Meta Title"
|
790 |
msgstr "Méta Titre SEO"
|
791 |
|
792 |
+
#: views/wp-maintenance-seo.php:65
|
793 |
msgid "SEO Meta Description"
|
794 |
msgstr "Méta description SEO"
|
795 |
|
796 |
+
#: views/wp-maintenance-seo.php:75
|
797 |
msgid "Add a favicon"
|
798 |
msgstr "Ajouter un favicon"
|
799 |
|
800 |
+
#: views/wp-maintenance-seo.php:80
|
801 |
msgid ""
|
802 |
"Favicons are displayed in a browser tab. Need Help <a href=\"https://"
|
803 |
"realfavicongenerator.net/\" target=\"_blank\">creating a favicon</a>?"
|
806 |
"sur la <a href=\"http://tools.dynamicdrive.com/favicon/\" target=\"_blank"
|
807 |
"\">création d’un favicon</a> ?"
|
808 |
|
809 |
+
#: views/wp-maintenance-seo.php:83
|
810 |
msgid "You use this favicon:"
|
811 |
msgstr "Vous utilisez ce favicon :"
|
812 |
|
813 |
+
#: views/wp-maintenance-settings.php:77
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
814 |
msgid "Theme maintenance page"
|
815 |
msgstr "Page maintenance du thème"
|
816 |
|
817 |
+
#: views/wp-maintenance-settings.php:79
|
818 |
msgid "Yes, I use a theme maintenance page"
|
819 |
msgstr "Oui, j’utilise une page de maintenance de mon thème"
|
820 |
|
821 |
+
#: views/wp-maintenance-settings.php:86
|
|
|
|
|
|
|
|
|
|
|
|
|
822 |
msgid "You can use this shortcode to include Social Networks icons:"
|
823 |
msgstr ""
|
824 |
"Vous pouvez utiliser ce Shortcode pour include les icons des réseaux sociaux "
|
825 |
"sur votre page :"
|
826 |
|
827 |
+
#: views/wp-maintenance-settings.php:90
|
828 |
msgid "Delete custom settings upon plugin deactivation?"
|
829 |
msgstr ""
|
830 |
"Effacer les réglages personnalisés lors de la désactivation de l'extension ?"
|
831 |
|
832 |
+
#: views/wp-maintenance-settings.php:92
|
833 |
msgid ""
|
834 |
"Yes, all custom settings will be deleted from database upon plugin "
|
835 |
"deactivation"
|
837 |
"Oui, tous les paramètres personnalisés seront supprimés de la base de "
|
838 |
"données lors de la désactivation plugin"
|
839 |
|
840 |
+
#: views/wp-maintenance-settings.php:99
|
841 |
msgid "Display code HTTP Error 503?"
|
842 |
msgstr "Afficher Code Erreur HTTP 503 ?"
|
843 |
|
844 |
+
#: views/wp-maintenance-settings.php:101
|
845 |
msgid ""
|
846 |
"Yes, inform visitors and search engines that my site is temporarily "
|
847 |
"unavailable."
|
849 |
"Oui, informer les visiteurs et les moteurs de recherche que mon site est "
|
850 |
"temporairement indisponible."
|
851 |
|
852 |
+
#: views/wp-maintenance-settings.php:113
|
853 |
msgid "Roles and Capabilities"
|
854 |
msgstr "Rôles et capacités"
|
855 |
|
856 |
+
#: views/wp-maintenance-settings.php:115
|
857 |
msgid "Allow the site to display these roles"
|
858 |
msgstr "Autoriser l'affichage du site à ces rôles"
|
859 |
|
860 |
+
#: views/wp-maintenance-settings.php:140
|
861 |
msgid "IP autorized"
|
862 |
msgstr "IP autorisées"
|
863 |
|
864 |
+
#: views/wp-maintenance-settings.php:143
|
865 |
msgid ""
|
866 |
"Allow the site to display these IP addresses. Please, enter one IP address "
|
867 |
"by line"
|
869 |
"Autoriser l'affichage du site à ces adresses IP. Merci d'entrer 1 adresse IP "
|
870 |
"par ligne"
|
871 |
|
872 |
+
#: views/wp-maintenance-settings.php:154
|
873 |
msgid "ID pages autorized"
|
874 |
msgstr "ID de pages autorisées"
|
875 |
|
876 |
+
#: views/wp-maintenance-settings.php:157
|
877 |
msgid ""
|
878 |
"Allow the site to display these ID pages. Please, enter the ID pages "
|
879 |
"separate with comma"
|
881 |
"Autoriser le site à afficher des pages d'ID. Merci d'entrer les ID de pages "
|
882 |
"séparées par une virgule"
|
883 |
|
884 |
+
#: views/wp-maintenance-settings.php:168
|
885 |
msgid "Header Code"
|
886 |
msgstr "Code pour l’entête"
|
887 |
|
888 |
+
#: views/wp-maintenance-settings.php:171
|
889 |
msgid ""
|
890 |
"The following code will add to the <head> tag. Useful if you need to add "
|
891 |
"additional scripts such as CSS or JS"
|
893 |
"Le code suivant va être ajouter à la balise <head>. Très utile si vous avez "
|
894 |
"besoin d'ajouter des scripts supplémentaires tels que CSS ou JS"
|
895 |
|
896 |
+
#: views/wp-maintenance-socialnetworks.php:58
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
897 |
msgid "Enable social networks"
|
898 |
msgstr "Activer les réseaux sociaux"
|
899 |
|
900 |
+
#: views/wp-maintenance-socialnetworks.php:62
|
901 |
msgid "Yes, enable social networks options"
|
902 |
msgstr "Oui, activer les options de réseaux sociaux"
|
903 |
|
904 |
+
#: views/wp-maintenance-socialnetworks.php:73
|
905 |
msgid "List of Social networks"
|
906 |
msgstr "Liste des réseaux sociaux"
|
907 |
|
908 |
+
#: views/wp-maintenance-socialnetworks.php:77
|
909 |
msgid "Enter text for the title icons"
|
910 |
msgstr "Entrez un texte pour la balise title des icônes"
|
911 |
|
912 |
+
#: views/wp-maintenance-socialnetworks.php:82
|
|
|
|
|
|
|
|
|
913 |
msgid "Drad and drop the lines to put in the order you want"
|
914 |
msgstr ""
|
915 |
"Cliquez et glisser les lignes pour mettre dans l'ordre que vous souhaitez"
|
916 |
|
917 |
+
#: views/wp-maintenance-socialnetworks.php:140
|
918 |
msgid "Social Networks Style"
|
919 |
msgstr "Style pour les réseaux sociaux"
|
920 |
|
921 |
+
#: views/wp-maintenance-socialnetworks.php:143
|
922 |
msgid "Choose icons size"
|
923 |
msgstr "Choisissez la taille des icônes"
|
924 |
|
925 |
+
#: views/wp-maintenance-socialnetworks.php:156
|
926 |
msgid "Choose icons style"
|
927 |
msgstr "Choisissez le style des icônes"
|
928 |
|
929 |
+
#: views/wp-maintenance-socialnetworks.php:172
|
930 |
+
msgid "Position"
|
931 |
+
msgstr "Position"
|
932 |
+
|
933 |
+
#: views/wp-maintenance-socialnetworks.php:174
|
934 |
msgid "Top"
|
935 |
msgstr "Haut"
|
936 |
|
937 |
+
#: views/wp-maintenance-socialnetworks.php:175
|
938 |
msgid "Bottom"
|
939 |
msgstr "Bas"
|
940 |
|
941 |
+
#: views/wp-maintenance-socialnetworks.php:180
|
942 |
msgid "Align"
|
943 |
msgstr "Alignement"
|
944 |
|
945 |
+
#: views/wp-maintenance-socialnetworks.php:182
|
946 |
msgid "Left"
|
947 |
msgstr "Gauche"
|
948 |
|
949 |
+
#: views/wp-maintenance-socialnetworks.php:183
|
950 |
msgid "Center"
|
951 |
msgstr "Centre"
|
952 |
|
953 |
+
#: views/wp-maintenance-socialnetworks.php:184
|
954 |
msgid "Right"
|
955 |
msgstr "Droite"
|
956 |
|
957 |
+
#: views/wp-maintenance-socialnetworks.php:189
|
958 |
msgid "You have your own icons? Enter the folder name of your theme here"
|
959 |
msgstr ""
|
960 |
"Vous avez vos propres icônes ? Entrez le nom du dossier de votre thème ici"
|
961 |
|
962 |
+
#: views/wp-maintenance-socialnetworks.php:191
|
963 |
+
msgid ""
|
964 |
+
"In your icon's folder child theme, you must have the same names like mine, "
|
965 |
+
"let's mouse over list icons for display picture's name. For example: "
|
966 |
+
msgstr ""
|
967 |
+
"Dans le dossier icônes de votre thème enfant, vous devez avoir les mêmes "
|
968 |
+
"noms que les miens, passez la souris sur la liste des icônes pour afficher "
|
969 |
+
"le nom de l’image. Par exemple: "
|
970 |
+
|
971 |
+
#: views/wp-maintenance-socialnetworks.php:203
|
972 |
msgid "Reset Social Networks Icons Options"
|
973 |
msgstr "Réinitialiser les paramètres des icônes des réseaux sociaux"
|
974 |
|
975 |
+
#: views/wp-maintenance-socialnetworks.php:206
|
976 |
msgid "Yes, reset Social Networks Icons?"
|
977 |
msgstr "Oui, réinitialiser les icônes des réseaux sociaux?"
|
978 |
|
998 |
msgid "https://madeby.restezconnectes.fr"
|
999 |
msgstr "https://madeby.restezconnectes.fr"
|
1000 |
|
1001 |
+
#~ msgid "Previous"
|
1002 |
+
#~ msgstr "Précédent"
|
1003 |
+
|
1004 |
+
#~ msgid "Next"
|
1005 |
+
#~ msgstr "Suivant"
|
1006 |
+
|
1007 |
+
#~ msgid "Please upload a valid .json file"
|
1008 |
+
#~ msgstr "Veuillez téléverser un fichier .json valide"
|
1009 |
+
|
1010 |
+
#~ msgid "Please upload a file to import"
|
1011 |
+
#~ msgstr "Veuillez téléverser un fichier à importer"
|
1012 |
+
|
1013 |
+
#~ msgid "New settings imported successfully!"
|
1014 |
+
#~ msgstr "Nouveaux paramètres importés avec succès !"
|
1015 |
+
|
1016 |
+
#~ msgid "Visit the WP Maintenance page project."
|
1017 |
+
#~ msgstr "Visitez le projet de page de WP Maintenance."
|
1018 |
+
|
1019 |
+
#~ msgid ""
|
1020 |
+
#~ "This plugin has been developed for you for free by <a href=\"https://"
|
1021 |
+
#~ "restezconnectes.fr\" target=\"_blank\" style=\"color:#D6D5AA;\">Florent "
|
1022 |
+
#~ "Maillefaud</a>. It is royalty free, you can take it, modify it, "
|
1023 |
+
#~ "distribute it as you see fit."
|
1024 |
+
#~ msgstr ""
|
1025 |
+
#~ "Cette extension a été développée gratuitement pour vous par <a href="
|
1026 |
+
#~ "\"https://restezconnectes.fr\" target=\"_blank\">Florent Maillefaud</a>. "
|
1027 |
+
#~ "Elle est libre de droits, vous pouvez la prendre, la modifier, la "
|
1028 |
+
#~ "distribuer comme bon vous semble."
|
1029 |
+
|
1030 |
+
#~ msgid "Support this extension and my other developments (French Paypal):"
|
1031 |
+
#~ msgstr "Soutenez cette extension et mes autres développements (PayPal) :"
|
1032 |
+
|
1033 |
+
#~ msgid "Donate now!"
|
1034 |
+
#~ msgstr "Donner maintenant !"
|
1035 |
+
|
1036 |
+
#~ msgid "ABOUT"
|
1037 |
+
#~ msgstr "A PROPOS"
|
1038 |
+
|
1039 |
+
#~ msgid ""
|
1040 |
+
#~ "This plugin has been developed for you for free by <a href=\"https://"
|
1041 |
+
#~ "restezconnectes.fr\" target=\"_blank\">Florent Maillefaud</a>. It is "
|
1042 |
+
#~ "royalty free, you can take it, modify it, distribute it as you see fit."
|
1043 |
+
#~ msgstr ""
|
1044 |
+
#~ "Cette extension a été développée gratuitement pour vous par <a href="
|
1045 |
+
#~ "\"https://restezconnectes.fr\" target=\"_blank\">Florent Maillefaud</a>. "
|
1046 |
+
#~ "Elle est libre de droits, vous pouvez la prendre, la modifier, la "
|
1047 |
+
#~ "distribuer comme bon vous semble."
|
1048 |
+
|
1049 |
+
#~ msgid "Visit"
|
1050 |
+
#~ msgstr "Visitez"
|
1051 |
+
|
1052 |
+
#~ msgid ""
|
1053 |
+
#~ "try the demo of the plugin, talk about this plugin to your surroundings!"
|
1054 |
+
#~ msgstr "essayez la démo de cette extension et parlez-en à votre entourage !"
|
1055 |
+
|
1056 |
+
#~ msgid "DISCOVER"
|
1057 |
+
#~ msgstr "DÉCOUVRIR"
|
1058 |
+
|
1059 |
+
#~ msgid "Countdown settings"
|
1060 |
+
#~ msgstr "Paramètres du compte à rebours"
|
1061 |
+
|
1062 |
+
#~ msgid "Picture Options"
|
1063 |
+
#~ msgstr "Options d’image"
|
1064 |
+
|
1065 |
+
#~ msgid "Slider"
|
1066 |
+
#~ msgstr "Diaporama"
|
1067 |
+
|
1068 |
+
#~ msgid "Yes, enable Slider"
|
1069 |
+
#~ msgstr "Oui, activer le diaporama"
|
1070 |
+
|
1071 |
+
#~ msgid "Slider options"
|
1072 |
+
#~ msgstr "Options du diaporama"
|
1073 |
+
|
1074 |
+
#~ msgid "Speed:"
|
1075 |
+
#~ msgstr "Vitesse :"
|
1076 |
+
|
1077 |
+
#~ msgid "Display Auto Slider"
|
1078 |
+
#~ msgstr "Afficher le diaporama en auto"
|
1079 |
+
|
1080 |
+
#~ msgid "Yes"
|
1081 |
+
#~ msgstr "Oui"
|
1082 |
+
|
1083 |
+
#~ msgid "No"
|
1084 |
+
#~ msgstr "Non"
|
1085 |
+
|
1086 |
+
#~ msgid "Display button navigation"
|
1087 |
+
#~ msgstr "Afficher les boutons navigation"
|
1088 |
+
|
1089 |
+
#~ msgid "Above logo"
|
1090 |
+
#~ msgstr "Au-dessus du logo"
|
1091 |
+
|
1092 |
+
#~ msgid "Below logo"
|
1093 |
+
#~ msgstr "Au-dessous du logo"
|
1094 |
+
|
1095 |
+
#~ msgid "Below title & text"
|
1096 |
+
#~ msgstr "Au-dessous du titre & texte"
|
1097 |
+
|
1098 |
+
#~ msgid "Choose picture"
|
1099 |
+
#~ msgstr "Choisissez l’image"
|
1100 |
+
|
1101 |
+
#~ msgid "Text:"
|
1102 |
+
#~ msgstr "Texte :"
|
1103 |
+
|
1104 |
+
#~ msgid "Link:"
|
1105 |
+
#~ msgstr "Lien :"
|
1106 |
+
|
1107 |
+
#~ msgid "Delete this slide"
|
1108 |
+
#~ msgstr "Supprimer ce slide"
|
1109 |
+
|
1110 |
+
#~ msgid "SEO options"
|
1111 |
+
#~ msgstr "Options SEO"
|
1112 |
+
|
1113 |
+
#~ msgid "Analytics Code"
|
1114 |
+
#~ msgstr "Code Analytics"
|
1115 |
+
|
1116 |
+
#~ msgid "Enter your analytics tracking code here:"
|
1117 |
+
#~ msgstr "Enter votre ID de suivi Analytics ici :"
|
1118 |
+
|
1119 |
+
#~ msgid "Generals Settings"
|
1120 |
+
#~ msgstr "Paramètres généraux"
|
1121 |
+
|
1122 |
+
#~ msgid "You can use this shortcode to include Google Analytics code:"
|
1123 |
+
#~ msgstr ""
|
1124 |
+
#~ "Vous pouvez utiliser ce Shortcode pour include le code Google Analytics "
|
1125 |
+
#~ "sur votre page :"
|
1126 |
+
|
1127 |
+
#~ msgid "Export / Import Settings"
|
1128 |
+
#~ msgstr "Réglages d’exportation / importation"
|
1129 |
+
|
1130 |
+
#~ msgid "Export Settings"
|
1131 |
+
#~ msgstr "Exporter les paramètres"
|
1132 |
+
|
1133 |
+
#~ msgid "Export"
|
1134 |
+
#~ msgstr "Exporter"
|
1135 |
+
|
1136 |
+
#~ msgid ""
|
1137 |
+
#~ "Import the plugin settings from a .json file. This file can be obtained "
|
1138 |
+
#~ "by exporting the settings on another site using the form above"
|
1139 |
+
#~ msgstr ""
|
1140 |
+
#~ "Importer les paramètres du plugin depuis un fichier .json. Ce fichier "
|
1141 |
+
#~ "peut être obtenu en exportant les paramètres sur un autre site en "
|
1142 |
+
#~ "utilisant le formulaire ci-dessus"
|
1143 |
+
|
1144 |
+
#~ msgid "Import"
|
1145 |
+
#~ msgstr "Importer"
|
1146 |
+
|
1147 |
#~ msgid "You use a pattern. Remove pattern for use image background."
|
1148 |
#~ msgstr ""
|
1149 |
#~ "Vous utilisez un motif. Supprimer le modèle pour utiliser l’arrière-plan "
|
languages/wp-maintenance.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: WP Maintenance\n"
|
5 |
-
"POT-Creation-Date:
|
6 |
"PO-Revision-Date: 2015-03-19 11:19+0100\n"
|
7 |
"Last-Translator: Florent Maillefaud <contact@restezconnectes.fr>\n"
|
8 |
"Language-Team: Florent Maillefaud <contact@restezconnectes.fr>\n"
|
@@ -10,479 +10,433 @@ msgstr ""
|
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"
|
|
|
14 |
"X-Poedit-KeywordsList: __;_e\n"
|
15 |
"X-Poedit-Basepath: ..\n"
|
16 |
-
"Plural-Forms: nplurals=2; plural=n>1;\n"
|
17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
"X-Poedit-SearchPath-0: .\n"
|
19 |
|
20 |
-
#: classes/countdown.php:
|
21 |
msgid "Days"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: classes/countdown.php:
|
25 |
msgid "Hours"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: classes/countdown.php:
|
29 |
msgid "Minutes"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: classes/countdown.php:
|
33 |
msgid "Seconds"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: classes/
|
37 |
-
msgid "
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: classes/
|
41 |
-
msgid "
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: classes/wp-maintenance.php:
|
45 |
-
msgid "
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: classes/wp-maintenance.php:
|
49 |
-
|
|
|
|
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: classes/wp-maintenance.php:
|
53 |
-
|
54 |
-
msgid "Settings"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: classes/wp-maintenance.php:
|
58 |
msgid "WP Maintenance"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: classes/wp-maintenance.php:
|
62 |
msgid "Colors"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: classes/wp-maintenance.php:
|
66 |
-
#: includes/functions.php:
|
67 |
msgid "Pictures"
|
68 |
msgstr ""
|
69 |
|
70 |
-
#: classes/wp-maintenance.php:
|
71 |
msgid "Countdown"
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: classes/wp-maintenance.php:
|
75 |
-
#: views/wp-maintenance-css.php:42
|
76 |
msgid "CSS"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: classes/wp-maintenance.php:
|
80 |
-
#: includes/functions.php:
|
81 |
msgid "Footer"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: classes/wp-maintenance.php:
|
85 |
-
#: includes/functions.php:
|
86 |
msgid "SEO"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: classes/wp-maintenance.php:
|
90 |
-
#: includes/functions.php:
|
91 |
msgid "Social Networks"
|
92 |
msgstr ""
|
93 |
|
94 |
-
#: classes/wp-maintenance.php:
|
95 |
msgid "General"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: classes/wp-maintenance.php:
|
99 |
msgid "Colors & Fonts"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: classes/wp-maintenance.php:
|
103 |
msgid "CountDown"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: classes/wp-maintenance.php:
|
107 |
msgid "CSS Style"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: classes/wp-maintenance.php:
|
111 |
msgid "Choose This Image"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: classes/wp-maintenance.php:
|
115 |
msgid "Choose Image"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: classes/wp-maintenance.php:
|
119 |
-
#: classes/wp-maintenance.php:
|
120 |
-
#: classes/wp-maintenance.php:
|
121 |
-
#: classes/wp-maintenance.php:
|
122 |
-
#: classes/wp-maintenance.php:
|
123 |
msgid "You do not have sufficient privileges to access this page."
|
124 |
msgstr ""
|
125 |
|
126 |
-
#:
|
127 |
-
msgid "Please upload a valid .json file"
|
128 |
-
msgstr ""
|
129 |
-
|
130 |
-
#: classes/wp-maintenance.php:598
|
131 |
-
msgid "Please upload a file to import"
|
132 |
-
msgstr ""
|
133 |
-
|
134 |
-
#: classes/wp-maintenance.php:608
|
135 |
-
msgid "New settings imported successfully!"
|
136 |
-
msgstr ""
|
137 |
-
|
138 |
-
#: includes/functions.php:9
|
139 |
-
msgid "WP Maintenance - Settings"
|
140 |
-
msgstr ""
|
141 |
-
|
142 |
-
#: includes/functions.php:12
|
143 |
-
msgid "Options saved."
|
144 |
-
msgstr ""
|
145 |
-
|
146 |
-
#: includes/functions.php:30 themes/default/functions.php:63
|
147 |
-
#: views/wp-maintenance-dashboard.php:40
|
148 |
msgid "Dashboard"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: includes/functions.php:
|
152 |
msgid "Here, the beginning..."
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: includes/functions.php:
|
156 |
msgid "Colors and Fonts"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: includes/functions.php:
|
160 |
msgid "Have a creative mind"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: includes/functions.php:
|
164 |
msgid "Are we playing with the images?"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: includes/functions.php:
|
168 |
msgid "Stop the time... or not!"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: includes/functions.php:
|
172 |
msgid "Customize the style sheet"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: includes/functions.php:
|
176 |
msgid "Keep your site optimized"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: includes/functions.php:
|
180 |
msgid "Adding social networks icons"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: includes/functions.php:
|
184 |
msgid "Here, we are talking about the footer"
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: includes/functions.php:
|
188 |
msgid "A few additional options"
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: includes/functions.php:84
|
192 |
-
msgid "Visit the WP Maintenance page project."
|
193 |
-
msgstr ""
|
194 |
-
|
195 |
-
#: includes/functions.php:86
|
196 |
-
msgid "Preview page"
|
197 |
-
msgstr ""
|
198 |
-
|
199 |
-
#: includes/functions.php:105
|
200 |
-
msgid ""
|
201 |
-
"This plugin has been developed for you for free by <a href=\"https://"
|
202 |
-
"restezconnectes.fr\" target=\"_blank\" style=\"color:#D6D5AA;\">Florent "
|
203 |
-
"Maillefaud</a>. It is royalty free, you can take it, modify it, distribute "
|
204 |
-
"it as you see fit."
|
205 |
-
msgstr ""
|
206 |
-
|
207 |
-
#: includes/functions.php:107 includes/functions.php:161
|
208 |
-
msgid "Support this extension and my other developments (French Paypal):"
|
209 |
-
msgstr ""
|
210 |
-
|
211 |
#: includes/functions.php:109
|
212 |
-
msgid "
|
213 |
-
msgstr ""
|
214 |
-
|
215 |
-
#: includes/functions.php:156
|
216 |
-
msgid "ABOUT"
|
217 |
-
msgstr ""
|
218 |
-
|
219 |
-
#: includes/functions.php:158
|
220 |
-
msgid ""
|
221 |
-
"This plugin has been developed for you for free by <a href=\"https://"
|
222 |
-
"restezconnectes.fr\" target=\"_blank\">Florent Maillefaud</a>. It is royalty "
|
223 |
-
"free, you can take it, modify it, distribute it as you see fit."
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: includes/functions.php:
|
227 |
-
msgid "
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: includes/functions.php:
|
231 |
-
msgid ""
|
232 |
-
"try the demo of the plugin, talk about this plugin to your surroundings!"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: includes/functions.php:
|
236 |
-
msgid "
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: includes/
|
240 |
-
msgid "
|
241 |
msgstr ""
|
242 |
|
243 |
-
#:
|
244 |
-
|
|
|
|
|
|
|
|
|
245 |
msgstr ""
|
246 |
|
247 |
-
#:
|
248 |
-
|
|
|
|
|
|
|
|
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: views/wp-maintenance-colors.php:
|
252 |
msgid "Choice general colors"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: views/wp-maintenance-colors.php:
|
256 |
msgid "Background page color"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: views/wp-maintenance-colors.php:
|
260 |
msgid "Header color"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: views/wp-maintenance-colors.php:
|
264 |
-
#: views/wp-maintenance-colors.php:
|
265 |
-
#: views/wp-maintenance-colors.php:
|
266 |
-
#: views/wp-maintenance-colors.php:
|
267 |
-
#: views/wp-maintenance-countdown.php:
|
268 |
-
#: views/wp-maintenance-css.php:
|
269 |
-
#: views/wp-maintenance-dashboard.php:
|
270 |
-
#: views/wp-maintenance-footer.php:
|
271 |
-
#: views/wp-maintenance-picture.php:
|
272 |
-
#: views/wp-maintenance-picture.php:
|
273 |
-
#: views/wp-maintenance-seo.php:
|
274 |
-
#: views/wp-maintenance-
|
275 |
-
#: views/wp-maintenance-settings.php:
|
276 |
-
#: views/wp-maintenance-settings.php:
|
277 |
-
#: views/wp-maintenance-
|
278 |
-
#: views/wp-maintenance-socialnetworks.php:
|
279 |
-
#: views/wp-maintenance-socialnetworks.php:
|
280 |
-
#: views/wp-maintenance-socialnetworks.php:
|
281 |
-
#: views/wp-maintenance-socialnetworks.php:170
|
282 |
msgid "Save"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: views/wp-maintenance-colors.php:
|
286 |
msgid "Title Settings"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: views/wp-maintenance-colors.php:
|
290 |
msgid "Choice title font and color"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: views/wp-maintenance-colors.php:
|
294 |
msgid "Set the color and font of the title"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: views/wp-maintenance-colors.php:
|
298 |
msgid "Choose font color"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: views/wp-maintenance-colors.php:
|
302 |
-
#: views/wp-maintenance-colors.php:
|
303 |
msgid "Choose Size and Style"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: views/wp-maintenance-colors.php:
|
307 |
-
#: views/wp-maintenance-colors.php:
|
308 |
msgid "bold"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: views/wp-maintenance-colors.php:
|
312 |
-
#: views/wp-maintenance-colors.php:
|
313 |
msgid "Italic"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: views/wp-maintenance-colors.php:
|
317 |
msgid "Text Settings"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: views/wp-maintenance-colors.php:
|
321 |
msgid "Choice text font and color"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: views/wp-maintenance-colors.php:
|
325 |
msgid "Set the color and font of the text"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: views/wp-maintenance-colors.php:
|
329 |
msgid "Frame Settings"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: views/wp-maintenance-colors.php:
|
333 |
msgid "Yes, enable frame"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: views/wp-maintenance-colors.php:
|
337 |
msgid "Choice frame color and style"
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: views/wp-maintenance-colors.php:
|
341 |
msgid "Choose frame color"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: views/wp-maintenance-colors.php:
|
345 |
msgid "Choose Style"
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: views/wp-maintenance-colors.php:
|
349 |
msgid "Opacity"
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: views/wp-maintenance-colors.php:
|
353 |
msgid "Width"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: views/wp-maintenance-colors.php:
|
357 |
msgid "Countdown Settings"
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: views/wp-maintenance-colors.php:
|
361 |
msgid "Choice Countdown font, colors and style"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: views/wp-maintenance-colors.php:
|
365 |
msgid "Countdown text color"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: views/wp-maintenance-colors.php:
|
369 |
msgid "Countdown background color"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: views/wp-maintenance-colors.php:
|
373 |
msgid "Choose font"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: views/wp-maintenance-colors.php:
|
|
|
|
|
|
|
|
|
377 |
msgid "Footer settings"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: views/wp-maintenance-colors.php:
|
381 |
msgid "Choice footer font, colors and style"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: views/wp-maintenance-colors.php:
|
385 |
msgid "Text color"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: views/wp-maintenance-colors.php:
|
389 |
msgid "Background color"
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: views/wp-maintenance-colors.php:
|
393 |
msgid "Form color settings"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: views/wp-maintenance-colors.php:
|
397 |
msgid "Choice form colors"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: views/wp-maintenance-colors.php:
|
401 |
msgid "Field text color"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: views/wp-maintenance-colors.php:
|
405 |
msgid "Field border color"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: views/wp-maintenance-colors.php:
|
409 |
msgid "Field background color"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: views/wp-maintenance-colors.php:
|
413 |
msgid "Button text color"
|
414 |
msgstr ""
|
415 |
|
416 |
-
#: views/wp-maintenance-colors.php:
|
417 |
msgid "Button color"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: views/wp-maintenance-colors.php:
|
421 |
msgid "Button color hover"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: views/wp-maintenance-colors.php:
|
425 |
msgid "Button color onclick"
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: views/wp-maintenance-colors.php:
|
429 |
#, php-format
|
430 |
msgid "Enable %s to customize the forms"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: views/wp-maintenance-colors.php:
|
434 |
msgid "newsletter option"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: views/wp-maintenance-colors.php:
|
438 |
msgid "Enable Mailpoet or MailChimp extensions to customize the forms"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: views/wp-maintenance-countdown.php:
|
442 |
-
msgid "Countdown settings"
|
443 |
-
msgstr ""
|
444 |
-
|
445 |
-
#: views/wp-maintenance-countdown.php:59
|
446 |
msgid "Enable a countdown"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: views/wp-maintenance-countdown.php:
|
450 |
msgid "Yes, enable a countdown"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: views/wp-maintenance-countdown.php:
|
454 |
msgid "Date/time Launch"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: views/wp-maintenance-countdown.php:
|
458 |
msgid "Select the launch date/time"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: views/wp-maintenance-countdown.php:
|
462 |
msgid "at"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: views/wp-maintenance-countdown.php:
|
466 |
msgid "Others Settings"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: views/wp-maintenance-countdown.php:
|
470 |
msgid "Enable seconds ?"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: views/wp-maintenance-countdown.php:
|
474 |
msgid "Yes, enable seconds"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: views/wp-maintenance-countdown.php:
|
478 |
msgid "Disable maintenance mode at the end of the countdown?"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: views/wp-maintenance-countdown.php:
|
482 |
msgid "Yes, disable maintenance mode at the end of countdown"
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: views/wp-maintenance-countdown.php:
|
486 |
msgid "End message after end countdown"
|
487 |
msgstr ""
|
488 |
|
@@ -591,7 +545,7 @@ msgstr ""
|
|
591 |
msgid "Select a year"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: views/wp-maintenance-css.php:
|
595 |
msgid "The Style Sheet has been reset!"
|
596 |
msgstr ""
|
597 |
|
@@ -603,7 +557,7 @@ msgstr ""
|
|
603 |
msgid "Click \"Reset\" and \"Save\" to retrieve the default style sheet."
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: views/wp-maintenance-css.php:
|
607 |
msgid "Yes, reset style sheet"
|
608 |
msgstr ""
|
609 |
|
@@ -631,455 +585,359 @@ msgstr ""
|
|
631 |
msgid "Use this code for countdown color"
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: views/wp-maintenance-css.php:
|
|
|
|
|
|
|
|
|
635 |
msgid "Need CSS code for MailPoet plugin?"
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: views/wp-maintenance-css.php:
|
639 |
msgid "Click for select all"
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: views/wp-maintenance-css.php:
|
643 |
msgid "Need CSS code for MailChimp plugin?"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: views/wp-maintenance-dashboard.php:
|
647 |
msgid "Activate maintenance mode"
|
648 |
msgstr ""
|
649 |
|
650 |
-
#: views/wp-maintenance-dashboard.php:
|
651 |
msgid "Yes, enable maintenance mode"
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: views/wp-maintenance-dashboard.php:
|
655 |
msgid "Title and text"
|
656 |
msgstr ""
|
657 |
|
658 |
-
#: views/wp-maintenance-dashboard.php:
|
659 |
msgid "Activate newsletter block"
|
660 |
msgstr ""
|
661 |
|
662 |
-
#: views/wp-maintenance-dashboard.php:
|
663 |
msgid "Yes, enable newsletter block"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: views/wp-maintenance-dashboard.php:
|
667 |
msgid "Enter title for the newletter block"
|
668 |
msgstr ""
|
669 |
|
670 |
-
#: views/wp-maintenance-dashboard.php:
|
671 |
msgid "Type of the newletter block"
|
672 |
msgstr ""
|
673 |
|
674 |
-
#: views/wp-maintenance-dashboard.php:
|
675 |
msgid "Enter your newletter shortcode here:"
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: views/wp-maintenance-dashboard.php:
|
679 |
msgid "Or enter your newletter iframe code here:"
|
680 |
msgstr ""
|
681 |
|
682 |
-
#: views/wp-maintenance-footer.php:
|
683 |
msgid "Enable Footer?"
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: views/wp-maintenance-footer.php:
|
687 |
msgid "Yes, enable footer"
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: views/wp-maintenance-footer.php:
|
691 |
msgid "Text in the footer"
|
692 |
msgstr ""
|
693 |
|
694 |
-
#: views/wp-maintenance-footer.php:
|
695 |
msgid "Add a link to dashboard in the footer?"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: views/wp-maintenance-footer.php:
|
699 |
msgid "Yes, show text and link to go to the dashboard"
|
700 |
msgstr ""
|
701 |
|
702 |
-
#: views/wp-maintenance-footer.php:
|
703 |
-
msgid "Enter your text and
|
704 |
msgstr ""
|
705 |
|
706 |
-
#: views/wp-maintenance-footer.php:
|
707 |
-
msgid "Eg: connect to
|
708 |
msgstr ""
|
709 |
|
710 |
-
#: views/wp-maintenance-footer.php:
|
711 |
msgid ""
|
712 |
-
"(
|
713 |
"\"Dashboard\")"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: views/wp-maintenance-picture.php:
|
717 |
-
msgid "Picture Options"
|
718 |
-
msgstr ""
|
719 |
-
|
720 |
-
#: views/wp-maintenance-picture.php:98
|
721 |
msgid "Header picture"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: views/wp-maintenance-picture.php:
|
725 |
msgid "Choice you picture for header page"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: views/wp-maintenance-picture.php:
|
729 |
-
#: views/wp-maintenance-seo.php:
|
730 |
msgid "Enter a URL or upload an image"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: views/wp-maintenance-picture.php:
|
734 |
-
#: views/wp-maintenance-
|
735 |
msgid "Media Image Library"
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: views/wp-maintenance-picture.php:
|
739 |
msgid ""
|
740 |
"URL path to image to replace default picture. (You can upload your image "
|
741 |
"with the WordPress media uploader)"
|
742 |
msgstr ""
|
743 |
|
744 |
-
#: views/wp-maintenance-picture.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
745 |
msgid "You use this picture:"
|
746 |
msgstr ""
|
747 |
|
748 |
-
#: views/wp-maintenance-picture.php:
|
749 |
msgid "Remove"
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: views/wp-maintenance-picture.php:
|
753 |
msgid "Background picture"
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: views/wp-maintenance-picture.php:
|
757 |
msgid "Disable background or pattern picture"
|
758 |
msgstr ""
|
759 |
|
760 |
-
#: views/wp-maintenance-picture.php:
|
761 |
msgid "Yes, activate picture background"
|
762 |
msgstr ""
|
763 |
|
764 |
-
#: views/wp-maintenance-picture.php:
|
765 |
msgid "You use this background picture:"
|
766 |
msgstr ""
|
767 |
|
768 |
-
#: views/wp-maintenance-picture.php:
|
769 |
msgid "Background picture options"
|
770 |
msgstr ""
|
771 |
|
772 |
-
#: views/wp-maintenance-picture.php:
|
773 |
msgid "Background Opacity"
|
774 |
msgstr ""
|
775 |
|
776 |
-
#: views/wp-maintenance-picture.php:
|
777 |
msgid "Fix the background picture"
|
778 |
msgstr ""
|
779 |
|
780 |
-
#: views/wp-maintenance-picture.php:
|
781 |
msgid "Pattern picture"
|
782 |
msgstr ""
|
783 |
|
784 |
-
#: views/wp-maintenance-picture.php:
|
785 |
msgid "Yes, activate pattern background"
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: views/wp-maintenance-picture.php:
|
789 |
msgid "Choose a pattern"
|
790 |
msgstr ""
|
791 |
|
792 |
-
#: views/wp-maintenance-picture.php:
|
793 |
msgid "NO PATTERN"
|
794 |
msgstr ""
|
795 |
|
796 |
-
#: views/wp-maintenance-picture.php:
|
797 |
msgid "You use this pattern"
|
798 |
msgstr ""
|
799 |
|
800 |
-
#: views/wp-maintenance-
|
801 |
-
msgid "Slider"
|
802 |
-
msgstr ""
|
803 |
-
|
804 |
-
#: views/wp-maintenance-picture.php:214
|
805 |
-
msgid "Yes, enable Slider"
|
806 |
-
msgstr ""
|
807 |
-
|
808 |
-
#: views/wp-maintenance-picture.php:220 views/wp-maintenance-picture.php:222
|
809 |
-
msgid "Slider options"
|
810 |
-
msgstr ""
|
811 |
-
|
812 |
-
#: views/wp-maintenance-picture.php:234
|
813 |
-
msgid "Speed:"
|
814 |
-
msgstr ""
|
815 |
-
|
816 |
-
#: views/wp-maintenance-picture.php:235
|
817 |
-
msgid "Width:"
|
818 |
-
msgstr ""
|
819 |
-
|
820 |
-
#: views/wp-maintenance-picture.php:239
|
821 |
-
msgid "Display Auto Slider"
|
822 |
-
msgstr ""
|
823 |
-
|
824 |
-
#: views/wp-maintenance-picture.php:240 views/wp-maintenance-picture.php:248
|
825 |
-
msgid "Yes"
|
826 |
-
msgstr ""
|
827 |
-
|
828 |
-
#: views/wp-maintenance-picture.php:242 views/wp-maintenance-picture.php:249
|
829 |
-
msgid "No"
|
830 |
-
msgstr ""
|
831 |
-
|
832 |
-
#: views/wp-maintenance-picture.php:247
|
833 |
-
msgid "Display button navigation"
|
834 |
-
msgstr ""
|
835 |
-
|
836 |
-
#: views/wp-maintenance-picture.php:252
|
837 |
-
#: views/wp-maintenance-socialnetworks.php:138
|
838 |
-
msgid "Position"
|
839 |
-
msgstr ""
|
840 |
-
|
841 |
-
#: views/wp-maintenance-picture.php:254
|
842 |
-
msgid "Above logo"
|
843 |
-
msgstr ""
|
844 |
-
|
845 |
-
#: views/wp-maintenance-picture.php:255
|
846 |
-
msgid "Below logo"
|
847 |
-
msgstr ""
|
848 |
-
|
849 |
-
#: views/wp-maintenance-picture.php:256
|
850 |
-
msgid "Below title & text"
|
851 |
-
msgstr ""
|
852 |
-
|
853 |
-
#: views/wp-maintenance-picture.php:261
|
854 |
-
msgid "Choose picture"
|
855 |
-
msgstr ""
|
856 |
-
|
857 |
-
#: views/wp-maintenance-picture.php:292
|
858 |
-
msgid "Text:"
|
859 |
-
msgstr ""
|
860 |
-
|
861 |
-
#: views/wp-maintenance-picture.php:293
|
862 |
-
msgid "Link:"
|
863 |
-
msgstr ""
|
864 |
-
|
865 |
-
#: views/wp-maintenance-picture.php:295
|
866 |
-
msgid "Delete this slide"
|
867 |
-
msgstr ""
|
868 |
-
|
869 |
-
#: views/wp-maintenance-seo.php:33
|
870 |
-
msgid "SEO options"
|
871 |
-
msgstr ""
|
872 |
-
|
873 |
-
#: views/wp-maintenance-seo.php:43
|
874 |
msgid "Active SEO settings?"
|
875 |
msgstr ""
|
876 |
|
877 |
-
#: views/wp-maintenance-seo.php:
|
878 |
msgid "Yes, active SEO"
|
879 |
msgstr ""
|
880 |
|
881 |
-
#: views/wp-maintenance-seo.php:
|
882 |
msgid "SEO Title & Description"
|
883 |
msgstr ""
|
884 |
|
885 |
-
#: views/wp-maintenance-seo.php:
|
886 |
msgid "SEO Meta Title"
|
887 |
msgstr ""
|
888 |
|
889 |
-
#: views/wp-maintenance-seo.php:
|
890 |
msgid "SEO Meta Description"
|
891 |
msgstr ""
|
892 |
|
893 |
-
#: views/wp-maintenance-seo.php:
|
894 |
msgid "Add a favicon"
|
895 |
msgstr ""
|
896 |
|
897 |
-
#: views/wp-maintenance-seo.php:
|
898 |
msgid ""
|
899 |
"Favicons are displayed in a browser tab. Need Help <a href=\"https://"
|
900 |
"realfavicongenerator.net/\" target=\"_blank\">creating a favicon</a>?"
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: views/wp-maintenance-seo.php:
|
904 |
msgid "You use this favicon:"
|
905 |
msgstr ""
|
906 |
|
907 |
-
#: views/wp-maintenance-
|
908 |
-
msgid "Analytics Code"
|
909 |
-
msgstr ""
|
910 |
-
|
911 |
-
#: views/wp-maintenance-seo.php:89
|
912 |
-
msgid "Enter your analytics tracking code here:"
|
913 |
-
msgstr ""
|
914 |
-
|
915 |
-
#: views/wp-maintenance-settings.php:67
|
916 |
-
msgid "Generals Settings"
|
917 |
-
msgstr ""
|
918 |
-
|
919 |
-
#: views/wp-maintenance-settings.php:75
|
920 |
msgid "Theme maintenance page"
|
921 |
msgstr ""
|
922 |
|
923 |
-
#: views/wp-maintenance-settings.php:
|
924 |
msgid "Yes, I use a theme maintenance page"
|
925 |
msgstr ""
|
926 |
|
927 |
-
#: views/wp-maintenance-settings.php:
|
928 |
-
msgid "You can use this shortcode to include Google Analytics code:"
|
929 |
-
msgstr ""
|
930 |
-
|
931 |
-
#: views/wp-maintenance-settings.php:84
|
932 |
msgid "You can use this shortcode to include Social Networks icons:"
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: views/wp-maintenance-settings.php:
|
936 |
msgid "Delete custom settings upon plugin deactivation?"
|
937 |
msgstr ""
|
938 |
|
939 |
-
#: views/wp-maintenance-settings.php:
|
940 |
msgid ""
|
941 |
"Yes, all custom settings will be deleted from database upon plugin "
|
942 |
"deactivation"
|
943 |
msgstr ""
|
944 |
|
945 |
-
#: views/wp-maintenance-settings.php:
|
946 |
msgid "Display code HTTP Error 503?"
|
947 |
msgstr ""
|
948 |
|
949 |
-
#: views/wp-maintenance-settings.php:
|
950 |
msgid ""
|
951 |
"Yes, inform visitors and search engines that my site is temporarily "
|
952 |
"unavailable."
|
953 |
msgstr ""
|
954 |
|
955 |
-
#: views/wp-maintenance-settings.php:
|
956 |
msgid "Roles and Capabilities"
|
957 |
msgstr ""
|
958 |
|
959 |
-
#: views/wp-maintenance-settings.php:
|
960 |
msgid "Allow the site to display these roles"
|
961 |
msgstr ""
|
962 |
|
963 |
-
#: views/wp-maintenance-settings.php:
|
964 |
msgid "IP autorized"
|
965 |
msgstr ""
|
966 |
|
967 |
-
#: views/wp-maintenance-settings.php:
|
968 |
msgid ""
|
969 |
"Allow the site to display these IP addresses. Please, enter one IP address "
|
970 |
"by line"
|
971 |
msgstr ""
|
972 |
|
973 |
-
#: views/wp-maintenance-settings.php:
|
974 |
msgid "ID pages autorized"
|
975 |
msgstr ""
|
976 |
|
977 |
-
#: views/wp-maintenance-settings.php:
|
978 |
msgid ""
|
979 |
"Allow the site to display these ID pages. Please, enter the ID pages "
|
980 |
"separate with comma"
|
981 |
msgstr ""
|
982 |
|
983 |
-
#: views/wp-maintenance-settings.php:
|
984 |
msgid "Header Code"
|
985 |
msgstr ""
|
986 |
|
987 |
-
#: views/wp-maintenance-settings.php:
|
988 |
msgid ""
|
989 |
"The following code will add to the <head> tag. Useful if you need to add "
|
990 |
"additional scripts such as CSS or JS"
|
991 |
msgstr ""
|
992 |
|
993 |
-
#: views/wp-maintenance-
|
994 |
-
msgid "Export / Import Settings"
|
995 |
-
msgstr ""
|
996 |
-
|
997 |
-
#: views/wp-maintenance-settings.php:167
|
998 |
-
msgid "Export Settings"
|
999 |
-
msgstr ""
|
1000 |
-
|
1001 |
-
#: views/wp-maintenance-settings.php:171
|
1002 |
-
msgid "Export"
|
1003 |
-
msgstr ""
|
1004 |
-
|
1005 |
-
#: views/wp-maintenance-settings.php:176
|
1006 |
-
msgid ""
|
1007 |
-
"Import the plugin settings from a .json file. This file can be obtained by "
|
1008 |
-
"exporting the settings on another site using the form above"
|
1009 |
-
msgstr ""
|
1010 |
-
|
1011 |
-
#: views/wp-maintenance-settings.php:181
|
1012 |
-
msgid "Import"
|
1013 |
-
msgstr ""
|
1014 |
-
|
1015 |
-
#: views/wp-maintenance-socialnetworks.php:56
|
1016 |
msgid "Enable social networks"
|
1017 |
msgstr ""
|
1018 |
|
1019 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1020 |
msgid "Yes, enable social networks options"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1024 |
msgid "List of Social networks"
|
1025 |
msgstr ""
|
1026 |
|
1027 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1028 |
msgid "Enter text for the title icons"
|
1029 |
msgstr ""
|
1030 |
|
1031 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1032 |
-
msgid "Follow me on"
|
1033 |
-
msgstr ""
|
1034 |
-
|
1035 |
-
#: views/wp-maintenance-socialnetworks.php:78
|
1036 |
msgid "Drad and drop the lines to put in the order you want"
|
1037 |
msgstr ""
|
1038 |
|
1039 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1040 |
msgid "Social Networks Style"
|
1041 |
msgstr ""
|
1042 |
|
1043 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1044 |
msgid "Choose icons size"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1048 |
msgid "Choose icons style"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
-
#: views/wp-maintenance-socialnetworks.php:
|
|
|
|
|
|
|
|
|
1052 |
msgid "Top"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1056 |
msgid "Bottom"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1060 |
msgid "Align"
|
1061 |
msgstr ""
|
1062 |
|
1063 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1064 |
msgid "Left"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1068 |
msgid "Center"
|
1069 |
msgstr ""
|
1070 |
|
1071 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1072 |
msgid "Right"
|
1073 |
msgstr ""
|
1074 |
|
1075 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1076 |
msgid "You have your own icons? Enter the folder name of your theme here"
|
1077 |
msgstr ""
|
1078 |
|
1079 |
-
#: views/wp-maintenance-socialnetworks.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
1080 |
msgid "Reset Social Networks Icons Options"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
-
#: views/wp-maintenance-socialnetworks.php:
|
1084 |
msgid "Yes, reset Social Networks Icons?"
|
1085 |
msgstr ""
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: WP Maintenance\n"
|
5 |
+
"POT-Creation-Date: 2022-06-05 17:13+0200\n"
|
6 |
"PO-Revision-Date: 2015-03-19 11:19+0100\n"
|
7 |
"Last-Translator: Florent Maillefaud <contact@restezconnectes.fr>\n"
|
8 |
"Language-Team: Florent Maillefaud <contact@restezconnectes.fr>\n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Plural-Forms: nplurals=2; plural=n>1;\n"
|
14 |
+
"X-Generator: Poedit 3.0.1\n"
|
15 |
"X-Poedit-KeywordsList: __;_e\n"
|
16 |
"X-Poedit-Basepath: ..\n"
|
|
|
17 |
"X-Poedit-SourceCharset: UTF-8\n"
|
18 |
"X-Poedit-SearchPath-0: .\n"
|
19 |
|
20 |
+
#: classes/countdown.php:45
|
21 |
msgid "Days"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: classes/countdown.php:45
|
25 |
msgid "Hours"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: classes/countdown.php:45
|
29 |
msgid "Minutes"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: classes/countdown.php:47
|
33 |
msgid "Seconds"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: classes/wp-maintenance.php:64
|
37 |
+
msgid "This site is down for maintenance"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: classes/wp-maintenance.php:65
|
41 |
+
msgid "Come back quickly!"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: classes/wp-maintenance.php:189 views/wp-maintenance-socialnetworks.php:78
|
45 |
+
msgid "Follow me on"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: classes/wp-maintenance.php:262 classes/wp-maintenance.php:276
|
49 |
+
#: classes/wp-maintenance.php:398 classes/wp-maintenance.php:428
|
50 |
+
#: includes/functions.php:93
|
51 |
+
msgid "Settings"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: classes/wp-maintenance.php:265
|
55 |
+
msgid "Uninstall"
|
|
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: classes/wp-maintenance.php:305 includes/functions.php:119
|
59 |
msgid "WP Maintenance"
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: classes/wp-maintenance.php:328
|
63 |
msgid "Colors"
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: classes/wp-maintenance.php:338 classes/wp-maintenance.php:422
|
67 |
+
#: includes/functions.php:57
|
68 |
msgid "Pictures"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: classes/wp-maintenance.php:348 includes/functions.php:63
|
72 |
msgid "Countdown"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: classes/wp-maintenance.php:358 includes/functions.php:69
|
|
|
76 |
msgid "CSS"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: classes/wp-maintenance.php:368 classes/wp-maintenance.php:427
|
80 |
+
#: includes/functions.php:87
|
81 |
msgid "Footer"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: classes/wp-maintenance.php:378 classes/wp-maintenance.php:425
|
85 |
+
#: includes/functions.php:75
|
86 |
msgid "SEO"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: classes/wp-maintenance.php:388 classes/wp-maintenance.php:426
|
90 |
+
#: includes/functions.php:81
|
91 |
msgid "Social Networks"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: classes/wp-maintenance.php:420
|
95 |
msgid "General"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: classes/wp-maintenance.php:421
|
99 |
msgid "Colors & Fonts"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: classes/wp-maintenance.php:423
|
103 |
msgid "CountDown"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: classes/wp-maintenance.php:424
|
107 |
msgid "CSS Style"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: classes/wp-maintenance.php:474
|
111 |
msgid "Choose This Image"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: classes/wp-maintenance.php:475
|
115 |
msgid "Choose Image"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: classes/wp-maintenance.php:492 classes/wp-maintenance.php:500
|
119 |
+
#: classes/wp-maintenance.php:508 classes/wp-maintenance.php:517
|
120 |
+
#: classes/wp-maintenance.php:526 classes/wp-maintenance.php:535
|
121 |
+
#: classes/wp-maintenance.php:544 classes/wp-maintenance.php:553
|
122 |
+
#: classes/wp-maintenance.php:562
|
123 |
msgid "You do not have sufficient privileges to access this page."
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: includes/functions.php:45 themes/default/functions.php:61
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
msgid "Dashboard"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: includes/functions.php:46
|
131 |
msgid "Here, the beginning..."
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: includes/functions.php:51
|
135 |
msgid "Colors and Fonts"
|
136 |
msgstr ""
|
137 |
|
138 |
+
#: includes/functions.php:52
|
139 |
msgid "Have a creative mind"
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: includes/functions.php:58
|
143 |
msgid "Are we playing with the images?"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: includes/functions.php:64
|
147 |
msgid "Stop the time... or not!"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: includes/functions.php:70
|
151 |
msgid "Customize the style sheet"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: includes/functions.php:76
|
155 |
msgid "Keep your site optimized"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: includes/functions.php:82
|
159 |
msgid "Adding social networks icons"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: includes/functions.php:88
|
163 |
msgid "Here, we are talking about the footer"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: includes/functions.php:94
|
167 |
msgid "A few additional options"
|
168 |
msgstr ""
|
169 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
170 |
#: includes/functions.php:109
|
171 |
+
msgid "Preview page"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: includes/functions.php:119
|
175 |
+
msgid "is brought to you by"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: includes/functions.php:119
|
179 |
+
msgid "If you found this plugin useful"
|
|
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: includes/functions.php:119
|
183 |
+
msgid "give it 5 ★ on WordPress.org"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: includes/shortcodes.php:40
|
187 |
+
msgid "Send me a"
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: views/wp-maintenance-colors.php:39 views/wp-maintenance-countdown.php:25
|
191 |
+
#: views/wp-maintenance-css.php:32 views/wp-maintenance-dashboard.php:29
|
192 |
+
#: views/wp-maintenance-footer.php:25 views/wp-maintenance-picture.php:64
|
193 |
+
#: views/wp-maintenance-seo.php:24 views/wp-maintenance-settings.php:59
|
194 |
+
#: views/wp-maintenance-socialnetworks.php:38
|
195 |
+
msgid "WP Maintenance - Settings"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: views/wp-maintenance-colors.php:41 views/wp-maintenance-countdown.php:27
|
199 |
+
#: views/wp-maintenance-css.php:34 views/wp-maintenance-dashboard.php:31
|
200 |
+
#: views/wp-maintenance-footer.php:27 views/wp-maintenance-picture.php:66
|
201 |
+
#: views/wp-maintenance-seo.php:26 views/wp-maintenance-settings.php:61
|
202 |
+
#: views/wp-maintenance-socialnetworks.php:40
|
203 |
+
msgid "Options saved."
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: views/wp-maintenance-colors.php:59
|
207 |
msgid "Choice general colors"
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: views/wp-maintenance-colors.php:62
|
211 |
msgid "Background page color"
|
212 |
msgstr ""
|
213 |
|
214 |
+
#: views/wp-maintenance-colors.php:64
|
215 |
msgid "Header color"
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: views/wp-maintenance-colors.php:68 views/wp-maintenance-colors.php:110
|
219 |
+
#: views/wp-maintenance-colors.php:152 views/wp-maintenance-colors.php:181
|
220 |
+
#: views/wp-maintenance-colors.php:228 views/wp-maintenance-colors.php:273
|
221 |
+
#: views/wp-maintenance-colors.php:342 views/wp-maintenance-countdown.php:51
|
222 |
+
#: views/wp-maintenance-countdown.php:94 views/wp-maintenance-countdown.php:137
|
223 |
+
#: views/wp-maintenance-css.php:61 views/wp-maintenance-dashboard.php:56
|
224 |
+
#: views/wp-maintenance-dashboard.php:81 views/wp-maintenance-dashboard.php:109
|
225 |
+
#: views/wp-maintenance-footer.php:75 views/wp-maintenance-footer.php:98
|
226 |
+
#: views/wp-maintenance-picture.php:102 views/wp-maintenance-picture.php:158
|
227 |
+
#: views/wp-maintenance-picture.php:198 views/wp-maintenance-seo.php:55
|
228 |
+
#: views/wp-maintenance-seo.php:69 views/wp-maintenance-seo.php:88
|
229 |
+
#: views/wp-maintenance-settings.php:106 views/wp-maintenance-settings.php:133
|
230 |
+
#: views/wp-maintenance-settings.php:147 views/wp-maintenance-settings.php:161
|
231 |
+
#: views/wp-maintenance-settings.php:175
|
232 |
+
#: views/wp-maintenance-socialnetworks.php:68
|
233 |
+
#: views/wp-maintenance-socialnetworks.php:135
|
234 |
+
#: views/wp-maintenance-socialnetworks.php:198
|
235 |
+
#: views/wp-maintenance-socialnetworks.php:211
|
|
|
236 |
msgid "Save"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: views/wp-maintenance-colors.php:75
|
240 |
msgid "Title Settings"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: views/wp-maintenance-colors.php:78
|
244 |
msgid "Choice title font and color"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: views/wp-maintenance-colors.php:79
|
248 |
msgid "Set the color and font of the title"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: views/wp-maintenance-colors.php:82 views/wp-maintenance-colors.php:124
|
252 |
msgid "Choose font color"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: views/wp-maintenance-colors.php:87 views/wp-maintenance-colors.php:129
|
256 |
+
#: views/wp-maintenance-colors.php:250 views/wp-maintenance-colors.php:293
|
257 |
msgid "Choose Size and Style"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: views/wp-maintenance-colors.php:97 views/wp-maintenance-colors.php:139
|
261 |
+
#: views/wp-maintenance-colors.php:260 views/wp-maintenance-colors.php:303
|
262 |
msgid "bold"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: views/wp-maintenance-colors.php:102 views/wp-maintenance-colors.php:144
|
266 |
+
#: views/wp-maintenance-colors.php:265 views/wp-maintenance-colors.php:308
|
267 |
msgid "Italic"
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: views/wp-maintenance-colors.php:117
|
271 |
msgid "Text Settings"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: views/wp-maintenance-colors.php:120
|
275 |
msgid "Choice text font and color"
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: views/wp-maintenance-colors.php:121
|
279 |
msgid "Set the color and font of the text"
|
280 |
msgstr ""
|
281 |
|
282 |
+
#: views/wp-maintenance-colors.php:158
|
283 |
msgid "Frame Settings"
|
284 |
msgstr ""
|
285 |
|
286 |
+
#: views/wp-maintenance-colors.php:162
|
287 |
msgid "Yes, enable frame"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: views/wp-maintenance-colors.php:168
|
291 |
msgid "Choice frame color and style"
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: views/wp-maintenance-colors.php:171
|
295 |
msgid "Choose frame color"
|
296 |
msgstr ""
|
297 |
|
298 |
+
#: views/wp-maintenance-colors.php:176
|
299 |
msgid "Choose Style"
|
300 |
msgstr ""
|
301 |
|
302 |
+
#: views/wp-maintenance-colors.php:177
|
303 |
msgid "Opacity"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: views/wp-maintenance-colors.php:178
|
307 |
msgid "Width"
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: views/wp-maintenance-colors.php:190
|
311 |
msgid "Countdown Settings"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: views/wp-maintenance-colors.php:193
|
315 |
msgid "Choice Countdown font, colors and style"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: views/wp-maintenance-colors.php:196
|
319 |
msgid "Countdown text color"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: views/wp-maintenance-colors.php:201
|
323 |
msgid "Countdown background color"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: views/wp-maintenance-colors.php:206
|
327 |
msgid "Choose font"
|
328 |
msgstr ""
|
329 |
|
330 |
+
#: views/wp-maintenance-colors.php:218
|
331 |
+
msgid "Choose font for end text"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: views/wp-maintenance-colors.php:235
|
335 |
msgid "Footer settings"
|
336 |
msgstr ""
|
337 |
|
338 |
+
#: views/wp-maintenance-colors.php:237
|
339 |
msgid "Choice footer font, colors and style"
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: views/wp-maintenance-colors.php:240
|
343 |
msgid "Text color"
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: views/wp-maintenance-colors.php:245
|
347 |
msgid "Background color"
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: views/wp-maintenance-colors.php:280
|
351 |
msgid "Form color settings"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: views/wp-maintenance-colors.php:282
|
355 |
msgid "Choice form colors"
|
356 |
msgstr ""
|
357 |
|
358 |
+
#: views/wp-maintenance-colors.php:321
|
359 |
msgid "Field text color"
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: views/wp-maintenance-colors.php:323
|
363 |
msgid "Field border color"
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: views/wp-maintenance-colors.php:325
|
367 |
msgid "Field background color"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: views/wp-maintenance-colors.php:327
|
371 |
msgid "Button text color"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: views/wp-maintenance-colors.php:331
|
375 |
msgid "Button color"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: views/wp-maintenance-colors.php:333
|
379 |
msgid "Button color hover"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: views/wp-maintenance-colors.php:335
|
383 |
msgid "Button color onclick"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: views/wp-maintenance-colors.php:346
|
387 |
#, php-format
|
388 |
msgid "Enable %s to customize the forms"
|
389 |
msgstr ""
|
390 |
|
391 |
+
#: views/wp-maintenance-colors.php:346
|
392 |
msgid "newsletter option"
|
393 |
msgstr ""
|
394 |
|
395 |
+
#: views/wp-maintenance-colors.php:350
|
396 |
msgid "Enable Mailpoet or MailChimp extensions to customize the forms"
|
397 |
msgstr ""
|
398 |
|
399 |
+
#: views/wp-maintenance-countdown.php:44
|
|
|
|
|
|
|
|
|
400 |
msgid "Enable a countdown"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: views/wp-maintenance-countdown.php:46
|
404 |
msgid "Yes, enable a countdown"
|
405 |
msgstr ""
|
406 |
|
407 |
+
#: views/wp-maintenance-countdown.php:56
|
408 |
msgid "Date/time Launch"
|
409 |
msgstr ""
|
410 |
|
411 |
+
#: views/wp-maintenance-countdown.php:59
|
412 |
msgid "Select the launch date/time"
|
413 |
msgstr ""
|
414 |
|
415 |
+
#: views/wp-maintenance-countdown.php:91
|
416 |
msgid "at"
|
417 |
msgstr ""
|
418 |
|
419 |
+
#: views/wp-maintenance-countdown.php:99
|
420 |
msgid "Others Settings"
|
421 |
msgstr ""
|
422 |
|
423 |
+
#: views/wp-maintenance-countdown.php:102
|
424 |
msgid "Enable seconds ?"
|
425 |
msgstr ""
|
426 |
|
427 |
+
#: views/wp-maintenance-countdown.php:105
|
428 |
msgid "Yes, enable seconds"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: views/wp-maintenance-countdown.php:110
|
432 |
msgid "Disable maintenance mode at the end of the countdown?"
|
433 |
msgstr ""
|
434 |
|
435 |
+
#: views/wp-maintenance-countdown.php:112
|
436 |
msgid "Yes, disable maintenance mode at the end of countdown"
|
437 |
msgstr ""
|
438 |
|
439 |
+
#: views/wp-maintenance-countdown.php:117
|
440 |
msgid "End message after end countdown"
|
441 |
msgstr ""
|
442 |
|
545 |
msgid "Select a year"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: views/wp-maintenance-css.php:18
|
549 |
msgid "The Style Sheet has been reset!"
|
550 |
msgstr ""
|
551 |
|
557 |
msgid "Click \"Reset\" and \"Save\" to retrieve the default style sheet."
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: views/wp-maintenance-css.php:55
|
561 |
msgid "Yes, reset style sheet"
|
562 |
msgstr ""
|
563 |
|
585 |
msgid "Use this code for countdown color"
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: views/wp-maintenance-css.php:72
|
589 |
+
msgid "Use this code for bottom text color"
|
590 |
+
msgstr ""
|
591 |
+
|
592 |
+
#: views/wp-maintenance-css.php:76
|
593 |
msgid "Need CSS code for MailPoet plugin?"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: views/wp-maintenance-css.php:77 views/wp-maintenance-css.php:92
|
597 |
msgid "Click for select all"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: views/wp-maintenance-css.php:91
|
601 |
msgid "Need CSS code for MailChimp plugin?"
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: views/wp-maintenance-dashboard.php:48
|
605 |
msgid "Activate maintenance mode"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: views/wp-maintenance-dashboard.php:51
|
609 |
msgid "Yes, enable maintenance mode"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: views/wp-maintenance-dashboard.php:61
|
613 |
msgid "Title and text"
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: views/wp-maintenance-dashboard.php:87
|
617 |
msgid "Activate newsletter block"
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: views/wp-maintenance-dashboard.php:89
|
621 |
msgid "Yes, enable newsletter block"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: views/wp-maintenance-dashboard.php:96
|
625 |
msgid "Enter title for the newletter block"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: views/wp-maintenance-dashboard.php:101
|
629 |
msgid "Type of the newletter block"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: views/wp-maintenance-dashboard.php:102
|
633 |
msgid "Enter your newletter shortcode here:"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: views/wp-maintenance-dashboard.php:104
|
637 |
msgid "Or enter your newletter iframe code here:"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: views/wp-maintenance-footer.php:45
|
641 |
msgid "Enable Footer?"
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: views/wp-maintenance-footer.php:49
|
645 |
msgid "Yes, enable footer"
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: views/wp-maintenance-footer.php:56
|
649 |
msgid "Text in the footer"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: views/wp-maintenance-footer.php:82
|
653 |
msgid "Add a link to dashboard in the footer?"
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: views/wp-maintenance-footer.php:86
|
657 |
msgid "Yes, show text and link to go to the dashboard"
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: views/wp-maintenance-footer.php:93
|
661 |
+
msgid "Enter your text and #DASHBOARD shortcode"
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: views/wp-maintenance-footer.php:95
|
665 |
+
msgid "Eg: connect to #DASHBOARD here!"
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: views/wp-maintenance-footer.php:95
|
669 |
msgid ""
|
670 |
+
"(#DASHBOARD will be replaced with the link to the dashboard and the word "
|
671 |
"\"Dashboard\")"
|
672 |
msgstr ""
|
673 |
|
674 |
+
#: views/wp-maintenance-picture.php:84
|
|
|
|
|
|
|
|
|
675 |
msgid "Header picture"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: views/wp-maintenance-picture.php:87
|
679 |
msgid "Choice you picture for header page"
|
680 |
msgstr ""
|
681 |
|
682 |
+
#: views/wp-maintenance-picture.php:89 views/wp-maintenance-picture.php:125
|
683 |
+
#: views/wp-maintenance-seo.php:78
|
684 |
msgid "Enter a URL or upload an image"
|
685 |
msgstr ""
|
686 |
|
687 |
+
#: views/wp-maintenance-picture.php:91 views/wp-maintenance-picture.php:126
|
688 |
+
#: views/wp-maintenance-seo.php:79
|
689 |
msgid "Media Image Library"
|
690 |
msgstr ""
|
691 |
|
692 |
+
#: views/wp-maintenance-picture.php:92
|
693 |
msgid ""
|
694 |
"URL path to image to replace default picture. (You can upload your image "
|
695 |
"with the WordPress media uploader)"
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: views/wp-maintenance-picture.php:93
|
699 |
+
msgid "Width:"
|
700 |
+
msgstr ""
|
701 |
+
|
702 |
+
#: views/wp-maintenance-picture.php:94
|
703 |
+
msgid "Height:"
|
704 |
+
msgstr ""
|
705 |
+
|
706 |
+
#: views/wp-maintenance-picture.php:97
|
707 |
+
#: views/wp-maintenance-socialnetworks.php:193
|
708 |
msgid "You use this picture:"
|
709 |
msgstr ""
|
710 |
|
711 |
+
#: views/wp-maintenance-picture.php:97 views/wp-maintenance-picture.php:133
|
712 |
msgid "Remove"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: views/wp-maintenance-picture.php:108
|
716 |
msgid "Background picture"
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: views/wp-maintenance-picture.php:111
|
720 |
msgid "Disable background or pattern picture"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: views/wp-maintenance-picture.php:118
|
724 |
msgid "Yes, activate picture background"
|
725 |
msgstr ""
|
726 |
|
727 |
+
#: views/wp-maintenance-picture.php:129
|
728 |
msgid "You use this background picture:"
|
729 |
msgstr ""
|
730 |
|
731 |
+
#: views/wp-maintenance-picture.php:139
|
732 |
msgid "Background picture options"
|
733 |
msgstr ""
|
734 |
|
735 |
+
#: views/wp-maintenance-picture.php:147
|
736 |
msgid "Background Opacity"
|
737 |
msgstr ""
|
738 |
|
739 |
+
#: views/wp-maintenance-picture.php:152
|
740 |
msgid "Fix the background picture"
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: views/wp-maintenance-picture.php:164
|
744 |
msgid "Pattern picture"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: views/wp-maintenance-picture.php:168
|
748 |
msgid "Yes, activate pattern background"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: views/wp-maintenance-picture.php:176
|
752 |
msgid "Choose a pattern"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: views/wp-maintenance-picture.php:179
|
756 |
msgid "NO PATTERN"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: views/wp-maintenance-picture.php:192
|
760 |
msgid "You use this pattern"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: views/wp-maintenance-seo.php:44
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
764 |
msgid "Active SEO settings?"
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: views/wp-maintenance-seo.php:48
|
768 |
msgid "Yes, active SEO"
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: views/wp-maintenance-seo.php:57
|
772 |
msgid "SEO Title & Description"
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: views/wp-maintenance-seo.php:60
|
776 |
msgid "SEO Meta Title"
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: views/wp-maintenance-seo.php:65
|
780 |
msgid "SEO Meta Description"
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: views/wp-maintenance-seo.php:75
|
784 |
msgid "Add a favicon"
|
785 |
msgstr ""
|
786 |
|
787 |
+
#: views/wp-maintenance-seo.php:80
|
788 |
msgid ""
|
789 |
"Favicons are displayed in a browser tab. Need Help <a href=\"https://"
|
790 |
"realfavicongenerator.net/\" target=\"_blank\">creating a favicon</a>?"
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: views/wp-maintenance-seo.php:83
|
794 |
msgid "You use this favicon:"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: views/wp-maintenance-settings.php:77
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
798 |
msgid "Theme maintenance page"
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: views/wp-maintenance-settings.php:79
|
802 |
msgid "Yes, I use a theme maintenance page"
|
803 |
msgstr ""
|
804 |
|
805 |
+
#: views/wp-maintenance-settings.php:86
|
|
|
|
|
|
|
|
|
806 |
msgid "You can use this shortcode to include Social Networks icons:"
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: views/wp-maintenance-settings.php:90
|
810 |
msgid "Delete custom settings upon plugin deactivation?"
|
811 |
msgstr ""
|
812 |
|
813 |
+
#: views/wp-maintenance-settings.php:92
|
814 |
msgid ""
|
815 |
"Yes, all custom settings will be deleted from database upon plugin "
|
816 |
"deactivation"
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: views/wp-maintenance-settings.php:99
|
820 |
msgid "Display code HTTP Error 503?"
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: views/wp-maintenance-settings.php:101
|
824 |
msgid ""
|
825 |
"Yes, inform visitors and search engines that my site is temporarily "
|
826 |
"unavailable."
|
827 |
msgstr ""
|
828 |
|
829 |
+
#: views/wp-maintenance-settings.php:113
|
830 |
msgid "Roles and Capabilities"
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: views/wp-maintenance-settings.php:115
|
834 |
msgid "Allow the site to display these roles"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: views/wp-maintenance-settings.php:140
|
838 |
msgid "IP autorized"
|
839 |
msgstr ""
|
840 |
|
841 |
+
#: views/wp-maintenance-settings.php:143
|
842 |
msgid ""
|
843 |
"Allow the site to display these IP addresses. Please, enter one IP address "
|
844 |
"by line"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#: views/wp-maintenance-settings.php:154
|
848 |
msgid "ID pages autorized"
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: views/wp-maintenance-settings.php:157
|
852 |
msgid ""
|
853 |
"Allow the site to display these ID pages. Please, enter the ID pages "
|
854 |
"separate with comma"
|
855 |
msgstr ""
|
856 |
|
857 |
+
#: views/wp-maintenance-settings.php:168
|
858 |
msgid "Header Code"
|
859 |
msgstr ""
|
860 |
|
861 |
+
#: views/wp-maintenance-settings.php:171
|
862 |
msgid ""
|
863 |
"The following code will add to the <head> tag. Useful if you need to add "
|
864 |
"additional scripts such as CSS or JS"
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: views/wp-maintenance-socialnetworks.php:58
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
868 |
msgid "Enable social networks"
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: views/wp-maintenance-socialnetworks.php:62
|
872 |
msgid "Yes, enable social networks options"
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: views/wp-maintenance-socialnetworks.php:73
|
876 |
msgid "List of Social networks"
|
877 |
msgstr ""
|
878 |
|
879 |
+
#: views/wp-maintenance-socialnetworks.php:77
|
880 |
msgid "Enter text for the title icons"
|
881 |
msgstr ""
|
882 |
|
883 |
+
#: views/wp-maintenance-socialnetworks.php:82
|
|
|
|
|
|
|
|
|
884 |
msgid "Drad and drop the lines to put in the order you want"
|
885 |
msgstr ""
|
886 |
|
887 |
+
#: views/wp-maintenance-socialnetworks.php:140
|
888 |
msgid "Social Networks Style"
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: views/wp-maintenance-socialnetworks.php:143
|
892 |
msgid "Choose icons size"
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: views/wp-maintenance-socialnetworks.php:156
|
896 |
msgid "Choose icons style"
|
897 |
msgstr ""
|
898 |
|
899 |
+
#: views/wp-maintenance-socialnetworks.php:172
|
900 |
+
msgid "Position"
|
901 |
+
msgstr ""
|
902 |
+
|
903 |
+
#: views/wp-maintenance-socialnetworks.php:174
|
904 |
msgid "Top"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: views/wp-maintenance-socialnetworks.php:175
|
908 |
msgid "Bottom"
|
909 |
msgstr ""
|
910 |
|
911 |
+
#: views/wp-maintenance-socialnetworks.php:180
|
912 |
msgid "Align"
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: views/wp-maintenance-socialnetworks.php:182
|
916 |
msgid "Left"
|
917 |
msgstr ""
|
918 |
|
919 |
+
#: views/wp-maintenance-socialnetworks.php:183
|
920 |
msgid "Center"
|
921 |
msgstr ""
|
922 |
|
923 |
+
#: views/wp-maintenance-socialnetworks.php:184
|
924 |
msgid "Right"
|
925 |
msgstr ""
|
926 |
|
927 |
+
#: views/wp-maintenance-socialnetworks.php:189
|
928 |
msgid "You have your own icons? Enter the folder name of your theme here"
|
929 |
msgstr ""
|
930 |
|
931 |
+
#: views/wp-maintenance-socialnetworks.php:191
|
932 |
+
msgid ""
|
933 |
+
"In your icon's folder child theme, you must have the same names like mine, "
|
934 |
+
"let's mouse over list icons for display picture's name. For example: "
|
935 |
+
msgstr ""
|
936 |
+
|
937 |
+
#: views/wp-maintenance-socialnetworks.php:203
|
938 |
msgid "Reset Social Networks Icons Options"
|
939 |
msgstr ""
|
940 |
|
941 |
+
#: views/wp-maintenance-socialnetworks.php:206
|
942 |
msgid "Yes, reset Social Networks Icons?"
|
943 |
msgstr ""
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Florent73
|
|
3 |
Donate link: https://paypal.me/restezconnectes/20/
|
4 |
Tags: Maintenance, Construction, Launch, Coming soon
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 6.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -18,7 +18,7 @@ The WP Maintenance plugin allows you to put your website on the waiting time for
|
|
18 |
- Upload logo picture
|
19 |
- Upload background picture or pattern
|
20 |
- Countdown
|
21 |
-
-
|
22 |
- Social Networks ready
|
23 |
- Customize CSS
|
24 |
- Insert for shorcode (Newletter or Contact form)
|
@@ -70,6 +70,10 @@ You can translate WP Maintenance on [__translate.wordpress.org__](https://transl
|
|
70 |
|
71 |
== Changelog ==
|
72 |
|
|
|
|
|
|
|
|
|
73 |
= 6.0.7 =
|
74 |
* Remove Slider option
|
75 |
* Several security patches brought
|
3 |
Donate link: https://paypal.me/restezconnectes/20/
|
4 |
Tags: Maintenance, Construction, Launch, Coming soon
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 6.0
|
7 |
+
Stable tag: 6.0.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
18 |
- Upload logo picture
|
19 |
- Upload background picture or pattern
|
20 |
- Countdown
|
21 |
+
- Custom Code Header for Analytics ready
|
22 |
- Social Networks ready
|
23 |
- Customize CSS
|
24 |
- Insert for shorcode (Newletter or Contact form)
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 6.0.8 =
|
74 |
+
* Several security patches brought
|
75 |
+
* WARNING : somes parameters will be reinitilized, please check all
|
76 |
+
|
77 |
= 6.0.7 =
|
78 |
* Remove Slider option
|
79 |
* Several security patches brought
|
socialicons/128x128/about_me.png
DELETED
Binary file
|
socialicons/128x128/facebook.png
DELETED
Binary file
|
socialicons/128x128/flickr.png
DELETED
Binary file
|
socialicons/128x128/google_plus.png
DELETED
Binary file
|
socialicons/128x128/instagram.png
DELETED
Binary file
|
socialicons/128x128/linkedin.png
DELETED
Binary file
|
socialicons/128x128/pinterest.png
DELETED
Binary file
|
socialicons/128x128/soundcloud.png
DELETED
Binary file
|
socialicons/128x128/twitter.png
DELETED
Binary file
|
socialicons/128x128/vimeo.png
DELETED
Binary file
|
socialicons/128x128/youtube.png
DELETED
Binary file
|
socialicons/16x16/about_me.png
DELETED
Binary file
|
socialicons/16x16/facebook.png
DELETED
Binary file
|
socialicons/16x16/flickr.png
DELETED
Binary file
|
socialicons/16x16/google_plus.png
DELETED
Binary file
|
socialicons/16x16/instagram.png
DELETED
Binary file
|
socialicons/16x16/linkedin.png
DELETED
Binary file
|
socialicons/16x16/pinterest.png
DELETED
Binary file
|
socialicons/16x16/soundcloud.png
DELETED
Binary file
|
socialicons/16x16/twitter.png
DELETED
Binary file
|
socialicons/16x16/vimeo.png
DELETED
Binary file
|
socialicons/16x16/youtube.png
DELETED
Binary file
|
socialicons/24x24/about_me.png
DELETED
Binary file
|
socialicons/24x24/facebook.png
DELETED
Binary file
|
socialicons/24x24/flickr.png
DELETED
Binary file
|
socialicons/24x24/google_plus.png
DELETED
Binary file
|
socialicons/24x24/instagram.png
DELETED
Binary file
|
socialicons/24x24/linkedin.png
DELETED
Binary file
|
socialicons/24x24/pinterest.png
DELETED
Binary file
|
socialicons/24x24/soundcloud.png
DELETED
Binary file
|
socialicons/24x24/twitter.png
DELETED
Binary file
|
socialicons/24x24/vimeo.png
DELETED
Binary file
|
socialicons/24x24/youtube.png
DELETED
Binary file
|
socialicons/32x32/about_me.png
DELETED
Binary file
|
socialicons/32x32/facebook.png
DELETED
Binary file
|
socialicons/32x32/flickr.png
DELETED
Binary file
|
socialicons/32x32/google_plus.png
DELETED
Binary file
|
socialicons/32x32/instagram.png
DELETED
Binary file
|
socialicons/32x32/linkedin.png
DELETED
Binary file
|
socialicons/32x32/pinterest.png
DELETED
Binary file
|
socialicons/32x32/soundcloud.png
DELETED
Binary file
|
socialicons/32x32/twitter.png
DELETED
Binary file
|
socialicons/32x32/vimeo.png
DELETED
Binary file
|
socialicons/32x32/youtube.png
DELETED
Binary file
|
socialicons/48x48/about_me.png
DELETED
Binary file
|
socialicons/48x48/facebook.png
DELETED
Binary file
|
socialicons/48x48/flickr.png
DELETED
Binary file
|
socialicons/48x48/google_plus.png
DELETED
Binary file
|
socialicons/48x48/instagram.png
DELETED
Binary file
|
socialicons/48x48/linkedin.png
DELETED
Binary file
|
socialicons/48x48/pinterest.png
DELETED
Binary file
|
socialicons/48x48/soundcloud.png
DELETED
Binary file
|
socialicons/48x48/twitter.png
DELETED
Binary file
|
socialicons/48x48/vimeo.png
DELETED
Binary file
|
socialicons/48x48/youtube.png
DELETED
Binary file
|
socialicons/64x64/about_me.png
DELETED
Binary file
|
socialicons/64x64/facebook.png
DELETED
Binary file
|
socialicons/64x64/flickr.png
DELETED
Binary file
|
socialicons/64x64/google_plus.png
DELETED
Binary file
|
socialicons/64x64/instagram.png
DELETED
Binary file
|
socialicons/64x64/linkedin.png
DELETED
Binary file
|
socialicons/64x64/pinterest.png
DELETED
Binary file
|
socialicons/64x64/soundcloud.png
DELETED
Binary file
|
socialicons/64x64/twitter.png
DELETED
Binary file
|
socialicons/64x64/vimeo.png
DELETED
Binary file
|
socialicons/64x64/youtube.png
DELETED
Binary file
|
socialicons/style1/128/email.png
ADDED
Binary file
|
socialicons/style1/256/email.png
ADDED
Binary file
|
socialicons/style1/32/email.png
ADDED
Binary file
|
socialicons/style1/512/email.png
ADDED
Binary file
|
socialicons/style1/64/email.png
ADDED
Binary file
|
socialicons/style2/128/email.png
ADDED
Binary file
|
socialicons/style2/256/email.png
ADDED
Binary file
|
socialicons/style2/32/email.png
ADDED
Binary file
|
socialicons/style2/512/email.png
ADDED
Binary file
|
socialicons/style2/64/email.png
ADDED
Binary file
|
socialicons/style3/128/email.png
ADDED
Binary file
|
socialicons/style3/256/email.png
ADDED
Binary file
|
socialicons/style3/32/email.png
ADDED
Binary file
|
socialicons/style3/512/email.png
ADDED
Binary file
|
socialicons/style3/64/email.png
ADDED
Binary file
|
socialicons/style4/128/email.png
ADDED
Binary file
|
socialicons/style4/256/email.png
ADDED
Binary file
|
socialicons/style4/32/email.png
ADDED
Binary file
|
socialicons/style4/512/email.png
ADDED
Binary file
|
socialicons/style4/64/email.png
ADDED
Binary file
|
socialicons/style4/icon.afphoto
ADDED
Binary file
|
socialicons/style5/128/email.png
ADDED
Binary file
|
socialicons/style5/256/email.png
ADDED
Binary file
|
socialicons/style5/32/email.png
ADDED
Binary file
|
socialicons/style5/512/email.png
ADDED
Binary file
|
socialicons/style5/64/email.png
ADDED
Binary file
|
socialicons/style6/128/{social-036_android.png → android.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-016_apple.png → apple.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-037_behance.png → behance.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-025_blogger.png → blogger.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-022_deviantart.png → deviantart.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-002_dribbble.png → dribbble.png}
RENAMED
File without changes
|
socialicons/style6/128/email.png
ADDED
Binary file
|
socialicons/style6/128/{social-050_evernote.png → evernote.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-006_facebook.png → facebook.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-004_flickr.png → flickr.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-038_instagram.png → instagram.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-011_linkedin.png → linkedin.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-029_paypal.png → paypal.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-033_pinterest.png → pinterest.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-007_skype.png → skype.png}
RENAMED
File without changes
|
socialicons/style6/128/social-005_twitter.png
DELETED
Binary file
|
socialicons/style6/128/social-040_google_plus.png
DELETED
Binary file
|
socialicons/style6/128/{social-034_soundcloud.png → soundcloud.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-015_tumblr.png → tumblr.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-003_twitter.png → twitter.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-013_vimeo.png → vimeo.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-032_windows8.png → windows8.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-026_wordpress.png → wordpress.png}
RENAMED
File without changes
|
socialicons/style6/128/{social-018_youtube.png → youtube.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-036_android.png → android.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-016_apple.png → apple.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-037_behance.png → behance.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-025_blogger.png → blogger.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-019_delicious.png → delicious.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-022_deviantart.png → deviantart.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-002_dribbble.png → dribbble.png}
RENAMED
File without changes
|
socialicons/style6/256/email.png
ADDED
Binary file
|
socialicons/style6/256/{social-050_evernote.png → evernote.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-006_facebook.png → facebook.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-004_flickr.png → flickr.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-038_instagram.png → instagram.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-011_linkedin.png → linkedin.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-029_paypal.png → paypal.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-033_pinterest.png → pinterest.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-020_rss.png → rss.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-007_skype.png → skype.png}
RENAMED
File without changes
|
socialicons/style6/256/social-005_twitter.png
DELETED
Binary file
|
socialicons/style6/256/social-040_google_plus.png
DELETED
Binary file
|
socialicons/style6/256/{social-034_soundcloud.png → soundcloud.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-015_tumblr.png → tumblr.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-003_twitter.png → twitter.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-013_vimeo.png → vimeo.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-032_windows8.png → windows8.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-026_wordpress.png → wordpress.png}
RENAMED
File without changes
|
socialicons/style6/256/{social-018_youtube.png → youtube.png}
RENAMED
File without changes
|
socialicons/style6/32/email.png
ADDED
Binary file
|
socialicons/style6/512/{social-036_android.png → android.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-016_apple.png → apple.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-037_behance.png → behance.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-025_blogger.png → blogger.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-022_deviantart.png → deviantart.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-002_dribbble.png → dribbble.png}
RENAMED
File without changes
|
socialicons/style6/512/email.png
ADDED
Binary file
|
socialicons/style6/512/{social-050_evernote.png → evernote.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-006_facebook.png → facebook.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-004_flickr.png → flickr.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-009_google.png → google.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-038_instagram.png → instagram.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-011_linkedin.png → linkedin.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-029_paypal.png → paypal.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-033_pinterest.png → pinterest.png}
RENAMED
File without changes
|
socialicons/style6/512/social-040_google_plus.png
DELETED
Binary file
|
socialicons/style6/512/{social-034_soundcloud.png → soundcloud.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-015_tumblr.png → tumblr.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-005_twitter.png → twitter.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-013_vimeo.png → vimeo.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-032_windows8.png → windows8.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-026_wordpress.png → wordpress.png}
RENAMED
File without changes
|
socialicons/style6/512/{social-018_youtube.png → youtube.png}
RENAMED
File without changes
|
socialicons/style6/64/email.png
ADDED
Binary file
|
themes/default/functions.php
CHANGED
@@ -4,13 +4,13 @@
|
|
4 |
function wpm_title_seo() {
|
5 |
|
6 |
// Récupère les paramètres sauvegardés
|
7 |
-
if(get_option('
|
8 |
-
$o = get_option('
|
9 |
|
10 |
$output = get_bloginfo( 'name', 'display' );
|
11 |
|
12 |
if ( (isset($o['enable_seo']) && $o['enable_seo']==1) && $o['seo_title']!='' ) {
|
13 |
-
$output =
|
14 |
}
|
15 |
|
16 |
return $output;
|
@@ -32,8 +32,8 @@ function wpm_title() {
|
|
32 |
|
33 |
function wpm_metadescription() {
|
34 |
// Récupère les paramètres sauvegardés
|
35 |
-
if(get_option('
|
36 |
-
$o = get_option('
|
37 |
|
38 |
$output = '<meta name="description" content="'.get_bloginfo( 'description', 'display' ).'">';
|
39 |
|
@@ -47,23 +47,29 @@ function wpm_metadescription() {
|
|
47 |
function wpm_footer_text() {
|
48 |
|
49 |
// Récupère les paramètres sauvegardés
|
50 |
-
if(get_option('
|
51 |
-
$o = get_option('
|
52 |
|
53 |
$output = '';
|
54 |
|
55 |
if( isset($o['enable_footer']) && $o['enable_footer'] == 1 ) {
|
56 |
|
57 |
-
$output .= '<footer>
|
|
|
|
|
58 |
|
59 |
if( isset($o['text_bt_maintenance']) && $o['text_bt_maintenance']!='' ) {
|
60 |
$output .= nl2br(stripslashes($o['text_bt_maintenance']));
|
61 |
}
|
62 |
if( (isset($o['add_wplogin']) && $o['add_wplogin']==1) && (isset($o['add_wplogin_title']) && $o['add_wplogin_title']!='') ) {
|
63 |
-
$output .= '<br /><br /><a href="'.get_admin_url().'">'.str_replace('
|
64 |
|
65 |
}
|
66 |
-
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
|
69 |
return $output;
|
@@ -71,8 +77,8 @@ function wpm_footer_text() {
|
|
71 |
|
72 |
function wpm_favicon() {
|
73 |
// Récupère les paramètres sauvegardés
|
74 |
-
if(get_option('
|
75 |
-
$o = get_option('
|
76 |
|
77 |
$output = '';
|
78 |
|
@@ -87,8 +93,9 @@ function wpm_favicon() {
|
|
87 |
function wpm_head() {
|
88 |
|
89 |
// Récupère les paramètres sauvegardés
|
90 |
-
if(get_option('
|
91 |
-
$o = get_option('
|
|
|
92 |
|
93 |
$output = "<!-- Add Google Fonts -->\n";
|
94 |
$output .= '<link rel="stylesheet" href="https://fonts.googleapis.com/css?family='.str_replace(' ', '+', $o['font_title']).'|'.str_replace(' ', '+',$o['font_text']).'|'.str_replace(' ', '+',$o['font_text_bottom']).'|'.str_replace(' ', '+',$o['font_cpt']);
|
@@ -116,8 +123,8 @@ function wpm_text() {
|
|
116 |
function wpm_logo() {
|
117 |
|
118 |
// Récupère les paramètres sauvegardés
|
119 |
-
if(get_option('
|
120 |
-
$o = get_option('
|
121 |
|
122 |
$output = '';
|
123 |
|
@@ -136,13 +143,15 @@ function wpm_customcss() {
|
|
136 |
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
137 |
$o = get_option('wp_maintenance_settings');
|
138 |
|
139 |
-
|
140 |
-
|
|
|
141 |
|
142 |
-
|
143 |
-
|
|
|
144 |
|
145 |
-
$oo = get_option('
|
146 |
|
147 |
// CSS
|
148 |
$output = '<style type="text/css">';
|
@@ -151,118 +160,118 @@ function wpm_customcss() {
|
|
151 |
$addStyleGeneral = '';
|
152 |
|
153 |
/* Définition des couleurs par défault */
|
154 |
-
if( !isset($
|
155 |
-
if( !isset($
|
156 |
|
157 |
/* Traitement de la feuille de style */
|
158 |
$styleRemplacements = array (
|
159 |
-
"#_COLORTXT" => $
|
160 |
-
"#_COLORBG" => $
|
161 |
-
"#_COLORCPTBG" => $
|
162 |
-
"#_DATESIZE" => $
|
163 |
-
"#_COLORCPT" => $
|
164 |
-
"#_COLOR_BG_BT" => $
|
165 |
-
"#_COLOR_TXT_BT" => $
|
166 |
-
"#_COLORHEAD" => $
|
167 |
);
|
168 |
-
$remplaceStyle = str_replace(array_keys($styleRemplacements), array_values($styleRemplacements), get_option('
|
169 |
$output .= wpm_compress($remplaceStyle);
|
170 |
|
171 |
/* Si on a activé un motif */
|
172 |
-
if( isset($
|
173 |
|
174 |
$addStyleGeneral .= 'body {
|
175 |
-
background-image: url('.esc_url(WP_PLUGIN_URL.'/wp-maintenance/images/pattern'.$
|
176 |
background-repeat: repeat;
|
177 |
-
background-color: '.$
|
178 |
|
179 |
}
|
180 |
|
181 |
/* Si on a une image de fond */
|
182 |
-
if( isset($
|
183 |
|
184 |
-
if( isset($
|
185 |
|
186 |
-
if( empty($
|
187 |
-
if( isset($
|
188 |
-
$
|
189 |
} else {
|
190 |
-
$
|
191 |
}
|
192 |
-
$addStyleGeneral .= 'body {display: grid!important;background:url('.esc_url($
|
193 |
-
-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-color: '.$
|
194 |
|
195 |
-
if( isset($
|
196 |
-
$addStyleGeneral .= '#main { background-color: rgba(0,0,0,'.esc_html($
|
197 |
}
|
198 |
}
|
199 |
|
200 |
}
|
201 |
|
202 |
-
if( isset($
|
203 |
-
$addStyleGeneral .= 'body {background-color: '.$
|
204 |
}
|
205 |
|
206 |
-
if( isset($
|
207 |
-
$addStyleGeneral .= 'header { background-color:'.$
|
208 |
}
|
209 |
$addStyleGeneral .= '.wpm_social_icon {float:left;width:'.esc_html($oo['size']).'px;margin:0px 5px auto;}.wpm_social ul {margin: 10px 0;max-width: 100%;padding: 0;text-align: '.esc_html($oo['align']).';}';
|
210 |
|
211 |
/* Si container activé */
|
212 |
-
if( isset($
|
213 |
|
214 |
-
if( empty($
|
215 |
-
if( empty($
|
216 |
-
if( empty($
|
217 |
-
if( isset($
|
218 |
-
$addStyleGeneral .= '#sscontent {background-color: rgba('.esc_html($paramRGBColor['rouge']).','.esc_html($paramRGBColor['vert']).','.esc_html($paramRGBColor['bleu']).', '.esc_html($
|
219 |
|
220 |
}
|
221 |
|
222 |
$addStyleGeneral .= '.wpm_newletter {';
|
223 |
-
if( isset($
|
224 |
-
if( isset($
|
225 |
-
if( isset($
|
226 |
-
if( isset($
|
227 |
$addStyleGeneral .= '}
|
228 |
h3 {';
|
229 |
-
if( isset($
|
230 |
-
if( isset($
|
231 |
-
if( isset($
|
232 |
-
if( isset($
|
233 |
-
if( isset($
|
234 |
$addStyleGeneral .= 'line-height: 100%;text-align:center;margin:0.5em auto;
|
235 |
}
|
236 |
p {';
|
237 |
-
if( isset($
|
238 |
-
if( isset($
|
239 |
-
if( isset($
|
240 |
-
if( isset($
|
241 |
-
if( isset($
|
242 |
$addStyleGeneral .= 'line-height: 100%;text-align:center;margin:0.5em auto;padding-left:2%;padding-right:2%;
|
243 |
}
|
244 |
footer {';
|
245 |
-
if( isset($
|
246 |
-
if( isset($
|
247 |
-
if( isset($
|
248 |
-
if( isset($
|
249 |
-
if( isset($
|
250 |
-
if( isset($
|
251 |
$addStyleGeneral .= 'text-decoration:none;
|
252 |
}
|
253 |
footer a:link {';
|
254 |
-
if( isset($
|
255 |
-
if( isset($
|
256 |
$addStyleGeneral .= 'text-decoration:none;
|
257 |
}
|
258 |
footer a:visited {';
|
259 |
-
if( isset($
|
260 |
-
if( isset($
|
261 |
$addStyleGeneral .= 'text-decoration:none;
|
262 |
}
|
263 |
footer a:hover {
|
264 |
text-decoration:underline;';
|
265 |
-
if( isset($
|
266 |
$addStyleGeneral .= '
|
267 |
}';
|
268 |
|
@@ -277,8 +286,8 @@ function wpm_customcss() {
|
|
277 |
function wpm_headercode() {
|
278 |
|
279 |
// Récupère les paramètres sauvegardés
|
280 |
-
if(get_option('
|
281 |
-
$o = get_option('
|
282 |
|
283 |
$output = '';
|
284 |
|
@@ -292,7 +301,7 @@ function wpm_headercode() {
|
|
292 |
function wpm_social_position($position = '') {
|
293 |
|
294 |
// Récupère les paramètres sauvegardés
|
295 |
-
$o = get_option('
|
296 |
|
297 |
$output = '';
|
298 |
if( isset($o['enable']) && $o['enable'] == 1 ) {
|
@@ -315,31 +324,36 @@ function wpm_stylenewsletter() {
|
|
315 |
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
316 |
$o = get_option('wp_maintenance_settings');
|
317 |
|
|
|
|
|
|
|
|
|
|
|
318 |
$output = '';
|
319 |
|
320 |
-
if( empty($
|
321 |
-
if( empty($
|
322 |
-
if( empty($
|
323 |
-
if( empty($
|
324 |
-
if( empty($
|
325 |
-
if( empty($
|
326 |
-
if( empty($
|
327 |
|
328 |
$wysijaRemplacements = array (
|
329 |
-
"#_COLORTXT" => esc_html($
|
330 |
-
"#_COLORBG" => esc_html($
|
331 |
-
"#_COLORBORDER" => esc_html($
|
332 |
-
"#_COLORBUTTON" => esc_html($
|
333 |
-
"#_COLORTEXTBUTTON" => esc_html($
|
334 |
-
"#_COLOR_BTN_HOVER" => esc_html($
|
335 |
-
"#_COLOR_BTN_CLICK" => esc_html($
|
336 |
);
|
337 |
|
338 |
if( isset($o['code_newletter']) && $o['code_newletter']!='' && strpos($o['code_newletter'], 'wysija_form') == 1 ) {
|
339 |
|
340 |
$output = str_replace(array_keys($wysijaRemplacements), array_values($wysijaRemplacements), wpm_wysija_style() );
|
341 |
|
342 |
-
} else if( strpos($o['code_newletter'], 'mc4wp_form') == 1 ) {
|
343 |
|
344 |
$output = str_replace(array_keys($wysijaRemplacements), array_values($wysijaRemplacements), wpm_mc4wp_style() );
|
345 |
|
4 |
function wpm_title_seo() {
|
5 |
|
6 |
// Récupère les paramètres sauvegardés
|
7 |
+
if(get_option('wp_maintenance_settings_seo')) { extract(get_option('wp_maintenance_settings_seo')); }
|
8 |
+
$o = get_option('wp_maintenance_settings_seo');
|
9 |
|
10 |
$output = get_bloginfo( 'name', 'display' );
|
11 |
|
12 |
if ( (isset($o['enable_seo']) && $o['enable_seo']==1) && $o['seo_title']!='' ) {
|
13 |
+
$output = esc_html( $o['seo_title'] );
|
14 |
}
|
15 |
|
16 |
return $output;
|
32 |
|
33 |
function wpm_metadescription() {
|
34 |
// Récupère les paramètres sauvegardés
|
35 |
+
if(get_option('wp_maintenance_settings_seo')) { extract(get_option('wp_maintenance_settings_seo')); }
|
36 |
+
$o = get_option('wp_maintenance_settings_seo');
|
37 |
|
38 |
$output = '<meta name="description" content="'.get_bloginfo( 'description', 'display' ).'">';
|
39 |
|
47 |
function wpm_footer_text() {
|
48 |
|
49 |
// Récupère les paramètres sauvegardés
|
50 |
+
if(get_option('wp_maintenance_settings_footer')) { extract(get_option('wp_maintenance_settings_footer')); }
|
51 |
+
$o = get_option('wp_maintenance_settings_footer');
|
52 |
|
53 |
$output = '';
|
54 |
|
55 |
if( isset($o['enable_footer']) && $o['enable_footer'] == 1 ) {
|
56 |
|
57 |
+
$output .= '<div class="footer-basic">
|
58 |
+
<footer>
|
59 |
+
<p class="copyright">';
|
60 |
|
61 |
if( isset($o['text_bt_maintenance']) && $o['text_bt_maintenance']!='' ) {
|
62 |
$output .= nl2br(stripslashes($o['text_bt_maintenance']));
|
63 |
}
|
64 |
if( (isset($o['add_wplogin']) && $o['add_wplogin']==1) && (isset($o['add_wplogin_title']) && $o['add_wplogin_title']!='') ) {
|
65 |
+
$output .= '<br /><br /><a href="'.get_admin_url().'">'.str_replace('#DASHBOARD', ' '.__('Dashboard', 'wp-maintenance'), esc_html($o['add_wplogin_title'])).'</a>';
|
66 |
|
67 |
}
|
68 |
+
|
69 |
+
$output .= '</p>
|
70 |
+
</footer>
|
71 |
+
</div>';
|
72 |
+
|
73 |
}
|
74 |
|
75 |
return $output;
|
77 |
|
78 |
function wpm_favicon() {
|
79 |
// Récupère les paramètres sauvegardés
|
80 |
+
if(get_option('wp_maintenance_settings_seo')) { extract(get_option('wp_maintenance_settings_seo')); }
|
81 |
+
$o = get_option('wp_maintenance_settings_seo');
|
82 |
|
83 |
$output = '';
|
84 |
|
93 |
function wpm_head() {
|
94 |
|
95 |
// Récupère les paramètres sauvegardés
|
96 |
+
if(get_option('wp_maintenance_settings_colors')) { extract(get_option('wp_maintenance_settings_colors')); }
|
97 |
+
$o = get_option('wp_maintenance_settings_colors');
|
98 |
+
|
99 |
|
100 |
$output = "<!-- Add Google Fonts -->\n";
|
101 |
$output .= '<link rel="stylesheet" href="https://fonts.googleapis.com/css?family='.str_replace(' ', '+', $o['font_title']).'|'.str_replace(' ', '+',$o['font_text']).'|'.str_replace(' ', '+',$o['font_text_bottom']).'|'.str_replace(' ', '+',$o['font_cpt']);
|
123 |
function wpm_logo() {
|
124 |
|
125 |
// Récupère les paramètres sauvegardés
|
126 |
+
if(get_option('wp_maintenance_settings_picture')) { extract(get_option('wp_maintenance_settings_picture')); }
|
127 |
+
$o = get_option('wp_maintenance_settings_picture');
|
128 |
|
129 |
$output = '';
|
130 |
|
143 |
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
144 |
$o = get_option('wp_maintenance_settings');
|
145 |
|
146 |
+
// Récupère les paramètres sauvegardés des couleurs
|
147 |
+
if(get_option('wp_maintenance_settings_colors')) { extract(get_option('wp_maintenance_settings_colors')); }
|
148 |
+
$colors = get_option('wp_maintenance_settings_colors');
|
149 |
|
150 |
+
// Récupère les paramètres sauvegardés des images
|
151 |
+
if(get_option('wp_maintenance_settings_picture')) { extract(get_option('wp_maintenance_settings_picture')); }
|
152 |
+
$picture = get_option('wp_maintenance_settings_picture');
|
153 |
|
154 |
+
$oo = get_option('wp_maintenance_settings_socialnetworks');
|
155 |
|
156 |
// CSS
|
157 |
$output = '<style type="text/css">';
|
160 |
$addStyleGeneral = '';
|
161 |
|
162 |
/* Définition des couleurs par défault */
|
163 |
+
if( !isset($colors['color_bg']) || $colors['color_bg']=="") { $colors['color_bg'] = "#f1f1f1"; }
|
164 |
+
if( !isset($colors['color_txt']) || $colors['color_txt']=="") { $colors['color_txt'] = "#888888"; }
|
165 |
|
166 |
/* Traitement de la feuille de style */
|
167 |
$styleRemplacements = array (
|
168 |
+
"#_COLORTXT" => $colors['color_txt'],
|
169 |
+
"#_COLORBG" => $colors['color_bg'],
|
170 |
+
"#_COLORCPTBG" => $colors['color_cpt_bg'],
|
171 |
+
"#_DATESIZE" => $colors['date_cpt_size'],
|
172 |
+
"#_COLORCPT" => $colors['color_cpt'],
|
173 |
+
"#_COLOR_BG_BT" => $colors['color_bg_bottom'],
|
174 |
+
"#_COLOR_TXT_BT" => $colors['color_text_bottom'],
|
175 |
+
"#_COLORHEAD" => $colors['color_bg_header'],
|
176 |
);
|
177 |
+
$remplaceStyle = str_replace(array_keys($styleRemplacements), array_values($styleRemplacements), get_option('wp_maintenance_settings_css'));
|
178 |
$output .= wpm_compress($remplaceStyle);
|
179 |
|
180 |
/* Si on a activé un motif */
|
181 |
+
if( isset($picture['b_enable_image']) && $picture['b_enable_image'] == 2 ) {
|
182 |
|
183 |
$addStyleGeneral .= 'body {
|
184 |
+
background-image: url('.esc_url(WP_PLUGIN_URL.'/wp-maintenance/images/pattern'.$picture['b_pattern'].'.png').');
|
185 |
background-repeat: repeat;
|
186 |
+
background-color: '.$colors['color_bg'].';}';
|
187 |
|
188 |
}
|
189 |
|
190 |
/* Si on a une image de fond */
|
191 |
+
if( isset($picture['b_enable_image']) && $picture['b_enable_image'] == 1 ) {
|
192 |
|
193 |
+
if( isset($picture['b_image']) && $picture['b_image'] ) {
|
194 |
|
195 |
+
if( empty($picture['b_repeat_image']) ) { $picture['b_repeat_image'] = 'repeat'; }
|
196 |
+
if( isset($picture['b_fixed_image']) && $picture['b_fixed_image']==1 ) {
|
197 |
+
$picture['b_fixed_image'] = 'fixed;';
|
198 |
} else {
|
199 |
+
$picture['b_fixed_image'] = '';
|
200 |
}
|
201 |
+
$addStyleGeneral .= 'body {display: grid!important;background:url('.esc_url($picture['b_image']).') '.$picture['b_repeat_image'].' '.$picture['b_fixed_image'].'top center;background-size: cover;
|
202 |
+
-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-color: '.$colors['color_bg'].';background-position: center;}';
|
203 |
|
204 |
+
if( isset($picture['b_opacity_image']) ) {
|
205 |
+
$addStyleGeneral .= '#main { background-color: rgba(0,0,0,'.esc_html($picture['b_opacity_image']).'); }';
|
206 |
}
|
207 |
}
|
208 |
|
209 |
}
|
210 |
|
211 |
+
if( isset($picture['b_enable_image']) && $picture['b_enable_image']==0 ) {
|
212 |
+
$addStyleGeneral .= 'body {background-color: '.$colors['color_bg'].';}';
|
213 |
}
|
214 |
|
215 |
+
if( isset($colors['color_bg_header']) && $colors['color_bg_header']!='') {
|
216 |
+
$addStyleGeneral .= 'header { background-color:'.$colors['color_bg_header'].';}';
|
217 |
}
|
218 |
$addStyleGeneral .= '.wpm_social_icon {float:left;width:'.esc_html($oo['size']).'px;margin:0px 5px auto;}.wpm_social ul {margin: 10px 0;max-width: 100%;padding: 0;text-align: '.esc_html($oo['align']).';}';
|
219 |
|
220 |
/* Si container activé */
|
221 |
+
if( isset($colors['container_active']) && $colors['container_active'] == 1 ) {
|
222 |
|
223 |
+
if( empty($colors['container_opacity']) ) { $colors['container_opacity'] = 0.5; }
|
224 |
+
if( empty($colors['container_width']) ) { $colors['container_width'] = 80; }
|
225 |
+
if( empty($colors['container_color']) ) { $colors['container_color'] = '#ffffff'; }
|
226 |
+
if( isset($colors['container_color']) ) { $paramRGBColor = wpm_hex2rgb($colors['container_color']); }
|
227 |
+
$addStyleGeneral .= '#sscontent {background-color: rgba('.esc_html($paramRGBColor['rouge']).','.esc_html($paramRGBColor['vert']).','.esc_html($paramRGBColor['bleu']).', '.esc_html($colors['container_opacity']).');padding:0.8em;margin-left:auto;margin-right:auto;width:'.esc_html($colors['container_width']).'%;}';
|
228 |
|
229 |
}
|
230 |
|
231 |
$addStyleGeneral .= '.wpm_newletter {';
|
232 |
+
if( isset($colors['newletter_size']) ) { $addStyleGeneral .= 'font-size:'.esc_html($colors['newletter_size']).'px;'; }
|
233 |
+
if( isset($colors['newletter_font_style']) ) { $addStyleGeneral .= 'font-style:'.esc_html($colors['newletter_font_style']).';'; }
|
234 |
+
if( isset($colors['newletter_font_weigth']) ) { $addStyleGeneral .= 'font-weight:'.esc_html($colors['newletter_font_weigth']).';'; }
|
235 |
+
if( isset($colors['newletter_font_text']) ) { $addStyleGeneral .= 'font-family:'.wpm_format_font($colors['newletter_font_text']).', serif;'; }
|
236 |
$addStyleGeneral .= '}
|
237 |
h3 {';
|
238 |
+
if( isset($colors['font_title']) ) { $addStyleGeneral .= 'font-family: '.wpm_format_font($colors['font_title']).', serif;'; }
|
239 |
+
if( isset($colors['font_title_size']) ) { $addStyleGeneral .= 'font-size: '.esc_html($colors['font_title_size']).'px;'; }
|
240 |
+
if( isset($colors['font_title_style']) ) { $addStyleGeneral .= 'font-style: '.esc_html($colors['font_title_style']).';'; }
|
241 |
+
if( isset($colors['font_title_weigth']) ) { $addStyleGeneral .= 'font-weight: '.esc_html($colors['font_title_weigth']).';'; }
|
242 |
+
if( isset($colors['color_title']) ) { $addStyleGeneral .= 'color:'.esc_html($colors['color_title']).';'; }
|
243 |
$addStyleGeneral .= 'line-height: 100%;text-align:center;margin:0.5em auto;
|
244 |
}
|
245 |
p {';
|
246 |
+
if( isset($colors['font_text']) ) { $addStyleGeneral .= 'font-family: '.wpm_format_font($colors['font_text']).', serif;'; }
|
247 |
+
if( isset($colors['font_text_size']) ) { $addStyleGeneral .= 'font-size: '.esc_html($colors['font_text_size']).'px;'; }
|
248 |
+
if( isset($colors['font_text_style']) ) { $addStyleGeneral .= 'font-style: '.esc_html($colors['font_text_style']).';'; }
|
249 |
+
if( isset($colors['font_text_weigth']) ) { $addStyleGeneral .= 'font-weight: '.esc_html($colors['font_text_weigth']).';'; }
|
250 |
+
if( isset($colors['color_txt']) ) { $addStyleGeneral .= 'color:'.esc_html($colors['color_txt']).';'; }
|
251 |
$addStyleGeneral .= 'line-height: 100%;text-align:center;margin:0.5em auto;padding-left:2%;padding-right:2%;
|
252 |
}
|
253 |
footer {';
|
254 |
+
if( isset($colors['font_text_bottom']) ) { $addStyleGeneral .= 'font-family: '.wpm_format_font($colors['font_text_bottom']).', serif;'; }
|
255 |
+
if( isset($colors['font_bottom_style']) ) { $addStyleGeneral .= 'font-style: '.esc_html($colors['font_bottom_style']).';'; }
|
256 |
+
if( isset($colors['font_bottom_size']) ) { $addStyleGeneral .= 'font-size: '.esc_html($colors['font_bottom_size']).'px;'; }
|
257 |
+
if( isset($colors['font_bottom_weigth']) ) { $addStyleGeneral .= 'font-weight: '.esc_html($colors['font_bottom_weigth']).';'; }
|
258 |
+
if( isset($colors['color_text_bottom']) ) { $addStyleGeneral .= 'color: '.esc_html($colors['color_text_bottom']).';'; }
|
259 |
+
if( isset($colors['color_bg_bottom']) ) { $addStyleGeneral .= 'background:'.esc_html($colors['color_bg_bottom']).';'; }
|
260 |
$addStyleGeneral .= 'text-decoration:none;
|
261 |
}
|
262 |
footer a:link {';
|
263 |
+
if( isset($colors['color_text_bottom']) ) { $addStyleGeneral .= 'color:'.esc_html($colors['color_text_bottom']).';'; }
|
264 |
+
if( isset($colors['font_bottom_size']) ) { $addStyleGeneral .= 'font-size: '.esc_html($colors['font_bottom_size']).'px;'; }
|
265 |
$addStyleGeneral .= 'text-decoration:none;
|
266 |
}
|
267 |
footer a:visited {';
|
268 |
+
if( isset($colors['color_text_bottom']) ) { $addStyleGeneral .= 'color:'.esc_html($colors['color_text_bottom']).';'; }
|
269 |
+
if( isset($colors['font_bottom_size']) ) { $addStyleGeneral .= 'font-size: '.esc_html($colors['font_bottom_size']).'px;'; }
|
270 |
$addStyleGeneral .= 'text-decoration:none;
|
271 |
}
|
272 |
footer a:hover {
|
273 |
text-decoration:underline;';
|
274 |
+
if( isset($colors['font_bottom_size']) ) { $addStyleGeneral .= 'font-size: '.esc_html($colors['font_bottom_size']).'px;'; }
|
275 |
$addStyleGeneral .= '
|
276 |
}';
|
277 |
|
286 |
function wpm_headercode() {
|
287 |
|
288 |
// Récupère les paramètres sauvegardés
|
289 |
+
if(get_option('wp_maintenance_settings_options')) { extract(get_option('wp_maintenance_settings_options')); }
|
290 |
+
$o = get_option('wp_maintenance_settings_options');
|
291 |
|
292 |
$output = '';
|
293 |
|
301 |
function wpm_social_position($position = '') {
|
302 |
|
303 |
// Récupère les paramètres sauvegardés
|
304 |
+
$o = get_option('wp_maintenance_settings_socialnetworks');
|
305 |
|
306 |
$output = '';
|
307 |
if( isset($o['enable']) && $o['enable'] == 1 ) {
|
324 |
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
325 |
$o = get_option('wp_maintenance_settings');
|
326 |
|
327 |
+
// Récupère les paramètres sauvegardés des couleurs
|
328 |
+
if(get_option('wp_maintenance_settings_colors')) { extract(get_option('wp_maintenance_settings_colors')); }
|
329 |
+
$colors = get_option('wp_maintenance_settings_colors');
|
330 |
+
|
331 |
+
|
332 |
$output = '';
|
333 |
|
334 |
+
if( empty($colors['color_field_text']) ) { $colors['color_field_text'] = '#333333'; }
|
335 |
+
if( empty($colors['color_text_button']) ) { $colors['color_text_button']= '#ffffff'; }
|
336 |
+
if( empty($colors['color_field_background']) ) { $colors['color_field_background']= '#F1F1F1'; }
|
337 |
+
if( empty($colors['color_field_border']) ) { $colors['color_field_border']= '#333333'; }
|
338 |
+
if( empty($colors['color_button_onclick']) ) { $colors['color_button_onclick']= '#333333'; }
|
339 |
+
if( empty($colors['color_button_hover']) ) { $colors['color_button_hover']= '#cccccc'; }
|
340 |
+
if( empty($colors['color_button']) ) { $colors['color_button']= '#1e73be'; }
|
341 |
|
342 |
$wysijaRemplacements = array (
|
343 |
+
"#_COLORTXT" => esc_html($colors['color_field_text']),
|
344 |
+
"#_COLORBG" => esc_html($colors['color_field_background']),
|
345 |
+
"#_COLORBORDER" => esc_html($colors['color_field_border']),
|
346 |
+
"#_COLORBUTTON" => esc_html($colors['color_button']),
|
347 |
+
"#_COLORTEXTBUTTON" => esc_html($colors['color_text_button']),
|
348 |
+
"#_COLOR_BTN_HOVER" => esc_html($colors['color_button_hover']),
|
349 |
+
"#_COLOR_BTN_CLICK" => esc_html($colors['color_button_onclick'])
|
350 |
);
|
351 |
|
352 |
if( isset($o['code_newletter']) && $o['code_newletter']!='' && strpos($o['code_newletter'], 'wysija_form') == 1 ) {
|
353 |
|
354 |
$output = str_replace(array_keys($wysijaRemplacements), array_values($wysijaRemplacements), wpm_wysija_style() );
|
355 |
|
356 |
+
} else if( isset($o['code_newletter']) && strpos($o['code_newletter'], 'mc4wp_form') == 1 ) {
|
357 |
|
358 |
$output = str_replace(array_keys($wysijaRemplacements), array_values($wysijaRemplacements), wpm_mc4wp_style() );
|
359 |
|
themes/default/index2.php
CHANGED
@@ -13,28 +13,23 @@
|
|
13 |
{CustomCSS}
|
14 |
{AddStyleWysija}
|
15 |
{HeaderCode}
|
16 |
-
{SliderCSS}
|
17 |
-
{ScriptSlider}
|
18 |
-
{ScriptSlideshow}
|
19 |
</head>
|
20 |
<body>
|
21 |
{TopSocialIcon}
|
22 |
<main id="main" role="main">
|
23 |
<p style="text-align:center;">
|
24 |
-
{SlideshowAL}
|
25 |
{Logo}
|
26 |
-
{SlideshowBL}
|
27 |
</p>
|
28 |
<div id="sscontent">
|
29 |
<p style="text-align:center;padding:1.5em;"><h3>{Title}</h3>
|
30 |
<p>{Text}</p>
|
31 |
-
{SlideshowBT}
|
32 |
{Counter}
|
33 |
{Newsletter}
|
34 |
</p>
|
35 |
</div>
|
36 |
<p>{BottomSocialIcon}</p>
|
37 |
</main>
|
|
|
38 |
{FooterText}
|
39 |
</body>
|
40 |
</html>
|
13 |
{CustomCSS}
|
14 |
{AddStyleWysija}
|
15 |
{HeaderCode}
|
|
|
|
|
|
|
16 |
</head>
|
17 |
<body>
|
18 |
{TopSocialIcon}
|
19 |
<main id="main" role="main">
|
20 |
<p style="text-align:center;">
|
|
|
21 |
{Logo}
|
|
|
22 |
</p>
|
23 |
<div id="sscontent">
|
24 |
<p style="text-align:center;padding:1.5em;"><h3>{Title}</h3>
|
25 |
<p>{Text}</p>
|
|
|
26 |
{Counter}
|
27 |
{Newsletter}
|
28 |
</p>
|
29 |
</div>
|
30 |
<p>{BottomSocialIcon}</p>
|
31 |
</main>
|
32 |
+
|
33 |
{FooterText}
|
34 |
</body>
|
35 |
</html>
|
views/wp-maintenance-colors.php
CHANGED
@@ -6,17 +6,15 @@ $messageUpdate = 0;
|
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_colors' && wp_verify_nonce($_POST['security-colors'], 'valid-colors') ) {
|
8 |
|
9 |
-
if( empty($_POST["
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
$options_saved = true;
|
14 |
-
$messageUpdate = 1;
|
15 |
}
|
16 |
|
17 |
// Récupère les paramètres sauvegardés
|
18 |
-
if(get_option('
|
19 |
-
$
|
20 |
|
21 |
?>
|
22 |
<script type="text/javascript">
|
@@ -38,7 +36,10 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
38 |
<div class="wrap">
|
39 |
|
40 |
<!-- HEADER -->
|
41 |
-
|
|
|
|
|
|
|
42 |
<!-- END HEADER -->
|
43 |
|
44 |
<div class="wp-maintenance-wrapper">
|
@@ -58,10 +59,10 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
58 |
<h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Choice general colors', 'wp-maintenance'); ?></h3>
|
59 |
</div>
|
60 |
<div class="wp-maintenance-setting-row">
|
61 |
-
<label for="
|
62 |
-
<input type="text" value="<?php if( isset($
|
63 |
-
<label for="
|
64 |
-
<input type="text" value="<?php if( isset($
|
65 |
</div>
|
66 |
|
67 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
@@ -78,28 +79,28 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
78 |
<em><?php _e('Set the color and font of the title', 'wp-maintenance'); ?></em> <br /><br />
|
79 |
|
80 |
<div class="wp-maintenance-setting-row">
|
81 |
-
<label for="
|
82 |
-
<input type="text" value="<?php if( isset($
|
83 |
</div>
|
84 |
|
85 |
<div class="wp-maintenance-setting-row">
|
86 |
-
<label for="
|
87 |
<table cellspacing="10">
|
88 |
<tr>
|
89 |
<td valign="middle"style="text-align:left;">
|
90 |
-
<input name="
|
91 |
</td>
|
92 |
-
<td><input type="text" size="3" name="
|
93 |
</tr>
|
94 |
<tr>
|
95 |
<td>
|
96 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('bold', 'wp-maintenance'); ?></span>
|
97 |
-
<input type="radio" name="
|
98 |
<span class="wp-maintenance-checkmark"></span></label>
|
99 |
</td>
|
100 |
<td>
|
101 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Italic', 'wp-maintenance'); ?></span>
|
102 |
-
<input type="radio" name="
|
103 |
<span class="wp-maintenance-checkmark"></span></label>
|
104 |
|
105 |
</td>
|
@@ -120,28 +121,28 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
120 |
<em><?php _e('Set the color and font of the text', 'wp-maintenance'); ?></em> <br /><br />
|
121 |
|
122 |
<div class="wp-maintenance-setting-row">
|
123 |
-
<label for="
|
124 |
-
<input type="text" value="<?php if( isset($
|
125 |
</div>
|
126 |
|
127 |
<div class="wp-maintenance-setting-row">
|
128 |
-
<label for="
|
129 |
<table cellspacing="10">
|
130 |
<tr>
|
131 |
<td valign="middle"style="text-align:left;">
|
132 |
-
<input name="
|
133 |
</td>
|
134 |
-
<td><input type="text" size="3" name="
|
135 |
</tr>
|
136 |
<tr>
|
137 |
<td>
|
138 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('bold', 'wp-maintenance'); ?></span>
|
139 |
-
<input type="radio" name="
|
140 |
<span class="wp-maintenance-checkmark"></span></label>
|
141 |
</td>
|
142 |
<td>
|
143 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Italic', 'wp-maintenance'); ?></span>
|
144 |
-
<input type="radio" name="
|
145 |
<span class="wp-maintenance-checkmark"></span></label>
|
146 |
|
147 |
</td>
|
@@ -159,7 +160,7 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
159 |
|
160 |
<p>
|
161 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable frame', 'wp-maintenance'); ?></span>
|
162 |
-
<input type="checkbox" name="
|
163 |
<span class="wp-maintenance-checkmark"></span>
|
164 |
</label>
|
165 |
</p>
|
@@ -167,15 +168,15 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
167 |
<h3><?php _e('Choice frame color and style', 'wp-maintenance'); ?></h3>
|
168 |
|
169 |
<div class="wp-maintenance-setting-row">
|
170 |
-
<label for="
|
171 |
-
<input type="text" value="<?php if( isset($
|
172 |
</div>
|
173 |
|
174 |
<div class="wp-maintenance-setting-row">
|
175 |
-
<label for="
|
176 |
-
<span class="wp-maintenance-label-text"><?php _e('Opacity', 'wp-maintenance'); ?> <input type="text" size="5%" name="
|
177 |
<span class="wp-maintenance-label-text"><?php _e('Width', 'wp-maintenance'); ?></span>
|
178 |
-
<input type="text" name="
|
179 |
</div>
|
180 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
181 |
<!-- FIN CADRE -->
|
@@ -192,35 +193,35 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
192 |
<h3><?php _e('Choice Countdown font, colors and style', 'wp-maintenance'); ?></h3>
|
193 |
|
194 |
<div class="wp-maintenance-setting-row">
|
195 |
-
<label for="
|
196 |
-
<input type="text" value="<?php if( isset($
|
197 |
</div>
|
198 |
|
199 |
<div class="wp-maintenance-setting-row">
|
200 |
-
<label for="
|
201 |
-
<input type="text" value="<?php if( isset($
|
202 |
</div>
|
203 |
<!-- POLICE DU COMPTEUR -->
|
204 |
<div class="wp-maintenance-setting-row">
|
205 |
-
<label for="
|
206 |
<table cellspacing="10">
|
207 |
<tr>
|
208 |
<td valign="middle"style="text-align:left;">
|
209 |
-
<input name="
|
210 |
</td>
|
211 |
-
<td><input type="text" size="3" id="date_cpt_size" name="
|
212 |
</tr>
|
213 |
</table>
|
214 |
</div>
|
215 |
<!-- POLICE DU TEXT de FIN -->
|
216 |
<div class="wp-maintenance-setting-row">
|
217 |
-
<label for="
|
218 |
<table cellspacing="10">
|
219 |
<tr>
|
220 |
<td valign="middle"style="text-align:left;">
|
221 |
-
<input name="
|
222 |
</td>
|
223 |
-
<td><input type="text" size="3" id="date_cpt_size" name="
|
224 |
</tr>
|
225 |
</table>
|
226 |
</div>
|
@@ -236,33 +237,33 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
236 |
<h3><?php _e('Choice footer font, colors and style', 'wp-maintenance'); ?></h3>
|
237 |
|
238 |
<div class="wp-maintenance-setting-row">
|
239 |
-
<label for="
|
240 |
-
<input type="text" value="<?php if( isset($
|
241 |
</div>
|
242 |
|
243 |
<div class="wp-maintenance-setting-row">
|
244 |
-
<label for="
|
245 |
-
<input type="text" value="<?php if( isset($
|
246 |
</div>
|
247 |
|
248 |
<div class="wp-maintenance-setting-row">
|
249 |
-
<label for="
|
250 |
<table cellspacing="10">
|
251 |
<tr>
|
252 |
<td valign="middle"style="text-align:left;">
|
253 |
-
<input name="
|
254 |
</td>
|
255 |
-
<td><input type="text" size="3" name="
|
256 |
</tr>
|
257 |
<tr>
|
258 |
<td>
|
259 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('bold', 'wp-maintenance'); ?></span>
|
260 |
-
<input type="radio" name="
|
261 |
<span class="wp-maintenance-checkmark"></span></label>
|
262 |
</td>
|
263 |
<td>
|
264 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Italic', 'wp-maintenance'); ?></span>
|
265 |
-
<input type="radio" name="
|
266 |
<span class="wp-maintenance-checkmark"></span></label>
|
267 |
|
268 |
</td>
|
@@ -284,28 +285,28 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
284 |
if( is_admin() ) {
|
285 |
if ( is_plugin_active( 'wysija-newsletters/index.php' ) || is_plugin_active( 'mailpoet/mailpoet.php' ) || is_plugin_active( 'mailchimp-for-wp/mailchimp-for-wp.php' ) ) {
|
286 |
|
287 |
-
if ( isset($
|
288 |
-
//if( isset($
|
289 |
?>
|
290 |
<!-- COULEUR WYJIYA -->
|
291 |
<div class="wp-maintenance-setting-row">
|
292 |
-
<label for="
|
293 |
<table cellspacing="10">
|
294 |
<tr>
|
295 |
<td valign="middle"style="text-align:left;">
|
296 |
-
<input name="
|
297 |
</td>
|
298 |
-
<td><input type="text" size="3" name="
|
299 |
</tr>
|
300 |
<tr>
|
301 |
<td>
|
302 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('bold', 'wp-maintenance'); ?></span>
|
303 |
-
<input type="radio" name="
|
304 |
<span class="wp-maintenance-checkmark"></span></label>
|
305 |
</td>
|
306 |
<td>
|
307 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Italic', 'wp-maintenance'); ?></span>
|
308 |
-
<input type="radio" name="
|
309 |
<span class="wp-maintenance-checkmark"></span></label>
|
310 |
|
311 |
</td>
|
@@ -317,22 +318,22 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
317 |
<table width="80%">
|
318 |
<tr>
|
319 |
<td width="40%">
|
320 |
-
<label for="
|
321 |
-
<input type="text" value="<?php if( isset($
|
322 |
-
<label for="
|
323 |
-
<input type="text" value="<?php if( isset($
|
324 |
-
<label for="
|
325 |
-
<input type="text" value="<?php if( isset($
|
326 |
-
<label for="
|
327 |
-
<input type="text" value="<?php if( isset($
|
328 |
<td>
|
329 |
<td style="vertical-align:top;">
|
330 |
-
<label for="
|
331 |
-
<input type="text" value="<?php if( isset($
|
332 |
-
<label for="
|
333 |
-
<input type="text" value="<?php if( isset($
|
334 |
-
<label for="
|
335 |
-
<input type="text" value="<?php if( isset($
|
336 |
</td>
|
337 |
</tr>
|
338 |
</table>
|
@@ -347,6 +348,19 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
347 |
|
348 |
} else {
|
349 |
_e('Enable Mailpoet or MailChimp extensions to customize the forms', 'wp-maintenance');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
|
351 |
}
|
352 |
}
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_colors' && wp_verify_nonce($_POST['security-colors'], 'valid-colors') ) {
|
8 |
|
9 |
+
if( empty($_POST["wpmcolors"]["container_active"]) ) { $_POST["wpmcolors"]["container_active"] = 0; }
|
10 |
+
|
11 |
+
$updateSetting = wpm_update_settings( $_POST["wpmcolors"], 'wp_maintenance_settings_colors');
|
12 |
+
if( $updateSetting == true ) { $messageUpdate = 1; }
|
|
|
|
|
13 |
}
|
14 |
|
15 |
// Récupère les paramètres sauvegardés
|
16 |
+
if(get_option('wp_maintenance_settings_colors')) { extract(get_option('wp_maintenance_settings_colors')); }
|
17 |
+
$paramsColors = get_option('wp_maintenance_settings_colors');
|
18 |
|
19 |
?>
|
20 |
<script type="text/javascript">
|
36 |
<div class="wrap">
|
37 |
|
38 |
<!-- HEADER -->
|
39 |
+
<h2 class="headerpage"><?php _e('WP Maintenance - Settings', 'wp-maintenance'); ?> <sup>v.<?php _e(WPM_VERSION); ?></sup></h2>
|
40 |
+
<?php if( isset($message) && $message == 1 ) { ?>
|
41 |
+
<div id="message" class="updated fade"><p><strong><?php _e('Options saved.', 'wp-maintenance'); ?></strong></p></div>
|
42 |
+
<?php } ?>
|
43 |
<!-- END HEADER -->
|
44 |
|
45 |
<div class="wp-maintenance-wrapper">
|
59 |
<h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Choice general colors', 'wp-maintenance'); ?></h3>
|
60 |
</div>
|
61 |
<div class="wp-maintenance-setting-row">
|
62 |
+
<label for="wpmcolors[color_bg]" class="wp-maintenance-setting-row-title"><?php _e('Background page color', 'wp-maintenance'); ?></label>
|
63 |
+
<input type="text" value="<?php if( isset($paramsColors['color_bg']) && $paramsColors['color_bg']!='' ) { echo esc_html($paramsColors['color_bg']); } ?>" name="wpmcolors[color_bg]" class="wpm-color-field" data-default-color="#f1f1f1" />
|
64 |
+
<label for="wpmcolors[color_bg_header]" class="wp-maintenance-setting-row-title"><?php _e('Header color', 'wp-maintenance'); ?></label>
|
65 |
+
<input type="text" value="<?php if( isset($paramsColors['color_bg_header']) && $paramsColors['color_bg_header']!='' ) { echo esc_html($paramsColors['color_bg_header']); } ?>" name="wpmcolors[color_bg_header]" class="wpm-color-field" data-default-color="#ffffff" />
|
66 |
</div>
|
67 |
|
68 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
79 |
<em><?php _e('Set the color and font of the title', 'wp-maintenance'); ?></em> <br /><br />
|
80 |
|
81 |
<div class="wp-maintenance-setting-row">
|
82 |
+
<label for="wpmcolors[color_title]" class="wp-maintenance-setting-row-title"><?php _e('Choose font color', 'wp-maintenance'); ?></label>
|
83 |
+
<input type="text" value="<?php if( isset($paramsColors['color_title']) && $paramsColors['color_title']!='' ) { echo esc_html($paramsColors['color_title']); } else { echo '#333333'; } ?>" name="wpmcolors[color_title]" class="wpm-color-field" data-default-color="#333333" />
|
84 |
</div>
|
85 |
|
86 |
<div class="wp-maintenance-setting-row">
|
87 |
+
<label for="wpmcolors[font_title]" class="wp-maintenance-setting-row-title"><?php _e('Choose Size and Style', 'wp-maintenance'); ?></label>
|
88 |
<table cellspacing="10">
|
89 |
<tr>
|
90 |
<td valign="middle"style="text-align:left;">
|
91 |
+
<input name="wpmcolors[font_title]" class="selectfont" type="text" value="<?php if( isset($paramsColors['font_title']) && $paramsColors['font_title']!='' ) { echo esc_html(str_replace(' ', '+', $paramsColors['font_title'])); } else { echo 'Anton'; } ?>" />
|
92 |
</td>
|
93 |
+
<td><input type="text" size="3" name="wpmcolors[font_title_size]" value="<?php if( isset($paramsColors['font_title_size']) && $paramsColors['font_title_size']!='' ) { echo esc_html(stripslashes($paramsColors['font_title_size'])); } else { echo '16'; } ?>" />px</td>
|
94 |
</tr>
|
95 |
<tr>
|
96 |
<td>
|
97 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('bold', 'wp-maintenance'); ?></span>
|
98 |
+
<input type="radio" name="wpmcolors[font_title_weigth]" value="bold" <?php if( isset($paramsColors['font_title_weigth']) && $paramsColors['font_title_weigth']=='bold') { echo ' checked'; } ?>>
|
99 |
<span class="wp-maintenance-checkmark"></span></label>
|
100 |
</td>
|
101 |
<td>
|
102 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Italic', 'wp-maintenance'); ?></span>
|
103 |
+
<input type="radio" name="wpmcolors[font_title_style]" value="italic" <?php if( isset($paramsColors['font_title_style']) && $paramsColors['font_title_style']=='italic') { echo ' checked'; } ?>>
|
104 |
<span class="wp-maintenance-checkmark"></span></label>
|
105 |
|
106 |
</td>
|
121 |
<em><?php _e('Set the color and font of the text', 'wp-maintenance'); ?></em> <br /><br />
|
122 |
|
123 |
<div class="wp-maintenance-setting-row">
|
124 |
+
<label for="wpmcolors[color_txt]" class="wp-maintenance-setting-row-title"><?php _e('Choose font color', 'wp-maintenance'); ?></label>
|
125 |
+
<input type="text" value="<?php if( isset($paramsColors['color_txt']) && $paramsColors['color_txt']!='' ) { echo esc_html($paramsColors['color_txt']); } else { echo '#333333'; } ?>" name="wpmcolors[color_txt]" class="wpm-color-field" data-default-color="#333333" />
|
126 |
</div>
|
127 |
|
128 |
<div class="wp-maintenance-setting-row">
|
129 |
+
<label for="wpmcolors[font_text]" class="wp-maintenance-setting-row-title"><?php _e('Choose Size and Style', 'wp-maintenance'); ?></label>
|
130 |
<table cellspacing="10">
|
131 |
<tr>
|
132 |
<td valign="middle"style="text-align:left;">
|
133 |
+
<input name="wpmcolors[font_text]" class="selectfont" type="text" value="<?php if( isset($paramsColors['font_text']) && $paramsColors['font_text']!='' ) { echo esc_html(str_replace(' ', '+', $paramsColors['font_text'])); } else { echo 'Anton'; } ?>" />
|
134 |
</td>
|
135 |
+
<td><input type="text" size="3" name="wpmcolors[font_text_size]" value="<?php if( isset($paramsColors['font_text_size']) && $paramsColors['font_text_size']!='' ) { echo esc_html(stripslashes($paramsColors['font_text_size'])); } else { echo '16'; } ?>" />px</td>
|
136 |
</tr>
|
137 |
<tr>
|
138 |
<td>
|
139 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('bold', 'wp-maintenance'); ?></span>
|
140 |
+
<input type="radio" name="wpmcolors[font_text_weigth]" value="bold" <?php if( isset($paramsColors['font_text_weigth']) && $paramsColors['font_text_weigth']=='bold') { echo ' checked'; } ?>>
|
141 |
<span class="wp-maintenance-checkmark"></span></label>
|
142 |
</td>
|
143 |
<td>
|
144 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Italic', 'wp-maintenance'); ?></span>
|
145 |
+
<input type="radio" name="wpmcolors[font_text_style]" value="italic" <?php if( isset($paramsColors['font_text_style']) && $paramsColors['font_text_style']=='italic') { echo ' checked'; } ?>>
|
146 |
<span class="wp-maintenance-checkmark"></span></label>
|
147 |
|
148 |
</td>
|
160 |
|
161 |
<p>
|
162 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable frame', 'wp-maintenance'); ?></span>
|
163 |
+
<input type="checkbox" name="wpmcolors[container_active]" value="1" <?php if( isset($paramsColors['container_active']) && $paramsColors['container_active']==1) { echo ' checked'; } ?>>
|
164 |
<span class="wp-maintenance-checkmark"></span>
|
165 |
</label>
|
166 |
</p>
|
168 |
<h3><?php _e('Choice frame color and style', 'wp-maintenance'); ?></h3>
|
169 |
|
170 |
<div class="wp-maintenance-setting-row">
|
171 |
+
<label for="wpmcolors[container_color]" class="wp-maintenance-setting-row-title"><?php _e('Choose frame color', 'wp-maintenance'); ?></label>
|
172 |
+
<input type="text" value="<?php if( isset($paramsColors['container_color']) && $paramsColors['container_color']!='' ) { echo esc_html($paramsColors['container_color']); } else { echo '#333333'; } ?>" name="wpmcolors[container_color]" class="wpm-color-field" data-default-color="#333333" />
|
173 |
</div>
|
174 |
|
175 |
<div class="wp-maintenance-setting-row">
|
176 |
+
<label for="wpmcolors[container_opacity]" class="wp-maintenance-setting-row-title"><?php _e('Choose Style', 'wp-maintenance'); ?></label>
|
177 |
+
<span class="wp-maintenance-label-text"><?php _e('Opacity', 'wp-maintenance'); ?> <input type="text" size="5%" name="wpmcolors[container_opacity]" value="<?php if( isset($paramsColors['container_opacity']) && $paramsColors['container_opacity']!='' ) { echo esc_html($paramsColors['container_opacity']); } else { echo '0.5'; } ?>" />
|
178 |
<span class="wp-maintenance-label-text"><?php _e('Width', 'wp-maintenance'); ?></span>
|
179 |
+
<input type="text" name="wpmcolors[container_width]" size="5%" value="<?php if( isset($paramsColors['container_width']) && $paramsColors['container_width']!='' ) { echo esc_html($paramsColors['container_width']); } else { echo '80'; } ?>" />%
|
180 |
</div>
|
181 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
182 |
<!-- FIN CADRE -->
|
193 |
<h3><?php _e('Choice Countdown font, colors and style', 'wp-maintenance'); ?></h3>
|
194 |
|
195 |
<div class="wp-maintenance-setting-row">
|
196 |
+
<label for="wpmcolors[color_cpt]" class="wp-maintenance-setting-row-title"><?php _e('Countdown text color', 'wp-maintenance'); ?></label>
|
197 |
+
<input type="text" value="<?php if( isset($paramsColors['color_cpt']) && $paramsColors['color_cpt']!='' ) { echo esc_html($paramsColors['color_cpt']); } else { echo '#333333'; } ?>" name="wpmcolors[color_cpt]" class="wpm-color-field" data-default-color="#333333" />
|
198 |
</div>
|
199 |
|
200 |
<div class="wp-maintenance-setting-row">
|
201 |
+
<label for="wpmcolors[color_cpt_bg]" class="wp-maintenance-setting-row-title"><?php _e('Countdown background color', 'wp-maintenance'); ?></label>
|
202 |
+
<input type="text" value="<?php if( isset($paramsColors['color_cpt_bg']) && $paramsColors['color_cpt_bg']!='' ) { echo esc_html($paramsColors['color_cpt_bg']); } ?>" name="wpmcolors[color_cpt_bg]" class="wpm-color-field" data-default-color="#ffffff" />
|
203 |
</div>
|
204 |
<!-- POLICE DU COMPTEUR -->
|
205 |
<div class="wp-maintenance-setting-row">
|
206 |
+
<label for="wpmcolors[font_cpt]" class="wp-maintenance-setting-row-title"><?php _e('Choose font', 'wp-maintenance'); ?></label>
|
207 |
<table cellspacing="10">
|
208 |
<tr>
|
209 |
<td valign="middle"style="text-align:left;">
|
210 |
+
<input name="wpmcolors[font_cpt]" class="selectfont" type="text" value="<?php if( isset($paramsColors['font_cpt']) && $paramsColors['font_cpt']!='' ) { echo esc_html(str_replace(' ', '+', $paramsColors['font_cpt'])); } else { echo 'Pacifico'; } ?>" />
|
211 |
</td>
|
212 |
+
<td><input type="text" size="3" id="date_cpt_size" name="wpmcolors[date_cpt_size]" value="<?php if( isset($paramsColors['date_cpt_size']) && $paramsColors['date_cpt_size']!='' ) { echo esc_html(trim($paramsColors['date_cpt_size'])); } else { echo '6'; } ?>" />vw</td>
|
213 |
</tr>
|
214 |
</table>
|
215 |
</div>
|
216 |
<!-- POLICE DU TEXT de FIN -->
|
217 |
<div class="wp-maintenance-setting-row">
|
218 |
+
<label for="wpmcolors[cpt_end_size]" class="wp-maintenance-setting-row-title"><?php _e('Choose font for end text', 'wp-maintenance'); ?></label>
|
219 |
<table cellspacing="10">
|
220 |
<tr>
|
221 |
<td valign="middle"style="text-align:left;">
|
222 |
+
<input name="wpmcolors[font_end_cpt]" class="selectfont" type="text" value="<?php if( isset($paramsColors['font_end_cpt']) && $paramsColors['font_end_cpt']!='' ) { echo esc_html(str_replace(' ', '+', $paramsColors['font_end_cpt'])); } else { echo 'Pacifico'; } ?>" />
|
223 |
</td>
|
224 |
+
<td><input type="text" size="3" id="date_cpt_size" name="wpmcolors[cpt_end_size]" value="<?php if( isset($paramsColors['cpt_end_size']) && $paramsColors['cpt_end_size']!='' ) { echo esc_html(trim($paramsColors['cpt_end_size'])); } else { echo '2'; } ?>" />vw</td>
|
225 |
</tr>
|
226 |
</table>
|
227 |
</div>
|
237 |
<h3><?php _e('Choice footer font, colors and style', 'wp-maintenance'); ?></h3>
|
238 |
|
239 |
<div class="wp-maintenance-setting-row">
|
240 |
+
<label for="wpmcolors[color_text_bottom]" class="wp-maintenance-setting-row-title"><?php _e('Text color', 'wp-maintenance'); ?></label>
|
241 |
+
<input type="text" value="<?php if( isset($paramsColors['color_text_bottom']) && $paramsColors['color_text_bottom']!='' ) { echo esc_html($paramsColors['color_text_bottom']); } else { echo '#FFFFFF'; } ?>" name="wpmcolors[color_text_bottom]" class="wpm-color-field" data-default-color="#ffffff" />
|
242 |
</div>
|
243 |
|
244 |
<div class="wp-maintenance-setting-row">
|
245 |
+
<label for="wpmcolors[color_bg_bottom]" class="wp-maintenance-setting-row-title"><?php _e('Background color', 'wp-maintenance'); ?></label>
|
246 |
+
<input type="text" value="<?php if( isset($paramsColors['color_bg_bottom']) && $paramsColors['color_bg_bottom']!='' ) { echo esc_html($paramsColors['color_bg_bottom']); } else { echo '#333333'; } ?>" name="wpmcolors[color_bg_bottom]" class="wpm-color-field" data-default-color="#333333" />
|
247 |
</div>
|
248 |
|
249 |
<div class="wp-maintenance-setting-row">
|
250 |
+
<label for="wpmcolors[font_text]" class="wp-maintenance-setting-row-title"><?php _e('Choose Size and Style', 'wp-maintenance'); ?></label>
|
251 |
<table cellspacing="10">
|
252 |
<tr>
|
253 |
<td valign="middle"style="text-align:left;">
|
254 |
+
<input name="wpmcolors[font_text_bottom]" class="selectfont" type="text" value="<?php if( isset($paramsColors['font_text_bottom']) && $paramsColors['font_text_bottom']!='' ) { echo esc_html(str_replace(' ', '+', $paramsColors['font_text_bottom'])); } else { echo 'PT+Sans'; } ?>" />
|
255 |
</td>
|
256 |
+
<td><input type="text" size="3" name="wpmcolors[font_bottom_size]" value="<?php if( isset($paramsColors['font_bottom_size']) && $paramsColors['font_bottom_size']!='' ) { echo esc_html(stripslashes($paramsColors['font_bottom_size'])); } else { echo '12'; } ?>" />px</td>
|
257 |
</tr>
|
258 |
<tr>
|
259 |
<td>
|
260 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('bold', 'wp-maintenance'); ?></span>
|
261 |
+
<input type="radio" name="wpmcolors[font_bottom_weigth]" value="bold" <?php if( isset($paramsColors['font_bottom_weigth']) && $paramsColors['font_bottom_weigth']=='bold') { echo ' checked'; } ?>>
|
262 |
<span class="wp-maintenance-checkmark"></span></label>
|
263 |
</td>
|
264 |
<td>
|
265 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Italic', 'wp-maintenance'); ?></span>
|
266 |
+
<input type="radio" name="wpmcolors[font_bottom_style]" value="italic" <?php if( isset($paramsColors['font_bottom_style']) && $paramsColors['font_bottom_style']=='italic') { echo ' checked'; } ?>>
|
267 |
<span class="wp-maintenance-checkmark"></span></label>
|
268 |
|
269 |
</td>
|
285 |
if( is_admin() ) {
|
286 |
if ( is_plugin_active( 'wysija-newsletters/index.php' ) || is_plugin_active( 'mailpoet/mailpoet.php' ) || is_plugin_active( 'mailchimp-for-wp/mailchimp-for-wp.php' ) ) {
|
287 |
|
288 |
+
if ( isset($paramsColors['newletter']) && $paramsColors['newletter']==1 ) {
|
289 |
+
//if( isset($paramsColors['code_newletter']) && (strpos($paramsColors['code_newletter'], 'wysija_form')!=false || strpos($paramsColors['code_newletter'], 'mc4wp_form')!=false ) && (
|
290 |
?>
|
291 |
<!-- COULEUR WYJIYA -->
|
292 |
<div class="wp-maintenance-setting-row">
|
293 |
+
<label for="wpmcolors[newletter_font_text]" class="wp-maintenance-setting-row-title"><?php _e('Choose Size and Style', 'wp-maintenance'); ?></label>
|
294 |
<table cellspacing="10">
|
295 |
<tr>
|
296 |
<td valign="middle"style="text-align:left;">
|
297 |
+
<input name="wpmcolors[newletter_font_text]" class="selectfont" type="text" value="<?php if( isset($paramsColors['newletter_font_text']) && $paramsColors['newletter_font_text']!='' ) { echo esc_html(str_replace(' ', '+', $paramsColors['newletter_font_text'])); } else { echo 'PT+Sans'; } ?>" />
|
298 |
</td>
|
299 |
+
<td><input type="text" size="3" name="wpmcolors[newletter_size]" value="<?php if( isset($paramsColors['newletter_size']) && $paramsColors['newletter_size']!='') { echo esc_html($paramsColors['newletter_size']); } else { echo '14'; } ?>" />px</td>
|
300 |
</tr>
|
301 |
<tr>
|
302 |
<td>
|
303 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('bold', 'wp-maintenance'); ?></span>
|
304 |
+
<input type="radio" name="wpmcolors[newletter_font_weigth]" value="bold" <?php if( isset($paramsColors['newletter_font_weigth']) && $paramsColors['newletter_font_weigth']=='bold') { echo ' checked'; } ?>>
|
305 |
<span class="wp-maintenance-checkmark"></span></label>
|
306 |
</td>
|
307 |
<td>
|
308 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Italic', 'wp-maintenance'); ?></span>
|
309 |
+
<input type="radio" name="wpmcolors[newletter_font_style]" value="italic" <?php if( isset($paramsColors['newletter_font_style']) && $paramsColors['newletter_font_style']=='italic') { echo ' checked'; } ?>>
|
310 |
<span class="wp-maintenance-checkmark"></span></label>
|
311 |
|
312 |
</td>
|
318 |
<table width="80%">
|
319 |
<tr>
|
320 |
<td width="40%">
|
321 |
+
<label for="wpmcolors[color_field_text]" class="wp-maintenance-setting-row-title"><?php _e('Field text color', 'wp-maintenance'); ?></label>
|
322 |
+
<input type="text" value="<?php if( isset($paramsColors['color_field_text']) && $paramsColors['color_field_text']!='' ) { echo esc_html($paramsColors['color_field_text']); } else { echo '#333333'; } ?>" name="wpmcolors[color_field_text]" class="wpm-color-field" data-default-color="#333333" /><br />
|
323 |
+
<label for="wpmcolors[color_field_border]" class="wp-maintenance-setting-row-title"><?php _e('Field border color', 'wp-maintenance'); ?></label>
|
324 |
+
<input type="text" value="<?php if( isset($paramsColors['color_field_border']) && $paramsColors['color_field_border']!='' ) { echo esc_html($paramsColors['color_field_border']); } else { echo '#333333'; } ?>" name="wpmcolors[color_field_border]" class="wpm-color-field" data-default-color="#333333" /><br />
|
325 |
+
<label for="wpmcolors[color_field_background]" class="wp-maintenance-setting-row-title"><?php _e('Field background color', 'wp-maintenance'); ?></label>
|
326 |
+
<input type="text" value="<?php if( isset($paramsColors['color_field_background']) && $paramsColors['color_field_background']!='' ) { echo esc_html($paramsColors['color_field_background']); } else { echo '#cccccc'; } ?>" name="wpmcolors[color_field_background]" class="wpm-color-field" data-default-color="#cccccc" />
|
327 |
+
<label for="wpmcolors[color_text_button]" class="wp-maintenance-setting-row-title"><?php _e('Button text color', 'wp-maintenance'); ?></label>
|
328 |
+
<input type="text" value="<?php if( isset($paramsColors['color_text_button']) && $paramsColors['color_text_button']!='' ) { echo esc_html($paramsColors['color_text_button']); } else { echo '#ffffff'; } ?>" name="wpmcolors[color_text_button]" class="wpm-color-field" data-default-color="#ffffff" />
|
329 |
<td>
|
330 |
<td style="vertical-align:top;">
|
331 |
+
<label for="wpmcolors[color_button]" class="wp-maintenance-setting-row-title"><?php _e('Button color', 'wp-maintenance'); ?></label>
|
332 |
+
<input type="text" value="<?php if( isset($paramsColors['color_button']) && $paramsColors['color_button']!='' ) { echo esc_html($paramsColors['color_button']); } else { echo '#1e73be'; } ?>" name="wpmcolors[color_button]" class="wpm-color-field" data-default-color="#1e73be" />
|
333 |
+
<label for="wpmcolors[color_button_hover]" class="wp-maintenance-setting-row-title"><?php _e('Button color hover', 'wp-maintenance'); ?></label>
|
334 |
+
<input type="text" value="<?php if( isset($paramsColors['color_button_hover']) && $paramsColors['color_button_hover']!='' ) { echo esc_html($paramsColors['color_button_hover']); } else { echo '#ffffff'; } ?>" name="wpmcolors[color_button_hover]" class="wpm-color-field" data-default-color="#ffffff" /><br />
|
335 |
+
<label for="wpmcolors[color_button_onclick]" class="wp-maintenance-setting-row-title"><?php _e('Button color onclick', 'wp-maintenance'); ?></label>
|
336 |
+
<input type="text" value="<?php if( isset($paramsColors['color_button_onclick']) && $paramsColors['color_button_onclick']!='' ) { echo esc_html($paramsColors['color_button_onclick']); } else { echo '#ffffff'; } ?>" name="wpmcolors[color_button_onclick]" class="wpm-color-field" data-default-color="#ffffff" />
|
337 |
</td>
|
338 |
</tr>
|
339 |
</table>
|
348 |
|
349 |
} else {
|
350 |
_e('Enable Mailpoet or MailChimp extensions to customize the forms', 'wp-maintenance');
|
351 |
+
|
352 |
+
|
353 |
+
echo '<input name="wpmcolors[color_field_text]" type="hidden" value="#333333" />';
|
354 |
+
echo '<input name="wpmcolors[color_field_border]" type="hidden" value="#333333" />';
|
355 |
+
echo '<input name="wpmcolors[color_field_background]" type="hidden" value="#cccccc" />';
|
356 |
+
echo '<input name="wpmcolors[newletter_font_text]" type="hidden" value="PT+Sans" />';
|
357 |
+
echo '<input name="wpmcolors[newletter_size]" type="hidden" value="14" />';
|
358 |
+
echo '<input name="wpmcolors[newletter_font_weigth]" type="hidden" value="" />';
|
359 |
+
echo '<input name="wpmcolors[newletter_font_style]" type="hidden" value="" />';
|
360 |
+
echo '<input name="wpmcolors[color_text_button]" type="hidden" value="#ffffff" />';
|
361 |
+
echo '<input name="wpmcolors[color_button]" type="hidden" value="#1e73be" />';
|
362 |
+
echo '<input name="wpmcolors[color_button_hover]" type="hidden" value="#ffffff" />';
|
363 |
+
echo '<input name="wpmcolors[color_button_onclick]" type="hidden" value="#ffffff" />';
|
364 |
|
365 |
}
|
366 |
}
|
views/wp-maintenance-countdown.php
CHANGED
@@ -6,23 +6,26 @@ $messageUpdate = 0;
|
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_countdown' && wp_verify_nonce($_POST['security-countdown'], 'valid-countdown') ) {
|
8 |
|
9 |
-
if( empty($_POST["
|
10 |
-
if( empty($_POST["
|
11 |
-
if( empty($_POST["
|
12 |
-
|
13 |
-
$
|
14 |
-
$messageUpdate = 1;
|
15 |
}
|
16 |
|
17 |
// Récupère les paramètres sauvegardés
|
18 |
-
if(get_option('
|
19 |
-
$
|
20 |
?>
|
21 |
|
22 |
<div class="wrap">
|
23 |
|
24 |
<!-- HEADER -->
|
25 |
-
|
|
|
|
|
|
|
26 |
<!-- END HEADER -->
|
27 |
|
28 |
<div class="wp-maintenance-wrapper">
|
@@ -37,26 +40,11 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
37 |
|
38 |
<!-- ACTIVER COMPTEUR -->
|
39 |
<div class="wp-maintenance-module-options-block">
|
40 |
-
<?php
|
41 |
-
|
42 |
-
// Old version compte à rebours
|
43 |
-
if( isset($paramMMode['date_cpt_jj']) && empty($paramMMode['cptdate']) ) {
|
44 |
-
$paramMMode['cptdate'] = $paramMMode['date_cpt_aa'].'/'.$paramMMode['date_cpt_mm'].'/'.$paramMMode['date_cpt_jj'];
|
45 |
-
} else if ( empty($paramMMode['cptdate']) ) {
|
46 |
-
$paramMMode['cptdate'] = date('d').'/'.date('m').'/'.date('Y');
|
47 |
-
}
|
48 |
-
|
49 |
-
if( isset($paramMMode['date_cpt_hh']) && empty($paramMMode['cpttime']) ) {
|
50 |
-
$paramMMode['cpttime'] = $paramMMode['date_cpt_hh'].':'.$paramMMode['date_cpt_mn'];
|
51 |
-
} else if ( empty($paramMMode['cpttime']) ) {
|
52 |
-
$paramMMode['cpttime'] = date( 'H:i', (time()+3600) );
|
53 |
-
}
|
54 |
|
55 |
-
?>
|
56 |
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Enable a countdown', 'wp-maintenance'); ?></h3></div>
|
57 |
<p>
|
58 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable a countdown', 'wp-maintenance'); ?></span>
|
59 |
-
<input type="checkbox" name="
|
60 |
<span class="wp-maintenance-checkmark"></span>
|
61 |
</label>
|
62 |
</p>
|
@@ -72,13 +60,19 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
72 |
|
73 |
<div class="wp-maintenance-setting-row">
|
74 |
<?php
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
-
if( isset($
|
79 |
-
$startHour = $
|
80 |
}
|
81 |
-
if( (isset($
|
82 |
$startDate = date_i18n( date("Y").'/'.date("m").'/'.date("d") );
|
83 |
$timeFormats = array_unique( apply_filters( 'time_formats', array( 'H:i' ) ) );
|
84 |
foreach ( $timeFormats as $format ) {
|
@@ -88,7 +82,7 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
88 |
//$startHour = $newMin[0].':'.ceil($newMin[1]/5)*5;
|
89 |
}
|
90 |
?>
|
91 |
-
<img src="<?php echo
|
92 |
<div id="wpmdatecontainer"></div>
|
93 |
</div>
|
94 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
@@ -103,14 +97,14 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
103 |
|
104 |
<p>
|
105 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable seconds', 'wp-maintenance'); ?></span>
|
106 |
-
<input type="checkbox" name="
|
107 |
<span class="wp-maintenance-checkmark"></span>
|
108 |
</label>
|
109 |
</p>
|
110 |
<h3><?php _e('Disable maintenance mode at the end of the countdown?', 'wp-maintenance'); ?></h3>
|
111 |
<p>
|
112 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, disable maintenance mode at the end of countdown', 'wp-maintenance'); ?></span>
|
113 |
-
<input type="checkbox" name="
|
114 |
<span class="wp-maintenance-checkmark"></span>
|
115 |
</label>
|
116 |
</p>
|
@@ -119,7 +113,7 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
119 |
$settingsCountdown = array(
|
120 |
'wpautop' => true, // use wpautop?
|
121 |
'media_buttons' => false, // show insert/upload button(s)
|
122 |
-
'textarea_name' => '
|
123 |
'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
|
124 |
'tabindex' => '',
|
125 |
'editor_css' => '', // extra styles for both visual and HTML editors buttons,
|
@@ -130,7 +124,7 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
130 |
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
|
131 |
);
|
132 |
$textCpt_fin = '';
|
133 |
-
|
134 |
?>
|
135 |
<?php wp_editor( nl2br($textCpt_fin), 'message_cpt_fin', $settingsCountdown ); ?>
|
136 |
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_countdown' && wp_verify_nonce($_POST['security-countdown'], 'valid-countdown') ) {
|
8 |
|
9 |
+
if( empty($_POST["wpmcountdown"]["active_cpt"]) ) { $_POST["wpmcountdown"]["active_cpt"] = 0; }
|
10 |
+
if( empty($_POST["wpmcountdown"]["active_cpt_s"]) ) { $_POST["wpmcountdown"]["active_cpt_s"] = 0; }
|
11 |
+
if( empty($_POST["wpmcountdown"]["disable"]) ) { $_POST["wpmcountdown"]["disable"] = 0; }
|
12 |
+
|
13 |
+
$updateSetting = wpm_update_settings( $_POST["wpmcountdown"], 'wp_maintenance_settings_countdown');
|
14 |
+
if( $updateSetting == true ) { $messageUpdate = 1; }
|
15 |
}
|
16 |
|
17 |
// Récupère les paramètres sauvegardés
|
18 |
+
if(get_option('wp_maintenance_settings_countdown')) { extract(get_option('wp_maintenance_settings_countdown')); }
|
19 |
+
$paramsCountdown = get_option('wp_maintenance_settings_countdown');
|
20 |
?>
|
21 |
|
22 |
<div class="wrap">
|
23 |
|
24 |
<!-- HEADER -->
|
25 |
+
<h2 class="headerpage"><?php _e('WP Maintenance - Settings', 'wp-maintenance'); ?> <sup>v.<?php _e(WPM_VERSION); ?></sup></h2>
|
26 |
+
<?php if( isset($message) && $message == 1 ) { ?>
|
27 |
+
<div id="message" class="updated fade"><p><strong><?php _e('Options saved.', 'wp-maintenance'); ?></strong></p></div>
|
28 |
+
<?php } ?>
|
29 |
<!-- END HEADER -->
|
30 |
|
31 |
<div class="wp-maintenance-wrapper">
|
40 |
|
41 |
<!-- ACTIVER COMPTEUR -->
|
42 |
<div class="wp-maintenance-module-options-block">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
|
|
|
44 |
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Enable a countdown', 'wp-maintenance'); ?></h3></div>
|
45 |
<p>
|
46 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable a countdown', 'wp-maintenance'); ?></span>
|
47 |
+
<input type="checkbox" name="wpmcountdown[active_cpt]" value="1" <?php if( isset($paramsCountdown['active_cpt']) && $paramsCountdown['active_cpt']==1) { echo ' checked'; } ?>>
|
48 |
<span class="wp-maintenance-checkmark"></span>
|
49 |
</label>
|
50 |
</p>
|
60 |
|
61 |
<div class="wp-maintenance-setting-row">
|
62 |
<?php
|
63 |
+
|
64 |
+
// Old version compte à rebours
|
65 |
+
if ( empty($paramsCountdown['cptdate']) ) {
|
66 |
+
$paramsCountdown['cptdate'] = date('d').'/'.date('m').'/'.date('Y');
|
67 |
+
}
|
68 |
+
|
69 |
+
if( isset($paramsCountdown['cptdate']) && !empty($paramsCountdown['cptdate']) ) {
|
70 |
+
$startDate = $paramsCountdown['cptdate'];
|
71 |
}
|
72 |
+
if( isset($paramsCountdown['cpttime']) && !empty($paramsCountdown['cpttime']) ) {
|
73 |
+
$startHour = $paramsCountdown['cpttime'];
|
74 |
}
|
75 |
+
if( (isset($paramsCountdown['active_cpt']) && $paramsCountdown['active_cpt']==0) || empty($paramsCountdown['active_cpt']) ) {
|
76 |
$startDate = date_i18n( date("Y").'/'.date("m").'/'.date("d") );
|
77 |
$timeFormats = array_unique( apply_filters( 'time_formats', array( 'H:i' ) ) );
|
78 |
foreach ( $timeFormats as $format ) {
|
82 |
//$startHour = $newMin[0].':'.ceil($newMin[1]/5)*5;
|
83 |
}
|
84 |
?>
|
85 |
+
<img src="<?php echo plugins_url('../images/schedule_clock.png', __FILE__ ); ?>" class="datepicker" width="48" height="48" style="vertical-align: middle;margin-right:5px;"> <input id="cptdate" class="datepicker" name="wpmcountdown[cptdate]" type="text" autofocuss data-value="<?php echo esc_html($startDate); ?>"> <?php _e('at', 'wp-maintenance'); ?> <input id="cpttime" class="timepicker" type="time" name="wpmcountdown[cpttime]" value="<?php echo esc_html($startHour); ?>" size="6" autofocuss>
|
86 |
<div id="wpmdatecontainer"></div>
|
87 |
</div>
|
88 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
97 |
|
98 |
<p>
|
99 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable seconds', 'wp-maintenance'); ?></span>
|
100 |
+
<input type="checkbox" name="wpmcountdown[active_cpt_s]" value="1" <?php if( isset($paramsCountdown['active_cpt_s']) && $paramsCountdown['active_cpt_s']==1) { echo ' checked'; } ?>>
|
101 |
<span class="wp-maintenance-checkmark"></span>
|
102 |
</label>
|
103 |
</p>
|
104 |
<h3><?php _e('Disable maintenance mode at the end of the countdown?', 'wp-maintenance'); ?></h3>
|
105 |
<p>
|
106 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, disable maintenance mode at the end of countdown', 'wp-maintenance'); ?></span>
|
107 |
+
<input type="checkbox" name="wpmcountdown[disable]" value="1" <?php if( isset($paramsCountdown['disable']) && $paramsCountdown['disable']==1) { echo ' checked'; } ?>>
|
108 |
<span class="wp-maintenance-checkmark"></span>
|
109 |
</label>
|
110 |
</p>
|
113 |
$settingsCountdown = array(
|
114 |
'wpautop' => true, // use wpautop?
|
115 |
'media_buttons' => false, // show insert/upload button(s)
|
116 |
+
'textarea_name' => 'wpmcountdown[message_cpt_fin]', // set the textarea name to something different, square brackets [] can be used here
|
117 |
'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
|
118 |
'tabindex' => '',
|
119 |
'editor_css' => '', // extra styles for both visual and HTML editors buttons,
|
124 |
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
|
125 |
);
|
126 |
$textCpt_fin = '';
|
127 |
+
if( isset($paramsCountdown['message_cpt_fin']) && $paramsCountdown['message_cpt_fin']!='' ) { $textCpt_fin = esc_textarea(stripslashes($paramsCountdown['message_cpt_fin'])); } else { $textCpt_fin = ' '; }
|
128 |
?>
|
129 |
<?php wp_editor( nl2br($textCpt_fin), 'message_cpt_fin', $settingsCountdown ); ?>
|
130 |
|
views/wp-maintenance-css.php
CHANGED
@@ -6,15 +6,14 @@ $messageUpdate = 0;
|
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_css' && wp_verify_nonce($_POST['security-css'], 'valid-css') ) {
|
8 |
|
9 |
-
update_option('
|
10 |
$options_saved = true;
|
11 |
-
|
12 |
$messageUpdate = 1;
|
13 |
}
|
14 |
|
15 |
/* Si on réinitialise les feuille de styles */
|
16 |
if( isset($_POST['wpm_initcss']) && $_POST['wpm_initcss']==1) {
|
17 |
-
update_option( '
|
18 |
//$options_saved = true;
|
19 |
echo '<div id="message" class="updated fade"><p><strong>'.__('The Style Sheet has been reset!', 'wp-maintenance').'</strong></p></div>';
|
20 |
}
|
@@ -30,7 +29,10 @@ if( isset($_POST['wpm_initcss']) && $_POST['wpm_initcss']==1) {
|
|
30 |
<div class="wrap">
|
31 |
|
32 |
<!-- HEADER -->
|
33 |
-
|
|
|
|
|
|
|
34 |
<!-- END HEADER -->
|
35 |
|
36 |
<div class="wp-maintenance-wrapper">
|
@@ -48,9 +50,7 @@ if( isset($_POST['wpm_initcss']) && $_POST['wpm_initcss']==1) {
|
|
48 |
<!-- PIED DE PAGE -->
|
49 |
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Edit the CSS sheet of your maintenance page here.', 'wp-maintenance'); ?></h3></div>
|
50 |
<h3><?php _e('Click "Reset" and "Save" to retrieve the default style sheet.', 'wp-maintenance'); ?></h3>
|
51 |
-
<TEXTAREA NAME="
|
52 |
-
<?php //echo wpm_compress(get_option('wp_maintenance_style')); ?>
|
53 |
-
|
54 |
<p>
|
55 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, reset style sheet', 'wp-maintenance'); ?></span>
|
56 |
<input type="checkbox" name="wpm_initcss" value="1">
|
@@ -64,11 +64,12 @@ if( isset($_POST['wpm_initcss']) && $_POST['wpm_initcss']==1) {
|
|
64 |
<div class="wp-maintenance-module-options-block">
|
65 |
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Markers for colors', 'wp-maintenance'); ?></h3></div>
|
66 |
<div class="wp-maintenance-setting-row">
|
67 |
-
<label
|
68 |
-
<label
|
69 |
-
<label
|
70 |
-
<label
|
71 |
-
<label
|
|
|
72 |
</div>
|
73 |
|
74 |
<br />
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_css' && wp_verify_nonce($_POST['security-css'], 'valid-css') ) {
|
8 |
|
9 |
+
update_option('wp_maintenance_settings_css', sanitize_textarea_field(stripslashes($_POST["wp_maintenance_settings_css"])));
|
10 |
$options_saved = true;
|
|
|
11 |
$messageUpdate = 1;
|
12 |
}
|
13 |
|
14 |
/* Si on réinitialise les feuille de styles */
|
15 |
if( isset($_POST['wpm_initcss']) && $_POST['wpm_initcss']==1) {
|
16 |
+
update_option( 'wp_maintenance_settings_css', wpm_print_style() );
|
17 |
//$options_saved = true;
|
18 |
echo '<div id="message" class="updated fade"><p><strong>'.__('The Style Sheet has been reset!', 'wp-maintenance').'</strong></p></div>';
|
19 |
}
|
29 |
<div class="wrap">
|
30 |
|
31 |
<!-- HEADER -->
|
32 |
+
<h2 class="headerpage"><?php _e('WP Maintenance - Settings', 'wp-maintenance'); ?> <sup>v.<?php _e(WPM_VERSION); ?></sup></h2>
|
33 |
+
<?php if( isset($messageUpdate) && $messageUpdate == 1 ) { ?>
|
34 |
+
<div id="message" class="updated fade"><p><strong><?php _e('Options saved.', 'wp-maintenance'); ?></strong></p></div>
|
35 |
+
<?php } ?>
|
36 |
<!-- END HEADER -->
|
37 |
|
38 |
<div class="wp-maintenance-wrapper">
|
50 |
<!-- PIED DE PAGE -->
|
51 |
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Edit the CSS sheet of your maintenance page here.', 'wp-maintenance'); ?></h3></div>
|
52 |
<h3><?php _e('Click "Reset" and "Save" to retrieve the default style sheet.', 'wp-maintenance'); ?></h3>
|
53 |
+
<TEXTAREA NAME="wp_maintenance_settings_css" id="wpmaintenancestyle" COLS=70 ROWS=24 style="height:350px;"><?php echo esc_textarea(stripslashes(trim(get_option('wp_maintenance_settings_css')))); ?></TEXTAREA>
|
|
|
|
|
54 |
<p>
|
55 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, reset style sheet', 'wp-maintenance'); ?></span>
|
56 |
<input type="checkbox" name="wpm_initcss" value="1">
|
64 |
<div class="wp-maintenance-module-options-block">
|
65 |
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Markers for colors', 'wp-maintenance'); ?></h3></div>
|
66 |
<div class="wp-maintenance-setting-row">
|
67 |
+
<label class="wp-maintenance-setting-row-title">#_COLORTXT</label> <?php _e('Use this code for text color', 'wp-maintenance'); ?>
|
68 |
+
<label class="wp-maintenance-setting-row-title">#_COLORBG</label> <?php _e('Use this code for background text color', 'wp-maintenance'); ?>
|
69 |
+
<label class="wp-maintenance-setting-row-title">#_COLORCPTBG</label> <?php _e('Use this code for background color countdown', 'wp-maintenance'); ?>
|
70 |
+
<label class="wp-maintenance-setting-row-title">#_DATESIZE</label> <?php _e('Use this code for size countdown', 'wp-maintenance'); ?>
|
71 |
+
<label class="wp-maintenance-setting-row-title">#_COLORCPT</label> <?php _e('Use this code for countdown color', 'wp-maintenance'); ?>
|
72 |
+
<label class="wp-maintenance-setting-row-title">#_COLOR_TXT_BT</label> <?php _e('Use this code for bottom text color', 'wp-maintenance'); ?>
|
73 |
</div>
|
74 |
|
75 |
<br />
|
views/wp-maintenance-dashboard.php
CHANGED
@@ -7,28 +7,29 @@ $messageUpdate = 0;
|
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_general' && wp_verify_nonce($_POST['security-general'], 'valid-general') ) {
|
8 |
|
9 |
if( isset($_POST["wp_maintenance_active"]) && $_POST["wp_maintenance_active"] == 1 ) { $wp_maintenance_active = 1; } else { $wp_maintenance_active = 0; }
|
10 |
-
if( empty($_POST["
|
11 |
update_option('wp_maintenance_active', $wp_maintenance_active);
|
12 |
-
$options_saved = wpm_update_settings($_POST["wp_maintenance_settings"]);
|
13 |
|
14 |
-
$
|
|
|
15 |
}
|
16 |
|
17 |
// Récupère les paramètres sauvegardés
|
18 |
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
19 |
-
$
|
20 |
|
21 |
// Récupère si le status est actif ou non
|
22 |
$statusActive = get_option('wp_maintenance_active');
|
23 |
|
24 |
-
|
25 |
-
|
26 |
?>
|
27 |
|
28 |
<div class="wrap">
|
29 |
|
30 |
<!-- HEADER -->
|
31 |
-
|
|
|
|
|
|
|
32 |
<!-- END HEADER -->
|
33 |
|
34 |
<div class="wp-maintenance-wrapper">
|
@@ -44,8 +45,7 @@ $statusActive = get_option('wp_maintenance_active');
|
|
44 |
<!-- ACTIVER WP MAINTENANCE -->
|
45 |
<div class="wp-maintenance-module-options-block">
|
46 |
|
47 |
-
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title"
|
48 |
-
|
49 |
|
50 |
<p>
|
51 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable maintenance mode', 'wp-maintenance'); ?></span>
|
@@ -58,13 +58,13 @@ $statusActive = get_option('wp_maintenance_active');
|
|
58 |
</div>
|
59 |
<!-- TITRE ET TEXTE -->
|
60 |
<div class="wp-maintenance-module-options-block">
|
61 |
-
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title"
|
62 |
-
<input type="text" size="80%" class="wp-maintenance-input" name="
|
63 |
<?php
|
64 |
$settingsTextmaintenance = array(
|
65 |
'wpautop' => true, // use wpautop?
|
66 |
'media_buttons' => false, // show insert/upload button(s)
|
67 |
-
'textarea_name' => '
|
68 |
'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
|
69 |
'tabindex' => '',
|
70 |
'editor_css' => '', // extra styles for both visual and HTML editors buttons,
|
@@ -75,7 +75,7 @@ $statusActive = get_option('wp_maintenance_active');
|
|
75 |
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
|
76 |
);
|
77 |
$textWpm = '';
|
78 |
-
if( isset($
|
79 |
?>
|
80 |
<?php wp_editor( nl2br($textWpm), 'wpm-textmaintenance', $settingsTextmaintenance ); ?>
|
81 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
@@ -84,25 +84,25 @@ $statusActive = get_option('wp_maintenance_active');
|
|
84 |
|
85 |
<!-- Encart Newletter -->
|
86 |
<div class="wp-maintenance-module-options-block">
|
87 |
-
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title"
|
88 |
<p>
|
89 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable newsletter block', 'wp-maintenance'); ?></span>
|
90 |
-
<input type="checkbox" name="
|
91 |
<span class="wp-maintenance-checkmark"></span>
|
92 |
</label>
|
93 |
</p>
|
94 |
|
95 |
<div class="wp-maintenance-setting-row">
|
96 |
-
<label for="
|
97 |
-
<input type="text" name="
|
98 |
</div>
|
99 |
|
100 |
<div class="wp-maintenance-setting-row">
|
101 |
-
<label for="
|
102 |
-
<label class="wpm-container"><input type="radio" name="
|
103 |
-
<input type="text" name="
|
104 |
-
<label class="wpm-container"><input type="radio" name="
|
105 |
-
<textarea id="iframe_newletter" cols="60" rows="10" class="wp-maintenance-input" name="
|
106 |
</div>
|
107 |
|
108 |
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_general' && wp_verify_nonce($_POST['security-general'], 'valid-general') ) {
|
8 |
|
9 |
if( isset($_POST["wp_maintenance_active"]) && $_POST["wp_maintenance_active"] == 1 ) { $wp_maintenance_active = 1; } else { $wp_maintenance_active = 0; }
|
10 |
+
if( empty($_POST["wpsettings"]["newletter"]) ) { $_POST["wpsettings"]["newletter"] = 0; }
|
11 |
update_option('wp_maintenance_active', $wp_maintenance_active);
|
|
|
12 |
|
13 |
+
$updateSetting = wpm_update_settings( $_POST["wpsettings"], 'wp_maintenance_settings');
|
14 |
+
if( $updateSetting == true ) { $messageUpdate = 1; }
|
15 |
}
|
16 |
|
17 |
// Récupère les paramètres sauvegardés
|
18 |
if(get_option('wp_maintenance_settings')) { extract(get_option('wp_maintenance_settings')); }
|
19 |
+
$paramsSettings = get_option('wp_maintenance_settings');
|
20 |
|
21 |
// Récupère si le status est actif ou non
|
22 |
$statusActive = get_option('wp_maintenance_active');
|
23 |
|
|
|
|
|
24 |
?>
|
25 |
|
26 |
<div class="wrap">
|
27 |
|
28 |
<!-- HEADER -->
|
29 |
+
<h2 class="headerpage"><?php _e('WP Maintenance - Settings', 'wp-maintenance'); ?> <sup>v.<?php _e(WPM_VERSION); ?></sup></h2>
|
30 |
+
<?php if( isset($message) && $message == 1 ) { ?>
|
31 |
+
<div id="message" class="updated fade"><p><strong><?php _e('Options saved.', 'wp-maintenance'); ?></strong></p></div>
|
32 |
+
<?php } ?>
|
33 |
<!-- END HEADER -->
|
34 |
|
35 |
<div class="wp-maintenance-wrapper">
|
45 |
<!-- ACTIVER WP MAINTENANCE -->
|
46 |
<div class="wp-maintenance-module-options-block">
|
47 |
|
48 |
+
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" ><?php _e('Activate maintenance mode', 'wp-maintenance'); ?></h3></div>
|
|
|
49 |
|
50 |
<p>
|
51 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable maintenance mode', 'wp-maintenance'); ?></span>
|
58 |
</div>
|
59 |
<!-- TITRE ET TEXTE -->
|
60 |
<div class="wp-maintenance-module-options-block">
|
61 |
+
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" ><?php _e('Title and text', 'wp-maintenance'); ?></h3></div>
|
62 |
+
<input type="text" size="80%" class="wp-maintenance-input" name="wpsettings[titre_maintenance]" value="<?php if( isset($paramsSettings['titre_maintenance']) && $paramsSettings['titre_maintenance']!='' ) { echo esc_html(stripslashes($paramsSettings['titre_maintenance'])); } ?>" /><br />
|
63 |
<?php
|
64 |
$settingsTextmaintenance = array(
|
65 |
'wpautop' => true, // use wpautop?
|
66 |
'media_buttons' => false, // show insert/upload button(s)
|
67 |
+
'textarea_name' => 'wpsettings[text_maintenance]', // set the textarea name to something different, square brackets [] can be used here
|
68 |
'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
|
69 |
'tabindex' => '',
|
70 |
'editor_css' => '', // extra styles for both visual and HTML editors buttons,
|
75 |
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
|
76 |
);
|
77 |
$textWpm = '';
|
78 |
+
if( isset($paramsSettings['text_maintenance']) && $paramsSettings['text_maintenance']!='' ) { $textWpm = stripslashes($paramsSettings['text_maintenance']); }
|
79 |
?>
|
80 |
<?php wp_editor( nl2br($textWpm), 'wpm-textmaintenance', $settingsTextmaintenance ); ?>
|
81 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
84 |
|
85 |
<!-- Encart Newletter -->
|
86 |
<div class="wp-maintenance-module-options-block">
|
87 |
+
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title"><?php _e('Activate newsletter block', 'wp-maintenance'); ?></h3></div>
|
88 |
<p>
|
89 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable newsletter block', 'wp-maintenance'); ?></span>
|
90 |
+
<input type="checkbox" name="wpsettings[newletter]" value="1" <?php if( isset($paramsSettings['newletter']) && $paramsSettings['newletter']==1 ) { echo ' checked'; } ?>>
|
91 |
<span class="wp-maintenance-checkmark"></span>
|
92 |
</label>
|
93 |
</p>
|
94 |
|
95 |
<div class="wp-maintenance-setting-row">
|
96 |
+
<label for="wpsettings[title_newletter]" class="wp-maintenance-setting-row-title"><?php _e('Enter title for the newletter block', 'wp-maintenance'); ?></label>
|
97 |
+
<input type="text" name="wpsettings[title_newletter]" class="wp-maintenance-input" size="60%" value="<?php if( isset($paramsSettings['title_newletter']) && $paramsSettings['title_newletter']!='' ) { echo esc_html(stripslashes(trim($paramsSettings['title_newletter']))); } ?>" />
|
98 |
</div>
|
99 |
|
100 |
<div class="wp-maintenance-setting-row">
|
101 |
+
<label for="wpsettings[type-newletter]" class="wp-maintenance-setting-row-title"><?php _e('Type of the newletter block', 'wp-maintenance'); ?></label>
|
102 |
+
<label class="wpm-container"><input type="radio" name="wpsettings[type_newletter]" size="60%" value="shortcode" <?php if( isset($paramsSettings['type_newletter']) && $paramsSettings['type_newletter']=='shortcode' ) { echo 'checked'; } if( empty($paramsSettings['type_newletter']) ) { echo 'checked'; } ?> /><?php _e('Enter your newletter shortcode here:', 'wp-maintenance'); ?><span class="wpm-checkmark"></span></label><br /><br />
|
103 |
+
<input type="text" name="wpsettings[code_newletter]" size="60%" class="wp-maintenance-input" value='<?php if( isset($paramsSettings['code_newletter']) && $paramsSettings['code_newletter']!='' ) { echo esc_attr(stripslashes(trim($paramsSettings['code_newletter']))); } ?>' onclick="select()" /><br /><br />
|
104 |
+
<label class="wpm-container"><input type="radio" name="wpsettings[type_newletter]" value="iframe" <?php if( isset($paramsSettings['type_newletter']) && $paramsSettings['type_newletter']=='iframe' ) { echo 'checked'; } ?>/> <?php _e('Or enter your newletter iframe code here:', 'wp-maintenance'); ?><span class="wpm-checkmark"></span></label><br /><br />
|
105 |
+
<textarea id="iframe_newletter" cols="60" rows="10" class="wp-maintenance-input" name="wpsettings[iframe_newletter]"><?php if( isset($paramsSettings['iframe_newletter']) && $paramsSettings['iframe_newletter']!='' ) { echo esc_attr(stripslashes(trim($paramsSettings['iframe_newletter']))); } ?></textarea>
|
106 |
</div>
|
107 |
|
108 |
|
views/wp-maintenance-footer.php
CHANGED
@@ -6,22 +6,26 @@ $messageUpdate = 0;
|
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_footer' && wp_verify_nonce($_POST['security-footer'], 'valid-footer') ) {
|
8 |
|
9 |
-
if( empty($_POST["
|
10 |
-
if( empty($_POST["
|
11 |
-
|
12 |
-
$
|
|
|
13 |
}
|
14 |
|
15 |
// Récupère les paramètres sauvegardés
|
16 |
-
if(get_option('
|
17 |
-
$
|
18 |
|
19 |
?>
|
20 |
<style>.CodeMirror {border: 1px solid #eee;height: auto;}</style>
|
21 |
<div class="wrap">
|
22 |
|
23 |
<!-- HEADER -->
|
24 |
-
|
|
|
|
|
|
|
25 |
<!-- END HEADER -->
|
26 |
|
27 |
<div class="wp-maintenance-wrapper">
|
@@ -43,7 +47,7 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
43 |
|
44 |
<p>
|
45 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable footer', 'wp-maintenance'); ?></span>
|
46 |
-
<input type="checkbox" name="
|
47 |
<span class="wp-maintenance-checkmark"></span>
|
48 |
</label>
|
49 |
</p>
|
@@ -54,7 +58,7 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
54 |
$settingsTextmaintenance = array(
|
55 |
'wpautop' => true, // use wpautop?
|
56 |
'media_buttons' => false, // show insert/upload button(s)
|
57 |
-
'textarea_name' => '
|
58 |
'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
|
59 |
'tabindex' => '',
|
60 |
'editor_css' => '', // extra styles for both visual and HTML editors buttons,
|
@@ -65,7 +69,7 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
65 |
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
|
66 |
);
|
67 |
$textBt = '';
|
68 |
-
if( isset($
|
69 |
?>
|
70 |
<?php wp_editor( nl2br($textBt), 'wpm-textbtmaintenance', $settingsTextmaintenance ); ?>
|
71 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
@@ -80,15 +84,15 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
80 |
|
81 |
<p>
|
82 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, show text and link to go to the dashboard', 'wp-maintenance'); ?></span>
|
83 |
-
<input type="checkbox" name="
|
84 |
<span class="wp-maintenance-checkmark"></span>
|
85 |
</label>
|
86 |
</p>
|
87 |
|
88 |
<div class="wp-maintenance-setting-row">
|
89 |
-
<label for="
|
90 |
-
<input type="text" name="
|
91 |
-
<small><?php _e('Eg: connect to
|
92 |
</div>
|
93 |
|
94 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_footer' && wp_verify_nonce($_POST['security-footer'], 'valid-footer') ) {
|
8 |
|
9 |
+
if( empty($_POST["wpfooter"]["add_wplogin"]) ) { $_POST["wpfooter"]["add_wplogin"] = 0; }
|
10 |
+
if( empty($_POST["wpfooter"]["enable_footer"]) ) { $_POST["wpfooter"]["enable_footer"] = 0; }
|
11 |
+
|
12 |
+
$updateSetting = wpm_update_settings( $_POST["wpfooter"], 'wp_maintenance_settings_footer');
|
13 |
+
if( $updateSetting == true ) { $messageUpdate = 1; }
|
14 |
}
|
15 |
|
16 |
// Récupère les paramètres sauvegardés
|
17 |
+
if(get_option('wp_maintenance_settings_footer')) { extract(get_option('wp_maintenance_settings_footer')); }
|
18 |
+
$paramsFooter = get_option('wp_maintenance_settings_footer');
|
19 |
|
20 |
?>
|
21 |
<style>.CodeMirror {border: 1px solid #eee;height: auto;}</style>
|
22 |
<div class="wrap">
|
23 |
|
24 |
<!-- HEADER -->
|
25 |
+
<h2 class="headerpage"><?php _e('WP Maintenance - Settings', 'wp-maintenance'); ?> <sup>v.<?php _e(WPM_VERSION); ?></sup></h2>
|
26 |
+
<?php if( isset($messageUpdate) && $messageUpdate == 1 ) { ?>
|
27 |
+
<div id="message" class="updated fade"><p><strong><?php _e('Options saved.', 'wp-maintenance'); ?></strong></p></div>
|
28 |
+
<?php } ?>
|
29 |
<!-- END HEADER -->
|
30 |
|
31 |
<div class="wp-maintenance-wrapper">
|
47 |
|
48 |
<p>
|
49 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable footer', 'wp-maintenance'); ?></span>
|
50 |
+
<input type="checkbox" name="wpfooter[enable_footer]" value="1" <?php if( isset($paramsFooter['enable_footer']) && $paramsFooter['enable_footer']==1) { echo ' checked'; } ?>>
|
51 |
<span class="wp-maintenance-checkmark"></span>
|
52 |
</label>
|
53 |
</p>
|
58 |
$settingsTextmaintenance = array(
|
59 |
'wpautop' => true, // use wpautop?
|
60 |
'media_buttons' => false, // show insert/upload button(s)
|
61 |
+
'textarea_name' => 'wpfooter[text_bt_maintenance]', // set the textarea name to something different, square brackets [] can be used here
|
62 |
'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..."
|
63 |
'tabindex' => '',
|
64 |
'editor_css' => '', // extra styles for both visual and HTML editors buttons,
|
69 |
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
|
70 |
);
|
71 |
$textBt = '';
|
72 |
+
if( isset($paramsFooter['text_bt_maintenance']) && $paramsFooter['text_bt_maintenance']!='' ) { $textBt = stripslashes($paramsFooter['text_bt_maintenance']); }
|
73 |
?>
|
74 |
<?php wp_editor( nl2br($textBt), 'wpm-textbtmaintenance', $settingsTextmaintenance ); ?>
|
75 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
84 |
|
85 |
<p>
|
86 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, show text and link to go to the dashboard', 'wp-maintenance'); ?></span>
|
87 |
+
<input type="checkbox" name="wpfooter[add_wplogin]" value="1" <?php if( isset($paramsFooter['add_wplogin']) && $paramsFooter['add_wplogin'] == 1 ) { echo ' checked'; }?>>
|
88 |
<span class="wp-maintenance-checkmark"></span>
|
89 |
</label>
|
90 |
</p>
|
91 |
|
92 |
<div class="wp-maintenance-setting-row">
|
93 |
+
<label for="wpfooter[add_wplogin_title]" class="wp-maintenance-setting-row-title"><?php _e('Enter your text and #DASHBOARD shortcode', 'wp-maintenance'); ?></label>
|
94 |
+
<input type="text" name="wpfooter[add_wplogin_title]" class="wp-maintenance-input" size="60%" value="<?php if( isset($paramsFooter['add_wplogin_title']) && $paramsFooter['add_wplogin_title']!='' ) { echo esc_html(stripslashes(trim($paramsFooter['add_wplogin_title']))); } ?>" /><br />
|
95 |
+
<small><?php _e('Eg: connect to #DASHBOARD here!', 'wp-maintenance'); ?> <?php _e('(#DASHBOARD will be replaced with the link to the dashboard and the word "Dashboard")', 'wp-maintenance'); ?></small>
|
96 |
</div>
|
97 |
|
98 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
views/wp-maintenance-picture.php
CHANGED
@@ -13,31 +13,34 @@ $colors = $_wp_admin_css_colors[$admin_color]->colors;
|
|
13 |
if( isset($_POST['action']) && $_POST['action'] == 'update_pictures' && wp_verify_nonce($_POST['security-pictures'], 'valid-pictures') ) {
|
14 |
|
15 |
if( isset($_POST['upload_picture']) && $_POST['upload_picture']!='' ) {
|
16 |
-
$_POST["
|
17 |
}
|
18 |
if( isset($_POST['remove_image']) && $_POST['remove_image']==1 ) {
|
19 |
-
$_POST["
|
20 |
}
|
21 |
if( isset($_POST['upload_b_image']) && $_POST['upload_b_image']!='' ) {
|
22 |
-
$_POST["
|
23 |
}
|
24 |
if( isset($_POST['remove_b_image']) && $_POST['remove_b_image']==1 ) {
|
25 |
-
$_POST["
|
26 |
-
$_POST["
|
27 |
}
|
28 |
|
29 |
-
if( empty($_POST["
|
30 |
-
if( empty($_POST["
|
31 |
|
32 |
-
$
|
|
|
33 |
|
34 |
-
|
35 |
-
$messageUpdate = 1;
|
36 |
}
|
37 |
|
38 |
// Récupère les paramètres sauvegardés
|
39 |
-
if(get_option('
|
40 |
-
$
|
|
|
|
|
|
|
|
|
41 |
|
42 |
?>
|
43 |
<style>
|
@@ -58,7 +61,10 @@ function toggleTable(texte) {
|
|
58 |
<div class="wrap">
|
59 |
|
60 |
<!-- HEADER -->
|
61 |
-
|
|
|
|
|
|
|
62 |
<!-- END HEADER -->
|
63 |
|
64 |
<div class="wp-maintenance-wrapper">
|
@@ -80,15 +86,15 @@ function toggleTable(texte) {
|
|
80 |
|
81 |
<h3><?php _e('Choice you picture for header page', 'wp-maintenance'); ?></h3>
|
82 |
<div class="wp-maintenance-setting-row">
|
83 |
-
<label for="
|
84 |
-
<input id="settings_image"name="
|
85 |
<input id="upload_image" size="65%" name="upload_picture" value="" type="text" /> <a href="#" id="upload_image_button" class="wp-maintenance-button-primary" OnClick="this.blur();"><?php _e('Media Image Library', 'wp-maintenance'); ?></a><br />
|
86 |
<span class="description"><?php _e( 'URL path to image to replace default picture. (You can upload your image with the WordPress media uploader)', 'wp-maintenance' ); ?></span><br />
|
87 |
-
<label for="
|
88 |
-
<label for="
|
89 |
<div class="wp-maintenance-encadre">
|
90 |
-
<?php if( isset($
|
91 |
-
<?php _e('You use this picture:', 'wp-maintenance'); ?><br /> <img src="<?php echo $
|
92 |
<?php } ?>
|
93 |
</div>
|
94 |
</div>
|
@@ -103,25 +109,25 @@ function toggleTable(texte) {
|
|
103 |
</div>
|
104 |
<p>
|
105 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e("Disable background or pattern picture", 'wp-maintenance'); ?></span>
|
106 |
-
<input type="radio" name="
|
107 |
<span class="wp-maintenance-checkmark"></span>
|
108 |
</label>
|
109 |
</p>
|
110 |
|
111 |
<p>
|
112 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, activate picture background', 'wp-maintenance'); ?></span>
|
113 |
-
<input type="radio" name="
|
114 |
<span class="wp-maintenance-checkmark"></span>
|
115 |
</label>
|
116 |
</p>
|
117 |
<div class="wp-maintenance-setting-row">
|
118 |
-
<input id="settings_image"name="
|
119 |
-
<label
|
120 |
<input id="upload_b_image" size="65%" name="upload_b_image" value="" type="text" /> <a href="#" id="upload_b_image_button" class="wp-maintenance-button-primary" OnClick="this.blur();"><span> <?php _e('Media Image Library', 'wp-maintenance'); ?> </span></a>
|
121 |
|
122 |
-
<?php if( isset($
|
123 |
<div style="padding-top:1em;text-align:center;"><?php _e('You use this background picture:', 'wp-maintenance'); ?></div>
|
124 |
-
<div class="wp-maintenance-encadre" style="height:200px;margin-top: 0em;background:url('<?php echo esc_url($
|
125 |
|
126 |
|
127 |
</div><div style="text-align:center;"><label class="wpm-container"><input type="checkbox" name="remove_b_image" value="1" /> <?php _e('Remove', 'wp-maintenance'); ?><span class="wpm-checkmark"></span></label></div>
|
@@ -130,21 +136,21 @@ function toggleTable(texte) {
|
|
130 |
</div>
|
131 |
|
132 |
<div class="wp-maintenance-setting-row">
|
133 |
-
<label for="
|
134 |
-
<select name="
|
135 |
-
<option value="repeat"<?php if( (isset($
|
136 |
-
<option value="no-repeat"<?php if( isset($
|
137 |
-
<option value="repeat-x"<?php if( isset($
|
138 |
-
<option value="repeat-y"<?php if( isset($
|
139 |
</select>
|
140 |
|
141 |
-
<label for="
|
142 |
-
<input id="fontSize" name="
|
143 |
</div>
|
144 |
|
145 |
<p>
|
146 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Fix the background picture', 'wp-maintenance'); ?></span>
|
147 |
-
<input type="checkbox" name="
|
148 |
<span class="wp-maintenance-checkmark"></span>
|
149 |
</label>
|
150 |
</p>
|
@@ -160,29 +166,29 @@ function toggleTable(texte) {
|
|
160 |
|
161 |
<p>
|
162 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, activate pattern background', 'wp-maintenance'); ?></span>
|
163 |
-
<input type="radio" name="
|
164 |
<span class="wp-maintenance-checkmark"></span>
|
165 |
</label>
|
166 |
</p>
|
167 |
|
168 |
<!-- CHOIX PATTERN -->
|
169 |
<div class="wp-maintenance-setting-row">
|
170 |
-
<label for="
|
171 |
<ul id="pattern">
|
172 |
<li>
|
173 |
<div style="width:50px;height:50px;border:1px solid #333;background-color:#ffffff;font-size:0.8em;margin-bottom:5px;"><?php _e('NO PATTERN', 'wp-maintenance'); ?></div>
|
174 |
-
<label class="wpm-container"><input type="radio" value="0" <?php if( empty($
|
175 |
|
176 |
</li>
|
177 |
<?php for ($p = 1; $p <= 12; $p++) { ?>
|
178 |
<li>
|
179 |
-
<div style="width:50px;height:50px;border:2px solid #ECF0F1;background:url('<?php echo
|
180 |
-
<label for="b_pattern_<?php echo $p; ?>" class="wpm-container"><input type="radio" value="<?php echo $p; ?>" <?php if( isset($
|
181 |
</li>
|
182 |
<?php } ?>
|
183 |
</ul>
|
184 |
-
<?php if( isset($
|
185 |
-
<div class="wp-maintenance-encadre" style="background: url('<?php echo esc_url(
|
186 |
<?php _e('You use this pattern', 'wp-maintenance'); ?>
|
187 |
</div>
|
188 |
<?php } ?>
|
@@ -202,14 +208,14 @@ function toggleTable(texte) {
|
|
202 |
</div><!-- END WRAP -->
|
203 |
<script>
|
204 |
jQuery(document).ready(function() {
|
205 |
-
jQuery( "#
|
206 |
disabled: false,
|
207 |
min: 0,
|
208 |
max: 1,
|
209 |
orientation: "horizontal",
|
210 |
range: false,
|
211 |
step: 0.1,
|
212 |
-
value: <?php if( isset($
|
213 |
animate:"slow",
|
214 |
slide: function( event, ui ) {
|
215 |
jQuery( "#fontSize" ).val( ui.value );
|
13 |
if( isset($_POST['action']) && $_POST['action'] == 'update_pictures' && wp_verify_nonce($_POST['security-pictures'], 'valid-pictures') ) {
|
14 |
|
15 |
if( isset($_POST['upload_picture']) && $_POST['upload_picture']!='' ) {
|
16 |
+
$_POST["wpmpicture"]["image"] = sanitize_text_field($_POST['upload_picture']);
|
17 |
}
|
18 |
if( isset($_POST['remove_image']) && $_POST['remove_image']==1 ) {
|
19 |
+
$_POST["wpmpicture"]["image"] = '';
|
20 |
}
|
21 |
if( isset($_POST['upload_b_image']) && $_POST['upload_b_image']!='' ) {
|
22 |
+
$_POST["wpmpicture"]["b_image"] = sanitize_text_field($_POST['upload_b_image']);
|
23 |
}
|
24 |
if( isset($_POST['remove_b_image']) && $_POST['remove_b_image']==1 ) {
|
25 |
+
$_POST["wpmpicture"]["b_image"] = '';
|
26 |
+
$_POST["wpmpicture"]["b_enable_image"] = 0;
|
27 |
}
|
28 |
|
29 |
+
if( empty($_POST["wpmpicture"]["b_enable_image"]) ) { $_POST["wpmpicture"]["b_enable_image"] = 0; }
|
30 |
+
if( empty($_POST["wpmpicture"]["b_fixed_image"]) ) { $_POST["wpmpicture"]["b_fixed_image"] = 0; }
|
31 |
|
32 |
+
$updateSetting = wpm_update_settings( $_POST["wpmpicture"], 'wp_maintenance_settings_picture');
|
33 |
+
if( $updateSetting == true ) { $messageUpdate = 1; }
|
34 |
|
|
|
|
|
35 |
}
|
36 |
|
37 |
// Récupère les paramètres sauvegardés
|
38 |
+
if(get_option('wp_maintenance_settings_picture')) { extract(get_option('wp_maintenance_settings_picture')); }
|
39 |
+
$paramsPicture = get_option('wp_maintenance_settings_picture');
|
40 |
+
|
41 |
+
// Récupère les paramètres sauvegardés (Besoin de récupérer des couleurs)
|
42 |
+
if(get_option('wp_maintenance_settings_colors')) { extract(get_option('wp_maintenance_settings_colors')); }
|
43 |
+
$paramsColors = get_option('wp_maintenance_settings_colors');
|
44 |
|
45 |
?>
|
46 |
<style>
|
61 |
<div class="wrap">
|
62 |
|
63 |
<!-- HEADER -->
|
64 |
+
<h2 class="headerpage"><?php _e('WP Maintenance - Settings', 'wp-maintenance'); ?> <sup>v.<?php _e(WPM_VERSION); ?></sup></h2>
|
65 |
+
<?php if( isset($message) && $message == 1 ) { ?>
|
66 |
+
<div id="message" class="updated fade"><p><strong><?php _e('Options saved.', 'wp-maintenance'); ?></strong></p></div>
|
67 |
+
<?php } ?>
|
68 |
<!-- END HEADER -->
|
69 |
|
70 |
<div class="wp-maintenance-wrapper">
|
86 |
|
87 |
<h3><?php _e('Choice you picture for header page', 'wp-maintenance'); ?></h3>
|
88 |
<div class="wp-maintenance-setting-row">
|
89 |
+
<label for="wpmpicture[image]" class="wp-maintenance-setting-row-title"><?php _e('Enter a URL or upload an image', 'wp-maintenance'); ?></label>
|
90 |
+
<input id="settings_image"name="wpmpicture[image]" value="<?php if( isset($paramsPicture['image']) && $paramsPicture['image']!='' ) { echo esc_url($paramsPicture['image']); } ?>" type="hidden" />
|
91 |
<input id="upload_image" size="65%" name="upload_picture" value="" type="text" /> <a href="#" id="upload_image_button" class="wp-maintenance-button-primary" OnClick="this.blur();"><?php _e('Media Image Library', 'wp-maintenance'); ?></a><br />
|
92 |
<span class="description"><?php _e( 'URL path to image to replace default picture. (You can upload your image with the WordPress media uploader)', 'wp-maintenance' ); ?></span><br />
|
93 |
+
<label for="wpmpicture[image_width]" class="wp-maintenance-setting-row-title"><?php _e( 'Width:', 'wp-maintenance' ); ?></label> <input type="text" value="<?php if( isset($paramsPicture['image_width']) && $paramsPicture['image_width']!='' ) { echo esc_html($paramsPicture['image_width']); } ?>" size="4" name="wpmpicture[image_width]" />px <br />
|
94 |
+
<label for="wpmpicture[image_height]" class="wp-maintenance-setting-row-title"><?php _e( 'Height:', 'wp-maintenance' ); ?></label> <input type="text" size="4" value="<?php if( isset($paramsPicture['image_height']) && $paramsPicture['image_height']!='' ) { echo esc_html($paramsPicture['image_height']); } ?>" name="wpmpicture[image_height]" />px<br />
|
95 |
<div class="wp-maintenance-encadre">
|
96 |
+
<?php if( isset($paramsPicture['image']) && $paramsPicture['image']!='' ) { ?>
|
97 |
+
<?php _e('You use this picture:', 'wp-maintenance'); ?><br /> <img src="<?php echo esc_url($paramsPicture['image']); ?>" width="250" id="image_visuel" style="padding:3px;" /><br /><input type="checkbox" name="remove_image" value="1" /> <?php _e('Remove', 'wp-maintenance'); ?>
|
98 |
<?php } ?>
|
99 |
</div>
|
100 |
</div>
|
109 |
</div>
|
110 |
<p>
|
111 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e("Disable background or pattern picture", 'wp-maintenance'); ?></span>
|
112 |
+
<input type="radio" name="wpmpicture[b_enable_image]" value="0" <?php if( isset($paramsPicture['b_enable_image']) && $paramsPicture['b_enable_image']==0) { echo ' checked'; } ?>>
|
113 |
<span class="wp-maintenance-checkmark"></span>
|
114 |
</label>
|
115 |
</p>
|
116 |
|
117 |
<p>
|
118 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, activate picture background', 'wp-maintenance'); ?></span>
|
119 |
+
<input type="radio" name="wpmpicture[b_enable_image]" value="1" <?php if( isset($paramsPicture['b_enable_image']) && $paramsPicture['b_enable_image']==1) { echo ' checked'; } ?>>
|
120 |
<span class="wp-maintenance-checkmark"></span>
|
121 |
</label>
|
122 |
</p>
|
123 |
<div class="wp-maintenance-setting-row">
|
124 |
+
<input id="settings_image"name="wpmpicture[b_image]" value="<?php if( isset($paramsPicture['b_image']) && $paramsPicture['b_image']!='' ) { echo esc_url($paramsPicture['b_image']); } ?>" type="hidden" />
|
125 |
+
<label class="wp-maintenance-setting-row-title"><?php _e('Enter a URL or upload an image', 'wp-maintenance'); ?></label>
|
126 |
<input id="upload_b_image" size="65%" name="upload_b_image" value="" type="text" /> <a href="#" id="upload_b_image_button" class="wp-maintenance-button-primary" OnClick="this.blur();"><span> <?php _e('Media Image Library', 'wp-maintenance'); ?> </span></a>
|
127 |
|
128 |
+
<?php if( isset($paramsPicture['b_image']) && $paramsPicture['b_image']!='' ) { ?>
|
129 |
<div style="padding-top:1em;text-align:center;"><?php _e('You use this background picture:', 'wp-maintenance'); ?></div>
|
130 |
+
<div class="wp-maintenance-encadre" style="height:200px;margin-top: 0em;background:url('<?php echo esc_url($paramsPicture['b_image']) ?>');top center;background-size: cover;-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-position: center;background-color: rgba(0,0,0,<?php echo esc_html($paramsPicture['b_opacity_image']); ?>);">
|
131 |
|
132 |
|
133 |
</div><div style="text-align:center;"><label class="wpm-container"><input type="checkbox" name="remove_b_image" value="1" /> <?php _e('Remove', 'wp-maintenance'); ?><span class="wpm-checkmark"></span></label></div>
|
136 |
</div>
|
137 |
|
138 |
<div class="wp-maintenance-setting-row">
|
139 |
+
<label for="wpmpicture[image]" class="wp-maintenance-setting-row-title"><?php _e('Background picture options', 'wp-maintenance'); ?></label>
|
140 |
+
<select name="wpmpicture[b_repeat_image]" style="border: 2px solid #ECF0F1;font-size: 13px;padding: 7px 25px 7px 10px;height: auto;">
|
141 |
+
<option value="repeat"<?php if( (isset($paramsPicture['b_repeat_image']) && $paramsPicture['b_repeat_image']=='repeat') or empty($paramsPicture['b_repeat_image']) ) { echo ' selected'; } ?>>repeat</option>
|
142 |
+
<option value="no-repeat"<?php if( isset($paramsPicture['b_repeat_image']) && $paramsPicture['b_repeat_image']=='no-repeat') { echo ' selected'; } ?>>no-repeat</option>
|
143 |
+
<option value="repeat-x"<?php if( isset($paramsPicture['b_repeat_image']) && $paramsPicture['b_repeat_image']=='repeat-x') { echo ' selected'; } ?>>repeat-x</option>
|
144 |
+
<option value="repeat-y"<?php if( isset($paramsPicture['b_repeat_image']) && $paramsPicture['b_repeat_image']=='repeat-y') { echo ' selected'; } ?>>repeat-y</option>
|
145 |
</select>
|
146 |
|
147 |
+
<label for="wpmpicture[image]" class="wp-maintenance-setting-row-title"><?php _e('Background Opacity', 'wp-maintenance'); ?></label>
|
148 |
+
<input id="fontSize" name="wpmpicture[b_opacity_image]" value="<?php if( isset($paramsPicture['b_opacity_image']) ) { echo esc_html($paramsPicture['b_opacity_image']); } else { echo '0.2'; } ?>" size="4" readonly="readonly" style="border: 2px solid #ECF0F1;font-size: 13px;padding: 7px 10px;height: auto;"><br /><br /><div id="opacity_slider" style="border: 2px solid #ECF0F1;font-size: 13px;padding: 7px 10px;height: auto;"></div>
|
149 |
</div>
|
150 |
|
151 |
<p>
|
152 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Fix the background picture', 'wp-maintenance'); ?></span>
|
153 |
+
<input type="checkbox" name="wpmpicture[b_fixed_image]" value="1" <?php if( isset($paramsPicture['b_fixed_image']) && $paramsPicture['b_fixed_image']==1) { echo ' checked'; } ?>>
|
154 |
<span class="wp-maintenance-checkmark"></span>
|
155 |
</label>
|
156 |
</p>
|
166 |
|
167 |
<p>
|
168 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, activate pattern background', 'wp-maintenance'); ?></span>
|
169 |
+
<input type="radio" name="wpmpicture[b_enable_image]" value="2" <?php if( isset($paramsPicture['b_enable_image']) && $paramsPicture['b_enable_image']==2) { echo ' checked'; } ?>>
|
170 |
<span class="wp-maintenance-checkmark"></span>
|
171 |
</label>
|
172 |
</p>
|
173 |
|
174 |
<!-- CHOIX PATTERN -->
|
175 |
<div class="wp-maintenance-setting-row">
|
176 |
+
<label for="wpmpicture[image]" class="wp-maintenance-setting-row-title"><?php _e('Choose a pattern', 'wp-maintenance'); ?></label>
|
177 |
<ul id="pattern">
|
178 |
<li>
|
179 |
<div style="width:50px;height:50px;border:1px solid #333;background-color:#ffffff;font-size:0.8em;margin-bottom:5px;"><?php _e('NO PATTERN', 'wp-maintenance'); ?></div>
|
180 |
+
<label class="wpm-container"><input type="radio" value="0" <?php if( empty($paramsPicture['b_pattern']) or $paramsPicture['b_pattern']==0) { echo 'checked'; } ?> name="wpmpicture[b_pattern]" /><span class="wpm-checkmark"></span></label>
|
181 |
|
182 |
</li>
|
183 |
<?php for ($p = 1; $p <= 12; $p++) { ?>
|
184 |
<li>
|
185 |
+
<div style="width:50px;height:50px;border:2px solid #ECF0F1;background:url('<?php echo esc_url(plugins_url( '../images/pattern'.$p.'.png', __FILE__ )); ?>');margin-bottom:5px;"></div>
|
186 |
+
<label for="b_pattern_<?php echo $p; ?>" class="wpm-container"><input type="radio" value="<?php echo esc_html($p); ?>" <?php if( isset($paramsPicture['b_pattern']) && $paramsPicture['b_pattern']==$p) { echo 'checked'; } ?> id="b_pattern_<?php echo esc_html($p); ?>" name="wpmpicture[b_pattern]" /><span class="wpm-checkmark"></span></label>
|
187 |
</li>
|
188 |
<?php } ?>
|
189 |
</ul>
|
190 |
+
<?php if( isset($paramsPicture['b_pattern']) && $paramsPicture['b_pattern']>0) { ?>
|
191 |
+
<div class="wp-maintenance-encadre" style="background: url('<?php echo esc_url(plugins_url( '../images/pattern'.$paramsPicture['b_pattern'].'.png', __FILE__ )); ?>');<?php if( isset($paramsColors['color_bg']) && $paramsColors['color_bg']!='' ) { echo 'background-color:'.esc_html($paramsColors['color_bg']).';'; } ?>height:160px;">
|
192 |
<?php _e('You use this pattern', 'wp-maintenance'); ?>
|
193 |
</div>
|
194 |
<?php } ?>
|
208 |
</div><!-- END WRAP -->
|
209 |
<script>
|
210 |
jQuery(document).ready(function() {
|
211 |
+
jQuery( "#opacity_slider" ).slider( {
|
212 |
disabled: false,
|
213 |
min: 0,
|
214 |
max: 1,
|
215 |
orientation: "horizontal",
|
216 |
range: false,
|
217 |
step: 0.1,
|
218 |
+
value: <?php if( isset($paramsPicture['b_opacity_image']) ) { echo esc_html($paramsPicture['b_opacity_image']); } else { echo '0.2'; } ?>,
|
219 |
animate:"slow",
|
220 |
slide: function( event, ui ) {
|
221 |
jQuery( "#fontSize" ).val( ui.value );
|
views/wp-maintenance-seo.php
CHANGED
@@ -6,22 +6,25 @@ $messageUpdate = 0;
|
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_footer' && wp_verify_nonce($_POST['security-footer'], 'valid-footer') ) {
|
8 |
|
9 |
-
if( empty($_POST["
|
10 |
|
11 |
-
$
|
12 |
-
$messageUpdate = 1;
|
13 |
}
|
14 |
|
15 |
// Récupère les paramètres sauvegardés
|
16 |
-
if(get_option('
|
17 |
-
$
|
18 |
|
19 |
?>
|
20 |
<style>.CodeMirror {border: 1px solid #eee;height: auto;}</style>
|
21 |
<div class="wrap">
|
22 |
|
23 |
<!-- HEADER -->
|
24 |
-
|
|
|
|
|
|
|
25 |
<!-- END HEADER -->
|
26 |
|
27 |
<div class="wp-maintenance-wrapper">
|
@@ -43,7 +46,7 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
43 |
|
44 |
<p>
|
45 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, active SEO', 'wp-maintenance'); ?></span>
|
46 |
-
<input type="checkbox" name="
|
47 |
<span class="wp-maintenance-checkmark"></span>
|
48 |
</label>
|
49 |
</p>
|
@@ -54,13 +57,13 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
54 |
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('SEO Title & Description', 'wp-maintenance'); ?></h3></div>
|
55 |
|
56 |
<div class="wp-maintenance-setting-row">
|
57 |
-
<label for="
|
58 |
-
<input type="text" name="
|
59 |
</div>
|
60 |
|
61 |
<div class="wp-maintenance-setting-row">
|
62 |
-
<label for="
|
63 |
-
<input type="text" size="80%" name="
|
64 |
</div>
|
65 |
|
66 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
@@ -72,13 +75,13 @@ $paramMMode = get_option('wp_maintenance_settings');
|
|
72 |
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Add a favicon', 'wp-maintenance'); ?></h3></div>
|
73 |
|
74 |
<div class="wp-maintenance-setting-row">
|
75 |
-
<label for="
|
76 |
-
<input id="upload_favicon" size="65%" name="
|
77 |
<small><?php _e('Favicons are displayed in a browser tab. Need Help <a href="https://realfavicongenerator.net/" target="_blank">creating a favicon</a>?', 'wp-maintenance'); ?></small>
|
78 |
-
<?php if( isset($
|
79 |
<div class="wp-maintenance-encadre">
|
80 |
<?php _e('You use this favicon:', 'wp-maintenance'); ?><br />
|
81 |
-
<img src="<?php echo esc_url($
|
82 |
</div>
|
83 |
<?php } ?>
|
84 |
</div>
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_footer' && wp_verify_nonce($_POST['security-footer'], 'valid-footer') ) {
|
8 |
|
9 |
+
if( empty($_POST["wpmseo"]["enable_seo"]) ) { $_POST["wpmseo"]["enable_seo"] = 0; }
|
10 |
|
11 |
+
$updateSetting = wpm_update_settings( $_POST["wpmseo"], 'wp_maintenance_settings_seo');
|
12 |
+
if( $updateSetting == true ) { $messageUpdate = 1; }
|
13 |
}
|
14 |
|
15 |
// Récupère les paramètres sauvegardés
|
16 |
+
if(get_option('wp_maintenance_settings_seo')) { extract(get_option('wp_maintenance_settings_seo')); }
|
17 |
+
$paramSeo= get_option('wp_maintenance_settings_seo');
|
18 |
|
19 |
?>
|
20 |
<style>.CodeMirror {border: 1px solid #eee;height: auto;}</style>
|
21 |
<div class="wrap">
|
22 |
|
23 |
<!-- HEADER -->
|
24 |
+
<h2 class="headerpage"><?php _e('WP Maintenance - Settings', 'wp-maintenance'); ?> <sup>v.<?php _e(WPM_VERSION); ?></sup></h2>
|
25 |
+
<?php if( isset($messageUpdate) && $messageUpdate == 1 ) { ?>
|
26 |
+
<div id="message" class="updated fade"><p><strong><?php _e('Options saved.', 'wp-maintenance'); ?></strong></p></div>
|
27 |
+
<?php } ?>
|
28 |
<!-- END HEADER -->
|
29 |
|
30 |
<div class="wp-maintenance-wrapper">
|
46 |
|
47 |
<p>
|
48 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, active SEO', 'wp-maintenance'); ?></span>
|
49 |
+
<input type="checkbox" name="wpmseo[enable_seo]" value="1" <?php if( isset($paramSeo['enable_seo']) && $paramSeo['enable_seo']==1) { echo ' checked'; } ?>>
|
50 |
<span class="wp-maintenance-checkmark"></span>
|
51 |
</label>
|
52 |
</p>
|
57 |
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('SEO Title & Description', 'wp-maintenance'); ?></h3></div>
|
58 |
|
59 |
<div class="wp-maintenance-setting-row">
|
60 |
+
<label for="wpmseo[seo_title]" class="wp-maintenance-setting-row-title"><?php _e('SEO Meta Title', 'wp-maintenance'); ?></label>
|
61 |
+
<input type="text" name="wpmseo[seo_title]" size="80%" value="<?php if( isset($paramSeo['seo_title']) && $paramSeo['seo_title']!='' ) { echo esc_html(stripslashes(trim($paramSeo['seo_title']))); } ?>">
|
62 |
</div>
|
63 |
|
64 |
<div class="wp-maintenance-setting-row">
|
65 |
+
<label for="wpmseo[seo_description]" class="wp-maintenance-setting-row-title"><?php _e('SEO Meta Description', 'wp-maintenance'); ?></label>
|
66 |
+
<input type="text" size="80%" name="wpmseo[seo_description]" value="<?php if( isset($paramSeo['seo_description']) && $paramSeo['seo_description']!='' ) { echo esc_html(stripslashes(trim($paramSeo['seo_description']))); } ?>">
|
67 |
</div>
|
68 |
|
69 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
75 |
<div class="wp-maintenance-settings-section-header"><h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Add a favicon', 'wp-maintenance'); ?></h3></div>
|
76 |
|
77 |
<div class="wp-maintenance-setting-row">
|
78 |
+
<label for="wpmseo[seo_description]" class="wp-maintenance-setting-row-title"><?php _e('Enter a URL or upload an image', 'wp-maintenance'); ?></label>
|
79 |
+
<input id="upload_favicon" size="65%" name="wpmseo[favicon]" value="<?php if( isset($paramSeo['favicon']) && $paramSeo['favicon']!='' ) { echo esc_url($paramSeo['favicon']); } ?>" type="text" /> <a href="#" id="upload_favicon_button" class="button button-primary" style="padding-top: 0.1em;padding-bottom: 0.1em;margin-top: 1px;" OnClick="this.blur();"><span> <?php _e('Media Image Library', 'wp-maintenance'); ?> </span></a><br />
|
80 |
<small><?php _e('Favicons are displayed in a browser tab. Need Help <a href="https://realfavicongenerator.net/" target="_blank">creating a favicon</a>?', 'wp-maintenance'); ?></small>
|
81 |
+
<?php if( isset($paramSeo['favicon']) && $paramSeo['favicon']!='' ) { ?>
|
82 |
<div class="wp-maintenance-encadre">
|
83 |
<?php _e('You use this favicon:', 'wp-maintenance'); ?><br />
|
84 |
+
<img src="<?php echo esc_url($paramSeo['favicon']); ?>" width="100" /><br />
|
85 |
</div>
|
86 |
<?php } ?>
|
87 |
</div>
|
views/wp-maintenance-settings.php
CHANGED
@@ -6,20 +6,21 @@ $messageUpdate = 0;
|
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_settings' && wp_verify_nonce($_POST['security-settings'], 'valid-settings') ) {
|
8 |
|
9 |
-
if( empty($_POST["
|
10 |
-
if( empty($_POST["
|
11 |
-
if( empty($_POST["
|
12 |
|
13 |
-
update_option('wp_maintenance_limit', $_POST["wp_maintenance_limit"]);
|
14 |
-
update_option('wp_maintenance_ipaddresses', $_POST["wp_maintenance_ipaddresses"]);
|
15 |
|
16 |
-
$
|
17 |
-
$messageUpdate = 1;
|
|
|
18 |
}
|
19 |
|
20 |
// Récupère les paramètres sauvegardés
|
21 |
-
if(get_option('
|
22 |
-
$
|
23 |
|
24 |
// Récupère les Rôles et capabilités
|
25 |
if(get_option('wp_maintenance_limit')) { extract(get_option('wp_maintenance_limit')); }
|
@@ -55,7 +56,10 @@ jQuery(document).ready(function() {
|
|
55 |
<div class="wrap">
|
56 |
|
57 |
<!-- HEADER -->
|
58 |
-
|
|
|
|
|
|
|
59 |
<!-- END HEADER -->
|
60 |
|
61 |
<div class="wp-maintenance-wrapper">
|
@@ -73,7 +77,7 @@ jQuery(document).ready(function() {
|
|
73 |
<h3><?php _e('Theme maintenance page', 'wp-maintenance'); ?></h3>
|
74 |
<p>
|
75 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, I use a theme maintenance page', 'wp-maintenance'); ?></span>
|
76 |
-
<input type="checkbox" name="
|
77 |
<span class="wp-maintenance-checkmark"></span>
|
78 |
</label>
|
79 |
|
@@ -86,7 +90,7 @@ jQuery(document).ready(function() {
|
|
86 |
<h3><?php _e('Delete custom settings upon plugin deactivation?', 'wp-maintenance'); ?></h3>
|
87 |
<p>
|
88 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, all custom settings will be deleted from database upon plugin deactivation', 'wp-maintenance'); ?></span>
|
89 |
-
<input type="checkbox" name="
|
90 |
<span class="wp-maintenance-checkmark"></span>
|
91 |
</label>
|
92 |
</p>
|
@@ -95,7 +99,7 @@ jQuery(document).ready(function() {
|
|
95 |
<h3><?php _e('Display code HTTP Error 503?', 'wp-maintenance'); ?></h3>
|
96 |
<p>
|
97 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, inform visitors and search engines that my site is temporarily unavailable.', 'wp-maintenance'); ?></span>
|
98 |
-
<input type="checkbox" name="
|
99 |
<span class="wp-maintenance-checkmark"></span>
|
100 |
</label>
|
101 |
</p>
|
@@ -119,8 +123,8 @@ jQuery(document).ready(function() {
|
|
119 |
if( $role !='administrator') {
|
120 |
|
121 |
?>
|
122 |
-
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php echo $name; ?></span>
|
123 |
-
<input type="checkbox" class="switch-field" name="wp_maintenance_limit[<?php echo $role; ?>]" value="<?php echo $role; ?>"<?php echo $limitCheck; ?> />
|
124 |
<span class="wp-maintenance-checkmark"></span>
|
125 |
</label><br />
|
126 |
|
@@ -150,8 +154,8 @@ jQuery(document).ready(function() {
|
|
150 |
<h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('ID pages autorized', 'wp-maintenance'); ?></h3>
|
151 |
</div>
|
152 |
<div class="wp-maintenance-setting-row">
|
153 |
-
<label for="
|
154 |
-
<input name="
|
155 |
</div>
|
156 |
|
157 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
@@ -164,38 +168,15 @@ jQuery(document).ready(function() {
|
|
164 |
<h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Header Code', 'wp-maintenance'); ?></h3>
|
165 |
</div>
|
166 |
<div class="wp-maintenance-setting-row">
|
167 |
-
<label for="
|
168 |
-
<textarea id="headercode" name="
|
169 |
</div>
|
170 |
|
171 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
172 |
</form>
|
173 |
</div>
|
174 |
|
175 |
-
|
176 |
-
<div class="wp-maintenance-settings-section-header">
|
177 |
-
<h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Export / Import Settings', 'wp-maintenance'); ?></h3>
|
178 |
-
</div>
|
179 |
-
<div class="wp-maintenance-setting-row">
|
180 |
-
<label for="wp_maintenance_settings[id_pages]" class="wp-maintenance-setting-row-title"><?php _e('Export Settings', 'wp-maintenance'); ?></label>
|
181 |
-
<form method="post">
|
182 |
-
<input type="hidden" name="wpm_action" value="export_settings" />
|
183 |
-
<?php wp_nonce_field( 'wpm_export_nonce', 'wpm_export_nonce' ); ?>
|
184 |
-
<?php submit_button( __( 'Export', 'wp-maintenance' ), 'wp-maintenance-button wp-maintenance-button-secondary', 'submit', false ); ?>
|
185 |
-
</form>
|
186 |
-
</div>
|
187 |
-
|
188 |
-
<div class="wp-maintenance-setting-row">
|
189 |
-
<label for="wp_maintenance_settings[id_pages]" class="wp-maintenance-setting-row-title"><?php _e('Import the plugin settings from a .json file. This file can be obtained by exporting the settings on another site using the form above', 'wp-maintenance'); ?></label>
|
190 |
-
<form method="post" enctype="multipart/form-data">
|
191 |
-
<input type="hidden" name="wpm_action" value="import_settings" />
|
192 |
-
<input type="file" name="wpm_import_file"/>
|
193 |
-
<?php wp_nonce_field( 'wpm_import_nonce', 'wpm_import_nonce' ); ?><p>
|
194 |
-
<?php submit_button( __( 'Import', 'wp-maintenance' ), 'wp-maintenance-button wp-maintenance-button-secondary', 'submit', false ); ?></p>
|
195 |
-
</form>
|
196 |
-
</div>
|
197 |
-
</div>
|
198 |
-
</div>
|
199 |
</div>
|
200 |
|
201 |
<?php echo wpm_footer(); ?>
|
6 |
/* Update des paramètres */
|
7 |
if( isset($_POST['action']) && $_POST['action'] == 'update_settings' && wp_verify_nonce($_POST['security-settings'], 'valid-settings') ) {
|
8 |
|
9 |
+
if( empty($_POST["wpoptions"]["pageperso"]) ) { $_POST["wpoptions"]["pageperso"] = 0; }
|
10 |
+
if( empty($_POST["wpoptions"]["dashboard_delete_db"]) ) { $_POST["wpoptions"]["dashboard_delete_db"] = 0; }
|
11 |
+
if( empty($_POST["wpoptions"]["error_503"]) ) { $_POST["wpoptions"]["error_503"] = 0; }
|
12 |
|
13 |
+
update_option('wp_maintenance_limit', sanitize_text_field($_POST["wp_maintenance_limit"]));
|
14 |
+
update_option('wp_maintenance_ipaddresses', sanitize_textarea_field($_POST["wp_maintenance_ipaddresses"]));
|
15 |
|
16 |
+
$updateSetting = wpm_update_settings( $_POST["wpoptions"], 'wp_maintenance_settings_options' );
|
17 |
+
if( $updateSetting == true ) { $messageUpdate = 1; }
|
18 |
+
|
19 |
}
|
20 |
|
21 |
// Récupère les paramètres sauvegardés
|
22 |
+
if(get_option('wp_maintenance_settings_options')) { extract(get_option('wp_maintenance_settings_options')); }
|
23 |
+
$wpoptions = get_option('wp_maintenance_settings_options');
|
24 |
|
25 |
// Récupère les Rôles et capabilités
|
26 |
if(get_option('wp_maintenance_limit')) { extract(get_option('wp_maintenance_limit')); }
|
56 |
<div class="wrap">
|
57 |
|
58 |
<!-- HEADER -->
|
59 |
+
<h2 class="headerpage"><?php _e('WP Maintenance - Settings', 'wp-maintenance'); ?> <sup>v.<?php _e(WPM_VERSION); ?></sup></h2>
|
60 |
+
<?php if( isset($messageUpdate) && $messageUpdate == 1 ) { ?>
|
61 |
+
<div id="message" class="updated fade"><p><strong><?php _e('Options saved.', 'wp-maintenance'); ?></strong></p></div>
|
62 |
+
<?php } ?>
|
63 |
<!-- END HEADER -->
|
64 |
|
65 |
<div class="wp-maintenance-wrapper">
|
77 |
<h3><?php _e('Theme maintenance page', 'wp-maintenance'); ?></h3>
|
78 |
<p>
|
79 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, I use a theme maintenance page', 'wp-maintenance'); ?></span>
|
80 |
+
<input type="checkbox" name="wpoptions[pageperso]" value="1" <?php if( isset($wpoptions['pageperso']) && $wpoptions['pageperso']==1) { echo ' checked'; } ?>>
|
81 |
<span class="wp-maintenance-checkmark"></span>
|
82 |
</label>
|
83 |
|
90 |
<h3><?php _e('Delete custom settings upon plugin deactivation?', 'wp-maintenance'); ?></h3>
|
91 |
<p>
|
92 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, all custom settings will be deleted from database upon plugin deactivation', 'wp-maintenance'); ?></span>
|
93 |
+
<input type="checkbox" name="wpoptions[dashboard_delete_db]" value="1" <?php if( isset($wpoptions['dashboard_delete_db']) && $wpoptions['dashboard_delete_db']==1) { echo ' checked'; } ?>>
|
94 |
<span class="wp-maintenance-checkmark"></span>
|
95 |
</label>
|
96 |
</p>
|
99 |
<h3><?php _e('Display code HTTP Error 503?', 'wp-maintenance'); ?></h3>
|
100 |
<p>
|
101 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, inform visitors and search engines that my site is temporarily unavailable.', 'wp-maintenance'); ?></span>
|
102 |
+
<input type="checkbox" name="wpoptions[error_503]" value="1" <?php if( isset($wpoptions['error_503']) && $wpoptions['error_503']==1) { echo ' checked'; } ?>>
|
103 |
<span class="wp-maintenance-checkmark"></span>
|
104 |
</label>
|
105 |
</p>
|
123 |
if( $role !='administrator') {
|
124 |
|
125 |
?>
|
126 |
+
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php echo esc_html($name); ?></span>
|
127 |
+
<input type="checkbox" class="switch-field" name="wp_maintenance_limit[<?php echo esc_html($role); ?>]" value="<?php echo esc_html($role); ?>"<?php echo esc_html($limitCheck); ?> />
|
128 |
<span class="wp-maintenance-checkmark"></span>
|
129 |
</label><br />
|
130 |
|
154 |
<h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('ID pages autorized', 'wp-maintenance'); ?></h3>
|
155 |
</div>
|
156 |
<div class="wp-maintenance-setting-row">
|
157 |
+
<label for="wpoptions[id_pages]" class="wp-maintenance-setting-row-title"><?php _e('Allow the site to display these ID pages. Please, enter the ID pages separate with comma', 'wp-maintenance'); ?></label>
|
158 |
+
<input name="wpoptions[id_pages]" size="80%" class="wp-maintenance-input" value="<?php if( isset($wpoptions['id_pages']) && $wpoptions['id_pages']!='' ) { echo esc_html($wpoptions['id_pages']); } ?>" />
|
159 |
</div>
|
160 |
|
161 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
168 |
<h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Header Code', 'wp-maintenance'); ?></h3>
|
169 |
</div>
|
170 |
<div class="wp-maintenance-setting-row">
|
171 |
+
<label for="wpoptions[headercode]" class="wp-maintenance-setting-row-title"><?php _e('The following code will add to the <head> tag. Useful if you need to add additional scripts such as CSS or JS', 'wp-maintenance'); ?></label>
|
172 |
+
<textarea id="headercode" name="wpoptions[headercode]" class="wp-maintenance-input" COLS=50 ROWS=2><?php if( isset($wpoptions['headercode']) && $wpoptions['headercode']!='' ) { echo esc_textarea(stripslashes($wpoptions['headercode'])); } ?></textarea>
|
173 |
</div>
|
174 |
|
175 |
<p class="submit"><button type="submit" name="footer_submit" id="footer_submit" class="wp-maintenance-button wp-maintenance-button-primary"><?php _e('Save', 'wp-maintenance'); ?></button></p>
|
176 |
</form>
|
177 |
</div>
|
178 |
|
179 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
</div>
|
181 |
|
182 |
<?php echo wpm_footer(); ?>
|
views/wp-maintenance-socialnetworks.php
CHANGED
@@ -7,34 +7,22 @@ $messageUpdate = 0;
|
|
7 |
/* Update des paramètres */
|
8 |
if( isset($_POST['action']) && $_POST['action'] == 'update_footer' && wp_verify_nonce($_POST['security-socialn'], 'valid-socialn') ) {
|
9 |
|
10 |
-
if( isset($_POST["
|
11 |
-
unset($_POST["
|
12 |
-
$_POST["
|
13 |
-
}
|
14 |
-
if( empty($_POST["wp_maintenance_social_options"]["enable"]) ) { $_POST["wp_maintenance_social_options"]["enable"] = 0; }
|
15 |
-
|
16 |
-
//var_dump($_POST["wp_maintenance_social"]);
|
17 |
-
$listSocial = $_POST["wp_maintenance_social"];
|
18 |
-
$listInsertSocial = array();
|
19 |
-
foreach($listSocial as $title => $value ) {
|
20 |
-
$find_social_url = strpos($value, $title);
|
21 |
-
if ($find_social_url === false) {
|
22 |
-
|
23 |
-
} else {
|
24 |
-
$listInsertSocial[$title] = strip_tags( stripslashes( esc_url_raw($value) ) );
|
25 |
-
}
|
26 |
}
|
|
|
27 |
|
28 |
-
|
29 |
-
|
|
|
30 |
|
31 |
-
$messageUpdate = 1;
|
32 |
}
|
33 |
|
34 |
// Récupère les Reseaux Sociaux
|
35 |
-
$paramSocial = get_option('
|
36 |
-
if(get_option('
|
37 |
-
$paramSocialOption = get_option('
|
38 |
|
39 |
?>
|
40 |
<style>
|
@@ -47,7 +35,10 @@ $paramSocialOption = get_option('wp_maintenance_social_options');
|
|
47 |
<div class="wrap">
|
48 |
|
49 |
<!-- HEADER -->
|
50 |
-
|
|
|
|
|
|
|
51 |
<!-- END HEADER -->
|
52 |
|
53 |
<div class="wp-maintenance-wrapper">
|
@@ -69,7 +60,7 @@ $paramSocialOption = get_option('wp_maintenance_social_options');
|
|
69 |
|
70 |
<p>
|
71 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable social networks options', 'wp-maintenance'); ?></span>
|
72 |
-
<input type="checkbox" name="
|
73 |
<span class="wp-maintenance-checkmark"></span>
|
74 |
</label>
|
75 |
</p>
|
@@ -83,31 +74,40 @@ $paramSocialOption = get_option('wp_maintenance_social_options');
|
|
83 |
</div>
|
84 |
|
85 |
<div class="wp-maintenance-setting-row">
|
86 |
-
<label for="
|
87 |
-
<input type="text" name="
|
88 |
</div>
|
89 |
|
90 |
<div class="wp-maintenance-setting-row">
|
91 |
<label class="wp-maintenance-setting-row-title"><?php _e('Drad and drop the lines to put in the order you want', 'wp-maintenance'); ?></label>
|
92 |
<ul class="sortable">
|
93 |
<?php
|
94 |
-
|
95 |
if( isset($paramSocialOption['style']) ) {
|
96 |
$styleIcons = $paramSocialOption['style'];
|
97 |
} else {
|
98 |
$styleIcons = 'style1';
|
99 |
}
|
100 |
-
|
101 |
-
foreach
|
102 |
-
|
103 |
$linkIcon = WPM_ICONS_URL.'not-found.png';
|
104 |
-
if( file_exists(WPM_DIR.'socialicons/'.$styleIcons.'/32/'.$
|
105 |
-
$linkIcon = WPM_ICONS_URL.''.$styleIcons.'/32/'.$
|
106 |
}
|
107 |
|
108 |
$entryValue = '';
|
109 |
-
if( isset($paramSocial[$
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
}
|
112 |
|
113 |
?>
|
@@ -121,45 +121,45 @@ $paramSocialOption = get_option('wp_maintenance_social_options');
|
|
121 |
<h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Social Networks Style', 'wp-maintenance'); ?></h3>
|
122 |
</div>
|
123 |
<div class="wp-maintenance-setting-row">
|
124 |
-
<label for="
|
125 |
-
<select name="
|
126 |
<?php
|
127 |
$wpm_tabIcon = array(32, 64, 128, 256, 512);
|
128 |
foreach($wpm_tabIcon as $wpm_icon) {
|
129 |
if($paramSocialOption['size']==$wpm_icon) { $selected = ' selected'; } else { $selected = ''; }
|
130 |
-
echo '<option value="'.
|
131 |
}
|
132 |
?>
|
133 |
</select>
|
134 |
</div>
|
135 |
|
136 |
<div class="wp-maintenance-setting-row">
|
137 |
-
<label for="
|
138 |
<ul id="pattern">
|
139 |
<?php
|
140 |
//if( empty($paramSocialOption['style']) ) { $paramSocialOption['style'] == 'style1'; }
|
141 |
for ($ico = 1; $ico <= 6; $ico++) {
|
142 |
-
if( isset($paramSocialOption['style']) && $paramSocialOption['style'] == 'style'
|
143 |
?>
|
144 |
<li>
|
145 |
-
<div style="width:64px;height:64px;border:2px solid #ECF0F1;background:url('<?php echo WPM_ICONS_URL.'style'
|
146 |
-
<label for="style<?php echo $ico; ?>" class="wpm-container" style="padding-left: 24px!important;margin-right: 0!important;"><input type="radio" value="style<?php echo $ico; ?>" <?php echo $selected; ?> name="
|
147 |
</li>
|
148 |
<?php } ?>
|
149 |
</ul>
|
150 |
</div>
|
151 |
|
152 |
<div class="wp-maintenance-setting-row">
|
153 |
-
<label for="
|
154 |
-
<select name="
|
155 |
<option value="top"<?php if( isset($paramSocialOption['position']) && $paramSocialOption['position']=='top') { echo ' selected'; } ?>><?php _e('Top', 'wp-maintenance'); ?></option>
|
156 |
<option value="bottom"<?php if( empty($paramSocialOption['position']) or (isset($paramSocialOption['position']) && $paramSocialOption['position']=='bottom') ) { echo ' selected'; } ?>><?php _e('Bottom', 'wp-maintenance'); ?></option>
|
157 |
</select>
|
158 |
</div>
|
159 |
|
160 |
<div class="wp-maintenance-setting-row">
|
161 |
-
<label for="
|
162 |
-
<select name="
|
163 |
<option value="left"<?php if(isset($paramSocialOption['align']) && $paramSocialOption['align']=='left') { echo ' selected'; } ?>><?php _e('Left', 'wp-maintenance'); ?></option>
|
164 |
<option value="center"<?php if( empty($paramSocialOption['align']) or ( isset($paramSocialOption['align']) && $paramSocialOption['align']=='center') ) { echo ' selected'; } ?>><?php _e('Center', 'wp-maintenance'); ?></option>
|
165 |
<option value="right"<?php if( isset($paramSocialOption['align']) && $paramSocialOption['align']=='right') { echo ' selected'; } ?>><?php _e('Right', 'wp-maintenance'); ?></option>
|
@@ -167,11 +167,11 @@ $paramSocialOption = get_option('wp_maintenance_social_options');
|
|
167 |
</div>
|
168 |
|
169 |
<div class="wp-maintenance-setting-row">
|
170 |
-
<label for="
|
171 |
-
<strong><?php echo get_stylesheet_directory_uri(); ?>/</strong><input type="text" value="<?php if( isset($paramSocialOption['theme']) && $paramSocialOption['theme']!='' ) { echo esc_html($paramSocialOption['theme']); } ?>" name="
|
172 |
<p><i><?php _e("In your icon's folder child theme, you must have the same names like mine, let's mouse over list icons for display picture's name. For example: ", 'wp-maintenance'); ?>'facebook.png'.</i></p><br />
|
173 |
<?php if( isset($paramSocialOption['theme']) && $paramSocialOption['theme']!='' ) { ?>
|
174 |
-
<label
|
175 |
<img src=" <?php echo esc_url(get_stylesheet_directory_uri().'/'.$paramSocialOption['theme'].'/facebook.png'); ?>" width="64"/>
|
176 |
<?php } ?>
|
177 |
</div>
|
@@ -185,7 +185,7 @@ $paramSocialOption = get_option('wp_maintenance_social_options');
|
|
185 |
</div>
|
186 |
<p>
|
187 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, reset Social Networks Icons?', 'wp-maintenance'); ?></span>
|
188 |
-
<input type="checkbox" name="
|
189 |
<span class="wp-maintenance-checkmark"></span>
|
190 |
</label>
|
191 |
</p>
|
@@ -199,5 +199,4 @@ $paramSocialOption = get_option('wp_maintenance_social_options');
|
|
199 |
|
200 |
<?php echo wpm_footer(); ?>
|
201 |
</div>
|
202 |
-
<script src="<?php echo WPM_PLUGIN_URL; ?>js/jquery.sortable.js"></script>
|
203 |
<script> jQuery('.sortable').sortable(); </script>
|
7 |
/* Update des paramètres */
|
8 |
if( isset($_POST['action']) && $_POST['action'] == 'update_footer' && wp_verify_nonce($_POST['security-socialn'], 'valid-socialn') ) {
|
9 |
|
10 |
+
if( isset($_POST["wpso"]['reset']) && $_POST["wpso"]['reset'] ==1 ) {
|
11 |
+
unset($_POST["wp_maintenance_list_socialnetworks"]);
|
12 |
+
$_POST["wp_maintenance_list_socialnetworks"] = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
+
if( empty($_POST["wpso"]["enable"]) ) { $_POST["wpso"]["enable"] = 0; }
|
15 |
|
16 |
+
$updateSetting = wpm_update_settings( $_POST["wp_maintenance_list_socialnetworks"], 'wp_maintenance_list_socialnetworks', 3 );
|
17 |
+
$updateSetting = wpm_update_settings( $_POST["wpso"], 'wp_maintenance_settings_socialnetworks' );
|
18 |
+
if( $updateSetting == true ) { $messageUpdate = 1; }
|
19 |
|
|
|
20 |
}
|
21 |
|
22 |
// Récupère les Reseaux Sociaux
|
23 |
+
$paramSocial = get_option('wp_maintenance_list_socialnetworks');
|
24 |
+
if(get_option('wp_maintenance_settings_socialnetworks')) { extract(get_option('wp_maintenance_settings_socialnetworks')); }
|
25 |
+
$paramSocialOption = get_option('wp_maintenance_settings_socialnetworks');
|
26 |
|
27 |
?>
|
28 |
<style>
|
35 |
<div class="wrap">
|
36 |
|
37 |
<!-- HEADER -->
|
38 |
+
<h2 class="headerpage"><?php _e('WP Maintenance - Settings', 'wp-maintenance'); ?> <sup>v.<?php _e(WPM_VERSION); ?></sup></h2>
|
39 |
+
<?php if( isset($messageUpdate) && $messageUpdate == 1 ) { ?>
|
40 |
+
<div id="message" class="updated fade"><p><strong><?php _e('Options saved.', 'wp-maintenance'); ?></strong></p></div>
|
41 |
+
<?php } ?>
|
42 |
<!-- END HEADER -->
|
43 |
|
44 |
<div class="wp-maintenance-wrapper">
|
60 |
|
61 |
<p>
|
62 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, enable social networks options', 'wp-maintenance'); ?></span>
|
63 |
+
<input type="checkbox" name="wpso[enable]" value="1" <?php if( isset($paramSocialOption['enable']) && $paramSocialOption['enable']==1) { echo ' checked'; } ?>>
|
64 |
<span class="wp-maintenance-checkmark"></span>
|
65 |
</label>
|
66 |
</p>
|
74 |
</div>
|
75 |
|
76 |
<div class="wp-maintenance-setting-row">
|
77 |
+
<label for="wpso[texte]" class="wp-maintenance-setting-row-title"><?php _e('Enter text for the title icons', 'wp-maintenance'); ?></label>
|
78 |
+
<input type="text" name="wpso[texte]" value="<?php if( empty($paramSocialOption['texte']) ) { _e('Follow me on', 'wp-maintenance'); } else { echo esc_html(stripslashes($paramSocialOption['texte'])); } ?>" />
|
79 |
</div>
|
80 |
|
81 |
<div class="wp-maintenance-setting-row">
|
82 |
<label class="wp-maintenance-setting-row-title"><?php _e('Drad and drop the lines to put in the order you want', 'wp-maintenance'); ?></label>
|
83 |
<ul class="sortable">
|
84 |
<?php
|
85 |
+
|
86 |
if( isset($paramSocialOption['style']) ) {
|
87 |
$styleIcons = $paramSocialOption['style'];
|
88 |
} else {
|
89 |
$styleIcons = 'style1';
|
90 |
}
|
91 |
+
|
92 |
+
foreach($paramSocial as $nameSocial => $valueSocial) {
|
93 |
+
|
94 |
$linkIcon = WPM_ICONS_URL.'not-found.png';
|
95 |
+
if( file_exists(WPM_DIR.'socialicons/'.$styleIcons.'/32/'.$nameSocial.'.png') ) {
|
96 |
+
$linkIcon = WPM_ICONS_URL.''.$styleIcons.'/32/'.$nameSocial.'.png';
|
97 |
}
|
98 |
|
99 |
$entryValue = '';
|
100 |
+
if( isset($paramSocial[$nameSocial]) ) {
|
101 |
+
if( $nameSocial == 'email' && ( isset($paramSocial['email']) && $paramSocial['email'] != '') ) {
|
102 |
+
$entryValue = esc_html($paramSocial[$nameSocial]);
|
103 |
+
} else {
|
104 |
+
$entryValue = esc_url($paramSocial[$nameSocial]);
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
//echo ''.$nameSocial.' => '.$valueSocial.'<br />';
|
109 |
+
echo '<li><span>::</span><img src="'.esc_url($linkIcon).'" valign="middle" hspace="3" name="'.esc_html($nameSocial).'.png" title="'.esc_html($nameSocial).'.png"/>'.ucfirst($nameSocial).' <input type="text" size="50" name="wp_maintenance_list_socialnetworks['.esc_html($nameSocial).']" value="'.$entryValue.'" onclick="select()" ><br />';
|
110 |
+
|
111 |
}
|
112 |
|
113 |
?>
|
121 |
<h3 class="wp-maintenance-settings-section-title" id="module-import_export"><?php _e('Social Networks Style', 'wp-maintenance'); ?></h3>
|
122 |
</div>
|
123 |
<div class="wp-maintenance-setting-row">
|
124 |
+
<label for="wpso[size]" class="wp-maintenance-setting-row-title"><?php _e('Choose icons size', 'wp-maintenance'); ?></label>
|
125 |
+
<select name="wpso[size]" >
|
126 |
<?php
|
127 |
$wpm_tabIcon = array(32, 64, 128, 256, 512);
|
128 |
foreach($wpm_tabIcon as $wpm_icon) {
|
129 |
if($paramSocialOption['size']==$wpm_icon) { $selected = ' selected'; } else { $selected = ''; }
|
130 |
+
echo '<option value="'.esc_html($wpm_icon).'" '.$selected.'>'.esc_html($wpm_icon).'</option>';
|
131 |
}
|
132 |
?>
|
133 |
</select>
|
134 |
</div>
|
135 |
|
136 |
<div class="wp-maintenance-setting-row">
|
137 |
+
<label for="wpso[style]" class="wp-maintenance-setting-row-title"><?php _e('Choose icons style', 'wp-maintenance'); ?></label>
|
138 |
<ul id="pattern">
|
139 |
<?php
|
140 |
//if( empty($paramSocialOption['style']) ) { $paramSocialOption['style'] == 'style1'; }
|
141 |
for ($ico = 1; $ico <= 6; $ico++) {
|
142 |
+
if( isset($paramSocialOption['style']) && $paramSocialOption['style'] == 'style'.esc_html($ico) ) { $selected = ' checked'; } else { $selected = ''; }
|
143 |
?>
|
144 |
<li>
|
145 |
+
<div style="width:64px;height:64px;border:2px solid #ECF0F1;background:url('<?php echo WPM_ICONS_URL.'style'.esc_html($ico).'/64/facebook.png'; ?>');margin-bottom:5px;"></div>
|
146 |
+
<label for="style<?php echo esc_html($ico); ?>" class="wpm-container" style="padding-left: 24px!important;margin-right: 0!important;"><input type="radio" value="style<?php echo esc_html($ico); ?>" <?php echo esc_html($selected); ?> name="wpso[style]" id="style<?php echo esc_html($ico); ?>" /><span class="wpm-checkmark"></span></label>
|
147 |
</li>
|
148 |
<?php } ?>
|
149 |
</ul>
|
150 |
</div>
|
151 |
|
152 |
<div class="wp-maintenance-setting-row">
|
153 |
+
<label for="wpso[position]" class="wp-maintenance-setting-row-title"><?php _e('Position', 'wp-maintenance'); ?></label>
|
154 |
+
<select name="wpso[position]" >
|
155 |
<option value="top"<?php if( isset($paramSocialOption['position']) && $paramSocialOption['position']=='top') { echo ' selected'; } ?>><?php _e('Top', 'wp-maintenance'); ?></option>
|
156 |
<option value="bottom"<?php if( empty($paramSocialOption['position']) or (isset($paramSocialOption['position']) && $paramSocialOption['position']=='bottom') ) { echo ' selected'; } ?>><?php _e('Bottom', 'wp-maintenance'); ?></option>
|
157 |
</select>
|
158 |
</div>
|
159 |
|
160 |
<div class="wp-maintenance-setting-row">
|
161 |
+
<label for="wpso[align]" class="wp-maintenance-setting-row-title"><?php _e('Align', 'wp-maintenance'); ?></label>
|
162 |
+
<select name="wpso[align]" class="wpm-form-field">
|
163 |
<option value="left"<?php if(isset($paramSocialOption['align']) && $paramSocialOption['align']=='left') { echo ' selected'; } ?>><?php _e('Left', 'wp-maintenance'); ?></option>
|
164 |
<option value="center"<?php if( empty($paramSocialOption['align']) or ( isset($paramSocialOption['align']) && $paramSocialOption['align']=='center') ) { echo ' selected'; } ?>><?php _e('Center', 'wp-maintenance'); ?></option>
|
165 |
<option value="right"<?php if( isset($paramSocialOption['align']) && $paramSocialOption['align']=='right') { echo ' selected'; } ?>><?php _e('Right', 'wp-maintenance'); ?></option>
|
167 |
</div>
|
168 |
|
169 |
<div class="wp-maintenance-setting-row">
|
170 |
+
<label for="wpso[theme]" class="wp-maintenance-setting-row-title"><?php _e('You have your own icons? Enter the folder name of your theme here', 'wp-maintenance'); ?></label>
|
171 |
+
<strong><?php echo get_stylesheet_directory_uri(); ?>/</strong><input type="text" value="<?php if( isset($paramSocialOption['theme']) && $paramSocialOption['theme']!='' ) { echo esc_html($paramSocialOption['theme']); } ?>" name="wpso[theme]" /><strong>/facebook.png</strong><br />
|
172 |
<p><i><?php _e("In your icon's folder child theme, you must have the same names like mine, let's mouse over list icons for display picture's name. For example: ", 'wp-maintenance'); ?>'facebook.png'.</i></p><br />
|
173 |
<?php if( isset($paramSocialOption['theme']) && $paramSocialOption['theme']!='' ) { ?>
|
174 |
+
<label class="wp-maintenance-setting-row-title"><?php _e('You use this picture:', 'wp-maintenance'); ?></label><br />
|
175 |
<img src=" <?php echo esc_url(get_stylesheet_directory_uri().'/'.$paramSocialOption['theme'].'/facebook.png'); ?>" width="64"/>
|
176 |
<?php } ?>
|
177 |
</div>
|
185 |
</div>
|
186 |
<p>
|
187 |
<label class="wp-maintenance-container"><span class="wp-maintenance-label-text"><?php _e('Yes, reset Social Networks Icons?', 'wp-maintenance'); ?></span>
|
188 |
+
<input type="checkbox" name="wpso[reset]" value="1">
|
189 |
<span class="wp-maintenance-checkmark"></span>
|
190 |
</label>
|
191 |
</p>
|
199 |
|
200 |
<?php echo wpm_footer(); ?>
|
201 |
</div>
|
|
|
202 |
<script> jQuery('.sortable').sortable(); </script>
|
wp-maintenance.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The WP Maintenance plugin allows you to put your website on the waiting time for you to do maintenance or launch your website. Personalize this page with picture, countdown...
|
6 |
* Author: Florent Maillefaud
|
7 |
* Author URI: https://madeby.restezconnectes.fr
|
8 |
-
* Version: 6.0.
|
9 |
* Text Domain: wp-maintenance
|
10 |
* Domain Path: /languages/
|
11 |
*/
|
@@ -31,13 +31,13 @@ defined( 'ABSPATH' )
|
|
31 |
or die( 'No direct load ! ' );
|
32 |
|
33 |
define( 'WPM_DIR', plugin_dir_path( __FILE__ ) );
|
34 |
-
define( 'WPM_URL',
|
35 |
define( 'WPM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
36 |
define( 'WPM_PLUGIN_URL', plugins_url().'/'.strtolower('wp-maintenance').'/');
|
37 |
define( 'WPM_ICONS_URL', plugins_url().'/'.strtolower('wp-maintenance').'/socialicons/');
|
38 |
define( 'WPM_ADMIN_URL', admin_url().'admin.php?page=wp-maintenance'); //we assume the admin url is absolute with at least one querystring
|
39 |
|
40 |
-
if( !defined( 'WPM_VERSION' )) { define( 'WPM_VERSION', '6.0.
|
41 |
|
42 |
require WPM_DIR . 'classes/wp-maintenance.php';
|
43 |
require WPM_DIR . 'classes/countdown.php';
|
5 |
* Description: The WP Maintenance plugin allows you to put your website on the waiting time for you to do maintenance or launch your website. Personalize this page with picture, countdown...
|
6 |
* Author: Florent Maillefaud
|
7 |
* Author URI: https://madeby.restezconnectes.fr
|
8 |
+
* Version: 6.0.8
|
9 |
* Text Domain: wp-maintenance
|
10 |
* Domain Path: /languages/
|
11 |
*/
|
31 |
or die( 'No direct load ! ' );
|
32 |
|
33 |
define( 'WPM_DIR', plugin_dir_path( __FILE__ ) );
|
34 |
+
define( 'WPM_URL', plugins_url('/', __FILE__) );
|
35 |
define( 'WPM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
36 |
define( 'WPM_PLUGIN_URL', plugins_url().'/'.strtolower('wp-maintenance').'/');
|
37 |
define( 'WPM_ICONS_URL', plugins_url().'/'.strtolower('wp-maintenance').'/socialicons/');
|
38 |
define( 'WPM_ADMIN_URL', admin_url().'admin.php?page=wp-maintenance'); //we assume the admin url is absolute with at least one querystring
|
39 |
|
40 |
+
if( !defined( 'WPM_VERSION' )) { define( 'WPM_VERSION', '6.0.8' ); }
|
41 |
|
42 |
require WPM_DIR . 'classes/wp-maintenance.php';
|
43 |
require WPM_DIR . 'classes/countdown.php';
|