| [ Index ] |
PHP Cross Reference of Wordpress 2.9.1 |
[Summary view] [Print] [Text view]
1 jQuery(document).ready( function($) { 2 3 var stamp = $('#timestamp').html(); 4 $('.edit-timestamp').click(function () { 5 if ($('#timestampdiv').is(":hidden")) { 6 $('#timestampdiv').slideDown("normal"); 7 $('.edit-timestamp').hide(); 8 } 9 return false; 10 }); 11 12 $('.cancel-timestamp').click(function() { 13 $('#timestampdiv').slideUp("normal"); 14 $('#mm').val($('#hidden_mm').val()); 15 $('#jj').val($('#hidden_jj').val()); 16 $('#aa').val($('#hidden_aa').val()); 17 $('#hh').val($('#hidden_hh').val()); 18 $('#mn').val($('#hidden_mn').val()); 19 $('#timestamp').html(stamp); 20 $('.edit-timestamp').show(); 21 return false; 22 }); 23 24 $('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels 25 var aa = $('#aa').val(), mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(), 26 newD = new Date( aa, mm - 1, jj, hh, mn ); 27 28 if ( newD.getFullYear() != aa || (1 + newD.getMonth()) != mm || newD.getDate() != jj || newD.getMinutes() != mn ) { 29 $('.timestamp-wrap', '#timestampdiv').addClass('form-invalid'); 30 return false; 31 } else { 32 $('.timestamp-wrap', '#timestampdiv').removeClass('form-invalid'); 33 } 34 35 $('#timestampdiv').slideUp("normal"); 36 $('.edit-timestamp').show(); 37 $('#timestamp').html( 38 commentL10n.submittedOn + ' <b>' + 39 $( '#mm option[value=' + mm + ']' ).text() + ' ' + 40 jj + ', ' + 41 aa + ' @ ' + 42 hh + ':' + 43 mn + '</b> ' 44 ); 45 return false; 46 }); 47 });
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Jan 8 00:19:48 2010 | Cross-referenced by PHPXref 0.7 |