Ticket #29085: 29085.diff
| File 29085.diff, 2.4 KB (added by , 12 years ago) |
|---|
-
src/wp-includes/css/media-views.css
1006 1006 outline: none; 1007 1007 } 1008 1008 1009 .attachments-browser .attachments { 1010 padding: 0; 1011 } 1012 1013 .mode-select .attachments-browser .attachments { 1014 padding: 0 16px; 1015 } 1016 1009 1017 .attachments-browser .uploader-inline:not(.hidden) + .attachments { 1010 1018 top: 350px; 1011 1019 } -
src/wp-includes/js/media-views.js
5267 5267 media.view.Attachments.$head().append( this.cssTemplate({ 5268 5268 id: this.el.id, 5269 5269 edge: this.edge(), 5270 columns: this.columns(), 5270 5271 gutter: this.model.get('gutter') 5271 5272 }) ); 5272 5273 }, … … 5282 5283 } 5283 5284 5284 5285 gutter = this.model.get('gutter') * 2; 5285 width = this.$el.width() - gutter ;5286 width = this.$el.width() - gutter/2; 5286 5287 columns = Math.ceil( width / ( edge + gutter ) ); 5287 edge = Math.floor( ( width - ( columns* gutter ) ) / columns );5288 edge = Math.floor( ( width - ( ( columns - 1 ) * gutter ) ) / columns ); 5288 5289 return edge; 5289 5290 }, 5290 5291 5292 /** 5293 * @returns {Number} 5294 */ 5295 columns: function() { 5296 var edge = this.model.get('edge'), 5297 gutter, width, columns; 5298 5299 if ( ! this.$el.is(':visible') ) { 5300 return columns; 5301 } 5302 5303 gutter = this.model.get('gutter') * 2; 5304 width = this.$el.width() - gutter/2; 5305 columns = Math.ceil( width / ( edge + gutter ) ); 5306 return columns; 5307 }, 5308 5291 5309 initSortable: function() { 5292 5310 var collection = this.collection; 5293 5311 -
src/wp-includes/media-template.php
819 819 820 820 <script type="text/html" id="tmpl-attachments-css"> 821 821 <style type="text/css" id="{{ data.id }}-css"> 822 #{{ data.id }} {823 padding: 0 {{ data.gutter }}px;824 }825 826 822 #{{ data.id }} .attachment { 827 823 margin: {{ data.gutter }}px; 828 824 width: {{ data.edge }}px; 829 825 } 830 826 827 #{{ data.id }} .attachment:nth-of-type({{ data.columns }}n+1) { 828 margin-left: 0; 829 } 830 831 831 #{{ data.id }} .attachment-preview, 832 832 #{{ data.id }} .attachment-preview .thumbnail { 833 833 width: {{ data.edge }}px;