feat: the panel's own confirm and prompt dialogs everywhere; the assistant's field is one line with a square send button
This commit is contained in:
1 parent
3f113ce8d6
commit
1f930e5aea
13 files changed
+104
-41
No files matched your search
@@ -262,10 +262,10 @@
|
||||
if (ev.key === 'Escape') { ev.preventDefault(); ev.stopPropagation(); done(); }
|
||||
});
|
||||
};
|
||||
$('.dbx-del').onclick = function () {
|
||||
$('.dbx-del').onclick = async function () {
|
||||
var keys = [];
|
||||
S.sel.forEach(function (i) { keys.push(S.data.rows[i].k); });
|
||||
if (!keys.length || !confirm('Удалить строк: ' + keys.length + '?')) return;
|
||||
if (!keys.length || !await UI.confirm('Удалить строк: ' + keys.length + '?', {ok: 'Удалить', danger: true})) return;
|
||||
req('db.del', {table: S.cur, keys: keys}).then(function (r) {
|
||||
if (!r.ok) { toast(r.error || 'не удалилось', true); return; }
|
||||
toast('удалено строк: ' + r.data.deleted);
|
||||
|
||||
Reference in new issue
Block a user