From 688387ff358860384b80dba8e00c0b2be3701e18 Mon Sep 17 00:00:00 2001 From: Christiaan Rakowski Date: Thu, 3 Oct 2013 10:28:47 +0200 Subject: [PATCH 1/2] Notification.confirm with buttonLabels array --- phonegap/phonegap.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/phonegap/phonegap.d.ts b/phonegap/phonegap.d.ts index 0e6d003236..5aea7effa8 100644 --- a/phonegap/phonegap.d.ts +++ b/phonegap/phonegap.d.ts @@ -478,6 +478,7 @@ declare var Media: { interface Notification { alert(message: string, alertCallback: Function, title?: string, buttonName?: string): void; confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: string): void; + confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: Array): void; beep(times: number): void; vibrate(milliseconds: number): void; } From 2374fc4589c24cac1574678dd038dc7bc647d816 Mon Sep 17 00:00:00 2001 From: Christiaan Rakowski Date: Sat, 5 Oct 2013 17:55:17 +0200 Subject: [PATCH 2/2] changed Array to string[], and added test --- phonegap/phonegap-tests.ts | 6 ++++++ phonegap/phonegap.d.ts | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/phonegap/phonegap-tests.ts b/phonegap/phonegap-tests.ts index 273551c11d..78b45609b9 100644 --- a/phonegap/phonegap-tests.ts +++ b/phonegap/phonegap-tests.ts @@ -655,6 +655,12 @@ function test_notification() { onConfirm, 'Game Over', 'Restart,Exit' + ); + navigator.notification.confirm( + 'You are the winner!', + onConfirm, + 'Game Over', + ['Restart','Exit'] ); navigator.notification.beep(2); navigator.notification.vibrate(2500); diff --git a/phonegap/phonegap.d.ts b/phonegap/phonegap.d.ts index 5aea7effa8..6e873163be 100644 --- a/phonegap/phonegap.d.ts +++ b/phonegap/phonegap.d.ts @@ -478,7 +478,7 @@ declare var Media: { interface Notification { alert(message: string, alertCallback: Function, title?: string, buttonName?: string): void; confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: string): void; - confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: Array): void; + confirm(message: string, confirmCallback: Function, title?: string, buttonLabels?: string[]): void; beep(times: number): void; vibrate(milliseconds: number): void; }