Improved article management
This commit is contained in:
parent
b46717d982
commit
edf5641aff
2 changed files with 9 additions and 5 deletions
|
@ -48,6 +48,8 @@
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
line-height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-price {
|
.list-price {
|
||||||
|
|
|
@ -129,8 +129,10 @@ class ListManager {
|
||||||
} else {
|
} else {
|
||||||
if (this.editableTypes[i]['name'] === 'icon')
|
if (this.editableTypes[i]['name'] === 'icon')
|
||||||
formData += "<i class='mdi mdi-" + value + "' style='margin-left: 5px'></i>";
|
formData += "<i class='mdi mdi-" + value + "' style='margin-left: 5px'></i>";
|
||||||
formData += '<input name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" value="' + value + '" required />';
|
if (this.editableTypes[i]['name'] === 'description')
|
||||||
|
formData += '<textarea name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" required >' + value + '</textarea>';
|
||||||
|
else
|
||||||
|
formData += '<input name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" value="' + value + '" required />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
formData += "</div></form>";
|
formData += "</div></form>";
|
||||||
|
@ -210,9 +212,7 @@ class ListManager {
|
||||||
if (index === -1)
|
if (index === -1)
|
||||||
index = this.displayedData.length - 1;
|
index = this.displayedData.length - 1;
|
||||||
let iconContainer = this.displayedData[index].find(".list-category");
|
let iconContainer = this.displayedData[index].find(".list-category");
|
||||||
for (let i = 0; i < categories.length; i++) {
|
iconContainer.html(this.getCategoryIcons(this.currentData[index]['id']));
|
||||||
iconContainer.html(this.getCategoryIcons(this.currentData[index]['id']));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateAssociationList(articleId, newCategories) {
|
updateAssociationList(articleId, newCategories) {
|
||||||
|
@ -229,6 +229,8 @@ class ListManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateArticleImage(image, index) {
|
updateArticleImage(image, index) {
|
||||||
|
if (index === -1)
|
||||||
|
index = this.displayedData.length - 1;
|
||||||
$(this.displayedData[index].find("img")[0]).attr('src', window.URL.createObjectURL(image));
|
$(this.displayedData[index].find("img")[0]).attr('src', window.URL.createObjectURL(image));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue