<!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>[23769] trunk: Revisions: UI Update.</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/23769">23769</a></dd>
<dt>Author</dt> <dd>westi</dd>
<dt>Date</dt> <dd>2013-03-21 15:54:11 +0000 (Thu, 21 Mar 2013)</dd>
</dl>
<h3>Log Message</h3>
<pre>Revisions: UI Update.
* Refines the UI to make it clearer and easier to use
* Introduces weighted tickmarks
* Fixes comparison bugs.
See <a href="http://core.trac.wordpress.org/ticket/23497">#23497</a> props adamsilverstein</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmincsscolorsfreshcss">trunk/wp-admin/css/colors-fresh.css</a></li>
<li><a href="#trunkwpadmincsswpadmincss">trunk/wp-admin/css/wp-admin.css</a></li>
<li><a href="#trunkwpadminincludesajaxactionsphp">trunk/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunkwpadminjsrevisionsjs">trunk/wp-admin/js/revisions.js</a></li>
<li><a href="#trunkwpadminrevisionphp">trunk/wp-admin/revision.php</a></li>
<li><a href="#trunkwpincludespluggablephp">trunk/wp-includes/pluggable.php</a></li>
<li><a href="#trunkwpincludesposttemplatephp">trunk/wp-includes/post-template.php</a></li>
<li><a href="#trunkwpincludesrevisionphp">trunk/wp-includes/revision.php</a></li>
<li><a href="#trunkwpincludesscriptloaderphp">trunk/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmincsscolorsfreshcss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/colors-fresh.css (23768 => 23769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/colors-fresh.css        2013-03-21 05:17:25 UTC (rev 23768)
+++ trunk/wp-admin/css/colors-fresh.css        2013-03-21 15:54:11 UTC (rev 23769)
</span><span class="lines">@@ -175,8 +175,7 @@
</span><span class="cx"> .sidebar-name,
</span><span class="cx"> #nav-menu-header,
</span><span class="cx"> #nav-menu-footer,
</span><del>-.menu-item-handle,
-.wp-slider .ui-slider-handle {
</del><ins>+.menu-item-handle {
</ins><span class="cx">         background: #f1f1f1;
</span><span class="cx">         background-image: -webkit-gradient(linear, left bottom, left top, from(#ececec), to(#f9f9f9));
</span><span class="cx">         background-image: -webkit-linear-gradient(bottom, #ececec, #f9f9f9);
</span><span class="lines">@@ -185,6 +184,8 @@
</span><span class="cx">         background-image: linear-gradient(to top, #ececec, #f9f9f9);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+
+
</ins><span class="cx"> .widget .widget-top,
</span><span class="cx"> .postbox h3,
</span><span class="cx"> .stuffbox h3 {
</span><span class="lines">@@ -1378,14 +1379,38 @@
</span><span class="cx">         background-color: #e9f6ea;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.diff-to-title {
+        color: #0080AA;
+}
+
</ins><span class="cx"> #diffsubheader{
</span><span class="cx">         background-color: #f7f7f7;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.comparetwo#diffsubheader.diff-left-hand-meta-row {
+        background-color: #fcfcfc;
+}
+
+.revision-tick.revision-toloadtrue {
+        background-color: #9999cc;
+        background: url(../images/wpspin_light.gif) no-repeat;
+        background-position: middle;
+        background-size: 1px 10px;
+}
+
+.revision-tick.revision-toloadfalse {
+        background-color: #aaa;
+}
+
</ins><span class="cx"> #att-info {
</span><span class="cx">         background-color: #e4f2Fd;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+body .ui-tooltip {
+        border-color: #d7d7d7;
+        background-color: #fff;
+}
+
</ins><span class="cx"> /* jQuery UI Slider */
</span><span class="cx"> .wp-slider.ui-slider {
</span><span class="cx">         border-color: #d7d7d7;
</span><span class="lines">@@ -1393,22 +1418,30 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .wp-slider .ui-slider-handle {
</span><del>-        border-color: #d7d7d7;
</del><ins>+        border-color: none;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+.wp-slider .ui-slider-handle.left-handle {
+background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAA3NCSVQICAjb4U/gAAABAlBMVEXR2uHM1dzCzNW4ydOzxtSxw9Gqwc+bs7+Ss8SVscaZrLqQq7yNrMCKqr+EqsGDqb6GpruCpbl8pL15o7t1n7hwnLVika1djq5giqJXiqlYiqNJgp9ieYlDfqA/epw3dpk7dpg2dpo3dZo6dZc4dJY4dJg3cZY2bpE1bosxaIYxZIMrYX0tXnwtXHYsWHEnVW0mTmglT2cjTGIhRVsfQlYaN0kYM0QULDgTKTYRJzQTJzINISoLHCYNGyYKGCEIFxwJEhcJEhsHEhQDDAkHCg8EBwwCBwoEBAQBAwIBAQEBAQMAAgEBAAAAAAQAAQMBAAIAAAICAAEBAQAAAQAAAAD///+62qV+AAAAVnRSTlP/////////////////////////////////////////////////////////////////////////////////////////////////////////////////AEpNbNkAAAAJcEhZcwAACusAAArrAYKLDVoAAAAUdEVYdENyZWF0aW9uIFRpbWUAMy85LzEzrdD8jAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAACbSURBVBiVVcvVDoNQEEXRqbu781B3d/dQQknh/P+vtBQKt/tpsnKGEOW4klkQFFvIsqwYzUJUvCts1wJl9gIruxT5hpLEyMBLKG+Z0ToJgrPLTDqOjyCxNN7mcahiaz50uDWsX0Fk+tKahKGJpX55qp1qpAsCY0lt5MdPUD2KoniowBRXn+f5Xp4RZDfCKg1W0D637P/iznn06w0M+083NZW9ZwAAAABJRU5ErkJggg==);
+}
+
+.wp-slider .ui-slider-handle.ui-state-active.left-handle {
+background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAA3NCSVQICAjb4U/gAAAAzFBMVEXZ5ejU4eXM3ODG2NzE1tvB1Nq90deux86sxs2qxcynwsqlwcmjwMihvseevMWdvMSbusOXuMGTtb6IrbiHrLeCqbSBqLN/p7J3oa11oKxzn6tvnKhrmaZqmKVpmKVol6RllaJhk6Bej51djptaiZZZiJVYhpNWg5BUf4xSfYlRfIhPeYRMdYBKcXxFaXNDZnA+X2g9XmY8XGU4VV43VFw2U1s0UFgyTVQxS1IwSVAuR00sREosQ0orQkgqQEYpPkQoPkMoPUMoPUL///8pY4MvAAAARHRSTlP/////////////////////////////////////////////////////////////////////////////////////////AHHSjxIAAAAJcEhZcwAACusAAArrAYKLDVoAAAAUdEVYdENyZWF0aW9uIFRpbWUAMy85LzEzrdD8jAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAACUSURBVBiVVctXEoJQEETRMaIo5qwF5hwxYOY9ev97EiQ43q+pUz2EYk9n5UElU0rpRO016toO79WhxlVysWqkroRgsswSjAsbnasgpGdsMk25gooZvR3K8CQxCuU9jH8FhZ3022rwJTZ4CK9nnwJBbiO8yVpFKDButm1bOn6iLFyZt5igeZLHOrhgfJ8k/yXTVoLrAxo1P5iCdUg7AAAAAElFTkSuQmCC);
+}
+
+.wp-slider .ui-slider-handle {
+        /* Slider drag Triangle CSS */
+background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAA3NCSVQICAjb4U/gAAAA8FBMVEU2dZipwNBJl8VGmcX///+EpLlBgqpymrNFjru3ydNWiKs6eZzY4uuRrL08faPL3OZBjLSBqsCTssRHlMJEf59cj657o7xKl8OEqsE9gag2dJtEkb+ct8iZs8BHmMePq8BejKZAiK5llK5FjrlJl8c6dZdGl8avxdBJlcZ4nbc6ep6XrbpKgZ+Lqr5KmcdIkbqsws1Gk8E+f6c4dptaiadFirRKl8V8pblImcNIl8eGpruVscZCh7BMlsdIlcFImchEkbs9eJpCjbdGjbk8fJ84dp02dpo8gatMlsM2dps8faVAg61Ej71Ek75IksFIlcOaLCw7AAAAUHRSTlP/////AP///////////////////////////////////////////////////////////////////////////////////////////////////xB6m5UAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAUdEVYdENyZWF0aW9uIFRpbWUAMy85LzEzrdD8jAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAACaSURBVBiVVcxZD8FAGIXhjxzUVktQgqKmo7ZYhkgsiS1tQuj//zeomo736uS5OFSo2W6UXc/R5hxXW5foxDlXqUKZx0GFZpXynuM4kXhjgjgyJkGzQIjpvi9Fx1uQ0iQUh4GkR/Ini0CQ2IfQ24YC4X8T+Mn0zj8lO1IgnqZpzlxE0m4YhrFsKYJVn126UGV+W1wHf4LdpByuF0goFKI7tv/dAAAAAElFTkSuQmCC);
+}
+
</ins><span class="cx"> .wp-slider .ui-slider-handle.ui-state-hover,
</span><span class="cx"> .wp-slider .ui-slider-handle.ui-state-focus {
</span><del>-        border-color: #aaa;
</del><ins>+        border-color: none;
+        outline: none;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .wp-slider .ui-slider-handle.ui-state-active {
</span><del>-        border-color: #aaa;
-        background: #eee;
-        background-image: -webkit-gradient(linear, left bottom, left top, from(#f9f9f9), to(#ececec));
-        background-image: -webkit-linear-gradient(bottom, #f9f9f9, #ececec);
-        background-image: -moz-linear-gradient(bottom, #f9f9f9, #ececec);
-        background-image: -o-linear-gradient(bottom, #f9f9f9, #ececec);
-        background-image: linear-gradient(to top, #f9f9f9, #ececec);
</del><ins>+        background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAA3NCSVQICAjb4U/gAAAA51BMVEUgZpDkzc0yd6f///8mcqFJm8cjbZZzr80mg78lh8BDk8UngLl+s9AmfKk4hrGeweBaoMhNlMORwt4nd6Zdm8BAjMEnf7RYmsMkb50mhsFWlsYhZ5ImhbwocZg0f61Lk8E9i7twqNBgo8VSmMUofLBcm8o3faUpfK8mh8Aia5MgZpFMmcgpeapDmcJjo8sliMEmh70nhLkkcKAqgLF2sc8sc5ojbZsngrMkh8EnfKw1eaUjbpkkapImeKQgaJAohb0mh8MmhcMng7kkcKEpf68iZ48haJMmhb8kicEmc6MibJkia5UnhLsw1mWvAAAATXRSTlP/AP8A/////////////////////////////////////////////////////////////////////////////////////////////////9/iR18AAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAUdEVYdENyZWF0aW9uIFRpbWUAMy85LzEzrdD8jAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAACaSURBVBiVVc15D8FAEIfh+Ymj6761LIrSiCNVVyjbRGgifP/PQ6q22/evyZPJDNXzD6G0qNDq5PtO3DJDFyfRpk+po2Eo0h5Qx9U0LRa3SejdlR2rDMLI41yKh6/AtOSzUiuU4kvemSMUDBsRXGuRIHj/CvCXyTNcSXelQBQYY1uBWMY651xfK4KzbdgzqJI73LK7hGC6r0bTB5apIhqIH/YIAAAAAElFTkSuQmCC);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* edit image */
</span></span></pre></div>
<a id="trunkwpadmincsswpadmincss"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/css/wp-admin.css (23768 => 23769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/css/wp-admin.css        2013-03-21 05:17:25 UTC (rev 23768)
+++ trunk/wp-admin/css/wp-admin.css        2013-03-21 15:54:11 UTC (rev 23769)
</span><span class="lines">@@ -3597,6 +3597,16 @@
</span><span class="cx">         vertical-align: middle;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.diff-from-title,
+.diff-to-title {
+        font-size: 14px;
+        font-weight: bold;
+        width:60px;
+        text-align: right;
+        float: left;
+        margin-right: 5px;
+}
+
</ins><span class="cx"> .revisiondiffcontainer {
</span><span class="cx">         width: 96%;
</span><span class="cx"> }
</span><span class="lines">@@ -3605,13 +3615,15 @@
</span><span class="cx">         margin: 2px;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#diffrestore,
-#diffnext,
-#diffcancel {
</del><ins>+#diffnext {
</ins><span class="cx">         float: right;
</span><span class="cx">         margin-right: 5px;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#diffrestore input{
+        margin-left: 10px;
+}
+
</ins><span class="cx"> #diffprevious,
</span><span class="cx"> #difftitle,
</span><span class="cx"> #difftitlefrom,
</span><span class="lines">@@ -3623,7 +3635,6 @@
</span><span class="cx">
</span><span class="cx"> #diffprevious,
</span><span class="cx"> #diffnext {
</span><del>-        margin-top: 7px;
</del><span class="cx">         height: 30px;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3635,26 +3646,39 @@
</span><span class="cx"> #diffheader {
</span><span class="cx">         border-bottom: 1px solid #dfdfdf;
</span><span class="cx">         width: 100%;
</span><del>-        height: 45px;
-        line-height: 45px;
-        padding-top: 10px;
</del><ins>+        height: 40px;
+        line-height: 40px;
+        padding-top: 30px;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-#diffsubheader {
-        border-bottom: 1px solid #dfdfdf;
</del><ins>+#diffsubheader,.diff-left-hand-meta-row {
</ins><span class="cx">         width: 100%;
</span><span class="cx">         height:35px;
</span><span class="cx">         line-height: 35px;
</span><ins>+        display: block;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-#diffslider {
</del><ins>+#diffslider{
</ins><span class="cx">         width: 70%;
</span><span class="cx">         margin-left: auto;
</span><span class="cx">         margin-right: auto;
</span><span class="cx">         text-align: center;
</span><del>-        height: 3.5em;
</del><ins>+        height: 0.8em;
+        margin-top: 20px;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+.diff-slider-ticks-wrapper {
+        margin-left: auto;
+        margin-right: auto;
+        text-align: center;
+}
+
+#diff-slider-ticks {
+        position: absolute;
+        margin-top: 50px;
+        z-index: 1;
+}
+
</ins><span class="cx"> #revisioncount {
</span><span class="cx">         width: 50%;
</span><span class="cx">         margin-left: auto;
</span><span class="lines">@@ -3722,6 +3746,9 @@
</span><span class="cx">
</span><span class="cx"> #comparetworevisions {
</span><span class="cx">         float: right;
</span><ins>+        position: absolute;
+        top: 10px;
+        right: 10px;
</ins><span class="cx">         line-height: 35px;
</span><span class="cx">         padding-right: 5px;
</span><span class="cx"> }
</span><span class="lines">@@ -3731,10 +3758,15 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #difftitle img,
</span><del>-#difftitlefrom img {
</del><ins>+#difftitlefrom img,
+.post-revisions li img {
</ins><span class="cx">         vertical-align: middle;
</span><span class="cx">         margin-left: 5px;
</span><span class="cx"> }
</span><ins>+.post-revisions li {
+        vertical-align: middle;
+        height: 28px;
+}
</ins><span class="cx">
</span><span class="cx"> #showsplitviewoption,
</span><span class="cx"> #toggleshowautosavesoption {
</span><span class="lines">@@ -3757,11 +3789,11 @@
</span><span class="cx"> .comparetwo #diffprevious,
</span><span class="cx"> .comparetwo #diffnext,
</span><span class="cx"> span#diff_left_current_revision,
</span><del>-span#diff_from_current_revision,
</del><ins>+#diff_from_current_revision,
</ins><span class="cx"> .currentversion span#diff_left_count,
</span><span class="cx"> .currentversion span#diff_left_count_inner,
</span><del>-.currentversion #difftitlefrom,
-.comparetwo.currentversion #difftitlefrom {
</del><ins>+.comparetwo.currentversion #diff_from_current_revision,
+#diffsubheader.diff-left-hand-meta-row {
</ins><span class="cx">         display: none;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -3769,15 +3801,53 @@
</span><span class="cx"> span#diff_left_count,
</span><span class="cx"> span#diff_left_count_inner,
</span><span class="cx"> .comparetwo #difftitlefrom,
</span><del>-.comparetwo.currentversion span#diff_from_current_revision,
</del><span class="cx"> .leftmodelloading #modelsloading,
</span><span class="cx"> .rightmodelloading #modelsloading,
</span><span class="cx"> .leftmodelloading #modelsloading .spinner,
</span><span class="cx"> .rightmodelloading #modelsloading .spinner,
</span><del>-{
-        display: inline;
</del><ins>+.comparetwo #diffsubheader.diff-left-hand-meta-row {
+        display: block;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+.revision-tick {
+        width: 1px;
+        float: left;
+        margin-right: 15px;
+        height: 11px;
+        padding: 0;
+        margin-left: 0px;
+}
+
+.revision-tick.revision-scopeofchanges-vsmall {
+                width: 1px;
+                background-color: #aaa;
+}
+
+.revision-tick.revision-scopeofchanges-small {
+                width: 2px;
+                background-color: #aaa;
+                margin-left: -1px;
+}
+
+.revision-tick.revision-scopeofchanges-med {
+                width: 3px;
+                margin-left: -2px;
+                background-color: #666;
+}
+
+.revision-tick.revision-scopeofchanges-large {
+                width: 4px;
+                margin-left: -3px;
+                background-color: #333;
+}
+
+.revision-tick.revision-scopeofchanges-vlarge {
+                margin-left: -3px;
+                width: 4px;
+                background-color: #111;
+                left: 1;
+}
+
</ins><span class="cx"> .diff-loading {
</span><span class="cx">         margin-top: 50px;
</span><span class="cx">         width: 100%;
</span><span class="lines">@@ -3792,24 +3862,90 @@
</span><span class="cx">         float: none;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#difftitlefrom {
-        float: left;
-        display: none;
-}
-
</del><span class="cx"> #modelsloading {
</span><span class="cx">         float: right;
</span><ins>+        position: absolute;
</ins><span class="cx">         line-height: 30px;
</span><span class="cx">         display: none;
</span><span class="cx">         clear: none;
</span><del>-        margin: 0;
</del><ins>+        right: 170px;
</ins><span class="cx">         margin-top: -40px;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #modelsloading .spinner {
</span><span class="cx">         float: left;
</span><del>- }
</del><ins>+}
</ins><span class="cx">
</span><ins>+.ui-tooltip-content img {
+        float: left;
+        margin-right: 5px;
+}
+
+
+
+/* jQuery UI Tooltip 1.10.1 */
+
+.ui-tooltip {
+        padding: 8px;
+        position: absolute;
+        z-index: 9999;
+        max-width: 300px;
+        min-width: 130px;
+}
+
+body .ui-tooltip {
+        border-width: 1px;
+}
+
+.ui-tooltip, .arrow:after {
+        border: 1px solid #d7d7d7;
+}
+
+.ui-tooltip {
+        padding: 5px 10px;
+}
+
+.arrow {
+        width: 70px;
+        height: 16px;
+        overflow: hidden;
+        position: absolute;
+        left: 50%;
+        margin-left: -35px;
+        bottom: -16px;
+        z-index: 99999;
+
+}
+
+.arrow.top {
+        top: -16px;
+        bottom: auto;
+}
+
+.arrow.left {
+        left: 20%;
+}
+
+.arrow:after {
+        content: "";
+        position: absolute;
+        left: 20px;
+        top: -20px;
+        width: 25px;
+        height: 25px;
+        background-color: #FFF;
+        -webkit-transform: rotate(45deg);
+        -moz-transform: rotate(45deg);
+        -ms-transform: rotate(45deg);
+        -o-transform: rotate(45deg);
+        tranform: rotate(45deg);
+}
+
+.arrow.top:after {
+        bottom: -20px;
+        top: auto;
+}
+
</ins><span class="cx"> /* jQuery UI Slider */
</span><span class="cx">
</span><span class="cx"> .wp-slider.ui-slider {
</span><span class="lines">@@ -3824,11 +3960,9 @@
</span><span class="cx"> .wp-slider .ui-slider-handle {
</span><span class="cx">         position: absolute;
</span><span class="cx">         z-index: 2;
</span><del>-        width: 1.2em;
-        height: 1.2em;
-        border-width: 1px;
-        border-style: solid;
-        border-radius: 3px;
</del><ins>+        width: 17px;
+        height: 17px;
+        border: none;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> .wp-slider .ui-slider-range {
</span></span></pre></div>
<a id="trunkwpadminincludesajaxactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ajax-actions.php (23768 => 23769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ajax-actions.php        2013-03-21 05:17:25 UTC (rev 23768)
+++ trunk/wp-admin/includes/ajax-actions.php        2013-03-21 15:54:11 UTC (rev 23769)
</span><span class="lines">@@ -2123,35 +2123,26 @@
</span><span class="cx">         /* translators: revision date format, see http://php.net/date */
</span><span class="cx">         $datef = _x( 'j F, Y @ G:i:s', 'revision date format');
</span><span class="cx">
</span><ins>+        $left_revision = get_post( $compare_to );
+
</ins><span class="cx">         //single model fetch mode
</span><ins>+        //return the diff of a single revision comparison
</ins><span class="cx">         if ( 0 != $single_revision_id ) {
</span><del>-                $left_revision = get_post( $compare_to );
</del><span class="cx">                 $right_revision = get_post( $single_revision_id );
</span><span class="cx">
</span><del>-                if ( $compare_two_mode ) {
-                        $compare_to_gravatar = get_avatar( $left_revision->post_author, 18 );
-                        $compare_to_author = get_the_author_meta( 'display_name', $left_revision->post_author );
-                        $compare_to_date = date_i18n( $datef, strtotime( $left_revision->post_modified ) );
-
-                        $revision_from_date_author = sprintf(
-                                /* translators: post revision title: 1: author avatar, 2: author name, 3: time ago, 4: date */
-                                _x( '%1$s %2$s, %3$s ago (%4$s)', 'post revision title' ),
-                                $compare_to_gravatar,
-                                $compare_to_author,
-                                human_time_diff( strtotime( $left_revision->post_modified ), current_time( 'timestamp' ) ),
-                                $compare_to_date
-                        );
-                }
-
</del><span class="cx">                 //
</span><span class="cx">                 //make sure the left revision is the most recent
</span><span class="cx">                 //
</span><ins>+
</ins><span class="cx">                 if ( strtotime( $right_revision->post_modified_gmt ) < strtotime( $left_revision->post_modified_gmt ) ) {
</span><span class="cx">                         $temp = $left_revision;
</span><span class="cx">                         $left_revision = $right_revision;
</span><span class="cx">                         $right_revision = $temp;
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+                $linesadded=0;
+                $linesdeleted=0;
+
</ins><span class="cx">                 //
</span><span class="cx">                 //compare from left to right, passed from application
</span><span class="cx">                 //
</span><span class="lines">@@ -2167,41 +2158,77 @@
</span><span class="cx">                         if ( ! empty( $show_split_view ) )
</span><span class="cx">                                  $args = array( 'show_split_view' => true );
</span><span class="cx">
</span><del>-                        $content .= wp_text_diff( $left_content, $right_content, $args );
</del><ins>+                        $diff = wp_text_diff_with_count( $left_content, $right_content, $args );
+
+                        if ( isset( $diff[ 'html' ] ) )
+                                $content .= $diff[ 'html' ];
+
+                        if ( isset( $diff[ 'linesadded' ] ) )
+                                $linesadded = $linesadded + $diff[ 'linesadded' ];
+
+                        if ( isset( $diff[ 'linesdeleted' ] ) )
+                                $linesdeleted = $linesdeleted + $diff[ 'linesdeleted' ];
+
+
</ins><span class="cx">                 }
</span><del>-                        $content = '' == $content ? __( 'No difference' ) : $content;
-                        $alltherevisions = array (
-                                'revisiondiff' => $content
-                        );
</del><ins>+                $content = '' == $content ? __( 'No difference' ) : $content;
+
+                $alltherevisions = array (
+                        'revisiondiff' => $content,
+                        'lines_deleted' => $linesdeleted,
+                        'lines_added' => $linesadded
+                );
</ins><span class="cx">                 echo json_encode( $alltherevisions );
</span><span class="cx">                 exit();
</span><del>-        }
</del><ins>+        } //end single model fetch
</ins><span class="cx">
</span><ins>+        //fetch the list of revisions available
+
</ins><span class="cx">         //if we are comparing two revisions, the first 'revision' represented by the leftmost
</span><span class="cx">         //slider position is the current revision, prepend a comparison to this revision
</span><del>-        if ( $compare_two_mode )
-                array_unshift( $revisions, get_post( $post_id ) );
-                
</del><ins>+        if ( ! wp_first_revision_matches_current_version( $post_id ) ) //revisions don't have current version
+                array_unshift( $revisions, get_post( $post_id ) ) ;
+        //$revisions->append ( get_post( $post_id ) );
+        //error_log( var_dump( $revisions ));
</ins><span class="cx">         $count = -1;
</span><span class="cx">
</span><ins>+        //reverse the list to start with oldes revision
+        $revisions = array_reverse( $revisions );
+
+        $previous_revision_id = 0;
</ins><span class="cx">         foreach ( $revisions as $revision ) :
</span><del>-                if ( ! empty( $show_autosaves ) && wp_is_post_autosave( $revision ) )
</del><ins>+                //error_log( ( $show_autosaves ));
+                if ( empty( $show_autosaves ) && wp_is_post_autosave( $revision ) )
</ins><span class="cx">                                 continue;
</span><span class="cx">
</span><span class="cx">                 $revision_from_date_author = '';
</span><span class="cx">                 $count++;
</span><span class="cx">                 // return blank data for diffs to the left of the left handle (for right handel model)
</span><span class="cx">                 // or to the right of the right handle (for left handel model)
</span><del>-                if ( ( 0 != $left_handle_at && $count <= $left_handle_at ) ||
-                         ( 0 != $right_handle_at && $count > $right_handle_at )) {
</del><ins>+                if ( ( 0 != $left_handle_at && $count <= $left_handle_at ) ||
+                         ( 0 != $right_handle_at && $count > $right_handle_at )) {
</ins><span class="cx">                         $alltherevisions[] = array (
</span><span class="cx">                                 'ID' => $revision->ID,
</span><span class="cx">                         );
</span><del>-                        
</del><span class="cx">                         continue;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                $gravatar = get_avatar( $revision->post_author, 18 );
</del><ins>+                if ( $compare_two_mode ) {
+                        $compare_to_gravatar = get_avatar( $left_revision->post_author, 24 );
+                        $compare_to_author = get_the_author_meta( 'display_name', $left_revision->post_author );
+                        $compare_to_date = date_i18n( $datef, strtotime( $left_revision->post_modified ) );
+
+                        $revision_from_date_author = sprintf(
+                                /* translators: post revision title: 1: author avatar, 2: author name, 3: time ago, 4: date */
+                                _x( '%1$s %2$s, %3$s ago (%4$s)', 'post revision title' ),
+                                $compare_to_gravatar,
+                                $compare_to_author,
+                                human_time_diff( strtotime( $left_revision->post_modified ), current_time( 'timestamp' ) ),
+                                $compare_to_date
+                        );
+                }
+
+                $gravatar = get_avatar( $revision->post_author, 24 );
</ins><span class="cx">                 $author = get_the_author_meta( 'display_name', $revision->post_author );
</span><span class="cx">                 $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
</span><span class="cx">                 $revision_date_author = sprintf(
</span><span class="lines">@@ -2213,22 +2240,58 @@
</span><span class="cx">                         $date
</span><span class="cx">                 );
</span><span class="cx">
</span><ins>+                $autosavef = __( '%1$s [Autosave]' );
+                $currentf = __( '%1$s [Current Revision]' );
+
+                if ( ! $post = get_post( $post_id))
+                        exit();
+
+                if ( $left_revision->post_modified === $post->post_modified )
+                        $revision_from_date_author = sprintf( $currentf, $revision_from_date_author );
+                elseif ( wp_is_post_autosave( $left_revision ) )
+                        $revision_from_date_author = sprintf( $autosavef, $revision_from_date_author );
+
+                if ( $revision->post_modified === $post->post_modified )
+                        $revision_date_author = sprintf( $currentf, $revision_date_author );
+                elseif ( wp_is_post_autosave( $revision ) )
+                        $revision_date_author = sprintf( $autosavef, $revision_date_author );
+
+                $date_short_format = __( 'j M @ G:i' );
+                $date_short = date_i18n( $date_short_format, strtotime( $revision->post_modified ) );
+
+                $revision_date_author_short = sprintf(
+                        '%s <strong>%s</strong><br />%s',
+                        $gravatar,
+                        $author,
+                        $date_short
+                );
+
</ins><span class="cx">                 $restoreaction = wp_nonce_url(
</span><span class="cx">                         add_query_arg(
</span><span class="cx">                                 array( 'revision' => $revision->ID,
</span><span class="cx">                                         'action' => 'restore' ),
</span><span class="cx">                                         admin_url( 'revision.php' )
</span><span class="cx">                         ),
</span><del>-                        "restore-post_{$compare_to}|{$revision->ID}"
</del><ins>+                        "restore-post_{$revision->ID}"
</ins><span class="cx">                 );
</span><del>-
-                $alltherevisions[] = array (
</del><ins>+                // if this is a left handled calculation swap data
+                if ( 0 != $right_handle_at ) {
+                        $tmp = $revision_from_date_author;
+                        $revision_from_date_author = $revision_date_author;
+                        $revision_date_author = $tmp;
+                }
+                if ( ( $compare_two_mode || 0 !== $previous_revision_id ) ) {
+                        $alltherevisions[] = array (
</ins><span class="cx">                                 'ID' => $revision->ID,
</span><span class="cx">                                 'revision_date_author' => $revision_date_author,
</span><span class="cx">                                 'revision_from_date_author' => $revision_from_date_author,
</span><ins>+                                'revision_date_author_short' => $revision_date_author_short,
</ins><span class="cx">                                 'restoreaction' => urldecode( $restoreaction ),
</span><del>-                                'revision_toload' => true
</del><ins>+                                'revision_toload' => true,
+                                'previous_revision_id' => $previous_revision_id
</ins><span class="cx">                         );
</span><ins>+                }
+                $previous_revision_id = $revision->ID;
</ins><span class="cx">
</span><span class="cx">         endforeach;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminjsrevisionsjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/revisions.js (23768 => 23769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/revisions.js        2013-03-21 05:17:25 UTC (rev 23768)
+++ trunk/wp-admin/js/revisions.js        2013-03-21 15:54:11 UTC (rev 23769)
</span><span class="lines">@@ -7,19 +7,33 @@
</span><span class="cx">
</span><span class="cx">                 Model : Backbone.Model.extend({
</span><span class="cx">                         idAttribute : 'ID',
</span><del>-                        urlRoot : ajaxurl +        '?action=revisions-data&compare_to=' + wpRevisionsSettings.post_id +
-                                '&show_autosaves=false&show_split_view=true&nonce=' + wpRevisionsSettings.nonce,
</del><ins>+                        urlRoot : ajaxurl +        '?action=revisions-data' +
+                                '&show_autosaves=true&show_split_view=true&nonce=' + wpRevisionsSettings.nonce,
</ins><span class="cx">                         defaults: {
</span><span class="cx">                                 ID : 0,
</span><span class="cx">                                 revision_date_author : '',
</span><ins>+                                revision_date_author_short: '',
</ins><span class="cx">                                 revisiondiff : '<div class="diff-loading"><div class="spinner"></div></div>',
</span><span class="cx">                                 restoreaction : '',
</span><span class="cx">                                 revision_from_date_author : '',
</span><del>-                                revision_toload : false
</del><ins>+                                revision_toload : false,
+                                lines_added : 0,
+                                lines_deleted : 0,
+                                scope_of_changes : 'none',
+                                previous_revision_id : 0
</ins><span class="cx">                         },
</span><span class="cx">
</span><span class="cx">                         url : function() {
</span><del>-                                return this.urlRoot + '&single_revision_id=' + this.id;
</del><ins>+                                if ( 1 === REVAPP._compareoneortwo ) {
+                                        return this.urlRoot +
+                                                '&single_revision_id=' + this.id +
+                                                '&compare_to=' + this.get( 'previous_revision_id' ) +
+                                                '&post_id=' + wpRevisionsSettings.post_id;
+                                } else {
+                                        return this.urlRoot +
+                                '&single_revision_id=' + this.id;
+                                }
+
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                 }),
</span><span class="lines">@@ -33,45 +47,71 @@
</span><span class="cx">                         _right_handle_revisions : null,
</span><span class="cx">                         _revisionsInteractions : null,
</span><span class="cx">                         _revisionsOptions : null,
</span><del>-                        _left_diff : 0,
</del><ins>+                        _left_diff : 1,
</ins><span class="cx">                         _right_diff : 1,
</span><del>-                        _autosaves : false,
</del><ins>+                        _autosaves : true,
</ins><span class="cx">                         _show_split_view : true,
</span><span class="cx">                         _compareoneortwo : 1,
</span><span class="cx">                         _left_model_loading : false,        //keep track of model loads
</span><span class="cx">                         _right_model_loading : false,        //disallow slider interaction, also repeat loads, while loading
</span><ins>+                        _tickmarkView : null, //the slider tickmarks
+                        _has_tooltip : false,
</ins><span class="cx">
</span><del>-                        //TODO add ability to arrive on specific revision
</del><span class="cx">                         routes : {
</span><span class="cx">                         },
</span><span class="cx">
</span><del>-                        viewrevision : function( revision ) {
-                                //coming soon
-                        },
-
</del><span class="cx">                         reload_toload_revisions : function( model_collection, reverse_direction ) {
</span><span class="cx">                                 var self = this;
</span><span class="cx">                                 var revisions_to_load = model_collection.where( { revision_toload : true } );
</span><del>-                                //console.log(revisions_to_load);
</del><span class="cx">                                 var delay=0;
</span><del>-                                _.each(revisions_to_load, function( the_model ) {
</del><ins>+                                //match slider to passed revision_id
+                                _.each( revisions_to_load, function( the_model ) {
+                                        if ( the_model.get( 'ID' ) == wpRevisionsSettings.revision_id ) {
+                                                self._right_diff = self._revisions.indexOf( the_model ) + 1;
+                                        }
+
+                                });
+                                _.each( revisions_to_load, function( the_model ) {
</ins><span class="cx">                                                 the_model.urlRoot = model_collection.url;
</span><span class="cx">                                                 _.delay( function() {
</span><span class="cx">                                                         the_model.fetch( {
</span><span class="cx">                                                                 update : true,
</span><span class="cx">                                                                 add : false,
</span><span class="cx">                                                                 remove : false,
</span><del>-                                                                //async : false,
</del><span class="cx">                                                                 success : function( model ) {
</span><del>-                                                                        //console.log(model.get( 'ID' ) +'-'+self._revisions.at( self._right_diff ).get( 'ID' ));
-                                                                        if ( model.get( 'ID' ) === self._revisions.at( self._right_diff - 1 ).get( 'ID' ) ) { //reload if current model refreshed
-                                                                                //console.log('render');
</del><ins>+                                                                        model.set( 'revision_toload', 'false' );
+
+                                                                        //stop spinner when all models are loaded
+                                                                        if ( 0 === model_collection.where( { revision_toload : true } ).length )
+                                                                                self.stop_model_loading_spinner();
+
+                                                                        self._tickmarkView.render();
+
+                                                                        var total_changes = model.get( 'lines_added' ) + model.get( 'lines_deleted');
+                                                                        var scope_of_changes = 'vsmall';
+
+                                                                        // Note: hard coded scope of changes
+                                                                        // TODO change to dynamic based on range of values
+                                                                        if ( total_changes > 1 && total_changes <= 3 ) {
+                                                                                scope_of_changes = 'small';
+                                                                        } else if(total_changes > 3 && total_changes <= 5 ) {
+                                                                                scope_of_changes = 'med';
+                                                                        } else if(total_changes > 5 && total_changes <= 10 ) {
+                                                                                scope_of_changes = 'large';
+                                                                        } else if(total_changes > 10 ) {
+                                                                                scope_of_changes = 'vlarge';
+                                                                        }
+                                                                        model.set( 'scope_of_changes', scope_of_changes );
+                                                                        if ( 0 !== self._right_diff &&
+                                                                                model.get( 'ID' ) === self._revisions.at( self._right_diff - 1 ).get( 'ID' ) ) {
+                                                                                //reload if current model refreshed
</ins><span class="cx">                                                                                 self._revisionView.render();
</span><span class="cx">                                                                         }
</span><ins>+
</ins><span class="cx">                                                                 }
</span><span class="cx">                                                 } );
</span><span class="cx">                                                 }, delay ) ;
</span><del>-                                                delay = delay + 200; //stagger model loads by 200 ms to avoid hammering server with requests
</del><ins>+                                                delay = delay + 150; //stagger model loads to avoid hammering server with requests
</ins><span class="cx">                                         }
</span><span class="cx">                                 );
</span><span class="cx">                         },
</span><span class="lines">@@ -83,7 +123,6 @@
</span><span class="cx">
</span><span class="cx">                         stop_left_model_loading : function() {
</span><span class="cx">                                 this._left_model_loading = false;
</span><del>-                                $('.revisiondiffcontainer').removeClass('leftmodelloading');
</del><span class="cx">                         },
</span><span class="cx">
</span><span class="cx">                         start_right_model_loading : function() {
</span><span class="lines">@@ -93,7 +132,11 @@
</span><span class="cx">
</span><span class="cx">                         stop_right_model_loading : function() {
</span><span class="cx">                                 this._right_model_loading = false;
</span><ins>+                        },
+
+                        stop_model_loading_spinner : function() {
</ins><span class="cx">                                 $('.revisiondiffcontainer').removeClass('rightmodelloading');
</span><ins>+                                $('.revisiondiffcontainer').removeClass('leftmodelloading');
</ins><span class="cx">                         },
</span><span class="cx">
</span><span class="cx">                         reloadmodel : function() {
</span><span class="lines">@@ -104,44 +147,49 @@
</span><span class="cx">                                 }
</span><span class="cx">                         },
</span><span class="cx">
</span><ins>+                        //load the models for the single handle mode
</ins><span class="cx">                         reloadmodelsingle : function() {
</span><span class="cx">                                 var self = this;
</span><span class="cx">                                 self._revisions.url = ajaxurl +        '?action=revisions-data&compare_to=' + wpRevisionsSettings.post_id +
</span><span class="cx">                                                                                         '&show_autosaves=' + self._autosaves +
</span><del>-                                                                                        '&show_split_view=' + REVAPP._show_split_view +
</del><ins>+                                                                                        '&show_split_view=' + self._show_split_view +
</ins><span class="cx">                                                                                         '&nonce=' + wpRevisionsSettings.nonce;
</span><span class="cx">                                 self.start_right_model_loading();
</span><del>-                                this._revisions.fetch({ //reload revision data
</del><ins>+                                self._revisions.fetch({ //reload revision data
</ins><span class="cx">                                         success : function() {
</span><del>-                                                self.stop_right_model_loading();
</del><ins>+                                                console.log('loaded');
+                                                //self.stop_right_model_loading();
+                                                //REVAPP._right_diff -= 1;
</ins><span class="cx">                                                 var revisioncount = self._revisions.length;
</span><del>-                                                if ( self._right_diff > revisioncount ) //if right handle past rightmost, move
-                                                        self._right_diff = revisioncount;
-
</del><ins>+                                                self._revisionView.model = self._revisions;
</ins><span class="cx">                                                 self._revisionView.render();
</span><span class="cx">                                                 self.reload_toload_revisions( self._revisions );
</span><ins>+                                                self._tickmarkView.model = self._revisions;
+                                                self._tickmarkView.render();
+                                                $( '#slider' ).slider( 'option', 'max', revisioncount-1 ); //TODO test this, if autsave option changed
+                                                $( '#slider' ).slider( 'value', self._right_diff - 1 ).trigger( 'slide' );
</ins><span class="cx">
</span><del>-                                                $( '#slider' ).slider( 'option', 'max', revisioncount-1 ); //TODO test this, autsaves changed
</del><span class="cx">                                         },
</span><span class="cx">
</span><span class="cx">                                         error : function () {
</span><span class="cx">                                                 self.stop_right_model_loading();
</span><del>-                                                //console.log( 'Error loading revision data' );
</del><span class="cx">                                         }
</span><span class="cx">
</span><span class="cx">                                 });
</span><span class="cx">                         },
</span><span class="cx">
</span><ins>+                        //load the models for the left handle
</ins><span class="cx">                         reloadleft : function() {
</span><span class="cx">                                 var self = this;
</span><span class="cx">                                 self.start_left_model_loading();
</span><span class="cx">                                 self._left_handle_revisions = new wp.revisions.Collection();
</span><ins>+
</ins><span class="cx">                                 self._left_handle_revisions.url =
</span><span class="cx">                                         ajaxurl +
</span><span class="cx">                                         '?action=revisions-data&compare_to=' + self._revisions.at( self._right_diff - 1 ).get( 'ID' ) +
</span><span class="cx">                                         '&post_id=' + wpRevisionsSettings.post_id +
</span><del>-                                        '&show_autosaves=' + self._autosaves +
-                                        '&show_split_view=' + self._show_split_view +
</del><ins>+                                        '&show_autosaves=' + REVAPP._autosaves +
+                                        '&show_split_view=' + REVAPP._show_split_view +
</ins><span class="cx">                                         '&nonce=' + wpRevisionsSettings.nonce +
</span><span class="cx">                                         '&right_handle_at=' + ( self._right_diff );
</span><span class="cx">
</span><span class="lines">@@ -150,47 +198,48 @@
</span><span class="cx">                                         success : function(){
</span><span class="cx">                                                 self.stop_left_model_loading();
</span><span class="cx">                                                 self.reload_toload_revisions( self._left_handle_revisions );
</span><del>-                                        },
</del><ins>+                                                self._tickmarkView.model = self._left_handle_revisions;
+                                                $( '#slider' ).slider( 'option', 'max', self._revisions.length );
+                                                // ensure right handle not beyond length, in particular if viewing autosaves is switched from on to off
+                                                // the number of models in the collection might get shorter, this ensures right handle is not beyond last model
+                                                if ( self._right_diff > self._revisions.length )
+                                                        self._right_diff = self._revisions.length;
+                                                },
</ins><span class="cx">
</span><span class="cx">                                         error : function () {
</span><del>-                                                //console.log( 'Error loading revision data' );
</del><span class="cx">                                                 self.stop_left_model_loading();
</span><span class="cx">                                         }
</span><span class="cx">                                 });
</span><span class="cx">                         },
</span><span class="cx">
</span><ins>+                        //load the models for the right handle
</ins><span class="cx">                         reloadright : function() {
</span><span class="cx">                                 var self = this;
</span><span class="cx">                                 self.start_right_model_loading();
</span><span class="cx">                                 self._right_handle_revisions = new wp.revisions.Collection();
</span><del>-                                if ( 0 === self._left_diff ) {
</del><ins>+
</ins><span class="cx">                                         self._right_handle_revisions.url =
</span><span class="cx">                                                 ajaxurl +
</span><del>-                                                '?action=revisions-data&compare_to=' + wpRevisionsSettings.post_id +
</del><ins>+                                                '?action=revisions-data&compare_to=' + ( self._revisions.at( self._left_diff ).get( 'ID' ) -1)+
</ins><span class="cx">                                                 '&post_id=' + wpRevisionsSettings.post_id +
</span><del>-                                                '&show_autosaves=' + self._autosaves +
-                                                '&show_split_view=' + self._show_split_view +
</del><ins>+                                                '&show_autosaves=' + REVAPP._autosaves +
+                                                '&show_split_view=' + REVAPP._show_split_view +
</ins><span class="cx">                                                 '&nonce=' + wpRevisionsSettings.nonce;
</span><del>-                                } else {
-                                        self._right_handle_revisions.url =
-                                                ajaxurl +
-                                                '?action=revisions-data&compare_to=' + self._revisions.at( self._left_diff - 1 ).get( 'ID' ) +
-                                                '&post_id=' + wpRevisionsSettings.post_id +
-                                                '&show_autosaves=' + self._autosaves +
-                                                '&show_split_view=' + self._show_split_view +
-                                                '&nonce=' + wpRevisionsSettings.nonce +
-                                                '&left_handle_at=' + (self._left_diff ) ;
-                                }
</del><span class="cx">
</span><span class="cx">                                 self._right_handle_revisions.fetch({
</span><span class="cx">
</span><span class="cx">                                         success : function(){
</span><span class="cx">                                                 self.stop_right_model_loading();
</span><span class="cx">                                                 self.reload_toload_revisions( self._right_handle_revisions );
</span><ins>+                                                self._tickmarkView.model = self._right_handle_revisions;
+                                                $( '#slider' ).slider( 'option', 'max', self._revisions.length );
+                                                $( '#slider' ).slider( 'values', [ REVAPP._left_diff, REVAPP._right_diff] ).trigger( 'slide' );
+
+                                                //REVAPP._revisionView.render();
+
</ins><span class="cx">                                         },
</span><span class="cx">
</span><span class="cx">                                         error : function ( response ) {
</span><del>-                                                //console.log( 'Error loading revision data - ' + response.toSource() );
</del><span class="cx">                                                 self.stop_right_model_loading();
</span><span class="cx">                                         }
</span><span class="cx">                                 });
</span><span class="lines">@@ -198,6 +247,8 @@
</span><span class="cx">                         },
</span><span class="cx">
</span><span class="cx">                         reloadleftright : function() {
</span><ins>+                                this.start_right_model_loading();
+                                this.start_left_model_loading();
</ins><span class="cx">                                 this.reloadleft();
</span><span class="cx">                                 this.reloadright();
</span><span class="cx">                         },
</span><span class="lines">@@ -208,36 +259,80 @@
</span><span class="cx">                         initialize : function( options ) {
</span><span class="cx">                                 var self = this; //store the application instance
</span><span class="cx">                                 if (this._revisions === null) {
</span><del>-                                        self._autosaves = '';
</del><span class="cx">                                         self._revisions = new wp.revisions.Collection(); //set up collection
</span><span class="cx">                                         self.start_right_model_loading();
</span><span class="cx">                                         self._revisions.fetch({ //load revision data
</span><span class="cx">
</span><span class="cx">                                                 success : function() {
</span><span class="cx">                                                         self.stop_right_model_loading();
</span><del>-                                                        self.revisionDiffSetup();
</del><ins>+                                                        //self._right_handle_revisions = self._revisions;
+                                                        self.completeApplicationSetup();
</ins><span class="cx">                                                 }
</span><span class="cx">                                         });
</span><span class="cx">                                 }
</span><span class="cx">                                 return this;
</span><span class="cx">                         },
</span><span class="cx">
</span><del>-                        revisionDiffSetup : function() {
</del><ins>+                        addTooltip : function( handle, message ) {
+
+                                handle.attr( 'title', '' ).tooltip({
+                                        track: false,
+
+                                        position: {
+                                                my: "left-30 top-66",
+                                                at: "top left",
+                                                using: function( position, feedback ) {
+                                                        $( this ).css( position );
+                                                        $( "<div>" )
+                                                        .addClass( "arrow" )
+                                                        .addClass( feedback.vertical )
+                                                        .addClass( feedback.horizontal )
+                                                        .appendTo( $( this ) );
+                                                }
+                                        },
+                                        show: false,
+                                        hide: false,
+                                        content: function() {
+                                                return message;
+                                        }
+
+                                } );
+                        },
+/**/
+
+                        completeApplicationSetup : function() {
</ins><span class="cx">                                 this._revisionView = new wp.revisions.views.View({
</span><span class="cx">                                         model : this._revisions
</span><span class="cx">                                 });
</span><span class="cx">                                 this._revisionView.render();
</span><del>-                                $( '#diff_max, #diff_maxof' ).html( this._revisions.length );
-                                $( '#diff_count' ).html( REVAPP._right_diff );
</del><span class="cx">                                 $( '#slider' ).slider( 'option', 'max', this._revisions.length - 1 );
</span><span class="cx">
</span><span class="cx">                                 this.reload_toload_revisions( this._revisions );
</span><ins>+
</ins><span class="cx">                                 this._revisionsInteractions = new wp.revisions.views.Interact({
</span><span class="cx">                                         model : this._revisions
</span><span class="cx">                                 });
</span><span class="cx">                                 this._revisionsInteractions.render();
</span><span class="cx">
</span><ins>+                                this._tickmarkView = new wp.revisions.views.Tickmarks({
+                                        model : this._revisions
+                                });
+                                this._tickmarkView.render();
+                                this._tickmarkView.resetticks();
+
+
</ins><span class="cx">                                 /*
</span><ins>+                                .on( 'mouseup', function( event ) {
+                                        REVAPP._keep_tooltip_open = false;
+                                        $( this ).find('.ui-slider-tooltip').hide();
+                                } ).on( 'mousedown', function( event ) {
+                                        REVAPP._keep_tooltip_open = true;
+                                } ).on( 'mouseout', function( event ) {
+                                        if ( REVAPP._keep_tooltip_open)
+                                                event.stopImmediatePropagation();
+                                        });
+                                */
+                                /*
</ins><span class="cx">                                 //Options hidden for now, moving to screen options
</span><span class="cx">                                 this._revisionsOptions = new wp.revisions.views.Options({
</span><span class="cx">                                         model : this._revisions
</span><span class="lines">@@ -252,14 +347,75 @@
</span><span class="cx">         wp.revisions.Collection = Backbone.Collection.extend({
</span><span class="cx">                 model : wp.revisions.Model,
</span><span class="cx">                 url : ajaxurl +        '?action=revisions-data&compare_to=' + wpRevisionsSettings.post_id +
</span><del>-                        '&show_autosaves=false&show_split_view=true&nonce=' + wpRevisionsSettings.nonce,
</del><ins>+                        '&show_autosaves=true&show_split_view=true&nonce=' + wpRevisionsSettings.nonce,
</ins><span class="cx">
</span><span class="cx">                 initialize : function() {
</span><span class="cx">                         }
</span><span class="cx">         } );
</span><span class="cx">
</span><span class="cx">         _.extend(wp.revisions.views, {
</span><ins>+
+                //Ticks inside slider view
</ins><span class="cx">                 //
</span><ins>+                Tickmarks : Backbone.View.extend({
+                        el : $('#diff-slider-ticks')[0],
+                        tagName : 'diff-slider-ticks-view',
+                        className : 'diff-slider-ticks-container',
+                        template : wp.template('revision-ticks'),
+                        model : wp.revisions.Model,
+
+                        resetticks : function() {
+                                var slider_max = $( '#slider' ).slider( 'option', 'max');
+                                var slider_width = $( '#slider' ).width();
+                                var adjust_max = ( 2 === REVAPP._compareoneortwo ) ? 1 : 0;
+                                var tick_width = Math.floor( slider_width / ( slider_max - adjust_max ) );
+
+                                //TODO: adjust right margins for wider ticks so they stay centered on handle stop point
+
+                                //set minimum and maximum widths for tick marks
+                                tick_width = (tick_width > 50 ) ? 50 : tick_width;
+                                tick_width = (tick_width < 10 ) ? 10 : tick_width;
+
+                                slider_width = tick_width * (slider_max - adjust_max ) +1;
+
+                                $( '#slider' ).width( slider_width );
+                                $( '.diff-slider-ticks-wrapper' ).width( slider_width );
+                                $( '#diffslider' ).width( slider_width );
+                                $( '#diff-slider-ticks' ).width( slider_width );
+
+                                var a_tick_width = $( '.revision-tick' ).width();
+
+                                if ( tick_width !== a_tick_width ) { // is the width already set correctly?
+                                        $( '.revision-tick' ).each( function( ) {
+                                                $(this).css( 'margin-right', tick_width - 1 + 'px'); //space the ticks out using right margin
+                                        });
+
+                                        if( 2 === REVAPP._compareoneortwo ) {
+                                                $( '.revision-tick' ).first().remove(); //TODO - remove the check
+                                        }
+                                        $( '.revision-tick' ).last().css( 'margin-right', '0' ); // last tick gets no right margin
+                                }
+
+                        },
+
+                        //render the tickmark view
+                        render : function() {
+                                var self = this;
+
+                                if ( null !== self.model ) {
+                                        var addhtml = "";
+                                        _.each ( self.model.models, function ( the_model ) {
+                                                addhtml = addhtml + self.template ( the_model.toJSON() );
+                                        });
+                                        self.$el.html( addhtml );
+
+                                }
+                                self.resetticks();
+                                return self;
+                        }
+                }),
+
+                //
</ins><span class="cx">                 //primary revision diff view
</span><span class="cx">                 //
</span><span class="cx">                 View : Backbone.View.extend({
</span><span class="lines">@@ -267,19 +423,16 @@
</span><span class="cx">                         tagName : 'revisionvview',
</span><span class="cx">                         className : 'revisionview-container',
</span><span class="cx">                         template : wp.template('revision'),
</span><del>-                        revvapp : null,
</del><span class="cx">                         comparetwochecked : '',
</span><span class="cx">                         draggingleft : false,
</span><span class="cx">
</span><del>-                        initialize : function(){
-                        },
-
</del><span class="cx">                         //
</span><span class="cx">                         //render the revisions
</span><span class="cx">                         //
</span><span class="cx">                         render : function() {
</span><span class="cx">                                 var addhtml = '';
</span><span class="cx">                                 //compare two revisions mode?
</span><ins>+
</ins><span class="cx">                                 if ( 2 === REVAPP._compareoneortwo ) {
</span><span class="cx">                                         this.comparetwochecked = 'checked';
</span><span class="cx">                                         if ( this.draggingleft ) {
</span><span class="lines">@@ -310,9 +463,34 @@
</span><span class="cx">                                 this.$el.html( addhtml );
</span><span class="cx">                                 if ( this.model.length < 3 ) {
</span><span class="cx">                                         $( 'div#comparetworevisions' ).hide(); //don't allow compare two if fewer than three revisions
</span><ins>+                                }
+                                if ( this.model.length < 2 ) {
+                                        $( 'div#diffslider' ).hide(); //don't allow compare two if fewer than three revisions
+                                        $( 'div.diff-slider-ticks-wrapper' ).hide();
+                                }
</ins><span class="cx">
</span><ins>+                                //
+                                // add tooltips to the handles
+                                //
+                                if ( 2 === REVAPP._compareoneortwo ) {
+                                        REVAPP.addTooltip ( $( 'a.ui-slider-handle.left-handle' ),
+                                                ( REVAPP._right_diff >= REVAPP._revisions.length ) ? '' : REVAPP._revisions.at( REVAPP._left_diff ).get( 'revision_date_author_short' ) );
+                                        REVAPP.addTooltip ( $( 'a.ui-slider-handle.right-handle' ),
+                                                ( REVAPP._right_diff >= REVAPP._revisions.length ) ? '' : REVAPP._revisions.at( REVAPP._right_diff ).get( 'revision_date_author_short' ) );
+                                } else {
+                                        REVAPP.addTooltip ( $( 'a.ui-slider-handle' ),
+                                                ( REVAPP._right_diff >= REVAPP._revisions.length ) ? '' : REVAPP._revisions.at( REVAPP._right_diff ).get( 'revision_date_author_short' ) );
</ins><span class="cx">                                 }
</span><del>-                                //console.log ( (this.model.at( REVAPP._right_diff - 1 )).url());
</del><ins>+
+                                //
+                                // hide the restore button when on the last sport/current post data
+                                //
+                                if ( REVAPP._right_diff === REVAPP._revisions.length ){
+                                        $( '.restore-button' ).hide();
+                                } else {
+                                        $( '.restore-button' ).show();
+                                }
+
</ins><span class="cx">                                 return this;
</span><span class="cx">                         },
</span><span class="cx">
</span><span class="lines">@@ -326,31 +504,42 @@
</span><span class="cx">                         //
</span><span class="cx">                         clickcomparetwo : function(){
</span><span class="cx">                                 self = this;
</span><del>-                                if ( $( 'input#comparetwo' ).is( ':checked' ) ) {
</del><ins>+
+                                if ( $( 'input#comparetwo' ).is( ':checked' ) ) { //compare 2 mode
</ins><span class="cx">                                         REVAPP._compareoneortwo = 2 ;
</span><del>-                                        REVAPP.reloadleftright();
-                                } else {
-                                        REVAPP._compareoneortwo = 1 ;
-                                        REVAPP._revisionView.draggingleft = false;
-                                        REVAPP._left_diff = 0;
-                                        REVAPP.reloadmodelsingle();
-                                }
-                                REVAPP._revisionsInteractions.render();
</del><ins>+
+                                        if ( 1 === REVAPP._right_diff )
+                                                REVAPP._right_diff = 2;
+                                                REVAPP._revisionView.draggingleft = false;
+
+                                                wpRevisionsSettings.revision_id = ''; // reset passed revision id so switching back to one handle mode doesn't re-select revision
+                                                REVAPP.reloadleftright();
+                                                REVAPP._revisionView.model = REVAPP._right_handle_revisions;
+
+                                        } else { //compare one mode
+                                                REVAPP._compareoneortwo = 1 ;
+                                                REVAPP._revisionView.draggingleft = false;
+                                                //REVAPP._left_diff = 0;
+                                                //REVAPP._right_diff = (REVAPP._revisions.length <= REVAPP._right_diff ) ? REVAPP._right_diff + 1 : REVAPP._right_diff + 1;
+                                                REVAPP.reloadmodelsingle();
+                                        }
+                                        //REVAPP._revisionView.render();
+                                        REVAPP._revisionsInteractions.render();
+                                        REVAPP._tickmarkView.render();
+
</ins><span class="cx">                         }
</span><span class="cx">                 }),
</span><span class="cx">
</span><span class="cx">                 //
</span><span class="cx">                 //options view for show autosaves and show split view options
</span><span class="cx">                 //
</span><ins>+                /* DISABLED for now
</ins><span class="cx">                 Options : Backbone.View.extend({
</span><span class="cx">                         el : $('#backbonerevisionsoptions')[0],
</span><span class="cx">                         tagName : 'revisionoptionsview',
</span><span class="cx">                         className : 'revisionoptions-container',
</span><span class="cx">                         template : wp.template('revisionoptions'),
</span><span class="cx">
</span><del>-                        initialize : function() {
-                        },
-
</del><span class="cx">                         //render the options view
</span><span class="cx">                         render : function() {
</span><span class="cx">                                 var addhtml = this.template;
</span><span class="lines">@@ -396,7 +585,7 @@
</span><span class="cx">                                 REVAPP.reloadmodel();
</span><span class="cx">                         }
</span><span class="cx">                 }),
</span><del>-
</del><ins>+                */
</ins><span class="cx">                 //
</span><span class="cx">                 //main interactions view
</span><span class="cx">                 //
</span><span class="lines">@@ -405,25 +594,15 @@
</span><span class="cx">                         tagName : 'revisionvinteract',
</span><span class="cx">                         className : 'revisionvinteract-container',
</span><span class="cx">                         template : wp.template('revisionvinteract'),
</span><del>-                        _restoreword : '',
</del><span class="cx">
</span><span class="cx">                         initialize : function() {
</span><del>-                                this._restoreword = $( 'input#restore' ).attr( 'value' );
</del><span class="cx">                         },
</span><span class="cx">
</span><del>-                        reset_restore_button : function() {
-                                $( 'input#restore' ).attr( 'value', this._restoreword + ' ' + REVAPP._revisions.at( REVAPP._right_diff - 1 ).get( 'ID' ) );
-                        },
-
</del><span class="cx">                         render : function() {
</span><span class="cx">                                 var self = this;
</span><span class="cx">
</span><span class="cx">                                 var addhtml = this.template;
</span><span class="cx">                                 this.$el.html( addhtml );
</span><del>-                                $( '#diff_max, #diff_maxof' ).html( this.model.length );
-                                $( '#diff_count' ).html( REVAPP._right_diff );
-                                $( '#diff_left_count_inner' ).html( 0 === REVAPP._left_diff ? '' : 'revision' + REVAPP._left_diff );
-                                self.reset_restore_button();
</del><span class="cx">
</span><span class="cx">                                 var modelcount = REVAPP._revisions.length;
</span><span class="cx">
</span><span class="lines">@@ -431,23 +610,37 @@
</span><span class="cx">                                 if ( 1 === REVAPP._compareoneortwo ) {
</span><span class="cx">                                         //set up the slider with a single handle
</span><span class="cx">                                         slider.slider({
</span><del>-                                                value : REVAPP._right_diff-1,
-                                                min : 0,
-                                                max : modelcount-1,
-                                                step : 1,
</del><ins>+                                                value: REVAPP._right_diff-1,
+                                                min: 0,
+                                                max: modelcount-1,
+                                                step: 1,
</ins><span class="cx">
</span><ins>+
</ins><span class="cx">                                                 //slide interactions for one handles slider
</span><span class="cx">                                                 slide : function( event, ui ) {
</span><del>-                                                        if ( REVAPP._right_model_loading ) //left model stoll loading, prevent sliding left handle
-                                                                                return false;
</del><span class="cx">
</span><del>-                                                        REVAPP._right_diff =( ui.value+1 );
-                                                        $( '#diff_count' ).html( REVAPP._right_diff );
</del><ins>+                                                        REVAPP._right_diff = ( ui.value + 1 );
</ins><span class="cx">                                                         REVAPP._revisionView.render();
</span><del>-                                                        self.reset_restore_button();
-                                                }
</del><ins>+                                                        /*
+                                                        $( 'a.ui-slider-handle' ).tooltip( {
+                                                                content: REVAPP._revisions.at( ui.value ).get( 'revision_date_author_short' ),
+                                                                position: {
+                                                                my: "top-65",
+                                                                using: function( position, feedback ) {
+                                                                        $( this ).css( position );
+                                                                        $( "<div>" )
+                                                                        .addClass( "arrow" )
+                                                                        .addClass( feedback.vertical )
+                                                                        .addClass( feedback.horizontal )
+                                                                        .appendTo( this );
+                                                                        }
+                                                                }
+                                                        });//.trigger( 'close' ).trigger( 'open' );
+*/
+                                                        }
</ins><span class="cx">                                         });
</span><span class="cx">                                         $( '.revisiondiffcontainer' ).removeClass( 'comparetwo' );
</span><ins>+
</ins><span class="cx">                                 } else { //comparing more than one, eg 2
</span><span class="cx">                                         //set up the slider with two handles
</span><span class="cx">                                         slider.slider({
</span><span class="lines">@@ -460,28 +653,33 @@
</span><span class="cx">                                                 //in two handled mode when user starts dragging, swap in precalculated diff for handle
</span><span class="cx">                                                 start : function (event, ui ) {
</span><span class="cx">                                                         var index = $( ui.handle ).index(); //0 (left) or 1 (right)
</span><del>-
</del><span class="cx">                                                         switch ( index ) {
</span><span class="cx">                                                                 case 1: //left handle drag
</span><del>-                                                                        if ( REVAPP._left_model_loading ) //left model stoll loading, prevent sliding left handle
</del><ins>+                                                                        if ( REVAPP._left_model_loading ) //left model still loading, prevent sliding left handle
</ins><span class="cx">                                                                                 return false;
</span><span class="cx">
</span><ins>+                                                                        REVAPP._revisionView.draggingleft = true;
+
</ins><span class="cx">                                                                         if ( REVAPP._revisionView.model !== REVAPP._left_handle_revisions &&
</span><del>-                                                                                        null !== REVAPP._left_handle_revisions )
</del><ins>+                                                                                        null !== REVAPP._left_handle_revisions ) {
</ins><span class="cx">                                                                                 REVAPP._revisionView.model = REVAPP._left_handle_revisions;
</span><ins>+                                                                                REVAPP._tickmarkView.model = REVAPP._left_handle_revisions;
+                                                                                REVAPP._tickmarkView.render();
+                                                                        }
</ins><span class="cx">
</span><del>-                                                                        REVAPP._revisionView.draggingleft = true;
</del><span class="cx">                                                                         REVAPP._left_diff_start = ui.values[ 0 ];
</span><span class="cx">                                                                         break;
</span><span class="cx">
</span><span class="cx">                                                                 case 2: //right
</span><del>-                                                                        if ( REVAPP._right_model_loading ) //right model stoll loading, prevent sliding right handle
</del><ins>+                                                                        if ( REVAPP._right_model_loading || 0 === REVAPP._right_handle_revisions.length) //right model still loading, prevent sliding right handle
</ins><span class="cx">                                                                                 return false;
</span><span class="cx">
</span><del>-                                                                        //one extra spot at left end when comparing two
</del><span class="cx">                                                                         if ( REVAPP._revisionView.model !== REVAPP._right_handle_revisions &&
</span><del>-                                                                                        null !== REVAPP._right_handle_revisions )
</del><ins>+                                                                                        null !== REVAPP._right_handle_revisions ) {
</ins><span class="cx">                                                                                 REVAPP._revisionView.model = REVAPP._right_handle_revisions;
</span><ins>+                                                                                REVAPP._tickmarkView.model = REVAPP._right_handle_revisions;
+                                                                                REVAPP._tickmarkView.render();
+                                                                        }
</ins><span class="cx">
</span><span class="cx">                                                                         REVAPP._revisionView.draggingleft = false;
</span><span class="cx">                                                                         REVAPP._right_diff_start = ui.values[ 1 ];
</span><span class="lines">@@ -501,29 +699,26 @@
</span><span class="cx">                                                                         if ( REVAPP._left_model_loading ) //left model still loading, prevent sliding left handle
</span><span class="cx">                                                                                 return false;
</span><span class="cx">
</span><del>-                                                                        REVAPP._left_diff = ui.values[ 0 ] - 1; //one extra spot at left end when comparing two
</del><ins>+                                                                        REVAPP._left_diff = ui.values[ 0 ];
</ins><span class="cx">                                                                         break;
</span><span class="cx">
</span><span class="cx">                                                                 case 2: //right
</span><span class="cx">                                                                         if ( REVAPP._right_model_loading ) //right model still loading, prevent sliding right handle
</span><span class="cx">                                                                                 return false;
</span><span class="cx">
</span><del>-                                                                        REVAPP._right_diff = ui.values[ 1 ] - 1 ;
</del><ins>+                                                                        REVAPP._right_diff = ui.values[ 1 ];
</ins><span class="cx">                                                                         break;
</span><span class="cx">                                                         }
</span><span class="cx">
</span><del>-                                                        $( '#diff_count' ).html( REVAPP._right_diff );
-
</del><span class="cx">                                                         if ( 0 === REVAPP._left_diff ) {
</span><span class="cx">                                                                 $( '.revisiondiffcontainer' ).addClass( 'currentversion' );
</span><span class="cx">
</span><span class="cx">                                                         } else {
</span><span class="cx">                                                                 $( '.revisiondiffcontainer' ).removeClass( 'currentversion' );
</span><del>-                                                                $( '#diff_left_count_inner' ).html( REVAPP._left_diff );
</del><span class="cx">                                                         }
</span><span class="cx">
</span><del>-                                                        REVAPP._revisionView.render(); //render the diff view
-                                                        self.reset_restore_button();
</del><ins>+                                                        REVAPP._revisionView.render();
+
</ins><span class="cx">                                                 },
</span><span class="cx">
</span><span class="cx">                                                 //when the user stops sliding in 2 handle mode, recalculate diffs
</span><span class="lines">@@ -536,23 +731,26 @@
</span><span class="cx">
</span><span class="cx">                                                                 switch ( index ) {
</span><span class="cx">                                                                         case 1: //left
</span><ins>+
</ins><span class="cx">                                                                                 //left handle dragged & changed, reload right handle model
</span><del>-                                                                                if ( ! ( REVAPP._left_diff_start === ui.values[ 0 ] || REVAPP._left_model_loading ) )
</del><ins>+                                                                                if ( REVAPP._left_diff_start !== ui.values[ 0 ] )
</ins><span class="cx">                                                                                         REVAPP.reloadright();
</span><span class="cx">
</span><span class="cx">                                                                                 break;
</span><span class="cx">
</span><span class="cx">                                                                         case 2: //right
</span><ins>+                                                                                //REVAPP._right_diff = ( 1 >= REVAPP._right_diff ) ? 1 : REVAPP._right_diff-1;
</ins><span class="cx">                                                                                 //right handle dragged & changed, reload left handle model if changed
</span><del>-                                                                                if ( ! ( REVAPP._right_diff_start === ui.values[ 1 ] || REVAPP._right_model_loading ) ) {
</del><ins>+                                                                                if ( REVAPP._right_diff_start !== ui.values[ 1 ] )
</ins><span class="cx">                                                                                         REVAPP.reloadleft();
</span><del>-                                                                                }
</del><ins>+
</ins><span class="cx">                                                                                 break;
</span><span class="cx">                                                                 }
</span><span class="cx">                                                         }
</span><span class="cx">                                                 }
</span><span class="cx">                                         });
</span><span class="cx">                                         $( '.revisiondiffcontainer' ).addClass( 'comparetwo' );
</span><ins>+                                        $( '#diffslider a.ui-slider-handle' ).first().addClass( 'left-handle' ).next().addClass( 'right-handle' );
</ins><span class="cx">                                 }
</span><span class="cx">
</span><span class="cx">                                 return this;
</span><span class="lines">@@ -571,9 +769,7 @@
</span><span class="cx">
</span><span class="cx">                                 REVAPP._revisionView.render();
</span><span class="cx">
</span><del>-                                $( '#diff_count' ).html( REVAPP._right_diff );
</del><span class="cx">                                 $( '#slider' ).slider( 'value', REVAPP._right_diff - 1 ).trigger( 'slide' );
</span><del>-                                this.reset_restore_button();
</del><span class="cx">                         },
</span><span class="cx">
</span><span class="cx">                         //go the the previous revision
</span><span class="lines">@@ -583,16 +779,12 @@
</span><span class="cx">
</span><span class="cx">                                 REVAPP._revisionView.render();
</span><span class="cx">
</span><del>-                                $( '#diff_count' ).html( REVAPP._right_diff );
</del><span class="cx">                                 $( '#slider' ).slider( 'value', REVAPP._right_diff - 1 ).trigger( 'slide' );
</span><del>-                                this.reset_restore_button();
</del><span class="cx">                         }
</span><span class="cx">                 })
</span><span class="cx">         });
</span><span class="cx">
</span><span class="cx">         //instantiate Revision Application
</span><span class="cx">         REVAPP = new wp.revisions.App();
</span><del>-        //TODO consider enable back button to step back thru states?
-        //Backbone.history.start({pushState: true});
</del><span class="cx">
</span><span class="cx"> }(jQuery));
</span></span></pre></div>
<a id="trunkwpadminrevisionphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/revision.php (23768 => 23769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/revision.php        2013-03-21 05:17:25 UTC (rev 23768)
+++ trunk/wp-admin/revision.php        2013-03-21 15:54:11 UTC (rev 23769)
</span><span class="lines">@@ -17,25 +17,21 @@
</span><span class="cx"> case 'restore' :
</span><span class="cx">         if ( ! $revision = wp_get_post_revision( $revision_id ) )
</span><span class="cx">                 break;
</span><ins>+
</ins><span class="cx">         if ( ! current_user_can( 'edit_post', $revision->post_parent ) )
</span><span class="cx">                 break;
</span><ins>+
+
</ins><span class="cx">         if ( ! $post = get_post( $revision->post_parent ) )
</span><span class="cx">                 break;
</span><span class="cx">
</span><del>-        // Revisions disabled and we're not looking at an autosave
-        if ( ( ! WP_POST_REVISIONS || ! post_type_supports( $post->post_type, 'revisions' ) ) && ! wp_is_post_autosave( $revision ) ) {
</del><ins>+        // Revisions disabled (previously checked autosavegs && ! wp_is_post_autosave( $revision ))
+        if ( ( ! WP_POST_REVISIONS || ! post_type_supports( $post->post_type, 'revisions' ) ) ) {
</ins><span class="cx">                 $redirect = 'edit.php?post_type=' . $post->post_type;
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><del>-        check_admin_referer( "restore-post_{$post->ID}|{$revision->ID}" );
</del><span class="cx">
</span><del>-        //store revision event in post meta
-        $restore_details = array(
-                'restored_revision_id' => $revision->ID,
-                'restored_by_user' => get_current_user_id(),
-                'restored_time' => time()
-        );
-        update_post_meta( $post->ID, '_post_restored_from', $restore_details );
</del><ins>+        check_admin_referer( "restore-post_{$revision->ID}" );
</ins><span class="cx">
</span><span class="cx">         wp_restore_post_revision( $revision->ID );
</span><span class="cx">         $redirect = add_query_arg( array( 'message' => 5, 'revision' => $revision->ID ), get_edit_post_link( $post->ID, 'url' ) );
</span><span class="lines">@@ -58,7 +54,6 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         $post_title = '<a href="' . get_edit_post_link() . '">' . get_the_title() . '</a>';
</span><del>-        $revision_title = wp_post_revision_title( $revision, false );
</del><span class="cx">         $h2 = sprintf( __( 'Compare Revisions of &#8220;%1$s&#8221;' ), $post_title );
</span><span class="cx">         $title = __( 'Revisions' );
</span><span class="cx">
</span><span class="lines">@@ -80,41 +75,66 @@
</span><span class="cx">         $parent_file = $submenu_file = 'edit.php?post_type=' . $post->post_type;
</span><span class="cx"> else
</span><span class="cx">         $parent_file = $submenu_file = 'edit.php';
</span><del>-
</del><span class="cx"> wp_enqueue_script( 'revisions' );
</span><span class="cx">
</span><span class="cx"> require_once( './admin-header.php' );
</span><span class="cx">
</span><span class="cx"> //TODO - Some of the translations below split things into multiple strings that are contextually related and this makes it pretty impossible for RTL translation.
</span><span class="cx"> //TODO can we pass the context in a better way
</span><ins>+$wpRevisionsSettings = array( 'post_id' => $post->ID,
+                                                'nonce' => wp_create_nonce( 'revisions-ajax-nonce' ),
+                                                'revision_id' => $revision_id );
+wp_localize_script( 'revisions', 'wpRevisionsSettings', $wpRevisionsSettings );
+
+$comparetworevisionslink = get_edit_post_link( $revision->ID );
</ins><span class="cx"> ?>
</span><del>-<script type="text/javascript">
-var wpRevisionsSettings = <?php echo json_encode( array( 'post_id' => $post->ID, 'nonce' => wp_create_nonce( 'revisions-ajax-nonce' ) ) ); ?>;
-</script>
-<?php
-        $comparetworevisionslink = get_edit_post_link( $revision->ID );
-?>
</del><span class="cx">
</span><del>-<div id="backbonerevisionsoptions"></div>
</del><ins>+<div id="backbonerevisionsoptions">
+</div>
</ins><span class="cx"> <div class="wrap">
</span><del>-        <div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
</del><ins>+        <div class="icon32 icon32-posts-post" id="icon-edit">
+                <br>
+        </div>
</ins><span class="cx">         <div class="revisiondiffcontainer diffsplit currentversion rightmodelloading">
</span><del>-                <div id="modelsloading" class="updated message"><span class="spinner" ></span> <?php _e( 'Calculating revision diffs' ); ?></div>
</del><ins>+                <div id="modelsloading" class="updated message">
+                        <span class="spinner" ></span> <?php _e( 'Calculating revision diffs' ); ?>
+                </div>
</ins><span class="cx">                 <h2 class="long-header"><?php echo $h2; ?></h2>
</span><del>-                <div id="backbonerevisionsinteract"></div>
-                <div id="backbonerevisionsdiff"></div>
</del><ins>+                <div class="diff-slider-ticks-wrapper">
+                        <div id="diff-slider-ticks">
+                        </div>
+                </div>
+                <div id="backbonerevisionsinteract">
+                </div>
+                <div id="backbonerevisionsdiff">
+                </div>
</ins><span class="cx">                 <hr />
</span><span class="cx">         </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <script id="tmpl-revision" type="text/html">
</span><ins>+        <div id="diffsubheader" class="diff-left-hand-meta-row">
+                <div id="diff_from_current_revision">
+                        <?php printf( '<b>%1$s</b> %2$s.' , __( 'From:' ), __( 'the current version' ) ); ?>
+                </div>
+                <div id="difftitlefrom">
+                        <div class="diff-from-title"><?php _e( 'From:' ); ?></div>{{{ data.revision_from_date_author }}}
+                </div>
+        </div>
+
</ins><span class="cx">         <div id="diffsubheader">
</span><del>-                <span id="diff_from_current_revision"><?php _e( 'Current version' ); ?><?php _e( '- compared to -' ); ?></span>
-                <div id="difftitlefrom">{{{ data.revision_from_date_author }}} <?php _e( '- compared to -' ); ?></div>
-                <div id="difftitle">{{{ data.revision_date_author }}}</div>
-                <div id="diffcancel"><input class="button" onClick="document.location='<?php echo get_edit_post_link( $post->ID ); ?>'" type="submit" id="cancel" value="<?php esc_attr_e( 'Cancel' )?>" /></div>
-                <div id="diffrestore"><input class="button button-primary" onClick="document.location='{{{ data.restoreaction }}}'" type="submit" id="restore" value="<?php esc_attr_e( 'Restore revision ID' )?>" /></div>
-                <div id="comparetworevisions"><input type="checkbox" id="comparetwo" value="comparetwo" {{{ data.comparetwochecked }}} name="comparetwo"/> <label for="comparetwo"><?php esc_attr_e( 'Compare two revisions' ); ?></a></div>         </div>
</del><ins>+                <div id="difftitle">
+                        <div class="diff-to-title"><?php _e( 'To:' ); ?></div>{{{ data.revision_date_author }}}
+                </div>
+                <div id="diffrestore">
+                        <input class="button button-primary restore-button" onClick="document.location='{{{ data.restoreaction }}}'" type="submit" id="restore" value="<?php esc_attr_e( 'Restore This Revision' )?>" />
+                </div>
+                <div id="comparetworevisions">
+                        <input type="checkbox" id="comparetwo" value="comparetwo" {{{ data.comparetwochecked }}} name="comparetwo"/>
+                                <label for="comparetwo"><?php esc_attr_e( 'Compare two revisions' ); ?></a></label>
+                </div>
+        </div>
+
</ins><span class="cx">         <div id="removedandadded">
</span><span class="cx">                 <div id="removed"><?php _e( 'Removed -' ); ?></div>
</span><span class="cx">                 <div id="added"><?php _e( 'Added +' ); ?></div>
</span><span class="lines">@@ -124,24 +144,20 @@
</span><span class="cx">
</span><span class="cx"> <script id="tmpl-revisionvinteract" type="text/html">
</span><span class="cx">         <div id="diffheader">
</span><del>-<div id="diffprevious"><input class="button" type="submit" id="previous" value="<?php esc_attr_e( 'Previous' ); ?>" /></div>
-                        <div id="diffnext"><input class="button" type="submit" id="next" value="<?php esc_attr_e( 'Next' ); ?>" /></div>
-                        <div id="diffslider">
-        <div id="revisioncount">
-                                        <?php _e( 'Comparing' ); ?>
-                                        <span id="diff_left_count"> <?php _e( 'revision' ); ?></span> <span id="diff_left_count_inner"></span>
-                                        <span id="diff_left_current_revision"><?php _e( 'current version' ); ?></span>
-                                        <span id="diff_revision_from">{{{ data.diff_revision_from }}}</span>
-                                        <?php _e( ' to revision' ); ?>
-                                        <span id="diff_count">{{{ data.current_diff }}}</span>
-                                        <?php _e( ' of ' ); ?>
-                                        <span id="diff_max" ></span>
-                                </div>
-
-                        <div id="slider" class="wp-slider"></div>
</del><ins>+                <div id="diffprevious"><input class="button" type="submit" id="previous" value="<?php esc_attr_e( 'Previous' ); ?>" />
</ins><span class="cx">                 </div>
</span><ins>+                <div id="diffnext"><input class="button" type="submit" id="next" value="<?php esc_attr_e( 'Next' ); ?>" />
+                </div>
+                <div id="diffslider">
+                        <div id="slider" class="wp-slider">
+                        </div>
+                </div>
</ins><span class="cx">         </div>
</span><span class="cx"> </script>
</span><ins>+<script id="tmpl-revision-ticks" type="text/html">
+        <div class="revision-tick revision-toload{{{ data.revision_toload }}} revision-scopeofchanges-{{{ data.scope_of_changes }}}">
+        </div>
+</script>
</ins><span class="cx"> <?php
</span><span class="cx"> /*
</span><span class="cx"> TODO Convert these into screen options
</span></span></pre></div>
<a id="trunkwpincludespluggablephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/pluggable.php (23768 => 23769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/pluggable.php        2013-03-21 05:17:25 UTC (rev 23768)
+++ trunk/wp-includes/pluggable.php        2013-03-21 15:54:11 UTC (rev 23769)
</span><span class="lines">@@ -1744,3 +1744,69 @@
</span><span class="cx">         return $r;
</span><span class="cx"> }
</span><span class="cx"> endif;
</span><ins>+
+if ( !function_exists( 'wp_text_diff_with_count' ) ) :
+/**
+ * Displays a human readable HTML representation of the difference between two strings.
+ * similar to wp_text_diff, but tracks and returns could of lines added and removed
+ *
+ * @since 3.6
+ * @see wp_parse_args() Used to change defaults to user defined settings.
+ * @uses Text_Diff
+ * @uses WP_Text_Diff_Renderer_Table
+ *
+ * @param string $left_string "old" (left) version of string
+ * @param string $right_string "new" (right) version of string
+ * @param string|array $args Optional. Change 'title', 'title_left', and 'title_right' defaults.
+ * @return array contains html, linesadded & linesdeletd, empty string if strings are equivalent.
+ */
+function wp_text_diff_with_count( $left_string, $right_string, $args = null ) {
+        $defaults = array( 'title' => '', 'title_left' => '', 'title_right' => '' );
+        $args = wp_parse_args( $args, $defaults );
+
+        if ( !class_exists( 'WP_Text_Diff_Renderer_Table' ) )
+                        require( ABSPATH . WPINC . '/wp-diff.php' );
+
+        $left_string = normalize_whitespace( $left_string );
+        $right_string = normalize_whitespace( $right_string );
+
+        $left_lines = explode( "\n", $left_string );
+        $right_lines = explode( "\n", $right_string) ;
+
+        $text_diff = new Text_Diff($left_lines, $right_lines );
+        $linesadded = $text_diff->countAddedLines();
+        $linesdeleted = $text_diff->countDeletedLines();
+
+        $renderer = new WP_Text_Diff_Renderer_Table();
+        $diff = $renderer->render( $text_diff );
+
+        if ( !$diff )
+                        return '';
+
+                $r = "<table class='diff'>\n";
+
+        if ( ! empty( $args[ 'show_split_view' ] ) ) {
+                $r .= "<col class='content diffsplit left' /><col class='content diffsplit middle' /><col class='content diffsplit right' />";
+        } else {
+                $r .= "<col class='content' />";
+        }
+
+        if ( $args['title'] || $args['title_left'] || $args['title_right'] )
+                $r .= "<thead>";
+        if ( $args['title'] )
+                $r .= "<tr class='diff-title'><th colspan='4'>$args[title]</th></tr>\n";
+        if ( $args['title_left'] || $args['title_right'] ) {
+                $r .= "<tr class='diff-sub-title'>\n";
+                $r .= "\t<td></td><th>$args[title_left]</th>\n";
+                $r .= "\t<td></td><th>$args[title_right]</th>\n";
+                $r .= "</tr>\n";
+        }
+        if ( $args['title'] || $args['title_left'] || $args['title_right'] )
+                $r .= "</thead>\n";
+
+        $r .= "<tbody>\n$diff\n</tbody>\n";
+        $r .= "</table>";
+
+        return array( 'html' => $r, 'linesadded' => $linesadded, 'linesdeleted' => $linesdeleted );
+        }
+        endif;
</ins></span></pre></div>
<a id="trunkwpincludesposttemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/post-template.php (23768 => 23769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/post-template.php        2013-03-21 05:17:25 UTC (rev 23768)
+++ trunk/wp-includes/post-template.php        2013-03-21 15:54:11 UTC (rev 23769)
</span><span class="lines">@@ -1306,11 +1306,50 @@
</span><span class="cx">         if ( !in_array( $revision->post_type, array( 'post', 'page', 'revision' ) ) )
</span><span class="cx">                 return false;
</span><span class="cx">
</span><ins>+        /* translators: revision date format, see http://php.net/date */
+        $datef = _x( 'j F, Y @ G:i', 'revision date format');
+        /* translators: 1: date */
+        $autosavef = __( '%1$s [Autosave]' );
+        /* translators: 1: date */
+        $currentf = __( '%1$s [Current Revision]' );
+
+        $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
+        if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) )
+                $date = "<a href='$link'>$date</a>";
+
+        if ( !wp_is_post_revision( $revision ) )
+                $date = sprintf( $currentf, $date );
+        elseif ( wp_is_post_autosave( $revision ) )
+                $date = sprintf( $autosavef, $date );
+
+        return $date;
+}
+
+/**
+ * Retrieve formatted date timestamp of a revision (linked to that revisions's page).
+ *
+ * @package WordPress
+ * @subpackage Post_Revisions
+ * @since 3.6.0
+ *
+ * @uses date_i18n()
+ *
+ * @param int|object $revision Revision ID or revision object.
+ * @param bool $link Optional, default is true. Link to revisions's page?
+ * @return string gravatar, user, i18n formatted datetimestamp or localized 'Current Revision'.
+ */
+function wp_post_revision_title_expanded( $revision, $link = true ) {
+        if ( !$revision = get_post( $revision ) )
+                return $revision;
+
+        if ( !in_array( $revision->post_type, array( 'post', 'page', 'revision' ) ) )
+                return false;
+
</ins><span class="cx">         $author = get_the_author_meta( 'display_name', $revision->post_author );
</span><span class="cx">         /* translators: revision date format, see http://php.net/date */
</span><span class="cx">         $datef = _x( 'j F, Y @ G:i:s', 'revision date format');
</span><span class="cx">
</span><del>-        $gravatar = get_avatar( $revision->post_author, 18 );
</del><ins>+        $gravatar = get_avatar( $revision->post_author, 24 );
</ins><span class="cx">
</span><span class="cx">         $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
</span><span class="cx">         if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) )
</span><span class="lines">@@ -1388,11 +1427,18 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         /* translators: post revision: 1: when, 2: author name */
</span><del>-        $titlef = _x( '%1$s by %2$s', 'post revision' );
</del><ins>+        $titlef = _x( '%1$s', 'post revision' );
</ins><span class="cx">
</span><span class="cx">         if ( $parent )
</span><span class="cx">                 array_unshift( $revisions, $post );
</span><span class="cx">
</span><ins>+        // since 3.6 revisions include a copy of the current post data as a revision
+        // the collowing removes this current revision if present from the list of
+        // revisions returned by wp_list_post_revisions, remove these to include the
+        // crrent post revision in the list of revisions
+        if ( wp_first_revision_matches_current_version( $post_id ) )
+                array_pop( $revisions );
+
</ins><span class="cx">         $rows = $right_checked = '';
</span><span class="cx">         $class = false;
</span><span class="cx">         $can_edit_post = current_user_can( 'edit_post', $post->ID );
</span><span class="lines">@@ -1402,34 +1448,11 @@
</span><span class="cx">                 if ( 'revision' === $type && wp_is_post_autosave( $revision ) )
</span><span class="cx">                         continue;
</span><span class="cx">
</span><del>-                $date = wp_post_revision_title( $revision );
-                $name = get_the_author_meta( 'display_name', $revision->post_author );
</del><ins>+                $date = wp_post_revision_title_expanded( $revision );
</ins><span class="cx">
</span><del>-                if ( 'form-table' == $format ) {
-                        if ( $left )
-                                $left_checked = $left == $revision->ID ? ' checked="checked"' : '';
-                        else
-                                $left_checked = $right_checked ? ' checked="checked"' : ''; // [sic] (the next one)
-                        $right_checked = $right == $revision->ID ? ' checked="checked"' : '';
</del><ins>+                $title = sprintf( $titlef, $date );
+                $rows .= "\t<li>$title</li>\n";
</ins><span class="cx">
</span><del>-                        $class = $class ? '' : " class='alternate'";
-
-                        if ( $post->ID != $revision->ID && $can_edit_post )
-                                $actions = '<a href="' . wp_nonce_url( add_query_arg( array( 'revision' => $revision->ID, 'action' => 'restore' ) ), "restore-post_$post->ID|$revision->ID" ) . '">' . __( 'Restore' ) . '</a>';
-                        else
-                                $actions = '';
-
-                        $rows .= "<tr$class>\n";
-                        $rows .= "\t<th style='white-space: nowrap' scope='row'><input type='radio' name='left' value='$revision->ID'$left_checked /></th>\n";
-                        $rows .= "\t<th style='white-space: nowrap' scope='row'><input type='radio' name='right' value='$revision->ID'$right_checked /></th>\n";
-                        $rows .= "\t<td>$date</td>\n";
-                        $rows .= "\t<td>$name</td>\n";
-                        $rows .= "\t<td class='action-links'>$actions</td>\n";
-                        $rows .= "</tr>\n";
-                } else {
-                        $title = sprintf( $titlef, $date, $name );
-                        $rows .= "\t<li>$title</li>\n";
-                }
</del><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if ( 'form-table' == $format ) : ?>
</span><span class="lines">@@ -1479,27 +1502,27 @@
</span><span class="cx">                 // if the post was previously restored from a revision
</span><span class="cx">                 // show the restore event details
</span><span class="cx">                 //
</span><del>-                if ( $restored_from_meta = get_post_meta( $post->ID, '_post_restored_from', true ) ) {
-                        $author = get_the_author_meta( 'display_name', $restored_from_meta[ 'restored_by_user' ] );
-                        /* translators: revision date format, see http://php.net/date */
-                        $datef = _x( 'j F, Y @ G:i:s', 'revision date format');
-                        $date = date_i18n( $datef, strtotime( $restored_from_meta[ 'restored_time' ] ) );
-                        $timesince = human_time_diff( $restored_from_meta[ 'restored_time' ], current_time( 'timestamp' ) );
-                        ?>
</del><ins>+                if ( $restored_from_meta = get_post_meta( $post->ID, '_post_restored_from', true ) ) {
+                        $author = get_the_author_meta( 'display_name', $restored_from_meta[ 'restored_by_user' ] );
+                        /* translators: revision date format, see http://php.net/date */
+                        $datef = _x( 'j F, Y @ G:i:s', 'revision date format');
+                        $date = date_i18n( $datef, strtotime( $restored_from_meta[ 'restored_time' ] ) );
+                        $timesince = human_time_diff( $restored_from_meta[ 'restored_time' ], current_time( 'timestamp' ) ) ;
+                        ?>
</ins><span class="cx">                         <hr />
</span><del>-                        <div id="revisions-meta-restored">
-                                <?php
</del><ins>+                        <div id="revisions-meta-restored">
+                                <?php
</ins><span class="cx">                                 /* translators: restored revision details: 1: revision ID, 2: time ago, 3: author name, 4: date */
</span><del>-                                printf( _x( 'Previously restored from revision ID %1$d, %2$s ago by %3$s (%4$s)', 'restored revision details' ),
-                                $restored_from_meta[ 'restored_revision_id'],
-                                $timesince,
-                                $author,
-                                $date );
-                                ?>
-                        </div>
-                        <?php
</del><ins>+                                printf( _x( 'Previously restored from revision ID %1$d, %2$s ago by %3$s (%4$s)', 'restored revision details' ),
+                                $restored_from_meta[ 'restored_revision_id'],
+                                $timesince,
+                                $author,
+                                $date );
+                                ?>
+                        </div>
+                        <?php
</ins><span class="cx">                 echo "</ul>";
</span><del>-                }
</del><ins>+                }
</ins><span class="cx">
</span><span class="cx">         endif;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpincludesrevisionphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/revision.php (23768 => 23769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/revision.php        2013-03-21 05:17:25 UTC (rev 23768)
+++ trunk/wp-includes/revision.php        2013-03-21 15:54:11 UTC (rev 23769)
</span><span class="lines">@@ -404,3 +404,29 @@
</span><span class="cx">                 add_filter('the_preview', '_set_preview');
</span><span class="cx">         }
</span><span class="cx"> }
</span><ins>+
+/**
+ * Determines if the specified post's most recent revision matches the post (by checking post_modified).
+ *
+ * @package WordPress
+ * @subpackage Post_Revisions
+ * @since 3.6.0
+ *
+ * @param int|object $post Post ID or post object.
+ * @return bool false if not a match, otherwise true.
+ */
+function wp_first_revision_matches_current_version( $post ) {
+
+ if ( ! $post = get_post( $post ) )
+ return false;
+
+ if ( ! $revisions = wp_get_post_revisions( $post->ID ) )
+ return false;
+
+ $last_revision = array_shift( $revisions );
+
+ if ( ! ($last_revision->post_modified == $post->post_modified ) )
+ return false;
+
+ return true;
+}
</ins></span></pre></div>
<a id="trunkwpincludesscriptloaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/script-loader.php (23768 => 23769)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/script-loader.php        2013-03-21 05:17:25 UTC (rev 23768)
+++ trunk/wp-includes/script-loader.php        2013-03-21 15:54:11 UTC (rev 23769)
</span><span class="lines">@@ -273,7 +273,7 @@
</span><span class="cx">         $scripts->add( 'template', "/wp-includes/js/template$suffix.js", array('underscore'), '1.4.4', 1 );
</span><span class="cx">         $scripts->add( 'backbone', '/wp-includes/js/backbone.min.js', array('underscore','jquery', 'template'), '0.9.10', 1 );
</span><span class="cx">
</span><del>-        $scripts->add( 'revisions', "/wp-admin/js/revisions$suffix.js", array( 'backbone', 'jquery-ui-slider' ), false, 1 );
</del><ins>+        $scripts->add( 'revisions', "/wp-admin/js/revisions$suffix.js", array( 'backbone', 'jquery-ui-slider', 'jquery-ui-tooltip' ), false, 1 );
</ins><span class="cx">
</span><span class="cx">         $scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), '0.9.8', 1 );
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>