From e0cec46d76d277682483656412d0d14b5a0b3ac0 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Fri, 6 May 2016 16:28:35 -0400 Subject: [PATCH] Minor addition to specified dates in Event schedules --- views/admin/events/edit.html | 15 ++++++++++++++- views/admin/events/editSchedule.html | 6 +++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/views/admin/events/edit.html b/views/admin/events/edit.html index f132162..02e7dbe 100644 --- a/views/admin/events/edit.html +++ b/views/admin/events/edit.html @@ -531,10 +531,21 @@ $('#' + tableID + ' input:checkbox').attr('checked', false); }); + initDateDelete(); initCalendars(); } // Init Recurrence + + // Init handling click to delete specified date + function initDateDelete() { + $('.recur-spec-date-delete').on('click', function() { + if (confirm("Do you want to delete this date?")) { + $(this).remove(); + glmPageUpdateRequired(); + } + }); + } // Initialize specific date selection calendards function initCalendars() { @@ -632,9 +643,11 @@ // Add this edate to our selected dates list $('#recurSpecDates_' + recurID).append( - '' + date.format() + '' + '' + date.format() + '' ); + initDateDelete(); + } glmPageUpdateRequired(); diff --git a/views/admin/events/editSchedule.html b/views/admin/events/editSchedule.html index 5737d44..b0dee33 100644 --- a/views/admin/events/editSchedule.html +++ b/views/admin/events/editSchedule.html @@ -159,13 +159,13 @@ See the Summary Calendar to view all dates for this event.

- Use to add/delete specific dates to the schedule. + Use to add/delete specific dates to the schedule. Click dates below to delete.

{if $r.specific_dates} {$ncei = 1000} {foreach $r.specific_dates as $sd} - {$sd} + {$sd} {$ncei = $ncei+1} {/foreach} {/if} @@ -345,7 +345,7 @@ See the Summary Calendar to view all dates for this event.

- Use to add/delete specific dates to the schedule. + Use to add/delete specific dates to the schedule. Click dates below to delete. -- 2.17.1