closes wish 218 : fermer la fiche avec la touche Esc
authorPascal Corpet <pascal.corpet@m4x.org>
Thu, 13 Jan 2005 00:44:55 +0000 (00:44 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:27:31 +0000 (23:27 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-307

ChangeLog
htdocs/javascript/close_on_esc.js [new file with mode: 0644]
templates/fiche.tpl
templates/fiche_referent.tpl

index 5e7aa62..2ace725 100644 (file)
--- 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 (file)
index 0000000..588260d
--- /dev/null
@@ -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;
+}
+
index 64d11f0..f9993a5 100644 (file)
@@ -24,6 +24,8 @@ function chgMainWinLoc( strPage ) {
   parent.opener.document.location = strPage;
 }
 </script>
+<script type="text/javascript" src="javascript/close_on_esc.js">
+</script>
 {/literal}
 
 <table id="fiche" cellpadding="0" cellspacing="0">
index 5e68c8f..e3041e2 100644 (file)
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************}
+
+{literal}
+<script type="text/javascript" src="javascript/close_on_esc.js">
+</script>
+{/literal}
+
 <div id="fiche">
   
   <div class="center">