+++ /dev/null
-/***************************************************************************
- * Copyright (C) 2003-2011 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 *
- ***************************************************************************/
-
-$(window).keydown(
- function(e) {
- if (e.keyCode == 27) {
- window.close();
- }
- });
-
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
xpost: function(source, data, onSuccess, onError, type) {
return $.xajax(source, 'POST', data, onSuccess, onError, type);
+ },
+
+ closeOnEsc: function() {
+ return $(window).keydown(function (e) {
+ if (e.keyCode == 27) {
+ window.close();
+ }
+ });
}
});
$page->assign('view', $view);
$page->assign('logged', S::logged());
- $page->addJsLink('close_on_esc.js');
header('Last-Modified: ' . date('r', strtotime($profile->last_change)));
}
LEFT JOIN geoloc_countries AS gc ON (m.country = gc.iso_3166_1_a2)
WHERE pid = {?}", $pf->id());
$page->assign('pays', $res->fetchColumn());
-
- $page->addJsLink('close_on_esc.js');
}
function handler_ref_country(&$page)
{* *}
{**************************************************************************}
+<script type="text/javascript">
+ $($.closeOnEsc);
+</script>
+
{assign var=terms value=$profile->getMentoringTerms()}
{assign var=countries value=$profile->getMentoringCountries()}
<div id="fiche">
document.location = strPage;
}
}
+
+$($.closeOnEsc);
+
//]]></script>
{/literal}