PageSourceSearch

https://dourorun.pt/scripts/layout.js?0.5.0.39

js dourorun.pt collected 2026-10-06 07:18:53 UTC 6,673 bytes, 103 lines download raw bytes

1jQuery(document).ready(function($){
2	/**
3	* layout
4	*/
5    PORTAL.layout = function()
6    {
7		var slider_home = {};
8        return {
9            /**
10             * init function
11             *
12             * @param params {object}
13             */
14            init: function (params) {
15                config = params;
16            },
17            
18            /**
19             * builds a children dropdown
20             */ 
21            buildDropdown: function (json) {
22                
23            },
24			
25			startHomeSlide: function (slide_id, resize) {
26				if ($('#portalEventSlide img').length > 0) {
27					if (!resize) {
28						PORTAL.layout.slider_home = $('#'+slide_id).html();
29					}
30					// set default slider html
31					$('#'+slide_id).html(PORTAL.layout.slider_home);
32					// hide slide and show default image to calculate size
33					$('#'+slide_id).hide();
34					$('.defaultSliderImg').show();
35					// calculate size of slider
36					var slider_img_width = $('.defaultSliderImg').width();
37					var slider_img_height = $('.defaultSliderImg').height();
38					var slider_width = $('#portalEvents').width();
39					var thumbnails_width = parseInt(slider_width - slider_img_width);
40					// change slide size
41					$('#'+slide_id).width(slider_img_width);
42					$('#'+slide_id).height(slider_img_height);
43					$('#'+slide_id+' .slide').width(slider_img_width);
44					$('#'+slide_id+' .slide').height(slider_img_height);
45					$('#'+slide_id+' .slide img').width(slider_img_width);
46					$('#'+slide_id+' .slide img').height(slider_img_height);
47					// change thumnails size
48					$('.thumbnavigator').width(thumbnails_width);
49					$('.thumbnavigator').height(slider_img_height);
50					$('.thumbnavigator div').width(thumbnails_width);
51					$('.thumbnavigator').css('left', 0);
52					$('.thumbnavigator:first').css('left', slider_img_width);
53					$('.thumbnavigator .p').width(thumbnails_width);
54					$('.thumbnavigator thumbnailtemplate').width(thumbnails_width);
55					// calculate number of visible eventes info and check size
56					var number_of_slides = 5;
57					if (parseInt(slider_img_height/4) < 77) {
58						number_of_slides = 3;
59					}
60					else if (parseInt(slider_img_height/5) < 77) {
61						number_of_slides = 4;
62					}
63					$('.thumbnavigator .items div').height(parseInt(slider_img_height/number_of_slides));
64					// show slider and hide default image
65					$('.defaultSliderImg').hide();
66					$('#portalEventSlide').show();				
67					// slider options
68					var options = {
69						$AutoPlay: true,                                    //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
70						$AutoPlaySteps: 1,                                  //[Optional] Steps to go for each navigation request (this options applys only when slideshow disabled), the default value is 1
71						$AutoPlayInterval: 4000,                            //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
72						$PauseOnHover: 0,                               //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, default value is 3
73						$ArrowKeyNavigation: true,   			            //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
74						$SlideDuration: 500,                                //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
75						$MinDragOffsetToSlide: 20,                          //[Optional] Minimum drag offset to trigger slide , default value is 20
76						//$SlideWidth: 600,                                 //[Optional] Width of every slide in pixels, default value is width of 'slides' container
77						//$SlideHeight: 300,                                //[Optional] Height of every slide in pixels, default value is height of 'slides' container
78						$SlideSpacing: 5, 					                //[Optional] Space between each slide in pixels, default value is 0
79						$DisplayPieces: 1,                                  //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
80						$ParkingPosition: 0,                                //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
81						$UISearchMode: 1,                                   //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, direction navigator container, thumbnail navigator container etc).
82						$PlayOrientation: 1,                                //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, default value is 1
83						$DragOrientation: 3,                                //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
84						$ThumbnailNavigatorOptions: {
85							$Class: $JssorThumbnailNavigator$,              //[Required] Class to create thumbnail navigator instance
86							$ChanceToShow: 2,                               //[Required] 0 Never, 1 Mouse Over, 2 Always
87							$AutoCenter: 1,                                 //[Optional] Auto center thumbnail items in the thumbnail navigator container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 3
88							$Lanes: 1,                                      //[Optional] Specify lanes to arrange thumbnails, default value is 1
89							$SpacingX: 0,                                   //[Optional] Horizontal space between each thumbnail in pixel, default value is 0
90							$SpacingY: 0,                                   //[Optional] Vertical space between each thumbnail in pixel, default value is 0
91							$DisplayPieces: number_of_slides,                              //[Optional] Number of pieces to display, default value is 1
92							$ParkingPosition: 0,                            //[Optional] The offset position to park thumbnail
93							$Orientation: 2,                                //[Optional] Orientation to arrange thumbnails, 1 horizental, 2 vertical, default value is 1
94							$DisableDrag: false                             //[Optional] Disable drag or not, default value is false
95						}
96					};
97					// run slider
98					homeSlider = new $JssorSlider$(slide_id, options);
99				}
100			}
101        }
102    }();
103});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.