Skip to content

Commit

Permalink
Additional styling for request buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
little9 committed Feb 6, 2024
1 parent 1b17701 commit f998e80
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 25 deletions.
30 changes: 17 additions & 13 deletions 01JHU_INST-JHU/css/sign-in-button.css
Original file line number Diff line number Diff line change
@@ -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;
}
16 changes: 4 additions & 12 deletions 01JHU_INST-JHU/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -65,4 +56,5 @@
}
});


})();

0 comments on commit f998e80

Please sign in to comment.