PageSourceSearch

https://tenshoku.doctor-navi.jp/assets/frontend/sp/tenshoku/search-7dffcc57.js

js doctor-navi.jp collected 2026-10-06 02:41:40 UTC 15,561 bytes, 413 lines download raw bytes

1$(function() {
2
3  const modal_config = {
4    animatedIn: "slideInRight",
5    animatedOut: "slideOutRight",
6    animationDuration: '.2s'
7  };
8
9  $('#te_area_modal_link').animatedModal(modal_config);
10  $('#te_subject_modal_link').animatedModal(modal_config);
11  $('#te_facility_modal_link').animatedModal(modal_config);
12  $('#te_works_modal_link').animatedModal(modal_config);
13  $('#te_qualifications_modal_link').animatedModal(modal_config);
14  $('#te_details_modal_link').animatedModal(modal_config);
15  $('#te_news_modal_link').animatedModal(modal_config);
16
17  $('.search-modal-area-sp').show();
18
19  $('.search-jobs-block').on('click', function() {
20    const add_link = $(this).find('.add-link')[0];
21    if (add_link) {
22      return add_link.click();
23    }
24  });
25
26  $('.search-modal-area-sp .utility-module-modal .checkbox-column').on('click', function(e) {
27    const $input_area = $(this).find('label');
28    const $input = $(this).find('input');
29    if ($input_area && !$(event.target).closest($input_area).length && !$(event.target).closest($input).length) {
30      return $input_area[0].click();
31    }
32  });
33
34  // 選択ボックスの入れ替え
35  $('div[id^="te_"]').find('.checkbox-label-h3').click(function() {
36    $(this).parent().find('.checkbox-label-h3').removeClass('active');
37    $(this).addClass('active');
38    // te_parent_#{kind}_h3_#{target}をsplit
39    const id_array = $(this).find('label').attr('id').split('_');
40    const kind = id_array[2];
41    const target = id_array[4];
42    $(this).parent().next().find('.right-area').removeClass('active');
43    return $('#te_parent_' + kind + '_right_column_' + target).addClass('active');
44  });
45
46  const set_te_query_text = function() {
47    const texts = [];
48    texts.push($('#te_subjects_text_div').text().replace(/指定なし/g, ''));
49    texts.push($('#te_works_text_div').text().replace(/指定なし/g, ''));
50    texts.push($('#te_areas_text_div').text().replace(/指定なし/g, ''));
51    texts.push($('#te_facilities_text_div').text().replace(/指定なし/g, ''));
52    texts.push($('#te_qualifications_text_div').text().replace(/指定なし/g, ''));
53    texts.push($('#te_details_text_div').text().replace(/指定なし/g, ''));
54    texts.push($('#te_news_text_div').text().replace(/指定なし/g, ''));
55    // キーワード検索のinputエリア
56    texts.push($('#q_k').val());
57    texts.push($('#q_city').val());
58    const text = clean_array(texts).join(',');
59    return $('input[type=hidden][name=query_text]').val(window.truncate(text, 40));
60  };
61
62  //#########################
63  //# エリア関連のイベント
64  //#########################
65  const set_te_area_text = function() {
66    const texts = [];
67    $('#te_area_modal .table-pref').each(function() {
68      const is_other = $(this).next().find('.place_type_other_chk').is(':checked');
69      const is_round = $(this).next().find('.place_type_round_chk').is(':checked');
70      if (is_other || is_round) {
71        return texts.push($.trim($(this).find('label').text()));
72      }
73    });
74    const text = texts.length === 0 ?
75      '指定なし'
76    :
77      texts.join(',');
78    $('#te_areas_text_div').text(window.truncate(text, 15));
79    return set_te_query_text();
80  };
81
82  $('#te_area_modal').find('.pref_chk').on('click', function() {
83    if ($(this).is(':checked')) {
84      $(this).parent().next('div').find('input:checkbox').prop("checked", true);
85      if ($(this).parents('.right-area').find('input:checkbox:not(:checked, .area_chk)').length === 0) {
86        $(this).parents('.right-area').find('.area_chk').prop("checked", true);
87      }
88    } else {
89      $(this).parent().next('div').find('input:checkbox').prop("checked", false);
90      $(this).parents('.right-area').find('.area_chk').prop("checked", false);
91    }
92    return set_te_area_text();
93  });
94
95  $('#te_area_modal').find('.place_type_chk').on('click', function() {
96    if ($(this).is(':checked') && ($(this).parent().find('input:not(:checked)').length === 0)) {
97      $(this).parent().prev().find('.pref_chk').prop("checked", true);
98      if ($(this).parents('.right-area').find('input:checkbox:not(:checked, .area_chk)').length === 0) {
99        $(this).parents('.right-area').find('.area_chk').prop("checked", true);
100      }
101    } else {
102      $(this).parent().prev().find('.pref_chk').prop("checked", false);
103      $(this).parents('.right-area').find('.area_chk').prop("checked", false);
104    }
105    return set_te_area_text();
106  });
107
108  $('#te_area_modal').find('.area_chk').on('click', function() {
109    if ($(this).is(":checked")) {
110      $(this).parents('.right-area').find('input:checkbox').prop("checked", true);
111    } else {
112      $(this).parents('.right-area').find('input:checkbox').prop("checked", false);
113    }
114    return set_te_area_text();
115  });
116
117  $('#te_area_modal .condition-search-clear-checkbox').on('click', function() {
118    $('#te_area_modal').find('.main-module-find').find('input:checkbox').prop("checked", false);
119    return set_te_area_text();
120  });
121
122  //#########################
123  //# 科目区分関連のイベント
124  //#########################
125  const set_te_subjects_text = function() {
126    if ($('#te_subject_modal').size === 0) { return; }
127    const texts = $('#te_subject_modal').find('div.checkbox-column input:checked').map(function() {
128      return $.trim($(this).parents('div.checkbox-column').find('label').text());
129    });
130    const text = texts.get().join(',');
131    if (text !== "") {
132      $('#te_subjects_text_div').text(window.truncate(text, 15));
133    } else {
134      $('#te_subjects_text_div').text("指定なし");
135    }
136    return set_te_query_text();
137  };
138
139  $('#te_subject_modal .te_parent_subject_chk').each(function() {
140    if ($(this).parents('.right-area').find('input.te_child_subject_chk:not(:checked)').length === 0) {
141      return $(this).prop('checked', true);
142    }
143  });
144
145  $('#te_subject_modal .te_parent_subject_chk').on("click", function() {
146    if ($(this).is(":checked")) {
147      $(this).parents('.right-area').find('input:checkbox').prop("checked", true);
148    } else {
149      $(this).parents('.right-area').find('input:checkbox').prop("checked", false);
150    }
151    return set_te_subjects_text();
152  });
153
154  $('#te_subject_modal .te_child_subject_chk').on('click', function() {
155    if ($(this).is(':checked')) {
156      if ($(this).parents('.right-area').find('.te_child_subject_chk:not(:checked)').length === 0) {
157        $(this).parents('.right-area').find('.te_parent_subject_chk').prop("checked", true);
158      }
159    } else {
160      $(this).parents('.right-area').find('.te_parent_subject_chk').prop("checked", false);
161    }
162    return set_te_subjects_text();
163  });
164
165  $('#te_subject_modal .condition-search-clear-checkbox').on('click',  function() {
166    $('#te_subject_modal input:checkbox').prop('checked', false);
167    return set_te_subjects_text();
168  });
169
170  //#########################
171  //# 施設種類関連のイベント
172  //#########################
173  const set_te_facilities_text = function() {
174    if ($('#te_facility_modal').size === 0) { return; }
175    const texts = $('#te_facility_modal').find('div.checkbox-column input:checked').map(function() {
176      return $.trim($(this).parents('div.checkbox-column').find('label').text());
177    });
178    const text = texts.get().join(',');
179    if (text !== "") {
180      $('#te_facilities_text_div').text(window.truncate(text, 15));
181    } else {
182      $('#te_facilities_text_div').text("指定なし");
183    }
184    return set_te_query_text();
185  };
186
187  $('#te_facility_modal .te_parent_facilities_chk').each(function() {
188    if ($(this).parents('.right-area').find('input.te_check_facilities:not(:checked)').length === 0) {
189      return $(this).prop('checked', true);
190    }
191  });
192
193  $('#te_facility_modal .te_parent_facilities_chk').on("click", function() {
194    if ($(this).is(":checked")) {
195      $(this).parents('.right-area').find('input:checkbox').prop("checked", true);
196    } else {
197      $(this).parents('.right-area').find('input:checkbox').prop("checked", false);
198    }
199    return set_te_facilities_text();
200  });
201
202  $('#te_facility_modal .te_check_facilities').on('click', function() {
203    if ($(this).is(':checked')) {
204      if ($(this).parents('.right-area').find('.te_check_facilities:not(:checked)').length === 0) {
205        $(this).parents('.right-area').find('.te_parent_facilities_chk').prop("checked", true);
206      }
207    } else {
208      $(this).parents('.right-area').find('.te_parent_facilities_chk').prop("checked", false);
209    }
210    return set_te_facilities_text();
211  });
212
213  $('#te_facility_modal .condition-search-clear-checkbox').on('click',  function() {
214    $('#te_facility_modal input:checkbox').prop('checked', false);
215    return set_te_facilities_text();
216  });
217
218  //#########################
219  //# 仕事内容関連のイベント
220  //#########################
221  const set_te_works_text = function() {
222    if ($('#te_works_modal').size === 0) { return; }
223    const texts = $('#te_works_modal').find('div.checkbox-column input:checked').map(function() {
224      return $.trim($(this).parents('div.checkbox-column').find('label').text());
225    });
226    const text = texts.get().join(',');
227    if (text !== "") {
228      $('#te_works_text_div').text(window.truncate(text, 15));
229    } else {
230      $('#te_works_text_div').text("指定なし");
231    }
232    return set_te_query_text();
233  };
234
235  $('#te_works_modal .te_parent_work_chk').each(function() {
236    if ($(this).parents('.right-area').find('input.te_check_works:not(:checked)').length === 0) {
237      return $(this).prop('checked', true);
238    }
239  });
240
241  $('#te_works_modal .te_parent_work_chk').on("click", function() {
242    if ($(this).is(":checked")) {
243      $(this).parents('.right-area').find('input:checkbox').prop("checked", true);
244    } else {
245      $(this).parents('.right-area').find('input:checkbox').prop("checked", false);
246    }
247    return set_te_works_text();
248  });
249
250  $('#te_works_modal .te_check_works').on('click', function() {
251    if ($(this).is(':checked')) {
252      if ($(this).parents('.right-area').find('.te_check_works:not(:checked)').length === 0) {
253        $(this).parents('.right-area').find('.te_parent_work_chk').prop("checked", true);
254      }
255    } else {
256      $(this).parents('.right-area').find('.te_parent_work_chk').prop("checked", false);
257    }
258    return set_te_works_text();
259  });
260
261  $('#te_works_modal .condition-search-clear-checkbox').on('click',  function() {
262    $('#te_works_modal input:checkbox').prop('checked', false);
263    return set_te_works_text();
264  });
265
266  //#########################
267  //# 資格取得関連のイベント
268  //#########################
269  const set_te_qualifications_text = function() {
270    const texts = $('#te_qualifications_modal').find('div.checkbox-column input:checked').map(function() {
271      return $.trim($(this).next('label').text());
272    });
273    const text = texts.get().join(',');
274    if (text !== "") {
275      $('#te_qualifications_text_div').text(window.truncate(text, 15));
276    } else {
277      $('#te_qualifications_text_div').text("指定なし");
278    }
279    return set_te_query_text();
280  };
281
282  $('#te_parent_qualification_chk').on('click', function() {
283    if ($(this).is(':checked')) {
284      $('#te_qualifications_modal').find('input.te_check_qualifications').prop("checked", true);
285    } else {
286      $('#te_qualifications_modal').find('input.te_check_qualifications').prop("checked", false);
287    }
288    return set_te_qualifications_text();
289  });
290
291  $('#te_qualifications_modal .te_check_qualifications').on('click', function(e) {
292    if ($(this).is(':checked')) {
293      if ($(this).parents('.modal-section').find('.te_check_qualifications:not(:checked)').length === 0) {
294        $('#te_parent_qualification_chk').prop("checked", true);
295      }
296    } else {
297      $('#te_parent_qualification_chk').prop("checked", false);
298    }
299    return set_te_qualifications_text();
300  });
301
302  $('#te_qualifications_modal .condition-search-clear-checkbox').on('click',  function() {
303    $('#te_qualifications_modal input:checkbox').prop('checked', false);
304    return set_te_qualifications_text();
305  });
306
307  //#########################
308  //# こだわり条件関連のイベント
309  //#########################
310  const set_te_details_text = function() {
311    const texts = $('#te_details_modal').find('div.checkbox-column input:checked').map(function() {
312      return $.trim($(this).next('label').text());
313    });
314    const text = texts.get().join(',');
315    if (text !== "") {
316      $('#te_details_text_div').text(window.truncate(text, 15));
317    } else {
318      $('#te_details_text_div').text("指定なし");
319    }
320    return set_te_query_text();
321  };
322
323  $('#te_details_modal .te_parent_detail_chk').on('click', function() {
324    if ($(this).is(":checked")) {
325      $(this).parents('.right-area').find('input:checkbox').prop("checked", true);
326    } else {
327      $(this).parents('.right-area').find('input:checkbox').prop("checked", false);
328    }
329    return set_te_details_text();
330  });
331
332  $('#te_details_modal .te_check_details').on('click', function(e) {
333    if ($(this).is(':checked')) {
334      if ($(this).parents('.right-area').find('.te_check_details:not(:checked)').length === 0) {
335        $(this).parents('.right-area').find('.te_parent_detail_chk').prop("checked", true);
336      }
337    } else {
338      $(this).parents('.right-area').find('.te_parent_detail_chk').prop("checked", false);
339    }
340    return set_te_details_text();
341  });
342
343  $('#te_details_modal .condition-search-clear-checkbox').on('click',  function() {
344    $('#te_details_modal input:checkbox').prop('checked', false);
345    return set_te_details_text();
346  });
347
348  //#########################
349  //# 新着・更新関連のイベント
350  //#########################
351  const set_te_news_text = function() {
352    const texts = $('#te_news_modal').find('div.checkbox-column input:checked').map(function() {
353      return $.trim($(this).next('label').text());
354    });
355    const text = texts.get().join(',');
356    if (text !== "") {
357      $('#te_news_text_div').text(window.truncate(text, 15));
358    } else {
359      $('#te_news_text_div').text("指定なし");
360    }
361    return set_te_query_text();
362  };
363
364  $('#te_parent_news_chk').on('click', function() {
365    if ($(this).is(':checked')) {
366      $('#te_news_modal').find('input.te_check_news').prop("checked", true);
367    } else {
368      $('#te_news_modal').find('input.te_check_news').prop("checked", false);
369    }
370    return set_te_news_text();
371  });
372
373  $('#te_news_modal .te_check_news').on('click', function(e) {
374    if ($(this).is(':checked')) {
375      if ($(this).parents('.modal-section').find('.te_check_news:not(:checked)').length === 0) {
376        $('#te_parent_news_chk').prop("checked", true);
377      }
378    } else {
379      $('#te_parent_news_chk').prop("checked", false);
380    }
381    return set_te_news_text();
382  });
383
384  $('#te_news_modal .condition-search-clear-checkbox').on('click',  function() {
385    $('#te_news_modal input:checkbox').prop('checked', false);
386    return set_te_news_text();
387  });
388
389
390  // 全件クリア
391  $('.search-jobs-button-area').find('.clear-button').on('click', function() {
392    $('form#new_q').find('input:checkbox').prop('checked', false);
393    $('form#new_q').find('input:text').val('');
394    return reset_te_display();
395  });
396
397
398  // 選択条件表示の再表示
399  var reset_te_display = function() {
400    set_te_area_text();
401    set_te_subjects_text();
402    set_te_facilities_text();
403    set_te_works_text();
404    set_te_qualifications_text();
405    set_te_details_text();
406    set_te_news_text();
407    return set_te_query_text();
408  };
409
410  // 表示初期化
411  return reset_te_display();
412});
413

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.