Ticket #26631: 26631.16.diff
File 26631.16.diff, 2.2 KB (added by , 10 years ago) |
---|
-
src/wp-includes/js/media-views.js
778 778 */ 779 779 media.controller.CollectionEdit = media.controller.Library.extend({ 780 780 defaults: { 781 type: 'image', 782 collectionType: 'gallery', 783 title: l10n.editGalleryTitle, 781 784 multiple: false, 782 785 describe: true, 783 786 edge: 199, … … 804 807 this.set( 'id', collectionType + '-edit' ); 805 808 this.set( 'toolbar', collectionType + '-edit' ); 806 809 810 if ( ! this.get( 'SettingsView' ) ) { 811 this.set( 'SettingsView', media.view.Settings.Gallery ); 812 } 813 807 814 // If we haven't been provided a `library`, create a `Selection`. 808 815 if ( ! this.get('library') ) { 809 816 this.set( 'library', new media.model.Selection() ); … … 877 884 } 878 885 }); 879 886 887 media.controller.GalleryEdit = media.controller.CollectionEdit; 888 880 889 /** 881 890 * wp.media.controller.CollectionAdd 882 891 * … … 887 896 */ 888 897 media.controller.CollectionAdd = media.controller.Library.extend({ 889 898 defaults: _.defaults( { 899 type: 'image', 900 collectionType: 'gallery', 901 title: l10n.addToGalleryTitle, 890 902 filterable: 'uploaded', 891 903 multiple: 'add', 892 904 priority: 100, … … 937 949 } 938 950 }); 939 951 952 media.controller.GalleryAdd = media.controller.CollectionAdd; 953 940 954 /** 941 955 * wp.media.controller.FeaturedImage 942 956 * … … 1958 1972 new media.controller.EditImage( { model: options.editImage } ), 1959 1973 1960 1974 // Gallery states. 1961 new media.controller.CollectionEdit({ 1962 type: 'image', 1963 collectionType: 'gallery', 1964 title: l10n.editGalleryTitle, 1965 SettingsView: media.view.Settings.Gallery, 1975 new media.controller.GalleryEdit({ 1966 1976 library: options.selection, 1967 1977 editing: options.editing, 1968 1978 menu: 'gallery' 1969 1979 }), 1970 1980 1971 new media.controller.CollectionAdd({ 1972 type: 'image', 1973 collectionType: 'gallery', 1974 title: l10n.addToGalleryTitle 1975 }), 1981 new media.controller.GalleryAdd(), 1976 1982 1977 1983 new media.controller.Library({ 1978 1984 id: 'playlist',