diff --git a/hotel_calendar/static/src/css/view.css b/hotel_calendar/static/src/css/view.css index 98102eb60..2f6b084d7 100644 --- a/hotel_calendar/static/src/css/view.css +++ b/hotel_calendar/static/src/css/view.css @@ -160,38 +160,26 @@ input#bookings_search { } /** TOOLTIPS **/ -.tooltip { - opacity: unset !important; -} - -.tooltip .tooltip-inner { +.popover-content { font-family: Garuda, sans-serif; - border: 1px solid #5C5C5C; - background-color: white; - color: #5C5C5C; + font-size: 12px; + padding: 9px; } -.tooltip .container { - max-width: 500px; -} -.tooltip .list-group { - margin-bottom: 0px; -} -.tooltip .list-group-item { - border: none; - padding: 2px 5px; - margin-bottom: 0px; - background-color: unset; - word-break: break-word; -} -.tooltip h1, .h1, h2, .h2, h3, .h3 { +.popover h1, .h1, h2, .h2, h3, .h3 { margin-top: 2px; margin-bottom: 0px; } -.tooltip .container p { +.popover { + max-width: 550px; +} +.popover .container { + max-width: -webkit-fill-available; +} +.popover .container p { margin-top: 3px; margin-bottom: 0px; } -.tooltip header { +.popover header { font-size: 1.3em; } @@ -199,12 +187,12 @@ input#bookings_search { padding-top: 3px; padding-bottom: 3px; } -.tooltip .fa-border { +.popover .fa-border { padding: .25em; border: solid 0.1em #777777; border-radius: .2em; } -.tooltip .fa-border > text-primary { +.popover .fa-border > text-primary { padding: .25em; border: solid 0.1em #777777; border-radius: .2em; diff --git a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js index 95b53eee3..4033acd15 100644 --- a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js +++ b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js @@ -374,18 +374,22 @@ var PMSCalendarController = AbstractController.extend({ this._multi_calendar.on_calendar('hcalOnSavePricelist', function(ev){ self.savePricelist(ev.detail.calendar_obj, ev.detail.pricelist_id, ev.detail.pricelist); }); + $('.hcal-reservation noselect').popover(); this._multi_calendar.on_calendar('hcalOnClickReservation', function(ev){ if (ev.detail.reservationObj) { var tp = self._multi_calendar._reserv_tooltips[ev.detail.reservationObj.id]; var qdict = self._generate_reservation_tooltip_dict(tp); - $(ev.detail.reservationDiv).tooltip('destroy').tooltip({ + $(".marked-as-having-a-popover").popover('destroy'); + $(ev.detail.reservationDiv).addClass('marked-as-having-a-popover'); + $(ev.detail.reservationDiv).popover({ trigger: 'manual', + container: 'body', animation: false, html: true, placement: 'bottom', - title: QWeb.render('HotelCalendar.TooltipReservation', qdict) - }); - _.defer(function(){ $(ev.detail.reservationDiv).tooltip('show'); }); + /* title: "Come'n popovers!", */ + content: QWeb.render('HotelCalendar.TooltipReservation', qdict) + }).popover('show'); } }); this._multi_calendar.on_calendar('hcalOnSplitReservation', function(ev){