--- /dev/null
+<?php
+/***************************************************************************
+ * Copyright (C) 2003-2007 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 *
+ ***************************************************************************/
+require_once 'platal.inc.php';
+
+function smarty_compiler_javascript($tag_attrs, &$compiler)
+{
+ extract($compiler->_parse_attrs($tag_attrs));
+
+ if (!isset($name)) {
+ return null;
+ }
+ $name = pl_entities(trim($name, '\'"'), ENT_QUOTES);
+ $name = "javascript/$name.js";
+ if ($full) {
+ global $globals;
+ $name = $globals->baseurl . '/' . $name;
+ }
+
+ return "?><script type='text/javascript' src='$name'></script><?php";
+}
+
+/* vim: set expandtab enc=utf-8: */
+
+?>
</h1>
{if $actuel}
-<script type="text/javascript" src="javascript/ajax.js"></script>
+ {javascript name=ajax}
<table class="flags">
<tr>
<td class="orange">
{include file=../spool/wiki.d/cache_Xorg.Antispam.tpl part=1 included=1}
-<script type="text/javascript" src="javascript/ajax.js"></script>
+{javascript name=ajax}
<script type="text/javascript">//<![CDATA[
{literal}
function bogoUpdated()
<h1>Gestion de mes courriers électroniques</h1>
-<script type="text/javascript" src="javascript/ajax.js">
-</script>
+{javascript name=ajax}
{literal}
<script type="text/javascript">
function bestaliasUpdated() {
<a href="Xorg/SMTPS%E9curis%E9">service d'envoi de courrier SMTP sécurisé</a>.
</p>
- <script type="text/javascript" src="javascript/ajax.js"></script>
+ {javascript name=ajax}
<script type="text/javascript">//<![CDATA[
{literal}
function redirectUpdate()
<span class="comm"><a href="wiki_help" class="popup3">{icon name=information title="Syntaxe wiki"} Voir la syntaxe wiki</a></span>
</td>
<td class="dcold">
- <script type="text/javascript" src="javascript/ajax.js"></script>
+ {javascript name=ajax}
<div id="cv_preview" style="display: none"></div>
<textarea name="cv" id="cv" rows="15" cols="40">{$cv}</textarea><br />
<input type="submit" name="preview" value="Aperçu" onclick="previewWiki('cv', 'cv_preview', true, 'cv_preview'); return false;" />
{* *}
{**************************************************************************}
-{literal}
-<script type="text/javascript" src="javascript/close_on_esc.js">
-</script>
-{/literal}
-
+{javascript name=ajax}
<div id="fiche">
<div class="center">
<span class="comm">Commentaire ? ICQ ? etc...</span>
</td>
<td class="dcold">
- <script type="text/javascript" src="javascript/ajax.js"></script>
+ {javascript name=ajax}
<div id="ft_preview" style="display: none"></div>
<textarea name="freetext" id="freetext" rows="3" cols="29" >{$freetext}</textarea>
<br/>
{foreach from=$xorg_js item=js}
<script type="text/javascript" src="javascript/{$js}"></script>
{/foreach}
- <script type="text/javascript" src="javascript/overlib.js"></script>
- <script type="text/javascript" src="javascript/md5.js"></script>
- <script type="text/javascript" src="javascript/sha1.js"></script>
- <script type="text/javascript" src="javascript/secure_hash.js"></script>
+ {javascript name=overlib}
+ {javascript name=md5}
+ {javascript name=sha1}
+ {javascript name=secure_hash}
{if $xorg_rss}
<link rel="alternate" type="application/rss+xml" title="{$xorg_rss.title}" href="{$xorg_rss.href}" />
{foreach from=$xorg_js item=js}
<script type="text/javascript" src="javascript/{$js}"></script>
{/foreach}
- <script type="text/javascript" src="javascript/overlib.js"></script>
-
+ {javascript name=overlib}
+
{if $xorg_rss}
<link rel="alternate" type="application/rss+xml" title="{$xorg_rss.title}" href="{$xorg_rss.href}" />
{/if}
<div>Me connecter :</div>
<a class='gp' href="login/{if $platal->pl_self() eq 'exit'}index{else}{$platal->pl_self()}{/if}">polytechnicien</a>
{if $platal->pl_self() neq 'exit'}
- <script type="text/javascript" src="javascript/jquery.js"></script>
+ {javascript name=jquery}
<script type="text/javascript" src="login/autologin/{$platal->pl_self()}?forceXml=1"></script>
{/if}
{/if}