Mercurial > hgrepos > hgweb.cgi > s4
changeset 907:ce1a355e7cb1
Warn password timeout in ajaxpost
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Mon, 04 Jan 2021 16:10:36 +0900 |
parents | 9f237a8f550d |
children | 78bed4445148 |
files | s4-main.js |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-main.js Mon Jan 04 09:29:37 2021 +0900 +++ b/s4-main.js Mon Jan 04 16:10:36 2021 +0900 @@ -172,8 +172,6 @@ }, 100); cnt++; } - ajaxSubmit.textContent = ajaxSubmit.back; - ajaxSubmit.disabled = false; console.log("Update "+cnt+"rows"); if (cnt>0 && ntr.scrollIntoView) { let option = {behavior: "smooth"}; @@ -250,6 +248,8 @@ let act = mypath+"?blog_fetch+"+rowid+"+f:"+fetchtime; function respUpdate(tbody) { + ajaxSubmit.textContent = ajaxSubmit.back; + ajaxSubmit.disabled = false; let div = document.createElement("div"), form, newform; try { div.innerHTML = tbody; @@ -260,6 +260,10 @@ } let update = replAddNews(form); let dispelem = myform.querySelector("textarea").parentNode; + if (div.querySelector('input[name="user"]')) { // is login form + dispInfoMomentary("Login Again Please", dispelem) + return; + } newform = new FormData(form); if (data.get("text") > "") { // Called by submit button myform.reset();