/[drupal]/contributions/modules/thickbox/thickbox_auto.js
ViewVC logotype

Diff of /contributions/modules/thickbox/thickbox_auto.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2.2.5, Sun Sep 30 07:14:38 2007 UTC revision 1.2.2.6, Mon Dec 1 02:33:50 2008 UTC
# Line 1  Line 1 
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
# Line 32  function TB_drupal_rewrite(context, grou Line 32  function TB_drupal_rewrite(context, grou
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.

Legend:
Removed from v.1.2.2.5  
changed lines
  Added in v.1.2.2.6

  ViewVC Help
Powered by ViewVC 1.1.2