24
Views
11
Comments
5.1 Integrating a jQuery Plugin
Question
The https://ryrych.github.com/rcarousel/ link doesn't work
2020-03-05 15-52-45
André Vieira
Staff
Hi Íris,

You're right. The current link seems to be https://github.com/ryrych/rcarousel.

Cheers
2019-09-30 07-35-56
Aurelio Junior
"find the base .oml in attach"

Well, where is it? :)

2022-01-04 21-11-20
Gonçalo Correia
Hello!

This exercise it is not well prepared, and is not well explained.
Is a very interesting matter and most useful.
Students should finish and achieve this exercise.

Best regards,
Gonçalo Correia

2020-10-15 10-24-31
Miguel Seabra Melo
Hi Gonçalo,

Thank you for your feedback. Can you elaborate a bit more on what is missing here for you to better understand how these jQuery integrations work?

Regards,


Miguel

PS - Incidentally we added the base OML to the post. Thanks for spotting that and we appologize for the misstep..
2022-01-04 21-11-20
Gonçalo Correia
Hi Miguel,

I'm trying to do lightbox.html exercise.
I have resolved some of my issues, but it still doesn't work.
 
Follow my actions, please:
Create a new page to display the carousel;
Add WebBlock for each JQuery file (excluding .min files), and fill the JavaScript;
Add WebBlock for each CSS file, and fill the StyleSheet;
Add all images;
In CSS files, change the path of images and the name because:
- OutSystems removes the "-" character of the file name;
- The path in CSS is "images" and the path in OutSystems is "img";
Create a new Weblock (jCarousel_Lightbox) to Lightbox exercise:
- Add a DIV id = base;
- Within the DIV Base, I added all WebBlocks CSS as lightbox.html;
- Within the DIV Base, added DIV id = content;
- Within the DIV content, added DIV id = container;
- Inside the container DIV, added DIV id = carousel
- Within the DIV carousel, I added all links with style = lb_gallery;
- Within all LINKs, added the correct image;
- Inside the DIV container, added DIV id = pages;
- Finally, in the DIV Base, added all WebBlocks JQuery as lightbox.html;
 
But the carousel is not working:
- All images are visible, the wrapper DIV is not working;
- The action click on the image is OK, and navigation in the image is OK;


Thanks in advance for your help.

Best regards,
Gonçalo Correia
2020-10-15 10-24-31
Miguel Seabra Melo
Hi Gonçalo,

Can you use "add attachment" to share your OML with us? It's easier that describing what you did.


Miguel
2022-01-04 21-11-20
Gonçalo Correia
Hi Miguel, 

Here's the file.

Best regards,
Gonçalo Correia
Carousel.oml
2023-05-09 14-34-48
Hugo Catarino
Staff
I Gonçalo i've checked your exercise and found some issues.

You have in your javascript and CSS some references to the div Id'd like 
 #container
   $( "#carousel" ).rcarousel({
  _total = $( "#carousel" ).rcarousel( "getTotalPages" );

On the divs you have this "Id's" on the field Name of the containers.
Outsystems platform generates the div Ids based on its location on code so the id's will not align with CSS and javascript that you are using.

So how can you solve it:

For the Css you can replace "#container" for a class ".container" that you can use then in the containers on the style field, and this way on JS you can use a selector like " $( ".carousel" ) instead of  $( "#carousel" ).

If you realy want to use the Id's,  insert the css or JS at the end of your screen inline using an expression with escape content set to no and this way you can use the container Ids in the contest of the page.(you have an example of this on the last image of the exercise).
PS - for this you need to use  <style></style> or <script> <\script> sections. 

Best Regards 
Hugo Catarino

 
 
2022-01-04 21-11-20
Gonçalo Correia
Hi Hugo,

Still doesn't work.
Can you send me the oml file, so that i can check it, please.
Thank you very much.

Best regards,
Gonçalo Correia


 
2023-05-09 14-34-48
Hugo Catarino
Staff
Hi Gonçalo, sorry for the late answer.
I've just made the changes that I describe in my post. 
The carousel is working with autorool.
you can now add the controls to go forward and backward using exactly the same pattern using css classes instead of id's.
 
Best regards
Hugo Catarino
 

Carousel.oml
2022-01-04 21-11-20
Gonçalo Correia
Hello Hugo,

Thank you very much, and keep up the good work.

Best regards,
Gonçalo Correia
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.