From 0753df8cb1a2c3d9bd1a3b36c7d1b71ca529bdd3 Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 6 Mar 2022 20:35:33 +0000 Subject: [PATCH] remove Cancel buttons from dialogs easier to just click outside and less clutter the width calculation is to prevent an unnecessarily narrow dialog --- public/javascripts/lsl.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/public/javascripts/lsl.js b/public/javascripts/lsl.js index 35e70b4..f7efa52 100644 --- a/public/javascripts/lsl.js +++ b/public/javascripts/lsl.js @@ -109,7 +109,7 @@ function edit_list() { autoOpen: true, modal: true, title: 'Edit list', - width: 'max-content', + width: 'min(calc(100% - 2em), 20em)', close: (ev) => { $(ev.target).dialog('destroy'); }, @@ -121,10 +121,6 @@ function edit_list() { delete_list(d); }, }, - { - text: 'Cancel', - click: ()=>{ d.dialog('destroy'); }, - }, { icon: 'ui-icon-disk', text: 'OK', @@ -338,7 +334,7 @@ function edit_list_item(li) { autoOpen: true, modal: true, title: 'Edit item', - width: 'max-content', + width: 'min(calc(100% - 2em), 20em)', close: (ev) => { $(ev.target).dialog('destroy'); }, @@ -350,10 +346,6 @@ function edit_list_item(li) { delete_list_item(d, li); }, }, - { - text: 'Cancel', - click: ()=>{ d.dialog('destroy'); }, - }, { icon: 'ui-icon-disk', text: 'OK', -- 2.39.2