[UPD] update dialog action
This commit is contained in:
parent
2e1cca973a
commit
e2d8b95fde
|
|
@ -24,6 +24,7 @@ odoo.define('odex_takaful.custom_dialog', function (require) {
|
|||
let context = action.context;
|
||||
if(context.action_code){
|
||||
if(context.action_code === 'donation_items'){
|
||||
|
||||
if (self.$footer) {
|
||||
const closeBtn = $('<button/>', {
|
||||
text: _t('Add'),
|
||||
|
|
@ -31,26 +32,27 @@ odoo.define('odex_takaful.custom_dialog', function (require) {
|
|||
}).on('click', () => self.close());
|
||||
self.$footer.append(closeBtn);
|
||||
}
|
||||
|
||||
if(self.$modal){
|
||||
self.$modal.find('.modal-header button.close').hide();
|
||||
self.$modal.find('.modal-header .modal-title').css("width","100%");
|
||||
}
|
||||
|
||||
if(self.$el){
|
||||
self.$el.find('.o_cp_top_left').hide();
|
||||
self.$el.find('.o_cp_bottom_left').hide();
|
||||
self.$el.find('.o_cp_top_right').css("width","100%");
|
||||
self.$el.find('.o_cp_bottom_right').css("width","100%");
|
||||
}
|
||||
|
||||
if(context.sponsorship_id){
|
||||
$('#cspid').remove();
|
||||
$('body').append(`<input type="hidden" id="cspid" value="${context.sponsorship_id}"/>`)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(context.sponsorship_id){
|
||||
$('#cspid').remove();
|
||||
$('body').append(`<input type="hidden" id="cspid" value="${context.sponsorship_id}"/>`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(self.$modal){
|
||||
self.$modal.find('.modal-header button.close').hide();
|
||||
self.$modal.find('.modal-header .modal-title').css("width","100%");
|
||||
}
|
||||
|
||||
if(self.$el){
|
||||
self.$el.find('.o_cp_top_left').hide();
|
||||
self.$el.find('.o_cp_bottom_left').hide();
|
||||
self.$el.find('.o_cp_top_right').css("width","100%");
|
||||
self.$el.find('.o_cp_bottom_right').css("width","100%");
|
||||
}
|
||||
}
|
||||
}, 0);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue