Browse Source

Updated MDI to match app version, and update icon while typing on popup

keplyx 1 year ago
parent
commit
7eea3d2fe5

BIN
assets/css/fonts/materialdesignicons-webfont.ttf View File


BIN
assets/css/fonts/materialdesignicons-webfont.woff View File


BIN
assets/css/fonts/materialdesignicons-webfont.woff2 View File


+ 1
- 1
assets/css/libs/materialdesignicons.min.css
File diff suppressed because it is too large
View File


+ 9
- 3
assets/js/listManager.js View File

@@ -127,9 +127,10 @@ class ListManager {
127 127
             } else if (this.editableTypes[i]['type'] === 'checkboxes') {
128 128
                 formData += this.getCategoryCheckboxes(defaultValues['id']);
129 129
             } else {
130
-                if (this.editableTypes[i]['name'] === 'icon')
131
-                    formData += "<i class='mdi mdi-" + value + "' style='margin-left: 5px'></i>";
132
-                if (this.editableTypes[i]['name'] === 'description')
130
+                if (this.editableTypes[i]['name'] === 'icon'){
131
+                    formData += "<i id='" + inputId + "Icon' 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 + '" onchange="ListManager.onIconInputChange(this)" required />';
133
+                } else if (this.editableTypes[i]['name'] === 'description')
133 134
                     formData += '<textarea name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" required >' + value + '</textarea>';
134 135
                 else
135 136
                     formData += '<input name="' + inputName + '" id="' + inputId + '" type="' + inputType + '" placeholder="Entrez une valeur" class="form-control" value="' + value + '" required />';
@@ -139,6 +140,11 @@ class ListManager {
139 140
         return formData;
140 141
     }
141 142
 
143
+    static onIconInputChange(input) {
144
+        const id = $(input).attr('id') + 'Icon';
145
+        $('#' + id).attr('class', 'mdi mdi-' + $(input).val());
146
+    }
147
+
142 148
     getImagePicker(id, index) {
143 149
         let imageSrc = undefined;
144 150
         if (index !== -1)

Loading…
Cancel
Save