Changeset 29213
- Timestamp:
- 07/17/2014 08:45:09 PM (12 years ago)
- Location:
- trunk/src/wp-includes/js
- Files:
-
- 2 edited
-
media-grid.js (modified) (4 diffs)
-
media-views.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/media-grid.js
r29212 r29213 1 /* global _wpMediaViewsL10n, MediaElementPlayer, _wpMediaGridSettings */1 /* global _wpMediaViewsL10n, MediaElementPlayer, _wpMediaGridSettings, confirm */ 2 2 (function($, _, Backbone, wp) { 3 3 var media = wp.media, l10n; … … 604 604 }); 605 605 606 media.view.BulkSelection = media.View.extend({606 media.view.BulkSelection = media.View.extend({ 607 607 className: 'bulk-select', 608 608 609 609 initialize: function() { 610 610 this.model = new Backbone.Model({ 611 currentAction: '' ,611 currentAction: '' 612 612 613 613 }); … … 632 632 tagName: 'select', 633 633 634 initialize: function() {635 media.view.Button.prototype.initialize.apply( this, arguments );634 initialize: function() { 635 media.view.Button.prototype.initialize.apply( this, arguments ); 636 636 this.listenTo( this.controller.controller.state().get( 'selection' ), 'add remove reset', _.bind( this.enabled, this ) ); 637 637 this.$el.append( $('<option></option>').val( '' ).html( l10n.bulkActions ) ) … … 643 643 toggleChange: function() { 644 644 this.controller.model.set( { 'currentAction': this.$el.val() } ); 645 },645 }, 646 646 enabled: function() { 647 647 var disabled = ! this.controller.controller.state().get('selection').length; 648 648 this.$el.prop( 'disabled', disabled ); 649 }650 });649 } 650 }); 651 651 652 652 media.view.BulkSelectionActionButton = media.view.Button.extend({ -
trunk/src/wp-includes/js/media-views.js
r29212 r29213 5661 5661 5662 5662 this.toolbar.set( 'BulkSelection', new media.view.BulkSelection({ 5663 controller: this.controller,5664 priority: -705665 }).render() );5663 controller: this.controller, 5664 priority: -70 5665 }).render() ); 5666 5666 } 5667 5667
Note: See TracChangeset
for help on using the changeset viewer.