Author: fil@rezo.net
Date: Tue Aug 8 18:57:51 2006
New Revision: 4443
Log:
on ne va pas charger le thickbox.js si on n'en n'a pas besoin, grace a http://www.codehouse.com/javascript/articles/external/
Modified:
_plugins_/thickbox/head.php
_plugins_/thickbox/thickbox.js
Modified: _plugins_/thickbox/head.php
--- _plugins_/thickbox/head.php (original)
+++ _plugins_/thickbox/head.php Tue Aug 8 18:57:51 2006
@@ -11,14 +11,17 @@
'
<script type="text/javascript"><!--
+$(document).load(function() {
+ if ($("a.thickbox,a[@type=\'image/jpeg\'],a[@type=\'image/png\'],a[@type=\'image/gif\']").addClass("thickbox").size()) {
TB_chemin_animation = "'.url_absolue(find_in_path('circle_animation.gif')).'";
TB_chemin_close = "'.url_absolue(find_in_path('close.gif')).'";
TB_chemin_css = "'.url_absolue(find_in_path('thickbox.css')).'";
-$(document).load(function() {
- $("a[@type=\'image/jpeg\'],a[@type=\'image/png\'],a[@type=\'image/gif\']").addClass("thickbox");
-} );
+var e = document.createElement("script");
+e.src = \''.url_absolue(find_in_path('thickbox.js')).'\';
+e.type="text/javascript";
+document.getElementsByTagName("head")[0].appendChild(e);
+}});
// --></script>
-<script src=\''.url_absolue(find_in_path('thickbox.js')).'\' type=\'text/javascript\'></script>
';
return $flux;
Modified: _plugins_/thickbox/thickbox.js
--- _plugins_/thickbox/thickbox.js (original)
+++ _plugins_/thickbox/thickbox.js Tue Aug 8 18:57:51 2006
@@ -9,6 +9,7 @@
* - added an image gallery
* - added keyboard navigation ('n'ext, 'p'revious, 'q'uit)
* - customize path to the css and wheel image
+ * - default size for thickbox links that have no width x height indicated
* - don't load css when not needed
* - TODO: don't load js when not needed!!
*/