PageSourceSearch

https://www.kyoeisha.com/wp-content/themes/kyoeisha2022/js/common.js?ver=7.1.3&t=1791344236

js kyoeisha.com collected 2026-10-07 03:37:41 UTC 7,065 bytes, 141 lines download raw bytes

1/*
2 * 管理用js共通処理
3 */
4jQuery(document).ready(function($) {
5
6  $(window).bind("load", function () {
7    switch_publish_button_on_valid()
8  });
9
10  $("form :input").change(function() {
11    switch_publish_button_on_valid();
12  });
13
14
15  function switch_publish_button_on_valid() {
16
17    // console.log('=======================================================');
18    const targetName = '提供先';
19    let postType = $('#post_type').val();
20
21    // 対象は事例紹介
22    if (postType === undefined && postType !== 'case-study') {
23      return;
24    }
25
26    let side_data_pane = $('.components-panel__body');
27    if (side_data_pane !== undefined && 0 < side_data_pane.length) {
28      for (let childNode of side_data_pane) {
29        let childData = childNode.children;
30        if (childData !== undefined && 0 < childData.length) {
31          for (let idx = 0; idx < childData.length; idx++) {
32            if (childData[idx].ariaLabel === targetName) {
33                // console.dir(childData[idx].child);
34                let copy = { ...childData[idx] };
35                console.dir(copy);
36            }
37          }
38
39//           for (let targetNode of childData) {
40//             // 事例企業カテゴリの集まりを特定 
41//             if (targetNode.ariaLabel === targetName) {
42              
43//               // let targetChild = targetNode.children;
44//               // for (data of targetChild) {
45//                 console.dir(targetNode.childNodes.length);
46//                 console.dir(targetNode.childNodes[0]);
47//                 console.dir(targetNode);
48//               // }
49//               // console.dir(targetNode);
50//               // console.dir(targetChild.length);
51//               // for(let target of targetChild[0]) {
52//               // console.dir(targetChild);
53//               // }
54//               // if (targetChild !== undefined && 0 < targetChild.length) {
55//               //   console.dir(targetChild);
56//               // }
57// // children: HTMLCollection(4)
58// // 0: div.editor-post-taxonomies__hierarchical-terms-choice
59// // 1: div.editor-post-taxonomies__hierarchical-terms-choice
60// // 2: div.editor-post-taxonomies__hierarchical-terms-choice
61// // 3: div.editor-post-taxonomies__hierarchical-terms-choice
62//            }
63//          }
64        }
65      }
66    }
67    // console.log('=======================================================');
68
69/*
70<div class="components-panel__body is-opened">
71  <h2 class="components-panel__body-title"><button type="button" aria-expanded="true" class="components-button components-panel__body-toggle"><span aria-hidden="true"><svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="components-panel__arrow" role="img" aria-hidden="true" focusable="false"><path d="M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"></path></svg></span>提供先</button></h2>
72  <div class="editor-post-taxonomies__hierarchical-terms-list" tabindex="0" role="group" aria-label="提供先">
73    <div class="editor-post-taxonomies__hierarchical-terms-choice">
74      <div class="components-base-control components-checkbox-control css-wdf2ti-Wrapper e1puf3u0">
75        <div class="components-base-control__field css-11vcxb9-StyledField e1puf3u1">
76          <span class="components-checkbox-control__input-container">
77            <input id="inspector-checkbox-control-7" class="components-checkbox-control__input" type="checkbox" value="1">
78<!--
79            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" role="img" class="components-checkbox-control__checked" aria-hidden="true" focusable="false">
80              <path d="M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"></path>
81            </svg>
82-->
83          </span>
84          <label class="components-checkbox-control__label" for="inspector-checkbox-control-7">文教(教育機関)</label>
85        </div>
86      </div>
87    </div>
88    <div class="editor-post-taxonomies__hierarchical-terms-choice">
89      <div class="components-base-control components-checkbox-control css-wdf2ti-Wrapper e1puf3u0">
90        <div class="components-base-control__field css-11vcxb9-StyledField e1puf3u1">
91          <span class="components-checkbox-control__input-container">
92            <input id="inspector-checkbox-control-8" class="components-checkbox-control__input" type="checkbox" value="1">
93          </span>
94          <label class="components-checkbox-control__label" for="inspector-checkbox-control-8">文化施設</label>
95        </div>
96      </div>
97    </div>
98    <div class="editor-post-taxonomies__hierarchical-terms-choice"><div class="components-base-control components-checkbox-control css-wdf2ti-Wrapper e1puf3u0"><div class="components-base-control__field css-11vcxb9-StyledField e1puf3u1"><span class="components-checkbox-control__input-container"><input id="inspector-checkbox-control-9" class="components-checkbox-control__input" type="checkbox" value="1"></span><label class="components-checkbox-control__label" for="inspector-checkbox-control-9">企業・官公庁</label></div></div></div><div class="editor-post-taxonomies__hierarchical-terms-choice"><div class="components-base-control components-checkbox-control css-wdf2ti-Wrapper e1puf3u0"><div class="components-base-control__field css-11vcxb9-StyledField e1puf3u1"><span class="components-checkbox-control__input-container"><input id="inspector-checkbox-control-10" class="components-checkbox-control__input" type="checkbox" value="1"></span><label class="components-checkbox-control__label" for="inspector-checkbox-control-10">医療機関</label></div></div></div></div><button type="button" aria-expanded="false" class="components-button editor-post-taxonomies__hierarchical-terms-add is-link">新規カテゴリーを追加</button></div>
99*/
100
101    // if (side_data_pane !== undefined) {
102    //   // let target_child = side_data_pane[0].child
103    //   for (let )
104    // }
105
106    // $('button.is-primary').attr('disabled', 'disabled');
107    /*
108    if($('form.metabox-location-normal')[0].checkValidity()){
109      $('button.is-primary').removeAttr('disabled');
110    } else {
111      $('button.is-primary').attr('disabled', 'disabled');
112    }
113    */
114  }
115
116  /**
117   * 郵便番号検索
118   */
119  $('#contact-search-address').on('click', function() {
120    let api = 'https://zipcloud.ibsnet.co.jp/api/search?zipcode=';
121    let zipcode = document.getElementById('contact-zipcode');
122    let address1 = document.getElementById('contact-address1');
123    let address2 = document.getElementById('contact-address2');
124    let address3 = document.getElementById('contact-address3');
125
126    // 入力された郵便番号から「-」を削除
127    let param = zipcode.value.replace("-","");
128    let url = api + param;
129    $.ajax({
130      url      : url,
131      dataType : "jsonp",
132      success: function(data) {
133        if (data.status === 200) {
134          address1.value = data.results[0].address1;
135          address2.value = data.results[0].address2;
136          address3.value = data.results[0].address3;
137        }
138      }
139    });
140  });
141});

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.