diff --git a/src/addons/badges/pages/issued-badge/issued-badge.html b/src/addons/badges/pages/issued-badge/issued-badge.html index 834845a06..fde877cb2 100644 --- a/src/addons/badges/pages/issued-badge/issued-badge.html +++ b/src/addons/badges/pages/issued-badge/issued-badge.html @@ -13,7 +13,7 @@ - + diff --git a/src/addons/calendar/components/components.module.ts b/src/addons/calendar/components/components.module.ts index 283909027..68b2bdee2 100644 --- a/src/addons/calendar/components/components.module.ts +++ b/src/addons/calendar/components/components.module.ts @@ -18,14 +18,14 @@ import { CoreSharedModule } from '@/core/shared.module'; import { AddonCalendarCalendarComponent } from './calendar/calendar'; import { AddonCalendarUpcomingEventsComponent } from './upcoming-events/upcoming-events'; -import { AddonCalendarFilterPopoverComponent } from './filter/filter'; +import { AddonCalendarFilterComponent } from './filter/filter'; import { AddonCalendarReminderTimeModalComponent } from './reminder-time-modal/reminder-time-modal'; @NgModule({ declarations: [ AddonCalendarCalendarComponent, AddonCalendarUpcomingEventsComponent, - AddonCalendarFilterPopoverComponent, + AddonCalendarFilterComponent, AddonCalendarReminderTimeModalComponent, ], imports: [ @@ -36,7 +36,7 @@ import { AddonCalendarReminderTimeModalComponent } from './reminder-time-modal/r exports: [ AddonCalendarCalendarComponent, AddonCalendarUpcomingEventsComponent, - AddonCalendarFilterPopoverComponent, + AddonCalendarFilterComponent, AddonCalendarReminderTimeModalComponent, ], }) diff --git a/src/addons/calendar/components/filter/addon-calendar-filter-popover.html b/src/addons/calendar/components/filter/addon-calendar-filter-popover.html deleted file mode 100644 index fd88358b3..000000000 --- a/src/addons/calendar/components/filter/addon-calendar-filter-popover.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - {{ 'addon.calendar.' + type + 'events' | translate}} - - - - - - - - - - - - - - diff --git a/src/addons/calendar/components/filter/filter.html b/src/addons/calendar/components/filter/filter.html new file mode 100644 index 000000000..c49826ce1 --- /dev/null +++ b/src/addons/calendar/components/filter/filter.html @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + {{ 'addon.calendar.' + type + 'events' | translate}} + + + + + + + + + + + + + + + diff --git a/src/addons/calendar/components/filter/filter-popover.scss b/src/addons/calendar/components/filter/filter.scss similarity index 100% rename from src/addons/calendar/components/filter/filter-popover.scss rename to src/addons/calendar/components/filter/filter.scss diff --git a/src/addons/calendar/components/filter/filter.ts b/src/addons/calendar/components/filter/filter.ts index 8827846c5..9d25721b2 100644 --- a/src/addons/calendar/components/filter/filter.ts +++ b/src/addons/calendar/components/filter/filter.ts @@ -15,6 +15,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { CoreEnrolledCourseData } from '@features/courses/services/courses'; import { CoreUtils } from '@services/utils/utils'; +import { ModalController } from '@singletons'; import { CoreEvents } from '@singletons/events'; import { AddonCalendarEventType, AddonCalendarProvider } from '../../services/calendar'; import { AddonCalendarFilter, AddonCalendarEventIcons } from '../../services/calendar-helper'; @@ -23,11 +24,11 @@ import { AddonCalendarFilter, AddonCalendarEventIcons } from '../../services/cal * Component to display the events filter that includes events types and a list of courses. */ @Component({ - selector: 'addon-calendar-filter-popover', - templateUrl: 'addon-calendar-filter-popover.html', - styleUrls: ['../../calendar-common.scss', 'filter-popover.scss'], + selector: 'addon-calendar-filter', + templateUrl: 'filter.html', + styleUrls: ['../../calendar-common.scss', 'filter.scss'], }) -export class AddonCalendarFilterPopoverComponent implements OnInit { +export class AddonCalendarFilterComponent implements OnInit { @Input() filter: AddonCalendarFilter = { filtered: false, @@ -56,7 +57,7 @@ export class AddonCalendarFilterPopoverComponent implements OnInit { } /** - * Init the component. + * @inheritdoc */ ngOnInit(): void { this.courseId = this.filter.courseId || -1; @@ -80,4 +81,11 @@ export class AddonCalendarFilterPopoverComponent implements OnInit { CoreEvents.trigger(AddonCalendarProvider.FILTER_CHANGED_EVENT, this.filter); } + /** + * Close modal. + */ + closeModal(): void { + ModalController.dismiss(); + } + } diff --git a/src/addons/calendar/components/upcoming-events/addon-calendar-upcoming-events.html b/src/addons/calendar/components/upcoming-events/addon-calendar-upcoming-events.html index 23283d242..e5a295569 100644 --- a/src/addons/calendar/components/upcoming-events/addon-calendar-upcoming-events.html +++ b/src/addons/calendar/components/upcoming-events/addon-calendar-upcoming-events.html @@ -6,7 +6,7 @@ + [ngClass]="['addon-calendar-eventtype-'+event.eventtype]" [detail]="false">