Made dialog options extend events type, test should have had button callbacks within 'buttons' in 'jqueryui'.

This commit is contained in:
Daniel Rosenwasser
2015-08-12 12:21:13 -07:00
parent 8d1b81107c
commit 2ffed1fde1
2 changed files with 10 additions and 9 deletions

View File

@@ -1425,12 +1425,13 @@ function test_dialog() {
height: 300,
width: 350,
modal: true,
buttons: {},
Cancel: function () {
$(this).dialog("close");
},
close: function () {
var $el = $(this).dialog("destroy");
buttons: {
Cancel: function () {
$(this).dialog("close");
},
close: function () {
var $el = $(this).dialog("destroy");
}
}
});
$("#dialog-message").dialog({

View File

@@ -336,9 +336,9 @@ declare module JQueryUI {
// Dialog //////////////////////////////////////////////////
interface DialogOptions {
interface DialogOptions extends DialogEvents {
autoOpen?: boolean;
buttons?: any; // object or []
buttons?: { [buttonText: string]: () => void } | ButtonOptions[];
closeOnEscape?: boolean;
closeText?: string;
dialogClass?: string;
@@ -382,7 +382,7 @@ declare module JQueryUI {
resizeStop?: DialogEvent;
}
interface Dialog extends Widget, DialogOptions, DialogEvents {
interface Dialog extends Widget, DialogOptions {
}