var AttachmentsBrowser = wp.media.view.AttachmentsBrowser;
wp.media.view.AttachmentsBrowser = wp.media.view.AttachmentsBrowser.extend({
	createToolbar: function () {
		//this.constructor.__super__.createToolbar.apply(this, arguments);
		AttachmentsBrowser.prototype.createToolbar.call(this);
		var library = this.collection;
		if (this.options.dragInfo) {
			this.toolbar.set('reverse', {
				text: 'Reverse',
				priority: 80,
				click: function () {
					library.reset(library.toArray().reverse());
				},
			});
		}
	},
});
