Better handling of text for submit button on already scheduled pages/posts

git-svn-id: https://develop.svn.wordpress.org/trunk@9678 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2008-11-14 08:39:39 +00:00
parent 56d2ca4d1a
commit ea4423bab7
2 changed files with 4 additions and 4 deletions

View File

@ -32,10 +32,10 @@ jQuery(document).ready( function($) {
var attemptedDate = new Date( $('#aa').val(), $('#mm').val() -1, $('#jj').val(), $('#hh').val(), $('#mn').val());
var originalDate = new Date( $('#hidden_aa').val(), $('#hidden_mm').val() -1, $('#hidden_jj').val(), $('#hidden_hh').val(), $('#hidden_mn').val());
var currentDate = new Date( $('#cur_aa').val(), $('#cur_mm').val() -1, $('#cur_jj').val(), $('#cur_hh').val(), $('#cur_mn').val());
if ( attemptedDate > currentDate ) {
if ( attemptedDate > currentDate && $('#original_post_status').val() != 'future' ) {
var publishOn = postL10n.publishOnFuture;
$('#publish').val( postL10n.schedule );
} else if ( $('#original_post_status').val() != 'publish' ) {
} else if ( attemptedDate <= currentDate && $('#original_post_status').val() != 'publish' ) {
var publishOn = postL10n.publishOn;
$('#publish').val( postL10n.publish );
} else {

View File

@ -219,10 +219,10 @@ jQuery(document).ready( function($) {
var attemptedDate = new Date( $('#aa').val(), $('#mm').val() -1, $('#jj').val(), $('#hh').val(), $('#mn').val());
var originalDate = new Date( $('#hidden_aa').val(), $('#hidden_mm').val() -1, $('#hidden_jj').val(), $('#hidden_hh').val(), $('#hidden_mn').val());
var currentDate = new Date( $('#cur_aa').val(), $('#cur_mm').val() -1, $('#cur_jj').val(), $('#cur_hh').val(), $('#cur_mn').val());
if ( attemptedDate > currentDate ) {
if ( attemptedDate > currentDate && $('#original_post_status').val() != 'future' ) {
var publishOn = postL10n.publishOnFuture;
$('#publish').val( postL10n.schedule );
} else if ( $('#original_post_status').val() != 'publish' ) {
} else if ( attemptedDate <= currentDate && $('#original_post_status').val() != 'publish' ) {
var publishOn = postL10n.publishOn;
$('#publish').val( postL10n.publish );
} else {