From 95e06e87d1c60317e2a60f67a1057320d8ed9133 Mon Sep 17 00:00:00 2001 From: "Pierre Habouzit (MadCoder" Date: Thu, 13 Jan 2005 07:05:51 +0000 Subject: [PATCH] use Caribou's script for fiche_referent as well git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-308 --- htdocs/fiche.php | 2 ++ htdocs/fiche_referent.php | 3 ++- htdocs/javascript/close_on_esc.js | 30 +++++++++++++++++++++++++----- templates/fiche.tpl | 6 ++---- templates/password_prompt.tpl | 2 +- 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/htdocs/fiche.php b/htdocs/fiche.php index acf01d2..67ddca9 100644 --- a/htdocs/fiche.php +++ b/htdocs/fiche.php @@ -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(); ?> diff --git a/htdocs/fiche_referent.php b/htdocs/fiche_referent.php index b2d876f..b7107a6 100644 --- a/htdocs/fiche_referent.php +++ b/htdocs/fiche_referent.php @@ -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(); ?> diff --git a/htdocs/javascript/close_on_esc.js b/htdocs/javascript/close_on_esc.js index 588260d..f4f3d87 100644 --- a/htdocs/javascript/close_on_esc.js +++ b/htdocs/javascript/close_on_esc.js @@ -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; } diff --git a/templates/fiche.tpl b/templates/fiche.tpl index f9993a5..feefb32 100644 --- a/templates/fiche.tpl +++ b/templates/fiche.tpl @@ -24,8 +24,6 @@ function chgMainWinLoc( strPage ) { parent.opener.document.location = strPage; } - {/literal} @@ -38,11 +36,11 @@ function chgMainWinLoc( strPage ) { Afficher la carte de visite {if !$x.is_contact} - + Ajouter à mes contacts {else} - + Retirer de mes contacts {/if} diff --git a/templates/password_prompt.tpl b/templates/password_prompt.tpl index fe487b6..6a54523 100644 --- a/templates/password_prompt.tpl +++ b/templates/password_prompt.tpl @@ -61,7 +61,7 @@ Si tu n'es pas {insert name="getName"}, change le login ci-dessous, ou rends-toi
-
+
-- 2.1.4
Connexion