From 184bb02fa63f80a7cb29c4338ef3901c7ac2ef53 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Mon, 18 Dec 2017 16:59:51 -0500 Subject: [PATCH] Fixed displaying wrong color for new aciive event time in event reg dashboard. --- .gitignore | 1 + views/admin/registrations/eventDashboard.html | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c2658d7..a14ebf5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules/ +.project \ No newline at end of file diff --git a/views/admin/registrations/eventDashboard.html b/views/admin/registrations/eventDashboard.html index 788331c..e9a086b 100644 --- a/views/admin/registrations/eventDashboard.html +++ b/views/admin/registrations/eventDashboard.html @@ -394,6 +394,14 @@ var startDate = new Date($('#dialogStartTime').val()); var startTime = $('#dialogStartTime').val(); + var newTimeActive = $('#dialogRegActive').is(":checked"); + var newTimeBackgroundColor = '#aaa'; + + if (newTimeActive) { + newTimeBackgroundColor = 'light-blue'; + } + + // Initialize the event data object with submitted data var newEvent = { {if $regEvent.time_specific.value} @@ -403,8 +411,8 @@ {/if} start: date.format() + ' ' + startTime, end: date.format() + ' ' + $('#dialogEndTime').val(), - active: $('#dialogRegActive').is(":checked"), - backgroundColor: '#aaa', + active: newTimeActive, + backgroundColor: newTimeBackgroundColor, allDay: $('#dialogTimeAllDay').is(':checked'), {if $regEvent.time_specific.value} attendees: $('#dialogAttendees').is(':checked'), @@ -450,7 +458,7 @@ // If response was not a possible time ID newEvent.timeId = parseInt(newTimeId); - +console.log(newEvent); if (newEvent.timeId == '0') { alert('New event date/time may not have been stored properly. Reload page to check.'); } else { -- 2.17.1