mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 22:59:57 +09:00
Separate editor and uploader related PHP and JS code into their own native files
This commit is contained in:
parent
d127e334b0
commit
579201fe7c
5 changed files with 308 additions and 245 deletions
|
|
@ -1,10 +1,12 @@
|
|||
<config autoescape="on" />
|
||||
<load target="./lang" />
|
||||
|
||||
<!--%load_js_plugin("jquery.fileupload")-->
|
||||
<!--%load_js_plugin("jquery.finderSelect")-->
|
||||
<!--%load_js_plugin("handlebars")-->
|
||||
|
||||
<load target="./lang" />
|
||||
<load target="js/file_upload.js" />
|
||||
|
||||
<div cond="$allow_fileupload" id="xefu-container-{$editor_sequence}" class="xefu-container xe-clearfix"
|
||||
data-editor-sequence="{$editor_sequence}"
|
||||
data-editor-status="{json_encode(FileModel::getInstance()->getFileList($editor_sequence), JSON_UNESCAPED_UNICODE)}"
|
||||
|
|
@ -56,31 +58,10 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
jQuery(function($){
|
||||
var container = $('#xefu-container-{$editor_sequence}');
|
||||
if (container.length) {
|
||||
container.data('instance', container.xeUploader({
|
||||
maxFileSize: parseInt(container.data('maxFileSize'), 10),
|
||||
maxChunkSize: parseInt(container.data('maxChunkSize'), 10),
|
||||
autoinsertTypes: container.data('autoinsertTypes'),
|
||||
autoinsertPosition: container.data('autoinsertPosition'),
|
||||
singleFileUploads: true
|
||||
}));
|
||||
}
|
||||
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}';
|
||||
});
|
||||
|
||||
function reloadUploader(editor_sequence) {
|
||||
var container = $('#xefu-container-' + editor_sequence);
|
||||
if (container.length) {
|
||||
container.data('instance').loadFilelist(container);
|
||||
}
|
||||
}
|
||||
|
||||
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}';
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue