PageSourceSearch

https://www.workit.jp/themes/custom/workit/custom/js/workit.top.js?tmcumf

js workit.jp collected 2026-10-04 02:16:00 UTC 4,830 bytes, 116 lines download raw bytes

1(function ($, Drupal, once) {
2
3  'use strict';
4
5  /**
6   * Top search form.
7   *
8   * @created: lamnt
9   */
10  Drupal.behaviors.topPage = {
11    attach: function (context, settings) {
12      var options = $.extend({
13        wrapper: '#top-search-form',
14        result: '.frm-modal-result-text__num, .top-search_box_count_val span',
15      }, settings.top_search);
16
17      $(once('top_search', options.wrapper, context)).each(function () {
18        var _this = $(this);
19        var $result = _this.find(options.result);
20        var area_checked = Drupal.Frontend.getCheckedValue($(settings.areas.id));
21
22        var getSearchData = function() {
23          var data = {
24            prefecture: Drupal.Frontend.getCheckedValue($('#js-prefectures-content')),
25            field_other_prejudice_conditions: Drupal.Frontend.getCheckedValue($('.top-search_other')),
26            field_job_type: Drupal.Frontend.getCheckedValue($('#js-occupation-content')),
27            job_salary_type: $('#js-select-category').val(),
28            job_salary: $('#js-select-sub').val(),
29          };
30          return data;
31        }
32        var data = getSearchData();
33        Drupal.Frontend.updateSearchResult(settings.search_url, data, $result);
34
35        // Update search result when click checkboxes.
36        _this.find('.js-search-check, .js-modal-check').click(function(event) {
37          var checked = $(this).hasClass('is-check') ? false : true;
38          $(this).find('input').prop('checked', checked);
39          Drupal.Frontend.updateSearchResult(settings.search_url, getSearchData(), $result);
40        });
41
42        // Update search result when click select.
43        _this.find('.c-select select').change(function(event) {
44          Drupal.Frontend.updateSearchResult(settings.search_url, getSearchData(), $result);
45        });
46
47        // Update search when clear checkboxes.
48        $(context).on('click', '.js-check-clear', function(event) {
49          $(this).parents('#cboxLoadedContent').find('input').prop('checked', false);
50          $(this).parents('.frm-modal').find('#js-select-category').val('field_hourly_salary').trigger('change');
51          $(this).parents('.frm-modal').find('#js-select-sub option').eq(0).prop('selected', true).trigger('change');
52          Drupal.Frontend.updateSearchResult(settings.search_url, getSearchData(), $result);
53        });
54
55        // Update text when init page.
56        _this.find('ul.top-search-box_easy li a').each(function(index, el) {
57          var modal_id = $(this).attr('href');
58          var values = Drupal.Frontend.getCheckedText($(modal_id));
59          if (values.length) {
60            Drupal.Frontend.setBoxText(modal_id, values);
61          }
62          // Set select option when press back button on browser.
63          if (modal_id == '#js-salary-content') {
64            $('#js-salary-content select option:selected').addClass('is-check');
65          }
66        });
67
68        $('form#top-search-form').submit(function(event) {
69          if ($('#js-select-sub').val() == '') {
70            $('#js-select-sub').attr('disabled', true);
71          }
72          $('input[name="area_hidden"]').val($('#js-header-content ul li input:checked').val());
73        });
74
75        // Update text and search result when submit modal.
76        $(context).on('click', '.js-check-fin', function(event) {
77          var $modal = $(this).closest('.frm-modal').parent();
78          var modal_id = '#' + $modal.attr('id');
79          var values = Drupal.Frontend.getCheckedText($modal);
80          Drupal.Frontend.setBoxText(modal_id, values);
81          data = getSearchData();
82        });
83
84        $(context).on('click', 'div#cboxOverlay, #cboxClose', function () {
85          // Drupal.Frontend.toogleSearchItemWhenCloseModal($(this));
86          Drupal.Frontend.updateSearchResult(settings.search_url, data, $result);
87        })
88
89        // Update search when area changed or init page.
90        $(settings.areas.id).find('.js-check-fin').click(function(event) {
91          data = getSearchData();
92          Drupal.Frontend.updateSearchResult(settings.search_url, data, $result);
93        });
94
95        $('input[name="preview"]').val('');
96        $(context).on('click', '.top-search_link', function() {
97          $('input[name="preview"]').val('1');
98          $('button[name="search"]').trigger('click');
99        });
100
101        $('.l-pc-only .tooltip .tooltiptext').fadeIn('slow');
102        setTimeout(function () {
103          $('.l-pc-only .tooltip .tooltiptext').fadeOut();
104        }, 10000);
105        $('.l-pc-only .tooltip .tooltiptext span').click(function () {
106          $('.l-pc-only .tooltip .tooltiptext').fadeOut();
107        });
108        setTimeout(function () {
109          $('.chat-front').fadeIn('slow');
110        }, 3000);
111      }); // END once.
112
113    } // End attach
114  }; // End Drupal.behaviors.topPage
115
116})(jQuery, Drupal, once);

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.