Make WordPress Core


Ignore:
Timestamp:
06/11/2008 05:45:50 PM (17 years ago)
Author:
ryan
Message:

Press This UI changes and photo loading fixes from noel. fixes #7120 see #6813

File:
1 edited

Legend:

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

    r8067 r8071  
    5858}
    5959
    60 function tag_div() { ?>
    61         <p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
    62         <div id="tagchecklist"></div>
    63 <?php }
    6460
    6561function category_div() { ?>
    6662    <div id="categories">
    6763        <div class="submitbox" id="submitpost">
    68             <div id="previewview">  <h2><?php _e('Categories') ?></h2></div>
     64            <div id="previewview"></div>
    6965            <div class="inside">
     66                <h2><?php _e('Categories') ?></h2>
    7067                <div id="categories-all">
    7168                    <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
     
    7370                    </ul>
    7471                </div>
     72                <h2><?php _e('Tags') ?></h2>
     73                <p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
     74                <div id="tagchecklist"></div>
     75               
    7576            </div>
    7677            <p class="submit">         
     
    158159
    159160    function get_images_from_uri($uri) {
     161        if(preg_match('/\.(jpg|png|gif)/', $uri)) return "'".$uri."'";
    160162        $content = wp_remote_fopen($uri);
    161163        $host = parse_url($uri);
     
    180182        }
    181183        return "'" . implode("','", $sources) . "'";
    182     } 
     184    }
     185   
    183186       
    184187    echo 'new Array('.get_images_from_uri($url).')';
     
    252255        <small><?php _e('Click images to select:') ?></small>
    253256        <div class="titlewrap">
    254             <div id="img_container">Loading Images...</div>
     257            <div id="img_container"></div>
    255258        </div>
    256259<?php die; }
     
    423426                <?php } ?>
    424427                jQuery('#extra_fields').show();
     428                jQuery('#extra_fields').prepend('<h2 id="waiting"><img src="images/loading.gif" alt="" /> Loading...</h2>');
    425429                jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']).'/?ajax=photo&u='.attribute_escape($url); ?>');
    426                 jQuery('#extra_fields').prepend('<h2><img src="images/loading.gif" alt="" /> Loading...</h2>');
    427430                jQuery.ajax({
    428431                    type: "GET",
     
    432435                    dataType : "script",
    433436                    success : function() {
     437                        jQuery('#waiting').innerHTML('');
    434438                    }
    435439                });
     
    491495                    </div>
    492496                    </div>
    493                     <?php tag_div(); ?>
     497                   
    494498                </div>
    495499                <?php category_div(); ?>
Note: See TracChangeset for help on using the changeset viewer.