mirror of
https://github.com/simonw/datasette.git
synced 2026-09-29 05:14:21 +02:00
Rename modal dismissal reason to source, refs #2790
This commit is contained in:
parent
269c043da3
commit
ad1d0bf6f9
4 changed files with 29 additions and 20 deletions
|
|
@ -2351,7 +2351,7 @@ function ensureTableCreateDialog(manager) {
|
|||
updateTableCreateDialogButtons(tableCreateDialogState);
|
||||
});
|
||||
|
||||
modal.beforeClose = function (reason) {
|
||||
modal.beforeClose = function (source) {
|
||||
return confirmDiscardTableCreateChanges(tableCreateDialogState);
|
||||
};
|
||||
|
||||
|
|
@ -4017,9 +4017,9 @@ function ensureTableAlterDialog(manager) {
|
|||
}
|
||||
});
|
||||
|
||||
modal.beforeClose = function (reason) {
|
||||
modal.beforeClose = function (source) {
|
||||
return (
|
||||
reason === "cancel" ||
|
||||
source === "cancel" ||
|
||||
confirmDiscardTableAlterChanges(tableAlterDialogState)
|
||||
);
|
||||
};
|
||||
|
|
@ -7220,9 +7220,9 @@ function ensureRowEditDialog(manager) {
|
|||
},
|
||||
);
|
||||
|
||||
modal.beforeClose = function (reason) {
|
||||
modal.beforeClose = function (source) {
|
||||
return (
|
||||
reason === "cancel" || confirmDiscardRowEditChanges(rowEditDialogState)
|
||||
source === "cancel" || confirmDiscardRowEditChanges(rowEditDialogState)
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue