Close ballot dialog if Escape is pressed

- Legacy-Id: 1912
This commit is contained in:
Pasi Eronen 2010-01-07 19:46:58 +00:00
parent 36631c6339
commit 2f3d6d88af

View file

@ -49,10 +49,11 @@ function showBallot(draftName, trackerId) {
var buttons = [{text:"Close", handler:handleClose, isDefault:true}];
buttons.unshift({text:"Edit Position", handler:handleEditPosition});
var kl = [new YAHOO.util.KeyListener(document, {keys:27}, handleClose)]
IETF.ballotDialog = new YAHOO.widget.Dialog("doc_ballot_dialog", {
visible:false, draggable:false, close:true, modal:true,
width:"850px", fixedcenter:true, constraintoviewport:true,
buttons: buttons});
buttons: buttons, keylisteners:kl});
IETF.ballotDialog.render();
}
document.getElementById("doc_ballot_dialog_name").innerHTML = draftName;