Move debian/ubuntu downloads javascript into main.js

This commit is contained in:
Magnus Hagander
2018-12-20 11:21:21 +01:00
parent 6ee5d9c58d
commit a33bc4630b
3 changed files with 11 additions and 20 deletions

View File

@ -3,3 +3,12 @@ $(document).ready(function() {
$(".navbar").toggleClass("compressed", $(window).scrollTop() >= 20);
});
});
/*
* Debian/Ubuntu download dropdowns
*/
function updateDebianSeries(select) {
var deb = document.getElementById('series-deb');
deb.innerHTML = select.value;
}

View File

@ -11,15 +11,6 @@ The PostgreSQL project also maintains an <a href="#apt">apt repository</a> with
of PostgreSQL available.
</p>
<script type="text/javascript">
<!--
function updateSeries(select) {
var deb = document.getElementById('series-deb');
deb.innerHTML = select.value;
}
-->
</script>
<a name="apt"></a>
<h2>PostgreSQL Apt Repository</h2>
<p>
@ -49,7 +40,7 @@ To use the apt repository, follow these steps:
</p>
<ol>
<li>
<select id="field.series" name="field.series" class="custom-select" onchange='updateSeries(this);'>
<select id="field.series" name="field.series" class="custom-select" onchange='updateDebianSeries(this);'>
<option selected="selected" value="YOUR_DEBIAN_VERSION_HERE">Choose your Debian version</option>
<option value="stretch">Stretch (9.x)</option>
<option value="jessie">Jessie (8.x)</option>

View File

@ -11,15 +11,6 @@ versions of PostgreSQL are available through the PostgreSQL apt
repository.
</p>
<script type="text/javascript">
<!--
function updateSeries(select) {
var deb = document.getElementById('series-deb');
deb.innerHTML = select.value;
}
-->
</script>
<h2>PostgreSQL Apt Repository</h2>
<p>
If the version included in your version of Ubuntu is not the one you want,
@ -50,7 +41,7 @@ To use the apt repository, follow these steps:
</p>
<ul>
<li>
<select id="field.series" name="field.series" class="custom-select" onchange='updateSeries(this);'>
<select id="field.series" name="field.series" class="custom-select" onchange='updateDebianSeries(this);'>
<option selected="selected" value="YOUR_UBUNTU_VERSION_HERE">Choose your Ubuntu version</option>
<option value="bionic">Bionic (18.04)</option>
<option value="xenial">Xenial (16.04)</option>