mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-12 00:29:29 +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;
|
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
|
Tables
|
||||||
|
|
|
@ -23,20 +23,6 @@
|
||||||
<meta name="theme-color" content="#ffffff">
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename=current_theme_stylesheet) }}">
|
<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>
|
</head>
|
||||||
|
|
||||||
<body class="{{ body_classes|join(' ') }}">
|
<body class="{{ body_classes|join(' ') }}">
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% block content %}
|
{% 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">
|
<section id="current-config">
|
||||||
<details>
|
<details>
|
||||||
<summary class="heading">
|
<summary class="heading">
|
||||||
|
@ -380,6 +392,14 @@
|
||||||
<section id="upload">
|
<section id="upload">
|
||||||
<a href="/upload" target="_blank"><p>{{ _("Upload Files (new tab)") }}</p></a>
|
<a href="/upload" target="_blank"><p>{{ _("Upload Files (new tab)") }}</p></a>
|
||||||
</section>
|
</section>
|
||||||
|
<noscript>
|
||||||
|
<style type="text/css">
|
||||||
|
section#upload { display: none; }
|
||||||
|
</style>
|
||||||
|
<div class="noscriptmsg">
|
||||||
|
{{ _("The file uploading functionality requires JavaScript.") }}
|
||||||
|
</div>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
<label for="piscsi_config">{{ _("PiSCSI Config") }}</label>
|
<label for="piscsi_config">{{ _("PiSCSI Config") }}</label>
|
||||||
</form>
|
</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">
|
<script type="application/javascript">
|
||||||
Dropzone.options.dropper = {
|
Dropzone.options.dropper = {
|
||||||
paramName: 'file',
|
paramName: 'file',
|
||||||
|
@ -54,6 +56,10 @@
|
||||||
}
|
}
|
||||||
</script>
|
</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 %}
|
{% endblock content %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user