<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12542] trunk/wp-admin: Media editing:
When you have many custom taxonomies this page can get rather long,
or just normally, so adding a "save" button to the top as well,
for easy access.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12542">12542</a></dd>
<dt>Author</dt> <dd>matt</dd>
<dt>Date</dt> <dd>2009-12-25 22:22:21 +0000 (Fri, 25 Dec 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Media editing: When you have many custom taxonomies this page can get rather long, or just normally, so adding a "save" button to the top as well, for easy access.
There was no place on this page that actually linked to the item being edited, so I hyperinked the thumbnail.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesmediaphp">trunk/wp-admin/includes/media.php</a></li>
<li><a href="#trunkwpadminmediaphp">trunk/wp-admin/media.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/media.php (12541 => 12542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/media.php        2009-12-25 03:16:25 UTC (rev 12541)
+++ trunk/wp-admin/includes/media.php        2009-12-25 22:22:21 UTC (rev 12542)
</span><span class="lines">@@ -1201,6 +1201,8 @@
</span><span class="cx">                 $image_edit_button = "<input type='button' id='imgedit-open-btn-{$post->ID}' onclick='imageEdit.open($post->ID, \"$nonce\")' class='button' value='" . esc_attr__( 'Edit image' ) . "' /> <img src='images/wpspin_light.gif' class='imgedit-wait-spin' alt='' />";
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        $attachment_url = get_permalink( $attachment_id );
+
</ins><span class="cx">         $item = "
</span><span class="cx">         $type_html
</span><span class="cx">         $toggle_links
</span><span class="lines">@@ -1209,7 +1211,9 @@
</span><span class="cx">         <table class='slidetoggle describe $class'>
</span><span class="cx">                 <thead class='media-item-info' id='media-head-$post->ID'>
</span><span class="cx">                 <tr>
</span><del>-                        <td class='A1B1' id='thumbnail-head-$post->ID' rowspan='5'><img class='thumbnail' src='$thumb_url' alt='' /></td>
</del><ins>+                        <td class='A1B1' id='thumbnail-head-$post->ID' rowspan='5'>
+                        <a href='$attachment_url' target='_blank'><img class='thumbnail' src='$thumb_url' alt='' /></a>
+                        </td>
</ins><span class="cx">                         <td><strong>" . __('File name:') . "</strong> $filename</td>
</span><span class="cx">                 </tr>
</span><span class="cx">                 <tr><td><strong>" . __('File type:') . "</strong> $post->post_mime_type</td></tr>
</span><span class="lines">@@ -1441,7 +1445,7 @@
</span><span class="cx">         <div>
</span><span class="cx">         <?php _e( 'Choose files to upload' ); ?>
</span><span class="cx">         <div id="flash-browse-button"></div>
</span><del>-        <span><input id="cancel-upload" disabled="disabled" onclick="cancelUpload()" type="button" value="<?php esc_attr_e('Cancel Upload'); ?>" class="button" /></span>
</del><ins>+        <span><input id="cancel-upload" disabled="disabled" onClick="cancelUpload()" type="button" value="<?php esc_attr_e('Cancel Upload'); ?>" class="button" /></span>
</ins><span class="cx">         </div>
</span><span class="cx"> <?php do_action('post-flash-upload-ui'); ?>
</span><span class="cx">         <p class="howto"><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
</span><span class="lines">@@ -1452,7 +1456,7 @@
</span><span class="cx"> <?php do_action('pre-html-upload-ui'); ?>
</span><span class="cx">         <p id="async-upload-wrap">
</span><span class="cx">         <label class="screen-reader-text" for="async-upload"><?php _e('Upload'); ?></label>
</span><del>-        <input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php esc_attr_e('Upload'); ?>" /> <a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e('Cancel'); ?></a>
</del><ins>+        <input type="file" name="async-upload" id="async-upload" /> <input type="submit" class="button" name="html-upload" value="<?php esc_attr_e('Upload'); ?>" /> <a href="#" onClick="try{top.tb_remove();}catch(e){}; return false;"><?php _e('Cancel'); ?></a>
</ins><span class="cx">         </p>
</span><span class="cx">         <div class="clear"></div>
</span><span class="cx">         <?php if ( is_lighttpd_before_150() ): ?>
</span><span class="lines">@@ -1772,8 +1776,8 @@
</span><span class="cx"> </tbody></table>
</span><span class="cx">
</span><span class="cx"> <p class="ml-submit">
</span><del>-<input type="button" class="button" style="display:none;" onmousedown="wpgallery.update();" name="insert-gallery" id="insert-gallery" value="<?php esc_attr_e( 'Insert gallery' ); ?>" />
-<input type="button" class="button" style="display:none;" onmousedown="wpgallery.update();" name="update-gallery" id="update-gallery" value="<?php esc_attr_e( 'Update gallery settings' ); ?>" />
</del><ins>+<input type="button" class="button" style="display:none;" onMouseDown="wpgallery.update();" name="insert-gallery" id="insert-gallery" value="<?php esc_attr_e( 'Insert gallery' ); ?>" />
+<input type="button" class="button" style="display:none;" onMouseDown="wpgallery.update();" name="update-gallery" id="update-gallery" value="<?php esc_attr_e( 'Update gallery settings' ); ?>" />
</ins><span class="cx"> </p>
</span><span class="cx"> </div>
</span><span class="cx"> </form>
</span><span class="lines">@@ -2000,11 +2004,11 @@
</span><span class="cx">                         <td class="field">
</span><span class="cx">                                 <input name="align" id="align-none" value="none" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' />
</span><span class="cx">                                 <label for="align-none" class="align image-align-none-label">' . __('None') . '</label>
</span><del>-                                <input name="align" id="align-left" value="left" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' />
</del><ins>+                                <input name="align" id="align-left" value="left" onClick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' />
</ins><span class="cx">                                 <label for="align-left" class="align image-align-left-label">' . __('Left') . '</label>
</span><del>-                                <input name="align" id="align-center" value="center" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' />
</del><ins>+                                <input name="align" id="align-center" value="center" onClick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' />
</ins><span class="cx">                                 <label for="align-center" class="align image-align-center-label">' . __('Center') . '</label>
</span><del>-                                <input name="align" id="align-right" value="right" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' />
</del><ins>+                                <input name="align" id="align-right" value="right" onClick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' />
</ins><span class="cx">                                 <label for="align-right" class="align image-align-right-label">' . __('Right') . '</label>
</span><span class="cx">                         </td>
</span><span class="cx">                 </tr>
</span><span class="lines">@@ -2015,15 +2019,15 @@
</span><span class="cx">                         </th>
</span><span class="cx">                         <td class="field"><input id="url" name="url" value="" type="text" /><br />
</span><span class="cx">
</span><del>-                        <button type="button" class="button" value="" onclick="document.forms[0].url.value=null">' . __('None') . '</button>
-                        <button type="button" class="button" value="" onclick="document.forms[0].url.value=document.forms[0].src.value">' . __('Link to image') . '</button>
</del><ins>+                        <button type="button" class="button" value="" onClick="document.forms[0].url.value=null">' . __('None') . '</button>
+                        <button type="button" class="button" value="" onClick="document.forms[0].url.value=document.forms[0].src.value">' . __('Link to image') . '</button>
</ins><span class="cx">                         <p class="help">' . __('Enter a link URL or click above for presets.') . '</p></td>
</span><span class="cx">                 </tr>
</span><span class="cx">
</span><span class="cx">                 <tr>
</span><span class="cx">                         <td></td>
</span><span class="cx">                         <td>
</span><del>-                                <input type="button" class="button" id="go_button" style="color:#bbb;" onclick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" />
</del><ins>+                                <input type="button" class="button" id="go_button" style="color:#bbb;" onClick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" />
</ins><span class="cx">                         </td>
</span><span class="cx">                 </tr>
</span><span class="cx">         </tbody></table>
</span></span></pre></div>
<a id="trunkwpadminmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/media.php (12541 => 12542)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/media.php        2009-12-25 03:16:25 UTC (rev 12541)
+++ trunk/wp-admin/media.php        2009-12-25 22:22:21 UTC (rev 12542)
</span><span class="lines">@@ -90,6 +90,10 @@
</span><span class="cx"> <h2><?php _e( 'Edit Media' ); ?></h2>
</span><span class="cx">
</span><span class="cx"> <form method="post" action="<?php echo esc_url( remove_query_arg( 'message' ) ); ?>" class="media-upload-form" id="media-single-form">
</span><ins>+<p class="submit">
+<input type="submit" class="button-primary" name="save" value="<?php esc_attr_e('Update Media'); ?>" />
+</p>
+
</ins><span class="cx"> <div class="media-single">
</span><span class="cx"> <div id='media-item-<?php echo $att_id; ?>' class='media-item'>
</span><span class="cx"> <?php echo get_media_item( $att_id, array( 'toggle' => false, 'send' => false, 'delete' => false, 'show_title' => false, 'errors' => $errors ) ); ?>
</span></span></pre>
</div>
</div>
</body>
</html>