[FIX] Task 65 Bug 1 - save_changes() on pricelist in PMS calendar

This commit is contained in:
Pablo
2019-07-26 19:27:32 +02:00
parent 71f7fbded3
commit a3f640e7a9
2 changed files with 5 additions and 0 deletions

View File

@@ -376,6 +376,7 @@ var PMSCalendarController = AbstractController.extend({
_assign_multi_calendar_events: function() {
var self = this;
this._multi_calendar.on_calendar('hcalOnSavePricelist', function(ev){
document.getElementById("btn_save_changes").disabled = true;
self.savePricelist(ev.detail.calendar_obj, ev.detail.pricelist_id, ev.detail.pricelist);
});

View File

@@ -1240,6 +1240,8 @@ HotelCalendar.prototype = {
});
}
});
// Initialize Save Button state to disable
this.btnSaveChanges.disabled = true;
cell.appendChild(this.btnSaveChanges);
}
//cell.setAttribute('class', 'col-xs-1 col-lg-1');
@@ -2451,8 +2453,10 @@ HotelCalendar.prototype = {
if (this.edivc.querySelector('.hcal-input-changed') !== null)
{
this.btnSaveChanges.classList.add('need-save');
this.btnSaveChanges.disabled = false;
} else {
this.btnSaveChanges.classList.remove('need-save');
this.btnSaveChanges.disabled = true;
}
},