Changeset 40913
- Timestamp:
- 06/15/2017 01:01:30 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/comment.js
r33422 r40913 1 1 /* global postboxes, commentL10n */ 2 3 /** 4 * @summary Binds to the document ready event. 5 * 6 * @since 2.5.0 7 * 8 * @param {jQuery} $ The jQuery object. 9 */ 2 10 jQuery(document).ready( function($) { 3 11 … … 10 18 $edittimestamp = $timestampdiv.siblings( 'a.edit-timestamp' ); 11 19 20 /** 21 * @summary Adds event that opens the time stamp form if the form is hidden. 22 * 23 * @listens $edittimestamp:click 24 * 25 * @param {Event} event The event object. 26 * @returns {void} 27 */ 12 28 $edittimestamp.click( function( event ) { 13 29 if ( $timestampdiv.is( ':hidden' ) ) { 30 // Slide down the form and set focus on the first field. 14 31 $timestampdiv.slideDown( 'fast', function() { 15 32 $( 'input, select', $timestampwrap ).first().focus(); … … 19 36 event.preventDefault(); 20 37 }); 38 39 /** 40 * @summary Resets the time stamp values when the cancel button is clicked. 41 * 42 * @listens .cancel-timestamp:click 43 * 44 * @param {Event} event The event object. 45 * @returns {void} 46 */ 21 47 22 48 $timestampdiv.find('.cancel-timestamp').click( function( event ) { … … 33 59 }); 34 60 61 /** 62 * @summary Sets the time stamp values when the ok button is clicked. 63 * 64 * @listens .save-timestamp:click 65 * 66 * @param {Event} event The event object. 67 * @returns {void} 68 */ 35 69 $timestampdiv.find('.save-timestamp').click( function( event ) { // crazyhorse - multiple ok cancels 36 70 var aa = $('#aa').val(), mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(),
Note: See TracChangeset
for help on using the changeset viewer.