From bfdae6d634c05d17e0d38f1e60bf613b6b355b16 Mon Sep 17 00:00:00 2001 From: Lars Bergqvist Date: Tue, 21 Nov 2023 18:50:30 +0100 Subject: [PATCH] Replaced categories dropdown with select buttons --- src/app/app.module.ts | 6 +-- .../programs/programs-list.component.html | 35 ++++++++++------- src/app/translations/res-en.json | 3 +- src/app/translations/res-sv.json | 3 +- src/styles.scss | 39 +++---------------- 5 files changed, 33 insertions(+), 53 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 0e93148..fb6915e 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -10,7 +10,6 @@ import { AccordionModule } from 'primeng/accordion'; import { MessageService } from 'primeng/api'; import { ButtonModule } from 'primeng/button'; import { CheckboxModule } from 'primeng/checkbox'; -import { DropdownModule } from 'primeng/dropdown'; import { InputTextModule } from 'primeng/inputtext'; import { SidebarModule } from 'primeng/sidebar'; import { TableModule } from 'primeng/table'; @@ -36,6 +35,7 @@ import { HttpInterceptorService } from './services/http-interceptor.service'; import { LoggingService } from './services/logging.service'; import { MessageBrokerService } from './services/message-broker.service'; import { TranslatePipe } from './translations/translate.pipe'; +import { SelectButtonModule } from 'primeng/selectbutton'; registerLocaleData(locale); @@ -70,8 +70,8 @@ registerLocaleData(locale); ButtonModule, InputTextModule, CheckboxModule, - DropdownModule, - AccordionModule + AccordionModule, + SelectButtonModule ], providers: [ { provide: LOCALE_ID, useValue: 'sv' }, diff --git a/src/app/components/programs/programs-list.component.html b/src/app/components/programs/programs-list.component.html index 4d84cfd..f18052b 100644 --- a/src/app/components/programs/programs-list.component.html +++ b/src/app/components/programs/programs-list.component.html @@ -3,20 +3,27 @@ [globalFilterFields]="['name','channel.name','description']" styleClass="sr-table"> - - - - - - - - - - +
+ + + + + + + +
+ + + + + + +
diff --git a/src/app/translations/res-en.json b/src/app/translations/res-en.json index 7d6bdf3..02d96ad 100644 --- a/src/app/translations/res-en.json +++ b/src/app/translations/res-en.json @@ -55,5 +55,6 @@ "AudioPrefixChannel": "Live", "AudioPrefixEpisode": "Episode", "LinkToProgramDetailsText": "Show details and all episodes for ", - "ShowOnlyCurrentAndFuture": "Show only current and upcoming" + "ShowOnlyCurrentAndFuture": "Show only current and upcoming", + "Categories": "Categories" } diff --git a/src/app/translations/res-sv.json b/src/app/translations/res-sv.json index 5c2f2ed..52b7e71 100644 --- a/src/app/translations/res-sv.json +++ b/src/app/translations/res-sv.json @@ -55,5 +55,6 @@ "AudioPrefixChannel": "Direkt", "AudioPrefixEpisode": "Avsnitt", "LinkToProgramDetailsText": "Visa detaljer och alla avsnitt för ", - "ShowOnlyCurrentAndFuture": "Visa bara pågående och kommande" + "ShowOnlyCurrentAndFuture": "Visa bara pågående och kommande", + "Categories": "Kategorier" } diff --git a/src/styles.scss b/src/styles.scss index 1f9cbbc..4f86b23 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -10,7 +10,6 @@ .play-button { font-size: base.$iconsize; -// padding: 5px; } .clickable { @@ -47,21 +46,10 @@ max-width: 300px; } -.cat-dd { - margin-left: 100px; - max-width: 150px; - margin-right: 5px; -} @media only screen and (max-width: 800px) { .kw-input { max-width: 180px; } - .cat-dd { - margin-left: 30px; - .p-dropdown.p-component { - max-width: 200px; - } - } } @media only screen and (max-width: 960px) { @@ -89,12 +77,6 @@ .kw-input { max-width: 150px; } - .cat-dd { - margin-left: 10px; - .p-dropdown.p-component { - max-width: 200px; - } - } .desc-col { border: none !important; } @@ -104,24 +86,11 @@ .kw-input { max-width: 100px; } - .cat-dd { - margin-left: 10px; - .p-dropdown.p-component { - max-width: 100px; - } - } } @media only screen and (max-width: 320px) { .kw-input { max-width: 80px; } - - .cat-dd { - margin-left: 2px; - .p-dropdown.p-component { - max-width: 80px; - } - } } .details-btn { @@ -171,9 +140,6 @@ .bottom-padding { padding-bottom: 100px; } -.p-dropdown-label.p-inputtext.ng-star-inserted { - padding-top: 2px !important; -} .onlycurrentandfuture-chk { padding: 10px; @@ -193,3 +159,8 @@ padding-top: 5px; padding-bottom: 5px; } + +.p-selectbutton > * { + border-radius: 10px; + margin: 5px; +} \ No newline at end of file