SusiMail: Replace onclick part 2

This commit is contained in:
zzz
2020-05-12 17:32:46 +00:00
parent 0eef0dd21b
commit 8aa23c7dc7
2 changed files with 15 additions and 1 deletions

View File

@ -18,6 +18,13 @@ function initButtons() {
addClickHandler3(button);
}
// TODO delete button, to show really-delete section or popup
buttons = document.getElementsByClassName("tdclick");
for(index = 0; index < buttons.length; index++)
{
var button = buttons[index];
addClickHandler4(button);
}
}
function addClickHandler1(elem)
@ -61,6 +68,13 @@ function addClickHandler3(elem)
});
}
function addClickHandler4(elem)
{
elem.addEventListener("click", function() {
document.location = elem.getAttribute("onclickloc");
});
}
function deleteboxclicked() {
var hasOne = false;
var hasAll = true;

View File

@ -3202,7 +3202,7 @@ public class WebMail extends HttpServlet
String b64UIDL = Base64.encode(uidl);
String loc = myself + '?' + (folderName.equals(DIR_DRAFTS) ? NEW_UIDL : SHOW) + '=' + b64UIDL + floc;
String link = "<a href=\"" + loc + "\" class=\"" + type + "\">";
String jslink = " onclick=\"document.location='" + loc + "';\" ";
String jslink = " class=\"tdclick\" onclickloc=\"" + loc + "\" ";
boolean idChecked = false;
String checkId = sessionObject.pageChanged ? null : request.getParameter( "check" + b64UIDL );