Changeset 22019 for trunk/wp-admin/options-general.php
- Timestamp:
- 09/26/2012 07:57:44 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-general.php
r21994 r22019 45 45 $("input[name='date_format_custom'], input[name='time_format_custom']").change( function() { 46 46 var format = $(this); 47 format.siblings(' img').css('visibility','visible');47 format.siblings('.spinner').css('display', 'inline-block'); // show(); can't be used here 48 48 $.post(ajaxurl, { 49 49 action: 'date_format_custom' == format.attr('name') ? 'date_format' : 'time_format', 50 50 date : format.val() 51 }, function(d) { format.siblings(' img').css('visibility','hidden'); format.siblings('.example').text(d); } );51 }, function(d) { format.siblings('.spinner').hide(); format.siblings('.example').text(d); } ); 52 52 }); 53 53 }); … … 251 251 echo ' <label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"'; 252 252 checked( $custom ); 253 echo '/> ' . __('Custom:') . ' </label><input type="text" name="date_format_custom" value="' . esc_attr( get_option('date_format') ) . '" class="small-text" /> <span class="example"> ' . date_i18n( get_option('date_format') ) . "</span> < img class='ajax-loading' src='" . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . "' />\n";253 echo '/> ' . __('Custom:') . ' </label><input type="text" name="date_format_custom" value="' . esc_attr( get_option('date_format') ) . '" class="small-text" /> <span class="example"> ' . date_i18n( get_option('date_format') ) . "</span> <span class='spinner'></span>\n"; 254 254 255 255 echo "\t<p>" . __('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date and time formatting</a>.') . "</p>\n"; … … 283 283 echo ' <label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"'; 284 284 checked( $custom ); 285 echo '/> ' . __('Custom:') . ' </label><input type="text" name="time_format_custom" value="' . esc_attr( get_option('time_format') ) . '" class="small-text" /> <span class="example"> ' . date_i18n( get_option('time_format') ) . "</span> < img class='ajax-loading' src='" . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . "' />\n";285 echo '/> ' . __('Custom:') . ' </label><input type="text" name="time_format_custom" value="' . esc_attr( get_option('time_format') ) . '" class="small-text" /> <span class="example"> ' . date_i18n( get_option('time_format') ) . "</span> <span class='spinner'></span>\n"; 286 286 ; 287 287 ?>
Note: See TracChangeset
for help on using the changeset viewer.