From a5fabe45ece37ea906252e1b7ab75444cfea8c73 Mon Sep 17 00:00:00 2001 From: MizardX Date: Thu, 17 Sep 2015 20:45:51 +0200 Subject: [PATCH] Correct the interface for the Dialog buttons. Only the "icons" and "showText" (as "text") options are forwarded to .button(), the rest are passed as a parameter to the element constructor: http://api.jquery.com/jQuery/#jQuery-html-attributes --- jqueryui/jqueryui.d.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/jqueryui/jqueryui.d.ts b/jqueryui/jqueryui.d.ts index ac8264067..a49a779e2 100644 --- a/jqueryui/jqueryui.d.ts +++ b/jqueryui/jqueryui.d.ts @@ -342,7 +342,7 @@ declare module JQueryUI { interface DialogOptions extends DialogEvents { autoOpen?: boolean; - buttons?: { [buttonText: string]: (event?: Event) => void } | ButtonOptions[]; + buttons?: { [buttonText: string]: (event?: Event) => void } | DialogButtonOptions[]; closeOnEscape?: boolean; closeText?: string; dialogClass?: string; @@ -366,6 +366,14 @@ declare module JQueryUI { close?: DialogEvent; } + interface DialogButtonOptions { + icons?: any; + showText?: string | boolean; + text?: string; + click?: (eventObject: JQueryEventObject) => any; + [attr: string]: any; // attributes for the