diff --git a/src/assets/js/backend_calendar_table_view.js b/src/assets/js/backend_calendar_table_view.js
index eb2edf44..cd5e1642 100644
--- a/src/assets/js/backend_calendar_table_view.js
+++ b/src/assets/js/backend_calendar_table_view.js
@@ -329,6 +329,29 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
}, 'json').fail(GeneralFunctions.ajaxFailureHandler);
}
});
+
+ $calendar.on('mouseenter', 'table.slots tbody td', function() {
+ if ($(this).index() === 0) {
+ return; // Do not add the button to the time column.
+ }
+
+ var $button = $('');
+
+ $button.html('');
+
+ $(this).append($button);
+ });
+
+ $calendar.on('mouseleave', 'table.slots tbody td', function() {
+ $(this).find('.add-appointment-shortcut').remove();
+ });
+
+ $calendar.on('click', '.add-appointment-shortcut', function() {
+ $(this)
+ .remove()
+ .parent()
+ .trigger('click');
+ });
}
/**
@@ -816,9 +839,9 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
$('#enable-sync, #google-sync').hide();
// Auto-reload the results every one minute.
- // var interval = setInterval(function() {
- // $('#reload-appointments').trigger('click');
- // }, 20000);
+ var interval = setInterval(function() {
+ $('#reload-appointments').trigger('click');
+ }, 20000);
};
})(window.BackendCalendarTableView);