PageSourceSearch

https://www.bellingham.org/Scripts/itinerary.js?b=1946617296

js bellingham.org collected 2026-09-24 09:07:51 UTC 3,196 bytes, 152 lines download raw bytes

1var itintargetid = "";
2var itintargettype = "";
3
4$( document ).ready(function() {
5    getFavsCount();
6});
7
8function addToItinerary(targetid, targettype)
9{
10	itintargetid = targetid;
11	itintargettype = targettype;
12
13	$(document).ready(jQuery.ajax({
14		type: "GET",
15		url: "/logincheckitin.php",
16		data: { type: "ajax"
17	    	  },
18		success: function(msg) {
19			console.log("MSG: "+msg);
20			if(msg == "login")
21			{
22				fullScreenLogin();
23			}
24			else if (msg == "loggedin")
25			{
26				// console.log("Logged in: "+targetid);
27				saveToItinerary();
28			}
29		}
30	}));
31
32}
33
34function fullScreenLogin() 
35{
36	var widthValue = $( window ).width() - 40;
37	var heightValue = $( window ).height() - 40;
38
39	$( "#fullScreenLoginDiv" ).css("height",heightValue+"px");
40	$( "#fullScreenLoginDiv" ).css("width",widthValue+"px");
41
42	var loginDivMargin = ($( window ).height() - $( "#logindiv" ).outerHeight())/2;
43	// alert($( window ).height()+"    "+$( "#logindiv" ).outerHeight());
44	$( "#logindiv" ).css("margin-top",loginDivMargin+"px");
45
46	$( "#fullScreenLoginDiv" ).show();	
47}
48
49function itinlogin()
50{
51	$("#btnItinLogin").prop('value', 'Logging In...');
52
53	$(document).ready(jQuery.ajax({
54		type: "POST",
55		url: "/functions/verifyitinuser.php",
56	    data: { datavalue: $('#formItinLogin').serialize()
57	    	  },
58		success: function(msg) {
59			$("#btnItinLogin").prop('value', 'Submit');
60			// alert(msg);
61			//console.log("Login Result: "+msg);
62			if(msg == "success")
63			{
64				$("#fullScreenLoginDiv").hide();
65        		$("#fullScreenMapDiv").hide();
66				if(itintargetid !== "")	
67				{
68					saveToItinerary();
69				}
70				else
71				{
72					window.location = '/my-favorites';
73				}
74			}
75			else
76			{
77				console.log("Itin Login: "+msg);
78			}
79		}
80	}));
81}
82
83
84$(document).keyup(function(e){
85
86    if(e.keyCode === 27)
87        $("#fullScreenLoginDiv").hide();
88        $("#fullScreenMapDiv").hide();
89});
90
91function saveToItinerary()
92{
93	console.log("Save to Itinerary: "+itintargetid);
94	$(document).ready(jQuery.ajax({
95		type: "GET",
96		url: "/functions/itineraryadd2.php",
97	    data: { id: itintargetid,
98	    		targettype: itintargettype
99	    	  },
100		success: function(msg) {
101			if(msg == "success")
102			{
103				$("#divItinAdd-"+itintargettype+itintargetid).hide();
104				$(".divItinAdd-"+itintargettype+itintargetid).hide();
105				$("#divItinView-"+itintargettype+itintargetid).show();
106				$(".divItinView-"+itintargettype+itintargetid).show();
107			}
108			else
109			{
110				console.log("Itin Add: "+msg);
111			}
112		}
113	}));
114
115} // end function addToItinerary
116
117function removeFromItinerary(ItinFavoriteID)
118{
119	adminConfirm('Remove from Favorites?',function(){
120
121		$(document).ready(jQuery.ajax({
122			type: "GET",
123			url: "/functions/itinerarydrop.php",
124			data: { ItinFavoriteID: ItinFavoriteID
125		    	  },
126			success: function(msg) {
127				// console.log("MSG: "+msg);
128				$("#ItinTile"+ItinFavoriteID).hide();
129			}
130		}));
131		
132	});
133
134}
135
136function openItinerary()
137{
138	window.location = '/my-favorites';
139}
140
141function getFavsCount()
142{
143    $(document).ready(jQuery.ajax({
144        type: "GET",
145        url: "/itinfavscount.php",
146        success: function(msg) {
147            console.log("Get Favs MSG: "+msg);
148            $("#HeaderFavsCount").html(msg);
149        }
150    }));
151
152}

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.