This commit is contained in:
Paul Bakaus 2008-05-23 09:14:39 +00:00
parent 21c43357d0
commit 7ed79d0be5
128 changed files with 6215 additions and 0 deletions

3544
jquery/jquery-1.2.5.js vendored Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

View File

@ -0,0 +1,263 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Slide Demo - Fixed Drawer</title>
<style type="text/css" media="screen">
<!--
/*************************************/
/* Blueprint: reset.css */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
/* Remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
}
ol, ul {
list-style: none;
}
/* Tables still need 'cellspacing="0"' in the markup. */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
/* Remove possible quote marks (") from <q>, <blockquote>. */
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
/*************************************/
/* Demo Styles */
.capt,
.capb {
background: url("images/caps.gif") no-repeat;
height:4px;
width:100%;
/*position:absolute;*/
z-index:100;
margin:0px;
padding:0px;
}
.capt {
position:absolute;
background-position:0 -4px;
}
.capb {
margin-top:-19px;
}
#content {
float:left;
}
.drawers-wrapper {
position: relative;
width: 188px;
float:left;
margin:10px;
}
.drawers {
margin-bottom:15px;
color:#76797C;
font-size:11px;
line-height: 18px;
}
.drawer {
background:transparent url(images/sideboxlight_bg.gif) repeat-y scroll 0pt;
color:#76797C;
font-size:11px;
line-height:1.3em;
}
.drawer-handle {
background:#939393 url(images/slider_handlebg.png) no-repeat scroll 0pt;
color:#333333;
cursor:default;
height:25px;
line-height:25px;
text-indent:15px;
font-size:12px;
width:100%;
}
.drawer-handle.open {
background-color:#72839D;
background-position:-188px 0pt;
color:#FFFFFF;
}
/* nasty, but it fixes the indent on the first one. */
h2.drawer-handle span {
}
.drawer ul {
padding: 0 12px;
padding-bottom:0pt;
}
.drawer li {
border-bottom:1px solid #E5E5E5;
line-height:16px;
padding:6px 0pt;
}
.drawer-content ul {
padding-top: 7px;
}
.drawer-content li a {
display:block;
overflow:hidden;
}
.alldownloads li {
border:0pt none;
line-height:18px;
padding:0pt;
}
.drawers a {
color:#666666;
text-decoration:none;
font-family:"Lucida Grande",Geneva,Arial,Verdana,sans-serif;
}
-->
</style>
<script type="text/javascript" src="../../../../jquery/src/core.js"></script>
<script type="text/javascript" src="../../../../jquery/src/selector.js"></script>
<script type="text/javascript" src="../../../../jquery/src/event.js"></script>
<script type="text/javascript" src="../../../../jquery/src/ajax.js"></script>
<script type="text/javascript" src="../../../../jquery/src/fx.js"></script>
<script type="text/javascript" src="../../../../jquery/src/offset.js"></script>
<script type="text/javascript" src="../../../../jquery/src/dimensions.js"></script>
<script type="text/javascript" src="../../../ui.core.js"></script>
<script type="text/javascript" src="../../../ui.accordion.js"></script>
<script type="text/javascript">
<!--
$(function () {
$('ul.drawers').accordion({
header: 'h2.drawer-handle',
selectedClass: 'open',
event: 'mouseover'
});
});
//-->
</script>
</head>
<body id="page">
<div id="content">
<h1>Fixed drawer slide out demo (using accordion plugin)</h1>
<p>This example demonstrates the Apple downloads slider/accordion effect using the jQuery Accordion plugin.</p>
<p>Mouse over the headings to reveal the list of available links.</p>
<p>
<a href="http://jqueryfordesigners.com/slide-out-and-drawer-effect/">Read the article this demonstration relates to</a>
</p>
</div>
<div class="drawers-wrapper">
<ul class="drawers">
<li class="drawer">
<h2 class="drawer-handle open">
<div class="capt"></div>
<span>Downloads</span>
</h2>
<ul class="alldownloads">
<li id="sn-downloadsmacosx"><a href="/downloads/macosx/">All Categories</a></li>
<li id="sn-aperture"><a href="/downloads/macosx/aperture/">Aperture</a></li>
<li id="sn-apple"><a href="/downloads/macosx/apple/">Apple</a></li>
<li id="sn-audio"><a href="/downloads/macosx/audio/">Audio</a></li>
<li id="sn-automator"><a href="/downloads/macosx/automator/">Automator Actions</a></li>
<li id="sn-businessfinance"><a href="/downloads/macosx/business_finance/">Business &amp; Finance</a></li>
<li id="sn-calendars"><a href="/downloads/macosx/calendars/">Calendars</a></li>
<li id="sn-developmenttools"><a href="/downloads/macosx/development_tools/">Development Tools</a></li>
<li id="sn-drivers"><a href="/downloads/macosx/drivers/">Drivers</a></li>
<li id="sn-emailchat"><a href="/downloads/macosx/email_chat/">Email &amp; Chat</a></li>
<li id="sn-finalcutstudio"><a href="/downloads/macosx/finalcutstudio/">Final Cut Studio</a></li>
<li id="sn-games"><a href="/downloads/macosx/games/">Games</a></li>
<li id="sn-homelearning"><a href="/downloads/macosx/home_learning/">Home &amp; Learning</a></li>
<li id="sn-iconsscreensavers"><a href="/downloads/macosx/icons_screensavers/">Icons, Screensavers, etc.</a></li>
<li id="sn-imaging3d"><a href="/downloads/macosx/imaging_3d/">Imaging &amp; 3D</a></li>
<li id="sn-internetutilities"><a href="/downloads/macosx/internet_utilities/">Internet Utilities</a></li>
<li id="sn-ipoditunes"><a href="/downloads/macosx/ipod_itunes/">iPod + iTunes</a></li>
<li id="sn-mathscience"><a href="/downloads/macosx/math_science/">Math &amp; Science</a></li>
<li id="sn-networkingsecurity"><a href="/downloads/macosx/networking_security/">Networking &amp; Security</a></li>
<li id="sn-productivitytools"><a href="/downloads/macosx/productivity_tools/">Productivity Tools</a></li>
<li id="sn-spotlight"><a href="/downloads/macosx/spotlight/">Spotlight Plugins</a></li>
<li id="sn-systemdiskutilities"><a href="/downloads/macosx/system_disk_utilities/">System/Disk Utilities</a></li>
<li id="sn-unixopensource"><a href="/downloads/macosx/unix_open_source/">UNIX &amp; Open Source</a></li>
<li id="sn-video"><a href="/downloads/macosx/video/">Video</a></li>
<li id="sn-dashboard"><a href="/downloads/dashboard/" class="bottom">Widgets</a></li>
</ul>
</li>
<li class="drawer">
<h2 class="drawer-handle">Top Downloads</h2>
<ul>
<li><a title="iTunes 7.5" href="http://www.apple.com/itunes/download/">1. iTunes 7.5</a></li>
<li><a title="QuickTime 7.3.1" href="http://www.apple.com/quicktime/download/">2. QuickTime 7.3.1</a></li>
<li><a title="Safari 3 Public Beta" href="http://www.apple.com/safari/download/">3. Safari 3 Public Beta</a></li>
<li><a title="MacPool" href="/downloads/macosx/games/simulation_and_sports/macpool.html">4. MacPool Realistic and easy to play computer simu…</a></li>
<li><a title="Guitar Hero III: Legends of Rock" href="/downloads/macosx/games/demos_updates/guitarheroiiilegendsofrock.html">5. Guitar Hero III: L…</a></li>
<li><a title="Messenger for Mac" href="/downloads/macosx/email_chat/messengerformac.html">6. Messenger for Mac</a></li>
<li><a title="Google Earth" href="/downloads/macosx/home_learning/googleearth.html">7. Google Earth</a></li>
<li><a title="Monopoly" href="/downloads/macosx/games/cards_puzzle/monopoly.html">8. Monopoly</a></li>
<li><a title="Litho System Icons" href="/downloads/macosx/icons_screensavers/lithosystemicons.html">9. Litho System Icons</a></li>
<li><a title="Battlefield 2142" href="/downloads/macosx/games/demos_updates/battlefield2142.html">10. Battlefield 2142</a></li>
<li><a title="More iChat Effects" href="/downloads/macosx/email_chat/moreichateffects.html">11. More iChat Effects</a></li>
<li><a title="Dragster" href="/downloads/macosx/internet_utilities/dragster.html">12. Dragster</a></li>
<li><a title="iSquint" href="/downloads/macosx/ipod_itunes/isquint.html">13. iSquint</a></li>
<li class="last"><a title="US Holiday Calendar" href="/downloads/macosx/calendars/usholidaycalendar.html">14. US Holiday Calendar</a></li>
</ul>
</li>
<li class="drawer last">
<h2 class="drawer-handle">Top Apple Downloads</h2>
<ul>
<li><a title="iTunes 7.5" href="http://www.apple.com/itunes/download/">1. iTunes 7.5</a></li>
<li><a title="QuickTime 7.3.1" href="http://www.apple.com/quicktime/download/">2. QuickTime 7.3.1</a></li>
<li><a title="Safari 3 Public Beta" href="http://www.apple.com/safari/download/">3. Safari 3 Public Beta</a></li>
<li><a title="Mac OS X 10.5.1 Update" href="/downloads/macosx/apple/macosx_updates/macosx1051update.html">4. Mac OS X 10.5.1 Up…</a></li>
<li><a title="Java for Mac OS X 10.4 Release 5" href="/downloads/macosx/apple/macosx_updates/javaformacosx104release5.html">5. Java for Mac OS X …</a></li>
<li><a title="iPod Reset Utility 1.0.2 for Windows" href="/downloads/macosx/apple/ipod_itunes/ipodresetutility102forwindows.html">6. iPod Reset Utility…</a></li>
<li><a title="iPhoto 7.1.1" href="/downloads/macosx/apple/application_updates/iphoto711.html">7. iPhoto 7.1.1</a></li>
<li><a title="Bonjour for Windows" href="/downloads/macosx/apple/windows/bonjourforwindows.html">8. Bonjour for Windows</a></li>
<li><a title="Mac OS X 10.4.11 Combo Update (PPC)" href="/downloads/macosx/apple/macosx_updates/macosx10411comboupdateppc.html">9. Mac OS X 10.4.11 C…<br/>The 10.4.11 Update is recommended for al…</a></li>
<li><a title="Java for Mac OS X 10.4, Release 6" href="/downloads/macosx/apple/macosx_updates/javaformacosx104release6.html">10. Java for Mac OS X …</a></li>
<li><a title="GarageBand 4.1.1" href="/downloads/macosx/apple/application_updates/garageband411.html">11. GarageBand 4.1.1</a></li>
<li><a title="iPod Updater 2006-06-28 for Windows" href="/downloads/macosx/apple/ipod_itunes/ipodupdater20060628forwindows.html">12. iPod Updater 2006-…</a></li>
<li><a title="Security Update 2007-009 1.1 (10.4.11 Universal)" href="/downloads/macosx/apple/security_updates/securityupdate20070091110411universal.html">13. Security Update 20…</a></li>
<li class="last"><a title="Security Update 2007-009 1.1 (10.5.1)" href="/downloads/macosx/apple/security_updates/securityupdate2007009111051.html">14. Security Update 20…</a></li>
</ul>
</li>
</ul>
<div class="capb"></div>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -0,0 +1,236 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Image Cropper: jQuery Real-world Demo</title>
<script type="text/javascript" src="../../../../jquery/src/core.js"></script>
<script type="text/javascript" src="../../../../jquery/src/selector.js"></script>
<script type="text/javascript" src="../../../../jquery/src/event.js"></script>
<script type="text/javascript" src="../../../../jquery/src/ajax.js"></script>
<script type="text/javascript" src="../../../../jquery/src/fx.js"></script>
<script type="text/javascript" src="../../../../jquery/src/offset.js"></script>
<script type="text/javascript" src="../../../../jquery/src/dimensions.js"></script>
<script type="text/javascript" src="../../../ui.core.js"></script>
<script type="text/javascript" src="../../../ui.resizable.js"></script>
<script type="text/javascript" src="../../../ui.draggable.js"></script>
<script type="text/javascript" src="../../../../fx/fx.js"></script>
<script type="text/javascript" src="../../../../fx/fx.bounce.js"></script>
<script type="text/javascript" src="../../../../fx/fx.scale.js"></script>
<style type="text/css">
<!--
/*************************************/
/* Real-World CSS */
@import "../../css/real-world.css";
/*************************************/
/* Demo CSS */
#sidebar div {
text-align:center;
}
.thumb ul {
padding:10px 0 0 0;
}
.thumbs li {
margin:4px 20px;
}
.thumbs li a,
.thumbs li a img{
height: 75px;
width: 75px;
display: block;
}
.thumbs li a:hover,
.thumbs li a:hover img{
height: 130px;
width: 130px;
}
.thumbs li a:hover {
border: 4px solid #E8EEF7;
}
#break strong {
margin:0 0 4px 0;
}
#break ul {
padding:6px;
}
#break ul li {
padding:3px 0px;
font-style: italic;
}
#break ul li span {
font-style: normal;
}
.ui-resizable-knob {
border: 1px #fff dashed;
}
/*************************************/
/* Cropper CSS */
#resizeme_containment_wrap_image {
position: relative;
}
#resizeme_containment_div {
position: absolute;
top:0px;
left:0px;
width: 150px;
height:150px;
}
#resizeme_containment_div_wrapper {
position: relative;
}
-->
</style>
<script type="text/javascript">
var getSizeImg = function(src) {
var timg = $('<img>').attr('src', src).css({ position: 'absolute', top: '-1000px', left: '-1000px' }).appendTo('body');
var size = [ timg.get(0).offsetWidth, timg.get(0).offsetHeight ];
try { document.body.removeChild(timg[0]); }
catch(e) {};
return size;
};
$().ready(function(){
$('#resizeme_containment_div').resizable({
containment: $('#resizeme_containment_div_wrapper'),
//proxy: 'proxy',
//ghost: true,
//animate:true,
handles: 'all',
knobHandles: true,
//transparent: true,
//aspectRatio: true,
autoHide: true,
minWidth: 100,
minHeight: 100,
resize: function(e, ui) {
this.style.backgroundPosition = '-' + (ui.instance.position.left) + 'px -' + (ui.instance.position.top) + 'px';
$("#log-top").html(ui.instance.position.top+"px");
$("#log-left").html(ui.instance.position.left+"px");
$("#log-height").html(ui.instance.size.height+"px");
$("#log-width").html(ui.instance.size.width+"px");
},
stop: function(e, ui) {
this.style.backgroundPosition = '-' + (ui.instance.position.left) + 'px -' + (ui.instance.position.top) + 'px';
}
})
.draggable({
cursor: 'move',
containment: $('#resizeme_containment_div_wrapper'),
drag: function(e, ui) {
this.style.backgroundPosition = '-' + (ui.position.left) + 'px -' + (ui.position.top) + 'px';
$("#log-top").html(ui.instance.position.top+"px");
$("#log-left").html(ui.instance.position.left+"px");
}
});
$('.thumbs').find("li a").click(function(e){
$('#resizeme_containment_div').css('top', '0');
$('#resizeme_containment_div').css('left', '0');
var size = getSizeImg($(this).find("img").attr("src"));
$('#resizeme_containment_wrap_image').css( { width: size[0], height: size[1], background: 'transparent url('+$(this).find("img").attr("src")+') no-repeat scroll 0%' } );
$('#resizeme_containment_div_wrapper').css( { width: size[0], height: size[1] } );
$('#resizeme_containment_div').css('background', 'transparent url('+$(this).find("img").attr("src")+') no-repeat scroll 0px 0px');
return false;
});
$('#resizeme_containment_wrap_image').css({ opacity: 0.5 });
$("#log-height").html($('#resizeme_containment_div').height()+"px");
$("#log-width").html($('#resizeme_containment_div').width()+"px");
});
$(window).load(function(){
var size = getSizeImg("img/img01.jpg");
$('#resizeme_containment_div').css('background', 'transparent url(img/img01.jpg) no-repeat scroll 0px 0px');
$('#resizeme_containment_div_wrapper').css( { width: size[0], height: size[1] } );
$('#resizeme_containment_wrap_image').css( { width: size[0], height: size[1], background: 'transparent url(img/img01.jpg) no-repeat scroll 0%' } );
});
</script>
</head>
<body>
<div id="sidebar">
<ul class="thumbs">
<li><a href="#" title="Open This Image"><img src="img/img01.jpg"/></a></li>
<li><a href="#" title="Open This Image"><img src="img/img02.jpg"/></a></li>
<li><a href="#" title="Open This Image"><img src="img/img03.jpg"/></a></li>
<li><a href="#" title="Open This Image"><img src="img/img04.jpg"/></a></li>
<li><a href="#" title="Open This Image"><img src="img/img05.jpg"/></a></li>
</div>
</div>
<div id="main">
<div id="header">
<h2>jQuery Real-world Demo: Image Cropper</h2>
</div>
<div id="content">
<div id="resizeme_containment_div_wrapper">
<div id="resizeme_containment_wrap_image"></div>
<div id="resizeme_containment_div"></div>
</div>
</div>
<div id="break">
<strong>Properties:</strong>
<ul>
<li>width: <span id="log-width">0px</span></li>
<li>height: <span id="log-height">0px</span></li>
<li>top: <span id="log-top">0px</span></li>
<li>left: <span id="log-left">0px</span></li>
</ul>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,42 @@
body { background-color:#666; color:#FFF; font:11px/1.5 Arial, sans-serif; margin:0; overflow:hidden; 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:11px 0 0 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; }
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; }
.ui-sortable h2 span.options { right:10px; top:8px; 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.up { margin-right:3px; }
dl.sort dt span.options a.disabled { background-color:#555; cursor:default; }
#container { float:left; }
#header { width:638px; }
#content { float:left; width:400px; }
#sidebar { float:left; width:200px; }
#footer { width:638px; }
#trashcan { float:left; }
#trashcan p { margin:0; }

View File

@ -0,0 +1,97 @@
(function($){
var updateUpDown = function(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();
};
var moveUpDown = function(){
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());
};
var addItem = function(){
var sortable = $(this).parents('.ui-sortable');
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 :D').replace(/{desc}/g, 'Description');
sortable.append(html).sortable('refresh').find('a.up, a.down').bind('click', moveUpDown);
updateUpDown(sortable);
};
var emptyTrashCan = function(item){
item.remove();
};
var sortableChange = function(e, ui){
if(ui.sender){
var w = ui.element.width();
ui.placeholder.width(w);
ui.helper.css("width",ui.element.children().width());
}
};
var sortableUpdate = function(e, 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).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(e,ui) {
ui.helper.css("width", ui.item.width());
},
change: sortableChange,
update: sortableUpdate
});
});
$(window).bind('load',function(){
setTimeout(function(){
$('#overlay').fadeOut(function(){
$('body').css('overflow', 'auto');
});
}, 750);
});
})(jQuery);

View File

@ -0,0 +1,99 @@
<!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" media="screen" />
<!-- saved from url=(0013)about:internet -->
</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="trashcan" class="ui-sortable">
<h2>Trash can</h2>
<p>Drag modules here to delete them.</p>
</div>
<div class="clear"></div>
<div id="overlay">
<div id="preloader"><img src="loader.gif" alt="" /></div>
</div>
<!-- jQuery Core -->
<script type="text/javascript" src="../../../../jquery/src/core.js"></script>
<script type="text/javascript" src="../../../../jquery/src/selector.js"></script>
<script type="text/javascript" src="../../../../jquery/src/event.js"></script>
<script type="text/javascript" src="../../../../jquery/src/ajax.js"></script>
<script type="text/javascript" src="../../../../jquery/src/fx.js"></script>
<script type="text/javascript" src="../../../../jquery/src/offset.js"></script>
<script type="text/javascript" src="../../../../jquery/src/dimensions.js"></script>
<!-- jQuery UI Base -->
<script type="text/javascript" src="../../../ui.core.js"></script>
<!-- jQuery UI Plugins -->
<script type="text/javascript" src="../../../ui.draggable.js"></script>
<script type="text/javascript" src="../../../ui.droppable.js"></script>
<script type="text/javascript" src="../../../ui.sortable.js"></script>
<!-- jQuery UI Demo -->
<script type="text/javascript" src="demo.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -0,0 +1,133 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>jQuery UI Draggables and Droppables playground</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="en" />
<meta name="keywords" content="jquery, ui, droppables, draggables, demo" />
<meta name="description" content="Demonstration of jQuery UI Droppables and Dragables. More to come." />
<script type="text/javascript" src="../../../../jquery/src/core.js"></script>
<script type="text/javascript" src="../../../../jquery/src/selector.js"></script>
<script type="text/javascript" src="../../../../jquery/src/event.js"></script>
<script type="text/javascript" src="../../../../jquery/src/ajax.js"></script>
<script type="text/javascript" src="../../../../jquery/src/fx.js"></script>
<script type="text/javascript" src="../../../../jquery/src/offset.js"></script>
<script type="text/javascript" src="../../../../jquery/src/dimensions.js"></script>
<script type="text/javascript" src="../../../../plugins/livequery/jquery.livequery.js"></script>
<script type="text/javascript" src="../../../../plugins/blockUI/jquery.blockUI.js"></script>
<script type="text/javascript" src="../../../ui.core.js"></script>
<script type="text/javascript" src="../../../ui.draggable.js"></script>
<script type="text/javascript" src="../../../ui.droppable.js"></script>
<script type="text/javascript" src="./js/demo.js"></script>
<link rel="stylesheet" type="text/css" href="./theme/css/screen.css" media="screen, projection" />
</head>
<body>
<h1>Manage Your Photos</h1>
<div id="body_wrap">
<div id="content">
<h2>Drag photos to the Trash or waste them in the Shredder:</h2>
<ul class="gallery">
<li>
<img src="./img/thumbs/P1010020.JPG" alt="Tatry 1" title="Drag me!" />
<p>Tatry 1</p>
<div>
<a href="#" title="Trash me." class="tb_trash">Trash me</a>
<a href="./img/P1010020.JPG" title="See me supersized." class="tb_supersize">See me supersized</a>
</div>
</li>
<li>
<img src="./img/thumbs/P1010036.JPG" alt="Tatry 2" title="Drag me!" />
<p>Tatry 2</p>
<div>
<a href="#" title="Trash me." class="tb_trash">Trash me</a>
<a href="./img/P1010036.JPG" title="See me supersized." class="tb_supersize">See me supersized</a>
</div>
</li>
<li>
<img src="./img/thumbs/P1010039.JPG" alt="Tatry 3" title="Drag me!" />
<p>Tatry 3</p>
<div>
<a href="#" title="Trash me." class="tb_trash">Trash me</a>
<a href="./img/P1010039.JPG" title="See me supersized." class="tb_supersize">See me supersized</a>
</div>
</li>
<li>
<img src="./img/thumbs/P1010044.JPG" alt="Tatry 4" title="Drag me!" />
<p>Tatry 4</p>
<div>
<a href="#" title="Trash me." class="tb_trash">Trash me</a>
<a href="./img/P1010044.JPG" title="See me supersized." class="tb_supersize">See me supersized</a>
</div>
</li>
<li>
<img src="./img/thumbs/P1010050.JPG" alt="Tatry 5" title="Drag me!" />
<p>Tatry 5</p>
<div>
<a href="#" title="Trash me." class="tb_trash">Trash me</a>
<a href="./img/P1010050.JPG" title="See me supersized." class="tb_supersize">See me supersized</a>
</div>
</li>
<li>
<img src="./img/thumbs/P1010055.JPG" alt="Tatry 6" title="Drag me!" />
<p>Tatry 6</p>
<div>
<a href="#" title="Trash me." class="tb_trash">Trash me</a>
<a href="./img/P1010055.JPG" title="See me supersized." class="tb_supersize">See me supersized</a>
</div>
</li>
<li>
<img src="./img/thumbs/P1010058.JPG" alt="Tatry 7" title="Drag me!" />
<p>Tatry 7</p>
<div>
<a href="#" title="Trash me." class="tb_trash">Trash me</a>
<a href="./img/P1010058.JPG" title="See me supersized." class="tb_supersize">See me supersized</a>
</div>
</li>
<li>
<img src="./img/thumbs/P1010059.JPG" alt="Tatry 8" title="Drag me!" />
<p>Tatry 8</p>
<div>
<a href="#" title="Trash me." class="tb_trash">Trash me</a>
<a href="./img/P1010059.JPG" title="See me supersized." class="tb_supersize">See me supersized</a>
</div>
</li>
<li>
<img src="./img/thumbs/P1010061.JPG" alt="Tatry 9" title="Drag me!" />
<p>Tatry 9</p>
<div>
<a href="#" title="Trash me." class="tb_trash">Trash me</a>
<a href="./img/P1010061.JPG" title="See me supersized." class="tb_supersize">See me supersized</a>
</div>
</li>
<li>
<img src="./img/thumbs/P1010063.JPG" alt="Tatry 10" title="Drag me!" />
<p>Tatry 10</p>
<div>
<a href="#" title="Trash me." class="tb_trash">Trash me</a>
<a href="./img/P1010063.JPG" title="See me supersized." class="tb_supersize">See me supersized</a>
</div>
</li>
</ul>
</div>
<div id="sidebar">
<div class="box" id="trash">
<h2>Trash (drag me back)</h2>
<div></div>
</div>
<div class="box" id="shred">
<h2>Shredder (see me no more)</h2>
<div></div>
</div>
</div>
</div>
<div id="footer">
<p>Demo footer here :)</p>
</div>
</body>
</html>

View File

@ -0,0 +1,130 @@
/*
* The very first increment of Droppables&Draggables demo. The code is going to
* be more concise (remove unnecessary code repetitions etc.). And imho the
* photo management is a good candidate for demonstration of more jQuery UI
* components (sortables, selectables...). More to come...
*
*/
$(window).bind('load', function() {
// make images in the gallery draggable
$('ul.gallery img').addClass('img_content').draggable({
helper: 'clone'
});
// make the trash box droppable, accepting images from the content section only
$('#trash div').droppable({
accept: '.img_content',
activeClass: 'active',
drop: function(ev, ui) {
var $that = $(this);
ui.draggable.parent().fadeOut('slow', function() {
ui.draggable
.hide()
.appendTo($that)
.fadeIn('slow')
.animate({
width: '72px',
height: '54px'
})
.removeClass('img_content')
.addClass('img_trash');
$(this).remove();
});
}
});
// make the shredder box droppable, accepting images from both content and trash sections
$('#shred div').droppable({
accept: '.img_content, .img_trash',
activeClass: 'active',
drop: function(ev, ui) {
var $that = $(this);
// images from the content
if (ui.draggable.hasClass('img_content')) {
ui.draggable.parent().fadeOut('slow', function() {
ui.draggable
.appendTo($that)
.animate({
width: '0',
height: '0'
}, 'slow', function(){
$(this).remove();
});
$(this).remove();
});
}
// images from the trash
else if (ui.draggable.hasClass('img_trash')) {
ui.draggable
.appendTo($that)
.animate({
width: '0',
height: '0'
}, 'slow', function(){
$(this).remove();
});
}
}
});
// make the gallery droppable as well, accepting images from the trash only
$('ul.gallery').droppable({
accept: '.img_trash',
activeClass: 'active',
drop: function(ev, ui) {
var $that = $(this);
ui.draggable.fadeOut('slow', function() {
var $item = createGalleryItem(this).appendTo($that);
$(this)
.removeClass('img_trash')
.addClass('img_content')
.css({ width: '144px', height: '108px' })
.show();
$item.fadeIn('slow');
});
}
});
// handle the trash icon behavior
$('a.tb_trash').livequery('click', function() {
var $this = $(this);
var $img = $this.parent().siblings('img');
var $item = $this.parents('li');
$item.fadeOut('slow', function() {
$img
.hide()
.appendTo('#trash div')
.fadeIn('slow')
.animate({
width: '72px',
height: '54px'
})
.removeClass('img_content')
.addClass('img_trash');
$(this).remove();
});
return false;
});
// handle the magnify button
$('a.tb_supersize').livequery('click', function() {
$('<img width="576" height="432">')
.attr('src', $(this).attr('href'))
.appendTo('#body_wrap')
.displayBox();
return false;
});
});
function createGalleryItem(img) {
var title = img.getAttribute('alt');
var href = img.getAttribute('src').replace(/thumbs\//, '');
var $item = $('<li><p>'+title+'</p><div><a href="#" title="Trash me" class="tb_trash">Trash me</a><a href="'+href+'" title="See me supersized" class="tb_supersize">See me supersized</a></div></li>').hide();
$item.prepend($(img));
return $item;
}

View File

@ -0,0 +1,179 @@
body {
padding: 0;
margin: 0;
line-height: 1.5em;
font-size: 75%; /* gives us 12px in most browsers */
font-family: "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif;
background: #aefe05 url('../img/side_top.jpg') repeat-x top; /* body background from ui.jquery.com */
color: 222;
}
/*
================================
=LAYOUT
================================ */
h1 {
padding: 0 0 0 52px;
margin: 0;
font-size: 1.5em; /* 18px */
line-height: 2em; /* 36px */
background: url('../img/photos_gold_32.gif') no-repeat 8px 50%; /* Thanks to Iconbuffet.com */
color: #fff;
}
#body_wrap {
width: 960px;
margin: 0 auto;
background: #fff url('../img/body_wrap_bg.gif') repeat-y;
}
#content {
float: left;
width: 632px;
}
#sidebar {
float: right;
width: 320px;
}
#footer {
clear: both;
background: #32342f;
color: #fff;
}
/*
================================
=SECTIONS
================================ */
/*
----------------
=HEADER
---------------- */
/*
----------------
=CONTENT
---------------- */
#content h2 {
padding-left: 25px;
}
/*
=gallery
-------- */
.gallery {
min-height: 108px;
padding: 0;
margin: 18px 0;
list-style: none;
}
* html .gallery {
height: 108px; /* min-height for lte IE6 */
}
.gallery.active {
background: #eee;
}
.gallery li {
float: left;
width: 160px;
padding: 0 25px;
margin: 0 0 8px;
}
.gallery img {
display: block;
padding: 7px;
border: 1px solid #ccc;
background: #fff;
}
.displayBox img {
border: 25px solid #222;
}
/* img title */
.gallery p {
float: left;
padding: 0;
margin: 0;
}
/* img toolbar */
.gallery div {
float: right;
}
.gallery div a {
float: left;
width: 24px;
height: 24px;
background-repeat: no-repeat;
background-position: center;
text-indent: -9999px; /* Phark revisited image replacement */
}
.gallery div a:focus {
outline: 0;
}
.tb_supersize {
background-image: url('../img/search_16.gif'); /* Thanks to Iconbuffet.com */
}
.tb_trash {
background-image: url('../img/trash_16.gif'); /* Thanks to Iconbuffet.com */
}
/*
----------------
=SIDEBAR
---------------- */
.box {
margin: 18px;
border: 1px solid #ccc;
background: #fff;
}
.box h2 {
padding: 0 8px;
margin: 0;
font-size: 1.5em;
line-height: 2em;
background: #525252 url('../img/header_bg.png') repeat-x bottom;
color: #fff;
}
.box div {
min-height: 128px;
border: 2px solid #fff;
}
* html #sidebar .box div {
height: 128px; /* min-height for lte IE6 */
}
#trash div.active {
border-color: green;
}
#shred div.active {
border-color: red;
}
#trash div img {
float: left;
margin: 4px;
}
/*
----------------
=FOOTER
---------------- */
#footer p {
margin: 0;
text-align: right;
}
/*
================================
=FLOAT CLEARING
================================ */
#body_wrap, ul.gallery, #trash div {
display: inline-block;
}
#body_wrap:after, ul.gallery:after, #trash div:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
* html #body_wrap, * html ul.gallery, * html #trash div {
height: 1%;
}
#body_wrap, ul.gallery, #trash div {
display: block;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,193 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Slider Gallery</title>
<style type="text/css" media="screen">
<!--
body {
padding: 0;
font: 1em "Trebuchet MS", verdana, arial, sans-serif;
font-size: 100%;
background-color: #212121;
margin: 0;
}
h1 {
margin-bottom: 2px;
}
#container {
background-color: #fff;
width: 580px;
margin: 15px auto;
padding: 50px;
}
/* slider specific CSS */
.sliderGallery {
background: url(images/productbrowser_background_20070622.jpg) no-repeat;
overflow: hidden;
position: relative;
padding: 10px;
height: 160px;
width: 560px;
}
.sliderGallery UL {
position: absolute;
list-style: none;
overflow: none;
white-space: nowrap;
padding: 0;
margin: 0;
}
.sliderGallery UL LI {
display: inline;
}
.slider {
width: 542px;
height: 17px;
margin-top: 140px;
margin-left: 5px;
padding: 1px;
position: relative;
background: url(images/productbrowser_scrollbar_20070622.png) no-repeat;
}
.handle {
position: absolute;
cursor: move;
height: 17px;
width: 181px;
top: 0;
background: url(images/productbrowser_scroller_20080115.png) no-repeat;
z-index: 100;
}
.slider span {
color: #bbb;
font-size: 80%;
cursor: pointer;
position: absolute;
z-index: 110;
top: 3px;
}
.slider .slider-lbl1 {
left: 50px;
}
.slider .slider-lbl2 {
left: 107px;
}
.slider .slider-lbl3 {
left: 156px;
}
.slider .slider-lbl4 {
left: 280px;
}
.slider .slider-lbl5 {
left: 455px;
}
-->
</style>
<script type="text/javascript" src="../../../../jquery/src/core.js"></script>
<script type="text/javascript" src="../../../../jquery/src/selector.js"></script>
<script type="text/javascript" src="../../../../jquery/src/event.js"></script>
<script type="text/javascript" src="../../../../jquery/src/ajax.js"></script>
<script type="text/javascript" src="../../../../jquery/src/fx.js"></script>
<script type="text/javascript" src="../../../../jquery/src/offset.js"></script>
<script type="text/javascript" src="../../../../jquery/src/dimensions.js"></script>
<script type="text/javascript" src="../../../ui.core.js"></script>
<script type="text/javascript" src="../../../ui.slider.js"></script>
<script type="text/javascript" charset="utf-8">
/**
* Note that we have to use window.onload because $(document).ready() fires before images are loaded
* and ul.innerWidth() - container.outerWidth(); doesn't give the correct width because the width
* of the UL hasn't expanded out until the images have finished rendering.
*/
window.onload = function () {
var container = $('div.sliderGallery');
var ul = $('ul', container);
var itemsWidth = ul.innerWidth() - container.outerWidth();
$('.slider', container).slider({
min: 0,
max: itemsWidth,
handle: '.handle',
stop: function (event, ui) {
ul.animate({'left' : ui.value * -1}, 500);
},
slide: function (event, ui) {
ul.css('left', ui.value * -1);
}
});
};
</script>
</head>
<body>
<div id="container">
<h1>Slider Gallery</h1>
<p>This shows a demonstration of a slider widget from the jQuery UI library used to create the same effect used on <a href="http://www.apple.com/mac/">Apple's web site</a>.</p>
<p><a href="http://jqueryfordesigners.com/slider-gallery">Read the article, and see the screencast this demonstration relates to</a></p>
<div class="sliderGallery">
<ul>
<li><img class="pb-airportexpress" src="images/pb_airport_express.jpg" /></li>
<li><img src="images/pb_airport_extreme.jpg" /></li>
<li><img src="images/pb_timecapsule_20080115.jpg" /></li>
<li><img src="images/pb_keyboards20070807.jpg" /></li>
<li><img src="images/pb_mighty_mouse.jpg" /></li>
<li><img src="images/pb_cinema_display20071026.jpg" /></li>
<li><img src="images/pb_mac_pro_20070622.jpg" /></li>
<li><img class="pb-macmini" src="images/pb_mac_mini.jpg" /></li>
<li><img src="images/pb_macbook20071026.jpg" /></li>
<li><img class="pb-macbookair" src="images/pb_macbookair_20080115.jpg" /></li>
<li><img class="pb-macbookpro" src="images/pb_macbook_pro20071026.jpg" /></li>
<li><img class="pb-imac" src="images/pb_imac20071026.jpg" /></li>
<li><img src="images/pb_macosx_20080115.jpg" /></li>
<li><img src="images/pb_ilife_20080115.jpg" /></li>
<li><img src="images/pb_dot_mac_20080115.jpg" /></li>
<li><img src="images/pb_iwork_20080115.jpg" /></li>
<li><img src="images/pb_quicktime.jpg" /></li>
<li><img src="images/pb_aperture20080212.jpg" /></li>
<li><img src="images/pb_final_cut_studio2_20080115.jpg" /></li>
<li><img src="images/pb_final_cut_express_20080115.jpg" /></li>
<li><img src="images/pb_logic_studio_20080115.jpg" /></li>
<li><img src="images/pb_logic_express_20080115.jpg" /></li>
<li><img src="images/pb_shake_20080115.jpg" /></li>
<li><img src="images/pb_apple_remote_desktop_20080115.jpg" /></li>
<li><img src="images/pb_xserve.jpg" /></li>
<li><img src="images/pb_xserve_raid.jpg" /></li>
<li><img class="pb-xsan" src="images/pb_xsan_20080115.jpg" /></li>
<li><img class="pb-macosxserver" src="images/pb_macosx_server20071016.jpg" /></li>
</ul>
<div class="slider">
<div class="handle"></div>
<span class="slider-lbl1">Wi-Fi</span>
<span class="slider-lbl3">Macs</span>
<span class="slider-lbl4">Applications</span>
<span class="slider-lbl5">Servers</span>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,149 @@
/* --------------------------------------------------------------
jQuery UI: Demo Viewer
-------------------------------------------------------------- */
/*************************************/
/* Blueprint: reset.css */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
label {
margin-right: 5px;
}
/* Remember to define focus styles! */
:focus {
outline: 0;
}
body {
line-height: 1;
color: black;
background: white;
font-family: Arial,Sans-serif; font-size: 0.9em;
background-color: white;
overflow: hidden;
}
ol, ul {
list-style: none;
}
/* Tables still need 'cellspacing="0"' in the markup. */
table {
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
text-align: left;
font-weight: normal;
}
/* Remove possible quote marks (") from <q>, <blockquote>. */
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
/*************************************/
/* Viewer: Layout */
#wrapper {
background: #e1e7f2 url(../images/bg_gradient.gif) repeat-x;
}
#header {
padding: 10px;
background: #67A7E3; color: #fff;
position: relative;
}
#container {
height: 500px;
}
#container td {
overflow: hidden;
}
#container td div {
overflow: hidden;
padding: 0 15px 0 10px;
background: #fff;
height:475px;
font-size: 90%;
}
#container .ui-split-side-box {
width: 200px;
}
#container .ui-split-side {
overflow: hidden;
}
#container .ui-split-side ul {
margin: 0; padding: 0; padding-top: 3px;
}
#container .ui-split-side li {
margin: 0; padding: 0; border: 0; outline: 0;
list-style: none;
}
#container .ui-split-side li a {
height: 15px;
display:block;
padding: 3px 3px 3px 12px;
border-bottom: 1px solid #E8EEF7;
color: #000;
font-size: 90%;
text-decoration: none;
}
#container .ui-split-side li a:hover {
background: #E8EEF7;
border-color: #C3D9FF;
}
#container .ui-split-main-box {
}
#container .ui-resizable-e {
width: 10px; height: 475px;
background:#e1e7f2 url(../images/splitpane_handle-ew.gif) no-repeat scroll 75% 50% !important;
cursor:col-resize !important;
border-left: #bbb 1px solid;
padding: 3px;
}
#container .ui-resizable-n {
height: 10px;
background:#e1e7f2 url(../images/splitpane_handle-sn.gif) no-repeat scroll 50% 55% !important;
border-top: #bbb 1px solid;
padding: 3px;
}
.ui-toolbar-item-hide-icon {
padding-left: 16px; height: 16px;
background-image: url(../images/icons_2.png);
background-repeat: no-repeat; margin: 0 2px;
display: inline-block;
}
.ui-toolbar-item-hide-icon { background-position: -64px 50%; }
.proxy { border: 1px dashed #000; };

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

View File

@ -0,0 +1,113 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery UI: SplitPane</title>
<!-- jQuery -->
<script type="text/javascript" src="../../../../jquery/src/core.js"></script>
<script type="text/javascript" src="../../../../jquery/src/selector.js"></script>
<script type="text/javascript" src="../../../../jquery/src/event.js"></script>
<script type="text/javascript" src="../../../../jquery/src/ajax.js"></script>
<script type="text/javascript" src="../../../../jquery/src/fx.js"></script>
<script type="text/javascript" src="../../../../jquery/src/offset.js"></script>
<script type="text/javascript" src="../../../../jquery/src/dimensions.js"></script>
<!-- jQuery UI -->
<script src="../../../../ui/ui.core.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../ui/ui.draggable.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../ui/ui.droppable.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../ui/ui.resizable.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../ui/ui.sortable.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../ui/ui.selectable.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../ui/ui.tabs.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../ui/ui.dialog.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../ui/ui.slider.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../ui/ui.accordion.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../ui/datepicker/core/ui.datepicker.js" type="text/javascript" charset="utf-8"></script>
<script src="js/demo.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
@import "css/demo.css";
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<span class="ui-toolbar-item-hide-icon"></span> <span>jQuery UI Resizable SplitPanel</span>
</div>
<table id="container" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="ui-split-side-box">
<div class="ui-split-side">
<ul id="component-links">
<li><a href="#ui.accordion" title="Goto Accordion's Component Page">Accordion</a></li>
<li><a href="#ui.dialog" title="Goto Dialog's Component Page">Dialog</a></li>
<li><a href="#ui.draggable" title="Goto Draggable's Component Page">Draggable</a></li>
<li><a href="#ui.droppable" title="Goto Droppable's Component Page">Droppable</a></li>
<li><a href="#ui.resizable" title="Goto Resizable's Component Page">Resizable</a></li>
<li><a href="#ui.selectable" title="Goto Selectable's Component Page">Selectable</a></li>
<li><a href="#ui.sortable" title="Goto Sortable's Component Page">Sortable</a></li>
<li><a href="#ui.tabs" title="Goto Tabs Component Page">Tabs</a></li>
</ul>
</div>
</td>
<td class="ui-split-main-box">
<div class="ui-split-main1">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum commodo mollis tortor. Ut dapibus turpis consequat quam. Nulla lacinia. Donec nunc. Donec sollicitudin. Vivamus orci. Pellentesque tempus velit vitae odio. Maecenas enim arcu, volutpat ac, viverra id, bibendum eu, felis. Vestibulum imperdiet arcu. Ut nisi. Cras vel lectus consectetuer mauris luctus ultrices. Duis fringilla pellentesque sapien.
<br><br>
Cras tristique justo vel metus. Pellentesque dolor libero, ullamcorper ac, vehicula eget, porttitor at, dui. Ut a nibh. Nunc sit amet turpis. Aenean diam dui, consequat vel, scelerisque id, accumsan a, lectus. Duis ultrices, enim vitae pharetra tincidunt, elit nunc sollicitudin felis, dapibus pellentesque urna velit ut quam. Donec scelerisque vehicula dolor. Suspendisse lectus dui, posuere sit amet, sagittis nec, vulputate in, libero. Morbi tempus sagittis est. Phasellus in nisi. Sed a ligula. Vivamus condimentum quam non nibh. Fusce pellentesque, neque ac scelerisque luctus, leo elit bibendum elit, in rutrum leo erat tristique felis. Etiam consequat fringilla eros. Nullam neque. Aenean mollis, odio at consectetuer sollicitudin, tortor lorem facilisis nunc, sit amet condimentum lectus libero convallis dolor. Vivamus quis risus.
</div>
</td>
<td class="ui-split-main-box">
<div class="ui-split-main2">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum commodo mollis tortor. Ut dapibus turpis consequat quam. Nulla lacinia. Donec nunc. Donec sollicitudin. Vivamus orci. Pellentesque tempus velit vitae odio. Maecenas enim arcu, volutpat ac, viverra id, bibendum eu, felis. Vestibulum imperdiet arcu. Ut nisi. Cras vel lectus consectetuer mauris luctus ultrices. Duis fringilla pellentesque sapien.
<br><br>
Cras tristique justo vel metus. Pellentesque dolor libero, ullamcorper ac, vehicula eget, porttitor at, dui. Ut a nibh. Nunc sit amet turpis. Aenean diam dui, consequat vel, scelerisque id, accumsan a, lectus. Duis ultrices, enim vitae pharetra tincidunt, elit nunc sollicitudin felis, dapibus pellentesque urna velit ut quam. Donec scelerisque vehicula dolor. Suspendisse lectus dui, posuere sit amet, sagittis nec, vulputate in, libero. Morbi tempus sagittis est. Phasellus in nisi. Sed a ligula. Vivamus condimentum quam non nibh. Fusce pellentesque, neque ac scelerisque luctus, leo elit bibendum elit, in rutrum leo erat tristique felis. Etiam consequat fringilla eros. Nullam neque. Aenean mollis, odio at consectetuer sollicitudin, tortor lorem facilisis nunc, sit amet condimentum lectus libero convallis dolor. Vivamus quis risus.
</div>
</td>
<td class="ui-split-main-box">
<div class="ui-split-main3">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum commodo mollis tortor. Ut dapibus turpis consequat quam. Nulla lacinia. Donec nunc. Donec sollicitudin. Vivamus orci. Pellentesque tempus velit vitae odio. Maecenas enim arcu, volutpat ac, viverra id, bibendum eu, felis. Vestibulum imperdiet arcu. Ut nisi. Cras vel lectus consectetuer mauris luctus ultrices. Duis fringilla pellentesque sapien.
<br><br>
Cras tristique justo vel metus. Pellentesque dolor libero, ullamcorper ac, vehicula eget, porttitor at, dui. Ut a nibh. Nunc sit amet turpis. Aenean diam dui, consequat vel, scelerisque id, accumsan a, lectus. Duis ultrices, enim vitae pharetra tincidunt, elit nunc sollicitudin felis, dapibus pellentesque urna velit ut quam. Donec scelerisque vehicula dolor. Suspendisse lectus dui, posuere sit amet, sagittis nec, vulputate in, libero. Morbi tempus sagittis est. Phasellus in nisi. Sed a ligula. Vivamus condimentum quam non nibh. Fusce pellentesque, neque ac scelerisque luctus, leo elit bibendum elit, in rutrum leo erat tristique felis. Etiam consequat fringilla eros. Nullam neque. Aenean mollis, odio at consectetuer sollicitudin, tortor lorem facilisis nunc, sit amet condimentum lectus libero convallis dolor. Vivamus quis risus.
</div>
</td>
</tr>
</table>
</div>
<script type="text/javascript">
$(function() {
$('div.ui-split-main1, div.ui-split-main2').resizable({
handles: 'e',
minWidth: 200,
maxWidth: 800
});
$('div.ui-split-side').resizable({
handles: 'e',
proxy: 'proxy',
minWidth: 200,
maxWidth: 300
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,175 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>jQuery UI Accordion Test Suite</title>
<link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" />
<script type="text/javascript" src="../../../jquery/src/core.js"></script>
<script type="text/javascript" src="../../../jquery/src/selector.js"></script>
<script type="text/javascript" src="../../../jquery/src/event.js"></script>
<script type="text/javascript" src="../../../jquery/src/ajax.js"></script>
<script type="text/javascript" src="../../../jquery/src/fx.js"></script>
<script type="text/javascript" src="../../../jquery/src/offset.js"></script>
<script type="text/javascript" src="../../../jquery/src/dimensions.js"></script>
<script type="text/javascript" src="../../ui.core.js"></script>
<script type="text/javascript" src="../../ui.accordion.js"></script>
<script type="text/javascript" src="../../../qunit/testrunner.js"></script>
<script type="text/javascript" src="accordion.js"></script>
<style type="text/css">
.xerror, .error { display: none }
</style>
</head>
<body class="flora">
<h1>jQuery UI Accordion Test Suite</h1>
<h2 id="banner"></h2>
<h2 id="userAgent"></h2>
<ol id="tests"></ol>
<div id="main" style="position:absolute;top:-2000000px;">
<fieldset>
<legend>Standard, container is a div, header is h3 and content p</legend>
<div id="list1">
<a>There is one obvious advantage:</a>
<div>
<p>
You've seen it coming!<br/>
Buy now and get nothing for free!<br/>
Well, at least no free beer. Perhaps a bear, if you can afford it.
</p>
</div>
<a>Now that you've got...</a>
<div>
<p>
your bear, you have to admit it!<br/>
No, we aren't selling bears.
</p>
<p>
We could talk about renting one.
</p>
</div>
<a>Rent one bear, ...</a>
<div>
<p>
get two for three beer.
</p>
<p>
And now, for something completely different.
</p>
</div>
</div>
</fieldset>
<fieldset>
<legend>Navigation - Unordered List with anchors and nested lists.</legend>
<p>The first item is cloned to allow the user to select it. The
active element is choosen based on location.hash: Open Drums and click
the first item ('Drums'), then reload the page.</p>
<ul id="navigation">
<li>
<a class="head" href="?p=1.1.1">Guitar</a>
<ul>
<li><a href="?p=1.1.1.1">Electric</a></li>
<li><a href="?p=1.1.1.2">Acoustic</a></li>
<li><a href="?p=1.1.1.3">Amps</a></li>
<li><a href="?p=1.1.1.4">Effects</a></li>
<li><a href="?p=1.1.1.5">Accessories</a></li>
</ul>
</li>
<li>
<a class="head" href="?p=1.1.2">Bass</a>
<ul>
<li><a href="?p=1.1.2.1">Electric</a></li>
<li><a href="?p=1.1.2.2">Acoustic</a></li>
<li><a href="?p=1.1.2.3">Amps</a></li>
<li><a href="?p=1.1.2.4">Effects</a></li>
<li><a href="?p=1.1.2.5">Accessories</a></li>
<li><a href="?p=1.1.2.5">Accessories</a></li>
<li><a href="?p=1.1.2.5">Accessories</a></li>
</ul>
</li>
<li>
<a class="head" href="?p=1.1.3">Drums</a>
<ul>
<li><a href="?p=1.1.3.2">Acoustic Drums</a></li>
<li><a href="?p=1.1.3.3">Electronic Drums</a></li>
<li><a href="?p=1.1.3.6">Accessories</a></li>
</ul>
</li>
</ul>
</fieldset>
<fieldset>
<legend>With options, container is a definition list, header dt, content dd</legend>
<dl id="list2">
<dt class="red">Red</dt>
<dd>
Fancy stuff about red thingies.
</dd>
<dt class="green selected">Green</dt>
<dd>
Green! Green! Green!
</dd>
<dt class="blue">Blue</dt>
<dd>
Cool kids are blue.
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Divitus structure, div container, div header (class title), div
content, no active on startup and can be completely closed</legend>
<div id="list3">
<div>
<div class="title">Tennis</div>
<div>
One ball, two players. Lots of fun.
</div>
</div>
<div>
<div class="title">Soccer</div>
<div>
One ball, 22 players. Lots of fun.
</div>
</div>
<div>
<div class="title">Baseball</div>
<div>
Well, one ball, some guys running around, some guys hitting others with a stick.<br/>
Sounds like fun, doesn't it?
</div>
<div>
Well, apart from the running part.
</div>
</div>
</div>
</fieldset>
<div id="switch">
<select>
<option>Switch to...</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<button id="close">Close all</button>
Activate via selector, eg. ':first' or 'a:first': <input id="switch2" />
</div>
<div id="log"><div><strong>Log of the 2nd accordion</strong></div></div>
</div>
</body>
</html>

View File

@ -0,0 +1,78 @@
module("accordion");
jQuery.ui.accordion.defaults.animated = false;
function state(accordion) {
var args = $.makeArray(arguments).slice(1);
$.each(args, function(i, n) {
equals(n, accordion.find("div").eq(i).is(":visible"));
});
}
test("basics", function() {
state($('#list1').accordion(), 1, 0, 0);
});
test("autoheight", function() {
$('#navigation').accordion({ header: '.head', autoheight: false });
equals( 90, $('#navigation ul:first').height() );
equals( 126, $('#navigation ul:eq(1)').height() );
equals( 54, $('#navigation ul:last').height() );
$('#navigation').accordion("destroy").accordion({ header: '.head',autoheight: true });
equals( 126, $('#navigation ul:first').height() );
equals( 126, $('#navigation ul:eq(1)').height() );
equals( 126, $('#navigation ul:last').height() );
});
test("activate, numeric", function() {
var ac = $('#list1').accordion({ active: 1 });
state(ac, 0, 1, 0);
ac.accordion("activate", 2);
state(ac, 0, 0, 1);
ac.accordion("activate", 0);
state(ac, 1, 0, 0);
ac.accordion("activate", 1);
state(ac, 0, 1, 0);
ac.accordion("activate", 2);
state(ac, 0, 0, 1);
ac.accordion("activate", -1);
state(ac, 0, 0, 1);
});
test("activate, boolean and numeric, alwaysOpen:false", function() {
var ac = $('#list1').accordion({alwaysOpen: false}).accordion("activate", 2);
state(ac, 0, 0, 1);
ok("x", "----")
ac.accordion("activate", 0);
state(ac, 1, 0, 0);
ok("x", "----")
ac.accordion("activate", -1);
state(ac, 0, 0, 0);
});
test("activate, boolean, alwaysOpen:true", function() {
var ac = $('#list1').accordion().accordion("activate", 2);
state(ac, 0, 0, 1);
ac.accordion("activate", -1);
state(ac, 0, 0, 1);
});
test("activate, string expression", function() {
var ac = $('#list1').accordion({ active: ":last" });
state(ac, 0, 0, 1);
ac.accordion("activate", ":first");
state(ac, 1, 0, 0);
ac.accordion("activate", ":eq(1)");
state(ac, 0, 1, 0);
ac.accordion("activate", ":last");
state(ac, 0, 0, 1);
});
test("activate, jQuery or DOM element", function() {
var ac = $('#list1').accordion({ active: $("#list1 a:last") });
state(ac, 0, 0, 1);
ac.accordion("activate", $("#list1 a:first"));
state(ac, 1, 0, 0);
ac.accordion("activate", $("#list1 a")[1]);
state(ac, 0, 1, 0);
});

188
ui/tests/widgets/all.html Normal file
View File

@ -0,0 +1,188 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>jQuery UI All Tests</title>
<link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" />
<script type="text/javascript" src="../../../jquery/src/core.js"></script>
<script type="text/javascript" src="../../../jquery/src/selector.js"></script>
<script type="text/javascript" src="../../../jquery/src/event.js"></script>
<script type="text/javascript" src="../../../jquery/src/ajax.js"></script>
<script type="text/javascript" src="../../../jquery/src/fx.js"></script>
<script type="text/javascript" src="../../../jquery/src/offset.js"></script>
<script type="text/javascript" src="../../../jquery/src/dimensions.js"></script>
<script type="text/javascript" src="../../ui.core.js"></script>
<script type="text/javascript" src="../../ui.accordion.js"></script>
<script type="text/javascript" src="../../ui.slider.js"></script>
<script type="text/javascript" src="../../../qunit/testrunner.js"></script>
<script type="text/javascript" src="accordion.js"></script>
<script type="text/javascript" src="slider.js"></script>
<style type="text/css">
.xerror, .error { display: none }
</style>
</head>
<body class="flora">
<h1>jQuery UI All Tests</h1>
<h2 id="banner"></h2>
<h2 id="userAgent"></h2>
<h4>Run individual testsuites or doubleclick a test below</h4>
<ul>
<li><a href="accordion.html">Accordion</a></li>
<li><a href="slider.html">Slider</a></li>
</ul>
<ol id="tests"></ol>
<div id="main" style="position:absolute;top:-2000000px;">
<div id='slider1'></div>
<div id='slider3' style="position: relative; margin: 40px; width: 217px; height: 28px; background: url(http://developer.yahoo.com/yui/examples/slider/assets/bg-fader.gif) no-repeat scroll 5px 0px;">
<div class='ui-slider-handle' style='position: absolute; height: 21px; left: 0px; bottom: 0px; width: 17px; background-image: url(http://developer.yahoo.com/yui/examples/slider/assets/thumb-n.gif);'></div>
</div>
<fieldset>
<legend>Standard, container is a div, header is h3 and content p</legend>
<div id="list1">
<a>There is one obvious advantage:</a>
<div>
<p>
You've seen it coming!<br/>
Buy now and get nothing for free!<br/>
Well, at least no free beer. Perhaps a bear, if you can afford it.
</p>
</div>
<a>Now that you've got...</a>
<div>
<p>
your bear, you have to admit it!<br/>
No, we aren't selling bears.
</p>
<p>
We could talk about renting one.
</p>
</div>
<a>Rent one bear, ...</a>
<div>
<p>
get two for three beer.
</p>
<p>
And now, for something completely different.
</p>
</div>
</div>
</fieldset>
<fieldset>
<legend>Navigation - Unordered List with anchors and nested lists.</legend>
<p>The first item is cloned to allow the user to select it. The
active element is choosen based on location.hash: Open Drums and click
the first item ('Drums'), then reload the page.</p>
<ul id="navigation">
<li>
<a class="head" href="?p=1.1.1">Guitar</a>
<ul>
<li><a href="?p=1.1.1.1">Electric</a></li>
<li><a href="?p=1.1.1.2">Acoustic</a></li>
<li><a href="?p=1.1.1.3">Amps</a></li>
<li><a href="?p=1.1.1.4">Effects</a></li>
<li><a href="?p=1.1.1.5">Accessories</a></li>
</ul>
</li>
<li>
<a class="head" href="?p=1.1.2">Bass</a>
<ul>
<li><a href="?p=1.1.2.1">Electric</a></li>
<li><a href="?p=1.1.2.2">Acoustic</a></li>
<li><a href="?p=1.1.2.3">Amps</a></li>
<li><a href="?p=1.1.2.4">Effects</a></li>
<li><a href="?p=1.1.2.5">Accessories</a></li>
<li><a href="?p=1.1.2.5">Accessories</a></li>
<li><a href="?p=1.1.2.5">Accessories</a></li>
</ul>
</li>
<li>
<a class="head" href="?p=1.1.3">Drums</a>
<ul>
<li><a href="?p=1.1.3.2">Acoustic Drums</a></li>
<li><a href="?p=1.1.3.3">Electronic Drums</a></li>
<li><a href="?p=1.1.3.6">Accessories</a></li>
</ul>
</li>
</ul>
</fieldset>
<fieldset>
<legend>With options, container is a definition list, header dt, content dd</legend>
<dl id="list2">
<dt class="red">Red</dt>
<dd>
Fancy stuff about red thingies.
</dd>
<dt class="green selected">Green</dt>
<dd>
Green! Green! Green!
</dd>
<dt class="blue">Blue</dt>
<dd>
Cool kids are blue.
</dd>
</dl>
</fieldset>
<fieldset>
<legend>Divitus structure, div container, div header (class title), div
content, no active on startup and can be completely closed</legend>
<div id="list3">
<div>
<div class="title">Tennis</div>
<div>
One ball, two players. Lots of fun.
</div>
</div>
<div>
<div class="title">Soccer</div>
<div>
One ball, 22 players. Lots of fun.
</div>
</div>
<div>
<div class="title">Baseball</div>
<div>
Well, one ball, some guys running around, some guys hitting others with a stick.<br/>
Sounds like fun, doesn't it?
</div>
<div>
Well, apart from the running part.
</div>
</div>
</div>
</fieldset>
<div id="switch">
<select>
<option>Switch to...</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<button id="close">Close all</button>
Activate via selector, eg. ':first' or 'a:first': <input id="switch2" />
</div>
<div id="log"><div><strong>Log of the 2nd accordion</strong></div></div>
</div>
</body>
</html>

View File

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Language" content="en" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Slider Test Page</title>
<link rel="Stylesheet" media="screen" href="../../../qunit/testsuite.css" />
<script type="text/javascript" src="../../../jquery/src/core.js"></script>
<script type="text/javascript" src="../../../jquery/src/selector.js"></script>
<script type="text/javascript" src="../../../jquery/src/event.js"></script>
<script type="text/javascript" src="../../../jquery/src/ajax.js"></script>
<script type="text/javascript" src="../../../jquery/src/fx.js"></script>
<script type="text/javascript" src="../../../jquery/src/offset.js"></script>
<script type="text/javascript" src="../../../jquery/src/dimensions.js"></script>
<script type="text/javascript" src="../../ui.core.js"></script>
<script type="text/javascript" src="../../ui.slider.js"></script>
<script type="text/javascript" src="../../../qunit/testrunner.js"></script>
<script type="text/javascript" src="slider.js"></script>
</head>
<body>
<h1 id="header">jQuery Test Suite</h1>
<h2 id="banner"></h2>
<h2 id="userAgent"></h2>
<div id="main" style="position:absolute;top:-20000px">
<div id='slider1'></div>
<div id='slider3' style="position: relative; margin: 40px; width: 217px; height: 28px; background: url(http://developer.yahoo.com/yui/examples/slider/assets/bg-fader.gif) no-repeat scroll 5px 0px;">
<div class='ui-slider-handle' style='position: absolute; height: 21px; left: 0px; bottom: 0px; width: 17px; background-image: url(http://developer.yahoo.com/yui/examples/slider/assets/thumb-n.gif);'></div>
</div>
</div>
<ol id="tests"></ol>
</body>
</html>

100
ui/tests/widgets/slider.js Normal file
View File

@ -0,0 +1,100 @@
$.fn.triggerKeydown = function(keyCode) {
return this.trigger("keydown", [$.event.fix({event:"keydown", keyCode: keyCode, target: this[0]})]);
}
function assertChange(stepping, start, result, action) {
return function() {
expect(1);
var slider = $("#slider3").slider({
stepping: stepping,
startValue: start,
min: 0,
max: 1000,
change: function(e, ui) {
equals(ui.value, result, "changed to " + ui.value);
}
});
action.apply(slider);
}
}
module("slider: single handle")
test("change one step via keydown", assertChange(1, undefined, 1, function() {
this.find("a").triggerKeydown("39");
}))
test("change - 10 steps via keydown", assertChange(10, 20, 10, function() {
this.find("a").triggerKeydown("37");
}))
test("change +10 steps via keydown", assertChange(10, 20, 30, function() {
this.find("a").triggerKeydown("39");
}))
test("moveTo, absolute value", assertChange(1, 1, 10, function() {
this.slider("moveTo", 10);
}))
test("moveTo, absolute value as string", assertChange(1, 1, 10, function() {
this.slider("moveTo", "10");
}))
test("moveTo, absolute value, below min", assertChange(1, 1, 0, function() {
this.slider("moveTo", -10);
}))
test("moveTo, relative positive value", assertChange(1, 1, 11, function() {
this.slider("moveTo", "+=10");
}))
test("moveTo, relative positive value, above max", assertChange(1, 10, 1000, function() {
this.slider("moveTo", "+=2000");
}))
test("moveTo, relative negative value", assertChange(1, 20, 10, function() {
this.slider("moveTo", "-=10");
}))
test("options update min/max", function() {
expect(2);
var slider = $("#slider3").slider({
stepping: 1,
startValue: 1
});
slider.slider("moveTo", "-=10");
equals(slider.slider("value"), 0);
slider.data("min.slider", -10);
slider.slider("moveTo", "-=20");
equals(slider.slider("value"), -10);
})
module("slider: setup and teardown");
test("destroy and recreate", function() {
expect(3)
var slider = $("#slider3").slider();
slider.slider("moveTo", "+=20");
equals(slider.slider("value"), 20);
slider.slider("destroy");
slider.slider("moveTo", "+=30");
ok(true, "nothing happens after slider is destroyed");
slider.slider().slider("moveTo", "30");
equals(Math.round(slider.slider("value")), 30);
})
test("handle creation", function() {
var slider = $("#slider1");
equals(slider.children().size(), 0);
slider.slider({
handles: [
{ start: 0 },
{ start: 10 }
]
});
equals(slider.children().size(), 2);
var instance = $.data(slider[0], "slider")
equals(instance.handle.length, 2);
ok(instance.handle.jquery, "handle must be a jquery object")
})

View File

@ -0,0 +1,39 @@
.ui-accordion { margin: 0; padding: 0; list-style-type: none; }
.ui-accordion li { margin: 0; margin-bottom: 2px; padding: 0; }
.ui-accordion li .ui-accordion-header {
display: block;
padding-left: 5px;
margin-right: 3px;
height: 28px;
background-image: url(i/accordion-middle.png);
color: #000;
text-decoration: none;
line-height: 28px;
position: relative;
left: 3px;
}
.ui-accordion li .ui-accordion-right {
display: block;
background-image: url(i/accordion-right.png);
position: absolute;
top: 0px;
right: -3px;
height: 28px;
width: 3px;
}
.ui-accordion li .ui-accordion-left {
display: block;
background-image: url(i/accordion-left.png);
background-repeat: no-repeat;
position: absolute;
height: 28px;
width: 3px;
}
.ui-accordion li:hover .ui-accordion-left { background-image: url(i/accordion-left-over.png); }
.ui-accordion li:hover .ui-accordion-header { background-image: url(i/accordion-middle-over.png); }
.ui-accordion li:hover .ui-accordion-right { background-image: url(i/accordion-right-over.png); }
.ui-accordion li.selected .ui-accordion-left { background-image: url(i/accordion-left-act.png); }
.ui-accordion li.selected .ui-accordion-header { background-image: url(i/accordion-middle-act.png); }
.ui-accordion li.selected .ui-accordion-right { background-image: url(i/accordion-right-act.png); }

View File

@ -0,0 +1,7 @@
@import "flora.css";
@import "flora.accordion.css";
@import "flora.datepicker.css";
@import "flora.dialog.css";
@import "flora.resizable.css";
@import "flora.slider.css";
@import "flora.tabs.css";

View File

@ -0,0 +1,2 @@
.ui-wrapper { border: 1px solid #50A029; }
.ui-wrapper input, .ui-wrapper textarea { border: 0; }

View File

@ -0,0 +1,179 @@
/* Main Flora Style Sheet for jQuery UI Datepicker */
#datepicker_div, .datepicker_inline {
font-family: Arial,Helvetica,sans-serif;
font-size: 14px;
padding: 0;
margin: 0;
background: #DDD;
width: 185px;
}
#datepicker_div {
display: none;
border: 1px solid #FF9900;
z-index: 10;
}
.datepicker_inline {
float: left;
display: block;
border: 0;
}
.datepicker_dialog {
padding: 5px !important;
border: 4px ridge #DDD !important;
}
button.datepicker_trigger {
width: 25px;
}
img.datepicker_trigger {
margin: 2px;
vertical-align: middle;
}
.datepicker_prompt {
float: left;
padding: 2px;
background: #DDD;
color: #000;
}
*html .datepicker_prompt {
width: 185px;
}
.datepicker_control, .datepicker_links, .datepicker_header, .datepicker {
clear: both;
float: left;
width: 100%;
color: #FFF;
}
.datepicker_control {
background: #FF9900;
padding: 2px 0px;
}
.datepicker_links {
background: #E0F4D7;
padding: 2px 0px;
}
.datepicker_control, .datepicker_links {
font-weight: bold;
font-size: 80%;
letter-spacing: 1px;
}
.datepicker_links label {
padding: 2px 5px;
color: #888;
}
.datepicker_clear, .datepicker_prev {
float: left;
width: 34%;
}
.datepicker_current {
float: left;
width: 30%;
text-align: center;
}
.datepicker_close, .datepicker_next {
float: right;
width: 34%;
text-align: right;
}
.datepicker_header {
padding: 1px 0 3px;
background: #83C948;
text-align: center;
font-weight: bold;
height: 1.3em;
}
.datepicker_header select {
background: #83C948;
color: #000;
border: 0px;
font-weight: bold;
}
.datepicker {
background: #CCC;
text-align: center;
font-size: 100%;
}
.datepicker a {
display: block;
width: 100%;
}
.datepicker .datepicker_titleRow {
background: #B1DB87;
color: #000;
}
.datepicker .datepicker_daysRow {
background: #FFF;
color: #666;
}
.datepicker_weekCol {
background: #B1DB87;
color: #000;
}
.datepicker .datepicker_daysCell {
color: #000;
border: 1px solid #DDD;
}
#datepicker .datepicker_daysCell a {
display: block;
}
.datepicker .datepicker_weekEndCell {
background: #E0F4D7;
}
.datepicker .datepicker_daysCellOver {
background: #FFF;
border: 1px solid #777;
}
.datepicker .datepicker_unselectable {
color: #888;
}
.datepicker_today {
background: #B1DB87 !important;
}
.datepicker_currentDay {
background: #83C948 !important;
}
#datepicker_div a, .datepicker_inline a {
cursor: pointer;
margin: 0;
padding: 0;
background: none;
color: #000;
}
.datepicker_inline .datepicker_links a {
padding: 0 5px !important;
}
.datepicker_control a, .datepicker_links a {
padding: 2px 5px !important;
color: #000 !important;
}
.datepicker_titleRow a {
color: #000 !important;
}
.datepicker_control a:hover {
background: #FDD !important;
color: #333 !important;
}
.datepicker_links a:hover, .datepicker_titleRow a:hover {
background: #FFF !important;
color: #333 !important;
}
.datepicker_multi .datepicker {
border: 1px solid #83C948;
}
.datepicker_oneMonth {
float: left;
width: 185px;
}
.datepicker_newRow {
clear: left;
}
.datepicker_cover {
display: none;
display/**/: block;
position: absolute;
z-index: -1;
filter: mask();
top: -4px;
left: -4px;
width: 193px;
height: 200px;
}

View File

@ -0,0 +1,95 @@
/* This file skins dialog */
.flora .ui-dialog,
.flora.ui-dialog {
background-color: #e6f7d4;
}
.flora .ui-dialog .ui-dialog-titlebar,
.flora.ui-dialog .ui-dialog-titlebar {
border-bottom: 1px solid #d8d2aa;
background: #ff9900 url(i/dialog-title.gif) repeat-x;
padding: 0px;
height: 28px;
_height: 29px;
}
.flora .ui-dialog.ui-draggable .ui-dialog-titlebar,
.flora.ui-dialog.ui-draggable .ui-dialog-titlebar {
cursor: move;
}
.flora .ui-dialog .ui-dialog-titlebar-close,
.flora.ui-dialog .ui-dialog-titlebar-close {
width: 16px;
height: 16px;
background: url(i/dialog-titlebar-close.png) no-repeat;
position:absolute;
top: 6px;
right: 7px;
cursor: default;
}
.flora .ui-dialog .ui-dialog-titlebar-close span,
.flora.ui-dialog .ui-dialog-titlebar-close span {
display: none;
}
.flora .ui-dialog .ui-dialog-titlebar-close-hover,
.flora.ui-dialog .ui-dialog-titlebar-close-hover {
background: url(i/dialog-titlebar-close-hover.png) no-repeat;
}
.flora .ui-dialog .ui-dialog-title,
.flora.ui-dialog .ui-dialog-title {
margin-left: 5px;
color: white;
font-weight: bold;
position: relative;
top: 7px;
left: 4px;
}
.flora .ui-dialog .ui-dialog-content,
.flora.ui-dialog .ui-dialog-content {
margin: 1.2em;
}
.flora .ui-dialog .ui-dialog-buttonpane,
.flora.ui-dialog .ui-dialog-buttonpane {
position: absolute;
bottom: 8px;
right: 12px;
width: 100%;
text-align: right;
}
.flora .ui-dialog .ui-dialog-buttonpane button,
.flora.ui-dialog .ui-dialog-buttonpane button {
margin: 6px;
}
/* Dialog handle styles */
.flora .ui-dialog .ui-resizable-n,
.flora.ui-dialog .ui-resizable-n { cursor: n-resize; height: 6px; width: 100%; top: 0px; left: 0px; background: transparent url(i/dialog-n.gif) repeat scroll center top; }
.flora .ui-dialog .ui-resizable-s,
.flora.ui-dialog .ui-resizable-s { cursor: s-resize; height: 8px; width: 100%; bottom: 0px; left: 0px; background: transparent url(i/dialog-s.gif) repeat scroll center top; }
.flora .ui-dialog .ui-resizable-e,
.flora.ui-dialog .ui-resizable-e { cursor: e-resize; width: 7px; right: 0px; top: 0px; height: 100%; background: transparent url(i/dialog-e.gif) repeat scroll right center; }
.flora .ui-dialog .ui-resizable-w,
.flora.ui-dialog .ui-resizable-w { cursor: w-resize; width: 7px; left: 0px; top: 0px; height: 100%; background: transparent url(i/dialog-w.gif) repeat scroll right center; }
.flora .ui-dialog .ui-resizable-se,
.flora.ui-dialog .ui-resizable-se { cursor: se-resize; width: 9px; height: 9px; right: 0px; bottom: 0px; background: transparent url(i/dialog-se.gif); }
.flora .ui-dialog .ui-resizable-sw,
.flora.ui-dialog .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: 0px; bottom: 0px; background: transparent url(i/dialog-sw.gif); }
.flora .ui-dialog .ui-resizable-nw,
.flora.ui-dialog .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 29px; left: 0px; top: 0px; background: transparent url(i/dialog-nw.gif); }
.flora .ui-dialog .ui-resizable-ne,
.flora.ui-dialog .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 29px; right: 0px; top: 0px; background: transparent url(i/dialog-ne.gif); }

View File

@ -0,0 +1,20 @@
/* This file skins resizables */
.ui-resizable { position: relative; }
/* Global handle styles */
.ui-resizable-handle { position: absolute; display: none; font-size: 0.1px; }
.ui-resizable .ui-resizable-handle { display: block; }
body .ui-resizable-disabled .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
body .ui-resizable-autohide .ui-resizable-handle { display: none; } /* use 'body' to make it more specific (css order) */
.ui-resizable-n { cursor: n-resize; height: 6px; width: 100%; top: 0px; left: 0px; background: transparent url(i/resizable-n.gif) repeat scroll center top; }
.ui-resizable-s { cursor: s-resize; height: 6px; width: 100%; bottom: 0px; left: 0px; background: transparent url(i/resizable-s.gif) repeat scroll center top; }
.ui-resizable-e { cursor: e-resize; width: 6px; right: 0px; top: 0px; height: 100%; background: transparent url(i/resizable-e.gif) repeat scroll right center; }
.ui-resizable-w { cursor: w-resize; width: 6px; left: 0px; top: 0px; height: 100%; background: transparent url(i/resizable-w.gif) repeat scroll right center; }
.ui-resizable-se { cursor: se-resize; width: 9px; height: 9px; right: 0px; bottom: 0px; background: transparent url(i/resizable-se.gif); }
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: 0px; bottom: 0px; background: transparent url(i/resizable-sw.gif); }
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: 0px; top: 0px; background: transparent url(i/resizable-nw.gif); }
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: 0px; top: 0px; background: transparent url(i/resizable-ne.gif); }

View File

@ -0,0 +1,11 @@
/* This file skins sliders */
.ui-slider { width: 200px; height: 23px; position: relative; background-repeat: no-repeat; background-position: center center; }
.ui-slider-handle { position: absolute; z-index: 1; height: 23px; width: 12px; top: 0px; left: 0px; background-image: url(i/slider-handle.gif); }
.ui-slider-handle-active { border: 1px dotted black; }
.ui-slider-disabled .ui-slider-handle { opacity: 0.5; filter: alpha(opacity=50); }
.ui-slider-range { position: absolute; background: #50A029; opacity: 0.3; filter: alpha(opacity=30); width: 100%; height: 100%; }
/* Default slider backgrounds */
.ui-slider, .ui-slider-1 { background-image: url(i/slider-bg-1.png); }
.ui-slider-2 { background-image: url(i/slider-bg-2.png); }

View File

@ -0,0 +1,105 @@
@import "flora.css";
/* Caution! Ensure accessibility in print and other media types... */
@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */
.ui-tabs-hide {
display: none;
}
}
/* Hide useless elements in print layouts... */
@media print {
.ui-tabs-nav {
display: none;
}
}
/* Skin */
.ui-tabs-nav, .ui-tabs-panel {
font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif;
font-size: 12px;
}
.ui-tabs-nav {
list-style: none;
margin: 0;
padding: 0 0 0 3px;
}
.ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */
display: block;
clear: both;
content: " ";
}
.ui-tabs-nav li {
float: left;
margin: 0 0 0 2px;
font-weight: bold;
}
.ui-tabs-nav a, .ui-tabs-nav a span {
float: left; /* fixes dir=ltr problem and other quirks IE */
padding: 0 12px;
background: url(i/tabs.png) no-repeat;
}
.ui-tabs-nav a {
margin: 5px 0 0; /* position: relative makes opacity fail for disabled tab in IE */
padding-left: 0;
background-position: 100% 0;
text-decoration: none;
white-space: nowrap; /* @ IE 6 */
outline: 0; /* @ Firefox, prevent dotted border after click */
}
.ui-tabs-nav a:link, .ui-tabs-nav a:visited {
color: #fff;
}
.ui-tabs-nav .ui-tabs-selected a {
position: relative;
top: 1px;
z-index: 2;
margin-top: 0;
background-position: 100% -23px;
}
.ui-tabs-nav a span {
padding-top: 1px;
padding-right: 0;
height: 20px;
background-position: 0 0;
line-height: 20px;
}
.ui-tabs-nav .ui-tabs-selected a span {
padding-top: 0;
height: 27px;
background-position: 0 -23px;
line-height: 27px;
}
.ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited,
.ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */
cursor: text;
}
.ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active,
.ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { /* @ Opera, we need to be explicit again here now... */
cursor: pointer;
}
.ui-tabs-disabled {
opacity: .4;
filter: alpha(opacity=40);
}
.ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited {
color: #000;
}
.ui-tabs-panel {
border: 1px solid #519e2d;
padding: 10px;
background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */
}
/*.ui-tabs-loading em {
padding: 0 0 0 20px;
background: url(loading.gif) no-repeat 0 50%;
}*/
/* Additional IE specific bug fixes... */
* html .ui-tabs-nav { /* auto clear @ IE 6 & IE 7 Quirks Mode */
display: inline-block;
}
*:first-child+html .ui-tabs-nav { /* auto clear @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */
display: inline-block;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Some files were not shown because too many files have changed in this diff Show More