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 {