PQCyclerWidget and load jquery in Pier

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

PQCyclerWidget and load jquery in Pier

Gastón Dall' Oglio
Hello all.

Short history, what is the better manner to load jquery libraries for get working a PQCyclerWidget?

Long... 
I wanted to add a slideshow to a Pier site and I saw that already exists a PRWidget for JQCycle, and I say great! Quickly I got to show the images that I added to a structure, but without the effect... After a some experimentation (I'm newbe in Pier) I saw this error in the browser console: "Uncaught exception: ReferenceError: Undefined variable: jQuery". Then I understood that the jquery library was not loaded, and I go to the implementation of PQCyclerWidget and saw this:

 PQCyclerWidget>>updateRoot: anHtmlRoot
super updateRoot: anHtmlRoot.
"assume that jQuery libraries are already loaded"
anHtmlRoot javascript url: JQWidgetBoxDeploymentLibrary / #jquerycycleallJs


then, I add this (before the existing line) and now the slideshow works fine:

which is surely not the right way to load jquery in pier.


About instalation of this widget, I just load JQWidgetBox-Core and JQWidgetBox-Cycle-Core in a Pier2 image (no dev packages), it is correct?

Regards





_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PQCyclerWidget and load jquery in Pier

Nick
Hi Gastón,

I don't know specifically about PQCyclerWidget - but it looks as though you've diagnosed your problem successfully. One way ensure that the jQuery libraries are served, is to use the /config application to add libraries to your application:

Browse to /config eg http://localhost:8080/config
Select your Pier site, by default it's registered at /pier
Under the General/Libraries, click on 'Configure'
Then in Library configuration click Override
Add the JQuery libraries, for example JQDevelopmentLibrary, JQUIDevelopmentLibrary, JQFlickTheme (you may not require the last two).

There is more information available: http://book.seaside.st/book/in-action/serving-files

Hope this helps

Nick

2012/1/17 Gastón Dall' Oglio <[hidden email]>
Hello all.

Short history, what is the better manner to load jquery libraries for get working a PQCyclerWidget?

Long... 
I wanted to add a slideshow to a Pier site and I saw that already exists a PRWidget for JQCycle, and I say great! Quickly I got to show the images that I added to a structure, but without the effect... After a some experimentation (I'm newbe in Pier) I saw this error in the browser console: "Uncaught exception: ReferenceError: Undefined variable: jQuery". Then I understood that the jquery library was not loaded, and I go to the implementation of PQCyclerWidget and saw this:

 PQCyclerWidget>>updateRoot: anHtmlRoot
super updateRoot: anHtmlRoot.
"assume that jQuery libraries are already loaded"
anHtmlRoot javascript url: JQWidgetBoxDeploymentLibrary / #jquerycycleallJs


then, I add this (before the existing line) and now the slideshow works fine:

which is surely not the right way to load jquery in pier.


About instalation of this widget, I just load JQWidgetBox-Core and JQWidgetBox-Cycle-Core in a Pier2 image (no dev packages), it is correct?

Regards





_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: PQCyclerWidget and load jquery in Pier

Gastón Dall' Oglio
Hello Nick.

2012/1/17 Nick Ager <[hidden email]>
Hi Gastón,

I don't know specifically about PQCyclerWidget - but it looks as though you've diagnosed your problem successfully.

The best part, is that I beginning to understand a little about Seaside and Pier :))
 
One way ensure that the jQuery libraries are served, is to use the /config application to add libraries to your application:

thats is just I wanted to do, add those libraries to Pier, but I do not realized that Pier is just an application like any other, then thought I had to refer to the kernel to load jquery, grrr :)

 

Browse to /config eg http://localhost:8080/config
Select your Pier site, by default it's registered at /pier
Under the General/Libraries, click on 'Configure'
Then in Library configuration click Override
Add the JQuery libraries, for example JQDevelopmentLibrary, JQUIDevelopmentLibrary, JQFlickTheme (you may not require the last two).

There is more information available: http://book.seaside.st/book/in-action/serving-files

yes, I know this help, thanks


Hope this helps

yes, thanks agains
 

Nick

Regards, Gastón.

 

2012/1/17 Gastón Dall' Oglio <[hidden email]>
Hello all.

Short history, what is the better manner to load jquery libraries for get working a PQCyclerWidget?

Long... 
I wanted to add a slideshow to a Pier site and I saw that already exists a PRWidget for JQCycle, and I say great! Quickly I got to show the images that I added to a structure, but without the effect... After a some experimentation (I'm newbe in Pier) I saw this error in the browser console: "Uncaught exception: ReferenceError: Undefined variable: jQuery". Then I understood that the jquery library was not loaded, and I go to the implementation of PQCyclerWidget and saw this:

 PQCyclerWidget>>updateRoot: anHtmlRoot
super updateRoot: anHtmlRoot.
"assume that jQuery libraries are already loaded"
anHtmlRoot javascript url: JQWidgetBoxDeploymentLibrary / #jquerycycleallJs


then, I add this (before the existing line) and now the slideshow works fine:

which is surely not the right way to load jquery in pier.


About instalation of this widget, I just load JQWidgetBox-Core and JQWidgetBox-Cycle-Core in a Pier2 image (no dev packages), it is correct?

Regards





_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki