From b2233945a6a06ae03f0de2a604ccfbd5c153c372 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Mon, 9 Jun 2008 08:06:54 +0000 Subject: [PATCH] Added droppable visual test --- tests/visual/all.css | 6 +++++- tests/visual/all.html | 18 +++++++++++++++++ tests/visual/droppable.html | 39 +++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 tests/visual/droppable.html diff --git a/tests/visual/all.css b/tests/visual/all.css index 17fc5985b..4fb7bf5c4 100644 --- a/tests/visual/all.css +++ b/tests/visual/all.css @@ -5,7 +5,7 @@ ul.plugins li { margin: 0 12px 12px 0; list-style-type: none; width: 210px; height: 220px; float: left; color: white; border: 1px solid gray; text-align: center; font-weight: bold; } -#accordion, #draggable, #droppable, +#accordion, #draggable, #resizable, #selectable, #sortable, #tabs { margin: 10px; width: 190px; height: 180px; @@ -30,6 +30,10 @@ ul.plugins li { margin: 0 12px 12px 0; background: black; } +.draggable { margin: 10px; width: 32px; height: 30px; float: left; background: #FF9C08; } +#droppable { margin: 10px; width: 190px; height: 130px; float: left; border: 1px solid #FF9C08; overflow: hidden; } +#droppable .draggable { margin: 7px; } + .ui-dialog { background-color: #FF9C08; } .ui-dialog .ui-dialog-titlebar { background: black; padding: 0px; height: 28px; _height: 29px; } .ui-dialog.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/tests/visual/all.html b/tests/visual/all.html index 2340b1a01..e0b2fbafd 100644 --- a/tests/visual/all.html +++ b/tests/visual/all.html @@ -21,6 +21,13 @@ $("#datepicker").datepicker(); $("#dialog").click(function() { $("
").dialog(); }); $("#draggable").draggable(); + $(".draggable").draggable(); + $("#droppable").droppable({ + accept: '.draggable', + drop: function(ev, ui) { + ui.draggable.css({ position: 'relative', top: 0, left: 0 }).clone().appendTo(this); + } + }); $("#resizable").resizable(); $("#selectable").selectable(); $("#slider").slider(); @@ -47,6 +54,17 @@ Draggable
+
  • + Droppable +
    D
    +
    R
    +
    A
    +
    G
    +
    + DROP +
    +
    +
  • Resizable
    diff --git a/tests/visual/droppable.html b/tests/visual/droppable.html new file mode 100644 index 000000000..4bc5164eb --- /dev/null +++ b/tests/visual/droppable.html @@ -0,0 +1,39 @@ + + + + Simple Droppable + + + + + + + + + +
      +
    • + Droppable +
      D
      +
      R
      +
      A
      +
      G
      +
      + DROP +
      +
      +
    • +
    + + + -- 2.39.5