Hi folks,
I have a problem with a library. I am using a Pier Gallery addon that uses Prototype.js, scriptaculus, builder, effects, etc. My application DOESN'T have SULibrary added. It has it's own library called DestinoMochilaLibrary with this method: DestinoMochilaLibrary>>selectorsToInclude ^ #(destinoMochilaCss) Now, to be able to use that plugin I override the method updateRoot: like this: DestinoMochilaLibrary>>updateRoot: aHtmlRoot super updateRoot: aHtmlRoot. aHtmlRoot javascript url: 'http://www.roard.com/lightbox2/js/prototype.js'. aHtmlRoot javascript url: 'http://www.roard.com/lightbox2/js/scriptaculous.js?load=effects,builder'. aHtmlRoot javascript url: 'http://www.roard.com/lightbox2/js/lightbox.js'. aHtmlRoot stylesheet url: 'http://www.roard.com/lightbox2/css/lightbox.css' Obviously this is not good because I am requesting another website. Thus, I wanted to have it locally. Then I did this: - Add SULibrary to my application - Downloaded the http://www.roard.com/lightbox2/js/lightbox.js and http://www.roard.com/lightbox2/css/lightbox.css because they are not in SULibrary. - Then I uploaded both files to SULibrary and I could perfectly see the new methods lightboxJs and lightboxCss in SULibrary. - I can also see all links in http://localhost:8888/seaside/files/SULibrary/ - Removed DestinoMochilaLibrary>>updateRoot: The problem is that if I remove the DestinoMochilaLibrary>>updateRoot: (which should be not used now), the plugin doesn't work. It is like if cannot find the javascript libraries. Let's take the example of protoype. In the first version, my html rendered shows: <script type="text/javascript" src="http://www.roard.com/lightbox2/js/prototype.js"></script> which is correct. After my changes, I see: <script type="text/javascript" src="/seaside/files/SULibrary/prototype.js"></script> which I think it is also correct. Now...what can be the problem that the plugin doesn't work ??? More information. If I change my code to this: updateRoot: aHtmlRoot super updateRoot: aHtmlRoot. aHtmlRoot javascript url: 'http://localhost:8888/seaside/files/SULibrary/prototype.js'. aHtmlRoot javascript url: 'http://localhost:8888/seaside/files/SULibrary/builder.js'. aHtmlRoot javascript url: 'http://localhost:8888/seaside/files/SULibrary/effects.js'. aHtmlRoot javascript url: 'http://localhost:8888/seaside/files/SULibrary/lightbox.js'. aHtmlRoot stylesheet url: 'http://localhost:8888/seaside/files/SULibrary/lightbox.css' It works perfect!! But I don't think I have to do this...I must be doing something wrong. Thanks a lot for the help in advance. Mariano _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
I'm going to take a wild guess and bet you are still running behind the lightppd webserver I believe you mentioned in another post.
On Tue, Jul 14, 2009 at 8:25 PM, Mariano Martinez Peck <[hidden email]> wrote: Hi folks, -- http://jmck.seasidehosting.st _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Tue, Jul 14, 2009 at 11:21 PM, John McKeon <[hidden email]> wrote: I'm going to take a wild guess and bet you are still running behind the lightppd webserver I believe you mentioned in another post. are you god ? hahahah . Yes I am. But I am not serving css or js, just photos. I mean in /var/www/ I have only pictures. I even don't map /seaside/files to something in /var/www My lighttp.conf is the default one Is this wrong ? I dont understand :( Thanks! Mariano
_______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
On Tue, Jul 14, 2009 at 11:06 PM, Mariano Martinez Peck <[hidden email]> wrote:
This is proof that the user agent is calling back to the server for the content referred to in those links. Whether they point to a local subdirectory (to the server) or some other domain entirely. The page is telling the server "give me the page at \seaside\files\SULibrary\etc" but there is no such directory as far as the lightppd server knows. You have to tell lightppd to redirect such requests to localhost:xxxx OR (and I could be mistaken on this) put the files in the correctly defined subdirectory where the server can find them. (The library config page's "write files to disk" link is useful for this). The way to redirect is simple. Tudor Girba, I believe, wrote up a brief tutorial on www.piercms.com for apache. lightppd is probably very similar but i have no idea. John
-- http://jmck.seasidehosting.st _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Mariano Martinez Peck
2009/7/15, Mariano Martinez Peck <[hidden email]>:
> Hi folks, > > I have a problem with a library. I am using a Pier Gallery addon that uses > Prototype.js, scriptaculus, builder, effects, etc. My application DOESN'T > have SULibrary added. It has it's own library called DestinoMochilaLibrary > with this method: > > > DestinoMochilaLibrary>>selectorsToInclude > ^ #(destinoMochilaCss) > > > Now, to be able to use that plugin I override the method updateRoot: like > this: > > DestinoMochilaLibrary>>updateRoot: aHtmlRoot > super updateRoot: aHtmlRoot. > aHtmlRoot javascript url: ' > http://www.roard.com/lightbox2/js/prototype.js'. > aHtmlRoot javascript url: ' > http://www.roard.com/lightbox2/js/scriptaculous.js?load=effects,builder'. > aHtmlRoot javascript url: 'http://www.roard.com/lightbox2/js/lightbox.js > '. > aHtmlRoot stylesheet url: ' > http://www.roard.com/lightbox2/css/lightbox.css' If you're at this point a WAFileLibrary is really not what you want. Put this code into the root component on your page. updateRoot: aHtmlRoot super updateRoot: aHtmlRoot. aHtmlRoot javascript resourceUrl: '/lightbox2/js/prototype.js'. aHtmlRoot javascript resourceUrl: '/lightbox2/js/scriptaculous.js?load=effects,builder'. aHtmlRoot javascript resourceUrl: '/lightbox2/js/lightbox.js'. aHtmlRoot stylesheet resourceUrl: '/lightbox2/css/lightbox.css' And then configure the resource base url in your application and serve them over your HTTP server. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |