From 17edf6712da8b59c909f6dd7bf1e483cdbf20246 Mon Sep 17 00:00:00 2001 From: Julien Banken Date: Thu, 1 Apr 2021 11:47:17 +0000 Subject: [PATCH 1/4] [IMP] website_event_track: ask for notifications when favoriting a track PURPOSE When a user adds a track to his/her favorites, we really want to make sure that the notifications are activated so that he/she can be notified when a track is about to start. The "Set Favorite" button of the tracks will now propagate a new event that will notify the notification manager that a new push notification request should be issued immediately. SPECS - Trigger a new event when the user adds a tracks to his/her favorite. LINKS Task-2347597 COM PR odoo/odoo#69102 ENT PR odoo/enterprise#17612 X-original-commit: 0e28bfdea3938b1d76cb62223b84f155a6ce75d7 --- .../static/src/js/event_track_reminder.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/website_event_track/static/src/js/event_track_reminder.js b/addons/website_event_track/static/src/js/event_track_reminder.js index cae10488b9f..1e3c97a90b1 100644 --- a/addons/website_event_track/static/src/js/event_track_reminder.js +++ b/addons/website_event_track/static/src/js/event_track_reminder.js @@ -63,6 +63,13 @@ publicWidget.registry.websiteEventTrackReminder = publicWidget.Widget.extend({ type: 'info', title: message }); + if (self.reminderOn) { + core.bus.trigger('open_notification_request', 'add_track_to_favorite', { + title: _t('Allow push notifications?'), + body: _t('You have to enable push notifications to get reminders for your favorite tracks.'), + delay: 0 + }); + } } if (result.visitor_uuid) { utils.set_cookie('visitor_uuid', result.visitor_uuid); From c2b099ef765942ac93d601768139ec8eca59cdc5 Mon Sep 17 00:00:00 2001 From: Julien Banken Date: Tue, 9 Mar 2021 13:53:30 +0000 Subject: [PATCH 2/4] [IMP] event: remove the dates from the urls and the default name of the events PURPOSE Previously, the url of the events contained the start and end date of the event. This link can be sent by email. If an administrator changes the start or the end date of the event, the event will still be accessible via the provided link. However, the user can be misled because the dates of the url will no longer match with those set on the event. To avoid confusion, the start and the end date will be removed from the url. SPECS - Remove the start date and the end date of the event from: (1) the urls and (2) the default name of the events. NOTE Note that URLs are backward compatible as only the ID is really used to find a record through routes. LINKS Task-2347597 COM PR odoo/odoo#69102 ENT PR odoo/enterprise#17612 X-original-commit: 60be7bb337804f2fa59003d6e5dc70ecc9750427 --- addons/event/models/event_event.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/addons/event/models/event_event.py b/addons/event/models/event_event.py index 45efd9b6436..0b1d957f7ec 100644 --- a/addons/event/models/event_event.py +++ b/addons/event/models/event_event.py @@ -480,17 +480,6 @@ class EventEvent(models.Model): if event.date_end < event.date_begin: raise ValidationError(_('The closing date cannot be earlier than the beginning date.')) - @api.depends('name', 'date_begin', 'date_end') - def name_get(self): - result = [] - for event in self: - date_begin = fields.Datetime.from_string(event.date_begin) - date_end = fields.Datetime.from_string(event.date_end) - dates = [fields.Date.to_string(fields.Datetime.context_timestamp(event, dt)) for dt in [date_begin, date_end] if dt] - dates = sorted(set(dates)) - result.append((event.id, '%s (%s)' % (event.name, ' - '.join(dates)))) - return result - @api.model def _read_group_stage_ids(self, stages, domain, order): return self.env['event.stage'].search([]) From 98f46907c2c1998fa7d585905995075b04e4acd5 Mon Sep 17 00:00:00 2001 From: Julien Banken Date: Mon, 29 Mar 2021 14:53:15 +0000 Subject: [PATCH 3/4] [IMP] website_event[_track|_meet|_exhibitor]: improve various frontend event layouts PURPOSE This commit generally improves some of the event application layouts. SPECS - Add new rules to handle long text properly. - Set a maximum height for the dropdown menu. - Minor margin and padding adjustments. - Reduce border radius of status badge. - Remove the rounded corners of the cards. - Remove the "wishlist" terminology. - Fix the href attribute of the event name. - Fix image distortion of the sponsor cards (backend). - Hide viewer count when there is no viewer. - Limiting the expansion of the meeting room aside block. - Various other minor changes coming from user testing LINKS Task-2347597 COM PR odoo/odoo#69102 ENT PR odoo/enterprise#17612 X-original-commit: cfbe1096ec34411a7abe9a9510dc4289e15db1cb --- .../static/src/scss/event_templates_common.scss | 9 ++------- addons/website_event/views/event_templates_list.xml | 4 ++-- addons/website_event/views/event_templates_page.xml | 2 +- .../views/event_exhibitor_templates_list.xml | 8 ++++---- .../views/event_exhibitor_templates_page.xml | 8 ++++---- .../views/event_sponsor_views.xml | 8 +++++--- addons/website_event_meet/controllers/community.py | 4 ++-- .../views/event_meet_templates_list.xml | 2 +- .../views/event_meet_templates_page.xml | 13 +++++++------ .../website_event_track/controllers/event_track.py | 4 ++-- addons/website_event_track/models/event_track.py | 2 +- .../models/event_track_visitor.py | 2 +- .../website_event_track/views/event_templates.xml | 2 +- .../views/event_track_templates_agenda.xml | 8 ++++---- .../views/event_track_templates_list.xml | 6 +++--- .../website_event_track/views/event_track_views.xml | 4 ++-- 16 files changed, 42 insertions(+), 44 deletions(-) diff --git a/addons/website_event/static/src/scss/event_templates_common.scss b/addons/website_event/static/src/scss/event_templates_common.scss index a4184f34d60..882539acbe4 100644 --- a/addons/website_event/static/src/scss/event_templates_common.scss +++ b/addons/website_event/static/src/scss/event_templates_common.scss @@ -72,6 +72,8 @@ .dropdown-menu { margin-top: $navbar-padding-y; min-width: 12rem; + max-height: 250px; + overflow-y: auto; } .dropdown-item { &.active .badge { // Invert badge display when the item is active @@ -137,13 +139,6 @@ } .o_wevent_online_page_container { - // Widescreen mode - @include media-breakpoint-up(md) { - &:not(.container) { - padding-left: 0.5rem; - padding-right: 0.5rem; - } - } // Main panel .o_wevent_online_page_main { diff --git a/addons/website_event/views/event_templates_list.xml b/addons/website_event/views/event_templates_list.xml index 6ecd1645db3..990c736a901 100644 --- a/addons/website_event/views/event_templates_list.xml +++ b/addons/website_event/views/event_templates_list.xml @@ -163,10 +163,10 @@
-
+