From eef69667983f63623236ab03749bbcd90a2415b8 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Thu, 11 Aug 2016 22:56:54 +0200 Subject: [PATCH] Show the appointment duration only if its different than the standard value. --- src/assets/js/backend_calendar_table_view.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/assets/js/backend_calendar_table_view.js b/src/assets/js/backend_calendar_table_view.js index 9131301e..bd00511f 100644 --- a/src/assets/js/backend_calendar_table_view.js +++ b/src/assets/js/backend_calendar_table_view.js @@ -165,8 +165,8 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; $(event.target).popover('toggle'); // Fix popover position - if ($('.popover').length > 0) { - if ($('.popover').position().top < 200) $('.popover').css('top', '200px'); + if ($('.popover').length > 0 && $('.popover').position().top < 200) { + $('.popover').css('top', '200px'); } }); @@ -606,7 +606,8 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; $event.html( appointment.customer.last_name + - ' ' + startDate.toString('HH:mm') + ' (' + eventDuration + '\')' + ' ' + startDate.toString('HH:mm') + ' ' + + (eventDuration !== parseInt(appointment.service.duration) ? '(' + eventDuration + '\')' : '') ); $event.data(appointment);