PageSourceSearch

https://menetrendek.hu/mobile/js/jqm-custom.js?v=401

js menetrendek.hu collected 2026-10-02 10:34:28 UTC 8,967 bytes, 228 lines download raw bytes

1var jqmCustom=function(){
2    var $pageToGo=null;
3    $.event.special.tap = {
4        bindType: "click",
5        delegateType: "click",
6        handle: function( event ) {
7            //console.log(this);
8            return  event.handleObj.handler.apply( this, arguments );
9        }
10    };
11    $.fn.extend({
12      pagecontainer: function(action,selector,params) {
13        if(action=="getActivePage"){
14            return $("div.ui-page.ui-page-active:not(.slide-out)");
15            /*
16            return this.each(function() {
17              this.checked = true;
18            });
19            */
20        }
21        if(action=="change"){
22            $.mobile.changePage(selector,params);
23        }
24      },
25      filterable:function(){
26          $filterableForms=$(this);
27          $.each($filterableForms,function(key,filterableForm){
28              $(this).prev("form").find("input").on('keyup', function(event) {
29                  if($(this).data().hasOwnProperty("filterTimeout")){
30                    window.clearTimeout($(this).data().filterTimeout);
31                    //console.log('keyup timeout cleared');
32                  }
33                  var $inputField=$(this);
34                  
35                  var coordFormat = /^[0-9 .,]+$/;
36                  if(coordFormat.test($inputField.val())){ // ha érvényes magyar koordinátát tartalmaz, ne legyen prediktív lekérdezés
37                      //var tempVal=$inputField.val().replace(/ +/gm,''); //.slice();
38                      //console.log(tempVal);
39                      return false;
40                  }
41                  var $listView=$(this).parent().parent().next("ul");
42                  $(this).data().filterTimeout=window.setTimeout(function(){
43                      $listView.trigger( "listviewbeforefilter",{"input":$inputField}); // erre hivja az ajax-ot
44                      $listView.trigger( "filterablebeforefilter",{"input":$inputField});
45                      $listView.trigger( "filterablefilter",{"input":$inputField});
46                      //console.log('keyup timeout setted to 500ms');
47                  },500);
48              });
49          });
50      },
51      listview:function(param){
52          //donothing;
53      },
54      textinput:function(a,b,c){
55          //donothing;
56      },
57      panel:function(param){
58          $panelDivs=$(this);
59          $.each($panelDivs,function(key,panelDiv){
60              if(param=="open"){ 
61                  $(this).removeClass("ui-panel-closed");
62                  $(this).addClass("ui-panel-open");
63                  $("#uiPanelDismiss").addClass("ui-panel-dismiss-position-right ui-panel-dismiss-display-overlay ui-panel-dismiss-open");
64              }
65              if(param=="close"){ 
66                  $("#uiPanelDismiss").removeClass();
67                  $("#uiPanelDismiss").addClass("ui-panel-dismiss");
68                  $(this).removeClass("ui-panel-open");
69                  var $panel=$(this);
70                  window.setTimeout(function(){
71                      $panel.addClass("ui-panel-closed");
72                  },500);
73              }
74          });
75      },
76      selectmenu:function(param){
77          $selectInputs=$(this);
78          $.each($selectInputs,function(key,selectInput){
79              if(typeof(param)=="undefined"){
80                  $(this).on('change', function(event) {
81                      var $selectField=$(this);
82                      $selectField.prev("span").html($selectField.children(":selected").text());
83                  });
84              }
85               if(param=="refresh"){
86                      var $selectField=$(this);
87                      $selectField.prev("span").html($selectField.children(":selected").text());
88               }
89          });
90      },
91      popup:function(param){
92          // replaced to map layer
93      },
94      slider:function(param){
95          if(param=="refresh"){ 
96            $(this).prev("div").html($(this).val());
97          }
98      },
99      checkboxradio:function(param){
100          $checkboxInputs=$(this);
101          $.each($checkboxInputs,function(key,checkboxinput){
102              var $checkBoxLabel=$(this).prev("label");
103              if(typeof(param)=="undefined"){
104                  $checkBoxLabel.on('click', function(event) {
105                      if($checkBoxLabel.hasClass("ui-checkbox-on")){
106                          $checkBoxLabel.removeClass("ui-checkbox-on");
107                          $checkBoxLabel.addClass("ui-checkbox-off");
108                          $checkBoxLabel.next("input[type=checkbox]").prop('checked',fal
108se);
109                          $checkBoxLabel.next("input[type=checkbox]").trigger("change");
110                      }
111                      else{
112                          $checkBoxLabel.removeClass("ui-checkbox-off");
113                          $checkBoxLabel.addClass("ui-checkbox-on");
114                          $checkBoxLabel.next("input[type=checkbox]").prop('checked',true);
115                          $checkBoxLabel.next("input[type=checkbox]").trigger("change");
116                      }
117                  });
118              }
119              if(param=="refresh"){
120                  if($(this).prop("checked")){
121                      $checkBoxLabel.removeClass("ui-checkbox-off");
122                      $checkBoxLabel.addClass("ui-checkbox-on");
123                  }
124                  else{
125                      $checkBoxLabel.removeClass("ui-checkbox-on");
126                      $checkBoxLabel.addClass("ui-checkbox-off");
127                  }
128              }
129              
130          });
131      }
132    });
133    $.extend($.expr[':'],{
134        "mobile-pagecontainer": function(a) {
135            return a===document.querySelector("body"); 
136        }
137    });
138    var setPageDisplay=function(params){
139        var button=null;
140        if(params && params.button)
141            button=params.button;
142        var $prevPage=$("div.ui-page.ui-page-active.slide-out");
143        var $toPage=$("div.ui-page.ui-page-active:not(.slide-out)");
144        $("div.ui-page").css("display","none");
145        $toPage.css("display","block");
146        $prevPage.css("display","none");
147        $("body").trigger( "pagecontainerchange",{"toPage":$toPage,"prevPage":$prevPage,"button":button});
148    }
149    this.changePage=function(pageToGo,params){
150        $pageToGo=$(pageToGo);
151        $pageToGo.css("display","block");
152        var $obj=$("div.ui-page.ui-page-active.slide-out");
153        $obj.removeClass("ui-page-active");
154        $obj.removeClass("slide-out");
155        window.setTimeout(function(){
156            $("div.ui-page.ui-page-active").addClass("slide-out");
157            $pageToGo.addClass("ui-page-active");
158            window.setTimeout(function(){setPageDisplay(params)},500);
159        },10);
160    }
161    this.activePage=function(){
162        var $obj=$("div.ui-page.ui-page-active.slide-out");
163        return $obj;
164    }
165    this.getScreenHeight=function(){
166       return window.innerHeight;
167       //return  document.body.clientHeight;
168       //return $(window).height();
169    }
170    this.changePage.defaults={"changeHash":false};
171    this.loading=function(param){
172        if(param=="show")
173            $("body").addClass("loading");
174        if(param=="hide")
175           $("body").removeClass("loading"); 
176    }
177    setPageDisplay();
178}
179$(document).ready(function(){
180    $.mobile=new jqmCustom();
181    $("#daypart").selectmenu();
182    $("#order").selectmenu();
183    $("#discountPercent").selectmenu();
184    $("#historyOrder").selectmenu();
185    $("#use_daemon").selectmenu();
186    $("#countyPasses").selectmenu();
187    $("#localPasses").selectmenu();
188    $("#passes").selectmenu();
189    $("#anyday").checkboxradio();
190    $("#enableAddress").checkboxradio();
191    $("#uiPanelDismiss").on("click",function (event) {
192        $("div.ui-page-active>div[data-role='panel']").panel("close");
193    });
194    $("a[href]").on("click", function (event) {
195        var href=this.getAttribute("href");
196        var target=this.getAttribute("target");;
197        if (href!="#" && href.substr(0,1)=='#'){
198            window.setTimeout(function(){
199            $("body").pagecontainer("change",href, {
200                transition: "slide",
201                changeHash: false
202            });
203            },50);
204            return false;
205        }
206        else if(target=="_blank" && (href.substr(0,7)=='http://' || href.substr(0,8)=='https://')){
207            window.setTimeout(function(){
208            if(window.cordova){
209                cordova.InAppBrowser.open(href,'_system');
210                void(0);
211            }
212            else{
213                window.open(href,'_system');
214                void(0);
215            }
216            },50);
217            return false;
218        }
219        else
220            return true;
221    });
222    
223    
224    
225    
226    
227    
228})

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.