Make WordPress Core

Changeset 4466


Ignore:
Timestamp:
11/14/2006 11:18:20 PM (19 years ago)
Author:
ryan
Message:

Inline uploader tweaks from mdawaffe. fixes #3360

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/upload-functions.php

    r4427 r4466  
    359359function wp_upload_admin_head() {
    360360    global $wp_locale;
    361     echo "<link rel='stylesheet' href='" . get_option('siteurl') . '/wp-admin/upload.css?version=' . get_bloginfo('version') . "' type='text/css' />\n";
     361    echo "<link rel='stylesheet' href='" . get_option('siteurl') . '/wp-admin/upload.css?version=' . get_bloginfo('version') . "a' type='text/css' />\n";
    362362    if ( 'rtl' == $wp_locale->text_direction )
    363         echo "<link rel='stylesheet' href='" . get_option('siteurl') . '/wp-admin/upload-rtl.css?version=' . get_bloginfo('version') . "' type='text/css' />\n";
     363        echo "<link rel='stylesheet' href='" . get_option('siteurl') . '/wp-admin/upload-rtl.css?version=' . get_bloginfo('version') . "a' type='text/css' />\n";
    364364    if ( 'inline' == @$_GET['style'] ) {
    365         echo "<style type='text/css'>\n";
    366         echo "\tbody { height: 15em; overflow: hidden; }\n";
    367         echo "\t#upload-content { overflow-y: auto; }\n";
    368         echo "\t#upload-file { position: absolute; }\n";
     365        echo "<style type='text/css' media='screen'>\n";
     366        echo "\t#upload-menu { position: absolute; z-index: 2; }\n";
     367        echo "\tbody > #upload-menu { position: fixed; }\n";
     368        echo "\t#upload-content { top: 2em; }\n";
     369        echo "\t#upload-file { position: absolute; top: 15px; }\n";
    369370        echo "</style>";
    370371    }
  • trunk/wp-admin/upload-js.php

    r4461 r4466  
    7575                h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='Browse your files' class='back'>&laquo; Back</a>";
    7676            } else {
    77                 h += "<a href='#' onclick='theFileList.cancelView()'  title='Browse your files' class='back'>&laquo; Back</a>";
     77                h += "<a href='#' onclick='return theFileList.cancelView();'  title='Browse your files' class='back'>&laquo; Back</a>";
    7878            }
    7979            h += "<div id='file-title'>"
     
    8383                h += "<h2>" + this.currentImage.title + "</h2>";
    8484            h += " &#8212; <span>";
    85             h += "<a href='#' onclick='theFileList.editView(" + id + ")'>Edit</a>"
     85            h += "<a href='#' onclick='return theFileList.editView(" + id + ");'>Edit</a>"
    8686            h += "</span>";
    8787            h += '</div>'
     
    137137                h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "'  title='Browse your files' class='back'>&laquo; Back</a>";
    138138            } else {
    139                 h += "<a href='#' onclick='theFileList.cancelView()'  title='Browse your files' class='back'>&laquo; Back</a>";
     139                h += "<a href='#' onclick='return theFileList.cancelView();'  title='Browse your files' class='back'>&laquo; Back</a>";
    140140            }
    141141            h += "<div id='file-title'>"
     
    145145                h += "<h2>" + this.currentImage.title + "</h2>";
    146146            h += " &#8212; <span>";
    147             h += "<a href='#' onclick='theFileList.imageView(" + id + ")'>Insert</a>"
     147            h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'>Insert</a>"
    148148            h += "</span>";
    149149            h += '</div>'
  • trunk/wp-admin/upload-rtl.css

    r4421 r4466  
     1#upload-menu li a.upload-tab-link {
     2    float: right;
     3    margin: 0 .75em 0 0;
     4}
     5
    16table { float: right; }
     7
     8#upload-menu li #current-tab-nav {
     9    float: right;
     10    padding: 5px 0 0 5px;
     11    margin-right: -5px;
     12}
    213
    314#upload-file th, #the-attachment-links textarea { text-align: left; }
     
    1021
    1122#upload-menu li {
    12     margin: 0 .75em 0 0;
    1323    display: block;
    1424    float: right;
    1525}
    1626
    17 #upload-menu .current div {
     27#upload-menu li.current {
    1828    border-right: 0;
    1929    border-left: 2px solid #448abd;
  • trunk/wp-admin/upload.css

    r4422 r4466  
    44
    55#upload-menu {
    6     background: #247fab;
    7     margin: 0px;
     6    border-top: 2em solid #247fab;
     7    margin: 0;
    88    padding: 0;
     9    height: 0;
    910    list-style: none;
    10     height: 2em;
    11     border-bottom: 1px solid #448abd;
    1211    width: 100%;
    1312}
    1413
    15 #upload-menu li { margin: 0 0 0 .75em; }
     14body > #upload-menu { border-bottom: 7px solid #fff; }
    1615
    17 #upload-menu li div {
    18     padding: 5px;
     16#upload-menu li {
     17    margin: 0;
     18    position: relative;
     19    top: -2em;
     20    padding-bottom: 5px;
     21    border: none;
    1922    border-top: 3px solid #247fab;
    2023}
    2124
    22 #upload-menu li a {
     25#upload-menu li a.upload-tab-link {
     26    margin-left: 0.75em;
     27    padding: 5px 5px 0;
     28    display: block;
     29    float: left;
     30    height: 100%;
    2331    text-decoration: none;
    2432    border-bottom: none;
     
    2634}
    2735
    28 #upload-menu li span a.page-numbers { color: #00019b; }
    29 
    30 #upload-menu .current div {
    31     background: #f9fcfe;
     36#upload-menu li.current {
    3237    border-right: 2px solid #448abd;
    3338    color: #000;
    3439}
    3540
    36 #upload-menu .current div a, #upload-menu div:hover a {
     41#upload-menu li.current a.upload-tab-link, #upload-menu li a:hover {
     42    background: #f9fcfe;
    3743    color: #000;
    3844}
    3945
    40 #upload-menu div:hover {
    41     background: #f9fcfe;
    42     color: #000;
     46#upload-menu li #current-tab-nav {
     47    float: left;
     48    padding: 5px 5px 0 0;
     49    margin-left: -5px;
    4350}
     51
     52#upload-menu li span .page-numbers {
     53    padding: 0;
     54    border: none;
     55}
     56
     57#upload-menu li span a.page-numbers { color: #00019b; }
     58#upload-menu li span a.page-numbers:hover { text-decoration: underline; }
    4459
    4560#upload-content {
  • trunk/wp-admin/upload.php

    r4349 r4466  
    3636    $wp_upload_tabs = array_merge($wp_upload_tabs, apply_filters( 'wp_upload_tabs', array() ));
    3737
    38 if ( !function_exists($wp_upload_tabs[$tab][2]) ) {
     38if ( !is_callable($wp_upload_tabs[$tab][2]) ) {
    3939    $to_tab = isset($wp_upload_tabs['upload']) ? 'upload' : 'browse-all';
    4040    wp_redirect( add_query_arg( 'tab', $to_tab ) );
     
    7777echo "<ul id='upload-menu'>\n";
    7878foreach ( $wp_upload_tabs as $t => $tab_array ) { // We've already done the current_user_can check
    79     $class = 'upload-tab';
    8079    $href = add_query_arg( array('tab' => $t, 'ID' => '', 'action' => '', 'paged' => '') );
    8180    if ( isset($tab_array[4]) && is_array($tab_array[4]) )
     
    8382    $_href = wp_specialchars( $href, 1 );
    8483    $page_links = '';
     84    $class = 'upload-tab alignleft';
    8585    if ( $tab == $t ) {
    8686        $class .= ' current';
     
    106106    }
    107107
    108     echo "\t<li class='$class alignleft'><div><a href='$_href' title='{$tab_array[0]}'>{$tab_array[0]}</a>$page_links</div></li>\n";
     108    echo "\t<li class='$class'><a href='$_href' class='upload-tab-link' title='{$tab_array[0]}'>{$tab_array[0]}</a>$page_links</li>\n";
    109109}
    110110unset($t, $tab_array, $href, $_href, $page_links, $total, $per, $class);
  • trunk/wp-admin/wp-admin.css

    r4449 r4466  
    207207    padding: 0px;
    208208    margin-bottom: 16px;
    209     height: 17em;
     209    height: 18em;
    210210    width: 100%;
    211 /*  overflow-y: hidden;*/
    212211}
    213212
  • trunk/wp-includes/script-loader.php

    r4461 r4466  
    3030            $this->add( 'admin-users', '/wp-admin/users.js', array('listman'), '3684' );
    3131            $this->add( 'xfn', '/wp-admin/xfn.js', false, '3517' );
    32             $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '4461' );
     32            $this->add( 'upload', '/wp-admin/upload-js.php', array('prototype'), '4466' );
    3333        }
    3434    }
Note: See TracChangeset for help on using the changeset viewer.