diff --git a/cms/sass/components/_dropdown.scss b/cms/sass/components/_dropdown.scss index 47ab4dc5e7..07524b5101 100644 --- a/cms/sass/components/_dropdown.scss +++ b/cms/sass/components/_dropdown.scss @@ -15,10 +15,6 @@ } } -.dropdown--notifications { - @extend .dropdown; -} - .dropdown__menu { display: none; padding: 0; diff --git a/doajtest/testbook/user_management/user_management.yml b/doajtest/testbook/user_management/user_management.yml index a19230dbd9..55795719bd 100644 --- a/doajtest/testbook/user_management/user_management.yml +++ b/doajtest/testbook/user_management/user_management.yml @@ -40,6 +40,10 @@ fragments: - Your API Key at the top of the page is updated - You receive a flash message saying your record is updated and the API key has changed + - step: Click "Click to Copy" icon next to your API key + results: + - The API key is copied to your clipboard + - Confirmation message appears and dissapears after a moment - step: Enter mismatched passwords into the "Change your password" boxes and click "Update Account" results: @@ -205,3 +209,12 @@ tests: - step: Click on the user's journals results: - All the same journals are still associated with the user + +- title: User account without API role + context: + role: admin + steps: + - step: Find (or create) a user account which does not have the API role + - step: View the user account page at /account/[account name] + results: + - The API key is not displayed diff --git a/portality/settings.py b/portality/settings.py index 3d0bf1abea..97b6519558 100644 --- a/portality/settings.py +++ b/portality/settings.py @@ -9,7 +9,7 @@ # Application Version information # ~~->API:Feature~~ -DOAJ_VERSION = "6.5.2" +DOAJ_VERSION = "6.5.3" API_VERSION = "3.0.1" ###################################### diff --git a/portality/static/js/notifications.js b/portality/static/js/notifications.js index c564aff81e..9492402824 100644 --- a/portality/static/js/notifications.js +++ b/portality/static/js/notifications.js @@ -58,7 +58,7 @@ doaj.notifications.notificationsReceived = function(data) { } $(".notification_action_link").on("click", doaj.notifications.notificationClicked); - $(".dropdown--notifications").hoverIntent(doaj.notifications.showDropdown, doaj.notifications.hideDropdown); + $("#notifications_nav").hoverIntent(doaj.notifications.showDropdown, doaj.notifications.hideDropdown); } doaj.notifications.showDropdown = function(e) { diff --git a/portality/static/js/tourist.js b/portality/static/js/tourist.js index cc0f375f0a..b2931f6dcf 100644 --- a/portality/static/js/tourist.js +++ b/portality/static/js/tourist.js @@ -15,6 +15,17 @@ doaj.tourist.init = function(params) { if (first) { doaj.tourist.start(first); } + + $("#dropdown--tour_nav").hoverIntent(doaj.tourist.showDropdown, doaj.tourist.hideDropdown); +} + +doaj.tourist.showDropdown = function(e) { + console.log("showDropdown` called") + $("#feature_tours").show(); +} +doaj.tourist.hideDropdown = function() { + console.log("showDropdown` called") + $("#feature_tours").hide(); } doaj.tourist.findNextTour = function() { diff --git a/portality/templates/account/view.html b/portality/templates/account/view.html index ab4c8c0de6..dd1c2aa4a2 100644 --- a/portality/templates/account/view.html +++ b/portality/templates/account/view.html @@ -90,7 +90,9 @@

Your API access

{% if account.has_role("api") %}
API Key
- {{ account.api_key }} + {{ account.api_key }} + Copy value +
{% endif %} @@ -121,6 +123,17 @@

Your API access

$(window).scrollTop($(firstError).offset().top - 100) } + {% if account.has_role("api") %} + // Copy API key to clipboard + $('#click-to-copy--api').click(function() { + let value_to_copy = $('#user-api').html(); + navigator.clipboard.writeText(value_to_copy); + var confirmation = $("#copy-confirmation--api"); + confirmation.text("Copied: " + value_to_copy); + confirmation.show().delay(3000).fadeOut(); + }); + {% endif %} + // If the user is editing their own account, make them confirm when email address is updated {% if current_user.id == account.id %} $('form#edit_user').submit(function () { diff --git a/portality/templates/includes/_tourist_nav.html b/portality/templates/includes/_tourist_nav.html index f2fa255992..ef8d33090a 100644 --- a/portality/templates/includes/_tourist_nav.html +++ b/portality/templates/includes/_tourist_nav.html @@ -2,10 +2,10 @@ {% set tours = tourservice.activeTours(request.path, current_user) %} {% if tours|length > 0 %} -