From f998e80ffc3ef86fc8ffab3d16f750a7a9f4feda Mon Sep 17 00:00:00 2001 From: Jamie Little Date: Tue, 6 Feb 2024 10:04:10 -0600 Subject: [PATCH] Additional styling for request buttons --- 01JHU_INST-JHU/css/sign-in-button.css | 30 +++++++++++++++------------ 01JHU_INST-JHU/js/custom.js | 16 ++++---------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/01JHU_INST-JHU/css/sign-in-button.css b/01JHU_INST-JHU/css/sign-in-button.css index f71d80d9..6b62f546 100644 --- a/01JHU_INST-JHU/css/sign-in-button.css +++ b/01JHU_INST-JHU/css/sign-in-button.css @@ -1,16 +1,20 @@ - /* Sign in button that displays when you are an item page and not signed-in. */ .bar prm-authentication .md-button[aria-label="Sign in"] { - color: #fff !important; - background-color: #002d72; - padding: 1em; - padding-left: 2.5em; - padding-right: 2.5em; - border-radius: .2em; - margin-top: 0; - margin-bottom: 1em; - margin-right: 1em; - min-width: 285px; - float: right; - cursor: pointer; + color: #fff !important; + background-color: #002d72; + padding: 1em; + padding-left: 2.5em; + padding-right: 2.5em; + border-radius: .2em; + margin-top: 0; + margin-bottom: 1em; + margin-right: 1em; + min-width: 285px; + float: right; + cursor: pointer; +} + +/* Bar that contains the sign in button. */ +.bar { + height: 100px; } diff --git a/01JHU_INST-JHU/js/custom.js b/01JHU_INST-JHU/js/custom.js index 0d769dba..f3955149 100644 --- a/01JHU_INST-JHU/js/custom.js +++ b/01JHU_INST-JHU/js/custom.js @@ -34,22 +34,13 @@ templateUrl: "/discovery/custom/01JHU_INST-JHU/html/prm-search-result-thumbnail-container-after.html" }); + /* This component is used to add a "Request" button to the prm-location component. */ app.component('prmLocationAfter', { bindings: { parentCtrl: `<` }, templateUrl: "/discovery/custom/01JHU_INST-JHU/html/prm-location-after.html", controller: function () { - - this.requestHover = function(e) { - var clickedElement = e.target; - var requestButton = clickedElement.parentElement.parentElement.firstChild; - - if (requestButton) { - var mouseoverEvent = new Event('mouseover'); - requestButton.dispatchEvent(mouseoverEvent); - } else { - console.log('No request button found'); - } - } + this.$onInit = function() { + }; this.requestFromThisLocation = function (e) { var clickedElement = e.target; @@ -65,4 +56,5 @@ } }); + })();