diff --git a/uber/templates/schedule_reports/index.html b/uber/templates/schedule_reports/index.html index 69c11e7da..454f8eb00 100644 --- a/uber/templates/schedule_reports/index.html +++ b/uber/templates/schedule_reports/index.html @@ -43,9 +43,9 @@ }); } - let markItemSynced = function(event){ - let form = $(this); - event.preventDefault(); + let markItemSynced = function(){ + let form = $(this).closest('form'); + $.ajax({ method: 'POST', url: 'mark_item_synced', @@ -81,7 +81,10 @@ } $().ready(function () { - $(".sync-item").submit(markItemSynced); + $('#schedule-table').on('click', '.sync-item', markItemSynced); + {% for model, label in c.GUIDEBOOK_MODELS %} + $('#{{ model }}-table').on('click', '.sync-item', markItemSynced); + {% endfor %} }); {% set now = now() %} @@ -158,7 +161,7 @@

Guidebook Exports and Updates -- {{ now|datetime_local("%m/%d/%Y, %-I:%M%p")

Items in italics has been changed since the last sync.

- +
@@ -203,13 +206,13 @@

Guidebook Exports and Updates -- {{ now|datetime_local("%m/%d/%Y, %-I:%M%p") {% if c.HAS_SCHEDULE_ACCESS %} View {% endif %} -
+ {{ csrf_token() }} - + @@ -234,7 +237,7 @@

Guidebook Exports and Updates -- {{ now|datetime_local("%m/%d/%Y, %-I:%M%p")

Items in italics has been changed since the last sync.

-

Name
+
{% for key, label in c.GUIDEBOOK_PROPERTIES %} @@ -275,13 +278,13 @@

Guidebook Exports and Updates -- {{ now|datetime_local("%m/%d/%Y, %-I:%M%p") {% if result.guidebook_edit_link.split('/')[1] in (c.GETTABLE_SITE_PAGES[0] + c.ADMIN_ACCESS_SET|list) %} View {% endif %} -
+ {{ csrf_token() }} - +