mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +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
|
// Takes object and surrounds it with input
|
||||||
function changeToInputFileField(object, name, value) {
|
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='" +
|
"<input type='file' class='form-control' data-object='" +
|
||||||
object + "' name='" + name + "' value='" + value + "'>" +
|
object + "' name='" + name + "' value='" + value + "'></div>" +
|
||||||
"<a class='btn btn-danger' onClick='clearFileInput(this)'>" +
|
"<a onClick='clearFileInput(this)'>" +
|
||||||
"<i class='fas fa-times'></i>" +
|
"<i class='fas fa-times'></i>" +
|
||||||
"</a></div>";
|
"</a></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
global.clearFileInput = function (el) {
|
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
|
// Takes an object and creates custom html element
|
||||||
|
|
|
@ -38,7 +38,8 @@
|
||||||
.repository-input-file-field {
|
.repository-input-file-field {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
|
||||||
.btn-danger {
|
a {
|
||||||
|
color: $brand-danger;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue