<!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" />
<title>[22594] trunk/wp-includes: Media: Enter batch insert workflow by editing the selection instead of having an explicit button.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { 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 #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#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>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/22594">22594</a></dd>
<dt>Author</dt> <dd>koopersmith</dd>
<dt>Date</dt> <dd>2012-11-15 02:36:06 +0000 (Thu, 15 Nov 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Media: Enter batch insert workflow by editing the selection instead of having an explicit button. see <a href="http://core.trac.wordpress.org/ticket/21390">#21390</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludescssmediaviewscss">trunk/wp-includes/css/media-views.css</a></li>
<li><a href="#trunkwpincludesjsmediaviewsjs">trunk/wp-includes/js/media-views.js</a></li>
<li><a href="#trunkwpincludesmediaphp">trunk/wp-includes/media.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludescssmediaviewscss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/css/media-views.css (22593 => 22594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/media-views.css        2012-11-15 02:26:22 UTC (rev 22593)
+++ trunk/wp-includes/css/media-views.css        2012-11-15 02:36:06 UTC (rev 22594)
</span><span class="lines">@@ -811,12 +811,35 @@
</span><span class="cx">         font-weight: bold;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.media-selection .clear-selection {
</del><ins>+.media-selection .selection-info a {
</ins><span class="cx">         display: block;
</span><ins>+        float: left;
+        padding: 1px 8px;
+        margin: 1px 8px 1px -8px;
+        line-height: 16px;
</ins><span class="cx">         text-decoration: none;
</span><del>-        line-height: 16px;
</del><ins>+        border-right: 1px solid #dfdfdf;
+        color: #21759B;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.media-selection .selection-info a:hover {
+        background: #21759B;
+        color: #fff;
+        border-color: transparent;
+}
+
+.media-selection .selection-info a:last-child {
+        border-right: 0;
+}
+
+.media-selection .selection-info .clear-selection {
+        color: red;
+}
+
+.media-selection .selection-info .clear-selection:hover {
+        background: red;
+}
+
</ins><span class="cx"> .media-selection .attachments {
</span><span class="cx">         display: inline-block;
</span><span class="cx">         height: 60px;
</span><span class="lines">@@ -825,13 +848,19 @@
</span><span class="cx">         vertical-align: top;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.media-selection .selected.attachment {
</del><ins>+.attachment.selection.selected {
</ins><span class="cx">         box-shadow: none;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.media-selection .details.attachment {
</del><ins>+.attachment.selection.details {
</ins><span class="cx">         box-shadow:
</span><span class="cx">                 0 0 0 1px #fff,
</span><ins>+                0 0 0 4px #1e8cbe;
+}
+
+.media-selection .attachment.selection.details {
+        box-shadow:
+                0 0 0 1px #fff,
</ins><span class="cx">                 0 0 0 3px #1e8cbe;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesjsmediaviewsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/media-views.js (22593 => 22594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/media-views.js        2012-11-15 02:26:22 UTC (rev 22593)
+++ trunk/wp-includes/js/media-views.js        2012-11-15 02:36:06 UTC (rev 22594)
</span><span class="lines">@@ -372,32 +372,20 @@
</span><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 refreshSelection: function() {
</span><ins>+                        var selection = this.get('selection'),
+                                mode = this.frame.content.mode();
+
</ins><span class="cx">                         this.frame.toolbar.view().refresh();
</span><del>-                        this.trigger( 'refresh:selection', this, this.get('selection') );
</del><ins>+                        this.trigger( 'refresh:selection', this, selection );
+
+                        if ( ! selection.length &amp;&amp; 'browse' !== mode &amp;&amp; 'upload' !== mode )
+                                this.content();
</ins><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 selectUpload: function( attachment ) {
</span><span class="cx">                         this.get('selection').add( attachment );
</span><span class="cx">                 },
</span><span class="cx"> 
</span><del>-                toggleSelection: function( model ) {
-                        var selection = this.get('selection');
-
-                        if ( ! model )
-                                return;
-
-                        if ( selection.has( model ) ) {
-                                // If the model is the single model, remove it.
-                                // If it is not the same as the single model,
-                                // it now becomes the single model.
-                                selection[ selection.single() === model ? 'remove' : 'single' ]( model );
-                        } else {
-                                selection.add( model ).single();
-                        }
-
-                        return this;
-                },
-
</del><span class="cx">                 buildComposite: function() {
</span><span class="cx">                         var original = this.get('_library'),
</span><span class="cx">                                 exclude = this.get('exclude'),
</span><span class="lines">@@ -518,7 +506,7 @@
</span><span class="cx"> 
</span><span class="cx">                         // The single `Attachment` view to be used in the `Attachments` view.
</span><span class="cx">                         if ( ! this.get('AttachmentView') )
</span><del>-                                this.set( 'AttachmentView', media.view.Attachment.Gallery );
</del><ins>+                                this.set( 'AttachmentView', media.view.Attachment.EditLibrary );
</ins><span class="cx">                         media.controller.Library.prototype.initialize.apply( this, arguments );
</span><span class="cx">                 },
</span><span class="cx"> 
</span><span class="lines">@@ -867,6 +855,7 @@
</span><span class="cx">                         this.content.view( new media.view.AttachmentsBrowser({
</span><span class="cx">                                 controller: this,
</span><span class="cx">                                 collection: state.get('library'),
</span><ins>+                                selection:  state.get('selection'),
</ins><span class="cx">                                 model:      state,
</span><span class="cx">                                 sortable:   state.get('sortable'),
</span><span class="cx">                                 search:     state.get('searchable'),
</span><span class="lines">@@ -980,6 +969,7 @@
</span><span class="cx">                         main = {
</span><span class="cx">                                 multiple: this.options.multiple,
</span><span class="cx">                                 menu:      'main',
</span><ins>+                                sidebar:   'attachment-settings',
</ins><span class="cx"> 
</span><span class="cx">                                 // Update user settings when users adjust the
</span><span class="cx">                                 // attachment display settings.
</span><span class="lines">@@ -1058,12 +1048,13 @@
</span><span class="cx"> 
</span><span class="cx">                         var handlers = {
</span><span class="cx">                                         menu: {
</span><del>-                                                batch:   'batchMenu',
-                                                gallery: 'galleryMenu'
</del><ins>+                                                'batch':   'batchMenu',
+                                                'gallery': 'galleryMenu'
</ins><span class="cx">                                         },
</span><span class="cx"> 
</span><span class="cx">                                         content: {
</span><del>-                                                embed: 'embedContent'
</del><ins>+                                                'embed':          'embedContent',
+                                                'edit-selection': 'editSelectionContent'
</ins><span class="cx">                                         },
</span><span class="cx"> 
</span><span class="cx">                                         sidebar: {
</span><span class="lines">@@ -1086,19 +1077,6 @@
</span><span class="cx">                                 }, this );
</span><span class="cx">                         }, this );
</span><span class="cx"> 
</span><del>-                        _.each(['library', 'upload'], function( id ) {
-                                this.get( id ).on( 'refresh:selection', function( state, selection ) {
-                                        var sidebar = this.sidebar;
-
-                                        if ( ! selection.length )
-                                                sidebar.mode('clear');
-                                        else if ( selection.length === 1 )
-                                                sidebar.mode('attachment-settings');
-                                        else
-                                                sidebar.mode('settings');
-                                }, this );
-                        }, this );
-
</del><span class="cx">                         this.sidebar.on( 'gallery-settings', this.onSidebarGallerySettings, this );
</span><span class="cx">                 },
</span><span class="cx"> 
</span><span class="lines">@@ -1204,6 +1182,35 @@
</span><span class="cx">                         view.url.focus();
</span><span class="cx">                 },
</span><span class="cx"> 
</span><ins>+                editSelectionContent: function() {
+                        var state = this.state(),
+                                selection = state.get('selection'),
+                                view;
+
+                        view = new media.view.AttachmentsBrowser({
+                                controller: this,
+                                collection: selection,
+                                selection:  selection,
+                                model:      state,
+                                sortable:   true,
+                                search:     false,
+
+                                AttachmentView: media.view.Attachment.EditSelection
+                        }).render();
+
+                        view.toolbar.set( 'backToLibrary', {
+                                text:     l10n.returnToLibrary,
+                                priority: -100,
+
+                                click: function() {
+                                        this.controller.content.mode('browse');
+                                }
+                        });
+
+                        // Browse our library of attachments.
+                        this.content.view( view );
+                },
+
</ins><span class="cx">                 // Sidebars
</span><span class="cx">                 onSidebarGallerySettings: function( options ) {
</span><span class="cx">                         var library = this.state().get('library');
</span><span class="lines">@@ -1761,7 +1768,11 @@
</span><span class="cx">                                 selection: new media.view.Selection({
</span><span class="cx">                                         controller: controller,
</span><span class="cx">                                         collection: selection,
</span><del>-                                        priority:   -40
</del><ins>+                                        priority:   -40,
+
+                                        editable: function() {
+                                                this.controller.content.mode('edit-selection');
+                                        }
</ins><span class="cx">                                 }).render(),
</span><span class="cx"> 
</span><span class="cx">                                 insert: {
</span><span class="lines">@@ -1771,8 +1782,7 @@
</span><span class="cx"> 
</span><span class="cx">                                         click: function() {
</span><span class="cx">                                                 controller.close();
</span><del>-                                                controller.state().trigger( 'insert', selection );
-                                                selection.clear();
</del><ins>+                                                controller.state().trigger( 'insert', selection ).reset();
</ins><span class="cx">                                         }
</span><span class="cx">                                 },
</span><span class="cx"> 
</span><span class="lines">@@ -1782,12 +1792,6 @@
</span><span class="cx">                                         click:    selectionToLibrary('gallery-edit', function( selection ) {
</span><span class="cx">                                                 return selection.where({ type: 'image' });
</span><span class="cx">                                         })
</span><del>-                                },
-
-                                batch: {
-                                        text:     l10n.batchInsert,
-                                        priority: 60,
-                                        click:    selectionToLibrary('batch-edit')
</del><span class="cx">                                 }
</span><span class="cx">                         });
</span><span class="cx"> 
</span><span class="lines">@@ -1800,16 +1804,10 @@
</span><span class="cx"> 
</span><span class="cx">                         this.get('insert').model.set( 'disabled', ! selection.length );
</span><span class="cx"> 
</span><del>-                        // Check if every attachment in the selection is an image.
</del><ins>+                        // Check if any attachment in the selection is an image.
</ins><span class="cx">                         this.get('gallery').$el.toggle( count &gt; 1 &amp;&amp; selection.any( function( attachment ) {
</span><span class="cx">                                 return 'image' === attachment.get('type');
</span><span class="cx">                         }) );
</span><del>-
-                        // Batch insert shows for multiple selected attachments.
-                        this.get('batch').$el.toggle( count &gt; 1 );
-
-                        // Insert only shows for single attachments.
-                        this.get('insert').$el.toggle( count &lt;= 1 );
</del><span class="cx">                 }
</span><span class="cx">         });
</span><span class="cx"> 
</span><span class="lines">@@ -2075,7 +2073,8 @@
</span><span class="cx">                         'change [data-setting]':          'updateSetting',
</span><span class="cx">                         'change [data-setting] input':    'updateSetting',
</span><span class="cx">                         'change [data-setting] select':   'updateSetting',
</span><del>-                        'change [data-setting] textarea': 'updateSetting'
</del><ins>+                        'change [data-setting] textarea': 'updateSetting',
+                        'click .close':                   'removeFromLibrary'
</ins><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 buttons: {},
</span><span class="lines">@@ -2147,17 +2146,30 @@
</span><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 toggleSelection: function( event ) {
</span><del>-                        this.controller.state().toggleSelection( this.model );
</del><ins>+                        var selection = this.options.selection,
+                                model = this.model;
+
+                        if ( ! selection )
+                                return;
+
+                        if ( selection.has( model ) ) {
+                                // If the model is the single model, remove it.
+                                // If it is not the same as the single model,
+                                // it now becomes the single model.
+                                selection[ selection.single() === model ? 'remove' : 'single' ]( model );
+                        } else {
+                                selection.add( model ).single();
+                        }
</ins><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 selected: function() {
</span><del>-                        var selection = this.controller.state().get('selection');
</del><ins>+                        var selection = this.options.selection;
</ins><span class="cx">                         if ( selection )
</span><span class="cx">                                 return selection.has( this.model );
</span><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 select: function( model, collection ) {
</span><del>-                        var selection = this.controller.state().get('selection');
</del><ins>+                        var selection = this.options.selection;
</ins><span class="cx"> 
</span><span class="cx">                         // Check if a selection exists and if it's the collection provided.
</span><span class="cx">                         // If they're not the same collection, bail; we're in another
</span><span class="lines">@@ -2169,7 +2181,7 @@
</span><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 deselect: function( model, collection ) {
</span><del>-                        var selection = this.controller.state().get('selection');
</del><ins>+                        var selection = this.options.selection;
</ins><span class="cx"> 
</span><span class="cx">                         // Check if a selection exists and if it's the collection provided.
</span><span class="cx">                         // If they're not the same collection, bail; we're in another
</span><span class="lines">@@ -2181,7 +2193,7 @@
</span><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 details: function( model, collection ) {
</span><del>-                        var selection = this.controller.state().get('selection'),
</del><ins>+                        var selection = this.options.selection,
</ins><span class="cx">                                 details;
</span><span class="cx"> 
</span><span class="cx">                         if ( selection !== collection )
</span><span class="lines">@@ -2220,6 +2232,13 @@
</span><span class="cx">                                 return;
</span><span class="cx"> 
</span><span class="cx">                         this.model.save( $setting.data('setting'), event.target.value );
</span><ins>+                },
+
+                removeFromLibrary: function( event ) {
+                        // Stop propagation so the model isn't selected.
+                        event.stopPropagation();
+
+                        this.collection.remove( this.model );
</ins><span class="cx">                 }
</span><span class="cx">         });
</span><span class="cx"> 
</span><span class="lines">@@ -2231,24 +2250,11 @@
</span><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         /**
</span><del>-         * wp.media.view.Attachment.Gallery
</del><ins>+         * wp.media.view.Attachment.EditLibrary
</ins><span class="cx">          */
</span><del>-        media.view.Attachment.Gallery = media.view.Attachment.extend({
</del><ins>+        media.view.Attachment.EditLibrary = media.view.Attachment.extend({
</ins><span class="cx">                 buttons: {
</span><span class="cx">                         close: true
</span><del>-                },
-
-                events: (function() {
-                        var events = _.clone( media.view.Attachment.prototype.events );
-                        events['click .close'] = 'removeFromGallery';
-                        return events;
-                }()),
-
-                removeFromGallery: function( event ) {
-                        // Stop propagation so the model isn't selected.
-                        event.stopPropagation();
-
-                        this.controller.state().get('library').remove( this.model );
</del><span class="cx">                 }
</span><span class="cx">         });
</span><span class="cx"> 
</span><span class="lines">@@ -2388,7 +2394,9 @@
</span><span class="cx">                         this.$el.html( this.collection.map( function( attachment ) {
</span><span class="cx">                                 return new this.options.AttachmentView({
</span><span class="cx">                                         controller: this.controller,
</span><del>-                                        model:      attachment
</del><ins>+                                        model:      attachment,
+                                        collection: this.collection,
+                                        selection:  this.options.selection
</ins><span class="cx">                                 }).render().$el;
</span><span class="cx">                         }, this ) );
</span><span class="cx"> 
</span><span class="lines">@@ -2404,7 +2412,9 @@
</span><span class="cx"> 
</span><span class="cx">                         view = new this.options.AttachmentView({
</span><span class="cx">                                 controller: this.controller,
</span><del>-                                model:      attachment
</del><ins>+                                model:      attachment,
+                                collection: this.collection,
+                                selection:  this.options.selection
</ins><span class="cx">                         }).render();
</span><span class="cx"> 
</span><span class="cx">                         children = this.$el.children();
</span><span class="lines">@@ -2521,6 +2531,7 @@
</span><span class="cx">                         this.attachments = new media.view.Attachments({
</span><span class="cx">                                 controller: this.controller,
</span><span class="cx">                                 collection: this.collection,
</span><ins>+                                selection:  this.options.selection,
</ins><span class="cx">                                 model:      this.model,
</span><span class="cx">                                 sortable:   this.options.sortable,
</span><span class="cx"> 
</span><span class="lines">@@ -2603,11 +2614,13 @@
</span><span class="cx">                 template:  media.template('media-selection'),
</span><span class="cx"> 
</span><span class="cx">                 events: {
</span><ins>+                        'click .edit-selection':  'edit',
</ins><span class="cx">                         'click .clear-selection': 'clear'
</span><span class="cx">                 },
</span><span class="cx"> 
</span><span class="cx">                 initialize: function() {
</span><span class="cx">                         _.defaults( this.options, {
</span><ins>+                                editable:  false,
</ins><span class="cx">                                 clearable: true
</span><span class="cx">                         });
</span><span class="cx"> 
</span><span class="lines">@@ -2615,6 +2628,7 @@
</span><span class="cx">                         this.attachments = new media.view.Attachments({
</span><span class="cx">                                 controller: this.controller,
</span><span class="cx">                                 collection: this.collection,
</span><ins>+                                selection:  this.collection,
</ins><span class="cx">                                 sortable:   true,
</span><span class="cx">                                 model:      new Backbone.Model({
</span><span class="cx">                                         edge:   40,
</span><span class="lines">@@ -2655,6 +2669,12 @@
</span><span class="cx">                         this.$('.count').text( this.collection.length + ' ' + l10n.selected );
</span><span class="cx">                 },
</span><span class="cx"> 
</span><ins>+                edit: function( event ) {
+                        event.preventDefault();
+                        if ( this.options.editable )
+                                this.options.editable.call( this, this.collection );
+                },
+
</ins><span class="cx">                 clear: function( event ) {
</span><span class="cx">                         event.preventDefault();
</span><span class="cx">                         this.collection.clear();
</span><span class="lines">@@ -2666,14 +2686,22 @@
</span><span class="cx">          * wp.media.view.Attachment.Selection
</span><span class="cx">          */
</span><span class="cx">         media.view.Attachment.Selection = media.view.Attachment.extend({
</span><ins>+                className: 'attachment selection',
+
</ins><span class="cx">                 // On click, just select the model, instead of removing the model from
</span><span class="cx">                 // the selection.
</span><span class="cx">                 toggleSelection: function() {
</span><del>-                        this.controller.state().get('selection').single( this.model );
</del><ins>+                        this.options.selection.single( this.model );
</ins><span class="cx">                 }
</span><span class="cx">         });
</span><span class="cx"> 
</span><ins>+        media.view.Attachment.EditSelection = media.view.Attachment.Selection.extend({
+                buttons: {
+                        close: true
+                }
+        });
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx">         /**
</span><span class="cx">          * wp.media.view.Settings
</span><span class="cx">          */
</span></span></pre></div>
<a id="trunkwpincludesmediaphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/media.php (22593 => 22594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/media.php        2012-11-15 02:26:22 UTC (rev 22593)
+++ trunk/wp-includes/media.php        2012-11-15 02:36:06 UTC (rev 22594)
</span><span class="lines">@@ -1355,6 +1355,7 @@
</span><span class="cx">                 'mediaLibraryTitle' =&gt; __( 'Media Library' ),
</span><span class="cx">                 'createNewGallery'  =&gt; __( 'Create a new gallery' ),
</span><span class="cx">                 'insertIntoPost'    =&gt; __( 'Insert into post' ),
</span><ins>+                'returnToLibrary'   =&gt; __( '&amp;#8592; Return to library' ),
</ins><span class="cx"> 
</span><span class="cx">                 // Embed
</span><span class="cx">                 'embedFromUrlTitle' =&gt; __( 'Embed From URL' ),
</span><span class="lines">@@ -1522,6 +1523,9 @@
</span><span class="cx">         &lt;script type=&quot;text/html&quot; id=&quot;tmpl-media-selection&quot;&gt;
</span><span class="cx">                 &lt;div class=&quot;selection-info&quot;&gt;
</span><span class="cx">                         &lt;span class=&quot;count&quot;&gt;&lt;/span&gt;
</span><ins>+                        &lt;# if ( data.editable ) { #&gt;
+                                &lt;a class=&quot;edit-selection&quot; href=&quot;#&quot;&gt;&lt;?php _e('Edit'); ?&gt;&lt;/a&gt;
+                        &lt;# } #&gt;
</ins><span class="cx">                         &lt;# if ( data.clearable ) { #&gt;
</span><span class="cx">                                 &lt;a class=&quot;clear-selection&quot; href=&quot;#&quot;&gt;&lt;?php _e('Clear'); ?&gt;&lt;/a&gt;
</span><span class="cx">                         &lt;# } #&gt;
</span></span></pre>
</div>
</div>

</body>
</html>