Fix tags and categories postboxes in PressThis

git-svn-id: http://svn.automattic.com/wordpress/trunk@12030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-10-14 07:30:10 +00:00
parent c790ebcdd9
commit 72666a5458
6 changed files with 34 additions and 14 deletions

File diff suppressed because one or more lines are too long

View File

@ -562,3 +562,18 @@ ul.categorychecklist li {
border-width: 1px;
border-style: solid;
}
/* tag hints */
.taghint {
color: #aaa;
margin: -17px 6px 0 0;
visibility: hidden;
}
input.newtag ~ div.taghint {
visibility: visible;
}
input.newtag:focus ~ div.taghint {
visibility: hidden;
}

View File

@ -208,12 +208,16 @@ jQuery(document).ready( function($) {
postboxes.add_postbox_toggles('page');
// multi-taxonomies
$('div.postbox').each(function(){
if ( this.id.indexOf('tagsdiv-') === 0 ) {
tagBox.init();
return false;
}
});
if ( $('#tagsdiv-post_tag').length ) {
tagBox.init();
} else {
$('#side-sortables, #normal-sortables, #advanced-sortables').children('div.postbox').each(function(){
if ( this.id.indexOf('tagsdiv-') === 0 ) {
tagBox.init();
return false;
}
});
}
// categories
if ( $('#categorydiv').length ) {

File diff suppressed because one or more lines are too long

View File

@ -338,7 +338,7 @@ die;
//<![CDATA[
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'};
var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-this';
//]]>
</script>
@ -505,10 +505,11 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
<p class="jaxtag">
<label class="screen-reader-text" for="newtag"><?php _e('Post Tags'); ?></label>
<input type="hidden" name="tax_input[post_tag]" class="the-tags" id="tax-input[post_tag]" value="" />
<span class="ajaxtag" style="display:none;">
<input type="text" name="newtag[post_tag]" class="newtag form-input-tip" size="16" autocomplete="off" value="<?php esc_attr_e('Add new tag'); ?>" />
<div class="ajaxtag">
<input type="text" name="newtag[post_tag]" class="newtag form-input-tip" size="16" autocomplete="off" value="" />
<input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" tabindex="3" />
</span>
<div class="taghint"><?php _e('Add new tag'); ?></div>
</div>
</p>
<div class="tagchecklist"></div>
</div>

View File

@ -268,7 +268,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'), '20091012' );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20091014' );
$scripts->add_data( 'post', 'group', 1 );
$scripts->localize( 'post', 'postL10n', array(
'tagsUsed' => __('Tags used on this post:'),
@ -444,7 +444,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20090514' );
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array(), '20090514' );
$styles->add( 'theme-editor', "/wp-admin/css/theme-editor$suffix.css", array(), '20090625' );
$styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array(), '20090514' );
$styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array(), '20091014' );
$styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20090514' );
$styles->add( 'login', "/wp-admin/css/login$suffix.css", array(), '20091010' );
$styles->add( 'plugin-install', "/wp-admin/css/plugin-install$suffix.css", array(), '20090514' );