1var beds24dayname = "Day"; 2 3 4jQuery(document).ready(function($) { 5 $("#datepicker").datepicker({ 6 buttonImage: WPURLS.siteurl + '/wp-content/plugins/beds24-online-booking/theme-files/include/ic_calendar2.png', 7 buttonImageOnly: true, 8 changeMonth: true, 9 changeYear: true, 10 showOn: 'both', 11 dateFormat: 'yy-mm-dd', 12 beforeShow: readdatepicker, 13 onSelect: updatedatepicker 14}); 15 16var beds24lang = jQuery('#fdate_lang').val(); 17var beds24getscript = false; 18switch (beds24lang) { 19case "da": 20 beds24dayname="Dag"; 21 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-da.js"; 22 break; 23case "de": //german 24 beds24dayname="Tag"; 25 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-de.js"; 26 break; 27case "el": //greek 28 beds24dayname="ÎμÎÏα"; 29 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-el.js"; 30 break; 31case "es": //spanish 32 beds24dayname="Dia"; 33 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-es.js"; 34 break; 35case "fi": 36 beds24dayname="Päivä"; 37 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-fi.js"; 38 break; 39case "fr": //french 40 beds24dayname="Jour"; 41 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-fr.js"; 42 break; 43case "it": //italian 44 beds24dayname="Giorno"; 45 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-it.js"; 46 break; 47case "ja": 48 beds24dayname="æ¥"; 49 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-ja.js"; 50 break; 51case "lt": 52 beds24dayname="Diena"; 53 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-lt.js"; 54 break; 55case "nl": 56 beds24dayname="Dag"; 57 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-nl.js"; 58 break; 59case "no": 60 beds24dayname="Dag"; 61 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-no.js"; 62 break; 63case "pl": 64 beds24dayname="DzieÅ"; 65 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-pl.js"; 66 break; 67case "pt": //portuges 68 beds24dayname="Dia"; 69 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-pt.js"; 70 break; 71case "ru": 72 beds24dayname="ÐенÑ"; 73 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-ru.js"; 74 break; 75case "sk": 76 beds24dayname="DeÅ"; 77 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-sk.js"; 78 break; 79case "sl": 80 beds24dayname="Dan"; 81 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-sl.js"; 82 break; 83case "sv": 84 beds24dayname="dag"; 85 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-sv.js"; 86 break; 87case "tr": 88 beds24dayname="Gün"; 89 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-tr.js"; 90 break; 91case "zh": 92 beds24dayname="æ¥"; 93 beds24getscript = WPURLS.siteurl + "/wp-content/plugins/beds24-online-booking/js/ui/i18n/datepicker-zh-CN.js"; 94 break; 95default: //default english 96 beds24dayname="Day"; 97 if(document.getElementById("fdate_monthyear")) {fdate_monthyear_changed ();} 98break; 99} 100if (beds24getscript) { 101 $.getScript(beds24getscript).done(function() {if(document.getElementById("fdate_monthyear")) {fdate_monthyear_changed();}}); 102} 103 104$( "#fdate_monthyear" ).change(function() { 105 fdate_monthyear_changed(); 106}); 107}); 108 109function readdatepicker() { 110 jQuery('#datepicker').val(jQuery('#fdate_monthyear').val() + '-' + jQuery('#fdate_date').val()); 111 return {}; 112} 113 114function updatedatepicker(date) { 115 jQuery('#fdate_monthyear').val(date.substring(0, 7)); 116 fdate_monthyear_changed (); 117 jQuery('#fdate_date').val(parseInt(date.substring(8),10)); 118} 119 120function fdate_monthyear_changed () { 121 var dd = jQuery('#fdate_date').val(); 122 var mm = jQuery('#fdate_monthyear').val(); 123 jQuery('#fdate_date').empty(); 124 var options = new Array(); 125 options [0] = beds24dayname; 126 if (mm==0) { 127 for (i=1; i<=31; i++) { 128 options[i] = i; 129 } 130 } else {
131 year = parseInt(jQuery('#fdate_monthyear').val().substring(0, 4),10); 132 month = parseInt(jQuery('#fdate_monthyear').val().substring(5, 7),10); 133 for (i=1; i<=31; i++) { 134 var d = new Date(year, month-1, i); 135 var n = d.getDay(); 136 var w = jQuery("#datepicker").datepicker("option","dayNamesShort"); 137 if (w == undefined) { 138 w = jQuery("#datepicker").datepicker("option","dayNamesMin"); 139 } 140 if (typeof w[n] == 'string' || w[n] instanceof String) { 141 options[i] = w[n] + ' ' + i; 142 } else { 143 options[i] = i; 144 } 145 } 146 } 147 jQuery.each(options, function(value, key) { 148 jQuery('#fdate_date').append(jQuery("<option></option>").attr("value", value).html(key)); 149 }); 150 jQuery('#fdate_date').val(dd); 151} 152 153
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.