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>