Re: Re: Newbie - Rails 3 lightbox?

Walter Lee Davis
Tue, 19 Oct 2010 16:17:31 -0000

Yay!

On Oct 19, 2010, at 12:14 PM, Anders_P wrote:

> Hi again!
>
> Sorry, newbish misstake. I had forgotten to replace my old prototype
> file with the file from lightwindow, so now it works!
>
> Thanks again!
> // Anders
>
>
>
> On 19 Okt, 18:06, Anders_P
<and...-TlBSdMGKk75YFVMCzM9+FrNAH6kLmebB@public.gmane.org> wrote:
>> Thanks, that seemed to work. But I ran into another problem. The
>> effect starts but my image doesn''t show up. It just keeps
loading. I
>> get the following error from Firebug (line 3314):
>> (I don''t know if this is the actual problem since it comes
from
>> prototype.js.)
>>
>> property is undefined
>> [Break on this error] if (property.include(''left'') ||
>> property.include(''right'') ||
property.include(''width'')) {
>>
>> I''ve got the same error before I made any changes in
lightwindow.js.
>>
>> Any suggestions on how to solve this?
>>
>> Thanks
>> // Anders
>>
>> On 15 Okt, 22:30, Walter Lee Davis
<wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:
>>
>>
>>
>>> The offending function is _fileType, starting at line 850 in
>>> lightwindow.js.
>>
>>> You''re going to have to dig into the type matching code
and strip
>>> off
>>> the querystring part of the URL before trying to match.
It''s looking
>>> to match on "everything after the last dot" and
it''s not sanitizing
>>> that cache-busting string that Rails is tacking on to the URL for
>>> the
>>> image. There''s a function that does that, but it appears
to be
>>> coming
>>> two or three lines too late to have any effect. But if you move
line
>>> 854 above line 851, you''ll have to see if that breaks some
other
>>> aspect of the matcher.
>>
>>> Walter
>>
>>> On Oct 15, 2010, at 4:05 PM, Anders_P wrote:
>>
>>>> I''m getting this error from Firebug.
>>
>>>> uncaught exception: Page Type could not be determined, please
amend
>>>> this lightwindow
URLhttp://localhost:3000/system/images/301/original/tufftroja_19225958.j
>>>> ...
>>
>>>> I use Paperclip for uploading images. LightWindow maybe
doesn''t
>>>> recognize that file ending (tufftroja_19225958.jpg?1287075644)?
>>
>>>> Any suggestion how to solve that?
>>
>>>> Thanks
>>>> // Anders
>>
>>>> On 15 Okt, 21:08, Walter Lee Davis
<wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:
>>>>> Maybe move lightwindow after scriptaculous, since it
depends on
>>>>> that
>>>>> to work correctly. Do you have Firebug installed there? Are
you
>>>>> getting any errors?
>>
>>>>> Walter
>>
>>>>> On Oct 15, 2010, at 1:47 PM, Anders_P wrote:
>>
>>>>>> Hi,
>>
>>>>>> I think we were talking about different modal window
plugins. But
>>>>>> I''ve
>>>>>> changed to LightWindow now, it seems much better.
>>
>>>>>> I''m now getting the same output as you from my
source code,
>>
>>>>>>
>>>>>>  <a href="<%= ad.image.url(:original)
%>"
>>>>>> class="lightwindow"><img
>>>>>> src="<%= ad.image.url(:thumb) %>"
/>
>>>>>>
>>
>>>>>> But the effect doesn''t work. So I think my
setup is wrong.
>>
>>>>>> I have moved lightwindow.js to my public Javascript
folder, and I
>>>>>> have
>>>>>> moved lightwindow.css to my public CSS folder. My
>>>>>> application.html.erb
>>>>>> looks like this:
>>
>>>>>> <%= render ''layouts/stylesheets''
%>
>>>>>> <%= stylesheet_link_tag
''lightwindow'' %>
>>>>>> <%= javascript_include_tag :defaults,
''lightwindow'',
>>>>>> ''scriptaculous.js?
>>>>>> load=effects'' %>
>>
>>>>>> Have i forgotten something or is it something else?
>>
>>>>>> Thanks!
>>
>>>>>> // Anders
>>
>>>>>> On 15 Okt, 18:19, Walter Lee Davis
<wa...-HQgmohHLjDZWk0Htik3J/w@public.gmane.org> wrote:
>>>>>>> It''s class="lightwindow" to get
the effect to fire.
>>
>>>>>>> Walter
>>
>>>>>>> On Oct 15, 2010, at 11:58 AM, Anders_P wrote:
>>
>>>>>>>>  class="lightbox">
>>
>>>>>> --
>>>>>> You received this message because you are subscribed to
the
>>>>>> Google
>>>>>> Groups "Ruby on Rails: Talk" group.
>>>>>> To post to this group, send email to rubyonrails-
>>>>>> talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>>>> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>>>>> .
>>>>>> For more options, visit this group
athttp://groups.google.com/group/rubyonrails-talk?hl=en
>>>>>> .
>>
>>>> --
>>>> You received this message because you are subscribed to the
Google
>>>> Groups "Ruby on Rails: Talk" group.
>>>> To post to this group, send email to rubyonrails-
>>>> talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>>> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>>> .
>>>> For more options, visit this group
athttp://groups.google.com/group/rubyonrails-talk?hl=en
>>>> .
>
> --
> You received this message because you are subscribed to the Google
> Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-
> talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> .
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
> .