Fix tag input tip in IE

git-svn-id: https://develop.svn.wordpress.org/trunk@12114 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-10-27 08:43:17 +00:00
parent 69b036bf7f
commit 5c564f80b5
6 changed files with 19 additions and 16 deletions

View File

@ -241,9 +241,9 @@ function post_tags_meta_box($post, $box) {
<div class="ajaxtag hide-if-no-js">
<label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label>
<div class="taghint"><?php _e('Add new tag'); ?></div>
<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="" />
<input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" tabindex="3" />
<div class="taghint"><?php _e('Add new tag'); ?></div>
</div></div>
<p class="howto"><?php echo $helps; ?></p>
<div class="tagchecklist"></div>

View File

@ -106,13 +106,16 @@ tagBox = {
t.flushTags( $(this).closest('.tagsdiv') );
});
$('div.taghint', ajaxtag).click(function(){
$(this).css('visibility', 'hidden').siblings('.newtag').focus();
});
$('input.newtag', ajaxtag).blur(function() {
var taghint = $(this).siblings('.taghint');
if ( this.value == '' )
taghint.css('visibility', '');
else
taghint.css('visibility', 'hidden');
}).keyup(function(e){
$(this).siblings('.taghint').css('visibility', '');
}).focus(function(){
$(this).siblings('.taghint').css('visibility', 'hidden');
}).keyup(function(e){
if ( 13 == e.which ) {
tagBox.flushTags( $(this).closest('.tagsdiv') );
return false;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3530,16 +3530,16 @@ span.imgedit-scale-warn {
/* tag hints */
.taghint {
color: #aaa;
margin: -18px 8px 0;
visibility: hidden;
margin: 14px 0 -17px 8px;
}
input.newtag ~ div.taghint {
visibility: visible;
#poststuff .tagsdiv .howto {
margin: 0 0 6px 8px;
}
input.newtag:focus ~ div.taghint {
visibility: hidden;
.ajaxtag .newtag {
background: transparent;
position: relative;
}
#broken-themes {

View File

@ -265,7 +265,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'), '20091019' );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20091026' );
$scripts->add_data( 'post', 'group', 1 );
$scripts->localize( 'post', 'postL10n', array(
'tagsUsed' => __('Tags used on this post:'),
@ -417,7 +417,7 @@ function wp_default_styles( &$styles ) {
// all colors stylesheets need to have the same query strings (cache manifest compat)
$colors_version = '20091007';
$styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091020' );
$styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091026' );
$styles->add_data( 'wp-admin', 'rtl', "/wp-admin/rtl$suffix.css" );
$styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20090922' );