From 3cdf49b241fff4673f96ebf031eb37c0ac4fc605 Mon Sep 17 00:00:00 2001 From: error Date: Thu, 3 Sep 2015 12:35:32 -0500 Subject: [PATCH 1/4] add buttons property to ButtonOptions --- jqueryui/jqueryui.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index d5e60cd0d..dbf6161b5 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -87,6 +87,7 @@ declare module JQueryUI { icons?: any; label?: string; text?: boolean; + click?: (event?: Event) => void; } interface Button extends Widget, ButtonOptions { From 337a1387f0eb9373b4d4437b24ce45ef915ddd6a Mon Sep 17 00:00:00 2001 From: error Date: Thu, 3 Sep 2015 12:37:36 -0500 Subject: [PATCH 2/4] change ButtonOptions text property to string --- jqueryui/jqueryui.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index dbf6161b5..5dadfa38b 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -86,7 +86,7 @@ declare module JQueryUI { disabled?: boolean; icons?: any; label?: string; - text?: boolean; + text?: string; click?: (event?: Event) => void; } From 72e519f0ab1ca53b7b6c071e43cde63702d08575 Mon Sep 17 00:00:00 2001 From: error Date: Fri, 11 Sep 2015 13:25:58 -0500 Subject: [PATCH 3/4] set ButtonOptions.text to type string|boolean --- jqueryui/jqueryui.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index 5dadfa38b..a5f77eade 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -86,7 +86,7 @@ declare module JQueryUI { disabled?: boolean; icons?: any; label?: string; - text?: string; + text?: string|boolean; click?: (event?: Event) => void; } From d03f6e213f4532f0b28bea36d18ab2bbd03d09a4 Mon Sep 17 00:00:00 2001 From: error Date: Fri, 11 Sep 2015 13:28:58 -0500 Subject: [PATCH 4/4] add test for dialog using array of ButtonOptions --- jqueryui/jqueryui-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/jqueryui/jqueryui-tests.ts b/jqueryui/jqueryui-tests.ts index 34f1f4b7e..bc84cb475 100644 --- a/jqueryui/jqueryui-tests.ts +++ b/jqueryui/jqueryui-tests.ts @@ -1438,6 +1438,7 @@ function test_dialog() { }); $(".selector").dialog({ autoOpen: false }); $(".selector").dialog({ buttons: { Ok: function () { $(this).dialog("close"); } } }); + $(".selector").dialog({ buttons: [ { text: "Ok", click: function () { $(this).dialog("close"); } } ] } ); $(".selector").dialog({ closeOnEscape: false }); $(".selector").dialog({ closeText: "hide" }); $(".selector").dialog({ dialogClass: "alert" });