2008-08-27 21:41:51 +02:00
|
|
|
jQuery(document).ready( function($) {
|
2008-08-20 23:42:31 +02:00
|
|
|
postboxes.add_postbox_toggles('page');
|
2008-02-08 20:57:50 +01:00
|
|
|
make_slugedit_clickable();
|
2008-02-18 23:07:57 +01:00
|
|
|
|
2008-03-26 21:06:18 +01:00
|
|
|
// close postboxes that should be closed
|
|
|
|
jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
|
|
|
|
2008-03-19 06:38:58 +01:00
|
|
|
jQuery('#title').blur( function() { if ( (jQuery("#post_ID").val() > 0) || (jQuery("#title").val().length == 0) ) return; autosave(); } );
|
|
|
|
|
2008-02-21 21:19:34 +01:00
|
|
|
// hide advanced slug field
|
|
|
|
jQuery('#pageslugdiv').hide();
|
|
|
|
|
2008-09-14 14:58:00 +02:00
|
|
|
var stamp = $('#timestamp').html();
|
|
|
|
|
|
|
|
$('.edit-timestamp').click(function () {
|
|
|
|
if ($('#timestampdiv').is(":hidden")) {
|
|
|
|
$('#timestampdiv').slideDown("normal");
|
|
|
|
$('.edit-timestamp').hide();
|
2008-02-18 23:07:57 +01:00
|
|
|
}
|
2008-09-14 14:58:00 +02:00
|
|
|
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
$('.cancel-timestamp').click(function() {
|
|
|
|
$('#timestampdiv').slideUp("normal");
|
|
|
|
$('#mm').val($('#hidden_mm').val());
|
|
|
|
$('#jj').val($('#hidden_jj').val());
|
|
|
|
$('#aa').val($('#hidden_aa').val());
|
|
|
|
$('#hh').val($('#hidden_hh').val());
|
|
|
|
$('#mn').val($('#hidden_mn').val());
|
|
|
|
$('#timestamp').html(stamp);
|
|
|
|
$('.edit-timestamp').show();
|
|
|
|
|
2008-02-22 07:12:10 +01:00
|
|
|
return false;
|
2008-08-20 23:42:31 +02:00
|
|
|
});
|
|
|
|
|
2008-09-14 14:58:00 +02:00
|
|
|
$('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels
|
|
|
|
$('#timestampdiv').slideUp("normal");
|
|
|
|
$('.edit-timestamp').show();
|
|
|
|
$('#timestamp').html(
|
|
|
|
$( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' +
|
|
|
|
$('#jj').val() + ', ' +
|
|
|
|
$('#aa').val() + ' @ ' +
|
|
|
|
$('#hh').val() + ':' +
|
|
|
|
$('#mn').val() + ' '
|
|
|
|
);
|
|
|
|
|
2008-08-20 23:42:31 +02:00
|
|
|
return false;
|
|
|
|
});
|
2008-08-27 21:41:51 +02:00
|
|
|
|
2008-09-14 14:58:00 +02:00
|
|
|
$('.edit-post-status').click(function() {
|
|
|
|
if ($('#post-status-select').is(":hidden")) {
|
|
|
|
$('#post-status-select').slideDown("normal");
|
|
|
|
$(this).hide();
|
2008-09-13 21:12:55 +02:00
|
|
|
}
|
2008-09-14 14:58:00 +02:00
|
|
|
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
$('.save-post-status').click(function() {
|
|
|
|
$('#post-status-select').slideUp("normal");
|
|
|
|
$('#post-status-display').html($('#post_status :selected').text());
|
|
|
|
$('.edit-post-status').show();
|
|
|
|
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
$('.cancel-post-status').click(function() {
|
|
|
|
$('#post-status-select').slideUp("normal");
|
|
|
|
$('#post_status').val($('#hidden_post_status').val());
|
|
|
|
$('#post-status-display').html($('#post_status :selected').text());
|
|
|
|
$('.edit-post-status').show();
|
|
|
|
|
2008-09-13 21:12:55 +02:00
|
|
|
return false;
|
|
|
|
});
|
2008-09-14 14:58:00 +02:00
|
|
|
});
|