Updated MDI to match app version, and update icon while typing on popup
This commit is contained in:
parent
edf5641aff
commit
7eea3d2fe5
5 changed files with 10 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
assets/css/libs/materialdesignicons.min.css
vendored
2
assets/css/libs/materialdesignicons.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -127,9 +127,10 @@ class ListManager {
|
||||||
} else if (this.editableTypes[i]['type'] === 'checkboxes') {
|
} else if (this.editableTypes[i]['type'] === 'checkboxes') {
|
||||||
formData += this.getCategoryCheckboxes(defaultValues['id']);
|
formData += this.getCategoryCheckboxes(defaultValues['id']);
|
||||||
} 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 id='" + inputId + "Icon' class='mdi mdi-" + value + "' style='margin-left: 5px'></i>";
|
||||||
if (this.editableTypes[i]['name'] === 'description')
|
formData += '<input name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" value="' + value + '" onchange="ListManager.onIconInputChange(this)" required />';
|
||||||
|
} else if (this.editableTypes[i]['name'] === 'description')
|
||||||
formData += '<textarea name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" required >' + value + '</textarea>';
|
formData += '<textarea name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" required >' + value + '</textarea>';
|
||||||
else
|
else
|
||||||
formData += '<input name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" value="' + value + '" required />';
|
formData += '<input name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" value="' + value + '" required />';
|
||||||
|
@ -139,6 +140,11 @@ class ListManager {
|
||||||
return formData;
|
return formData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static onIconInputChange(input) {
|
||||||
|
const id = $(input).attr('id') + 'Icon';
|
||||||
|
$('#' + id).attr('class', 'mdi mdi-' + $(input).val());
|
||||||
|
}
|
||||||
|
|
||||||
getImagePicker(id, index) {
|
getImagePicker(id, index) {
|
||||||
let imageSrc = undefined;
|
let imageSrc = undefined;
|
||||||
if (index !== -1)
|
if (index !== -1)
|
||||||
|
|
Loading…
Reference in a new issue