Hi folks,<br><br>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:<br>
<br><br>DestinoMochilaLibrary>>selectorsToInclude<br> ^ #(destinoMochilaCss)<br><br><br>Now, to be able to use that plugin I override the method updateRoot: like this:<br><br> DestinoMochilaLibrary>>updateRoot: aHtmlRoot<br>
super updateRoot: aHtmlRoot.<br> aHtmlRoot javascript url: '<a href="http://www.roard.com/lightbox2/js/prototype.js">http://www.roard.com/lightbox2/js/prototype.js</a>'.<br> aHtmlRoot javascript url: '<a href="http://www.roard.com/lightbox2/js/scriptaculous.js?load=effects,builder">http://www.roard.com/lightbox2/js/scriptaculous.js?load=effects,builder</a>'.<br>
aHtmlRoot javascript url: '<a href="http://www.roard.com/lightbox2/js/lightbox.js">http://www.roard.com/lightbox2/js/lightbox.js</a>'.<br> aHtmlRoot stylesheet url: '<a href="http://www.roard.com/lightbox2/css/lightbox.css">http://www.roard.com/lightbox2/css/lightbox.css</a>'<br>
<br>Obviously this is not good because I am requesting another website. Thus, I wanted to have it locally. Then I did this:<br>- Add SULibrary to my application <br>- Downloaded the <a href="http://www.roard.com/lightbox2/js/lightbox.js">http://www.roard.com/lightbox2/js/lightbox.js</a> and <a href="http://www.roard.com/lightbox2/css/lightbox.css">http://www.roard.com/lightbox2/css/lightbox.css</a> because they are not in SULibrary.<br>
- Then I uploaded both files to SULibrary and I could perfectly see the new methods lightboxJs and lightboxCss in SULibrary.<br>- I can also see all links in <a href="http://localhost:8888/seaside/files/SULibrary/">http://localhost:8888/seaside/files/SULibrary/</a><br>
- Removed DestinoMochilaLibrary>>updateRoot:<br><br>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.<br>
<br>Let's take the example of protoype. In the first version, my html rendered shows:<br><br><script type="text/javascript" src="<a href="http://www.roard.com/lightbox2/js/prototype.js">http://www.roard.com/lightbox2/js/prototype.js</a>"></script><br>
<br>which is correct. After my changes, I see:<br><br><script type="text/javascript" src="/seaside/files/SULibrary/prototype.js"></script><br><br>which I think it is also correct.<br><br>Now...what can be the problem that the plugin doesn't work ???<br>
<br><br>More information. If I change my code to this:<br><br><br>updateRoot: aHtmlRoot<br> super updateRoot: aHtmlRoot.<br> aHtmlRoot javascript url: '<a href="http://localhost:8888/seaside/files/SULibrary/prototype.js">http://localhost:8888/seaside/files/SULibrary/prototype.js</a>'. <br>
aHtmlRoot javascript url: '<a href="http://localhost:8888/seaside/files/SULibrary/builder.js">http://localhost:8888/seaside/files/SULibrary/builder.js</a>'.<br> aHtmlRoot javascript url: '<a href="http://localhost:8888/seaside/files/SULibrary/effects.js">http://localhost:8888/seaside/files/SULibrary/effects.js</a>'.<br>
aHtmlRoot javascript url: '<a href="http://localhost:8888/seaside/files/SULibrary/lightbox.js">http://localhost:8888/seaside/files/SULibrary/lightbox.js</a>'.<br> aHtmlRoot stylesheet url: '<a href="http://localhost:8888/seaside/files/SULibrary/lightbox.css">http://localhost:8888/seaside/files/SULibrary/lightbox.css</a>'<br>
<br>It works perfect!! But I don't think I have to do this...I must be doing something wrong.<br><br>Thanks a lot for the help in advance.<br><br>Mariano<br><br>