PageSourceSearch

https://ringram.jp/book/assets/js/common.js

js ringram.jp collected 2026-10-05 05:24:09 UTC 2,364 bytes, 88 lines download raw bytes

1$(function() {
2	$(document).on('click', '.btnCheck', function(){
3		var ths = $(this);
4		var msg = true;
5		var rid = $('input[name="reserved_id"]').val();
6		msg = chkForm();
7		if(msg==true) {
8			if(!rid) {
9				// 申し込み
10				$.when(checkLimit()).done(function() {
11					var json = $.parseJSON(arguments[0]);
12					if(json.result=='false') {
13						alert('同日・同コースを予約済です。');
14						return false;
15					} else {
16						ths.closest('form').submit();
17					}
18				});
19			} else {
20				$(this).closest('form').submit();
21			}
22		}
23	});
24	$(document).on('click', '.btnCheckEmail', function(){
25		var msg = true;
26		msg = chkFormEmail();
27		if(msg==true) {
28			$(this).closest('form').submit();
29		}
30	});
31	$(document).on('click', '.btnCheckAuth', function(){
32		var msg = true;
33		msg = chkFormAuth();
34		if(msg==true) {
35			$(this).closest('form').submit();
36		}
37	});
38	$(document).on('click', '.btnSubmit', function(){
39		$(this).closest('form').submit();
40	});
41	$(document).on('click', '.btnBack', function(){
42		var mode = $(this).attr('data-mode');
43		var url  = $(this).attr('data-url');
44		$('input[name="mode"]').val(mode);
45		$(this).closest('form').attr('action', url);
46		$(this).closest('form').submit();
47	});
48
49	$(document).on('click', '._jsBtnZip', function() {
50		var mode  = 'zip';
51		var zip   = $('input[name="req_zip"]').val();
52		if(zip=='') {
53			alert('郵便番号を入力してください。');
54			return false;
55		}
56		if(zip=='') {
57			alert('郵便番号を入力してください。');
58			return false;
59		} else {
60			if(zip.match(/[^0-9\-]/g)) {
61				alert('郵便番号は半角数字で入力してください。');
62				return false;
63			}
64		}
65		var data  = { mode : mode, zipcode : zip };
66		$.ajax({
67			type:    'POST',
68			url:     '/book/api/zip.php',
69			data:    data,
70			success: function(data) {
71				var json  = $.parseJSON(data);
72				var zip   = json.results;
73				if(zip[0]) {
74					$('select[name="req_pref"] option').each(function() {
75						if($(this).text()==zip[0]['address1']) {
76							$(this).prop('selected', true);
77							return false;
78						}
79					});
80					$('select[name="req_pref"]').css({'color': '#111'});
81					$('input[name="req_addr"]').val(zip[0]['address2'] + zip[0]['address3']);
82				}
83			},
84			complete: function() {}
85		});
86	});
87
88});

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.