-
diff --git Gruntfile.js Gruntfile.js
index 2c213492a..0dba145a7 100644
|
|
module.exports = function(grunt) { |
420 | 420 | } |
421 | 421 | } |
422 | 422 | }, |
| 423 | jsdoc : { |
| 424 | dist : { |
| 425 | dest: "jsdoc", |
| 426 | options: { |
| 427 | configure : "jsdoc.conf.json" |
| 428 | } |
| 429 | } |
| 430 | }, |
423 | 431 | qunit: { |
424 | 432 | files: [ |
425 | 433 | 'tests/qunit/**/*.html', |
-
diff --git jsdoc.conf.json jsdoc.conf.json
new file mode 100644
index 000000000..2ffd6660a
-
|
+
|
|
| 1 | { |
| 2 | "plugins": [], |
| 3 | "recurseDepth": 10, |
| 4 | "source": { |
| 5 | "include": ["src/wp-includes/js"], |
| 6 | "exclude": [ |
| 7 | "src/wp-includes/js/tinymce", |
| 8 | "src/wp-includes/js/crop", |
| 9 | "src/wp-includes/js/imgareaselect", |
| 10 | "src/wp-includes/js/jcrop", |
| 11 | "src/wp-includes/js/jquery", |
| 12 | "src/wp-includes/js/mediaelement", |
| 13 | "src/wp-includes/js/swfupload", |
| 14 | "src/wp-includes/js/thickbox", |
| 15 | "src/wp-includes/js/media-audiovideo.js", |
| 16 | "src/wp-includes/js/media-grid.js", |
| 17 | "src/wp-includes/js/media-models.js", |
| 18 | "src/wp-includes/js/media-views.js" |
| 19 | ], |
| 20 | "includePattern": ".+\\.js(doc|x)?$", |
| 21 | "excludePattern": "(^|\\/|\\\\)_" |
| 22 | }, |
| 23 | "sourceType": "module", |
| 24 | "tags": { |
| 25 | "allowUnknownTags": true, |
| 26 | "dictionaries": ["jsdoc","closure"] |
| 27 | }, |
| 28 | "templates": { |
| 29 | "cleverLinks": false, |
| 30 | "monospaceLinks": false, |
| 31 | "theme": "united", |
| 32 | "outputSourceFiles": true, |
| 33 | "outputSourcePath": true, |
| 34 | "linenums": true |
| 35 | }, |
| 36 | "opts": { |
| 37 | "template": "./node_modules/ink-docstrap/template", |
| 38 | "recurse": true |
| 39 | } |
| 40 | } |
-
diff --git package.json package.json
index 0fda642c4..536eb6060 100644
|
|
|
26 | 26 | "grunt-contrib-uglify": "~2.0.0", |
27 | 27 | "grunt-contrib-watch": "~1.0.0", |
28 | 28 | "grunt-includes": "~0.5.1", |
| 29 | "grunt-jsdoc": "^2.1.0", |
29 | 30 | "grunt-jsvalidate": "~0.2.2", |
30 | 31 | "grunt-legacy-util": "^0.2.0", |
31 | 32 | "grunt-patch-wordpress": "~0.4.2", |
… |
… |
|
33 | 34 | "grunt-replace": "~1.0.1", |
34 | 35 | "grunt-rtlcss": "~2.0.1", |
35 | 36 | "grunt-sass": "~1.2.1", |
| 37 | "ink-docstrap": "^1.3.0", |
36 | 38 | "matchdep": "~1.0.0" |
37 | 39 | } |
38 | 40 | } |
-
diff --git src/wp-includes/js/api-request.js src/wp-includes/js/api-request.js
index 2ec605bf3..f0a84ef48 100644
|
|
|
8 | 8 | * - Sends the REST API nonce as a request header. |
9 | 9 | * - Allows specifying only an endpoint namespace/path instead of a full URL. |
10 | 10 | * |
11 | | * @namespace wp.apiRequest |
12 | 11 | * @since 4.9.0 |
13 | 12 | */ |
14 | 13 | |
… |
… |
|
82 | 81 | |
83 | 82 | apiRequest.transport = $.ajax; |
84 | 83 | |
| 84 | /** @namespace wp */ |
85 | 85 | window.wp = window.wp || {}; |
86 | 86 | window.wp.apiRequest = apiRequest; |
87 | 87 | } )( jQuery ); |
-
diff --git src/wp-includes/js/autosave.js src/wp-includes/js/autosave.js
index e88943d6d..75196d955 100644
|
|
window.autosave = function() { |
597 | 597 | }; |
598 | 598 | } |
599 | 599 | |
| 600 | /** @namespace wp */ |
600 | 601 | window.wp = window.wp || {}; |
601 | 602 | window.wp.autosave = autosave(); |
602 | 603 | |
-
diff --git src/wp-includes/js/customize-base.js src/wp-includes/js/customize-base.js
index 3fdb92423..4fc848cb3 100644
|
|
|
| 1 | /** @namespace wp */ |
1 | 2 | window.wp = window.wp || {}; |
2 | 3 | |
3 | 4 | (function( exports, $ ){ |
… |
… |
window.wp = window.wp || {}; |
165 | 166 | /** |
166 | 167 | * Observable values that support two-way binding. |
167 | 168 | * |
| 169 | * @memberOf wp.customize |
| 170 | * @alias wp.customize.Value |
| 171 | * |
168 | 172 | * @constructor |
169 | 173 | */ |
170 | | api.Value = api.Class.extend({ |
| 174 | api.Value = api.Class.extend(/** @lends wp.customize.Value.prototype */{ |
171 | 175 | /** |
172 | 176 | * @param {mixed} initial The initial value. |
173 | 177 | * @param {object} options |
… |
… |
window.wp = window.wp || {}; |
304 | 308 | /** |
305 | 309 | * A collection of observable values. |
306 | 310 | * |
| 311 | * @memberOf wp.customize |
| 312 | * @alias wp.customize.Values |
| 313 | * |
307 | 314 | * @constructor |
308 | 315 | * @augments wp.customize.Class |
309 | 316 | * @mixes wp.customize.Events |
310 | 317 | */ |
311 | | api.Values = api.Class.extend({ |
| 318 | api.Values = api.Class.extend(/** @lends wp.customize.Values.prototype */{ |
312 | 319 | |
313 | 320 | /** |
314 | 321 | * The default constructor for items of the collection. |
… |
… |
window.wp = window.wp || {}; |
520 | 527 | * |
521 | 528 | * Handles inputs, selects, and textareas by default. |
522 | 529 | * |
| 530 | * @memberOf wp.customize |
| 531 | * @alias wp.customize.Element |
| 532 | * |
523 | 533 | * @constructor |
524 | 534 | * @augments wp.customize.Value |
525 | 535 | * @augments wp.customize.Class |
526 | 536 | */ |
527 | | api.Element = api.Value.extend({ |
| 537 | api.Element = api.Value.extend(/** @lends wp.customize.Element */{ |
528 | 538 | initialize: function( element, options ) { |
529 | 539 | var self = this, |
530 | 540 | synchronizer = api.Element.synchronizer.html, |
… |
… |
window.wp = window.wp || {}; |
617 | 627 | /** |
618 | 628 | * A communicator for sending data from one window to another over postMessage. |
619 | 629 | * |
| 630 | * @memberOf wp.customize |
| 631 | * @alias wp.customize.Messenger |
| 632 | * |
620 | 633 | * @constructor |
621 | 634 | * @augments wp.customize.Class |
622 | 635 | * @mixes wp.customize.Events |
623 | 636 | */ |
624 | | api.Messenger = api.Class.extend({ |
| 637 | api.Messenger = api.Class.extend(/** @lends wp.customize.Messenger.prototype */{ |
625 | 638 | /** |
626 | 639 | * Create a new Value. |
627 | 640 | * |
… |
… |
window.wp = window.wp || {}; |
765 | 778 | * @augments wp.customize.Class |
766 | 779 | * @since 4.6.0 |
767 | 780 | * |
| 781 | * @memberOf wp.customize |
| 782 | * @alias wp.customize.Notification |
| 783 | * |
768 | 784 | * @param {string} code - The error code. |
769 | 785 | * @param {object} params - Params. |
770 | 786 | * @param {string} params.message=null - The error message. |
… |
… |
window.wp = window.wp || {}; |
773 | 789 | * @param {string} [params.setting=null] - The setting ID that the notification is related to. |
774 | 790 | * @param {*} [params.data=null] - Any additional data. |
775 | 791 | */ |
776 | | api.Notification = api.Class.extend({ |
| 792 | api.Notification = api.Class.extend(/** @lends wp.customize.Notification.prototype */{ |
777 | 793 | initialize: function( code, params ) { |
778 | 794 | var _params; |
779 | 795 | this.code = code; |
… |
… |
window.wp = window.wp || {}; |
798 | 814 | /** |
799 | 815 | * Get all customize settings. |
800 | 816 | * |
| 817 | * @memberOf wp.customize |
| 818 | * |
801 | 819 | * @return {object} |
802 | 820 | */ |
803 | 821 | api.get = function() { |
… |
… |
window.wp = window.wp || {}; |
810 | 828 | return result; |
811 | 829 | }; |
812 | 830 | |
813 | | /** |
814 | | * Utility function namespace |
815 | | */ |
| 831 | /** @namespace wp.customize.utils */ |
816 | 832 | api.utils = {}; |
817 | 833 | |
818 | 834 | /** |
… |
… |
window.wp = window.wp || {}; |
820 | 836 | * |
821 | 837 | * @since 4.7.0 |
822 | 838 | * @access public |
| 839 | * @memberOf wp.customize.utils |
823 | 840 | * |
824 | 841 | * @param {string} queryString Query string. |
825 | 842 | * @returns {object} Parsed query string. |
… |
… |
window.wp = window.wp || {}; |
844 | 861 | return queryParams; |
845 | 862 | }; |
846 | 863 | |
847 | | // Expose the API publicly on window.wp.customize |
| 864 | /** @namespace wp.customize */ |
848 | 865 | exports.customize = api; |
849 | 866 | })( wp, jQuery ); |
-
diff --git src/wp-includes/js/customize-loader.js src/wp-includes/js/customize-loader.js
index 1990d1a24..c1cd81582 100644
|
|
|
1 | 1 | /* global _wpCustomizeLoaderSettings, confirm */ |
2 | | /* |
3 | | * Expose a public API that allows the customizer to be |
4 | | * loaded on any page. |
5 | | */ |
| 2 | /** @namespace wp */ |
6 | 3 | window.wp = window.wp || {}; |
7 | 4 | |
8 | 5 | (function( exports, $ ){ |
… |
… |
window.wp = window.wp || {}; |
22 | 19 | * |
23 | 20 | * e.g. <a class="load-customize" href="<?php echo wp_customize_url(); ?>">Open Customizer</a> |
24 | 21 | * |
| 22 | * @memberOf wp.customize |
| 23 | * |
| 24 | * @class |
25 | 25 | * @augments wp.customize.Events |
26 | 26 | */ |
27 | | Loader = $.extend( {}, api.Events, { |
| 27 | Loader = $.extend( {}, api.Events,/** @lends wp.customize.Loader.prototype */{ |
28 | 28 | /** |
29 | 29 | * Setup the Loader; triggered on document#ready. |
30 | 30 | */ |
-
diff --git src/wp-includes/js/customize-models.js src/wp-includes/js/customize-models.js
index 9d6e088c5..372cad627 100644
|
|
|
1 | 1 | /* global _wpCustomizeHeader */ |
2 | 2 | (function( $, wp ) { |
3 | 3 | var api = wp.customize; |
| 4 | /** @namespace wp.customize.HeaderTool */ |
4 | 5 | api.HeaderTool = {}; |
5 | 6 | |
6 | 7 | |
… |
… |
|
13 | 14 | * These calls are made regardless of whether the user actually saves new |
14 | 15 | * Customizer settings. |
15 | 16 | * |
| 17 | * @memberOf wp.customize.HeaderTool |
| 18 | * @alias wp.customize.HeaderTool.ImageModel |
| 19 | * |
16 | 20 | * @constructor |
17 | 21 | * @augments Backbone.Model |
18 | 22 | */ |
19 | | api.HeaderTool.ImageModel = Backbone.Model.extend({ |
| 23 | api.HeaderTool.ImageModel = Backbone.Model.extend(/** @lends wp.customize.HeaderTool.ImageModel.prototype */{ |
20 | 24 | defaults: function() { |
21 | 25 | return { |
22 | 26 | header: { |
… |
… |
|
125 | 129 | /** |
126 | 130 | * wp.customize.HeaderTool.ChoiceList |
127 | 131 | * |
| 132 | * @memberOf wp.customize.HeaderTool |
| 133 | * @alias wp.customize.HeaderTool.ChoiceList |
| 134 | * |
128 | 135 | * @constructor |
129 | 136 | * @augments Backbone.Collection |
130 | 137 | */ |
… |
… |
|
232 | 239 | /** |
233 | 240 | * wp.customize.HeaderTool.DefaultsList |
234 | 241 | * |
| 242 | * @memberOf wp.customize.HeaderTool |
| 243 | * @alias wp.customize.HeaderTool.DefaultsList |
| 244 | * |
235 | 245 | * @constructor |
236 | 246 | * @augments wp.customize.HeaderTool.ChoiceList |
237 | 247 | * @augments Backbone.Collection |
-
diff --git src/wp-includes/js/customize-preview-nav-menus.js src/wp-includes/js/customize-preview-nav-menus.js
index 6745b41be..b328e67e9 100644
|
|
|
1 | 1 | /* global _wpCustomizePreviewNavMenusExports */ |
| 2 | |
| 3 | /** @namespace wp.customize.navMenusPreview */ |
2 | 4 | wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function( $, _, wp, api ) { |
3 | 5 | 'use strict'; |
4 | 6 | |
… |
… |
wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function( |
72 | 74 | /** |
73 | 75 | * Partial representing an invocation of wp_nav_menu(). |
74 | 76 | * |
| 77 | * @memberOf wp.customize.navMenusPreview |
| 78 | * @alias wp.customize.navMenusPreview.NavMenuInstancePartial |
| 79 | * |
75 | 80 | * @class |
76 | 81 | * @augments wp.customize.selectiveRefresh.Partial |
77 | 82 | * @since 4.5.0 |
78 | 83 | */ |
79 | | self.NavMenuInstancePartial = api.selectiveRefresh.Partial.extend({ |
| 84 | self.NavMenuInstancePartial = api.selectiveRefresh.Partial.extend(/** @lends wp.customize.navMenusPreview.NavMenuInstancePartial.prototype */{ |
80 | 85 | |
81 | 86 | /** |
82 | 87 | * Constructor. |
-
diff --git src/wp-includes/js/customize-preview-widgets.js src/wp-includes/js/customize-preview-widgets.js
index 6c05e8943..b981788ed 100644
|
|
|
1 | 1 | /* global _wpWidgetCustomizerPreviewSettings */ |
| 2 | |
| 3 | /** @namespace wp.customize.widgetsPreview */ |
2 | 4 | wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( $, _, wp, api ) { |
3 | 5 | |
4 | 6 | var self; |
… |
… |
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( |
42 | 44 | /** |
43 | 45 | * Partial representing a widget instance. |
44 | 46 | * |
| 47 | * @memberOf wp.customize.widgetsPreview |
| 48 | * @alias wp.customize.widgetsPreview.WidgetPartial |
| 49 | * |
45 | 50 | * @class |
46 | 51 | * @augments wp.customize.selectiveRefresh.Partial |
47 | 52 | * @since 4.5.0 |
48 | 53 | */ |
49 | | self.WidgetPartial = api.selectiveRefresh.Partial.extend({ |
| 54 | self.WidgetPartial = api.selectiveRefresh.Partial.extend(/** @lends wp.customize.widgetsPreview.WidgetPartial.prototype */{ |
50 | 55 | |
51 | 56 | /** |
52 | 57 | * Constructor. |
… |
… |
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( |
112 | 117 | /** |
113 | 118 | * Partial representing a widget area. |
114 | 119 | * |
| 120 | * @memberOf wp.customize.widgetsPreview |
| 121 | * @alias wp.customize.widgetsPreview.SidebarPartial |
| 122 | * |
115 | 123 | * @class |
116 | 124 | * @augments wp.customize.selectiveRefresh.Partial |
117 | 125 | * @since 4.5.0 |
118 | 126 | */ |
119 | | self.SidebarPartial = api.selectiveRefresh.Partial.extend({ |
| 127 | self.SidebarPartial = api.selectiveRefresh.Partial.extend(/** @lends wp.customize.widgetsPreview.SidebarPartial.prototype */{ |
120 | 128 | |
121 | 129 | /** |
122 | 130 | * Constructor. |
… |
… |
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( |
510 | 518 | /** |
511 | 519 | * Calculate the selector for the sidebar's widgets based on the registered sidebar's info. |
512 | 520 | * |
| 521 | * @memberOf wp.customize.widgetsPreview |
| 522 | * |
513 | 523 | * @since 3.9.0 |
514 | 524 | */ |
515 | 525 | self.buildWidgetSelectors = function() { |
… |
… |
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( |
548 | 558 | /** |
549 | 559 | * Highlight the widget on widget updates or widget control mouse overs. |
550 | 560 | * |
| 561 | * @memberOf wp.customize.widgetsPreview |
| 562 | * |
551 | 563 | * @since 3.9.0 |
552 | 564 | * @param {string} widgetId ID of the widget. |
553 | 565 | */ |
… |
… |
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( |
567 | 579 | * Show a title and highlight widgets on hover. On shift+clicking |
568 | 580 | * focus the widget control. |
569 | 581 | * |
| 582 | * @memberOf wp.customize.widgetsPreview |
| 583 | * |
570 | 584 | * @since 3.9.0 |
571 | 585 | */ |
572 | 586 | self.highlightControls = function() { |
… |
… |
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( |
598 | 612 | /** |
599 | 613 | * Parse a widget ID. |
600 | 614 | * |
| 615 | * @memberOf wp.customize.widgetsPreview |
| 616 | * |
601 | 617 | * @since 4.5.0 |
602 | 618 | * |
603 | 619 | * @param {string} widgetId Widget ID. |
… |
… |
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( |
623 | 639 | /** |
624 | 640 | * Parse a widget setting ID. |
625 | 641 | * |
| 642 | * @memberOf wp.customize.widgetsPreview |
| 643 | * |
626 | 644 | * @since 4.5.0 |
627 | 645 | * |
628 | 646 | * @param {string} settingId Widget setting ID. |
… |
… |
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( |
648 | 666 | /** |
649 | 667 | * Convert a widget ID into a Customizer setting ID. |
650 | 668 | * |
| 669 | * @memberOf wp.customize.widgetsPreview |
| 670 | * |
651 | 671 | * @since 4.5.0 |
652 | 672 | * |
653 | 673 | * @param {string} widgetId Widget ID. |
-
diff --git src/wp-includes/js/customize-preview.js src/wp-includes/js/customize-preview.js
index adb9f0384..12a9da121 100644
|
|
|
87 | 87 | }; |
88 | 88 | |
89 | 89 | /** |
| 90 | * @memberOf wp.customize |
| 91 | * @alias wp.customize.Preview |
| 92 | * |
90 | 93 | * @constructor |
91 | 94 | * @augments wp.customize.Messenger |
92 | 95 | * @augments wp.customize.Class |
93 | 96 | * @mixes wp.customize.Events |
94 | 97 | */ |
95 | | api.Preview = api.Messenger.extend({ |
| 98 | api.Preview = api.Messenger.extend(/** @lends wp.customize.Preview.prototype */{ |
96 | 99 | /** |
97 | 100 | * @param {object} params - Parameters to configure the messenger. |
98 | 101 | * @param {object} options - Extend any instance parameter or method with this object. |
-
diff --git src/wp-includes/js/customize-selective-refresh.js src/wp-includes/js/customize-selective-refresh.js
index 4c4fa0d9c..5bc17ed73 100644
|
|
|
1 | 1 | /* global jQuery, JSON, _customizePartialRefreshExports, console */ |
2 | 2 | |
| 3 | /** @namespace wp.customize.selectiveRefresh */ |
3 | 4 | wp.customize.selectiveRefresh = ( function( $, api ) { |
4 | 5 | 'use strict'; |
5 | 6 | var self, Partial, Placement; |
… |
… |
wp.customize.selectiveRefresh = ( function( $, api ) { |
24 | 25 | * |
25 | 26 | * A partial provides a rendering of one or more settings according to a template. |
26 | 27 | * |
| 28 | * @memberOf wp.customize.selectiveRefresh |
| 29 | * |
27 | 30 | * @see PHP class WP_Customize_Partial. |
28 | 31 | * |
29 | 32 | * @class |
… |
… |
wp.customize.selectiveRefresh = ( function( $, api ) { |
39 | 42 | * @param {string} options.params.primarySetting The ID for the primary setting the partial renders. |
40 | 43 | * @param {bool} options.params.fallbackRefresh Whether to refresh the entire preview in case of a partial refresh failure. |
41 | 44 | */ |
42 | | Partial = self.Partial = api.Class.extend({ |
| 45 | Partial = self.Partial = api.Class.extend(/** @lends wp.customize.SelectiveRefresh.Partial.prototype */{ |
43 | 46 | |
44 | 47 | id: null, |
45 | 48 | |
… |
… |
wp.customize.selectiveRefresh = ( function( $, api ) { |
508 | 511 | * It also may have information in relation to how a placement may have just changed. |
509 | 512 | * The placement is conceptually similar to a DOM Range or MutationRecord. |
510 | 513 | * |
511 | | * @class |
| 514 | * @memberOf wp.customize.selectiveRefresh |
| 515 | * |
| 516 | * @class Placement |
512 | 517 | * @augments wp.customize.Class |
513 | 518 | * @since 4.5.0 |
514 | 519 | */ |
515 | | self.Placement = Placement = api.Class.extend({ |
| 520 | self.Placement = Placement = api.Class.extend(/** @lends wp.customize.selectiveRefresh.prototype */{ |
516 | 521 | |
517 | 522 | /** |
518 | 523 | * The partial with which the container is associated. |
-
diff --git src/wp-includes/js/customize-views.js src/wp-includes/js/customize-views.js
index 29de08adc..786739f37 100644
|
|
|
11 | 11 | * |
12 | 12 | * Instantiate with model wp.customize.HeaderTool.currentHeader. |
13 | 13 | * |
| 14 | * @memberOf wp.customize.HeaderTool |
| 15 | * @alias wp.customize.HeaderTool.CurrentView |
| 16 | * |
14 | 17 | * @constructor |
15 | 18 | * @augments wp.Backbone.View |
16 | 19 | */ |
17 | | api.HeaderTool.CurrentView = wp.Backbone.View.extend({ |
| 20 | api.HeaderTool.CurrentView = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.CurrentView.prototype */{ |
18 | 21 | template: wp.template('header-current'), |
19 | 22 | |
20 | 23 | initialize: function() { |
… |
… |
|
50 | 53 | * Manually changes model wp.customize.HeaderTool.currentHeader via the |
51 | 54 | * `select` method. |
52 | 55 | * |
| 56 | * @memberOf wp.customize.HeaderTool |
| 57 | * @alias wp.customize.HeaderTool.ChoiceView |
| 58 | * |
53 | 59 | * @constructor |
54 | 60 | * @augments wp.Backbone.View |
55 | 61 | */ |
56 | | api.HeaderTool.ChoiceView = wp.Backbone.View.extend({ |
| 62 | api.HeaderTool.ChoiceView = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.ChoiceView.prototype */{ |
57 | 63 | template: wp.template('header-choice'), |
58 | 64 | |
59 | 65 | className: 'header-view', |
… |
… |
|
125 | 131 | * |
126 | 132 | * Takes a wp.customize.HeaderTool.ChoiceList. |
127 | 133 | * |
| 134 | * @memberOf wp.customize.HeaderTool |
| 135 | * @alias wp.customize.HeaderTool.ChoiceListView |
| 136 | * |
128 | 137 | * @constructor |
129 | 138 | * @augments wp.Backbone.View |
130 | 139 | */ |
131 | | api.HeaderTool.ChoiceListView = wp.Backbone.View.extend({ |
| 140 | api.HeaderTool.ChoiceListView = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.ChoiceListView.prototype */{ |
132 | 141 | initialize: function() { |
133 | 142 | this.listenTo(this.collection, 'add', this.addOne); |
134 | 143 | this.listenTo(this.collection, 'remove', this.render); |
… |
… |
|
168 | 177 | * Aggregates wp.customize.HeaderTool.ChoiceList collections (or any |
169 | 178 | * Backbone object, really) and acts as a bus to feed them events. |
170 | 179 | * |
| 180 | * @memberOf wp.customize.HeaderTool |
| 181 | * @alias wp.customize.HeaderTool.CombinedList |
| 182 | * |
171 | 183 | * @constructor |
172 | 184 | * @augments wp.Backbone.View |
173 | 185 | */ |
174 | | api.HeaderTool.CombinedList = wp.Backbone.View.extend({ |
| 186 | api.HeaderTool.CombinedList = wp.Backbone.View.extend(/** @lends wp.customize.HeaderTool.CombinedList.prototype */{ |
175 | 187 | initialize: function(collections) { |
176 | 188 | this.collections = collections; |
177 | 189 | this.on('all', this.propagate, this); |
-
diff --git src/wp-includes/js/heartbeat.js src/wp-includes/js/heartbeat.js
index 6c5e8d151..66902f892 100644
|
|
|
742 | 742 | }; |
743 | 743 | }; |
744 | 744 | |
745 | | // Ensure the global `wp` object exists. |
| 745 | /** @namespace wp */ |
746 | 746 | window.wp = window.wp || {}; |
747 | 747 | window.wp.heartbeat = new Heartbeat(); |
748 | 748 | |
-
diff --git src/wp-includes/js/mce-view.js src/wp-includes/js/mce-view.js
index 397af6386..3100ab6e5 100644
|
|
|
280 | 280 | |
281 | 281 | wp.mce.View.extend = Backbone.View.extend; |
282 | 282 | |
283 | | _.extend( wp.mce.View.prototype, { |
| 283 | _.extend( wp.mce.View.prototype, /** @lends wp.mce.View.prototype */{ |
284 | 284 | |
285 | 285 | /** |
286 | 286 | * The content. |
-
diff --git src/wp-includes/js/media-audiovideo.js src/wp-includes/js/media-audiovideo.js
index c71a478e0..dfddc03e6 100644
|
|
media.view.AudioDetails = require( './views/audio-details.js' ); |
216 | 216 | media.view.VideoDetails = require( './views/video-details.js' ); |
217 | 217 | |
218 | 218 | },{"./controllers/audio-details.js":2,"./controllers/video-details.js":3,"./models/post-media.js":4,"./views/audio-details.js":5,"./views/frame/audio-details.js":6,"./views/frame/media-details.js":7,"./views/frame/video-details.js":8,"./views/media-details.js":9,"./views/video-details.js":10}],2:[function(require,module,exports){ |
| 219 | var State = wp.media.controller.State, |
| 220 | l10n = wp.media.view.l10n, |
| 221 | AudioDetails; |
| 222 | |
219 | 223 | /** |
220 | 224 | * wp.media.controller.AudioDetails |
221 | 225 | * |
222 | 226 | * The controller for the Audio Details state |
223 | 227 | * |
| 228 | * @memberOf wp.media.controller |
| 229 | * |
224 | 230 | * @class |
225 | 231 | * @augments wp.media.controller.State |
226 | 232 | * @augments Backbone.Model |
227 | 233 | */ |
228 | | var State = wp.media.controller.State, |
229 | | l10n = wp.media.view.l10n, |
230 | | AudioDetails; |
231 | | |
232 | | AudioDetails = State.extend({ |
| 234 | AudioDetails = State.extend(/** @lends wp.media.controller.AudioDetails.prototype */{ |
233 | 235 | defaults: { |
234 | 236 | id: 'audio-details', |
235 | 237 | toolbar: 'audio-details', |
… |
… |
module.exports = AudioDetails; |
254 | 256 | * |
255 | 257 | * The controller for the Video Details state |
256 | 258 | * |
| 259 | * @memberOf wp.media.controller |
| 260 | * |
257 | 261 | * @class |
258 | 262 | * @augments wp.media.controller.State |
259 | 263 | * @augments Backbone.Model |
… |
… |
var State = wp.media.controller.State, |
262 | 266 | l10n = wp.media.view.l10n, |
263 | 267 | VideoDetails; |
264 | 268 | |
265 | | VideoDetails = State.extend({ |
| 269 | VideoDetails = State.extend(/** @lends wp.media.controller.VideoDetails.prototype */{ |
266 | 270 | defaults: { |
267 | 271 | id: 'video-details', |
268 | 272 | toolbar: 'video-details', |
… |
… |
module.exports = VideoDetails; |
288 | 292 | * Shared model class for audio and video. Updates the model after |
289 | 293 | * "Add Audio|Video Source" and "Replace Audio|Video" states return |
290 | 294 | * |
| 295 | * @memberOf wp.media.model |
| 296 | * |
291 | 297 | * @class |
292 | 298 | * @augments Backbone.Model |
293 | 299 | */ |
294 | | var PostMedia = Backbone.Model.extend({ |
| 300 | var PostMedia = Backbone.Model.extend(/** @lends wp.media.model.PostMedia.prototype */{ |
295 | 301 | initialize: function() { |
296 | 302 | this.attachment = false; |
297 | 303 | }, |
… |
… |
var PostMedia = Backbone.Model.extend({ |
324 | 330 | module.exports = PostMedia; |
325 | 331 | |
326 | 332 | },{}],5:[function(require,module,exports){ |
| 333 | var MediaDetails = wp.media.view.MediaDetails, |
| 334 | AudioDetails; |
| 335 | |
327 | 336 | /** |
328 | 337 | * wp.media.view.AudioDetails |
329 | 338 | * |
| 339 | * @memberOf wp.media.view |
| 340 | * |
330 | 341 | * @class |
331 | 342 | * @augments wp.media.view.MediaDetails |
332 | 343 | * @augments wp.media.view.Settings.AttachmentDisplay |
… |
… |
module.exports = PostMedia; |
335 | 346 | * @augments wp.Backbone.View |
336 | 347 | * @augments Backbone.View |
337 | 348 | */ |
338 | | var MediaDetails = wp.media.view.MediaDetails, |
339 | | AudioDetails; |
340 | | |
341 | | AudioDetails = MediaDetails.extend({ |
| 349 | AudioDetails = MediaDetails.extend(/** @lends wp.media.view.AudioDetails.prototype */{ |
342 | 350 | className: 'audio-details', |
343 | 351 | template: wp.template('audio-details'), |
344 | 352 | |
… |
… |
AudioDetails = MediaDetails.extend({ |
362 | 370 | module.exports = AudioDetails; |
363 | 371 | |
364 | 372 | },{}],6:[function(require,module,exports){ |
| 373 | var MediaDetails = wp.media.view.MediaFrame.MediaDetails, |
| 374 | MediaLibrary = wp.media.controller.MediaLibrary, |
| 375 | |
| 376 | l10n = wp.media.view.l10n, |
| 377 | AudioDetails; |
| 378 | |
365 | 379 | /** |
366 | 380 | * wp.media.view.MediaFrame.AudioDetails |
367 | 381 | * |
| 382 | * @memberOf wp.media.view.MediaFrame |
| 383 | * |
368 | 384 | * @class |
369 | 385 | * @augments wp.media.view.MediaFrame.MediaDetails |
370 | 386 | * @augments wp.media.view.MediaFrame.Select |
… |
… |
module.exports = AudioDetails; |
375 | 391 | * @augments Backbone.View |
376 | 392 | * @mixes wp.media.controller.StateMachine |
377 | 393 | */ |
378 | | var MediaDetails = wp.media.view.MediaFrame.MediaDetails, |
379 | | MediaLibrary = wp.media.controller.MediaLibrary, |
380 | | |
381 | | l10n = wp.media.view.l10n, |
382 | | AudioDetails; |
383 | | |
384 | | AudioDetails = MediaDetails.extend({ |
| 394 | AudioDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.AudioDetails.prototype */{ |
385 | 395 | defaults: { |
386 | 396 | id: 'audio', |
387 | 397 | url: '', |
… |
… |
AudioDetails = MediaDetails.extend({ |
438 | 448 | module.exports = AudioDetails; |
439 | 449 | |
440 | 450 | },{}],7:[function(require,module,exports){ |
| 451 | var Select = wp.media.view.MediaFrame.Select, |
| 452 | l10n = wp.media.view.l10n, |
| 453 | MediaDetails; |
| 454 | |
441 | 455 | /** |
442 | 456 | * wp.media.view.MediaFrame.MediaDetails |
443 | 457 | * |
| 458 | * @memberOf wp.media.view.MediaFrame |
| 459 | * |
444 | 460 | * @class |
445 | 461 | * @augments wp.media.view.MediaFrame.Select |
446 | 462 | * @augments wp.media.view.MediaFrame |
… |
… |
module.exports = AudioDetails; |
450 | 466 | * @augments Backbone.View |
451 | 467 | * @mixes wp.media.controller.StateMachine |
452 | 468 | */ |
453 | | var Select = wp.media.view.MediaFrame.Select, |
454 | | l10n = wp.media.view.l10n, |
455 | | MediaDetails; |
456 | | |
457 | | MediaDetails = Select.extend({ |
| 469 | MediaDetails = Select.extend(/** @lends wp.media.view.MediaFrame.MediaDetails.prototype */{ |
458 | 470 | defaults: { |
459 | 471 | id: 'media', |
460 | 472 | url: '', |
… |
… |
MediaDetails = Select.extend({ |
568 | 580 | module.exports = MediaDetails; |
569 | 581 | |
570 | 582 | },{}],8:[function(require,module,exports){ |
| 583 | var MediaDetails = wp.media.view.MediaFrame.MediaDetails, |
| 584 | MediaLibrary = wp.media.controller.MediaLibrary, |
| 585 | l10n = wp.media.view.l10n, |
| 586 | VideoDetails; |
| 587 | |
571 | 588 | /** |
572 | 589 | * wp.media.view.MediaFrame.VideoDetails |
573 | 590 | * |
| 591 | * @memberOf wp.media.view.MediaFrame |
| 592 | * |
574 | 593 | * @class |
575 | 594 | * @augments wp.media.view.MediaFrame.MediaDetails |
576 | 595 | * @augments wp.media.view.MediaFrame.Select |
… |
… |
module.exports = MediaDetails; |
581 | 600 | * @augments Backbone.View |
582 | 601 | * @mixes wp.media.controller.StateMachine |
583 | 602 | */ |
584 | | var MediaDetails = wp.media.view.MediaFrame.MediaDetails, |
585 | | MediaLibrary = wp.media.controller.MediaLibrary, |
586 | | l10n = wp.media.view.l10n, |
587 | | VideoDetails; |
588 | | |
589 | | VideoDetails = MediaDetails.extend({ |
| 603 | VideoDetails = MediaDetails.extend(/** @lends wp.media.view.MediaFrame.VideoDetails.prototype */{ |
590 | 604 | defaults: { |
591 | 605 | id: 'video', |
592 | 606 | url: '', |
… |
… |
module.exports = VideoDetails; |
704 | 718 | |
705 | 719 | },{}],9:[function(require,module,exports){ |
706 | 720 | /* global MediaElementPlayer */ |
| 721 | var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay, |
| 722 | $ = jQuery, |
| 723 | MediaDetails; |
707 | 724 | |
708 | 725 | /** |
709 | 726 | * wp.media.view.MediaDetails |
710 | 727 | * |
| 728 | * @memberOf wp.media.view |
| 729 | * |
711 | 730 | * @class |
712 | 731 | * @augments wp.media.view.Settings.AttachmentDisplay |
713 | 732 | * @augments wp.media.view.Settings |
… |
… |
module.exports = VideoDetails; |
715 | 734 | * @augments wp.Backbone.View |
716 | 735 | * @augments Backbone.View |
717 | 736 | */ |
718 | | var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay, |
719 | | $ = jQuery, |
720 | | MediaDetails; |
721 | | |
722 | | MediaDetails = AttachmentDisplay.extend({ |
| 737 | MediaDetails = AttachmentDisplay.extend(/** @lends wp.media.view.MediaDetails.prototype */{ |
723 | 738 | initialize: function() { |
724 | 739 | _.bindAll(this, 'success'); |
725 | 740 | this.players = []; |
… |
… |
MediaDetails = AttachmentDisplay.extend({ |
791 | 806 | this.scriptXhr = false; |
792 | 807 | }, |
793 | 808 | |
794 | | /** |
795 | | * @global MediaElementPlayer |
796 | | */ |
797 | 809 | setPlayer : function() { |
798 | 810 | var src; |
799 | 811 | |
… |
… |
MediaDetails = AttachmentDisplay.extend({ |
849 | 861 | resetFocus: function() { |
850 | 862 | this.$( '.embed-media-settings' ).scrollTop( 0 ); |
851 | 863 | } |
852 | | }, { |
| 864 | },/** @lends wp.media.view.MediaDetails */{ |
853 | 865 | instances : 0, |
854 | 866 | /** |
855 | 867 | * When multiple players in the DOM contain the same src, things get weird. |
… |
… |
MediaDetails = AttachmentDisplay.extend({ |
875 | 887 | module.exports = MediaDetails; |
876 | 888 | |
877 | 889 | },{}],10:[function(require,module,exports){ |
| 890 | var MediaDetails = wp.media.view.MediaDetails, |
| 891 | VideoDetails; |
| 892 | |
878 | 893 | /** |
879 | 894 | * wp.media.view.VideoDetails |
880 | 895 | * |
| 896 | * @memberOf wp.media.view |
| 897 | * |
881 | 898 | * @class |
882 | 899 | * @augments wp.media.view.MediaDetails |
883 | 900 | * @augments wp.media.view.Settings.AttachmentDisplay |
… |
… |
module.exports = MediaDetails; |
886 | 903 | * @augments wp.Backbone.View |
887 | 904 | * @augments Backbone.View |
888 | 905 | */ |
889 | | var MediaDetails = wp.media.view.MediaDetails, |
890 | | VideoDetails; |
891 | | |
892 | | VideoDetails = MediaDetails.extend({ |
| 906 | VideoDetails = MediaDetails.extend(/** @lends wp.media.view.VideoDetails.prototype */{ |
893 | 907 | className: 'video-details', |
894 | 908 | template: wp.template('video-details'), |
895 | 909 | |
-
diff --git src/wp-includes/js/media-editor.js src/wp-includes/js/media-editor.js
index 3852543aa..1eecf6a63 100644
|
|
|
30 | 30 | return attrs[ key ]; |
31 | 31 | }; |
32 | 32 | |
33 | | /** |
34 | | * wp.media.string |
35 | | * @namespace |
36 | | */ |
| 33 | /** @namespace wp.media.string */ |
37 | 34 | wp.media.string = { |
38 | 35 | /** |
39 | 36 | * Joins the `props` and `attachment` objects, |
40 | 37 | * outputting the proper object format based on the |
41 | 38 | * attachment's type. |
42 | 39 | * |
43 | | * @global wp.media.view.settings |
44 | | * @global getUserSetting() |
45 | | * |
46 | 40 | * @param {Object} [props={}] Attachment details (align, link, size, etc). |
47 | 41 | * @param {Object} attachment The attachment object, media version of Post. |
48 | 42 | * @returns {Object} Joined props |
… |
… |
|
109 | 103 | /** |
110 | 104 | * Create link markup that is suitable for passing to the editor |
111 | 105 | * |
112 | | * @global wp.html.string |
113 | | * |
114 | 106 | * @param {Object} props Attachment details (align, link, size, etc). |
115 | 107 | * @param {Object} attachment The attachment object, media version of Post. |
116 | 108 | * @returns {string} The link markup |
… |
… |
|
159 | 151 | * |
160 | 152 | * @access private |
161 | 153 | * |
162 | | * @global wp.shortcode |
163 | | * @global wp.media.view.settings |
164 | | * |
165 | 154 | * @param {string} type The shortcode tag name: 'audio' or 'video'. |
166 | 155 | * @param {Object} props Attachment details (align, link, size, etc). |
167 | 156 | * @param {Object} attachment The attachment object, media version of Post. |
… |
… |
|
210 | 199 | * Create image markup, optionally with a link and/or wrapped in a caption shortcode, |
211 | 200 | * that is suitable for passing to the editor |
212 | 201 | * |
213 | | * @global wp.html |
214 | | * @global wp.shortcode |
215 | | * |
216 | 202 | * @param {Object} props Attachment details (align, link, size, etc). |
217 | 203 | * @param {Object} attachment The attachment object, media version of Post. |
218 | 204 | * @returns {string} |
… |
… |
|
341 | 327 | } |
342 | 328 | }; |
343 | 329 | |
| 330 | /** |
| 331 | * @class wp.media.collectio |
| 332 | * |
| 333 | * @param attributes |
| 334 | */ |
344 | 335 | wp.media.collection = function(attributes) { |
345 | 336 | var collections = {}; |
346 | 337 | |
347 | | return _.extend( { |
| 338 | return _.extend(/** @lends wp.media.collection.prototype */{ |
348 | 339 | coerce : wp.media.coerce, |
349 | 340 | /** |
350 | 341 | * Retrieve attachments based on the properties of the passed shortcode |
351 | 342 | * |
352 | | * @global wp.media.query |
353 | | * |
354 | 343 | * @param {wp.shortcode} shortcode An instance of wp.shortcode(). |
355 | 344 | * @returns {wp.media.model.Attachments} A Backbone.Collection containing |
356 | 345 | * the media items belonging to a collection. |
… |
… |
|
417 | 406 | /** |
418 | 407 | * Triggered when clicking 'Insert {label}' or 'Update {label}' |
419 | 408 | * |
420 | | * @global wp.shortcode |
421 | | * @global wp.media.model.Attachments |
422 | | * |
423 | 409 | * @param {wp.media.model.Attachments} attachments A Backbone.Collection containing |
424 | 410 | * the media items belonging to a collection. |
425 | 411 | * The query[ this.tag ] property is a Backbone.Model |
… |
… |
|
488 | 474 | * Triggered when double-clicking a collection shortcode placeholder |
489 | 475 | * in the editor |
490 | 476 | * |
491 | | * @global wp.shortcode |
492 | | * @global wp.media.model.Selection |
493 | | * @global wp.media.view.l10n |
494 | | * |
495 | 477 | * @param {string} content Content that is searched for possible |
496 | 478 | * shortcode markup matching the passed tag name, |
497 | 479 | * |
… |
… |
|
609 | 591 | } |
610 | 592 | }); |
611 | 593 | |
612 | | /** |
613 | | * wp.media.featuredImage |
614 | | * @namespace |
615 | | */ |
616 | 594 | wp.media.featuredImage = { |
617 | 595 | /** |
618 | 596 | * Get the featured image post ID |
619 | 597 | * |
620 | | * @global wp.media.view.settings |
621 | | * |
622 | 598 | * @returns {wp.media.view.settings.post.featuredImageId|number} |
623 | 599 | */ |
624 | 600 | get: function() { |
… |
… |
|
628 | 604 | * Set the featured image id, save the post thumbnail data and |
629 | 605 | * set the HTML in the post meta box to the new featured image. |
630 | 606 | * |
631 | | * @global wp.media.view.settings |
632 | | * @global wp.media.post |
633 | | * |
634 | 607 | * @param {number} id The post ID of the featured image, or -1 to unset it. |
635 | 608 | */ |
636 | 609 | set: function( id ) { |
… |
… |
|
660 | 633 | /** |
661 | 634 | * The Featured Image workflow |
662 | 635 | * |
663 | | * @global wp.media.controller.FeaturedImage |
664 | | * @global wp.media.view.l10n |
665 | | * |
666 | 636 | * @this wp.media.featuredImage |
667 | 637 | * |
668 | 638 | * @returns {wp.media.view.MediaFrame.Select} A media workflow. |
… |
… |
|
705 | 675 | * 'select' callback for Featured Image workflow, triggered when |
706 | 676 | * the 'Set Featured Image' button is clicked in the media modal. |
707 | 677 | * |
708 | | * @global wp.media.view.settings |
709 | | * |
710 | 678 | * @this wp.media.controller.FeaturedImage |
711 | 679 | */ |
712 | 680 | select: function() { |
… |
… |
|
723 | 691 | * the post thumbnail is clicked. |
724 | 692 | * |
725 | 693 | * Update the featured image id when the 'remove' link is clicked. |
726 | | * |
727 | | * @global wp.media.view.settings |
728 | 694 | */ |
729 | 695 | init: function() { |
730 | 696 | $('#postimagediv').on( 'click', '#set-post-thumbnail', function( event ) { |
… |
… |
|
742 | 708 | |
743 | 709 | $( wp.media.featuredImage.init ); |
744 | 710 | |
745 | | /** |
746 | | * wp.media.editor |
747 | | * @namespace |
748 | | */ |
| 711 | /** @namespace wp.media.editor */ |
749 | 712 | wp.media.editor = { |
750 | 713 | /** |
751 | 714 | * Send content to the editor |
752 | 715 | * |
753 | | * @global tinymce |
754 | | * @global QTags |
755 | | * @global wpActiveEditor |
756 | | * @global tb_remove() - Possibly overloaded by legacy plugins |
757 | | * |
758 | 716 | * @param {string} html Content to send to the editor |
759 | 717 | */ |
760 | 718 | insert: function( html ) { |
… |
… |
|
805 | 763 | * Setup 'workflow' and add to the 'workflows' cache. 'open' can |
806 | 764 | * subsequently be called upon it. |
807 | 765 | * |
808 | | * @global wp.media.view.l10n |
809 | | * |
810 | 766 | * @param {string} id A slug used to identify the workflow. |
811 | 767 | * @param {Object} [options={}] |
812 | 768 | * |
… |
… |
|
914 | 870 | /** |
915 | 871 | * Determines the proper current workflow id |
916 | 872 | * |
917 | | * @global wpActiveEditor |
918 | | * @global tinymce |
919 | | * |
920 | 873 | * @param {string} [id=''] A slug used to identify the workflow. |
921 | 874 | * |
922 | 875 | * @returns {wpActiveEditor|string|tinymce.activeEditor.id} |
… |
… |
|
962 | 915 | id = this.id( id ); |
963 | 916 | delete workflows[ id ]; |
964 | 917 | }, |
965 | | /** |
966 | | * @namespace |
967 | | */ |
| 918 | /** @namespace wp.media.editor.send */ |
968 | 919 | send: { |
969 | 920 | /** |
970 | 921 | * Called when sending an attachment to the editor |
971 | 922 | * from the medial modal. |
972 | 923 | * |
973 | | * @global wp.media.view.settings |
974 | | * @global wp.media.post |
975 | | * |
976 | 924 | * @param {Object} props Attachment details (align, link, size, etc). |
977 | 925 | * @param {Object} attachment The attachment object, media version of Post. |
978 | 926 | * @returns {Promise} |
… |
… |
|
1028 | 976 | /** |
1029 | 977 | * Called when 'Insert From URL' source is not an image. Example: YouTube url. |
1030 | 978 | * |
1031 | | * @global wp.media.view.settings |
1032 | | * |
1033 | 979 | * @param {Object} embed |
1034 | 980 | * @returns {Promise} |
1035 | 981 | */ |
… |
… |
|
1075 | 1021 | |
1076 | 1022 | /** |
1077 | 1023 | * Bind click event for .insert-media using event delegation |
1078 | | * |
1079 | | * @global wp.media.view.l10n |
1080 | 1024 | */ |
1081 | 1025 | init: function() { |
1082 | 1026 | $(document.body) |
-
diff --git src/wp-includes/js/media-grid.js src/wp-includes/js/media-grid.js
index b6128a375..6e35fb52a 100644
|
|
|
1 | 1 | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ |
| 2 | var l10n = wp.media.view.l10n, |
| 3 | EditAttachmentMetadata; |
| 4 | |
2 | 5 | /** |
3 | 6 | * wp.media.controller.EditAttachmentMetadata |
4 | 7 | * |
5 | 8 | * A state for editing an attachment's metadata. |
6 | 9 | * |
| 10 | * @memberOf wp.media.controller |
| 11 | * |
7 | 12 | * @class |
8 | 13 | * @augments wp.media.controller.State |
9 | 14 | * @augments Backbone.Model |
10 | 15 | */ |
11 | | var l10n = wp.media.view.l10n, |
12 | | EditAttachmentMetadata; |
13 | | |
14 | | EditAttachmentMetadata = wp.media.controller.State.extend({ |
| 16 | EditAttachmentMetadata = wp.media.controller.State.extend(/** @lends wp.media.controller.EditAttachmentMetadata.prototype */{ |
15 | 17 | defaults: { |
16 | 18 | id: 'edit-attachment', |
17 | 19 | // Title string passed to the frame's title region view. |
… |
… |
media.view.DeleteSelectedPermanentlyButton = require( './views/button/delete-sel |
45 | 47 | * |
46 | 48 | * A router for handling the browser history and application state. |
47 | 49 | * |
| 50 | * @memberOf wp.media.view.MediaFrame.Manage |
| 51 | * |
48 | 52 | * @class |
49 | 53 | * @augments Backbone.Router |
50 | 54 | */ |
51 | | var Router = Backbone.Router.extend({ |
| 55 | var Router = Backbone.Router.extend(/** @lends wp.media.view.MediaFrame.Manage.Router.prototype */{ |
52 | 56 | routes: { |
53 | 57 | 'upload.php?item=:slug&mode=edit': 'editItem', |
54 | 58 | 'upload.php?item=:slug': 'showItem', |
… |
… |
var Router = Backbone.Router.extend({ |
107 | 111 | module.exports = Router; |
108 | 112 | |
109 | 113 | },{}],4:[function(require,module,exports){ |
| 114 | var Details = wp.media.view.Attachment.Details, |
| 115 | TwoColumn; |
| 116 | |
110 | 117 | /** |
111 | 118 | * wp.media.view.Attachment.Details.TwoColumn |
112 | 119 | * |
113 | 120 | * A similar view to media.view.Attachment.Details |
114 | 121 | * for use in the Edit Attachment modal. |
115 | 122 | * |
| 123 | * @memberOf wp.media.view.Attachment.Details |
| 124 | * |
116 | 125 | * @class |
117 | 126 | * @augments wp.media.view.Attachment.Details |
118 | 127 | * @augments wp.media.view.Attachment |
… |
… |
module.exports = Router; |
120 | 129 | * @augments wp.Backbone.View |
121 | 130 | * @augments Backbone.View |
122 | 131 | */ |
123 | | var Details = wp.media.view.Attachment.Details, |
124 | | TwoColumn; |
125 | | |
126 | | TwoColumn = Details.extend({ |
| 132 | TwoColumn = Details.extend(/** @lends wp.media.view.Attachment.Details.TowColumn.prototype */{ |
127 | 133 | template: wp.template( 'attachment-details-two-column' ), |
128 | 134 | |
129 | 135 | initialize: function() { |
… |
… |
TwoColumn = Details.extend({ |
158 | 164 | module.exports = TwoColumn; |
159 | 165 | |
160 | 166 | },{}],5:[function(require,module,exports){ |
| 167 | var Button = wp.media.view.Button, |
| 168 | DeleteSelected = wp.media.view.DeleteSelectedButton, |
| 169 | DeleteSelectedPermanently; |
| 170 | |
161 | 171 | /** |
162 | 172 | * wp.media.view.DeleteSelectedPermanentlyButton |
163 | 173 | * |
164 | 174 | * When MEDIA_TRASH is true, a button that handles bulk Delete Permanently logic |
165 | 175 | * |
| 176 | * @memberOf wp.media.view |
| 177 | * |
166 | 178 | * @class |
167 | 179 | * @augments wp.media.view.DeleteSelectedButton |
168 | 180 | * @augments wp.media.view.Button |
… |
… |
module.exports = TwoColumn; |
170 | 182 | * @augments wp.Backbone.View |
171 | 183 | * @augments Backbone.View |
172 | 184 | */ |
173 | | var Button = wp.media.view.Button, |
174 | | DeleteSelected = wp.media.view.DeleteSelectedButton, |
175 | | DeleteSelectedPermanently; |
176 | | |
177 | | DeleteSelectedPermanently = DeleteSelected.extend({ |
| 185 | DeleteSelectedPermanently = DeleteSelected.extend(/** @lends wp.media.view.DeleteSelectedPermanentlyButton.prototype */{ |
178 | 186 | initialize: function() { |
179 | 187 | DeleteSelected.prototype.initialize.apply( this, arguments ); |
180 | 188 | this.controller.on( 'select:activate', this.selectActivate, this ); |
… |
… |
DeleteSelectedPermanently = DeleteSelected.extend({ |
205 | 213 | module.exports = DeleteSelectedPermanently; |
206 | 214 | |
207 | 215 | },{}],6:[function(require,module,exports){ |
| 216 | var Button = wp.media.view.Button, |
| 217 | l10n = wp.media.view.l10n, |
| 218 | DeleteSelected; |
| 219 | |
208 | 220 | /** |
209 | 221 | * wp.media.view.DeleteSelectedButton |
210 | 222 | * |
211 | 223 | * A button that handles bulk Delete/Trash logic |
212 | 224 | * |
| 225 | * @memberOf wp.media.view |
| 226 | * |
213 | 227 | * @class |
214 | 228 | * @augments wp.media.view.Button |
215 | 229 | * @augments wp.media.View |
216 | 230 | * @augments wp.Backbone.View |
217 | 231 | * @augments Backbone.View |
218 | 232 | */ |
219 | | var Button = wp.media.view.Button, |
220 | | l10n = wp.media.view.l10n, |
221 | | DeleteSelected; |
222 | | |
223 | | DeleteSelected = Button.extend({ |
| 233 | DeleteSelected = Button.extend(/** @lends wp.media.view.DeleteSelectedButton.prototype */{ |
224 | 234 | initialize: function() { |
225 | 235 | Button.prototype.initialize.apply( this, arguments ); |
226 | 236 | if ( this.options.filters ) { |
… |
… |
DeleteSelected = Button.extend({ |
258 | 268 | module.exports = DeleteSelected; |
259 | 269 | |
260 | 270 | },{}],7:[function(require,module,exports){ |
| 271 | |
| 272 | var Button = wp.media.view.Button, |
| 273 | l10n = wp.media.view.l10n, |
| 274 | SelectModeToggle; |
| 275 | |
261 | 276 | /** |
262 | 277 | * wp.media.view.SelectModeToggleButton |
263 | 278 | * |
| 279 | * @memberOf wp.media.view |
| 280 | * |
264 | 281 | * @class |
265 | 282 | * @augments wp.media.view.Button |
266 | 283 | * @augments wp.media.View |
267 | 284 | * @augments wp.Backbone.View |
268 | 285 | * @augments Backbone.View |
269 | 286 | */ |
270 | | var Button = wp.media.view.Button, |
271 | | l10n = wp.media.view.l10n, |
272 | | SelectModeToggle; |
273 | | |
274 | | SelectModeToggle = Button.extend({ |
| 287 | SelectModeToggle = Button.extend(/** @lends wp.media.view.SelectModeToggle.prototype */{ |
275 | 288 | initialize: function() { |
276 | 289 | _.defaults( this.options, { |
277 | 290 | size : '' |
… |
… |
SelectModeToggle = Button.extend({ |
332 | 345 | module.exports = SelectModeToggle; |
333 | 346 | |
334 | 347 | },{}],8:[function(require,module,exports){ |
| 348 | var View = wp.media.View, |
| 349 | EditImage = wp.media.view.EditImage, |
| 350 | Details; |
| 351 | |
335 | 352 | /** |
336 | 353 | * wp.media.view.EditImage.Details |
337 | 354 | * |
| 355 | * @memberOf wp.media.view.EditImage |
| 356 | * |
338 | 357 | * @class |
339 | 358 | * @augments wp.media.view.EditImage |
340 | 359 | * @augments wp.media.View |
341 | 360 | * @augments wp.Backbone.View |
342 | 361 | * @augments Backbone.View |
343 | 362 | */ |
344 | | var View = wp.media.View, |
345 | | EditImage = wp.media.view.EditImage, |
346 | | Details; |
347 | | |
348 | | Details = EditImage.extend({ |
| 363 | Details = EditImage.extend(/** @lends wp.media.view.EditImage.Details.prototype */{ |
349 | 364 | initialize: function( options ) { |
350 | 365 | this.editor = window.imageEdit; |
351 | 366 | this.frame = options.frame; |
… |
… |
Details = EditImage.extend({ |
367 | 382 | module.exports = Details; |
368 | 383 | |
369 | 384 | },{}],9:[function(require,module,exports){ |
| 385 | var Frame = wp.media.view.Frame, |
| 386 | MediaFrame = wp.media.view.MediaFrame, |
| 387 | |
| 388 | $ = jQuery, |
| 389 | EditAttachments; |
| 390 | |
370 | 391 | /** |
371 | 392 | * wp.media.view.MediaFrame.EditAttachments |
372 | 393 | * |
… |
… |
module.exports = Details; |
376 | 397 | * |
377 | 398 | * Requires an attachment model to be passed in the options hash under `model`. |
378 | 399 | * |
| 400 | * @memberOf wp.media.view.MediaFrame |
| 401 | * |
379 | 402 | * @class |
380 | 403 | * @augments wp.media.view.Frame |
381 | 404 | * @augments wp.media.View |
… |
… |
module.exports = Details; |
383 | 406 | * @augments Backbone.View |
384 | 407 | * @mixes wp.media.controller.StateMachine |
385 | 408 | */ |
386 | | var Frame = wp.media.view.Frame, |
387 | | MediaFrame = wp.media.view.MediaFrame, |
388 | | |
389 | | $ = jQuery, |
390 | | EditAttachments; |
391 | | |
392 | | EditAttachments = MediaFrame.extend({ |
| 409 | EditAttachments = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.EditAttachments.prototype */{ |
393 | 410 | |
394 | 411 | className: 'edit-attachment-frame', |
395 | 412 | template: wp.template( 'edit-attachment-frame' ), |
… |
… |
EditAttachments = MediaFrame.extend({ |
627 | 644 | module.exports = EditAttachments; |
628 | 645 | |
629 | 646 | },{}],10:[function(require,module,exports){ |
| 647 | var MediaFrame = wp.media.view.MediaFrame, |
| 648 | Library = wp.media.controller.Library, |
| 649 | |
| 650 | $ = Backbone.$, |
| 651 | Manage; |
| 652 | |
630 | 653 | /** |
631 | 654 | * wp.media.view.MediaFrame.Manage |
632 | 655 | * |
… |
… |
module.exports = EditAttachments; |
634 | 657 | * |
635 | 658 | * Used in the media grid view. |
636 | 659 | * |
| 660 | * @memberOf wp.media.view.MediaFrame |
| 661 | * |
637 | 662 | * @class |
638 | 663 | * @augments wp.media.view.MediaFrame |
639 | 664 | * @augments wp.media.view.Frame |
… |
… |
module.exports = EditAttachments; |
642 | 667 | * @augments Backbone.View |
643 | 668 | * @mixes wp.media.controller.StateMachine |
644 | 669 | */ |
645 | | var MediaFrame = wp.media.view.MediaFrame, |
646 | | Library = wp.media.controller.Library, |
647 | | |
648 | | $ = Backbone.$, |
649 | | Manage; |
650 | | |
651 | | Manage = MediaFrame.extend({ |
| 670 | Manage = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Manage.prototype */{ |
652 | 671 | /** |
653 | | * @global wp.Uploader |
| 672 | * @constructs |
654 | 673 | */ |
655 | 674 | initialize: function() { |
656 | 675 | _.defaults( this.options, { |
-
diff --git src/wp-includes/js/media-models.js src/wp-includes/js/media-models.js
index f5683a939..ba93f9722 100644
|
|
|
2 | 2 | var $ = jQuery, |
3 | 3 | Attachment, Attachments, l10n, media; |
4 | 4 | |
| 5 | /** @namespace wp */ |
5 | 6 | window.wp = window.wp || {}; |
6 | 7 | |
7 | 8 | /** |
… |
… |
window.wp = window.wp || {}; |
9 | 10 | * |
10 | 11 | * Handles the default media experience. |
11 | 12 | * |
| 13 | * @alias wp.media |
| 14 | * @memberOf wp |
| 15 | * |
12 | 16 | * @param {object} attributes The properties passed to the main media controller. |
13 | 17 | * @return {wp.media.view.MediaFrame} A media workflow. |
14 | 18 | */ |
… |
… |
media = wp.media = function( attributes ) { |
47 | 51 | return frame; |
48 | 52 | }; |
49 | 53 | |
| 54 | /** @namespace wp.media */ |
| 55 | /** @namespace wp.media.model */ |
| 56 | /** @namespace wp.media.view */ |
| 57 | /** @namespace wp.media.controller */ |
| 58 | /** @namespace wp.media.frames */ |
50 | 59 | _.extend( media, { model: {}, view: {}, controller: {}, frames: {} }); |
51 | 60 | |
52 | 61 | // Link any localized strings. |
… |
… |
media.compare = function( a, b, ac, bc ) { |
90 | 99 | } |
91 | 100 | }; |
92 | 101 | |
93 | | _.extend( media, { |
| 102 | _.extend( media, /** @lends wp.media */{ |
94 | 103 | /** |
95 | 104 | * media.template( id ) |
96 | 105 | * |
… |
… |
$(window).on('unload', function(){ |
230 | 239 | }); |
231 | 240 | |
232 | 241 | },{"./models/attachment.js":2,"./models/attachments.js":3,"./models/post-image.js":4,"./models/query.js":5,"./models/selection.js":6}],2:[function(require,module,exports){ |
| 242 | var $ = Backbone.$, |
| 243 | Attachment; |
| 244 | |
233 | 245 | /** |
234 | 246 | * wp.media.model.Attachment |
235 | 247 | * |
| 248 | * @memberOf wp.media.model |
| 249 | * |
236 | 250 | * @class |
237 | 251 | * @augments Backbone.Model |
238 | 252 | */ |
239 | | var $ = Backbone.$, |
240 | | Attachment; |
241 | | |
242 | | Attachment = Backbone.Model.extend({ |
| 253 | Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototype */{ |
243 | 254 | /** |
244 | 255 | * Triggered when attachment details change |
245 | 256 | * Overrides Backbone.Model.sync |
… |
… |
Attachment = Backbone.Model.extend({ |
366 | 377 | model.set( model.parse( resp, xhr ), options ); |
367 | 378 | }); |
368 | 379 | } |
369 | | }, { |
| 380 | },/** @lends wp.media.model.Attachment */{ |
370 | 381 | /** |
371 | 382 | * Create a new model on the static 'all' attachments collection and return it. |
372 | 383 | * |
373 | 384 | * @static |
| 385 | * |
374 | 386 | * @param {Object} attrs |
375 | 387 | * @returns {wp.media.model.Attachment} |
376 | 388 | */ |
… |
… |
module.exports = Attachment; |
407 | 419 | * 'options.props.query = true', which will mirror the collection |
408 | 420 | * to an Attachments Query collection - @see wp.media.model.Attachments.mirror(). |
409 | 421 | * |
| 422 | * @memberOf wp.media.model |
| 423 | * |
410 | 424 | * @class |
411 | 425 | * @augments Backbone.Collection |
412 | 426 | * |
… |
… |
module.exports = Attachment; |
420 | 434 | * @param {string} [options.filters] |
421 | 435 | * |
422 | 436 | */ |
423 | | var Attachments = Backbone.Collection.extend({ |
| 437 | var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachments.prototype */{ |
424 | 438 | /** |
425 | 439 | * @type {wp.media.model.Attachment} |
426 | 440 | */ |
… |
… |
var Attachments = Backbone.Collection.extend({ |
818 | 832 | attachments: attachments |
819 | 833 | }); |
820 | 834 | } |
821 | | }, { |
| 835 | },/** @lends wp.media.model.Attachments */{ |
822 | 836 | /** |
823 | 837 | * A function to compare two attachment models in an attachments collection. |
824 | 838 | * |
825 | 839 | * Used as the default comparator for instances of wp.media.model.Attachments |
826 | 840 | * and its subclasses. @see wp.media.model.Attachments._changeOrderby(). |
827 | 841 | * |
828 | | * @static |
829 | | * |
830 | 842 | * @param {Backbone.Model} a |
831 | 843 | * @param {Backbone.Model} b |
832 | 844 | * @param {Object} options |
… |
… |
var Attachments = Backbone.Collection.extend({ |
855 | 867 | |
856 | 868 | return ( 'DESC' === order ) ? wp.media.compare( a, b, ac, bc ) : wp.media.compare( b, a, bc, ac ); |
857 | 869 | }, |
858 | | /** |
859 | | * @namespace |
860 | | */ |
| 870 | /** @namespace wp.media.model.Attachments.filters */ |
861 | 871 | filters: { |
862 | 872 | /** |
863 | 873 | * @static |
… |
… |
module.exports = Attachments; |
952 | 962 | * |
953 | 963 | * Used in the embedded image attachment display settings modal - @see wp.media.view.MediaFrame.ImageDetails. |
954 | 964 | * |
| 965 | * @memberOf wp.media.model |
| 966 | * |
955 | 967 | * @class |
956 | 968 | * @augments Backbone.Model |
957 | 969 | * |
958 | 970 | * @param {int} [attributes] Initial model attributes. |
959 | 971 | * @param {int} [attributes.attachment_id] ID of the attachment. |
960 | 972 | **/ |
961 | | var PostImage = Backbone.Model.extend({ |
| 973 | var PostImage = Backbone.Model.extend(/** @lends wp.media.model.PostImage.prototype */{ |
962 | 974 | |
963 | 975 | initialize: function( attributes ) { |
964 | 976 | var Attachment = wp.media.model.Attachment; |
… |
… |
var PostImage = Backbone.Model.extend({ |
1099 | 1111 | module.exports = PostImage; |
1100 | 1112 | |
1101 | 1113 | },{}],5:[function(require,module,exports){ |
| 1114 | var Attachments = wp.media.model.Attachments, |
| 1115 | Query; |
| 1116 | |
1102 | 1117 | /** |
1103 | 1118 | * wp.media.model.Query |
1104 | 1119 | * |
… |
… |
module.exports = PostImage; |
1107 | 1122 | * Note: Do NOT change this.args after the query has been initialized. |
1108 | 1123 | * Things will break. |
1109 | 1124 | * |
| 1125 | * @memberOf wp.media.model |
| 1126 | * |
1110 | 1127 | * @class |
1111 | 1128 | * @augments wp.media.model.Attachments |
1112 | 1129 | * @augments Backbone.Collection |
… |
… |
module.exports = PostImage; |
1116 | 1133 | * @param {object} [options.args] Attachments query arguments. |
1117 | 1134 | * @param {object} [options.args.posts_per_page] |
1118 | 1135 | */ |
1119 | | var Attachments = wp.media.model.Attachments, |
1120 | | Query; |
1121 | | |
1122 | | Query = Attachments.extend({ |
| 1136 | Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{ |
1123 | 1137 | /** |
1124 | | * @global wp.Uploader |
1125 | | * |
1126 | 1138 | * @param {array} [models=[]] Array of initial models to populate the collection. |
1127 | 1139 | * @param {object} [options={}] |
1128 | 1140 | */ |
… |
… |
Query = Attachments.extend({ |
1254 | 1266 | return fallback.sync.apply( this, arguments ); |
1255 | 1267 | } |
1256 | 1268 | } |
1257 | | }, { |
| 1269 | }, /** @lends wp.media.model.Query */{ |
1258 | 1270 | /** |
1259 | 1271 | * @readonly |
1260 | 1272 | */ |
… |
… |
Query = Attachments.extend({ |
1407 | 1419 | module.exports = Query; |
1408 | 1420 | |
1409 | 1421 | },{}],6:[function(require,module,exports){ |
| 1422 | var Attachments = wp.media.model.Attachments, |
| 1423 | Selection; |
| 1424 | |
1410 | 1425 | /** |
1411 | 1426 | * wp.media.model.Selection |
1412 | 1427 | * |
1413 | 1428 | * A selection of attachments. |
1414 | 1429 | * |
| 1430 | * @memberOf wp.media.model |
| 1431 | * |
1415 | 1432 | * @class |
1416 | 1433 | * @augments wp.media.model.Attachments |
1417 | 1434 | * @augments Backbone.Collection |
1418 | 1435 | */ |
1419 | | var Attachments = wp.media.model.Attachments, |
1420 | | Selection; |
1421 | | |
1422 | | Selection = Attachments.extend({ |
| 1436 | Selection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{ |
1423 | 1437 | /** |
1424 | 1438 | * Refresh the `single` model whenever the selection changes. |
1425 | 1439 | * Binds `single` instead of using the context argument to ensure |
-
diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js
index 6d46229a9..383891c8e 100644
|
|
|
1 | 1 | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ |
| 2 | var Selection = wp.media.model.Selection, |
| 3 | Library = wp.media.controller.Library, |
| 4 | CollectionAdd; |
| 5 | |
2 | 6 | /** |
3 | 7 | * wp.media.controller.CollectionAdd |
4 | 8 | * |
5 | 9 | * A state for adding attachments to a collection (e.g. video playlist). |
6 | 10 | * |
| 11 | * @memberOf wp.media.controller |
| 12 | * |
7 | 13 | * @class |
8 | 14 | * @augments wp.media.controller.Library |
9 | 15 | * @augments wp.media.controller.State |
… |
… |
|
32 | 38 | * @param {string} attributes.type The collection's media type. (e.g. 'video'). |
33 | 39 | * @param {string} attributes.collectionType The collection type. (e.g. 'playlist'). |
34 | 40 | */ |
35 | | var Selection = wp.media.model.Selection, |
36 | | Library = wp.media.controller.Library, |
37 | | CollectionAdd; |
38 | | |
39 | | CollectionAdd = Library.extend({ |
| 41 | CollectionAdd = Library.extend(/** @lends wp.media.controller.CollectionAdd.prototype */{ |
40 | 42 | defaults: _.defaults( { |
41 | 43 | // Selection defaults. @see media.model.Selection |
42 | 44 | multiple: 'add', |
… |
… |
CollectionAdd = Library.extend({ |
100 | 102 | module.exports = CollectionAdd; |
101 | 103 | |
102 | 104 | },{}],2:[function(require,module,exports){ |
| 105 | var Library = wp.media.controller.Library, |
| 106 | l10n = wp.media.view.l10n, |
| 107 | $ = jQuery, |
| 108 | CollectionEdit; |
| 109 | |
103 | 110 | /** |
104 | 111 | * wp.media.controller.CollectionEdit |
105 | 112 | * |
106 | 113 | * A state for editing a collection, which is used by audio and video playlists, |
107 | 114 | * and can be used for other collections. |
108 | 115 | * |
| 116 | * @memberOf wp.media.controller |
| 117 | * |
109 | 118 | * @class |
110 | 119 | * @augments wp.media.controller.Library |
111 | 120 | * @augments wp.media.controller.State |
… |
… |
module.exports = CollectionAdd; |
135 | 144 | * @param {string} attributes.type The collection's media type. (e.g. 'video'). |
136 | 145 | * @param {string} attributes.collectionType The collection type. (e.g. 'playlist'). |
137 | 146 | */ |
138 | | var Library = wp.media.controller.Library, |
139 | | l10n = wp.media.view.l10n, |
140 | | $ = jQuery, |
141 | | CollectionEdit; |
142 | | |
143 | | CollectionEdit = Library.extend({ |
| 147 | CollectionEdit = Library.extend(/** @lends wp.media.controller.CollectionEdit.prototype */{ |
144 | 148 | defaults: { |
145 | 149 | multiple: false, |
146 | 150 | sortable: true, |
… |
… |
CollectionEdit = Library.extend({ |
262 | 266 | module.exports = CollectionEdit; |
263 | 267 | |
264 | 268 | },{}],3:[function(require,module,exports){ |
| 269 | var l10n = wp.media.view.l10n, |
| 270 | Cropper; |
| 271 | |
265 | 272 | /** |
266 | 273 | * wp.media.controller.Cropper |
267 | 274 | * |
268 | 275 | * A state for cropping an image. |
269 | 276 | * |
| 277 | * @memberOf wp.media.controller |
| 278 | * |
270 | 279 | * @class |
271 | 280 | * @augments wp.media.controller.State |
272 | 281 | * @augments Backbone.Model |
273 | 282 | */ |
274 | | var l10n = wp.media.view.l10n, |
275 | | Cropper; |
276 | | |
277 | | Cropper = wp.media.controller.State.extend({ |
| 283 | Cropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Cropper.prototype */{ |
278 | 284 | defaults: { |
279 | 285 | id: 'cropper', |
280 | 286 | title: l10n.cropImage, |
… |
… |
Cropper = wp.media.controller.State.extend({ |
384 | 390 | module.exports = Cropper; |
385 | 391 | |
386 | 392 | },{}],4:[function(require,module,exports){ |
| 393 | var Controller = wp.media.controller, |
| 394 | CustomizeImageCropper; |
| 395 | |
387 | 396 | /** |
388 | 397 | * wp.media.controller.CustomizeImageCropper |
389 | 398 | * |
| 399 | * @memberOf wp.media.controller |
| 400 | * |
390 | 401 | * A state for cropping an image. |
391 | 402 | * |
392 | 403 | * @class |
… |
… |
module.exports = Cropper; |
394 | 405 | * @augments wp.media.controller.State |
395 | 406 | * @augments Backbone.Model |
396 | 407 | */ |
397 | | var Controller = wp.media.controller, |
398 | | CustomizeImageCropper; |
399 | | |
400 | | CustomizeImageCropper = Controller.Cropper.extend({ |
| 408 | CustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller.CustomizeImageCropper.prototype */{ |
401 | 409 | doCrop: function( attachment ) { |
402 | 410 | var cropDetails = attachment.get( 'cropDetails' ), |
403 | 411 | control = this.get( 'control' ), |
… |
… |
CustomizeImageCropper = Controller.Cropper.extend({ |
427 | 435 | module.exports = CustomizeImageCropper; |
428 | 436 | |
429 | 437 | },{}],5:[function(require,module,exports){ |
| 438 | var l10n = wp.media.view.l10n, |
| 439 | EditImage; |
| 440 | |
430 | 441 | /** |
431 | 442 | * wp.media.controller.EditImage |
432 | 443 | * |
433 | 444 | * A state for editing (cropping, etc.) an image. |
434 | 445 | * |
| 446 | * @memberOf wp.media.controller |
| 447 | * |
435 | 448 | * @class |
436 | 449 | * @augments wp.media.controller.State |
437 | 450 | * @augments Backbone.Model |
… |
… |
module.exports = CustomizeImageCropper; |
445 | 458 | * @param {string} [attributes.menu=false] Initial mode for the menu region. |
446 | 459 | * @param {string} [attributes.url] Unused. @todo Consider removal. |
447 | 460 | */ |
448 | | var l10n = wp.media.view.l10n, |
449 | | EditImage; |
450 | | |
451 | | EditImage = wp.media.controller.State.extend({ |
| 461 | EditImage = wp.media.controller.State.extend(/** @lends wp.media.controller.EditImage.prototype */{ |
452 | 462 | defaults: { |
453 | 463 | id: 'edit-image', |
454 | 464 | title: l10n.editImage, |
… |
… |
EditImage = wp.media.controller.State.extend({ |
503 | 513 | module.exports = EditImage; |
504 | 514 | |
505 | 515 | },{}],6:[function(require,module,exports){ |
| 516 | var l10n = wp.media.view.l10n, |
| 517 | $ = Backbone.$, |
| 518 | Embed; |
| 519 | |
506 | 520 | /** |
507 | 521 | * wp.media.controller.Embed |
508 | 522 | * |
509 | 523 | * A state for embedding media from a URL. |
510 | 524 | * |
| 525 | * @memberOf wp.media.controller |
| 526 | * |
511 | 527 | * @class |
512 | 528 | * @augments wp.media.controller.State |
513 | 529 | * @augments Backbone.Model |
… |
… |
module.exports = EditImage; |
524 | 540 | * @param {string} [attributes.url] The embed URL. |
525 | 541 | * @param {object} [attributes.metadata={}] Properties of the embed, which will override attributes.url if set. |
526 | 542 | */ |
527 | | var l10n = wp.media.view.l10n, |
528 | | $ = Backbone.$, |
529 | | Embed; |
530 | | |
531 | | Embed = wp.media.controller.State.extend({ |
| 543 | Embed = wp.media.controller.State.extend(/** @lends wp.media.controller.Embed.prototype */{ |
532 | 544 | defaults: { |
533 | 545 | id: 'embed', |
534 | 546 | title: l10n.insertFromUrlTitle, |
… |
… |
Embed = wp.media.controller.State.extend({ |
639 | 651 | module.exports = Embed; |
640 | 652 | |
641 | 653 | },{}],7:[function(require,module,exports){ |
| 654 | var Attachment = wp.media.model.Attachment, |
| 655 | Library = wp.media.controller.Library, |
| 656 | l10n = wp.media.view.l10n, |
| 657 | FeaturedImage; |
| 658 | |
642 | 659 | /** |
643 | 660 | * wp.media.controller.FeaturedImage |
644 | 661 | * |
645 | 662 | * A state for selecting a featured image for a post. |
646 | 663 | * |
| 664 | * @memberOf wp.media.controller |
| 665 | * |
647 | 666 | * @class |
648 | 667 | * @augments wp.media.controller.Library |
649 | 668 | * @augments wp.media.controller.State |
… |
… |
module.exports = Embed; |
670 | 689 | * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user. |
671 | 690 | * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state. |
672 | 691 | */ |
673 | | var Attachment = wp.media.model.Attachment, |
674 | | Library = wp.media.controller.Library, |
675 | | l10n = wp.media.view.l10n, |
676 | | FeaturedImage; |
677 | | |
678 | | FeaturedImage = Library.extend({ |
| 692 | FeaturedImage = Library.extend(/** @lends wp.media.controller.FeaturedImage.prototype */{ |
679 | 693 | defaults: _.defaults({ |
680 | 694 | id: 'featured-image', |
681 | 695 | title: l10n.setFeaturedImageTitle, |
… |
… |
FeaturedImage = Library.extend({ |
761 | 775 | module.exports = FeaturedImage; |
762 | 776 | |
763 | 777 | },{}],8:[function(require,module,exports){ |
| 778 | var Selection = wp.media.model.Selection, |
| 779 | Library = wp.media.controller.Library, |
| 780 | l10n = wp.media.view.l10n, |
| 781 | GalleryAdd; |
| 782 | |
764 | 783 | /** |
765 | 784 | * wp.media.controller.GalleryAdd |
766 | 785 | * |
767 | 786 | * A state for selecting more images to add to a gallery. |
768 | 787 | * |
| 788 | * @memberOf wp.media.controller |
| 789 | * |
769 | 790 | * @class |
770 | 791 | * @augments wp.media.controller.Library |
771 | 792 | * @augments wp.media.controller.State |
… |
… |
module.exports = FeaturedImage; |
792 | 813 | * @param {boolean} [attributes.syncSelection=false] Whether the Attachments selection should be persisted from the last state. |
793 | 814 | * Defaults to false because for this state, because the library of the Edit Gallery state is the selection. |
794 | 815 | */ |
795 | | var Selection = wp.media.model.Selection, |
796 | | Library = wp.media.controller.Library, |
797 | | l10n = wp.media.view.l10n, |
798 | | GalleryAdd; |
799 | | |
800 | | GalleryAdd = Library.extend({ |
| 816 | GalleryAdd = Library.extend(/** @lends wp.media.controller.GalleryAdd.prototype */{ |
801 | 817 | defaults: _.defaults({ |
802 | 818 | id: 'gallery-library', |
803 | 819 | title: l10n.addToGalleryTitle, |
… |
… |
GalleryAdd = Library.extend({ |
852 | 868 | module.exports = GalleryAdd; |
853 | 869 | |
854 | 870 | },{}],9:[function(require,module,exports){ |
| 871 | var Library = wp.media.controller.Library, |
| 872 | l10n = wp.media.view.l10n, |
| 873 | GalleryEdit; |
| 874 | |
855 | 875 | /** |
856 | 876 | * wp.media.controller.GalleryEdit |
857 | 877 | * |
858 | 878 | * A state for editing a gallery's images and settings. |
859 | 879 | * |
| 880 | * @memberOf wp.media.controller |
| 881 | * |
860 | 882 | * @class |
861 | 883 | * @augments wp.media.controller.Library |
862 | 884 | * @augments wp.media.controller.State |
… |
… |
module.exports = GalleryAdd; |
884 | 906 | * @param {view} [attributes.AttachmentView] The single `Attachment` view to be used in the `Attachments`. |
885 | 907 | * If none supplied, defaults to wp.media.view.Attachment.EditLibrary. |
886 | 908 | */ |
887 | | var Library = wp.media.controller.Library, |
888 | | l10n = wp.media.view.l10n, |
889 | | GalleryEdit; |
890 | | |
891 | | GalleryEdit = Library.extend({ |
| 909 | GalleryEdit = Library.extend(/** @lends wp.media.controller.GalleryEdit.prototype */{ |
892 | 910 | defaults: { |
893 | 911 | id: 'gallery-edit', |
894 | 912 | title: l10n.editGalleryTitle, |
… |
… |
GalleryEdit = Library.extend({ |
994 | 1012 | module.exports = GalleryEdit; |
995 | 1013 | |
996 | 1014 | },{}],10:[function(require,module,exports){ |
| 1015 | var State = wp.media.controller.State, |
| 1016 | Library = wp.media.controller.Library, |
| 1017 | l10n = wp.media.view.l10n, |
| 1018 | ImageDetails; |
| 1019 | |
997 | 1020 | /** |
998 | 1021 | * wp.media.controller.ImageDetails |
999 | 1022 | * |
1000 | 1023 | * A state for editing the attachment display settings of an image that's been |
1001 | 1024 | * inserted into the editor. |
1002 | 1025 | * |
| 1026 | * @memberOf wp.media.controller |
| 1027 | * |
1003 | 1028 | * @class |
1004 | 1029 | * @augments wp.media.controller.State |
1005 | 1030 | * @augments Backbone.Model |
… |
… |
module.exports = GalleryEdit; |
1018 | 1043 | * @todo This state inherits some defaults from media.controller.Library.prototype.defaults, |
1019 | 1044 | * however this may not do anything. |
1020 | 1045 | */ |
1021 | | var State = wp.media.controller.State, |
1022 | | Library = wp.media.controller.Library, |
1023 | | l10n = wp.media.view.l10n, |
1024 | | ImageDetails; |
1025 | | |
1026 | | ImageDetails = State.extend({ |
| 1046 | ImageDetails = State.extend(/** @lends wp.media.controller.ImageDetails.prototype */{ |
1027 | 1047 | defaults: _.defaults({ |
1028 | 1048 | id: 'image-details', |
1029 | 1049 | title: l10n.imageDetailsTitle, |
… |
… |
ImageDetails = State.extend({ |
1056 | 1076 | module.exports = ImageDetails; |
1057 | 1077 | |
1058 | 1078 | },{}],11:[function(require,module,exports){ |
| 1079 | var l10n = wp.media.view.l10n, |
| 1080 | getUserSetting = window.getUserSetting, |
| 1081 | setUserSetting = window.setUserSetting, |
| 1082 | Library; |
| 1083 | |
1059 | 1084 | /** |
1060 | 1085 | * wp.media.controller.Library |
1061 | 1086 | * |
1062 | 1087 | * A state for choosing an attachment or group of attachments from the media library. |
1063 | 1088 | * |
| 1089 | * @memberOf wp.media.controller |
| 1090 | * |
1064 | 1091 | * @class |
1065 | 1092 | * @augments wp.media.controller.State |
1066 | 1093 | * @augments Backbone.Model |
… |
… |
module.exports = ImageDetails; |
1090 | 1117 | * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user. |
1091 | 1118 | * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state. |
1092 | 1119 | */ |
1093 | | var l10n = wp.media.view.l10n, |
1094 | | getUserSetting = window.getUserSetting, |
1095 | | setUserSetting = window.setUserSetting, |
1096 | | Library; |
1097 | | |
1098 | | Library = wp.media.controller.State.extend({ |
| 1120 | Library = wp.media.controller.State.extend(/** @lends wp.media.controller.Library.prototype */{ |
1099 | 1121 | defaults: { |
1100 | 1122 | id: 'library', |
1101 | 1123 | title: l10n.mediaLibraryTitle, |
… |
… |
module.exports = Library; |
1352 | 1374 | /** |
1353 | 1375 | * wp.media.controller.MediaLibrary |
1354 | 1376 | * |
| 1377 | * @memberOf wp.media.controller |
| 1378 | * |
1355 | 1379 | * @class |
1356 | 1380 | * @augments wp.media.controller.Library |
1357 | 1381 | * @augments wp.media.controller.State |
… |
… |
module.exports = Library; |
1360 | 1384 | var Library = wp.media.controller.Library, |
1361 | 1385 | MediaLibrary; |
1362 | 1386 | |
1363 | | MediaLibrary = Library.extend({ |
| 1387 | MediaLibrary = Library.extend(/** @lends wp.media.controller.MediaLibrary.prototype */{ |
1364 | 1388 | defaults: _.defaults({ |
1365 | 1389 | // Attachments browser defaults. @see media.view.AttachmentsBrowser |
1366 | 1390 | filterable: 'uploaded', |
… |
… |
module.exports = MediaLibrary; |
1412 | 1436 | * 'browse' mode t be activated on the 'content' view and then fills the region |
1413 | 1437 | * with an AttachmentsBrowser view. |
1414 | 1438 | * |
| 1439 | * @memberOf wp.media.controller |
| 1440 | * |
1415 | 1441 | * @class |
1416 | 1442 | * |
1417 | 1443 | * @param {object} options Options hash for the region. |
… |
… |
var Region = function( options ) { |
1426 | 1452 | // Use Backbone's self-propagating `extend` inheritance method. |
1427 | 1453 | Region.extend = Backbone.Model.extend; |
1428 | 1454 | |
1429 | | _.extend( Region.prototype, { |
| 1455 | _.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{ |
1430 | 1456 | /** |
1431 | 1457 | * Activate a mode. |
1432 | 1458 | * |
… |
… |
_.extend( Region.prototype, { |
1434 | 1460 | * |
1435 | 1461 | * @param {string} mode |
1436 | 1462 | * |
1437 | | * @fires this.view#{this.id}:activate:{this._mode} |
1438 | | * @fires this.view#{this.id}:activate |
1439 | | * @fires this.view#{this.id}:deactivate:{this._mode} |
1440 | | * @fires this.view#{this.id}:deactivate |
| 1463 | * @fires Region#activate |
| 1464 | * @fires Region#deactivate |
1441 | 1465 | * |
1442 | 1466 | * @returns {wp.media.controller.Region} Returns itself to allow chaining. |
1443 | 1467 | */ |
… |
… |
_.extend( Region.prototype, { |
1453 | 1477 | /** |
1454 | 1478 | * Region mode deactivation event. |
1455 | 1479 | * |
1456 | | * @event this.view#{this.id}:deactivate:{this._mode} |
1457 | | * @event this.view#{this.id}:deactivate |
| 1480 | * @event wp.media.controller.Region#deactivate |
1458 | 1481 | */ |
1459 | 1482 | this.trigger('deactivate'); |
1460 | 1483 | |
… |
… |
_.extend( Region.prototype, { |
1464 | 1487 | /** |
1465 | 1488 | * Region mode activation event. |
1466 | 1489 | * |
1467 | | * @event this.view#{this.id}:activate:{this._mode} |
1468 | | * @event this.view#{this.id}:activate |
| 1490 | * @event wp.media.controller.Region#activate |
1469 | 1491 | */ |
1470 | 1492 | this.trigger('activate'); |
1471 | 1493 | return this; |
… |
… |
_.extend( Region.prototype, { |
1477 | 1499 | * |
1478 | 1500 | * @param {string} mode |
1479 | 1501 | * |
1480 | | * @fires this.view#{this.id}:create:{this._mode} |
1481 | | * @fires this.view#{this.id}:create |
1482 | | * @fires this.view#{this.id}:render:{this._mode} |
1483 | | * @fires this.view#{this.id}:render |
| 1502 | * @fires Region#create |
| 1503 | * @fires Region#render |
1484 | 1504 | * |
1485 | 1505 | * @returns {wp.media.controller.Region} Returns itself to allow chaining |
1486 | 1506 | */ |
… |
… |
_.extend( Region.prototype, { |
1498 | 1518 | * |
1499 | 1519 | * Region view creation takes place in an event callback on the frame. |
1500 | 1520 | * |
1501 | | * @event this.view#{this.id}:create:{this._mode} |
1502 | | * @event this.view#{this.id}:create |
| 1521 | * @event wp.media.controller.Region#create |
| 1522 | * @type {object} |
| 1523 | * @property {object} view |
1503 | 1524 | */ |
1504 | 1525 | this.trigger( 'create', set ); |
1505 | 1526 | view = set.view; |
… |
… |
_.extend( Region.prototype, { |
1509 | 1530 | * |
1510 | 1531 | * Region view creation takes place in an event callback on the frame. |
1511 | 1532 | * |
1512 | | * @event this.view#{this.id}:create:{this._mode} |
1513 | | * @event this.view#{this.id}:create |
| 1533 | * @event wp.media.controller.Region#render |
| 1534 | * @type {object} |
1514 | 1535 | */ |
1515 | 1536 | this.trigger( 'render', view ); |
1516 | 1537 | if ( view ) { |
… |
… |
_.extend( Region.prototype, { |
1578 | 1599 | module.exports = Region; |
1579 | 1600 | |
1580 | 1601 | },{}],14:[function(require,module,exports){ |
| 1602 | var Library = wp.media.controller.Library, |
| 1603 | l10n = wp.media.view.l10n, |
| 1604 | ReplaceImage; |
| 1605 | |
1581 | 1606 | /** |
1582 | 1607 | * wp.media.controller.ReplaceImage |
1583 | 1608 | * |
1584 | 1609 | * A state for replacing an image. |
1585 | 1610 | * |
| 1611 | * @memberOf wp.media.controller |
| 1612 | * |
1586 | 1613 | * @class |
1587 | 1614 | * @augments wp.media.controller.Library |
1588 | 1615 | * @augments wp.media.controller.State |
… |
… |
module.exports = Region; |
1609 | 1636 | * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user. |
1610 | 1637 | * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state. |
1611 | 1638 | */ |
1612 | | var Library = wp.media.controller.Library, |
1613 | | l10n = wp.media.view.l10n, |
1614 | | ReplaceImage; |
1615 | | |
1616 | | ReplaceImage = Library.extend({ |
| 1639 | ReplaceImage = Library.extend(/** @lends wp.media.controller.ReplaceImage.prototype */{ |
1617 | 1640 | defaults: _.defaults({ |
1618 | 1641 | id: 'replace-image', |
1619 | 1642 | title: l10n.replaceImageTitle, |
… |
… |
ReplaceImage = Library.extend({ |
1686 | 1709 | module.exports = ReplaceImage; |
1687 | 1710 | |
1688 | 1711 | },{}],15:[function(require,module,exports){ |
| 1712 | var Controller = wp.media.controller, |
| 1713 | SiteIconCropper; |
| 1714 | |
1689 | 1715 | /** |
1690 | 1716 | * wp.media.controller.SiteIconCropper |
1691 | 1717 | * |
1692 | 1718 | * A state for cropping a Site Icon. |
1693 | 1719 | * |
| 1720 | * @memberOf wp.media.controller |
| 1721 | * |
1694 | 1722 | * @class |
1695 | 1723 | * @augments wp.media.controller.Cropper |
1696 | 1724 | * @augments wp.media.controller.State |
1697 | 1725 | * @augments Backbone.Model |
1698 | 1726 | */ |
1699 | | var Controller = wp.media.controller, |
1700 | | SiteIconCropper; |
1701 | | |
1702 | | SiteIconCropper = Controller.Cropper.extend({ |
| 1727 | SiteIconCropper = Controller.Cropper.extend(/** @lends wp.media.controller.SiteIconCropper.prototype */{ |
1703 | 1728 | activate: function() { |
1704 | 1729 | this.frame.on( 'content:create:crop', this.createCropContent, this ); |
1705 | 1730 | this.frame.on( 'close', this.removeCropper, this ); |
… |
… |
module.exports = SiteIconCropper; |
1743 | 1768 | * |
1744 | 1769 | * States are stored as models in a Backbone collection. |
1745 | 1770 | * |
| 1771 | * @memberOf wp.media.controller |
| 1772 | * |
1746 | 1773 | * @since 3.5.0 |
1747 | 1774 | * |
1748 | 1775 | * @class |
… |
… |
var StateMachine = function( states ) { |
1760 | 1787 | // Use Backbone's self-propagating `extend` inheritance method. |
1761 | 1788 | StateMachine.extend = Backbone.Model.extend; |
1762 | 1789 | |
1763 | | _.extend( StateMachine.prototype, Backbone.Events, { |
| 1790 | _.extend( StateMachine.prototype, Backbone.Events,/** @lends wp.media.controller.StateMachine.prototype */{ |
1764 | 1791 | /** |
1765 | 1792 | * Fetch a state. |
1766 | 1793 | * |
… |
… |
_.extend( StateMachine.prototype, Backbone.Events, { |
1844 | 1871 | // Map all event binding and triggering on a StateMachine to its `states` collection. |
1845 | 1872 | _.each([ 'on', 'off', 'trigger' ], function( method ) { |
1846 | 1873 | /** |
| 1874 | * @function on |
| 1875 | * @memberOf wp.media.controller.StateMachine |
| 1876 | * @instance |
| 1877 | * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining. |
| 1878 | */ |
| 1879 | /** |
| 1880 | * @function off |
| 1881 | * @memberOf wp.media.controller.StateMachine |
| 1882 | * @instance |
| 1883 | * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining. |
| 1884 | */ |
| 1885 | /** |
| 1886 | * @function trigger |
| 1887 | * @memberOf wp.media.controller.StateMachine |
| 1888 | * @instance |
1847 | 1889 | * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining. |
1848 | 1890 | */ |
1849 | 1891 | StateMachine.prototype[ method ] = function() { |
… |
… |
module.exports = StateMachine; |
1873 | 1915 | * 'reset' is not triggered automatically. It should be invoked by the |
1874 | 1916 | * proper controller to reset the state to its default. |
1875 | 1917 | * |
| 1918 | * @memberOf wp.media.controller |
| 1919 | * |
1876 | 1920 | * @class |
1877 | 1921 | * @augments Backbone.Model |
1878 | 1922 | */ |
1879 | | var State = Backbone.Model.extend({ |
| 1923 | var State = Backbone.Model.extend(/** @lends wp.media.controller.State.prototype */{ |
1880 | 1924 | /** |
1881 | 1925 | * Constructor. |
1882 | 1926 | * |
… |
… |
module.exports = State; |
2108 | 2152 | * Allows for selecting multiple images in the Insert Media workflow, and then |
2109 | 2153 | * switching to the Insert Gallery workflow while preserving the attachments selection. |
2110 | 2154 | * |
| 2155 | * @memberOf wp.media |
| 2156 | * |
2111 | 2157 | * @mixin |
2112 | 2158 | */ |
2113 | 2159 | var selectionSync = { |
… |
… |
media.view.EditImage = require( './views/edit-image.js' ); |
2317 | 2363 | media.view.Spinner = require( './views/spinner.js' ); |
2318 | 2364 | |
2319 | 2365 | },{"./controllers/collection-add.js":1,"./controllers/collection-edit.js":2,"./controllers/cropper.js":3,"./controllers/customize-image-cropper.js":4,"./controllers/edit-image.js":5,"./controllers/embed.js":6,"./controllers/featured-image.js":7,"./controllers/gallery-add.js":8,"./controllers/gallery-edit.js":9,"./controllers/image-details.js":10,"./controllers/library.js":11,"./controllers/media-library.js":12,"./controllers/region.js":13,"./controllers/replace-image.js":14,"./controllers/site-icon-cropper.js":15,"./controllers/state-machine.js":16,"./controllers/state.js":17,"./utils/selection-sync.js":18,"./views/attachment-compat.js":20,"./views/attachment-filters.js":21,"./views/attachment-filters/all.js":22,"./views/attachment-filters/date.js":23,"./views/attachment-filters/uploaded.js":24,"./views/attachment.js":25,"./views/attachment/details.js":26,"./views/attachment/edit-library.js":27,"./views/attachment/edit-selection.js":28,"./views/attachment/library.js":29,"./views/attachment/selection.js":30,"./views/attachments.js":31,"./views/attachments/browser.js":32,"./views/attachments/selection.js":33,"./views/button-group.js":34,"./views/button.js":35,"./views/cropper.js":36,"./views/edit-image.js":37,"./views/embed.js":38,"./views/embed/image.js":39,"./views/embed/link.js":40,"./views/embed/url.js":41,"./views/focus-manager.js":42,"./views/frame.js":43,"./views/frame/image-details.js":44,"./views/frame/post.js":45,"./views/frame/select.js":46,"./views/iframe.js":47,"./views/image-details.js":48,"./views/label.js":49,"./views/media-frame.js":50,"./views/menu-item.js":51,"./views/menu.js":52,"./views/modal.js":53,"./views/priority-list.js":54,"./views/router-item.js":55,"./views/router.js":56,"./views/search.js":57,"./views/selection.js":58,"./views/settings.js":59,"./views/settings/attachment-display.js":60,"./views/settings/gallery.js":61,"./views/settings/playlist.js":62,"./views/sidebar.js":63,"./views/site-icon-cropper.js":64,"./views/site-icon-preview.js":65,"./views/spinner.js":66,"./views/toolbar.js":67,"./views/toolbar/embed.js":68,"./views/toolbar/select.js":69,"./views/uploader/editor.js":70,"./views/uploader/inline.js":71,"./views/uploader/status-error.js":72,"./views/uploader/status.js":73,"./views/uploader/window.js":74,"./views/view.js":75}],20:[function(require,module,exports){ |
| 2366 | var View = wp.media.View, |
| 2367 | AttachmentCompat; |
| 2368 | |
2320 | 2369 | /** |
2321 | 2370 | * wp.media.view.AttachmentCompat |
2322 | 2371 | * |
2323 | 2372 | * A view to display fields added via the `attachment_fields_to_edit` filter. |
2324 | 2373 | * |
| 2374 | * @memberOf wp.media.view |
| 2375 | * |
2325 | 2376 | * @class |
2326 | 2377 | * @augments wp.media.View |
2327 | 2378 | * @augments wp.Backbone.View |
2328 | 2379 | * @augments Backbone.View |
2329 | 2380 | */ |
2330 | | var View = wp.media.View, |
2331 | | AttachmentCompat; |
2332 | | |
2333 | | AttachmentCompat = View.extend({ |
| 2381 | AttachmentCompat = View.extend(/** @lends wp.media.view.AttachmentCompat.prototype */{ |
2334 | 2382 | tagName: 'form', |
2335 | 2383 | className: 'compat-item', |
2336 | 2384 | |
… |
… |
AttachmentCompat = View.extend({ |
2402 | 2450 | module.exports = AttachmentCompat; |
2403 | 2451 | |
2404 | 2452 | },{}],21:[function(require,module,exports){ |
| 2453 | var $ = jQuery, |
| 2454 | AttachmentFilters; |
| 2455 | |
2405 | 2456 | /** |
2406 | 2457 | * wp.media.view.AttachmentFilters |
2407 | 2458 | * |
| 2459 | * @memberOf wp.media.view |
| 2460 | * |
2408 | 2461 | * @class |
2409 | 2462 | * @augments wp.media.View |
2410 | 2463 | * @augments wp.Backbone.View |
2411 | 2464 | * @augments Backbone.View |
2412 | 2465 | */ |
2413 | | var $ = jQuery, |
2414 | | AttachmentFilters; |
2415 | | |
2416 | | AttachmentFilters = wp.media.View.extend({ |
| 2466 | AttachmentFilters = wp.media.View.extend(/** @lends wp.media.view.AttachmentFilters.prototype */{ |
2417 | 2467 | tagName: 'select', |
2418 | 2468 | className: 'attachment-filters', |
2419 | 2469 | id: 'media-attachment-filters', |
… |
… |
AttachmentFilters = wp.media.View.extend({ |
2479 | 2529 | module.exports = AttachmentFilters; |
2480 | 2530 | |
2481 | 2531 | },{}],22:[function(require,module,exports){ |
| 2532 | var l10n = wp.media.view.l10n, |
| 2533 | All; |
| 2534 | |
2482 | 2535 | /** |
2483 | 2536 | * wp.media.view.AttachmentFilters.All |
2484 | 2537 | * |
| 2538 | * @memberOf wp.media.view.AttachmentFilters |
| 2539 | * |
2485 | 2540 | * @class |
2486 | 2541 | * @augments wp.media.view.AttachmentFilters |
2487 | 2542 | * @augments wp.media.View |
2488 | 2543 | * @augments wp.Backbone.View |
2489 | 2544 | * @augments Backbone.View |
2490 | 2545 | */ |
2491 | | var l10n = wp.media.view.l10n, |
2492 | | All; |
2493 | | |
2494 | | All = wp.media.view.AttachmentFilters.extend({ |
| 2546 | All = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.All.prototype */{ |
2495 | 2547 | createFilters: function() { |
2496 | 2548 | var filters = {}; |
2497 | 2549 | |
… |
… |
All = wp.media.view.AttachmentFilters.extend({ |
2569 | 2621 | module.exports = All; |
2570 | 2622 | |
2571 | 2623 | },{}],23:[function(require,module,exports){ |
| 2624 | var l10n = wp.media.view.l10n, |
| 2625 | DateFilter; |
| 2626 | |
2572 | 2627 | /** |
2573 | 2628 | * A filter dropdown for month/dates. |
2574 | 2629 | * |
| 2630 | * @memberOf wp.media.view.AttachmentFilters |
| 2631 | * |
2575 | 2632 | * @class |
2576 | 2633 | * @augments wp.media.view.AttachmentFilters |
2577 | 2634 | * @augments wp.media.View |
2578 | 2635 | * @augments wp.Backbone.View |
2579 | 2636 | * @augments Backbone.View |
2580 | 2637 | */ |
2581 | | var l10n = wp.media.view.l10n, |
2582 | | DateFilter; |
2583 | | |
2584 | | DateFilter = wp.media.view.AttachmentFilters.extend({ |
| 2638 | DateFilter = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.Date.prototype */{ |
2585 | 2639 | id: 'media-attachment-date-filters', |
2586 | 2640 | |
2587 | 2641 | createFilters: function() { |
… |
… |
DateFilter = wp.media.view.AttachmentFilters.extend({ |
2610 | 2664 | module.exports = DateFilter; |
2611 | 2665 | |
2612 | 2666 | },{}],24:[function(require,module,exports){ |
| 2667 | var l10n = wp.media.view.l10n, |
| 2668 | Uploaded; |
| 2669 | |
2613 | 2670 | /** |
2614 | 2671 | * wp.media.view.AttachmentFilters.Uploaded |
2615 | 2672 | * |
| 2673 | * @memberOf wp.media.view.AttachmentFilters |
| 2674 | * |
2616 | 2675 | * @class |
2617 | 2676 | * @augments wp.media.view.AttachmentFilters |
2618 | 2677 | * @augments wp.media.View |
2619 | 2678 | * @augments wp.Backbone.View |
2620 | 2679 | * @augments Backbone.View |
2621 | 2680 | */ |
2622 | | var l10n = wp.media.view.l10n, |
2623 | | Uploaded; |
2624 | | |
2625 | | Uploaded = wp.media.view.AttachmentFilters.extend({ |
| 2681 | Uploaded = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.Uploaded.prototype */{ |
2626 | 2682 | createFilters: function() { |
2627 | 2683 | var type = this.model.get('type'), |
2628 | 2684 | types = wp.media.view.settings.mimeTypes, |
… |
… |
Uploaded = wp.media.view.AttachmentFilters.extend({ |
2669 | 2725 | module.exports = Uploaded; |
2670 | 2726 | |
2671 | 2727 | },{}],25:[function(require,module,exports){ |
| 2728 | var View = wp.media.View, |
| 2729 | $ = jQuery, |
| 2730 | Attachment; |
| 2731 | |
2672 | 2732 | /** |
2673 | 2733 | * wp.media.view.Attachment |
2674 | 2734 | * |
| 2735 | * @memberOf wp.media.view |
| 2736 | * |
2675 | 2737 | * @class |
2676 | 2738 | * @augments wp.media.View |
2677 | 2739 | * @augments wp.Backbone.View |
2678 | 2740 | * @augments Backbone.View |
2679 | 2741 | */ |
2680 | | var View = wp.media.View, |
2681 | | $ = jQuery, |
2682 | | Attachment; |
2683 | | |
2684 | | Attachment = View.extend({ |
| 2742 | Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{ |
2685 | 2743 | tagName: 'li', |
2686 | 2744 | className: 'attachment', |
2687 | 2745 | template: wp.template('attachment'), |
… |
… |
_.each({ |
3189 | 3247 | album: '_syncAlbum' |
3190 | 3248 | }, function( method, setting ) { |
3191 | 3249 | /** |
| 3250 | * @function _syncCaption |
| 3251 | * @memberOf wp.media.view.Attachment |
| 3252 | * @instance |
| 3253 | * |
| 3254 | * @param {Backbone.Model} model |
| 3255 | * @param {string} value |
| 3256 | * @returns {wp.media.view.Attachment} Returns itself to allow chaining |
| 3257 | */ |
| 3258 | /** |
| 3259 | * @function _syncTitle |
| 3260 | * @memberOf wp.media.view.Attachment |
| 3261 | * @instance |
| 3262 | * |
| 3263 | * @param {Backbone.Model} model |
| 3264 | * @param {string} value |
| 3265 | * @returns {wp.media.view.Attachment} Returns itself to allow chaining |
| 3266 | */ |
| 3267 | /** |
| 3268 | * @function _syncArtist |
| 3269 | * @memberOf wp.media.view.Attachment |
| 3270 | * @instance |
| 3271 | * |
| 3272 | * @param {Backbone.Model} model |
| 3273 | * @param {string} value |
| 3274 | * @returns {wp.media.view.Attachment} Returns itself to allow chaining |
| 3275 | */ |
| 3276 | /** |
| 3277 | * @function _syncAlbum |
| 3278 | * @memberOf wp.media.view.Attachment |
| 3279 | * @instance |
| 3280 | * |
3192 | 3281 | * @param {Backbone.Model} model |
3193 | 3282 | * @param {string} value |
3194 | 3283 | * @returns {wp.media.view.Attachment} Returns itself to allow chaining |
… |
… |
_.each({ |
3215 | 3304 | module.exports = Attachment; |
3216 | 3305 | |
3217 | 3306 | },{}],26:[function(require,module,exports){ |
| 3307 | var Attachment = wp.media.view.Attachment, |
| 3308 | l10n = wp.media.view.l10n, |
| 3309 | Details; |
| 3310 | |
3218 | 3311 | /** |
3219 | 3312 | * wp.media.view.Attachment.Details |
3220 | 3313 | * |
| 3314 | * @memberOf wp.media.view.Attachment |
| 3315 | * |
3221 | 3316 | * @class |
3222 | 3317 | * @augments wp.media.view.Attachment |
3223 | 3318 | * @augments wp.media.View |
3224 | 3319 | * @augments wp.Backbone.View |
3225 | 3320 | * @augments Backbone.View |
3226 | 3321 | */ |
3227 | | var Attachment = wp.media.view.Attachment, |
3228 | | l10n = wp.media.view.l10n, |
3229 | | Details; |
3230 | | |
3231 | | Details = Attachment.extend({ |
| 3322 | Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototype */{ |
3232 | 3323 | tagName: 'div', |
3233 | 3324 | className: 'attachment-details', |
3234 | 3325 | template: wp.template('attachment-details'), |
… |
… |
module.exports = Details; |
3356 | 3447 | /** |
3357 | 3448 | * wp.media.view.Attachment.EditLibrary |
3358 | 3449 | * |
| 3450 | * @memberOf wp.media.view.Attachment |
| 3451 | * |
3359 | 3452 | * @class |
3360 | 3453 | * @augments wp.media.view.Attachment |
3361 | 3454 | * @augments wp.media.View |
3362 | 3455 | * @augments wp.Backbone.View |
3363 | 3456 | * @augments Backbone.View |
3364 | 3457 | */ |
3365 | | var EditLibrary = wp.media.view.Attachment.extend({ |
| 3458 | var EditLibrary = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.EditLibrary.prototype */{ |
3366 | 3459 | buttons: { |
3367 | 3460 | close: true |
3368 | 3461 | } |
… |
… |
module.exports = EditLibrary; |
3372 | 3465 | |
3373 | 3466 | },{}],28:[function(require,module,exports){ |
3374 | 3467 | /** |
3375 | | * wp.media.view.Attachments.EditSelection |
| 3468 | * wp.media.view.Attachment.EditSelection |
| 3469 | * |
| 3470 | * @memberOf wp.media.view.Attachment |
3376 | 3471 | * |
3377 | 3472 | * @class |
3378 | 3473 | * @augments wp.media.view.Attachment.Selection |
… |
… |
module.exports = EditLibrary; |
3381 | 3476 | * @augments wp.Backbone.View |
3382 | 3477 | * @augments Backbone.View |
3383 | 3478 | */ |
3384 | | var EditSelection = wp.media.view.Attachment.Selection.extend({ |
| 3479 | var EditSelection = wp.media.view.Attachment.Selection.extend(/** @lends wp.media.view.Attachment.EditSelection.prototype */{ |
3385 | 3480 | buttons: { |
3386 | 3481 | close: true |
3387 | 3482 | } |
… |
… |
module.exports = EditSelection; |
3393 | 3488 | /** |
3394 | 3489 | * wp.media.view.Attachment.Library |
3395 | 3490 | * |
| 3491 | * @memberOf wp.media.view.Attachment |
| 3492 | * |
3396 | 3493 | * @class |
3397 | 3494 | * @augments wp.media.view.Attachment |
3398 | 3495 | * @augments wp.media.View |
3399 | 3496 | * @augments wp.Backbone.View |
3400 | 3497 | * @augments Backbone.View |
3401 | 3498 | */ |
3402 | | var Library = wp.media.view.Attachment.extend({ |
| 3499 | var Library = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.Library.prototype */{ |
3403 | 3500 | buttons: { |
3404 | 3501 | check: true |
3405 | 3502 | } |
… |
… |
module.exports = Library; |
3411 | 3508 | /** |
3412 | 3509 | * wp.media.view.Attachment.Selection |
3413 | 3510 | * |
| 3511 | * @memberOf wp.media.view.Attachment |
| 3512 | * |
3414 | 3513 | * @class |
3415 | 3514 | * @augments wp.media.view.Attachment |
3416 | 3515 | * @augments wp.media.View |
3417 | 3516 | * @augments wp.Backbone.View |
3418 | 3517 | * @augments Backbone.View |
3419 | 3518 | */ |
3420 | | var Selection = wp.media.view.Attachment.extend({ |
| 3519 | var Selection = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.Selection.prototype */{ |
3421 | 3520 | className: 'attachment selection', |
3422 | 3521 | |
3423 | 3522 | // On click, just select the model, instead of removing the model from |
… |
… |
var Selection = wp.media.view.Attachment.extend({ |
3430 | 3529 | module.exports = Selection; |
3431 | 3530 | |
3432 | 3531 | },{}],31:[function(require,module,exports){ |
| 3532 | var View = wp.media.View, |
| 3533 | $ = jQuery, |
| 3534 | Attachments; |
| 3535 | |
3433 | 3536 | /** |
3434 | 3537 | * wp.media.view.Attachments |
3435 | 3538 | * |
| 3539 | * @memberOf wp.media.view |
| 3540 | * |
3436 | 3541 | * @class |
3437 | 3542 | * @augments wp.media.View |
3438 | 3543 | * @augments wp.Backbone.View |
3439 | 3544 | * @augments Backbone.View |
3440 | 3545 | */ |
3441 | | var View = wp.media.View, |
3442 | | $ = jQuery, |
3443 | | Attachments; |
3444 | | |
3445 | | Attachments = View.extend({ |
| 3546 | Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{ |
3446 | 3547 | tagName: 'ul', |
3447 | 3548 | className: 'attachments', |
3448 | 3549 | |
… |
… |
Attachments = View.extend({ |
3729 | 3830 | module.exports = Attachments; |
3730 | 3831 | |
3731 | 3832 | },{}],32:[function(require,module,exports){ |
| 3833 | var View = wp.media.View, |
| 3834 | mediaTrash = wp.media.view.settings.mediaTrash, |
| 3835 | l10n = wp.media.view.l10n, |
| 3836 | $ = jQuery, |
| 3837 | AttachmentsBrowser; |
| 3838 | |
3732 | 3839 | /** |
3733 | 3840 | * wp.media.view.AttachmentsBrowser |
3734 | 3841 | * |
| 3842 | * @memberOf wp.media.view |
| 3843 | * |
3735 | 3844 | * @class |
3736 | 3845 | * @augments wp.media.View |
3737 | 3846 | * @augments wp.Backbone.View |
… |
… |
module.exports = Attachments; |
3749 | 3858 | * @param {boolean|string} [options.sidebar=true] Whether to create a sidebar for the browser. |
3750 | 3859 | * Accepts true, false, and 'errors'. |
3751 | 3860 | */ |
3752 | | var View = wp.media.View, |
3753 | | mediaTrash = wp.media.view.settings.mediaTrash, |
3754 | | l10n = wp.media.view.l10n, |
3755 | | $ = jQuery, |
3756 | | AttachmentsBrowser; |
3757 | | |
3758 | | AttachmentsBrowser = View.extend({ |
| 3861 | AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.prototype */{ |
3759 | 3862 | tagName: 'div', |
3760 | 3863 | className: 'attachments-browser', |
3761 | 3864 | |
… |
… |
AttachmentsBrowser = View.extend({ |
4205 | 4308 | module.exports = AttachmentsBrowser; |
4206 | 4309 | |
4207 | 4310 | },{}],33:[function(require,module,exports){ |
| 4311 | var Attachments = wp.media.view.Attachments, |
| 4312 | Selection; |
| 4313 | |
4208 | 4314 | /** |
4209 | 4315 | * wp.media.view.Attachments.Selection |
4210 | 4316 | * |
| 4317 | * @memberOf wp.media.view.Attachments |
| 4318 | * |
4211 | 4319 | * @class |
4212 | 4320 | * @augments wp.media.view.Attachments |
4213 | 4321 | * @augments wp.media.View |
4214 | 4322 | * @augments wp.Backbone.View |
4215 | 4323 | * @augments Backbone.View |
4216 | 4324 | */ |
4217 | | var Attachments = wp.media.view.Attachments, |
4218 | | Selection; |
4219 | | |
4220 | | Selection = Attachments.extend({ |
| 4325 | Selection = Attachments.extend(/** @lends wp.media.view.Attachments.Selection.prototype */{ |
4221 | 4326 | events: {}, |
4222 | 4327 | initialize: function() { |
4223 | 4328 | _.defaults( this.options, { |
… |
… |
Selection = Attachments.extend({ |
4235 | 4340 | module.exports = Selection; |
4236 | 4341 | |
4237 | 4342 | },{}],34:[function(require,module,exports){ |
| 4343 | var $ = Backbone.$, |
| 4344 | ButtonGroup; |
| 4345 | |
4238 | 4346 | /** |
4239 | 4347 | * wp.media.view.ButtonGroup |
4240 | 4348 | * |
| 4349 | * @memberOf wp.media.view |
| 4350 | * |
4241 | 4351 | * @class |
4242 | 4352 | * @augments wp.media.View |
4243 | 4353 | * @augments wp.Backbone.View |
4244 | 4354 | * @augments Backbone.View |
4245 | 4355 | */ |
4246 | | var $ = Backbone.$, |
4247 | | ButtonGroup; |
4248 | | |
4249 | | ButtonGroup = wp.media.View.extend({ |
| 4356 | ButtonGroup = wp.media.View.extend(/** @lends wp.media.view.ButtonGroup.prototype */{ |
4250 | 4357 | tagName: 'div', |
4251 | 4358 | className: 'button-group button-large media-button-group', |
4252 | 4359 | |
… |
… |
module.exports = ButtonGroup; |
4284 | 4391 | /** |
4285 | 4392 | * wp.media.view.Button |
4286 | 4393 | * |
| 4394 | * @memberOf wp.media.view |
| 4395 | * |
4287 | 4396 | * @class |
4288 | 4397 | * @augments wp.media.View |
4289 | 4398 | * @augments wp.Backbone.View |
4290 | 4399 | * @augments Backbone.View |
4291 | 4400 | */ |
4292 | | var Button = wp.media.View.extend({ |
| 4401 | var Button = wp.media.View.extend(/** @lends wp.media.view.Button.prototype */{ |
4293 | 4402 | tagName: 'button', |
4294 | 4403 | className: 'media-button', |
4295 | 4404 | attributes: { type: 'button' }, |
… |
… |
var Button = wp.media.View.extend({ |
4367 | 4476 | module.exports = Button; |
4368 | 4477 | |
4369 | 4478 | },{}],36:[function(require,module,exports){ |
| 4479 | var View = wp.media.View, |
| 4480 | UploaderStatus = wp.media.view.UploaderStatus, |
| 4481 | l10n = wp.media.view.l10n, |
| 4482 | $ = jQuery, |
| 4483 | Cropper; |
| 4484 | |
4370 | 4485 | /** |
4371 | 4486 | * wp.media.view.Cropper |
4372 | 4487 | * |
… |
… |
module.exports = Button; |
4376 | 4491 | * wp.customize.HeaderControl.calculateImageSelectOptions via |
4377 | 4492 | * wp.customize.HeaderControl.openMM. |
4378 | 4493 | * |
| 4494 | * @memberOf wp.media.view |
| 4495 | * |
4379 | 4496 | * @class |
4380 | 4497 | * @augments wp.media.View |
4381 | 4498 | * @augments wp.Backbone.View |
4382 | 4499 | * @augments Backbone.View |
4383 | 4500 | */ |
4384 | | var View = wp.media.View, |
4385 | | UploaderStatus = wp.media.view.UploaderStatus, |
4386 | | l10n = wp.media.view.l10n, |
4387 | | $ = jQuery, |
4388 | | Cropper; |
4389 | | |
4390 | | Cropper = View.extend({ |
| 4501 | Cropper = View.extend(/** @lends wp.media.view.Cropper.prototype */{ |
4391 | 4502 | className: 'crop-content', |
4392 | 4503 | template: wp.template('crop-content'), |
4393 | 4504 | initialize: function() { |
… |
… |
Cropper = View.extend({ |
4434 | 4545 | module.exports = Cropper; |
4435 | 4546 | |
4436 | 4547 | },{}],37:[function(require,module,exports){ |
| 4548 | var View = wp.media.View, |
| 4549 | EditImage; |
| 4550 | |
4437 | 4551 | /** |
4438 | 4552 | * wp.media.view.EditImage |
4439 | 4553 | * |
| 4554 | * @memberOf wp.media.view |
| 4555 | * |
4440 | 4556 | * @class |
4441 | 4557 | * @augments wp.media.View |
4442 | 4558 | * @augments wp.Backbone.View |
4443 | 4559 | * @augments Backbone.View |
4444 | 4560 | */ |
4445 | | var View = wp.media.View, |
4446 | | EditImage; |
4447 | | |
4448 | | EditImage = View.extend({ |
| 4561 | EditImage = View.extend(/** @lends wp.media.view.EditImage.prototype */{ |
4449 | 4562 | className: 'image-editor', |
4450 | 4563 | template: wp.template('image-editor'), |
4451 | 4564 | |
… |
… |
module.exports = EditImage; |
4493 | 4606 | /** |
4494 | 4607 | * wp.media.view.Embed |
4495 | 4608 | * |
| 4609 | * @memberOf wp.media.view |
| 4610 | * |
4496 | 4611 | * @class |
4497 | 4612 | * @augments wp.media.View |
4498 | 4613 | * @augments wp.Backbone.View |
4499 | 4614 | * @augments Backbone.View |
4500 | 4615 | */ |
4501 | | var Embed = wp.media.View.extend({ |
| 4616 | var Embed = wp.media.View.extend(/** @lends wp.media.view.Ember.prototype */{ |
4502 | 4617 | className: 'media-embed', |
4503 | 4618 | |
4504 | 4619 | initialize: function() { |
… |
… |
var Embed = wp.media.View.extend({ |
4554 | 4669 | module.exports = Embed; |
4555 | 4670 | |
4556 | 4671 | },{}],39:[function(require,module,exports){ |
| 4672 | var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay, |
| 4673 | EmbedImage; |
| 4674 | |
4557 | 4675 | /** |
4558 | 4676 | * wp.media.view.EmbedImage |
4559 | 4677 | * |
| 4678 | * @memberOf wp.media.view |
| 4679 | * |
4560 | 4680 | * @class |
4561 | 4681 | * @augments wp.media.view.Settings.AttachmentDisplay |
4562 | 4682 | * @augments wp.media.view.Settings |
… |
… |
module.exports = Embed; |
4564 | 4684 | * @augments wp.Backbone.View |
4565 | 4685 | * @augments Backbone.View |
4566 | 4686 | */ |
4567 | | var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay, |
4568 | | EmbedImage; |
4569 | | |
4570 | | EmbedImage = AttachmentDisplay.extend({ |
| 4687 | EmbedImage = AttachmentDisplay.extend(/** @lends wp.media.view.EmbedImage.prototype */{ |
4571 | 4688 | className: 'embed-media-settings', |
4572 | 4689 | template: wp.template('embed-image-settings'), |
4573 | 4690 | |
… |
… |
EmbedImage = AttachmentDisplay.extend({ |
4587 | 4704 | module.exports = EmbedImage; |
4588 | 4705 | |
4589 | 4706 | },{}],40:[function(require,module,exports){ |
| 4707 | var $ = jQuery, |
| 4708 | EmbedLink; |
| 4709 | |
4590 | 4710 | /** |
4591 | 4711 | * wp.media.view.EmbedLink |
4592 | 4712 | * |
| 4713 | * @memberOf wp.media.view |
| 4714 | * |
4593 | 4715 | * @class |
4594 | 4716 | * @augments wp.media.view.Settings |
4595 | 4717 | * @augments wp.media.View |
4596 | 4718 | * @augments wp.Backbone.View |
4597 | 4719 | * @augments Backbone.View |
4598 | 4720 | */ |
4599 | | var $ = jQuery, |
4600 | | EmbedLink; |
4601 | | |
4602 | | EmbedLink = wp.media.view.Settings.extend({ |
| 4721 | EmbedLink = wp.media.view.Settings.extend(/** @lends wp.media.view.EmbedLink.prototype */{ |
4603 | 4722 | className: 'embed-link-settings', |
4604 | 4723 | template: wp.template('embed-link-settings'), |
4605 | 4724 | |
… |
… |
EmbedLink = wp.media.view.Settings.extend({ |
4684 | 4803 | module.exports = EmbedLink; |
4685 | 4804 | |
4686 | 4805 | },{}],41:[function(require,module,exports){ |
| 4806 | var View = wp.media.View, |
| 4807 | $ = jQuery, |
| 4808 | EmbedUrl; |
| 4809 | |
4687 | 4810 | /** |
4688 | 4811 | * wp.media.view.EmbedUrl |
4689 | 4812 | * |
| 4813 | * @memberOf wp.media.view |
| 4814 | * |
4690 | 4815 | * @class |
4691 | 4816 | * @augments wp.media.View |
4692 | 4817 | * @augments wp.Backbone.View |
4693 | 4818 | * @augments Backbone.View |
4694 | 4819 | */ |
4695 | | var View = wp.media.View, |
4696 | | $ = jQuery, |
4697 | | EmbedUrl; |
4698 | | |
4699 | | EmbedUrl = View.extend({ |
| 4820 | EmbedUrl = View.extend(/** @lends wp.media.view.EmbedUrl.prototype */{ |
4700 | 4821 | tagName: 'label', |
4701 | 4822 | className: 'embed-url', |
4702 | 4823 | |
… |
… |
module.exports = EmbedUrl; |
4766 | 4887 | /** |
4767 | 4888 | * wp.media.view.FocusManager |
4768 | 4889 | * |
| 4890 | * @memberOf wp.media.view |
| 4891 | * |
4769 | 4892 | * @class |
4770 | 4893 | * @augments wp.media.View |
4771 | 4894 | * @augments wp.Backbone.View |
4772 | 4895 | * @augments Backbone.View |
4773 | 4896 | */ |
4774 | | var FocusManager = wp.media.View.extend({ |
| 4897 | var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.prototype */{ |
4775 | 4898 | |
4776 | 4899 | events: { |
4777 | 4900 | 'keydown': 'constrainTabbing' |
… |
… |
module.exports = FocusManager; |
4815 | 4938 | * A frame is a composite view consisting of one or more regions and one or more |
4816 | 4939 | * states. |
4817 | 4940 | * |
| 4941 | * @memberOf wp.media.view |
| 4942 | * |
4818 | 4943 | * @see wp.media.controller.State |
4819 | 4944 | * @see wp.media.controller.Region |
4820 | 4945 | * |
… |
… |
module.exports = FocusManager; |
4824 | 4949 | * @augments Backbone.View |
4825 | 4950 | * @mixes wp.media.controller.StateMachine |
4826 | 4951 | */ |
4827 | | var Frame = wp.media.View.extend({ |
| 4952 | var Frame = wp.media.View.extend(/** @lends wp.media.view.Frame.prototype */{ |
4828 | 4953 | initialize: function() { |
4829 | 4954 | _.defaults( this.options, { |
4830 | 4955 | mode: [ 'select' ] |
… |
… |
var Frame = wp.media.View.extend({ |
4952 | 5077 | /** |
4953 | 5078 | * Frame mode deactivation event. |
4954 | 5079 | * |
4955 | | * @event this#{mode}:deactivate |
| 5080 | * @event wp.media.view.Frame#{mode}:deactivate |
4956 | 5081 | */ |
4957 | 5082 | this.trigger( mode + ':deactivate' ); |
4958 | 5083 | |
… |
… |
_.extend( Frame.prototype, wp.media.controller.StateMachine.prototype ); |
4975 | 5100 | module.exports = Frame; |
4976 | 5101 | |
4977 | 5102 | },{}],44:[function(require,module,exports){ |
| 5103 | var Select = wp.media.view.MediaFrame.Select, |
| 5104 | l10n = wp.media.view.l10n, |
| 5105 | ImageDetails; |
| 5106 | |
4978 | 5107 | /** |
4979 | 5108 | * wp.media.view.MediaFrame.ImageDetails |
4980 | 5109 | * |
4981 | 5110 | * A media frame for manipulating an image that's already been inserted |
4982 | 5111 | * into a post. |
4983 | 5112 | * |
| 5113 | * @memberOf wp.media.view.MediaFrame |
| 5114 | * |
4984 | 5115 | * @class |
4985 | 5116 | * @augments wp.media.view.MediaFrame.Select |
4986 | 5117 | * @augments wp.media.view.MediaFrame |
… |
… |
module.exports = Frame; |
4990 | 5121 | * @augments Backbone.View |
4991 | 5122 | * @mixes wp.media.controller.StateMachine |
4992 | 5123 | */ |
4993 | | var Select = wp.media.view.MediaFrame.Select, |
4994 | | l10n = wp.media.view.l10n, |
4995 | | ImageDetails; |
4996 | | |
4997 | | ImageDetails = Select.extend({ |
| 5124 | ImageDetails = Select.extend(/** @lends wp.media.view.MediaFrame.ImageDetails.prototype */{ |
4998 | 5125 | defaults: { |
4999 | 5126 | id: 'image', |
5000 | 5127 | url: '', |
… |
… |
ImageDetails = Select.extend({ |
5153 | 5280 | module.exports = ImageDetails; |
5154 | 5281 | |
5155 | 5282 | },{}],45:[function(require,module,exports){ |
| 5283 | var Select = wp.media.view.MediaFrame.Select, |
| 5284 | Library = wp.media.controller.Library, |
| 5285 | l10n = wp.media.view.l10n, |
| 5286 | Post; |
| 5287 | |
5156 | 5288 | /** |
5157 | 5289 | * wp.media.view.MediaFrame.Post |
5158 | 5290 | * |
5159 | 5291 | * The frame for manipulating media on the Edit Post page. |
5160 | 5292 | * |
| 5293 | * @memberOf wp.media.view.MediaFrame |
| 5294 | * |
5161 | 5295 | * @class |
5162 | 5296 | * @augments wp.media.view.MediaFrame.Select |
5163 | 5297 | * @augments wp.media.view.MediaFrame |
… |
… |
module.exports = ImageDetails; |
5167 | 5301 | * @augments Backbone.View |
5168 | 5302 | * @mixes wp.media.controller.StateMachine |
5169 | 5303 | */ |
5170 | | var Select = wp.media.view.MediaFrame.Select, |
5171 | | Library = wp.media.controller.Library, |
5172 | | l10n = wp.media.view.l10n, |
5173 | | Post; |
5174 | | |
5175 | | Post = Select.extend({ |
| 5304 | Post = Select.extend(/** @lends wp.media.view.MediaFrame.Post.prototype */{ |
5176 | 5305 | initialize: function() { |
5177 | 5306 | this.counts = { |
5178 | 5307 | audio: { |
… |
… |
Post = Select.extend({ |
5598 | 5727 | requires: { selection: true }, |
5599 | 5728 | |
5600 | 5729 | /** |
| 5730 | * @callback |
5601 | 5731 | * @fires wp.media.controller.State#insert |
5602 | 5732 | */ |
5603 | 5733 | click: function() { |
… |
… |
Post = Select.extend({ |
5888 | 6018 | module.exports = Post; |
5889 | 6019 | |
5890 | 6020 | },{}],46:[function(require,module,exports){ |
| 6021 | var MediaFrame = wp.media.view.MediaFrame, |
| 6022 | l10n = wp.media.view.l10n, |
| 6023 | Select; |
| 6024 | |
5891 | 6025 | /** |
5892 | 6026 | * wp.media.view.MediaFrame.Select |
5893 | 6027 | * |
5894 | 6028 | * A frame for selecting an item or items from the media library. |
5895 | 6029 | * |
| 6030 | * @memberOf wp.media.view.MediaFrame |
| 6031 | * |
5896 | 6032 | * @class |
5897 | 6033 | * @augments wp.media.view.MediaFrame |
5898 | 6034 | * @augments wp.media.view.Frame |
… |
… |
module.exports = Post; |
5901 | 6037 | * @augments Backbone.View |
5902 | 6038 | * @mixes wp.media.controller.StateMachine |
5903 | 6039 | */ |
5904 | | |
5905 | | var MediaFrame = wp.media.view.MediaFrame, |
5906 | | l10n = wp.media.view.l10n, |
5907 | | Select; |
5908 | | |
5909 | | Select = MediaFrame.extend({ |
| 6040 | Select = MediaFrame.extend(/** @lends wp.media.view.MediaFrame.Select.prototype */{ |
5910 | 6041 | initialize: function() { |
5911 | 6042 | // Call 'initialize' directly on the parent class. |
5912 | 6043 | MediaFrame.prototype.initialize.apply( this, arguments ); |
… |
… |
module.exports = Select; |
6062 | 6193 | /** |
6063 | 6194 | * wp.media.view.Iframe |
6064 | 6195 | * |
| 6196 | * @memberOf wp.media.view |
| 6197 | * |
6065 | 6198 | * @class |
6066 | 6199 | * @augments wp.media.View |
6067 | 6200 | * @augments wp.Backbone.View |
6068 | 6201 | * @augments Backbone.View |
6069 | 6202 | */ |
6070 | | var Iframe = wp.media.View.extend({ |
| 6203 | var Iframe = wp.media.View.extend(/** @lends wp.media.view.Iframe.prototype */{ |
6071 | 6204 | className: 'media-iframe', |
6072 | 6205 | /** |
6073 | 6206 | * @returns {wp.media.view.Iframe} Returns itself to allow chaining |
… |
… |
var Iframe = wp.media.View.extend({ |
6083 | 6216 | module.exports = Iframe; |
6084 | 6217 | |
6085 | 6218 | },{}],48:[function(require,module,exports){ |
| 6219 | var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay, |
| 6220 | $ = jQuery, |
| 6221 | ImageDetails; |
| 6222 | |
6086 | 6223 | /** |
6087 | 6224 | * wp.media.view.ImageDetails |
6088 | 6225 | * |
| 6226 | * @memberOf wp.media.view |
| 6227 | * |
6089 | 6228 | * @class |
6090 | 6229 | * @augments wp.media.view.Settings.AttachmentDisplay |
6091 | 6230 | * @augments wp.media.view.Settings |
… |
… |
module.exports = Iframe; |
6093 | 6232 | * @augments wp.Backbone.View |
6094 | 6233 | * @augments Backbone.View |
6095 | 6234 | */ |
6096 | | var AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay, |
6097 | | $ = jQuery, |
6098 | | ImageDetails; |
6099 | | |
6100 | | ImageDetails = AttachmentDisplay.extend({ |
| 6235 | ImageDetails = AttachmentDisplay.extend(/** @lends wp.media.view.ImageDetails.prototype */{ |
6101 | 6236 | className: 'image-details', |
6102 | 6237 | template: wp.template('image-details'), |
6103 | 6238 | events: _.defaults( AttachmentDisplay.prototype.events, { |
… |
… |
module.exports = ImageDetails; |
6254 | 6389 | /** |
6255 | 6390 | * wp.media.view.Label |
6256 | 6391 | * |
| 6392 | * @memberOf wp.media.view |
| 6393 | * |
6257 | 6394 | * @class |
6258 | 6395 | * @augments wp.media.View |
6259 | 6396 | * @augments wp.Backbone.View |
6260 | 6397 | * @augments Backbone.View |
6261 | 6398 | */ |
6262 | | var Label = wp.media.View.extend({ |
| 6399 | var Label = wp.media.View.extend(/** @lends wp.media.view.Label.prototype */{ |
6263 | 6400 | tagName: 'label', |
6264 | 6401 | className: 'screen-reader-text', |
6265 | 6402 | |
… |
… |
var Label = wp.media.View.extend({ |
6277 | 6414 | module.exports = Label; |
6278 | 6415 | |
6279 | 6416 | },{}],50:[function(require,module,exports){ |
| 6417 | var Frame = wp.media.view.Frame, |
| 6418 | $ = jQuery, |
| 6419 | MediaFrame; |
| 6420 | |
6280 | 6421 | /** |
6281 | 6422 | * wp.media.view.MediaFrame |
6282 | 6423 | * |
6283 | 6424 | * The frame used to create the media modal. |
6284 | 6425 | * |
| 6426 | * @memberOf wp.media.view |
| 6427 | * |
6285 | 6428 | * @class |
6286 | 6429 | * @augments wp.media.view.Frame |
6287 | 6430 | * @augments wp.media.View |
… |
… |
module.exports = Label; |
6289 | 6432 | * @augments Backbone.View |
6290 | 6433 | * @mixes wp.media.controller.StateMachine |
6291 | 6434 | */ |
6292 | | var Frame = wp.media.view.Frame, |
6293 | | $ = jQuery, |
6294 | | MediaFrame; |
6295 | | |
6296 | | MediaFrame = Frame.extend({ |
| 6435 | MediaFrame = Frame.extend(/** @lends wp.media.view.MediaFrame.prototype */{ |
6297 | 6436 | className: 'media-frame', |
6298 | 6437 | template: wp.template('media-frame'), |
6299 | 6438 | regions: ['menu','title','content','toolbar','router'], |
… |
… |
MediaFrame = Frame.extend({ |
6303 | 6442 | }, |
6304 | 6443 | |
6305 | 6444 | /** |
6306 | | * @global wp.Uploader |
| 6445 | * @constructs |
6307 | 6446 | */ |
6308 | 6447 | initialize: function() { |
6309 | 6448 | Frame.prototype.initialize.apply( this, arguments ); |
… |
… |
MediaFrame = Frame.extend({ |
6511 | 6650 | // Map some of the modal's methods to the frame. |
6512 | 6651 | _.each(['open','close','attach','detach','escape'], function( method ) { |
6513 | 6652 | /** |
| 6653 | * @function open |
| 6654 | * @memberOf wp.media.view.MediaFrame |
| 6655 | * @instance |
| 6656 | * |
| 6657 | * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining |
| 6658 | */ |
| 6659 | /** |
| 6660 | * @function close |
| 6661 | * @memberOf wp.media.view.MediaFrame |
| 6662 | * @instance |
| 6663 | * |
| 6664 | * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining |
| 6665 | */ |
| 6666 | /** |
| 6667 | * @function attach |
| 6668 | * @memberOf wp.media.view.MediaFrame |
| 6669 | * @instance |
| 6670 | * |
| 6671 | * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining |
| 6672 | */ |
| 6673 | /** |
| 6674 | * @function detach |
| 6675 | * @memberOf wp.media.view.MediaFrame |
| 6676 | * @instance |
| 6677 | * |
| 6678 | * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining |
| 6679 | */ |
| 6680 | /** |
| 6681 | * @function escape |
| 6682 | * @memberOf wp.media.view.MediaFrame |
| 6683 | * @instance |
| 6684 | * |
6514 | 6685 | * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining |
6515 | 6686 | */ |
6516 | 6687 | MediaFrame.prototype[ method ] = function() { |
… |
… |
_.each(['open','close','attach','detach','escape'], function( method ) { |
6524 | 6695 | module.exports = MediaFrame; |
6525 | 6696 | |
6526 | 6697 | },{}],51:[function(require,module,exports){ |
| 6698 | var $ = jQuery, |
| 6699 | MenuItem; |
| 6700 | |
6527 | 6701 | /** |
6528 | 6702 | * wp.media.view.MenuItem |
6529 | 6703 | * |
| 6704 | * @memberOf wp.media.view |
| 6705 | * |
6530 | 6706 | * @class |
6531 | 6707 | * @augments wp.media.View |
6532 | 6708 | * @augments wp.Backbone.View |
6533 | 6709 | * @augments Backbone.View |
6534 | 6710 | */ |
6535 | | var $ = jQuery, |
6536 | | MenuItem; |
6537 | | |
6538 | | MenuItem = wp.media.View.extend({ |
| 6711 | MenuItem = wp.media.View.extend(/** @lends wp.media.view.MenuItem.prototype */{ |
6539 | 6712 | tagName: 'a', |
6540 | 6713 | className: 'media-menu-item', |
6541 | 6714 | |
… |
… |
MenuItem = wp.media.View.extend({ |
6596 | 6769 | module.exports = MenuItem; |
6597 | 6770 | |
6598 | 6771 | },{}],52:[function(require,module,exports){ |
| 6772 | var MenuItem = wp.media.view.MenuItem, |
| 6773 | PriorityList = wp.media.view.PriorityList, |
| 6774 | Menu; |
| 6775 | |
6599 | 6776 | /** |
6600 | 6777 | * wp.media.view.Menu |
6601 | 6778 | * |
| 6779 | * @memberOf wp.media.view |
| 6780 | * |
6602 | 6781 | * @class |
6603 | 6782 | * @augments wp.media.view.PriorityList |
6604 | 6783 | * @augments wp.media.View |
6605 | 6784 | * @augments wp.Backbone.View |
6606 | 6785 | * @augments Backbone.View |
6607 | 6786 | */ |
6608 | | var MenuItem = wp.media.view.MenuItem, |
6609 | | PriorityList = wp.media.view.PriorityList, |
6610 | | Menu; |
6611 | | |
6612 | | Menu = PriorityList.extend({ |
| 6787 | Menu = PriorityList.extend(/** @lends wp.media.view.Menu.prototype */{ |
6613 | 6788 | tagName: 'div', |
6614 | 6789 | className: 'media-menu', |
6615 | 6790 | property: 'state', |
… |
… |
Menu = PriorityList.extend({ |
6713 | 6888 | module.exports = Menu; |
6714 | 6889 | |
6715 | 6890 | },{}],53:[function(require,module,exports){ |
| 6891 | var $ = jQuery, |
| 6892 | Modal; |
| 6893 | |
6716 | 6894 | /** |
6717 | 6895 | * wp.media.view.Modal |
6718 | 6896 | * |
6719 | 6897 | * A modal view, which the media modal uses as its default container. |
6720 | 6898 | * |
| 6899 | * @memberOf wp.media.view |
| 6900 | * |
6721 | 6901 | * @class |
6722 | 6902 | * @augments wp.media.View |
6723 | 6903 | * @augments wp.Backbone.View |
6724 | 6904 | * @augments Backbone.View |
6725 | 6905 | */ |
6726 | | var $ = jQuery, |
6727 | | Modal; |
6728 | | |
6729 | | Modal = wp.media.View.extend({ |
| 6906 | Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{ |
6730 | 6907 | tagName: 'div', |
6731 | 6908 | template: wp.template('media-modal'), |
6732 | 6909 | |
… |
… |
module.exports = Modal; |
6937 | 7114 | /** |
6938 | 7115 | * wp.media.view.PriorityList |
6939 | 7116 | * |
| 7117 | * @memberOf wp.media.view |
| 7118 | * |
6940 | 7119 | * @class |
6941 | 7120 | * @augments wp.media.View |
6942 | 7121 | * @augments wp.Backbone.View |
6943 | 7122 | * @augments Backbone.View |
6944 | 7123 | */ |
6945 | | var PriorityList = wp.media.View.extend({ |
| 7124 | var PriorityList = wp.media.View.extend(/** @lends wp.media.view.PriorityList.prototype */{ |
6946 | 7125 | tagName: 'div', |
6947 | 7126 | |
6948 | 7127 | initialize: function() { |
… |
… |
module.exports = PriorityList; |
7034 | 7213 | /** |
7035 | 7214 | * wp.media.view.RouterItem |
7036 | 7215 | * |
| 7216 | * @memberOf wp.media.view |
| 7217 | * |
7037 | 7218 | * @class |
7038 | 7219 | * @augments wp.media.view.MenuItem |
7039 | 7220 | * @augments wp.media.View |
7040 | 7221 | * @augments wp.Backbone.View |
7041 | 7222 | * @augments Backbone.View |
7042 | 7223 | */ |
7043 | | var RouterItem = wp.media.view.MenuItem.extend({ |
| 7224 | var RouterItem = wp.media.view.MenuItem.extend(/** @lends wp.media.view.RouterItem.prototype */{ |
7044 | 7225 | /** |
7045 | 7226 | * On click handler to activate the content region's corresponding mode. |
7046 | 7227 | */ |
… |
… |
var RouterItem = wp.media.view.MenuItem.extend({ |
7055 | 7236 | module.exports = RouterItem; |
7056 | 7237 | |
7057 | 7238 | },{}],56:[function(require,module,exports){ |
| 7239 | var Menu = wp.media.view.Menu, |
| 7240 | Router; |
| 7241 | |
7058 | 7242 | /** |
7059 | 7243 | * wp.media.view.Router |
7060 | 7244 | * |
| 7245 | * @memberOf wp.media.view |
| 7246 | * |
7061 | 7247 | * @class |
7062 | 7248 | * @augments wp.media.view.Menu |
7063 | 7249 | * @augments wp.media.view.PriorityList |
… |
… |
module.exports = RouterItem; |
7065 | 7251 | * @augments wp.Backbone.View |
7066 | 7252 | * @augments Backbone.View |
7067 | 7253 | */ |
7068 | | var Menu = wp.media.view.Menu, |
7069 | | Router; |
7070 | | |
7071 | | Router = Menu.extend({ |
| 7254 | Router = Menu.extend(/** @lends wp.media.view.Router.prototype */{ |
7072 | 7255 | tagName: 'div', |
7073 | 7256 | className: 'media-router', |
7074 | 7257 | property: 'contentMode', |
… |
… |
Router = Menu.extend({ |
7092 | 7275 | module.exports = Router; |
7093 | 7276 | |
7094 | 7277 | },{}],57:[function(require,module,exports){ |
| 7278 | var l10n = wp.media.view.l10n, |
| 7279 | Search; |
| 7280 | |
7095 | 7281 | /** |
7096 | 7282 | * wp.media.view.Search |
7097 | 7283 | * |
| 7284 | * @memberOf wp.media.view |
| 7285 | * |
7098 | 7286 | * @class |
7099 | 7287 | * @augments wp.media.View |
7100 | 7288 | * @augments wp.Backbone.View |
7101 | 7289 | * @augments Backbone.View |
7102 | 7290 | */ |
7103 | | var l10n = wp.media.view.l10n, |
7104 | | Search; |
7105 | | |
7106 | | Search = wp.media.View.extend({ |
| 7291 | Search = wp.media.View.extend(/** @lends wp.media.view.Search.prototype */{ |
7107 | 7292 | tagName: 'input', |
7108 | 7293 | className: 'search', |
7109 | 7294 | id: 'media-search-input', |
… |
… |
Search = wp.media.View.extend({ |
7138 | 7323 | module.exports = Search; |
7139 | 7324 | |
7140 | 7325 | },{}],58:[function(require,module,exports){ |
| 7326 | var l10n = wp.media.view.l10n, |
| 7327 | Selection; |
| 7328 | |
7141 | 7329 | /** |
7142 | 7330 | * wp.media.view.Selection |
7143 | 7331 | * |
| 7332 | * @memberOf wp.media.view |
| 7333 | * |
7144 | 7334 | * @class |
7145 | 7335 | * @augments wp.media.View |
7146 | 7336 | * @augments wp.Backbone.View |
7147 | 7337 | * @augments Backbone.View |
7148 | 7338 | */ |
7149 | | var l10n = wp.media.view.l10n, |
7150 | | Selection; |
7151 | | |
7152 | | Selection = wp.media.View.extend({ |
| 7339 | Selection = wp.media.View.extend(/** @lends wp.media.view.Selection.prototype */{ |
7153 | 7340 | tagName: 'div', |
7154 | 7341 | className: 'media-selection', |
7155 | 7342 | template: wp.template('media-selection'), |
… |
… |
Selection = wp.media.View.extend({ |
7221 | 7408 | module.exports = Selection; |
7222 | 7409 | |
7223 | 7410 | },{}],59:[function(require,module,exports){ |
| 7411 | var View = wp.media.View, |
| 7412 | $ = Backbone.$, |
| 7413 | Settings; |
| 7414 | |
7224 | 7415 | /** |
7225 | 7416 | * wp.media.view.Settings |
7226 | 7417 | * |
| 7418 | * @memberOf wp.media.view |
| 7419 | * |
7227 | 7420 | * @class |
7228 | 7421 | * @augments wp.media.View |
7229 | 7422 | * @augments wp.Backbone.View |
7230 | 7423 | * @augments Backbone.View |
7231 | 7424 | */ |
7232 | | var View = wp.media.View, |
7233 | | $ = Backbone.$, |
7234 | | Settings; |
7235 | | |
7236 | | Settings = View.extend({ |
| 7425 | Settings = View.extend(/** @lends wp.media.view.Settings.prototype */{ |
7237 | 7426 | events: { |
7238 | 7427 | 'click button': 'updateHandler', |
7239 | 7428 | 'change input': 'updateHandler', |
… |
… |
Settings = View.extend({ |
7342 | 7531 | module.exports = Settings; |
7343 | 7532 | |
7344 | 7533 | },{}],60:[function(require,module,exports){ |
| 7534 | var Settings = wp.media.view.Settings, |
| 7535 | AttachmentDisplay; |
| 7536 | |
7345 | 7537 | /** |
7346 | 7538 | * wp.media.view.Settings.AttachmentDisplay |
7347 | 7539 | * |
| 7540 | * @memberOf wp.media.view.Settings |
| 7541 | * |
7348 | 7542 | * @class |
7349 | 7543 | * @augments wp.media.view.Settings |
7350 | 7544 | * @augments wp.media.View |
7351 | 7545 | * @augments wp.Backbone.View |
7352 | 7546 | * @augments Backbone.View |
7353 | 7547 | */ |
7354 | | var Settings = wp.media.view.Settings, |
7355 | | AttachmentDisplay; |
7356 | | |
7357 | | AttachmentDisplay = Settings.extend({ |
| 7548 | AttachmentDisplay = Settings.extend(/** @lends wp.media.view.Settings.AttachmentDisplay.prototype */{ |
7358 | 7549 | className: 'attachment-display-settings', |
7359 | 7550 | template: wp.template('attachment-display-settings'), |
7360 | 7551 | |
… |
… |
module.exports = AttachmentDisplay; |
7439 | 7630 | /** |
7440 | 7631 | * wp.media.view.Settings.Gallery |
7441 | 7632 | * |
| 7633 | * @memberOf wp.media.view.Settings |
| 7634 | * |
7442 | 7635 | * @class |
7443 | 7636 | * @augments wp.media.view.Settings |
7444 | 7637 | * @augments wp.media.View |
7445 | 7638 | * @augments wp.Backbone.View |
7446 | 7639 | * @augments Backbone.View |
7447 | 7640 | */ |
7448 | | var Gallery = wp.media.view.Settings.extend({ |
| 7641 | var Gallery = wp.media.view.Settings.extend(/** @lends wp.media.view.Settings.Gallery.prototype */{ |
7449 | 7642 | className: 'collection-settings gallery-settings', |
7450 | 7643 | template: wp.template('gallery-settings') |
7451 | 7644 | }); |
… |
… |
module.exports = Gallery; |
7456 | 7649 | /** |
7457 | 7650 | * wp.media.view.Settings.Playlist |
7458 | 7651 | * |
| 7652 | * @memberOf wp.media.view.Settings |
| 7653 | * |
7459 | 7654 | * @class |
7460 | 7655 | * @augments wp.media.view.Settings |
7461 | 7656 | * @augments wp.media.View |
7462 | 7657 | * @augments wp.Backbone.View |
7463 | 7658 | * @augments Backbone.View |
7464 | 7659 | */ |
7465 | | var Playlist = wp.media.view.Settings.extend({ |
| 7660 | var Playlist = wp.media.view.Settings.extend(/** @lends wp.media.view.Settings.Playlist.prototype */{ |
7466 | 7661 | className: 'collection-settings playlist-settings', |
7467 | 7662 | template: wp.template('playlist-settings') |
7468 | 7663 | }); |
… |
… |
module.exports = Playlist; |
7473 | 7668 | /** |
7474 | 7669 | * wp.media.view.Sidebar |
7475 | 7670 | * |
| 7671 | * @memberOf wp.media.view |
| 7672 | * |
7476 | 7673 | * @class |
7477 | 7674 | * @augments wp.media.view.PriorityList |
7478 | 7675 | * @augments wp.media.View |
7479 | 7676 | * @augments wp.Backbone.View |
7480 | 7677 | * @augments Backbone.View |
7481 | 7678 | */ |
7482 | | var Sidebar = wp.media.view.PriorityList.extend({ |
| 7679 | var Sidebar = wp.media.view.PriorityList.extend(/** @lends wp.media.view.Sidebar.prototype */{ |
7483 | 7680 | className: 'media-sidebar' |
7484 | 7681 | }); |
7485 | 7682 | |
7486 | 7683 | module.exports = Sidebar; |
7487 | 7684 | |
7488 | 7685 | },{}],64:[function(require,module,exports){ |
| 7686 | var View = wp.media.view, |
| 7687 | SiteIconCropper; |
| 7688 | |
7489 | 7689 | /** |
7490 | 7690 | * wp.media.view.SiteIconCropper |
7491 | 7691 | * |
… |
… |
module.exports = Sidebar; |
7494 | 7694 | * Takes imgAreaSelect options from |
7495 | 7695 | * wp.customize.SiteIconControl.calculateImageSelectOptions. |
7496 | 7696 | * |
| 7697 | * @memberOf wp.media.view |
| 7698 | * |
7497 | 7699 | * @class |
7498 | 7700 | * @augments wp.media.view.Cropper |
7499 | 7701 | * @augments wp.media.View |
7500 | 7702 | * @augments wp.Backbone.View |
7501 | 7703 | * @augments Backbone.View |
7502 | 7704 | */ |
7503 | | var View = wp.media.view, |
7504 | | SiteIconCropper; |
7505 | | |
7506 | | SiteIconCropper = View.Cropper.extend({ |
| 7705 | SiteIconCropper = View.Cropper.extend(/** @lends wp.media.view.SiteIconCropper.prototype */{ |
7507 | 7706 | className: 'crop-content site-icon', |
7508 | 7707 | |
7509 | 7708 | ready: function () { |
… |
… |
SiteIconCropper = View.Cropper.extend({ |
7529 | 7728 | module.exports = SiteIconCropper; |
7530 | 7729 | |
7531 | 7730 | },{}],65:[function(require,module,exports){ |
| 7731 | var View = wp.media.View, |
| 7732 | $ = jQuery, |
| 7733 | SiteIconPreview; |
| 7734 | |
7532 | 7735 | /** |
7533 | 7736 | * wp.media.view.SiteIconPreview |
7534 | 7737 | * |
7535 | 7738 | * Shows a preview of the Site Icon as a favicon and app icon while cropping. |
7536 | 7739 | * |
| 7740 | * @memberOf wp.media.view |
| 7741 | * |
7537 | 7742 | * @class |
7538 | 7743 | * @augments wp.media.View |
7539 | 7744 | * @augments wp.Backbone.View |
7540 | 7745 | * @augments Backbone.View |
7541 | 7746 | */ |
7542 | | var View = wp.media.View, |
7543 | | $ = jQuery, |
7544 | | SiteIconPreview; |
7545 | | |
7546 | | SiteIconPreview = View.extend({ |
| 7747 | SiteIconPreview = View.extend(/** @lends wp.media.view.SiteIconPreview.prototype */{ |
7547 | 7748 | className: 'site-icon-preview', |
7548 | 7749 | template: wp.template( 'site-icon-preview' ), |
7549 | 7750 | |
… |
… |
module.exports = SiteIconPreview; |
7588 | 7789 | /** |
7589 | 7790 | * wp.media.view.Spinner |
7590 | 7791 | * |
| 7792 | * @memberOf wp.media.view |
| 7793 | * |
7591 | 7794 | * @class |
7592 | 7795 | * @augments wp.media.View |
7593 | 7796 | * @augments wp.Backbone.View |
7594 | 7797 | * @augments Backbone.View |
7595 | 7798 | */ |
7596 | | var Spinner = wp.media.View.extend({ |
| 7799 | var Spinner = wp.media.View.extend(/** @lends wp.media.view.Spinner.prototype */{ |
7597 | 7800 | tagName: 'span', |
7598 | 7801 | className: 'spinner', |
7599 | 7802 | spinnerTimeout: false, |
… |
… |
var Spinner = wp.media.View.extend({ |
7620 | 7823 | module.exports = Spinner; |
7621 | 7824 | |
7622 | 7825 | },{}],67:[function(require,module,exports){ |
| 7826 | var View = wp.media.View, |
| 7827 | Toolbar; |
| 7828 | |
7623 | 7829 | /** |
7624 | 7830 | * wp.media.view.Toolbar |
7625 | 7831 | * |
7626 | 7832 | * A toolbar which consists of a primary and a secondary section. Each sections |
7627 | 7833 | * can be filled with views. |
7628 | 7834 | * |
| 7835 | * @memberOf wp.media.view |
| 7836 | * |
7629 | 7837 | * @class |
7630 | 7838 | * @augments wp.media.View |
7631 | 7839 | * @augments wp.Backbone.View |
7632 | 7840 | * @augments Backbone.View |
7633 | 7841 | */ |
7634 | | var View = wp.media.View, |
7635 | | Toolbar; |
7636 | | |
7637 | | Toolbar = View.extend({ |
| 7842 | Toolbar = View.extend(/** @lends wp.media.view.Toolbar.prototype */{ |
7638 | 7843 | tagName: 'div', |
7639 | 7844 | className: 'media-toolbar', |
7640 | 7845 | |
… |
… |
Toolbar = View.extend({ |
7782 | 7987 | module.exports = Toolbar; |
7783 | 7988 | |
7784 | 7989 | },{}],68:[function(require,module,exports){ |
| 7990 | var Select = wp.media.view.Toolbar.Select, |
| 7991 | l10n = wp.media.view.l10n, |
| 7992 | Embed; |
| 7993 | |
7785 | 7994 | /** |
7786 | 7995 | * wp.media.view.Toolbar.Embed |
7787 | 7996 | * |
| 7997 | * @memberOf wp.media.view.Toolbar |
| 7998 | * |
7788 | 7999 | * @class |
7789 | 8000 | * @augments wp.media.view.Toolbar.Select |
7790 | 8001 | * @augments wp.media.view.Toolbar |
… |
… |
module.exports = Toolbar; |
7792 | 8003 | * @augments wp.Backbone.View |
7793 | 8004 | * @augments Backbone.View |
7794 | 8005 | */ |
7795 | | var Select = wp.media.view.Toolbar.Select, |
7796 | | l10n = wp.media.view.l10n, |
7797 | | Embed; |
7798 | | |
7799 | | Embed = Select.extend({ |
| 8006 | Embed = Select.extend(/** @lends wp.media.view.Toolbar.Embed.prototype */{ |
7800 | 8007 | initialize: function() { |
7801 | 8008 | _.defaults( this.options, { |
7802 | 8009 | text: l10n.insertIntoPost, |
… |
… |
Embed = Select.extend({ |
7819 | 8026 | module.exports = Embed; |
7820 | 8027 | |
7821 | 8028 | },{}],69:[function(require,module,exports){ |
| 8029 | var Toolbar = wp.media.view.Toolbar, |
| 8030 | l10n = wp.media.view.l10n, |
| 8031 | Select; |
| 8032 | |
7822 | 8033 | /** |
7823 | 8034 | * wp.media.view.Toolbar.Select |
7824 | 8035 | * |
| 8036 | * @memberOf wp.media.view.Toolbar |
| 8037 | * |
7825 | 8038 | * @class |
7826 | 8039 | * @augments wp.media.view.Toolbar |
7827 | 8040 | * @augments wp.media.View |
7828 | 8041 | * @augments wp.Backbone.View |
7829 | 8042 | * @augments Backbone.View |
7830 | 8043 | */ |
7831 | | var Toolbar = wp.media.view.Toolbar, |
7832 | | l10n = wp.media.view.l10n, |
7833 | | Select; |
7834 | | |
7835 | | Select = Toolbar.extend({ |
| 8044 | Select = Toolbar.extend(/** @lends wp.media.view.Toolbar.Select.prototype */{ |
7836 | 8045 | initialize: function() { |
7837 | 8046 | var options = this.options; |
7838 | 8047 | |
… |
… |
Select = Toolbar.extend({ |
7889 | 8098 | module.exports = Select; |
7890 | 8099 | |
7891 | 8100 | },{}],70:[function(require,module,exports){ |
| 8101 | var View = wp.media.View, |
| 8102 | l10n = wp.media.view.l10n, |
| 8103 | $ = jQuery, |
| 8104 | EditorUploader; |
| 8105 | |
7892 | 8106 | /** |
7893 | 8107 | * Creates a dropzone on WP editor instances (elements with .wp-editor-wrap) |
7894 | 8108 | * and relays drag'n'dropped files to a media workflow. |
7895 | 8109 | * |
7896 | 8110 | * wp.media.view.EditorUploader |
7897 | 8111 | * |
| 8112 | * @memberOf wp.media.view |
| 8113 | * |
7898 | 8114 | * @class |
7899 | 8115 | * @augments wp.media.View |
7900 | 8116 | * @augments wp.Backbone.View |
7901 | 8117 | * @augments Backbone.View |
7902 | 8118 | */ |
7903 | | var View = wp.media.View, |
7904 | | l10n = wp.media.view.l10n, |
7905 | | $ = jQuery, |
7906 | | EditorUploader; |
7907 | | |
7908 | | EditorUploader = View.extend({ |
| 8119 | EditorUploader = View.extend(/** @lends wp.media.view.EditorUploader.prototype */{ |
7909 | 8120 | tagName: 'div', |
7910 | 8121 | className: 'uploader-editor', |
7911 | 8122 | template: wp.template( 'uploader-editor' ), |
… |
… |
EditorUploader = View.extend({ |
8114 | 8325 | module.exports = EditorUploader; |
8115 | 8326 | |
8116 | 8327 | },{}],71:[function(require,module,exports){ |
| 8328 | var View = wp.media.View, |
| 8329 | UploaderInline; |
| 8330 | |
8117 | 8331 | /** |
8118 | 8332 | * wp.media.view.UploaderInline |
8119 | 8333 | * |
8120 | 8334 | * The inline uploader that shows up in the 'Upload Files' tab. |
8121 | 8335 | * |
| 8336 | * @memberOf wp.media.view |
| 8337 | * |
8122 | 8338 | * @class |
8123 | 8339 | * @augments wp.media.View |
8124 | 8340 | * @augments wp.Backbone.View |
8125 | 8341 | * @augments Backbone.View |
8126 | 8342 | */ |
8127 | | var View = wp.media.View, |
8128 | | UploaderInline; |
8129 | | |
8130 | | UploaderInline = View.extend({ |
| 8343 | UploaderInline = View.extend(/** @lends wp.media.view.UploaderInline.prototype */{ |
8131 | 8344 | tagName: 'div', |
8132 | 8345 | className: 'uploader-inline', |
8133 | 8346 | template: wp.template('uploader-inline'), |
… |
… |
module.exports = UploaderInline; |
8257 | 8470 | /** |
8258 | 8471 | * wp.media.view.UploaderStatusError |
8259 | 8472 | * |
| 8473 | * @memberOf wp.media.view |
| 8474 | * |
8260 | 8475 | * @class |
8261 | 8476 | * @augments wp.media.View |
8262 | 8477 | * @augments wp.Backbone.View |
8263 | 8478 | * @augments Backbone.View |
8264 | 8479 | */ |
8265 | | var UploaderStatusError = wp.media.View.extend({ |
| 8480 | var UploaderStatusError = wp.media.View.extend(/** @lends wp.media.view.UploaderStatusError.prototype */{ |
8266 | 8481 | className: 'upload-error', |
8267 | 8482 | template: wp.template('uploader-status-error') |
8268 | 8483 | }); |
… |
… |
var UploaderStatusError = wp.media.View.extend({ |
8270 | 8485 | module.exports = UploaderStatusError; |
8271 | 8486 | |
8272 | 8487 | },{}],73:[function(require,module,exports){ |
| 8488 | var View = wp.media.View, |
| 8489 | UploaderStatus; |
| 8490 | |
8273 | 8491 | /** |
8274 | 8492 | * wp.media.view.UploaderStatus |
8275 | 8493 | * |
8276 | 8494 | * An uploader status for on-going uploads. |
8277 | 8495 | * |
| 8496 | * @memberOf wp.media.view |
| 8497 | * |
8278 | 8498 | * @class |
8279 | 8499 | * @augments wp.media.View |
8280 | 8500 | * @augments wp.Backbone.View |
8281 | 8501 | * @augments Backbone.View |
8282 | 8502 | */ |
8283 | | var View = wp.media.View, |
8284 | | UploaderStatus; |
8285 | | |
8286 | | UploaderStatus = View.extend({ |
| 8503 | UploaderStatus = View.extend(/** @lends wp.media.view.UploaderStatus.prototype */{ |
8287 | 8504 | className: 'media-uploader-status', |
8288 | 8505 | template: wp.template('uploader-status'), |
8289 | 8506 | |
… |
… |
UploaderStatus = View.extend({ |
8303 | 8520 | this.errors.on( 'add', this.error, this ); |
8304 | 8521 | }, |
8305 | 8522 | /** |
8306 | | * @global wp.Uploader |
8307 | 8523 | * @returns {wp.media.view.UploaderStatus} |
8308 | 8524 | */ |
8309 | 8525 | dispose: function() { |
… |
… |
UploaderStatus = View.extend({ |
8389 | 8605 | }, |
8390 | 8606 | |
8391 | 8607 | /** |
8392 | | * @global wp.Uploader |
8393 | | * |
8394 | 8608 | * @param {Object} event |
8395 | 8609 | */ |
8396 | 8610 | dismiss: function( event ) { |
… |
… |
UploaderStatus = View.extend({ |
8408 | 8622 | module.exports = UploaderStatus; |
8409 | 8623 | |
8410 | 8624 | },{}],74:[function(require,module,exports){ |
| 8625 | var $ = jQuery, |
| 8626 | UploaderWindow; |
| 8627 | |
8411 | 8628 | /** |
8412 | 8629 | * wp.media.view.UploaderWindow |
8413 | 8630 | * |
8414 | 8631 | * An uploader window that allows for dragging and dropping media. |
8415 | 8632 | * |
| 8633 | * @memberOf wp.media.view |
| 8634 | * |
8416 | 8635 | * @class |
8417 | 8636 | * @augments wp.media.View |
8418 | 8637 | * @augments wp.Backbone.View |
… |
… |
module.exports = UploaderStatus; |
8424 | 8643 | * @param {jQuery} [options.uploader.dropzone] jQuery collection of the dropzone. |
8425 | 8644 | * @param {object} [options.uploader.params] |
8426 | 8645 | */ |
8427 | | var $ = jQuery, |
8428 | | UploaderWindow; |
8429 | | |
8430 | | UploaderWindow = wp.media.View.extend({ |
| 8646 | UploaderWindow = wp.media.View.extend(/** @lends wp.media.view.UploaderWindow.prototype */{ |
8431 | 8647 | tagName: 'div', |
8432 | 8648 | className: 'uploader-window', |
8433 | 8649 | template: wp.template('uploader-window'), |
… |
… |
module.exports = UploaderWindow; |
8531 | 8747 | * This behavior has since been removed, and should not be used |
8532 | 8748 | * outside of the media manager. |
8533 | 8749 | * |
| 8750 | * @memberOf wp.media |
| 8751 | * |
8534 | 8752 | * @class |
8535 | 8753 | * @augments wp.Backbone.View |
8536 | 8754 | * @augments Backbone.View |
8537 | 8755 | */ |
8538 | | var View = wp.Backbone.View.extend({ |
| 8756 | var View = wp.Backbone.View.extend(/** @lends wp.media.View.prototype */{ |
8539 | 8757 | constructor: function( options ) { |
8540 | 8758 | if ( options && options.controller ) { |
8541 | 8759 | this.controller = options.controller; |
-
diff --git src/wp-includes/js/media/controllers/audio-details.js src/wp-includes/js/media/controllers/audio-details.js
index 41c8a4f8a..07fb99029 100644
|
|
|
| 1 | var State = wp.media.controller.State, |
| 2 | l10n = wp.media.view.l10n, |
| 3 | AudioDetails; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.controller.AudioDetails |
3 | 7 | * |
4 | 8 | * The controller for the Audio Details state |
5 | 9 | * |
| 10 | * @memberOf wp.media.controller |
| 11 | * |
6 | 12 | * @class |
7 | 13 | * @augments wp.media.controller.State |
8 | 14 | * @augments Backbone.Model |
9 | 15 | */ |
10 | | var State = wp.media.controller.State, |
11 | | l10n = wp.media.view.l10n, |
12 | | AudioDetails; |
13 | | |
14 | | AudioDetails = State.extend({ |
| 16 | AudioDetails = State.extend(/** @lends wp.media.controller.AudioDetails.prototype */{ |
15 | 17 | defaults: { |
16 | 18 | id: 'audio-details', |
17 | 19 | toolbar: 'audio-details', |
-
diff --git src/wp-includes/js/media/controllers/collection-add.js src/wp-includes/js/media/controllers/collection-add.js
index e361a5c9d..fedcb308b 100644
|
|
|
| 1 | var Selection = wp.media.model.Selection, |
| 2 | Library = wp.media.controller.Library, |
| 3 | CollectionAdd; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.controller.CollectionAdd |
3 | 7 | * |
4 | 8 | * A state for adding attachments to a collection (e.g. video playlist). |
5 | 9 | * |
| 10 | * @memberOf wp.media.controller |
| 11 | * |
6 | 12 | * @class |
7 | 13 | * @augments wp.media.controller.Library |
8 | 14 | * @augments wp.media.controller.State |
… |
… |
|
31 | 37 | * @param {string} attributes.type The collection's media type. (e.g. 'video'). |
32 | 38 | * @param {string} attributes.collectionType The collection type. (e.g. 'playlist'). |
33 | 39 | */ |
34 | | var Selection = wp.media.model.Selection, |
35 | | Library = wp.media.controller.Library, |
36 | | CollectionAdd; |
37 | | |
38 | | CollectionAdd = Library.extend({ |
| 40 | CollectionAdd = Library.extend(/** @lends wp.media.controller.CollectionAdd.prototype */{ |
39 | 41 | defaults: _.defaults( { |
40 | 42 | // Selection defaults. @see media.model.Selection |
41 | 43 | multiple: 'add', |
-
diff --git src/wp-includes/js/media/controllers/collection-edit.js src/wp-includes/js/media/controllers/collection-edit.js
index 8478976ab..1c4478f25 100644
|
|
|
| 1 | var Library = wp.media.controller.Library, |
| 2 | l10n = wp.media.view.l10n, |
| 3 | $ = jQuery, |
| 4 | CollectionEdit; |
| 5 | |
1 | 6 | /** |
2 | 7 | * wp.media.controller.CollectionEdit |
3 | 8 | * |
4 | 9 | * A state for editing a collection, which is used by audio and video playlists, |
5 | 10 | * and can be used for other collections. |
6 | 11 | * |
| 12 | * @memberOf wp.media.controller |
| 13 | * |
7 | 14 | * @class |
8 | 15 | * @augments wp.media.controller.Library |
9 | 16 | * @augments wp.media.controller.State |
… |
… |
|
33 | 40 | * @param {string} attributes.type The collection's media type. (e.g. 'video'). |
34 | 41 | * @param {string} attributes.collectionType The collection type. (e.g. 'playlist'). |
35 | 42 | */ |
36 | | var Library = wp.media.controller.Library, |
37 | | l10n = wp.media.view.l10n, |
38 | | $ = jQuery, |
39 | | CollectionEdit; |
40 | | |
41 | | CollectionEdit = Library.extend({ |
| 43 | CollectionEdit = Library.extend(/** @lends wp.media.controller.CollectionEdit.prototype */{ |
42 | 44 | defaults: { |
43 | 45 | multiple: false, |
44 | 46 | sortable: true, |
-
diff --git src/wp-includes/js/media/controllers/cropper.js src/wp-includes/js/media/controllers/cropper.js
index a23b22640..bfcaf11c9 100644
|
|
|
| 1 | var l10n = wp.media.view.l10n, |
| 2 | Cropper; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.controller.Cropper |
3 | 6 | * |
4 | 7 | * A state for cropping an image. |
5 | 8 | * |
| 9 | * @memberOf wp.media.controller |
| 10 | * |
6 | 11 | * @class |
7 | 12 | * @augments wp.media.controller.State |
8 | 13 | * @augments Backbone.Model |
9 | 14 | */ |
10 | | var l10n = wp.media.view.l10n, |
11 | | Cropper; |
12 | | |
13 | | Cropper = wp.media.controller.State.extend({ |
| 15 | Cropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Cropper.prototype */{ |
14 | 16 | defaults: { |
15 | 17 | id: 'cropper', |
16 | 18 | title: l10n.cropImage, |
-
diff --git src/wp-includes/js/media/controllers/customize-image-cropper.js src/wp-includes/js/media/controllers/customize-image-cropper.js
index 3456ba36f..5f076178e 100644
|
|
|
| 1 | var Controller = wp.media.controller, |
| 2 | CustomizeImageCropper; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.controller.CustomizeImageCropper |
3 | 6 | * |
| 7 | * @memberOf wp.media.controller |
| 8 | * |
4 | 9 | * A state for cropping an image. |
5 | 10 | * |
6 | 11 | * @class |
… |
… |
|
8 | 13 | * @augments wp.media.controller.State |
9 | 14 | * @augments Backbone.Model |
10 | 15 | */ |
11 | | var Controller = wp.media.controller, |
12 | | CustomizeImageCropper; |
13 | | |
14 | | CustomizeImageCropper = Controller.Cropper.extend({ |
| 16 | CustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller.CustomizeImageCropper.prototype */{ |
15 | 17 | doCrop: function( attachment ) { |
16 | 18 | var cropDetails = attachment.get( 'cropDetails' ), |
17 | 19 | control = this.get( 'control' ), |
-
diff --git src/wp-includes/js/media/controllers/edit-attachment-metadata.js src/wp-includes/js/media/controllers/edit-attachment-metadata.js
index 60a57c32b..fe906f8bc 100644
|
|
|
| 1 | var l10n = wp.media.view.l10n, |
| 2 | EditAttachmentMetadata; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.controller.EditAttachmentMetadata |
3 | 6 | * |
4 | 7 | * A state for editing an attachment's metadata. |
5 | 8 | * |
| 9 | * @memberOf wp.media.controller |
| 10 | * |
6 | 11 | * @class |
7 | 12 | * @augments wp.media.controller.State |
8 | 13 | * @augments Backbone.Model |
9 | 14 | */ |
10 | | var l10n = wp.media.view.l10n, |
11 | | EditAttachmentMetadata; |
12 | | |
13 | | EditAttachmentMetadata = wp.media.controller.State.extend({ |
| 15 | EditAttachmentMetadata = wp.media.controller.State.extend(/** @lends wp.media.controller.EditAttachmentMetadata.prototype */{ |
14 | 16 | defaults: { |
15 | 17 | id: 'edit-attachment', |
16 | 18 | // Title string passed to the frame's title region view. |
-
diff --git src/wp-includes/js/media/controllers/edit-image.js src/wp-includes/js/media/controllers/edit-image.js
index 448541f2f..ce34d14cf 100644
|
|
|
| 1 | var l10n = wp.media.view.l10n, |
| 2 | EditImage; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.controller.EditImage |
3 | 6 | * |
4 | 7 | * A state for editing (cropping, etc.) an image. |
5 | 8 | * |
| 9 | * @memberOf wp.media.controller |
| 10 | * |
6 | 11 | * @class |
7 | 12 | * @augments wp.media.controller.State |
8 | 13 | * @augments Backbone.Model |
… |
… |
|
16 | 21 | * @param {string} [attributes.menu=false] Initial mode for the menu region. |
17 | 22 | * @param {string} [attributes.url] Unused. @todo Consider removal. |
18 | 23 | */ |
19 | | var l10n = wp.media.view.l10n, |
20 | | EditImage; |
21 | | |
22 | | EditImage = wp.media.controller.State.extend({ |
| 24 | EditImage = wp.media.controller.State.extend(/** @lends wp.media.controller.EditImage.prototype */{ |
23 | 25 | defaults: { |
24 | 26 | id: 'edit-image', |
25 | 27 | title: l10n.editImage, |
-
diff --git src/wp-includes/js/media/controllers/embed.js src/wp-includes/js/media/controllers/embed.js
index d347db03d..2b271dcd0 100644
|
|
|
| 1 | var l10n = wp.media.view.l10n, |
| 2 | $ = Backbone.$, |
| 3 | Embed; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.controller.Embed |
3 | 7 | * |
4 | 8 | * A state for embedding media from a URL. |
5 | 9 | * |
| 10 | * @memberOf wp.media.controller |
| 11 | * |
6 | 12 | * @class |
7 | 13 | * @augments wp.media.controller.State |
8 | 14 | * @augments Backbone.Model |
… |
… |
|
19 | 25 | * @param {string} [attributes.url] The embed URL. |
20 | 26 | * @param {object} [attributes.metadata={}] Properties of the embed, which will override attributes.url if set. |
21 | 27 | */ |
22 | | var l10n = wp.media.view.l10n, |
23 | | $ = Backbone.$, |
24 | | Embed; |
25 | | |
26 | | Embed = wp.media.controller.State.extend({ |
| 28 | Embed = wp.media.controller.State.extend(/** @lends wp.media.controller.Embed.prototype */{ |
27 | 29 | defaults: { |
28 | 30 | id: 'embed', |
29 | 31 | title: l10n.insertFromUrlTitle, |
-
diff --git src/wp-includes/js/media/controllers/featured-image.js src/wp-includes/js/media/controllers/featured-image.js
index 3e179f1c5..e08129fa2 100644
|
|
|
| 1 | var Attachment = wp.media.model.Attachment, |
| 2 | Library = wp.media.controller.Library, |
| 3 | l10n = wp.media.view.l10n, |
| 4 | FeaturedImage; |
| 5 | |
1 | 6 | /** |
2 | 7 | * wp.media.controller.FeaturedImage |
3 | 8 | * |
4 | 9 | * A state for selecting a featured image for a post. |
5 | 10 | * |
| 11 | * @memberOf wp.media.controller |
| 12 | * |
6 | 13 | * @class |
7 | 14 | * @augments wp.media.controller.Library |
8 | 15 | * @augments wp.media.controller.State |
… |
… |
|
29 | 36 | * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user. |
30 | 37 | * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state. |
31 | 38 | */ |
32 | | var Attachment = wp.media.model.Attachment, |
33 | | Library = wp.media.controller.Library, |
34 | | l10n = wp.media.view.l10n, |
35 | | FeaturedImage; |
36 | | |
37 | | FeaturedImage = Library.extend({ |
| 39 | FeaturedImage = Library.extend(/** @lends wp.media.controller.FeaturedImage.prototype */{ |
38 | 40 | defaults: _.defaults({ |
39 | 41 | id: 'featured-image', |
40 | 42 | title: l10n.setFeaturedImageTitle, |
-
diff --git src/wp-includes/js/media/controllers/gallery-add.js src/wp-includes/js/media/controllers/gallery-add.js
index 42d7dfa47..21e611bc3 100644
|
|
|
| 1 | var Selection = wp.media.model.Selection, |
| 2 | Library = wp.media.controller.Library, |
| 3 | l10n = wp.media.view.l10n, |
| 4 | GalleryAdd; |
| 5 | |
1 | 6 | /** |
2 | 7 | * wp.media.controller.GalleryAdd |
3 | 8 | * |
4 | 9 | * A state for selecting more images to add to a gallery. |
5 | 10 | * |
| 11 | * @memberOf wp.media.controller |
| 12 | * |
6 | 13 | * @class |
7 | 14 | * @augments wp.media.controller.Library |
8 | 15 | * @augments wp.media.controller.State |
… |
… |
|
29 | 36 | * @param {boolean} [attributes.syncSelection=false] Whether the Attachments selection should be persisted from the last state. |
30 | 37 | * Defaults to false because for this state, because the library of the Edit Gallery state is the selection. |
31 | 38 | */ |
32 | | var Selection = wp.media.model.Selection, |
33 | | Library = wp.media.controller.Library, |
34 | | l10n = wp.media.view.l10n, |
35 | | GalleryAdd; |
36 | | |
37 | | GalleryAdd = Library.extend({ |
| 39 | GalleryAdd = Library.extend(/** @lends wp.media.controller.GalleryAdd.prototype */{ |
38 | 40 | defaults: _.defaults({ |
39 | 41 | id: 'gallery-library', |
40 | 42 | title: l10n.addToGalleryTitle, |
-
diff --git src/wp-includes/js/media/controllers/gallery-edit.js src/wp-includes/js/media/controllers/gallery-edit.js
index cfdd7aa3d..b07056e9d 100644
|
|
|
| 1 | var Library = wp.media.controller.Library, |
| 2 | l10n = wp.media.view.l10n, |
| 3 | GalleryEdit; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.controller.GalleryEdit |
3 | 7 | * |
4 | 8 | * A state for editing a gallery's images and settings. |
5 | 9 | * |
| 10 | * @memberOf wp.media.controller |
| 11 | * |
6 | 12 | * @class |
7 | 13 | * @augments wp.media.controller.Library |
8 | 14 | * @augments wp.media.controller.State |
… |
… |
|
30 | 36 | * @param {view} [attributes.AttachmentView] The single `Attachment` view to be used in the `Attachments`. |
31 | 37 | * If none supplied, defaults to wp.media.view.Attachment.EditLibrary. |
32 | 38 | */ |
33 | | var Library = wp.media.controller.Library, |
34 | | l10n = wp.media.view.l10n, |
35 | | GalleryEdit; |
36 | | |
37 | | GalleryEdit = Library.extend({ |
| 39 | GalleryEdit = Library.extend(/** @lends wp.media.controller.GalleryEdit.prototype */{ |
38 | 40 | defaults: { |
39 | 41 | id: 'gallery-edit', |
40 | 42 | title: l10n.editGalleryTitle, |
-
diff --git src/wp-includes/js/media/controllers/image-details.js src/wp-includes/js/media/controllers/image-details.js
index 61462bbe7..2d4689e5a 100644
|
|
|
| 1 | var State = wp.media.controller.State, |
| 2 | Library = wp.media.controller.Library, |
| 3 | l10n = wp.media.view.l10n, |
| 4 | ImageDetails; |
| 5 | |
1 | 6 | /** |
2 | 7 | * wp.media.controller.ImageDetails |
3 | 8 | * |
4 | 9 | * A state for editing the attachment display settings of an image that's been |
5 | 10 | * inserted into the editor. |
6 | 11 | * |
| 12 | * @memberOf wp.media.controller |
| 13 | * |
7 | 14 | * @class |
8 | 15 | * @augments wp.media.controller.State |
9 | 16 | * @augments Backbone.Model |
… |
… |
|
22 | 29 | * @todo This state inherits some defaults from media.controller.Library.prototype.defaults, |
23 | 30 | * however this may not do anything. |
24 | 31 | */ |
25 | | var State = wp.media.controller.State, |
26 | | Library = wp.media.controller.Library, |
27 | | l10n = wp.media.view.l10n, |
28 | | ImageDetails; |
29 | | |
30 | | ImageDetails = State.extend({ |
| 32 | ImageDetails = State.extend(/** @lends wp.media.controller.ImageDetails.prototype */{ |
31 | 33 | defaults: _.defaults({ |
32 | 34 | id: 'image-details', |
33 | 35 | title: l10n.imageDetailsTitle, |
-
diff --git src/wp-includes/js/media/controllers/library.js src/wp-includes/js/media/controllers/library.js
index c16fab60b..89dc0f4da 100644
|
|
|
| 1 | var l10n = wp.media.view.l10n, |
| 2 | getUserSetting = window.getUserSetting, |
| 3 | setUserSetting = window.setUserSetting, |
| 4 | Library; |
| 5 | |
1 | 6 | /** |
2 | 7 | * wp.media.controller.Library |
3 | 8 | * |
4 | 9 | * A state for choosing an attachment or group of attachments from the media library. |
5 | 10 | * |
| 11 | * @memberOf wp.media.controller |
| 12 | * |
6 | 13 | * @class |
7 | 14 | * @augments wp.media.controller.State |
8 | 15 | * @augments Backbone.Model |
… |
… |
|
32 | 39 | * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user. |
33 | 40 | * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state. |
34 | 41 | */ |
35 | | var l10n = wp.media.view.l10n, |
36 | | getUserSetting = window.getUserSetting, |
37 | | setUserSetting = window.setUserSetting, |
38 | | Library; |
39 | | |
40 | | Library = wp.media.controller.State.extend({ |
| 42 | Library = wp.media.controller.State.extend(/** @lends wp.media.controller.Library.prototype */{ |
41 | 43 | defaults: { |
42 | 44 | id: 'library', |
43 | 45 | title: l10n.mediaLibraryTitle, |
-
diff --git src/wp-includes/js/media/controllers/media-library.js src/wp-includes/js/media/controllers/media-library.js
index 9d8983fed..1f0fe7446 100644
|
|
|
1 | 1 | /** |
2 | 2 | * wp.media.controller.MediaLibrary |
3 | 3 | * |
| 4 | * @memberOf wp.media.controller |
| 5 | * |
4 | 6 | * @class |
5 | 7 | * @augments wp.media.controller.Library |
6 | 8 | * @augments wp.media.controller.State |
… |
… |
|
9 | 11 | var Library = wp.media.controller.Library, |
10 | 12 | MediaLibrary; |
11 | 13 | |
12 | | MediaLibrary = Library.extend({ |
| 14 | MediaLibrary = Library.extend(/** @lends wp.media.controller.MediaLibrary.prototype */{ |
13 | 15 | defaults: _.defaults({ |
14 | 16 | // Attachments browser defaults. @see media.view.AttachmentsBrowser |
15 | 17 | filterable: 'uploaded', |
-
diff --git src/wp-includes/js/media/controllers/region.js src/wp-includes/js/media/controllers/region.js
index ca8d7a26c..6c0e27e7b 100644
|
|
|
11 | 11 | * 'browse' mode t be activated on the 'content' view and then fills the region |
12 | 12 | * with an AttachmentsBrowser view. |
13 | 13 | * |
| 14 | * @memberOf wp.media.controller |
| 15 | * |
14 | 16 | * @class |
15 | 17 | * |
16 | 18 | * @param {object} options Options hash for the region. |
… |
… |
var Region = function( options ) { |
25 | 27 | // Use Backbone's self-propagating `extend` inheritance method. |
26 | 28 | Region.extend = Backbone.Model.extend; |
27 | 29 | |
28 | | _.extend( Region.prototype, { |
| 30 | _.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{ |
29 | 31 | /** |
30 | 32 | * Activate a mode. |
31 | 33 | * |
… |
… |
_.extend( Region.prototype, { |
33 | 35 | * |
34 | 36 | * @param {string} mode |
35 | 37 | * |
36 | | * @fires this.view#{this.id}:activate:{this._mode} |
37 | | * @fires this.view#{this.id}:activate |
38 | | * @fires this.view#{this.id}:deactivate:{this._mode} |
39 | | * @fires this.view#{this.id}:deactivate |
| 38 | * @fires Region#activate |
| 39 | * @fires Region#deactivate |
40 | 40 | * |
41 | 41 | * @returns {wp.media.controller.Region} Returns itself to allow chaining. |
42 | 42 | */ |
… |
… |
_.extend( Region.prototype, { |
52 | 52 | /** |
53 | 53 | * Region mode deactivation event. |
54 | 54 | * |
55 | | * @event this.view#{this.id}:deactivate:{this._mode} |
56 | | * @event this.view#{this.id}:deactivate |
| 55 | * @event wp.media.controller.Region#deactivate |
57 | 56 | */ |
58 | 57 | this.trigger('deactivate'); |
59 | 58 | |
… |
… |
_.extend( Region.prototype, { |
63 | 62 | /** |
64 | 63 | * Region mode activation event. |
65 | 64 | * |
66 | | * @event this.view#{this.id}:activate:{this._mode} |
67 | | * @event this.view#{this.id}:activate |
| 65 | * @event wp.media.controller.Region#activate |
68 | 66 | */ |
69 | 67 | this.trigger('activate'); |
70 | 68 | return this; |
… |
… |
_.extend( Region.prototype, { |
76 | 74 | * |
77 | 75 | * @param {string} mode |
78 | 76 | * |
79 | | * @fires this.view#{this.id}:create:{this._mode} |
80 | | * @fires this.view#{this.id}:create |
81 | | * @fires this.view#{this.id}:render:{this._mode} |
82 | | * @fires this.view#{this.id}:render |
| 77 | * @fires Region#create |
| 78 | * @fires Region#render |
83 | 79 | * |
84 | 80 | * @returns {wp.media.controller.Region} Returns itself to allow chaining |
85 | 81 | */ |
… |
… |
_.extend( Region.prototype, { |
97 | 93 | * |
98 | 94 | * Region view creation takes place in an event callback on the frame. |
99 | 95 | * |
100 | | * @event this.view#{this.id}:create:{this._mode} |
101 | | * @event this.view#{this.id}:create |
| 96 | * @event wp.media.controller.Region#create |
| 97 | * @type {object} |
| 98 | * @property {object} view |
102 | 99 | */ |
103 | 100 | this.trigger( 'create', set ); |
104 | 101 | view = set.view; |
… |
… |
_.extend( Region.prototype, { |
108 | 105 | * |
109 | 106 | * Region view creation takes place in an event callback on the frame. |
110 | 107 | * |
111 | | * @event this.view#{this.id}:create:{this._mode} |
112 | | * @event this.view#{this.id}:create |
| 108 | * @event wp.media.controller.Region#render |
| 109 | * @type {object} |
113 | 110 | */ |
114 | 111 | this.trigger( 'render', view ); |
115 | 112 | if ( view ) { |
-
diff --git src/wp-includes/js/media/controllers/replace-image.js src/wp-includes/js/media/controllers/replace-image.js
index ed37a50de..eb6823a22 100644
|
|
|
| 1 | var Library = wp.media.controller.Library, |
| 2 | l10n = wp.media.view.l10n, |
| 3 | ReplaceImage; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.controller.ReplaceImage |
3 | 7 | * |
4 | 8 | * A state for replacing an image. |
5 | 9 | * |
| 10 | * @memberOf wp.media.controller |
| 11 | * |
6 | 12 | * @class |
7 | 13 | * @augments wp.media.controller.Library |
8 | 14 | * @augments wp.media.controller.State |
… |
… |
|
29 | 35 | * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user. |
30 | 36 | * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state. |
31 | 37 | */ |
32 | | var Library = wp.media.controller.Library, |
33 | | l10n = wp.media.view.l10n, |
34 | | ReplaceImage; |
35 | | |
36 | | ReplaceImage = Library.extend({ |
| 38 | ReplaceImage = Library.extend(/** @lends wp.media.controller.ReplaceImage.prototype */{ |
37 | 39 | defaults: _.defaults({ |
38 | 40 | id: 'replace-image', |
39 | 41 | title: l10n.replaceImageTitle, |
-
diff --git src/wp-includes/js/media/controllers/site-icon-cropper.js src/wp-includes/js/media/controllers/site-icon-cropper.js
index fc520a07c..4cd407206 100644
|
|
|
| 1 | var Controller = wp.media.controller, |
| 2 | SiteIconCropper; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.controller.SiteIconCropper |
3 | 6 | * |
4 | 7 | * A state for cropping a Site Icon. |
5 | 8 | * |
| 9 | * @memberOf wp.media.controller |
| 10 | * |
6 | 11 | * @class |
7 | 12 | * @augments wp.media.controller.Cropper |
8 | 13 | * @augments wp.media.controller.State |
9 | 14 | * @augments Backbone.Model |
10 | 15 | */ |
11 | | var Controller = wp.media.controller, |
12 | | SiteIconCropper; |
13 | | |
14 | | SiteIconCropper = Controller.Cropper.extend({ |
| 16 | SiteIconCropper = Controller.Cropper.extend(/** @lends wp.media.controller.SiteIconCropper.prototype */{ |
15 | 17 | activate: function() { |
16 | 18 | this.frame.on( 'content:create:crop', this.createCropContent, this ); |
17 | 19 | this.frame.on( 'close', this.removeCropper, this ); |
-
diff --git src/wp-includes/js/media/controllers/state-machine.js src/wp-includes/js/media/controllers/state-machine.js
index 8acf07f12..626f6c33c 100644
|
|
|
6 | 6 | * |
7 | 7 | * States are stored as models in a Backbone collection. |
8 | 8 | * |
| 9 | * @memberOf wp.media.controller |
| 10 | * |
9 | 11 | * @since 3.5.0 |
10 | 12 | * |
11 | 13 | * @class |
… |
… |
var StateMachine = function( states ) { |
23 | 25 | // Use Backbone's self-propagating `extend` inheritance method. |
24 | 26 | StateMachine.extend = Backbone.Model.extend; |
25 | 27 | |
26 | | _.extend( StateMachine.prototype, Backbone.Events, { |
| 28 | _.extend( StateMachine.prototype, Backbone.Events,/** @lends wp.media.controller.StateMachine.prototype */{ |
27 | 29 | /** |
28 | 30 | * Fetch a state. |
29 | 31 | * |
… |
… |
_.extend( StateMachine.prototype, Backbone.Events, { |
107 | 109 | // Map all event binding and triggering on a StateMachine to its `states` collection. |
108 | 110 | _.each([ 'on', 'off', 'trigger' ], function( method ) { |
109 | 111 | /** |
| 112 | * @function on |
| 113 | * @memberOf wp.media.controller.StateMachine |
| 114 | * @instance |
| 115 | * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining. |
| 116 | */ |
| 117 | /** |
| 118 | * @function off |
| 119 | * @memberOf wp.media.controller.StateMachine |
| 120 | * @instance |
| 121 | * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining. |
| 122 | */ |
| 123 | /** |
| 124 | * @function trigger |
| 125 | * @memberOf wp.media.controller.StateMachine |
| 126 | * @instance |
110 | 127 | * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining. |
111 | 128 | */ |
112 | 129 | StateMachine.prototype[ method ] = function() { |
-
diff --git src/wp-includes/js/media/controllers/state.js src/wp-includes/js/media/controllers/state.js
index e23ae8615..666efe58f 100644
|
|
|
12 | 12 | * 'reset' is not triggered automatically. It should be invoked by the |
13 | 13 | * proper controller to reset the state to its default. |
14 | 14 | * |
| 15 | * @memberOf wp.media.controller |
| 16 | * |
15 | 17 | * @class |
16 | 18 | * @augments Backbone.Model |
17 | 19 | */ |
18 | | var State = Backbone.Model.extend({ |
| 20 | var State = Backbone.Model.extend(/** @lends wp.media.controller.State.prototype */{ |
19 | 21 | /** |
20 | 22 | * Constructor. |
21 | 23 | * |
-
diff --git src/wp-includes/js/media/controllers/video-details.js src/wp-includes/js/media/controllers/video-details.js
index 00b301a1d..d54fcdbfa 100644
|
|
|
3 | 3 | * |
4 | 4 | * The controller for the Video Details state |
5 | 5 | * |
| 6 | * @memberOf wp.media.controller |
| 7 | * |
6 | 8 | * @class |
7 | 9 | * @augments wp.media.controller.State |
8 | 10 | * @augments Backbone.Model |
… |
… |
var State = wp.media.controller.State, |
11 | 13 | l10n = wp.media.view.l10n, |
12 | 14 | VideoDetails; |
13 | 15 | |
14 | | VideoDetails = State.extend({ |
| 16 | VideoDetails = State.extend(/** @lends wp.media.controller.VideoDetails.prototype */{ |
15 | 17 | defaults: { |
16 | 18 | id: 'video-details', |
17 | 19 | toolbar: 'video-details', |
-
diff --git src/wp-includes/js/media/models.manifest.js src/wp-includes/js/media/models.manifest.js
index a40a471e5..41f27e461 100644
|
|
|
1 | 1 | var $ = jQuery, |
2 | 2 | Attachment, Attachments, l10n, media; |
3 | 3 | |
| 4 | /** @namespace wp */ |
4 | 5 | window.wp = window.wp || {}; |
5 | 6 | |
6 | 7 | /** |
… |
… |
window.wp = window.wp || {}; |
8 | 9 | * |
9 | 10 | * Handles the default media experience. |
10 | 11 | * |
| 12 | * @alias wp.media |
| 13 | * @memberOf wp |
| 14 | * |
11 | 15 | * @param {object} attributes The properties passed to the main media controller. |
12 | 16 | * @return {wp.media.view.MediaFrame} A media workflow. |
13 | 17 | */ |
… |
… |
media = wp.media = function( attributes ) { |
46 | 50 | return frame; |
47 | 51 | }; |
48 | 52 | |
| 53 | /** @namespace wp.media */ |
| 54 | /** @namespace wp.media.model */ |
| 55 | /** @namespace wp.media.view */ |
| 56 | /** @namespace wp.media.controller */ |
| 57 | /** @namespace wp.media.frames */ |
49 | 58 | _.extend( media, { model: {}, view: {}, controller: {}, frames: {} }); |
50 | 59 | |
51 | 60 | // Link any localized strings. |
… |
… |
media.compare = function( a, b, ac, bc ) { |
89 | 98 | } |
90 | 99 | }; |
91 | 100 | |
92 | | _.extend( media, { |
| 101 | _.extend( media, /** @lends wp.media */{ |
93 | 102 | /** |
94 | 103 | * media.template( id ) |
95 | 104 | * |
-
diff --git src/wp-includes/js/media/models/attachment.js src/wp-includes/js/media/models/attachment.js
index 8fcae4c7c..38f55187a 100644
|
|
|
| 1 | var $ = Backbone.$, |
| 2 | Attachment; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.model.Attachment |
3 | 6 | * |
| 7 | * @memberOf wp.media.model |
| 8 | * |
4 | 9 | * @class |
5 | 10 | * @augments Backbone.Model |
6 | 11 | */ |
7 | | var $ = Backbone.$, |
8 | | Attachment; |
9 | | |
10 | | Attachment = Backbone.Model.extend({ |
| 12 | Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototype */{ |
11 | 13 | /** |
12 | 14 | * Triggered when attachment details change |
13 | 15 | * Overrides Backbone.Model.sync |
… |
… |
Attachment = Backbone.Model.extend({ |
134 | 136 | model.set( model.parse( resp, xhr ), options ); |
135 | 137 | }); |
136 | 138 | } |
137 | | }, { |
| 139 | },/** @lends wp.media.model.Attachment */{ |
138 | 140 | /** |
139 | 141 | * Create a new model on the static 'all' attachments collection and return it. |
140 | 142 | * |
141 | 143 | * @static |
| 144 | * |
142 | 145 | * @param {Object} attrs |
143 | 146 | * @returns {wp.media.model.Attachment} |
144 | 147 | */ |
-
diff --git src/wp-includes/js/media/models/attachments.js src/wp-includes/js/media/models/attachments.js
index ea4881377..c76bbbdfa 100644
|
|
|
7 | 7 | * 'options.props.query = true', which will mirror the collection |
8 | 8 | * to an Attachments Query collection - @see wp.media.model.Attachments.mirror(). |
9 | 9 | * |
| 10 | * @memberOf wp.media.model |
| 11 | * |
10 | 12 | * @class |
11 | 13 | * @augments Backbone.Collection |
12 | 14 | * |
… |
… |
|
20 | 22 | * @param {string} [options.filters] |
21 | 23 | * |
22 | 24 | */ |
23 | | var Attachments = Backbone.Collection.extend({ |
| 25 | var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachments.prototype */{ |
24 | 26 | /** |
25 | 27 | * @type {wp.media.model.Attachment} |
26 | 28 | */ |
… |
… |
var Attachments = Backbone.Collection.extend({ |
418 | 420 | attachments: attachments |
419 | 421 | }); |
420 | 422 | } |
421 | | }, { |
| 423 | },/** @lends wp.media.model.Attachments */{ |
422 | 424 | /** |
423 | 425 | * A function to compare two attachment models in an attachments collection. |
424 | 426 | * |
425 | 427 | * Used as the default comparator for instances of wp.media.model.Attachments |
426 | 428 | * and its subclasses. @see wp.media.model.Attachments._changeOrderby(). |
427 | 429 | * |
428 | | * @static |
429 | | * |
430 | 430 | * @param {Backbone.Model} a |
431 | 431 | * @param {Backbone.Model} b |
432 | 432 | * @param {Object} options |
… |
… |
var Attachments = Backbone.Collection.extend({ |
455 | 455 | |
456 | 456 | return ( 'DESC' === order ) ? wp.media.compare( a, b, ac, bc ) : wp.media.compare( b, a, bc, ac ); |
457 | 457 | }, |
458 | | /** |
459 | | * @namespace |
460 | | */ |
| 458 | /** @namespace wp.media.model.Attachments.filters */ |
461 | 459 | filters: { |
462 | 460 | /** |
463 | 461 | * @static |
-
diff --git src/wp-includes/js/media/models/post-image.js src/wp-includes/js/media/models/post-image.js
index c78fdf60e..f1ff867e4 100644
|
|
|
5 | 5 | * |
6 | 6 | * Used in the embedded image attachment display settings modal - @see wp.media.view.MediaFrame.ImageDetails. |
7 | 7 | * |
| 8 | * @memberOf wp.media.model |
| 9 | * |
8 | 10 | * @class |
9 | 11 | * @augments Backbone.Model |
10 | 12 | * |
11 | 13 | * @param {int} [attributes] Initial model attributes. |
12 | 14 | * @param {int} [attributes.attachment_id] ID of the attachment. |
13 | 15 | **/ |
14 | | var PostImage = Backbone.Model.extend({ |
| 16 | var PostImage = Backbone.Model.extend(/** @lends wp.media.model.PostImage.prototype */{ |
15 | 17 | |
16 | 18 | initialize: function( attributes ) { |
17 | 19 | var Attachment = wp.media.model.Attachment; |
-
diff --git src/wp-includes/js/media/models/post-media.js src/wp-includes/js/media/models/post-media.js
index f1e28b4b2..fd642a724 100644
|
|
|
4 | 4 | * Shared model class for audio and video. Updates the model after |
5 | 5 | * "Add Audio|Video Source" and "Replace Audio|Video" states return |
6 | 6 | * |
| 7 | * @memberOf wp.media.model |
| 8 | * |
7 | 9 | * @class |
8 | 10 | * @augments Backbone.Model |
9 | 11 | */ |
10 | | var PostMedia = Backbone.Model.extend({ |
| 12 | var PostMedia = Backbone.Model.extend(/** @lends wp.media.model.PostMedia.prototype */{ |
11 | 13 | initialize: function() { |
12 | 14 | this.attachment = false; |
13 | 15 | }, |
-
diff --git src/wp-includes/js/media/models/query.js src/wp-includes/js/media/models/query.js
index 20ccfc45e..420e4bbea 100644
|
|
|
| 1 | var Attachments = wp.media.model.Attachments, |
| 2 | Query; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.model.Query |
3 | 6 | * |
… |
… |
|
6 | 9 | * Note: Do NOT change this.args after the query has been initialized. |
7 | 10 | * Things will break. |
8 | 11 | * |
| 12 | * @memberOf wp.media.model |
| 13 | * |
9 | 14 | * @class |
10 | 15 | * @augments wp.media.model.Attachments |
11 | 16 | * @augments Backbone.Collection |
… |
… |
|
15 | 20 | * @param {object} [options.args] Attachments query arguments. |
16 | 21 | * @param {object} [options.args.posts_per_page] |
17 | 22 | */ |
18 | | var Attachments = wp.media.model.Attachments, |
19 | | Query; |
20 | | |
21 | | Query = Attachments.extend({ |
| 23 | Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{ |
22 | 24 | /** |
23 | | * @global wp.Uploader |
24 | | * |
25 | 25 | * @param {array} [models=[]] Array of initial models to populate the collection. |
26 | 26 | * @param {object} [options={}] |
27 | 27 | */ |
… |
… |
Query = Attachments.extend({ |
153 | 153 | return fallback.sync.apply( this, arguments ); |
154 | 154 | } |
155 | 155 | } |
156 | | }, { |
| 156 | }, /** @lends wp.media.model.Query */{ |
157 | 157 | /** |
158 | 158 | * @readonly |
159 | 159 | */ |
-
diff --git src/wp-includes/js/media/models/selection.js src/wp-includes/js/media/models/selection.js
index faa697dae..894545f0f 100644
|
|
|
| 1 | var Attachments = wp.media.model.Attachments, |
| 2 | Selection; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.model.Selection |
3 | 6 | * |
4 | 7 | * A selection of attachments. |
5 | 8 | * |
| 9 | * @memberOf wp.media.model |
| 10 | * |
6 | 11 | * @class |
7 | 12 | * @augments wp.media.model.Attachments |
8 | 13 | * @augments Backbone.Collection |
9 | 14 | */ |
10 | | var Attachments = wp.media.model.Attachments, |
11 | | Selection; |
12 | | |
13 | | Selection = Attachments.extend({ |
| 15 | Selection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{ |
14 | 16 | /** |
15 | 17 | * Refresh the `single` model whenever the selection changes. |
16 | 18 | * Binds `single` instead of using the context argument to ensure |
-
diff --git src/wp-includes/js/media/routers/manage.js src/wp-includes/js/media/routers/manage.js
index 4b88aa3e0..d05807877 100644
|
|
|
3 | 3 | * |
4 | 4 | * A router for handling the browser history and application state. |
5 | 5 | * |
| 6 | * @memberOf wp.media.view.MediaFrame.Manage |
| 7 | * |
6 | 8 | * @class |
7 | 9 | * @augments Backbone.Router |
8 | 10 | */ |
9 | | var Router = Backbone.Router.extend({ |
| 11 | var Router = Backbone.Router.extend(/** @lends wp.media.view.MediaFrame.Manage.Router.prototype */{ |
10 | 12 | routes: { |
11 | 13 | 'upload.php?item=:slug&mode=edit': 'editItem', |
12 | 14 | 'upload.php?item=:slug': 'showItem', |
-
diff --git src/wp-includes/js/media/utils/selection-sync.js src/wp-includes/js/media/utils/selection-sync.js
index d22b419d8..f4b5c3352 100644
|
|
|
6 | 6 | * Allows for selecting multiple images in the Insert Media workflow, and then |
7 | 7 | * switching to the Insert Gallery workflow while preserving the attachments selection. |
8 | 8 | * |
| 9 | * @memberOf wp.media |
| 10 | * |
9 | 11 | * @mixin |
10 | 12 | */ |
11 | 13 | var selectionSync = { |
-
diff --git src/wp-includes/js/media/views/attachment-compat.js src/wp-includes/js/media/views/attachment-compat.js
index a54c22465..d995d231b 100644
|
|
|
| 1 | var View = wp.media.View, |
| 2 | AttachmentCompat; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.view.AttachmentCompat |
3 | 6 | * |
4 | 7 | * A view to display fields added via the `attachment_fields_to_edit` filter. |
5 | 8 | * |
| 9 | * @memberOf wp.media.view |
| 10 | * |
6 | 11 | * @class |
7 | 12 | * @augments wp.media.View |
8 | 13 | * @augments wp.Backbone.View |
9 | 14 | * @augments Backbone.View |
10 | 15 | */ |
11 | | var View = wp.media.View, |
12 | | AttachmentCompat; |
13 | | |
14 | | AttachmentCompat = View.extend({ |
| 16 | AttachmentCompat = View.extend(/** @lends wp.media.view.AttachmentCompat.prototype */{ |
15 | 17 | tagName: 'form', |
16 | 18 | className: 'compat-item', |
17 | 19 | |
-
diff --git src/wp-includes/js/media/views/attachment-filters.js src/wp-includes/js/media/views/attachment-filters.js
index 7f1a9612d..a228043c3 100644
|
|
|
| 1 | var $ = jQuery, |
| 2 | AttachmentFilters; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.view.AttachmentFilters |
3 | 6 | * |
| 7 | * @memberOf wp.media.view |
| 8 | * |
4 | 9 | * @class |
5 | 10 | * @augments wp.media.View |
6 | 11 | * @augments wp.Backbone.View |
7 | 12 | * @augments Backbone.View |
8 | 13 | */ |
9 | | var $ = jQuery, |
10 | | AttachmentFilters; |
11 | | |
12 | | AttachmentFilters = wp.media.View.extend({ |
| 14 | AttachmentFilters = wp.media.View.extend(/** @lends wp.media.view.AttachmentFilters.prototype */{ |
13 | 15 | tagName: 'select', |
14 | 16 | className: 'attachment-filters', |
15 | 17 | id: 'media-attachment-filters', |
-
diff --git src/wp-includes/js/media/views/attachment-filters/all.js src/wp-includes/js/media/views/attachment-filters/all.js
index cc79d12e8..fa85cbdba 100644
|
|
|
| 1 | var l10n = wp.media.view.l10n, |
| 2 | All; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.view.AttachmentFilters.All |
3 | 6 | * |
| 7 | * @memberOf wp.media.view.AttachmentFilters |
| 8 | * |
4 | 9 | * @class |
5 | 10 | * @augments wp.media.view.AttachmentFilters |
6 | 11 | * @augments wp.media.View |
7 | 12 | * @augments wp.Backbone.View |
8 | 13 | * @augments Backbone.View |
9 | 14 | */ |
10 | | var l10n = wp.media.view.l10n, |
11 | | All; |
12 | | |
13 | | All = wp.media.view.AttachmentFilters.extend({ |
| 15 | All = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.All.prototype */{ |
14 | 16 | createFilters: function() { |
15 | 17 | var filters = {}; |
16 | 18 | |
-
diff --git src/wp-includes/js/media/views/attachment-filters/date.js src/wp-includes/js/media/views/attachment-filters/date.js
index 5508e1be4..4d1b8f936 100644
|
|
|
| 1 | var l10n = wp.media.view.l10n, |
| 2 | DateFilter; |
| 3 | |
1 | 4 | /** |
2 | 5 | * A filter dropdown for month/dates. |
3 | 6 | * |
| 7 | * @memberOf wp.media.view.AttachmentFilters |
| 8 | * |
4 | 9 | * @class |
5 | 10 | * @augments wp.media.view.AttachmentFilters |
6 | 11 | * @augments wp.media.View |
7 | 12 | * @augments wp.Backbone.View |
8 | 13 | * @augments Backbone.View |
9 | 14 | */ |
10 | | var l10n = wp.media.view.l10n, |
11 | | DateFilter; |
12 | | |
13 | | DateFilter = wp.media.view.AttachmentFilters.extend({ |
| 15 | DateFilter = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.Date.prototype */{ |
14 | 16 | id: 'media-attachment-date-filters', |
15 | 17 | |
16 | 18 | createFilters: function() { |
-
diff --git src/wp-includes/js/media/views/attachment-filters/uploaded.js src/wp-includes/js/media/views/attachment-filters/uploaded.js
index 7ae0a53da..167d8d47c 100644
|
|
|
| 1 | var l10n = wp.media.view.l10n, |
| 2 | Uploaded; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.view.AttachmentFilters.Uploaded |
3 | 6 | * |
| 7 | * @memberOf wp.media.view.AttachmentFilters |
| 8 | * |
4 | 9 | * @class |
5 | 10 | * @augments wp.media.view.AttachmentFilters |
6 | 11 | * @augments wp.media.View |
7 | 12 | * @augments wp.Backbone.View |
8 | 13 | * @augments Backbone.View |
9 | 14 | */ |
10 | | var l10n = wp.media.view.l10n, |
11 | | Uploaded; |
12 | | |
13 | | Uploaded = wp.media.view.AttachmentFilters.extend({ |
| 15 | Uploaded = wp.media.view.AttachmentFilters.extend(/** @lends wp.media.view.AttachmentFilters.Uploaded.prototype */{ |
14 | 16 | createFilters: function() { |
15 | 17 | var type = this.model.get('type'), |
16 | 18 | types = wp.media.view.settings.mimeTypes, |
-
diff --git src/wp-includes/js/media/views/attachment.js src/wp-includes/js/media/views/attachment.js
index f61855586..3c93d597b 100644
|
|
|
| 1 | var View = wp.media.View, |
| 2 | $ = jQuery, |
| 3 | Attachment; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.view.Attachment |
3 | 7 | * |
| 8 | * @memberOf wp.media.view |
| 9 | * |
4 | 10 | * @class |
5 | 11 | * @augments wp.media.View |
6 | 12 | * @augments wp.Backbone.View |
7 | 13 | * @augments Backbone.View |
8 | 14 | */ |
9 | | var View = wp.media.View, |
10 | | $ = jQuery, |
11 | | Attachment; |
12 | | |
13 | | Attachment = View.extend({ |
| 15 | Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{ |
14 | 16 | tagName: 'li', |
15 | 17 | className: 'attachment', |
16 | 18 | template: wp.template('attachment'), |
… |
… |
_.each({ |
518 | 520 | album: '_syncAlbum' |
519 | 521 | }, function( method, setting ) { |
520 | 522 | /** |
| 523 | * @function _syncCaption |
| 524 | * @memberOf wp.media.view.Attachment |
| 525 | * @instance |
| 526 | * |
| 527 | * @param {Backbone.Model} model |
| 528 | * @param {string} value |
| 529 | * @returns {wp.media.view.Attachment} Returns itself to allow chaining |
| 530 | */ |
| 531 | /** |
| 532 | * @function _syncTitle |
| 533 | * @memberOf wp.media.view.Attachment |
| 534 | * @instance |
| 535 | * |
| 536 | * @param {Backbone.Model} model |
| 537 | * @param {string} value |
| 538 | * @returns {wp.media.view.Attachment} Returns itself to allow chaining |
| 539 | */ |
| 540 | /** |
| 541 | * @function _syncArtist |
| 542 | * @memberOf wp.media.view.Attachment |
| 543 | * @instance |
| 544 | * |
| 545 | * @param {Backbone.Model} model |
| 546 | * @param {string} value |
| 547 | * @returns {wp.media.view.Attachment} Returns itself to allow chaining |
| 548 | */ |
| 549 | /** |
| 550 | * @function _syncAlbum |
| 551 | * @memberOf wp.media.view.Attachment |
| 552 | * @instance |
| 553 | * |
521 | 554 | * @param {Backbone.Model} model |
522 | 555 | * @param {string} value |
523 | 556 | * @returns {wp.media.view.Attachment} Returns itself to allow chaining |
-
diff --git src/wp-includes/js/media/views/attachment/details-two-column.js src/wp-includes/js/media/views/attachment/details-two-column.js
index 96a8fed8f..7d0b44104 100644
|
|
|
| 1 | var Details = wp.media.view.Attachment.Details, |
| 2 | TwoColumn; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.view.Attachment.Details.TwoColumn |
3 | 6 | * |
4 | 7 | * A similar view to media.view.Attachment.Details |
5 | 8 | * for use in the Edit Attachment modal. |
6 | 9 | * |
| 10 | * @memberOf wp.media.view.Attachment.Details |
| 11 | * |
7 | 12 | * @class |
8 | 13 | * @augments wp.media.view.Attachment.Details |
9 | 14 | * @augments wp.media.view.Attachment |
… |
… |
|
11 | 16 | * @augments wp.Backbone.View |
12 | 17 | * @augments Backbone.View |
13 | 18 | */ |
14 | | var Details = wp.media.view.Attachment.Details, |
15 | | TwoColumn; |
16 | | |
17 | | TwoColumn = Details.extend({ |
| 19 | TwoColumn = Details.extend(/** @lends wp.media.view.Attachment.Details.TowColumn.prototype */{ |
18 | 20 | template: wp.template( 'attachment-details-two-column' ), |
19 | 21 | |
20 | 22 | initialize: function() { |
-
diff --git src/wp-includes/js/media/views/attachment/details.js src/wp-includes/js/media/views/attachment/details.js
index f356aaadb..5dd682d55 100644
|
|
|
| 1 | var Attachment = wp.media.view.Attachment, |
| 2 | l10n = wp.media.view.l10n, |
| 3 | Details; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.view.Attachment.Details |
3 | 7 | * |
| 8 | * @memberOf wp.media.view.Attachment |
| 9 | * |
4 | 10 | * @class |
5 | 11 | * @augments wp.media.view.Attachment |
6 | 12 | * @augments wp.media.View |
7 | 13 | * @augments wp.Backbone.View |
8 | 14 | * @augments Backbone.View |
9 | 15 | */ |
10 | | var Attachment = wp.media.view.Attachment, |
11 | | l10n = wp.media.view.l10n, |
12 | | Details; |
13 | | |
14 | | Details = Attachment.extend({ |
| 16 | Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototype */{ |
15 | 17 | tagName: 'div', |
16 | 18 | className: 'attachment-details', |
17 | 19 | template: wp.template('attachment-details'), |
-
diff --git src/wp-includes/js/media/views/attachment/edit-library.js src/wp-includes/js/media/views/attachment/edit-library.js
index 4d9b23a72..0d3d029f7 100644
|
|
|
1 | 1 | /** |
2 | 2 | * wp.media.view.Attachment.EditLibrary |
3 | 3 | * |
| 4 | * @memberOf wp.media.view.Attachment |
| 5 | * |
4 | 6 | * @class |
5 | 7 | * @augments wp.media.view.Attachment |
6 | 8 | * @augments wp.media.View |
7 | 9 | * @augments wp.Backbone.View |
8 | 10 | * @augments Backbone.View |
9 | 11 | */ |
10 | | var EditLibrary = wp.media.view.Attachment.extend({ |
| 12 | var EditLibrary = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.EditLibrary.prototype */{ |
11 | 13 | buttons: { |
12 | 14 | close: true |
13 | 15 | } |
-
diff --git src/wp-includes/js/media/views/attachment/edit-selection.js src/wp-includes/js/media/views/attachment/edit-selection.js
index 26c68480b..f9c431854 100644
|
|
|
1 | 1 | /** |
2 | | * wp.media.view.Attachments.EditSelection |
| 2 | * wp.media.view.Attachment.EditSelection |
| 3 | * |
| 4 | * @memberOf wp.media.view.Attachment |
3 | 5 | * |
4 | 6 | * @class |
5 | 7 | * @augments wp.media.view.Attachment.Selection |
… |
… |
|
8 | 10 | * @augments wp.Backbone.View |
9 | 11 | * @augments Backbone.View |
10 | 12 | */ |
11 | | var EditSelection = wp.media.view.Attachment.Selection.extend({ |
| 13 | var EditSelection = wp.media.view.Attachment.Selection.extend(/** @lends wp.media.view.Attachment.EditSelection.prototype */{ |
12 | 14 | buttons: { |
13 | 15 | close: true |
14 | 16 | } |
-
diff --git src/wp-includes/js/media/views/attachment/library.js src/wp-includes/js/media/views/attachment/library.js
index ec0843054..1bbea30c5 100644
|
|
|
1 | 1 | /** |
2 | 2 | * wp.media.view.Attachment.Library |
3 | 3 | * |
| 4 | * @memberOf wp.media.view.Attachment |
| 5 | * |
4 | 6 | * @class |
5 | 7 | * @augments wp.media.view.Attachment |
6 | 8 | * @augments wp.media.View |
7 | 9 | * @augments wp.Backbone.View |
8 | 10 | * @augments Backbone.View |
9 | 11 | */ |
10 | | var Library = wp.media.view.Attachment.extend({ |
| 12 | var Library = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.Library.prototype */{ |
11 | 13 | buttons: { |
12 | 14 | check: true |
13 | 15 | } |
-
diff --git src/wp-includes/js/media/views/attachment/selection.js src/wp-includes/js/media/views/attachment/selection.js
index 3eae46549..4ca9ddd52 100644
|
|
|
1 | 1 | /** |
2 | 2 | * wp.media.view.Attachment.Selection |
3 | 3 | * |
| 4 | * @memberOf wp.media.view.Attachment |
| 5 | * |
4 | 6 | * @class |
5 | 7 | * @augments wp.media.view.Attachment |
6 | 8 | * @augments wp.media.View |
7 | 9 | * @augments wp.Backbone.View |
8 | 10 | * @augments Backbone.View |
9 | 11 | */ |
10 | | var Selection = wp.media.view.Attachment.extend({ |
| 12 | var Selection = wp.media.view.Attachment.extend(/** @lends wp.media.view.Attachment.Selection.prototype */{ |
11 | 13 | className: 'attachment selection', |
12 | 14 | |
13 | 15 | // On click, just select the model, instead of removing the model from |
-
diff --git src/wp-includes/js/media/views/attachments.js src/wp-includes/js/media/views/attachments.js
index d217ccc73..73edcec8f 100644
|
|
|
| 1 | var View = wp.media.View, |
| 2 | $ = jQuery, |
| 3 | Attachments; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.view.Attachments |
3 | 7 | * |
| 8 | * @memberOf wp.media.view |
| 9 | * |
4 | 10 | * @class |
5 | 11 | * @augments wp.media.View |
6 | 12 | * @augments wp.Backbone.View |
7 | 13 | * @augments Backbone.View |
8 | 14 | */ |
9 | | var View = wp.media.View, |
10 | | $ = jQuery, |
11 | | Attachments; |
12 | | |
13 | | Attachments = View.extend({ |
| 15 | Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{ |
14 | 16 | tagName: 'ul', |
15 | 17 | className: 'attachments', |
16 | 18 | |
-
diff --git src/wp-includes/js/media/views/attachments/browser.js src/wp-includes/js/media/views/attachments/browser.js
index eb077d074..0f4561b06 100644
|
|
|
| 1 | var View = wp.media.View, |
| 2 | mediaTrash = wp.media.view.settings.mediaTrash, |
| 3 | l10n = wp.media.view.l10n, |
| 4 | $ = jQuery, |
| 5 | AttachmentsBrowser; |
| 6 | |
1 | 7 | /** |
2 | 8 | * wp.media.view.AttachmentsBrowser |
3 | 9 | * |
| 10 | * @memberOf wp.media.view |
| 11 | * |
4 | 12 | * @class |
5 | 13 | * @augments wp.media.View |
6 | 14 | * @augments wp.Backbone.View |
… |
… |
|
18 | 26 | * @param {boolean|string} [options.sidebar=true] Whether to create a sidebar for the browser. |
19 | 27 | * Accepts true, false, and 'errors'. |
20 | 28 | */ |
21 | | var View = wp.media.View, |
22 | | mediaTrash = wp.media.view.settings.mediaTrash, |
23 | | l10n = wp.media.view.l10n, |
24 | | $ = jQuery, |
25 | | AttachmentsBrowser; |
26 | | |
27 | | AttachmentsBrowser = View.extend({ |
| 29 | AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.prototype */{ |
28 | 30 | tagName: 'div', |
29 | 31 | className: 'attachments-browser', |
30 | 32 | |
-
diff --git src/wp-includes/js/media/views/attachments/selection.js src/wp-includes/js/media/views/attachments/selection.js
index 8c3c5d00a..58eaadcd6 100644
|
|
|
| 1 | var Attachments = wp.media.view.Attachments, |
| 2 | Selection; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.view.Attachments.Selection |
3 | 6 | * |
| 7 | * @memberOf wp.media.view.Attachments |
| 8 | * |
4 | 9 | * @class |
5 | 10 | * @augments wp.media.view.Attachments |
6 | 11 | * @augments wp.media.View |
7 | 12 | * @augments wp.Backbone.View |
8 | 13 | * @augments Backbone.View |
9 | 14 | */ |
10 | | var Attachments = wp.media.view.Attachments, |
11 | | Selection; |
12 | | |
13 | | Selection = Attachments.extend({ |
| 15 | Selection = Attachments.extend(/** @lends wp.media.view.Attachments.Selection.prototype */{ |
14 | 16 | events: {}, |
15 | 17 | initialize: function() { |
16 | 18 | _.defaults( this.options, { |
-
diff --git src/wp-includes/js/media/views/audio-details.js src/wp-includes/js/media/views/audio-details.js
index ec1ed8b33..afafca308 100644
|
|
|
| 1 | var MediaDetails = wp.media.view.MediaDetails, |
| 2 | AudioDetails; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.view.AudioDetails |
3 | 6 | * |
| 7 | * @memberOf wp.media.view |
| 8 | * |
4 | 9 | * @class |
5 | 10 | * @augments wp.media.view.MediaDetails |
6 | 11 | * @augments wp.media.view.Settings.AttachmentDisplay |
… |
… |
|
9 | 14 | * @augments wp.Backbone.View |
10 | 15 | * @augments Backbone.View |
11 | 16 | */ |
12 | | var MediaDetails = wp.media.view.MediaDetails, |
13 | | AudioDetails; |
14 | | |
15 | | AudioDetails = MediaDetails.extend({ |
| 17 | AudioDetails = MediaDetails.extend(/** @lends wp.media.view.AudioDetails.prototype */{ |
16 | 18 | className: 'audio-details', |
17 | 19 | template: wp.template('audio-details'), |
18 | 20 | |
-
diff --git src/wp-includes/js/media/views/button-group.js src/wp-includes/js/media/views/button-group.js
index b0d97ba57..5b44d5ff1 100644
|
|
|
| 1 | var $ = Backbone.$, |
| 2 | ButtonGroup; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.view.ButtonGroup |
3 | 6 | * |
| 7 | * @memberOf wp.media.view |
| 8 | * |
4 | 9 | * @class |
5 | 10 | * @augments wp.media.View |
6 | 11 | * @augments wp.Backbone.View |
7 | 12 | * @augments Backbone.View |
8 | 13 | */ |
9 | | var $ = Backbone.$, |
10 | | ButtonGroup; |
11 | | |
12 | | ButtonGroup = wp.media.View.extend({ |
| 14 | ButtonGroup = wp.media.View.extend(/** @lends wp.media.view.ButtonGroup.prototype */{ |
13 | 15 | tagName: 'div', |
14 | 16 | className: 'button-group button-large media-button-group', |
15 | 17 | |
-
diff --git src/wp-includes/js/media/views/button.js src/wp-includes/js/media/views/button.js
index 3442dc4fa..8f1af79d8 100644
|
|
|
1 | 1 | /** |
2 | 2 | * wp.media.view.Button |
3 | 3 | * |
| 4 | * @memberOf wp.media.view |
| 5 | * |
4 | 6 | * @class |
5 | 7 | * @augments wp.media.View |
6 | 8 | * @augments wp.Backbone.View |
7 | 9 | * @augments Backbone.View |
8 | 10 | */ |
9 | | var Button = wp.media.View.extend({ |
| 11 | var Button = wp.media.View.extend(/** @lends wp.media.view.Button.prototype */{ |
10 | 12 | tagName: 'button', |
11 | 13 | className: 'media-button', |
12 | 14 | attributes: { type: 'button' }, |
-
diff --git src/wp-includes/js/media/views/button/delete-selected-permanently.js src/wp-includes/js/media/views/button/delete-selected-permanently.js
index 7c6a5e30b..a4b55d911 100644
|
|
|
| 1 | var Button = wp.media.view.Button, |
| 2 | DeleteSelected = wp.media.view.DeleteSelectedButton, |
| 3 | DeleteSelectedPermanently; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.view.DeleteSelectedPermanentlyButton |
3 | 7 | * |
4 | 8 | * When MEDIA_TRASH is true, a button that handles bulk Delete Permanently logic |
5 | 9 | * |
| 10 | * @memberOf wp.media.view |
| 11 | * |
6 | 12 | * @class |
7 | 13 | * @augments wp.media.view.DeleteSelectedButton |
8 | 14 | * @augments wp.media.view.Button |
… |
… |
|
10 | 16 | * @augments wp.Backbone.View |
11 | 17 | * @augments Backbone.View |
12 | 18 | */ |
13 | | var Button = wp.media.view.Button, |
14 | | DeleteSelected = wp.media.view.DeleteSelectedButton, |
15 | | DeleteSelectedPermanently; |
16 | | |
17 | | DeleteSelectedPermanently = DeleteSelected.extend({ |
| 19 | DeleteSelectedPermanently = DeleteSelected.extend(/** @lends wp.media.view.DeleteSelectedPermanentlyButton.prototype */{ |
18 | 20 | initialize: function() { |
19 | 21 | DeleteSelected.prototype.initialize.apply( this, arguments ); |
20 | 22 | this.controller.on( 'select:activate', this.selectActivate, this ); |
-
diff --git src/wp-includes/js/media/views/button/delete-selected.js src/wp-includes/js/media/views/button/delete-selected.js
index c9ee1b026..7c58ac2b7 100644
|
|
|
| 1 | var Button = wp.media.view.Button, |
| 2 | l10n = wp.media.view.l10n, |
| 3 | DeleteSelected; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.view.DeleteSelectedButton |
3 | 7 | * |
4 | 8 | * A button that handles bulk Delete/Trash logic |
5 | 9 | * |
| 10 | * @memberOf wp.media.view |
| 11 | * |
6 | 12 | * @class |
7 | 13 | * @augments wp.media.view.Button |
8 | 14 | * @augments wp.media.View |
9 | 15 | * @augments wp.Backbone.View |
10 | 16 | * @augments Backbone.View |
11 | 17 | */ |
12 | | var Button = wp.media.view.Button, |
13 | | l10n = wp.media.view.l10n, |
14 | | DeleteSelected; |
15 | | |
16 | | DeleteSelected = Button.extend({ |
| 18 | DeleteSelected = Button.extend(/** @lends wp.media.view.DeleteSelectedButton.prototype */{ |
17 | 19 | initialize: function() { |
18 | 20 | Button.prototype.initialize.apply( this, arguments ); |
19 | 21 | if ( this.options.filters ) { |
-
diff --git src/wp-includes/js/media/views/button/select-mode-toggle.js src/wp-includes/js/media/views/button/select-mode-toggle.js
index 820e5ded4..3e3d6d76c 100644
|
|
|
| 1 | |
| 2 | var Button = wp.media.view.Button, |
| 3 | l10n = wp.media.view.l10n, |
| 4 | SelectModeToggle; |
| 5 | |
1 | 6 | /** |
2 | 7 | * wp.media.view.SelectModeToggleButton |
3 | 8 | * |
| 9 | * @memberOf wp.media.view |
| 10 | * |
4 | 11 | * @class |
5 | 12 | * @augments wp.media.view.Button |
6 | 13 | * @augments wp.media.View |
7 | 14 | * @augments wp.Backbone.View |
8 | 15 | * @augments Backbone.View |
9 | 16 | */ |
10 | | var Button = wp.media.view.Button, |
11 | | l10n = wp.media.view.l10n, |
12 | | SelectModeToggle; |
13 | | |
14 | | SelectModeToggle = Button.extend({ |
| 17 | SelectModeToggle = Button.extend(/** @lends wp.media.view.SelectModeToggle.prototype */{ |
15 | 18 | initialize: function() { |
16 | 19 | _.defaults( this.options, { |
17 | 20 | size : '' |
-
diff --git src/wp-includes/js/media/views/cropper.js src/wp-includes/js/media/views/cropper.js
index 9eb75c3f5..90012552d 100644
|
|
|
| 1 | var View = wp.media.View, |
| 2 | UploaderStatus = wp.media.view.UploaderStatus, |
| 3 | l10n = wp.media.view.l10n, |
| 4 | $ = jQuery, |
| 5 | Cropper; |
| 6 | |
1 | 7 | /** |
2 | 8 | * wp.media.view.Cropper |
3 | 9 | * |
… |
… |
|
7 | 13 | * wp.customize.HeaderControl.calculateImageSelectOptions via |
8 | 14 | * wp.customize.HeaderControl.openMM. |
9 | 15 | * |
| 16 | * @memberOf wp.media.view |
| 17 | * |
10 | 18 | * @class |
11 | 19 | * @augments wp.media.View |
12 | 20 | * @augments wp.Backbone.View |
13 | 21 | * @augments Backbone.View |
14 | 22 | */ |
15 | | var View = wp.media.View, |
16 | | UploaderStatus = wp.media.view.UploaderStatus, |
17 | | l10n = wp.media.view.l10n, |
18 | | $ = jQuery, |
19 | | Cropper; |
20 | | |
21 | | Cropper = View.extend({ |
| 23 | Cropper = View.extend(/** @lends wp.media.view.Cropper.prototype */{ |
22 | 24 | className: 'crop-content', |
23 | 25 | template: wp.template('crop-content'), |
24 | 26 | initialize: function() { |
-
diff --git src/wp-includes/js/media/views/edit-image-details.js src/wp-includes/js/media/views/edit-image-details.js
index 3ef87a549..ee7490313 100644
|
|
|
| 1 | var View = wp.media.View, |
| 2 | EditImage = wp.media.view.EditImage, |
| 3 | Details; |
| 4 | |
1 | 5 | /** |
2 | 6 | * wp.media.view.EditImage.Details |
3 | 7 | * |
| 8 | * @memberOf wp.media.view.EditImage |
| 9 | * |
4 | 10 | * @class |
5 | 11 | * @augments wp.media.view.EditImage |
6 | 12 | * @augments wp.media.View |
7 | 13 | * @augments wp.Backbone.View |
8 | 14 | * @augments Backbone.View |
9 | 15 | */ |
10 | | var View = wp.media.View, |
11 | | EditImage = wp.media.view.EditImage, |
12 | | Details; |
13 | | |
14 | | Details = EditImage.extend({ |
| 16 | Details = EditImage.extend(/** @lends wp.media.view.EditImage.Details.prototype */{ |
15 | 17 | initialize: function( options ) { |
16 | 18 | this.editor = window.imageEdit; |
17 | 19 | this.frame = options.frame; |
-
diff --git src/wp-includes/js/media/views/edit-image.js src/wp-includes/js/media/views/edit-image.js
index 5254901f6..bc8fec7df 100644
|
|
|
| 1 | var View = wp.media.View, |
| 2 | EditImage; |
| 3 | |
1 | 4 | /** |
2 | 5 | * wp.media.view.EditImage |
3 | 6 | * |
| 7 | * @memberOf wp.media.view |
| 8 | * |
4 | 9 | * @class |
5 | 10 | * @augments wp.media.View |
6 | 11 | * @augments wp.Backbone.View |
7 | 12 | * @augments Backbone.View |
8 | 13 | */ |
9 | | var View = wp.media.View, |
10 | | EditImage; |
11 | | |
12 | | EditImage = View.extend({ |
| 14 | EditImage = View.extend(/** @lends wp.media.view.EditImage.prototype */{ |
13 | 15 | className: 'image-editor', |
14 | 16 | template: wp.template('image-editor'), |
15 | 17 | |
-
diff --git src/wp-includes/js/media/views/embed.js src/wp-includes/js/media/views/embed.js
index ad51fc6b9..d7b38161a 100644
|
|
|
1 | 1 | /** |
2 | 2 | * wp.media.view.Embed |
3 | 3 | * |
| 4 | * @memberOf wp.media.view |
| 5 | * |
4 | 6 | * @class |
5 | 7 | * @augments wp.media.View |
6 | 8 | * @augments wp.Backbone.View |
7 | 9 | * @augments Backbone.View |
8 | 10 | */ |
9 | | var Embed = wp.media.View.extend({ |
| 11 | var Embed = wp.media.View.extend(/** @lends wp.media.view.Ember.prototype */{ |
10 | 12 | className: 'media-embed',< |