From fde91b6677756115fe6f106d0c238af4c6c179a5 Mon Sep 17 00:00:00 2001 From: Diamantis Tziotzios Date: Thu, 1 Feb 2024 17:14:03 +0200 Subject: [PATCH] more description template changes --- ...escription-template-table-of-contents.scss | 32 +-- .../description-template-table-of-contents.ts | 15 -- ...te-table-of-contents-internal-section.html | 219 +++++------------- ...te-table-of-contents-internal-section.scss | 67 ------ ...late-table-of-contents-internal-section.ts | 103 -------- 5 files changed, 53 insertions(+), 383 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/description-template-table-of-contents.scss b/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/description-template-table-of-contents.scss index dc1e64f35..eb164a946 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/description-template-table-of-contents.scss +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/description-template-table-of-contents.scss @@ -1,40 +1,11 @@ $scroller-height: 3em; .scroll-container { - // overflow-y: auto; max-height: 60vh; overflow-y: scroll; padding-left: .2em; padding-right: 1em; - // padding-top: $scroller-height; - // padding-bottom: $scroller-height; } -// #style-6::-webkit-scrollbar-track -// { -// -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); -// background-color: #F5F5F5; -// } - -// #style-6::-webkit-scrollbar -// { -// width: 6px; -// background-color: #F5F5F5; -// } - -// #style-6::-webkit-scrollbar-thumb -// { -// background-color: rgb(162, 163, 163); -// background-image: -webkit-linear-gradient(45deg, -// rgba(255, 255, 255, .2) 25%, -// transparent 25%, -// transparent 50%, -// rgba(255, 255, 255, .2) 50%, -// rgba(255, 255, 255, .2) 75%, -// transparent 75%, -// transparent) -// } - - #tocentrytable::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); @@ -52,7 +23,7 @@ $scroller-height: 3em; { border-radius: 2px; -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); - background-color: rgb(158, 158, 158);// #FFF;//$blue-color-light;// rgb(162, 163, 163);// #D62929; + background-color: rgb(158, 158, 158); } @@ -67,7 +38,6 @@ $scroller-height: 3em; position: relative; } .table-scroller{ - // background-color: #5cf7f221; position: absolute; width: 95%; height: $scroller-height; diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/description-template-table-of-contents.ts b/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/description-template-table-of-contents.ts index 2bc4db504..66ea13348 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/description-template-table-of-contents.ts +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/description-template-table-of-contents.ts @@ -24,7 +24,6 @@ export class DescriptionTemplateTableOfContents extends BaseComponent implements @Output() itemClick = new EventEmitter(); - // @Output() newEntry = new EventEmitter(); @Output() removeEntry = new EventEmitter(); @Output() createEntry = new EventEmitter(); @Output() dataNeedsRefresh = new EventEmitter(); @@ -246,14 +245,11 @@ export class DescriptionTemplateTableOfContents extends BaseComponent implements } }) - // if(targetOrdinal!=targetSections.length){//mporei na einai idio - // section.get('ordinal').setValue(i+1); targetSections.controls.filter(control => control.get('ordinal').value >= targetOrdinal).forEach(control => { const ordinal = control.get('ordinal'); const updatedOrdinalVal = ordinal.value + 1; ordinal.setValue(updatedOrdinalVal); }); - // } } else { console.info('no siblings found'); @@ -262,7 +258,6 @@ export class DescriptionTemplateTableOfContents extends BaseComponent implements targetSections.insert(targetOrdinal, elementSectionForm); } else if (targetContainer.type === ToCEntryType.Page) { - // const pageId = targetContainer.form.get('id').value; const rootform = targetContainer.form.root; const sectionForm = element.form; @@ -428,12 +423,6 @@ export class DescriptionTemplateTableOfContents extends BaseComponent implements // console.log('drag fired'); this.isDragging = true; this.draggingItemId = (el.id as string).replace(this.DRAGULA_ITEM_ID_PREFIX, ''); - - // setTimeout(() => { - // if(this.isDragging){ - // this._scrollIntoDragginItem(this.draggingItemId); - // } - // }, this.VALID_DROP_TIME); }); drake.on('over', (el, container, source) => { try { @@ -570,9 +559,6 @@ export class DescriptionTemplateTableOfContents extends BaseComponent implements this.itemClick.emit(item); } - // addNewEntry(tce: ToCEntry){ - // this.newEntry.emit(tce); - // } deleteEntry(currentLink: ToCEntry) { this.removeEntry.emit(currentLink); } @@ -597,7 +583,6 @@ export class DescriptionTemplateTableOfContents extends BaseComponent implements const aValue = a.get('ordinal').value as number; const bValue = b.get('ordinal').value as number; - // if(!aValue || !bValue) return 0; return aValue - bValue; } diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/table-of-contents-internal-section/description-template-table-of-contents-internal-section.html b/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/table-of-contents-internal-section/description-template-table-of-contents-internal-section.html index 875a21b4a..233355c58 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/table-of-contents-internal-section/description-template-table-of-contents-internal-section.html +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/table-of-contents/table-of-contents-internal-section/description-template-table-of-contents-internal-section.html @@ -1,35 +1,6 @@ - - -
-