2008-03-15 23:57:47 +01: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-02-18 23:07:57 +01:00
|
|
|
jQuery('.edit-timestamp').click(function () {
|
2008-02-21 23:20:19 +01:00
|
|
|
if (jQuery('#timestampdiv').is(":hidden")) {
|
2008-08-20 23:42:31 +02:00
|
|
|
jQuery('#curtime').slideUp("normal");
|
2008-02-21 23:20:19 +01:00
|
|
|
jQuery('#timestampdiv').slideDown("normal");
|
2008-02-18 23:07:57 +01:00
|
|
|
} else {
|
2008-08-20 23:42:31 +02:00
|
|
|
jQuery('#timestampdiv').slideUp("normal");
|
2008-03-17 04:26:53 +01:00
|
|
|
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());
|
2008-08-20 23:42:31 +02:00
|
|
|
jQuery('#curtime').slideDown("normal");
|
2008-02-18 23:07:57 +01:00
|
|
|
}
|
2008-02-22 07:12:10 +01:00
|
|
|
return false;
|
2008-08-20 23:42:31 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
jQuery('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels
|
|
|
|
jQuery('#timestampdiv').hide();
|
|
|
|
var link = jQuery('.timestamp a').clone( true );
|
|
|
|
jQuery('.timestamp').show().html(
|
|
|
|
jQuery( '#mm option[value=' + jQuery('#mm').val() + ']' ).text() + ' ' +
|
|
|
|
jQuery('#jj').val() + ',' +
|
|
|
|
jQuery('#aa').val() + '@' +
|
|
|
|
jQuery('#hh').val() + ':' +
|
|
|
|
jQuery('#mn').val() + ' '
|
|
|
|
).append( link );
|
|
|
|
jQuery('#curtime').slideDown("normal");
|
|
|
|
return false;
|
|
|
|
});
|
2008-02-22 07:12:10 +01:00
|
|
|
});
|