Skip to content

Commit

Permalink
Remove bootstrap alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Dec 2, 2020
1 parent 9ad1607 commit fe51478
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions AIPscan/Reporter/templates/reports.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

{% block content %}

<div class="container-alert"></div>

<div class="alert alert-header"><strong>Reports</strong></div>

{% if storage_services %}
Expand Down Expand Up @@ -171,26 +169,6 @@

<!-- TODO: Let's get this into a separate JS and import it... -->
<script>

const WARNINGS = {
ALERT_SECONDARY: "secondary",
ALERT_INFO: "info",
};

// TODO: This should be a generic function across the app, so let's get
// this into it's own import too.
//
// TODO: Are there more idiomatic approaches? 🤷
bootstrap_alert = function(message, alertType) {
$("body > div > div.container-alert").html(
'<div class="alert alert-' +
alertType +
'"><a class="close" data-dismiss="alert">×</a><span>' +
message +
"</span></div>"
)
}

$(document).ready(function() {
// Refresh page with storage_service_id parameter when user selects a
// Storage Service from the dropdown list. This enables us to provide
Expand Down Expand Up @@ -300,7 +278,6 @@
}
});
$("#report2a").on("click", function() {
bootstrap_alert('This is a demo of report two!', WARNINGS.ALERT_SECONDARY);
const URL_AIP_CONTENTS = "/reporter/aip_contents/"
var storageServiceID = $('#ss').val();
var url = (
Expand Down Expand Up @@ -333,7 +310,6 @@
}
});
$("#report4a").on("click", function() {
bootstrap_alert('This is a demo of report three!', WARNINGS.ALERT_SECONDARY);
const URL_AIP_CONTENTS = "/reporter/original_derivatives/";
var storageServiceID = $('#ss').val();
var url = (
Expand Down

0 comments on commit fe51478

Please sign in to comment.