Skip to content
Snippets Groups Projects
Verified Commit 110c8468 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3511168 by grimreaper, tocab, acbramley, smustgrave: Node preview modal: use Drupal API

(cherry picked from commit a6ad55b2)
parent f001fdca
No related branches found
No related tags found
2 merge requests!12357Issue #3529639 by mradcliffe, smustgrave, solomon.yifru: replacing a depricated css,!12209#3526180 Ensure displace runs with new navigation module.
Pipeline #499046 failed
......@@ -34,13 +34,13 @@
const $previewDialog = $(
`<div>${Drupal.theme('nodePreviewModal')}</div>`,
).appendTo('body');
Drupal.dialog($previewDialog, {
const confirmationDialog = Drupal.dialog($previewDialog, {
title: Drupal.t('Leave preview?'),
buttons: [
{
text: Drupal.t('Cancel'),
click() {
$(this).dialog('close');
confirmationDialog.close();
},
},
{
......@@ -50,7 +50,8 @@
},
},
],
}).showModal();
});
confirmationDialog.showModal();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment