s4

changeset 910:043748271354

Copy attributes from old POST button to new ajax-post button
author HIROSE Yuuji <yuuji@gentei.org>
date Tue, 05 Jan 2021 13:14:26 +0900
parents 1442d73c55e5
children fe6e6b72de17
files s4-main.js
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/s4-main.js	Tue Jan 05 13:03:51 2021 +0900
     1.2 +++ b/s4-main.js	Tue Jan 05 13:14:26 2021 +0900
     1.3 @@ -620,8 +620,10 @@
     1.4  		console.log("b="+b+", tc="+b.textContent);
     1.5  		b.addEventListener("click", ajaxPost, false);
     1.6  		// i.insertAdjacentElement('afterend', b);
     1.7 +		b.setAttribute("class", i.getAttribute("class"))
     1.8 +		b.setAttribute("title", i.getAttribute("title"))
     1.9 +		i.parentNode.replaceChild(b, i);
    1.10  		b.id = i.id;
    1.11 -		i.parentNode.replaceChild(b, i);
    1.12  		i.remove();
    1.13  	    }
    1.14  	i = document.getElementById("reload");