Changeset 24007
- Timestamp:
- 04/17/2013 05:22:14 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/post-formats.js
r24006 r24007 3 3 (function($) { 4 4 var container, mediaFrame, lastMimeType, lastMenu, mediaPreview, 5 6 $container= $( '.post-formats-fields' );5 noUIFormats = ['standard', 'chat', 'status', 'aside', 'gallery'], 6 $container = $( '.post-formats-fields' ); 7 7 8 8 function switchFormatClass( format ) { … … 11 11 } 12 12 13 function switchFormat 13 function switchFormat($this) { 14 14 var editor, body, 15 15 parent = $this.parent(), … … 25 25 $('#post_format').val(format); 26 26 $('.post-format-change').show().find('span.icon').removeClass(postFormats.currentPostFormat).addClass(format); 27 // container.addClass('wp-format-set');28 27 29 28 if ( -1 < $.inArray( format, noUIFormats ) ) { … … 63 62 $(function(){ 64 63 65 $('.post-format-change a').click(function 64 $('.post-format-change a').click(function() { 66 65 $('.post-formats-fields, .post-format-change').slideUp(); 67 66 $('.post-format-options').slideDown(); … … 76 75 77 76 // Media selection 78 $('.wp-format-media-select').click(function 77 $('.wp-format-media-select').click(function(event) { 79 78 event.preventDefault(); 80 79 var $el = $(this), mime, … … 109 108 }); 110 109 111 mediaPreview = function (attachment) { 112 var w, h, dimensions = '', url = attachment.url, 113 mime = attachment.mime, 114 format = attachment.type; 110 mediaPreview = function(attachment) { 111 var w, h, dimensions = '', url = attachment.url, mime = attachment.mime, format = attachment.type; 115 112 116 113 if ( 'video' === format ) { … … 139 136 140 137 // When an image is selected, run a callback. 141 mediaFrame.on( 'select', function 138 mediaFrame.on( 'select', function() { 142 139 // Grab the selected attachment. 143 140 var w = 0, h = 0, html, attachment = mediaFrame.state().get('selection').first().toJSON();
Note: See TracChangeset
for help on using the changeset viewer.