Skip to content

Instantly share code, notes, and snippets.

@enkelmedia
Last active April 25, 2020 15:26
Show Gist options
  • Save enkelmedia/7e2233090f69431a7f2ab53af23c7c5b to your computer and use it in GitHub Desktop.
Save enkelmedia/7e2233090f69431a7f2ab53af23c7c5b to your computer and use it in GitHub Desktop.
// ******* Confirmation-dialog **********
var overlay = {
"view": "default",
"title": 'Headline',
"content": 'This is some important text that you need to confirm',
"disableBackdropClick": true,
"disableEscKey": true,
"submitButtonLabel": 'Confirm',
"closeButtonLabel": 'Cancel',
"submitButtonStyle":"danger",
submitButtonLabelKey: "general_ok", // use translation keys
closeButtonLabelKey: "general_cancel", // use translation keys
submit: function () {
overlayService.close();
},
close: function () {
overlayService.close();
}
};
overlayService.open(overlay);
// ******* Selection-dialog **********
var dialogModel = {
view: "itempicker",
title: "Choose ",
availableItems: availableItems,
selectedItems: [],
position: "target",
event: $event,
submit: function (model) {
console.log(model.selectedItem);
overlayService.close();
},
close: function() {
overlayService.close();
}
};
overlayService.open(dialogModel);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment