mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 19:53:19 +08:00
fixes per @mlorb 's request
This commit is contained in:
parent
dd00de928c
commit
14254fbde3
3 changed files with 8 additions and 7 deletions
|
@ -24,10 +24,10 @@
|
||||||
* @returns {undefinded}
|
* @returns {undefinded}
|
||||||
*/
|
*/
|
||||||
RepositoryItemEditForm.prototype.renderForm = function(table) {
|
RepositoryItemEditForm.prototype.renderForm = function(table) {
|
||||||
var colIndex = getColumnIndex(table, '#row-name');
|
var colIndex = getColumnIndex(table, '#row-name');
|
||||||
var cells = this.itemData.repository_row.repository_cells;
|
var cells = this.itemData.repository_row.repository_cells;
|
||||||
var listColumns = this.itemData.repository_row.repository_column_items;
|
var listColumns = this.itemData.repository_row.repository_column_items;
|
||||||
var formData = this.formData;
|
var formData = this.formData;
|
||||||
|
|
||||||
if (colIndex) {
|
if (colIndex) {
|
||||||
$(this.repositoryItemElement).children('td').eq(colIndex)
|
$(this.repositoryItemElement).children('td').eq(colIndex)
|
||||||
|
@ -194,7 +194,7 @@
|
||||||
"' data-id='" + id + "'>" + buttonLabel +
|
"' data-id='" + id + "'>" + buttonLabel +
|
||||||
"</button></div><div><p class='file-name-label'>" + fileName +
|
"</button></div><div><p class='file-name-label'>" + fileName +
|
||||||
"</p></div>";
|
"</p></div>";
|
||||||
if(fileName.length > 0) {
|
if(value.file_file_name) {
|
||||||
html += "<div><a data-action='removeAsset' ";
|
html += "<div><a data-action='removeAsset' ";
|
||||||
html += "onClick='clearFileInput(this)'><i class='fas fa-times'></i></a>";
|
html += "onClick='clearFileInput(this)'><i class='fas fa-times'></i></a>";
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1070,13 +1070,13 @@ 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 new-input-file-field-div'>"+
|
return "<div class='repository-input-file-field'>"+
|
||||||
"<div class='form-group'>" +
|
"<div class='new-input-file-field-div'><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 + "'></div>" +
|
object + "' name='" + name + "' value='" + value + "'></div>" +
|
||||||
"<a onClick='clearFileInput(this)'>" +
|
"<a onClick='clearFileInput(this)'>" +
|
||||||
"<i class='fas fa-times'></i>" +
|
"<i class='fas fa-times'></i>" +
|
||||||
"</a></div>";
|
"</a></div></div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
global.clearFileInput = function (el) {
|
global.clearFileInput = function (el) {
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.repository-input-file-field {
|
.repository-input-file-field {
|
||||||
|
width: auto;
|
||||||
.form-group {
|
.form-group {
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
border: 1px solid $color-alto;
|
border: 1px solid $color-alto;
|
||||||
|
|
Loading…
Reference in a new issue