mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[UPD] Prevent create a reservation is there is a popover active
This commit is contained in:
@@ -697,6 +697,10 @@ var PMSCalendarController = AbstractController.extend({
|
||||
}).open();
|
||||
});
|
||||
|
||||
this._multi_calendar.on_calendar('hcalOnKeyPressed', function(ev){
|
||||
/* add actions */
|
||||
});
|
||||
|
||||
this._multi_calendar.on_calendar('hcalOnDateChanged', function(ev){
|
||||
var $dateTimePickerBegin = this.renderer.$el.find('#pms-menu #date_begin');
|
||||
$dateTimePickerBegin.data("ignore_onchange", true);
|
||||
|
||||
@@ -2069,7 +2069,6 @@ HotelCalendar.prototype = {
|
||||
'reservationObj': $this.getReservation(this.dataset.hcalReservationObjId)
|
||||
});
|
||||
}, false);
|
||||
*/
|
||||
rdiv.addEventListener('mouseleave', function(ev){
|
||||
$this._dispatchEvent(
|
||||
'hcalOnMouseLeaveReservation',
|
||||
@@ -2079,6 +2078,7 @@ HotelCalendar.prototype = {
|
||||
'reservationObj': $this.getReservation(this.dataset.hcalReservationObjId)
|
||||
});
|
||||
}, false);
|
||||
*/
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2480,7 +2480,12 @@ HotelCalendar.prototype = {
|
||||
};
|
||||
this._splitReservation = false;
|
||||
this._splitDate = false;
|
||||
} else if ($(".marked-as-having-a-popover").length === 1) {
|
||||
// TODO: better call _destroy_and_clear_popover_mark defined in hotel_calendar_controller.js
|
||||
$(".marked-as-having-a-popover").popover('destroy');
|
||||
$('.hcal-reservation').removeClass("marked-as-having-a-popover");
|
||||
} else {
|
||||
// FIXME: Prevent multiple clicks in a row
|
||||
this._cellSelection.start = this._cellSelection.current = ev.target;
|
||||
this._cellSelection.end = false;
|
||||
this._updateCellSelection();
|
||||
|
||||
Reference in New Issue
Block a user