Ticket #24011: 24011.12.diff
| File 24011.12.diff, 2.4 KB (added by , 13 years ago) |
|---|
-
wp-admin/js/post-formats.js
13 13 lastHeight = 360, 14 14 initialFormat = 'standard', 15 15 shortClass = 'short-format', 16 noTitleFormats = ['status' ],16 noTitleFormats = ['status', 'aside'], 17 17 noMediaFormats = ['status', 'aside', 'image', 'audio', 'video'], 18 18 shortContentFormats = ['status', 'aside'], 19 19 noUIFormats = ['standard', 'chat', 'status', 'aside', 'gallery']; … … 135 135 formatTo = -1 < $.inArray( format, noTitleFormats ); 136 136 formatFrom = -1 < $.inArray( postFormats.currentPostFormat, noTitleFormats ); 137 137 if ( formatFrom ? !formatTo : formatTo ) { // XOR 138 $( '#titlewrap' ).fadeToggle( 200 ); 138 var o = (formatTo)? .5:1; 139 $( '#titlewrap' ).animate( {opacity:o}, 200 ); 139 140 } 140 141 141 142 // Animate the fields moving going away or coming in … … 160 161 } 161 162 162 163 resizeContent( format ); 163 postTitle.focus(); 164 if( -1 < $.inArray( format, noTitleFormats ) ) 165 if( $('#content:visible').size() ) 166 $('#content').focus(); 167 else 168 tinyMCE.activeEditor.focus(); 169 else 170 postTitle.focus(); 164 171 165 172 if ( '' === postTitle.val() ) { 166 173 titlePrompt.removeClass( 'screen-reader-text' ); … … 237 244 $(this).closest( 'p' ).find( 'span' ).toggle(); 238 245 }); 239 246 247 // Set opacity of title on focus 248 var noTitleFormatsSelector = '.wp-format-' + noTitleFormats.join( ' #title,.wp-format-' ) + ' #title'; 249 $( 'html' ).on( 'focusin', noTitleFormatsSelector, function(e) { 250 $( '#titlewrap' ).animate( {opacity:1}, 200 ); 251 }).on( 'focusout', noTitleFormatsSelector, function(e) { 252 $( '#titlewrap' ).animate( {opacity:.5}, 200 ); 253 }); 254 240 255 // Media selection 241 256 $( '.wp-format-media-select' ).click( function (e) { 242 257 e.preventDefault(); -
wp-admin/css/wp-admin.css
4116 4116 } 4117 4117 4118 4118 .wp-post-format-show-ui.wp-format-image .attachment-display-settings, 4119 .wp-post-format-show-ui.wp-format-status #titlewrap,4120 4119 .wp-post-format-show-ui.wp-format-image #insert-media-button, 4121 4120 .wp-post-format-show-ui.wp-format-audio #insert-media-button, 4122 4121 .wp-post-format-show-ui.wp-format-video #insert-media-button,