From: Pascal Corpet Date: Thu, 13 Jan 2005 00:44:55 +0000 (+0000) Subject: closes wish 218 : fermer la fiche avec la touche Esc X-Git-Tag: xorg/old~449 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=31bb370afe1c3a83b0f57ec7ba6f61fa5ae63f90;p=platal.git closes wish 218 : fermer la fiche avec la touche Esc git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-307 --- diff --git a/ChangeLog b/ChangeLog index 5e7aa62..2ace725 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,6 +37,7 @@ Bug/Wish : * Core : - #245: Use PEAR::Date to avoid 1970-2038 php limitations. -MC + - #145: Use melix address to log in. -Car * Emails : - #229: Possibility to show our melix address. -Car @@ -49,6 +50,7 @@ Bug/Wish : * Profile : - #65 : Add professionnal cellphone. -Car + - #170 : Remove region display for french departments. -Car * Validations : - #137: Now possible to add comments without any action. -MC @@ -109,6 +111,7 @@ Bug/Wish : * Fiche : - #83,208,222 : New fiche. -MC + - #218 : Quit fiche using Escape key. -Car * Lists : - #86 : Yet another old old wish : lists archives are online ! -MC diff --git a/htdocs/javascript/close_on_esc.js b/htdocs/javascript/close_on_esc.js new file mode 100644 index 0000000..588260d --- /dev/null +++ b/htdocs/javascript/close_on_esc.js @@ -0,0 +1,11 @@ +function closePopup() { + window.close(); +} +if (navigator.appName=="Microsoft Internet Explorer") { + function keyboardIE() { if (event.keyCode == 27) closePopup(); }; + document.onkeydown = keyboardIE; +} else { + function keyboardOther(e) { if (e.keyCode == 27) closePopup(); }; + document.onkeydown = keyboardOther; +} + diff --git a/templates/fiche.tpl b/templates/fiche.tpl index 64d11f0..f9993a5 100644 --- a/templates/fiche.tpl +++ b/templates/fiche.tpl @@ -24,6 +24,8 @@ function chgMainWinLoc( strPage ) { parent.opener.document.location = strPage; } + {/literal} diff --git a/templates/fiche_referent.tpl b/templates/fiche_referent.tpl index 5e68c8f..e3041e2 100644 --- a/templates/fiche_referent.tpl +++ b/templates/fiche_referent.tpl @@ -17,7 +17,12 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************} - + +{literal} + +{/literal} +