mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-17 19:30:44 +00:00
Noscript fallback messages; relocate js into templates (#1097)
This commit is contained in:
parent
f2b74046dd
commit
cfc3390b81
@ -53,6 +53,15 @@ input[type="radio"] {
|
||||
margin: 0 0.1rem 0 0.75rem;
|
||||
}
|
||||
|
||||
div.noscriptmsg {
|
||||
background: var(--danger);
|
||||
border-radius: var(--border-radius);
|
||||
padding: 0.5rem;
|
||||
font-size: 0.75rem;
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------------------------------
|
||||
Tables
|
||||
|
@ -23,20 +23,6 @@
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename=current_theme_stylesheet) }}">
|
||||
|
||||
<script type="application/javascript">
|
||||
var processNotify = function(Notification) {
|
||||
document.getElementById("flash").innerHTML = "<div class=\"info\"><div>" + Notification + "{{ _(" This process may take a while, and will continue in the background if you navigate away from this page.") }}</div></div>";
|
||||
window.scrollTo(0,0);
|
||||
}
|
||||
|
||||
var shutdownNotify = function(Notification) {
|
||||
document.getElementById("flash").innerHTML = "<div class=\"warning\"><div>" + Notification + "{{ _(" The Web Interface will become unresponsive momentarily. Reload this page after the Pi has started up again.") }}</div></div>";
|
||||
window.scrollTo(0,0);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="application/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/min/dropzone.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="{{ body_classes|join(' ') }}">
|
||||
|
@ -1,6 +1,18 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
|
||||
<script type="application/javascript">
|
||||
var processNotify = function(Notification) {
|
||||
document.getElementById("flash").innerHTML = "<div class=\"info\"><div>" + Notification + "{{ _(" This process may take a while, and will continue in the background if you navigate away from this page.") }}</div></div>";
|
||||
window.scrollTo(0,0);
|
||||
}
|
||||
|
||||
var shutdownNotify = function(Notification) {
|
||||
document.getElementById("flash").innerHTML = "<div class=\"warning\"><div>" + Notification + "{{ _(" The Web Interface will become unresponsive momentarily. Reload this page after the Pi has started up again.") }}</div></div>";
|
||||
window.scrollTo(0,0);
|
||||
}
|
||||
</script>
|
||||
|
||||
<section id="current-config">
|
||||
<details>
|
||||
<summary class="heading">
|
||||
@ -380,6 +392,14 @@
|
||||
<section id="upload">
|
||||
<a href="/upload" target="_blank"><p>{{ _("Upload Files (new tab)") }}</p></a>
|
||||
</section>
|
||||
<noscript>
|
||||
<style type="text/css">
|
||||
section#upload { display: none; }
|
||||
</style>
|
||||
<div class="noscriptmsg">
|
||||
{{ _("The file uploading functionality requires JavaScript.") }}
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
<label for="piscsi_config">{{ _("PiSCSI Config") }}</label>
|
||||
</form>
|
||||
|
||||
<script type="application/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/min/dropzone.min.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
Dropzone.options.dropper = {
|
||||
paramName: 'file',
|
||||
@ -54,6 +56,10 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<noscript><p>{{ _("The file uploading functionality requires JavaScript.") }}</p></noscript>
|
||||
<noscript>
|
||||
<div class="noscriptmsg">
|
||||
{{ _("The file uploading functionality requires JavaScript.") }}
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
{% endblock content %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user