Revisions UI update:

* Style status loading as a regular update message like on the other screens
 * Move compare two checkbox to diff header to avoid an overlap on long post titles
 * Restore color shades for the scope of changes visualisation 
 * Show tooltips while moving the slider handle
 * Diff header styling
 * Move color declarations to classic/fresh stylesheets
 * Sync admin color stylesheets

props jrbeilke for initial patch. see #23935.

git-svn-id: http://core.svn.wordpress.org/trunk@24119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling
2013-04-28 10:56:57 +00:00
parent d1966150dc
commit 45ccae1092
5 changed files with 145 additions and 87 deletions

View File

@@ -397,28 +397,7 @@ window.wp = window.wp || {};
},
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;
}
} );
handle.find( '.ui-slider-tooltip' ).html( message );
},
width: function() {
@@ -426,12 +405,16 @@ window.wp = window.wp || {};
},
setWidth: function( width ) {
return $( '#diff-slider' ).width( width );
$( '#diff-slider' ).width( width );
},
refresh: function( options, slide ) {
$( '#diff-slider' ).slider( 'option', options );
// reset all of the slider tooltips during a refresh, but not on prev/next button actions
if ( ! slide )
$( 'a.ui-slider-handle' ).html( '<span class="ui-slider-tooltip ui-widget-content ui-corner-all"></span>' );
// Triggers the slide event
if ( slide )
$( '#diff-slider' ).trigger( 'slide' );