jQueryUI: correct return type of dialog methods

Also corrected / added a couple of tests
This commit is contained in:
John Reilly
2013-11-26 09:31:19 +00:00
parent aa9c75cedb
commit 2b08be22cf
2 changed files with 9 additions and 6 deletions
+5 -2
View File
@@ -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" );
}