PageSourceSearch

https://www.coganoi.jp/js/search.js

js coganoi.jp collected 2026-10-01 02:24:31 UTC 3,558 bytes, 106 lines download raw bytes

1$(function(){
2
3	//オブジェクトの設定
4	var dir = {
5		$form : $('#obj_search'),
6		$date : [$('#obj_year'), $('#obj_month'), $('#obj_day')],
7		$min : $('#obj_budget_min'),
8		$max : $('#obj_budget_max'),
9		$minOption : $('#obj_budget_min').find('option'),
10		$maxOption : $('#obj_budget_max').find('option'),
11		$per : $('#obj_search').find('select.obj_per'),
12		$datepicker : $('#datepicker'),
13		$noDate : $('#chkymd'),
14		$noPer : $('#chkpsn')
15	}
16
17	//日付のdisabled設定
18	dir.$noDate.change(function(){
19		if($(this).prop('checked'))
20			dir.$datepicker.prop('disabled', true);
21		else
22			dir.$datepicker.prop('disabled', false);
23	});
24
25	//人数のdisabled設定
26	dir.$noPer.change(function(){
27		if($(this).prop('checked'))
28			dir.$per.prop('disabled', true);
29		else
30			dir.$per.prop('disabled', false);
31	});
32
33	//料金のdisabled設定
34	dir.$min.prop('selectedIndex',0);
35	dir.$max.prop('selectedIndex',23);
36
37	// クロスドメイントラッキング設定
38	dir.$form.submit(function(){
39		var target = this,
40			$target = $(this);
41
42		if(!$(this).find('input.obj_ga').length)
43			$(this).append('<input type="hidden" name="_ga" value="" class="obj_ga">');
44	
45		ga(function(tracker) {
46			var linker = new window.gaplugins.Linker(tracker);
47			var gaCookie = linker.decorate(target.action).split('_ga=');
48			$target.find('input.obj_ga').val(gaCookie[1]);
49		});
50	});
51
52	//datepicker
53	dir.$datepicker.datepicker({
54		monthNames : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
55		monthNamesShort : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
56		dayNames : ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
57		dayNamesMin : ['日','月','火','水','木','金','土'],
58		dateFormat : 'yy/mm/dd',
59		nextText : '次へ', 
60		prevText : '前へ',
61		showOtherMonths : true,
62		selectOtherMonths : true,
63		firstDay : 0,
64		isRTL : false,
65		showMonthAfterYear : true,
66		yearSuffix : 'å¹´',
67		numberOfMonths : 1,
68		minDate : '+0d',
69		onSelect : function(dateText, inst) {
70			var arrDate = dateText.split('/');
71			dir.$date[0].val(arrDate[0]);
72			dir.$date[1].val(arrDate[1]);
73			dir.$date[2].val(arrDate[2]);
74			$('#year').text(arrDate[0]);
75			$('#month').text(arrDate[1]);
76			$('#day').text(arrDate[2]);
77			dir.$datepicker.val(arrDate[0] + '-' + arrDate[1] + '-' + arrDate[2]);
78
79			dayend = new Date(arrDate[0],(arrDate[1]-1),arrDate[2]);
80			dayend.setDate(dayend.getDate() + 1);
81			$('#dayend').val(dayend.getFullYear() + '-' + ('0' + (dayend.getMonth() + 1)).slice(-2) + '-' + ('0' + dayend.getDate()).slice(-2));
82
83			var stayValue = Number($('#obj_sta').val()),
84				dayValue = dir.$datepicker.val().split('-');
85			dayValue = new Date(dayValue[0],(dayValue[1]-1),dayValue[2]);
86			dayValue.setDate(dayValue.getDate() + stayValue)
87
88			$('#dayend').val(dayValue.getFullYear() + '-' + ('0' + (dayValue.getMonth() + 1)).slice(-2) + '-' + ('0' + dayValue.getDate()).slice(-2));
89		}
90	});
91	$('#obj_sta').change(function() {
92		var stayValue = Number($(this).val()),
93			dayValue = dir.$datepicker.val().split('-');
94		dayValue = new Date(dayValue[0],(dayValue[1]-1),dayValue[2]);
95		dayValue.setDate(dayValue.getDate() + stayValue)
96
97		$('#dayend').val(dayValue.getFullYear() + '-' + ('0' + (dayValue.getMonth() + 1)).slice(-2) + '-' + ('0' + dayValue.getDate()).slice(-2));
98	});
99
100});
101
102//検索
103function submitForm(el) {
104	$(el).submit();
105	return false;
106}

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.