Make WordPress Core


Ignore:
Timestamp:
10/24/2008 05:20:06 PM (18 years ago)
Author:
ryan
Message:

Press This updates from noel. see #7949

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/press-this.php

    r9295 r9326  
    117117            jQuery('.select').click(function() {
    118118                append_editor(jQuery('#embed-code').val());
     119                jQuery('#extra_fields').hide();
     120                jQuery('#extra_fields').html('');
    119121            });
    120122            jQuery('.close').click(function() {
    121123                jQuery('#extra_fields').hide();
     124                jQuery('#extra_fields').html('');
    122125            });
    123126        </script>
     
    274277            pick(src, desc);
    275278            jQuery('#extra_fields').hide();
     279            jQuery('#extra_fields').html('');
    276280            return false;
    277281        }
     
    281285            jQuery('.close').click(function() {
    282286                jQuery('#extra_fields').hide();
     287                jQuery('#extra_fields').html('');
    283288            });
    284289            jQuery('#img_container').html(strtoappend);
     
    352357        switch(tab_name) {
    353358            case 'video' :
     359                jQuery('#extra_fields').html('');
    354360                jQuery('#extra_fields').show();
    355361                jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo attribute_escape($selection); ?>'}, function() {
     
    377383                break;
    378384            case 'photo' :
    379                 if(jQuery('#extra_fields').css('display') == 'none') {
     385                    jQuery('#extra_fields').html('');
    380386                    jQuery('#extra_fields').show();
    381387                    jQuery('#extra_fields').before('<p id="waiting"><img src="images/loading.gif" alt="" /><?php echo js_escape( __( 'Loading...' ) ); ?></p>');
     
    390396                        }
    391397                    });
    392                 } else {
    393                     jQuery('#extra_fields').hide();
    394                 }
     398
    395399                return false;
    396400                break;
     
    500504                    <li id="photo_button"><a href="#" class="button"><?php _e( 'Add Photo' ); ?></a></li>
    501505                    <li id="video_button"><a href="#" class="button"><?php _e( 'Add Video' ); ?></a></li>
    502                     <li id="switcher"><?php if ( user_can_richedit() ) {
    503         $wp_default_editor = wp_default_editor(); ?>
    504         <div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('<?php echo $id; ?>')" /></div>
    505         <?php if ( 'html' == $wp_default_editor ) {
    506             add_filter('the_editor_content', 'wp_htmledit_pre'); ?>
    507             <a id="edButtonHTML" class="active" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
    508             <a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
    509         <?php } else {
    510             add_filter('the_editor_content', 'wp_richedit_pre'); ?>
     506                    <li id="switcher">
     507                        <?php wp_print_scripts( 'quicktags' ); ?>
     508       
     509            <?php add_filter('the_editor_content', 'wp_richedit_pre'); ?>
    511510            <a id="edButtonHTML" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
    512511            <a id="edButtonPreview" class="active" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
    513         <?php }
    514     } ?></li>
     512            <div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('<?php echo $id; ?>')" /></div>
     513        </li>
    515514                </ul>
    516            
     515            <div id="quicktags">
     516   
     517   
     518    </div>
     519   
    517520                <h2 id="content_type"><label for="content"><?php _e('Post') ?></label></h2>
    518521           
Note: See TracChangeset for help on using the changeset viewer.