<!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>[22326] trunk: Compress scripts/styles: 3.5-beta2-22326.</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/22326">22326</a></dd>
<dt>Author</dt> <dd>bumpbot</dd>
<dt>Date</dt> <dd>2012-10-29 22:58:31 +0000 (Mon, 29 Oct 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>Compress scripts/styles: 3.5-beta2-22326.</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="#trunkwpincludesjspluploadwppluploadminjs">trunk/wp-includes/js/plupload/wp-plupload.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 (22325 => 22326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/media-upload.min.js        2012-10-29 18:16:12 UTC (rev 22325)
+++ trunk/wp-admin/js/media-upload.min.js        2012-10-29 22:58:31 UTC (rev 22326)
</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,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 wp.media.string.image(g)+&quot; &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){delet
 e 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}));d.get(&quot;library&quot;).on(&quot;insert&quot;,function(f){this.insert(f.map(function(g){if(&quot;image&quot;===g.get(&quot;type&quot;)){return wp.media.string.image(g)+&quot; &quot;}else{return wp.media.string.link(g)+&quot; &quot;}}).join(&quot;&quot;))},this);d.get(&quot;gallery&quot;).on(&quot;update&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]},rem
 ove:function(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 (22325 => 22326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/css/media-views.min.css        2012-10-29 18:16:12 UTC (rev 22325)
+++ trunk/wp-includes/css/media-views.min.css        2012-10-29 22:58:31 UTC (rev 22326)
</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-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-primary&gt;.media-button,.media-toolbar-primary&gt;.media-butto
 n-group{margin-left:10px;float:left;margin-top:16px}.media-toolbar-secondary&gt;.media-button,.media-toolbar-secondary&gt;.media-button-group{margin-right:10px;float:left;margin-top:16px}.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-pr
 operty: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}.attachment{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 .file
 name{margin-top:140px;padding:0 10px;text-align:center;font-weight:bold}.attachment .thumbnail,.attachment .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)}.attac
 hment .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: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;backgroun
 d:#fff;box-shadow:-1px -1px 2px -1px rgba(0,0,0,0.2)}.selection-preview .clear-selection{float:left;line-height:60px}.attachment-display-settings,.button div.attachment-display-settings{padding:0 1em 1em}.attachment-display-settings h3{font-weight:200;margin:1.4em 0 .4em}.attachment-display-settings h4{margin:1.4em 0 .4em}
</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:absolute;top:0;left:220px;right:0;z-index:100;height:50px;padding:0 10px;border-bottom:1px solid #dfdfdf}.media-toolbar-primary{float:right}.media-toolbar-secondary{float:left}.media-toolbar-primary&gt;.media-butt
 on,.media-toolbar-primary&gt;.media-button-group{margin-left:10px;float:left;margin-top:10px}.media-toolbar-secondary&gt;.media-button,.media-toolbar-secondary&gt;.media-button-group{margin-right:10px;float:left;margin-top:10px}.media-sidebar{position:absolute;top:0;left:0;bottom:0;width:219px;z-index:50;background:#f5f5f5;border-right:1px solid #dfdfdf}.hide-sidebar .media-sidebar{display:none}.media-sidebar .sidebar-title{font-weight:200;font-size:20px;margin:0;padding:12px 10px 10px;line-height:28px}.media-sidebar .sidebar-content{padding:0 10px;margin-bottom:130px}.media-sidebar .search{display:block;width:100%}.media-sidebar .selection-preview{display:block;padding-top:5px}.media-frame .media-content,.media-frame .media-toolbar,.media-frame .media-sidebar{-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;tr
 ansition-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-frame .media-content{position:absolute;top:51px;left:220px;right:0;bottom:0;height:auto;width:auto;margin:0;overflow:auto}.media-frame.hide-sidebar .media-content{left:0}.media-frame .media-toolbar .add-to-gallery{display:none}.media-frame .search{margin-top:11px;padding:4px;line-height:18px;font-size:13px;color:#464646;font-family:sans-serif}.attachment{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 .thumbnail{-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 .icon{top:50%;left:50%}.attachment-preview: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 .thumbnail img{top:0;left:0}.attachment .icon,.attachment .thumbnail img{-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{position:absolute;left:0;right:0;bottom:0;padding:5px 10px;text-align:center;font-weight:bold;backgroun
 d:rgba(255,255,255,0.8);box-shadow:0 0 2px rgba(0,0,0,0.2)}.attachment-preview .thumbnail{width:199px;height:199px}.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}.media-frame .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:#c
 cc;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:50%;left:15%;width:70%;margin:-8px 0 0 -4px}.uploader-window{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,86,132,0.9);z-index:250000;display:none;text-align:center;opacity:0;-webkit-transition:opacity 250ms;-moz-transition:opacity 250ms;-ms-transition:opacity 250ms;-o-transition:opacity 250ms;transition:opacity 250ms}.uploader-window-content{position:absolute;top:30px;left:30px;right:30px;bottom:30px;border:1px dashed #fff}.uploader-window h3{position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);-moz-transform:translateY(-50%);-ms-transform:translateY(-50%);-o-transform:translateY(-50%);transform:translateY(-50%);font-size:18px;font-weight:200;color:#fff;padding:0}.uploader-window .media-progress-bar{margin-top:20px;max-
 width:300px;background:transparent;border-color:#fff;display:none}.uploader-window .media-progress-bar div{background:#fff}.uploading .uploader-window .media-progress-bar{display:block}.uploader-inline{display:none}.uploader-inline .media-progress-bar{display:none}.uploading.uploader-inline .media-progress-bar{display:block}.media-sidebar .uploader-inline{display:block;position:absolute;left:0;right:0;bottom:0;height:100px;margin:10px;padding-top:10px;text-align:center;border:1px dashed #aaa}.media-sidebar .uploader-inline h3{font-weight:200;font-size:16px;margin:10px 0}.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}.attachment-details{padding-top:20px}.attachment-details-preview{cursor:default}.attachment-details-preview{width:auto;height:auto;position:relative}.attachment-details-preview .thumbnail{width:100%;height:auto}.attachment-details-preview .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-details-preview .thumbnail img{display:block;max-width:100%;max-height:132px;margin:0 auto}.attachment-details .describe{float:left;margin:10px 0 0;border-radius:3px}.att
 achment-display-settings,.button div.attachment-display-settings{padding:0 1em 1em}.attachment-display-settings h3{font-weight:200;margin:1.4em 0 .4em}.attachment-display-settings h4{margin:1.4em 0 .4em}
</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 (22325 => 22326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/mce-view.min.js        2012-10-29 18:16:12 UTC (rev 22325)
+++ trunk/wp-includes/js/mce-view.min.js        2012-10-29 22:58:31 UTC (rev 22326)
</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(e,g){var f=wp.mce.view.get(e),d,h;if(!f){return&quot;&quot;}d=new f.view(_.extend(g||{},{viewType:e}));h=d.el.id=d.el.id||_.uniqueId(&quot;__wpmce-&quot;);c[h]=d;d.$wrapper=b();return wp.html.string({tag:&quot;span&quot;===d.tagName?&quot;span&quot;:&quot;div&quot;,attrs:{&quot;class&quot;:&quot;wp-view-wrap wp-view-type-&quot;+e,&quot;data-wp-view&quot;:h,contenteditable:false}})},render:function(d){b(&quot;.wp-view-wrap&quot;,d).each(function(){var f=b(this),e=wp.mce.view.instance(this);if(!e){return}e.$wrapper=f;e.render();e.$el.detach();f.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))},instance:function(d){var e=b(d).data(&quot;wp-view&quot;);if(e){return c[e]}},select:function(e){var d=b(e);if(d.hasClass(&quot;selected&quot;)){return}d.addClass(&quot;selected&quot;);b(e.firstChild).trigger(&quot;select&quot;)},deselect:function(e){var d=b(e);if(!d.hasClass(&quot;selected&quot;)){return}d.removeClass(&quot;selected&quot;);b(e.firstChild).trigger(&quot;deselect&quot;)},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;po
 st&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;),size: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.h
 tml.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}if(this.align){this.$wrapper.addClass(&quot;align&quot;+this.align)}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;,template: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.siz
 es.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;update:gallery&quot;,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(e,g){var f=wp.mce.view.get(e),d,h;if(!f){return&quot;&quot;}d=new f.view(_.extend(g||{},{viewType:e}));h=d.el.id=d.el.id||_.uniqueId(&quot;__wpmce-&quot;);c[h]=d;d.$wrapper=b();return wp.html.string({tag:&quot;span&quot;===d.tagName?&quot;span&quot;:&quot;div&quot;,attrs:{&quot;class&quot;:&quot;wp-view-wrap wp-view-type-&quot;+e,&quot;data-wp-view&quot;:h,contenteditable:false}})},render:function(d){b(&quot;.wp-view-wrap&quot;,d).each(function(){var f=b(this),e=wp.mce.view.instance(this);if(!e){return}e.$wrapper=f;e.render();e.$el.detach();f.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))},instance:function(d){var e=b(d).data(&quot;wp-view&quot;);if(e){return c[e]}},select:function(e){var d=b(e);if(d.hasClass(&quot;selected&quot;)){return}d.addClass(&quot;selected&quot;);b(e.firstChild).trigger(&quot;select&quot;)},deselect:function(e){var d=b(e);if(!d.hasClass(&quot;selected&quot;)){return}d.removeClass(&quot;selected&quot;);b(e.firstChild).trigger(&quot;deselect&quot;)},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;po
 st&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;),size: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.h
 tml.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}if(this.align){this.$wrapper.addClass(&quot;align&quot;+this.align)}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;,template: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.siz
 es.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({state:&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&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 (22325 => 22326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/media-models.min.js        2012-10-29 18:16:12 UTC (rev 22325)
+++ trunk/wp-includes/js/media-models.min.js        2012-10-29 22:58:31 UTC (rev 22326)
</span><span class="lines">@@ -1 +1 @@
</span><del>-window.wp=window.wp||{};(function(f){var d,c,a,e,b;media=wp.media=function(g){if(media.controller.Workflow){return new media.controller.Workflow(g).attach().render()}};_.extend(media,{model:{},view:{},controller:{}});b=media.model.l10n=_.isUndefined(_wpMediaModelsL10n)?{}:_wpMediaModelsL10n;e=function(h,g,i,j){if(_.isEqual(h,g)){return i===j?0:(i&gt;j?-1:1)}else{return h&gt;g?-1:1}};_.extend(media,{template:_.memoize(function(h){var g;return function(i){g=g||_.template(f(&quot;#tmpl-&quot;+h).html());return g(i)}}),post:function(h,g){return media.ajax({data:_.isObject(h)?h:_.extend(g||{},{action:h})})},ajax:function(h,g){if(_.isObject(h)){g=h}else{g=g||{};g.data=_.extend(g.data||{},{action:h})}g=_.defaults(g||{},{type:&quot;POST&quot;,url:ajaxurl,context:this});return f.Deferred(function(i){if(g.success){i.done(g.success)}if(g.error){i.fail(g.error)}delete g.success;delete g.error;f.ajax(g).done(function(j){if(_.isObject(j)&amp;&amp;!_.isUndefined(j.success)){i[j
 .success?&quot;resolveWith&quot;:&quot;rejectWith&quot;](this,[j.data])}else{i.rejectWith(this,[j])}}).fail(function(){i.rejectWith(this,arguments)})}).promise()},fit:function(k){var h=k.width,g=k.height,j=k.maxWidth,i=k.maxHeight,l;if(!_.isUndefined(j)&amp;&amp;!_.isUndefined(i)){l=(h/g&gt;j/i)?&quot;width&quot;:&quot;height&quot;}else{if(_.isUndefined(i)){l=&quot;width&quot;}else{if(_.isUndefined(j)&amp;&amp;g&gt;i){l=&quot;height&quot;}}}if(&quot;width&quot;===l&amp;&amp;h&gt;j){return{width:j,height:Math.round(j*g/h)}}else{if(&quot;height&quot;===l&amp;&amp;g&gt;i){return{width:Math.round(i*h/g),height:i}}else{return{width:h,height:g}}}}});d=media.model.Attachment=Backbone.Model.extend({sync:function(i,h,g){if(&quot;read&quot;===i){g=g||{};g.context=this;g.data=_.extend(g.data||{},{action:&quot;get-attachment&quot;,id:this.id});return media.ajax(g)}else{if(&quot;update&quot;===i){g=g||{};g.context=this;g.data=_.extend(g.data||{},{action:&quot;save-attachment&quot;,id:thi
 s.id,nonce:b.saveAttachmentNonce});if(g.changes){_.each(g.changes,function(k,j){g.changes[j]=this.get(j)},this);g.data.changes=g.changes;delete g.changes}return media.ajax(g)}}},parse:function(h,g){if(!h){return h}h.date=new Date(h.date);h.modified=new Date(h.modified);return h}},{create:function(g){return c.all.push(g)},get:_.memoize(function(h,g){return c.all.push(g||{id:h})})});c=media.model.Attachments=Backbone.Collection.extend({model:d,initialize:function(h,g){g=g||{};this.props=new Backbone.Model();this.filters=g.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(g.props||{}));if(g.observe){this.observe(g.observe)}},_changeOrder:function(h,g){if(this.comparator){this.
 sort()}},_changeOrderby:function(g,h){if(this.comparator&amp;&amp;this.comparator!==c.comparator){return}if(h&amp;&amp;&quot;post__in&quot;!==h){this.comparator=c.comparator}else{delete this.comparator}},_changeQuery:function(g,h){if(h){this.props.on(&quot;change&quot;,this._requery,this);this._requery()}else{this.props.off(&quot;change&quot;,this._requery,this)}},_changeFilteredProp:function(i,g,h){if(this.props.get(i)===h){return}if(h&amp;&amp;!this.filters[i]){this.filters[i]=c.filters[i]}else{if(!h&amp;&amp;this.filters[i]===c.filters[i]){delete this.filters[i]}}if(!this.props.get(&quot;source&quot;)){this.props.set(&quot;source&quot;,new c(this.models))}this.reset(this.props.get(&quot;source&quot;).filter(this.validator))},_changeSearch:function(g,h){return this._changeFilteredProp(&quot;search&quot;,g,h)},_changeType:function(g,h){return this._changeFilteredProp(&quot;type&quot;,g,h)},validator:function(g){return _.all(this.filters,function(i,h){return !!i.call(this,g)
 },this)},validate:function(h,g){return this[this.validator(h)?&quot;add&quot;:&quot;remove&quot;](h,g)},observe:function(g){g.on(&quot;add change&quot;,this.validate,this)},unobserve:function(g){g.off(&quot;add change&quot;,this.validate,this)},mirror:function(g){if(this.mirroring&amp;&amp;this.mirroring===g){return}this.unmirror();this.mirroring=g;this.reset(g.models);g.on(&quot;add&quot;,this._mirrorAdd,this);g.on(&quot;remove&quot;,this._mirrorRemove,this);g.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(i,g,h){this.add(i,{at:h.index})},_mirrorRemove:function(g){this.remove(g)},_mirrorReset:function(g){this.reset(g.models)},more:function(g){if(this.mirroring&amp;&amp;this.mirroring.more){return this.mirrori
 ng.more(g)}return f.Deferred().resolve().promise()},parse:function(h,g){return _.map(h,function(i){var j=d.get(i.id);return j.set(j.parse(i,g))})},_requery:function(){if(this.props.get(&quot;query&quot;)){this.mirror(a.get(this.props.toJSON()))}}},{comparator:function(i,h){var j=this.props.get(&quot;orderby&quot;),g=this.props.get(&quot;order&quot;)||&quot;DESC&quot;,k=i.cid,l=h.cid;i=i.get(j);h=h.get(j);if(&quot;date&quot;===j||&quot;modified&quot;===j){i=i||new Date();h=h||new Date()}return(&quot;DESC&quot;===g)?e(i,h,k,l):e(h,i,l,k)},filters:{search:function(g){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(h){var i=g.get(h);return i&amp;&amp;-1!==i.search(this.props.get(&quot;search&quot;))},this)},type:function(h){var g=this.props.get(&quot;type&quot;);if(!g){return true}return -1!==g.indexOf(h.get(&quot;type&quot;))}}});c.all=new c();media.qu
 ery=function(g){return new c(null,{props:_.extend(_.defaults(g||{},{orderby:&quot;date&quot;}),{query:true})})};a=media.model.Query=c.extend({initialize:function(i,g){var h;g=g||{};c.prototype.initialize.apply(this,arguments);this.args=g.args;this.hasMore=true;this.created=new Date();this.filters.order=function(j){if(!this.comparator){return true}if(this.length){return 1!==this.comparator(j,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 j.get(this.args.orderby)&gt;=this.created}}return false};h=[&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(h).isEmpty().value()){this.observe(c.all)}},more:function(g){var h=this;if(!this.hasMore){return f.Deferred().resolve().promise()}g=g||{};g.add=true;return this.fetch(g).done(function(i){if(_.isEmpty(i)||-1===this.args.posts_per_pag
 e||i.length&lt;this.args.posts_per_page){h.hasMore=false}})},sync:function(j,h,g){var i;if(&quot;read&quot;===j){g=g||{};g.context=this;g.data=_.extend(g.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}g.data.query=args;return media.ajax(g)}else{i=c.prototype.sync?c.prototype:Backbone;return i.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 g=[];return function(j,i){var h={},l=a.orderby,m=a.defaultProps,k;delete j.que
 ry;_.defaults(j,m);j.order=j.order.toUpperCase();if(&quot;DESC&quot;!==j.order&amp;&amp;&quot;ASC&quot;!==j.order){j.order=m.order.toUpperCase()}if(!_.contains(l.allowed,j.orderby)){j.orderby=m.orderby}_.each(j,function(n,o){h[a.propmap[o]||o]=n});_.defaults(h,a.defaultArgs);h.orderby=l.valuemap[j.orderby]||j.orderby;k=_.find(g,function(n){return _.isEqual(n.args,h)});if(!k){k=new a([],_.extend(i||{},{props:j,args:h}));g.push(k)}return k}}())})}(jQuery));
</del><span class="cx">\ No newline at end of file
</span><ins>+window.wp=window.wp||{};(function(f){var d,c,a,e,b;media=wp.media=function(g){if(media.view.Frame){return new media.view.Frame(g).render().attach().open()}};_.extend(media,{model:{},view:{},controller:{}});b=media.model.l10n=_.isUndefined(_wpMediaModelsL10n)?{}:_wpMediaModelsL10n;e=function(h,g,i,j){if(_.isEqual(h,g)){return i===j?0:(i&gt;j?-1:1)}else{return h&gt;g?-1:1}};_.extend(media,{template:_.memoize(function(h){var g;return function(i){g=g||_.template(f(&quot;#tmpl-&quot;+h).html());return g(i)}}),post:function(h,g){return media.ajax({data:_.isObject(h)?h:_.extend(g||{},{action:h})})},ajax:function(h,g){if(_.isObject(h)){g=h}else{g=g||{};g.data=_.extend(g.data||{},{action:h})}g=_.defaults(g||{},{type:&quot;POST&quot;,url:ajaxurl,context:this});return f.Deferred(function(i){if(g.success){i.done(g.success)}if(g.error){i.fail(g.error)}delete g.success;delete g.error;f.ajax(g).done(function(j){if(_.isObject(j)&amp;&amp;!_.isUndefined(j.success)){i[j.success?&q
 uot;resolveWith&quot;:&quot;rejectWith&quot;](this,[j.data])}else{i.rejectWith(this,[j])}}).fail(function(){i.rejectWith(this,arguments)})}).promise()},fit:function(k){var h=k.width,g=k.height,j=k.maxWidth,i=k.maxHeight,l;if(!_.isUndefined(j)&amp;&amp;!_.isUndefined(i)){l=(h/g&gt;j/i)?&quot;width&quot;:&quot;height&quot;}else{if(_.isUndefined(i)){l=&quot;width&quot;}else{if(_.isUndefined(j)&amp;&amp;g&gt;i){l=&quot;height&quot;}}}if(&quot;width&quot;===l&amp;&amp;h&gt;j){return{width:j,height:Math.round(j*g/h)}}else{if(&quot;height&quot;===l&amp;&amp;g&gt;i){return{width:Math.round(i*h/g),height:i}}else{return{width:h,height:g}}}}});d=media.model.Attachment=Backbone.Model.extend({sync:function(i,h,g){if(&quot;read&quot;===i){g=g||{};g.context=this;g.data=_.extend(g.data||{},{action:&quot;get-attachment&quot;,id:this.id});return media.ajax(g)}else{if(&quot;update&quot;===i){g=g||{};g.context=this;g.data=_.extend(g.data||{},{action:&quot;save-attachment&quot;,id:this.id,nonce:
 b.saveAttachmentNonce});if(g.changes){_.each(g.changes,function(k,j){g.changes[j]=this.get(j)},this);g.data.changes=g.changes;delete g.changes}return media.ajax(g)}}},parse:function(h,g){if(!h){return h}h.date=new Date(h.date);h.modified=new Date(h.modified);return h}},{create:function(g){return c.all.push(g)},get:_.memoize(function(h,g){return c.all.push(g||{id:h})})});c=media.model.Attachments=Backbone.Collection.extend({model:d,initialize:function(h,g){g=g||{};this.props=new Backbone.Model();this.filters=g.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(g.props||{}));if(g.observe){this.observe(g.observe)}},_changeOrder:function(h,g){if(this.comparator){this.sort()}},_c
 hangeOrderby:function(g,h){if(this.comparator&amp;&amp;this.comparator!==c.comparator){return}if(h&amp;&amp;&quot;post__in&quot;!==h){this.comparator=c.comparator}else{delete this.comparator}},_changeQuery:function(g,h){if(h){this.props.on(&quot;change&quot;,this._requery,this);this._requery()}else{this.props.off(&quot;change&quot;,this._requery,this)}},_changeFilteredProp:function(i,g,h){if(this.props.get(i)===h){return}if(h&amp;&amp;!this.filters[i]){this.filters[i]=c.filters[i]}else{if(!h&amp;&amp;this.filters[i]===c.filters[i]){delete this.filters[i]}}if(!this.props.get(&quot;source&quot;)){this.props.set(&quot;source&quot;,new c(this.models))}this.reset(this.props.get(&quot;source&quot;).filter(this.validator))},_changeSearch:function(g,h){return this._changeFilteredProp(&quot;search&quot;,g,h)},_changeType:function(g,h){return this._changeFilteredProp(&quot;type&quot;,g,h)},validator:function(g){return _.all(this.filters,function(i,h){return !!i.call(this,g)},this)},va
 lidate:function(h,g){return this[this.validator(h)?&quot;add&quot;:&quot;remove&quot;](h,g)},observe:function(g){g.on(&quot;add change&quot;,this.validate,this)},unobserve:function(g){g.off(&quot;add change&quot;,this.validate,this)},mirror:function(g){if(this.mirroring&amp;&amp;this.mirroring===g){return}this.unmirror();this.mirroring=g;this.reset(g.models);g.on(&quot;add&quot;,this._mirrorAdd,this);g.on(&quot;remove&quot;,this._mirrorRemove,this);g.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(i,g,h){this.add(i,{at:h.index})},_mirrorRemove:function(g){this.remove(g)},_mirrorReset:function(g){this.reset(g.models)},more:function(g){if(this.mirroring&amp;&amp;this.mirroring.more){return this.mirroring.more(g)}
 return f.Deferred().resolve().promise()},parse:function(h,g){return _.map(h,function(i){var j=d.get(i.id);return j.set(j.parse(i,g))})},_requery:function(){if(this.props.get(&quot;query&quot;)){this.mirror(a.get(this.props.toJSON()))}}},{comparator:function(i,h){var j=this.props.get(&quot;orderby&quot;),g=this.props.get(&quot;order&quot;)||&quot;DESC&quot;,k=i.cid,l=h.cid;i=i.get(j);h=h.get(j);if(&quot;date&quot;===j||&quot;modified&quot;===j){i=i||new Date();h=h||new Date()}return(&quot;DESC&quot;===g)?e(i,h,k,l):e(h,i,l,k)},filters:{search:function(g){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(h){var i=g.get(h);return i&amp;&amp;-1!==i.search(this.props.get(&quot;search&quot;))},this)},type:function(h){var g=this.props.get(&quot;type&quot;);if(!g){return true}return -1!==g.indexOf(h.get(&quot;type&quot;))}}});c.all=new c();media.query=functio
 n(g){return new c(null,{props:_.extend(_.defaults(g||{},{orderby:&quot;date&quot;}),{query:true})})};a=media.model.Query=c.extend({initialize:function(i,g){var h;g=g||{};c.prototype.initialize.apply(this,arguments);this.args=g.args;this.hasMore=true;this.created=new Date();this.filters.order=function(j){if(!this.comparator){return true}if(this.length){return 1!==this.comparator(j,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 j.get(this.args.orderby)&gt;=this.created}}return false};h=[&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(h).isEmpty().value()){this.observe(c.all)}},more:function(g){var h=this;if(!this.hasMore){return f.Deferred().resolve().promise()}g=g||{};g.add=true;return this.fetch(g).done(function(i){if(_.isEmpty(i)||-1===this.args.posts_per_page||i.length
 &lt;this.args.posts_per_page){h.hasMore=false}})},sync:function(j,h,g){var i;if(&quot;read&quot;===j){g=g||{};g.context=this;g.data=_.extend(g.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}g.data.query=args;return media.ajax(g)}else{i=c.prototype.sync?c.prototype:Backbone;return i.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 g=[];return function(j,i){var h={},l=a.orderby,m=a.defaultProps,k;delete j.query;_.defaul
 ts(j,m);j.order=j.order.toUpperCase();if(&quot;DESC&quot;!==j.order&amp;&amp;&quot;ASC&quot;!==j.order){j.order=m.order.toUpperCase()}if(!_.contains(l.allowed,j.orderby)){j.orderby=m.orderby}_.each(j,function(n,o){h[a.propmap[o]||o]=n});_.defaults(h,a.defaultArgs);h.orderby=l.valuemap[j.orderby]||j.orderby;k=_.find(g,function(n){return _.isEqual(n.args,h)});if(!k){k=new a([],_.extend(i||{},{props:j,args:h}));g.push(k)}return k}}())});media.model.Selection=c.extend({initialize:function(h,g){c.prototype.initialize.apply(this,arguments);this.multiple=g&amp;&amp;g.multiple},add:function(h,g){if(!this.multiple){h=_.isArray(h)?_.first(h):h;this.clear(g)}return c.prototype.add.call(this,h,g)},clear:function(g){return this.remove(this.models,g)},reset:function(h,g){return this.clear(g).add(h,g)},has:function(g){return !!(this.getByCid(g.cid)||this.get(g.id))}})}(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 (22325 => 22326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/media-views.min.js        2012-10-29 18:16:12 UTC (rev 22325)
+++ trunk/wp-includes/js/media-views.min.js        2012-10-29 22:58:31 UTC (rev 22326)
</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);if(this.options.dropdown){this.options.dropdown.addClass(&quot;dropdown&quot;)}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=_.uniq(g.concat(this.options.classes));this.el.className=g.join(&quot; &quot;);if(this.options.dropdown){this.options.dropdown.detach()}this.$el.text(this.model.get(&quot;text&quot;));if(this.options.dropdown){this.$el.append(this.options.dropdown)}return this},click:function(g){g.preventDefault();if(this.options.click){this.options.click.apply(this,arguments)}}});f.view.ButtonGroup=Backbone.View.extend({tagName:&qu
 ot;div&quot;,className:&quot;button-group button-large media-button-group&quot;,initialize:function(){this.buttons=_.map(this.options.buttons||[],function(g){if(g instanceof Backbone.View){return g}else{return new f.view.Button(g).render()}});delete this.options.buttons;if(this.options.classes){this.$el.addClass(this.options.classes)}},render:function(){this.$el.html(e(_.pluck(this.buttons,&quot;el&quot;)).detach());return this}});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;:&quot;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:func
 tion(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({m
 axWidth: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.model.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;a
 dd 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,i={},h;if(this.uploader||!this.$el.closest(&quot;body&quot;).length){return}h=e(&quot;#post_ID&quot;);if(h.length){i.post_id=h.val()}this.uploader=new wp.Uploader(_.extend({container:this.$el,dropzone:this.$el,browser:this.$(&quot;.upload-attachments a&quot;),params:i},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.red
 uce(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;:new f.view.ButtonGroup({priority:30,classes:&quot;dropdown-flip-x&quot;,buttons:[{text:b.insertIntoPost,click:_.bind(g.update,g,&quot;insert&quot;)},{classes:[&quot;down-arrow&quot;
 ],dropdown:new f.view.AttachmentDisplaySettings().render().$el,click:function(i){var h=this.$el;if(!e(i.target).closest(&quot;.dropdown&quot;).length){h.toggleClass(&quot;active&quot;)}i.stopPropagation();if(h.is(&quot;:visible&quot;)){e(document.body).one(&quot;click&quot;,function(){h.removeClass(&quot;active&quot;)})}}}]}).render(),&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;);_.each(insert.buttons,function(j){j.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.W
 orkspace.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(&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}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 this}this.$list.html(this.collection.map(function(g){return new this.options.AttachmentView({controller:this.controller,model:g}).render().$el},thi
 s));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()}});f.view.AttachmentDisplaySettings=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;attachment-display-settings&quot;,template:f.template(&quot;attachment-display-settings&quot;),events:{&quot;click button&quot;:&quot;updateHandler&quot;},settings:{align:{accepts:[&quot;left&quot;,&quot;center&quot;,&quot;right&quot;,&quot;none&quot;],name:&quot;align&quot;,fallback:&quot;none&quot;},link:{accepts:[&quot;post&quot;,&quot;
 file&quot;,&quot;none&quot;],name:&quot;urlbutton&quot;,fallback:&quot;post&quot;},size:{accepts:[&quot;thumbnail&quot;,&quot;medium&quot;,&quot;large&quot;,&quot;full&quot;],name:&quot;imgsize&quot;,fallback:&quot;medium&quot;}},initialize:function(){var g=this.settings;this.model=new Backbone.Model();_.each(g,function(i,h){this.model.set(h,getUserSetting(i.name,i.fallback))},this);this.model.validate=function(h){return _.any(h,function(j,i){return !g[i]||!_.contains(g[i].accepts,j)})};this.model.on(&quot;change&quot;,function(i,h){if(!h.changes){return}_.each(_.keys(h.changes),function(j){if(g[j]){setUserSetting(g[j].name,i.get(j))}})},this);this.model.on(&quot;change&quot;,this.updateChanges,this)},render:function(){this.$el.html(this.template(this.model.toJSON()));_(this.model.attributes).chain().keys().each(this.update,this);return this},update:function(g){var h=this.$('[data-setting=&quot;'+g+'&quot;] button').removeClass(&quot;active&quot;);h.filter('[value=&quot;'+th
 is.model.get(g)+'&quot;]').addClass(&quot;active&quot;)},updateHandler:function(g){var h=e(g.target).closest(&quot;.button-group&quot;);g.preventDefault();if(h.length){this.model.set(h.data(&quot;setting&quot;),g.target.value)}},updateChanges:function(h,g){if(g.changes){_(g.changes).chain().keys().each(this.update,this)}}})}(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;e.support.transition=(function(){var g=document.documentElement.style,h={WebkitTransition:&quot;webkitTransitionEnd&quot;,MozTransition:&quot;transitionend&quot;,OTransition:&quot;oTransitionEnd otransitionend&quot;,transition:&quot;transitionend&quot;},i;i=_.find(_.keys(h),function(j){return !_.isUndefined(g[j])});return i&amp;&amp;{end:h[i]}}());f.transition=function(g){var h=e.Deferred();if(e.support.transition){if(!(g instanceof e)){g=e(g)}g.first().one(e.support.transition.end,h.resolve)}else{h.resolve()}return h.promise()};f.controller.StateMachine=function(g){this.states=new Backbone.Collection(g)};f.controller.StateMachine.extend=Backbone.Model.extend;_.extend(f.controller.StateMachine.prototype,{get:function(g){this.states=this.states||new Backbone.Collection();if(!this.states.get(g)){this.states.add
 ({id:g})}return this.states.get(g)},state:function(h){var g;if(h){if(g=this.state()){g.trigger(&quot;deactivate&quot;)}this._state=h;return this.state().trigger(&quot;activate&quot;)}if(this._state){return this.get(this._state)}}});_.each([&quot;on&quot;,&quot;off&quot;,&quot;trigger&quot;],function(g){f.controller.StateMachine.prototype[g]=function(){this.states=this.states||new Backbone.Collection();this.states[g].apply(this.states,arguments);return this}});f.controller.Library=Backbone.Model.extend({defaults:{id:&quot;library&quot;,multiple:false,describe:false,title:b.mediaLibrary},initialize:function(){if(!this.get(&quot;selection&quot;)){this.set(&quot;selection&quot;,new f.model.Selection(null,{multiple:this.get(&quot;multiple&quot;)}))}if(!this.get(&quot;library&quot;)){this.set(&quot;library&quot;,f.query())}if(!this.get(&quot;edge&quot;)){this.set(&quot;edge&quot;,120)}if(!this.get(&quot;gutter&quot;)){this.set(&quot;gutter&quot;,6)}this.on(&quot;activate&quot;,thi
 s.activate,this);this.on(&quot;deactivate&quot;,this.deactivate,this);this.on(&quot;change:details&quot;,this.details,this)},activate:function(){this.toolbar();this.sidebar();this.content();if(this.get(&quot;multiple&quot;)){wp.Uploader.queue.on(&quot;add&quot;,this.selectUpload,this)}this.get(&quot;selection&quot;).on(&quot;add remove&quot;,this.toggleDetails,this)},deactivate:function(){var g=this._postLibraryToolbar;if(g){this.get(&quot;selection&quot;).off(&quot;add remove&quot;,g.visibility,g)}wp.Uploader.queue.off(&quot;add&quot;,this.selectUpload,this);this.get(&quot;selection&quot;).off(&quot;add remove&quot;,this.toggleDetails,this)},toolbar:function(){var h=this.frame,g;g=this._postLibraryToolbar=new f.view.Toolbar.PostLibrary({controller:h,state:this});h.toolbar(g);this.get(&quot;selection&quot;).on(&quot;add remove&quot;,g.visibility,g)},sidebar:function(){var g=this.frame;g.sidebar(new f.view.Sidebar({controller:g}));this.details({silent:true});g.sidebar().add({
 search:new f.view.Search({controller:g,model:this.get(&quot;library&quot;).props,priority:20}),selection:new f.view.SelectionPreview({controller:g,collection:this.get(&quot;selection&quot;),priority:40})})},content:function(){var g=this.frame;g.content(new f.view.Attachments({controller:g,collection:this.get(&quot;library&quot;),AttachmentView:f.view.Attachment.Library}).render())},selectUpload:function(g){this.get(&quot;selection&quot;).add(g)},details:function(i){var h=this.get(&quot;details&quot;),g;if(h){g=new f.view.Attachment.Details({controller:this.frame,model:h,priority:80})}else{g=new Backbone.View()}if(!i||!i.silent){g.render()}this.frame.sidebar().add(&quot;details&quot;,g,i)},toggleDetails:function(g){var h=this.get(&quot;details&quot;),i=this.get(&quot;selection&quot;);if(i.has(g)){this.set(&quot;details&quot;,g)}else{if(i.length){this.set(&quot;details&quot;,i.last())}else{this.unset(&quot;details&quot;)}}}});f.controller.Gallery=f.controller.Library.extend({d
 efaults:{id:&quot;gallery&quot;,multiple:false,describe:true,title:b.createGallery,edge:199},toolbar:function(){this.frame.toolbar(new f.view.Toolbar.Gallery({controller:this.frame,state:this}))},sidebar:function(){var g=this.frame;g.sidebar(new f.view.Sidebar({controller:g}));this.details()},content:function(){this.frame.content(new f.view.Attachments({controller:this.frame,collection:this.get(&quot;library&quot;),sortable:true,AttachmentView:f.view.Attachment.Gallery}).render())}});f.view.Frame=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;media-frame&quot;,template:f.template(&quot;media-frame&quot;),initialize:function(){_.defaults(this.options,{state:&quot;library&quot;,title:&quot;&quot;,selection:[],library:{},modal:true,multiple:false,uploader:true});this.createSelection();this.createSubviews();this.createStates()},render:function(){var g=[this.toolbar().el,this.sidebar().el,this.content().el];if(this.modal){this.modal.render()}this.$el.children().fil
 ter(g).detach();this.$el.empty().append(g);if(this.uploader){this.uploader.render().$el.appendTo(this.$el)}return this},createSelection:function(){var g=this,h=this.options.selection;if(!(h instanceof f.model.Selection)){h=this.options.selection=new f.model.Selection(h,{multiple:this.options.multiple})}},createStates:function(){var g=this.options;this.states=new Backbone.Collection();this.states.on(&quot;add&quot;,function(h){h.frame=this},this);this.states.add([new f.controller.Library({selection:g.selection,library:f.query(g.library),multiple:this.options.multiple}),new f.controller.Gallery({library:g.selection})]);this.state(g.state)},createSubviews:function(){_.each([&quot;toolbar&quot;,&quot;sidebar&quot;,&quot;content&quot;],function(g){this[&quot;_&quot;+g]=new Backbone.View({tagName:&quot;div&quot;,className:&quot;media-&quot;+g})},this);if(this.options.modal){this.modal=new f.view.Modal({controller:this,$content:this.$el,title:this.options.title})}if(this.options.up
 loader){this.uploader=new f.view.UploaderWindow({uploader:{dropzone:this.modal?this.modal.$el:this.$el}})}}});_.extend(f.view.Frame.prototype,f.controller.StateMachine.prototype);_.each([&quot;toolbar&quot;,&quot;sidebar&quot;,&quot;content&quot;],function(g){f.view.Frame.prototype[g]=function(h){var i=this[&quot;_&quot;+g];if(!h){return i}h.$el.addClass(&quot;media-&quot;+g);if(i.destroy){i.destroy()}i.undelegateEvents();i.$el.replaceWith(h.$el);this[&quot;_&quot;+g]=h}});_.each([&quot;open&quot;,&quot;close&quot;,&quot;attach&quot;,&quot;detach&quot;],function(g){f.view.Frame.prototype[g]=function(h){if(this.modal){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;_.defaults(this.options,{container:document.bod
 y,title:&quot;&quot;})},render:function(){this.options.$content=this.options.$content||e(&quot;&lt;div /&gt;&quot;);this.options.$content.detach();this.$el.html(this.template({title:this.options.title}));this.options.$content.addClass(&quot;media-modal-content&quot;);this.$(&quot;.media-modal&quot;).append(this.options.$content);return this},attach:function(){this.$el.appendTo(this.options.container);this.controller.trigger(&quot;attach&quot;,this.controller);return this},detach:function(){this.$el.detach();this.controller.trigger(&quot;detach&quot;,this.controller);return this},open:function(){this.$el.show();this.controller.trigger(&quot;open&quot;,this.controller);return this},close:function(){this.$el.hide();this.controller.trigger(&quot;close&quot;,this.controller);return this},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;r
 eturn this.render()}});f.view.UploaderWindow=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;uploader-window&quot;,template:f.template(&quot;uploader-window&quot;),initialize:function(){var g;this.controller=this.options.controller;this.inline=new f.view.UploaderInline({controller:this.controller,uploaderWindow:this}).render();this.inline.$el.appendTo(&quot;body&quot;);g=this.options.uploader=_.defaults(this.options.uploader||{},{container:this.inline.$el,dropzone:this.$el,browser:this.inline.$(&quot;.browser&quot;),params:{}});if(g.dropzone){if(!(g.dropzone instanceof e)){g.dropzone=e(g.dropzone)}g.dropzone.one(&quot;mouseenter dragenter&quot;,_.bind(this.maybeInitUploader,this))}},render:function(){this.maybeInitUploader();this.$el.html(this.template(this.options));return this},refresh:function(){if(this.uploader){this.uploader.refresh()}},maybeInitUploader:function(){var h,g;if(this.uploader||!this.$el.closest(&quot;body&quot;).length){return}h=e(&quot;#post
 _ID&quot;);if(h.length){this.options.uploader.params.post_id=h.val()}this.uploader=new wp.Uploader(this.options.uploader);g=this.uploader.dropzone;g.on(&quot;dropzone:enter&quot;,_.bind(this.show,this));g.on(&quot;dropzone:leave&quot;,_.bind(this.hide,this))},show:function(){var g=this.$el.show();_.defer(function(){g.css({opacity:1})})},hide:function(){var g=this.$el.css({opacity:0});f.transition(g).done(function(){if(&quot;0&quot;===g.css(&quot;opacity&quot;)){g.hide()}})}});f.view.UploaderInline=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;uploader-inline&quot;,template:f.template(&quot;uploader-inline&quot;),initialize:function(){this.controller=this.options.controller;wp.Uploader.queue.on(&quot;add remove reset change:percent&quot;,this.renderUploadProgress,this)},destroy:function(){wp.Uploader.queue.off(&quot;add remove reset change:percent&quot;,this.renderUploadProgress,this)},render:function(){this.renderUploadProgress();this.$el.html(this.template(t
 his.options));this.$bar=this.$(&quot;.media-progress-bar div&quot;);return this},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.Toolbar=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;media-toolbar&quot;,initialize:function(){this.controller=this.options.controller;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){this.add(this.options.items,{silent:true})}if(!this.options.silent){this.render()}},render:function(){var g=_.chain(this._views).sortBy(function(h){return h.options.priority||10}).groupBy(function(h){return(h.opt
 ions.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){h=h||{};if(_.isObject(i)){_.each(i,function(j,k){this.add(k,j,{silent:true})},this);if(!h.silent){this.render()}return this}if(!(g instanceof Backbone.View)){g.classes=[i].concat(g.classes||[]);g=new f.view.Button(g).render()}g.controller=g.controller||this.controller;this._views[i]=g;if(!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.Toolbar.PostLibrary=f.view.Toolbar.extend({initialize:function(){var i=this.options.state,h=i.get(&quot;selection&quot;),g=this.options.controller;this.options.items={&quot;create-new-gallery&quot;:{style:&quot;primary&quot;,text:b.createNewGallery,
 priority:40,click:function(){this.controller.state(&quot;gallery&quot;)}},&quot;insert-into-post&quot;:new f.view.ButtonGroup({priority:30,classes:&quot;dropdown-flip-x&quot;,buttons:[{text:b.insertIntoPost,click:function(){g.close();i.trigger(&quot;insert&quot;,h);h.clear()}},{classes:[&quot;down-arrow&quot;],dropdown:new f.view.AttachmentDisplaySettings().render().$el,click:function(k){var j=this.$el;if(!e(k.target).closest(&quot;.dropdown&quot;).length){j.toggleClass(&quot;active&quot;)}k.stopPropagation();if(j.is(&quot;:visible&quot;)){e(document.body).one(&quot;click&quot;,function(){j.removeClass(&quot;active&quot;)})}}}]}).render(),&quot;add-to-gallery&quot;:{text:b.addToGallery,priority:20}};f.view.Toolbar.prototype.initialize.apply(this,arguments);this.visibility()},visibility:function(){var k=this.options.state,h=k.get(&quot;selection&quot;),g=this.options.controller,j=h.length,i;i=j&gt;1&amp;&amp;h.all(function(l){return&quot;image&quot;===l.get(&quot;type&quot;)}
 );this.get(&quot;create-new-gallery&quot;).$el.toggle(i);insert=this.get(&quot;insert-into-post&quot;);_.each(insert.buttons,function(l){l.model.set(&quot;style&quot;,i?&quot;&quot;:&quot;primary&quot;)});_.first(insert.buttons).model.set(&quot;disabled&quot;,!j)}});f.view.Toolbar.Gallery=f.view.Toolbar.extend({initialize:function(){var j=this.options.state,h=j.get(&quot;editing&quot;),i=j.get(&quot;library&quot;),g=this.options.controller;this.options.items={&quot;update-gallery&quot;:{style:&quot;primary&quot;,text:h?b.updateGallery:b.insertGalleryIntoPost,priority:40,click:function(){g.close();j.trigger(&quot;update&quot;,i);i.clear();g.state(&quot;library&quot;)}},&quot;return-to-library&quot;:{text:h?b.addImagesFromLibrary:b.returnToLibrary,priority:-40,click:function(){this.controller.state(&quot;library&quot;)}}};f.view.Toolbar.prototype.initialize.apply(this,arguments)}});f.view.Button=Backbone.View.extend({tagName:&quot;a&quot;,className:&quot;media-button&quot;,att
 ributes:{href:&quot;#&quot;},events:{click:&quot;click&quot;},defaults:{text:&quot;&quot;,style:&quot;&quot;,size:&quot;large&quot;,disabled:false},initialize:function(){this.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);if(this.options.dropdown){this.options.dropdown.addClass(&quot;dropdown&quot;)}this.model.on(&quot;change&quot;,this.render,this)},render:function(){var h=[&quot;button&quot;,this.className],g=this.model.toJSON();if(g.style){h.push(&quot;button-&quot;+g.style)}if(g.size){h.push(&quot;button-&quot;+g.size)}h=_.uniq(h.concat(this.options.classes));this.el.className=h.join(&quot; &quot;);this.$el.attr(&quot;disabled&quot;,g.disabled);if(this.options.dropdown){this.options.dropdown.detach()}this.$el.text(this.model.get(&quot;text&quot;));if(this.options.dropdown){this.$el.append(this.options.dropdown)}return this},click:function(g){g.p
 reventDefault();if(this.options.click&amp;&amp;!this.model.get(&quot;disabled&quot;)){this.options.click.apply(this,arguments)}}});f.view.ButtonGroup=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;button-group button-large media-button-group&quot;,initialize:function(){this.buttons=_.map(this.options.buttons||[],function(g){if(g instanceof Backbone.View){return g}else{return new f.view.Button(g).render()}});delete this.options.buttons;if(this.options.classes){this.$el.addClass(this.options.classes)}},render:function(){this.$el.html(e(_.pluck(this.buttons,&quot;el&quot;)).detach());return this}});f.view.Sidebar=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;media-sidebar&quot;,template:f.template(&quot;sidebar&quot;),initialize:function(){this.controller=this.options.controller;this._views={};if(this.options.views){this.add(this.options.views,{silent:true})}if(!this.options.silent){this.render()}},render:function(){var g=_(this._views).chain().so
 rtBy(function(h){return h.options.priority||10}).pluck(&quot;el&quot;).value();e(g).detach();this.$el.html(this.template({title:this.controller.state().get(&quot;title&quot;)||&quot;&quot;,uploader:this.controller.options.uploader}));this.$(&quot;.sidebar-content&quot;).html(g);if(this.controller.uploader){this.$el.append(this.controller.uploader.inline.$el);this.controller.uploader.refresh()}return this},add:function(i,g,h){h=h||{};if(_.isObject(i)){_.each(i,function(j,k){this.add(k,j,{silent:true})},this);if(!h.silent){this.render()}return this}g.controller=g.controller||this.controller;this._views[i]=g;if(!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.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;toggleSelectio
 n&quot;,&quot;change .describe&quot;:&quot;describe&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.state().get(&quot;describe&quot;);if(&quot;image&quot;===g.type){_.extend(g,this.imageSize())}this.$el.html(this.template(g));if(g.uploading){this.$bar=this.$(&quot;.media-progress-bar div&quot;)}else{delete this.$bar}if(this.selected()){this.select()}retu
 rn 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.state().get(&quot;selection&quot;);if(!g){return}g[g.has(this.model)?&quot;remove&quot;:&quot;add&quot;](this.model)},selected:function(){var g=this.controller.state().get(&quot;selection&quot;);if(g){return g.has(this.model)}},select:function(g,i){var h=this.controller.state().get(&quot;selection&quot;);if(!h||(i&amp;&amp;i!==h)){return}this.$el.addClass(&quot;selected&quot;)},deselect:function(g,i){var h=this.controller.state().get(&quot;selection&quot;);if(!h||(i&amp;&amp;i!==h)){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 _.clone(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;)}}},describe:function(g){if(&quot;image&quot;===this.model.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);g[&quot;click .close&quot;]=&quot;removeFromGallery&quot;;return g}()),removeFromGallery:function(){this.controller.state().get(&quot;library&quot;).remove(this.model)}});f.view.Attachments=Backbone.View.extend({tagName:&quot;ul&quot;,className:&quot;attachments&quot;,template:f.template(&quot;attachments-css&quot;),events:{scroll:&quot;scroll&quot;},initialize:function(){this.controller=this.options.controller;this.el.id=_.uniqueId(&quot;__attachments-view-&quo
 t;);_.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.render,this);this.scroll=_.chain(this.scroll).bind(this).throttle(this.options.refreshSensitivity).value();this.initSortable();this.controller.state().on(&quot;change:edge change:gutter&quot;,this.css,this);this.css()},destroy:function(){this.collection.off(&quot;add remove reset&quot;,null,this);this.controller.state().off(&quot;change:edge change:gutter&quot;,this.css,this)},css:function(){var g=e(&quot;#&quot;+this.el.id+&quot;-css&quot;),h=this.controller.state();if(g.length){g.remove()}f.view.Attachments.$head().append(this.template({id:this.el.id,edge:h.get(&quot;edge&quot;),gutter:h.get(&quot;gutter&quot;)}))},initSortable:function(){var g=this.collection,h;if(!this.options.sortable||
 !e.fn.sortable){return}this.$el.sortable({disabled:!!g.comparator,containment:this.$el,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.$el.sortable(&quot;option&quot;,&quot;disabled&quot;,!!g.comparator)},this)},render:function(){if(!this.collection.length){this.collection.more();this.$el.empty();return this}this.$el.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.$el.children();if(i.length&gt;h){i.eq(h).before(g.$el)}else{this.$el.append(g.$el)}},remove:function(i,g){var h=this.$el.children();if(h.length){h.eq(g).detach()}},scroll:function(g){if(!this.$el.is(&quot;:visible&quo
 t;)){return}if(this.el.scrollHeight&lt;this.el.scrollTop+(this.el.clientHeight*this.options.refreshThreshold)){this.collection.more()}}},{$head:(function(){var g;return function(){return g=g||e(&quot;head&quot;)}}())});f.view.Search=Backbone.View.extend({tagName:&quot;input&quot;,className:&quot;search&quot;,attributes:{type:&quot;text&quot;,placeholder:b.search},events:{keyup:&quot;search&quot;},render:function(){this.el.value=this.model.escape(&quot;search&quot;);return this},search:function(g){if(g.target.value){this.model.set(&quot;search&quot;,g.target.value)}else{this.model.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.last();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()}});f.view.AttachmentDisplaySettings=Backbone.View.extend({tagName:&quot;div&quot;,className:&quot;attachment-display-settings&quot;,template:f.template(&quot;attachment-display-settings&quot;),events:{&quot;click button&quot;:&quot;updateHandler&quot;},settings:{align:{accepts:[&quot;left&quot;,&quot;center&quot;,&quot;right&quot;,&quot;none&quot;],name:&quot;align&quot;,fallback:&quot;none&quot;},link:{accepts:[&quot;post&quot;,&quot;file&quot;,&quot;none&quot;],name:&quot;
 urlbutton&quot;,fallback:&quot;post&quot;},size:{accepts:[&quot;thumbnail&quot;,&quot;medium&quot;,&quot;large&quot;,&quot;full&quot;],name:&quot;imgsize&quot;,fallback:&quot;medium&quot;}},initialize:function(){var g=this.settings;this.model=new Backbone.Model();_.each(g,function(i,h){this.model.set(h,getUserSetting(i.name,i.fallback))},this);this.model.validate=function(h){return _.any(h,function(j,i){return !g[i]||!_.contains(g[i].accepts,j)})};this.model.on(&quot;change&quot;,function(i,h){if(!h.changes){return}_.each(_.keys(h.changes),function(j){if(g[j]){setUserSetting(g[j].name,i.get(j))}})},this);this.model.on(&quot;change&quot;,this.updateChanges,this)},render:function(){this.$el.html(this.template(this.model.toJSON()));_(this.model.attributes).chain().keys().each(this.update,this);return this},update:function(g){var h=this.$('[data-setting=&quot;'+g+'&quot;] button').removeClass(&quot;active&quot;);h.filter('[value=&quot;'+this.model.get(g)+'&quot;]').addClass(&quo
 t;active&quot;)},updateHandler:function(g){var h=e(g.target).closest(&quot;.button-group&quot;);g.preventDefault();if(h.length){this.model.set(h.data(&quot;setting&quot;),g.target.value)}},updateChanges:function(h,g){if(g.changes){_(g.changes).chain().keys().each(this.update,this)}}});f.view.Attachment.Details=f.view.Attachment.extend({tagName:&quot;div&quot;,className:&quot;attachment-details&quot;,template:f.template(&quot;attachment-details&quot;),events:{&quot;change .describe&quot;:&quot;describe&quot;}})}(jQuery));
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpincludesjspluploadwppluploadminjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/js/plupload/wp-plupload.min.js (22325 => 22326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/js/plupload/wp-plupload.min.js        2012-10-29 18:16:12 UTC (rev 22325)
+++ trunk/wp-includes/js/plupload/wp-plupload.min.js        2012-10-29 22:58:31 UTC (rev 22326)
</span><span class="lines">@@ -1 +1 @@
</span><del>-window.wp=window.wp||{};(function(a,b){var c;if(typeof _wpPluploadSettings===&quot;undefined&quot;){return}c=function(f){var d=this,h={container:&quot;container&quot;,browser:&quot;browse_button&quot;,dropzone:&quot;drop_element&quot;},g,e;this.supports={upload:c.browser.supported};this.supported=this.supports.upload;if(!this.supported){return}this.plupload=b.extend(true,{multipart_params:{}},c.defaults);this.container=document.body;b.extend(true,this,f);for(g in this){if(b.isFunction(this[g])){this[g]=b.proxy(this[g],this)}}for(g in h){if(!this[g]){continue}this[g]=b(this[g]).first();if(!this[g].length){delete this[g];continue}if(!this[g].prop(&quot;id&quot;)){this[g].prop(&quot;id&quot;,&quot;__wp-uploader-id-&quot;+c.uuid++)}this.plupload[h[g]]=this[g].prop(&quot;id&quot;)}if(!(this.browser&amp;&amp;this.browser.length)&amp;&amp;!(this.dropzone&amp;&amp;this.dropzone.length)){return}this.uploader=new plupload.Uploader(this.plupload);delete this.plupload;this.p
 aram(this.params||{});delete this.params;e=function(j,k,i){if(i.attachment){i.attachment.destroy()}d.error(j,k,i)};this.uploader.init();this.supports.dragdrop=this.uploader.features.dragdrop&amp;&amp;!c.browser.mobile;(function(j,i){var l,k;if(!j){return}j.toggleClass(&quot;supports-drag-drop&quot;,!!i);if(!i){return j.unbind(&quot;.wp-uploader&quot;)}j.bind(&quot;dragover.wp-uploader&quot;,function(){if(l){clearTimeout(l)}if(k){return}j.addClass(&quot;drag-over&quot;);k=true});j.bind(&quot;dragleave.wp-uploader, drop.wp-uploader&quot;,function(){l=setTimeout(function(){k=false;j.removeClass(&quot;drag-over&quot;)},0)})}(this.dropzone,this.supports.dragdrop));if(this.browser){this.browser.on(&quot;mouseenter&quot;,this.refresh)}else{this.uploader.disableBrowse(true);b(&quot;#&quot;+this.uploader.id+&quot;_html5_container&quot;).hide()}this.uploader.bind(&quot;FilesAdded&quot;,function(i,j){_.each(j,function(l){var k,m;k=_.extend({file:l,uploading:true,date:new Date()},_.pick
 (l,&quot;loaded&quot;,&quot;size&quot;,&quot;percent&quot;));m=/(?:jpe?g|png|gif)$/i.exec(l.name);if(m){k.type=&quot;image&quot;;k.subtype=(&quot;jpg&quot;===m[0])?&quot;jpeg&quot;:m[0]}l.attachment=wp.media.model.Attachment.create(k);c.queue.add(l.attachment);d.added(l.attachment)});i.refresh();i.start()});this.uploader.bind(&quot;UploadProgress&quot;,function(i,j){j.attachment.set(_.pick(j,&quot;loaded&quot;,&quot;percent&quot;));d.progress(j.attachment)});this.uploader.bind(&quot;FileUploaded&quot;,function(i,l,k){var j;try{k=JSON.parse(k.response)}catch(m){return e(pluploadL10n.default_error,m,l)}if(!_.isObject(k)||_.isUndefined(k.success)){return e(pluploadL10n.default_error,null,l)}else{if(!k.success){return e(k.data.message,k.data,l)}}_.each([&quot;file&quot;,&quot;loaded&quot;,&quot;size&quot;,&quot;uploading&quot;,&quot;percent&quot;],function(n){l.attachment.unset(n)});l.attachment.set(k.data);wp.media.model.Attachment.get(k.data.id,l.attachment);j=c.queue.all(func
 tion(n){return !n.get(&quot;uploading&quot;)});if(j){c.queue.reset()}d.success(l.attachment)});this.uploader.bind(&quot;Error&quot;,function(i,j){var l=pluploadL10n.default_error,k;for(k in c.errorMap){if(j.code===plupload[k]){l=c.errorMap[k];break}}j(l,j,j.file);i.refresh()});this.init()};b.extend(c,_wpPluploadSettings);c.uuid=0;c.errorMap={FAILED:pluploadL10n.upload_failed,FILE_EXTENSION_ERROR:pluploadL10n.invalid_filetype,IMAGE_FORMAT_ERROR:pluploadL10n.not_an_image,IMAGE_MEMORY_ERROR:pluploadL10n.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:pluploadL10n.image_dimensions_exceeded,GENERIC_ERROR:pluploadL10n.upload_failed,IO_ERROR:pluploadL10n.io_error,HTTP_ERROR:pluploadL10n.http_error,SECURITY_ERROR:pluploadL10n.security_error};b.extend(c.prototype,{param:function(d,e){if(arguments.length===1&amp;&amp;typeof d===&quot;string&quot;){return this.uploader.settings.multipart_params[d]}if(arguments.length&gt;1){this.uploader.settings.multipart_params[d]=e}else{b.extend(this.up
 loader.settings.multipart_params,d)}},init:function(){},error:function(){},success:function(){},added:function(){},progress:function(){},complete:function(){},refresh:function(){this.uploader.refresh()}});c.queue=new wp.media.model.Attachments([],{query:false});a.Uploader=c})(wp,jQuery);
</del><span class="cx">\ No newline at end of file
</span><ins>+window.wp=window.wp||{};(function(a,b){var c;if(typeof _wpPluploadSettings===&quot;undefined&quot;){return}c=function(f){var d=this,h={container:&quot;container&quot;,browser:&quot;browse_button&quot;,dropzone:&quot;drop_element&quot;},g,e;this.supports={upload:c.browser.supported};this.supported=this.supports.upload;if(!this.supported){return}this.plupload=b.extend(true,{multipart_params:{}},c.defaults);this.container=document.body;b.extend(true,this,f);for(g in this){if(b.isFunction(this[g])){this[g]=b.proxy(this[g],this)}}for(g in h){if(!this[g]){continue}this[g]=b(this[g]).first();if(!this[g].length){delete this[g];continue}if(!this[g].prop(&quot;id&quot;)){this[g].prop(&quot;id&quot;,&quot;__wp-uploader-id-&quot;+c.uuid++)}this.plupload[h[g]]=this[g].prop(&quot;id&quot;)}if(!(this.browser&amp;&amp;this.browser.length)&amp;&amp;!(this.dropzone&amp;&amp;this.dropzone.length)){return}this.uploader=new plupload.Uploader(this.plupload);delete this.plupload;this.p
 aram(this.params||{});delete this.params;e=function(j,k,i){if(i.attachment){i.attachment.destroy()}d.error(j,k,i)};this.uploader.init();this.supports.dragdrop=this.uploader.features.dragdrop&amp;&amp;!c.browser.mobile;(function(j,i){var l,k;if(!j){return}j.toggleClass(&quot;supports-drag-drop&quot;,!!i);if(!i){return j.unbind(&quot;.wp-uploader&quot;)}j.bind(&quot;dragover.wp-uploader&quot;,function(){if(l){clearTimeout(l)}if(k){return}j.trigger(&quot;dropzone:enter&quot;).addClass(&quot;drag-over&quot;);k=true});j.bind(&quot;dragleave.wp-uploader, drop.wp-uploader&quot;,function(){l=setTimeout(function(){k=false;j.trigger(&quot;dropzone:leave&quot;).removeClass(&quot;drag-over&quot;)},0)})}(this.dropzone,this.supports.dragdrop));if(this.browser){this.browser.on(&quot;mouseenter&quot;,this.refresh)}else{this.uploader.disableBrowse(true);b(&quot;#&quot;+this.uploader.id+&quot;_html5_container&quot;).hide()}this.uploader.bind(&quot;FilesAdded&quot;,function(i,j){_.each(j,funct
 ion(l){var k,m;k=_.extend({file:l,uploading:true,date:new Date()},_.pick(l,&quot;loaded&quot;,&quot;size&quot;,&quot;percent&quot;));m=/(?:jpe?g|png|gif)$/i.exec(l.name);if(m){k.type=&quot;image&quot;;k.subtype=(&quot;jpg&quot;===m[0])?&quot;jpeg&quot;:m[0]}l.attachment=wp.media.model.Attachment.create(k);c.queue.add(l.attachment);d.added(l.attachment)});i.refresh();i.start()});this.uploader.bind(&quot;UploadProgress&quot;,function(i,j){j.attachment.set(_.pick(j,&quot;loaded&quot;,&quot;percent&quot;));d.progress(j.attachment)});this.uploader.bind(&quot;FileUploaded&quot;,function(i,l,k){var j;try{k=JSON.parse(k.response)}catch(m){return e(pluploadL10n.default_error,m,l)}if(!_.isObject(k)||_.isUndefined(k.success)){return e(pluploadL10n.default_error,null,l)}else{if(!k.success){return e(k.data.message,k.data,l)}}_.each([&quot;file&quot;,&quot;loaded&quot;,&quot;size&quot;,&quot;uploading&quot;,&quot;percent&quot;],function(n){l.attachment.unset(n)});l.attachment.set(k.data);
 wp.media.model.Attachment.get(k.data.id,l.attachment);j=c.queue.all(function(n){return !n.get(&quot;uploading&quot;)});if(j){c.queue.reset()}d.success(l.attachment)});this.uploader.bind(&quot;Error&quot;,function(i,j){var l=pluploadL10n.default_error,k;for(k in c.errorMap){if(j.code===plupload[k]){l=c.errorMap[k];break}}j(l,j,j.file);i.refresh()});this.init()};b.extend(c,_wpPluploadSettings);c.uuid=0;c.errorMap={FAILED:pluploadL10n.upload_failed,FILE_EXTENSION_ERROR:pluploadL10n.invalid_filetype,IMAGE_FORMAT_ERROR:pluploadL10n.not_an_image,IMAGE_MEMORY_ERROR:pluploadL10n.image_memory_exceeded,IMAGE_DIMENSIONS_ERROR:pluploadL10n.image_dimensions_exceeded,GENERIC_ERROR:pluploadL10n.upload_failed,IO_ERROR:pluploadL10n.io_error,HTTP_ERROR:pluploadL10n.http_error,SECURITY_ERROR:pluploadL10n.security_error};b.extend(c.prototype,{param:function(d,e){if(arguments.length===1&amp;&amp;typeof d===&quot;string&quot;){return this.uploader.settings.multipart_params[d]}if(arguments.length&
 gt;1){this.uploader.settings.multipart_params[d]=e}else{b.extend(this.uploader.settings.multipart_params,d)}},init:function(){},error:function(){},success:function(){},added:function(){},progress:function(){},complete:function(){},refresh:function(){this.uploader.refresh()}});c.queue=new wp.media.model.Attachments([],{query:false});a.Uploader=c})(wp,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 (22325 => 22326)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/version.php        2012-10-29 18:16:12 UTC (rev 22325)
+++ trunk/wp-includes/version.php        2012-10-29 22:58:31 UTC (rev 22326)
</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-beta2-22315';
</del><ins>+$wp_version = '3.5-beta2-22326';
</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>