From 997534c7c855650165d3793a25b03d27839c76c4 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Sat, 13 Nov 2004 16:01:42 +0000 Subject: [PATCH] put all together in one .js --- htdocs/javascript/misc.js | 39 -------------------------------- htdocs/javascript/{popups.js => xorg.js} | 19 ++++++++++++++++ templates/skin/common.header.tpl | 5 ++-- 3 files changed, 21 insertions(+), 42 deletions(-) delete mode 100644 htdocs/javascript/misc.js rename htdocs/javascript/{popups.js => xorg.js} (79%) diff --git a/htdocs/javascript/misc.js b/htdocs/javascript/misc.js deleted file mode 100644 index f3369a8..0000000 --- a/htdocs/javascript/misc.js +++ /dev/null @@ -1,39 +0,0 @@ -/*************************************************************************** - * 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 getNow() { - dt=new Date(); - dy=dt.getDay(); - mh=dt.getMonth(); - wd=dt.getDate(); - yr=dt.getYear(); - if (yr<1000) yr += 1900; - hr=dt.getHours(); - mi=dt.getMinutes(); - if (mi<10) - time=hr+":0"+mi; - else - time=hr+":"+mi; - days=new Array ("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"); - months=new Array ("janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"); - return days[dy]+" "+wd+" "+months[mh]+" "+yr+"
"+time; -} - -function popup(an) { window.open(an.href); return false; } diff --git a/htdocs/javascript/popups.js b/htdocs/javascript/xorg.js similarity index 79% rename from htdocs/javascript/popups.js rename to htdocs/javascript/xorg.js index 8f81696..241b32d 100644 --- a/htdocs/javascript/popups.js +++ b/htdocs/javascript/xorg.js @@ -18,6 +18,25 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ +function getNow() { + dt=new Date(); + dy=dt.getDay(); + mh=dt.getMonth(); + wd=dt.getDate(); + yr=dt.getYear(); + if (yr<1000) yr += 1900; + hr=dt.getHours(); + mi=dt.getMinutes(); + if (mi<10) + time=hr+":0"+mi; + else + time=hr+":"+mi; + days=new Array ("Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"); + months=new Array ("janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"); + return days[dy]+" "+wd+" "+months[mh]+" "+yr+"
"+time; +} + + function popWin2(theNode) { window.open(theNode.href, '_blank', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=900,height=700'); diff --git a/templates/skin/common.header.tpl b/templates/skin/common.header.tpl index 98cf8ec..cdf2d27 100644 --- a/templates/skin/common.header.tpl +++ b/templates/skin/common.header.tpl @@ -17,7 +17,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: common.header.tpl,v 1.16 2004-11-13 15:56:47 x2000habouzit Exp $ + $Id: common.header.tpl,v 1.17 2004-11-13 16:01:42 x2000habouzit Exp $ ***************************************************************************} @@ -46,7 +46,6 @@ Anciens eleves Polytechnique, annuaire email, Alumni {/if} - - + {* vim:set et sw=2 sts=2 sws=2: *} -- 2.1.4