mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 16:22:41 +09:00
#1086 CKEditor 스킨에 파일 업로드 추가
This commit is contained in:
parent
95154d6985
commit
8731b3cd8a
30 changed files with 5253 additions and 11 deletions
|
|
@ -43,7 +43,8 @@ class fileController extends file
|
|||
// Create if upload_target_srl is not defined in the session information
|
||||
if(!$upload_target_srl) $_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl = getNextSequence();
|
||||
|
||||
return $this->insertFile($file_info, $module_srl, $upload_target_srl);
|
||||
$output = $this->insertFile($file_info, $module_srl, $upload_target_srl);
|
||||
Context::setResponseMethod('JSON');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -67,11 +67,19 @@ class fileModel extends file
|
|||
$file_config = $this->getUploadConfig();
|
||||
$left_size = $file_config->allowed_attach_size*1024*1024 - $attached_size;
|
||||
// Settings of required information
|
||||
$attached_size = FileHandler::filesize($attached_size);
|
||||
$allowed_attach_size = FileHandler::filesize($file_config->allowed_attach_size*1024*1024);
|
||||
$allowed_filesize = FileHandler::filesize($file_config->allowed_filesize*1024*1024);
|
||||
$allowed_filetypes = $file_config->allowed_filetypes;
|
||||
$this->add("files",$files);
|
||||
$this->add("editor_sequence",$editor_sequence);
|
||||
$this->add("upload_target_srl",$upload_target_srl);
|
||||
$this->add("upload_status",$upload_status);
|
||||
$this->add("left_size",$left_size);
|
||||
$this->add('attached_size', $attached_size);
|
||||
$this->add('allowed_attach_size', $allowed_attach_size);
|
||||
$this->add('allowed_filesize', $allowed_filesize);
|
||||
$this->add('allowed_filetypes', $allowed_filetypes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
24
modules/file/tpl/js/fileupload.app.js
Normal file
24
modules/file/tpl/js/fileupload.app.js
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
(function($){
|
||||
"use strict";
|
||||
var XeUploader = xe.createApp('XeUploader', {
|
||||
init : function() {
|
||||
}
|
||||
});
|
||||
|
||||
// Shortcut function in jQuery
|
||||
$.fn.uploader = function(opts) {
|
||||
console.log();
|
||||
var u = new XeUploader(this.eq(0), opts);
|
||||
if(u) xe.registerApp(u);
|
||||
|
||||
return u;
|
||||
};
|
||||
|
||||
// Shortcut function in XE
|
||||
xe.createUploader = function(browseButton, opts) {
|
||||
var u = new XeUploader(browseButton, opts);
|
||||
if(u) xe.registerApp(u);
|
||||
|
||||
return u;
|
||||
};
|
||||
})(jQuery);
|
||||
Loading…
Add table
Add a link
Reference in a new issue