TinyMCE, inline link: Make styles for the autocomplete results available on front end.

Also, replace the generic `.alignright` class with a more specific class to avoid styling issues with themes which have padding/margin attached to `.alignright`.

Props azaozz, imath.
Fixes #36461.

git-svn-id: https://develop.svn.wordpress.org/trunk@37174 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2016-04-11 15:11:32 +00:00
parent c5f5a505be
commit 303ecbe36a
2 changed files with 22 additions and 2 deletions

View File

@ -1783,11 +1783,31 @@ div.wp-link-input input {
z-index: 100110;
max-height: 200px;
overflow-y: auto;
padding: 0;
margin: 0;
list-style: none;
position: absolute;
border: 1px solid #5b9dd9;
-webkit-box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
box-shadow: 0 1px 2px rgba( 30, 140, 190, 0.8 );
background-color: #fff;
}
.wplink-autocomplete li {
.ui-autocomplete.wplink-autocomplete li {
margin-bottom: 0;
padding: 4px 10px;
clear: both;
white-space: normal;
text-align: left;
}
.ui-autocomplete.wplink-autocomplete li .wp-editor-float-right {
float: right;
}
.ui-autocomplete.wplink-autocomplete li.ui-state-focus {
background-color: #ddd;
cursor: pointer;
}
@media screen and ( max-width: 782px ) {

View File

@ -420,7 +420,7 @@
}
} ).autocomplete( 'instance' )._renderItem = function( ul, item ) {
return $( '<li role="option" id="mce-wp-autocomplete-' + item.ID + '">' )
.append( '<span>' + item.title + '</span>&nbsp;<span class="alignright">' + item.info + '</span>' )
.append( '<span>' + item.title + '</span>&nbsp;<span class="wp-editor-float-right">' + item.info + '</span>' )
.appendTo( ul );
};