<!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>[26291] trunk/src/wp-admin: Dash cleanup.</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 { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { 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/26291">26291</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2013-11-20 19:43:36 +0000 (Wed, 20 Nov 2013)</dd>
</dl>

<h3>Log Message</h3>
<pre>Dash cleanup.
 * Use wp_add_dashboard_widget() rather than add_meta_box().
 * Use original functions like wp_dashboard_primary(), wp_dashboard_right_now(), wp_dashboard_quick_press() (where possible).
 * Only include plugins section of the news widget when appropriate, which necessitates the set_current_screen() via the ajax action.
 * Remove some debug cruft that was preventing caching and invalidation.
 * Simplify lots of things where possible.
see <a href="http://core.trac.wordpress.org/ticket/25824">#25824</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincssthemecss">trunk/src/wp-admin/css/theme.css</a></li>
<li><a href="#trunksrcwpadmincsswpadmincss">trunk/src/wp-admin/css/wp-admin.css</a></li>
<li><a href="#trunksrcwpadminjsthemejs">trunk/src/wp-admin/js/theme.js</a></li>
<li><a href="#trunksrcwpadminthemesphp">trunk/src/wp-admin/themes.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincssthemecss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/css/theme.css (26290 => 26291)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/css/theme.css 2013-11-20 19:23:32 UTC (rev 26290)
+++ trunk/src/wp-admin/css/theme.css    2013-11-20 19:43:36 UTC (rev 26291)
</span><span class="lines">@@ -1,20 +1,15 @@
</span><del>-/**
- * THX38 styles...
- *
- * Note: it expects mp6 plugin to be active as this is based on that design of the admin.
- */
-#themes {
</del><ins>+.theme-browser .themes {
</ins><span class="cx">   clear: both;
</span><span class="cx">  padding: 0 0 100px;
</span><span class="cx"> }
</span><del>-#appearance h2 {
</del><ins>+.themes-php .wrap h2 {
</ins><span class="cx">   float: left;
</span><span class="cx">  margin-bottom: 15px;
</span><span class="cx"> }
</span><del>-#appearance h2 .button {
</del><ins>+.themes-php .wrap h2 .button {
</ins><span class="cx">   margin-left: 20px;
</span><span class="cx"> }
</span><del>-.theme-count {
</del><ins>+.themes-php .theme-count {
</ins><span class="cx">   color: #fff;
</span><span class="cx">  border-radius: 30px;
</span><span class="cx">  background: #777;
</span><span class="lines">@@ -27,59 +22,13 @@
</span><span class="cx">          top: -3px;
</span><span class="cx"> }
</span><span class="cx"> /* Position admin messages */
</span><del>-#appearance div.updated {
</del><ins>+.themes-php div.updated {
</ins><span class="cx">   margin: 0 0 20px 0;
</span><span class="cx">  clear: both;
</span><span class="cx"> }
</span><del>-#appearance div.updated a {
</del><ins>+.themes-php div.updated a {
</ins><span class="cx">   text-decoration: underline;
</span><span class="cx"> }
</span><del>-/* Add new theme */
-.add-new-h2 {
-       background: #e0e0e0;
-       color: #555;
-       margin-left: 20px;
-}
-.add-new-icon:hover {
-       background: #2ea2cc;
-}
-/* Edit mode toggle */
-.themes-bulk-edit {
-       color: #555;
-       cursor: pointer;
-       font-size: 14px;
-       margin-left: 20px;
-       padding: 4px 8px;
-       border: 1px solid #ddd;
-       display: none;
-}
-.themes-bulk-edit:before {
-       content: '\f111';
-       display: inline-block;
-       font: normal 20px/1 'dashicons';
-       margin: 0 6px 0 0;
-       opacity: 0.8;
-       position: relative;
-               top: 4px;
-       speak: none;
-       -webkit-font-smoothing: antialiased;
-}
-.themes-bulk-edit:hover {
-       border-color: #2ea2cc;
-       color: #2ea2cc;
-}
-.edit-mode .themes-bulk-edit {
-       background: #555;
-       color: #fff;
-}
-.edit-mode .themes-bulk-edit .edit,
-.themes-bulk-edit .done {
-       display: none;
-}
-.edit-mode .themes-bulk-edit .done,
-.themes-bulk-edit .edit {
-       display: inline;
-}
</del><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * Main theme element
</span><span class="lines">@@ -172,21 +121,7 @@
</span><span class="cx"> .theme .delete-theme:hover:before {
</span><span class="cx">  background: #d54e21;
</span><span class="cx"> }
</span><del>-body.edit-mode .theme .delete-theme {
-       display: inline-block;
-}
-body.edit-mode .theme:hover .theme-screenshot img {
-       opacity: 1;
-}
-body.edit-mode .theme:hover:after {
-       opacity: 0;
-}
-body.edit-mode .theme:hover .theme-actions,
-body.edit-mode .theme.add-new {
-       display: none;
-}
</del><span class="cx"> 
</span><del>-
</del><span class="cx"> /*
</span><span class="cx">  * Theme Screenshot
</span><span class="cx">  *
</span><span class="lines">@@ -350,17 +285,17 @@
</span><span class="cx"> /*
</span><span class="cx">  * Add new theme
</span><span class="cx">  */
</span><del>-.add-new {
</del><ins>+.theme-browser .add-new-theme {
</ins><span class="cx">   border: none;
</span><span class="cx">  box-shadow: none;
</span><span class="cx"> }
</span><del>-.add-new a {
</del><ins>+.theme-browser .add-new-theme a {
</ins><span class="cx">   color: #999;
</span><span class="cx">  text-decoration: none;
</span><span class="cx">  display: block;
</span><span class="cx">  position: relative;
</span><span class="cx"> }
</span><del>-.theme.add-new:after {
</del><ins>+.theme-browser .add-new-theme:after {
</ins><span class="cx">   display: block;
</span><span class="cx">  content: '';
</span><span class="cx">  opacity: 1;
</span><span class="lines">@@ -376,7 +311,7 @@
</span><span class="cx">  border: 5px dashed rgba(0, 0, 0, 0.1);
</span><span class="cx">  box-sizing: border-box;
</span><span class="cx"> }
</span><del>-.theme.add-new span:after {
</del><ins>+.theme-browser .add-new-theme span:after {
</ins><span class="cx">   background: rgba(153, 153, 153, 0.1);
</span><span class="cx">  border-radius: 50%;
</span><span class="cx">  display: inline-block;
</span><span class="lines">@@ -397,22 +332,22 @@
</span><span class="cx">  text-shadow: none;
</span><span class="cx">  z-index:4;
</span><span class="cx"> }
</span><del>-.theme.add-new:hover .theme-screenshot {
</del><ins>+.theme-browser .add-new-theme:hover .theme-screenshot {
</ins><span class="cx">   background: none;
</span><span class="cx"> }
</span><del>-.theme.add-new:hover span:after {
</del><ins>+.theme-browser .add-new-theme:hover span:after {
</ins><span class="cx">   background: #fff;
</span><span class="cx">  color: rgb(16, 116, 162);
</span><span class="cx">  box-shadow: 0 2px 1px rgba(0,0,0,0.3);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.theme.add-new:hover:after {
</del><ins>+.theme-browser .add-new-theme:hover:after {
</ins><span class="cx">   border-color: transparent;
</span><span class="cx">  color: #fff;
</span><span class="cx">  background: rgb(16, 116, 162);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.add-new .theme-name {
</del><ins>+.theme-browser .add-new-theme .theme-name {
</ins><span class="cx">   background: none;
</span><span class="cx">  text-align: center;
</span><span class="cx">  box-shadow: none;
</span><span class="lines">@@ -420,35 +355,29 @@
</span><span class="cx">  position: relative;
</span><span class="cx">  top: -70px;
</span><span class="cx"> }
</span><del>-.add-new:hover .theme-name {
</del><ins>+.theme-browser .add-new-theme:hover .theme-name {
</ins><span class="cx">   color: #fff;
</span><span class="cx">  z-index: 2;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> /*
</span><span class="cx">  * The search form
</span><span class="cx">  */
</span><del>-.search-form {
</del><ins>+.theme-browser .theme-search {
</ins><span class="cx">   float: left;
</span><span class="cx">  position: relative;
</span><span class="cx">          top: 7px;
</span><span class="cx">          left: 10px;
</span><del>-}
-#theme-search {
</del><span class="cx">   font-size: 16px;
</span><span class="cx">  font-weight: 300;
</span><span class="cx">  line-height: 1.5;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> /*
</span><span class="cx">  * Theme Overlay
</span><span class="cx">  * Shown when clicking a theme
</span><span class="cx">  */
</span><del>-#theme-overlay {
-}
-#theme-overlay .theme-backdrop {
</del><ins>+.theme-overlay .theme-backdrop {
</ins><span class="cx">   position: absolute;
</span><span class="cx">          left: -20px;
</span><span class="cx">          right: 0;
</span><span class="lines">@@ -458,18 +387,18 @@
</span><span class="cx">  /* background: rgba(0,0,0,0.7); */
</span><span class="cx">  z-index: 10;
</span><span class="cx"> }
</span><del>-body.theme-overlay {
</del><ins>+body.theme-overlay-open {
</ins><span class="cx">   overflow: hidden;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#theme-overlay .theme-utility {
</del><ins>+.theme-overlay .theme-utility {
</ins><span class="cx">   position: absolute;
</span><span class="cx">          top: 0;
</span><span class="cx">          left: 0;
</span><span class="cx">          right: 0;
</span><span class="cx">  border-bottom: 1px solid #eee;
</span><span class="cx"> }
</span><del>-#theme-overlay .back {
</del><ins>+.theme-overlay .back {
</ins><span class="cx">   cursor: pointer;
</span><span class="cx">  height: 48px;
</span><span class="cx">  width: 50px;
</span><span class="lines">@@ -477,13 +406,13 @@
</span><span class="cx">  float: right;
</span><span class="cx">  border-left: 1px solid #eee;
</span><span class="cx"> }
</span><del>-#theme-overlay .back:hover {
</del><ins>+.theme-overlay .back:hover {
</ins><span class="cx">   background: #333;
</span><span class="cx"> }
</span><del>-#theme-overlay .back:hover:before {
</del><ins>+.theme-overlay .back:hover:before {
</ins><span class="cx">   color: #fff;
</span><span class="cx"> }
</span><del>-#theme-overlay .back:before {
</del><ins>+.theme-overlay .back:before {
</ins><span class="cx">   font: normal 30px/48px 'dashicons' !important;
</span><span class="cx">  color: #bbb;
</span><span class="cx">  display: inline-block;
</span><span class="lines">@@ -491,8 +420,8 @@
</span><span class="cx">  font-weight: 300;
</span><span class="cx"> }
</span><span class="cx"> /* Left and right navigation */
</span><del>-#theme-overlay .right,
-#theme-overlay .left {
</del><ins>+.theme-overlay .right,
+.theme-overlay .left {
</ins><span class="cx">   cursor: pointer;
</span><span class="cx">  -webkit-user-select: none;
</span><span class="cx">  -moz-user-select: none;
</span><span class="lines">@@ -504,29 +433,29 @@
</span><span class="cx">  text-align: center;
</span><span class="cx">  border-right: 1px solid #eee;
</span><span class="cx"> }
</span><del>-#theme-overlay .right:hover,
-#theme-overlay .left:hover {
</del><ins>+.theme-overlay .right:hover,
+.theme-overlay .left:hover {
</ins><span class="cx">   background: #333;
</span><span class="cx"> }
</span><del>-       #theme-overlay .right:hover:before,
-       #theme-overlay .left:hover:before {
</del><ins>+        .theme-overlay .right:hover:before,
+       .theme-overlay .left:hover:before {
</ins><span class="cx">           color: #fff;
</span><span class="cx">  }
</span><del>-#theme-overlay .left:before {
</del><ins>+.theme-overlay .left:before {
</ins><span class="cx">   content: '\f341';
</span><span class="cx"> }
</span><del>-#theme-overlay .right:before {
</del><ins>+.theme-overlay .right:before {
</ins><span class="cx">   content: '\f345';
</span><span class="cx"> }
</span><del>-#theme-overlay .right:before,
-#theme-overlay .left:before {
</del><ins>+.theme-overlay .right:before,
+.theme-overlay .left:before {
</ins><span class="cx">   font: normal 16px/54px 'dashicons' !important;
</span><span class="cx">  display: inline;
</span><span class="cx">  font-weight: 300;
</span><span class="cx"> }
</span><del>-#theme-overlay .left:before {}
</del><ins>+.theme-overlay .left:before {}
</ins><span class="cx"> 
</span><del>-#theme-overlay .theme-wrap {
</del><ins>+.theme-overlay .theme-wrap {
</ins><span class="cx">   clear: both;
</span><span class="cx">  position: fixed;
</span><span class="cx">          top: 120px;
</span><span class="lines">@@ -539,7 +468,7 @@
</span><span class="cx">  box-shadow: 0 1px 20px 5px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0,0,0,0.1);
</span><span class="cx">  z-index: 20;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-wrap:after {
</del><ins>+.theme-overlay .theme-wrap:after {
</ins><span class="cx">   content: ".";
</span><span class="cx">  display: block;
</span><span class="cx">  height: 0;
</span><span class="lines">@@ -547,7 +476,7 @@
</span><span class="cx">  visibility: hidden;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#theme-overlay .theme-actions {
</del><ins>+.theme-overlay .theme-actions {
</ins><span class="cx">   position: fixed;
</span><span class="cx">  text-align: center;
</span><span class="cx">  bottom: 80px;
</span><span class="lines">@@ -558,10 +487,10 @@
</span><span class="cx">  border-top: 1px solid rgba(0,0,0,0.1);
</span><span class="cx">  z-index: 30;
</span><span class="cx"> }
</span><del>-#theme-overlay.active .theme-actions {
</del><ins>+.theme-overlay.active .theme-actions {
</ins><span class="cx"> 
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-actions a {
</del><ins>+.theme-overlay .theme-actions a {
</ins><span class="cx">   margin-right: 5px;
</span><span class="cx">  margin-bottom: 0;
</span><span class="cx">  font-size: 16px;
</span><span class="lines">@@ -569,7 +498,7 @@
</span><span class="cx">  height: 37px;
</span><span class="cx">  padding: 0 20px 1px 20px;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-actions .delete-theme {
</del><ins>+.theme-overlay .theme-actions .delete-theme {
</ins><span class="cx">   border-radius: 2px;
</span><span class="cx">  color: #a00;
</span><span class="cx">  font-size: 14px;
</span><span class="lines">@@ -579,30 +508,30 @@
</span><span class="cx">          bottom: 20px;
</span><span class="cx">  text-decoration: none;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-actions .delete-theme:hover {
</del><ins>+.theme-overlay .theme-actions .delete-theme:hover {
</ins><span class="cx">   background: #d54e21;
</span><span class="cx">  color: #fff;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#theme-overlay .theme-actions .active-theme,
-#theme-overlay.active .theme-actions .inactive-theme {
</del><ins>+.theme-overlay .theme-actions .active-theme,
+.theme-overlay.active .theme-actions .inactive-theme {
</ins><span class="cx">   display: none;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-actions .inactive-theme,
-#theme-overlay.active .theme-actions .active-theme {
</del><ins>+.theme-overlay .theme-actions .inactive-theme,
+.theme-overlay.active .theme-actions .active-theme {
</ins><span class="cx">   display: block;
</span><span class="cx"> }
</span><span class="cx"> /*
</span><span class="cx">  * Theme Screenshots gallery
</span><span class="cx">  */
</span><del>-#theme-overlay .theme-screenshots {
</del><ins>+.theme-overlay .theme-screenshots {
</ins><span class="cx">   float: left;
</span><span class="cx">  margin: 0 30px 0 0;
</span><span class="cx">  width: 55%;
</span><span class="cx">  text-align: center;
</span><span class="cx"> }
</span><span class="cx"> /* First screenshot, shown big */
</span><del>-#theme-overlay .screenshot {
</del><ins>+.theme-overlay .screenshot {
</ins><span class="cx">   background: #000;
</span><span class="cx">  border: 1px solid #fff;
</span><span class="cx">  -moz-box-sizing: border-box;
</span><span class="lines">@@ -612,12 +541,12 @@
</span><span class="cx">  position: relative;
</span><span class="cx">  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
</span><span class="cx"> }
</span><del>-#theme-overlay .screenshot:after {
</del><ins>+.theme-overlay .screenshot:after {
</ins><span class="cx">   content: '';
</span><span class="cx">  display: block;
</span><span class="cx">  padding-top: 66.66666%; /* using a 3/2 aspect ratio */
</span><span class="cx"> }
</span><del>-#theme-overlay .screenshot img {
</del><ins>+.theme-overlay .screenshot img {
</ins><span class="cx">   cursor: pointer;
</span><span class="cx">  height: auto;
</span><span class="cx">  position: absolute;
</span><span class="lines">@@ -626,7 +555,7 @@
</span><span class="cx">  width: 100%;
</span><span class="cx"> }
</span><span class="cx"> /* Other screenshots, shown small and square */
</span><del>-#theme-overlay .screenshot.thumb {
</del><ins>+.theme-overlay .screenshot.thumb {
</ins><span class="cx">   background: #ccc;
</span><span class="cx">  border: 1px solid #eee;
</span><span class="cx">  float: none;
</span><span class="lines">@@ -635,12 +564,12 @@
</span><span class="cx">  width: 140px;
</span><span class="cx">  height: 80px;
</span><span class="cx"> }
</span><del>-#theme-overlay .screenshot.thumb:after {
</del><ins>+.theme-overlay .screenshot.thumb:after {
</ins><span class="cx">   content: '';
</span><span class="cx">  display: block;
</span><span class="cx">  padding-top: 100%; /* using a 1/1 aspect ratio */
</span><span class="cx"> }
</span><del>-#theme-overlay .screenshot.thumb img {
</del><ins>+.theme-overlay .screenshot.thumb img {
</ins><span class="cx">   cursor: pointer;
</span><span class="cx">  height: auto;
</span><span class="cx">  position: absolute;
</span><span class="lines">@@ -649,21 +578,21 @@
</span><span class="cx">  width: 100%;
</span><span class="cx">  height: auto;
</span><span class="cx"> }
</span><del>-#theme-overlay .screenshot.selected {
</del><ins>+.theme-overlay .screenshot.selected {
</ins><span class="cx">   background: transparent;
</span><span class="cx">  border: 2px solid #2ea2cc;
</span><span class="cx"> }
</span><del>-#theme-overlay .screenshot.selected img {
</del><ins>+.theme-overlay .screenshot.selected img {
</ins><span class="cx">   opacity: 0.8;
</span><span class="cx"> }
</span><span class="cx"> /*
</span><span class="cx">  * Theme heading information
</span><span class="cx">  */
</span><del>-#theme-overlay .theme-info {
</del><ins>+.theme-overlay .theme-info {
</ins><span class="cx">   width: 40%;
</span><span class="cx">  float: left;
</span><span class="cx"> }
</span><del>-#theme-overlay .current-label {
</del><ins>+.theme-overlay .current-label {
</ins><span class="cx">   background: #333;
</span><span class="cx">  color: #fff;
</span><span class="cx">  font-size: 11px;
</span><span class="lines">@@ -674,14 +603,14 @@
</span><span class="cx">  -webkit-user-select: none;
</span><span class="cx">  user-select: none;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-name {
</del><ins>+.theme-overlay .theme-name {
</ins><span class="cx">   color: #222;
</span><span class="cx">  font-size: 32px;
</span><span class="cx">  font-weight: 100;
</span><span class="cx">  margin: 10px 0 0;
</span><span class="cx">  line-height: 1.3;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-version {
</del><ins>+.theme-overlay .theme-version {
</ins><span class="cx">   color: #999;
</span><span class="cx">  font-size: 13px;
</span><span class="cx">  font-weight: 400;
</span><span class="lines">@@ -691,23 +620,23 @@
</span><span class="cx">  -webkit-user-select: none;
</span><span class="cx">  user-select: none;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-author {
</del><ins>+.theme-overlay .theme-author {
</ins><span class="cx">   color: #686868;
</span><span class="cx">  font-size: 16px;
</span><span class="cx">  font-weight: 400;
</span><span class="cx">  margin: 15px 0 25px;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-author a {
</del><ins>+.theme-overlay .theme-author a {
</ins><span class="cx">   text-decoration: none;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-description {
</del><ins>+.theme-overlay .theme-description {
</ins><span class="cx">   color: #555;
</span><span class="cx">  font-size: 15px;
</span><span class="cx">  font-weight: 400;
</span><span class="cx">  line-height: 1.5;
</span><span class="cx">  margin: 30px 0 0 0;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-tags {
</del><ins>+.theme-overlay .theme-tags {
</ins><span class="cx">   border-top: 3px solid #eee;
</span><span class="cx">  color: #888;
</span><span class="cx">  font-size: 13px;
</span><span class="lines">@@ -716,29 +645,29 @@
</span><span class="cx">  padding-top: 20px;
</span><span class="cx">  text-transform: capitalize;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-tags span {
</del><ins>+.theme-overlay .theme-tags span {
</ins><span class="cx">   color: #444;
</span><span class="cx">  font-weight: bold;
</span><span class="cx">  margin-right: 5px;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-actions {
</del><ins>+.theme-overlay .theme-actions {
</ins><span class="cx"> }
</span><span class="cx"> /* Theme Updates info */
</span><del>-#theme-overlay .theme-update-message {
</del><ins>+.theme-overlay .theme-update-message {
</ins><span class="cx">   background: #fefaf7;
</span><span class="cx">  border: 1px solid #eee;
</span><span class="cx">  border-left: 4px solid #d54e21;
</span><span class="cx">  border-radius: 3px;
</span><span class="cx">  padding: 5px 20px 10px;
</span><span class="cx"> }
</span><del>-#theme-overlay .theme-update {
</del><ins>+.theme-overlay .theme-update {
</ins><span class="cx">   color: #222;
</span><span class="cx">  font-size: 18px;
</span><span class="cx">  display: inline-block;
</span><span class="cx">  line-height: 40px;
</span><span class="cx">  margin: 0;
</span><span class="cx"> }
</span><del>-#theme-overlay .parent-theme {
</del><ins>+.theme-overlay .parent-theme {
</ins><span class="cx">   background: #f7fcfe;
</span><span class="cx">  border: 1px solid #eee;
</span><span class="cx">  border-left: 4px solid #2ea2cc;
</span><span class="lines">@@ -747,7 +676,7 @@
</span><span class="cx">  margin-top: 30px;
</span><span class="cx">  padding: 10px 10px 10px 20px;
</span><span class="cx"> }
</span><del>-#theme-overlay .parent-theme strong {
</del><ins>+.theme-overlay .parent-theme strong {
</ins><span class="cx">   font-weight: 700;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -828,8 +757,8 @@
</span><span class="cx">  .theme.add-new:after {
</span><span class="cx">          font-size: 23vw;
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-wrap,
-       #theme-overlay .theme-actions {
</del><ins>+        .theme-overlay .theme-wrap,
+       .theme-overlay .theme-actions {
</ins><span class="cx">           right: 15%;
</span><span class="cx">          left: 22%;
</span><span class="cx">  }
</span><span class="lines">@@ -851,8 +780,8 @@
</span><span class="cx"> }
</span><span class="cx"> /* Mini-sidebar in MP6 */
</span><span class="cx"> @media ( max-width: 900px ) {
</span><del>-       #theme-overlay .theme-wrap,
-       #theme-overlay .theme-actions {
</del><ins>+        .theme-overlay .theme-wrap,
+       .theme-overlay .theme-actions {
</ins><span class="cx">           left: 76px;
</span><span class="cx">  }
</span><span class="cx"> }
</span><span class="lines">@@ -861,30 +790,30 @@
</span><span class="cx">          margin-top: 6px;
</span><span class="cx">          margin-right: -3px
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-wrap {
</del><ins>+        .theme-overlay .theme-wrap {
</ins><span class="cx">           top: 45px;
</span><span class="cx">          right: 0px;
</span><span class="cx">          bottom: 0px;
</span><span class="cx">          left: 0px;
</span><span class="cx">          padding: 70px 20px 100px;
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-actions {
</del><ins>+        .theme-overlay .theme-actions {
</ins><span class="cx">           right: 0px;
</span><span class="cx">          bottom: 0px;
</span><span class="cx">          left: 0px;
</span><span class="cx">          text-align: left;
</span><span class="cx">          padding: 10px;
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-screenshots {
</del><ins>+        .theme-overlay .theme-screenshots {
</ins><span class="cx">           width: 40%;
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-info {
</del><ins>+        .theme-overlay .theme-info {
</ins><span class="cx">           width: 50%;
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-actions .delete-theme {
</del><ins>+        .theme-overlay .theme-actions .delete-theme {
</ins><span class="cx">           bottom: 10px;
</span><span class="cx">  }
</span><del>-       .search-form {
</del><ins>+        .theme-browser .theme-search {
</ins><span class="cx">           top: 3px;
</span><span class="cx">  }
</span><span class="cx"> }
</span><span class="lines">@@ -903,46 +832,44 @@
</span><span class="cx">  .theme.add-new:after {
</span><span class="cx">          font-size: 53vw;
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-update,
-       #theme-overlay .theme-description {
</del><ins>+        .theme-overlay .theme-update,
+       .theme-overlay .theme-description {
</ins><span class="cx">           margin-left: 0;
</span><span class="cx">  }
</span><del>-       #theme-overlay.active .theme-actions .active-theme .button:nth-child(3n) {
</del><ins>+        .theme-overlay.active .theme-actions .active-theme .button:nth-child(3n) {
</ins><span class="cx">           display: none;
</span><span class="cx">  }
</span><span class="cx">  .theme.active .theme-actions .button {
</span><span class="cx">          margin-top: 6px;
</span><span class="cx">          margin-right: 0;
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-screenshots {
</del><ins>+        .theme-overlay .theme-screenshots {
</ins><span class="cx">           width: 100%;
</span><span class="cx">          float: none;
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-info {
</del><ins>+        .theme-overlay .theme-info {
</ins><span class="cx">           width: 100%;
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-author {
</del><ins>+        .theme-overlay .theme-author {
</ins><span class="cx">           margin: 5px 0 15px 0;
</span><span class="cx">  }
</span><del>-       #theme-overlay .theme-version {
</del><ins>+        .theme-overlay .theme-version {
</ins><span class="cx">           margin-left: 0;
</span><span class="cx">          position: absolute;
</span><span class="cx">                  top: 18px;
</span><span class="cx">                  left: 130px;
</span><span class="cx">  }
</span><del>-       #theme-overlay .current-label {
</del><ins>+        .theme-overlay .current-label {
</ins><span class="cx">           margin-top: 10px;
</span><span class="cx">          font-size: 13px;
</span><span class="cx">  }
</span><span class="cx">  /*
</span><span class="cx">   * Search form
</span><span class="cx">   */
</span><del>-       .search-form {
</del><ins>+        .theme-browser .theme-search {
</ins><span class="cx">           float: none;
</span><span class="cx">          clear: both;
</span><span class="cx">          left: 0;
</span><del>-       }
-       #theme-search {
</del><span class="cx">           margin: 10px 0;
</span><span class="cx">          width: 100%;
</span><span class="cx">  }
</span></span></pre></div>
<a id="trunksrcwpadmincsswpadmincss"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/css/wp-admin.css (26290 => 26291)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/css/wp-admin.css      2013-11-20 19:23:32 UTC (rev 26290)
+++ trunk/src/wp-admin/css/wp-admin.css 2013-11-20 19:43:36 UTC (rev 26291)
</span><span class="lines">@@ -6540,7 +6540,11 @@
</span><span class="cx">  color: #cfcfcf;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#broken-themes {
</del><ins>+.broken-themes {
+       clear: both;
+}
+
+.broken-themes table {
</ins><span class="cx">   text-align: left;
</span><span class="cx">  width: 50%;
</span><span class="cx">  border-spacing: 3px;
</span></span></pre></div>
<a id="trunksrcwpadminjsthemejs"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/js/theme.js (26290 => 26291)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/js/theme.js   2013-11-20 19:23:32 UTC (rev 26290)
+++ trunk/src/wp-admin/js/theme.js      2013-11-20 19:43:36 UTC (rev 26291)
</span><span class="lines">@@ -4,11 +4,13 @@
</span><span class="cx"> ( function($) {
</span><span class="cx"> 
</span><span class="cx"> // Set up our namespace...
</span><del>-var themes = wp.themes = wp.themes || {};
</del><ins>+var themes, l10n;
+themes = wp.themes = wp.themes || {};
</ins><span class="cx"> 
</span><span class="cx"> // Store the theme data and settings for organized and quick access
</span><del>-// themes.data.settings, themes.data.themes, themes.data.i18n
</del><ins>+// themes.data.settings, themes.data.themes, themes.data.l10n
</ins><span class="cx"> themes.data = _wpThemeSettings;
</span><ins>+l10n = themes.data.l10n;
</ins><span class="cx"> 
</span><span class="cx"> // Setup app structure
</span><span class="cx"> _.extend( themes, { model: {}, view: {}, routes: {}, router: {}, template: wp.template });
</span><span class="lines">@@ -17,23 +19,14 @@
</span><span class="cx"> 
</span><span class="cx"> // Main view controller for themes.php
</span><span class="cx"> // Unifies and renders all available views
</span><del>-//
-// Hooks to #appearance and organizes the views to be rendered
</del><span class="cx"> themes.view.Appearance = wp.Backbone.View.extend({
</span><span class="cx"> 
</span><del>-       // Set DOM container
-       // {#appearance} by default
-       el: themes.data.settings.container,
</del><ins>+        el: '#wpbody-content .wrap .theme-browser',
</ins><span class="cx"> 
</span><span class="cx">  window: $( window ),
</span><span class="cx">  // Pagination instance
</span><span class="cx">  page: 0,
</span><span class="cx"> 
</span><del>-       events: {
-               'click .themes-bulk-edit': 'editMode',
-               'click .theme .delete-theme': 'deleteTheme'
-       },
-
</del><span class="cx">   // Sets up a throttler for binding to 'scroll'
</span><span class="cx">  initialize: function() {
</span><span class="cx">          var self = this;
</span><span class="lines">@@ -61,12 +54,13 @@
</span><span class="cx">                  collection: this.collection,
</span><span class="cx">                  parent: this
</span><span class="cx">          });
</span><ins>+
+               // Render search form.
+               this.search();
+
</ins><span class="cx">           // Render and append
</span><span class="cx">          this.view.render();
</span><span class="cx">          this.$el.append( this.view.el );
</span><del>-
-               // Search form
-               this.search();
</del><span class="cx">   },
</span><span class="cx"> 
</span><span class="cx">  // Search input and view
</span><span class="lines">@@ -79,7 +73,7 @@
</span><span class="cx"> 
</span><span class="cx">          // Render and append after screen title
</span><span class="cx">          view.render();
</span><del>-               self.$el.find( '> h2' ).after( view.el );
</del><ins>+                self.$el.append( view.el );
</ins><span class="cx">   },
</span><span class="cx"> 
</span><span class="cx">  // Checks when the user gets close to the bottom
</span><span class="lines">@@ -95,16 +89,6 @@
</span><span class="cx">          if ( bottom > threshold ) {
</span><span class="cx">                  this.trigger( 'theme:scroll' );
</span><span class="cx">          }
</span><del>-       },
-
-       // Enters edit mode that allows easy access to deleting themes
-       editMode: function() {
-               $( 'body' ).toggleClass( 'edit-mode' );
-               this.$el.find( '.themes-bulk-edit' ).toggleClass( 'mp6-text-highlight' );
-       },
-
-       deleteTheme: function() {
-               return confirm( themes.data.settings.confirmDelete );
</del><span class="cx">   }
</span><span class="cx"> });
</span><span class="cx"> 
</span><span class="lines">@@ -219,7 +203,7 @@
</span><span class="cx">          if ( this.model.get( 'active' ) ) {
</span><span class="cx">                  this.$el.addClass( 'active' );
</span><span class="cx">                  this.$el.find( '.theme-name' ).addClass( 'mp6-primary' );
</span><del>-                       $( '#theme-overlay' ).addClass( 'active' );
</del><ins>+                        $( '.theme-overlay' ).addClass( 'active' );
</ins><span class="cx">           }
</span><span class="cx">  },
</span><span class="cx"> 
</span><span class="lines">@@ -245,7 +229,7 @@
</span><span class="cx"> themes.view.Details = wp.Backbone.View.extend({
</span><span class="cx"> 
</span><span class="cx">  // Wrap theme data on a div.theme element
</span><del>-       id: 'theme-overlay',
</del><ins>+        className: 'theme-overlay',
</ins><span class="cx"> 
</span><span class="cx">  events: {
</span><span class="cx">          'click': 'collapse',
</span><span class="lines">@@ -259,7 +243,6 @@
</span><span class="cx"> 
</span><span class="cx">  render: function() {
</span><span class="cx">          var data = this.model.toJSON();
</span><del>-
</del><span class="cx">           this.$el.html( this.html( data ) );
</span><span class="cx">          // Renders active theme styles
</span><span class="cx">          this.activeTheme();
</span><span class="lines">@@ -271,11 +254,7 @@
</span><span class="cx">  // and to the overlay in detailed view mode
</span><span class="cx">  activeTheme: function() {
</span><span class="cx">          // Check the model has the active property
</span><del>-               if ( this.model.get( 'active' ) ) {
-                       this.$el.addClass( 'active' );
-               } else {
-                       $( '#theme-overlay' ).removeClass( 'active' );
-               }
</del><ins>+                this.$el.toggleClass( 'active', this.model.get( 'active' ) );
</ins><span class="cx">   },
</span><span class="cx"> 
</span><span class="cx">  // Single theme overlay screen
</span><span class="lines">@@ -297,7 +276,7 @@
</span><span class="cx">                  // With a quick fade out animation
</span><span class="cx">                  this.$el.fadeOut( 130, function() {
</span><span class="cx">                          // Clicking outside the modal box closes the overlay
</span><del>-                               $( 'body' ).removeClass( 'theme-overlay closing-overlay' );
</del><ins>+                                $( 'body' ).removeClass( 'theme-overlay-open closing-overlay' );
</ins><span class="cx">                           // Handle event cleanup
</span><span class="cx">                          self.closeOverlay();
</span><span class="cx"> 
</span><span class="lines">@@ -380,18 +359,18 @@
</span><span class="cx">  }
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-// Controls the rendering of div#themes,
</del><ins>+// Controls the rendering of div.themes,
</ins><span class="cx"> // a wrapper that will hold all the theme elements
</span><span class="cx"> themes.view.Themes = wp.Backbone.View.extend({
</span><span class="cx"> 
</span><del>-       id: 'themes',
</del><ins>+        className: 'themes',
</ins><span class="cx"> 
</span><span class="cx">  // Number to keep track of scroll position
</span><span class="cx">  // while in theme-overlay mode
</span><span class="cx">  index: 0,
</span><span class="cx"> 
</span><span class="cx">  // The theme count element
</span><del>-       count: $( '#theme-count' ),
</del><ins>+        count: $( '.theme-count' ),
</ins><span class="cx"> 
</span><span class="cx">  initialize: function( options ) {
</span><span class="cx">          var self = this;
</span><span class="lines">@@ -445,7 +424,7 @@
</span><span class="cx"> 
</span><span class="cx">          // Make sure the add-new stays at the end
</span><span class="cx">          if ( page >= 1 ) {
</span><del>-                       $( '#add-new' ).remove();
</del><ins>+                        $( '.add-new-theme' ).remove();
</ins><span class="cx">           }
</span><span class="cx"> 
</span><span class="cx">          // Loop through the themes and setup each theme view
</span><span class="lines">@@ -456,7 +435,7 @@
</span><span class="cx"> 
</span><span class="cx">                  // Render the views...
</span><span class="cx">                  self.theme.render();
</span><del>-                       // and append them to div#themes
</del><ins>+                        // and append them to div.themes
</ins><span class="cx">                   self.$el.append( self.theme.el );
</span><span class="cx"> 
</span><span class="cx">                  // Binds to theme:expand to show the modal box
</span><span class="lines">@@ -466,7 +445,7 @@
</span><span class="cx"> 
</span><span class="cx">          // 'Add new theme' element shown at the end of the grid
</span><span class="cx">          if ( themes.data.settings.canInstall ) {
</span><del>-                       this.$el.append( '<div id="add-new" class="theme add-new"><a href="' + themes.data.settings.installURI + '"><div class="theme-screenshot"><span></span></div><h3 class="theme-name">' + themes.data.i18n.addNew + '</h3></a></div>' );
</del><ins>+                        this.$el.append( '<div class="theme add-new-theme"><a href="' + themes.data.settings.install_uri + '"><div class="theme-screenshot"><span></span></div><h3 class="theme-name">' + l10n.addNew + '</h3></a></div>' );
</ins><span class="cx">           }
</span><span class="cx"> 
</span><span class="cx">          this.parent.page++;
</span><span class="lines">@@ -504,12 +483,11 @@
</span><span class="cx"> 
</span><span class="cx">          // Sets this.view to 'detail'
</span><span class="cx">          this.setView( 'detail' );
</span><del>-               $( 'body' ).addClass( 'theme-overlay' );
</del><ins>+                $( 'body' ).addClass( 'theme-overlay-open' );
</ins><span class="cx"> 
</span><span class="cx">          // Set up the theme details view
</span><span class="cx">          this.overlay = new themes.view.Details({
</span><del>-                       model: self.model,
-                       className: 'theme-' + self.model.id
</del><ins>+                        model: self.model
</ins><span class="cx">           });
</span><span class="cx"> 
</span><span class="cx">          this.overlay.render();
</span><span class="lines">@@ -517,133 +495,98 @@
</span><span class="cx"> 
</span><span class="cx">          this.overlay.screenshotGallery();
</span><span class="cx"> 
</span><del>-               // Resets counter whenever the overlay is opened
-               this.index = 0;
-
</del><span class="cx">           // Bind to theme:next and theme:previous
</span><span class="cx">          // triggered by the arrow keys
</span><span class="cx">          //
</span><del>-               // The index keep track of where we are at
-               // any given time
</del><ins>+                // Keep track of the current model so we
+               // can infer an index position
</ins><span class="cx">           this.listenTo( this.overlay, 'theme:next', function() {
</span><del>-                       // Bump the index number to keep track of how far
-                       // we should go for the next theme
-                       self.index++;
</del><span class="cx">                   // Renders the next theme on the overlay
</span><del>-                       self.next( [ self.model.cid, self.index ] );
</del><ins>+                        self.next( [ self.model.cid ] );
</ins><span class="cx">                   self.overlay.screenshotGallery();
</span><span class="cx"> 
</span><span class="cx">          })
</span><span class="cx">          .listenTo( this.overlay, 'theme:previous', function() {
</span><del>-                       // Decrease the index number to keep track of how far
-                       // we should go for the previous theme
-                       self.index--;
</del><span class="cx">                   // Renders the previous theme on the overlay
</span><del>-                       self.previous( [ self.model.cid, self.index ] );
</del><ins>+                        self.previous( [ self.model.cid ] );
</ins><span class="cx">                   self.overlay.screenshotGallery();
</span><span class="cx">          });
</span><del>-
</del><span class="cx">   },
</span><span class="cx"> 
</span><span class="cx">  // This method renders the next theme on the overlay modal
</span><span class="cx">  // based on the current position in the collection
</span><del>-       // @params [model cid] and [index]
</del><ins>+        // @params [model cid]
</ins><span class="cx">   next: function( args ) {
</span><span class="cx">          var self = this,
</span><span class="cx">                  model, nextModel;
</span><span class="cx"> 
</span><span class="cx">          // Get the current theme
</span><span class="cx">          model = self.collection.get( args[0] );
</span><del>-               // Get the next one
-               nextModel = self.collection.at( self.collection.indexOf( model ) + args[1] );
</del><ins>+                // Find the next model within the collection
+               nextModel = self.collection.at( self.collection.indexOf( model ) + 1 );
</ins><span class="cx"> 
</span><span class="cx">          // Sanity check which also serves as a boundary test
</span><span class="cx">          if ( nextModel !== undefined ) {
</span><span class="cx"> 
</span><span class="cx">                  // We have a new theme...
</span><del>-                       // Clean the overlay
-                       this.overlay.$el.html('');
</del><ins>+                        // Close the overlay
+                       this.overlay.closeOverlay();
</ins><span class="cx"> 
</span><del>-                       // Create the view
-                       this.nextTheme = new themes.view.Details({
-                               model: nextModel,
-                               className: 'theme-' + nextModel.id
-                       });
-
</del><span class="cx">                   // Trigger a route update for the current model
</span><del>-                       themes.router.navigate( 'theme/' + nextModel.id );
-
-                       // Render and fill this.overlay with the new html
-                       this.nextTheme.render();
-                       return this.overlay.$el.html( this.nextTheme.el );
</del><ins>+                        // that renders the new theme's overlay
+                       themes.router.navigate( 'theme/' + nextModel.id, { trigger: true } );
</ins><span class="cx">           }
</span><del>-
-               // If we got this far it means we have no other themes
-               // so move back the counter to keep it sane
-               self.index--;
</del><span class="cx">   },
</span><span class="cx"> 
</span><span class="cx">  // This method renders the previous theme on the overlay modal
</span><span class="cx">  // based on the current position in the collection
</span><del>-       // @params [model cid] and [index]
</del><ins>+        // @params [model cid]
</ins><span class="cx">   previous: function( args ) {
</span><span class="cx">          var self = this,
</span><span class="cx">                  model, previousModel;
</span><span class="cx"> 
</span><span class="cx">          // Get the current theme
</span><span class="cx">          model = self.collection.get( args[0] );
</span><del>-               previousModel = self.collection.at( self.collection.indexOf( model ) + args[1] );
</del><ins>+                // Find the previous model within the collection
+               previousModel = self.collection.at( self.collection.indexOf( model ) - 1 );
</ins><span class="cx"> 
</span><span class="cx">          if ( previousModel !== undefined ) {
</span><span class="cx"> 
</span><span class="cx">                  // We have a new theme...
</span><del>-                       // Clean the overlay
-                       this.overlay.$el.html( '' );
</del><ins>+                        // Close the overlay
+                       this.overlay.closeOverlay();
</ins><span class="cx"> 
</span><del>-                       // Create the view
-                       this.previousTheme = new themes.view.Details({
-                               model: previousModel,
-                               className: 'theme-' + previousModel.id
-                       });
-
</del><span class="cx">                   // Trigger a route update for the current model
</span><del>-                       themes.router.navigate( 'theme/' + previousModel.id );
-
-                       // Render and fill this.overlay with the new html
-                       this.previousTheme.render();
-                       return this.overlay.$el.html( this.previousTheme.el );
</del><ins>+                        // that renders the new theme's overlay
+                       themes.router.navigate( 'theme/' + previousModel.id, { trigger: true } );
</ins><span class="cx">           }
</span><del>-
-               // If we got this far it means we have no other themes
-               // so move back the counter to keep it sane
-               self.index++;
</del><span class="cx">   }
</span><span class="cx"> });
</span><span class="cx"> 
</span><del>-// Search input view controller
-// renders #search-form
</del><ins>+// Search input view controller.
</ins><span class="cx"> themes.view.Search = wp.Backbone.View.extend({
</span><span class="cx"> 
</span><del>-       className: 'search-form',
</del><ins>+        tagName: 'input',
+       className: 'theme-search',
</ins><span class="cx"> 
</span><del>-       // 'keyup' triggers search
-       events: {
-               'keyup #theme-search': 'search'
</del><ins>+        attributes: {
+               placeholder: l10n.search
</ins><span class="cx">   },
</span><span class="cx"> 
</span><del>-       // Grabs template file
-       html: themes.template( 'theme-search' ),
-
-       // Render the search form
-       render: function() {
-               var self = this;
-               self.$el.html( self.html );
</del><ins>+        events: {
+               'input':  'search',
+               'keyup':  'search',
+               'change': 'search',
+               'search': 'search'
</ins><span class="cx">   },
</span><span class="cx"> 
</span><del>-       // Runs a search on the theme collection
-       // bind on 'keyup' event
-       search: function() {
-               this.collection.doSearch( $( '#theme-search' ).val() );
</del><ins>+        // Runs a search on the theme collection.
+       search: function( event ) {
+               // Clear on escape.
+               if ( event.type === 'keyup' && event.which === 27 ) {
+                       event.target.value = '';
+               }
+               this.collection.doSearch( event.target.value );
</ins><span class="cx">   }
</span><span class="cx"> });
</span><span class="cx"> 
</span><span class="lines">@@ -658,7 +601,7 @@
</span><span class="cx"> 
</span><span class="cx">  // Set the search input value based on url
</span><span class="cx">  search: function( query ) {
</span><del>-               $( '#theme-search' ).val( query );
</del><ins>+                $( '.theme-search' ).val( query );
</ins><span class="cx">   }
</span><span class="cx"> });
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunksrcwpadminthemesphp"></a>
<div class="modfile"><h4>Modified: trunk/src/wp-admin/themes.php (26290 => 26291)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/src/wp-admin/themes.php    2013-11-20 19:23:32 UTC (rev 26290)
+++ trunk/src/wp-admin/themes.php       2013-11-20 19:43:36 UTC (rev 26291)
</span><span class="lines">@@ -96,12 +96,12 @@
</span><span class="cx">          'customizeURI'  => ( current_user_can( 'edit_theme_options' ) ) ? wp_customize_url() : null,
</span><span class="cx">          'confirmDelete' => __( "Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete." ),
</span><span class="cx">          'root'          => '/wp-admin/themes.php',
</span><del>-               'container'     => '#appearance',
</del><span class="cx">           'extraRoutes'   => '',
</span><span class="cx">  ),
</span><del>-       'i18n' => array(
-               'addNew'        => __( 'Add New Theme' ),
-       ),
</del><ins>+        'l10n' => array(
+               'addNew' => __( 'Add New Theme' ),
+               'search'  => __( 'Search...' ),
+       ),
</ins><span class="cx"> ) );
</span><span class="cx"> 
</span><span class="cx"> add_thickbox();
</span><span class="lines">@@ -112,14 +112,16 @@
</span><span class="cx"> require_once( ABSPATH . 'wp-admin/admin-header.php' );
</span><span class="cx"> ?>
</span><span class="cx"> 
</span><del>-<div id="appearance" class="wrap">
</del><ins>+<div class="wrap">
</ins><span class="cx">   <h2><?php esc_html_e( 'Themes' ); ?>
</span><del>-               <span id="theme-count" class="theme-count"></span>
</del><ins>+                <span class="theme-count"></span>
</ins><span class="cx">   <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
</span><span class="cx">          <a href="<?php echo admin_url( 'theme-install.php' ); ?>" class="add-new-h2"><?php echo esc_html( _x( 'Add New', 'Add new theme' ) ); ?></a>
</span><span class="cx">  <?php endif; ?>
</span><span class="cx">  </h2>
</span><span class="cx"> 
</span><ins>+       <div class="theme-browser"></div>
+
</ins><span class="cx"> <?php
</span><span class="cx"> if ( ! validate_current_theme() || isset( $_GET['broken'] ) ) : ?>
</span><span class="cx"> <div id="message1" class="updated"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div>
</span><span class="lines">@@ -183,10 +185,11 @@
</span><span class="cx"> if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) {
</span><span class="cx"> ?>
</span><span class="cx"> 
</span><ins>+<div class="broken-themes">
</ins><span class="cx"> <h3><?php _e('Broken Themes'); ?></h3>
</span><span class="cx"> <p><?php _e('The following themes are installed but incomplete. Themes must have a stylesheet and a template.'); ?></p>
</span><span class="cx"> 
</span><del>-<table id="broken-themes">
</del><ins>+<table>
</ins><span class="cx">   <tr>
</span><span class="cx">          <th><?php _ex('Name', 'theme name'); ?></th>
</span><span class="cx">          <th><?php _e('Description'); ?></th>
</span><span class="lines">@@ -195,12 +198,14 @@
</span><span class="cx">  foreach ( $broken_themes as $broken_theme ) {
</span><span class="cx">          echo "
</span><span class="cx">          <tr>
</span><del>-                        <td>" . $broken_theme->get('Name') ."</td>
</del><ins>+                         <td>" . ( $broken_theme->get( 'Name' ) ? $broken_theme->get( 'Name' ) : $broken_theme->get_stylesheet() ) . "</td>
</ins><span class="cx">                    <td>" . $broken_theme->errors()->get_error_message() . "</td>
</span><span class="cx">          </tr>";
</span><span class="cx">  }
</span><span class="cx"> ?>
</span><span class="cx"> </table>
</span><ins>+</div>
+
</ins><span class="cx"> <?php
</span><span class="cx"> }
</span><span class="cx"> ?>
</span><span class="lines">@@ -235,10 +240,6 @@
</span><span class="cx">  <# } #>
</span><span class="cx"> </script>
</span><span class="cx"> 
</span><del>-<script id="tmpl-theme-search" type="text/template">
-       <input type="text" name="theme-search" id="theme-search" placeholder="<?php esc_attr_e( 'Search...' ); ?>" />
-</script>
-
</del><span class="cx"> <script id="tmpl-theme-single" type="text/template">
</span><span class="cx">  <div class="theme-backdrop"></div>
</span><span class="cx">  <div class="theme-wrap">
</span><span class="lines">@@ -248,7 +249,7 @@
</span><span class="cx">                  <div alt="<?php _e( 'Show next theme' ); ?>" class="right dashicons dashicons-no"></div>
</span><span class="cx">          </div>
</span><span class="cx"> 
</span><del>-               <div class="theme-screenshots" id="theme-screenshots">
</del><ins>+                <div class="theme-screenshots">
</ins><span class="cx">                   <div class="screenshot first"><img src="{{ data.screenshot[0] }}" alt="" /></div>
</span><span class="cx">          <#
</span><span class="cx">                  if ( _.size( data.screenshot ) > 1 ) {
</span></span></pre>
</div>
</div>

</body>
</html>