From 1ad4152de936039dfd30ffeec8bded43e42e0f59 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sat, 13 Nov 2004 22:49:34 +0000 Subject: [PATCH] be smarter again .. and encode the size of the popup in the className :) ... automagically makes this anchor been open as a 640x480 popup ! without toolbars and stuff, for the equivalent of target='_blank' just use class='popup' class='popup2' is used for fiche.php (and fiche.php olny) I plan to rename popup2 popup_f or sth like that. maybe... one day. it's cool atm --- htdocs/javascript/xorg.js | 10 ++++++++-- templates/admin/utilisateurs.tpl | 4 ++-- templates/docs/doc_carva.tpl | 4 ++-- templates/profil/adresses.tpl | 6 +++--- templates/profil/emploi.tpl | 10 +++++----- templates/profil/general.tpl | 8 ++++---- templates/profil/skill.tpl | 4 ++-- 7 files changed, 26 insertions(+), 20 deletions(-) diff --git a/htdocs/javascript/xorg.js b/htdocs/javascript/xorg.js index 241b32d..fbd8c9f 100644 --- a/htdocs/javascript/xorg.js +++ b/htdocs/javascript/xorg.js @@ -37,11 +37,13 @@ function getNow() { } -function popWin2(theNode) { +function popWin(theNode,w,h) { window.open(theNode.href, '_blank', - 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=900,height=700'); + 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width='+w+',height='+h); } +function popWin2(theNode) { popWin(theNode,900,700); } + function auto_links() { nodes = document.getElementsByTagName('a'); fqdn = document.URL; @@ -55,6 +57,10 @@ function auto_links() { if(node.className == 'popup2') { node.onclick = function () { popWin2(this); return false; }; } + if(matches = (/^popup_([0-9]*)x([0-9]*)$/).exec(node.className)) { + var w = matches[1], h = matches[2]; + node.onclick = function () { popWin(this,w,h); return false; }; + } } } diff --git a/templates/admin/utilisateurs.tpl b/templates/admin/utilisateurs.tpl index 5500b5f..8fff56a 100644 --- a/templates/admin/utilisateurs.tpl +++ b/templates/admin/utilisateurs.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: utilisateurs.tpl,v 1.19 2004-11-13 15:56:35 x2000habouzit Exp $ + $Id: utilisateurs.tpl,v 1.20 2004-11-13 22:49:35 x2000habouzit Exp $ ***************************************************************************} @@ -165,7 +165,7 @@ function del_fwd(fwd) { - [Voir fiche] + [Voir fiche] diff --git a/templates/docs/doc_carva.tpl b/templates/docs/doc_carva.tpl index 14cdd36..641c51e 100644 --- a/templates/docs/doc_carva.tpl +++ b/templates/docs/doc_carva.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: doc_carva.tpl,v 1.12 2004-11-13 15:56:36 x2000habouzit Exp $ + $Id: doc_carva.tpl,v 1.13 2004-11-13 22:49:35 x2000habouzit Exp $ ***************************************************************************} @@ -44,7 +44,7 @@

Pourquoi le nom de domaine carva.org ?

Dans le jargon de l'école, un 'carva' signifiait un 'X' lorsque celle-ci était - située sur la montagne Ste Geneviève ( + située sur la montagne Ste Geneviève ( voir la FAQ à ce sujet).


diff --git a/templates/profil/adresses.tpl b/templates/profil/adresses.tpl index 43a8534..2dde7cc 100644 --- a/templates/profil/adresses.tpl +++ b/templates/profil/adresses.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: adresses.tpl,v 1.8 2004-11-13 15:56:43 x2000habouzit Exp $ + $Id: adresses.tpl,v 1.9 2004-11-13 22:49:35 x2000habouzit Exp $ ***************************************************************************} @@ -76,7 +76,7 @@ transmis à l'AX - Quelle couleur ?? + Quelle couleur ?? @@ -184,7 +184,7 @@ transmis à l'AX - Quelle couleur ?? + Quelle couleur ?? diff --git a/templates/profil/emploi.tpl b/templates/profil/emploi.tpl index 6711af7..94c92f3 100644 --- a/templates/profil/emploi.tpl +++ b/templates/profil/emploi.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: emploi.tpl,v 1.8 2004-11-13 15:56:43 x2000habouzit Exp $ + $Id: emploi.tpl,v 1.9 2004-11-13 22:49:35 x2000habouzit Exp $ ***************************************************************************} @@ -49,7 +49,7 @@ transmis à l'AX - Quelle couleur ?? + Quelle couleur ?? @@ -120,7 +120,7 @@ transmis à l'AX - Quelle couleur ?? + Quelle couleur ?? @@ -204,7 +204,7 @@ transmis à l'AX - Quelle couleur ?? + Quelle couleur ?? @@ -258,7 +258,7 @@ Curriculum vitae
Le CV n'est jamais public.
- Comment remplir mon CV ?
+ Comment remplir mon CV ? diff --git a/templates/profil/general.tpl b/templates/profil/general.tpl index 3032ea5..37d6588 100644 --- a/templates/profil/general.tpl +++ b/templates/profil/general.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: general.tpl,v 1.16 2004-11-13 15:56:43 x2000habouzit Exp $ + $Id: general.tpl,v 1.17 2004-11-13 22:49:35 x2000habouzit Exp $ ***************************************************************************} @@ -182,7 +182,7 @@ transmis à l'AX - Quelle couleur ?? + Quelle couleur ?? @@ -208,7 +208,7 @@ site public - Quelle couleur ?? + Quelle couleur ?? @@ -234,7 +234,7 @@ site public - Quelle couleur ?? + Quelle couleur ?? diff --git a/templates/profil/skill.tpl b/templates/profil/skill.tpl index 6b2b2e3..8f62e2b 100644 --- a/templates/profil/skill.tpl +++ b/templates/profil/skill.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: skill.tpl,v 1.8 2004-11-13 15:56:43 x2000habouzit Exp $ + $Id: skill.tpl,v 1.9 2004-11-13 22:49:35 x2000habouzit Exp $ ***************************************************************************} @@ -169,7 +169,7 @@ Niveau - Quel niveau ? + Quel niveau ? {foreach from=$langue_name item=name key=i} -- 2.1.4