Skip to content

Commit

Permalink
fix: Remove Pennsieve dataset link and DOI copy buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobiClark committed Jan 19, 2024
1 parent dacd156 commit e11d2ab
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 32 deletions.
9 changes: 2 additions & 7 deletions src/renderer/src/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -755,10 +755,6 @@ button[data-id="guided_bf_list_users_and_teams"] {
margin-left: 2px;
}

.copy-button:hover {
background: #1c687e !important;
}

.div-display-details div {
max-width: 90%;
margin-right: 10px;
Expand Down Expand Up @@ -959,13 +955,12 @@ details[open] > summary::before {
}

.copy-button:hover {
background: #1c687e !important;
/* background: #1c687e !important; TODO: FIX COPY TO CLIPBOARD POST-BUNDLE */
}

#guided-pennsieve-dataset-link {
border-bottom: none !important;
width: 431px;
display: inline-flex;
max-width: 700px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
Expand Down
13 changes: 9 additions & 4 deletions src/renderer/src/scripts/guided-mode/guided-curate-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -2617,7 +2617,7 @@ const guidedSetDOIUI = (doiInformation) => {
$("#curate-button-reserve-doi").disabled = false;
if (doiInformation === "locked") {
// Show reserve DOI button and hide copy button
$("#guided-pennsieve-copy-doi").addClass("hidden");
// $("#guided-pennsieve-copy-doi").addClass("hidden");
$("#curate-button-reserve-doi").addClass("hidden");

Swal.fire({
Expand All @@ -2642,11 +2642,11 @@ const guidedSetDOIUI = (doiInformation) => {

if (doiInformation === "No DOI found for this dataset" || doiInformation === false) {
// Hide the reserve DOI button and show copy button
$("#guided-pennsieve-copy-doi").addClass("hidden");
// $("#guided-pennsieve-copy-doi").addClass("hidden");
$("#curate-button-reserve-doi").removeClass("hidden");
} else {
// Show reserve DOI button and hide copy button
$("#guided-pennsieve-copy-doi").removeClass("hidden");
// $("#guided-pennsieve-copy-doi").removeClass("hidden");
$("#curate-button-reserve-doi").addClass("hidden");
}
};
Expand Down Expand Up @@ -6762,9 +6762,12 @@ window.openPage = async (targetPageID) => {
pennsieveDatasetLink.href = datasetLink;

if (removeEventListener) {
/*
TODO: FIX COPY TO CLIPBOARD POST-BUNDLE
pennsieveDOICopy.removeEventListener("click", () => {
copyLink(doiInfo), true;
});
*/

pennsieveCopy.removeEventListener(
"click",
Expand All @@ -6778,10 +6781,12 @@ window.openPage = async (targetPageID) => {
pennsieveCopy.addEventListener("click", () => {
copyLink(datasetLink);
});
/*
TODO: FIX COPY TO CLIPBOARD POST-BUNDLE
pennsieveDOICopy.addEventListener("click", () => {
let doiInfo = document.getElementById("guided--para-doi-info").innerText;
copyLink(doiInfo);
});
});*/
addListener = false;
removeEventListener = true;
}
Expand Down
32 changes: 11 additions & 21 deletions src/renderer/src/sections/guided_mode/guided_curate_dataset.html
Original file line number Diff line number Diff line change
Expand Up @@ -5895,27 +5895,17 @@ <h2 class="text-sub-step-title">View dataset on Pennsieve</h2>
Review dataset on Pennsieve to ensure it has been generated as requested and all the
data and metadata are included properly
</p>
<div
class="help-text text-center"
style="
font-size: large;
border: 2px solid var(--button-color);
padding: 0rem 0rem 0rem 0.3rem;
border-radius: 5px;
height: 44px;
width: 491px;
"
>
<a id="guided-pennsieve-dataset-link" target="_blank">
<i
class="fas fa-link"
style="margin-right: 0.4rem; margin-left: 0.4rem; writing-mode: tbd"
></i>
</a>
<button id="guided-pennsieve-copy-dataset-link" class="copy-button">
<i id="guided-pennsieve-copy-icon" class="fas fa-copy"></i>
</button>
</div>

<a id="guided-pennsieve-dataset-link" target="_blank">
<i
class="fas fa-link"
style="margin-right: 0.4rem; margin-left: 0.4rem; writing-mode: tbd"
></i>
</a>
<!--TODO: FIX COPY TO CLIPBOARD POST-BUNDLE -->
<button id="guided-pennsieve-copy-dataset-link" class="copy-button hidden">
<i id="guided-pennsieve-copy-icon" class="fas fa-copy"></i>
</button>
</div>
<div class="guided--section">
<h2 class="text-sub-step-title mt-0">Editing this dataset</h2>
Expand Down

0 comments on commit e11d2ab

Please sign in to comment.