Changeset 32937
- Timestamp:
- 06/25/2015 04:41:34 AM (10 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/css/editor.css
r32931 r32937 175 175 -ms-user-select: none; 176 176 user-select: none; 177 max-width: 98%; 177 178 z-index: 100100; /* Same as the other TinyMCE "panels" */ 178 179 } … … 1603 1604 float: left; 1604 1605 margin: 5px; 1606 max-width: 694px; 1607 overflow: hidden; 1608 text-overflow: ellipsis; 1605 1609 } 1606 1610 … … 1617 1621 } 1618 1622 1623 @media screen and ( max-width: 782px ) { 1624 .wp-link-preview { 1625 max-width: 70%; 1626 max-width: -webkit-calc(100% - 88px); 1627 max-width: calc(100% - 88px); 1628 } 1629 } 1630 1619 1631 /* =Overlay Body 1620 1632 -------------------------------------------------------------- */ -
trunk/src/wp-includes/js/tinymce/plugins/wplink/plugin.js
r32931 r32937 81 81 url = url.replace( /(?:index)?\.html$/, '' ); 82 82 83 if ( ( lastIndex = url.lastIndexOf( '/' ) ) === url.length - 1) {84 url = url.slice( 0, lastIndex);83 if ( url.charAt( url.length - 1 ) === '/' ) { 84 url = url.slice( 0, -1 ); 85 85 } 86 86 87 if ( ( index = url.indexOf( '/' ) ) !== -1 && ( lastIndex = url.lastIndexOf( '/' ) ) !== -1 && lastIndex !== index ) { 88 url = url.slice( 0, index + 1 ) + '\u2026' + url.slice( lastIndex, url.length ); 87 // If the URL is longer that 40 chars, concatenate the beginning (after the domain) and ending with ... 88 if ( url.length > 40 && ( index = url.indexOf( '/' ) ) !== -1 && ( lastIndex = url.lastIndexOf( '/' ) ) !== -1 && lastIndex !== index ) { 89 // If the beginning + ending are shorter that 40 chars, show more of the ending 90 if ( index + url.length - lastIndex < 40 ) { 91 lastIndex = -( 40 - ( index + 1 ) ); 92 } 93 94 url = url.slice( 0, index + 1 ) + '\u2026' + url.slice( lastIndex ); 89 95 } 90 96 … … 97 103 editor.on( 'wptoolbar', function( event ) { 98 104 var anchor = editor.dom.getParent( event.element, 'a' ), 105 $ = editor.$, 99 106 href; 100 107 101 if ( anchor && ( href = editor.$( anchor ).attr( 'href' ) ) ) { 108 if ( anchor && ! $( anchor ).find( 'img' ).length && 109 ( href = $( anchor ).attr( 'href' ) ) ) { 110 102 111 self.setURL( href ); 103 104 112 event.element = anchor; 105 113 event.toolbar = toolbar;
Note: See TracChangeset
for help on using the changeset viewer.