From 7ca33310447b7cb176f707c217c33fbc23cebb47 Mon Sep 17 00:00:00 2001 From: Andrei Marcu Date: Sat, 7 Mar 2020 18:52:29 -0800 Subject: [PATCH] Access Key: Fix mobile access --- static/css/linx.css | 7 ------- static/js/upload.js | 7 ++++++- templates/index.html | 23 ++++++++++++++--------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/static/css/linx.css b/static/css/linx.css index edb88c4..e47f48f 100644 --- a/static/css/linx.css +++ b/static/css/linx.css @@ -277,13 +277,6 @@ body { margin: 0; } -#access_key_checkbox:checked ~ #access_key_input { - display: inline-block; -} -#access_key_checkbox:checked ~ #access_key_text { - display: none; -} - #access_key_input { padding: 0; display: none; diff --git a/static/js/upload.js b/static/js/upload.js index c5ac28a..db2010c 100644 --- a/static/js/upload.js +++ b/static/js/upload.js @@ -141,8 +141,13 @@ document.onpaste = function (event) { }; document.getElementById("access_key_checkbox").onchange = function (event) { - if (event.target.checked == false) { + if (event.target.checked) { + document.getElementById("access_key_input").style.display = "inline-block"; + document.getElementById("access_key_text").style.display = "none"; + } else { document.getElementById("access_key_input").value = ""; + document.getElementById("access_key_input").style.display = "none"; + document.getElementById("access_key_text").style.display = "inline-block"; } }; diff --git a/templates/index.html b/templates/index.html index 9e73457..34e5d86 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,9 +4,10 @@ {% endblock %} -{% block content %} +{% block content %}
-
+

@@ -17,26 +18,30 @@
- - + +
- + +
@@ -48,4 +53,4 @@ -{% endblock %} +{% endblock %} \ No newline at end of file