Changeset 8286
- Timestamp:
- 07/08/2008 05:51:28 PM (17 years ago)
- Location:
- branches/crazyhorse/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/crazyhorse/wp-admin/edit-form-advanced.php
r8242 r8286 307 307 <?php 308 308 if ( current_user_can( 'publish_posts' ) ) : // Contributors don't get to choose the date of publish 309 $stamp = __( 'Timestamp: <span class="timestamp">%1$s%3$s</span>' ); 310 $edit = ' <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex="4">' . __('(Change)') . '</a>'; 309 311 if ($post_ID) { 310 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 311 $stamp = __('Scheduled for: %1$s at %2$s'); 312 } else if ( 'publish' == $post->post_status ) { // already published 313 $stamp = __('Published on: %1$s at %2$s'); 314 } else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified 315 $stamp = __('Publish immediately'); 316 } else { // draft, 1 or more saves, date specified 317 $stamp = __('Publish on: %1$s at %2$s'); 312 if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified 313 $stamp = __( 'Timestamp: <span class="timestamp">Today, %1$s%3$s</span>' ); 318 314 } 319 315 $date = mysql2date(get_option('date_format'), $post->post_date); 320 316 $time = mysql2date(get_option('time_format'), $post->post_date); 321 317 } else { // draft (no saves, and thus no date specified) 322 $stamp = __( 'Publish immediately');318 $stamp = __( 'Timestamp: <span class="timestamp">Today, %1$s%3$s</span>' ); 323 319 $date = mysql2date(get_option('date_format'), current_time('mysql')); 324 320 $time = mysql2date(get_option('time_format'), current_time('mysql')); … … 326 322 ?> 327 323 328 <p class="curtime"><?php printf($stamp, $date, $time); ?> <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a></p> 324 <p class="curtime"><?php printf($stamp, $date, $time, $edit); ?> 325 </p> 329 326 <div id='timestampdiv' class='hide-if-js'><?php touch_time(($action == 'edit'),1,4); ?></div> 330 327 -
branches/crazyhorse/wp-admin/includes/template.php
r8277 r8286 965 965 966 966 <input type="hidden" id="ss" name="ss" value="<?php echo $ss ?>" size="2" maxlength="2" /> 967 968 <a href="#edit_timestamp" class="save-timestamp hide-if-no-js button"><?php _e('OK'); ?></a> 969 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Cancel'); ?></a> 967 970 <?php 968 971 } -
branches/crazyhorse/wp-admin/js/post.js
r8242 r8286 163 163 if (jQuery('#timestampdiv').is(":hidden")) { 164 164 jQuery('#timestampdiv').slideDown("normal"); 165 jQuery('. edit-timestamp').text(postL10n.cancel);165 jQuery('.timestamp').hide(); 166 166 } else { 167 167 jQuery('#timestampdiv').hide(); … … 171 171 jQuery('#hh').val(jQuery('#hidden_hh').val()); 172 172 jQuery('#mn').val(jQuery('#hidden_mn').val()); 173 jQuery('.edit-timestamp').text(postL10n.edit); 174 } 175 return false; 176 173 jQuery('.timestamp').show(); 174 } 175 return false; 176 177 }); 178 jQuery('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels 179 jQuery('#timestampdiv').hide(); 180 var link = jQuery('.timestamp a').clone( true ); 181 jQuery('.timestamp').show().html( 182 jQuery( '#mm option[value=' + jQuery('#mm').val() + ']' ).text() + ' ' + 183 jQuery('#jj').val() + ', ' + 184 jQuery('#aa').val() + ' @ ' + 185 jQuery('#hh').val() + ':' + 186 jQuery('#mn').val() + ' ' 187 ).append( link ); 188 return false; 177 189 }); 178 190
Note: See TracChangeset
for help on using the changeset viewer.