version 4.8.17 -- カレンダーで今日以降しか選べないようにした

This commit is contained in:
hayano
2024-08-09 23:49:36 +00:00
parent 3d195973fc
commit 95b787c819
255 changed files with 59200 additions and 53 deletions

29
static/admin/js/cancel.js Normal file
View File

@ -0,0 +1,29 @@
'use strict';
{
// Call function fn when the DOM is loaded and ready. If it is already
// loaded, call the function now.
// http://youmightnotneedjquery.com/#ready
function ready(fn) {
if (document.readyState !== 'loading') {
fn();
} else {
document.addEventListener('DOMContentLoaded', fn);
}
}
ready(function() {
function handleClick(event) {
event.preventDefault();
const params = new URLSearchParams(window.location.search);
if (params.has('_popup')) {
window.close(); // Close the popup.
} else {
window.history.back(); // Otherwise, go back.
}
}
document.querySelectorAll('.cancel-link').forEach(function(el) {
el.addEventListener('click', handleClick);
});
});
}