Changeset 22348
- Timestamp:
- 10/31/2012 09:43:59 PM (12 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/mce-view.js
r22340 r22348 691 691 692 692 edit: function() { 693 if ( ! wp.media.view || this. workflow)693 if ( ! wp.media.view || this.frame ) 694 694 return; 695 695 696 this. workflow= wp.media({696 this.frame = wp.media({ 697 697 state: 'gallery', 698 selection: this.attachments.models,699 698 title: mceview.l10n.editGallery, 700 699 editing: true, 701 multiple: true 700 multiple: true, 701 selection: new wp.media.model.Selection( this.attachments.models, { 702 props: this.attachments.props.toJSON(), 703 multiple: true 704 }) 702 705 }); 703 706 704 // Create a single-use workflow. If the workflowis closed,707 // Create a single-use frame. If the frame is closed, 705 708 // then detach it from the DOM and remove the reference. 706 this. workflow.on( 'close', function() {707 this. workflow.detach();708 delete this. workflow;709 this.frame.on( 'close', function() { 710 this.frame.detach(); 711 delete this.frame; 709 712 }, this ); 710 713 711 714 // Update the `shortcode` and `attachments`. 712 this. workflow.on( 'update:gallery', function( selection ) {715 this.frame.get('gallery').on( 'update', function( selection ) { 713 716 var view = mceview.get('gallery'); 714 717 -
trunk/wp-includes/js/media-views.js
r22344 r22348 115 115 multiple: false, 116 116 describe: false, 117 title: l10n.mediaLibrary 117 title: l10n.mediaLibraryTitle 118 118 }, 119 119 … … 263 263 multiple: false, 264 264 describe: true, 265 title: l10n.createGallery, 266 edge: 199 265 title: l10n.createGalleryTitle, 266 edge: 199, 267 editing: false 267 268 }, 268 269 … … 325 326 modal: true, 326 327 multiple: false, 327 uploader: true 328 uploader: true, 329 editing: false 328 330 }); 329 331 … … 380 382 }), 381 383 new media.controller.Gallery({ 382 library: options.selection 384 library: options.selection, 385 editing: options.editing 383 386 }) 384 387 ]); … … 825 828 826 829 this.options.items = { 827 'update-gallery': {830 update: { 828 831 style: 'primary', 829 text: editing ? l10n.updateGallery : l10n.insertGallery IntoPost,832 text: editing ? l10n.updateGallery : l10n.insertGallery, 830 833 priority: 40, 831 834 click: function() { … … 837 840 }, 838 841 839 'return-to-library': {840 text: editing ? l10n.addImagesFromLibrary : l10n.returnToLibrary,841 priority: - 40,842 cancel: { 843 text: l10n.cancel, 844 priority: -60, 842 845 843 846 click: function() { 844 this.controller.state('library'); 847 if ( editing ) 848 controller.close(); 849 else 850 controller.state('library'); 845 851 } 846 852 } -
trunk/wp-includes/script-loader.php
r22327 r22348 326 326 'insertMedia' => __( 'Insert Media' ), 327 327 'search' => __( 'Search' ), 328 'cancel' => __( 'Cancel' ), 329 'addImages' => __( 'Add images' ), 328 330 329 331 // Library 330 'mediaLibrary '=> __( 'Media Library' ),332 'mediaLibraryTitle' => __( 'Media Library' ), 331 333 'createNewGallery' => __( 'Create a new gallery' ), 332 334 'insertIntoPost' => __( 'Insert into post' ), … … 334 336 335 337 // Gallery 336 'createGallery' => __( 'Create Gallery' ), 337 'returnToLibrary' => __( 'Return to media library' ), 338 'continueEditingGallery' => __( 'Continue editing gallery' ), 339 'insertGalleryIntoPost' => __( 'Insert gallery into post' ), 340 'updateGallery' => __( 'Update gallery' ), 341 'addImagesFromLibrary' => __( 'Add images from media library' ), 338 'createGalleryTitle' => __( 'Create Gallery' ), 339 'insertGallery' => __( 'Insert gallery' ), 340 'updateGallery' => __( 'Update gallery' ), 342 341 ) ); 343 342
Note: See TracChangeset
for help on using the changeset viewer.