mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
jQueryUI: correct return type of dialog methods
Also corrected / added a couple of tests
This commit is contained in:
@@ -1150,7 +1150,7 @@ function test_dialog() {
|
||||
hide: "explode"
|
||||
});
|
||||
$("#opener").click(function () {
|
||||
$("#dialog").dialog("open");
|
||||
var $el = $("#dialog").dialog("open");
|
||||
return false;
|
||||
});
|
||||
$("#dialog-modal").dialog({
|
||||
@@ -1163,7 +1163,7 @@ function test_dialog() {
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Delete all items": function () {
|
||||
$(this).dialog("close");
|
||||
var $el = $(this).dialog("close");
|
||||
},
|
||||
Cancel: function () {
|
||||
$(this).dialog("close");
|
||||
@@ -1180,6 +1180,7 @@ function test_dialog() {
|
||||
$(this).dialog("close");
|
||||
},
|
||||
close: function () {
|
||||
var $el = $(this).dialog("destroy");
|
||||
}
|
||||
});
|
||||
$("#dialog-message").dialog({
|
||||
@@ -1211,6 +1212,8 @@ function test_dialog() {
|
||||
$(".selector").dialog({ title: "Dialog Title" });
|
||||
$(".selector").dialog({ width: 500 });
|
||||
$(".selector").dialog({ zIndex: 20 });
|
||||
var $el = $( ".selector" ).dialog( "moveToTop" );
|
||||
var isOpen = $( ".selector" ).dialog( "isOpen" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
8
jqueryui/jqueryui.d.ts
vendored
8
jqueryui/jqueryui.d.ts
vendored
@@ -849,11 +849,11 @@ interface JQuery {
|
||||
|
||||
dialog(): JQuery;
|
||||
dialog(methodName: string): JQuery;
|
||||
dialog(methodName: 'close'): void;
|
||||
dialog(methodName: 'destroy'): void;
|
||||
dialog(methodName: 'close'): JQuery;
|
||||
dialog(methodName: 'destroy'): JQuery;
|
||||
dialog(methodName: 'isOpen'): boolean;
|
||||
dialog(methodName: 'moveToTop'): void;
|
||||
dialog(methodName: 'open'): void;
|
||||
dialog(methodName: 'moveToTop'): JQuery;
|
||||
dialog(methodName: 'open'): JQuery;
|
||||
dialog(methodName: 'widget'): JQuery;
|
||||
dialog(options: JQueryUI.DialogOptions): JQuery;
|
||||
dialog(optionLiteral: string, optionName: string): any;
|
||||
|
||||
Reference in New Issue
Block a user