mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 03:35:25 +08:00
Merge pull request #1152 from okriuchykhin/ok_SCI_2403
Change remove file button appearence [SCI-2403]
This commit is contained in:
commit
6dbb5bc583
2 changed files with 6 additions and 5 deletions
|
@ -1036,16 +1036,16 @@ var RepositoryDatatable = (function(global) {
|
|||
|
||||
// Takes object and surrounds it with input
|
||||
function changeToInputFileField(object, name, value) {
|
||||
return "<div class='repository-input-file-field'>" +
|
||||
return "<div class='repository-input-file-field'><div class='form-group'>" +
|
||||
"<input type='file' class='form-control' data-object='" +
|
||||
object + "' name='" + name + "' value='" + value + "'>" +
|
||||
"<a class='btn btn-danger' onClick='clearFileInput(this)'>" +
|
||||
object + "' name='" + name + "' value='" + value + "'></div>" +
|
||||
"<a onClick='clearFileInput(this)'>" +
|
||||
"<i class='fas fa-times'></i>" +
|
||||
"</a></div>";
|
||||
}
|
||||
|
||||
global.clearFileInput = function (el) {
|
||||
$(el).prev('input:file')[0].value = '';
|
||||
$(el).prev('div').find('input:file')[0].value = '';
|
||||
}
|
||||
|
||||
// Takes an object and creates custom html element
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
.repository-input-file-field {
|
||||
display: inline-flex;
|
||||
|
||||
.btn-danger {
|
||||
a {
|
||||
color: $brand-danger;
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue