From 6054a5389754e64a1eacc3bffa593841bca9c348 Mon Sep 17 00:00:00 2001 From: Nikola Ivanovski Date: Wed, 23 Oct 2024 14:27:17 +0300 Subject: [PATCH] OXDEV-8840 Fix ajax error message when using http2 --- assets/out/src/js/base.min.js | 2 +- assets/out/src/js/base.min.js.map | 2 +- build/js/base/medialibrary.js | 2 +- .../Validator/FileNameValidator.php | 5 ++++ .../Validator/FileNameValidatorTest.php | 24 +++++++++++-------- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/assets/out/src/js/base.min.js b/assets/out/src/js/base.min.js index 03a3ab3..dc10337 100644 --- a/assets/out/src/js/base.min.js +++ b/assets/out/src/js/base.min.js @@ -1,3 +1,3 @@ (function(){var a,b,c,d,e,f,g,h,i=[].slice,j={}.hasOwnProperty,k=function(a,b){function c(){this.constructor=a}for(var d in b)j.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};g=function(){},b=function(){function a(){}return a.prototype.addEventListener=a.prototype.on,a.prototype.on=function(a,b){return this._callbacks=this._callbacks||{},this._callbacks[a]||(this._callbacks[a]=[]),this._callbacks[a].push(b),this},a.prototype.emit=function(){var a,b,c,d,e,f;if(d=arguments[0],a=2<=arguments.length?i.call(arguments,1):[],this._callbacks=this._callbacks||{},c=this._callbacks[d])for(e=0,f=c.length;e'),this.element.appendChild(b)),d=b.getElementsByTagName("span")[0],d&&(null!=d.textContent?d.textContent=this.options.dictFallbackMessage:null!=d.innerText&&(d.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(a){var b,c,d;return b={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},c=a.width/a.height,b.optWidth=this.options.thumbnailWidth,b.optHeight=this.options.thumbnailHeight,null==b.optWidth&&null==b.optHeight?(b.optWidth=b.srcWidth,b.optHeight=b.srcHeight):null==b.optWidth?b.optWidth=c*b.optHeight:null==b.optHeight&&(b.optHeight=1/c*b.optWidth),d=b.optWidth/b.optHeight,a.heightd?(b.srcHeight=a.height,b.srcWidth=b.srcHeight*d):(b.srcWidth=a.width,b.srcHeight=b.srcWidth/d),b.srcX=(a.width-b.srcWidth)/2,b.srcY=(a.height-b.srcHeight)/2,b},drop:function(a){return this.element.classList.remove("dz-drag-hover")},dragstart:g,dragend:function(a){return this.element.classList.remove("dz-drag-hover")},dragenter:function(a){return this.element.classList.add("dz-drag-hover")},dragover:function(a){return this.element.classList.add("dz-drag-hover")},dragleave:function(a){return this.element.classList.remove("dz-drag-hover")},paste:g,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var b,d,e,f,g,h,i,j,k,l,m,n,o;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(a.previewElement=c.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement),l=a.previewElement.querySelectorAll("[data-dz-name]"),f=0,i=l.length;f'+this.options.dictRemoveFile+""),a.previewElement.appendChild(a._removeLink)),d=function(b){return function(d){return d.preventDefault(),d.stopPropagation(),a.status===c.UPLOADING?c.confirm(b.options.dictCancelUploadConfirmation,function(){return b.removeFile(a)}):b.options.dictRemoveFileConfirmation?c.confirm(b.options.dictRemoveFileConfirmation,function(){return b.removeFile(a)}):b.removeFile(a)}}(this),n=a.previewElement.querySelectorAll("[data-dz-remove]"),o=[],h=0,k=n.length;h\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n'},d=function(){var a,b,c,d,e,f,g;for(d=arguments[0],c=2<=arguments.length?i.call(arguments,1):[],f=0,g=c.length;f'+this.options.dictDefaultMessage+"")),this.clickableElements.length&&(d=function(a){return function(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!=a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),null!=a.options.capture&&a.hiddenFileInput.setAttribute("capture",a.options.capture),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.querySelector(a.options.hiddenInputContainer).appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var b,c,e,f;if(c=a.hiddenFileInput.files,c.length)for(e=0,f=c.length;e',this.options.dictFallbackText&&(d+="

"+this.options.dictFallbackText+"

"),d+='',b=c.createElement(d),"FORM"!==this.element.tagName?(e=c.createElement('
'),e.appendChild(b)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:b)},c.prototype.getExistingFallback=function(){var a,b,c,d,e,f;for(b=function(a){var b,c,d;for(c=0,d=a.length;c0){for(g=["TB","GB","MB","KB","b"],c=h=0,i=g.length;h=b){d=a/Math.pow(this.options.filesizeBase,4-c),e=f;break}d=Math.round(10*d)/10}return""+d+" "+e},c.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},c.prototype.drop=function(a){var b,c;a.dataTransfer&&(this.emit("drop",a),b=a.dataTransfer.files,this.emit("addedfiles",b),b.length&&(c=a.dataTransfer.items,c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)))},c.prototype.paste=function(a){var b,c;if(null!=(null!=a&&null!=(c=a.clipboardData)?c.items:void 0))return this.emit("paste",a),b=a.clipboardData.items,b.length?this._addFilesFromItems(b):void 0},c.prototype.handleFiles=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;c1024*this.options.maxFilesize*1024?b(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):c.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(b(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,b):b(this.options.dictInvalidFileType)},c.prototype.addFile=function(a){return a.upload={progress:0,total:a.size,bytesSent:0},this.files.push(a),a.status=c.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return function(c){return c?(a.accepted=!1,b._errorProcessing([a],c)):(a.accepted=!0,b.options.autoQueue&&b.enqueueFile(a)),b._updateMaxFilesReachedClass()}}(this))},c.prototype.enqueueFiles=function(a){var b,c,d;for(c=0,d=a.length;c=b)&&(d=this.getQueuedFiles(),d.length>0)){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,b-c));for(;a=L;k=0<=L?++F:--F)f.append(this._getParamName(k),a[k],a[k].name);return this.submitRequest(w,f,a)},c.prototype.submitRequest=function(a,b,c){return a.send(b)},c.prototype._finished=function(a,b,d){var e,f,g;for(f=0,g=a.length;fj;)b=e[4*(h-1)+3],0===b?f=h:j=h,h=f+j>>1;return i=h/g,0===i?1:i},f=function(a,b,c,d,f,g,h,i,j,k){var l;return l=e(b),a.drawImage(b,c,d,f,g,h,i,j,k/l)},d=function(a,b){var c,d,e,f,g,h,i,j,k;if(e=!1,k=!0,d=a.document,j=d.documentElement,c=d.addEventListener?"addEventListener":"attachEvent",i=d.addEventListener?"removeEventListener":"detachEvent",h=d.addEventListener?"":"on",f=function(c){if("readystatechange"!==c.type||"complete"===d.readyState)return("load"===c.type?a:d)[i](h+c.type,f,!1),!e&&(e=!0)?b.call(a,c.type||c):void 0},g=function(){try{j.doScroll("left")}catch(a){return a,void setTimeout(g,50)}return f("poll")},"complete"!==d.readyState){if(d.createEventObject&&j.doScroll){try{k=!a.frameElement}catch(a){}k&&g()}return d[c](h+"DOMContentLoaded",f,!1),d[c](h+"readystatechange",f,!1),a[c](h+"load",f,!1)}},a._autoDiscoverFunction=function(){if(a.autoDiscover)return a.discover()},d(window,a._autoDiscoverFunction)}).call(this),function(a,b){b.ddh={_dialog:function(b,c,d,e,f){var g={message:b,title:c,buttons:d,size:e||"sm",css:f||"dd-dialog",backdrop:!1,keyboard:!1};"object"==typeof arguments[0]&&(g=a.extend(g,arguments[0]));var h="modal-sm";void 0!==g.size&&(h="modal-"+g.size);var i='',j=a(i);if(void 0!==g.title&&""!==g.title&&a(".modal-title",j).html(g.title),void 0!==g.message&&""!==g.message&&("string"==typeof g.message?a(".modal-body",j).html(g.message):"object"==typeof g.message&&(a(".modal-body",j).html(""),a(".modal-body",j).append(g.message))),g.buttons.length){var k={type:"button",css:["btn btn-default"]};a.each(g.buttons,function(){var b=a.extend({},k,this),c=a(b.html||'");b.attributes&&c.attr(b.attributes),b.action&&c.on("click",a.proxy(b.action,c,j)),a(".modal-footer",j).append(c)})}return a("body").append(j),j.modal({backdrop:g.backdrop,keyboard:g.keyboard}).on("hidden.bs.modal",function(){a(this).remove()}).one("shown.bs.modal",function(){a('.modal-body input[type="text"]',this).length?a('.modal-body input[type="text"]',this).focus():a(".modal-footer .btn-primary",this).focus()}),j},confirm:function(a,b,c,d){void 0!==c&&null!==c||(c=ddh.translate("DD_CONFIRM"));var e="";void 0!==d&&d&&(e=" dd-warn");var f=[{html:'"},{html:'",action:function(a){a.modal("hide"),b.call(this)}}];this._dialog(a,c,f,"sm","dd-modal-confirm"+e)},prompt:function(b,c,d,e){void 0===d&&(d=ddh.translate("DD_CONFIRM")),e=e||"",b+='
';var f=[{html:'"},{html:'",action:function(b){b.modal("hide"),c.call(this,a("input[name=prompt]",b).val())}}],g=this._dialog(b,d,f,"sm","dd-modal-confirm");a("input[name=prompt]",g).on("keypress",function(b){13===b.keyCode&&a(".btn-primary",g).click()})},alert:function(a,b){void 0===b&&(b="Information");var c=[{html:'"}];this._dialog(a,b,c,"sm","dd-modal-confirm")},translate:function(a){return a&&"object"==typeof i18n&&i18n[a]?i18n[a]:a}},a.fn.areaselect=function(){return this.each(function(){a(this).on("change",function(){var b=a(this).data("area-group-value"),c=null;"function"==typeof a().selectize&&this.selectize?(this.selectize.refreshOptions(!1),this.selectize.getValue()&&(c=this.selectize.options[this.selectize.getValue()].area)):c=a(this).val(),b&&a("*[data-area]"+(b?'[data-area-group="'+b+'"]':"")).hide(),c&&a('*[data-area="'+c+'"]').show()}).trigger("change")})}}(jQuery,window),function(a){"use strict";var b=function(){var b=this;a(document).on("keydown",function(a){(a.ctrlKey||224===a.keyCode||91===a.keyCode||93===a.keyCode)&&(b.ctrlKeyPressed=!0)}).on("keyup",function(a){(a.ctrlKey||224===a.keyCode||91===a.keyCode||93===a.keyCode)&&(b.ctrlKeyPressed=!1)}),"undefined"==typeof ddh&&(window.ddh={translate:function(a){return a&&"object"==typeof i18n&&i18n[a]?i18n[a]:a}})};b.VERSION="1.0.0",b.prototype.ctrlKeyPressed=!1,b.prototype.currentPath="",b.prototype.currentFolderId="",b.prototype._actionLink="",b.prototype._resourceLink="",b.prototype.setActionLink=function(a){this._actionLink=decodeURI(a)},b.prototype.setResourceLink=function(a){this._resourceLink=decodeURI(a)},b.prototype._loadItemDetails=function(b,c){var d=this;void 0===b&&(b=!1),void 0===c&&(c=a(".dd-media").first().closest(".modal"));var e=a(".dd-media-details-form",c);if(b){b.preview?(a(".dd-media-details-preview-icon",e).hide(),a(".dd-media-details-dir-icon",e).hide(),a(".dd-media-details-preview",e).attr("src",b.preview).show(),a(".dd-media-url",e).show()):("directory"==b.filetype?(a(".dd-media-details-dir-icon",e).show(),a(".dd-media-details-preview-icon",e).hide(),a(".dd-media-url",e).hide()):(a(".dd-media-details-dir-icon",e).hide(),a(".dd-media-details-preview-icon",e).show(),a(".dd-media-url",e).show()),a(".dd-media-details-preview",e).hide());var f=b.imagesize?(b.imagesize?b.imagesize+" | ":"")+d._formatFileSize(b.filesize):"";a(".dd-media-details-name",e).text(b.file),a(".dd-media-details-infos",e).text(f),a(".dd-media-details-input-url",e).val(b.url),a(".dd-media-details-link-url",e).attr("href",b.url),e.show()}else e.hide()},b.prototype._formatFileSize=function(a){a=parseInt(a);for(var b=["tb","gb","mb","kb","b"];a>1024&&b.length;)a=Math.round(a/1024*100)/100,b.pop();return a+" "+b.pop()},b.prototype._makeItemMovable=function(b){var c=this._actionLink;"directory"!=b.data("filetype")?a(b).draggable({revert:"invalid",helper:function(b){var c=a(b.target).hasClass("ui-draggable")?a(b.target):a(b.target).closest(".ui-draggable");return c.clone().css({width:c.width(),height:c.height()})},zIndex:100,opacity:.7,start:function(b,c){a(c.helper).addClass("ui-draggable-helper")}}):"directory"==b.data("filetype")&&a(b).droppable({hoverClass:"ui-state-hover",drop:function(b,d){if(d.draggable.length){var e=a(d.draggable),f=e.data("id"),g=e.data("file"),h=a(this).data("id"),i=a(this).data("file"),j=e.data("thumb");f&&h&&a.post(c+"cl=ddoemedia_view&fnc=movefile",{sourceid:f,targetid:h,file:g,folder:i,thumb:j},function(a){a.success?e.parent().remove():a.msg&&ddh.alert(ddh.translate(a.msg))})}}})},b.prototype.open=function(b){var c=(this._actionLink,null),d=!1,e=this;2===arguments.length?("string"==typeof arguments[0]||arguments[0]instanceof RegExp?c=arguments[0]:"boolean"==typeof arguments[0]&&(d=arguments[0]),b=arguments[1]):3===arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof RegExp?(c=arguments[0],d=arguments[1]):"boolean"==typeof arguments[0]&&(d=arguments[0],c=arguments[1]),b=arguments[2]);var f=[{label:ddh.translate("DD_CANCEL"),attributes:{"data-dismiss":"modal"}},{label:ddh.translate("DD_APPLY"),css:["btn btn-primary dd-media-submit"],action:function(f){var g=a(".dd-media-item.active",f),h=a(".dd-media",f).data("foldername");if(g.length){if("function"==typeof b){var i=!1,j=[];if(g.each(function(){var b=a(this).data("filetype");null!==c&&("string"==typeof c&&c!==b||c instanceof RegExp&&!b.match(c))?i=!0:j.push({id:a(this).data("id"),file:(h?h+"/":"")+a(this).data("file"),url:e._resourceLink+a(this).data("file"),type:b})}),i)return void ddh.alert(ddh.translate("DD_MEDIA_FILETYPE_NOT_ALLOWED"));if(d)b.call(f,j);else if(j.length){var k=j[0];b.call(f,k.id,k.file,k.url,k.type)}else b.call(f,!1)}f.modal("hide")}}}];d&&f.unshift({html:''+ddh.translate("DD_MEDIA_MULTIPLE_INFO")+"",css:["dd-media-multiple-info"]});var g=ddh._dialog({title:ddh.translate("DD_MEDIA_DIALOG"),message:'
',buttons:f,size:"lg",backdrop:!0});g.data("media-options",{multiple:d,filter:c}),this._loadMediaContent(g)},b.prototype.init=function(b){var c=(this._actionLink,this._resourceLink,null),d=!1,e=this;2===arguments.length?("string"==typeof arguments[0]||arguments[0]instanceof RegExp?c=arguments[0]:"boolean"==typeof arguments[0]&&(d=arguments[0]),b=arguments[1]):3===arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof RegExp?(c=arguments[0],d=arguments[1]):"boolean"==typeof arguments[0]&&(d=arguments[0],c=arguments[1]),b=arguments[2]);var f=a(".dd-media-wrapper");f.data("media-options",{multiple:d,filter:c}),top.basefrm&&top.basefrm.OverlayInstance&&top.basefrm.OverlayInstance.onContentLoad(function(){var g=this;a(".dd-overlay-dialog-footer .dd-overlay-dialog-apply",g.$overlay).length&&a(".dd-overlay-dialog-footer .dd-overlay-dialog-apply",g.$overlay).remove(),"function"!=typeof b&&g.overlayContext&&(b=function(a,b,c){g.overlayContext.invoke("editor.insertImage",c,function(a){a.css("max-width","100%"),a.attr("data-filename",b),a.attr("data-filepath",c),a.attr("data-source","media"),a.addClass("dd-wysiwyg-media-image")})});var h=a('");h.on("click",function(h){h.preventDefault();var i=a(".dd-media-item.active",f);if(i.length){if("function"==typeof b){var j=!1,k=[],l=a(".dd-media",f).data("foldername");if(i.each(function(){var b=a(this).data("filetype");null!==c&&("string"==typeof c&&c!==b||c instanceof RegExp&&!b.match(c))?j=!0:k.push({id:a(this).data("id"),file:(l?l+"/":"")+a(this).data("file"),url:e._resourceLink+a(this).data("file"),type:b})}),j)return void ddh.alert(ddh.translate("DD_MEDIA_FILETYPE_NOT_ALLOWED"));if(d)b.call(f,k);else if(k.length){var m=k[0];b.call(f,m.id,m.file,m.url,m.type)}else b.call(f,!1)}g.hideOverlay()}}),a(".dd-overlay-dialog-footer",g.$overlay).prepend(h)}),this._loadMediaContent(f)},b.prototype.refreshMedia=function(b){var c=a(".dd-media");if(c.length){var d,e=c.closest(".modal");a(".dd-media-tabs .tab-pane.active").length&&(d=a(".dd-media-tabs .tab-pane.active").attr("id")),e.length?a(".modal-body",e).html('
'):(e=a(".dd-media-wrapper"),a(".dd-content",e).html('
')),this._loadMediaContent(e,b,d)}},b.prototype.addMediaItem=function(b,c,d,e,f,g){var h=(this._resourceLink,this),i=a(".dd-media-list-items .dd-media-dz-helper > div").clone();a(".dd-media-item",i).data({id:b,file:c,filetype:d,filesize:e,imagesize:g}),f&&void 0!==f?(a(".dd-media-thumb",i).attr("src",f),a(".dd-media-item",i).removeClass("no-thumb")):(a(".dd-media-thumb",i).hide(),"directory"==d?(a(".dd-media-icon-file",i).hide(),a(".dd-media-icon-folder",i).show()):(a(".dd-media-icon-file",i).show(),a(".dd-media-icon-folder",i).hide()),a(".dd-media-item",i).addClass("no-thumb")),a(".dd-media-item-label",i).show().find("span").text(c),a(".dd-media-list-items > .row").append(i),h._makeItemMovable(a(".dd-media-item",i))},b.prototype._loadMediaContent=function(b,c,d){var e=this._actionLink,f=this._resourceLink,g=this,h=b.data("media-options"),i="";void 0!==d&&d&&(i+="&tab="+d),void 0!==c&&c&&(i+="&folderid="+c),a.get(e+"cl=ddoemedia_view"+i,function(d){b.is(".dd-media-wrapper")?a(".dd-content",b).html(d):a(".modal-body",b).html(d),g.currentFolderId=a(".dd-media",b).data("folderid"),f=a(".dd-media",b).data("medialink"),g.setResourceLink(f),g.currentPath=f.substr(f.indexOf("out/pictures/")+"out/pictures/".length),a(".dd-media-item[data-id]",b).each(function(){g._makeItemMovable(a(this))}),a(".dd-media-remove-action, .dd-media-move-action, .dd-media-rename-action",b).prop("disabled",!0),a(".dd-media-folder-action",b).on("click",function(){ddh.prompt(ddh.translate("DD_MEDIA_ADD_FOLDER"),function(c){a.ajax({type:"POST",url:e+"cl=ddoemedia_view&fnc=addFolder",data:{name:c},success:function(c){c.id&&(g.addMediaItem(c.id,c.name,"directory",0,null,""),a(".dd-media-list",b).removeClass("empty"),a(".dd-media-file-count",b).text(parseInt(a(".dd-media-file-count",b).text())+1))},error:function(a,b,c){ddh.alert(ddh.translate(c))}})})}),c?(a(".dd-media-folder-action").hide(),a(".dd-media-folder-up-action",b).on("click",function(){g.refreshMedia()})):a(".dd-media-folder-up-action",b).prop("disabled",!0),a(".dd-media-remove-action",b).on("click",function(){var c=a(".dd-media-item.active",b),d=this;if(!a(d).prop("disabled")&&c.length){var f="DD_MEDIA_REMOVE_CONFIRM";c.length>1?f="DD_MEDIA_REMOVE_MANY_CONFIRM":"directory"==c.data("filetype")&&(f="DD_MEDIA_REMOVE_FOLDER_CONFIRM"),ddh.confirm(ddh.translate(f),function(){c.addClass("dd-media-item-removing");var f=[];c.each(function(){f.push(a(this).data("id"))});var g=a(".dd-media",b).data("folderid");a.get(e+"cl=ddoemedia_view&fnc=remove&ids[]="+f.join("&ids[]=")+"&folderid="+g,function(e){e.success?(a(".dd-media-file-count",b).text(parseInt(a(".dd-media-file-count",b).text(),10)-c.length),c.each(function(){a(this).parent().remove()}),a(d).prop("disabled",!0),a(".dd-media-list-items > .row > .dd-media-col",b).length||a(".dd-media-list",b).addClass("empty"),a(".dd-media-details-form",b).hide()):e.msg&&(c.each(function(){a(this).removeClass("dd-media-item-removing")}),ddh.alert(ddh.translate(e.msg)))})},null,!0)}}),a(".dd-media-rename-action",b).on("click",function(){var c=a(".dd-media-item.active",b);a(this).prop("disabled")||1!=c.length||ddh.prompt(ddh.translate("DD_MEDIA_RENAME_FILE_FOLDER"),function(c){var d=a(".dd-media-item.active",b);c!=d.data("file")&&a.ajax({type:"POST",url:e+"cl=ddoemedia_view&fnc=rename",data:{newname:c,id:d.data("id")},success:function(c){d.data("file",c.name),d.data("id",c.id),d.data("url",f+c.name),a(".dd-media-item-label span",d).text(c.name),g._loadItemDetails(d.data(),b)},error:function(a,b,c){ddh.alert(ddh.translate(c))}})},void 0,c.data("file"))}),a(".dd-media",b).on("click",".dd-media-item",function(c){if(c.preventDefault(),!a(this).parent(".dz-error").length){h&&h.multiple&&g.ctrlKeyPressed?a(this).toggleClass("active"):(a(".dd-media-item",b).removeClass("active"),a(this).addClass("active"));var d=null;if((d=a(this).hasClass("active")?a(this):a(this).parent().siblings().find(".dd-media-item.active").first())&&d.length){var e=d.data();e.url=f+d.data("file"),e.type=e.filetype,e.size=e.filesize,a(".dd-media-thumb",d).length&&(e.preview=a(".dd-media-thumb",d).attr("src")),g._loadItemDetails(e,b)}var i=a(".dd-media-list-items > .row > .dd-media-col > .active",b);i.length?i.length>1?(a(".dd-media-remove-action, .dd-media-move-action").prop("disabled",!1),a(".dd-media-rename-action").prop("disabled",!0)):a(".dd-media-remove-action, .dd-media-move-action, .dd-media-rename-action").prop("disabled",!1):(g._loadItemDetails(!1,b),a(".dd-media-remove-action, .dd-media-move-action, .dd-media-rename-action").prop("disabled",!0))}}).on("dblclick",".dd-media-item",function(c){c.preventDefault(),"directory"==a(this).data("filetype")?g.refreshMedia(a(this).data("id")):a(".dd-media-submit",b).trigger("click")}),a(".dd-media",b).dropzone({url:e+"cl=ddoemedia_view&fnc=upload&folderid="+a(".dd-media",b).data("folderid"),parallelUploads:10,previewsContainer:a(".dd-media-list-items > .row",b)[0],previewTemplate:a(".dd-media-list-items .dd-media-dz-helper",b).html(),clickable:a(".dd-media-upload",b)[0],init:function(){this.on("addedfile",function(){a(".dd-media-list",b).removeClass("empty"),a('.dd-media-tabs .nav-tabs a[href="#mediaList"]',b).tab("show"),a(".dd-media-list-items",b).scrollTop(a(".dd-media-list-items > .row",b).height())}),this.on("success",function(c,d){a(".dd-media-item",c.previewElement).find(".dd-media-thumb").attr("src",d.thumb),a(".dd-media-item",c.previewElement).data({id:d.id,file:d.file,filetype:d.filetype,filesize:d.filesize,imagesize:d.imagesize||null,thumb:d.thumb}).trigger("click"),g._makeItemMovable(a(".dd-media-item",c.previewElement)),a(".dd-media-file-count",b).text(parseInt(a(".dd-media-file-count",b).text())+1)}),this.on("complete",function(b){b.type.match(/image\.*/)||(a(".dd-media-thumb",b.previewElement).hide(),a(".dd-media-icon-file",b.previewElement).show(),a(".dd-media-icon-folder",b.previewElement).hide(),a(".dd-media-item",b.previewElement).addClass("no-thumb")),a(".dd-media-item-label",b.previewElement).show()})},error:function(b,c,d){a(b.previewElement).addClass("dz-error").find(".dd-media-item-error").show().text(ddh.translate(c.error))}}),a(".dd-media-search-form").on("submit",function(a){return a.preventDefault(),!1}),a(".dd-media-search-form input").on("keyup",function(c){c.preventDefault();var d=a(this).val();""===d?a(".dd-media-list-items > .row > .dd-media-col",b).show():a(".dd-media-list-items > .row > .dd-media-col",b).each(function(){a(".dd-media-item",this).data("file").search(d)>-1?a(this).show():a(this).hide()})}),g._loadMoreMediaContent(0)})},b.prototype._loadMoreMediaContent=function(b){var c=this._actionLink,d=18*b,e=this;a.get(c+"cl=ddoemedia_view&fnc=moreFiles&start="+d+"&folderid="+a(".dd-media").data("folderid"),function(c){c.files&&c.files.length&&a.each(c.files,function(){e.addMediaItem(this.id,this.file,this.filetype,this.filesize,this.thumb||!1,this.imageSize||null)}),c.more&&e._loadMoreMediaContent(b+1)})},window.MediaLibrary=new b}(jQuery); +"undefined"!=typeof module&&null!==module?module.exports=a:window.Dropzone=a,a.ADDED="added",a.QUEUED="queued",a.ACCEPTED=a.QUEUED,a.UPLOADING="uploading",a.PROCESSING=a.UPLOADING,a.CANCELED="canceled",a.ERROR="error",a.SUCCESS="success",e=function(a){var b,c,d,e,f,g,h,i,j;for(a.naturalWidth,g=a.naturalHeight,c=document.createElement("canvas"),c.width=1,c.height=g,d=c.getContext("2d"),d.drawImage(a,0,0),e=d.getImageData(0,0,1,g).data,j=0,f=g,h=g;h>j;)b=e[4*(h-1)+3],0===b?f=h:j=h,h=f+j>>1;return i=h/g,0===i?1:i},f=function(a,b,c,d,f,g,h,i,j,k){var l;return l=e(b),a.drawImage(b,c,d,f,g,h,i,j,k/l)},d=function(a,b){var c,d,e,f,g,h,i,j,k;if(e=!1,k=!0,d=a.document,j=d.documentElement,c=d.addEventListener?"addEventListener":"attachEvent",i=d.addEventListener?"removeEventListener":"detachEvent",h=d.addEventListener?"":"on",f=function(c){if("readystatechange"!==c.type||"complete"===d.readyState)return("load"===c.type?a:d)[i](h+c.type,f,!1),!e&&(e=!0)?b.call(a,c.type||c):void 0},g=function(){try{j.doScroll("left")}catch(a){return a,void setTimeout(g,50)}return f("poll")},"complete"!==d.readyState){if(d.createEventObject&&j.doScroll){try{k=!a.frameElement}catch(a){}k&&g()}return d[c](h+"DOMContentLoaded",f,!1),d[c](h+"readystatechange",f,!1),a[c](h+"load",f,!1)}},a._autoDiscoverFunction=function(){if(a.autoDiscover)return a.discover()},d(window,a._autoDiscoverFunction)}).call(this),function(a,b){b.ddh={_dialog:function(b,c,d,e,f){var g={message:b,title:c,buttons:d,size:e||"sm",css:f||"dd-dialog",backdrop:!1,keyboard:!1};"object"==typeof arguments[0]&&(g=a.extend(g,arguments[0]));var h="modal-sm";void 0!==g.size&&(h="modal-"+g.size);var i='',j=a(i);if(void 0!==g.title&&""!==g.title&&a(".modal-title",j).html(g.title),void 0!==g.message&&""!==g.message&&("string"==typeof g.message?a(".modal-body",j).html(g.message):"object"==typeof g.message&&(a(".modal-body",j).html(""),a(".modal-body",j).append(g.message))),g.buttons.length){var k={type:"button",css:["btn btn-default"]};a.each(g.buttons,function(){var b=a.extend({},k,this),c=a(b.html||'");b.attributes&&c.attr(b.attributes),b.action&&c.on("click",a.proxy(b.action,c,j)),a(".modal-footer",j).append(c)})}return a("body").append(j),j.modal({backdrop:g.backdrop,keyboard:g.keyboard}).on("hidden.bs.modal",function(){a(this).remove()}).one("shown.bs.modal",function(){a('.modal-body input[type="text"]',this).length?a('.modal-body input[type="text"]',this).focus():a(".modal-footer .btn-primary",this).focus()}),j},confirm:function(a,b,c,d){void 0!==c&&null!==c||(c=ddh.translate("DD_CONFIRM"));var e="";void 0!==d&&d&&(e=" dd-warn");var f=[{html:'"},{html:'",action:function(a){a.modal("hide"),b.call(this)}}];this._dialog(a,c,f,"sm","dd-modal-confirm"+e)},prompt:function(b,c,d,e){void 0===d&&(d=ddh.translate("DD_CONFIRM")),e=e||"",b+='
';var f=[{html:'"},{html:'",action:function(b){b.modal("hide"),c.call(this,a("input[name=prompt]",b).val())}}],g=this._dialog(b,d,f,"sm","dd-modal-confirm");a("input[name=prompt]",g).on("keypress",function(b){13===b.keyCode&&a(".btn-primary",g).click()})},alert:function(a,b){void 0===b&&(b="Information");var c=[{html:'"}];this._dialog(a,b,c,"sm","dd-modal-confirm")},translate:function(a){return a&&"object"==typeof i18n&&i18n[a]?i18n[a]:a}},a.fn.areaselect=function(){return this.each(function(){a(this).on("change",function(){var b=a(this).data("area-group-value"),c=null;"function"==typeof a().selectize&&this.selectize?(this.selectize.refreshOptions(!1),this.selectize.getValue()&&(c=this.selectize.options[this.selectize.getValue()].area)):c=a(this).val(),b&&a("*[data-area]"+(b?'[data-area-group="'+b+'"]':"")).hide(),c&&a('*[data-area="'+c+'"]').show()}).trigger("change")})}}(jQuery,window),function(a){"use strict";var b=function(){var b=this;a(document).on("keydown",function(a){(a.ctrlKey||224===a.keyCode||91===a.keyCode||93===a.keyCode)&&(b.ctrlKeyPressed=!0)}).on("keyup",function(a){(a.ctrlKey||224===a.keyCode||91===a.keyCode||93===a.keyCode)&&(b.ctrlKeyPressed=!1)}),"undefined"==typeof ddh&&(window.ddh={translate:function(a){return a&&"object"==typeof i18n&&i18n[a]?i18n[a]:a}})};b.VERSION="1.0.0",b.prototype.ctrlKeyPressed=!1,b.prototype.currentPath="",b.prototype.currentFolderId="",b.prototype._actionLink="",b.prototype._resourceLink="",b.prototype.setActionLink=function(a){this._actionLink=decodeURI(a)},b.prototype.setResourceLink=function(a){this._resourceLink=decodeURI(a)},b.prototype._loadItemDetails=function(b,c){var d=this;void 0===b&&(b=!1),void 0===c&&(c=a(".dd-media").first().closest(".modal"));var e=a(".dd-media-details-form",c);if(b){b.preview?(a(".dd-media-details-preview-icon",e).hide(),a(".dd-media-details-dir-icon",e).hide(),a(".dd-media-details-preview",e).attr("src",b.preview).show(),a(".dd-media-url",e).show()):("directory"==b.filetype?(a(".dd-media-details-dir-icon",e).show(),a(".dd-media-details-preview-icon",e).hide(),a(".dd-media-url",e).hide()):(a(".dd-media-details-dir-icon",e).hide(),a(".dd-media-details-preview-icon",e).show(),a(".dd-media-url",e).show()),a(".dd-media-details-preview",e).hide());var f=b.imagesize?(b.imagesize?b.imagesize+" | ":"")+d._formatFileSize(b.filesize):"";a(".dd-media-details-name",e).text(b.file),a(".dd-media-details-infos",e).text(f),a(".dd-media-details-input-url",e).val(b.url),a(".dd-media-details-link-url",e).attr("href",b.url),e.show()}else e.hide()},b.prototype._formatFileSize=function(a){a=parseInt(a);for(var b=["tb","gb","mb","kb","b"];a>1024&&b.length;)a=Math.round(a/1024*100)/100,b.pop();return a+" "+b.pop()},b.prototype._makeItemMovable=function(b){var c=this._actionLink;"directory"!=b.data("filetype")?a(b).draggable({revert:"invalid",helper:function(b){var c=a(b.target).hasClass("ui-draggable")?a(b.target):a(b.target).closest(".ui-draggable");return c.clone().css({width:c.width(),height:c.height()})},zIndex:100,opacity:.7,start:function(b,c){a(c.helper).addClass("ui-draggable-helper")}}):"directory"==b.data("filetype")&&a(b).droppable({hoverClass:"ui-state-hover",drop:function(b,d){if(d.draggable.length){var e=a(d.draggable),f=e.data("id"),g=e.data("file"),h=a(this).data("id"),i=a(this).data("file"),j=e.data("thumb");f&&h&&a.post(c+"cl=ddoemedia_view&fnc=movefile",{sourceid:f,targetid:h,file:g,folder:i,thumb:j},function(a){a.success?e.parent().remove():a.msg&&ddh.alert(ddh.translate(a.msg))})}}})},b.prototype.open=function(b){var c=(this._actionLink,null),d=!1,e=this;2===arguments.length?("string"==typeof arguments[0]||arguments[0]instanceof RegExp?c=arguments[0]:"boolean"==typeof arguments[0]&&(d=arguments[0]),b=arguments[1]):3===arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof RegExp?(c=arguments[0],d=arguments[1]):"boolean"==typeof arguments[0]&&(d=arguments[0],c=arguments[1]),b=arguments[2]);var f=[{label:ddh.translate("DD_CANCEL"),attributes:{"data-dismiss":"modal"}},{label:ddh.translate("DD_APPLY"),css:["btn btn-primary dd-media-submit"],action:function(f){var g=a(".dd-media-item.active",f),h=a(".dd-media",f).data("foldername");if(g.length){if("function"==typeof b){var i=!1,j=[];if(g.each(function(){var b=a(this).data("filetype");null!==c&&("string"==typeof c&&c!==b||c instanceof RegExp&&!b.match(c))?i=!0:j.push({id:a(this).data("id"),file:(h?h+"/":"")+a(this).data("file"),url:e._resourceLink+a(this).data("file"),type:b})}),i)return void ddh.alert(ddh.translate("DD_MEDIA_FILETYPE_NOT_ALLOWED"));if(d)b.call(f,j);else if(j.length){var k=j[0];b.call(f,k.id,k.file,k.url,k.type)}else b.call(f,!1)}f.modal("hide")}}}];d&&f.unshift({html:''+ddh.translate("DD_MEDIA_MULTIPLE_INFO")+"",css:["dd-media-multiple-info"]});var g=ddh._dialog({title:ddh.translate("DD_MEDIA_DIALOG"),message:'
',buttons:f,size:"lg",backdrop:!0});g.data("media-options",{multiple:d,filter:c}),this._loadMediaContent(g)},b.prototype.init=function(b){var c=(this._actionLink,this._resourceLink,null),d=!1,e=this;2===arguments.length?("string"==typeof arguments[0]||arguments[0]instanceof RegExp?c=arguments[0]:"boolean"==typeof arguments[0]&&(d=arguments[0]),b=arguments[1]):3===arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof RegExp?(c=arguments[0],d=arguments[1]):"boolean"==typeof arguments[0]&&(d=arguments[0],c=arguments[1]),b=arguments[2]);var f=a(".dd-media-wrapper");f.data("media-options",{multiple:d,filter:c}),top.basefrm&&top.basefrm.OverlayInstance&&top.basefrm.OverlayInstance.onContentLoad(function(){var g=this;a(".dd-overlay-dialog-footer .dd-overlay-dialog-apply",g.$overlay).length&&a(".dd-overlay-dialog-footer .dd-overlay-dialog-apply",g.$overlay).remove(),"function"!=typeof b&&g.overlayContext&&(b=function(a,b,c){g.overlayContext.invoke("editor.insertImage",c,function(a){a.css("max-width","100%"),a.attr("data-filename",b),a.attr("data-filepath",c),a.attr("data-source","media"),a.addClass("dd-wysiwyg-media-image")})});var h=a('");h.on("click",function(h){h.preventDefault();var i=a(".dd-media-item.active",f);if(i.length){if("function"==typeof b){var j=!1,k=[],l=a(".dd-media",f).data("foldername");if(i.each(function(){var b=a(this).data("filetype");null!==c&&("string"==typeof c&&c!==b||c instanceof RegExp&&!b.match(c))?j=!0:k.push({id:a(this).data("id"),file:(l?l+"/":"")+a(this).data("file"),url:e._resourceLink+a(this).data("file"),type:b})}),j)return void ddh.alert(ddh.translate("DD_MEDIA_FILETYPE_NOT_ALLOWED"));if(d)b.call(f,k);else if(k.length){var m=k[0];b.call(f,m.id,m.file,m.url,m.type)}else b.call(f,!1)}g.hideOverlay()}}),a(".dd-overlay-dialog-footer",g.$overlay).prepend(h)}),this._loadMediaContent(f)},b.prototype.refreshMedia=function(b){var c=a(".dd-media");if(c.length){var d,e=c.closest(".modal");a(".dd-media-tabs .tab-pane.active").length&&(d=a(".dd-media-tabs .tab-pane.active").attr("id")),e.length?a(".modal-body",e).html('
'):(e=a(".dd-media-wrapper"),a(".dd-content",e).html('
')),this._loadMediaContent(e,b,d)}},b.prototype.addMediaItem=function(b,c,d,e,f,g){var h=(this._resourceLink,this),i=a(".dd-media-list-items .dd-media-dz-helper > div").clone();a(".dd-media-item",i).data({id:b,file:c,filetype:d,filesize:e,imagesize:g}),f&&void 0!==f?(a(".dd-media-thumb",i).attr("src",f),a(".dd-media-item",i).removeClass("no-thumb")):(a(".dd-media-thumb",i).hide(),"directory"==d?(a(".dd-media-icon-file",i).hide(),a(".dd-media-icon-folder",i).show()):(a(".dd-media-icon-file",i).show(),a(".dd-media-icon-folder",i).hide()),a(".dd-media-item",i).addClass("no-thumb")),a(".dd-media-item-label",i).show().find("span").text(c),a(".dd-media-list-items > .row").append(i),h._makeItemMovable(a(".dd-media-item",i))},b.prototype._loadMediaContent=function(b,c,d){var e=this._actionLink,f=this._resourceLink,g=this,h=b.data("media-options"),i="";void 0!==d&&d&&(i+="&tab="+d),void 0!==c&&c&&(i+="&folderid="+c),a.get(e+"cl=ddoemedia_view"+i,function(d){b.is(".dd-media-wrapper")?a(".dd-content",b).html(d):a(".modal-body",b).html(d),g.currentFolderId=a(".dd-media",b).data("folderid"),f=a(".dd-media",b).data("medialink"),g.setResourceLink(f),g.currentPath=f.substr(f.indexOf("out/pictures/")+"out/pictures/".length),a(".dd-media-item[data-id]",b).each(function(){g._makeItemMovable(a(this))}),a(".dd-media-remove-action, .dd-media-move-action, .dd-media-rename-action",b).prop("disabled",!0),a(".dd-media-folder-action",b).on("click",function(){ddh.prompt(ddh.translate("DD_MEDIA_ADD_FOLDER"),function(c){a.ajax({type:"POST",url:e+"cl=ddoemedia_view&fnc=addFolder",data:{name:c},success:function(c){c.id&&(g.addMediaItem(c.id,c.name,"directory",0,null,""),a(".dd-media-list",b).removeClass("empty"),a(".dd-media-file-count",b).text(parseInt(a(".dd-media-file-count",b).text())+1))},error:function(a,b,c){ddh.alert(ddh.translate(c))}})})}),c?(a(".dd-media-folder-action").hide(),a(".dd-media-folder-up-action",b).on("click",function(){g.refreshMedia()})):a(".dd-media-folder-up-action",b).prop("disabled",!0),a(".dd-media-remove-action",b).on("click",function(){var c=a(".dd-media-item.active",b),d=this;if(!a(d).prop("disabled")&&c.length){var f="DD_MEDIA_REMOVE_CONFIRM";c.length>1?f="DD_MEDIA_REMOVE_MANY_CONFIRM":"directory"==c.data("filetype")&&(f="DD_MEDIA_REMOVE_FOLDER_CONFIRM"),ddh.confirm(ddh.translate(f),function(){c.addClass("dd-media-item-removing");var f=[];c.each(function(){f.push(a(this).data("id"))});var g=a(".dd-media",b).data("folderid");a.get(e+"cl=ddoemedia_view&fnc=remove&ids[]="+f.join("&ids[]=")+"&folderid="+g,function(e){e.success?(a(".dd-media-file-count",b).text(parseInt(a(".dd-media-file-count",b).text(),10)-c.length),c.each(function(){a(this).parent().remove()}),a(d).prop("disabled",!0),a(".dd-media-list-items > .row > .dd-media-col",b).length||a(".dd-media-list",b).addClass("empty"),a(".dd-media-details-form",b).hide()):e.msg&&(c.each(function(){a(this).removeClass("dd-media-item-removing")}),ddh.alert(ddh.translate(e.msg)))})},null,!0)}}),a(".dd-media-rename-action",b).on("click",function(){var c=a(".dd-media-item.active",b);a(this).prop("disabled")||1!=c.length||ddh.prompt(ddh.translate("DD_MEDIA_RENAME_FILE_FOLDER"),function(c){var d=a(".dd-media-item.active",b);c!=d.data("file")&&a.ajax({type:"POST",url:e+"cl=ddoemedia_view&fnc=rename",data:{newname:c,id:d.data("id")},success:function(c){d.data("file",c.name),d.data("id",c.id),d.data("url",f+c.name),a(".dd-media-item-label span",d).text(c.name),g._loadItemDetails(d.data(),b)},error:function(a,b,c){ddh.alert(ddh.translate(a.responseJSON.error))}})},void 0,c.data("file"))}),a(".dd-media",b).on("click",".dd-media-item",function(c){if(c.preventDefault(),!a(this).parent(".dz-error").length){h&&h.multiple&&g.ctrlKeyPressed?a(this).toggleClass("active"):(a(".dd-media-item",b).removeClass("active"),a(this).addClass("active"));var d=null;if((d=a(this).hasClass("active")?a(this):a(this).parent().siblings().find(".dd-media-item.active").first())&&d.length){var e=d.data();e.url=f+d.data("file"),e.type=e.filetype,e.size=e.filesize,a(".dd-media-thumb",d).length&&(e.preview=a(".dd-media-thumb",d).attr("src")),g._loadItemDetails(e,b)}var i=a(".dd-media-list-items > .row > .dd-media-col > .active",b);i.length?i.length>1?(a(".dd-media-remove-action, .dd-media-move-action").prop("disabled",!1),a(".dd-media-rename-action").prop("disabled",!0)):a(".dd-media-remove-action, .dd-media-move-action, .dd-media-rename-action").prop("disabled",!1):(g._loadItemDetails(!1,b),a(".dd-media-remove-action, .dd-media-move-action, .dd-media-rename-action").prop("disabled",!0))}}).on("dblclick",".dd-media-item",function(c){c.preventDefault(),"directory"==a(this).data("filetype")?g.refreshMedia(a(this).data("id")):a(".dd-media-submit",b).trigger("click")}),a(".dd-media",b).dropzone({url:e+"cl=ddoemedia_view&fnc=upload&folderid="+a(".dd-media",b).data("folderid"),parallelUploads:10,previewsContainer:a(".dd-media-list-items > .row",b)[0],previewTemplate:a(".dd-media-list-items .dd-media-dz-helper",b).html(),clickable:a(".dd-media-upload",b)[0],init:function(){this.on("addedfile",function(){a(".dd-media-list",b).removeClass("empty"),a('.dd-media-tabs .nav-tabs a[href="#mediaList"]',b).tab("show"),a(".dd-media-list-items",b).scrollTop(a(".dd-media-list-items > .row",b).height())}),this.on("success",function(c,d){a(".dd-media-item",c.previewElement).find(".dd-media-thumb").attr("src",d.thumb),a(".dd-media-item",c.previewElement).data({id:d.id,file:d.file,filetype:d.filetype,filesize:d.filesize,imagesize:d.imagesize||null,thumb:d.thumb}).trigger("click"),g._makeItemMovable(a(".dd-media-item",c.previewElement)),a(".dd-media-file-count",b).text(parseInt(a(".dd-media-file-count",b).text())+1)}),this.on("complete",function(b){b.type.match(/image\.*/)||(a(".dd-media-thumb",b.previewElement).hide(),a(".dd-media-icon-file",b.previewElement).show(),a(".dd-media-icon-folder",b.previewElement).hide(),a(".dd-media-item",b.previewElement).addClass("no-thumb")),a(".dd-media-item-label",b.previewElement).show()})},error:function(b,c,d){a(b.previewElement).addClass("dz-error").find(".dd-media-item-error").show().text(ddh.translate(c.error))}}),a(".dd-media-search-form").on("submit",function(a){return a.preventDefault(),!1}),a(".dd-media-search-form input").on("keyup",function(c){c.preventDefault();var d=a(this).val();""===d?a(".dd-media-list-items > .row > .dd-media-col",b).show():a(".dd-media-list-items > .row > .dd-media-col",b).each(function(){a(".dd-media-item",this).data("file").search(d)>-1?a(this).show():a(this).hide()})}),g._loadMoreMediaContent(0)})},b.prototype._loadMoreMediaContent=function(b){var c=this._actionLink,d=18*b,e=this;a.get(c+"cl=ddoemedia_view&fnc=moreFiles&start="+d+"&folderid="+a(".dd-media").data("folderid"),function(c){c.files&&c.files.length&&a.each(c.files,function(){e.addMediaItem(this.id,this.file,this.filetype,this.filesize,this.thumb||!1,this.imageSize||null)}),c.more&&e._loadMoreMediaContent(b+1)})},window.MediaLibrary=new b}(jQuery); //# sourceMappingURL=base.min.js.map \ No newline at end of file diff --git a/assets/out/src/js/base.min.js.map b/assets/out/src/js/base.min.js.map index 07a87fd..e98b423 100644 --- a/assets/out/src/js/base.min.js.map +++ b/assets/out/src/js/base.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../../../../build/vendor/dropzone/js/dropzone.js","../../../../build/js/base/helper.js","../../../../build/js/base/medialibrary.js"],"names":["Dropzone","Emitter","camelize","contentLoaded","detectVerticalSquash","drawImageIOSFix","noop","without","__slice","slice","__hasProp","hasOwnProperty","__extends","child","parent","ctor","this","constructor","key","call","prototype","__super__","addEventListener","on","event","fn","_callbacks","push","emit","args","callback","callbacks","_i","_len","arguments","length","apply","removeListener","off","removeAllListeners","removeEventListener","i","splice","_super","element","options","elementOptions","fallback","_ref","version","defaultOptions","previewTemplate","replace","clickableElements","listeners","files","document","querySelector","nodeType","Error","dropzone","instances","optionsForElement","extend","forceFallback","isBrowserSupported","url","getAttribute","acceptedFiles","acceptedMimeTypes","method","toUpperCase","getExistingFallback","parentNode","removeChild","previewsContainer","getElement","clickable","getElements","init","resolveOption","events","withCredentials","parallelUploads","uploadMultiple","maxFilesize","paramName","createImageThumbnails","maxThumbnailFilesize","thumbnailWidth","thumbnailHeight","filesizeBase","maxFiles","params","ignoreHiddenFiles","autoProcessQueue","autoQueue","addRemoveLinks","hiddenInputContainer","capture","dictDefaultMessage","dictFallbackMessage","dictFallbackText","dictFileTooBig","dictInvalidFileType","dictResponseError","dictCancelUpload","dictCancelUploadConfirmation","dictRemoveFile","dictRemoveFileConfirmation","dictMaxFilesExceeded","accept","file","done","messageElement","span","className","getElementsByTagName","test","createElement","appendChild","textContent","innerText","getFallbackForm","resize","info","srcRatio","trgRatio","srcX","srcY","srcWidth","width","srcHeight","height","optWidth","optHeight","trgHeight","trgWidth","drop","e","classList","remove","dragstart","dragend","dragenter","add","dragover","dragleave","paste","reset","addedfile","node","removeFileEvent","removeLink","_j","_k","_len1","_len2","_ref1","_ref2","_results","previewElement","trim","querySelectorAll","name","innerHTML","filesize","size","_removeLink","_this","preventDefault","stopPropagation","status","UPLOADING","confirm","removeFile","removedfile","_updateMaxFilesReachedClass","thumbnail","dataUrl","thumbnailElement","alt","src","setTimeout","error","message","errormultiple","processing","processingmultiple","uploadprogress","progress","bytesSent","nodeName","value","style","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","maxfilesexceeded","maxfilesreached","queuecomplete","addedfiles","object","objects","target","val","getAcceptedFiles","accepted","getRejectedFiles","getFilesWithStatus","getQueuedFiles","QUEUED","getUploadingFiles","getAddedFiles","ADDED","getActiveFiles","eventName","noPropagation","setupHiddenFileInput","tagName","setAttribute","contains","hiddenFileInput","visibility","position","top","left","addFile","URL","window","webkitURL","updateTotalUploadProgress","returnValue","efct","dataTransfer","effectAllowed","_error","dropEffect","forEach","clickableElement","click","evt","elementInside","enable","destroy","disable","removeAllFiles","indexOf","activeFiles","totalBytes","totalBytesSent","totalUploadProgress","upload","total","_getParamName","n","existingFallback","fields","fieldsString","form","getFallback","elements","el","setupEventListeners","elementListeners","listener","_results1","removeEventListeners","cancelUpload","cutoff","selectedSize","selectedUnit","unit","units","Math","pow","round","items","webkitGetAsEntry","_addFilesFromItems","handleFiles","clipboardData","entry","item","isFile","getAsFile","isDirectory","_addFilesFromDirectory","kind","directory","path","dirReader","entriesReader","createReader","entries","substring","fullPath","readEntries","console","log","isValidFile","_enqueueThumbnail","_errorProcessing","enqueueFile","enqueueFiles","processQueue","_thumbnailQueue","_processingThumbnail","type","match","_processThumbnailQueue","createThumbnail","shift","cancelIfNecessary","fileReader","FileReader","onload","result","createThumbnailFromUrl","readAsDataURL","imageUrl","crossOrigin","img","canvas","ctx","resizeInfo","_ref3","getContext","trgX","trgY","toDataURL","onerror","processingLength","queuedFiles","processFiles","processFile","uploadFiles","_getFilesWithXhr","xhr","groupedFile","groupedFiles","CANCELED","abort","option","uploadFile","formData","handleError","headerName","headerValue","headers","input","inputName","inputType","progressObj","response","updateProgress","_l","_len3","_m","_ref4","_ref5","XMLHttpRequest","open","allFilesFinished","loaded","readyState","responseText","getResponseHeader","JSON","parse","_finished","onprogress","Accept","Cache-Control","X-Requested-With","setRequestHeader","FormData","append","hasAttribute","selected","toLowerCase","checked","submitRequest","send","SUCCESS","ERROR","forElement","autoDiscover","discover","checkElements","dropzones","blacklistedBrowsers","capableBrowser","regex","File","FileList","Blob","navigator","userAgent","list","rejectedItem","str","charAt","string","div","childNodes","container","els","Array","question","rejected","baseMimeType","mimeType","validType","split","jQuery","each","module","exports","ACCEPTED","PROCESSING","alpha","data","ey","ih","py","ratio","sy","naturalWidth","naturalHeight","drawImage","getImageData","sx","sw","sh","dx","dy","dw","dh","vertSquashRatio","win","doc","poll","pre","rem","root","documentElement","doScroll","createEventObject","frameElement","_autoDiscoverFunction","$","global","ddh","_dialog","msg","title","buttons","css","opt","backdrop","keyboard","modalSize","modalLayout","translate","$modal","undefined","html","defaultAction","action","$btn","join","label","attributes","attr","proxy","modal","one","focus","warn","cssWarn","prompt","keyCode","alert","i18n","areaselect","group","area","selectize","refreshOptions","getValue","hide","show","trigger","MediaLibrary","self","ctrlKey","ctrlKeyPressed","VERSION","currentPath","currentFolderId","_actionLink","_resourceLink","setActionLink","decodeURI","setResourceLink","_loadItemDetails","$dialog","ui","first","closest","$detailForm","preview","filetype","fileInfo","imagesize","_formatFileSize","text","parseInt","names","pop","_makeItemMovable","$item","actionLink","draggable","revert","helper","original","hasClass","clone","zIndex","opacity","start","addClass","droppable","hoverClass","fileId","folderId","folder","thumb","post","sourceid","targetid","_res","filter","multiple","RegExp","actions","data-dismiss","foldername","blTypeNotAllowed","id","unshift","_loadMediaContent","basefrm","OverlayInstance","onContentLoad","$overlay","overlayContext","fullpath","invoke","$image","$applyAction","hideOverlay","prepend","refreshMedia","$media","tab","addMediaItem","removeClass","find","resourceLink","mediaOptions","actionLinkParam","get","is","substr","prop","ajax","addFolderResult","errorThrown","sConfirmMsg","deleteIDs","activeItem","newname","resultJson","toggleClass","$detailsItem","siblings","itemData","$activeItems","scrollTop","responseJson","search","_loadMoreMediaContent","page","imageSize","more"],"mappings":"CA2BA,WACI,GAAIA,GAAUC,EAASC,EAAUC,EAAeC,EAAsBC,EAAiBC,EAAMC,EACzFC,KAAaC,MACbC,KAAeC,eACfC,EAAY,SAASC,EAAOC,GAAiG,QAASC,KAASC,KAAKC,YAAcJ,EAA5H,IAAK,GAAIK,KAAOJ,GAAcJ,EAAUS,KAAKL,EAAQI,KAAML,EAAMK,GAAOJ,EAAOI,GAA2J,OAArGH,GAAKK,UAAYN,EAAOM,UAAWP,EAAMO,UAAY,GAAIL,GAAQF,EAAMQ,UAAYP,EAAOM,UAAkBP,EAE3RP,GAAO,aAEPL,EAAU,WACN,QAASA,MAyDT,MAvDAA,GAAQmB,UAAUE,iBAAmBrB,EAAQmB,UAAUG,GAEvDtB,EAAQmB,UAAUG,GAAK,SAASC,EAAOC,GAMnC,MALAT,MAAKU,WAAaV,KAAKU,eAClBV,KAAKU,WAAWF,KACjBR,KAAKU,WAAWF,OAEpBR,KAAKU,WAAWF,GAAOG,KAAKF,GACrBT,MAGXf,EAAQmB,UAAUQ,KAAO,WACrB,GAAIC,GAAMC,EAAUC,EAAWP,EAAOQ,EAAIC,CAI1C,IAHAT,EAAQU,UAAU,GAAI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IW,UAAUgI,EAAa9Z,WAIjFiR,EAAE,yBAAyBlb,GAAG,SAAU,SAAUoH,GAE9C,MADAA,GAAE+B,kBACK,IAGX+R,EAAE,+BAA+Blb,GAAG,QAAS,SAAUoH,GACnDA,EAAE+B,gBAEF,IAAIyC,GAAMsP,EAAEzb,MAAMmM,KAEN,MAARA,EACAsP,EAAE,8CAA+CwD,GAASf,OAE1DzC,EAAE,8CAA+CwD,GAAS3F,KAAK,WAC/CmC,EAAE,iBAAkBzb,MAEtB4Z,KAAK,QAAQ2K,OAAOpY,IAAQ,EAClCsP,EAAEzb,MAAMke,OAERzC,EAAEzb,MAAMie,WAMxBiB,EAAGsF,sBAAsB,MAIjCpG,EAAahe,UAAUokB,sBAAwB,SAAUC,GACrD,GAAIxE,GAAajgB,KAAK2e,YAClB+B,EAAe,GAAP+D,EACRvF,EAAKlf,IAETyb,GAAE2H,IAAInD,EAAa,yCAA2CS,EAAQ,aAAejF,EAAE,aAAa7B,KAAK,YAAa,SAAUA,GACxHA,EAAKrX,OAASqX,EAAKrX,MAAMpB,QACzBsa,EAAEnC,KAAKM,EAAKrX,MAAO,WACf2c,EAAG4D,aAAa9iB,KAAK6hB,GAAI7hB,KAAKgG,KAAMhG,KAAKuf,SAAUvf,KAAKsJ,SAAWtJ,KAAKihB,QAAS,EAASjhB,KAAK0kB,WAAa,QAIhH9K,EAAK+K,MACLzF,EAAGsF,sBAAsBC,EAAO,MAM5C9W,OAAOyQ,aAAe,GAAIA,IAE5B/E","file":"base.min.js"} \ No newline at end of file +{"version":3,"sources":["../../../../build/vendor/dropzone/js/dropzone.js","../../../../build/js/base/helper.js","../../../../build/js/base/medialibrary.js"],"names":["Dropzone","Emitter","camelize","contentLoaded","detectVerticalSquash","drawImageIOSFix","noop","without","__slice","slice","__hasProp","hasOwnProperty","__extends","child","parent","ctor","this","constructor","key","call","prototype","__super__","addEventListener","on","event","fn","_callbacks","push","emit","args","callback","callbacks","_i","_len","arguments","length","apply","removeListener","off","removeAllListeners","removeEventListener","i","splice","_super","element","options","elementOptions","fallback","_ref","version","defaultOptions","previewTemplate","replace","clickableElements","listeners","files","document","querySelector","nodeType","Error","dropzone","instances","optionsForElement","extend","forceFallback","isBrowserSupported","url","getAttribute","acceptedFiles","acceptedMimeTypes","method","toUpperCase","getExistingFallback","parentNode","removeChild","previewsContainer","getElement","clickable","getElements","init","resolveOption","events","withCredentials","parallelUploads","uploadMultiple","maxFilesize","paramName","createImageThumbnails","maxThumbnailFilesize","thumbnailWidth","thumbnailHeight","filesizeBase","maxFiles","params","ignoreHiddenFiles","autoProcessQueue","autoQueue","addRemoveLinks","hiddenInputContainer","capture","dictDefaultMessage","dictFallbackMessage","dictFallbackText","dictFileTooBig","dictInvalidFileType","dictResponseError","dictCancelUpload","dictCancelUploadConfirmation","dictRemoveFile","dictRemoveFileConfirmation","dictMaxFilesExceeded","accept","file","done","messageElement","span","className","getElementsByTagName","test","createElement","appendChild","textContent","innerText","getFallbackForm","resize","info","srcRatio","trgRatio","srcX","srcY","srcWidth","width","srcHeight","height","optWidth","optHeight","trgHeight","trgWidth","drop","e","classList","remove","dragstart","dragend","dragenter","add","dragover","dragleave","paste","reset","addedfile","node","removeFileEvent","removeLink","_j","_k","_len1","_len2","_ref1","_ref2","_results","previewElement","trim","querySelectorAll","name","innerHTML","filesize","size","_removeLink","_this","preventDefault","stopPropagation","status","UPLOADING","confirm","removeFile","removedfile","_updateMaxFilesReachedClass","thumbnail","dataUrl","thumbnailElement","alt","src","setTimeout","error","message","errormultiple","processing","processingmultiple","uploadprogress","progress","bytesSent","nodeName","value","style","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","maxfilesexceeded","maxfilesreached","queuecomplete","addedfiles","object","objects","target","val","getAcceptedFiles","accepted","getRejectedFiles","getFilesWithStatus","getQueuedFiles","QUEUED","getUploadingFiles","getAddedFiles","ADDED","getActiveFiles","eventName","noPropagation","setupHiddenFileInput","tagName","setAttribute","contains","hiddenFileInput","visibility","position","top","left","addFile","URL","window","webkitURL","updateTotalUploadProgress","returnValue","efct","dataTransfer","effectAllowed","_error","dropEffect","forEach","clickableElement","click","evt","elementInside","enable","destroy","disable","removeAllFiles","indexOf","activeFiles","totalBytes","totalBytesSent","totalUploadProgress","upload","total","_getParamName","n","existingFallback","fields","fieldsString","form","getFallback","elements","el","setupEventListeners","elementListeners","listener","_results1","removeEventListeners","cancelUpload","cutoff","selectedSize","selectedUnit","unit","units","Math","pow","round","items","webkitGetAsEntry","_addFilesFromItems","handleFiles","clipboardData","entry","item","isFile","getAsFile","isDirectory","_addFilesFromDirectory","kind","directory","path","dirReader","entriesReader","createReader","entries","substring","fullPath","readEntries","console","log","isValidFile","_enqueueThumbnail","_errorProcessing","enqueueFile","enqueueFiles","processQueue","_thumbnailQueue","_processingThumbnail","type","match","_processThumbnailQueue","createThumbnail","shift","cancelIfNecessary","fileReader","FileReader","onload","result","createThumbnailFromUrl","readAsDataURL","imageUrl","crossOrigin","img","canvas","ctx","resizeInfo","_ref3","getContext","trgX","trgY","toDataURL","onerror","processingLength","queuedFiles","processFiles","processFile","uploadFiles","_getFilesWithXhr","xhr","groupedFile","groupedFiles","CANCELED","abort","option","uploadFile","formData","handleError","headerName","headerValue","headers","input","inputName","inputType","progressObj","response","updateProgress","_l","_len3","_m","_ref4","_ref5","XMLHttpRequest","open","allFilesFinished","loaded","readyState","responseText","getResponseHeader","JSON","parse","_finished","onprogress","Accept","Cache-Control","X-Requested-With","setRequestHeader","FormData","append","hasAttribute","selected","toLowerCase","checked","submitRequest","send","SUCCESS","ERROR","forElement","autoDiscover","discover","checkElements","dropzones","blacklistedBrowsers","capableBrowser","regex","File","FileList","Blob","navigator","userAgent","list","rejectedItem","str","charAt","string","div","childNodes","container","els","Array","question","rejected","baseMimeType","mimeType","validType","split","jQuery","each","module","exports","ACCEPTED","PROCESSING","alpha","data","ey","ih","py","ratio","sy","naturalWidth","naturalHeight","drawImage","getImageData","sx","sw","sh","dx","dy","dw","dh","vertSquashRatio","win","doc","poll","pre","rem","root","documentElement","doScroll","createEventObject","frameElement","_autoDiscoverFunction","$","global","ddh","_dialog","msg","title","buttons","css","opt","backdrop","keyboard","modalSize","modalLayout","translate","$modal","undefined","html","defaultAction","action","$btn","join","label","attributes","attr","proxy","modal","one","focus","warn","cssWarn","prompt","keyCode","alert","i18n","areaselect","group","area","selectize","refreshOptions","getValue","hide","show","trigger","MediaLibrary","self","ctrlKey","ctrlKeyPressed","VERSION","currentPath","currentFolderId","_actionLink","_resourceLink","setActionLink","decodeURI","setResourceLink","_loadItemDetails","$dialog","ui","first","closest","$detailForm","preview","filetype","fileInfo","imagesize","_formatFileSize","text","parseInt","names","pop","_makeItemMovable","$item","actionLink","draggable","revert","helper","original","hasClass","clone","zIndex","opacity","start","addClass","droppable","hoverClass","fileId","folderId","folder","thumb","post","sourceid","targetid","_res","filter","multiple","RegExp","actions","data-dismiss","foldername","blTypeNotAllowed","id","unshift","_loadMediaContent","basefrm","OverlayInstance","onContentLoad","$overlay","overlayContext","fullpath","invoke","$image","$applyAction","hideOverlay","prepend","refreshMedia","$media","tab","addMediaItem","removeClass","find","resourceLink","mediaOptions","actionLinkParam","get","is","substr","prop","ajax","addFolderResult","errorThrown","sConfirmMsg","deleteIDs","activeItem","newname","resultJson","responseJSON","toggleClass","$detailsItem","siblings","itemData","$activeItems","scrollTop","responseJson","search","_loadMoreMediaContent","page","imageSize","more"],"mappings":"CA2BA,WACI,GAAIA,GAAUC,EAASC,EAAUC,EAAeC,EAAsBC,EAAiBC,EAAMC,EACzFC,KAAaC,MACbC,KAAeC,eACfC,EAAY,SAASC,EAAOC,GAAiG,QAASC,KAASC,KAAKC,YAAcJ,EAA5H,IAAK,GAAIK,KAAOJ,GAAcJ,EAAUS,KAAKL,EAAQI,KAAML,EAAMK,GAAOJ,EAAOI,GAA2J,OAArGH,GAAKK,UAAYN,EAAOM,UAAWP,EAAMO,UAAY,GAAIL,GAAQF,EAAMQ,UAAYP,EAAOM,UAA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,WAAa,QAIhH/K,EAAKgL,MACL1F,EAAGuF,sBAAsBC,EAAO,MAM5C/W,OAAOyQ,aAAe,GAAIA,IAE5B/E","file":"base.min.js"} \ No newline at end of file diff --git a/build/js/base/medialibrary.js b/build/js/base/medialibrary.js index 3e68483..4415016 100644 --- a/build/js/base/medialibrary.js +++ b/build/js/base/medialibrary.js @@ -611,7 +611,7 @@ ui._loadItemDetails(activeItem.data(), $dialog); }, error: function (result, status, errorThrown) { - ddh.alert(ddh.translate(errorThrown)); + ddh.alert(ddh.translate(result.responseJSON.error)); } }); } diff --git a/src/Validation/Validator/FileNameValidator.php b/src/Validation/Validator/FileNameValidator.php index 8871f45..1e907d7 100644 --- a/src/Validation/Validator/FileNameValidator.php +++ b/src/Validation/Validator/FileNameValidator.php @@ -27,6 +27,11 @@ public function checkFilenameNotEmpty(string $fileName): void if (!$fileName) { throw new ValidationFailedException("OE_MEDIA_LIBRARY_EXCEPTION_FILENAME_EMPTY"); } + + $fileName = str_replace(' ', '', $fileName); + if (strlen($fileName) < 1) { + throw new ValidationFailedException("OE_MEDIA_LIBRARY_EXCEPTION_FILENAME_EMPTY"); + } } public function checkFilenameDoesNotStartWithDot(string $fileName): void diff --git a/tests/Unit/Validation/Validator/FileNameValidatorTest.php b/tests/Unit/Validation/Validator/FileNameValidatorTest.php index be43933..dd652a9 100644 --- a/tests/Unit/Validation/Validator/FileNameValidatorTest.php +++ b/tests/Unit/Validation/Validator/FileNameValidatorTest.php @@ -19,10 +19,18 @@ #[CoversClass(FileNameValidator::class)] class FileNameValidatorTest extends TestCase { - public function testRegularFileNameDoesntThrowExceptions(): void + public static function goodFileNamesDataProvider(): \Generator + { + yield "regular file name" => [ + 'fileName' => uniqid(), + ]; + } + + #[DataProvider('goodFileNamesDataProvider')] + public function testRegularFileNameDoesntThrowExceptions(string $fileName): void { $filePathStub = $this->createConfiguredStub(FilePath::class, [ - 'getFileName' => uniqid() + 'getFileName' => $fileName ]); $sut = new FileNameValidator(); @@ -31,20 +39,16 @@ public function testRegularFileNameDoesntThrowExceptions(): void $this->addToAssertionCount(1); } - public static function goodFileNamesDataProvider(): \Generator - { - yield "regular file name" => [ - 'baseName' => uniqid(), - 'extension' => uniqid() - ]; - } - public static function badFileNamesDataProvider(): \Generator { yield "empty" => [ 'fileName' => '' ]; + yield "empty with spaces" => [ + 'fileName' => ' ' + ]; + yield "starts with dot" => [ 'fileName' => '.' . uniqid() ];