autoOpen: true,
modal: true,
title: 'Edit list',
- width: 'max-content',
+ width: 'min(calc(100% - 2em), 20em)',
+ close: (ev) => {
+ $(ev.target).dialog('destroy');
+ },
buttons: [
{
class: 'btn-delete',
delete_list(d);
},
},
- {
- text: 'Cancel',
- click: ()=>{ d.dialog('destroy'); },
- },
{
icon: 'ui-icon-disk',
text: 'OK',
autoOpen: true,
modal: true,
title: 'Edit item',
- width: 'max-content',
+ width: 'min(calc(100% - 2em), 20em)',
+ close: (ev) => {
+ $(ev.target).dialog('destroy');
+ },
buttons: [
{
class: 'btn-delete',
delete_list_item(d, li);
},
},
- {
- text: 'Cancel',
- click: ()=>{ d.dialog('destroy'); },
- },
{
icon: 'ui-icon-disk',
text: 'OK',
});
$('#list-items').on('change', '.list-item-row input[type="checkbox"]', handle_list_item_state_changed);
load_lists();
+ $('body').on('click', '.ui-widget-overlay', (ev) => {
+ $(ev.target).siblings('.ui-dialog').find('.ui-dialog-content').dialog('close');
+ });
});
})();