2015-05-13 23:27:27 +02:00
|
|
|
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){var c,d=wp.media.view.l10n;c=wp.media.controller.State.extend({defaults:{id:"edit-attachment",title:d.attachmentDetails,content:"edit-metadata",menu:!1,toolbar:!1,router:!1}}),b.exports=c},{}],2:[function(a){var b=wp.media;b.controller.EditAttachmentMetadata=a("./controllers/edit-attachment-metadata.js"),b.view.MediaFrame.Manage=a("./views/frame/manage.js"),b.view.Attachment.Details.TwoColumn=a("./views/attachment/details-two-column.js"),b.view.MediaFrame.Manage.Router=a("./routers/manage.js"),b.view.EditImage.Details=a("./views/edit-image-details.js"),b.view.MediaFrame.EditAttachments=a("./views/frame/edit-attachments.js"),b.view.SelectModeToggleButton=a("./views/button/select-mode-toggle.js"),b.view.DeleteSelectedButton=a("./views/button/delete-selected.js"),b.view.DeleteSelectedPermanentlyButton=a("./views/button/delete-selected-permanently.js")},{"./controllers/edit-attachment-metadata.js":1,"./routers/manage.js":3,"./views/attachment/details-two-column.js":4,"./views/button/delete-selected-permanently.js":5,"./views/button/delete-selected.js":6,"./views/button/select-mode-toggle.js":7,"./views/edit-image-details.js":8,"./views/frame/edit-attachments.js":9,"./views/frame/manage.js":10}],3:[function(a,b){var c=Backbone.Router.extend({initialize:function(a){this.controller=a.controller,this.library=a.library,this.on("route",this.checkRoute)},routes:{"upload.php?item=:slug":"showItem","upload.php?search=:query":"search","upload.php":"defaultRoute"},checkRoute:function(a){"defaultRoute"!==a&&(this.modal=!0)},defaultRoute:function(){this.modal&&(wp.media.frame.close(),this.modal=!1)},baseUrl:function(a){return"upload.php"+a},search:function(a){jQuery("#media-search-input").val(a).trigger("input")},showItem:function(a){var b,c=this.controller;b=this.library.findWhere({id:parseInt(a,10)}),b?c.trigger("edit:attachment",b):(b=wp.media.attachment(a),c.listenTo(b,"change",function(a){c.stopListening(b),c.trigger("edit:attachment",a)}),b.fetch())}});b.exports=c},{}],4:[function(a,b){var c,d=wp.media.view.Attachment.Details;c=d.extend({template:wp.template("attachment-details-two-column"),editAttachment:function(a){a.preventDefault(),this.controller.content.mode("edit-image")},toggleSelectionHandler:function(){},render:function(){d.prototype.render.apply(this,arguments),wp.media.mixin.removeAllPlayers(),this.$("audio, video").each(function(a,b){var c=wp.media.view.MediaDetails.prepareSrc(b);new window.MediaElementPlayer(c,wp.media.mixin.mejsSettings)})}}),b.exports=c},{}],5:[function(a,b){var c,d=wp.media.view.Button,e=wp.media.view.DeleteSelectedButton;c=e.extend({initialize:function(){e.prototype.initialize.apply(this,arguments),this.listenTo(this.controller,"select:activate",this.selectActivate),this.listenTo(this.controller,"select:deactivate",this.selectDeactivate)},filterChange:function(a){this.canShow="trash"===a.get("status")},selectActivate:function(){this.toggleDisabled(),this.$el.toggleClass("hidden",!this.canShow)},selectDeactivate:function(){this.toggleDisabled(),this.$el.addClass("hidden")},render:function(){return d.prototype.render.apply(this,arguments),this.selectActivate(),this}}),b.exports=c},{}],6:[function(a,b){var c,d=wp.media.view.Button,e=wp.media.view.l10n;c=d.extend({initialize:function(){d.prototype.initialize.apply(this,arguments),this.options.filters&&this.listenTo(this.options.filters.model,"change",this.filterChange),this.listenTo(this.controller,"selection:toggle",this.toggleDisabled)},filterChange:function(a){"trash"===a.get("status")?this.model.set("text",e.untrashSelected):wp.media.view.settings.mediaTrash?this.model.set("text",e.trashSelected):th
|