X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/959f97d8ecd5c1668103a3e41c795486b944bc68..1c09677af04c9e37714e09b73eb9dbc5b2e3eb13:/wp-admin/js/comment.js diff --git a/wp-admin/js/comment.js b/wp-admin/js/comment.js index 11a36276..c05cb608 100644 --- a/wp-admin/js/comment.js +++ b/wp-admin/js/comment.js @@ -1,26 +1 @@ -jQuery(document).ready( function() { - add_postbox_toggles('comment'); - - // close postboxes that should be closed - jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed'); - - // show things that should be visible, hide what should be hidden - jQuery('.hide-if-no-js').show(); - jQuery('.hide-if-js').hide(); - - jQuery('.edit-timestamp').click(function () { - if (jQuery('#timestampdiv').is(":hidden")) { - jQuery('#timestampdiv').slideDown("normal"); - jQuery('.edit-timestamp').text(commentL10n.cancel); - } else { - jQuery('#timestampdiv').hide(); - jQuery('#mm').val(jQuery('#hidden_mm').val()); - jQuery('#jj').val(jQuery('#hidden_jj').val()); - jQuery('#aa').val(jQuery('#hidden_aa').val()); - jQuery('#hh').val(jQuery('#hidden_hh').val()); - jQuery('#mn').val(jQuery('#hidden_mn').val()); - jQuery('.edit-timestamp').text(commentL10n.edit); - } - return false; - }); -}); \ No newline at end of file +jQuery(document).ready(function(b){var a=b("#timestamp").html();b(".edit-timestamp").click(function(){if(b("#timestampdiv").is(":hidden")){b("#timestampdiv").slideDown("normal");b(".edit-timestamp").hide()}return false});b(".cancel-timestamp").click(function(){b("#timestampdiv").slideUp("normal");b("#mm").val(b("#hidden_mm").val());b("#jj").val(b("#hidden_jj").val());b("#aa").val(b("#hidden_aa").val());b("#hh").val(b("#hidden_hh").val());b("#mn").val(b("#hidden_mn").val());b("#timestamp").html(a);b(".edit-timestamp").show();return false});b(".save-timestamp").click(function(){var g=b("#aa").val(),h=b("#mm").val(),d=b("#jj").val(),c=b("#hh").val(),f=b("#mn").val(),e=new Date(g,h-1,d,c,f);if(e.getFullYear()!=g||(1+e.getMonth())!=h||e.getDate()!=d||e.getMinutes()!=f){b(".timestamp-wrap","#timestampdiv").addClass("form-invalid");return false}else{b(".timestamp-wrap","#timestampdiv").removeClass("form-invalid")}b("#timestampdiv").slideUp("normal");b(".edit-timestamp").show();b("#timestamp").html(commentL10n.submittedOn+" "+b("#mm option[value="+h+"]").text()+" "+d+", "+g+" @ "+c+":"+f+" ");return false})}); \ No newline at end of file