Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONCD-904 #2497

Merged
merged 3 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion concordia/static/js/src/contribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function lockControls($container) {
// Locks all of the controls in the provided jQuery element
$container.find('input, textarea').attr('readonly', 'readonly');
$container.find('input:checkbox').attr('disabled', 'disabled');
$container.find('button').attr('disabled', 'disabled');
$container.find('button:not(#open-guide)').attr('disabled', 'disabled');
}

function unlockControls($container) {
Expand Down
24 changes: 14 additions & 10 deletions concordia/static/js/src/guide.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@

function openOffcanvas() {
let guide = document.getElementById('guide-sidebar');
guide.classList.remove('offscreen');
guide.style.borderWidth = '0 0 thick thick';
guide.style.borderStyle = 'solid';
guide.style.borderColor = '#0076ad';
document.addEventListener('keydown', function (event) {
if (event.key == 'Escape') {
closeOffcanvas();
}
});
document.getElementById('open-guide').style.background = '#002347';
if (guide.classList.contains('offscreen')) {
guide.classList.remove('offscreen');
guide.style.borderWidth = '0 0 thick thick';
guide.style.borderStyle = 'solid';
guide.style.borderColor = '#0076ad';
document.addEventListener('keydown', function (event) {
if (event.key == 'Escape') {
closeOffcanvas();
}
});
document.getElementById('open-guide').style.background = '#002347';
} else {
closeOffcanvas();
}
}

function closeOffcanvas() {
Expand Down
1 change: 1 addition & 0 deletions concordia/static/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,7 @@ $card-progress-height: 12px;
/* How to Guide */
#open-guide {
border-radius: 0;
margin: 0 5px 0 9px;
white-space: nowrap;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h2 id="message-contributors" {% if transcription_status == 'not_started' %}hidd
<u>Campaign Tips</u>
</a>
{% if guides %}
<button id="open-guide" class="btn btn-primary mx-1" type="button">How-To Guide</button>
<button id="open-guide" class="btn btn-primary" type="button">How-To Guide</button>
{% endif %}
</div>
{% endif %}
Expand Down
Loading