Remove inline script from debian/ubuntu download page
authorMagnus Hagander <magnus@hagander.net>
Sat, 5 Jan 2019 12:15:58 +0000 (13:15 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sat, 5 Jan 2019 12:15:58 +0000 (13:15 +0100)
media/js/main.js
templates/pages/download/linux/debian.html
templates/pages/download/linux/ubuntu.html

index 5a360bd8b8c9b28895b5511341b517cc2d235d83..30b7bf79e37a9ab78676b360a6ec99a07a81d839 100644 (file)
@@ -27,7 +27,9 @@ window.addEventListener("hashchange", shiftWindow);
 /*
  * Debian/Ubuntu download dropdowns
  */
-function updateDebianSeries(select) {
-    var deb = document.getElementById('series-deb');
-    deb.innerHTML = select.value;
-}
+$(function() {
+    $('select#debseries').change(function() {
+       var deb = document.getElementById('series-deb');
+       deb.innerHTML = $(this).val();
+    });
+});
index cfa521da9897afb592a1997f9b50f3967ab02a0f..bb7b70d31a7784ce187058b3229189dac97fed99 100644 (file)
@@ -40,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='updateDebianSeries(this);'>
+  <select id="debseries" name="field.series" class="custom-select">
    <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 0a13a4855abd0fa66f9bb0bc8d77dce0b3903fdb..ac2b8008cd611f3ddbe7372bf7bf5314e916b105 100644 (file)
@@ -41,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='updateDebianSeries(this);'>
+    <select id="debseries" name="field.series" class="custom-select">
       <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>