Changeset 6834

Show
Ignore:
Timestamp:
02/14/08 00:51:28 (9 months ago)
Author:
ryan
Message:

Save tags lingering in quick add box upon save. Props fitzrev. fixes #5849

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/edit-form-advanced.php

    r6829 r6834  
    147147 
    148148<p class="submit"> 
    149 <input type="submit" name="save" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" /> 
     149<input type="submit" name="save" id="save-post" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" /> 
    150150<?php 
    151151if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) { 
  • trunk/wp-admin/js/post.js

    r6770 r6834  
    4646} 
    4747 
     48function tag_save_on_publish() { 
     49    if ( jQuery('#newtag').val() != postL10n.addTag ) 
     50        tag_flush_to_text(); 
     51} 
     52 
    4853function tag_press_key( e ) { 
    4954    if ( 13 == e.keyCode ) { 
     
    7883            jQuery(this).val( postL10n.addTag ).addClass( 'form-input-tip' ); 
    7984    }); 
     85 
     86    // auto-save tags on post save/publish 
     87    jQuery('#publish').click( tag_save_on_publish ); 
     88    jQuery('#save-post').click( tag_save_on_publish ); 
    8089 
    8190    // auto-suggest stuff