diff options
Diffstat (limited to 'demos/real-world/layout')
-rw-r--r-- | demos/real-world/layout/add.png | bin | 174 -> 0 bytes | |||
-rw-r--r-- | demos/real-world/layout/demo-ie.css | 4 | ||||
-rw-r--r-- | demos/real-world/layout/demo.css | 44 | ||||
-rw-r--r-- | demos/real-world/layout/demo.js | 114 | ||||
-rw-r--r-- | demos/real-world/layout/down.png | bin | 900 -> 0 bytes | |||
-rw-r--r-- | demos/real-world/layout/img01.png | bin | 58229 -> 0 bytes | |||
-rw-r--r-- | demos/real-world/layout/index.html | 105 | ||||
-rw-r--r-- | demos/real-world/layout/loader.gif | bin | 4782 -> 0 bytes | |||
-rw-r--r-- | demos/real-world/layout/loader_bg.gif | bin | 317 -> 0 bytes | |||
-rw-r--r-- | demos/real-world/layout/up.png | bin | 958 -> 0 bytes |
10 files changed, 0 insertions, 267 deletions
diff --git a/demos/real-world/layout/add.png b/demos/real-world/layout/add.png Binary files differdeleted file mode 100644 index 920e2b5e1..000000000 --- a/demos/real-world/layout/add.png +++ /dev/null diff --git a/demos/real-world/layout/demo-ie.css b/demos/real-world/layout/demo-ie.css deleted file mode 100644 index 47d9ecb87..000000000 --- a/demos/real-world/layout/demo-ie.css +++ /dev/null @@ -1,4 +0,0 @@ -body { height: 100% } -.ui-sortable h2 { top: -4px; } - -#overlay #preloader img { margin-top: 11px; }
\ No newline at end of file diff --git a/demos/real-world/layout/demo.css b/demos/real-world/layout/demo.css deleted file mode 100644 index 26563aa39..000000000 --- a/demos/real-world/layout/demo.css +++ /dev/null @@ -1,44 +0,0 @@ -body { background-color:#666; color:#FFF; font:11px/1.5 Arial, sans-serif; margin:0; padding:30px 0 0 30px; } -h1 { font-size:18px; margin:0 0 20px; } -a { color:#FFF; } - -.clear { clear:both; font-size:1px; line-height:1px; } - -#overlay { background:#666; height:100%; left:0; position:absolute; top:0; width:100%; z-index:2000; } -#overlay #preloader { background:url(loader_bg.gif) no-repeat; height:50px; left:50%; line-height:50px; margin:-25px 0 0 -25px; position:absolute; text-align:center; top:50%; width:50px; } -#overlay #preloader img { margin:0; vertical-align:middle; } - -.ui-sortable { background-color:#FFF; border:1px solid #555; color:#222; margin:0 15px 15px 0; padding:0 10px 10px; width:175px; } -.ui-sortable h2 { background-color:#555; border-top:3px solid #666; color:#FFF; font-size:11px; margin:0 -10px 10px; line-height:2; padding:0 10px; position:relative; } - -dl.sort { color:#222; margin:10px 0; } -#uidemo dl.first { margin-top:0; } -#uidemo dl.last { margin-bottom:0; } - -dl.sort dt { background-color:#666; color:#FFF; cursor:move; height:2em; line-height:2; padding:0 6px; position:relative; } -dl.sort dd { background-color:#FFF; margin:0; padding:3px 6px; } - -.ui-sortable-helper { width:175px; } -.placeholder { border:1px dashed #AAA; } - -span.options { cursor:default; font-size:1px; line-height:1px; position:absolute; } -span.options a { background-color:#FFF; cursor:pointer; display:block; float:left; text-indent:-9000px; } -span.options a.add { background: url(add.png) no-repeat; } - -.ui-sortable h2 span.options { right:-12px; top:5px; width:30px; } -.ui-sortable h2 span.options a { height:12px; width:30px; } - -dl.sort dt span.options { right:5px; top:5px; width:27px; } -dl.sort dt span.options a { height:12px; width:12px; } -dl.sort dt span.options a.down { background: url(down.png) no-repeat; } -dl.sort dt span.options a.up { margin-right:3px; background: url(up.png) no-repeat; } -dl.sort dt span.options a.disabled { background:#555 !important; cursor:default; } - -#container { float:left; } -#header { width:638px; } -#content { float:left; width:400px; } -#sidebar { float:left; width:200px; } -#footer { width:638px; } -#meta { float:left; } - -#trashcan p { margin:0; }
\ No newline at end of file diff --git a/demos/real-world/layout/demo.js b/demos/real-world/layout/demo.js deleted file mode 100644 index ba854e850..000000000 --- a/demos/real-world/layout/demo.js +++ /dev/null @@ -1,114 +0,0 @@ -(function($){ - function updateUpDown(sortable) { - $('dl:not(.ui-sortable-helper)', sortable) - .removeClass('first').removeClass('last') - .find('.up, .down').removeClass('disabled').end() - .filter(':first').addClass('first').find('.up').addClass('disabled').end().end() - .filter(':last').addClass('last').find('.down').addClass('disabled').end().end(); - }; - - function moveUpDown() { - var link = $(this), - dl = link.parents('dl'), - prev = dl.prev('dl'), - next = dl.next('dl'); - - if(link.is('.up') && prev.length > 0) - dl.insertBefore(prev); - - if(link.is('.down') && next.length > 0) - dl.insertAfter(next); - - updateUpDown(dl.parent()); - }; - - function addControls() { - $(this).append('<span class="options"><a class="up">up</a><a class="down">down</a></span>') - .find('a.up, a.down').bind('click', moveUpDown); - updateUpDown($(this).parents(".ui-sortable:first")); - } - - var counter = 1; - function addItem() { - var sortable = $(this).parents('.ui-sortable:first'); - var options = '<span class="options"><a class="up">up</a><a class="down">down</a></span>'; - var tpl = '<dl class="sort"><dt>{name}' + options + '</dt><dd>{desc}</dd></dl>'; - var html = tpl.replace(/{name}/g, 'Dynamic name ' + counter).replace(/{desc}/g, 'Description'); - counter += 1; - sortable.append(html).sortable('refresh').find('a.up, a.down').bind('click', moveUpDown); - updateUpDown(sortable); - }; - - function emptyTrashCan(item) { - item.remove(); - }; - - function sortableChange(event, ui) { - if(ui.sender){ - var w = ui.element.width(); - ui.placeholder.width(w); - ui.helper.css("width",ui.element.children().width()); - } - }; - - function sortableUpdate(event, ui) { - if(ui.element[0].id == 'trashcan'){ - emptyTrashCan(ui.item); - } else { - updateUpDown(ui.element[0]); - if(ui.sender) - updateUpDown(ui.sender[0]); - } - }; - - $(document).ready(function(){ - var els = ['#header', '#content', '#sidebar', '#footer', '#trashcan']; - var $els = $(els.toString()); - - $('h2', $els.slice(0,-1)).append('<span class="options"><a class="add">add</a></span>'); - $('dt', $els).each(addControls); - //$('dt', $els).append('<span class="options"><a class="up">up</a><a class="down">down</a></span>'); - - $('a.add').bind('click', addItem); - //$('a.up, a.down').bind('click', moveUpDown); - - $els.each(function(){ - updateUpDown(this); - }); - - $els.sortable({ - items: '> dl', - handle: 'dt', - cursor: 'move', - //cursorAt: { top: 2, left: 2 }, - //opacity: 0.8, - //helper: 'clone', - appendTo: 'body', - //placeholder: 'clone', - //placeholder: 'placeholder', - connectWith: els, - start: function(event,ui) { - ui.helper.css("width", ui.item.parent().width()); - }, - change: sortableChange, - update: sortableUpdate - }).bind("sortreceive", function(event, ui) { - $(ui.item).removeClass('ui-draggable').find('dt').each(addControls); - }); - $('#components > dl').draggable({ - connectToSortable: $els.not("#trashcan"), - helper: 'clone', - handle: 'dt' - }) - }); - - $(window).bind('load',function(){ - setTimeout(function(){ - // fixes the weird scrolling in IE while killing the fade - $(document.body).css("height", "auto") - $('#overlay').fadeOut(function(){ - $(this).remove(); - }); - }, 500); - }); -})(jQuery);
\ No newline at end of file diff --git a/demos/real-world/layout/down.png b/demos/real-world/layout/down.png Binary files differdeleted file mode 100644 index 8a39bea57..000000000 --- a/demos/real-world/layout/down.png +++ /dev/null diff --git a/demos/real-world/layout/img01.png b/demos/real-world/layout/img01.png Binary files differdeleted file mode 100644 index 42900c7c6..000000000 --- a/demos/real-world/layout/img01.png +++ /dev/null diff --git a/demos/real-world/layout/index.html b/demos/real-world/layout/index.html deleted file mode 100644 index 218a13f0b..000000000 --- a/demos/real-world/layout/index.html +++ /dev/null @@ -1,105 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <title>UI Sortable: Layout Demo</title> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> - - <meta name="title" content="UI Sortable: Layout Demo" /> - <meta name="description" content="A sortable layout created with the jQuery UI suite" /> - - <meta name="author" content="Joan Piedra" /> - <meta name="author-url" content="http://www.joanpiedra.com/" /> - <meta name="author-url" content="http://www.justaquit.com/" /> - <meta name="author-url" content="http://jquery.com/" /> - - <link rel="shortcut icon" href="http://jquery.com/favicon.ico" /> - <link rel="icon" href="http://jquery.com/favicon.ico" type="image/x-icon" /> - - <link rel="stylesheet" href="demo.css" type="text/css" /> - <!--[if IE]> - <link rel="stylesheet" href="demo-ie.css" type="text/css" /> - <![endif]--> - </head> - - <body id="uidemo"> - <h1>UI Sortable: <em>Layout demo</em></h1> - - <div id="container"> - <div id="header" class="ui-sortable"> - <h2>Header</h2> - <dl class="sort"> - <dt>Pages</dt> - <dd>Main Navigation</dd> - </dl> - </div> - - <div id="content" class="ui-sortable"> - <h2>Content</h2> - <dl class="sort"> - <dt>Blog</dt> - <dd>Main blog post</dd> - </dl> - </div> - - <div id="sidebar" class="ui-sortable"> - <h2>Sidebar</h2> - <dl class="sort"> - <dt>Pages</dt> - <dd>Mini About</dd> - </dl> - <dl class="sort"> - <dt>Blog</dt> - <dd>Monthly Archives</dd> - </dl> - <dl class="sort"> - <dt>Links</dt> - <dd>Random Links</dd> - </dl> - </div> - - <div class="clear"></div> - - <div id="footer" class="ui-sortable"> - <h2>Footer</h2> - <dl class="sort"> - <dt>Pages</dt> - <dd>Copyright</dd> - </dl> - </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"> - <div id="preloader"><img src="loader.gif" alt="" /></div> - </div> - - <script type="text/javascript" src="../../../jquery-1.2.6.js"></script> - - <script type="text/javascript" src="../../../ui/ui.core.js"></script> - <script type="text/javascript" src="../../../ui/ui.draggable.js"></script> - <script type="text/javascript" src="../../../ui/ui.droppable.js"></script> - <script type="text/javascript" src="../../../ui/ui.sortable.js"></script> - - <script type="text/javascript" src="demo.js"></script> - </body> -</html>
\ No newline at end of file diff --git a/demos/real-world/layout/loader.gif b/demos/real-world/layout/loader.gif Binary files differdeleted file mode 100644 index 7e717cdf9..000000000 --- a/demos/real-world/layout/loader.gif +++ /dev/null diff --git a/demos/real-world/layout/loader_bg.gif b/demos/real-world/layout/loader_bg.gif Binary files differdeleted file mode 100644 index 9c0488402..000000000 --- a/demos/real-world/layout/loader_bg.gif +++ /dev/null diff --git a/demos/real-world/layout/up.png b/demos/real-world/layout/up.png Binary files differdeleted file mode 100644 index 6451c92ef..000000000 --- a/demos/real-world/layout/up.png +++ /dev/null |