From 82b61398b14b3154f86d6d076656512b7e7c0d19 Mon Sep 17 00:00:00 2001 From: Jacob Date: Mon, 4 May 2020 00:40:22 -0400 Subject: [PATCH] made the current dropdown selection active --- electron/src/config.html | 4 ++-- electron/src/config.js | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/electron/src/config.html b/electron/src/config.html index 2754b1f..f3653bc 100644 --- a/electron/src/config.html +++ b/electron/src/config.html @@ -59,8 +59,8 @@

Configuration

Queue Accept Timing
diff --git a/electron/src/config.js b/electron/src/config.js index 83d0a99..708191e 100644 --- a/electron/src/config.js +++ b/electron/src/config.js @@ -20,13 +20,17 @@ $(document).ready(function(){ }); setAccept = (event) => { - console.log($(event).html()); + // console.log($(event).html()); let text = $(event).html(); if(text==='Wait for last second'){ accept_timing='wait'; + $('#wait-item').addClass('active'); + $('#asap-item').removeClass('active'); } else if(text==='Accept immediately'){ accept_timing='asap'; + $('#wait-item').removeClass('active'); + $('#asap-item').addClass('active'); } } @@ -38,15 +42,15 @@ readConfig = () => { if(id){ $('#pushed-id-field').val(id); - $('#pushed-id-field-label').addClass('active'); } if(interval_time){ $('#interval-field').val(interval_time); - $('#interval-field-label').addClass('active'); } if(accept_timing==='asap'){ - $('#default-option').html('Queue Accept timing (Set to accept ASAP)'); - $('#default-option').attr('value','asap'); + $('#asap-item').addClass('active'); + } + else if(accept_timing==='wait'){ + $('$wait-item').addClass('active'); } }