This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

sfLightWindowPlugin and symfony 1.2 problem

Forum to discuss ExtJS and other JS plugins

sfLightWindowPlugin and symfony 1.2 problem

by gregghouse » Fri Dec 19, 2008 1:14 pm

Hi,

I've had some strange problems with sfLightWindowPlugin installation on symfony 1.2. First - after running the command

php symfony plugin:install sfLightWindowPlugin --release=0.0.2

I got

Unable to get dependencies information for pluginsfLightWindowPlugin": File http://plugins.symfony-project.org:80/REST/r/sflightwindowpl ugin/deps.0.0.2.txt not valid (received: HTTP/1.0 404 Version not compatible with the installed symfony version (1.2.1))

when I had a 1.2.0 version the output was the same... So I've downloaded a .tgz package and installed it from the archive. The plugin installed successfully and setup the plugin. Next, I've run:

php symfony plugin:publish-assets

to get sfLightWindowPlugin published (and also other plugins like sfProtoculousPlugin).

Now the problem - after using helper (use_helper('LightWindow')) and _lwAddResources() at the top of the template, I've tried to use the helper function:
<?php echo lw_image(image_tag('/images/sample.gif'), '/images/sample.gif') ?> - it generated a image link with class "lightwindow", which is correct. After clicking on the image new page opens instead of a normal lightbox behavior.

The scripts & css are included:
<script type="text/javascript" src="/sfLightWindowPlugin/js/prototype.js"></script>
<script type="text/javascript" src="/sfLightWindowPlugin/js/effects.js"></script>
<script type="text/javascript" src="/sfLightWindowPlugin/js/lightwindow.js"></script>
<script type="text/javascript" src="/sfProtoculousPlugin/js/prototype.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="/css/main.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/sfLightWindowPlugin/css/lightwindow.css" />



The lw_image output is not displayed on the page at first - it's triggered by ajax request from the page (ie. clicking a button updates a block with the lw_image result.

Same code put into a non-ajax request, works perfectly..
Looks like the lightWindow parses the page after loading the body. Is there any way to make it do it again ? after updating a block with ajax request ?

And another thing, maybe someone will know how to change the order of included <script> tags for installed plugins such as in the above example (eg. i'd like to set sfProtoculousPlugin/prototype.js as first.
(both prototype.js files are same version)

Thanks for any ideas,

regards
gregg
gregghouse
Junior Member
 
Posts: 1
Joined: Fri Dec 19, 2008 10:32 am
Location: Bielsko-Biała, Poland

Re: sfLightWindowPlugin and symfony 1.2 problem

by dev_hinvi » Tue Apr 14, 2009 6:54 pm

hi gregghouse. I am having the same problem. Were you able to resolve this issue? Please let me know.

Regards,
dev_hinvi
Junior Member
 
Posts: 14
Joined: Thu May 15, 2008 5:28 pm

Re: sfLightWindowPlugin and symfony 1.2 problem

by dev_hinvi » Thu Apr 16, 2009 9:59 am

Ok. I have managed to resolve this. We just need to call lightwindowInit(); on completing the AJAX request. like this:

echo link_to_remote(blah blah, array('loading' => 'blah',
'complete'=> 'lightwindowInit();');

That works for me.

(you will notice that the lightwindowInit() function lies at the end of the lightwindow.js file).
dev_hinvi
Junior Member
 
Posts: 14
Joined: Thu May 15, 2008 5:28 pm