Changeset 3412114
- Timestamp:
- 12/05/2025 11:26:46 AM (8 weeks ago)
- Location:
- acf-dropzone
- Files:
-
- 12 edited
- 1 copied
-
tags/1.1.16 (copied) (copied from acf-dropzone/trunk)
-
tags/1.1.16/css/admin/acf-dropzone.css (modified) (1 diff)
-
tags/1.1.16/include/AcfDropzone/Compat/ACF.php (modified) (1 diff)
-
tags/1.1.16/index.php (modified) (1 diff)
-
tags/1.1.16/js/admin/acf-dropzone.js (modified) (1 diff)
-
tags/1.1.16/languages/acf-dropzone.pot (modified) (3 diffs)
-
tags/1.1.16/readme.txt (modified) (2 diffs)
-
trunk/css/admin/acf-dropzone.css (modified) (1 diff)
-
trunk/include/AcfDropzone/Compat/ACF.php (modified) (1 diff)
-
trunk/index.php (modified) (1 diff)
-
trunk/js/admin/acf-dropzone.js (modified) (1 diff)
-
trunk/languages/acf-dropzone.pot (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
acf-dropzone/tags/1.1.16/css/admin/acf-dropzone.css
r3175552 r3412114 1 .block-editor-block-list__block .block-editor-block-contextual-toolbar{z-index:101}.components-notice-list{z-index:109}.dropzone .acf-gallery-attachments,.dropzone .acf-file-uploader,.dropzone .acf-image-uploader{container-name:dropzone;container-type:inline-size}.dropzone .acf-gallery-attachments>*,.dropzone .acf-file-uploader>*,.dropzone .acf-image-uploader>*{--font-size-sm: 11px;--font-size-md: 14px;--font-size-lg: 20px}@container dropzone (width > 350px){.dropzone .acf-gallery-attachments>*,.dropzone .acf-file-uploader>*,.dropzone .acf-image-uploader>*{--font-size-sm: 14px;--font-size-md: 20px;--font-size-lg: 36px}}.dropzone .acf-gallery-attachments>.hide-if-value,.dropzone .acf-file-uploader>.hide-if-value,.dropzone .acf-image-uploader>.hide-if-value{min-height:calc(3*(var(--font-size-sm) + var(--font-size-md)) + 5px + 30px)}.dropzone .acf-file-uploader:not(.has-value)>.hide-if-value,.dropzone .acf-image-uploader:not(.has-value)>.hide-if-value{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.dropzone .acf-dropzone-info{margin-top:auto;margin-bottom:5px;color:#787c82;text-align:center}.dropzone .acf-dropzone-info+p{margin-bottom:auto}.dropzone .acf-dropzone-info p:not(.drag-drop-info){font-size:var(--font-size-sm)}.dropzone .acf-dropzone-info p.drag-drop-info{font-size:var(--font-size-md)}.dropzone .uploader-window .uploader-editor-title{font-size:var(--font-size-lg)}.dropzone.dropzone-file [data-uploader] .hide-if-value{padding:10px 20px;border:4px dashed #c3c4c7}.dropzone .acf-input{position:relative}.dropzone .uploader-window{position:absolute}.dropzone .uploader-window h1,.dropzone .uploader-window h3{margin:0;font-size:25px}.dropzone .media-progress-label{font-weight:bold;text-align:center;margin-top:auto}.dropzone .media-progress-bar-box{background-color:rgba(167,170,173,.75);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dropzone .media-progress-bar{margin-bottom:auto}.dropzone.dropzone-gallery .notice{z-index:1;margin-top:0;margin-bottom:5px}.dropzone [data-uploader=wp] .media-progress-bar-box{position:absolute;left:0;top:0;bottom:0;right:0}.dropzone [data-uploader=wp]>.hide-if-value{text-align:center}.dropzone [data-uploader=basic].drag-over .hide-if-value{border-color:#3582c4}.dropzone .acf-gallery,.dropzone [data-uploader=wp]{z-index:30}.dropzone .acf-gallery-attachments: not(:focus-within) .show-if-focus,.dropzone [data-uploader=wp]:not(:focus-within) .show-if-focus{display:none}.dropzone .acf-gallery-attachments:focus,.dropzone [data-uploader=wp]:focus{-webkit-box-shadow:0 0 6px 3px rgba(10,75,120,.66);box-shadow:0 0 6px 3px rgba(10,75,120,.66)}.dropzone .acf-gallery-main{display:grid;grid-template-rows:auto -webkit-min-content;grid-template-rows:auto min-content;-webkit-transform:translateZ(0);--toolbar-height: 51px}@media(max-width: 600px){.dropzone .acf-gallery-main{--toolbar-height: 61px}}@container (width < 320px){.dropzone .acf-gallery-main{--toolbar-height: 81px}}.dropzone .acf-gallery-main>.acf-gallery-toolbar,.dropzone .acf-gallery-main>.acf-gallery-attachments{position:static}.dropzone .acf-gallery-main>.acf-gallery-attachments{outline:4px dashed #c3c4c7;outline-offset:-4px;margin:1px;bottom:var(--toolbar-height)}.dropzone .acf-gallery-attachments .media-progress-bar-box,.dropzone .acf-gallery-attachments .uploader-window{position:absolute;top:0;height:100%;width:100%}.dropzone .acf-gallery-attachments .media-progress-bar-box,.dropzone .acf-gallery-attachments .uploader-window{position:-webkit-sticky;position:sticky;margin-bottom:-100%;z-index:1}.dropzone .acf-gallery-attachments .acf-dropzone-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:calc(100% - var(--toolbar-height));-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:fixed;left:0;top:0;width:100%}.dropzone .acf-gallery-attachments .acf-dropzone-info p{margin:0}.dropzone .acf-gallery-attachments .acf-gallery-attachment:last-of-type{margin-bottom:5px}1 .block-editor-block-list__block .block-editor-block-contextual-toolbar{z-index:101}.components-notice-list{z-index:109}.dropzone .acf-gallery-attachments,.dropzone .acf-file-uploader,.dropzone .acf-image-uploader{container-name:dropzone;container-type:inline-size}.dropzone .acf-gallery-attachments>*,.dropzone .acf-file-uploader>*,.dropzone .acf-image-uploader>*{--font-size-sm: 11px;--font-size-md: 14px;--font-size-lg: 20px}@container dropzone (width > 350px){.dropzone .acf-gallery-attachments>*,.dropzone .acf-file-uploader>*,.dropzone .acf-image-uploader>*{--font-size-sm: 14px;--font-size-md: 20px;--font-size-lg: 36px}}.dropzone .acf-gallery-attachments>.hide-if-value,.dropzone .acf-file-uploader>.hide-if-value,.dropzone .acf-image-uploader>.hide-if-value{min-height:calc(3*(var(--font-size-sm) + var(--font-size-md)) + 5px + 30px)}.dropzone .acf-file-uploader:not(.has-value)>.hide-if-value,.dropzone .acf-image-uploader:not(.has-value)>.hide-if-value{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.dropzone .acf-dropzone-info{margin-top:auto;margin-bottom:5px;color:#787c82;text-align:center}.dropzone .acf-dropzone-info+p{margin-bottom:auto}.dropzone .acf-dropzone-info p:not(.drag-drop-info){font-size:var(--font-size-sm)}.dropzone .acf-dropzone-info p.drag-drop-info{font-size:var(--font-size-md)}.dropzone .uploader-window .uploader-editor-title{font-size:var(--font-size-lg)}.dropzone.dropzone-file [data-uploader] .hide-if-value{padding:10px 20px;border:4px dashed #c3c4c7}.dropzone .acf-input{position:relative}.dropzone .uploader-window{position:absolute}.dropzone .uploader-window h1,.dropzone .uploader-window h3{margin:0;font-size:25px}.dropzone .media-progress-label{font-weight:bold;text-align:center;margin-top:auto}.dropzone .media-progress-bar-box{background-color:rgba(167,170,173,.75);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dropzone .media-progress-bar{margin-bottom:auto}.dropzone.dropzone-gallery .notice{z-index:1;margin-top:0;margin-bottom:5px}.dropzone [data-uploader=wp] .media-progress-bar-box{position:absolute;left:0;top:0;bottom:0;right:0}.dropzone [data-uploader=wp]>.hide-if-value{text-align:center}.dropzone [data-uploader=basic].drag-over .hide-if-value{border-color:#3582c4}.dropzone .acf-gallery,.dropzone [data-uploader=wp]{z-index:30}.dropzone .acf-gallery-attachments:focus-within .hide-if-focus,.dropzone .acf-gallery-attachments:not(:focus-within) .show-if-focus,.dropzone [data-uploader=wp]:focus-within .hide-if-focus,.dropzone [data-uploader=wp]:not(:focus-within) .show-if-focus{display:none}.dropzone .acf-gallery-attachments:focus,.dropzone [data-uploader=wp]:focus{-webkit-box-shadow:0 0 6px 3px rgba(10,75,120,.66);box-shadow:0 0 6px 3px rgba(10,75,120,.66)}.dropzone .acf-gallery-main{display:grid;grid-template-rows:auto -webkit-min-content;grid-template-rows:auto min-content;-webkit-transform:translateZ(0);--toolbar-height: 51px}@media(max-width: 600px){.dropzone .acf-gallery-main{--toolbar-height: 61px}}@container (width < 320px){.dropzone .acf-gallery-main{--toolbar-height: 81px}}.dropzone .acf-gallery-main>.acf-gallery-toolbar,.dropzone .acf-gallery-main>.acf-gallery-attachments{position:static}.dropzone .acf-gallery-main>.acf-gallery-attachments{outline:4px dashed #c3c4c7;outline-offset:-4px;margin:1px;bottom:var(--toolbar-height)}.dropzone .acf-gallery-attachments .media-progress-bar-box,.dropzone .acf-gallery-attachments .uploader-window{position:absolute;top:0;height:100%;width:100%}.dropzone .acf-gallery-attachments .media-progress-bar-box,.dropzone .acf-gallery-attachments .uploader-window{position:-webkit-sticky;position:sticky;margin-bottom:-100%;z-index:1}.dropzone .acf-gallery-attachments .acf-dropzone-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:calc(100% - var(--toolbar-height));-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:fixed;left:0;top:0;width:100%}.dropzone .acf-gallery-attachments .acf-dropzone-info p{margin:0}.dropzone .acf-gallery-attachments .acf-gallery-attachment:last-of-type{margin-bottom:5px} -
acf-dropzone/tags/1.1.16/include/AcfDropzone/Compat/ACF.php
r3175552 r3412114 170 170 171 171 <p class="show-if-focus drag-drop-info"><?php esc_html_e('Paste from Clipboard','acf-dropzone') ?></p> 172 <p class="hide-if-focus drag-drop-info"><?php esc_html_e('Drop files here','acf-dropzone') ?></p> 173 <p><?php esc_html_e('or','acf-dropzone') ?></p> 174 175 </script> 176 <script type="text/html" id="tmpl-acf-dropzone-info-gallery"> 177 178 <p class="drag-drop-info"><?php esc_html_e('Drop files here','acf-dropzone') ?></p> 172 179 <p class="show-if-focus"><?php esc_html_e('or','acf-dropzone') ?></p> 173 <p class="drag-drop-info"><?php esc_html_e('Drop files here','acf-dropzone') ?></p> 174 <# if (data.or) { #><p><?php esc_html_e('or','acf-dropzone') ?></p><# } #> 180 <p class="show-if-focus drag-drop-info"><?php esc_html_e('Paste from Clipboard','acf-dropzone') ?></p> 175 181 176 182 </script> -
acf-dropzone/tags/1.1.16/index.php
r3175552 r3412114 6 6 Description: Drag and drop file upload for ACF-Fields. 7 7 Author: Jörn Lund 8 Version: 1.1.1 58 Version: 1.1.16 9 9 Author URI: https://github.com/mcguffin 10 10 License: GPL3 -
acf-dropzone/tags/1.1.16/js/admin/acf-dropzone.js
r2986842 r3412114 1 !function(){"use strict";var e= wp.media.View.extend({tagName:"div",className:"acf-dropzone-info",template:wp.template("acf-dropzone-info")}),t=wp.media.View.extend({template:wp.template("acf-dropzone-notice"),className:"notice is-dismissible",events:{"click .notice-dismiss":"remove"},render:function(){return wp.media.View.prototype.render.apply(this,arguments),this.$el.addClass(this.options.type),this}}),i={};(function(e){(function(){var t;(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule,i=Backbone.View.extend({events:{focus:"listenPaste",blur:"stopListenPaste"},listenPaste:function(e){var t=this;this.$el.on("paste",(function(){t.onPaste.apply(t,arguments)}))},stopListenPaste:function(){this.$el.off("paste")},initialize:function(e){return Backbone.View.prototype.initialize.apply(this,arguments),this.controller=e.controller,this},render:function(){return this.$el.attr("tabindex","-1"),this},onPaste:function(e){e.preventDefault(),e.stopPropagation();var t,i,o=e.originalEvent.clipboardData.items;for(t=0;t<o.length;t++)"file"===o[t].kind&&(i=o[t].getAsFile())&&(this.controller.uploader.uploader.param("post_data",{post_title:wp.template("acf-dropzone-attachment-title")({fieldname:this.controller.field.get("name")}).trim(),post_type:"attachment"}),this.controller.uploader.uploader.uploader.addFile(i,i.name));return this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var o={};(function(e){(function(){var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t};o=Backbone.View.extend({tagName:"div",className:"media-progress-bar-box",render:function(){return this.$progress=(0,i.default)("<div />").addClass("media-progress-bar"),this.$label=(0,i.default)("<div />").addClass("media-progress-label"),this.$bar=(0,i.default)("<div />"),this.$el.append(this.$label),this.$progress.append(this.$bar).appendTo(this.$el),this},setLabel:function(e){return this.$label.text(e),this},setProgress:function(e){return this.$bar.width(e+"%"),this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var n={};(function(e){(function(){var r=l("undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null),s=l(t),a=l(i),d=l(o);function l(e){return e&&e.__esModule?e:{default:e}}n=Backbone.View.extend({initialize:function(e){var t=this,i={};return this.el.removeAttribute("id"),this.$(".uploader-window,.moxie-shim").remove(),this.field=e.field,i._acfuploader=this.field.get("key"),document.querySelector("#_acf_post_id")&&(i._acf_post_id=document.querySelector("#_acf_post_id").value,parseInt(i._acf_post_id)>0&&(i.post_id=i._acf_post_id)),this.notice=!1,this.progress=!1,this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:this.el,container:this.el,params:i,error:function(e,i,o){t.fileUploadError(t.uploader,{message:e,file:o})}}}),this.pasteboard=new a.default({controller:this,el:this.$el.is('[data-uploader="wp"]')?this.el:this.field.$(".acf-gallery-attachments").get(0)}),this},render:function(){return(0,r.default)(this.uploader.render().el).appendTo(this.el),this.pasteboard.render(),this},ready:function(){var e=this;return this.$el.on("drop dragenter dragleave dragover",(function(e){e.stopPropagation()})).on("drop",(function(t){e.removeNotice()})),this.trigger("activate"),this.uploader.ready(),this.uploader.uploader.uploader.bind("FilesAdded",this.filesAdded,this),this.uploader.uploader.uploader.bind("BeforeUpload",this.fileBeforeUpload,this),this.uploader.uploader.uploader.bind("UploadProgress",this.fileUploadProgress,this),this.uploader.uploader.uploader.bind("FileUploaded",this.fileUploaded,this),this.pasteboard.render(),this},filesAdded:function(e,t){this.total=t.length,this.done=0},fileBeforeUpload:function(e,t){this.addProgress(),this.progress.setLabel(_.escape(t.name))},fileUploadProgress:function(e,t){this.addProgress(),this.progress.setProgress((100*this.done+t.percent)/this.total)},fileUploaded:function(e,t,i){var o;this.file=t;try{this.trigger("acf-dropzone-uploaded",t.attachment,this.done),this.done++,this.total===this.done&&this.removeProgress()}catch(n){try{o=JSON.parse(i.response),this.fileUploadError(e,{file:this.file,message:o.data.message})}catch(r){this.fileUploadError(e,{file:this.file,message:i.response})}}},fileUploadError:function(e,t){this.done++,this.total===this.done&&this.removeProgress(),this.trigger("acf-dropzone-error",t),this.addNotice({type:"error",bold:_.escape(t.file.name),message:t.message})},addProgress:function(){return this.progress||(this.progress=new d.default,this.progress.render().$el.prependTo(this.el)),this},removeProgress:function(e){return this.progress?(this.progress.$el.remove(),this.progress=!1,this):this},addNotice:function(e){return this.notice=new s.default(e),this.notice.render(),this.notice.$el.prependTo(this.el),this},removeNotice:function(e){return this.notice&&(this.notice.remove(),this.notice=!1),this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),function(t){(function(){r("undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null);var i=r(e),o=r(n);function r(e){return e&&e.__esModule?e:{default:e}}var s=function(e){if(e.$el.is(".dropzone")){var t=e.parent(),n=e.$('[data-uploader="wp"]').get(0);if(n){if(e.$(".hide-if-value > p").contents().filter((function(){return 3==this.nodeType})).remove(),!e.$(".acf-dropzone-info").length){var r=new i.default({or:!0});r.render(),r.$el.prependTo(e.$(".hide-if-value"))}var s=new o.default({el:n,field:e});s.render(),s.ready(),s.on("acf-dropzone-uploaded",(function(i,o){t&&"repeater"===t.get("type")&&o>0?e.append(i,t):e.render(i)}))}}},a=function(e){var t=e.$(".acf-gallery-attachments").get(0);if(e.$el.is(".dropzone")){if(!e.$(".acf-dropzone-info").length){var n=new i.default({or:!1});n.render(),n.$el.prependTo(t)}var r=new o.default({el:t,field:e});r.render(),r.ready(),r.on("acf-dropzone-uploaded",(function(t){e.appendAttachment(t,"prepend"===e.get("insert")?0:void 0)}))}};acf_dropzone.file_fields.forEach((function(e){acf.addAction("new_field/type=".concat(e),s)})),acf_dropzone.gallery_fields.forEach((function(e){acf.addAction("new_field/type=".concat(e),a)}))}).call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}();1 !function(){"use strict";var e={UploaderInfo:wp.media.View.extend({tagName:"div",className:"acf-dropzone-info",template:wp.template("acf-dropzone-info")}),GalleryUploaderInfo:wp.media.View.extend({tagName:"div",className:"acf-dropzone-info",template:wp.template("acf-dropzone-info-gallery")})},t=wp.media.View.extend({template:wp.template("acf-dropzone-notice"),className:"notice is-dismissible",events:{"click .notice-dismiss":"remove"},render:function(){return wp.media.View.prototype.render.apply(this,arguments),this.$el.addClass(this.options.type),this}}),i={};(function(e){(function(){var t;(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule,i=Backbone.View.extend({events:{focus:"listenPaste",blur:"stopListenPaste"},listenPaste:function(e){var t=this;this.$el.on("paste",(function(){t.onPaste.apply(t,arguments)}))},stopListenPaste:function(){this.$el.off("paste")},initialize:function(e){return Backbone.View.prototype.initialize.apply(this,arguments),this.controller=e.controller,this},render:function(){return this.$el.attr("tabindex","-1"),this},onPaste:function(e){e.preventDefault(),e.stopPropagation();var t,i,o=e.originalEvent.clipboardData.items;for(t=0;t<o.length;t++)"file"===o[t].kind&&(i=o[t].getAsFile())&&(this.controller.uploader.uploader.param("post_data",{post_title:wp.template("acf-dropzone-attachment-title")({fieldname:this.controller.field.get("name")}).trim(),post_type:"attachment"}),this.controller.uploader.uploader.uploader.addFile(i,i.name));return this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var o={};(function(e){(function(){var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t};o=Backbone.View.extend({tagName:"div",className:"media-progress-bar-box",render:function(){return this.$progress=(0,i.default)("<div />").addClass("media-progress-bar"),this.$label=(0,i.default)("<div />").addClass("media-progress-label"),this.$bar=(0,i.default)("<div />"),this.$el.append(this.$label),this.$progress.append(this.$bar).appendTo(this.$el),this},setLabel:function(e){return this.$label.text(e),this},setProgress:function(e){return this.$bar.width(e+"%"),this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var n={};(function(e){(function(){var r=l("undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null),a=l(t),s=l(i),d=l(o);function l(e){return e&&e.__esModule?e:{default:e}}n=Backbone.View.extend({initialize:function(e){var t=this,i={};return this.el.removeAttribute("id"),this.$(".uploader-window,.moxie-shim").remove(),this.field=e.field,i._acfuploader=this.field.get("key"),document.querySelector("#_acf_post_id")&&(i._acf_post_id=document.querySelector("#_acf_post_id").value,parseInt(i._acf_post_id)>0&&(i.post_id=i._acf_post_id)),this.notice=!1,this.progress=!1,this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:this.el,container:this.el,params:i,error:function(e,i,o){t.fileUploadError(t.uploader,{message:e,file:o})}}}),this.pasteboard=new s.default({controller:this,el:this.$el.is('[data-uploader="wp"]')?this.el:this.field.$(".acf-gallery-attachments").get(0)}),this},render:function(){return(0,r.default)(this.uploader.render().el).appendTo(this.el),this.pasteboard.render(),this},ready:function(){var e=this;return this.$el.on("drop dragenter dragleave dragover",(function(e){e.stopPropagation()})).on("drop",(function(t){e.removeNotice()})),this.trigger("activate"),this.uploader.ready(),this.uploader.uploader.uploader.bind("FilesAdded",this.filesAdded,this),this.uploader.uploader.uploader.bind("BeforeUpload",this.fileBeforeUpload,this),this.uploader.uploader.uploader.bind("UploadProgress",this.fileUploadProgress,this),this.uploader.uploader.uploader.bind("FileUploaded",this.fileUploaded,this),this.pasteboard.render(),this},filesAdded:function(e,t){this.total=t.length,this.done=0},fileBeforeUpload:function(e,t){this.addProgress(),this.progress.setLabel(_.escape(t.name))},fileUploadProgress:function(e,t){this.addProgress(),this.progress.setProgress((100*this.done+t.percent)/this.total)},fileUploaded:function(e,t,i){var o;this.file=t;try{this.trigger("acf-dropzone-uploaded",t.attachment,this.done),this.done++,this.total===this.done&&this.removeProgress()}catch(n){try{o=JSON.parse(i.response),this.fileUploadError(e,{file:this.file,message:o.data.message})}catch(r){this.fileUploadError(e,{file:this.file,message:i.response})}}},fileUploadError:function(e,t){this.done++,this.total===this.done&&this.removeProgress(),this.trigger("acf-dropzone-error",t),this.addNotice({type:"error",bold:_.escape(t.file.name),message:t.message})},addProgress:function(){return this.progress||(this.progress=new d.default,this.progress.render().$el.prependTo(this.el)),this},removeProgress:function(e){return this.progress?(this.progress.$el.remove(),this.progress=!1,this):this},addNotice:function(e){return this.notice=new a.default(e),this.notice.render(),this.notice.$el.prependTo(this.el),this},removeNotice:function(e){return this.notice&&(this.notice.remove(),this.notice=!1),this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),function(t){(function(){o("undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null);var i=o(n);function o(e){return e&&e.__esModule?e:{default:e}}var r=function(t){if(t.$el.is(".dropzone")){var o=t.parent(),n=t.$('[data-uploader="wp"]').get(0);if(n){if(t.$(".hide-if-value > p").contents().filter((function(){return 3==this.nodeType})).remove(),!t.$(".acf-dropzone-info").length){var r=new e.UploaderInfo;r.render(),r.$el.prependTo(t.$(".hide-if-value"))}var a=new i.default({el:n,field:t});a.render(),a.ready(),a.on("acf-dropzone-uploaded",(function(e,i){o&&"repeater"===o.get("type")&&i>0?t.append(e,o):t.render(e)}))}}},a=function(t){var o=t.$(".acf-gallery-attachments").get(0);if(t.$el.is(".dropzone")){if(!t.$(".acf-dropzone-info").length){var n=new e.GalleryUploaderInfo;n.render(),n.$el.prependTo(o)}var r=new i.default({el:o,field:t});r.render(),r.ready(),r.on("acf-dropzone-uploaded",(function(e){t.appendAttachment(e,"prepend"===t.get("insert")?0:void 0)}))}};acf_dropzone.file_fields.forEach((function(e){acf.addAction("new_field/type=".concat(e),r)})),acf_dropzone.gallery_fields.forEach((function(e){acf.addAction("new_field/type=".concat(e),a)}))}).call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}(); -
acf-dropzone/tags/1.1.16/languages/acf-dropzone.pot
r3175552 r3412114 1 # Copyright (C) 202 4Jörn Lund1 # Copyright (C) 2025 Jörn Lund 2 2 # This file is distributed under the GPL3. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ACF Dropzone 1.1.1 5\n"5 "Project-Id-Version: ACF Dropzone 1.1.16\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/acf-dropzone\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-10-25T09:42:24+00:00\n"12 "POT-Creation-Date: 2025-12-05T12:26:20+01:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 1.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: acf-dropzone\n" 16 16 … … 49 49 50 50 #: include/AcfDropzone/Compat/ACF.php:171 51 #: include/AcfDropzone/Compat/ACF.php:180 51 52 msgid "Paste from Clipboard" 52 53 msgstr "" 53 54 54 55 #: include/AcfDropzone/Compat/ACF.php:172 55 #: include/AcfDropzone/Compat/ACF.php:174 56 #: include/AcfDropzone/Compat/ACF.php:178 57 msgid "Drop files here" 58 msgstr "" 59 60 #: include/AcfDropzone/Compat/ACF.php:173 61 #: include/AcfDropzone/Compat/ACF.php:179 56 62 msgid "or" 57 63 msgstr "" 58 64 59 #: include/AcfDropzone/Compat/ACF.php:17360 msgid "Drop files here"61 msgstr ""62 63 65 #. Translators: followed by post or admin page name 64 #: include/AcfDropzone/Compat/ACF.php:18 066 #: include/AcfDropzone/Compat/ACF.php:186 65 67 msgctxt "attachment-title" 66 68 msgid "Pasted Into" 67 69 msgstr "" 68 70 69 #: include/AcfDropzone/Compat/ACF.php:19 371 #: include/AcfDropzone/Compat/ACF.php:199 70 72 msgctxt "attachment-title" 71 73 msgid "Pasted File" -
acf-dropzone/tags/1.1.16/readme.txt
r3175552 r3412114 5 5 Requires at least: 5.0 6 6 Requires PHP: 5.6 7 Tested up to: 6. 48 Stable tag: 1.1.1 57 Tested up to: 6.9 8 Stable tag: 1.1.16 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 66 66 == Changelog == 67 67 68 = 1.1.16 = 69 - UI improvement: keep upload button in place if field is focused 70 68 71 = 1.1.15 = 69 72 - Fix: Broken CSS in webkit (chrome, edge) -
acf-dropzone/trunk/css/admin/acf-dropzone.css
r3175552 r3412114 1 .block-editor-block-list__block .block-editor-block-contextual-toolbar{z-index:101}.components-notice-list{z-index:109}.dropzone .acf-gallery-attachments,.dropzone .acf-file-uploader,.dropzone .acf-image-uploader{container-name:dropzone;container-type:inline-size}.dropzone .acf-gallery-attachments>*,.dropzone .acf-file-uploader>*,.dropzone .acf-image-uploader>*{--font-size-sm: 11px;--font-size-md: 14px;--font-size-lg: 20px}@container dropzone (width > 350px){.dropzone .acf-gallery-attachments>*,.dropzone .acf-file-uploader>*,.dropzone .acf-image-uploader>*{--font-size-sm: 14px;--font-size-md: 20px;--font-size-lg: 36px}}.dropzone .acf-gallery-attachments>.hide-if-value,.dropzone .acf-file-uploader>.hide-if-value,.dropzone .acf-image-uploader>.hide-if-value{min-height:calc(3*(var(--font-size-sm) + var(--font-size-md)) + 5px + 30px)}.dropzone .acf-file-uploader:not(.has-value)>.hide-if-value,.dropzone .acf-image-uploader:not(.has-value)>.hide-if-value{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.dropzone .acf-dropzone-info{margin-top:auto;margin-bottom:5px;color:#787c82;text-align:center}.dropzone .acf-dropzone-info+p{margin-bottom:auto}.dropzone .acf-dropzone-info p:not(.drag-drop-info){font-size:var(--font-size-sm)}.dropzone .acf-dropzone-info p.drag-drop-info{font-size:var(--font-size-md)}.dropzone .uploader-window .uploader-editor-title{font-size:var(--font-size-lg)}.dropzone.dropzone-file [data-uploader] .hide-if-value{padding:10px 20px;border:4px dashed #c3c4c7}.dropzone .acf-input{position:relative}.dropzone .uploader-window{position:absolute}.dropzone .uploader-window h1,.dropzone .uploader-window h3{margin:0;font-size:25px}.dropzone .media-progress-label{font-weight:bold;text-align:center;margin-top:auto}.dropzone .media-progress-bar-box{background-color:rgba(167,170,173,.75);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dropzone .media-progress-bar{margin-bottom:auto}.dropzone.dropzone-gallery .notice{z-index:1;margin-top:0;margin-bottom:5px}.dropzone [data-uploader=wp] .media-progress-bar-box{position:absolute;left:0;top:0;bottom:0;right:0}.dropzone [data-uploader=wp]>.hide-if-value{text-align:center}.dropzone [data-uploader=basic].drag-over .hide-if-value{border-color:#3582c4}.dropzone .acf-gallery,.dropzone [data-uploader=wp]{z-index:30}.dropzone .acf-gallery-attachments: not(:focus-within) .show-if-focus,.dropzone [data-uploader=wp]:not(:focus-within) .show-if-focus{display:none}.dropzone .acf-gallery-attachments:focus,.dropzone [data-uploader=wp]:focus{-webkit-box-shadow:0 0 6px 3px rgba(10,75,120,.66);box-shadow:0 0 6px 3px rgba(10,75,120,.66)}.dropzone .acf-gallery-main{display:grid;grid-template-rows:auto -webkit-min-content;grid-template-rows:auto min-content;-webkit-transform:translateZ(0);--toolbar-height: 51px}@media(max-width: 600px){.dropzone .acf-gallery-main{--toolbar-height: 61px}}@container (width < 320px){.dropzone .acf-gallery-main{--toolbar-height: 81px}}.dropzone .acf-gallery-main>.acf-gallery-toolbar,.dropzone .acf-gallery-main>.acf-gallery-attachments{position:static}.dropzone .acf-gallery-main>.acf-gallery-attachments{outline:4px dashed #c3c4c7;outline-offset:-4px;margin:1px;bottom:var(--toolbar-height)}.dropzone .acf-gallery-attachments .media-progress-bar-box,.dropzone .acf-gallery-attachments .uploader-window{position:absolute;top:0;height:100%;width:100%}.dropzone .acf-gallery-attachments .media-progress-bar-box,.dropzone .acf-gallery-attachments .uploader-window{position:-webkit-sticky;position:sticky;margin-bottom:-100%;z-index:1}.dropzone .acf-gallery-attachments .acf-dropzone-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:calc(100% - var(--toolbar-height));-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:fixed;left:0;top:0;width:100%}.dropzone .acf-gallery-attachments .acf-dropzone-info p{margin:0}.dropzone .acf-gallery-attachments .acf-gallery-attachment:last-of-type{margin-bottom:5px}1 .block-editor-block-list__block .block-editor-block-contextual-toolbar{z-index:101}.components-notice-list{z-index:109}.dropzone .acf-gallery-attachments,.dropzone .acf-file-uploader,.dropzone .acf-image-uploader{container-name:dropzone;container-type:inline-size}.dropzone .acf-gallery-attachments>*,.dropzone .acf-file-uploader>*,.dropzone .acf-image-uploader>*{--font-size-sm: 11px;--font-size-md: 14px;--font-size-lg: 20px}@container dropzone (width > 350px){.dropzone .acf-gallery-attachments>*,.dropzone .acf-file-uploader>*,.dropzone .acf-image-uploader>*{--font-size-sm: 14px;--font-size-md: 20px;--font-size-lg: 36px}}.dropzone .acf-gallery-attachments>.hide-if-value,.dropzone .acf-file-uploader>.hide-if-value,.dropzone .acf-image-uploader>.hide-if-value{min-height:calc(3*(var(--font-size-sm) + var(--font-size-md)) + 5px + 30px)}.dropzone .acf-file-uploader:not(.has-value)>.hide-if-value,.dropzone .acf-image-uploader:not(.has-value)>.hide-if-value{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.dropzone .acf-dropzone-info{margin-top:auto;margin-bottom:5px;color:#787c82;text-align:center}.dropzone .acf-dropzone-info+p{margin-bottom:auto}.dropzone .acf-dropzone-info p:not(.drag-drop-info){font-size:var(--font-size-sm)}.dropzone .acf-dropzone-info p.drag-drop-info{font-size:var(--font-size-md)}.dropzone .uploader-window .uploader-editor-title{font-size:var(--font-size-lg)}.dropzone.dropzone-file [data-uploader] .hide-if-value{padding:10px 20px;border:4px dashed #c3c4c7}.dropzone .acf-input{position:relative}.dropzone .uploader-window{position:absolute}.dropzone .uploader-window h1,.dropzone .uploader-window h3{margin:0;font-size:25px}.dropzone .media-progress-label{font-weight:bold;text-align:center;margin-top:auto}.dropzone .media-progress-bar-box{background-color:rgba(167,170,173,.75);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.dropzone .media-progress-bar{margin-bottom:auto}.dropzone.dropzone-gallery .notice{z-index:1;margin-top:0;margin-bottom:5px}.dropzone [data-uploader=wp] .media-progress-bar-box{position:absolute;left:0;top:0;bottom:0;right:0}.dropzone [data-uploader=wp]>.hide-if-value{text-align:center}.dropzone [data-uploader=basic].drag-over .hide-if-value{border-color:#3582c4}.dropzone .acf-gallery,.dropzone [data-uploader=wp]{z-index:30}.dropzone .acf-gallery-attachments:focus-within .hide-if-focus,.dropzone .acf-gallery-attachments:not(:focus-within) .show-if-focus,.dropzone [data-uploader=wp]:focus-within .hide-if-focus,.dropzone [data-uploader=wp]:not(:focus-within) .show-if-focus{display:none}.dropzone .acf-gallery-attachments:focus,.dropzone [data-uploader=wp]:focus{-webkit-box-shadow:0 0 6px 3px rgba(10,75,120,.66);box-shadow:0 0 6px 3px rgba(10,75,120,.66)}.dropzone .acf-gallery-main{display:grid;grid-template-rows:auto -webkit-min-content;grid-template-rows:auto min-content;-webkit-transform:translateZ(0);--toolbar-height: 51px}@media(max-width: 600px){.dropzone .acf-gallery-main{--toolbar-height: 61px}}@container (width < 320px){.dropzone .acf-gallery-main{--toolbar-height: 81px}}.dropzone .acf-gallery-main>.acf-gallery-toolbar,.dropzone .acf-gallery-main>.acf-gallery-attachments{position:static}.dropzone .acf-gallery-main>.acf-gallery-attachments{outline:4px dashed #c3c4c7;outline-offset:-4px;margin:1px;bottom:var(--toolbar-height)}.dropzone .acf-gallery-attachments .media-progress-bar-box,.dropzone .acf-gallery-attachments .uploader-window{position:absolute;top:0;height:100%;width:100%}.dropzone .acf-gallery-attachments .media-progress-bar-box,.dropzone .acf-gallery-attachments .uploader-window{position:-webkit-sticky;position:sticky;margin-bottom:-100%;z-index:1}.dropzone .acf-gallery-attachments .acf-dropzone-info{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:calc(100% - var(--toolbar-height));-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:fixed;left:0;top:0;width:100%}.dropzone .acf-gallery-attachments .acf-dropzone-info p{margin:0}.dropzone .acf-gallery-attachments .acf-gallery-attachment:last-of-type{margin-bottom:5px} -
acf-dropzone/trunk/include/AcfDropzone/Compat/ACF.php
r3175552 r3412114 170 170 171 171 <p class="show-if-focus drag-drop-info"><?php esc_html_e('Paste from Clipboard','acf-dropzone') ?></p> 172 <p class="hide-if-focus drag-drop-info"><?php esc_html_e('Drop files here','acf-dropzone') ?></p> 173 <p><?php esc_html_e('or','acf-dropzone') ?></p> 174 175 </script> 176 <script type="text/html" id="tmpl-acf-dropzone-info-gallery"> 177 178 <p class="drag-drop-info"><?php esc_html_e('Drop files here','acf-dropzone') ?></p> 172 179 <p class="show-if-focus"><?php esc_html_e('or','acf-dropzone') ?></p> 173 <p class="drag-drop-info"><?php esc_html_e('Drop files here','acf-dropzone') ?></p> 174 <# if (data.or) { #><p><?php esc_html_e('or','acf-dropzone') ?></p><# } #> 180 <p class="show-if-focus drag-drop-info"><?php esc_html_e('Paste from Clipboard','acf-dropzone') ?></p> 175 181 176 182 </script> -
acf-dropzone/trunk/index.php
r3175552 r3412114 6 6 Description: Drag and drop file upload for ACF-Fields. 7 7 Author: Jörn Lund 8 Version: 1.1.1 58 Version: 1.1.16 9 9 Author URI: https://github.com/mcguffin 10 10 License: GPL3 -
acf-dropzone/trunk/js/admin/acf-dropzone.js
r2986842 r3412114 1 !function(){"use strict";var e= wp.media.View.extend({tagName:"div",className:"acf-dropzone-info",template:wp.template("acf-dropzone-info")}),t=wp.media.View.extend({template:wp.template("acf-dropzone-notice"),className:"notice is-dismissible",events:{"click .notice-dismiss":"remove"},render:function(){return wp.media.View.prototype.render.apply(this,arguments),this.$el.addClass(this.options.type),this}}),i={};(function(e){(function(){var t;(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule,i=Backbone.View.extend({events:{focus:"listenPaste",blur:"stopListenPaste"},listenPaste:function(e){var t=this;this.$el.on("paste",(function(){t.onPaste.apply(t,arguments)}))},stopListenPaste:function(){this.$el.off("paste")},initialize:function(e){return Backbone.View.prototype.initialize.apply(this,arguments),this.controller=e.controller,this},render:function(){return this.$el.attr("tabindex","-1"),this},onPaste:function(e){e.preventDefault(),e.stopPropagation();var t,i,o=e.originalEvent.clipboardData.items;for(t=0;t<o.length;t++)"file"===o[t].kind&&(i=o[t].getAsFile())&&(this.controller.uploader.uploader.param("post_data",{post_title:wp.template("acf-dropzone-attachment-title")({fieldname:this.controller.field.get("name")}).trim(),post_type:"attachment"}),this.controller.uploader.uploader.uploader.addFile(i,i.name));return this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var o={};(function(e){(function(){var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t};o=Backbone.View.extend({tagName:"div",className:"media-progress-bar-box",render:function(){return this.$progress=(0,i.default)("<div />").addClass("media-progress-bar"),this.$label=(0,i.default)("<div />").addClass("media-progress-label"),this.$bar=(0,i.default)("<div />"),this.$el.append(this.$label),this.$progress.append(this.$bar).appendTo(this.$el),this},setLabel:function(e){return this.$label.text(e),this},setProgress:function(e){return this.$bar.width(e+"%"),this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var n={};(function(e){(function(){var r=l("undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null),s=l(t),a=l(i),d=l(o);function l(e){return e&&e.__esModule?e:{default:e}}n=Backbone.View.extend({initialize:function(e){var t=this,i={};return this.el.removeAttribute("id"),this.$(".uploader-window,.moxie-shim").remove(),this.field=e.field,i._acfuploader=this.field.get("key"),document.querySelector("#_acf_post_id")&&(i._acf_post_id=document.querySelector("#_acf_post_id").value,parseInt(i._acf_post_id)>0&&(i.post_id=i._acf_post_id)),this.notice=!1,this.progress=!1,this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:this.el,container:this.el,params:i,error:function(e,i,o){t.fileUploadError(t.uploader,{message:e,file:o})}}}),this.pasteboard=new a.default({controller:this,el:this.$el.is('[data-uploader="wp"]')?this.el:this.field.$(".acf-gallery-attachments").get(0)}),this},render:function(){return(0,r.default)(this.uploader.render().el).appendTo(this.el),this.pasteboard.render(),this},ready:function(){var e=this;return this.$el.on("drop dragenter dragleave dragover",(function(e){e.stopPropagation()})).on("drop",(function(t){e.removeNotice()})),this.trigger("activate"),this.uploader.ready(),this.uploader.uploader.uploader.bind("FilesAdded",this.filesAdded,this),this.uploader.uploader.uploader.bind("BeforeUpload",this.fileBeforeUpload,this),this.uploader.uploader.uploader.bind("UploadProgress",this.fileUploadProgress,this),this.uploader.uploader.uploader.bind("FileUploaded",this.fileUploaded,this),this.pasteboard.render(),this},filesAdded:function(e,t){this.total=t.length,this.done=0},fileBeforeUpload:function(e,t){this.addProgress(),this.progress.setLabel(_.escape(t.name))},fileUploadProgress:function(e,t){this.addProgress(),this.progress.setProgress((100*this.done+t.percent)/this.total)},fileUploaded:function(e,t,i){var o;this.file=t;try{this.trigger("acf-dropzone-uploaded",t.attachment,this.done),this.done++,this.total===this.done&&this.removeProgress()}catch(n){try{o=JSON.parse(i.response),this.fileUploadError(e,{file:this.file,message:o.data.message})}catch(r){this.fileUploadError(e,{file:this.file,message:i.response})}}},fileUploadError:function(e,t){this.done++,this.total===this.done&&this.removeProgress(),this.trigger("acf-dropzone-error",t),this.addNotice({type:"error",bold:_.escape(t.file.name),message:t.message})},addProgress:function(){return this.progress||(this.progress=new d.default,this.progress.render().$el.prependTo(this.el)),this},removeProgress:function(e){return this.progress?(this.progress.$el.remove(),this.progress=!1,this):this},addNotice:function(e){return this.notice=new s.default(e),this.notice.render(),this.notice.$el.prependTo(this.el),this},removeNotice:function(e){return this.notice&&(this.notice.remove(),this.notice=!1),this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),function(t){(function(){r("undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null);var i=r(e),o=r(n);function r(e){return e&&e.__esModule?e:{default:e}}var s=function(e){if(e.$el.is(".dropzone")){var t=e.parent(),n=e.$('[data-uploader="wp"]').get(0);if(n){if(e.$(".hide-if-value > p").contents().filter((function(){return 3==this.nodeType})).remove(),!e.$(".acf-dropzone-info").length){var r=new i.default({or:!0});r.render(),r.$el.prependTo(e.$(".hide-if-value"))}var s=new o.default({el:n,field:e});s.render(),s.ready(),s.on("acf-dropzone-uploaded",(function(i,o){t&&"repeater"===t.get("type")&&o>0?e.append(i,t):e.render(i)}))}}},a=function(e){var t=e.$(".acf-gallery-attachments").get(0);if(e.$el.is(".dropzone")){if(!e.$(".acf-dropzone-info").length){var n=new i.default({or:!1});n.render(),n.$el.prependTo(t)}var r=new o.default({el:t,field:e});r.render(),r.ready(),r.on("acf-dropzone-uploaded",(function(t){e.appendAttachment(t,"prepend"===e.get("insert")?0:void 0)}))}};acf_dropzone.file_fields.forEach((function(e){acf.addAction("new_field/type=".concat(e),s)})),acf_dropzone.gallery_fields.forEach((function(e){acf.addAction("new_field/type=".concat(e),a)}))}).call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}();1 !function(){"use strict";var e={UploaderInfo:wp.media.View.extend({tagName:"div",className:"acf-dropzone-info",template:wp.template("acf-dropzone-info")}),GalleryUploaderInfo:wp.media.View.extend({tagName:"div",className:"acf-dropzone-info",template:wp.template("acf-dropzone-info-gallery")})},t=wp.media.View.extend({template:wp.template("acf-dropzone-notice"),className:"notice is-dismissible",events:{"click .notice-dismiss":"remove"},render:function(){return wp.media.View.prototype.render.apply(this,arguments),this.$el.addClass(this.options.type),this}}),i={};(function(e){(function(){var t;(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule,i=Backbone.View.extend({events:{focus:"listenPaste",blur:"stopListenPaste"},listenPaste:function(e){var t=this;this.$el.on("paste",(function(){t.onPaste.apply(t,arguments)}))},stopListenPaste:function(){this.$el.off("paste")},initialize:function(e){return Backbone.View.prototype.initialize.apply(this,arguments),this.controller=e.controller,this},render:function(){return this.$el.attr("tabindex","-1"),this},onPaste:function(e){e.preventDefault(),e.stopPropagation();var t,i,o=e.originalEvent.clipboardData.items;for(t=0;t<o.length;t++)"file"===o[t].kind&&(i=o[t].getAsFile())&&(this.controller.uploader.uploader.param("post_data",{post_title:wp.template("acf-dropzone-attachment-title")({fieldname:this.controller.field.get("name")}).trim(),post_type:"attachment"}),this.controller.uploader.uploader.uploader.addFile(i,i.name));return this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var o={};(function(e){(function(){var t,i=(t="undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null)&&t.__esModule?t:{default:t};o=Backbone.View.extend({tagName:"div",className:"media-progress-bar-box",render:function(){return this.$progress=(0,i.default)("<div />").addClass("media-progress-bar"),this.$label=(0,i.default)("<div />").addClass("media-progress-label"),this.$bar=(0,i.default)("<div />"),this.$el.append(this.$label),this.$progress.append(this.$bar).appendTo(this.$el),this},setLabel:function(e){return this.$label.text(e),this},setProgress:function(e){return this.$bar.width(e+"%"),this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});var n={};(function(e){(function(){var r=l("undefined"!=typeof window?window.jQuery:void 0!==e?e.jQuery:null),a=l(t),s=l(i),d=l(o);function l(e){return e&&e.__esModule?e:{default:e}}n=Backbone.View.extend({initialize:function(e){var t=this,i={};return this.el.removeAttribute("id"),this.$(".uploader-window,.moxie-shim").remove(),this.field=e.field,i._acfuploader=this.field.get("key"),document.querySelector("#_acf_post_id")&&(i._acf_post_id=document.querySelector("#_acf_post_id").value,parseInt(i._acf_post_id)>0&&(i.post_id=i._acf_post_id)),this.notice=!1,this.progress=!1,this.uploader=new wp.media.view.UploaderWindow({controller:this,uploader:{dropzone:this.el,container:this.el,params:i,error:function(e,i,o){t.fileUploadError(t.uploader,{message:e,file:o})}}}),this.pasteboard=new s.default({controller:this,el:this.$el.is('[data-uploader="wp"]')?this.el:this.field.$(".acf-gallery-attachments").get(0)}),this},render:function(){return(0,r.default)(this.uploader.render().el).appendTo(this.el),this.pasteboard.render(),this},ready:function(){var e=this;return this.$el.on("drop dragenter dragleave dragover",(function(e){e.stopPropagation()})).on("drop",(function(t){e.removeNotice()})),this.trigger("activate"),this.uploader.ready(),this.uploader.uploader.uploader.bind("FilesAdded",this.filesAdded,this),this.uploader.uploader.uploader.bind("BeforeUpload",this.fileBeforeUpload,this),this.uploader.uploader.uploader.bind("UploadProgress",this.fileUploadProgress,this),this.uploader.uploader.uploader.bind("FileUploaded",this.fileUploaded,this),this.pasteboard.render(),this},filesAdded:function(e,t){this.total=t.length,this.done=0},fileBeforeUpload:function(e,t){this.addProgress(),this.progress.setLabel(_.escape(t.name))},fileUploadProgress:function(e,t){this.addProgress(),this.progress.setProgress((100*this.done+t.percent)/this.total)},fileUploaded:function(e,t,i){var o;this.file=t;try{this.trigger("acf-dropzone-uploaded",t.attachment,this.done),this.done++,this.total===this.done&&this.removeProgress()}catch(n){try{o=JSON.parse(i.response),this.fileUploadError(e,{file:this.file,message:o.data.message})}catch(r){this.fileUploadError(e,{file:this.file,message:i.response})}}},fileUploadError:function(e,t){this.done++,this.total===this.done&&this.removeProgress(),this.trigger("acf-dropzone-error",t),this.addNotice({type:"error",bold:_.escape(t.file.name),message:t.message})},addProgress:function(){return this.progress||(this.progress=new d.default,this.progress.render().$el.prependTo(this.el)),this},removeProgress:function(e){return this.progress?(this.progress.$el.remove(),this.progress=!1,this):this},addNotice:function(e){return this.notice=new a.default(e),this.notice.render(),this.notice.$el.prependTo(this.el),this},removeNotice:function(e){return this.notice&&(this.notice.remove(),this.notice=!1),this}})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{}),function(t){(function(){o("undefined"!=typeof window?window.jQuery:void 0!==t?t.jQuery:null);var i=o(n);function o(e){return e&&e.__esModule?e:{default:e}}var r=function(t){if(t.$el.is(".dropzone")){var o=t.parent(),n=t.$('[data-uploader="wp"]').get(0);if(n){if(t.$(".hide-if-value > p").contents().filter((function(){return 3==this.nodeType})).remove(),!t.$(".acf-dropzone-info").length){var r=new e.UploaderInfo;r.render(),r.$el.prependTo(t.$(".hide-if-value"))}var a=new i.default({el:n,field:t});a.render(),a.ready(),a.on("acf-dropzone-uploaded",(function(e,i){o&&"repeater"===o.get("type")&&i>0?t.append(e,o):t.render(e)}))}}},a=function(t){var o=t.$(".acf-gallery-attachments").get(0);if(t.$el.is(".dropzone")){if(!t.$(".acf-dropzone-info").length){var n=new e.GalleryUploaderInfo;n.render(),n.$el.prependTo(o)}var r=new i.default({el:o,field:t});r.render(),r.ready(),r.on("acf-dropzone-uploaded",(function(e){t.appendAttachment(e,"prepend"===t.get("insert")?0:void 0)}))}};acf_dropzone.file_fields.forEach((function(e){acf.addAction("new_field/type=".concat(e),r)})),acf_dropzone.gallery_fields.forEach((function(e){acf.addAction("new_field/type=".concat(e),a)}))}).call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}(); -
acf-dropzone/trunk/languages/acf-dropzone.pot
r3175552 r3412114 1 # Copyright (C) 202 4Jörn Lund1 # Copyright (C) 2025 Jörn Lund 2 2 # This file is distributed under the GPL3. 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: ACF Dropzone 1.1.1 5\n"5 "Project-Id-Version: ACF Dropzone 1.1.16\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/acf-dropzone\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 202 4-10-25T09:42:24+00:00\n"12 "POT-Creation-Date: 2025-12-05T12:26:20+01:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 "X-Generator: WP-CLI 2.1 1.0\n"14 "X-Generator: WP-CLI 2.12.0\n" 15 15 "X-Domain: acf-dropzone\n" 16 16 … … 49 49 50 50 #: include/AcfDropzone/Compat/ACF.php:171 51 #: include/AcfDropzone/Compat/ACF.php:180 51 52 msgid "Paste from Clipboard" 52 53 msgstr "" 53 54 54 55 #: include/AcfDropzone/Compat/ACF.php:172 55 #: include/AcfDropzone/Compat/ACF.php:174 56 #: include/AcfDropzone/Compat/ACF.php:178 57 msgid "Drop files here" 58 msgstr "" 59 60 #: include/AcfDropzone/Compat/ACF.php:173 61 #: include/AcfDropzone/Compat/ACF.php:179 56 62 msgid "or" 57 63 msgstr "" 58 64 59 #: include/AcfDropzone/Compat/ACF.php:17360 msgid "Drop files here"61 msgstr ""62 63 65 #. Translators: followed by post or admin page name 64 #: include/AcfDropzone/Compat/ACF.php:18 066 #: include/AcfDropzone/Compat/ACF.php:186 65 67 msgctxt "attachment-title" 66 68 msgid "Pasted Into" 67 69 msgstr "" 68 70 69 #: include/AcfDropzone/Compat/ACF.php:19 371 #: include/AcfDropzone/Compat/ACF.php:199 70 72 msgctxt "attachment-title" 71 73 msgid "Pasted File" -
acf-dropzone/trunk/readme.txt
r3175552 r3412114 5 5 Requires at least: 5.0 6 6 Requires PHP: 5.6 7 Tested up to: 6. 48 Stable tag: 1.1.1 57 Tested up to: 6.9 8 Stable tag: 1.1.16 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 66 66 == Changelog == 67 67 68 = 1.1.16 = 69 - UI improvement: keep upload button in place if field is focused 70 68 71 = 1.1.15 = 69 72 - Fix: Broken CSS in webkit (chrome, edge)
Note: See TracChangeset
for help on using the changeset viewer.