mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
layout demo: add new components via cloned draggables, connected to sortables
This commit is contained in:
parent
6174fef86f
commit
7084fa079d
@ -41,6 +41,6 @@ dl.sort dt span.options a.disabled { background:#555 !important; cursor:default;
|
||||
#content { float:left; width:400px; }
|
||||
#sidebar { float:left; width:200px; }
|
||||
#footer { width:638px; }
|
||||
#trashcan { float:left; }
|
||||
#meta { float:left; }
|
||||
|
||||
#trashcan p { margin:0; }
|
@ -81,11 +81,15 @@
|
||||
//placeholder: 'placeholder',
|
||||
connectWith: els,
|
||||
start: function(e,ui) {
|
||||
ui.helper.css("width", ui.item.width());
|
||||
ui.helper.css("width", ui.item.parent().width());
|
||||
},
|
||||
change: sortableChange,
|
||||
update: sortableUpdate
|
||||
});
|
||||
$('#components > dl').draggable({
|
||||
connectToSortable: $els,
|
||||
helper: 'clone'
|
||||
})
|
||||
});
|
||||
|
||||
$(window).bind('load',function(){
|
||||
|
BIN
demos/real-world/layout/img01.png
Normal file
BIN
demos/real-world/layout/img01.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
@ -68,10 +68,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="meta">
|
||||
<div id="components" class="ui-sortable">
|
||||
<h2>Components</h2>
|
||||
<dl class="sort">
|
||||
<dt>Subheadline</dt>
|
||||
<dd>Paragraph</dd>
|
||||
</dl>
|
||||
<dl class="sort">
|
||||
<dt>Image</dt>
|
||||
<dd><img src="img01.png" /></dd>
|
||||
<dd>Caption</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div id="trashcan" class="ui-sortable">
|
||||
<h2>Trash can</h2>
|
||||
<p>Drag modules here to delete them.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
<div id="overlay">
|
||||
|
Loading…
Reference in New Issue
Block a user