Skip to content

Commit

Permalink
#359 Add Conversations survey link
Browse files Browse the repository at this point in the history
  • Loading branch information
profmikegreene committed Mar 16, 2022
1 parent cc38968 commit 1bc3793
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
25 changes: 25 additions & 0 deletions library/src/morpheus-master/js/duke-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,28 @@ if (document.querySelector(".Mrphs-headerLogo--institution")) {
homeLinkContainer.click();
});
}

///////////////////////////////////////////////////
// #359 Add Conversations survey to tool
///////////////////////////////////////////////////

function dukeAddConversationsSurvey(){
// await document.hasOwnProperty('sakai');
if ( 'conversations' in window.sakai.translations ) {
const surveyContainer = document.createElement("div");
surveyContainer.id = "duke-conversations-survey";
const classes = ["duke-conversations-survey", "sak-banner-success-inline"];
surveyContainer.classList.add(...classes);
surveyContainer.innerHTML = `<a href="https://duke.qualtrics.com/jfe/form/SV_064tXBcRDJv3T7w">Share your experience with Conversations!</a>`;
let placement = document.querySelector(".Mrphs-sakai-conversations .Mrphs-toolTitleNav");
placement.prepend(surveyContainer);
}
}

if (document.readyState == 'loading') {
// still loading, wait for the event
document.addEventListener('DOMContentLoaded', dukeAddConversationsSurvey);
} else {
// DOM is ready!
dukeAddConversationsSurvey();
}
16 changes: 16 additions & 0 deletions library/src/morpheus-master/sass/_duke-all-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1554,3 +1554,19 @@ div.progress-stat {
margin-left: 5px;
}
}

// duke-359 Conversations survey banner
#duke-conversations-survey {
padding: 8px 8px 8px 50px;
@media only screen and (min-width: 800px) {

margin-top:-48px;
}
}
.Mrphs-sakai-conversations .Mrphs-toolTitleNav {
justify-content: flex-end;
align-content: center;
align-items: center;
flex-direction: row;
flex-wrap: nowrap;
}

0 comments on commit 1bc3793

Please sign in to comment.