Hardcoded image location in LazyLoad snippet

65 views
Skip to first unread message

Sergey Trofimov

unread,
May 18, 2011, 3:03:54 AM5/18/11
to lif...@googlegroups.com
Hello David.

I′ve found, that location of ajax-loader.gif is hardcoded in LazyLoad snipped.
This cause some inconvenience when we want to use alternate image location or image filename.
Can we make the path "/images/ajax-loader.gif" (and alt text, I think) customizable?

Jan Niehusmann

unread,
May 18, 2011, 5:10:37 AM5/18/11
to lif...@googlegroups.com
Hi Sergey,

On Wed, May 18, 2011 at 12:03:54AM -0700, Sergey Trofimov wrote:
> I′ve found, that location of ajax-loader.gif is hardcoded in LazyLoad

> snipped<https://github.com/lift/framework/blob/master/web/webkit/src/main/scala/net/liftweb/builtin/snippet/LazyLoad.scala#L86>


> .
> This cause some inconvenience when we want to use alternate image location
> or image filename.
> Can we make the path "/images/ajax-loader.gif" (and alt text, I think)
> customizable?

You can already override that path, by specifying an alternate template
to be shown while loading:

<lift:lazy-load template="customtemplate">....</lift:lazy-load>

Customtemplate can contain an <img> tag pointing to whatever image you
want to be shown, or even some completely different html (perhaps you
don't want to show an image at all?)

Regards,
Jan


Sergey Trofimov

unread,
May 19, 2011, 6:05:36 AM5/19/11
to lif...@googlegroups.com
Ah, clear!

Thank you, Jan.
Reply all
Reply to author
Forward
0 new messages