I just wanted to use on thickbox file for several environments(the same file available under several urls), but I noticed that I have to set the loadingAnimation-image-url statically, so I thought let’s change that and I made a patch, so that you just only need to set the variable TB_LoadingAnimation to the position of the image. I does not matter if you set it before or after loading thickbox.js. Here’s the code which I added on top of the thickbox.js file, it checks whether the variable is already set and if not sets it to the default.
// set the location of the animation shown
// while loading the content of a Thickbox
if(TB_LoadingAnimation === undefined) {
var TB_LoadingAnimation = "images/loadingAnimation.gif";
}
Later in the thickbox.js I replaced the image url with the TB_LoadingAnimation variable. For those who want to use it, here I have for you:
technorati tags:javascript, patch, thickbox, TB_LoadingAnimation, jquery
Blogged with Flock
Just after I converted script.aculo.us to be used woth Drupal, here’s my version of Lightbox2 I just provide the js, please catch the rest on the Lightbox2 homepage. I can not really say, if it works, because I haven’t tested it (there was no ‘rake test’-testuite
). I was a long time user of Lightbox, but when I started to care about licences(I want to release some opensource scripts soon) I noticed that Lightbox2 is released under the CC-By 2.5, which GNU declares as GPL-incompatible, so I moved to Thickbox which works on the basis of jQuery which is much better when using Drupal (you need to load less javascript files).
As already known, here the 2 version of Lightbox2:
technorati tags:javascript, prototype, script.aculo.us, lightbox, lightbox2, drupal, thickbox, jquery, jsjuicer
Blogged with Flock
Because there seems to be a need for prototype/script.aculo.us/lightbox2 for some Drupal users I’ll continue converting those packages into a Drupal compatible spelling. This time I transformed the script.aculo.us(version 1.7.0) library to use $ID() instead of $(). All tests that went through with the original library did succed too on the transformed, so I hope there’s nothing broken. As before I added a JSJuicer compressed version, so that people do not need to bother about the size. In the next time(maybe already in the next hour I upload a transformed Lightbox2 to help to close a discussion at drupal.org).
But in my opinion I have to say that people might should consider to make their javascripts with jQuery if they are only used within a drupal-environment, you still need change it for use with Drupal since the $()-function isn’t the same.
In the end: grab script.aculo.us for Drupal:
technorati tags:prototype, javascript, jquery, script.aculo.us, drupal, jsjuicer, compressed
Blogged with Flock