Make WordPress Core

Changeset 9295


Ignore:
Timestamp:
10/23/2008 03:42:04 PM (16 years ago)
Author:
ryan
Message:

Press This fixes from noel. see #7949

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r8959 r9295  
    3535    padding-left: 10px;
    3636    margin-top: 10px;
     37}
     38
     39
     40div.zerosize {
     41border:0 none;
     42height:0;
     43margin:0;
     44overflow:hidden;
     45padding:0;
     46position:absolute;
     47width:0;
     48}
     49
     50#poststuff #edButtonPreview, #poststuff #edButtonHTML {
     51    display: block;
     52    height: 20px;
     53    padding: 5px 5px 1px;
     54    margin: 5px 8px 0 0;
     55    float: right;
     56    cursor: pointer;
    3757}
    3858
  • trunk/wp-admin/press-this.php

    r9119 r9295  
    278278
    279279        jQuery(document).ready(function() {
    280             jQuery('#extra_fields').html('<h2>Photo <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><div class="photolist"></div><ul id="actions"><li><a href="#" id="photo_add_url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a></p>');
     280            jQuery('#extra_fields').html('<h2>Photo <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul id="actions"><li><a href="#" id="photo_add_url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a></p>');
    281281            jQuery('.close').click(function() {
    282282                jQuery('#extra_fields').hide();
     
    402402        jQuery('#photo_button').click(function() { show('photo'); return false; });
    403403        jQuery('#video_button').click(function() { show('video'); return false; });
    404        
     404        jQuery('#visual_mode_button').click(function() {
     405           
     406        });
    405407        // Set default tabs
    406408        <?php if ( preg_match("/youtube\.com\/watch/i", $url) ) { ?>
     
    421423
    422424<form action="press-this.php?action=post" method="post">
    423     <?php wp_nonce_field('press-this') ?>
    424     <input type="hidden" name="post_type" id="post_type" value="text"/>
     425   
    425426   
    426427    <div id="poststuff" class="metabox-holder">
    427428    <div id="side-info-column">
    428429        <div class="sleeve">
    429             <h1 id="viewsite"><a class="button" href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?> &rsaquo; <?php _e('Press This') ?></a></span></h1>
    430            
     430            <h1 id="viewsite"><a class="button" href="<?php echo get_option('home'); ?>/" target="_blank"><?php bloginfo('name'); ?> &rsaquo; <?php _e('Press This') ?></a></span></h1>
     431            <?php wp_nonce_field('press-this') ?>
     432        <input type="hidden" name="post_type" id="post_type" value="text"/>
     433   
     434        <div class="photolist"></div>
    431435            <div id="categorydiv" class="stuffbox">
    432436            <h2><?php _e('Categories') ?></h2>
     
    496500                    <li id="photo_button"><a href="#" class="button"><?php _e( 'Add Photo' ); ?></a></li>
    497501                    <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'); ?>
     511            <a id="edButtonHTML" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
     512            <a id="edButtonPreview" class="active" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
     513        <?php }
     514    } ?></li>
    498515                </ul>
    499516           
     
    503520                    <textarea name="content" id="content" style="width:100%;" class="mceEditor" rows="15">
    504521                    <?php if ($selection) echo wp_richedit_pre($selection); ?>
    505                     <?php if ($url) { ?><p>via <a href="<?php echo $url ?>"><?php echo $title; ?></a>.</p><?php } ?>
     522                    <?php if ($url) { ?><p><?php if($selection) _e('via'); ?> <a href="<?php echo $url ?>"><?php echo $title; ?></a>.</p><?php } ?>
    506523                    </textarea>
    507524                </div>
Note: See TracChangeset for help on using the changeset viewer.