59 lines
2.8 KiB
JavaScript
59 lines
2.8 KiB
JavaScript
class HtmlElements {
|
|
|
|
static store = {
|
|
editStoreSection: function (name) {
|
|
return "<div class=\"editStoreSection\" style=\"display: none; padding: 10px; overflow: hidden;\">\n" +
|
|
" <form class='editStoreForm'>\n" +
|
|
" <div class=\"row g-3 mb-3 align-items-center\">\n" +
|
|
" <div class=\"col-auto\">\n" +
|
|
" <label for=\"editStoreName\" class=\"col-form-label\">Store name:</label>\n" +
|
|
" </div>\n" +
|
|
" <div class=\"col-auto\">\n" +
|
|
" <input type=\"text\" id=\"editStoreName\" class=\"form-control\" value='"+name+"'>\n" +
|
|
" </div>\n" +
|
|
" </div>\n" +
|
|
" <div class=\"row g-3 mb-3 align-items-center\">\n" +
|
|
" <div class=\"col-auto\">\n" +
|
|
" <label for=\"editStoreChain\" class=\"col-form-label\">Chain:</label>\n" +
|
|
" </div>\n" +
|
|
" <div class=\"col-auto\">\n" +
|
|
" <select id=\"editStoreChain\" class=\"form-select\">\n" +
|
|
" <option>--Select a chain--</option>\n" +
|
|
" <option>Rema 1000</option>\n" +
|
|
" <option>Coop Obs</option>\n" +
|
|
" <option>Coop Extra</option>\n" +
|
|
" </select>\n" +
|
|
" </div>\n" +
|
|
" </div>\n" +
|
|
" <button type='submit' class='btn btn-primary'>Save</button>\n" +
|
|
" </form>\n" +
|
|
" <hr>\n" +
|
|
"</div>";
|
|
},
|
|
editStoreSectionEvents: function(){
|
|
},
|
|
|
|
items: {
|
|
|
|
},
|
|
|
|
addItemSection:
|
|
"<span class='addItemFormWrapper'>\n" +
|
|
" <hr>\n" +
|
|
" <form action='#!' class='form-row input-group input-group-sm addItemForm'>\n" +
|
|
" <div class='form-control form-floating'>\n" +
|
|
" <input type='text' id='newItemName0' class='form-control newItemName' placeholder='New Item Name' aria-label='New Item Name' autocomplete='off' autocapitalize='on'>\n" +
|
|
" <label for='newItemName0'>New Item Name</label>\n" +
|
|
" </div>\n" +
|
|
" <div class='form-control form-floating'>\n" +
|
|
" <input type='number' id='newItemPrice0' class='form-control newItemPrice' value='0' min='0' step='.01' aria-label='Price'>\n" +
|
|
" <label for='newItemPrice0'>Price</label>\n" +
|
|
" </div>\n" +
|
|
" <div class='input-group-append'>\n" +
|
|
" <input type='image' class='form-control addItem' src='../icon/plus.svg' alt='+'>\n" +
|
|
" </div>\n" +
|
|
// " <div class='itemSearchDropdown' style='display: none;'><ul></ul></div>\n" +
|
|
" </form>\n" +
|
|
"</span>"
|
|
}
|
|
} |