diff --git a/affiliations/forms.py b/affiliations/forms.py index b46b37472ecbe4b35b7817c730bb02194d06b11d..c9161718f72d98032bd66e618338be0453c398bf 100644 --- a/affiliations/forms.py +++ b/affiliations/forms.py @@ -65,7 +65,7 @@ class AffiliationForm(forms.ModelForm): return affiliation -class AffiliationsFormSet(BaseModelFormSet): +class BaseAffiliationsFormSet(BaseModelFormSet): """ This formset helps update the Institutions for the Contributor at specific time periods. """ @@ -92,7 +92,7 @@ class AffiliationsFormSet(BaseModelFormSet): AffiliationsFormset = modelformset_factory(Affiliation, form=AffiliationForm, can_delete=True, - formset=AffiliationsFormSet, extra=0) + formset=BaseAffiliationsFormSet, extra=0) class InstitutionMergeForm(forms.ModelForm): diff --git a/scipost/static/scipost/assets/css/_notifications.scss b/scipost/static/scipost/assets/css/_notifications.scss index b642f01edcb4fda82be352bbd88fb77100f5eb9f..3607c064c9515997d5fe15b174317e2ae7136d2f 100644 --- a/scipost/static/scipost/assets/css/_notifications.scss +++ b/scipost/static/scipost/assets/css/_notifications.scss @@ -15,7 +15,7 @@ } } - &.show .fa-inbox { + a[data-toggle="popover"][aria-describedby] { color: $scipost-darkblue; } @@ -40,7 +40,6 @@ min-width: 450px; border-color: $gray-600; border-radius: 1px; - // margin-top: 17px !important; .inbox-header, .header { diff --git a/scipost/static/scipost/assets/js/notifications.js b/scipost/static/scipost/assets/js/notifications.js index 9579a8c438cf7fc026b8825511cdafec6b83fa67..6d995a57e6942e803a9d3a4e9b4a9ef2a3511d32 100644 --- a/scipost/static/scipost/assets/js/notifications.js +++ b/scipost/static/scipost/assets/js/notifications.js @@ -131,12 +131,20 @@ function initiate_popover() { animation: false, offset: '0, 10px', template: template, + delay: { + 'show': 0, + 'hide': 200, + }, placement: 'bottom', boundary: 'viewport', title: 'empty-on-purpose' }) .on('inserted.bs.popover', function() { $('body').trigger('notification_open_list'); + var self = this; + $('.popover').on('click', function() { + $('.notifications_container a[data-toggle="popover"]').focus(); + }); }) .on('hide.bs.popover', function() { // Bug: force removal of tooltip