- if (popup.length === 0) {
- popup = $('<div/>');
- }
- popup.html(popupHtml);
-
- buttons = [];
- dialogProperties = {
- title: title,
- type: 'slide',
- dialogClass: dialog == 'permissions' ? 'integration-dialog' : 'integration-dialog no-close' //eslint-disable-line
- };
-
- // Add confirmation button to the list of dialog buttons. okButton not set for tokenExchange dialog
- if (okButton) {
- buttons.push(okButton);
- }
- // Add button only if its not empty
- if (buttons.length > 0) {
- dialogProperties.buttons = buttons;
- }
- popup.modal(dialogProperties);
- popup.modal('openModal');