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-924 bugs #2579

Merged
merged 5 commits into from
Oct 30, 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
4 changes: 2 additions & 2 deletions concordia/static/js/src/asset-reservation.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function attemptToReserveAsset(reservationURL, findANewPageURL, actionType) {
$transcriptionEditor
.data('hasReservation', false)
.trigger('update-ui-state');
jQuery('#asset-reservation-failure-modal').modal();
jQuery('#asset-reservation-failure-modal').show();
} else {
displayHtmlMessage(
'warning',
Expand All @@ -54,7 +54,7 @@ function attemptToReserveAsset(reservationURL, findANewPageURL, actionType) {
$transcriptionEditor
.data('hasReservation', false)
.trigger('update-ui-state');
jQuery('#asset-reservation-failure-modal').modal();
jQuery('#asset-reservation-failure-modal').show();
Sentry.captureException(errorThrown, function (scope) {
scope.setTransactionName(
'408 error when attempting to reserve asset at ' +
Expand Down
4 changes: 4 additions & 0 deletions concordia/static/js/src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ function displayHtmlMessage(level, message, uniqueId) {
.removeAttr('id');

$newMessage.addClass('alert-' + level);
if (level == 'error') {
/* class for red background */
$newMessage.addClass('alert-danger');
}

if (uniqueId) {
$('#' + uniqueId).remove();
Expand Down
2 changes: 1 addition & 1 deletion concordia/static/js/src/contribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ function setupPage() {
.find('#message-contributors-num')
.html(data.asset.contributors);
$('#successful-submission-modal')
.modal()
.show()
.on('hidden.bs.modal', function () {
window.location.reload(true);
});
Expand Down
14 changes: 14 additions & 0 deletions concordia/static/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,20 @@ header.border-bottom {
.alert {
color: #fff;

&.alert-danger {
background-color: $red;
color: #fff;
}

&.alert-dismissible {
padding: 9px 1rem;
}

&.alert-info {
background-color: $blue;
color: #fff;
}

.alert-link {
color: #fff;
text-decoration: underline;
Expand Down
8 changes: 4 additions & 4 deletions concordia/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ <h1 class="logo-by-the-people m-0 -d-flex -align-items-center">
<div hidden id="message-template">
{% comment %} This is a hidden <div> rather than <template>
because it's not worth dealing with IE11 compatibility {% endcomment %}
<div class="alert alert-dismissible mx-3 my-2" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert"
aria-label="Close">
<div class="alert alert-dismissible mx-3 my-2 d-flex justify-content-between" role="alert">
<a type="button" data-bs-dismiss="alert"
aria-label="Close">
<!--span aria-hidden="true">&times;</span-->
<span aria-hidden="true" class="fas fa-times"></span>
</button>
</a>
</div>
</div>
</div>
Expand Down