mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-10 23:25:31 +08:00
Add margin to clear button and fix case with new file in the cell [SCI-2403]
This commit is contained in:
parent
be5d481cdc
commit
c8094f196c
2 changed files with 11 additions and 5 deletions
|
@ -961,11 +961,13 @@ var RepositoryDatatable = (function(global) {
|
|||
}
|
||||
|
||||
function _addSelectedFile(type, cell, input) {
|
||||
if (type === 'RepositoryAssetValue' && cell.value != null) {
|
||||
const dT = new ClipboardEvent('').clipboardData || // Firefox workaround exploiting https://bugzilla.mozilla.org/show_bug.cgi?id=1422655
|
||||
new DataTransfer(); // specs compliant (as of March 2018 only Chrome)
|
||||
dT.items.add(new File([_], cell.value.file_file_name));
|
||||
input.files = dT.files;
|
||||
if (type === 'RepositoryAssetValue') {
|
||||
if (cell.value != null) {
|
||||
const dT = new ClipboardEvent('').clipboardData || // Firefox workaround exploiting https://bugzilla.mozilla.org/show_bug.cgi?id=1422655
|
||||
new DataTransfer(); // specs compliant (as of March 2018 only Chrome)
|
||||
dT.items.add(new File([_], cell.value.file_file_name));
|
||||
input.files = dT.files;
|
||||
}
|
||||
$(input).on('change', function(){
|
||||
this.dataset.changed = 'true';
|
||||
});
|
||||
|
|
|
@ -33,4 +33,8 @@
|
|||
|
||||
.repository-input-file-field {
|
||||
display: inline-flex;
|
||||
|
||||
.btn-danger {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue