Mercurial > hg > fapweb
diff ajax.js @ 730:c71948773f03
Add preliminary preview zoom function.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 18 Nov 2014 23:37:46 +0200 |
parents | 8b1abca34033 |
children | c7b4139eb217 |
line wrap: on
line diff
--- a/ajax.js Tue Nov 18 23:00:57 2014 +0200 +++ b/ajax.js Tue Nov 18 23:37:46 2014 +0200 @@ -188,3 +188,20 @@ } } + +function jsShowPreviewImage(file) +{ + var nitem = document.getElementById("messageBox"); + if (nitem) + { + nitem.innerHTML = "<img src='"+file+"' alt='"+file+"' /><br />"+ + "<div class='messageBoxControls'>"+ + "<input id='messageBoxClose' type='button' value=' Close '>"+ + "</div>"; + + var elem = document.getElementById("messageBoxClose"); + elem.onclick = function () { jsCloseMessageBox(0, 0); } + + nitem.style.display = "block"; + } +}