Switch to radio boxes for Post Format picking. Saves a click. Maybe we should do this with Post Status as well. see #14746

git-svn-id: http://svn.automattic.com/wordpress/trunk@16314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-11-12 04:05:33 +00:00
parent 5f4a583fb1
commit 6d78cf73f9
6 changed files with 13 additions and 13 deletions

File diff suppressed because one or more lines are too long

View File

@ -4099,7 +4099,7 @@ table.form-table td .updated {
#poststuff .inside .submitbox p {
margin: 1em 0;
}
#post-visibility-select {
#post-visibility-select, #post-formats-select {
line-height: 1.5em;
margin-top: 3px;
}

View File

@ -170,14 +170,14 @@ if ( is_array( $post_formats[0] ) ) :
<div id="post-formats-select" class="hide-if-js">
<input type="hidden" id="old-post-format" value="<?php echo esc_attr( $post_format ); ?>" />
<select id="post-format" name="post_format">
<option value="0" <?php selected( $post_format, '0' ); ?>><?php _e('Default'); ?></option>
<input type="radio" name="post_format" class="post-format" id="post-format-0" value="0" <?php checked( $post_format, '0' ); ?> /> <label for="post-format-0"><?php _e('Default'); ?></label>
<?php foreach ( $post_formats[0] as $format ) : ?>
<option value="<?php echo esc_attr( $format ); ?>" <?php selected( $post_format, $format ); ?>><?php echo esc_html( get_post_format_string( $format ) ); ?></option>
<?php endforeach; ?>
</select>
<br /><input type="radio" name="post_format" class="post-format" id="post-format-<?php echo esc_attr( $format ); ?>" value="<?php echo esc_attr( $format ); ?>" <?php checked( $post_format, $format ); ?> /> <label for="post-format-<?php echo esc_attr( $format ); ?>"><?php echo esc_html( get_post_format_string( $format ) ); ?></label>
<?php endforeach; ?><br />
<p>
<a href="#post-formats" class="save-post-format hide-if-no-js button"><?php _e('OK'); ?></a>
<a href="#post-formats" class="cancel-post-format hide-if-no-js"><?php _e('Cancel'); ?></a>
</p>
</div>
</div><?php // /misc-pub-section ?>
<?php endif; endif; ?>

View File

@ -489,15 +489,15 @@ jQuery(document).ready( function($) {
$('.cancel-post-format', '#post-formats-select').click(function () {
$('#post-formats-select').slideUp("normal");
$('#post-format').val( $('#old-post-format').val() );
$('#post-format-display').text( $('option:selected', '#post-formats-select').text() );
$('#post-format-' + $('#old-post-format').val()).attr('checked', true);
$('#post-format-display').text( $('label[for="post-format-' + $('#old-post-format').val() + '"]', '#post-formats-select').text() );
$('.edit-post-format').show();
return false;
});
$('.save-post-format', '#post-formats-select').click(function () {
$('#post-formats-select').slideUp("normal");
$('#post-format-display').text( $('option:selected', '#post-formats-select').text() );
$('#post-format-display').text( $('label[for="' + $('input:checked', '#post-formats-select').attr('id') + '"]', '#post-formats-select').text() );
$('.edit-post-format').show();
return false;
});

File diff suppressed because one or more lines are too long

View File

@ -305,7 +305,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), '20091012' );
$scripts->add_data( 'postbox', 'group', 1 );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20101108' );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20101111' );
$scripts->add_data( 'post', 'group', 1 );
$scripts->localize( 'post', 'postL10n', array(
'tagsUsed' => __('Tags used on this post:'),
@ -470,7 +470,7 @@ function wp_default_styles( &$styles ) {
// Any rtl stylesheets that don't have a .dev version for ltr
$no_suffix = array( 'farbtastic' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20101108' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20101111' );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20101102' );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );