Changeset 4340
- Timestamp:
- 10/04/2006 05:19:10 PM (18 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upload-functions.php
r4312 r4340 102 102 echo '<a href="' . get_permalink() . '">' . __('view') . '</a>'; 103 103 echo ' | '; 104 echo '<a href="' . wp_specialchars( add_query_arg( 'action', 'view' ), 1 ) . '">' . __(' options') . '</a>';104 echo '<a href="' . wp_specialchars( add_query_arg( 'action', 'view' ), 1 ) . '">' . __('links') . '</a>'; 105 105 echo ' | '; 106 106 echo '<a href="' . wp_specialchars( remove_query_arg( array('action','ID') ), 1 ) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>'; … … 298 298 break; 299 299 default : 300 global $tab, $post_id ;300 global $tab, $post_id, $style; 301 301 add_action( 'pre_get_posts', 'wp_upload_grab_attachments' ); 302 302 if ( 'browse' == $tab && $post_id ) … … 310 310 echo "<ul id='upload-files'>\n"; 311 311 if ( have_posts() ) : while ( have_posts() ) : the_post(); 312 $href = wp_specialchars( add_query_arg( array('action' => 'view', 'ID' => get_the_ID()) ), 1 ); 312 $href = wp_specialchars( add_query_arg( array( 313 'action' => 'inline' == $style ? 'view' : 'edit', 314 'ID' => get_the_ID()) 315 ), 1 ); 313 316 314 317 echo "\t<li id='file-"; … … 332 335 333 336 function wp_upload_tab_browse_action() { 334 wp_enqueue_script('upload'); 337 global $style; 338 if ( 'inline' == $style ) 339 wp_enqueue_script('upload'); 335 340 } 336 341 … … 345 350 if ( 'inline' == @$_GET['style'] ) { 346 351 echo "<style type='text/css'>\n"; 347 echo "\t#wphead, #user_info, #adminmenu, #submenu, #footer { display: none; }\n";348 352 echo "\tbody { height: 14em; overflow: hidden; }\n"; 349 353 echo "\t#upload-content { overflow-y: auto; }\n"; -
trunk/wp-admin/upload-js.php
r4312 r4340 30 30 $$('a.file-link').each( function(i) { 31 31 var id = i.id.split('-').pop(); 32 i.onclick = function(e) { theFileList .imageView(id, e); }32 i.onclick = function(e) { theFileList[ 'inline' == theFileList.style ? 'imageView' : 'editView' ](id, e); } 33 33 } ); 34 34 }, … … 118 118 var h = ''; 119 119 120 h += "<form id='upload-file' method='post' action='upload.php?style=inline&tab=upload&post_id=" + this.postID + "'>"; 120 var action = 'upload.php?style=' + this.style + '&tab=upload'; 121 if ( this.postID ) 122 action += '&post_id=' + this.postID; 123 h += "<form id='upload-file' method='post' action='" + action + "'>"; 121 124 h += "<div id='file-title'>" 122 125 if ( !this.currentImage.thumb ) -
trunk/wp-admin/upload-rtl.css
r4312 r4340 19 19 20 20 #the-attachment-links { float: left; } 21 22 #th { text-align: left; } -
trunk/wp-admin/upload.css
r4312 r4340 91 91 #upload-files li { margin: 0 0 15px 15px; } 92 92 93 #upload-files a, a.file-link {93 #upload-files a, #upload-file-view a, a.file-link { 94 94 border: none; 95 95 text-decoration: none; 96 96 } 97 98 #upload-file-view a img { padding-bottom: .2em; border-bottom: 1px solid #6699CC; } 97 99 98 100 #upload-files a.file-link { … … 128 130 } 129 131 130 th { vertical-align: text-top; }132 th { text-align: right; vertical-align: text-top; } 131 133 132 134 tr, td, th { -
trunk/wp-admin/upload.php
r4312 r4340 14 14 15 15 do_action( "upload_files_$tab" ); 16 17 add_action( 'admin_head', 'wp_upload_admin_head' );18 16 19 17 $pid = 0; … … 52 50 } 53 51 54 include_once('admin-header.php'); 52 if ( 'inline' == $style ) : ?> 53 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 54 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>> 55 <head> 56 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 57 <title><?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — WordPress</title> 58 <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 59 <?php if ( ('rtl' == $wp_locale->text_direction) ) : ?> 60 <link rel="stylesheet" href="<?php echo get_option('siteurl') ?>/wp-admin/rtl.css?version=<?php bloginfo('version'); ?>" type="text/css" /> 61 <?php endif; ?> 62 <script type="text/javascript"> 63 //<![CDATA[ 64 function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}} 65 //]]> 66 </script> 67 <?php do_action('admin_print_scripts'); wp_upload_admin_head(); ?> 68 </head> 69 <body> 70 <?php 71 else : 72 add_action( 'admin_head', 'wp_upload_admin_head' ); 73 include_once('admin-header.php'); 74 endif; 55 75 56 76 echo "<ul id='upload-menu'>\n"; … … 96 116 echo "</div>\n"; 97 117 98 include_once('admin-footer.php'); 99 ?> 118 if ( 'inline' != $style ) : 119 include_once('admin-footer.php'); 120 else : ?> 121 <script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script> 122 123 </body> 124 </html> 125 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.