More updates to post.js. see [16248].

git-svn-id: http://svn.automattic.com/wordpress/trunk@16408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-11-16 22:13:17 +00:00
parent c09b2e5b22
commit 200f550862
3 changed files with 7 additions and 10 deletions

View File

@ -36,12 +36,12 @@ tagBox = {
},
quickClicks : function(el) {
var thetags = $('.the-tags', el), tagchecklist = $('.tagchecklist', el), current_tags;
var thetags = $('.the-tags', el), tagchecklist = $('.tagchecklist', el), current_tags, disabled;
if ( !thetags.length )
return;
var disabled = thetags.attr('disabled');
disabled = thetags.attr('disabled');
current_tags = thetags.val().split(',');
tagchecklist.empty();
@ -360,8 +360,8 @@ jQuery(document).ready( function($) {
}
function updateText() {
var attemptedDate, originalDate, currentDate, publishOn, page = 'page' == pagenow || 'page-new' == pagenow,
postStatus = $('#post_status'), optPublish = $('option[value=publish]', postStatus), aa = $('#aa').val(),
var attemptedDate, originalDate, currentDate, publishOn, postStatus = $('#post_status'),
optPublish = $('option[value=publish]', postStatus), aa = $('#aa').val(),
mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val();
attemptedDate = new Date( aa, mm - 1, jj, hh, mn );
@ -399,10 +399,7 @@ jQuery(document).ready( function($) {
}
if ( $('input:radio:checked', '#post-visibility-select').val() == 'private' ) {
if ( page )
$('#publish').val( postL10n.updatePage );
else
$('#publish').val( postL10n.updatePost );
$('#publish').val( postL10n.update );
if ( optPublish.length == 0 ) {
postStatus.append('<option value="publish">' + postL10n.privatelyPublished + '</option>');
} else {

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'), '20101111' );
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox'), '20101116' );
$scripts->add_data( 'post', 'group', 1 );
$scripts->localize( 'post', 'postL10n', array(
'tagsUsed' => __('Tags used on this post:'),