Changeset 26989
- Timestamp:
- 01/21/2014 04:29:30 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-editor.js
r26988 r26989 504 504 */ 505 505 wp.media.featuredImage = { 506 scott: 'yes', 506 507 /** 507 508 * Get the featured image post ID … … 544 545 * @global wp.media.view.l10n 545 546 * 547 * @this wp.media.featuredImage 548 * 546 549 * @returns {wp.media.view.MediaFrame.Select} A media workflow. 547 550 */ … … 557 560 558 561 this._frame.on( 'toolbar:create:featured-image', function( toolbar ) { 562 /** 563 * @this wp.media.view.MediaFrame.Select 564 */ 559 565 this.createSelectToolbar( toolbar, { 560 566 text: wp.media.view.l10n.setFeaturedImage … … 567 573 /** 568 574 * @global wp.media.view.settings 575 * 576 * @this wp.media.controller.FeaturedImage 569 577 */ 570 578 select: function() { … … 658 666 * @param {Object} [options={}] 659 667 * 668 * @this wp.media.editor 669 * 660 670 * @returns {wp.media.view.MediaFrame.Select} A media workflow. 661 671 */ … … 685 695 $.when.apply( $, selection.map( function( attachment ) { 686 696 var display = state.display( attachment ).toJSON(); 697 /** 698 * @this wp.media.editor 699 */ 687 700 return this.send.attachment( display, attachment.toJSON() ); 688 701 }, this ) ).done( function() { … … 692 705 693 706 workflow.state('gallery-edit').on( 'update', function( selection ) { 707 /** 708 * @this wp.media.editor 709 */ 694 710 this.insert( wp.media.gallery.shortcode( selection ).string() ); 695 711 }, this ); 696 712 697 713 workflow.state('embed').on( 'select', function() { 714 /** 715 * @this wp.media.editor 716 */ 698 717 var state = workflow.state(), 699 718 type = state.get('type'), … … 765 784 * 766 785 * @param {string} id 786 * 787 * @this wp.media.editor 788 * 767 789 * @returns {wp.media.view.MediaFrame} A media workflow. 768 790 */ … … 775 797 * 776 798 * @param {string} id 799 * 800 * @this wp.media.editor 777 801 */ 778 802 remove: function( id ) { … … 862 886 * @param {string} id 863 887 * @param {Object} options 888 * 889 * @this wp.media.editor 890 * 864 891 * @returns {wp.media.view.MediaFrame} 865 892 */ … … 898 925 init: function() { 899 926 $(document.body).on( 'click', '.insert-media', function( event ) { 900 var $this = $(this),901 editor = $this.data('editor'),927 var elem = $( event.currentTarget ), 928 editor = elem.data('editor'), 902 929 options = { 903 930 frame: 'post', … … 914 941 // 915 942 // See: http://core.trac.wordpress.org/ticket/22445 916 $this.blur();917 918 if ( $this.hasClass( 'gallery' ) ) {943 elem.blur(); 944 945 if ( elem.hasClass( 'gallery' ) ) { 919 946 options.state = 'gallery'; 920 947 options.title = wp.media.view.l10n.createGalleryTitle;
Note: See TracChangeset
for help on using the changeset viewer.