Mercurial > bugzilla-dashboard
comparison js/modules/app.js @ 64:a196cc29fffb
ESC in dialog now makes it go away
author | Atul Varma <avarma@mozilla.com> |
---|---|
date | Sun, 25 Apr 2010 08:45:26 -0700 |
parents | 88b856b1353b |
children | 8294f3d1efee |
comparison
equal
deleted
inserted
replaced
63:88b856b1353b | 64:a196cc29fffb |
---|---|
268 function dismissDialogOnOutsideClick(event) { | 268 function dismissDialogOnOutsideClick(event) { |
269 if (event.target == this) | 269 if (event.target == this) |
270 $(this).fadeOut(); | 270 $(this).fadeOut(); |
271 }); | 271 }); |
272 | 272 |
273 function dismissDialogOnEscape(event) { | |
274 if (event.keyCode == 27) | |
275 $(this).fadeOut(); | |
276 } | |
277 | |
278 // For Safari. | |
279 $(".dialog").keyup(dismissDialogOnEscape); | |
280 // For Firefox. | |
281 $(".dialog").keypress(dismissDialogOnEscape); | |
282 | |
273 function setupDocumentTitleChanger(document) { | 283 function setupDocumentTitleChanger(document) { |
274 const BASE_TITLE = document.title; | 284 const BASE_TITLE = document.title; |
275 | 285 |
276 require("app/login").whenChanged( | 286 require("app/login").whenChanged( |
277 function changeTitle(user) { | 287 function changeTitle(user) { |