Use template for image entry

This commit is contained in:
javl
2026-08-18 10:23:02 +02:00
parent f3bcff11f5
commit ee8f22c588
3 changed files with 54 additions and 58 deletions
+18
View File
@@ -93,6 +93,24 @@
</div>
<div class="table-cell">
<ul id="image-size-settings"></ul>
<template id="image-size-entry-template">
<li>
<div class="image-size-row image-size-header">
<img class="image-size-thumb" alt="" />
<span class="file-info file-name js-file-name"></span>
<button type="button" class="remove-button js-remove">remove image</button>
</div>
<div class="image-size-row">
<input type="number" min="1" class="size-input js-width" name="width" />
<span>x</span>
<input type="number" min="1" class="size-input js-height" name="height" />
</div>
<div class="image-size-row">
<span class="file-info">glyph name</span>
<input type="text" class="glyph-input js-glyph" name="glyph" />
</div>
</li>
</template>
<div id="only-images-file-error" class="msg error-msg">Only images file type are allowed</div>
<div class="no-file-selected msg">Select one or more images at <a href="#step-1">step 1</a> first.</div>
<button id="all-same-size" onclick="allSameSize()">Apply first image size to all images</button>