From acfbc714e0eab8b85dc44024ec03f6b082fadf6f Mon Sep 17 00:00:00 2001 From: Christian Lehner Date: Wed, 30 Oct 2019 10:26:55 +0100 Subject: [PATCH] adapted typings and added custom CSS classes to showProveanceGraphNotFoundDialog dialog --- src/dialogs.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dialogs.ts b/src/dialogs.ts index 036d79343..0258a108e 100644 --- a/src/dialogs.ts +++ b/src/dialogs.ts @@ -10,11 +10,11 @@ export {setGlobalErrorTemplate} from 'phovea_ui/src/errors'; export {errorAlert as showErrorModalDialog} from './notifications'; export interface IDialogModule { - generateDialog(title: string, primaryBtnText?: string): Dialog; + generateDialog(title: string, primaryBtnText?: string, additionalCSSClasses?: string): Dialog; areyousure(msg?: string, options?: IAreYouSureOptions | string): Promise; - FormDialog: {new(title: string, primaryBtnText?: string, formId?: string): FormDialog}; + FormDialog: {new(title: string, primaryBtnText?: string, formId?: string, additionalCSSClasses?: string): FormDialog}; } export function lazyDialogModule(): Promise { @@ -26,9 +26,9 @@ export function lazyDialogModule(): Promise { * @param {CLUEGraphManager} manager * @param {string} id session id */ -export function showProveanceGraphNotFoundDialog(manager: CLUEGraphManager, id: string) { +export function showProveanceGraphNotFoundDialog(manager: CLUEGraphManager, id: string, additionalCSSClasses: string = '') { lazyDialogModule().then(({generateDialog}) => { - const dialog = generateDialog('Session Not Found!', 'Create New Temporary Session'); + const dialog = generateDialog('Session Not Found!', 'Create New Temporary Session', additionalCSSClasses); // append bg-danger to the dialog parent element dialog.body.parentElement.parentElement.parentElement.classList.add('bg-danger'); dialog.body.innerHTML = `