2020-09-20 05:05:57 +00:00
|
|
|
/* @license http://www.gnu.org/licenses/gpl-2.0.html GPL-2.0 */
|
|
|
|
|
2020-05-27 12:35:12 +00:00
|
|
|
function initDelete()
|
2020-05-11 17:12:12 +00:00
|
|
|
{
|
|
|
|
var buttons = document.getElementsByClassName("delete");
|
|
|
|
for(index = 0; index < buttons.length; index++)
|
|
|
|
{
|
|
|
|
var button = buttons[index];
|
|
|
|
addClickHandler(button);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function addClickHandler(elem)
|
|
|
|
{
|
|
|
|
elem.addEventListener("click", function() {
|
|
|
|
if (!confirm(deleteMessage)) {
|
|
|
|
event.preventDefault();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
document.addEventListener("DOMContentLoaded", function() {
|
2020-05-27 12:35:12 +00:00
|
|
|
initDelete();
|
2020-05-11 17:12:12 +00:00
|
|
|
}, true);
|
2020-09-20 05:05:57 +00:00
|
|
|
|
|
|
|
/* @license-end */
|