mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-21 23:29:39 +00:00
Scroll to top of page when long process is initiated (#493)
* Scroll to top of page when long process is initiated. Reduce code duplication. * Add script type
This commit is contained in:
parent
8dfe9d1b5e
commit
b682655e56
@ -24,6 +24,13 @@
|
||||
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
||||
|
||||
<script type="application/javascript">
|
||||
var processNotify = function(Notification) {
|
||||
document.getElementById("flash").innerHTML = "<div class='message'>" + Notification + " This process may take a while, and will continue in the background if you navigate away from this page.</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>
|
||||
|
@ -201,7 +201,7 @@
|
||||
<form action="/files/unzip" method="post">
|
||||
<input name="zip_file" type="hidden" value="{{ file['name'] }}">
|
||||
<input name="zip_member" type="hidden" value="{{ member }}">
|
||||
<input type="submit" value="Unzip" onclick='document.getElementById("flash").innerHTML = "<div class=\"message\">Unzipping single file...</div>"'>
|
||||
<input type="submit" value="Unzip" onclick="processNotify('Unzipping a single file...')">
|
||||
</form>
|
||||
</summary>
|
||||
<ul style="list-style: none;">
|
||||
@ -215,7 +215,7 @@
|
||||
<form action="/files/unzip" method="post">
|
||||
<input name="zip_file" type="hidden" value="{{ file['name'] }}">
|
||||
<input name="zip_member" type="hidden" value="{{ member }}">
|
||||
<input type="submit" value="Unzip" onclick='document.getElementById("flash").innerHTML = "<div class=\"message\">Unzipping single file...</div>"'>
|
||||
<input type="submit" value="Unzip" onclick="processNotify('Unzipping a single file...')">
|
||||
</form>
|
||||
{% endif %}
|
||||
</li>
|
||||
@ -243,7 +243,7 @@
|
||||
<form action="/files/unzip" method="post">
|
||||
<input name="zip_file" type="hidden" value="{{ file['name'] }}">
|
||||
<input name="zip_members" type="hidden" value="{{ file['zip_members'] }}">
|
||||
<input type="submit" value="Unzip All" onclick='document.getElementById("flash").innerHTML = "<div class=\"message\">Unzipping all files...</div>"'>
|
||||
<input type="submit" value="Unzip All" onclick="processNotify('Unzipping all files...')">
|
||||
</form>
|
||||
{% else %}
|
||||
<form action="/scsi/attach" method="post">
|
||||
@ -388,7 +388,7 @@
|
||||
<form action="/files/download_to_images" method="post">
|
||||
<label for="url">URL:</label>
|
||||
<input name="url" placeholder="URL" required="" type="url">
|
||||
<input type="submit" value="Download" onclick='document.getElementById("flash").innerHTML = "<div class=\"message\">Downloading File to Images...</div>"'>
|
||||
<input type="submit" value="Download" onclick="processNotify('Downloading File to Images...')">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@ -415,7 +415,7 @@
|
||||
<form action="/files/download_to_afp" method="post">
|
||||
<label for="url">URL:</label>
|
||||
<input name="url" placeholder="URL" required="" type="url">
|
||||
<input type="submit" value="Download" onclick='document.getElementById("flash").innerHTML = "<div class=\"message\">Downloading File to AppleShare...</div>"'>
|
||||
<input type="submit" value="Download" onclick="processNotify('Downloading File to AppleShare...')">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@ -458,7 +458,7 @@
|
||||
</select>
|
||||
<label for="url">URL:</label>
|
||||
<input name="url" placeholder="URL" required="" type="url">
|
||||
<input type="submit" value="Download and Mount ISO" onclick='document.getElementById("flash").innerHTML = "<div class=\"message\">Downloading File as ISO...</div>"'>
|
||||
<input type="submit" value="Download and Mount ISO" onclick="processNotify('Downloading File as ISO...')">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user