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
This commit is contained in:
MizardX
2015-09-17 20:45:51 +02:00
parent 6999e694e7
commit a5fabe45ec

View File

@@ -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 <button> element
}
interface DialogShowHideOptions {
effect: string;
delay?: number;