Skip to content

Commit

Permalink
CONCD-924 (#2586)
Browse files Browse the repository at this point in the history
* CONCD-924 workaround for issue where modal was not closing

* CONCD-924 workaround (fix?) for issue where messages are not being displayed properly

* CONCD-924 reverting some changes + fix for modal not showing

* CONCD-924 workaround for modal not closing

* CONCD-924 banner should be centered
  • Loading branch information
rasarkar authored Nov 8, 2024
1 parent 9235257 commit 41ba3da
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion concordia/static/js/src/contribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ function setupPage() {
.find('#message-contributors-num')
.html(data.asset.contributors);
$('#review-accepted-modal')
.modal()
.show()
.on('hidden.bs.modal', function () {
window.location.reload(true);
});
Expand Down
16 changes: 16 additions & 0 deletions concordia/static/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,18 @@ button.btn-primary:hover {
background-color: #005c87;
}

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

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

a.btn-dark {
color: #fff;
}
Expand Down Expand Up @@ -439,6 +451,10 @@ body .form-check-input {
opacity: 1;
}

.flex-1 {
flex: 1;
}

a .campaign-title:hover,
.hero-text a:hover {
color: $dark;
Expand Down
13 changes: 7 additions & 6 deletions concordia/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@
{% if SHOW_BANNER and banner %}
<div id="homepage-contribute-container" class="container my-4">
<div class="px-default ms-md-3 mb-5">
<div class="alert {{ banner.alert_class }} alert-dismissible w-100 d-flex justify-content-between" id="banner-{{ banner.slug }}" role="alert">
<div></div>
<div>
<div class="alert {{ banner.alert_class }} alert-dismissible w-100 d-flex" id="banner-{{ banner.slug }}" role="alert">
<div class="d-flex flex-1 justify-content-center">
<a class="btn {{ banner.btn_class }}" href="{{ banner.link }}"{% if banner.open_in_new_window_tab %} target="_blank"{% endif %}>
{{ banner.text }}
</a>
<button type="button" class="btn btn-dark" id="no-interface-banner">Don't display this again</button>
</div>
<a type="button" data-bs-dismiss="alert" aria-label="Close">
<span class="fas fa-times text-white"></span>
</a>
<div class="d-flex justify-content-end">
<a type="button" data-bs-dismiss="alert" aria-label="Close">
<span class="fas fa-times text-white"></span>
</a>
</div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Nice Job!</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" onclick="$('#review-accepted-modal').hide();">

</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Nice Job!</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" onclick="$('#successful-submission-modal').hide();">

</button>
</div>
Expand Down

0 comments on commit 41ba3da

Please sign in to comment.