mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
에디터 로딩 직후, 파일 업로드 직후, 파일 삭제 직후 첨부목록 갱신을 위해 file.getFileList를 호출하도록 되어 있는데, 첨부목록을 직전 요청의 응답과 함께 반환하도록 변경하여 불필요한 AJAX 요청이 발생하지 않도록 하고, 로딩 속도를 개선함.
80 lines
3.3 KiB
HTML
80 lines
3.3 KiB
HTML
<!--%load_js_plugin("jquery.fileupload")-->
|
|
<!--%load_js_plugin("jquery.finderSelect")-->
|
|
<!--%load_js_plugin("handlebars")-->
|
|
<load target="./lang" />
|
|
<div cond="$allow_fileupload" id="xefu-container-{$editor_sequence}" class="xefu-container xe-clearfix"
|
|
data-editor-sequence="{$editor_sequence}"
|
|
data-editor-status="{escape(json_encode(FileModel::getInstance()->getFileList($editor_sequence)))}">
|
|
|
|
<!--// dropzone -->
|
|
<div class="xefu-dropzone">
|
|
<span class="xefu-btn fileinput-button xefu-act-selectfile">
|
|
<span><i class="xi-icon xi-file-upload"></i> {$lang->edit->upload_file}</span>
|
|
<input id="xe-fileupload" type="file" class="fileupload-processing " name="Filedata" data-auto-upload="true" data-editor-sequence="{$editor_sequence}" multiple />
|
|
</span>
|
|
|
|
<p class="xefu-dropzone-message" cond="!$m">{$lang->ckeditor_about_file_drop_area}</p>
|
|
|
|
<p class="upload_info">
|
|
<span class="allowed_filesize_container">{$lang->allowed_filesize} : <span class="allowed_filesize">0MB</span></span>
|
|
<span class="allowed_filetypes_container">({$lang->allowed_filetypes} : <span class="allowed_filetypes">*.*</span>)</span>
|
|
</p>
|
|
|
|
<p class="xefu-progress-status" style="display: none;">{$lang->ckeditor_file_uploading} (<span class="xefu-progress-percent">0%</span>)</p>
|
|
<div class="xefu-progressbar" style="display: none;"><div></div></div>
|
|
</div>
|
|
<!--// END:dropzone -->
|
|
|
|
<div class="xefu-controll xe-clearfix">
|
|
<div style="float: left;">
|
|
{$lang->ckeditor_file_count} (<span class="attached_size"></span> / <span class="allowed_attach_size"></span>)
|
|
</div>
|
|
|
|
<div style="float: right">
|
|
<input type="button" class="xefu-btn xefu-act-link-selected" style=" vertical-align: middle; vertical-align: middle;" value="{$lang->edit->link_file}">
|
|
<input type="button" class="xefu-btn xefu-act-delete-selected" style=" vertical-align: middle; vertical-align: middle;" value="{$lang->edit->delete_selected}">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="xefu-list">
|
|
<div class="xefu-list-images">
|
|
<ul>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="xefu-list-files">
|
|
<ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
function reloadUploader(editor_sequence){
|
|
<!--@if($allow_fileupload)-->
|
|
$container = jQuery('#xefu-container-' + editor_sequence);
|
|
$container.data('instance').loadFilelist($container);
|
|
<!--@endif-->
|
|
}
|
|
<!--@if($allow_fileupload)-->
|
|
jQuery(function($){
|
|
// uploader
|
|
var setting = {
|
|
maxFileSize: {$logged_info->is_admin === 'Y' ? 0 : $file_config->allowed_filesize},
|
|
maxChunkSize: {$file_config->allowed_chunk_size ?: 0},
|
|
autoinsertTypes: {json_encode($editor_autoinsert_types)},
|
|
autoinsertPosition: {json_encode($editor_autoinsert_position ?: 'paragraph')},
|
|
singleFileUploads: true
|
|
};
|
|
$container = $('#xefu-container-{$editor_sequence}');
|
|
$container.data('instance',$container.xeUploader(setting));
|
|
window.xe.msg_exceeds_limit_size = '{$lang->msg_exceeds_limit_size}';
|
|
window.xe.msg_checked_file_is_deleted = '{$lang->msg_checked_file_is_deleted}';
|
|
window.xe.msg_file_cart_is_null = '{$lang->msg_file_cart_is_null}';
|
|
window.xe.msg_checked_file_is_deleted = '{$lang->msg_checked_file_is_deleted}';
|
|
window.xe.msg_not_allowed_filetype = '{$lang->msg_not_allowed_filetype}';
|
|
window.xe.msg_file_upload_error = '{$lang->msg_file_upload_error}';
|
|
});
|
|
<!--@endif-->
|
|
</script>
|