Changeset 997768
- Timestamp:
- 09/27/2014 08:33:29 PM (12 years ago)
- Location:
- remote-medias-lite/trunk
- Files:
-
- 7 edited
-
assets/js/media-remote-ext.js (modified) (1 diff)
-
assets/js/media-remote-ext.min.js (modified) (1 diff)
-
lang/remote-medias-lite.pot (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
remote-medias-libs.php (modified) (1 diff)
-
vendor/autoload.php (modified) (1 diff)
-
vendor/composer/autoload_real.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
remote-medias-lite/trunk/assets/js/media-remote-ext.js
r997748 r997768 319 319 wp.media.view.AttachmentsBrowser.prototype.createSingle.apply( this, arguments ); 320 320 single.set('type', 'remote'); 321 } else { 322 wp.media.view.AttachmentsBrowser.prototype.createSingle.apply( this, arguments ); 321 323 } 322 324 323 wp.media.view.AttachmentsBrowser.prototype.createSingle.apply( this, arguments );324 325 325 326 // Show the sidebar on mobile -
remote-medias-lite/trunk/assets/js/media-remote-ext.min.js
r997748 r997768 1 !function(){oldSendAttachment=wp.media.editor.send.attachment,wp.media.editor.send.attachment=function(a,b){if("remote"!==b.type)return oldSendAttachment(a,b);{var c;b.caption}return wp.media.view.settings.captions||delete b.caption,a=wp.media.string.props(a,b),c={id:b.id,title:b.title,type:b.type,subtype:b.subtype,remotetype:b.remotetype,accountId:b.accountId||0,remotedata:b.remotedata||[]},a.linkUrl&&(c.url=a.linkUrl),"image"===b.remotetype&&(_.each({align:"align",size:"image-size",alt:"image_alt"},function(b,d){a[d]&&(c[b]=a[d])}),c.width=b.width||0,c.height=b.height||0,c.imgurl=b.url||c.url),wp.media.post("send-remote-attachment-to-editor",{nonce:rmlSendToEditorParams.nonce,attachment:c,post_id:wp.media.view.settings.post.id})},wp.media.view.RemoteUploaderInline=wp.media.View.extend({tagName:"div",className:"remote-uploader",template:wp.media.template("remote-media-upload"),events:{input:"refresh",keyup:"refresh",change:"refresh"},initialize:function(){_.defaults(this.options,{message:"",status:!0});var a=this.controller.state(),b=a.get("uploadTemplate");b&&(this.template=wp.media.template(b))},render:function(){return wp.media.View.prototype.render.apply(this,arguments),this.refresh(),this},refresh:function(){},hide:function(){this.$el.addClass("hidden")}}),wp.media.remotequery=function(a){return new wp.media.model.RemoteAttachments(null,{props:_.extend(_.defaults(a||{},{orderby:"date"}),{query:!0})})},wp.media.model.RemoteAttachments=wp.media.model.Attachments.extend({initialize:function(){wp.media.model.Attachments.prototype.initialize.apply(this,arguments)},_requery:function(){this.props.get("query")&&this.mirror(wp.media.model.RemoteQuery.get(this.props.toJSON()))}}),wp.media.model.RemoteQuery=wp.media.model.Query.extend({initialize:function(){wp.media.model.Query.prototype.initialize.apply(this,arguments)},sync:function(a,b,c){var d;return"read"===a?(c=c||{},c.context=this,c.data=_.extend(c.data||{},{action:"query-remote-attachments",post_id:wp.media.model.settings.post.id,security:rmlQueryAttachmentsParams.nonce}),args=_.clone(this.args),-1!==args.posts_per_page&&(args.paged=Math.floor(this.length/args.posts_per_page)+1),c.data.query=args,wp.media.ajax(c)):(d=wp.media.model.Attachments.prototype.sync?wp.media.model.Attachments.prototype:Backbone,d.sync.apply(this,arguments))}},{get:function(){var a=[];return function(b,c){var d,e={},f=wp.media.model.RemoteQuery.orderby,g=wp.media.model.RemoteQuery.defaultProps;return delete b.query,_.defaults(b,g),b.order=b.order.toUpperCase(),"DESC"!==b.order&&"ASC"!==b.order&&(b.order=g.order.toUpperCase()),_.contains(f.allowed,b.orderby)||(b.orderby=g.orderby),_.each(b,function(a,b){_.isNull(a)||(e[wp.media.model.RemoteQuery.propmap[b]||b]=a)}),_.defaults(e,wp.media.model.RemoteQuery.defaultArgs),e.orderby=f.valuemap[b.orderby]||b.orderby,d=_.find(a,function(a){return _.isEqual(a.args,e)}),d||(d=new wp.media.model.RemoteQuery([],_.extend(c||{},{props:b,args:e})),a.push(d)),d}}()}),wp.media.controller.RemoteLibrary=wp.media.controller.Library.extend({defaults:{id:"remote-library",multiple:"add",describe:!1,toolbar:"select",sidebar:"settings",content:"upload",router:"browse",menu:"default",remote:!0,searchable:!0,filterable:!1,sortable:!0,contentUserSetting:!0,syncSelection:!0}});var a=wp.media.view.MediaFrame.Post;wp.media.view.MediaFrame.Post=a.extend({initialize:function(){a.prototype.initialize.apply(this,arguments)},createStates:function(){a.prototype.createStates.apply(this,arguments);var b=this.options,c=this;_.each(wp.media.view.settings.remoteMediaAccounts,function(a){c.states.add([new wp.media.controller.RemoteLibrary({id:"remote-library-"+a.id,sectionid:a.id,title:a.title,service:a.type,priority:30,toolbar:"main-remote",uploadTemplate:_.isUndefined(wp.media.view.settings.remoteServiceSettings[a.type])?null:wp.media.view.settings.remoteServiceSettings[a.type].uploadTemplate,filterable:"uploaded",library:wp.media.remotequery(_.defaults({type:"remote",account_id:a.id},b.library)),state:"remote-library-"+a.id,editable:!0,displaySettings:!0,displayUserSettings:!0,menu:"default",AttachmentView:wp.media.view.Attachment.RemoteLibrary})])},this)},bindHandlers:function(){a.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:create:main-remote",this.createToolbar,this),this.on("toolbar:render:main-remote",this.mainInsertToolbar,this)},uploadContent:function(){var a=this.state().get("sectionid");a?(this.$el.removeClass("hide-toolbar"),this.content.set(new wp.media.view.RemoteUploaderInline({controller:this,model:this.state().props}))):wp.media.view.MediaFrame.Select.prototype.uploadContent.apply(this,arguments)}}),wp.media.view.RemoteAttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createUploader:function(){this.uploader=new wp.media.view.RemoteUploaderInline({controller:this.controller,status:!1,message:this.controller.isModeActive("grid")?"":wp.media.view.l10n.noItemsFound,canClose:this.controller.isModeActive("grid")}),this.uploader.hide(),this.views.add(this.uploader)},createSingle:function(){var a=this.sidebar,b=this.options.selection.single(),c=b.get("type"),d=b.get("remotetype");return"remote"!==c?wp.media.view.AttachmentsBrowser.prototype.createSingle.apply(this,arguments):("image"===d &&(b.set("type",d),wp.media.view.AttachmentsBrowser.prototype.createSingle.apply(this,arguments),b.set("type","remote")),wp.media.view.AttachmentsBrowser.prototype.createSingle.apply(this,arguments),void(this.model.id==="remote-library-"+this.model.get("sectionid")&&a.$el.addClass("visible")))}});var b=wp.media.view.MediaFrame.Select;wp.media.view.MediaFrame.Select.prototype.browseRemoteContent=function(a){var c=this.state(),d=c.get("remote");d===!0?(this.$el.removeClass("hide-toolbar"),a.view=new wp.media.view.RemoteAttachmentsBrowser({controller:this,collection:c.get("library"),selection:c.get("selection"),model:c,sortable:c.get("sortable"),search:c.get("searchable"),filters:c.get("filterable"),display:c.get(c.has("display")?"display":"displaySettings"),dragInfo:c.get("dragInfo"),idealColumnWidth:c.get("idealColumnWidth"),suggestedWidth:c.get("suggestedWidth"),suggestedHeight:c.get("suggestedHeight"),AttachmentView:c.get("AttachmentView")})):b.prototype.browseContent.apply(this,arguments)},wp.media.view.MediaFrame.Select=b.extend({bindHandlers:function(){this.on("router:create:browse",this.createRouter,this),this.on("router:render:browse",this.browseRouter,this),this.on("content:create:browse",this.browseRemoteContent,this),this.on("content:render:upload",this.uploadContent,this),this.on("toolbar:create:select",this.createSelectToolbar,this)}}),wp.media.view.Attachment.RemoteLibrary=wp.media.view.Attachment.Library.extend({template:wp.media.template("attachment-remote"),toggleSelection:function(){wp.media.view.Attachment.Library.prototype.toggleSelection.apply(this,arguments)}}),wp.media.view.Attachment.RemoteSelection=wp.media.view.Attachment.Selection.extend({template:wp.media.template("attachment-remote")}),oldAttachmentsSelection=wp.media.view.Attachments.Selection,wp.media.view.Attachments.Selection=oldAttachmentsSelection.extend({initialize:function(){return _.defaults(this.options,{AttachmentView:wp.media.view.Attachment.RemoteSelection}),oldAttachmentsSelection.prototype.initialize.apply(this,arguments)}})}(jQuery);1 !function(){oldSendAttachment=wp.media.editor.send.attachment,wp.media.editor.send.attachment=function(a,b){if("remote"!==b.type)return oldSendAttachment(a,b);{var c;b.caption}return wp.media.view.settings.captions||delete b.caption,a=wp.media.string.props(a,b),c={id:b.id,title:b.title,type:b.type,subtype:b.subtype,remotetype:b.remotetype,accountId:b.accountId||0,remotedata:b.remotedata||[]},a.linkUrl&&(c.url=a.linkUrl),"image"===b.remotetype&&(_.each({align:"align",size:"image-size",alt:"image_alt"},function(b,d){a[d]&&(c[b]=a[d])}),c.width=b.width||0,c.height=b.height||0,c.imgurl=b.url||c.url),wp.media.post("send-remote-attachment-to-editor",{nonce:rmlSendToEditorParams.nonce,attachment:c,post_id:wp.media.view.settings.post.id})},wp.media.view.RemoteUploaderInline=wp.media.View.extend({tagName:"div",className:"remote-uploader",template:wp.media.template("remote-media-upload"),events:{input:"refresh",keyup:"refresh",change:"refresh"},initialize:function(){_.defaults(this.options,{message:"",status:!0});var a=this.controller.state(),b=a.get("uploadTemplate");b&&(this.template=wp.media.template(b))},render:function(){return wp.media.View.prototype.render.apply(this,arguments),this.refresh(),this},refresh:function(){},hide:function(){this.$el.addClass("hidden")}}),wp.media.remotequery=function(a){return new wp.media.model.RemoteAttachments(null,{props:_.extend(_.defaults(a||{},{orderby:"date"}),{query:!0})})},wp.media.model.RemoteAttachments=wp.media.model.Attachments.extend({initialize:function(){wp.media.model.Attachments.prototype.initialize.apply(this,arguments)},_requery:function(){this.props.get("query")&&this.mirror(wp.media.model.RemoteQuery.get(this.props.toJSON()))}}),wp.media.model.RemoteQuery=wp.media.model.Query.extend({initialize:function(){wp.media.model.Query.prototype.initialize.apply(this,arguments)},sync:function(a,b,c){var d;return"read"===a?(c=c||{},c.context=this,c.data=_.extend(c.data||{},{action:"query-remote-attachments",post_id:wp.media.model.settings.post.id,security:rmlQueryAttachmentsParams.nonce}),args=_.clone(this.args),-1!==args.posts_per_page&&(args.paged=Math.floor(this.length/args.posts_per_page)+1),c.data.query=args,wp.media.ajax(c)):(d=wp.media.model.Attachments.prototype.sync?wp.media.model.Attachments.prototype:Backbone,d.sync.apply(this,arguments))}},{get:function(){var a=[];return function(b,c){var d,e={},f=wp.media.model.RemoteQuery.orderby,g=wp.media.model.RemoteQuery.defaultProps;return delete b.query,_.defaults(b,g),b.order=b.order.toUpperCase(),"DESC"!==b.order&&"ASC"!==b.order&&(b.order=g.order.toUpperCase()),_.contains(f.allowed,b.orderby)||(b.orderby=g.orderby),_.each(b,function(a,b){_.isNull(a)||(e[wp.media.model.RemoteQuery.propmap[b]||b]=a)}),_.defaults(e,wp.media.model.RemoteQuery.defaultArgs),e.orderby=f.valuemap[b.orderby]||b.orderby,d=_.find(a,function(a){return _.isEqual(a.args,e)}),d||(d=new wp.media.model.RemoteQuery([],_.extend(c||{},{props:b,args:e})),a.push(d)),d}}()}),wp.media.controller.RemoteLibrary=wp.media.controller.Library.extend({defaults:{id:"remote-library",multiple:"add",describe:!1,toolbar:"select",sidebar:"settings",content:"upload",router:"browse",menu:"default",remote:!0,searchable:!0,filterable:!1,sortable:!0,contentUserSetting:!0,syncSelection:!0}});var a=wp.media.view.MediaFrame.Post;wp.media.view.MediaFrame.Post=a.extend({initialize:function(){a.prototype.initialize.apply(this,arguments)},createStates:function(){a.prototype.createStates.apply(this,arguments);var b=this.options,c=this;_.each(wp.media.view.settings.remoteMediaAccounts,function(a){c.states.add([new wp.media.controller.RemoteLibrary({id:"remote-library-"+a.id,sectionid:a.id,title:a.title,service:a.type,priority:30,toolbar:"main-remote",uploadTemplate:_.isUndefined(wp.media.view.settings.remoteServiceSettings[a.type])?null:wp.media.view.settings.remoteServiceSettings[a.type].uploadTemplate,filterable:"uploaded",library:wp.media.remotequery(_.defaults({type:"remote",account_id:a.id},b.library)),state:"remote-library-"+a.id,editable:!0,displaySettings:!0,displayUserSettings:!0,menu:"default",AttachmentView:wp.media.view.Attachment.RemoteLibrary})])},this)},bindHandlers:function(){a.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:create:main-remote",this.createToolbar,this),this.on("toolbar:render:main-remote",this.mainInsertToolbar,this)},uploadContent:function(){var a=this.state().get("sectionid");a?(this.$el.removeClass("hide-toolbar"),this.content.set(new wp.media.view.RemoteUploaderInline({controller:this,model:this.state().props}))):wp.media.view.MediaFrame.Select.prototype.uploadContent.apply(this,arguments)}}),wp.media.view.RemoteAttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createUploader:function(){this.uploader=new wp.media.view.RemoteUploaderInline({controller:this.controller,status:!1,message:this.controller.isModeActive("grid")?"":wp.media.view.l10n.noItemsFound,canClose:this.controller.isModeActive("grid")}),this.uploader.hide(),this.views.add(this.uploader)},createSingle:function(){var a=this.sidebar,b=this.options.selection.single(),c=b.get("type"),d=b.get("remotetype");return"remote"!==c?wp.media.view.AttachmentsBrowser.prototype.createSingle.apply(this,arguments):("image"===d?(b.set("type",d),wp.media.view.AttachmentsBrowser.prototype.createSingle.apply(this,arguments),b.set("type","remote")):wp.media.view.AttachmentsBrowser.prototype.createSingle.apply(this,arguments),void(this.model.id==="remote-library-"+this.model.get("sectionid")&&a.$el.addClass("visible")))}});var b=wp.media.view.MediaFrame.Select;wp.media.view.MediaFrame.Select.prototype.browseRemoteContent=function(a){var c=this.state(),d=c.get("remote");d===!0?(this.$el.removeClass("hide-toolbar"),a.view=new wp.media.view.RemoteAttachmentsBrowser({controller:this,collection:c.get("library"),selection:c.get("selection"),model:c,sortable:c.get("sortable"),search:c.get("searchable"),filters:c.get("filterable"),display:c.get(c.has("display")?"display":"displaySettings"),dragInfo:c.get("dragInfo"),idealColumnWidth:c.get("idealColumnWidth"),suggestedWidth:c.get("suggestedWidth"),suggestedHeight:c.get("suggestedHeight"),AttachmentView:c.get("AttachmentView")})):b.prototype.browseContent.apply(this,arguments)},wp.media.view.MediaFrame.Select=b.extend({bindHandlers:function(){this.on("router:create:browse",this.createRouter,this),this.on("router:render:browse",this.browseRouter,this),this.on("content:create:browse",this.browseRemoteContent,this),this.on("content:render:upload",this.uploadContent,this),this.on("toolbar:create:select",this.createSelectToolbar,this)}}),wp.media.view.Attachment.RemoteLibrary=wp.media.view.Attachment.Library.extend({template:wp.media.template("attachment-remote"),toggleSelection:function(){wp.media.view.Attachment.Library.prototype.toggleSelection.apply(this,arguments)}}),wp.media.view.Attachment.RemoteSelection=wp.media.view.Attachment.Selection.extend({template:wp.media.template("attachment-remote")}),oldAttachmentsSelection=wp.media.view.Attachments.Selection,wp.media.view.Attachments.Selection=oldAttachmentsSelection.extend({initialize:function(){return _.defaults(this.options,{AttachmentView:wp.media.view.Attachment.RemoteSelection}),oldAttachmentsSelection.prototype.initialize.apply(this,arguments)}})}(jQuery); -
remote-medias-lite/trunk/lang/remote-medias-lite.pot
r997748 r997768 7 7 msgid "" 8 8 msgstr "" 9 "Project-Id-Version: RemoteMediasLite 1.1. 0\n"9 "Project-Id-Version: RemoteMediasLite 1.1.1\n" 10 10 "Report-Msgid-Bugs-To: \n" 11 "POT-Creation-Date: 2014-09-27 1 3:11-0400\n"11 "POT-Creation-Date: 2014-09-27 16:29-0400\n" 12 12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" -
remote-medias-lite/trunk/readme.txt
r997757 r997768 50 50 51 51 == Changelog == 52 = 1.1.1 = 53 * Added Media Manager attachement sidebar for mobile 54 * Now using WP native image attachements sidebar for remote images 52 55 53 56 = 1.1.0 = … … 60 63 61 64 == Upgrade Notice == 65 = 1.1.1 = 66 Better support for remote medias images 62 67 63 68 = 1.1.0 = -
remote-medias-lite/trunk/remote-medias-libs.php
r997433 r997768 4 4 Plugin URI: http://onecodeshop.com/ 5 5 Description: Integrates 3rd party medias to WP media manager 6 Version: 1.1. 06 Version: 1.1.1 7 7 Author: Team OneCodeShop.com 8 8 Author URI: http://onecodeshop.com/ -
remote-medias-lite/trunk/vendor/autoload.php
r997748 r997768 5 5 require_once __DIR__ . '/composer' . '/autoload_real.php'; 6 6 7 return ComposerAutoloaderInit d752069639a820c3ccaba5226dc5255e::getLoader();7 return ComposerAutoloaderInit41ce70878747299db96ce10ea2d925cd::getLoader(); -
remote-medias-lite/trunk/vendor/composer/autoload_real.php
r997748 r997768 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit d752069639a820c3ccaba5226dc5255e5 class ComposerAutoloaderInit41ce70878747299db96ce10ea2d925cd 6 6 { 7 7 private static $loader; … … 20 20 } 21 21 22 spl_autoload_register(array('ComposerAutoloaderInit d752069639a820c3ccaba5226dc5255e', 'loadClassLoader'), true, true);22 spl_autoload_register(array('ComposerAutoloaderInit41ce70878747299db96ce10ea2d925cd', 'loadClassLoader'), true, true); 23 23 self::$loader = $loader = new \Composer\Autoload\ClassLoader(); 24 spl_autoload_unregister(array('ComposerAutoloaderInit d752069639a820c3ccaba5226dc5255e', 'loadClassLoader'));24 spl_autoload_unregister(array('ComposerAutoloaderInit41ce70878747299db96ce10ea2d925cd', 'loadClassLoader')); 25 25 26 26 $map = require __DIR__ . '/autoload_namespaces.php'; … … 45 45 } 46 46 47 function composerRequire d752069639a820c3ccaba5226dc5255e($file)47 function composerRequire41ce70878747299db96ce10ea2d925cd($file) 48 48 { 49 49 require $file;
Note: See TracChangeset
for help on using the changeset viewer.