<!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>[22204] trunk: Compress scripts/styles: 3.5-beta1-22204.</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/22204">22204</a></dd>
<dt>Author</dt> <dd>bumpbot</dd>
<dt>Date</dt> <dd>2012-10-11 22:58:47 +0000 (Thu, 11 Oct 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Compress scripts/styles: 3.5-beta1-22204.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminjsmediauploadminjs">trunk/wp-admin/js/media-upload.min.js</a></li>
<li><a href="#trunkwpincludescssmediaviewsmincss">trunk/wp-includes/css/media-views.min.css</a></li>
<li><a href="#trunkwpincludesjsmceviewminjs">trunk/wp-includes/js/mce-view.min.js</a></li>
<li><a href="#trunkwpincludesjsmediamodelsminjs">trunk/wp-includes/js/media-models.min.js</a></li>
<li><a href="#trunkwpincludesjsmediaviewsminjs">trunk/wp-includes/js/media-views.min.js</a></li>
<li><a href="#trunkwpincludesversionphp">trunk/wp-includes/version.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminjsmediauploadminjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/media-upload.min.js (22203 => 22204)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/media-upload.min.js        2012-10-11 22:26:06 UTC (rev 22203)
+++ trunk/wp-admin/js/media-upload.min.js        2012-10-11 22:58:47 UTC (rev 22204)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var wpActiveEditor;function send_to_editor(c){var b,a=typeof(tinymce)!=&quot;undefined&quot;,f=typeof(QTags)!=&quot;undefined&quot;;if(!wpActiveEditor){if(a&amp;&amp;tinymce.activeEditor){b=tinymce.activeEditor;wpActiveEditor=b.id}else{if(!f){return false}}}else{if(a){if(tinymce.activeEditor&amp;&amp;(tinymce.activeEditor.id==&quot;mce_fullscreen&quot;||tinymce.activeEditor.id==&quot;wp_mce_fullscreen&quot;)){b=tinymce.activeEditor}else{b=tinymce.get(wpActiveEditor)}}}if(b&amp;&amp;!b.isHidden()){if(tinymce.isIE&amp;&amp;b.windowManager.insertimagebookmark){b.selection.moveToBookmark(b.windowManager.insertimagebookmark)}if(c.indexOf(&quot;[caption&quot;)===0){if(b.wpSetImgCaption){c=b.wpSetImgCaption(c)}}else{if(c.indexOf(&quot;[gallery&quot;)===0){if(b.plugins.wpgallery){c=b.plugins.wpgallery._do_gallery(c)}}else{if(c.indexOf(&quot;[embed&quot;)===0){if(b.plugins.wordpress){c=b.plugins.wordpress._setEmbed(c)}}}}b.execCommand(&quot;mceInsertContent&quot;,false,c)
 }else{if(f){QTags.insertContent(c)}else{document.getElementById(wpActiveEditor).value+=c}}try{tb_remove()}catch(d){}}var tb_position;(function(a){tb_position=function(){var f=a(&quot;#TB_window&quot;),e=a(window).width(),d=a(window).height(),c=(720&lt;e)?720:e,b=0;if(a(&quot;body.admin-bar&quot;).length){b=28}if(f.size()){f.width(c-50).height(d-45-b);a(&quot;#TB_iframeContent&quot;).width(c-50).height(d-75-b);f.css({&quot;margin-left&quot;:&quot;-&quot;+parseInt(((c-50)/2),10)+&quot;px&quot;});if(typeof document.body.style.maxWidth!=&quot;undefined&quot;){f.css({top:20+b+&quot;px&quot;,&quot;margin-top&quot;:&quot;0&quot;})}}return a(&quot;a.thickbox&quot;).each(function(){var g=a(this).attr(&quot;href&quot;);if(!g){return}g=g.replace(/&amp;width=[0-9]+/g,&quot;&quot;);g=g.replace(/&amp;height=[0-9]+/g,&quot;&quot;);a(this).attr(&quot;href&quot;,g+&quot;&amp;width=&quot;+(c-80)+&quot;&amp;height=&quot;+(d-85-b))})};a(window).resize(function(){tb_position()});a(document).read
 y(function(b){b(&quot;a.thickbox&quot;).click(function(){var c;if(typeof(tinymce)!=&quot;undefined&quot;&amp;&amp;tinymce.isIE&amp;&amp;(c=tinymce.get(wpActiveEditor))&amp;&amp;!c.isHidden()){c.focus();c.windowManager.insertimagebookmark=c.selection.getBookmark()}})})})(jQuery);(function(b){var a={};wp.mce.media={insert:send_to_editor,add:function(e,c){var d=this.get(e);if(d){return d}d=a[e]=wp.media(_.defaults(c||{},{title:wp.media.view.l10n.insertMedia,multiple:true}));d.on(&quot;update:insert&quot;,function(f){this.insert(f.map(function(g){if(&quot;image&quot;===g.get(&quot;type&quot;)){return&quot;\n&quot;+wp.media.string.image(g)+&quot;\n&quot;}else{return wp.media.string.link(g)+&quot; &quot;}}).join(&quot;&quot;))},this);d.on(&quot;update:gallery&quot;,function(g){var f=wp.mce.view.get(&quot;gallery&quot;),h;if(!f){return}h=f.gallery.shortcode(g);this.insert(h.string());d.render(&quot;library&quot;)},this);return d},get:function(c){return a[c]},remove:function(c){dele
 te a[c]},init:function(){b(&quot;.insert-media&quot;).on(&quot;click&quot;,function(d){var c=b(this).data(&quot;editor&quot;),e;d.preventDefault();if(!c){return}e=wp.mce.media.get(c);if(e){e.open();return}wp.mce.media.add(c)})}};b(wp.mce.media.init)}(jQuery));
</del><span class="cx">\ No newline at end of file
</span><ins>+var wpActiveEditor;function send_to_editor(c){var b,a=typeof(tinymce)!=&quot;undefined&quot;,f=typeof(QTags)!=&quot;undefined&quot;;if(!wpActiveEditor){if(a&amp;&amp;tinymce.activeEditor){b=tinymce.activeEditor;wpActiveEditor=b.id}else{if(!f){return false}}}else{if(a){if(tinymce.activeEditor&amp;&amp;(tinymce.activeEditor.id==&quot;mce_fullscreen&quot;||tinymce.activeEditor.id==&quot;wp_mce_fullscreen&quot;)){b=tinymce.activeEditor}else{b=tinymce.get(wpActiveEditor)}}}if(b&amp;&amp;!b.isHidden()){if(tinymce.isIE&amp;&amp;b.windowManager.insertimagebookmark){b.selection.moveToBookmark(b.windowManager.insertimagebookmark)}if(c.indexOf(&quot;[caption&quot;)===0){if(b.wpSetImgCaption){c=b.wpSetImgCaption(c)}}else{if(c.indexOf(&quot;[gallery&quot;)===0){if(b.plugins.wpgallery){c=b.plugins.wpgallery._do_gallery(c)}}else{if(c.indexOf(&quot;[embed&quot;)===0){if(b.plugins.wordpress){c=b.plugins.wordpress._setEmbed(c)}}}}b.execCommand(&quot;mceInsertContent&quot;,false,c)
 }else{if(f){QTags.insertContent(c)}else{document.getElementById(wpActiveEditor).value+=c}}try{tb_remove()}catch(d){}}var tb_position;(function(a){tb_position=function(){var f=a(&quot;#TB_window&quot;),e=a(window).width(),d=a(window).height(),c=(720&lt;e)?720:e,b=0;if(a(&quot;body.admin-bar&quot;).length){b=28}if(f.size()){f.width(c-50).height(d-45-b);a(&quot;#TB_iframeContent&quot;).width(c-50).height(d-75-b);f.css({&quot;margin-left&quot;:&quot;-&quot;+parseInt(((c-50)/2),10)+&quot;px&quot;});if(typeof document.body.style.maxWidth!=&quot;undefined&quot;){f.css({top:20+b+&quot;px&quot;,&quot;margin-top&quot;:&quot;0&quot;})}}return a(&quot;a.thickbox&quot;).each(function(){var g=a(this).attr(&quot;href&quot;);if(!g){return}g=g.replace(/&amp;width=[0-9]+/g,&quot;&quot;);g=g.replace(/&amp;height=[0-9]+/g,&quot;&quot;);a(this).attr(&quot;href&quot;,g+&quot;&amp;width=&quot;+(c-80)+&quot;&amp;height=&quot;+(d-85-b))})};a(window).resize(function(){tb_position()});a(document).read
 y(function(b){b(&quot;a.thickbox&quot;).click(function(){var c;if(typeof(tinymce)!=&quot;undefined&quot;&amp;&amp;tinymce.isIE&amp;&amp;(c=tinymce.get(wpActiveEditor))&amp;&amp;!c.isHidden()){c.focus();c.windowManager.insertimagebookmark=c.selection.getBookmark()}})})})(jQuery);(function(b){var a={};wp.mce.media={insert:send_to_editor,add:function(e,c){var d=this.get(e);if(d){return d}d=a[e]=wp.media(_.defaults(c||{},{title:wp.media.view.l10n.insertMedia,multiple:true,describe:true}));d.on(&quot;update:insert&quot;,function(f){this.insert(f.map(function(g){if(&quot;image&quot;===g.get(&quot;type&quot;)){return&quot;\n&quot;+wp.media.string.image(g)+&quot;\n&quot;}else{return wp.media.string.link(g)+&quot; &quot;}}).join(&quot;&quot;))},this);d.on(&quot;update:gallery&quot;,function(g){var f=wp.mce.view.get(&quot;gallery&quot;),h;if(!f){return}h=f.gallery.shortcode(g);this.insert(h.string());d.render(&quot;library&quot;)},this);return d},get:function(c){return a[c]},remove:fu
 nction(c){delete a[c]},init:function(){b(&quot;.insert-media&quot;).on(&quot;click&quot;,function(d){var c=b(this).data(&quot;editor&quot;),e;d.preventDefault();if(!c){return}e=wp.mce.media.get(c);if(e){e.open();return}wp.mce.media.add(c)})}};b(wp.mce.media.init)}(jQuery));
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludescssmediaviewsmincss"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/css/media-views.min.css (22203 => 22204)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/media-views.min.css        2012-10-11 22:26:06 UTC (rev 22203)
+++ trunk/wp-includes/css/media-views.min.css        2012-10-11 22:58:47 UTC (rev 22204)
</span><span class="lines">@@ -1 +1 @@
</span><del>-.media-modal{position:fixed;top:80px;left:60px;right:60px;bottom:60px;z-index:125000}.media-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.8;z-index:120000}.media-modal-title,.media-modal-close{position:absolute;top:-40px;height:40px;line-height:40px;color:#fff;font-weight:200;text-shadow:0 0 16px rgba(0,0,0,0.6)}.media-modal-title{left:0;float:left;padding:0;margin:0;font-size:1.4em}.media-modal-close{right:0;float:right;text-decoration:none;font-size:1.8em}.media-modal-close:hover,.media-modal-close:focus{color:#fff;text-shadow:0 0 16px rgba(255,255,255,0.8)}.media-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;background:#fff}.media-toolbar{position:relative;z-index:50;height:60px;border-bottom:1px solid #dfdfdf}.media-toolbar-primary{float:right}.media-toolbar-secondary{float:left}.media-toolbar .media-button{float:left;margin-top:16px}.media-toolbar-primary .media-button{margin-left:10px}.med
 ia-toolbar-secondary .media-button{margin-right:10px}.media-workspace{position:relative;width:100%;height:100%}.upload-attachments{position:absolute;top:0;left:0;bottom:0;width:180px;margin:10px;text-align:center;border:3px dashed #dfdfdf;background:#fff;z-index:100}.upload-attachments h3{font-size:18px;font-weight:200;color:#777;padding:40px 0 0;margin:0}.upload-attachments span{display:block;color:#777;margin:10px 0}.upload-attachments a{display:inline-block;margin:0 auto}.drag-over .upload-attachments{width:auto;right:0;border-color:#83b4d8;box-shadow:0 0 0 10px #fff}.existing-attachments{position:absolute;top:0;left:200px;right:0;bottom:0;margin:0 20px}.media-workspace .attachments,.media-workspace .media-toolbar{-webkit-transition-property:left,right,top,bottom,margin;-moz-transition-property:left,right,top,bottom,margin;-ms-transition-property:left,right,top,bottom,margin;-o-transition-property:left,right,top,bottom,margin;transition-property:left,right,top,bottom,marg
 in;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;-ms-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s}.media-workspace .attachments{position:absolute;top:0;left:0;right:0;bottom:0;height:auto;width:auto}.media-workspace.with-toolbar .attachments{top:61px}.media-workspace .media-toolbar{margin-top:-61px}.media-workspace.with-toolbar .media-toolbar{margin-top:0}.media-workspace .media-toolbar .add-to-gallery{display:none}.attachments{position:relative;width:100%;height:100%}.attachments-header{position:absolute;top:0;left:0;right:0;height:50px;background:#fff}.attachments-header h3{float:left;margin:0;padding:0;line-height:50px;font-size:18px;font-weight:200}.attachments-header .search{float:right;margin-top:11px;padding:4px;line-height:18px;font-size:13px;color:#464646;font-family:sans-serif}.attachments ul{position:absolute;top:50px;left:0;right:0;bottom:0;overflow:auto;margin:0 -10px 20px}.attachment{position:relative;float:left;widt
 h:199px;height:199px;padding:0;margin:0 10px 20px;box-shadow:inset 0 0 15px rgba(0,0,0,0.1),inset 0 0 0 1px rgba(0,0,0,0.05);background:#eee;cursor:pointer;color:#464646;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.attachment.library.selected:after{content:'\2713';display:block;height:24px;width:24px;position:absolute;top:0;left:0;line-height:24px;font-size:18px;text-align:center;color:#fff;background:#21759b}.attachment-preview{position:absolute;top:0;left:0;right:0;bottom:0;overflow:hidden}.attachment .icon,.attachment .thumbnail{display:block;position:absolute;top:0;left:0;margin:0 auto}.attachment .icon{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.attachment .filename{margin-top:140px;padding:0 10px;text-align:center;font-weight:bold}.attachment .thumbnail,.attachme
 nt .thumbnail img{-webkit-transition-property:width,height,top,left,right,bottom;-moz-transition-property:width,height,top,left,right,bottom;-ms-transition-property:width,height,top,left,right,bottom;-o-transition-property:width,height,top,left,right,bottom;transition-property:width,height,top,left,right,bottom;-webkit-transition-duration:80ms;-moz-transition-duration:80ms;-ms-transition-duration:80ms;-o-transition-duration:80ms;transition-duration:80ms;-webkit-transition-delay:200ms;-moz-transition-delay:200ms;-ms-transition-delay:200ms;-o-transition-delay:200ms;transition-delay:200ms}.attachment .thumbnail{width:199px;height:199px}.attachment .thumbnail:after{content:'';display:block;position:absolute;top:0;left:0;right:0;bottom:0;box-shadow:inset 0 0 0 1px rgba(0,0,0,0.1);overflow:hidden}.attachment.fit .thumbnail:after{box-shadow:inset 0 0 0 1px rgba(0,0,0,0.15)}.attachment .thumbnail img{position:absolute}.attachment .insert{display:none;position:absolute;left:7px;botto
 m:7px}.attachment:hover .insert{display:block}.attachment .close{display:none;position:absolute;top:0;right:0;height:26px;width:26px;font-size:20px;line-height:24px;text-align:center;text-decoration:none;color:#464646;background:#fff}.attachment:hover .close{display:block}.media-progress-bar{position:relative;height:8px;width:70%;margin:10px auto;padding:2px;border:2px solid #dfdfdf;border-radius:8px}.media-progress-bar div{height:8px;min-width:8px;width:0;background:#dfdfdf;border-radius:10px;-webkit-transition:width 200ms;-moz-transition:width 200ms;-ms-transition:width 200ms;-o-transition:width 200ms;transition:width 200ms}.attachment-preview .media-progress-bar{position:absolute;top:50%;left:15%;width:70%;margin:-8px 0 0 -4px}.upload-attachments .media-progress-bar{margin-top:80px;display:none}.uploading .upload-attachments .media-progress-bar{display:block}.selection-preview{position:relative;height:60px;overflow:hidden}.selected-img{float:left;position:relative;margin-
 right:14px}.selection-preview img{max-width:40px;max-height:40px;float:left;margin-top:6px;margin-left:1px;border:2px solid white;box-shadow:0 0 0 1px #ccc,3px 3px 0 0 #fff,3px 3px 0 1px #ccc,6px 6px 0 0 #fff,6px 6px 0 1px #ccc}.selection-preview .selected-count-1 img{margin-top:8px;box-shadow:0 0 0 1px #ccc}.selection-preview .selected-count-2 img{margin-top:7px;box-shadow:0 0 0 1px #ccc,3px 3px 0 0 #fff,3px 3px 0 1px #ccc}.selection-preview .count{position:absolute;bottom:0;right:0;height:16px;min-width:8px;padding:0 4px;font-size:12px;text-align:center;font-weight:bold;color:#999;background:#fff;box-shadow:-1px -1px 2px -1px rgba(0,0,0,0.2)}.selection-preview .clear-selection{float:left;line-height:60px}
</del><span class="cx">\ No newline at end of file
</span><ins>+.media-modal{position:fixed;top:80px;left:60px;right:60px;bottom:60px;z-index:125000}.media-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;background:#000;opacity:.8;z-index:120000}.media-modal-title,.media-modal-close{position:absolute;top:-40px;height:40px;line-height:40px;color:#fff;font-weight:200;text-shadow:0 0 16px rgba(0,0,0,0.6)}.media-modal-title{left:0;float:left;padding:0;margin:0;font-size:1.4em}.media-modal-close{right:0;float:right;text-decoration:none;font-size:1.8em}.media-modal-close:hover,.media-modal-close:focus{color:#fff;text-shadow:0 0 16px rgba(255,255,255,0.8)}.media-modal-close:active{outline:0}.media-modal-content{position:absolute;top:0;left:0;right:0;bottom:0;overflow:auto;background:#fff}.media-toolbar{position:relative;z-index:50;height:60px;border-bottom:1px solid #dfdfdf}.media-toolbar-primary{float:right}.media-toolbar-secondary{float:left}.media-toolbar .media-button{float:left;margin-top:16px}.media-toolbar-primary
  .media-button{margin-left:10px}.media-toolbar-secondary .media-button{margin-right:10px}.media-workspace{position:relative;width:100%;height:100%}.upload-attachments{position:absolute;top:0;left:0;bottom:0;width:180px;margin:10px;text-align:center;border:3px dashed #dfdfdf;background:#fff;z-index:100}.upload-attachments h3{font-size:18px;font-weight:200;color:#777;padding:40px 0 0;margin:0}.upload-attachments span{display:block;color:#777;margin:10px 0}.upload-attachments a{display:inline-block;margin:0 auto}.drag-over .upload-attachments{width:auto;right:0;border-color:#83b4d8;box-shadow:0 0 0 10px #fff}.existing-attachments{position:absolute;top:0;left:200px;right:0;bottom:0;margin:0 20px}.media-workspace .attachments,.media-workspace .media-toolbar{-webkit-transition-property:left,right,top,bottom,margin;-moz-transition-property:left,right,top,bottom,margin;-ms-transition-property:left,right,top,bottom,margin;-o-transition-property:left,right,top,bottom,margin;transition
 -property:left,right,top,bottom,margin;-webkit-transition-duration:.2s;-moz-transition-duration:.2s;-ms-transition-duration:.2s;-o-transition-duration:.2s;transition-duration:.2s}.media-workspace .attachments{position:absolute;top:0;left:0;right:0;bottom:0;height:auto;width:auto}.media-workspace.with-toolbar .attachments{top:61px}.media-workspace .media-toolbar{margin-top:-61px}.media-workspace.with-toolbar .media-toolbar{margin-top:0}.media-workspace .media-toolbar .add-to-gallery{display:none}.attachments{position:relative;width:100%;height:100%}.attachments-header{position:absolute;top:0;left:0;right:0;height:50px;background:#fff}.attachments-header h3{float:left;margin:0;padding:0;line-height:50px;font-size:18px;font-weight:200}.attachments-header .search{float:right;margin-top:11px;padding:4px;line-height:18px;font-size:13px;color:#464646;font-family:sans-serif}.attachments ul{position:absolute;top:50px;left:0;right:0;bottom:0;overflow:auto;margin:0 -10px 20px}.attachme
 nt{position:relative;float:left;padding:0;margin:0 10px 20px;color:#464646;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.attachment.library.selected:after{content:'\2713';display:block;height:24px;width:24px;position:absolute;top:0;left:0;line-height:24px;font-size:18px;text-align:center;color:#fff;background:#21759b}.attachment-preview{position:relative;width:199px;height:199px;overflow:hidden;box-shadow:inset 0 0 15px rgba(0,0,0,0.1),inset 0 0 0 1px rgba(0,0,0,0.05);background:#eee;cursor:pointer}.attachment .icon,.attachment .thumbnail{display:block;position:absolute;top:0;left:0;margin:0 auto}.attachment .icon{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.attachment .filename{margin-top:140px;padding:0 10px;text-align:center;font-weight:bold}.attachment .thumbnail,.at
 tachment .thumbnail img{-webkit-transition-property:width,height,top,left,right,bottom;-moz-transition-property:width,height,top,left,right,bottom;-ms-transition-property:width,height,top,left,right,bottom;-o-transition-property:width,height,top,left,right,bottom;transition-property:width,height,top,left,right,bottom;-webkit-transition-duration:80ms;-moz-transition-duration:80ms;-ms-transition-duration:80ms;-o-transition-duration:80ms;transition-duration:80ms;-webkit-transition-delay:200ms;-moz-transition-delay:200ms;-ms-transition-delay:200ms;-o-transition-delay:200ms;transition-delay:200ms}.attachment .thumbnail{width:199px;height:199px}.attachment .thumbnail:after{content:'';display:block;position:absolute;top:0;left:0;right:0;bottom:0;box-shadow:inset 0 0 0 1px rgba(0,0,0,0.1);overflow:hidden}.attachment.fit .thumbnail:after{box-shadow:inset 0 0 0 1px rgba(0,0,0,0.15)}.attachment .thumbnail img{position:absolute}.attachment .insert{display:none;position:absolute;left:7px
 ;bottom:7px}.attachment:hover .insert{display:block}.attachment .close{display:none;position:absolute;top:5px;right:5px;height:22px;width:22px;padding:0;font-size:20px;line-height:20px;text-align:center;text-decoration:none;color:#464646;background:#fff;border-width:0;box-shadow:0 0 0 1px rgba(0,0,0,0.3)}.attachment .close:hover{box-shadow:0 0 0 1px rgba(0,0,0,0.6)}.attachment:hover .close{display:block}.attachment .describe{position:relative;display:block;width:100%;height:50px;margin:-1px 0 0;padding:8px;font-size:12px;resize:none;border-radius:0}.media-progress-bar{position:relative;height:8px;width:70%;margin:10px auto;padding:2px;border:2px solid #ccc;border-radius:8px;background:#fff}.media-progress-bar div{height:8px;min-width:8px;width:0;background:#ccc;border-radius:10px;-webkit-transition:width 300ms;-moz-transition:width 300ms;-ms-transition:width 300ms;-o-transition:width 300ms;transition:width 300ms}.attachment-preview .media-progress-bar{position:absolute;top:5
 0%;left:15%;width:70%;margin:-8px 0 0 -4px}.upload-attachments .media-progress-bar{margin-top:80px;display:none}.uploading .upload-attachments .media-progress-bar{display:block}.selection-preview{position:relative;height:60px;overflow:hidden}.selected-img{float:left;position:relative;margin-right:14px}.selection-preview img{max-width:40px;max-height:40px;float:left;margin-top:6px;margin-left:1px;border:2px solid white;box-shadow:0 0 0 1px #ccc,3px 3px 0 0 #fff,3px 3px 0 1px #ccc,6px 6px 0 0 #fff,6px 6px 0 1px #ccc}.selection-preview .selected-count-1 img{margin-top:8px;box-shadow:0 0 0 1px #ccc}.selection-preview .selected-count-2 img{margin-top:7px;box-shadow:0 0 0 1px #ccc,3px 3px 0 0 #fff,3px 3px 0 1px #ccc}.selection-preview .count{position:absolute;bottom:0;right:0;height:16px;min-width:8px;padding:0 4px;font-size:12px;text-align:center;font-weight:bold;color:#999;background:#fff;box-shadow:-1px -1px 2px -1px rgba(0,0,0,0.2)}.selection-preview .clear-selection{float:lef
 t;line-height:60px}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjsmceviewminjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/mce-view.min.js (22203 => 22204)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/mce-view.min.js        2012-10-11 22:26:06 UTC (rev 22203)
+++ trunk/wp-includes/js/mce-view.min.js        2012-10-11 22:58:47 UTC (rev 22204)
</span><span class="lines">@@ -1 +1 @@
</span><del>-window.wp=window.wp||{};(function(){wp.html=_.extend(wp.html||{},{attrs:function(c){var a,b;if(&quot;/&quot;===c[c.length-1]){c=c.slice(0,-1)}a=wp.shortcode.attrs(c);b=a.named;_.each(a.numeric,function(d){if(/\s/.test(d)){return}b[d]=&quot;&quot;});return b},string:function(a){var c=&quot;&lt;&quot;+a.tag,b=a.content||&quot;&quot;;_.each(a.attrs,function(e,d){c+=&quot; &quot;+d;if(&quot;&quot;===e){return}if(_.isBoolean(e)){e=e?&quot;true&quot;:&quot;false&quot;}c+='=&quot;'+e+'&quot;'});if(a.single){return c+&quot; /&gt;&quot;}c+=&quot;&gt;&quot;;c+=_.isObject(b)?wp.html.string(b):b;return c+&quot;&lt;/&quot;+a.tag+&quot;&gt;&quot;}})}());(function(b){var a={},c={};wp.mce=wp.mce||{};wp.mce.view={defaults:{pattern:{view:Backbone.View,text:function(d){return d.options.original},toView:function(e){if(!this.pattern){return}this.pattern.lastIndex=0;var d=this.pattern.exec(e);if(!d){return}return{index:d.index,content:d[0],options:{original:d[0],results:d}}}},shortcod
 e:{view:Backbone.View,text:function(d){return d.options.shortcode.string()},toView:function(e){var d=wp.shortcode.next(this.shortcode,e);if(!d){return}return{index:d.index,content:d.content,options:{shortcode:d.shortcode}}}}},add:function(i,e){var g,d,h,f;if(e.extend){g=wp.mce.view.get(e.extend)}else{if(e.shortcode){g=wp.mce.view.defaults.shortcode}else{g=wp.mce.view.defaults.pattern}}_.defaults(e,g);e.id=i;f={remove:function(){delete c[this.el.id];this.$el.parent().remove();if(d){d.apply(this,arguments)}return this}};if(_.isFunction(e.view)){h=e.view}else{h=g.view;d=e.view.remove;_.defaults(f,e.view)}if(!d&amp;&amp;!h._mceview){d=h.prototype.remove}e.view=h.extend(f,{_mceview:true});a[i]=e},get:function(d){return a[d]},remove:function(d){delete a[d]},toViews:function(e){var d=[{content:e}],f;_.each(a,function(h,g){f=d.slice();d=[];_.each(f,function(k){var j=k.content,i;if(k.processed){d.push(k);return}while(j&amp;&amp;(i=h.toView(j))){if(i.index){d.push({content:j.substring
 (0,i.index)})}d.push({content:wp.mce.view.toView(g,i.options),processed:true});j=j.slice(i.index+i.content.length)}if(j){d.push({content:j})}})});return _.pluck(d,&quot;content&quot;).join(&quot;&quot;)},toView:function(f,h){var g=wp.mce.view.get(f),e,i,d;if(!g){return&quot;&quot;}e=new g.view(_.extend(h||{},{viewType:f}));i=e.el.id=e.el.id||_.uniqueId(&quot;__wpmce-&quot;);c[i]=e;d=&quot;span&quot;===e.tagName?&quot;span&quot;:&quot;div&quot;;return&quot;&lt;&quot;+d+' class=&quot;wp-view-wrap&quot; data-wp-view=&quot;'+i+'&quot; contenteditable=&quot;false&quot;&gt;&lt;/'+d+&quot;&gt;&quot;},render:function(d){b(&quot;.wp-view-wrap&quot;,d).each(function(){var g=b(this),f=g.data(&quot;wp-view&quot;),e=c[f];if(!e){return}e.render();e.$el.detach();g.empty().append(e.el).append('&lt;span data-wp-view-end class=&quot;wp-view-end&quot;&gt;&lt;/span&gt;')})},toText:function(d){return d.replace(/&lt;(?:div|span)[^&gt;]+data-wp-view=&quot;([^&quot;]+)&quot;[^&gt;]*&gt;.*?&lt;span[
 ^&gt;]+data-wp-view-end[^&gt;]*&gt;&lt;\/span&gt;&lt;\/(?:div|span)&gt;/g,function(g,h){var e=c[h],f;if(e){f=wp.mce.view.get(e.options.viewType)}return e&amp;&amp;f?f.text(e):&quot;&quot;})},removeInternalAttrs:function(e){var d={};_.each(e,function(g,f){if(-1===f.indexOf(&quot;data-mce&quot;)){d[f]=g}});return d},attrs:function(d){return wp.mce.view.removeInternalAttrs(wp.html.attrs(d))},l10n:_.isUndefined(_wpMceViewL10n)?{}:_wpMceViewL10n}}(jQuery));(function(b){var a=wp.mce.view;wp.media.string={};wp.media.string.link=function(e){var d=getUserSetting(&quot;urlbutton&quot;,&quot;post&quot;),c={tag:&quot;a&quot;,content:e.get(&quot;title&quot;)||e.get(&quot;filename&quot;),attrs:{rel:&quot;attachment wp-att-&quot;+e.id}};c.attrs.href=(d===&quot;file&quot;)?e.get(&quot;url&quot;):e.get(&quot;link&quot;);return wp.html.string(c)};wp.media.string.image=function(h,g){var f,c,d,e;h=h.toJSON();g=_.defaults(g||{},{img:{},align:getUserSetting(&quot;align&quot;,&quot;none&quot;),siz
 e:getUserSetting(&quot;imgsize&quot;,&quot;medium&quot;),link:getUserSetting(&quot;urlbutton&quot;,&quot;post&quot;)});c=_.clone(g.img);f=c[&quot;class&quot;]?c[&quot;class&quot;].split(/\s+/):[];e=h.sizes?h.sizes[g.size]:{};if(!e){delete g.size;e=h}c.width=e.width;c.height=e.height;c.src=e.url;if(g.align){f.push(&quot;align&quot;+g.align)}if(g.size){f.push(&quot;size-&quot;+g.size)}f.push(&quot;wp-image-&quot;+h.id);c[&quot;class&quot;]=_.compact(f).join(&quot; &quot;);d={tag:&quot;img&quot;,attrs:c,single:true};if(g.anchor){d={tag:&quot;a&quot;,attrs:g.anchor,content:d}}return wp.html.string(d)};a.add(&quot;attachment&quot;,{pattern:new RegExp(&quot;(?:&lt;a([^&gt;]*)&gt;)?&lt;img([^&gt;]*class=(?:\&quot;[^\&quot;]*|'[^']*)\\bwp-image-(\\d+)[^&gt;]*)&gt;(?:&lt;/a&gt;)?&quot;),text:function(c){var d=_.pick(c,&quot;align&quot;,&quot;size&quot;,&quot;link&quot;,&quot;img&quot;,&quot;anchor&quot;);return wp.media.string.image(c.model,d)},view:{className:&quot;editor-attachment
 &quot;,template:media.template(&quot;editor-attachment&quot;),events:{&quot;click .close&quot;:&quot;remove&quot;},initialize:function(){var c=this,d=this.options.results,f=d[3],e;this.model=wp.media.model.Attachment.get(f);if(d[1]){this.anchor=a.attrs(d[1])}this.img=a.attrs(d[2]);e=this.img[&quot;class&quot;];e=e.replace(/(?:^|\s)wp-image-\d+/,&quot;&quot;);e=e.replace(/(?:^|\s)size-(\S+)/,function(g,h){c.size=h;return&quot;&quot;});e=e.replace(/(?:^|\s)align(left|center|right|none)(?:\s|$)/,function(g,h){c.align=h;return&quot;&quot;});this.img[&quot;class&quot;]=e;this.$el.addClass(&quot;spinner&quot;);this.model.fetch().done(_.bind(this.render,this))},render:function(){var d=this.model.toJSON(),c;if(!d.url){return}c={url:&quot;image&quot;===d.type?d.url:d.icon,uploading:d.uploading};_.extend(c,wp.media.fit({width:d.width,height:d.height,maxWidth:a.l10n.contentWidth}));if(this.size&amp;&amp;d.sizes&amp;&amp;d.sizes[this.size]){_.extend(c,_.pick(d.sizes[this.size],&quot;url
 &quot;,&quot;width&quot;,&quot;height&quot;))}this.$el.html(this.template(c))}}});a.add(&quot;gallery&quot;,{shortcode:&quot;gallery&quot;,gallery:(function(){var c={};return{attachments:function(h,g){var i=h.string(),d=c[i],f,e;delete c[i];if(d){return d}f=h.attrs.named;e=_.pick(f,&quot;orderby&quot;,&quot;order&quot;);e.type=&quot;image&quot;;e.perPage=-1;if(f.ids){e.post__in=f.ids.split(&quot;,&quot;);e.orderby=&quot;post__in&quot;}else{if(f.include){e.post__in=f.include.split(&quot;,&quot;)}}if(f.exclude){e.post__not_in=f.exclude.split(&quot;,&quot;)}if(!e.post__in){e.parent=f.id||g}return media.query(e)},shortcode:function(d){var f=d.props.toJSON(),e=_.pick(f,&quot;include&quot;,&quot;exclude&quot;,&quot;orderby&quot;,&quot;order&quot;),g;e.ids=d.pluck(&quot;id&quot;);g=new wp.shortcode({tag:&quot;gallery&quot;,attrs:e,type:&quot;single&quot;});c[g.string()]=new wp.media.model.Attachments(d.models,{props:f});return g}}}()),view:{className:&quot;editor-gallery&quot;,temp
 late:media.template(&quot;editor-gallery&quot;),parent:b(&quot;#post_ID&quot;).val(),events:{&quot;click .close&quot;:&quot;remove&quot;,&quot;click .edit&quot;:&quot;edit&quot;},initialize:function(){this.update()},update:function(){var c=a.get(&quot;gallery&quot;);this.attachments=c.gallery.attachments(this.options.shortcode,this.parent);this.attachments.more().done(_.bind(this.render,this))},render:function(){var c,e,d;if(!this.attachments.length){return}e=this.attachments.first().toJSON();d=e.sizes&amp;&amp;e.sizes.thumbnail?e.sizes.thumbnail:e;c={url:d.url,orientation:d.orientation,count:this.attachments.length};this.$el.html(this.template(c))},edit:function(){if(!wp.media.view||this.workflow){return}this.workflow=wp.media({view:&quot;gallery&quot;,selection:this.attachments.models,title:a.l10n.editGallery,editing:true,multiple:true});this.workflow.on(&quot;close&quot;,function(){this.workflow.detach();delete this.workflow},this);this.workflow.on(&quot;update:gallery&qu
 ot;,function(d){var c=a.get(&quot;gallery&quot;);this.options.shortcode=c.gallery.shortcode(d);this.update()},this)}}})}(jQuery));
</del><span class="cx">\ No newline at end of file
</span><ins>+window.wp=window.wp||{};(function(){wp.html=_.extend(wp.html||{},{attrs:function(c){var a,b;if(&quot;/&quot;===c[c.length-1]){c=c.slice(0,-1)}a=wp.shortcode.attrs(c);b=a.named;_.each(a.numeric,function(d){if(/\s/.test(d)){return}b[d]=&quot;&quot;});return b},string:function(a){var c=&quot;&lt;&quot;+a.tag,b=a.content||&quot;&quot;;_.each(a.attrs,function(e,d){c+=&quot; &quot;+d;if(&quot;&quot;===e){return}if(_.isBoolean(e)){e=e?&quot;true&quot;:&quot;false&quot;}c+='=&quot;'+e+'&quot;'});if(a.single){return c+&quot; /&gt;&quot;}c+=&quot;&gt;&quot;;c+=_.isObject(b)?wp.html.string(b):b;return c+&quot;&lt;/&quot;+a.tag+&quot;&gt;&quot;}})}());(function(b){var a={},c={};wp.mce=wp.mce||{};wp.mce.view={defaults:{pattern:{view:Backbone.View,text:function(d){return d.options.original},toView:function(e){if(!this.pattern){return}this.pattern.lastIndex=0;var d=this.pattern.exec(e);if(!d){return}return{index:d.index,content:d[0],options:{original:d[0],results:d}}}},shortcod
 e:{view:Backbone.View,text:function(d){return d.options.shortcode.string()},toView:function(e){var d=wp.shortcode.next(this.shortcode,e);if(!d){return}return{index:d.index,content:d.content,options:{shortcode:d.shortcode}}}}},add:function(i,e){var g,d,h,f;if(e.extend){g=wp.mce.view.get(e.extend)}else{if(e.shortcode){g=wp.mce.view.defaults.shortcode}else{g=wp.mce.view.defaults.pattern}}_.defaults(e,g);e.id=i;f={remove:function(){delete c[this.el.id];this.$el.parent().remove();if(d){d.apply(this,arguments)}return this}};if(_.isFunction(e.view)){h=e.view}else{h=g.view;d=e.view.remove;_.defaults(f,e.view)}if(!d&amp;&amp;!h._mceview){d=h.prototype.remove}e.view=h.extend(f,{_mceview:true});a[i]=e},get:function(d){return a[d]},remove:function(d){delete a[d]},toViews:function(e){var d=[{content:e}],f;_.each(a,function(h,g){f=d.slice();d=[];_.each(f,function(k){var j=k.content,i;if(k.processed){d.push(k);return}while(j&amp;&amp;(i=h.toView(j))){if(i.index){d.push({content:j.substring
 (0,i.index)})}d.push({content:wp.mce.view.toView(g,i.options),processed:true});j=j.slice(i.index+i.content.length)}if(j){d.push({content:j})}})});return _.pluck(d,&quot;content&quot;).join(&quot;&quot;)},toView:function(f,h){var g=wp.mce.view.get(f),e,i,d;if(!g){return&quot;&quot;}e=new g.view(_.extend(h||{},{viewType:f}));i=e.el.id=e.el.id||_.uniqueId(&quot;__wpmce-&quot;);c[i]=e;d=&quot;span&quot;===e.tagName?&quot;span&quot;:&quot;div&quot;;return&quot;&lt;&quot;+d+' class=&quot;wp-view-wrap&quot; data-wp-view=&quot;'+i+'&quot; contenteditable=&quot;false&quot;&gt;&lt;/'+d+&quot;&gt;&quot;},render:function(d){b(&quot;.wp-view-wrap&quot;,d).each(function(){var g=b(this),f=g.data(&quot;wp-view&quot;),e=c[f];if(!e){return}e.render();e.$el.detach();g.empty().append(e.el).append('&lt;span data-wp-view-end class=&quot;wp-view-end&quot;&gt;&lt;/span&gt;')})},toText:function(d){return d.replace(/&lt;(?:div|span)[^&gt;]+data-wp-view=&quot;([^&quot;]+)&quot;[^&gt;]*&gt;.*?&lt;span[
 ^&gt;]+data-wp-view-end[^&gt;]*&gt;&lt;\/span&gt;&lt;\/(?:div|span)&gt;/g,function(g,h){var e=c[h],f;if(e){f=wp.mce.view.get(e.options.viewType)}return e&amp;&amp;f?f.text(e):&quot;&quot;})},removeInternalAttrs:function(e){var d={};_.each(e,function(g,f){if(-1===f.indexOf(&quot;data-mce&quot;)){d[f]=g}});return d},attrs:function(d){return wp.mce.view.removeInternalAttrs(wp.html.attrs(d))},l10n:_.isUndefined(_wpMceViewL10n)?{}:_wpMceViewL10n}}(jQuery));(function(b){var a=wp.mce.view;wp.media.string={};wp.media.string.link=function(e){var d=getUserSetting(&quot;urlbutton&quot;,&quot;post&quot;),c={tag:&quot;a&quot;,content:e.get(&quot;title&quot;)||e.get(&quot;filename&quot;),attrs:{rel:&quot;attachment wp-att-&quot;+e.id}};c.attrs.href=(d===&quot;file&quot;)?e.get(&quot;url&quot;):e.get(&quot;link&quot;);return wp.html.string(c)};wp.media.string.image=function(h,g){var f,c,d,e;h=h.toJSON();g=_.defaults(g||{},{img:{},align:getUserSetting(&quot;align&quot;,&quot;none&quot;),siz
 e:getUserSetting(&quot;imgsize&quot;,&quot;medium&quot;),link:getUserSetting(&quot;urlbutton&quot;,&quot;post&quot;)});c=_.clone(g.img);f=c[&quot;class&quot;]?c[&quot;class&quot;].split(/\s+/):[];e=h.sizes?h.sizes[g.size]:{};if(!e){delete g.size;e=h}c.width=e.width;c.height=e.height;c.src=e.url;if(g.align){f.push(&quot;align&quot;+g.align)}if(g.size){f.push(&quot;size-&quot;+g.size)}f.push(&quot;wp-image-&quot;+h.id);c[&quot;class&quot;]=_.compact(f).join(&quot; &quot;);d={tag:&quot;img&quot;,attrs:c,single:true};if(g.anchor){d={tag:&quot;a&quot;,attrs:g.anchor,content:d}}return wp.html.string(d)};a.add(&quot;attachment&quot;,{pattern:new RegExp(&quot;(?:&lt;a([^&gt;]*)&gt;)?&lt;img([^&gt;]*class=(?:\&quot;[^\&quot;]*|'[^']*)\\bwp-image-(\\d+)[^&gt;]*)&gt;(?:&lt;/a&gt;)?&quot;),text:function(c){var d=_.pick(c,&quot;align&quot;,&quot;size&quot;,&quot;link&quot;,&quot;img&quot;,&quot;anchor&quot;);return wp.media.string.image(c.model,d)},view:{className:&quot;editor-attachment
 &quot;,template:media.template(&quot;editor-attachment&quot;),events:{&quot;click .close&quot;:&quot;remove&quot;},initialize:function(){var c=this,d=this.options.results,f=d[3],e;this.model=wp.media.model.Attachment.get(f);if(d[1]){this.anchor=a.attrs(d[1])}this.img=a.attrs(d[2]);e=this.img[&quot;class&quot;];e=e.replace(/(?:^|\s)wp-image-\d+/,&quot;&quot;);e=e.replace(/(?:^|\s)size-(\S+)/,function(g,h){c.size=h;return&quot;&quot;});e=e.replace(/(?:^|\s)align(left|center|right|none)(?:\s|$)/,function(g,h){c.align=h;return&quot;&quot;});this.img[&quot;class&quot;]=e;this.$el.addClass(&quot;spinner&quot;);this.model.fetch().done(_.bind(this.render,this))},render:function(){var d=this.model.toJSON(),c;if(!d.url){return}c={url:&quot;image&quot;===d.type?d.url:d.icon,uploading:d.uploading};_.extend(c,wp.media.fit({width:d.width,height:d.height,maxWidth:a.l10n.contentWidth}));if(this.size&amp;&amp;d.sizes&amp;&amp;d.sizes[this.size]){_.extend(c,_.pick(d.sizes[this.size],&quot;url
 &quot;,&quot;width&quot;,&quot;height&quot;))}this.$el.html(this.template(c))}}});a.add(&quot;gallery&quot;,{shortcode:&quot;gallery&quot;,gallery:(function(){var c={};return{attachments:function(h,g){var i=h.string(),d=c[i],f,e;delete c[i];if(d){return d}f=h.attrs.named;e=_.pick(f,&quot;orderby&quot;,&quot;order&quot;);e.type=&quot;image&quot;;e.perPage=-1;if(f.ids){e.post__in=f.ids.split(&quot;,&quot;);e.orderby=&quot;post__in&quot;}else{if(f.include){e.post__in=f.include.split(&quot;,&quot;)}}if(f.exclude){e.post__not_in=f.exclude.split(&quot;,&quot;)}if(!e.post__in){e.parent=f.id||g}return media.query(e)},shortcode:function(d){var f=d.props.toJSON(),e=_.pick(f,&quot;include&quot;,&quot;exclude&quot;,&quot;orderby&quot;,&quot;order&quot;),g;e.ids=d.pluck(&quot;id&quot;);g=new wp.shortcode({tag:&quot;gallery&quot;,attrs:e,type:&quot;single&quot;});c[g.string()]=new wp.media.model.Attachments(d.models,{props:f});return g}}}()),view:{className:&quot;editor-gallery&quot;,temp
 late:media.template(&quot;editor-gallery&quot;),parent:b(&quot;#post_ID&quot;).val(),events:{&quot;click .close&quot;:&quot;remove&quot;,&quot;click .edit&quot;:&quot;edit&quot;},initialize:function(){this.update()},update:function(){var c=a.get(&quot;gallery&quot;);this.attachments=c.gallery.attachments(this.options.shortcode,this.parent);this.attachments.more().done(_.bind(this.render,this))},render:function(){var c,e,d;if(!this.attachments.length){return}e=this.attachments.first().toJSON();d=e.sizes&amp;&amp;e.sizes.thumbnail?e.sizes.thumbnail:e;c={url:d.url,orientation:d.orientation,count:this.attachments.length};this.$el.html(this.template(c))},edit:function(){if(!wp.media.view||this.workflow){return}this.workflow=wp.media({view:&quot;gallery&quot;,selection:this.attachments.models,title:a.l10n.editGallery,editing:true,multiple:true,describe:true});this.workflow.on(&quot;close&quot;,function(){this.workflow.detach();delete this.workflow},this);this.workflow.on(&quot;upd
 ate:gallery&quot;,function(d){var c=a.get(&quot;gallery&quot;);this.options.shortcode=c.gallery.shortcode(d);this.update()},this)}}})}(jQuery));
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjsmediamodelsminjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/media-models.min.js (22203 => 22204)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/media-models.min.js        2012-10-11 22:26:06 UTC (rev 22203)
+++ trunk/wp-includes/js/media-models.min.js        2012-10-11 22:58:47 UTC (rev 22204)
</span><span class="lines">@@ -1 +1 @@
</span><del>-window.wp=window.wp||{};(function(e){var c,b,a,d;media=wp.media=function(f){if(media.controller.Workflow){return new media.controller.Workflow(f).attach().render()}};_.extend(media,{model:{},view:{},controller:{}});d=function(g,f,h,i){if(_.isEqual(g,f)){return h===i?0:(h&gt;i?-1:1)}else{return g&gt;f?-1:1}};_.extend(media,{template:_.memoize(function(g){var f;return function(h){f=f||_.template(e(&quot;#tmpl-&quot;+g).html());return f(h)}}),post:function(g,f){return media.ajax({data:_.isObject(g)?g:_.extend(f||{},{action:g})})},ajax:function(g,f){if(_.isObject(g)){f=g}else{f=f||{};f.data=_.extend(f.data||{},{action:g})}f=_.defaults(f||{},{type:&quot;POST&quot;,url:ajaxurl,context:this});return e.Deferred(function(h){if(f.success){h.done(f.success)}if(f.error){h.fail(f.error)}delete f.success;delete f.error;e.ajax(f).done(function(i){if(_.isObject(i)&amp;&amp;!_.isUndefined(i.success)){h[i.success?&quot;resolveWith&quot;:&quot;rejectWith&quot;](this,[i.data])}else{
 h.rejectWith(this,[i])}}).fail(function(){h.rejectWith(this,arguments)})}).promise()},fit:function(j){var g=j.width,f=j.height,i=j.maxWidth,h=j.maxHeight,k;if(!_.isUndefined(i)&amp;&amp;!_.isUndefined(h)){k=(g/f&gt;i/h)?&quot;width&quot;:&quot;height&quot;}else{if(_.isUndefined(h)){k=&quot;width&quot;}else{if(_.isUndefined(i)&amp;&amp;f&gt;h){k=&quot;height&quot;}}}if(&quot;width&quot;===k&amp;&amp;g&gt;i){return{width:i,height:Math.round(i*f/g)}}else{if(&quot;height&quot;===k&amp;&amp;f&gt;h){return{width:Math.round(h*g/f),height:h}}else{return{width:g,height:f}}}}});c=media.model.Attachment=Backbone.Model.extend({sync:function(h,g,f){if(&quot;read&quot;===h){f=f||{};f.context=this;f.data=_.extend(f.data||{},{action:&quot;get-attachment&quot;,id:this.id});return media.ajax(f)}else{return Backbone.sync.apply(this,arguments)}},parse:function(g,f){g.date=new Date(g.date);g.modified=new Date(g.modified);return g}},{create:function(f){return b.all.push(f)},get:_.memoize(function
 (g,f){return b.all.push(f||{id:g})})});b=media.model.Attachments=Backbone.Collection.extend({model:c,initialize:function(g,f){f=f||{};this.props=new Backbone.Model();this.filters=f.filters||{};this.props.on(&quot;change:order&quot;,this._changeOrder,this);this.props.on(&quot;change:orderby&quot;,this._changeOrderby,this);this.props.on(&quot;change:query&quot;,this._changeQuery,this);this.props.on(&quot;change:search&quot;,this._changeSearch,this);this.props.on(&quot;change:type&quot;,this._changeType,this);this.props.set(_.defaults(f.props||{}));if(f.observe){this.observe(f.observe)}},_changeOrder:function(g,f){if(this.comparator){this.sort()}},_changeOrderby:function(f,g){if(this.comparator&amp;&amp;this.comparator!==b.comparator){return}if(g&amp;&amp;&quot;post__in&quot;!==g){this.comparator=b.comparator}else{delete this.comparator}},_changeQuery:function(f,g){if(g){this.props.on(&quot;change&quot;,this._requery,this);this._requery()}else{this.props.off(&quot;change&quot;,
 this._requery,this)}},_changeFilteredProp:function(h,f,g){if(this.props.get(h)===g){return}if(g&amp;&amp;!this.filters[h]){this.filters[h]=b.filters[h]}else{if(!g&amp;&amp;this.filters[h]===b.filters[h]){delete this.filters[h]}}if(!this.props.get(&quot;source&quot;)){this.props.set(&quot;source&quot;,new b(this.models))}this.reset(this.props.get(&quot;source&quot;).filter(this.validator))},_changeSearch:function(f,g){return this._changeFilteredProp(&quot;search&quot;,f,g)},_changeType:function(f,g){return this._changeFilteredProp(&quot;type&quot;,f,g)},validator:function(f){return _.all(this.filters,function(h,g){return !!h.call(this,f)},this)},validate:function(g,f){return this[this.validator(g)?&quot;add&quot;:&quot;remove&quot;](g,f)},observe:function(f){f.on(&quot;add change&quot;,this.validate,this)},unobserve:function(f){f.off(&quot;add change&quot;,this.validate,this)},mirror:function(f){if(this.mirroring&amp;&amp;this.mirroring===f){return}this.unmirror();this.mirror
 ing=f;this.reset(f.models);f.on(&quot;add&quot;,this._mirrorAdd,this);f.on(&quot;remove&quot;,this._mirrorRemove,this);f.on(&quot;reset&quot;,this._mirrorReset,this)},unmirror:function(){if(!this.mirroring){return}this.mirroring.off(&quot;add&quot;,this._mirrorAdd,this);this.mirroring.off(&quot;remove&quot;,this._mirrorRemove,this);this.mirroring.off(&quot;reset&quot;,this._mirrorReset,this);delete this.mirroring},_mirrorAdd:function(h,f,g){this.add(h,{at:g.index})},_mirrorRemove:function(f){this.remove(f)},_mirrorReset:function(f){this.reset(f.models)},more:function(f){if(this.mirroring&amp;&amp;this.mirroring.more){return this.mirroring.more(f)}return e.Deferred().resolve().promise()},parse:function(g,f){return _.map(g,function(h){var i=c.get(h.id);return i.set(i.parse(h,f))})},_requery:function(){if(this.props.get(&quot;query&quot;)){this.mirror(a.get(this.props.toJSON()))}}},{comparator:function(h,g){var i=this.props.get(&quot;orderby&quot;),f=this.props.get(&quot;order&
 quot;)||&quot;DESC&quot;,j=h.cid,k=g.cid;h=h.get(i);g=g.get(i);if(&quot;date&quot;===i||&quot;modified&quot;===i){h=h||new Date();g=g||new Date()}return(&quot;DESC&quot;===f)?d(h,g,j,k):d(g,h,k,j)},filters:{search:function(f){if(!this.props.get(&quot;search&quot;)){return true}return _.any([&quot;title&quot;,&quot;filename&quot;,&quot;description&quot;,&quot;caption&quot;,&quot;name&quot;],function(g){var h=f.get(g);return h&amp;&amp;-1!==h.search(this.props.get(&quot;search&quot;))},this)},type:function(g){var f=this.props.get(&quot;type&quot;);if(!f){return true}return -1!==f.indexOf(g.get(&quot;type&quot;))}}});b.all=new b();media.query=function(f){return new b(null,{props:_.extend(_.defaults(f||{},{orderby:&quot;date&quot;}),{query:true})})};a=media.model.Query=b.extend({initialize:function(h,f){var g;f=f||{};b.prototype.initialize.apply(this,arguments);this.args=f.args;this.hasMore=true;this.created=new Date();this.filters.order=function(i){if(!this.comparator){return t
 rue}if(this.length){return 1!==this.comparator(i,this.last())}else{if(&quot;DESC&quot;===this.args.order&amp;&amp;(&quot;date&quot;===this.args.orderby||&quot;modified&quot;===this.args.orderby)){return i.get(this.args.orderby)&gt;=this.created}}return false};g=[&quot;s&quot;,&quot;order&quot;,&quot;orderby&quot;,&quot;posts_per_page&quot;,&quot;post_mime_type&quot;];if(_(this.args).chain().keys().difference(g).isEmpty().value()){this.observe(b.all)}},more:function(f){var g=this;if(!this.hasMore){return e.Deferred().resolve().promise()}f=f||{};f.add=true;return this.fetch(f).done(function(h){if(_.isEmpty(h)||-1===this.args.posts_per_page||h.length&lt;this.args.posts_per_page){g.hasMore=false}})},sync:function(i,g,f){var h;if(&quot;read&quot;===i){f=f||{};f.context=this;f.data=_.extend(f.data||{},{action:&quot;query-attachments&quot;});args=_.clone(this.args);if(-1!==args.posts_per_page){args.paged=Math.floor(this.length/args.posts_per_page)+1}f.data.query=args;return media.a
 jax(f)}else{h=b.prototype.sync?b.prototype:Backbone;return h.sync.apply(this,arguments)}}},{defaultProps:{orderby:&quot;date&quot;,order:&quot;DESC&quot;},defaultArgs:{posts_per_page:40},orderby:{allowed:[&quot;name&quot;,&quot;author&quot;,&quot;date&quot;,&quot;title&quot;,&quot;modified&quot;,&quot;uploadedTo&quot;,&quot;id&quot;,&quot;post__in&quot;],valuemap:{id:&quot;ID&quot;,uploadedTo:&quot;parent&quot;}},propmap:{search:&quot;s&quot;,type:&quot;post_mime_type&quot;,parent:&quot;post_parent&quot;,perPage:&quot;posts_per_page&quot;},get:(function(){var f=[];return function(i,h){var g={},k=a.orderby,l=a.defaultProps,j;delete i.query;_.defaults(i,l);i.order=i.order.toUpperCase();if(&quot;DESC&quot;!==i.order&amp;&amp;&quot;ASC&quot;!==i.order){i.order=l.order.toUpperCase()}if(!_.contains(k.allowed,i.orderby)){i.orderby=l.orderby}_.each(i,function(m,n){g[a.propmap[n]||n]=m});_.defaults(g,a.defaultArgs);g.orderby=k.valuemap[i.orderby]||i.orderby;j=_.find(f,function(m){ret
 urn _.isEqual(m.args,g)});if(!j){j=new a([],_.extend(h||{},{props:i,args:g}));f.push(j)}return j}}())})}(jQuery));
</del><span class="cx">\ No newline at end of file
</span><ins>+window.wp=window.wp||{};(function(e){var c,b,a,d;media=wp.media=function(f){if(media.controller.Workflow){return new media.controller.Workflow(f).attach().render()}};_.extend(media,{model:{},view:{},controller:{}});d=function(g,f,h,i){if(_.isEqual(g,f)){return h===i?0:(h&gt;i?-1:1)}else{return g&gt;f?-1:1}};_.extend(media,{template:_.memoize(function(g){var f;return function(h){f=f||_.template(e(&quot;#tmpl-&quot;+g).html());return f(h)}}),post:function(g,f){return media.ajax({data:_.isObject(g)?g:_.extend(f||{},{action:g})})},ajax:function(g,f){if(_.isObject(g)){f=g}else{f=f||{};f.data=_.extend(f.data||{},{action:g})}f=_.defaults(f||{},{type:&quot;POST&quot;,url:ajaxurl,context:this});return e.Deferred(function(h){if(f.success){h.done(f.success)}if(f.error){h.fail(f.error)}delete f.success;delete f.error;e.ajax(f).done(function(i){if(_.isObject(i)&amp;&amp;!_.isUndefined(i.success)){h[i.success?&quot;resolveWith&quot;:&quot;rejectWith&quot;](this,[i.data])}else{
 h.rejectWith(this,[i])}}).fail(function(){h.rejectWith(this,arguments)})}).promise()},fit:function(j){var g=j.width,f=j.height,i=j.maxWidth,h=j.maxHeight,k;if(!_.isUndefined(i)&amp;&amp;!_.isUndefined(h)){k=(g/f&gt;i/h)?&quot;width&quot;:&quot;height&quot;}else{if(_.isUndefined(h)){k=&quot;width&quot;}else{if(_.isUndefined(i)&amp;&amp;f&gt;h){k=&quot;height&quot;}}}if(&quot;width&quot;===k&amp;&amp;g&gt;i){return{width:i,height:Math.round(i*f/g)}}else{if(&quot;height&quot;===k&amp;&amp;f&gt;h){return{width:Math.round(h*g/f),height:h}}else{return{width:g,height:f}}}}});c=media.model.Attachment=Backbone.Model.extend({sync:function(h,g,f){if(&quot;read&quot;===h){f=f||{};f.context=this;f.data=_.extend(f.data||{},{action:&quot;get-attachment&quot;,id:this.id});return media.ajax(f)}else{if(&quot;update&quot;===h){f=f||{};f.context=this;f.data=_.extend(f.data||{},{action:&quot;save-attachment&quot;,id:this.id});if(f.changes){_.each(f.changes,function(j,i){f.changes[i]=this.get(i)}
 ,this);f.data.changes=f.changes;delete f.changes}return media.ajax(f)}}},parse:function(g,f){if(!g){return g}g.date=new Date(g.date);g.modified=new Date(g.modified);return g}},{create:function(f){return b.all.push(f)},get:_.memoize(function(g,f){return b.all.push(f||{id:g})})});b=media.model.Attachments=Backbone.Collection.extend({model:c,initialize:function(g,f){f=f||{};this.props=new Backbone.Model();this.filters=f.filters||{};this.props.on(&quot;change:order&quot;,this._changeOrder,this);this.props.on(&quot;change:orderby&quot;,this._changeOrderby,this);this.props.on(&quot;change:query&quot;,this._changeQuery,this);this.props.on(&quot;change:search&quot;,this._changeSearch,this);this.props.on(&quot;change:type&quot;,this._changeType,this);this.props.set(_.defaults(f.props||{}));if(f.observe){this.observe(f.observe)}},_changeOrder:function(g,f){if(this.comparator){this.sort()}},_changeOrderby:function(f,g){if(this.comparator&amp;&amp;this.comparator!==b.comparator){return}
 if(g&amp;&amp;&quot;post__in&quot;!==g){this.comparator=b.comparator}else{delete this.comparator}},_changeQuery:function(f,g){if(g){this.props.on(&quot;change&quot;,this._requery,this);this._requery()}else{this.props.off(&quot;change&quot;,this._requery,this)}},_changeFilteredProp:function(h,f,g){if(this.props.get(h)===g){return}if(g&amp;&amp;!this.filters[h]){this.filters[h]=b.filters[h]}else{if(!g&amp;&amp;this.filters[h]===b.filters[h]){delete this.filters[h]}}if(!this.props.get(&quot;source&quot;)){this.props.set(&quot;source&quot;,new b(this.models))}this.reset(this.props.get(&quot;source&quot;).filter(this.validator))},_changeSearch:function(f,g){return this._changeFilteredProp(&quot;search&quot;,f,g)},_changeType:function(f,g){return this._changeFilteredProp(&quot;type&quot;,f,g)},validator:function(f){return _.all(this.filters,function(h,g){return !!h.call(this,f)},this)},validate:function(g,f){return this[this.validator(g)?&quot;add&quot;:&quot;remove&quot;](g,f)},o
 bserve:function(f){f.on(&quot;add change&quot;,this.validate,this)},unobserve:function(f){f.off(&quot;add change&quot;,this.validate,this)},mirror:function(f){if(this.mirroring&amp;&amp;this.mirroring===f){return}this.unmirror();this.mirroring=f;this.reset(f.models);f.on(&quot;add&quot;,this._mirrorAdd,this);f.on(&quot;remove&quot;,this._mirrorRemove,this);f.on(&quot;reset&quot;,this._mirrorReset,this)},unmirror:function(){if(!this.mirroring){return}this.mirroring.off(&quot;add&quot;,this._mirrorAdd,this);this.mirroring.off(&quot;remove&quot;,this._mirrorRemove,this);this.mirroring.off(&quot;reset&quot;,this._mirrorReset,this);delete this.mirroring},_mirrorAdd:function(h,f,g){this.add(h,{at:g.index})},_mirrorRemove:function(f){this.remove(f)},_mirrorReset:function(f){this.reset(f.models)},more:function(f){if(this.mirroring&amp;&amp;this.mirroring.more){return this.mirroring.more(f)}return e.Deferred().resolve().promise()},parse:function(g,f){return _.map(g,function(h){var i=
 c.get(h.id);return i.set(i.parse(h,f))})},_requery:function(){if(this.props.get(&quot;query&quot;)){this.mirror(a.get(this.props.toJSON()))}}},{comparator:function(h,g){var i=this.props.get(&quot;orderby&quot;),f=this.props.get(&quot;order&quot;)||&quot;DESC&quot;,j=h.cid,k=g.cid;h=h.get(i);g=g.get(i);if(&quot;date&quot;===i||&quot;modified&quot;===i){h=h||new Date();g=g||new Date()}return(&quot;DESC&quot;===f)?d(h,g,j,k):d(g,h,k,j)},filters:{search:function(f){if(!this.props.get(&quot;search&quot;)){return true}return _.any([&quot;title&quot;,&quot;filename&quot;,&quot;description&quot;,&quot;caption&quot;,&quot;name&quot;],function(g){var h=f.get(g);return h&amp;&amp;-1!==h.search(this.props.get(&quot;search&quot;))},this)},type:function(g){var f=this.props.get(&quot;type&quot;);if(!f){return true}return -1!==f.indexOf(g.get(&quot;type&quot;))}}});b.all=new b();media.query=function(f){return new b(null,{props:_.extend(_.defaults(f||{},{orderby:&quot;date&quot;}),{query:tru
 e})})};a=media.model.Query=b.extend({initialize:function(h,f){var g;f=f||{};b.prototype.initialize.apply(this,arguments);this.args=f.args;this.hasMore=true;this.created=new Date();this.filters.order=function(i){if(!this.comparator){return true}if(this.length){return 1!==this.comparator(i,this.last())}else{if(&quot;DESC&quot;===this.args.order&amp;&amp;(&quot;date&quot;===this.args.orderby||&quot;modified&quot;===this.args.orderby)){return i.get(this.args.orderby)&gt;=this.created}}return false};g=[&quot;s&quot;,&quot;order&quot;,&quot;orderby&quot;,&quot;posts_per_page&quot;,&quot;post_mime_type&quot;];if(_(this.args).chain().keys().difference(g).isEmpty().value()){this.observe(b.all)}},more:function(f){var g=this;if(!this.hasMore){return e.Deferred().resolve().promise()}f=f||{};f.add=true;return this.fetch(f).done(function(h){if(_.isEmpty(h)||-1===this.args.posts_per_page||h.length&lt;this.args.posts_per_page){g.hasMore=false}})},sync:function(i,g,f){var h;if(&quot;read&quo
 t;===i){f=f||{};f.context=this;f.data=_.extend(f.data||{},{action:&quot;query-attachments&quot;});args=_.clone(this.args);if(-1!==args.posts_per_page){args.paged=Math.floor(this.length/args.posts_per_page)+1}f.data.query=args;return media.ajax(f)}else{h=b.prototype.sync?b.prototype:Backbone;return h.sync.apply(this,arguments)}}},{defaultProps:{orderby:&quot;date&quot;,order:&quot;DESC&quot;},defaultArgs:{posts_per_page:40},orderby:{allowed:[&quot;name&quot;,&quot;author&quot;,&quot;date&quot;,&quot;title&quot;,&quot;modified&quot;,&quot;uploadedTo&quot;,&quot;id&quot;,&quot;post__in&quot;],valuemap:{id:&quot;ID&quot;,uploadedTo:&quot;parent&quot;}},propmap:{search:&quot;s&quot;,type:&quot;post_mime_type&quot;,parent:&quot;post_parent&quot;,perPage:&quot;posts_per_page&quot;},get:(function(){var f=[];return function(i,h){var g={},k=a.orderby,l=a.defaultProps,j;delete i.query;_.defaults(i,l);i.order=i.order.toUpperCase();if(&quot;DESC&quot;!==i.order&amp;&amp;&quot;ASC&quot;!=
 =i.order){i.order=l.order.toUpperCase()}if(!_.contains(k.allowed,i.orderby)){i.orderby=l.orderby}_.each(i,function(m,n){g[a.propmap[n]||n]=m});_.defaults(g,a.defaultArgs);g.orderby=k.valuemap[i.orderby]||i.orderby;j=_.find(f,function(m){return _.isEqual(m.args,g)});if(!j){j=new a([],_.extend(h||{},{props:i,args:g}));f.push(j)}return j}}())})}(jQuery));
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjsmediaviewsminjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/media-views.min.js (22203 => 22204)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/media-views.min.js        2012-10-11 22:26:06 UTC (rev 22203)
+++ trunk/wp-includes/js/media-views.min.js        2012-10-11 22:58:47 UTC (rev 22204)
</span><span class="lines">@@ -1 +1 @@
</span><del>-(function(e){var f=wp.media,d=f.model.Attachment,c=f.model.Attachments,a=f.model.Query,b;b=f.view.l10n=_.isUndefined(_wpMediaViewsL10n)?{}:_wpMediaViewsL10n;f.controller.Workflow=Backbone.Model.extend({defaults:{title:&quot;&quot;,multiple:false,view:&quot;library&quot;,library:{},selection:[]},initialize:function(){this.createSelection();this._views={};this._pendingViews={};this.modal=new f.view.Modal({controller:this});this.add(&quot;library&quot;,f.view.Workspace.Library,{collection:f.query(this.get(&quot;library&quot;))});this.unset(&quot;library&quot;);this.add(&quot;gallery&quot;,f.view.Workspace.Gallery,{collection:this.selection});this.add(&quot;gallery-library&quot;,f.view.Workspace.Library.Gallery,{collection:f.query({type:&quot;image&quot;})})},add:function(i,h,g){this.remove(i);this._pendingViews[i]={view:h,options:g};this.trigger(&quot;add add:&quot;+i,h,g);return this},view:function(h){var g;h=h||this.get(&quot;view&quot;);g=this._pendingViews[h];if
 (!this._views[h]&amp;&amp;g){this._views[h]=new g.view(_.extend({controller:this},g.options||{}));delete this._pendingViews[h];this.trigger(&quot;init init:&quot;+h,this._views[h])}return this._views[h]},remove:function(g){delete this._views[g];delete this._pendingViews[g];this.trigger(&quot;remove remove:&quot;+g);return this},render:function(j,i,h){var g;j=j||this.get(&quot;view&quot;);if(i){this.add(j,i,h)}g=this.view(j);if(!g){return this}g.render();this.modal.content(g);return this},update:function(g){this.close();this.trigger(&quot;update&quot;,this.selection,this);this.trigger(&quot;update:&quot;+g,this.selection,this);this.selection.clear()},createSelection:function(){var g=this;this.selection=new c(this.get(&quot;selection&quot;));this.unset(&quot;selection&quot;);_.extend(this.selection,{add:function(i,h){if(!g.get(&quot;multiple&quot;)){i=_.isArray(i)?_.first(i):i;this.clear(h)}return c.prototype.add.call(this,i,h)},clear:function(h){return this.remove(this.models
 ,h)},reset:function(i,h){return this.clear(h).add(i,h)},has:function(h){return !!(this.getByCid(h.cid)||this.get(h.id))}})}});_.each([&quot;attach&quot;,&quot;detach&quot;,&quot;open&quot;,&quot;close&quot;],function(g){f.controller.Workflow.prototype[g]=function(){this.modal[g].apply(this.modal,arguments);return this}});f.view.Modal=Backbone.View.extend({tagName:&quot;div&quot;,template:f.template(&quot;media-modal&quot;),events:{&quot;click .media-modal-backdrop, .media-modal-close&quot;:&quot;closeHandler&quot;},initialize:function(){this.controller=this.options.controller;this.controller.on(&quot;change:title&quot;,this.render,this);_.defaults(this.options,{container:document.body})},render:function(){this.options.$content=this.options.$content||e(&quot;&lt;div /&gt;&quot;);this.options.$content.detach();this.$el.html(this.template(this.controller.toJSON()));this.$(&quot;.media-modal-content&quot;).append(this.options.$content);return this},attach:function(){this.$el.app
 endTo(this.options.container);this.controller.trigger(&quot;attach&quot;,this.controller)},detach:function(){this.$el.detach();this.controller.trigger(&quot;detach&quot;,this.controller)},open:function(){this.$el.show();this.controller.trigger(&quot;open&quot;,this.controller)},close:function(){this.$el.hide();this.controller.trigger(&quot;close&quot;,this.controller)},closeHandler:function(g){g.preventDefault();this.close()},content:function(g){if(this.options.$content){this.options.$content.detach()}this.options.$content=(g instanceof Backbone.View)?g.$el:g;return this.render()}});f.view.Toolbar=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;media-toolbar&quot;,initialize:function(){this._views={};this.$primary=e('&lt;div class=&quot;media-toolbar-primary&quot; /&gt;').prependTo(this.$el);this.$secondary=e('&lt;div class=&quot;media-toolbar-secondary&quot; /&gt;').prependTo(this.$el);if(this.options.items){_.each(this.options.items,function(g,h){this.add(h,g
 ,{silent:true})},this);this.render()}},render:function(){var g=_.chain(this._views).sortBy(function(h){return h.options.priority||10}).groupBy(function(h){return(h.options.priority||10)&gt;0?&quot;primary&quot;:&quot;secondary&quot;}).value();e(_.pluck(this._views,&quot;el&quot;)).detach();this.$primary.html(_.pluck(g.primary||[],&quot;el&quot;));this.$secondary.html(_.pluck(g.secondary||[],&quot;el&quot;));return this},add:function(i,g,h){if(!(g instanceof Backbone.View)){g.classes=[i].concat(g.classes||[]);g=new f.view.Button(g).render()}this._views[i]=g;if(!h||!h.silent){this.render()}return this},get:function(g){return this._views[g]},remove:function(h,g){delete this._views[h];if(!g||!g.silent){this.render()}return this}});f.view.Button=Backbone.View.extend({tagName:&quot;a&quot;,className:&quot;media-button&quot;,attributes:{href:&quot;#&quot;},events:{click:&quot;click&quot;},defaults:{text:&quot;&quot;,style:&quot;&quot;,size:&quot;large&quot;},initialize:function(){t
 his.model=new Backbone.Model(this.defaults);_.each(this.defaults,function(i,g){var h=this.options[g];if(_.isUndefined(h)){return}this.model.set(g,h);delete this.options[g]},this);this.model.on(&quot;change&quot;,this.render,this)},render:function(){var g=[&quot;button&quot;,this.className];if(this.model.get(&quot;style&quot;)){g.push(&quot;button-&quot;+this.model.get(&quot;style&quot;))}if(this.model.get(&quot;size&quot;)){g.push(&quot;button-&quot;+this.model.get(&quot;size&quot;))}g=g.concat(this.options.classes);this.el.className=g.join(&quot; &quot;);this.$el.text(this.model.get(&quot;text&quot;));return this},click:function(g){g.preventDefault();if(this.options.click){this.options.click.apply(this,arguments)}}});f.view.Attachment=Backbone.View.extend({tagName:&quot;li&quot;,className:&quot;attachment&quot;,template:f.template(&quot;attachment&quot;),events:{click:&quot;toggleSelection&quot;,mouseenter:&quot;shrink&quot;,mouseleave:&quot;expand&quot;},buttons:{},initial
 ize:function(){this.controller=this.options.controller;this.model.on(&quot;change:sizes change:uploading&quot;,this.render,this);this.model.on(&quot;change:percent&quot;,this.progress,this);this.model.on(&quot;add&quot;,this.select,this);this.model.on(&quot;remove&quot;,this.deselect,this);this.$el.on(&quot;click&quot;,&quot;a&quot;,this.preventDefault)},render:function(){var h=this.model.toJSON(),g=_.defaults(this.model.toJSON(),{orientation:&quot;landscape&quot;,uploading:false,type:&quot;&quot;,subtype:&quot;&quot;,icon:&quot;&quot;,filename:&quot;&quot;});g.buttons=this.buttons;if(&quot;image&quot;===g.type){_.extend(g,this.crop())}this.$el.html(this.template(g));if(g.uploading){this.$bar=this.$(&quot;.media-progress-bar div&quot;)}else{delete this.$bar}if(this.controller.selection.has(this.model)){this.select()}return this},progress:function(){if(this.$bar&amp;&amp;this.$bar.length){this.$bar.width(this.model.get(&quot;percent&quot;)+&quot;%&quot;)}},toggleSelection:fun
 ction(h){var g=this.controller.selection;g[g.has(this.model)?&quot;remove&quot;:&quot;add&quot;](this.model)},select:function(g,h){if(h&amp;&amp;h!==this.controller.selection){return}this.$el.addClass(&quot;selected&quot;)},deselect:function(g,h){if(h&amp;&amp;h!==this.controller.selection){return}this.$el.removeClass(&quot;selected&quot;)},preventDefault:function(g){g.preventDefault()},imageSize:function(g){var h=this.model.get(&quot;sizes&quot;);g=g||&quot;medium&quot;;if(h&amp;&amp;h[g]){return h[g]}else{return{url:this.model.get(&quot;url&quot;),width:this.model.get(&quot;width&quot;),height:this.model.get(&quot;height&quot;),orientation:this.model.get(&quot;orientation&quot;)}}},crop:function(g){var j=199,i=this.imageSize(g),h,k;h=wp.media.fit(_.extend({maxWidth:j},i));k=wp.media.fit(_.extend({maxHeight:j},i));_.extend(i,h.width&gt;k.width?h:k);i.top=(j-i.height)/2;i.left=(j-i.width)/2;return i},fit:function(g){var k=10,i=199,j=i-(k*2),h=_.extend(wp.media.fit(_.extend({
 maxWidth:j,maxHeight:j},this.imageSize(g))));h.top=Math.round(k+(j-h.height)/2);h.left=Math.round(k+(j-h.width)/2);return h},shrink:function(){var g=_.pick(this.fit(),&quot;top&quot;,&quot;left&quot;,&quot;width&quot;,&quot;height&quot;);this.$el.addClass(&quot;fit&quot;);this.$(&quot;.thumbnail&quot;).css(g);this.$(&quot;.thumbnail img&quot;).css(_.extend(g,{top:0,left:0}))},expand:function(){var g=_.pick(this.crop(),&quot;top&quot;,&quot;left&quot;,&quot;width&quot;,&quot;height&quot;);this.$el.removeClass(&quot;fit&quot;);this.$(&quot;.thumbnail img&quot;).css(g);this.$(&quot;.thumbnail&quot;).css({top:0,left:0,width:199,height:199})}});f.view.Attachment.Library=f.view.Attachment.extend({className:&quot;attachment library&quot;});f.view.Attachment.Gallery=f.view.Attachment.extend({buttons:{close:true},events:{&quot;click .close&quot;:&quot;toggleSelection&quot;}});f.view.Workspace=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;media-workspace&quot;,template
 :f.template(&quot;media-workspace&quot;),attachmentsView:{},events:{dragenter:&quot;maybeInitUploader&quot;,mouseenter:&quot;maybeInitUploader&quot;},initialize:function(){this.controller=this.options.controller;_.defaults(this.options,{selectOne:false,uploader:{},attachmentsView:{}});this.$content=e('&lt;div class=&quot;existing-attachments&quot; /&gt;');this.attachmentsView=_.extend({directions:this.controller.get(&quot;multiple&quot;)?b.selectMediaMultiple:b.selectMediaSingular},this.attachmentsView,this.options.attachmentsView,{controller:this.controller,collection:this.collection});this.attachmentsView=new f.view.Attachments(this.attachmentsView);this.$content.append(this.attachmentsView.$el);wp.Uploader.queue.on(&quot;add remove reset change:percent&quot;,this.renderUploadProgress,this);wp.Uploader.queue.on(&quot;add&quot;,this.selectUpload,this)},render:function(){this.$content.detach();this.attachmentsView.render();this.renderUploadProgress();this.$el.html(this.templ
 ate(this.options)).append(this.$content);this.$bar=this.$(&quot;.upload-attachments .media-progress-bar div&quot;);return this},maybeInitUploader:function(){var g=this;if(this.uploader||!this.$el.closest(&quot;body&quot;).length){return}this.uploader=new wp.Uploader(_.extend({container:this.$el,dropzone:this.$el,browser:this.$(&quot;.upload-attachments a&quot;)},this.options.uploader))},selectUpload:function(g){this.controller.selection.add(g)},renderUploadProgress:function(){var g=wp.Uploader.queue;this.$el.toggleClass(&quot;uploading&quot;,!!g.length);if(!this.$bar||!g.length){return}this.$bar.width((g.reduce(function(h,i){if(i.get(&quot;uploading&quot;)){return h+(i.get(&quot;percent&quot;)||0)}else{return h+100}},0)/g.length)+&quot;%&quot;)}});f.view.Workspace.Library=f.view.Workspace.extend({attachmentsView:{AttachmentView:f.view.Attachment.Library},initialize:function(){f.view.Workspace.prototype.initialize.apply(this,arguments);if(this.controller.get(&quot;multiple&qu
 ot;)){this.initToolbarView()}},initToolbarView:function(){var g=this.controller;this.toolbarView=new f.view.Toolbar({items:{&quot;selection-preview&quot;:new f.view.SelectionPreview({controller:this.controller,collection:this.controller.selection,priority:-40}),&quot;create-new-gallery&quot;:{style:&quot;primary&quot;,text:b.createNewGallery,priority:40,click:function(){g.render(&quot;gallery&quot;)}},&quot;insert-into-post&quot;:{text:b.insertIntoPost,priority:30,click:_.bind(g.update,g,&quot;insert&quot;)},&quot;add-to-gallery&quot;:{text:b.addToGallery,priority:20}}});this.controller.selection.on(&quot;add remove&quot;,function(){var i=this.controller.selection.length,h;this.$el.toggleClass(&quot;with-toolbar&quot;,!!i);h=i&gt;1&amp;&amp;this.controller.selection.all(function(j){return&quot;image&quot;===j.get(&quot;type&quot;)});this.toolbarView.get(&quot;create-new-gallery&quot;).$el.toggle(h);insert=this.toolbarView.get(&quot;insert-into-post&quot;);insert.model.set(&q
 uot;style&quot;,h?&quot;&quot;:&quot;primary&quot;)},this);this.$content.append(this.toolbarView.$el)}});f.view.Workspace.Library.Gallery=f.view.Workspace.Library.extend({initToolbarView:function(){var h=this.controller,g=h.get(&quot;editing&quot;),i={&quot;selection-preview&quot;:new f.view.SelectionPreview({controller:this.controller,collection:this.controller.selection,priority:-40,clearable:false}),&quot;continue-editing-gallery&quot;:{style:&quot;primary&quot;,text:b.continueEditingGallery,priority:40,click:function(){h.render(&quot;gallery&quot;)}}};this.toolbarView=new f.view.Toolbar({items:i});this.$el.addClass(&quot;with-toolbar&quot;);this.$content.append(this.toolbarView.$el)}});f.view.Workspace.Gallery=f.view.Workspace.extend({attachmentsView:{AttachmentView:f.view.Attachment.Gallery,sortable:true},initialize:function(){f.view.Workspace.prototype.initialize.apply(this,arguments);this.initToolbarView()},initToolbarView:function(){var h=this.controller,g=h.get(&quo
 t;editing&quot;),i={&quot;update-gallery&quot;:{style:&quot;primary&quot;,text:g?b.updateGallery:b.insertGalleryIntoPost,priority:40,click:_.bind(h.update,h,&quot;gallery&quot;)},&quot;return-to-library&quot;:{text:g?b.addImagesFromLibrary:b.returnToLibrary,priority:-40,click:function(){h.render(g?&quot;gallery-library&quot;:&quot;library&quot;)}}};this.toolbarView=new f.view.Toolbar({items:i});this.$el.addClass(&quot;with-toolbar&quot;);this.$content.append(this.toolbarView.$el)}});f.view.Attachments=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;attachments&quot;,template:f.template(&quot;attachments&quot;),events:{&quot;keyup input&quot;:&quot;search&quot;},initialize:function(){this.controller=this.options.controller;_.defaults(this.options,{refreshSensitivity:200,refreshThreshold:3,AttachmentView:f.view.Attachment,sortable:false});_.each([&quot;add&quot;,&quot;remove&quot;],function(g){this.collection.on(g,function(j,h,i){this[g](j,i.index)},this)},this);
 this.collection.on(&quot;reset&quot;,this.refresh,this);this.$list=e(&quot;&lt;ul /&gt;&quot;);this.list=this.$list[0];this.scroll=_.chain(this.scroll).bind(this).throttle(this.options.refreshSensitivity).value();this.$list.on(&quot;scroll.attachments&quot;,this.scroll);this.initSortable()},initSortable:function(){var g=this.collection,h;if(!this.options.sortable||!e.fn.sortable){return}this.$list.sortable({disabled:!!g.comparator,containment:this.$list,tolerance:&quot;pointer&quot;,start:function(i,j){h=j.item.index()},update:function(j,k){var i=g.at(h);g.remove(i,{silent:true}).add(i,{at:k.item.index(),silent:true})}});g.props.on(&quot;change:orderby&quot;,function(){this.$list.sortable(&quot;option&quot;,&quot;disabled&quot;,!!g.comparator)},this)},render:function(){this.$list.detach();this.$el.html(this.template(this.options)).append(this.$list);this.refresh();return this},refresh:function(){if(!this.collection.length){this.collection.more();this.$list.empty();return thi
 s}this.$list.html(this.collection.map(function(g){return new this.options.AttachmentView({controller:this.controller,model:g}).render().$el},this));this.scroll();return this},add:function(j,h){var g,i;g=new this.options.AttachmentView({controller:this.controller,model:j}).render();i=this.$list.children();if(i.length&gt;h){i.eq(h).before(g.$el)}else{this.$list.append(g.$el)}},remove:function(i,g){var h=this.$list.children();if(h.length){h.eq(g).detach()}},scroll:function(g){if(!this.$list.is(&quot;:visible&quot;)){return}if(this.list.scrollHeight&lt;this.list.scrollTop+(this.list.clientHeight*this.options.refreshThreshold)){this.collection.more()}},search:function(h){var g=this.collection.props;if(h.target.value){g.set(&quot;search&quot;,h.target.value)}else{g.unset(&quot;search&quot;)}}});f.view.SelectionPreview=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;selection-preview&quot;,template:f.template(&quot;media-selection-preview&quot;),events:{&quot;click .c
 lear-selection&quot;:&quot;clear&quot;},initialize:function(){_.defaults(this.options,{clearable:true});this.controller=this.options.controller;this.collection.on(&quot;add change:url remove&quot;,this.render,this);this.render()},render:function(){var g=_.clone(this.options),j,i,h;if(!this.collection.length){this.$el.empty();return this}g.count=this.collection.length;j=this.collection.first();i=j.get(&quot;sizes&quot;);if(&quot;image&quot;===j.get(&quot;type&quot;)){g.thumbnail=(i&amp;&amp;i.thumbnail)?i.thumbnail.url:j.get(&quot;url&quot;)}else{g.thumbnail=j.get(&quot;icon&quot;)}this.$el.html(this.template(g));return this},clear:function(g){g.preventDefault();this.collection.clear()}})}(jQuery));
</del><span class="cx">\ No newline at end of file
</span><ins>+(function(e){var f=wp.media,d=f.model.Attachment,c=f.model.Attachments,a=f.model.Query,b;b=f.view.l10n=_.isUndefined(_wpMediaViewsL10n)?{}:_wpMediaViewsL10n;f.controller.Workflow=Backbone.Model.extend({defaults:{title:&quot;&quot;,multiple:false,view:&quot;library&quot;,library:{},selection:[]},initialize:function(){this.createSelection();this._views={};this._pendingViews={};this.modal=new f.view.Modal({controller:this});this.add(&quot;library&quot;,f.view.Workspace.Library,{collection:f.query(this.get(&quot;library&quot;))});this.unset(&quot;library&quot;);this.add(&quot;gallery&quot;,f.view.Workspace.Gallery,{collection:this.selection});this.add(&quot;gallery-library&quot;,f.view.Workspace.Library.Gallery,{collection:f.query({type:&quot;image&quot;})})},add:function(i,h,g){this.remove(i);this._pendingViews[i]={view:h,options:g};this.trigger(&quot;add add:&quot;+i,h,g);return this},view:function(h){var g;h=h||this.get(&quot;view&quot;);g=this._pendingViews[h];if
 (!this._views[h]&amp;&amp;g){this._views[h]=new g.view(_.extend({controller:this},g.options||{}));delete this._pendingViews[h];this.trigger(&quot;init init:&quot;+h,this._views[h])}return this._views[h]},remove:function(g){delete this._views[g];delete this._pendingViews[g];this.trigger(&quot;remove remove:&quot;+g);return this},render:function(j,i,h){var g;j=j||this.get(&quot;view&quot;);if(i){this.add(j,i,h)}g=this.view(j);if(!g){return this}g.render();this.modal.content(g);return this},update:function(g){this.close();this.trigger(&quot;update&quot;,this.selection,this);this.trigger(&quot;update:&quot;+g,this.selection,this);this.selection.clear()},createSelection:function(){var g=this;this.selection=new c(this.get(&quot;selection&quot;));this.unset(&quot;selection&quot;);_.extend(this.selection,{add:function(i,h){if(!g.get(&quot;multiple&quot;)){i=_.isArray(i)?_.first(i):i;this.clear(h)}return c.prototype.add.call(this,i,h)},clear:function(h){return this.remove(this.models
 ,h)},reset:function(i,h){return this.clear(h).add(i,h)},has:function(h){return !!(this.getByCid(h.cid)||this.get(h.id))}})}});_.each([&quot;attach&quot;,&quot;detach&quot;,&quot;open&quot;,&quot;close&quot;],function(g){f.controller.Workflow.prototype[g]=function(){this.modal[g].apply(this.modal,arguments);return this}});f.view.Modal=Backbone.View.extend({tagName:&quot;div&quot;,template:f.template(&quot;media-modal&quot;),events:{&quot;click .media-modal-backdrop, .media-modal-close&quot;:&quot;closeHandler&quot;},initialize:function(){this.controller=this.options.controller;this.controller.on(&quot;change:title&quot;,this.render,this);_.defaults(this.options,{container:document.body})},render:function(){this.options.$content=this.options.$content||e(&quot;&lt;div /&gt;&quot;);this.options.$content.detach();this.$el.html(this.template(this.controller.toJSON()));this.$(&quot;.media-modal-content&quot;).append(this.options.$content);return this},attach:function(){this.$el.app
 endTo(this.options.container);this.controller.trigger(&quot;attach&quot;,this.controller)},detach:function(){this.$el.detach();this.controller.trigger(&quot;detach&quot;,this.controller)},open:function(){this.$el.show();this.controller.trigger(&quot;open&quot;,this.controller)},close:function(){this.$el.hide();this.controller.trigger(&quot;close&quot;,this.controller)},closeHandler:function(g){g.preventDefault();this.close()},content:function(g){if(this.options.$content){this.options.$content.detach()}this.options.$content=(g instanceof Backbone.View)?g.$el:g;return this.render()}});f.view.Toolbar=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;media-toolbar&quot;,initialize:function(){this._views={};this.$primary=e('&lt;div class=&quot;media-toolbar-primary&quot; /&gt;').prependTo(this.$el);this.$secondary=e('&lt;div class=&quot;media-toolbar-secondary&quot; /&gt;').prependTo(this.$el);if(this.options.items){_.each(this.options.items,function(g,h){this.add(h,g
 ,{silent:true})},this);this.render()}},render:function(){var g=_.chain(this._views).sortBy(function(h){return h.options.priority||10}).groupBy(function(h){return(h.options.priority||10)&gt;0?&quot;primary&quot;:&quot;secondary&quot;}).value();e(_.pluck(this._views,&quot;el&quot;)).detach();this.$primary.html(_.pluck(g.primary||[],&quot;el&quot;));this.$secondary.html(_.pluck(g.secondary||[],&quot;el&quot;));return this},add:function(i,g,h){if(!(g instanceof Backbone.View)){g.classes=[i].concat(g.classes||[]);g=new f.view.Button(g).render()}this._views[i]=g;if(!h||!h.silent){this.render()}return this},get:function(g){return this._views[g]},remove:function(h,g){delete this._views[h];if(!g||!g.silent){this.render()}return this}});f.view.Button=Backbone.View.extend({tagName:&quot;a&quot;,className:&quot;media-button&quot;,attributes:{href:&quot;#&quot;},events:{click:&quot;click&quot;},defaults:{text:&quot;&quot;,style:&quot;&quot;,size:&quot;large&quot;},initialize:function(){t
 his.model=new Backbone.Model(this.defaults);_.each(this.defaults,function(i,g){var h=this.options[g];if(_.isUndefined(h)){return}this.model.set(g,h);delete this.options[g]},this);this.model.on(&quot;change&quot;,this.render,this)},render:function(){var g=[&quot;button&quot;,this.className];if(this.model.get(&quot;style&quot;)){g.push(&quot;button-&quot;+this.model.get(&quot;style&quot;))}if(this.model.get(&quot;size&quot;)){g.push(&quot;button-&quot;+this.model.get(&quot;size&quot;))}g=g.concat(this.options.classes);this.el.className=g.join(&quot; &quot;);this.$el.text(this.model.get(&quot;text&quot;));return this},click:function(g){g.preventDefault();if(this.options.click){this.options.click.apply(this,arguments)}}});f.view.Attachment=Backbone.View.extend({tagName:&quot;li&quot;,className:&quot;attachment&quot;,template:f.template(&quot;attachment&quot;),events:{&quot;click .attachment-preview&quot;:&quot;toggleSelection&quot;,&quot;mouseenter .attachment-preview&quot;:&quo
 t;shrink&quot;,&quot;mouseleave .attachment-preview&quot;:&quot;expand&quot;,&quot;change .describe&quot;:&quot;describe&quot;,&quot;click .close&quot;:&quot;toggleSelection&quot;},buttons:{},initialize:function(){this.controller=this.options.controller;this.model.on(&quot;change:sizes change:uploading&quot;,this.render,this);this.model.on(&quot;change:percent&quot;,this.progress,this);this.model.on(&quot;add&quot;,this.select,this);this.model.on(&quot;remove&quot;,this.deselect,this);this.$el.on(&quot;click&quot;,&quot;a&quot;,this.preventDefault)},render:function(){var h=this.model.toJSON(),g=_.defaults(this.model.toJSON(),{orientation:&quot;landscape&quot;,uploading:false,type:&quot;&quot;,subtype:&quot;&quot;,icon:&quot;&quot;,filename:&quot;&quot;,caption:&quot;&quot;,title:&quot;&quot;});g.buttons=this.buttons;g.describe=this.controller.get(&quot;describe&quot;);if(&quot;image&quot;===g.type){_.extend(g,this.crop())}this.$el.html(this.template(g));if(g.uploading){this.
 $bar=this.$(&quot;.media-progress-bar div&quot;)}else{delete this.$bar}if(this.controller.selection.has(this.model)){this.select()}return this},progress:function(){if(this.$bar&amp;&amp;this.$bar.length){this.$bar.width(this.model.get(&quot;percent&quot;)+&quot;%&quot;)}},toggleSelection:function(h){var g=this.controller.selection;g[g.has(this.model)?&quot;remove&quot;:&quot;add&quot;](this.model)},select:function(g,h){if(h&amp;&amp;h!==this.controller.selection){return}this.$el.addClass(&quot;selected&quot;)},deselect:function(g,h){if(h&amp;&amp;h!==this.controller.selection){return}this.$el.removeClass(&quot;selected&quot;)},preventDefault:function(g){g.preventDefault()},imageSize:function(g){var h=this.model.get(&quot;sizes&quot;);g=g||&quot;medium&quot;;if(h&amp;&amp;h[g]){return h[g]}else{return{url:this.model.get(&quot;url&quot;),width:this.model.get(&quot;width&quot;),height:this.model.get(&quot;height&quot;),orientation:this.model.get(&quot;orientation&quot;)}}},crop
 :function(g){var j=199,i=this.imageSize(g),h,k;h=wp.media.fit(_.extend({maxWidth:j},i));k=wp.media.fit(_.extend({maxHeight:j},i));_.extend(i,h.width&gt;k.width?h:k);i.top=(j-i.height)/2;i.left=(j-i.width)/2;return i},fit:function(g){var k=10,i=199,j=i-(k*2),h=_.extend(wp.media.fit(_.extend({maxWidth:j,maxHeight:j},this.imageSize(g))));h.top=Math.round(k+(j-h.height)/2);h.left=Math.round(k+(j-h.width)/2);return h},shrink:function(){var g=_.pick(this.fit(),&quot;top&quot;,&quot;left&quot;,&quot;width&quot;,&quot;height&quot;);this.$el.addClass(&quot;fit&quot;);this.$(&quot;.thumbnail&quot;).css(g);this.$(&quot;.thumbnail img&quot;).css(_.extend(g,{top:0,left:0}))},expand:function(){var g=_.pick(this.crop(),&quot;top&quot;,&quot;left&quot;,&quot;width&quot;,&quot;height&quot;);this.$el.removeClass(&quot;fit&quot;);this.$(&quot;.thumbnail img&quot;).css(g);this.$(&quot;.thumbnail&quot;).css({top:0,left:0,width:199,height:199})},describe:function(g){if(&quot;image&quot;===this.mo
 del.get(&quot;type&quot;)){this.model.save(&quot;caption&quot;,g.target.value)}else{this.model.save(&quot;title&quot;,g.target.value)}}});f.view.Attachment.Library=f.view.Attachment.extend({className:&quot;attachment library&quot;});f.view.Attachment.Gallery=f.view.Attachment.extend({buttons:{close:true},events:(function(){var g=_.clone(f.view.Attachment.prototype.events);delete g[&quot;click .attachment-preview&quot;];return g}())});f.view.Workspace=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;media-workspace&quot;,template:f.template(&quot;media-workspace&quot;),attachmentsView:{},events:{dragenter:&quot;maybeInitUploader&quot;,mouseenter:&quot;maybeInitUploader&quot;},initialize:function(){this.controller=this.options.controller;_.defaults(this.options,{selectOne:false,uploader:{},attachmentsView:{}});this.$content=e('&lt;div class=&quot;existing-attachments&quot; /&gt;');this.attachmentsView=_.extend({directions:this.controller.get(&quot;multiple&quot;)?
 b.selectMediaMultiple:b.selectMediaSingular},this.attachmentsView,this.options.attachmentsView,{controller:this.controller,collection:this.collection});this.attachmentsView=new f.view.Attachments(this.attachmentsView);this.$content.append(this.attachmentsView.$el);wp.Uploader.queue.on(&quot;add remove reset change:percent&quot;,this.renderUploadProgress,this);if(this.controller.get(&quot;multiple&quot;)){wp.Uploader.queue.on(&quot;add&quot;,this.selectUpload,this)}},render:function(){this.$content.detach();this.attachmentsView.render();this.renderUploadProgress();this.$el.html(this.template(this.options)).append(this.$content);this.$bar=this.$(&quot;.upload-attachments .media-progress-bar div&quot;);return this},maybeInitUploader:function(){var g=this;if(this.uploader||!this.$el.closest(&quot;body&quot;).length){return}this.uploader=new wp.Uploader(_.extend({container:this.$el,dropzone:this.$el,browser:this.$(&quot;.upload-attachments a&quot;)},this.options.uploader))},selec
 tUpload:function(g){this.controller.selection.add(g)},renderUploadProgress:function(){var g=wp.Uploader.queue;this.$el.toggleClass(&quot;uploading&quot;,!!g.length);if(!this.$bar||!g.length){return}this.$bar.width((g.reduce(function(h,i){if(i.get(&quot;uploading&quot;)){return h+(i.get(&quot;percent&quot;)||0)}else{return h+100}},0)/g.length)+&quot;%&quot;)}});f.view.Workspace.Library=f.view.Workspace.extend({attachmentsView:{AttachmentView:f.view.Attachment.Library},initialize:function(){f.view.Workspace.prototype.initialize.apply(this,arguments);if(this.controller.get(&quot;multiple&quot;)){this.initToolbarView()}},initToolbarView:function(){var g=this.controller;this.toolbarView=new f.view.Toolbar({items:{&quot;selection-preview&quot;:new f.view.SelectionPreview({controller:this.controller,collection:this.controller.selection,priority:-40}),&quot;create-new-gallery&quot;:{style:&quot;primary&quot;,text:b.createNewGallery,priority:40,click:function(){g.render(&quot;gallery
 &quot;)}},&quot;insert-into-post&quot;:{text:b.insertIntoPost,priority:30,click:_.bind(g.update,g,&quot;insert&quot;)},&quot;add-to-gallery&quot;:{text:b.addToGallery,priority:20}}});this.controller.selection.on(&quot;add remove&quot;,function(){var i=this.controller.selection.length,h;this.$el.toggleClass(&quot;with-toolbar&quot;,!!i);h=i&gt;1&amp;&amp;this.controller.selection.all(function(j){return&quot;image&quot;===j.get(&quot;type&quot;)});this.toolbarView.get(&quot;create-new-gallery&quot;).$el.toggle(h);insert=this.toolbarView.get(&quot;insert-into-post&quot;);insert.model.set(&quot;style&quot;,h?&quot;&quot;:&quot;primary&quot;)},this);this.$content.append(this.toolbarView.$el)}});f.view.Workspace.Library.Gallery=f.view.Workspace.Library.extend({initToolbarView:function(){var h=this.controller,g=h.get(&quot;editing&quot;),i={&quot;selection-preview&quot;:new f.view.SelectionPreview({controller:this.controller,collection:this.controller.selection,priority:-40,clearab
 le:false}),&quot;continue-editing-gallery&quot;:{style:&quot;primary&quot;,text:b.continueEditingGallery,priority:40,click:function(){h.render(&quot;gallery&quot;)}}};this.toolbarView=new f.view.Toolbar({items:i});this.$el.addClass(&quot;with-toolbar&quot;);this.$content.append(this.toolbarView.$el)}});f.view.Workspace.Gallery=f.view.Workspace.extend({attachmentsView:{AttachmentView:f.view.Attachment.Gallery,sortable:true},initialize:function(){f.view.Workspace.prototype.initialize.apply(this,arguments);this.initToolbarView()},initToolbarView:function(){var h=this.controller,g=h.get(&quot;editing&quot;),i={&quot;update-gallery&quot;:{style:&quot;primary&quot;,text:g?b.updateGallery:b.insertGalleryIntoPost,priority:40,click:_.bind(h.update,h,&quot;gallery&quot;)},&quot;return-to-library&quot;:{text:g?b.addImagesFromLibrary:b.returnToLibrary,priority:-40,click:function(){h.render(g?&quot;gallery-library&quot;:&quot;library&quot;)}}};this.toolbarView=new f.view.Toolbar({items:i
 });this.$el.addClass(&quot;with-toolbar&quot;);this.$content.append(this.toolbarView.$el)}});f.view.Attachments=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;attachments&quot;,template:f.template(&quot;attachments&quot;),events:{&quot;keyup .search&quot;:&quot;search&quot;},initialize:function(){this.controller=this.options.controller;_.defaults(this.options,{refreshSensitivity:200,refreshThreshold:3,AttachmentView:f.view.Attachment,sortable:false});_.each([&quot;add&quot;,&quot;remove&quot;],function(g){this.collection.on(g,function(j,h,i){this[g](j,i.index)},this)},this);this.collection.on(&quot;reset&quot;,this.refresh,this);this.$list=e(&quot;&lt;ul /&gt;&quot;);this.list=this.$list[0];this.scroll=_.chain(this.scroll).bind(this).throttle(this.options.refreshSensitivity).value();this.$list.on(&quot;scroll.attachments&quot;,this.scroll);this.initSortable()},initSortable:function(){var g=this.collection,h;if(!this.options.sortable||!e.fn.sortable){return}thi
 s.$list.sortable({disabled:!!g.comparator,containment:this.$list,tolerance:&quot;pointer&quot;,start:function(i,j){h=j.item.index()},update:function(j,k){var i=g.at(h);g.remove(i,{silent:true}).add(i,{at:k.item.index(),silent:true})}});g.props.on(&quot;change:orderby&quot;,function(){this.$list.sortable(&quot;option&quot;,&quot;disabled&quot;,!!g.comparator)},this)},render:function(){this.$list.detach();this.$el.html(this.template(this.options)).append(this.$list);this.refresh();return this},refresh:function(){if(!this.collection.length){this.collection.more();this.$list.empty();return this}this.$list.html(this.collection.map(function(g){return new this.options.AttachmentView({controller:this.controller,model:g}).render().$el},this));this.scroll();return this},add:function(j,h){var g,i;g=new this.options.AttachmentView({controller:this.controller,model:j}).render();i=this.$list.children();if(i.length&gt;h){i.eq(h).before(g.$el)}else{this.$list.append(g.$el)}},remove:function
 (i,g){var h=this.$list.children();if(h.length){h.eq(g).detach()}},scroll:function(g){if(!this.$list.is(&quot;:visible&quot;)){return}if(this.list.scrollHeight&lt;this.list.scrollTop+(this.list.clientHeight*this.options.refreshThreshold)){this.collection.more()}},search:function(h){var g=this.collection.props;if(h.target.value){g.set(&quot;search&quot;,h.target.value)}else{g.unset(&quot;search&quot;)}}});f.view.SelectionPreview=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;selection-preview&quot;,template:f.template(&quot;media-selection-preview&quot;),events:{&quot;click .clear-selection&quot;:&quot;clear&quot;},initialize:function(){_.defaults(this.options,{clearable:true});this.controller=this.options.controller;this.collection.on(&quot;add change:url remove&quot;,this.render,this);this.render()},render:function(){var g=_.clone(this.options),j,i,h;if(!this.collection.length){this.$el.empty();return this}g.count=this.collection.length;j=this.collection.first
 ();i=j.get(&quot;sizes&quot;);if(&quot;image&quot;===j.get(&quot;type&quot;)){g.thumbnail=(i&amp;&amp;i.thumbnail)?i.thumbnail.url:j.get(&quot;url&quot;)}else{g.thumbnail=j.get(&quot;icon&quot;)}this.$el.html(this.template(g));return this},clear:function(g){g.preventDefault();this.collection.clear()}})}(jQuery));
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesversionphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/version.php (22203 => 22204)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/version.php        2012-10-11 22:26:06 UTC (rev 22203)
+++ trunk/wp-includes/version.php        2012-10-11 22:58:47 UTC (rev 22204)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">  *
</span><span class="cx">  * @global string $wp_version
</span><span class="cx">  */
</span><del>-$wp_version = '3.5-beta1-22172';
</del><ins>+$wp_version = '3.5-beta1-22204';
</ins><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
</span></span></pre>
</div>
</div>

</body>
</html>