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