Make WordPress Core

Changeset 9857


Ignore:
Timestamp:
11/24/2008 04:29:35 AM (18 years ago)
Author:
azaozz
Message:

PressThis css fixes from Noel, see #7949

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r9840 r9857  
    3535        border-radius-topleft: 3px;
    3636        border-radius-topright: 3px;
    37 
    3837        border-style: solid;
    3938        border-width: 1px;
    … …  
    4948        line-height: 18px;
    5049        float: left;
     50        float: left;
    5151}
    5252
    … …  
    6666        outline-width: medium;
    6767        width: 100%;
    68 
    6968}
    7069
    … …  
    125124        padding: 7px;
    126125        margin: 0 0 10px;
    127        
    128126        background-image: url(../images/postbox-bg.gif);
    129127        background-position: left top;
    130128        background-repeat: repeat-x;
    131 
    132129        font-size: 12px;
    133130        font-weight: bold;
    … …  
    222219        position: relative;
    223220}
     221#extra_fields #actions {
     222        clear: both;
     223        position: absolute;
     224        right: 4px;
     225        top: 6px;
     226        margin: 0;
     227}
    224228
    225229#actions li {
    … …  
    227231        list-style: none;
    228232        margin-right: 10px;
     233}
     234#extra_fields .button {
     235        margin-right: 5px;
    229236}
    230237
    … …  
    332339
    333340#category-add input {
    334         width: 94%;     
     341        width: 94%;
    335342        font-family: Verdana, Arial, Helvetica, sans-serif;
    336343        font-size: 13px;
  • trunk/wp-admin/press-this.php

    r9838 r9857  
    236236                var last = null
    237237                var img, img_tag, aspect, w, h, skip, i, strtoappend = "";
    238                 if(!my_src) {
    239238                        var my_src = eval(
    240239                                jQuery.ajax({
    … …  
    247246                                }).responseText
    248247                        );
    249                 }
     248                        if(my_src.length == 0) {
     249                                var my_src = eval(
     250                                jQuery.ajax({
     251                                        type: "GET",
     252                                        url: "<?php echo clean_url($_SERVER['PHP_SELF']); ?>",
     253                                        cache : false,
     254                                        async : false,
     255                                        data: "ajax=photo_images&u=<?php echo urlencode($url); ?>",
     256                                        dataType : "script"
     257                                }).responseText
     258                                );
     259                                if(my_src.length == 0) {
     260       
     261                                        strtoappend = '<?php _e('Unable to retrieve images or no images on page.'); ?>';
     262                                }
     263                        }
     264               
    250265
    251266                for (i = 0; i < my_src.length; i++) {
    … …  
    294309
    295310                jQuery(document).ready(function() {
    296                         jQuery('#extra_fields').html('<div class="postbox"><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="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a></p></div>');
     311                        jQuery('#extra_fields').html('<div class="postbox"><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="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>');
    297312                        jQuery('.close').click(function() {
    298313                                jQuery('#extra_fields').hide();
    299314                                jQuery('#extra_fields').html('');
    300315                        });
     316                        jQuery('.refresh').click(function() {
     317                                                show('photo');
     318                                        });
    301319                        jQuery('#img_container').html(strtoappend);
    302320                        jQuery('#photo_add_url').attr('href', '?ajax=photo_thickbox_url&height=200&width=500');
    303321                        tb_init('#extra_fields .thickbox');
     322                       
     323                       
    304324                });
    305325                <?php break;
Note: See TracChangeset for help on using the changeset viewer.