mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-26 18:21:30 +01:00
99dfd1ca08
This updates the npm `devDependencies` for Core to their latest versions, with one exception. The latest version of `sinon` causes some test failures and requires more investigation. Fixes #61498. Built from https://develop.svn.wordpress.org/trunk@58563 git-svn-id: http://core.svn.wordpress.org/trunk@58011 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
1.4 KiB
JavaScript
2 lines
1.4 KiB
JavaScript
/*! This file is auto-generated */
|
|
!function(d){var a=wp.media.view.MediaFrame.AudioDetails.extend({createStates:function(){this.states.add([new wp.media.controller.AudioDetails({media:this.media}),new wp.media.controller.MediaLibrary({type:"audio",id:"add-audio-source",title:wp.media.view.l10n.audioAddSourceTitle,toolbar:"add-audio-source",media:this.media,menu:!1})])}}),e=d.MediaWidgetModel.extend({}),t=d.MediaWidgetControl.extend({showDisplaySettings:!1,mapModelToMediaFrameProps:function(e){e=d.MediaWidgetControl.prototype.mapModelToMediaFrameProps.call(this,e);return e.link="embed",e},renderPreview:function(){var e,d=this,t=d.model.get("attachment_id"),a=d.model.get("url");(t||a)&&(t=d.$el.find(".media-widget-preview"),e=wp.template("wp-media-widget-audio-preview"),t.html(e({model:{attachment_id:d.model.get("attachment_id"),src:a},error:d.model.get("error")})),wp.mediaelement.initialize())},editMedia:function(){var d=this,e=d.mapModelToMediaFrameProps(d.model.toJSON()),t=new a({frame:"audio",state:"audio-details",metadata:e});(wp.media.frame=t).$el.addClass("media-widget"),e=function(e){d.selectedAttachment.set(e),d.model.set(_.extend(d.model.defaults(),d.mapMediaToModelProps(e),{error:!1}))},t.state("audio-details").on("update",e),t.state("replace-audio").on("replace",e),t.on("close",function(){t.detach()}),t.open()}});d.controlConstructors.media_audio=t,d.modelConstructors.media_audio=e}(wp.mediaWidgets); |