WordPress.org

Make WordPress Core

Changeset 31489


Ignore:
Timestamp:
02/22/2015 06:20:07 AM (5 years ago)
Author:
wonderboymusic
Message:

The grid build should not load views/edit-image, it already exists in the views build.

views/edit-image.js doesn't need to set a render method if it doesn't override its parent.

See #28510.

Location:
trunk/src/wp-includes/js/media
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media/grid.js

    r31487 r31489  
    106106module.exports = EditImage;
    107107
    108 },{"../views/toolbar.js":45,"./state.js":6}],3:[function(require,module,exports){
     108},{"../views/toolbar.js":44,"./state.js":6}],3:[function(require,module,exports){
    109109/**
    110110 * wp.media.controller.Library
     
    937937media.view.DeleteSelectedPermanentlyButton = require( './views/button/delete-selected-permanently.js' );
    938938
    939 },{"./controllers/edit-attachment-metadata.js":1,"./routers/manage.js":8,"./views/attachment/details-two-column.js":16,"./views/button/delete-selected-permanently.js":22,"./views/button/delete-selected.js":23,"./views/button/select-mode-toggle.js":24,"./views/edit-image-details.js":25,"./views/frame/edit-attachments.js":29,"./views/frame/manage.js":30}],8:[function(require,module,exports){
     939},{"./controllers/edit-attachment-metadata.js":1,"./routers/manage.js":8,"./views/attachment/details-two-column.js":16,"./views/button/delete-selected-permanently.js":22,"./views/button/delete-selected.js":23,"./views/button/select-mode-toggle.js":24,"./views/edit-image-details.js":25,"./views/frame/edit-attachments.js":28,"./views/frame/manage.js":29}],8:[function(require,module,exports){
    940940/**
    941941 * A router for handling the browser history and application state.
     
    11341134module.exports = AttachmentCompat;
    11351135
    1136 },{"./view.js":50}],11:[function(require,module,exports){
     1136},{"./view.js":49}],11:[function(require,module,exports){
    11371137/**
    11381138 * wp.media.view.AttachmentFilters
     
    12121212module.exports = AttachmentFilters;
    12131213
    1214 },{"./view.js":50}],12:[function(require,module,exports){
     1214},{"./view.js":49}],12:[function(require,module,exports){
    12151215/**
    12161216 * wp.media.view.AttachmentFilters.All
     
    19591959module.exports = Attachment;
    19601960
    1961 },{"./view.js":50}],16:[function(require,module,exports){
     1961},{"./view.js":49}],16:[function(require,module,exports){
    19621962/*globals wp */
    19631963
     
    24632463module.exports = Attachments;
    24642464
    2465 },{"./attachment.js":15,"./view.js":50}],20:[function(require,module,exports){
     2465},{"./attachment.js":15,"./view.js":49}],20:[function(require,module,exports){
    24662466/**
    24672467 * wp.media.view.AttachmentsBrowser
     
    29222922module.exports = AttachmentsBrowser;
    29232923
    2924 },{"../attachment-compat.js":10,"../attachment-filters/all.js":12,"../attachment-filters/date.js":13,"../attachment-filters/uploaded.js":14,"../attachment/details.js":17,"../attachment/library.js":18,"../attachments.js":19,"../label.js":32,"../search.js":40,"../settings/attachment-display.js":42,"../sidebar.js":43,"../spinner.js":44,"../toolbar.js":45,"../uploader/inline.js":46,"../uploader/status.js":48,"../view.js":50}],21:[function(require,module,exports){
     2924},{"../attachment-compat.js":10,"../attachment-filters/all.js":12,"../attachment-filters/date.js":13,"../attachment-filters/uploaded.js":14,"../attachment/details.js":17,"../attachment/library.js":18,"../attachments.js":19,"../label.js":31,"../search.js":39,"../settings/attachment-display.js":41,"../sidebar.js":42,"../spinner.js":43,"../toolbar.js":44,"../uploader/inline.js":45,"../uploader/status.js":47,"../view.js":49}],21:[function(require,module,exports){
    29252925/**
    29262926 * wp.media.view.Button
     
    30113011module.exports = Button;
    30123012
    3013 },{"./view.js":50}],22:[function(require,module,exports){
     3013},{"./view.js":49}],22:[function(require,module,exports){
    30143014/**
    30153015 * When MEDIA_TRASH is true, a button that handles bulk Delete Permanently logic
     
    31633163
    31643164},{"../button.js":21}],25:[function(require,module,exports){
     3165/*globals wp */
     3166
    31653167var View = require( './view.js' ),
    3166     EditImage = require( './edit-image.js' ),
     3168    EditImage = wp.media.view.EditImage,
    31673169    Details;
    31683170
     
    31883190module.exports = Details;
    31893191
    3190 },{"./edit-image.js":26,"./view.js":50}],26:[function(require,module,exports){
    3191 var View = require( './view.js' ),
    3192     EditImage;
    3193 
    3194 EditImage = View.extend({
    3195     className: 'image-editor',
    3196     template: wp.template('image-editor'),
    3197 
    3198     initialize: function( options ) {
    3199         this.editor = window.imageEdit;
    3200         this.controller = options.controller;
    3201         View.prototype.initialize.apply( this, arguments );
    3202     },
    3203 
    3204     prepare: function() {
    3205         return this.model.toJSON();
    3206     },
    3207 
    3208     render: function() {
    3209         View.prototype.render.apply( this, arguments );
    3210         return this;
    3211     },
    3212 
    3213     loadEditor: function() {
    3214         var dfd = this.editor.open( this.model.get('id'), this.model.get('nonces').edit, this );
    3215         dfd.done( _.bind( this.focus, this ) );
    3216     },
    3217 
    3218     focus: function() {
    3219         this.$( '.imgedit-submit .button' ).eq( 0 ).focus();
    3220     },
    3221 
    3222     back: function() {
    3223         var lastState = this.controller.lastState();
    3224         this.controller.setState( lastState );
    3225     },
    3226 
    3227     refresh: function() {
    3228         this.model.fetch();
    3229     },
    3230 
    3231     save: function() {
    3232         var lastState = this.controller.lastState();
    3233 
    3234         this.model.fetch().done( _.bind( function() {
    3235             this.controller.setState( lastState );
    3236         }, this ) );
    3237     }
    3238 
    3239 });
    3240 
    3241 module.exports = EditImage;
    3242 
    3243 },{"./view.js":50}],27:[function(require,module,exports){
     3192},{"./view.js":49}],26:[function(require,module,exports){
    32443193/**
    32453194 * wp.media.view.FocusManager
     
    32903239module.exports = FocusManager;
    32913240
    3292 },{"./view.js":50}],28:[function(require,module,exports){
     3241},{"./view.js":49}],27:[function(require,module,exports){
    32933242/**
    32943243 * wp.media.view.Frame
     
    34623411module.exports = Frame;
    34633412
    3464 },{"../controllers/region.js":4,"../controllers/state-machine.js":5,"../controllers/state.js":6,"./view.js":50}],29:[function(require,module,exports){
     3413},{"../controllers/region.js":4,"../controllers/state-machine.js":5,"../controllers/state.js":6,"./view.js":49}],28:[function(require,module,exports){
    34653414/**
    34663415 * A frame for editing the details of a specific media item.
     
    37083657module.exports = EditAttachments;
    37093658
    3710 },{"../../controllers/edit-attachment-metadata.js":1,"../../controllers/edit-image.js":2,"../attachment-compat.js":10,"../attachment/details-two-column.js":16,"../edit-image-details.js":25,"../frame.js":28,"../media-frame.js":33,"../modal.js":36}],30:[function(require,module,exports){
     3659},{"../../controllers/edit-attachment-metadata.js":1,"../../controllers/edit-image.js":2,"../attachment-compat.js":10,"../attachment/details-two-column.js":16,"../edit-image-details.js":25,"../frame.js":27,"../media-frame.js":32,"../modal.js":35}],29:[function(require,module,exports){
    37113660/**
    37123661 * wp.media.view.MediaFrame.Manage
     
    39553904module.exports = Manage;
    39563905
    3957 },{"../../controllers/library.js":3,"../../routers/manage.js":8,"../attachments/browser.js":20,"../media-frame.js":33,"../uploader/window.js":49}],31:[function(require,module,exports){
     3906},{"../../controllers/library.js":3,"../../routers/manage.js":8,"../attachments/browser.js":20,"../media-frame.js":32,"../uploader/window.js":48}],30:[function(require,module,exports){
    39583907/**
    39593908 * wp.media.view.Iframe
     
    39823931module.exports = Iframe;
    39833932
    3984 },{"./view.js":50}],32:[function(require,module,exports){
     3933},{"./view.js":49}],31:[function(require,module,exports){
    39853934/**
    39863935 * @class
     
    40093958module.exports = Label;
    40103959
    4011 },{"./view.js":50}],33:[function(require,module,exports){
     3960},{"./view.js":49}],32:[function(require,module,exports){
    40123961/**
    40133962 * wp.media.view.MediaFrame
     
    42634212module.exports = MediaFrame;
    42644213
    4265 },{"./frame.js":28,"./iframe.js":31,"./menu.js":35,"./modal.js":36,"./router.js":39,"./toolbar.js":45,"./uploader/window.js":49,"./view.js":50}],34:[function(require,module,exports){
     4214},{"./frame.js":27,"./iframe.js":30,"./menu.js":34,"./modal.js":35,"./router.js":38,"./toolbar.js":44,"./uploader/window.js":48,"./view.js":49}],33:[function(require,module,exports){
    42664215/**
    42674216 * wp.media.view.MenuItem
     
    43364285module.exports = MenuItem;
    43374286
    4338 },{"./view.js":50}],35:[function(require,module,exports){
     4287},{"./view.js":49}],34:[function(require,module,exports){
    43394288/**
    43404289 * wp.media.view.Menu
     
    44534402module.exports = Menu;
    44544403
    4455 },{"./menu-item.js":34,"./priority-list.js":37}],36:[function(require,module,exports){
     4404},{"./menu-item.js":33,"./priority-list.js":36}],35:[function(require,module,exports){
    44564405/**
    44574406 * wp.media.view.Modal
     
    46684617module.exports = Modal;
    46694618
    4670 },{"./focus-manager.js":27,"./view.js":50}],37:[function(require,module,exports){
     4619},{"./focus-manager.js":26,"./view.js":49}],36:[function(require,module,exports){
    46714620/**
    46724621 * wp.media.view.PriorityList
     
    47684717module.exports = PriorityList;
    47694718
    4770 },{"./view.js":50}],38:[function(require,module,exports){
     4719},{"./view.js":49}],37:[function(require,module,exports){
    47714720/**
    47724721 * wp.media.view.RouterItem
     
    47954744module.exports = RouterItem;
    47964745
    4797 },{"./menu-item.js":34}],39:[function(require,module,exports){
     4746},{"./menu-item.js":33}],38:[function(require,module,exports){
    47984747/**
    47994748 * wp.media.view.Router
     
    48334782module.exports = Router;
    48344783
    4835 },{"./menu.js":35,"./router-item.js":38}],40:[function(require,module,exports){
     4784},{"./menu.js":34,"./router-item.js":37}],39:[function(require,module,exports){
    48364785/**
    48374786 * wp.media.view.Search
     
    48824831module.exports = Search;
    48834832
    4884 },{"./view.js":50}],41:[function(require,module,exports){
     4833},{"./view.js":49}],40:[function(require,module,exports){
    48854834/**
    48864835 * wp.media.view.Settings
     
    50034952module.exports = Settings;
    50044953
    5005 },{"./view.js":50}],42:[function(require,module,exports){
     4954},{"./view.js":49}],41:[function(require,module,exports){
    50064955/**
    50074956 * wp.media.view.Settings.AttachmentDisplay
     
    50975046module.exports = AttachmentDisplay;
    50985047
    5099 },{"../settings.js":41}],43:[function(require,module,exports){
     5048},{"../settings.js":40}],42:[function(require,module,exports){
    51005049/**
    51015050 * wp.media.view.Sidebar
     
    51165065module.exports = Sidebar;
    51175066
    5118 },{"./priority-list.js":37}],44:[function(require,module,exports){
     5067},{"./priority-list.js":36}],43:[function(require,module,exports){
    51195068/**
    51205069 * wp.media.view.Spinner
     
    51545103module.exports = Spinner;
    51555104
    5156 },{"./view.js":50}],45:[function(require,module,exports){
     5105},{"./view.js":49}],44:[function(require,module,exports){
    51575106/**
    51585107 * wp.media.view.Toolbar
     
    53165265module.exports = Toolbar;
    53175266
    5318 },{"./button.js":21,"./priority-list.js":37,"./view.js":50}],46:[function(require,module,exports){
     5267},{"./button.js":21,"./priority-list.js":36,"./view.js":49}],45:[function(require,module,exports){
    53195268/**
    53205269 * wp.media.view.UploaderInline
     
    54485397module.exports = UploaderInline;
    54495398
    5450 },{"../view.js":50,"./status.js":48}],47:[function(require,module,exports){
     5399},{"../view.js":49,"./status.js":47}],46:[function(require,module,exports){
    54515400/**
    54525401 * wp.media.view.UploaderStatusError
     
    54675416module.exports = UploaderStatusError;
    54685417
    5469 },{"../view.js":50}],48:[function(require,module,exports){
     5418},{"../view.js":49}],47:[function(require,module,exports){
    54705419/**
    54715420 * wp.media.view.UploaderStatus
     
    56065555module.exports = UploaderStatus;
    56075556
    5608 },{"../view.js":50,"./status-error.js":47}],49:[function(require,module,exports){
     5557},{"../view.js":49,"./status-error.js":46}],48:[function(require,module,exports){
    56095558/**
    56105559 * wp.media.view.UploaderWindow
     
    57185667module.exports = UploaderWindow;
    57195668
    5720 },{"../view.js":50}],50:[function(require,module,exports){
     5669},{"../view.js":49}],49:[function(require,module,exports){
    57215670/**
    57225671 * wp.media.View
  • trunk/src/wp-includes/js/media/views.js

    r31399 r31489  
    43524352    },
    43534353
    4354     render: function() {
    4355         View.prototype.render.apply( this, arguments );
    4356         return this;
    4357     },
    4358 
    43594354    loadEditor: function() {
    43604355        var dfd = this.editor.open( this.model.get('id'), this.model.get('nonces').edit, this );
  • trunk/src/wp-includes/js/media/views/edit-image-details.js

    r31399 r31489  
     1/*globals wp */
     2
    13var View = require( './view.js' ),
    2     EditImage = require( './edit-image.js' ),
     4    EditImage = wp.media.view.EditImage,
    35    Details;
    46
  • trunk/src/wp-includes/js/media/views/edit-image.js

    r31385 r31489  
    1414    prepare: function() {
    1515        return this.model.toJSON();
    16     },
    17 
    18     render: function() {
    19         View.prototype.render.apply( this, arguments );
    20         return this;
    2116    },
    2217
Note: See TracChangeset for help on using the changeset viewer.