|
@@ -129,8 +129,10 @@ class ListManager {
|
129
|
129
|
} else {
|
130
|
130
|
if (this.editableTypes[i]['name'] === 'icon')
|
131
|
131
|
formData += "<i class='mdi mdi-" + value + "' style='margin-left: 5px'></i>";
|
132
|
|
- formData += '<input name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" value="' + value + '" required />';
|
133
|
|
-
|
|
132
|
+ if (this.editableTypes[i]['name'] === 'description')
|
|
133
|
+ formData += '<textarea name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" required >' + value + '</textarea>';
|
|
134
|
+ else
|
|
135
|
+ formData += '<input name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" value="' + value + '" required />';
|
134
|
136
|
}
|
135
|
137
|
}
|
136
|
138
|
formData += "</div></form>";
|
|
@@ -210,9 +212,7 @@ class ListManager {
|
210
|
212
|
if (index === -1)
|
211
|
213
|
index = this.displayedData.length - 1;
|
212
|
214
|
let iconContainer = this.displayedData[index].find(".list-category");
|
213
|
|
- for (let i = 0; i < categories.length; i++) {
|
214
|
|
- iconContainer.html(this.getCategoryIcons(this.currentData[index]['id']));
|
215
|
|
- }
|
|
215
|
+ iconContainer.html(this.getCategoryIcons(this.currentData[index]['id']));
|
216
|
216
|
}
|
217
|
217
|
|
218
|
218
|
updateAssociationList(articleId, newCategories) {
|
|
@@ -229,6 +229,8 @@ class ListManager {
|
229
|
229
|
}
|
230
|
230
|
|
231
|
231
|
updateArticleImage(image, index) {
|
|
232
|
+ if (index === -1)
|
|
233
|
+ index = this.displayedData.length - 1;
|
232
|
234
|
$(this.displayedData[index].find("img")[0]).attr('src', window.URL.createObjectURL(image));
|
233
|
235
|
}
|
234
|
236
|
|