mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Clean up extravar support script for upload type
This commit is contained in:
parent
3ac26150d5
commit
d7fb2422fe
1 changed files with 7 additions and 7 deletions
|
|
@ -1,16 +1,16 @@
|
|||
'use strict';
|
||||
|
||||
(function($) {
|
||||
$(function() {
|
||||
$('button.evFileRemover').on('click', function() {
|
||||
const container = $(this).parents('.ev_file_upload');
|
||||
$(function() {
|
||||
$('.ev_file_upload').each(function() {
|
||||
const container = $(this);
|
||||
container.find('button.evFileRemover').on('click', function() {
|
||||
container.find('span.filename').text('');
|
||||
container.find('span.filesize').text('');
|
||||
container.find('input[type=hidden][name^=_delete_]').val('Y');
|
||||
container.find('input[type=file]').val('');
|
||||
$(this).remove();
|
||||
});
|
||||
$('input.rx_ev_file').on('change', function() {
|
||||
const container = $(this).parents('.ev_file_upload');
|
||||
container.find('input.rx_ev_file').on('change', function() {
|
||||
const max_size = parseInt($(this).data('allowedFilesize'), 10);
|
||||
const file_count = this.files.length;
|
||||
for (let i = 0; i < file_count; i++) {
|
||||
|
|
@ -23,4 +23,4 @@
|
|||
container.find('input[type=hidden][name^=_delete_]').val('N');
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue