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();
|
}).open();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this._multi_calendar.on_calendar('hcalOnKeyPressed', function(ev){
|
||||||
|
/* add actions */
|
||||||
|
});
|
||||||
|
|
||||||
this._multi_calendar.on_calendar('hcalOnDateChanged', function(ev){
|
this._multi_calendar.on_calendar('hcalOnDateChanged', function(ev){
|
||||||
var $dateTimePickerBegin = this.renderer.$el.find('#pms-menu #date_begin');
|
var $dateTimePickerBegin = this.renderer.$el.find('#pms-menu #date_begin');
|
||||||
$dateTimePickerBegin.data("ignore_onchange", true);
|
$dateTimePickerBegin.data("ignore_onchange", true);
|
||||||
|
|||||||
@@ -2069,7 +2069,6 @@ HotelCalendar.prototype = {
|
|||||||
'reservationObj': $this.getReservation(this.dataset.hcalReservationObjId)
|
'reservationObj': $this.getReservation(this.dataset.hcalReservationObjId)
|
||||||
});
|
});
|
||||||
}, false);
|
}, false);
|
||||||
*/
|
|
||||||
rdiv.addEventListener('mouseleave', function(ev){
|
rdiv.addEventListener('mouseleave', function(ev){
|
||||||
$this._dispatchEvent(
|
$this._dispatchEvent(
|
||||||
'hcalOnMouseLeaveReservation',
|
'hcalOnMouseLeaveReservation',
|
||||||
@@ -2079,6 +2078,7 @@ HotelCalendar.prototype = {
|
|||||||
'reservationObj': $this.getReservation(this.dataset.hcalReservationObjId)
|
'reservationObj': $this.getReservation(this.dataset.hcalReservationObjId)
|
||||||
});
|
});
|
||||||
}, false);
|
}, false);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -2480,7 +2480,12 @@ HotelCalendar.prototype = {
|
|||||||
};
|
};
|
||||||
this._splitReservation = false;
|
this._splitReservation = false;
|
||||||
this._splitDate = 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 {
|
} else {
|
||||||
|
// FIXME: Prevent multiple clicks in a row
|
||||||
this._cellSelection.start = this._cellSelection.current = ev.target;
|
this._cellSelection.start = this._cellSelection.current = ev.target;
|
||||||
this._cellSelection.end = false;
|
this._cellSelection.end = false;
|
||||||
this._updateCellSelection();
|
this._updateCellSelection();
|
||||||
|
|||||||
Reference in New Issue
Block a user