Revisions: Pinned controls, layout tweaks, copy tweaks, misc.
* When you scroll down the diff view, the controls will pin to the top. * The revisions meta view was cleaned up. Copy changes. * Loading indicator in the center of the screen (so it follows as you scroll). * Tooltips "flip" when you cross the center line, so that they don't hit the container edge and wrap for later revisions. * The "Restore" button's inactive state is handled on render, instead of after. * Make sure we always have a current revision, even if the timestamp doesn't work out on the most recent one. See #24804. Props markjaquith, nacin, ocean90, aaroncampbell. git-svn-id: http://core.svn.wordpress.org/trunk@24761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -164,7 +164,7 @@ textarea.disabled {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#diff-header,
|
||||
.revisions-meta,
|
||||
.widget .widget-top,
|
||||
.postbox h3,
|
||||
.stuffbox h3,
|
||||
@@ -1481,24 +1481,32 @@ table.diff .diff-addedline ins {
|
||||
background-color: #afa;
|
||||
}
|
||||
|
||||
#diff-header {
|
||||
.revisions-meta {
|
||||
border: 1px solid #d1e5ee;
|
||||
}
|
||||
|
||||
.revisions-controls {
|
||||
background: #fff;
|
||||
background: -webkit-gradient(linear, left bottom, left top, color-stop(0%,rgba(255,255,255,1)), color-stop(30px,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,1)));
|
||||
background: -webkit-linear-gradient(bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 30px, rgba(255,255,255,1) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 30px, rgba(255,255,255,1) 100%);
|
||||
background: -o-linear-gradient(bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 30px, rgba(255,255,255,1) 100%);
|
||||
background: linear-gradient(to top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 30px, rgba(255,255,255,1) 100%);
|
||||
}
|
||||
|
||||
.revisions-tooltip,
|
||||
.revisions-tooltip-arrow span {
|
||||
border-color: #d1e5ee;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#diff-title-to strong {
|
||||
color: #08a;
|
||||
.revisions-tickmarks > div {
|
||||
border-color: #d1e5ee;
|
||||
}
|
||||
|
||||
/* jQuery UI Slider */
|
||||
.wp-slider.ui-slider {
|
||||
border-color: #d1e5ee;
|
||||
background: #eff8ff;
|
||||
}
|
||||
|
||||
.wp-slider .ui-slider-handle {
|
||||
@@ -1507,7 +1515,6 @@ table.diff .diff-addedline ins {
|
||||
}
|
||||
|
||||
.wp-slider .ui-slider-handle {
|
||||
border-color: #ccc;
|
||||
border-color: #d0dfe9;
|
||||
background: #eff8ff;
|
||||
background-image: -webkit-gradient(linear, left bottom, left top, from(#eff8ff), to(#fff));
|
||||
|
||||
@@ -164,7 +164,7 @@ textarea.disabled {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#diff-header,
|
||||
.revisions-meta,
|
||||
.widget .widget-top,
|
||||
.postbox h3,
|
||||
.stuffbox h3,
|
||||
@@ -1375,10 +1375,19 @@ table.diff .diff-addedline ins {
|
||||
background-color: #afa;
|
||||
}
|
||||
|
||||
#diff-header {
|
||||
.revisions-meta {
|
||||
border: 1px solid #dfdfdf;
|
||||
}
|
||||
|
||||
.revisions-controls {
|
||||
background: #fff;
|
||||
background: -webkit-gradient(linear, left bottom, left top, color-stop(0%,rgba(255,255,255,1)), color-stop(30px,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,1)));
|
||||
background: -webkit-linear-gradient(bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 30px, rgba(255,255,255,1) 100%);
|
||||
background: -moz-linear-gradient(bottom, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 30px, rgba(255,255,255,1) 100%);
|
||||
background: -o-linear-gradient(bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 30px, rgba(255,255,255,1) 100%);
|
||||
background: linear-gradient(to top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 30px, rgba(255,255,255,1) 100%);
|
||||
}
|
||||
|
||||
.revisions-tooltip,
|
||||
.revisions-tooltip-arrow span {
|
||||
border-color: #d7d7d7;
|
||||
@@ -1389,14 +1398,9 @@ table.diff .diff-addedline ins {
|
||||
border-color: #aaa;
|
||||
}
|
||||
|
||||
#diff-title-to strong {
|
||||
color: #08a;
|
||||
}
|
||||
|
||||
/* jQuery UI Slider */
|
||||
.wp-slider.ui-slider {
|
||||
border-color: #d7d7d7;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.wp-slider .ui-slider-handle {
|
||||
|
||||
@@ -976,6 +976,14 @@ th.sorted a span {
|
||||
padding: 9px 0 0 9px;
|
||||
}
|
||||
|
||||
.revisions .loading-indicator {
|
||||
margin-right: -90px;
|
||||
}
|
||||
|
||||
body.folded .revisions .loading-indicator {
|
||||
margin-right: -32px;
|
||||
}
|
||||
|
||||
.revisions-next {
|
||||
float: left;
|
||||
}
|
||||
@@ -984,10 +992,6 @@ th.sorted a span {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#diff-header {
|
||||
padding: 5px 5px 5px 200px;
|
||||
}
|
||||
|
||||
.diff-title {
|
||||
float: right;
|
||||
}
|
||||
@@ -1004,7 +1008,7 @@ th.sorted a span {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.diff-header > input.restore-revision {
|
||||
.diff-meta > input.restore-revision {
|
||||
margin-left: 0;
|
||||
margin-right: 10px;
|
||||
}
|
||||
@@ -1027,11 +1031,11 @@ th.sorted a span {
|
||||
.revisions-tooltip {
|
||||
margin-left: 0;
|
||||
margin-right: -70px;
|
||||
-webkit-transition: right 15ms;
|
||||
-moz-transition: right 15ms;
|
||||
-ms-transition: right 15ms;
|
||||
-o-transition: right 15ms;
|
||||
transition: right 15ms;
|
||||
}
|
||||
|
||||
.revisions-tooltip.flipped {
|
||||
margin-right: 0;
|
||||
margin-left: -70px;
|
||||
}
|
||||
|
||||
.ie8 .revisions-tooltip {
|
||||
@@ -1044,10 +1048,22 @@ th.sorted a span {
|
||||
margin-right: 35px;
|
||||
}
|
||||
|
||||
.revisions-tooltip.flipped .revisions-tooltip-arrow {
|
||||
margin-right: 0;
|
||||
margin-left: 35px;
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.revisions-tooltip-arrow > span {
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.revisions-tooltip.flipped .revisions-tooltip-arrow > span {
|
||||
right: auto;
|
||||
left: 20px;
|
||||
}
|
||||
|
||||
.revisions-tooltip img {
|
||||
float: right;
|
||||
margin: 2px 0 0 5px;
|
||||
|
||||
@@ -3519,6 +3519,7 @@ td.plugin-title p {
|
||||
.revisions-controls {
|
||||
padding-top: 40px;
|
||||
height: 100px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.revisions-controls input[type="checkbox"] {
|
||||
@@ -3527,6 +3528,12 @@ td.plugin-title p {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.revisions.pinned .revisions-controls {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.revisions-tickmarks {
|
||||
position: relative;
|
||||
margin: 0 auto;
|
||||
@@ -3571,11 +3578,12 @@ td.plugin-title p {
|
||||
}
|
||||
|
||||
.revisions .loading-indicator {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
vertical-align: middle;
|
||||
opacity: 0;
|
||||
width: 100%;
|
||||
top: 3em;
|
||||
top: 50%;
|
||||
margin-left: -90px;
|
||||
-webkit-transition: opacity 0.5s;
|
||||
-moz-transition: opacity 0.5s;
|
||||
-ms-transition: opacity 0.5s;
|
||||
@@ -3584,6 +3592,10 @@ td.plugin-title p {
|
||||
filter: alpha(opacity=0); /* ie8 and earlier */
|
||||
}
|
||||
|
||||
body.folded .revisions .loading-indicator {
|
||||
margin-left: -32px;
|
||||
}
|
||||
|
||||
.revisions .loading-indicator span.spinner {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
@@ -3623,10 +3635,22 @@ td.plugin-title p {
|
||||
}
|
||||
|
||||
.comparing-two-revisions .revisions-previous,
|
||||
.comparing-two-revisions .revisions-next {
|
||||
.comparing-two-revisions .revisions-next,
|
||||
.revisions-meta .diff-meta-to strong {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.revisions-controls .author-card .date {
|
||||
color: #777;
|
||||
}
|
||||
.revisions-controls .author-card .author-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.comparing-two-revisions .diff-meta-to strong {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.revisions-previous,
|
||||
.revisions-next {
|
||||
position: relative;
|
||||
@@ -3689,49 +3713,50 @@ table.diff .diff-addedline ins {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#diff-title-to strong {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#diff-header {
|
||||
.diff-meta {
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
padding: 5px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.diff-header {
|
||||
min-height: 35px;
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.diff-title {
|
||||
float: left;
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
.diff-title strong {
|
||||
font-size: 14px;
|
||||
width: 60px;
|
||||
line-height: 32px;
|
||||
min-width: 60px;
|
||||
text-align: right;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.diff-title img {
|
||||
.revisions-controls .author-card .avatar,
|
||||
.revisions-controls .author-card .author-info {
|
||||
float: left;
|
||||
margin-left: 6px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.revisions-controls .author-card .byline {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.revisions-controls .author-card .avatar {
|
||||
vertical-align: middle;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.diff-header > input.restore-revision {
|
||||
margin-left: 10px;
|
||||
.diff-meta input.restore-revision {
|
||||
float: right;
|
||||
margin-left: 6px;
|
||||
margin-right: 6px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
#diff-header-from {
|
||||
.diff-meta-from {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.comparing-two-revisions #diff-title-from,
|
||||
.comparing-two-revisions #diff-header-from {
|
||||
.comparing-two-revisions .diff-meta-from {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -3740,31 +3765,27 @@ table.diff .diff-addedline ins {
|
||||
bottom: 105px;
|
||||
margin-right: 0;
|
||||
margin-left: -70px;
|
||||
line-height: 28px;
|
||||
z-index: 1;
|
||||
max-width: 350px;
|
||||
min-width: 130px;
|
||||
padding: 4px;
|
||||
padding: 8px 4px;
|
||||
display: none;
|
||||
opacity: 0;
|
||||
-webkit-transition: left 15ms;
|
||||
-moz-transition: left 15ms;
|
||||
-ms-transition: left 15ms;
|
||||
-o-transition: left 15ms;
|
||||
transition: left 15ms;
|
||||
}
|
||||
|
||||
.revisions-tooltip.flipped {
|
||||
margin-left: 0;
|
||||
margin-right: -70px;
|
||||
}
|
||||
|
||||
.revisions.pinned .revisions-tooltip {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.comparing-two-revisions .revisions-tooltip {
|
||||
bottom: 145px;
|
||||
}
|
||||
|
||||
.revisions-tooltip img {
|
||||
float: left;
|
||||
margin: 2px 5px 0 0;
|
||||
padding: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.revisions-tooltip-arrow {
|
||||
width: 70px;
|
||||
height: 15px;
|
||||
@@ -3776,6 +3797,13 @@ table.diff .diff-addedline ins {
|
||||
z-index: 10000;
|
||||
}
|
||||
|
||||
.revisions-tooltip.flipped .revisions-tooltip-arrow {
|
||||
margin-left: 0;
|
||||
margin-right: 35px;
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.revisions-tooltip-arrow > span {
|
||||
content: "";
|
||||
position: absolute;
|
||||
@@ -3790,10 +3818,15 @@ table.diff .diff-addedline ins {
|
||||
tranform: rotate(45deg);
|
||||
}
|
||||
|
||||
.revisions-tooltip.flipped .revisions-tooltip-arrow > span {
|
||||
left: auto;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.ie8 .revisions-tooltip-arrow > span {
|
||||
left: 14px;
|
||||
top: -25px;
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"; /* IE8 */
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)";
|
||||
}
|
||||
|
||||
.revisions-tooltip,
|
||||
|
||||
Reference in New Issue
Block a user