From b04e8c5955a6f5930b477f3a80ac4c51a87cdb87 Mon Sep 17 00:00:00 2001 From: bnu Date: Tue, 10 Mar 2015 15:08:25 +0900 Subject: [PATCH] =?UTF-8?q?#1086=20=EB=B3=B8=EB=AC=B8=20=EC=82=BD=EC=9E=85?= =?UTF-8?q?=20=EC=8B=9C=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=99=B8=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=B6=94=EA=B0=80=20=EC=A7=80=EC=9B=90=20?= =?UTF-8?q?=EB=B0=8F=20=EB=AF=B8=EB=A6=AC=EB=B3=B4=EA=B8=B0=20=EB=93=B1=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/plugins/jquery.fileupload/js/main.js | 21 ++++++++++++------- modules/editor/skins/ckeditor/editor.html | 6 +++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/common/js/plugins/jquery.fileupload/js/main.js b/common/js/plugins/jquery.fileupload/js/main.js index a3f9dc387..1e194e7e7 100644 --- a/common/js/plugins/jquery.fileupload/js/main.js +++ b/common/js/plugins/jquery.fileupload/js/main.js @@ -13,7 +13,7 @@ var self = this; var $container = this.$container = containerEl; var data = $container.data(); - this.editor_sequence = $container.data('editor-sequence'); + this.editor_sequence = data.editorSequence; var settings = { url: request_uri.setQuery('module', 'file').setQuery('act', 'procFileUpload'), @@ -24,8 +24,9 @@ done: function(e, res) { var result = res.result; + if(!result) return; + if(result.error == 0) { - this.uploadedBytes += res.total; self.done.call(self, arguments); } else { alert(result.message); @@ -90,21 +91,27 @@ // this.loadFilelist(); }, insertToContent: function() { + var temp_code = ''; + for(var i = 0, len = this.selected_files.length; i < len; i++) { var fileinfo = $(this.selected_files[i]).data('fileinfo'); - var temp_code = ''; if(!fileinfo) return; - if(/\.(jpg|jpeg|png|gif)$/i.test(fileinfo.download_url)) { - temp_code += ''+fileinfo.source_filename+'' + "\r\n
"; - _getCkeInstance(this.editor_sequence).insertHtml(temp_code, "unfiltered_html"); + if(/\.(jpe?g|png|gif)$/i.test(fileinfo.download_url)) { + temp_code += '' + fileinfo.source_filename + ''; + temp_code += "\r\n


\r\n"; + } else { + temp_code += '' + fileinfo.source_filename + "\n"; } + + _getCkeInstance(this.editor_sequence).insertHtml(temp_code, "unfiltered_html"); } }, deleteFile: function() { var self = this; var file_srls = []; + for(var i = 0, len = this.selected_files.length; i < len; i++) { var fileinfo = $(this.selected_files[i]).data('fileinfo'); file_srls.push(fileinfo.file_srl); @@ -144,7 +151,7 @@ if(!fileinfo) return; if(/\.(jpe?g|png|gif)$/i.test(fileinfo.download_url)) { - $('.xe-uploader-preview img').attr('src', window.request_uri + fileinfo.download_url); + $('.xe-uploader-preview img').attr('src', window.request_uri + fileinfo.download_url).show(); } else { $('.xe-uploader-preview img').hide(); } diff --git a/modules/editor/skins/ckeditor/editor.html b/modules/editor/skins/ckeditor/editor.html index 580902cd5..605f99734 100755 --- a/modules/editor/skins/ckeditor/editor.html +++ b/modules/editor/skins/ckeditor/editor.html @@ -44,7 +44,7 @@
- 파일첨부 + {$lang->edit->upload_file} @@ -100,8 +100,8 @@ $(function () {/**/ var setting = { - maxFileSize: {$file_config->allowed_filesize || 'null'}, - limitMultiFileUploadSize: {$file_config->allowed_filesize || 'null'}, + maxFileSize: {$file_config->allowed_filesize}, + limitMultiFileUploadSize: {$file_config->allowed_filesize} }; var uploader = $('#xe-uploader-container-{$editor_sequence}').xeUploader(setting); });