Make WordPress Core


Ignore:
Timestamp:
12/14/2005 08:29:43 AM (21 years ago)
Author:
ryan
Message:

noscript support for uploading. fixes #2078

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/inline-uploading.php

    r3305 r3307  
    2727
    2828switch($action) {
     29case 'links':
     30// Do not pass GO.
     31break;
     32
    2933case 'delete':
    3034
    … …  
    201205                }
    202206                $attachment = array_merge($attachment, $meta);
     207                $noscript = "<noscript>
     208                <div class='caption'><a href=\"".basename(__FILE__)."?action=links&amp;attachment={$ID}&amp;post={$post}&amp;all={$all}&amp;start={$start}\">Choose Links</a></div>
     209                </noscript>
     210";
    203211                $send_delete_cancel = "<a onclick=\"sendToEditor({$ID});return false;\" href=\"javascript:void()\">$__send_to_editor</a>
    204212<a onclick=\"return confirm('$__confirmdelete')\" href=\"".basename(__FILE__)."?action=delete&amp;attachment={$ID}&amp;all=$all&amp;start=$start&amp;post=$post\">$__delete</a>
    … …  
    234242                <img id=\"image{$ID}\" src=\"$src\" alt=\"{$image['post_title']}\" $height_width />
    235243        </div>
     244        {$noscript}
    236245</div>
    237246";
    … …  
    257266                <a id=\"{$ID}\" href=\"{$attachment['guid']}\" onmousedown=\"selectLink({$ID});\" onclick=\"return false;\">{$attachment['post_title']}</a>
    258267        </div>
     268        {$noscript}
    259269</div>
    260270";
    … …  
    399409</script>
    400410<style type="text/css">
     411<?php if ( $action == 'links' ) : ?>
     412* html { overflow-x: hidden; }
     413<?php else : ?>
     414* html { overflow-y: hidden; }
     415<?php endif; ?>
    401416body {
    402417        font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana;
    … …  
    419434        margin: 0px;
    420435        padding: 15px 15px;
    421         height: 96px;
    422 /*      white-space: nowrap;*/
    423436        width: <?php echo $images_width; ?>px;
    424437}
    … …  
    428441<?php echo $style; ?>
    429442.attwrap, .attwrap * {
    430         overflow: none;
    431443        margin: 0px;
    432444        padding: 0px;
    … …  
    435447.imagewrap {
    436448        margin-right: 5px;
    437         height: 96px;
    438449        overflow: hidden;
    439         float: left;
     450        width: 128px;
    440451}
    441452.otherwrap {
    442453        margin-right: 5px;
    443 /*      overflow: hidden;*/
     454        overflow: hidden;
    444455        background-color: #f9fcfe;
    445         float: left;
    446456}
    447457.otherwrap a {
    … …  
    455465        height: 96px;
    456466        text-align: center;
     467        width: 128px;
    457468}
    458469.usingicon a {
    459         width: 128px;
    460470}
    461471.usingtext {
    … …  
    463473        height: 90px;
    464474        text-align: left;
     475        width: 122px;
    465476}
    466477.usingtext a {
    467         width: 122px;
    468478}
    469479.filetype {
    … …  
    548558        position: absolute;
    549559        width: 114px;
    550 /*      height: 92px;*/
    551560        display: none;
    552561        background-color: rgb(240, 240, 238);
    … …  
    575584        color: #000;
    576585}
     586.caption {
     587        text-align: center;
     588}
    577589#submit {
    578590        margin: 1px;
    … …  
    593605        border-left-color: #999;
    594606        border-top-color: #999;
     607}
     608.zerosize {
     609        width: 0px;
     610        height: 0px;
     611        overflow: hidden;
     612        position: absolute;
     613}
     614#links {
     615        margin: 3px 8px;
     616        line-height: 2em;
     617       
     618}
     619#links textarea {
     620        width: 95%;
     621        height: 4.5em;
    595622}
    596623</style>
    … …  
    606633<?php } ?>
    607634<li> </li>
    608 <?php if ( $action != 'upload' ) { ?>
     635<?php if ( $action == 'view' ) { ?>
    609636<?php if ( false !== $back ) : ?>
    610637<li class="spacer"><a href="<?php echo basename(__FILE__); ?>?action=<?php echo $action; ?>&amp;post=<?php echo $post; ?>&amp;all=<?php echo $all; ?>&amp;start=0" title="<?php _e('First'); ?>">|&laquo;</a></li>
    … …  
    665692</div>
    666693</form>
     694<?php elseif ( $action == 'links' ) : ?>
     695<div id="links">
     696<?php the_attachment_links($attachment); ?>
     697</div>
    667698<?php endif; ?>
    668699</body>
Note: See TracChangeset for help on using the changeset viewer.