PageSourceSearch

https://www.therosallsuitehotel.com/themes/custom/ftheme/js/Angular/ctrl/slider-images-rooms.js?v=9.2.4

js therosallsuitehotel.com collected 2026-10-08 07:41:11 UTC 2,954 bytes, 144 lines download raw bytes

1
2
3
4
5
6fdesignApp.controller('sliderImagesGalleryCtrl',[ '$scope','$interval','$window','$rootScope','$timeout',function ($scope,$interval,$window,$rootScope,$timeout) {
7
8
9    $scope.show=1;
10    $scope.nextimg=false;
11
12
13    $scope.showTheSlide=function(showSlide){
14        $timeout(function(){
15            $scope.show =showSlide;
16
17        }, 200);
18    };
19
20    //next action
21    var nextAuto =  function(){
22        if($scope.show === $scope.count){
23            $scope.showTheSlide(1);
24        }else{
25            $scope.showTheSlide($scope.show+1);
26        }
27    };
28    // prev action
29    var prevAuto =  function(){
30        if($scope.show ===1 ){
31            $scope.showTheSlide($scope.count);
32        }else{
33            $scope.showTheSlide($scope.show-1);
34        }
35    };
36  //  var stop =  $interval( nextAuto, 7000);
37
38
39
40    // btn action
41    $scope.showSlide=function(showSlide){
42        $interval.cancel(stop);
43        if( $scope.show>showSlide){
44            $scope.nextimg=false;
45        }else{
46            $scope.nextimg=true;
47        }
48        $scope.showTheSlide(showSlide);
49    };
50
51
52
53    //Controls
54    $scope.next = function(){
55        $scope.nextimg=true;
56        $interval.cancel(stop);
57        nextAuto();
58    };
59    $scope.prev = function(){
60        $scope.nextimg=false;
61        $interval.cancel(stop);
62        prevAuto();
63
64    };
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80    $scope.modalShow=0;
81
82
83    $scope.$watch('modalShow',function(newVal,oldVal){
84        //  console.log(oldVal,newVal);
85        if( $scope.modalShow>0){
86            $scope.modalClass='modal-on';
87            $rootScope.modalType='GALLERY';
88            $rootScope.showModal=1;
89        }else{
90            $scope.modalClass='modal-off';
91            $rootScope.modalType='';
92            $rootScope.showModal=0;
93        }
94    });
95
96    $scope.open = function(item){
97        $scope.modalShow= item;
98    };
99
100    $scope.nextGallery = function(){
101        if($scope.modalShow === $scope.count){
102            $scope.modalShow= 0;
103        }else{
104            $scope.modalShow= $scope.modalShow+1;
105        }
106    };
107
108    $scope.prevGallery = function(){
109        if($scope.modalShow ===1 ){
110            $scope.modalShow= 0;
111        }else{
112            $scope.modalShow= $scope.modalShow-1;
113        }
114    };
115
116
117
118    $rootScope.$on('key-gallery-close',function(){
119
120        $scope.$apply(function(){
121            console.log('key-gallery-close');
122            $scope.modalShow=0;
123        });
124    });
125    $rootScope.$on('key-gallery-prev',function(){
126        $scope.$apply(function(){
127            console.log('key-gallery-prev');
128            $scope.prevGallery();
129        });
130    });
131    $rootScope.$on('key-gallery-next',function(){
132        $scope.$apply(function(){
133            console.log('key-gallery-next');
134            $scope.nextGallery();
135        });
136    });
137
138
139
140
141}]);
142
143
144

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.