Move debian/ubuntu downloads javascript into main.js
authorMagnus Hagander <magnus@hagander.net>
Thu, 20 Dec 2018 10:21:21 +0000 (11:21 +0100)
committerMagnus Hagander <magnus@hagander.net>
Thu, 20 Dec 2018 16:18:11 +0000 (17:18 +0100)
media/js/main.js
templates/pages/download/linux/debian.html
templates/pages/download/linux/ubuntu.html

index b994d54e8327a4e4731e3df95b5a78373d7b7984..ac9eb87df823b86b811a4e4c94398fc938e3aa77 100644 (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;
+}
index b64781782b5a12bd287985d6df218bab934c00fc..cfa521da9897afb592a1997f9b50f3967ab02a0f 100644 (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>
index 954f415af056247936be6d499c4988188c707d95..0a13a4855abd0fa66f9bb0bc8d77dce0b3903fdb 100644 (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>