WordPress/wp-admin/js/comment.min.js

1 line
1.1 KiB
JavaScript

jQuery(document).ready(function(n){postboxes.add_postbox_toggles("comment");var t=n("#timestamp").html();n(".edit-timestamp").click(function(){return n("#timestampdiv").is(":hidden")&&(n("#timestampdiv").slideDown("normal"),n(".edit-timestamp").hide()),!1}),n(".cancel-timestamp").click(function(){return n("#timestampdiv").slideUp("normal"),n("#mm").val(n("#hidden_mm").val()),n("#jj").val(n("#hidden_jj").val()),n("#aa").val(n("#hidden_aa").val()),n("#hh").val(n("#hidden_hh").val()),n("#mn").val(n("#hidden_mn").val()),n("#timestamp").html(t),n(".edit-timestamp").show(),!1}),n(".save-timestamp").click(function(){var t=n("#aa").val(),m=n("#mm").val(),a=n("#jj").val(),e=n("#hh").val(),i=n("#mn").val(),l=new Date(t,m-1,a,e,i);return l.getFullYear()!=t||1+l.getMonth()!=m||l.getDate()!=a||l.getMinutes()!=i?n(".timestamp-wrap","#timestampdiv").addClass("form-invalid"):(n(".timestamp-wrap","#timestampdiv").removeClass("form-invalid"),n("#timestampdiv").slideUp("normal"),n(".edit-timestamp").show(),n("#timestamp").html(commentL10n.submittedOn+" <b>"+n('#mm option[value="'+m+'"]').text()+" "+a+", "+t+" @ "+e+":"+i+"</b> ")),!1})});