From 99e5a01f09a3ef163e0aa2acda692d0ddaa95a3f Mon Sep 17 00:00:00 2001 From: Kon P Date: Thu, 28 Aug 2014 22:26:00 -0700 Subject: [PATCH] fixed setOptions & tests --- bootbox/bootbox-tests.ts | 9 +++++++++ bootbox/bootbox.d.ts | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bootbox/bootbox-tests.ts b/bootbox/bootbox-tests.ts index 189c26209c..7cf6124cd4 100644 --- a/bootbox/bootbox-tests.ts +++ b/bootbox/bootbox-tests.ts @@ -65,4 +65,13 @@ bdo = { bootbox.dialog(bdo); +bootbox.setDefaults({ + locale: 'en_US', + animate: false, + backdrop: false, + className: 'newClassName', + closeButton: true, + show: true +}) + bootbox.hideAll(); \ No newline at end of file diff --git a/bootbox/bootbox.d.ts b/bootbox/bootbox.d.ts index fd0ce06d8c..173e3a2a74 100644 --- a/bootbox/bootbox.d.ts +++ b/bootbox/bootbox.d.ts @@ -42,7 +42,7 @@ interface BootboxDefaultOptions { locale?: string; show?: boolean; backdrop?: boolean; - closeButton: boolean; + closeButton?: boolean; animate?: boolean; className?: string; } @@ -56,7 +56,7 @@ interface BootboxStatic { prompt(options: BootboxPromptOptions): void; dialog(message: string, callback?: (result: string) => void): void; dialog(options: BootboxDialogOptions): void; - setDefaults(options): void; + setDefaults(options: BootboxDefaultOptions): void; hideAll(): void; }