use Caribou's script for fiche_referent as well
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Thu, 13 Jan 2005 07:05:51 +0000 (07:05 +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-308

htdocs/fiche.php
htdocs/fiche_referent.php
htdocs/javascript/close_on_esc.js
templates/fiche.tpl
templates/password_prompt.tpl

index acf01d2..67ddca9 100644 (file)
@@ -86,6 +86,8 @@ $res = $globals->xdb->query(
                AND alias LIKE '%@{$globals->mail->alias_dom}'",
         Session::getInt('uid'), $user['forlife'].'@'.$globals->mail->domain, $user['forlife'].'@'.$globals->mail->domain2);
 $page->assign('virtualalias', $res->fetchOneCell());
+
+$page->addJsLink('javascript/close_on_esc.js');
 $page->run();
 
 ?>
index b2d876f..b7107a6 100644 (file)
@@ -89,6 +89,7 @@ $res = $globals->xdb->query(
       LEFT JOIN  geoloc_pays AS gp ON(m.pid = gp.a2)
           WHERE  uid = {?}", $user_id);
 $page->assign('pays', $res->fetchColumn());
-$page->run();
 
+$page->addJsLink('javascript/close_on_esc.js');
+$page->run();
 ?>
index 588260d..f4f3d87 100644 (file)
@@ -1,11 +1,31 @@
+/***************************************************************************
+ *  Copyright (C) 2003-2004 Polytechnique.org                              *
+ *  http://opensource.polytechnique.org/                                   *
+ *                                                                         *
+ *  This program is free software; you can redistribute it and/or modify   *
+ *  it under the terms of the GNU General Public License as published by   *
+ *  the Free Software Foundation; either version 2 of the License, or      *
+ *  (at your option) any later version.                                    *
+ *                                                                         *
+ *  This program is distributed in the hope that it will be useful,        *
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
+ *  GNU General Public License for more details.                           *
+ *                                                                         *
+ *  You should have received a copy of the GNU General Public License      *
+ *  along with this program; if not, write to the Free Software            *
+ *  Foundation, Inc.,                                                      *
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
+ ***************************************************************************/
+
 function closePopup() {
-  window.close();
+    window.close();
 }
 if (navigator.appName=="Microsoft Internet Explorer") {
-  function keyboardIE() { if (event.keyCode == 27) closePopup(); };
-  document.onkeydown = keyboardIE;
+    function keyboardIE() { if (event.keyCode == 27) closePopup(); };
+    document.onkeydown = keyboardIE;
 } else {
-  function keyboardOther(e) { if (e.keyCode == 27) closePopup(); };
-  document.onkeydown = keyboardOther;
+    function keyboardOther(e) { if (e.keyCode == 27) closePopup(); };
+    document.onkeydown = keyboardOther;
 }
 
index f9993a5..feefb32 100644 (file)
@@ -24,8 +24,6 @@ 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">
@@ -38,11 +36,11 @@ function chgMainWinLoc( strPage ) {
           <img src="images/vcard.png" alt="Afficher la carte de visite" title="Afficher la carte de visite"/>
         </a>
         {if !$x.is_contact}
-        <a href="javascript:x()"  onclick="chgMainWinLoc('{"carnet/mescontacts.php"|url}?action=ajouter&amp;user={$x.forlife}')">
+        <a href="javascript:x()"  onclick="chgMainWinLoc('{rel}/carnet/mescontacts.php?action=ajouter&amp;user={$x.forlife}')">
           <img src="images/ajouter.gif" alt="Ajouter à mes contacts" title="Ajouter à mes contacts" />
         </a>
         {else}
-        <a href="javascript:x()"  onclick="chgMainWinLoc('{"carnet/mescontacts.php"|url}?action=retirer&amp;user={$x.forlife}')">
+        <a href="javascript:x()"  onclick="chgMainWinLoc('{rel}/carnet/mescontacts.php?action=retirer&amp;user={$x.forlife}')">
           <img src="images/retirer.gif" alt="Retirer de mes contacts" title="Retirer de mes contacts" />
         </a>
         {/if}
index fe487b6..6a54523 100644 (file)
@@ -61,7 +61,7 @@ Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi
 <br />
 
 <form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit="doChallengeResponse(); return false;">
-  <table class="tinybicol" cellpadding="4" summary="Formulaire de login">
+  <table class="bicol" cellpadding="4" summary="Formulaire de login">
     <tr>
       <th colspan="2">Connexion</th>
     </tr>