Changeset 26738
- Timestamp:
- 12/06/2013 07:41:19 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/wp-admin.css
r26737 r26738 6895 6895 width: 100%; 6896 6896 } 6897 /* Handles old 300px screenshots */ 6898 .theme-overlay.small-screenshot .theme-screenshots { 6899 position: absolute; 6900 width: 302px; 6901 } 6902 .theme-overlay.small-screenshot .theme-info { 6903 margin-left: 350px; 6904 width: auto; 6905 } 6897 6906 6898 6907 /* Other screenshots, shown small and square */ … … 7162 7171 .theme-browser .theme .theme-actions { 7163 7172 padding: 5px 10px 4px 10px; 7173 } 7174 .theme-overlay.small-screenshot .theme-screenshots { 7175 position: static; 7176 float: none; 7177 max-width: 302px; 7178 } 7179 .theme-overlay.small-screenshot .theme-info { 7180 margin-left: 0; 7181 width: auto; 7164 7182 } 7165 7183 } -
trunk/src/wp-admin/js/theme.js
r26728 r26738 251 251 // Set up navigation events 252 252 this.navigation(); 253 // Checks screenshot size 254 this.screenshotCheck( this.$el ); 253 255 }, 254 256 … … 353 355 var self = this; 354 356 self.trigger( 'theme:previous', self.model.cid ); 357 }, 358 359 // Checks if the theme screenshot is the old 300px width version 360 // and adds a corresponding class if it's true 361 screenshotCheck: function( el ) { 362 var screenshot, image, width; 363 364 screenshot = el.find( '.screenshot img' ); 365 image = new Image(); 366 image.src = screenshot.attr( 'src' ); 367 368 // Width check 369 if ( image.width <= 300 ) { 370 el.addClass( 'small-screenshot' ); 371 } 355 372 } 356 373 });
Note: See TracChangeset
for help on using the changeset viewer.