mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-31 00:59:58 +09:00
Change file delete checkbox to button
This commit is contained in:
parent
453f83db7d
commit
7fe2203cbd
2 changed files with 45 additions and 22 deletions
17
modules/extravar/skins/default/assets/file_upload.js
Normal file
17
modules/extravar/skins/default/assets/file_upload.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
(function($) {
|
||||
$(function() {
|
||||
$('button.evFileRemover').on('click', function() {
|
||||
const container = $(this).parents('.ev_file_upload');
|
||||
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('');
|
||||
});
|
||||
$('input.rx_ev_file').on('change', function() {
|
||||
const container = $(this).parents('.ev_file_upload');
|
||||
container.find('input[type=hidden][name^=_delete_]').val('N');
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
Loading…
Add table
Add a link
Reference in a new issue