home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Blogs / wordpress2.6.exe / wordpress2.6 / wp-admin / js / page.js < prev    next >
Encoding:
JavaScript  |  2008-03-27  |  1.1 KB  |  32 lines

  1. jQuery(document).ready( function() {
  2.     add_postbox_toggles('page');
  3.     make_slugedit_clickable();
  4.  
  5.     // close postboxes that should be closed
  6.     jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
  7.  
  8.     // show things that should be visible, hide what should be hidden
  9.     jQuery('.hide-if-no-js').show();
  10.     jQuery('.hide-if-js').hide();
  11.  
  12.     jQuery('#title').blur( function() { if ( (jQuery("#post_ID").val() > 0) || (jQuery("#title").val().length == 0) ) return; autosave(); } );
  13.  
  14.     // hide advanced slug field
  15.     jQuery('#pageslugdiv').hide();
  16.  
  17.     jQuery('.edit-timestamp').click(function () {
  18.         if (jQuery('#timestampdiv').is(":hidden")) {
  19.             jQuery('#timestampdiv').slideDown("normal");
  20.             jQuery('.edit-timestamp').text(postL10n.cancel);
  21.         } else {
  22.             jQuery('#timestampdiv').hide();
  23.             jQuery('#mm').val(jQuery('#hidden_mm').val());
  24.             jQuery('#jj').val(jQuery('#hidden_jj').val());
  25.             jQuery('#aa').val(jQuery('#hidden_aa').val());
  26.             jQuery('#hh').val(jQuery('#hidden_hh').val());
  27.             jQuery('#mn').val(jQuery('#hidden_mn').val());
  28.             jQuery('.edit-timestamp').text(postL10n.edit);
  29.         }
  30.         return false;
  31.     });
  32. });