| 1 |
// $Id: thickbox_auto.js,v 1.2.2.4 2007/06/05 07:34:35 frjo Exp $ |
// $Id: thickbox_auto.js,v 1.2.2.5 2007/09/30 07:14:38 frjo Exp $ |
| 2 |
|
|
| 3 |
/** |
/** |
| 4 |
* ATTENTION: this script has to be loaded _before_ thickbox.js |
* ATTENTION: this script has to be loaded _before_ thickbox.js |
| 32 |
$("a[img.image.image-thumbnail]", context).not(".thickbox").not(".category").each(function(i) { |
$("a[img.image.image-thumbnail]", context).not(".thickbox").not(".category").each(function(i) { |
| 33 |
var img = $(this).children("img"); |
var img = $(this).children("img"); |
| 34 |
var title = $(this).attr("title") || img.attr("title") || img.attr("alt") || null; |
var title = $(this).attr("title") || img.attr("title") || img.attr("alt") || null; |
| 35 |
|
var settings = Drupal.settings.thickbox; |
| 36 |
|
|
| 37 |
/** |
/** |
| 38 |
* ATTENTION: Until the derivate Bug (http://drupal.org/node/125610) is fixed, |
* ATTENTION: Until the derivate Bug (http://drupal.org/node/125610) is fixed, |
| 39 |
* the script should allways use the original picture ("true || "). |
* the script should allways use the original picture ("true || "). |
| 40 |
*/ |
*/ |
| 41 |
if (thickbox_derivative == "_original") { |
if (settings.derivative == "_original") { |
| 42 |
var href = img.attr("src").replace(".thumbnail", ""); |
var href = img.attr("src").replace(".thumbnail", ""); |
| 43 |
} |
} |
| 44 |
else { |
else { |
| 45 |
var href = img.attr("src").replace(".thumbnail", "." + thickbox_derivative); |
var href = img.attr("src").replace(".thumbnail", "." + settings.derivative); |
| 46 |
} |
} |
| 47 |
|
|
| 48 |
// Finally rewrite the link and wait for thickbox.js to apply the effects. |
// Finally rewrite the link and wait for thickbox.js to apply the effects. |