diff --git src/wp-includes/js/media/controllers/gallery-edit.js src/wp-includes/js/media/controllers/gallery-edit.js
index b07056e..34d57cc 100644
|
|
var Library = wp.media.controller.Library, |
7 | 7 | * |
8 | 8 | * A state for editing a gallery's images and settings. |
9 | 9 | * |
| 10 | * @since 3.5.0 |
| 11 | * |
10 | 12 | * @memberOf wp.media.controller |
11 | 13 | * |
12 | 14 | * @class |
… |
… |
var Library = wp.media.controller.Library, |
14 | 16 | * @augments wp.media.controller.State |
15 | 17 | * @augments Backbone.Model |
16 | 18 | * |
17 | | * @param {object} [attributes] The attributes hash passed to the state. |
| 19 | * @param {Object} [attributes] The attributes hash passed to the state. |
18 | 20 | * @param {string} [attributes.id=gallery-edit] Unique identifier. |
19 | 21 | * @param {string} [attributes.title=Edit Gallery] Title for the state. Displays in the frame's title region. |
20 | 22 | * @param {wp.media.model.Attachments} [attributes.library] The collection of attachments in the gallery. |
… |
… |
var Library = wp.media.controller.Library, |
28 | 30 | * @param {boolean} [attributes.describe=true] Whether to offer UI to describe attachments - e.g. captioning images in a gallery. |
29 | 31 | * @param {boolean} [attributes.displaySettings=true] Whether to show the attachment display settings interface. |
30 | 32 | * @param {boolean} [attributes.dragInfo=true] Whether to show instructional text about the attachments being sortable. |
31 | | * @param {int} [attributes.idealColumnWidth=170] The ideal column width in pixels for attachments. |
| 33 | * @param {number} [attributes.idealColumnWidth=170] The ideal column width in pixels for attachments. |
32 | 34 | * @param {boolean} [attributes.editing=false] Whether the gallery is being created, or editing an existing instance. |
33 | | * @param {int} [attributes.priority=60] The priority for the state link in the media menu. |
| 35 | * @param {number} [attributes.priority=60] The priority for the state link in the media menu. |
34 | 36 | * @param {boolean} [attributes.syncSelection=false] Whether the Attachments selection should be persisted from the last state. |
35 | 37 | * Defaults to false for this state, because the library passed in *is* the selection. |
36 | 38 | * @param {view} [attributes.AttachmentView] The single `Attachment` view to be used in the `Attachments`. |
… |
… |
GalleryEdit = Library.extend(/** @lends wp.media.controller.GalleryEdit.prototyp |
57 | 59 | }, |
58 | 60 | |
59 | 61 | /** |
| 62 | * Initializes the library. |
| 63 | * |
| 64 | * Creates a selection if a library isn't supplied |
| 65 | * and creates an attachment view if no attachment view is supplied. |
| 66 | * |
60 | 67 | * @since 3.5.0 |
| 68 | * |
| 69 | * @returns {void} |
61 | 70 | */ |
62 | 71 | initialize: function() { |
63 | 72 | // If we haven't been provided a `library`, create a `Selection`. |
… |
… |
GalleryEdit = Library.extend(/** @lends wp.media.controller.GalleryEdit.prototyp |
74 | 83 | }, |
75 | 84 | |
76 | 85 | /** |
| 86 | * Activates the library. |
| 87 | * |
| 88 | * Limits the library to images, watches for uploaded attachments. |
| 89 | * Watches for the browse event on the frame and binds it to |
| 90 | * gallerySettings. |
| 91 | * |
77 | 92 | * @since 3.5.0 |
| 93 | * |
| 94 | * @returns {void} |
78 | 95 | */ |
79 | 96 | activate: function() { |
80 | 97 | var library = this.get('library'); |
… |
… |
GalleryEdit = Library.extend(/** @lends wp.media.controller.GalleryEdit.prototyp |
91 | 108 | }, |
92 | 109 | |
93 | 110 | /** |
| 111 | * Deactivates the library. |
| 112 | * |
| 113 | * Stops watching for uploaded attachments and browse events. |
| 114 | * |
94 | 115 | * @since 3.5.0 |
| 116 | * |
| 117 | * @returns {void} |
95 | 118 | */ |
96 | 119 | deactivate: function() { |
97 | 120 | // Stop watching for uploaded attachments. |
… |
… |
GalleryEdit = Library.extend(/** @lends wp.media.controller.GalleryEdit.prototyp |
103 | 126 | }, |
104 | 127 | |
105 | 128 | /** |
| 129 | * Adds the gallery settings to the side bar and adds a reverse button to the toolbar. |
| 130 | * |
106 | 131 | * @since 3.5.0 |
107 | 132 | * |
108 | | * @param browser |
| 133 | * @param {wp.media.view.Frame} browser The file browser. |
| 134 | * |
| 135 | * @returns {void} |
109 | 136 | */ |
110 | 137 | gallerySettings: function( browser ) { |
111 | 138 | if ( ! this.get('displaySettings') ) { |