Mercurial > hg > fapweb
changeset 114:b5981168ed85
Highlight element being queried for deletion when showing the confirmation dialog.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 22 Oct 2013 12:26:01 +0300 |
parents | 671330b7f5d1 |
children | 87d3ce535834 |
files | ajax.js |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ajax.js Tue Oct 22 12:09:32 2013 +0300 +++ b/ajax.js Tue Oct 22 12:26:01 2013 +0300 @@ -143,10 +143,16 @@ setTimeout(func, 50); } + var item = document.getElementById(prefix+id); + var tmp = item.style.background; + item.style.background = "red"; + if (confirm("Are you sure you want to delete "+dsc+" #"+id+"?")) { sendPOSTRequest("action=delete&type="+type+"&id="+id, msuccess); } + + item.style.background = tmp; }