[SPIP Zone] r4715 - /_plugins_/thickbox/thickbox.js

Author: fil@rezo.net
Date: Sat Aug 19 10:49:39 2006
New Revision: 4715

Log:
afficher la description (incomplet, car ne fonctionne pas quand on navigue)

Modified:
    _plugins_/thickbox/thickbox.js

Modified: _plugins_/thickbox/thickbox.js

--- _plugins_/thickbox/thickbox.js (original)
+++ _plugins_/thickbox/thickbox.js Sat Aug 19 10:49:39 2006
@@ -18,6 +18,21 @@
function TB_Image() {
   //var t = this.title || this.name || '<small>'+this.href+'</small>';
   var t = this.title || this.name ;
+ var dd;
+
+ // affiche les dd qui sont associes a des dt contenant des a class=thickbox
+// $("#documents_portfolio/dl/dt/a.thickbox/../../dd").each();
+
+// $("../../dt/../dd", this).show(); // OK mais pas parfait
+// $("parent::dt/parent::dl/dd", this).show();
+
+// $(this).parent().next().show();
+
+ // chercher une description (si je suis dans un dt => dd suivants)
+ if (dd = $(this.parentNode.parentNode).find('dd').get(0)) {
+ t += '<div class="description">'+ dd.innerHTML +'</div>';
+ }
+
   TB_on();
   TB_show(t,this.href,'image');
   return false;