remove old stacks
This commit is contained in:
19
js/app.js
Normal file
19
js/app.js
Normal file
@@ -0,0 +1,19 @@
|
||||
window.onload = function() {
|
||||
document.body.addEventListener('htmx:responseError', function(evt) {
|
||||
console.log(evt.detail);
|
||||
});
|
||||
|
||||
document.dispatchEvent(new Event("loaded"));
|
||||
};
|
||||
|
||||
function is_positive_integer(val) {
|
||||
return /^\d+$/.test(val);
|
||||
}
|
||||
|
||||
function inventory_new_item_check_input() {
|
||||
return document.getElementById('new-item-name').value.length != 0
|
||||
&& is_positive_integer(document.getElementById('new-item-weight').value)
|
||||
}
|
||||
function check_weight() {
|
||||
return document.getElementById('new-item-weight').validity.valid;
|
||||
}
|
||||
Reference in New Issue
Block a user