Make tags accessible without js on the edit screen

git-svn-id: http://svn.automattic.com/wordpress/trunk@11172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-05-04 12:13:44 +00:00
parent bf88b244cd
commit 6c74505f59
3 changed files with 24 additions and 6 deletions

View File

@ -274,14 +274,16 @@ function post_tags_meta_box($post, $box) {
$helps = isset($taxonomy->helps) ? attr($taxonomy->helps) : __('Separate tags with commas.');
?>
<div class="tagsdiv" id="<?php echo $tax_name; ?>">
<p class="jaxtag">
<label class="hidden" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label>
<input type="hidden" name="<?php echo "tax_input[$tax_name]"; ?>" class="the-tags" id="tax-input[<?php echo $tax_name; ?>]" value="<?php echo attr(get_terms_to_edit( $post->ID, $tax_name )); ?>" />
<div class="jaxtag">
<div class="nojs-tags hide-if-js">
<p><?php _e('Add or remove tags'); ?></p>
<textarea name="<?php echo "tax_input[$tax_name]"; ?>" class="the-tags" id="tax-input[<?php echo $tax_name; ?>]"><?php echo attr(get_terms_to_edit( $post->ID, $tax_name )); ?></textarea></div>
<span class="ajaxtag">
<span class="ajaxtag hide-if-no-js">
<label class="hidden" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label>
<input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" value="<?php _ea('Add new tag'); ?>" />
<input type="button" class="button tagadd" value="<?php _ea('Add'); ?>" tabindex="3" />
</span></p>
</span></div>
<p class="howto"><?php echo $helps; ?></p>
<div class="tagchecklist"></div>
</div>

View File

@ -1003,7 +1003,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
$display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink);
$view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink);
$return = '<strong>' . __('Permalink:') . "</strong>\n" . '<span id="sample-permalink">' . $display_link . "</span>\n";
$return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button" onclick="edit_permalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n";
$return .= '<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug button hide-if-no-js" onclick="edit_permalink(' . $id . '); return false;">' . __('Edit') . "</a></span>\n";
$return .= '<span id="editable-post-name-full">' . $post_name . "</span>\n";
if ( isset($view_post) )
$return .= "<span id='view-post-btn'><a href='$view_link' class='button' target='_blank'>$view_post</a></span>\n";

View File

@ -3129,3 +3129,19 @@ p.popular-tags a {
visibility: hidden;
vertical-align: bottom;
}
.tagsdiv .newtag {
width: 180px;
}
.tagsdiv .the-tags {
display: block;
height: 60px;
margin: 0 auto;
overflow: auto;
width: 260px;
}
#post-body-content .tagsdiv .the-tags {
margin: 0 5px;
}