Download & Extend

loading.gif and closelabel.gif url are broken if drupal isn't at the root of the site

Project:jQuery Lightbox
Version:6.x-1.x-dev
Component:User interface
Category:bug report
Priority:minor
Assigned:Unassigned
Status:needs review

Issue Summary

Unlike other images (loaded from javascript with a ../image prefix) loading.gif and closelabel.gif aren't loaded if Drupal isn't at the site root.

Hardcoded :
fileLoadingImage: '/sites/all/modules/jlightbox/images/loading.gif'

The module should add something like
var root='

<?php
print $jlightbox_site_root;
?>
'; so one may be able to modify the directory for these images.

Thanks

Comments

#1

- or, at least, remove the leading '/'
- or better, use Drupal.settings.basePath

#2

Here is a patch (it may not applied because I changed to *uncompressed.js)
It makes use of Drupal.settings via drupal_add_js(,'setting')

It solved the problem, I hope it's the Drupal way things have to be done, wish it can be pushed.

best regards

AttachmentSize
808570-img-path.patch 1.93 KB

#3

useless stuff was kept in the previous patch.
This one is clean

AttachmentSize
808570-img-path.patch 1.6 KB

#4

Category:feature request» bug report
Status:active» needs review
nobody click here