From 23577b82d6243d91b2b929af3bd2c07d01e4bcd1 Mon Sep 17 00:00:00 2001 From: ivis-nakagawa Date: Mon, 5 Aug 2024 13:37:54 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E5=85=AC=E9=96=8B=E3=83=AD=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=80=80=E3=83=AC=E3=83=93=E3=83=A5=EF=BC=92=E5=9B=9E=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/tree-list2/tree-list2.component.css | 114 +++++++++++++----- .../app/tree-list2/tree-list2.component.html | 59 +++++++-- .../app/tree-list2/tree-list2.component.ts | 85 ++++++++++--- 3 files changed, 199 insertions(+), 59 deletions(-) diff --git a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.css b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.css index 6656f31..24ad081 100644 --- a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.css +++ b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.css @@ -13,40 +13,90 @@ } /* モーダルウィンドウのスタイル */ -/* パネルのスタイル */ -.panel { - border: 1px solid #ddd; - border-radius: 4px; - box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); +.Mymodal { + display: none; /* デフォルトでは非表示 */ + position: fixed; /* 固定位置 */ + z-index: 1050; /* 他のコンテンツの上に表示 */ + left: 0; + top: 0; + width: 100%; /* フルスクリーン */ + height: 100%; /* フルスクリーン */ + overflow: auto; /* 必要に応じてスクロール */ + background-color: rgba(0, 0, 0, 0.5); /* 背面を薄暗くする */ } -.panel-body { - padding: 15px; +.modal-content { + background-color: #fefefe; + margin: 15% auto; /* 上下のマージンと中央寄せ */ + padding: 20px; + border: 1px solid #888; + width: 60%; /* 幅 */ + z-index: 1060; /* モーダルコンテンツをさらに前面に */ +} + +.modal-header, .modal-footer { + padding: 10px; + border-bottom: 1px solid #e5e5e5; } -.row { - margin-left: -15px; - margin-right: -15px; +.modal-header { + border-bottom: 1px solid #e5e5e5; } -.col-sm-2, .col-md-2, .col-sm-10, .col-md-10 { - position: relative; - min-height: 1px; - padding-left: 15px; - padding-right: 15px; +.modal-footer { + border-top: 1px solid #e5e5e5; + text-align: right; /* ボタンを右寄せ */ } -.checkbox { - margin-top: 10px; - margin-bottom: 10px; +.close { + color: #aaa; + float: right; + font-size: 28px; + font-weight: bold; } -.text-danger { - color: #a94442; +.close:hover, +.close:focus { + color: black; + text-decoration: none; + cursor: pointer; } -/* モーダルウィンドウのスタイル */ -.Mymodal { +.enable_button:disabled { + background-color: #ccc; /* 非活性時の背景色 */ + cursor: not-allowed; /* 非活性時のカーソル */ +} + +.enable_button { + background-color: #5bc0de; /* 活性時の背景色 */ + color: white; + border: none; + padding: 10px 20px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + margin: 4px 2px; + cursor: pointer; + border-radius: 4px; +} + +.cancel-button { + background-color: #d9534f; /* キャンセルボタンの背景色 */ + color: white; + border: none; + padding: 10px 20px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + margin: 4px 2px; + cursor: pointer; + border-radius: 4px; +} + +/* 新しいモーダル用のCSS */ +#ConfirmModalComponent2 { display: none; /* デフォルトでは非表示 */ position: fixed; /* 固定位置 */ z-index: 1050; /* 他のコンテンツの上に表示 */ @@ -58,7 +108,7 @@ background-color: rgba(0, 0, 0, 0.5); /* 背面を薄暗くする */ } -.modal-content { +#ConfirmModalComponent2 .modal-content { background-color: #fefefe; margin: 15% auto; /* 上下のマージンと中央寄せ */ padding: 20px; @@ -67,40 +117,40 @@ z-index: 1060; /* モーダルコンテンツをさらに前面に */ } -.modal-header, .modal-footer { +#ConfirmModalComponent2 .modal-header, #ConfirmModalComponent2 .modal-footer { padding: 10px; border-bottom: 1px solid #e5e5e5; } -.modal-header { +#ConfirmModalComponent2 .modal-header { border-bottom: 1px solid #e5e5e5; } -.modal-footer { +#ConfirmModalComponent2 .modal-footer { border-top: 1px solid #e5e5e5; text-align: right; /* ボタンを右寄せ */ } -.close { +#ConfirmModalComponent2 .close { color: #aaa; float: right; font-size: 28px; font-weight: bold; } -.close:hover, -.close:focus { +#ConfirmModalComponent2 .close:hover, +#ConfirmModalComponent2 .close:focus { color: black; text-decoration: none; cursor: pointer; } -.enable_button:disabled { +#ConfirmModalComponent2 .enable_button:disabled { background-color: #ccc; /* 非活性時の背景色 */ cursor: not-allowed; /* 非活性時のカーソル */ } -.enable_button { +#ConfirmModalComponent2 .enable_button { background-color: #5bc0de; /* 活性時の背景色 */ color: white; border: none; @@ -114,7 +164,7 @@ border-radius: 4px; } -.cancel-button { +#ConfirmModalComponent2 .cancel-button { background-color: #d9534f; /* キャンセルボタンの背景色 */ color: white; border: none; diff --git a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html index a4fe91e..1239d22 100644 --- a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html +++ b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html @@ -129,6 +129,7 @@

{{langJson.Index_Edit[1]}}

+
@@ -138,21 +139,55 @@

{{langJson.Index_Edit[1]}}

{{langJson.Publish[1]}}
- {{langJson.Open_To_Public[1]}} + {{langJson.Open_To_Public[1]}}

-

- - - {{langJson.Date[1]}}: - - -
-

-

- {{langJson.Set_Publish_Date_Recursively[1]}} -
+
+ + + {{langJson.Date[1]}}: + + +
+

+

+ {{langJson.Set_Publish_Date_Recursively[1]}} +
+
+
+
+ + +
+
diff --git a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.ts b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.ts index 177cd48..f658af6 100644 --- a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.ts +++ b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.ts @@ -87,7 +87,8 @@ export class TreeList2Component implements OnInit { biblio_flag: false, display_format: '1', thumbnail_delete_flag: false, - image_name: '' + image_name: '', + harvest_public_state2: false }; public roleModel = { browsing_role_able: [], @@ -765,51 +766,105 @@ export class TreeList2Component implements OnInit { //インデックスの公開ロック機能追加 modalAberto = { status: 'none' }; isCheckboxChecked = false; - + openModal() { this.modalAberto.status = 'block'; this.resetModalCheckboxState(); } - + closeModal() { this.modalAberto.status = 'none'; this.resetModalCheckbox(); } - - closeModal_2() { - this.modalAberto.status = 'none'; - this.resetModalCheckbox(); - } - + Enable() { this.detailData.harvest_public_state = true; this.closeModal(); } - + Cancel() { this.detailData.harvest_public_state = false; this.closeModal(); } - + onModalCheckboxChange(event: Event) { this.isCheckboxChecked = (event.target as HTMLInputElement).checked; } - + onCheckboxChange(event: Event) { const checkbox = event.target as HTMLInputElement; if (checkbox.checked) { this.openModal(); } } - + resetModalCheckbox() { this.isCheckboxChecked = false; } - + resetModalCheckboxState() { - const modalCheckbox = document.querySelector('.Mymodal input[type="checkbox"]') as HTMLInputElement; + const modalCheckbox = document.querySelector('#CofirmModalComponent input[type="checkbox"]') as HTMLInputElement; if (modalCheckbox) { modalCheckbox.checked = false; } } + + modalAberto2 = { status: 'none' }; + isCheckboxChecked2 = false; + isModalConfirmed2 = false; // モーダルの確認状態を追加 + + openModal2() { + this.modalAberto2.status = 'block'; + this.resetModalCheckboxState2(); + } + + closeModal2() { + this.modalAberto2.status = 'none'; + this.resetModalCheckbox2(); + } + + Enable2() { + this.detailData.public_state = true; + this.isModalConfirmed2 = true; // モーダルが確認されたことを設定 + this.closeModal2(); + this.updateExternalCheckbox2(); // 外部のチェックボックスを更新 + } + + Cancel2() { + this.detailData.public_state = false; + this.isModalConfirmed2 = false; // モーダルが確認されなかったことを設定 + this.closeModal2(); + } + + onModalCheckboxChange2(event: Event) { + this.isCheckboxChecked2 = (event.target as HTMLInputElement).checked; + } + + onCheckboxChange2(event: Event) { + const checkbox = event.target as HTMLInputElement; + if (checkbox.checked && !this.isModalConfirmed2) { + this.openModal2(); + checkbox.checked = false; // モーダルが確認されるまで外部のチェックボックスをチェックしない + } else if (!checkbox.checked) { + this.isModalConfirmed2 = false; // 外部のチェックボックスがオフになった場合、モーダルの確認状態をリセット + } + } + + resetModalCheckbox2() { + this.isCheckboxChecked2 = false; + } + + resetModalCheckboxState2() { + const modalCheckbox = document.querySelector('#ConfirmModalComponent2 input[type="checkbox"]') as HTMLInputElement; + if (modalCheckbox) { + modalCheckbox.checked = false; + } + } + + updateExternalCheckbox2() { + const externalCheckbox = document.querySelector('#rss_display') as HTMLInputElement; + if (externalCheckbox) { + externalCheckbox.checked = this.isModalConfirmed2; + } + } } \ No newline at end of file From a24ea4570d232fb0452024dfd6074221d1b4dde9 Mon Sep 17 00:00:00 2001 From: ivis-nakagawa Date: Mon, 5 Aug 2024 17:54:39 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E5=85=AC=E9=96=8B=E3=83=AD=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=80=80=E6=9C=80=E7=B5=82=E4=BF=AE=E6=AD=A3=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/tree-list2/tree-list2.component.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.ts b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.ts index f658af6..06e53b8 100644 --- a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.ts +++ b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.ts @@ -1,8 +1,6 @@ -import {Component, OnInit, ViewChild, Input, Output, EventEmitter,AfterViewInit,ElementRef} from '@angular/core'; -import {TreeModel, NodeEvent, NodeMenuItemAction, TreeModelSettings, Ng2TreeSettings, NodeMovedEvent} from '../../../ng2-tree'; +import {Component, OnInit, ViewChild, Input} from '@angular/core'; +import {TreeModel, NodeEvent, TreeModelSettings, Ng2TreeSettings, NodeMovedEvent} from '../../../ng2-tree'; import {TreeList2Service} from '../tree-list2.service'; -import {Http, RequestOptions, Headers} from '@angular/http'; -import {Response} from '@angular/http/src/static_response'; import * as $ from 'jquery'; @Component({ @@ -777,12 +775,12 @@ export class TreeList2Component implements OnInit { this.resetModalCheckbox(); } - Enable() { + enable() { this.detailData.harvest_public_state = true; this.closeModal(); } - Cancel() { + cancel() { this.detailData.harvest_public_state = false; this.closeModal(); } @@ -823,14 +821,14 @@ export class TreeList2Component implements OnInit { this.resetModalCheckbox2(); } - Enable2() { + enable2() { this.detailData.public_state = true; this.isModalConfirmed2 = true; // モーダルが確認されたことを設定 this.closeModal2(); this.updateExternalCheckbox2(); // 外部のチェックボックスを更新 } - Cancel2() { + cancel2() { this.detailData.public_state = false; this.isModalConfirmed2 = false; // モーダルが確認されなかったことを設定 this.closeModal2(); From d11aa5e54bd1d2f9404542b5e7a51419545c6d77 Mon Sep 17 00:00:00 2001 From: ivis-nakagawa Date: Tue, 6 Aug 2024 16:27:08 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E5=85=AC=E9=96=8B=E3=83=AD=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=80=802024/8/6=E8=AA=A4=E5=AD=97=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/tree-list2/tree-list2.component.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html index 1239d22..5ad29e2 100644 --- a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html +++ b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html @@ -164,7 +164,7 @@

{{langJson.Index_Edit[1]}}

× @@ -328,7 +328,7 @@ From 3375195dc100151ae3bf0586786968ac2abda9bf Mon Sep 17 00:00:00 2001 From: ivis-nakagawa Date: Thu, 8 Aug 2024 16:41:53 +0900 Subject: [PATCH 4/4] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E5=85=AC=E9=96=8B=E3=83=AD=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=80=80=E4=B8=8D=E8=A6=81=E3=83=9C=E3=82=BF=E3=83=B3=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/tree-list2/tree-list2.component.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html index 5ad29e2..67b9739 100644 --- a/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html +++ b/app-tree-index-edit/src/app/tree-list2/tree-list2.component.html @@ -160,9 +160,6 @@

{{langJson.Index_Edit[1]}}