mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 15:49: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
29
modules/editor/skins/ckeditor/js/file_upload.js
Normal file
29
modules/editor/skins/ckeditor/js/file_upload.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* Initialize each instance of file uploader on the page.
|
||||
*/
|
||||
$(function() {
|
||||
$('.xefu-container').each(function() {
|
||||
const container = $(this);
|
||||
const data = container.data();
|
||||
container.data('instance', container.xeUploader({
|
||||
maxFileSize: parseInt(data.maxFileSize, 10),
|
||||
maxChunkSize: parseInt(data.maxChunkSize, 10),
|
||||
autoinsertTypes: data.autoinsertTypes,
|
||||
autoinsertPosition: data.autoinsertPosition,
|
||||
singleFileUploads: true
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* This function is only retained for backward compatibility.
|
||||
* Do not depend on it for any reason.
|
||||
*/
|
||||
function reloadUploader(editor_sequence) {
|
||||
var container = $('#xefu-container-' + editor_sequence);
|
||||
if (container.length) {
|
||||
container.data('instance').loadFilelist(container);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue