jquery-ui/demos/index.html

265 lines
11 KiB
HTML
Raw Normal View History

2008-12-30 04:16:51 +00:00
<?php if(!isset($plain)) { ?>
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
2008-12-30 04:16:51 +00:00
<title>jQuery UI Demos</title>
<link type="text/css" href="../themes/base/ui.all.css" rel="stylesheet" />
2009-01-10 12:49:21 +00:00
<link type="text/css" href="ui.theme.css" rel="stylesheet" />
2008-12-30 04:16:51 +00:00
<link type="text/css" href="demos.css" rel="stylesheet" />
<script type="text/javascript" src="../jquery-1.3.js"></script>
2008-12-30 04:16:51 +00:00
<script type="text/javascript" src="../ui/ui.core.js"></script>
<script type="text/javascript" src="../ui/ui.accordion.js"></script>
<script type="text/javascript" src="../ui/ui.datepicker.js"></script>
<script type="text/javascript" src="../ui/ui.dialog.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.progressbar.js"></script>
<script type="text/javascript" src="../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../ui/ui.selectable.js"></script>
<script type="text/javascript" src="../ui/ui.slider.js"></script>
<script type="text/javascript" src="../ui/ui.sortable.js"></script>
<script type="text/javascript" src="../ui/ui.tabs.js"></script>
<script type="text/javascript" src="../ui/effects.core.js"></script>
<script type="text/javascript" src="../ui/effects.blind.js"></script>
<script type="text/javascript" src="../ui/effects.bounce.js"></script>
<script type="text/javascript" src="../ui/effects.clip.js"></script>
<script type="text/javascript" src="../ui/effects.drop.js"></script>
<script type="text/javascript" src="../ui/effects.explode.js"></script>
<script type="text/javascript" src="../ui/effects.fold.js"></script>
<script type="text/javascript" src="../ui/effects.highlight.js"></script>
<script type="text/javascript" src="../ui/effects.pulsate.js"></script>
<script type="text/javascript" src="../ui/effects.scale.js"></script>
<script type="text/javascript" src="../ui/effects.shake.js"></script>
<script type="text/javascript" src="../ui/effects.slide.js"></script>
<script type="text/javascript" src="../ui/effects.transfer.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-ar.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-bg.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-ca.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-cs.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-da.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-de.js"></script>
2009-01-18 05:09:33 +00:00
<script type="text/javascript" src="../ui/i18n/ui.datepicker-el.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-eo.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-es.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-fa.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-fi.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-fr.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-he.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-hr.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-hu.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-hy.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-id.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-is.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-it.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-ja.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-ko.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-lt.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-lv.js"></script>
2009-01-18 05:09:33 +00:00
<script type="text/javascript" src="../ui/i18n/ui.datepicker-ms.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-nl.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-no.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-pl.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-pt-BR.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-ro.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-ru.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-sk.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-sl.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-sq.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-sv.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-th.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-tr.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-uk.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="../ui/i18n/ui.datepicker-zh-TW.js"></script>
<script type="text/javascript">
jQuery(function($) {
$('.left-nav a').click(function(ev) {
window.location.hash = this.href.replace(/.+\/([^\/]+)\/index\.html/,'$1') + '|default';
loadPage(this.href);
$('.left-nav a.selected').removeClass('selected');
$(this).addClass('selected');
ev.preventDefault();
});
if (window.location.hash) {
if (window.location.hash.indexOf('|') === -1) {
window.location.hash += '|default';
}
var path = window.location.href.replace(/(index\.html)?#/,'');
path = path.replace('\|','/') + '.html';
loadPage(path);
}
function loadPage(path) {
var section = path.replace(/\/[^\/]+\.html/,'');
2009-01-18 05:09:33 +00:00
var header = section.replace(/.+\/([^\/]+)/,'$1').replace(/_/, ' ');
$('td.normal div.normal')
.empty()
.append('<h4 class="demo-subheader">Functional demo:</h4>')
.append('<h3 class="demo-header">'+ header +'</h3>')
.append('<div id="demo-config"></div>')
.find('#demo-config')
.append('<div id="demo-frame"></div><div id="demo-config-menu"></div><div id="demo-link"><a class="demoWindowLink" href="#"><span class="ui-icon ui-icon-newwin"></span>Open demo in a new window</a></div>')
.find('#demo-config-menu')
.load(section + '/index.html .demos-nav', function() {
$('#demo-config-menu a').each(function() {
this.setAttribute('href', section + '/' + this.getAttribute('href').replace(/.+\/([^\/]+)/,'$1'));
$(this).attr('target', 'demo-frame');
$(this).click(function() {
resetDemos();
$(this).parents('ul').find('li').removeClass('demo-config-on');
$(this).parent().addClass('demo-config-on');
$('#demo-notes').fadeOut();
//Set the hash to the actual page without ".html"
window.location.hash = header + '|' + this.getAttribute('href').match((/\/([^\/\\]+)\.html/))[1];
loadDemo(this.getAttribute('href'));
return false;
});
});
if (window.location.hash) {
var demo = window.location.hash.split('|')[1];
$('#demo-config-menu a').each(function(){
if (this.href.indexOf(demo + '.html') !== -1) {
$(this).parents('ul').find('li').removeClass('demo-config-on');
$(this).parent().addClass('demo-config-on');
loadDemo(this.href);
}
});
}
updateDemoNotes();
})
.end()
.find('#demo-link a')
.bind('click', function(ev){
window.open(this.href);
ev.preventDefault();
})
.end()
.end()
;
resetDemos();
}
function loadDemo(path) {
var directory = path.match(/([^\/]+)\/[^\/\.]+\.html$/)[1];
$.get(path, function(data) {
data = data.replace(/<script.*>.*<\/script>/ig,""); // Remove script tags
data = data.replace(/<\/?link.*>/ig,""); //Remove link tags
data = data.replace(/<\/?html.*>/ig,""); //Remove html tag
data = data.replace(/<\/?body.*>/ig,""); //Remove body tag
data = data.replace(/<\/?head.*>/ig,""); //Remove head tag
data = data.replace(/<\/?!doctype.*>/ig,""); //Remove doctype
data = data.replace(/<title.*>.*<\/title>/ig,""); // Remove title tags
data = data.replace(/((href|src)=["'])(?!(http|#))/ig, "$1" + directory + "/");
$('#demo-frame').empty().html(data);
$('#demo-link a').attr('href', path);
updateDemoNotes();
});
if (/default.html$/.test(path)) {
$.get("documentation/docs-" + path.match(/demos\/(.+)\//)[1] + ".html", function(html) {
$("#demo-notes").after(html);
$("#widget-docs").tabs();
$(".param-header").click(function() {
$(this).parent().toggleClass("param-open").end().next().toggle();
});
$(".docs-list-header").each(function() {
var header = $(this);
var details = header.next().find(".param-details").hide();
$("a:first", header).click(function() {
details.show().parent().addClass("param-open");
return false;
});
$("a:last", header).click(function() {
details.hide().parent().removeClass("param-open");
return false;
});
});
});
}
}
function updateDemoNotes() {
var notes = $('#demo-frame .demo-description');
if ($('#demo-notes').length == 0) {
$('<div id="demo-notes"></div>').insertAfter('#demo-config');
}
$('#demo-notes').hide().empty().html(notes.html());
$('#demo-notes').fadeIn();
notes.hide();
}
function resetDemos() {
$.datepicker.setDefaults($.extend({showMonthAfterYear: false}, $.datepicker.regional['']));
$(".ui-dialog-content").remove();
}
});
</script>
2008-12-30 04:16:51 +00:00
</head>
<body>
<?php } ?>
<table class="layout-grid" cellspacing="0" cellpadding="0">
<tr>
<td class="left-nav">
<dl class="demos-nav">
<dt>Interactions</dt>
<dd><a href="draggable/index.html">Draggable</a></dd>
<dd><a href="droppable/index.html">Droppable</a></dd>
<dd><a href="resizable/index.html">Resizable</a></dd>
<dd><a href="selectable/index.html">Selectable</a></dd>
<dd><a href="sortable/index.html">Sortable</a></dd>
2008-12-30 04:16:51 +00:00
<dt>Widgets</dt>
<dd><a href="accordion/index.html">Accordion</a></dd>
<dd><a href="datepicker/index.html">Datepicker</a></dd>
<dd><a href="dialog/index.html">Dialog</a></dd>
<dd><a href="progressbar/index.html">Progressbar</a></dd>
<dd><a href="slider/index.html">Slider</a></dd>
<dd><a href="tabs/index.html">Tabs</a></dd>
<dt>Effects</dt>
<dd><a href="effects_movement/index.html">Movement</a></dd>
<dd><a href="effects_feedback/index.html">Feedback</a></dd>
<dd><a href="effects_showhide/index.html">Show/Hide</a></dd>
2009-01-18 05:09:33 +00:00
<dd><a href="effects_easings/index.html">Easings</a></dd>
2008-12-30 04:16:51 +00:00
</dl>
</td>
<td class="normal">
2008-12-30 04:16:51 +00:00
<div class="normal">
<?php if(isset($plain) && $content) { echo $content; } else { ?>
<h3>Instructions</h3>
<p>
These demos showcase some common uses of each jQuery UI plugin. Simply copy and paste code from the demos to get started. Have fun playing with them.
</p>
2009-01-08 05:44:34 +00:00
<!-- change the class to class="source-open" when code is visible
2009-01-08 05:44:34 +00:00
<div id="demo-source">
<a href="#" class="source-closed">View source</a>
2009-01-08 05:44:34 +00:00
</div>
-->
2009-01-08 05:44:34 +00:00
<?php } ?>
2008-12-30 04:16:51 +00:00
</div>
2008-12-30 04:16:51 +00:00
</td>
</tr>
</table>
<?php if(!isset($plain)) { ?>
</body>
</html>
<?php } ?>