質問編集履歴

4

viewを出力されたhtmlベースの記載に変更

2019/09/06 03:16

投稿

gobindar
gobindar

スコア51

test CHANGED
File without changes
test CHANGED
@@ -68,51 +68,317 @@
68
68
 
69
69
  ```html
70
70
 
71
- <select name='data_category_path[]' size={{$size}} class='list {{$filterSelect}}' {{$target}} id={{$hierarchy}} {{$empty}}>
72
-
73
- @foreach($dataitems->data_category_hierarchized[$key1] as $key2 => $val2)
74
-
75
- @if(old('data_category_path') === null || old('data_category_path') === "1000")
76
-
77
- <?php $selected = ""; ?>
78
-
79
- @else
80
-
81
- @if(array_search($dataitems->data_category_hierarchized[$key1][$key2]['data_category_id'],old('data_category_path')) !== false)
82
-
83
- <?php $selected = "selected"; ?>
84
-
85
- @else
86
-
87
- <?php $selected = ""; ?>
88
-
89
- @endif
90
-
91
- @endif
92
-
93
- <option class="disable_check hierarchy_{{$key1}}_option {{$key1}}_{{$val2['data-belongsto']}}" value="{{$dataitems->data_category_hierarchized[$key1][$key2]['data_category_id']}}"
94
-
95
- data-reference="{{$dataitems->data_category_hierarchized[$key1][$key2]['data_category_id']}}"
96
-
97
- data-belongsto="{{$val2['data-belongsto']}}"
98
-
99
- onclick="visible_handling({{$key1}},{{$dataitems->data_category_hierarchized[$key1][$key2]['data_category_id']}})" {{$disabled}} {{$selected}}>
100
-
101
- {{$dataitems->data_category_hierarchized[$key1][$key2]['data_category_name']}}
102
-
103
- </option>
104
-
105
- @endforeach
106
-
107
- </select>
108
-
109
-
110
-
111
- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
112
-
113
- <script src="{{ asset('/js/datacategory_visible_handling.js') }}"></script>
114
-
115
-
71
+ <div class="row mt-2">
72
+
73
+ <div class="col-sm-2 px-sm-2 pr-sm-2 px-3 py-3 text-sm-right text-center">
74
+
75
+ <div class="badge-items badge-deepblue">
76
+
77
+ カテゴリー<small>(※)</small>
78
+
79
+ </div>
80
+
81
+ </div>
82
+
83
+ <div class="col-sm-10 pr-sm-4 py-3 px-4">
84
+
85
+ <div class="contentbox text-sm-left text-center">
86
+
87
+
88
+
89
+ <div class="wrap--outer mb-4">
90
+
91
+ <div class="wrap--inner">
92
+
93
+
94
+
95
+ <div class='wrap nonedis' id=hierarchy_1_block>
96
+
97
+ <span class="help-block_select_category" id="hierarchy_1_notice">
98
+
99
+ <strong>選択して下さい</strong><br>
100
+
101
+ </span>
102
+
103
+ <span class="help-block_select_category" id="hierarchy_1_notice_theme">
104
+
105
+ <strong>選択中のカテゴリーで投稿します</strong><br>
106
+
107
+ </span>
108
+
109
+ <select name='data_category_path[]' size=5 class='list filterSelect' data-target=hierarchy_2 id=hierarchy_1 >
110
+
111
+ <option class="disable_check hierarchy_1_option 1_" value="1001"
112
+
113
+ data-reference="1001"
114
+
115
+ data-belongsto=""
116
+
117
+ onclick="visible_handling(1,1001)" >
118
+
119
+ 業界共通
120
+
121
+ </option>
122
+
123
+ <option class="disable_check hierarchy_1_option 1_" value="1002"
124
+
125
+ data-reference="1002"
126
+
127
+ data-belongsto=""
128
+
129
+ onclick="visible_handling(1,1002)" >
130
+
131
+ 業界固有
132
+
133
+ </option>
134
+
135
+ </select>
136
+
137
+ </div>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <div class='wrap nonedis' id=hierarchy_2_block>
150
+
151
+ <span class="help-block_select_category" id="hierarchy_2_notice">
152
+
153
+ <strong>選択して下さい</strong><br>
154
+
155
+ </span>
156
+
157
+ <span class="help-block_select_category" id="hierarchy_2_notice_theme">
158
+
159
+ <strong>選択中のカテゴリーで投稿します</strong><br>
160
+
161
+ </span>
162
+
163
+ <select name='data_category_path[]' size=15 class='list filterSelect' data-target=hierarchy_3 id=hierarchy_2 data-allowempty>
164
+
165
+ <option class="disable_check hierarchy_2_option 2_1001" value="1003"
166
+
167
+ data-reference="1003"
168
+
169
+ data-belongsto="1001"
170
+
171
+ onclick="visible_handling(2,1003)" >
172
+
173
+ カテゴリA
174
+
175
+ </option>
176
+
177
+ <option class="disable_check hierarchy_2_option 2_1001" value="1004"
178
+
179
+ data-reference="1004"
180
+
181
+ data-belongsto="1001"
182
+
183
+ onclick="visible_handling(2,1004)" >
184
+
185
+ カテゴリB
186
+
187
+ </option>
188
+
189
+ <option class="disable_check hierarchy_2_option 2_1001" value="1005"
190
+
191
+ data-reference="1005"
192
+
193
+ data-belongsto="1001"
194
+
195
+ onclick="visible_handling(2,1005)" >
196
+
197
+ カテゴリC
198
+
199
+ </option>
200
+
201
+ </select>
202
+
203
+ </div>
204
+
205
+
206
+
207
+ <div class='wrap nonedis' id=hierarchy_3_block>
208
+
209
+ <span class="help-block_select_category" id="hierarchy_3_notice">
210
+
211
+ <strong>選択して下さい</strong><br>
212
+
213
+ </span>
214
+
215
+ <span class="help-block_select_category" id="hierarchy_3_notice_theme">
216
+
217
+ <strong>選択中のカテゴリーで投稿します</strong><br>
218
+
219
+ </span>
220
+
221
+ <select name='data_category_path[]' size=15 class='list filterSelect' data-target=hierarchy_4 id=hierarchy_3 data-allowempty>
222
+
223
+ <option class="disable_check hierarchy_3_option 3_1003" value="1012"
224
+
225
+ data-reference="1012"
226
+
227
+ data-belongsto="1003"
228
+
229
+ onclick="visible_handling(3,1012)" >
230
+
231
+ カテゴリD
232
+
233
+ </option>
234
+
235
+ <option class="disable_check hierarchy_3_option 3_1003" value="1013"
236
+
237
+ data-reference="1013"
238
+
239
+ data-belongsto="1003"
240
+
241
+ onclick="visible_handling(3,1013)" >
242
+
243
+ カテゴリE
244
+
245
+ </option>
246
+
247
+ <option class="disable_check hierarchy_3_option 3_1003" value="1014"
248
+
249
+ data-reference="1014"
250
+
251
+ data-belongsto="1003"
252
+
253
+ onclick="visible_handling(3,1014)" >
254
+
255
+ カテゴリF
256
+
257
+ </option>
258
+
259
+ </select>
260
+
261
+ </div>
262
+
263
+
264
+
265
+ <div class='wrap nonedis' id=hierarchy_4_block>
266
+
267
+ <span class="help-block_select_category" id="hierarchy_4_notice">
268
+
269
+ <strong>選択して下さい</strong><br>
270
+
271
+ </span>
272
+
273
+ <span class="help-block_select_category" id="hierarchy_4_notice_theme">
274
+
275
+ <strong>選択中のカテゴリーで投稿します</strong><br>
276
+
277
+ </span>
278
+
279
+ <select name='data_category_path[]' size=15 class='list filterSelect' data-target=hierarchy_5 id=hierarchy_4 data-allowempty>
280
+
281
+ <option class="disable_check hierarchy_4_option 4_1012" value="1048"
282
+
283
+ data-reference="1048"
284
+
285
+ data-belongsto="1012"
286
+
287
+ onclick="visible_handling(4,1048)" >
288
+
289
+ カテゴリG
290
+
291
+ </option>
292
+
293
+ <option class="disable_check hierarchy_4_option 4_1013" value="1049"
294
+
295
+ data-reference="1049"
296
+
297
+ data-belongsto="1013"
298
+
299
+ onclick="visible_handling(4,1049)" >
300
+
301
+ カテゴリH
302
+
303
+ </option>
304
+
305
+ <option class="disable_check hierarchy_4_option 4_1013" value="1050"
306
+
307
+ data-reference="1050"
308
+
309
+ data-belongsto="1013"
310
+
311
+ onclick="visible_handling(4,1050)" >
312
+
313
+ カテゴリI
314
+
315
+ </option>
316
+
317
+ </select>
318
+
319
+ </div>
320
+
321
+
322
+
323
+ <div class='wrap nonedis' id=hierarchy_5_block>
324
+
325
+ <span class="help-block_select_category" id="hierarchy_5_notice">
326
+
327
+ <strong>選択して下さい</strong><br>
328
+
329
+ </span>
330
+
331
+ <span class="help-block_select_category" id="hierarchy_5_notice_theme">
332
+
333
+ <strong>選択中のカテゴリーで投稿します</strong><br>
334
+
335
+ </span>
336
+
337
+ <select name='data_category_path[]' size=15 class='list ' id=hierarchy_5 data-allowempty>
338
+
339
+ <option class="disable_check hierarchy_5_option 5_1032" value="1334"
340
+
341
+ data-reference="1334"
342
+
343
+ data-belongsto="1032"
344
+
345
+ onclick="visible_handling(5,1334)" >
346
+
347
+ カテゴリJ
348
+
349
+ </option>
350
+
351
+ <option class="disable_check hierarchy_5_option 5_1026" value="1081"
352
+
353
+ data-reference="1081"
354
+
355
+ data-belongsto="1026"
356
+
357
+ onclick="visible_handling(5,1081)" >
358
+
359
+ カテゴリK
360
+
361
+ </option>
362
+
363
+ <option class="disable_check hierarchy_5_option 5_1026" value="1082"
364
+
365
+ data-reference="1082"
366
+
367
+ data-belongsto="1026"
368
+
369
+ onclick="visible_handling(5,1082)" >
370
+
371
+ カテゴリL
372
+
373
+ </option>
374
+
375
+ </select>
376
+
377
+ </div>
378
+
379
+ </div>
380
+
381
+ </div>
116
382
 
117
383
  ```
118
384
 

3

前提の追加

2019/09/06 03:16

投稿

gobindar
gobindar

スコア51

test CHANGED
File without changes
test CHANGED
@@ -8,6 +8,34 @@
8
8
 
9
9
 
10
10
 
11
+ ### 前提
12
+
13
+ 本件で扱う仕組みは、データをサイトに投稿する際に、
14
+
15
+ 4階層に階層化されたカテゴリーをselectboxを
16
+
17
+ 使用して1階層ずつ選択する仕組みです。
18
+
19
+ (ログインが必要な画面なのでリンクは貼ることができませんが、
20
+
21
+ ヤフオクの出品カテゴリ選択と同じです)
22
+
23
+ 第一階層のカテゴリをselectボックスのoptionから
24
+
25
+ 選ぶと第二階層のselectボックスが右に出現し、
26
+
27
+ かつその中身は第一階層で選んだカテゴリーの配下になっています。
28
+
29
+ なので、selectボックスのoptionタグに、onclickを使用して、
30
+
31
+ 次の階層のselectボックスの出現・非出現をコントロールしています。
32
+
33
+ (第一階層で選んだものによっては、次の階層を出現させず、そのカテゴリー
34
+
35
+ で投稿させるものがあるため、中身の値で出現・非出現の判断が必要です)
36
+
37
+
38
+
11
39
  ### やりたいこと
12
40
 
13
41
  selectボックスの中のoption(データベースから出力した値をforeachで取得している)
@@ -38,8 +66,6 @@
38
66
 
39
67
  selectboxのview
40
68
 
41
- (データをサイトに投稿する際に、カテゴリーを選択するviewになります)
42
-
43
69
  ```html
44
70
 
45
71
  <select name='data_category_path[]' size={{$size}} class='list {{$filterSelect}}' {{$target}} id={{$hierarchy}} {{$empty}}>

2

ソースのベース変更

2019/09/06 03:05

投稿

gobindar
gobindar

スコア51

test CHANGED
File without changes
test CHANGED
@@ -40,7 +40,7 @@
40
40
 
41
41
  (データをサイトに投稿する際に、カテゴリーを選択するviewになります)
42
42
 
43
- ```php
43
+ ```html
44
44
 
45
45
  <select name='data_category_path[]' size={{$size}} class='list {{$filterSelect}}' {{$target}} id={{$hierarchy}} {{$empty}}>
46
46
 

1

該当部分のみの記述に変更

2019/09/06 02:50

投稿

gobindar
gobindar

スコア51

test CHANGED
File without changes
test CHANGED
@@ -42,82 +42,6 @@
42
42
 
43
43
  ```php
44
44
 
45
- <script type="text/javascript">
46
-
47
- var theme = @json($dataitems->data_theme_id);
48
-
49
- var category_old = @json(old('data_category_path'));
50
-
51
- var undecided_old = @json(old('undecided'));
52
-
53
- </script>
54
-
55
-
56
-
57
- <div class="wrap--outer mb-4">
58
-
59
- <div class="wrap--inner">
60
-
61
- @foreach($dataitems->data_category_hierarchized as $key1 => $val1)
62
-
63
- <?php $hierarchy = "hierarchy_".$key1;?>
64
-
65
- @if($key1 === 1)
66
-
67
- <?php
68
-
69
- $empty = "";
70
-
71
- $size = "5"; ?>
72
-
73
- @else
74
-
75
- <?php
76
-
77
- $empty = "data-allowempty";
78
-
79
- $size = "15"; ?>
80
-
81
- @endif
82
-
83
- @if($val1 !== end($dataitems->data_category_hierarchized))
84
-
85
- <?php $filterSelect = "filterSelect";
86
-
87
- $target = 'data-target=hierarchy_'.($key1+1); ?>
88
-
89
- @else
90
-
91
- <?php $filterSelect = "";
92
-
93
- $target = ""; ?>
94
-
95
- @endif
96
-
97
- @if(old('undecided') === "on")
98
-
99
- <?php $disabled = "disabled";?>
100
-
101
- @else
102
-
103
- <?php $disabled = "";?>
104
-
105
- @endif
106
-
107
- <div class='wrap nonedis' id={{$hierarchy}}_block>
108
-
109
- <span class="help-block_select_category" id="{{$hierarchy}}_notice">
110
-
111
- <strong>選択して下さい</strong><br>
112
-
113
- </span>
114
-
115
- <span class="help-block_select_category" id="{{$hierarchy}}_notice_theme">
116
-
117
- <strong>選択中のカテゴリーで投稿します</strong><br>
118
-
119
- </span>
120
-
121
45
  <select name='data_category_path[]' size={{$size}} class='list {{$filterSelect}}' {{$target}} id={{$hierarchy}} {{$empty}}>
122
46
 
123
47
  @foreach($dataitems->data_category_hierarchized[$key1] as $key2 => $val2)
@@ -156,20 +80,6 @@
156
80
 
157
81
  </select>
158
82
 
159
- </div>
160
-
161
-
162
-
163
- @endforeach
164
-
165
- <?php $count_hierarchy = $key1; ?>
166
-
167
-
168
-
169
- </div>
170
-
171
- </div>
172
-
173
83
 
174
84
 
175
85
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
@@ -190,298 +100,118 @@
190
100
 
191
101
  ```javascript
192
102
 
193
- // make it none-visible except first hierarchy
194
-
195
- document.getElementById('hierarchy_1_block').style.display ="block";
196
-
197
- document.getElementById('hierarchy_1_notice').style.visibility ="visible";
198
-
199
- document.getElementById('hierarchy_1_notice_theme').style.display ="none";
200
-
201
-
202
-
203
- if(category_old){
204
-
205
- last_category = category_old.slice(-1)[0];
206
-
207
- last_category = Number(last_category);
208
-
209
- var theme_check_old = theme.indexOf(last_category);
210
-
211
-
212
-
213
- //hierarchy visible control for old
214
-
215
- if(category_old instanceof Array == true){
216
-
217
- var old_count_hierarchy = category_old.length;}
218
-
219
- else{old_count_hierarchy = 0;}
220
-
221
-
222
-
223
- // selected theme
224
-
225
- if (theme_check_old >= 0){
226
-
227
-
228
-
229
- for( var i=1; i<=(old_count_hierarchy); i++){
230
-
231
-
232
-
233
- // block
234
-
235
- document.getElementById('hierarchy_'+i+'_block').style.display ="block";
236
-
237
-
238
-
239
- // notice
240
-
241
- if(i<old_count_hierarchy){
242
-
243
- document.getElementById('hierarchy_'+i+'_notice').style.visibility ="hidden";
244
-
245
- document.getElementById('hierarchy_'+i+'_notice').style.display ="block";
246
-
247
- document.getElementById('hierarchy_'+i+'_notice_theme').style.visibility ="hidden";
248
-
249
- document.getElementById('hierarchy_'+i+'_notice_theme').style.display ="none";
250
-
251
- }
252
-
253
- if(i==(old_count_hierarchy)){
254
-
255
- document.getElementById('hierarchy_'+i+'_notice').style.visibility ="hidden";
256
-
257
- document.getElementById('hierarchy_'+i+'_notice').style.display ="none";
258
-
259
- document.getElementById('hierarchy_'+i+'_notice_theme').style.visibility ="visible";
260
-
261
- document.getElementById('hierarchy_'+i+'_notice_theme').style.display ="block";
262
-
263
- }
264
-
265
- ;}
266
-
267
-
268
-
269
- // option
270
-
271
- for( var i=2; i<=old_count_hierarchy; i++){
272
-
273
- var firstElement = document.getElementsByClassName('hierarchy_'+i+'_option');
274
-
275
- for (var k = 0; k < firstElement.length; k++) {
276
-
277
- firstElement[k].style.display ="none";
278
-
279
- };
280
-
281
- ;}
282
-
283
- for( var i=1; i<=old_count_hierarchy; i++){
284
-
285
- var secondElement = document.getElementsByClassName((i+1)+"_"+category_old[i-1]);
286
-
287
- for (var k = 0; k < secondElement.length; k++) {
288
-
289
- secondElement[k].style.display ="block";
103
+ function visible_handling(hierarchy_num,category_id){
104
+
105
+
106
+
107
+ document.getElementById('hierarchy_1_notice').style.visibility ="hidden";
108
+
109
+
110
+
111
+ const from = hierarchy_num;
112
+
113
+ var theme_check = theme.indexOf(category_id);
114
+
115
+
116
+
117
+ // select theme
118
+
119
+ if (theme_check >= 0){
120
+
121
+
122
+
123
+ // notice
124
+
125
+ for( var i=1; i<=count_hierarchy; i++){
126
+
127
+
128
+
129
+ if(i<=from){
130
+
131
+ document.getElementById('hierarchy_'+i+'_notice').style.visibility ="hidden";
132
+
133
+ document.getElementById('hierarchy_'+i+'_notice').style.display ="block";
134
+
135
+ document.getElementById('hierarchy_'+i+'_notice_theme').style.display ="none";
136
+
137
+ if(i==from){
138
+
139
+ document.getElementById('hierarchy_'+i+'_notice').style.display ="none";
140
+
141
+ document.getElementById('hierarchy_'+i+'_notice_theme').style.display ="block";
142
+
143
+ document.getElementById('hierarchy_'+i+'_notice_theme').style.visibility ="visible";
144
+
145
+ }
146
+
147
+ document.getElementById('hierarchy_'+i+'_block').style.display ="block";
148
+
149
+ }
150
+
151
+ else{
152
+
153
+ document.getElementById('hierarchy_'+i+'_block').style.display ="none";
154
+
155
+ }
156
+
157
+
290
158
 
291
159
  }
292
160
 
161
+
162
+
293
- ;}
163
+ }
164
+
165
+
166
+
294
-
167
+ else{
168
+
169
+
170
+
171
+ for( var i=1; i<=count_hierarchy; i++){
172
+
173
+
174
+
175
+ if(i<=(from+1)){
176
+
177
+ document.getElementById('hierarchy_'+i+'_notice').style.visibility ="hidden";
178
+
179
+ document.getElementById('hierarchy_'+i+'_notice').style.display ="block";
180
+
181
+ document.getElementById('hierarchy_'+i+'_notice_theme').style.display ="none";
182
+
183
+ if(i<(from+1)){
184
+
185
+ document.getElementById('hierarchy_'+(1+i)+'_block').style.display ="block";
186
+
187
+ document.getElementById('hierarchy_'+(1+i)+'_notice').style.visibility ="hidden";
188
+
189
+ document.getElementById('hierarchy_'+(1+i)+'_notice').style.display ="block";
190
+
295
- ;}
191
+ }
192
+
296
-
193
+ if(i==(from+1)){
194
+
297
-
195
+ //option
196
+
298
-
197
+ var thirdElement = document.getElementsByClassName('hierarchy_'+i+'_option');
198
+
199
+ for (var k = 0; k < thirdElement.length; k++) {
200
+
201
+ thirdElement[k].style.display ="block";}
202
+
299
- // not selected theme
203
+ //notice
204
+
205
+ document.getElementById('hierarchy_'+i+'_notice').style.display ="block";
206
+
207
+ document.getElementById('hierarchy_'+i+'_notice').style.visibility ="visible";
208
+
209
+ }
210
+
211
+ }
300
212
 
301
213
  else{
302
214
 
303
- for( var i=1; i<=(old_count_hierarchy+1); i++){
304
-
305
- // block
306
-
307
- document.getElementById('hierarchy_'+i+'_block').style.display ="block";
308
-
309
-
310
-
311
- // notice
312
-
313
- if(i<=old_count_hierarchy){
314
-
315
- document.getElementById('hierarchy_'+i+'_notice').style.visibility ="hidden";
316
-
317
- document.getElementById('hierarchy_'+i+'_notice').style.display ="block";
318
-
319
- document.getElementById('hierarchy_'+i+'_notice_theme').style.visibility ="hidden";
320
-
321
- document.getElementById('hierarchy_'+i+'_notice_theme').style.display ="none";
322
-
323
- }
324
-
325
- if(i==(old_count_hierarchy+1)){
326
-
327
- document.getElementById('hierarchy_'+i+'_notice').style.visibility ="visible";
328
-
329
- document.getElementById('hierarchy_'+i+'_notice').style.display ="block";
330
-
331
- document.getElementById('hierarchy_'+i+'_notice_theme').style.visibility ="hidden";
332
-
333
- document.getElementById('hierarchy_'+i+'_notice_theme').style.display ="none";
334
-
335
- }
336
-
337
- ;}
338
-
339
-
340
-
341
- //option
342
-
343
- for( var i=2; i<=(old_count_hierarchy+1); i++){
344
-
345
- var firstElement = document.getElementsByClassName('hierarchy_'+i+'_option');
346
-
347
- for (var k = 0; k < firstElement.length; k++) {
348
-
349
- firstElement[k].style.display ="none";
350
-
351
- };
352
-
353
- }
354
-
355
- for( var i=1; i<=old_count_hierarchy+1; i++){
356
-
357
- var secondElement = document.getElementsByClassName((i+1)+"_"+category_old[i-1]);
358
-
359
- for (var k = 0; k < secondElement.length; k++) {
360
-
361
- secondElement[k].style.display ="block";
362
-
363
- }
364
-
365
- ;}
366
-
367
- ;}
368
-
369
- ;}
370
-
371
-
372
-
373
- function visible_handling(hierarchy_num,category_id){
374
-
375
-
376
-
377
- document.getElementById('hierarchy_1_notice').style.visibility ="hidden";
378
-
379
-
380
-
381
- const from = hierarchy_num;
382
-
383
- var theme_check = theme.indexOf(category_id);
384
-
385
-
386
-
387
- // select theme
388
-
389
- if (theme_check >= 0){
390
-
391
-
392
-
393
- // notice
394
-
395
- for( var i=1; i<=count_hierarchy; i++){
396
-
397
-
398
-
399
- if(i<=from){
400
-
401
- document.getElementById('hierarchy_'+i+'_notice').style.visibility ="hidden";
402
-
403
- document.getElementById('hierarchy_'+i+'_notice').style.display ="block";
404
-
405
- document.getElementById('hierarchy_'+i+'_notice_theme').style.display ="none";
406
-
407
- if(i==from){
408
-
409
- document.getElementById('hierarchy_'+i+'_notice').style.display ="none";
410
-
411
- document.getElementById('hierarchy_'+i+'_notice_theme').style.display ="block";
412
-
413
- document.getElementById('hierarchy_'+i+'_notice_theme').style.visibility ="visible";
414
-
415
- }
416
-
417
- document.getElementById('hierarchy_'+i+'_block').style.display ="block";
418
-
419
- }
420
-
421
- else{
422
-
423
- document.getElementById('hierarchy_'+i+'_block').style.display ="none";
424
-
425
- }
426
-
427
-
428
-
429
- }
430
-
431
-
432
-
433
- }
434
-
435
-
436
-
437
- else{
438
-
439
-
440
-
441
- for( var i=1; i<=count_hierarchy; i++){
442
-
443
-
444
-
445
- if(i<=(from+1)){
446
-
447
- document.getElementById('hierarchy_'+i+'_notice').style.visibility ="hidden";
448
-
449
- document.getElementById('hierarchy_'+i+'_notice').style.display ="block";
450
-
451
- document.getElementById('hierarchy_'+i+'_notice_theme').style.display ="none";
452
-
453
- if(i<(from+1)){
454
-
455
- document.getElementById('hierarchy_'+(1+i)+'_block').style.display ="block";
456
-
457
- document.getElementById('hierarchy_'+(1+i)+'_notice').style.visibility ="hidden";
458
-
459
- document.getElementById('hierarchy_'+(1+i)+'_notice').style.display ="block";
460
-
461
- }
462
-
463
- if(i==(from+1)){
464
-
465
- //option
466
-
467
- var thirdElement = document.getElementsByClassName('hierarchy_'+i+'_option');
468
-
469
- for (var k = 0; k < thirdElement.length; k++) {
470
-
471
- thirdElement[k].style.display ="block";}
472
-
473
- //notice
474
-
475
- document.getElementById('hierarchy_'+i+'_notice').style.display ="block";
476
-
477
- document.getElementById('hierarchy_'+i+'_notice').style.visibility ="visible";
478
-
479
- }
480
-
481
- }
482
-
483
- else{
484
-
485
215
  document.getElementById('hierarchy_'+i+'_block').style.display ="none";
486
216
 
487
217
  }