Fixed displaying wrong color for new aciive event time in event reg dashboard.
authorChuck Scott <cscott@gaslightmedia.com>
Mon, 18 Dec 2017 21:59:51 +0000 (16:59 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Mon, 18 Dec 2017 21:59:51 +0000 (16:59 -0500)
.gitignore
views/admin/registrations/eventDashboard.html

index c2658d7..a14ebf5 100644 (file)
@@ -1 +1,2 @@
 node_modules/
+.project
\ No newline at end of file
index 788331c..e9a086b 100644 (file)
                             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}
                     {/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'),
 
                                 // 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 {