mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-25 21:55:49 +08:00
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:
10
jqueryui/jqueryui.d.ts
vendored
10
jqueryui/jqueryui.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user