From f52765c580178b76987d5674d3ba603b25794fd3 Mon Sep 17 00:00:00 2001 From: jiwoo Date: Thu, 7 Mar 2024 17:55:56 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=9A=B0=20-=20=EC=9D=B4?= =?UTF-8?q?=EB=85=B8=EB=A6=AD=EC=8A=A4=20=EC=97=90=EC=9D=B4=EC=A0=84?= =?UTF-8?q?=ED=8A=B8=20=EC=84=A4=EC=B9=98=20=EC=A0=84=20=EC=95=88=EB=82=B4?= =?UTF-8?q?=20=EB=AC=B8=EA=B5=AC=20=ED=95=9C=EA=B8=80=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/innorix/innorix.js | 2 +- src/main/webapp/innorix/innorix_dev.js | 2 +- src/main/webapp/innorix/innorix_svr.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/innorix/innorix.js b/src/main/webapp/innorix/innorix.js index f1555940..6f6a8584 100644 --- a/src/main/webapp/innorix/innorix.js +++ b/src/main/webapp/innorix/innorix.js @@ -45,7 +45,7 @@ resource:c.resourceGetter("total"),thumbnail:m,watermark:g})},uploadFallback:fun i.uploadUrl&&(i.uploadUrl=n.url.addOriginIfNot(i.uploadUrl)),i.uploadCompletedEvent&&i.uploadCompletedEvent.url&&(i.uploadCompletedEvent.url=n.url.addOriginIfNot(i.uploadCompletedEvent.url)),i.downloadCompletedEvent&&i.downloadCompletedEvent.url&&(i.downloadCompletedEvent.url=n.url.addOriginIfNot(i.downloadCompletedEvent.url)),i.isStream="stream"===i.downloadType,i.width=i.width||this.view.defaultSize.width,i.height=i.height||this.view.defaultSize.height,this.setSize(i.width,i.height),e(".irx_transferWin_wrapper .irx_custom_title").text(i.progressTitle),t||"download"==i.transferMode&&(this.option.$el.find(".irx_filetree").removeClass("empty-uploader"),this.option.$el.find(".irx_filetree").addClass("empty-downloader"),this.option.$el.find(".irx_filetree").find(".irx-empty-download-text").text(i.emptyDownloadFileText),this.option.$el.find(".irx_filetree").find(".irx-empty-download-text").show()),this.option.transferWindowMode&&(this.option.transferStart={upload:"manual",download:"manual"},this.option.$el.hide()),this.option.transferWindowModeOpen&&(this.option.transferStart={upload:"manual",download:"manual"},this.option.$el.hide());var o=this;i.events&&e.each(i.events,function(t,e){o.hasHandler(t,e)||o.on(t,e)})},addLocalFiles:function(t){if(!this.checkState())return!1;if(0==this.option.agent)return!1;if(this.fileloadingState="","undefined"==typeof FormData){var e=this;return this.module.addLocalFilesFallback(this.option.transferMode,t,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)}),this}var e=this;return this.module.addLocalFiles(this.option.transferMode,t,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)},this.option.$el),this},checkState:function(){return"ready"!=this.state?(alert(o("agent.exception.notReady")),!1):1!=this.getControlDisabledState()},openFileDialogInput:function(t){this.openFileDialog()},openFileDialog:function(t){if(!this.checkState())return!1;if(this.fileloadingState="",this.option.agent,"undefined"==typeof FormData){var e=this;return this.module.openFileDialogFallback(this.option.transferMode,t,this.option.allowExtension,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)}),this}var e=this;return this.module.openFileDialog(this.option.transferMode,t,this.option.allowExtension,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)},this.option.$el),this},openFileDialogSingle:function(t){if(!this.checkState())return!1;if(this.fileloadingState="",this.option.agent,"undefined"==typeof FormData){var e=this;return this.module.openFileDialogSingleFallback(this.option.transferMode,t,this.option.allowExtension,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)}),this}var e=this;return this.module.openFileDialogSingle(this.option.transferMode,t,this.option.allowExtension,function(t){!1===t.value?(e.fileloadingState="hide",e.emit(g.FILE_PROCESSING_STATE_HIDE),e.module.licenseNotValidate(t.error)):e._addFiles(t.value)},this.option.$el),this},openDirectorySelectDialog:function(t,e){if(!this.checkState())return!1;if("function"==typeof t&&(e=t,t=""),0==this.option.agent){if(void 0!==e){var i={value:"",result:!1};e(i)}}else"undefined"==typeof FormData?this.module.downloadPathDialogFallback(t,e):this.module.downloadPathDialog(t,e)},execute:function(t){if(!this.checkState())return!1;"undefined"==typeof FormData?this.module.executeFallback(t,function(t){}):this.module.execute(t)},setDownloadPathValue:function(t,e){if(!this.checkState())return!1;if("function"==typeof t&&(e=t,t=""),0==this.option.agent){if(void 0!==e){var i={result:!0};e(i)}}else{this.option.downloadPath=t,v.setOption(this.option),r.setOption(this.option)}},setDownloadPath:function(t,e){if(!this.checkState())return!1;if("function"==typeof t&&(e=t,t=""),0==this.option.agent){if(void 0!==e){var i={result:!0};e(i)}}else{var n=this;this.setControlDisabledState(!0),a.setDisabledState(!0),"undefined"==typeof FormData?this.module.downloadPathDialogFallback(t,function(t){n.setControlDisabledState(!1),a.setDisabledState(!1),n.option.downloadPath=t.value,n.setOption(n.option),e(t)}):this.module.downloadPathDialog(t,function(t){n.setControlDisabledState(!1),a.setDisabledState(!1),n.option.downloadPath=t.value,n.setOption(n.option),e(t)})}},setTransferDownloadPath:function(t,e){if(!this.checkState())return!1;if("function"==typeof t&&(e=t,t=""),0==this.option.agent){if(void 0!==e){var i={result:!0};e(i)}}else{var n=this;this.setControlDisabledState(!0),a.setDisabledState(!0),"undefined"==typeof FormData?this.module.downloadPathDialogFallback(t,function(t){n.setControlDisabledState(!1),a.setDisabledState(!1),n.option.downloadPath=t.value,n.setOption(n.option),a.setManagerDownloadPath(t.value),e(t)}):this.module.downloadPathDialog(t,function(t){n.setControlDisabledState(!1),a.setDisabledState(!1),n.option.downloadPath=t.value,n.setOption(n.option),a.setManagerDownloadPath(t.value),e(t)})}},openFolderDialog:function(){return!!this.checkState()&&(0!=this.option.agent&&void this.directoryDialog())},openDownloadFolder:function(){if(!this.checkState())return!1;if(0==this.option.agent)return!1;var t=this;if(!t.option.downloadPath)return void("undefined"==typeof FormData?t.module.getDownloadPathFallback(function(e){t.option.downloadPath=e.path||"",t.openDownloadFolder()}):t.module.getDownloadPath(function(e){t.option.downloadPath=e.path||"",t.openDownloadFolder()}));this.module.openDownloadFolder(function(t){},this.option)},directoryDialog:function(){if(!this.checkState())return!1;var t=this;return"undefined"==typeof FormData?this.module.directoryDialogFallback(this.option.transferMode,function(e){!1===e.value?t.module.licenseNotValidate(e.error):t._addFiles(e.value)}):this.module.directoryDialog(this.option.transferMode,function(e){!1===e.value?t.module.licenseNotValidate(e.error):t._addFiles(e.value)},this.option.$el),this},getFolderPath:function(t,e){"undefined"==typeof FormData?this.module.getFolderPathFallback({id:t},e):this.module.getFolderPath({id:t},e)},uploadInput:function(t){this.upload()},upload:function(t){var i=this;return!!this.checkState()&&(1==_.additionalProcess?(a.prepareHtmlThumbnailUpload([],i,i.option),a.emit(g.TRANSFER_UPLOAD_THUMBNAIL),_.await(function(){_.additionalProcess=!1,a.emit(g.TRANSFER_UPLOAD_THUMBNAIL_STOP),setTimeout(function(){i._upload(null,!0)},1e3)})):(e(".irx_thumb_prog_wrapper").hide(),e(".irx_thumb_progressBar").parent().hide(),this._upload()),this)},_upload:function(t,i){var r=this;if(!this.checkState())return!1;var s={},l=!0;if(void 0===t||null==t?s=this.fileList.getUploadFiles():(l=!1,s=t),this.qqoInformation)for(var h=0;h0&&(i=!0,this._download(n))}else{var r=this.getFileById(t);r&&(i=!0,this._download([r]))}return 0==i&&this._download(this.fileList.getDownloadFiles()),this},downloadAll:function(){return!!this.checkState()&&(e(".irx_thumb_prog_wrapper").hide(),e(".irx_thumb_progressBar").parent().hide(),this.download())},downloadSelectedFiles:function(){return!!this.checkState()&&(e(".irx_thumb_prog_wrapper").hide(),e(".irx_thumb_progressBar").parent().hide(),this._download(this.fileList.getSelectedDownloadFiles()),this)},downloadAndOpen:function(){if(!this.checkState()&&!this.option.transferWindowMode)return!1;var t=this,e=this.fileList.getSelectedDownloadFiles();0==e.length&&(e=this.fileList.getDownloadFiles());var i=e[e.length-1];return i?(0==this.option.agent?s.downloadAndOpen(i,this,this.option):("compact"==this.option.skin?t.setCompactTemplate():t.option.iframeView?t.setIframeTemplate():t.option.isMobile&&t.setMobileTemplate(),a.downloadAndOpen(i,this,this.option)),this):(alert(o("controlBox.noFile")),this)},downloadAndOpenFile:function(t){if(!this.checkState())return!1;var i=this,r=this.getTotalSize();if(1==this.option.platformDepend)1==this.option.cloudPlatformMode?e.ajax({url:p.getBaseUrl()+"/api/webpage/getGroupId",data:{api_key:p.getKey()},method:"get",dataType:"html"}).done(function(l){i.option.custom||(i.option.custom={}),i.option.custom.groupId=l,e.ajax({url:p.getBaseUrl()+"/api/transfer/"+i.option.licenseGroup,data:{api_key:p.getKey(),fileSize:r},method:"get",dataType:"json"}).done(function(e){if(e.result){if(0==i.option.agent)return s.downloadAndOpen(t,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}):i.module.getDownloadPath(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}));"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),a.downloadAndOpen(t,i,i.option)}else if("disabled"==e.remain)alert(o("license.disabled"));else if("expired"==e.remain)alert(o("license.expired"));else if("storageLimit"==e.remain)alert(o("license.storageLimit"));else if("trafficLimit"==e.remain)alert(o("license.trafficLimit"));else{var r=n.string.humanFileSize(e.remain);alert(o("wp.overlimit",{size:r}))}})}):e.ajax({url:p.getBaseUrl()+"/api/transfer/"+i.option.licenseGroup,data:{api_key:p.getKey(),fileSize:r},method:"get",dataType:"json"}).done(function(e){if(e.result){if(0==i.option.agent)return s.downloadAndOpen(t,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}):i.module.getDownloadPath(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}));a.downloadAndOpen(t,i,i.option)}else if("disabled"==e.remain)alert(o("license.disabled"));else if("expired"==e.remain)alert(o("license.expired"));else if("storageLimit"==e.remain)alert(o("license.storageLimit"));else if("trafficLimit"==e.remain)alert(o("license.trafficLimit"));else{var r=n.string.humanFileSize(e.remain);alert(o("wp.overlimit",{size:r}))}});else{if(0==i.option.agent)return s.htmlDownload(files,i,i.option),!0;if(!i.option.downloadPath)return void("undefined"==typeof FormData?i.module.getDownloadPathFallback(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}):i.module.getDownloadPath(function(e){i.option.downloadPath=e.path||"",i.downloadAndOpenFile(t)}));"compact"==i.option.skin?i.setCompactTemplate():i.option.iframeView?i.setIframeTemplate():i.option.isMobile&&i.setMobileTemplate(),a.downloadAndOpen(t,this,this.option)}return this},_download:function(t){var i=this;if(!this.checkState()&&!this.option.transferWindowMode)return!1;if(0===t.length)return void alert(o("controlBox.noFile"));if(this.qqoInformation)for(var r=0;rfunction forceCloseTransferWindow(el){setTimeout(function(){if (!jQuery('.irx_transferWin_wrapper').hasClass('isClosing')){jQuery('.irx_transferWin_wrapper').remove()}},1000);}<\/script>"),e(".irx_transferWin_wrapper").appendTo(i.jQuery("body"));var o=i.jQuery(".iframeControl_"+t.replace("#",""));try{1==this.option.draggableTransferWindow&&o.find(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,i){e(t.target)}})}catch(c){}var r=(i.innerHeight-395)/2+"px",s=(i.innerWidth-500)/2+"px",l="0px",h="0px";if("default"!=this.option.iframeViewTop&&(r=this.option.iframeViewTop),"default"!=this.option.iframeViewLeft&&(s=this.option.iframeViewLeft),"default"!=this.option.iframeViewMarginLeft&&(l=this.option.iframeViewMarginLeft),"default"!=this.option.iframeViewMarginTop&&(h=this.option.iframeViewMarginTop),this.option.transferWindowMode){try{1==this.option.draggableTransferWindow&&i.jQuery(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,i){e(t.target)}})}catch(c){}i.jQuery(".irx_transferWin_wrapper").find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),i.jQuery(".irx_transferWin").css({top:r,left:s,"margin-left":l,"margin-top":h})}else o.find(".irx_filetree").html(this.option.$el.find(".irx_filetree").html()),o.find(".irx_transferWin").css({top:r,left:s,"margin-left":l,"margin-top":h})}else e.fn.center=function(t){return t=t?this.parent():window,(e(t).height()-this.outerHeight())/2+e(t).scrollTop()<0?this.css({top:"0px"}):this.css({top:(e(t).height()-this.outerHeight())/2+e(t).scrollTop()+"px"}),this},e(".irx_transferWin_wrapper").find(".irx_transferWin").center(!1),1==this.option.draggableTransferWindow&&e(".irx_transferWin_wrapper").find(".irx_transferWin").draggable({handle:".irx_header",stop:function(t,i){e(t.target)}}),this.option.transferWindowMode&&e(".irx_transferWin_wrapper").find(".irx_transferWin").css({top:"0px",left:"0px","margin-top":"0px","margin-left":"0px"})},setMobileTemplate:function(){a.views.initMobile()},setEncodingTemplate:function(t){var e="",i=0;t.status&&(e=t.status),t.percentage&&(i=t.percentage),a.views.initEncoding(this.option.isMobile,i,e)},setIframeTemplate:function(){if(a.views.initView(),e(".irx_transferWin_wrapper").find(".irx_close").attr("onclick","forceCloseTransferWindow(this)"),this.option.iframeView){var t=this.option.el,i=null;e(".irx_transferWin_wrapper").addClass("iframeControl_"+t.replace("#","")),i="parent"==this.option.iframeViewLocation?parent:"top"==this.option.iframeViewLocation?top:parent;var n=this.option.iframeViewCssUrl;""!=n&&i.jQuery("head").append(n);i.jQuery("head").append("