fixes per @mlorb 's request

This commit is contained in:
zmagod 2018-07-09 12:54:02 +02:00
parent dd00de928c
commit 14254fbde3
3 changed files with 8 additions and 7 deletions

View file

@ -24,10 +24,10 @@
* @returns {undefinded}
*/
RepositoryItemEditForm.prototype.renderForm = function(table) {
var colIndex = getColumnIndex(table, '#row-name');
var cells = this.itemData.repository_row.repository_cells;
var colIndex = getColumnIndex(table, '#row-name');
var cells = this.itemData.repository_row.repository_cells;
var listColumns = this.itemData.repository_row.repository_column_items;
var formData = this.formData;
var formData = this.formData;
if (colIndex) {
$(this.repositoryItemElement).children('td').eq(colIndex)
@ -194,7 +194,7 @@
"' data-id='" + id + "'>" + buttonLabel +
"</button></div><div><p class='file-name-label'>" + fileName +
"</p></div>";
if(fileName.length > 0) {
if(value.file_file_name) {
html += "<div><a data-action='removeAsset' ";
html += "onClick='clearFileInput(this)'><i class='fas fa-times'></i></a>";
} else {

View file

@ -1070,13 +1070,13 @@ var RepositoryDatatable = (function(global) {
// Takes object and surrounds it with input
function changeToInputFileField(object, name, value) {
return "<div class='repository-input-file-field new-input-file-field-div'>"+
"<div class='form-group'>" +
return "<div class='repository-input-file-field'>"+
"<div class='new-input-file-field-div'><div class='form-group'>" +
"<input type='file' class='form-control' data-object='" +
object + "' name='" + name + "' value='" + value + "'></div>" +
"<a onClick='clearFileInput(this)'>" +
"<i class='fas fa-times'></i>" +
"</a></div>";
"</a></div></div>";
}
global.clearFileInput = function (el) {

View file

@ -40,6 +40,7 @@
}
.repository-input-file-field {
width: auto;
.form-group {
align-items: baseline;
border: 1px solid $color-alto;