source: spip-zone/_plugins_/thickbox/head.php @ 5392

Last change on this file since 5392 was 5392, checked in by fil@…, 15 years ago

up jquery + reparation du plugin thickbox (toujours en version 1 de thickbox)

File size: 920 bytes
Line 
1<?php
2
3function ThickBox_insert_head($flux){
4
5// on ajoute la class thickbox aux liens de type="image/xxx"
6
7// TODO: ne charger thickbox.js et thickbox.css que si
8// $("a.thickbox,a[@type='image/jpeg'],...").size() > 0)
9
10$flux .=
11
12'
13<script src=\''.url_absolue(find_in_path('thickbox.js')).'\' type=\'text/javascript\'></script>
14<link rel="stylesheet" href="'.url_absolue(find_in_path('thickbox.css')).'" type="text/css" media="projection, screen" />
15
16<script type="text/javascript"><!--
17$(document).ready(function() {
18        alert(10);
19        if ($("a.thickbox,a[@type=\'image/jpeg\'],a[@type=\'image/png\'],a[@type=\'image/gif\']").addClass("thickbox").size()) {
20TB_chemin_animation = "'.url_absolue(find_in_path('circle_animation.gif')).'";
21TB_chemin_close = "'.url_absolue(find_in_path('close.gif')).'";
22TB_chemin_css = "'.url_absolue(find_in_path('thickbox.css')).'";
23        TB_init();
24}
25} );
26// --></script>';
27
28        return $flux;
29}
30
31?>
Note: See TracBrowser for help on using the repository browser.