mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
Be on the lookout for weirdness. props lessbloat. see #21456. git-svn-id: https://develop.svn.wordpress.org/trunk@22019 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -44,11 +44,11 @@ function options_general_add_js() {
|
||||
});
|
||||
$("input[name='date_format_custom'], input[name='time_format_custom']").change( function() {
|
||||
var format = $(this);
|
||||
format.siblings('img').css('visibility','visible');
|
||||
format.siblings('.spinner').css('display', 'inline-block'); // show(); can't be used here
|
||||
$.post(ajaxurl, {
|
||||
action: 'date_format_custom' == format.attr('name') ? 'date_format' : 'time_format',
|
||||
date : format.val()
|
||||
}, function(d) { format.siblings('img').css('visibility','hidden'); format.siblings('.example').text(d); } );
|
||||
}, function(d) { format.siblings('.spinner').hide(); format.siblings('.example').text(d); } );
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
@@ -250,7 +250,7 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
|
||||
|
||||
echo ' <label><input type="radio" name="date_format" id="date_format_custom_radio" value="\c\u\s\t\o\m"';
|
||||
checked( $custom );
|
||||
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";
|
||||
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";
|
||||
|
||||
echo "\t<p>" . __('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date and time formatting</a>.') . "</p>\n";
|
||||
?>
|
||||
@@ -282,7 +282,7 @@ if ( empty($tzstring) ) { // Create a UTC+- zone if no timezone string exists
|
||||
|
||||
echo ' <label><input type="radio" name="time_format" id="time_format_custom_radio" value="\c\u\s\t\o\m"';
|
||||
checked( $custom );
|
||||
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";
|
||||
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";
|
||||
;
|
||||
?>
|
||||
</fieldset>
|
||||
|
||||
Reference in New Issue
Block a user