PageSourceSearch

https://avis.si/avisonline/qs-gb/avis.nsf/jquery.timeslots.js

js avis.si collected 2026-10-07 20:16:13 UTC 4,732 bytes, 1 lines download raw bytes

1// getLeadTime --> earliest booking possibility�// getTimeSlots --> timeslots and earliest booking possibility�var DELCOST = "";�var COLCOST = "";�var xStation = "";�var xZipLocation = "";�var xZipRetLocation ="";�var xTimeSlot="";��$(function() {�	$('a.timeslotbutton').click(function(e){�		e.preventDefault();�		dlgWin = $('#dialog-modal'); �		�		var $this = $(this);�		dateType = $this.parents('table').prop('id').split('_')[0];�		var xAdjustMsg = '';�		�		var coDate = ""; �		var dtObj;�		if( dateType == "p" ){�			dtObj = $('input[name="ETADate"]').datepicker('getDate');�			xStation = xLocation;�		} else {�			dtObj = $('input[name="ETTDate"]').datepicker('getDate');�			xStation = xRetLocation;�			if( $('#ret_diff:checked').length < 1 )�			{�				xStation = xLocation;�			}�		}��		if( xStation == "" ){�			alert( xZIPErrorMsg  );�			return;�		}�		�		co_day = "0" + dtObj.getDate();�		co_month = "0" + (dtObj.getMonth()+1) �		coDate = 	co_day.substr( co_day.length-2 ) + �				"-" + �				co_month.substr( co_month.length-2 ) + �				"-" + �				dtObj.getFullYear()�		�		$.getJSON(�			gStationsURL + "/AjaxWebService?OpenAgent&F=getHomeDelTime&MST="+gMST�			+"&MSTPATH="+gMstPath�			+"&AWD="+ $('#AWD').val()�			+"&LANG="+ gLng�			+"&COUNTRY="+ $('#p_country').val()�			+"&STA="+ xStation�			+"&IBEOWNER="+gCtr�			+"&DEL=Y"+�			getClientDateTime("D")�			+"&CODATE="+ coDate�			+"&COTIME=0000" // not needed but should exist in request�			+"&RAN=" + Math.random(), �			�			function( data ){�				xAdjustMSG = '';�				if( data['DATEADJUSTED'] == 'Y' )�				{�					if( dateType == "p" ){�						xD = data['DATE'];�						xDate = new Date( xD.substr(0,4) , (xD.substr(4,2)-1), xD.substr(6,2) );�						$('input[name="ETADate"]').datepicker('setDate', xDate)��						if( dtObj < xDate){�							xText = '<tr class="timeslot-info"><td colspan=3>' + xAdjustETAMsg + '</td></tr>';�							xAdjustMSG = xText.replace("%ETA%",  xD.substr(6,2) + "/" + xD.substr(4,2) + "/" + xD.substr(0,4));�						}��						xDate2 = Date.parse( xDate ) + (Diff  * 60 * 60 *24 *1000 )�						xDate2 = new Date( xDate2 );��						$('input[name="ETTDate"]').datepicker('setDate', xDate2)�					} else {�						xD = data['DATE'];�						xDate = new Date( xD.substr(0,4) , (xD.substr(4,2)-1), xD.substr(6,2) );					�						$('input[name="ETTDate"]').datepicker('setDate', xDate)�					}�				}�				�				if( data["SLOTS"] ) {�					slots = data['SLOTS'];�					slotsLen = data["SLOTS"].length;�					var slots_table = "";�					�					for( var i=0; i < slotsLen; i++ ){�						s_hrs = slots[i]['START'].substr(0,2);�						s_min = slots[i]['START'].substr(2,2);�						�						e_hrs = slots[i]['END'].substr(0,2);�						e_min = slots[i]['END'].substr(2,2);						�						�						slots_table += '<tr wizval="'+slots[i]['WIZVAL']+'" onmouseover="timeslotTableIn(this)" onmouseout="timeslotTableOut(this)" onclick="setTimeSlot(this, \'' + s_hrs  + '\',\'' + s_min + '\',\'' +  e_hrs + '\',\'' +  e_min + '\' )">'�						//slots_table += '<tr wizval="'+slots[i]['WIZVAL']+'" onclick="setTimeSlot(this )">'�						slots_table += '<td>' + s_hrs + ":" + s_min + "</td>";�						slots_table += '<td>' + e_hrs + ":" + e_min + "</td>";�						slots_table += '<td>' + slots[i]['PRICE'] + "</td></tr>" ;�					}�					//slots_table +=  xAdjustMSG;�					�					$('#dialog-modal table').find('tr:gt(0)').remove().end().append( slots_table )�				}�			}��		)�		dlgWin.dialog({�			modal: true,�			closeOnEscape: false,�			draggable: false,�			resizable: false�		});�		���	});�});��timeslotTableIn = function( table ) {�	$(table).addClass("timeslot-mouseover");�}��timeslotTableOut = function( table ) {�		$(table).removeClass("timeslot-mouseover");�}��setTimeSlot = function( el, ph, pm, rh, rm){�	$this = $(el);�	$val = $this.prop( 'wizval' );�	$hrs = $val.substr(0,2);�	$min = $val.substr(2,2);��	if( dateType == "p" ){�		$('select[name="ETAHour"]').append('<option value="'+$hrs+'">'+$hrs+'</option>').val( $hrs );�		$('select[name="ETAMinute"]').append('<option value="'+$min+'">'+$min+'</option>').val( $min );�		DELCOST = $this.find('td').last().text();�		$('#p_timeslotbutton').html( ph + ":" + pm + " - " + rh + ":" + rm + " hrs");�		xTimeSlot = ph + ":" + pm + " - " + rh + ":" + rm ;�		xZipLocation = xStation;�	} else {�		$('select[name="ETTHour"]').append('<option value="'+$hrs+'">'+$hrs+'</option>').val( $hrs );�		$('select[name="ETTMinute"]').append('<option value="'+$min+'">'+$min+'</option>').val( $min );�		COLCOST = $this.find('td').last().text();�		$('#r_timeslotbutton').html( ph + ":" + pm + " - " + rh + ":" + rm + " hrs");�		xZipRetLocation = xStation;�		if( $('#ret_diff:checked').length < 1 )�		{�			xZipRetLocation = xStation;�		}�	}�	//alert('try closing')�	dlgWin.dialog('close');�}���

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.