mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
tests dialog - draggable option
This commit is contained in:
parent
f193346177
commit
67117bc563
@ -38,13 +38,13 @@ var moved = function (dx, dy, msg) {
|
||||
}
|
||||
|
||||
function shouldmove(why) {
|
||||
var handle = $(".ui-dialog-titlebar", el.data("dialog").element);
|
||||
var handle = $(".ui-dialog-titlebar", dlg());
|
||||
drag(handle, 50, 50);
|
||||
moved(50, 50, why);
|
||||
}
|
||||
|
||||
function shouldnotmove(why) {
|
||||
var handle = $(".ui-dialog-titlebar", el.data("dialog").element);
|
||||
var handle = $(".ui-dialog-titlebar", dlg());
|
||||
drag(handle, 50, 50);
|
||||
moved(0, 0, why);
|
||||
}
|
||||
@ -192,6 +192,14 @@ test("buttons", function() {
|
||||
btn.trigger("click");
|
||||
});
|
||||
|
||||
test("draggable", function() {
|
||||
el = $("<div/>").dialog({ draggable: false });
|
||||
shouldnotmove();
|
||||
el.remove();
|
||||
el = $("<div/>").dialog({ draggable: true });
|
||||
shouldmove();
|
||||
});
|
||||
|
||||
module("dialog: Methods");
|
||||
|
||||
module("dialog: Callbacks");
|
||||
|
Loading…
Reference in New Issue
Block a user