Player logics fix, move and remove tracks from playlist. Close #47
|
@ -13,6 +13,7 @@
|
|||
<script type="text/javascript" charset="utf-8" src="/javascripts/jquery/jquery.scroll.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="/javascripts/jquery/jquery.autocomplete.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="/javascripts/jquery/jquery.contentchange.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="/javascripts/jquery/jquery-ui/js/jquery-ui-1.8.13.custom.min.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="/javascripts/beathaven/layout.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="/javascripts/beathaven/vkontakte.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="/javascripts/beathaven/session.js"></script>
|
||||
|
|
|
@ -23,7 +23,7 @@ var Audio = {
|
|||
|
||||
addTrack: function(id, url) {
|
||||
if ($('#a'+ id).length == 0) {
|
||||
$('#audiobox').append('<audio id="a'+ id +'" src="'+ url +'"></audio>')
|
||||
$('#audiobox').html('<audio id="a'+ id +'" src="'+ url +'"></audio>')
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -67,6 +67,7 @@ var Audio = {
|
|||
},
|
||||
|
||||
startListener: function() {
|
||||
Audio.killListener();
|
||||
Audio.tid = window.setTimeout(Audio.startListener, 100);
|
||||
Player.updateUI(
|
||||
Audio.getLoadedPercent(),
|
||||
|
@ -75,7 +76,9 @@ var Audio = {
|
|||
},
|
||||
|
||||
killListener: function() {
|
||||
window.clearTimeout(this.tid);
|
||||
try {
|
||||
window.clearTimeout(Audio.tid);
|
||||
} catch(e) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,29 +13,28 @@ var Player = {
|
|||
<div class="fade"></div>\
|
||||
<span class="title">'+ artist +' — '+ track +'</span>\
|
||||
<span class="duration">'+ length +'</span>\
|
||||
<div class="remove">remove</div>\
|
||||
</div>\
|
||||
</li>\
|
||||
');
|
||||
|
||||
$('#playlist').html($('.playlist-tracks')).scrollbar();
|
||||
$('.playlist-tracks').sortable();
|
||||
},
|
||||
|
||||
setTrack: function(obj) {
|
||||
if (typeof obj == 'string') {
|
||||
var id = obj;
|
||||
obj = $('#i'+ obj);
|
||||
} else {
|
||||
var id = $(obj).attr('id').split('i')[1];
|
||||
}
|
||||
var query = $(obj).find('.title').text();
|
||||
var length = $(obj).find('.duration').text();
|
||||
setTrack: function(id) {
|
||||
var $obj = $('#i'+ id);
|
||||
var query = $obj.find('.title').text();
|
||||
var length = $obj.find('.duration').text();
|
||||
var tmp = query.split(' — ');
|
||||
|
||||
$('#player .now-playing').html(query);
|
||||
$('.playlist-tracks li').removeClass('now');
|
||||
$('#i'+ id).addClass('now');
|
||||
$obj.addClass('now');
|
||||
Audio.startListener();
|
||||
$('#player .loaded, #player .played').width(0);
|
||||
|
||||
loadTracksData(tmp[0], tmp[1], length, this.playSource);
|
||||
loadTracksData(tmp[0], tmp[1], length, Player.playSource);
|
||||
},
|
||||
|
||||
playSource: function(url) {
|
||||
|
@ -75,6 +74,13 @@ var Player = {
|
|||
Audio.killListener();
|
||||
Player.setTrack(Player.nextTrack());
|
||||
}
|
||||
},
|
||||
|
||||
reset: function() {
|
||||
Audio.pause();
|
||||
Audio.killListener();
|
||||
$('#player .loaded, #player .played').width(0);
|
||||
$('#player .now-playing').text('Select track');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,8 +115,26 @@ $('.tracklist li').live('mouseover mouseout', function(e){
|
|||
}
|
||||
});
|
||||
|
||||
$('.playlist-tracks li .fade, .playlist-tracks li .duration, .playlist-tracks li .remove').live('mouseover mouseout', function(e){
|
||||
if (e.type == 'mouseover') {
|
||||
$(this).parent().find('.duration').hide();
|
||||
$(this).parent().find('.remove').show();
|
||||
} else {
|
||||
$(this).parent().find('.remove').hide();
|
||||
$(this).parent().find('.duration').show();
|
||||
}
|
||||
});
|
||||
|
||||
$('.playlist-tracks li .remove').live('click', function(){
|
||||
var $li = $(this).parent().parent();
|
||||
if ($li.hasClass('now')) {
|
||||
Player.reset();
|
||||
}
|
||||
$li.remove();
|
||||
});
|
||||
|
||||
$('.playlist-tracks li').live('dblclick', function(){
|
||||
Player.setTrack(this);
|
||||
Player.setTrack($(this).attr('id').split('i')[1]);
|
||||
});
|
||||
|
||||
$('#player .progress').live('click', function(e){
|
||||
|
|
After Width: | Height: | Size: 260 B |
After Width: | Height: | Size: 251 B |
After Width: | Height: | Size: 178 B |
After Width: | Height: | Size: 104 B |
After Width: | Height: | Size: 125 B |
After Width: | Height: | Size: 105 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 90 B |
After Width: | Height: | Size: 129 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
578
public/javascripts/jquery/jquery-ui/css/ui-lightness/jquery-ui-1.8.13.custom.css
vendored
Executable file
|
@ -0,0 +1,578 @@
|
|||
/*
|
||||
* jQuery UI CSS Framework 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||
.ui-helper-clearfix { display: inline-block; }
|
||||
/* required comment for clearfix to work in Opera \*/
|
||||
* html .ui-helper-clearfix { height:1%; }
|
||||
.ui-helper-clearfix { display:block; }
|
||||
/* end clearfix */
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI CSS Framework 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Theming/API
|
||||
*
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
|
||||
*/
|
||||
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; }
|
||||
.ui-widget-content a { color: #333333; }
|
||||
.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
|
||||
.ui-widget-header a { color: #ffffff; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
|
||||
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
|
||||
.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
|
||||
.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
|
||||
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-off { background-position: -96px -144px; }
|
||||
.ui-icon-radio-on { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
|
||||
.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
|
||||
.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
|
||||
.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
|
||||
.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
|
||||
.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*
|
||||
* jQuery UI Resizable 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Resizable#theming
|
||||
*/
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;
|
||||
/* http://bugs.jqueryui.com/ticket/7233
|
||||
- Resizable: resizable handles fail to work in IE if transparent and content overlaps
|
||||
*/
|
||||
background-image:url(data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=);
|
||||
}
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
|
||||
* jQuery UI Selectable 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Selectable#theming
|
||||
*/
|
||||
.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
|
||||
/*
|
||||
* jQuery UI Accordion 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Accordion#theming
|
||||
*/
|
||||
/* IE/Win - Fix animation bug - #4615 */
|
||||
.ui-accordion { width: 100%; }
|
||||
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
||||
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
||||
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
||||
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }
|
||||
/*
|
||||
* jQuery UI Autocomplete 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Autocomplete#theming
|
||||
*/
|
||||
.ui-autocomplete { position: absolute; cursor: default; }
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
/*
|
||||
* jQuery UI Menu 1.8.13
|
||||
*
|
||||
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Menu#theming
|
||||
*/
|
||||
.ui-menu {
|
||||
list-style:none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display:block;
|
||||
float: left;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
padding:.2em .4em;
|
||||
line-height:1.5;
|
||||
zoom:1;
|
||||
}
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
margin: -1px;
|
||||
}
|
||||
/*
|
||||
* jQuery UI Button 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Button#theming
|
||||
*/
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
||||
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { padding: .4em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-buttonset { margin-right: 7px; }
|
||||
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
/*
|
||||
* jQuery UI Dialog 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Dialog#theming
|
||||
*/
|
||||
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
/*
|
||||
* jQuery UI Slider 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Slider#theming
|
||||
*/
|
||||
.ui-slider { position: relative; text-align: left; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.ui-slider-horizontal { height: .8em; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
|
||||
* jQuery UI Tabs 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Tabs#theming
|
||||
*/
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs .ui-tabs-hide { display: none !important; }
|
||||
/*
|
||||
* jQuery UI Datepicker 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Datepicker#theming
|
||||
*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}/*
|
||||
* jQuery UI Progressbar 1.8.13
|
||||
*
|
||||
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://docs.jquery.com/UI/Progressbar#theming
|
||||
*/
|
||||
.ui-progressbar { height:2em; text-align: left; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
|
@ -0,0 +1,30 @@
|
|||
jQuery UI Authors (http://jqueryui.com/about)
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
and logs, available at http://github.com/jquery/jquery-ui
|
||||
|
||||
Brandon Aaron
|
||||
Paul Bakaus (paulbakaus.com)
|
||||
David Bolter
|
||||
Rich Caloggero
|
||||
Chi Cheng (cloudream@gmail.com)
|
||||
Colin Clark (http://colin.atrc.utoronto.ca/)
|
||||
Michelle D'Souza
|
||||
Aaron Eisenberger (aaronchi@gmail.com)
|
||||
Ariel Flesler
|
||||
Bohdan Ganicky
|
||||
Scott González
|
||||
Marc Grabanski (m@marcgrabanski.com)
|
||||
Klaus Hartl (stilbuero.de)
|
||||
Scott Jehl
|
||||
Cody Lindley
|
||||
Eduardo Lundgren (eduardolundgren@gmail.com)
|
||||
Todd Parker
|
||||
John Resig
|
||||
Patty Toland
|
||||
Ca-Phun Ung (yelotofu.com)
|
||||
Keith Wood (kbwood@virginbroadband.com.au)
|
||||
Maggie Costello Wachs
|
||||
Richard D. Worth (rdworth.org)
|
||||
Jörn Zaefferer (bassistance.de)
|
|
@ -0,0 +1,278 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
|
@ -0,0 +1,25 @@
|
|||
Copyright (c) 2011 Paul Bakaus, http://jqueryui.com/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals (AUTHORS.txt, http://jqueryui.com/about) For exact
|
||||
contribution history, see the revision history and logs, available
|
||||
at http://jquery-ui.googlecode.com/svn/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Accordion - Collapse content</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.accordion.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#accordion" ).accordion({
|
||||
collapsible: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="accordion">
|
||||
<h3><a href="#">Section 1</a></h3>
|
||||
<div>
|
||||
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
|
||||
</div>
|
||||
<h3><a href="#">Section 2</a></h3>
|
||||
<div>
|
||||
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
|
||||
</div>
|
||||
<h3><a href="#">Section 3</a></h3>
|
||||
<div>
|
||||
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
|
||||
<ul>
|
||||
<li>List item one</li>
|
||||
<li>List item two</li>
|
||||
<li>List item three</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3><a href="#">Section 4</a></h3>
|
||||
<div>
|
||||
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>By default, accordions always keep one section open. To allow for all sections to be be collapsible, set the <code>collapsible</code> option to true. Click on the currently open section to collapse its content pane.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Accordion - Customize icons</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.accordion.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
var icons = {
|
||||
header: "ui-icon-circle-arrow-e",
|
||||
headerSelected: "ui-icon-circle-arrow-s"
|
||||
};
|
||||
$( "#accordion" ).accordion({
|
||||
icons: icons
|
||||
});
|
||||
$( "#toggle" ).button().toggle(function() {
|
||||
$( "#accordion" ).accordion( "option", "icons", false );
|
||||
}, function() {
|
||||
$( "#accordion" ).accordion( "option", "icons", icons );
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="accordion">
|
||||
<h3><a href="#">Section 1</a></h3>
|
||||
<div>
|
||||
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
|
||||
</div>
|
||||
<h3><a href="#">Section 2</a></h3>
|
||||
<div>
|
||||
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
|
||||
</div>
|
||||
<h3><a href="#">Section 3</a></h3>
|
||||
<div>
|
||||
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
|
||||
<ul>
|
||||
<li>List item one</li>
|
||||
<li>List item two</li>
|
||||
<li>List item three</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3><a href="#">Section 4</a></h3>
|
||||
<div>
|
||||
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="toggle">Toggle icons</button>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Customize the header icons with the <code>icons</code> option, which accepts classes for the header's default and selected (open) state. Use any class from the UI CSS framework, or create custom classes with background images.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,85 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Accordion - Default functionality</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.accordion.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#accordion" ).accordion();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="accordion">
|
||||
<h3><a href="#">Section 1</a></h3>
|
||||
<div>
|
||||
<p>
|
||||
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
|
||||
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
|
||||
amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
|
||||
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
|
||||
</p>
|
||||
</div>
|
||||
<h3><a href="#">Section 2</a></h3>
|
||||
<div>
|
||||
<p>
|
||||
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
|
||||
purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
|
||||
velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
|
||||
suscipit faucibus urna.
|
||||
</p>
|
||||
</div>
|
||||
<h3><a href="#">Section 3</a></h3>
|
||||
<div>
|
||||
<p>
|
||||
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
|
||||
Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
|
||||
ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
|
||||
lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
|
||||
</p>
|
||||
<ul>
|
||||
<li>List item one</li>
|
||||
<li>List item two</li>
|
||||
<li>List item three</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3><a href="#">Section 4</a></h3>
|
||||
<div>
|
||||
<p>
|
||||
Cras dictum. Pellentesque habitant morbi tristique senectus et netus
|
||||
et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
|
||||
faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
|
||||
mauris vel est.
|
||||
</p>
|
||||
<p>
|
||||
Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
|
||||
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
|
||||
inceptos himenaeos.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
<div class="demo-description">
|
||||
<p>
|
||||
Click headers to expand/collapse content that is broken into logical sections, much like tabs.
|
||||
Optionally, toggle sections open/closed on mouseover.
|
||||
</p>
|
||||
<p>
|
||||
The underlying HTML markup is a series of headers (H3 tags) and content divs so the content is
|
||||
usable without JavaScript.
|
||||
</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,76 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Accordion - Fill space</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.resizable.js"></script>
|
||||
<script src="../../ui/jquery.ui.accordion.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#accordion" ).accordion({
|
||||
fillSpace: true
|
||||
});
|
||||
});
|
||||
$(function() {
|
||||
$( "#accordionResizer" ).resizable({
|
||||
minHeight: 140,
|
||||
resize: function() {
|
||||
$( "#accordion" ).accordion( "resize" );
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<h3 class="docs">Resize the outer container:</h3>
|
||||
|
||||
<div id="accordionResizer" style="padding:10px; width:350px; height:220px;" class="ui-widget-content">
|
||||
|
||||
<div id="accordion">
|
||||
<h3><a href="#">Section 1</a></h3>
|
||||
<div>
|
||||
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
|
||||
</div>
|
||||
<h3><a href="#">Section 2</a></h3>
|
||||
<div>
|
||||
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
|
||||
</div>
|
||||
<h3><a href="#">Section 3</a></h3>
|
||||
<div>
|
||||
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
|
||||
<ul>
|
||||
<li>List item one</li>
|
||||
<li>List item two</li>
|
||||
<li>List item three</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3><a href="#">Section 4</a></h3>
|
||||
<div>
|
||||
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<span class="ui-icon ui-icon-grip-dotted-horizontal" style="margin:2px auto;"></span>
|
||||
</div><!-- End accordionResizer -->
|
||||
|
||||
<div style="margin-top:7px; padding:10px; width:350px; height:50px;" class="ui-widget-content">I'm another panel</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Because the accordion is comprised of block-level elements, by default its width fills the available horizontal space. To fill the vertical space allocated by its container, set the boolean <code>fillSpace</code> option to true, and the script will automatically set the dimensions of the accordion to the height of its parent container. The accordion will also resize with its container if the container is <code>resizable</code>.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,134 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Accordion - Open on hoverintent</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.accordion.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$("#accordion").accordion({
|
||||
event: "click hoverintent"
|
||||
});
|
||||
});
|
||||
|
||||
var cfg = ($.hoverintent = {
|
||||
sensitivity: 7,
|
||||
interval: 100
|
||||
});
|
||||
|
||||
$.event.special.hoverintent = {
|
||||
setup: function() {
|
||||
$( this ).bind( "mouseover", jQuery.event.special.hoverintent.handler );
|
||||
},
|
||||
teardown: function() {
|
||||
$( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
|
||||
},
|
||||
handler: function( event ) {
|
||||
event.type = "hoverintent";
|
||||
var self = this,
|
||||
args = arguments,
|
||||
target = $( event.target ),
|
||||
cX, cY, pX, pY;
|
||||
|
||||
function track( event ) {
|
||||
cX = event.pageX;
|
||||
cY = event.pageY;
|
||||
};
|
||||
pX = event.pageX;
|
||||
pY = event.pageY;
|
||||
function clear() {
|
||||
target
|
||||
.unbind( "mousemove", track )
|
||||
.unbind( "mouseout", arguments.callee );
|
||||
clearTimeout( timeout );
|
||||
}
|
||||
function handler() {
|
||||
if ( ( Math.abs( pX - cX ) + Math.abs( pY - cY ) ) < cfg.sensitivity ) {
|
||||
clear();
|
||||
jQuery.event.handle.apply( self, args );
|
||||
} else {
|
||||
pX = cX;
|
||||
pY = cY;
|
||||
timeout = setTimeout( handler, cfg.interval );
|
||||
}
|
||||
}
|
||||
var timeout = setTimeout( handler, cfg.interval );
|
||||
target.mousemove( track ).mouseout( clear );
|
||||
return true;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="accordion">
|
||||
<h3><a href="#">Section 1</a></h3>
|
||||
<div>
|
||||
<p>
|
||||
Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer
|
||||
ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit
|
||||
amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut
|
||||
odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.
|
||||
</p>
|
||||
</div>
|
||||
<h3><a href="#">Section 2</a></h3>
|
||||
<div>
|
||||
<p>
|
||||
Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet
|
||||
purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor
|
||||
velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In
|
||||
suscipit faucibus urna.
|
||||
</p>
|
||||
</div>
|
||||
<h3><a href="#">Section 3</a></h3>
|
||||
<div>
|
||||
<p>
|
||||
Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis.
|
||||
Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero
|
||||
ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis
|
||||
lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.
|
||||
</p>
|
||||
<ul>
|
||||
<li>List item one</li>
|
||||
<li>List item two</li>
|
||||
<li>List item three</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3><a href="#">Section 4</a></h3>
|
||||
<div>
|
||||
<p>
|
||||
Cras dictum. Pellentesque habitant morbi tristique senectus et netus
|
||||
et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in
|
||||
faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia
|
||||
mauris vel est.
|
||||
</p>
|
||||
<p>
|
||||
Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus.
|
||||
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
|
||||
inceptos himenaeos.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
<div class="demo-description">
|
||||
<p>
|
||||
Click headers to expand/collapse content that is broken into logical sections, much like tabs.
|
||||
Optionally, toggle sections open/closed on mouseover.
|
||||
</p>
|
||||
<p>
|
||||
The underlying HTML markup is a series of headers (H3 tags) and content divs so the content is
|
||||
usable without JavaScript.
|
||||
</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Accordion Demos</title>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demos-nav">
|
||||
<h4>Examples</h4>
|
||||
<ul>
|
||||
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
|
||||
<li><a href="fillspace.html">Fill space</a></li>
|
||||
<li><a href="no-auto-height.html">No auto height</a></li>
|
||||
<li><a href="collapsible.html">Collapse content</a></li>
|
||||
<li><a href="mouseover.html">Open on mouseover</a></li>
|
||||
<li><a href="hoverintent.html">Open on hoverintent</a></li>
|
||||
<li><a href="custom-icons.html">Customize icons</a></li>
|
||||
<li><a href="sortable.html">Sortable</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Accordion - Open on mouseover</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.accordion.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#accordion" ).accordion({
|
||||
event: "mouseover"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="accordion">
|
||||
<h3><a href="#">Section 1</a></h3>
|
||||
<div>
|
||||
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
|
||||
</div>
|
||||
<h3><a href="#">Section 2</a></h3>
|
||||
<div>
|
||||
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
|
||||
</div>
|
||||
<h3><a href="#">Section 3</a></h3>
|
||||
<div>
|
||||
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
|
||||
<ul>
|
||||
<li>List item one</li>
|
||||
<li>List item two</li>
|
||||
<li>List item three</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h3><a href="#">Section 4</a></h3>
|
||||
<div>
|
||||
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Toggle sections open/closed on mouseover with the <code>event</code> option. The default value for event is "click."</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Accordion - No auto height</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.accordion.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#accordion" ).accordion({
|
||||
autoHeight: false,
|
||||
navigation: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="accordion">
|
||||
<h3><a href="#section1">Section 1</a></h3>
|
||||
<div>
|
||||
<p>Mauris mauris ante, blandit et, ultrices a, susceros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
|
||||
</div>
|
||||
<h3><a href="#section2">Section 2</a></h3>
|
||||
<div>
|
||||
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
|
||||
</div>
|
||||
<h3><a href="#section3">Section 3</a></h3>
|
||||
<div>
|
||||
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
|
||||
<ul>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
<li>List item</li>
|
||||
</ul>
|
||||
<a href="#othercontent">Link to other content</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Setting <code>autoHeight: false</code> allows to accordion panels to keep their native height.</p>
|
||||
<p>In addition, the <code>navigation</code> option is enabled, opening the panel based on the current location, eg. no-auto-height.html#panel2 would open the second panel on page load. It also finds anchors within the content, so #othercontent will open the third section, as it contains a link with that href.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,83 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Accordion - Sortable</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.sortable.js"></script>
|
||||
<script src="../../ui/jquery.ui.accordion.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
var stop = false;
|
||||
$( "#accordion h3" ).click(function( event ) {
|
||||
if ( stop ) {
|
||||
event.stopImmediatePropagation();
|
||||
event.preventDefault();
|
||||
stop = false;
|
||||
}
|
||||
});
|
||||
$( "#accordion" )
|
||||
.accordion({
|
||||
header: "> div > h3"
|
||||
})
|
||||
.sortable({
|
||||
axis: "y",
|
||||
handle: "h3",
|
||||
stop: function() {
|
||||
stop = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="accordion">
|
||||
<div>
|
||||
<h3><a href="#">Section 1</a></h3>
|
||||
<div>
|
||||
<p>Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3><a href="#">Section 2</a></h3>
|
||||
<div>
|
||||
<p>Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna. </p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3><a href="#">Section 3</a></h3>
|
||||
<div>
|
||||
<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui. </p>
|
||||
<ul>
|
||||
<li>List item one</li>
|
||||
<li>List item two</li>
|
||||
<li>List item three</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h3><a href="#">Section 4</a></h3>
|
||||
<div>
|
||||
<p>Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est. </p><p>Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Drag the header to re-order panels.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,52 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Effects - addClass demo</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.effects.core.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.toggler { width: 500px; height: 200px; position: relative; }
|
||||
#button { padding: .5em 1em; text-decoration: none; }
|
||||
#effect { width: 240px; padding: 1em; font-size: 1.2em; border: 1px solid #000; background: #eee; color: #333; }
|
||||
.newClass { text-indent: 40px; letter-spacing: .4em; width: 410px; height: 100px; padding: 30px; margin: 10px; font-size: 1.6em; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#button" ).click(function() {
|
||||
$( "#effect" ).addClass( "newClass", 1000, callback );
|
||||
return false;
|
||||
});
|
||||
|
||||
function callback() {
|
||||
setTimeout(function() {
|
||||
$( "#effect" ).removeClass( "newClass" );
|
||||
}, 1500 );
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="toggler">
|
||||
<div id="effect" class=" ui-corner-all">
|
||||
Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="#" id="button" class="ui-state-default ui-corner-all">Run Effect</a>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>This demo adds a class which animates: text-indent, letter-spacing, width, height, padding, margin, and font-size.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Effects Demos</title>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demos-nav">
|
||||
<h4>Examples</h4>
|
||||
<ul>
|
||||
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,61 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Effects - Animate demo</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.effects.core.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.toggler { width: 500px; height: 200px; position: relative; }
|
||||
#button { padding: .5em 1em; text-decoration: none; }
|
||||
#effect { width: 240px; height: 135px; padding: 0.4em; position: relative; background: #fff; }
|
||||
#effect h3 { margin: 0; padding: 0.4em; text-align: center; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#button" ).toggle(
|
||||
function() {
|
||||
$( "#effect" ).animate({
|
||||
backgroundColor: "#aa0000",
|
||||
color: "#fff",
|
||||
width: 500
|
||||
}, 1000 );
|
||||
},
|
||||
function() {
|
||||
$( "#effect" ).animate({
|
||||
backgroundColor: "#fff",
|
||||
color: "#000",
|
||||
width: 240
|
||||
}, 1000 );
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="toggler">
|
||||
<div id="effect" class="ui-widget-content ui-corner-all">
|
||||
<h3 class="ui-widget-header ui-corner-all">Animate</h3>
|
||||
<p>
|
||||
Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede. Nulla lorem metus, adipiscing ut, luctus sed, hendrerit vitae, mi.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="#" id="button" class="ui-state-default ui-corner-all">Toggle Effect</a>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Click the button above to preview the effect.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Effects Demos</title>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demos-nav">
|
||||
<h4>Examples</h4>
|
||||
<ul>
|
||||
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Categories</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.ui-autocomplete-category {
|
||||
font-weight: bold;
|
||||
padding: .2em .4em;
|
||||
margin: .8em 0 .2em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$.widget( "custom.catcomplete", $.ui.autocomplete, {
|
||||
_renderMenu: function( ul, items ) {
|
||||
var self = this,
|
||||
currentCategory = "";
|
||||
$.each( items, function( index, item ) {
|
||||
if ( item.category != currentCategory ) {
|
||||
ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
|
||||
currentCategory = item.category;
|
||||
}
|
||||
self._renderItem( ul, item );
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(function() {
|
||||
var data = [
|
||||
{ label: "anders", category: "" },
|
||||
{ label: "andreas", category: "" },
|
||||
{ label: "antal", category: "" },
|
||||
{ label: "annhhx10", category: "Products" },
|
||||
{ label: "annk K12", category: "Products" },
|
||||
{ label: "annttop C13", category: "Products" },
|
||||
{ label: "anders andersson", category: "People" },
|
||||
{ label: "andreas andersson", category: "People" },
|
||||
{ label: "andreas johnson", category: "People" }
|
||||
];
|
||||
|
||||
$( "#search" ).catcomplete({
|
||||
delay: 0,
|
||||
source: data
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
<label for="search">Search: </label>
|
||||
<input id="search" />
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>A categorized search result. Try typing "a" or "n".</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,174 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Combobox</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.ui-button { margin-left: -1px; }
|
||||
.ui-button-icon-only .ui-button-text { padding: 0.35em; }
|
||||
.ui-autocomplete-input { margin: 0; padding: 0.48em 0 0.47em 0.45em; }
|
||||
</style>
|
||||
<script>
|
||||
(function( $ ) {
|
||||
$.widget( "ui.combobox", {
|
||||
_create: function() {
|
||||
var self = this,
|
||||
select = this.element.hide(),
|
||||
selected = select.children( ":selected" ),
|
||||
value = selected.val() ? selected.text() : "";
|
||||
var input = this.input = $( "<input>" )
|
||||
.insertAfter( select )
|
||||
.val( value )
|
||||
.autocomplete({
|
||||
delay: 0,
|
||||
minLength: 0,
|
||||
source: function( request, response ) {
|
||||
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
|
||||
response( select.children( "option" ).map(function() {
|
||||
var text = $( this ).text();
|
||||
if ( this.value && ( !request.term || matcher.test(text) ) )
|
||||
return {
|
||||
label: text.replace(
|
||||
new RegExp(
|
||||
"(?![^&;]+;)(?!<[^<>]*)(" +
|
||||
$.ui.autocomplete.escapeRegex(request.term) +
|
||||
")(?![^<>]*>)(?![^&;]+;)", "gi"
|
||||
), "<strong>$1</strong>" ),
|
||||
value: text,
|
||||
option: this
|
||||
};
|
||||
}) );
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
ui.item.option.selected = true;
|
||||
self._trigger( "selected", event, {
|
||||
item: ui.item.option
|
||||
});
|
||||
},
|
||||
change: function( event, ui ) {
|
||||
if ( !ui.item ) {
|
||||
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ),
|
||||
valid = false;
|
||||
select.children( "option" ).each(function() {
|
||||
if ( $( this ).text().match( matcher ) ) {
|
||||
this.selected = valid = true;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
if ( !valid ) {
|
||||
// remove invalid value, as it didn't match anything
|
||||
$( this ).val( "" );
|
||||
select.val( "" );
|
||||
input.data( "autocomplete" ).term = "";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.addClass( "ui-widget ui-widget-content ui-corner-left" );
|
||||
|
||||
input.data( "autocomplete" )._renderItem = function( ul, item ) {
|
||||
return $( "<li></li>" )
|
||||
.data( "item.autocomplete", item )
|
||||
.append( "<a>" + item.label + "</a>" )
|
||||
.appendTo( ul );
|
||||
};
|
||||
|
||||
this.button = $( "<button type='button'> </button>" )
|
||||
.attr( "tabIndex", -1 )
|
||||
.attr( "title", "Show All Items" )
|
||||
.insertAfter( input )
|
||||
.button({
|
||||
icons: {
|
||||
primary: "ui-icon-triangle-1-s"
|
||||
},
|
||||
text: false
|
||||
})
|
||||
.removeClass( "ui-corner-all" )
|
||||
.addClass( "ui-corner-right ui-button-icon" )
|
||||
.click(function() {
|
||||
// close if already visible
|
||||
if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
|
||||
input.autocomplete( "close" );
|
||||
return;
|
||||
}
|
||||
|
||||
// work around a bug (likely same cause as #5265)
|
||||
$( this ).blur();
|
||||
|
||||
// pass empty string as value to search for, displaying all results
|
||||
input.autocomplete( "search", "" );
|
||||
input.focus();
|
||||
});
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this.input.remove();
|
||||
this.button.remove();
|
||||
this.element.show();
|
||||
$.Widget.prototype.destroy.call( this );
|
||||
}
|
||||
});
|
||||
})( jQuery );
|
||||
|
||||
$(function() {
|
||||
$( "#combobox" ).combobox();
|
||||
$( "#toggle" ).click(function() {
|
||||
$( "#combobox" ).toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="ui-widget">
|
||||
<label>Your preferred programming language: </label>
|
||||
<select id="combobox">
|
||||
<option value="">Select one...</option>
|
||||
<option value="ActionScript">ActionScript</option>
|
||||
<option value="AppleScript">AppleScript</option>
|
||||
<option value="Asp">Asp</option>
|
||||
<option value="BASIC">BASIC</option>
|
||||
<option value="C">C</option>
|
||||
<option value="C++">C++</option>
|
||||
<option value="Clojure">Clojure</option>
|
||||
<option value="COBOL">COBOL</option>
|
||||
<option value="ColdFusion">ColdFusion</option>
|
||||
<option value="Erlang">Erlang</option>
|
||||
<option value="Fortran">Fortran</option>
|
||||
<option value="Groovy">Groovy</option>
|
||||
<option value="Haskell">Haskell</option>
|
||||
<option value="Java">Java</option>
|
||||
<option value="JavaScript">JavaScript</option>
|
||||
<option value="Lisp">Lisp</option>
|
||||
<option value="Perl">Perl</option>
|
||||
<option value="PHP">PHP</option>
|
||||
<option value="Python">Python</option>
|
||||
<option value="Ruby">Ruby</option>
|
||||
<option value="Scala">Scala</option>
|
||||
<option value="Scheme">Scheme</option>
|
||||
</select>
|
||||
</div>
|
||||
<button id="toggle">Show underlying select</button>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>A custom widget built by composition of Autocomplete and Button. You can either type something into the field to get filtered suggestions based on your input, or use the button to get the full list of selections.</p>
|
||||
<p>The input is read from an existing select-element for progressive enhancement, passed to Autocomplete with a customized source-option.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,95 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Custom data and display</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#project-label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
#project-icon {
|
||||
float: left;
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
}
|
||||
#project-description {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
var projects = [
|
||||
{
|
||||
value: "jquery",
|
||||
label: "jQuery",
|
||||
desc: "the write less, do more, JavaScript library",
|
||||
icon: "jquery_32x32.png"
|
||||
},
|
||||
{
|
||||
value: "jquery-ui",
|
||||
label: "jQuery UI",
|
||||
desc: "the official user interface library for jQuery",
|
||||
icon: "jqueryui_32x32.png"
|
||||
},
|
||||
{
|
||||
value: "sizzlejs",
|
||||
label: "Sizzle JS",
|
||||
desc: "a pure-JavaScript CSS selector engine",
|
||||
icon: "sizzlejs_32x32.png"
|
||||
}
|
||||
];
|
||||
|
||||
$( "#project" ).autocomplete({
|
||||
minLength: 0,
|
||||
source: projects,
|
||||
focus: function( event, ui ) {
|
||||
$( "#project" ).val( ui.item.label );
|
||||
return false;
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
$( "#project" ).val( ui.item.label );
|
||||
$( "#project-id" ).val( ui.item.value );
|
||||
$( "#project-description" ).html( ui.item.desc );
|
||||
$( "#project-icon" ).attr( "src", "images/" + ui.item.icon );
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.data( "autocomplete" )._renderItem = function( ul, item ) {
|
||||
return $( "<li></li>" )
|
||||
.data( "item.autocomplete", item )
|
||||
.append( "<a>" + item.label + "<br>" + item.desc + "</a>" )
|
||||
.appendTo( ul );
|
||||
};
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
<div id="project-label">Select a project (type "j" for a start):</div>
|
||||
<img id="project-icon" src="images/transparent_1x1.png" class="ui-state-default"/>
|
||||
<input id="project"/>
|
||||
<input type="hidden" id="project-id"/>
|
||||
<p id="project-description"></p>
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>You can use your own custom data formats and displays by simply overriding the default focus and select actions.</p>
|
||||
<p>Try typing "j" to get a list of projects or just press the down arrow.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,64 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Default functionality</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
var availableTags = [
|
||||
"ActionScript",
|
||||
"AppleScript",
|
||||
"Asp",
|
||||
"BASIC",
|
||||
"C",
|
||||
"C++",
|
||||
"Clojure",
|
||||
"COBOL",
|
||||
"ColdFusion",
|
||||
"Erlang",
|
||||
"Fortran",
|
||||
"Groovy",
|
||||
"Haskell",
|
||||
"Java",
|
||||
"JavaScript",
|
||||
"Lisp",
|
||||
"Perl",
|
||||
"PHP",
|
||||
"Python",
|
||||
"Ruby",
|
||||
"Scala",
|
||||
"Scheme"
|
||||
];
|
||||
$( "#tags" ).autocomplete({
|
||||
source: availableTags
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="ui-widget">
|
||||
<label for="tags">Tags: </label>
|
||||
<input id="tags" />
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are tags for programming languages, give "ja" (for Java or JavaScript) a try.</p>
|
||||
<p>The datasource is a simple JavaScript array, provided to the widget using the source-option.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Accent folding</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
var names = [ "Jörn Zaefferer", "Scott González", "John Resig" ];
|
||||
|
||||
var accentMap = {
|
||||
"á": "a",
|
||||
"ö": "o"
|
||||
};
|
||||
var normalize = function( term ) {
|
||||
var ret = "";
|
||||
for ( var i = 0; i < term.length; i++ ) {
|
||||
ret += accentMap[ term.charAt(i) ] || term.charAt(i);
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
|
||||
$( "#developer" ).autocomplete({
|
||||
source: function( request, response ) {
|
||||
var matcher = new RegExp( $.ui.autocomplete.escapeRegex( request.term ), "i" );
|
||||
response( $.grep( names, function( value ) {
|
||||
value = value.label || value.value || value;
|
||||
return matcher.test( value ) || matcher.test( normalize( value ) );
|
||||
}) );
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="ui-widget">
|
||||
<form>
|
||||
<label for="developer">Developer: </label>
|
||||
<input id="developer" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>The autocomplete field uses a custom source option which will match results that have accented characters even when the text field doesn't contain accented characters. However if the you type in accented characters in the text field it is smart enough not to show results that aren't accented.</p>
|
||||
<p>Try typing "Jo" to see "John" and "Jörn", then type "Jö" to see only "Jörn".</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 999 B |
After Width: | Height: | Size: 95 B |
After Width: | Height: | Size: 1.4 KiB |
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete Demos</title>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="demos-nav">
|
||||
<h4>Examples</h4>
|
||||
<ul>
|
||||
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
|
||||
<li><a href="remote.html">Remote datasource</a></li>
|
||||
<li><a href="remote-with-cache.html">Remote with caching</a></li>
|
||||
<li><a href="remote-jsonp.html">Remote JSONP datasource</a></li>
|
||||
<li><a href="maxheight.html">Scrollable results</a></li>
|
||||
<li><a href="combobox.html">Combobox</a></li>
|
||||
<li><a href="custom-data.html">Custom data and display</a></li>
|
||||
<li><a href="xml.html">XML data parsed once</a></li>
|
||||
<li><a href="categories.html">Categories</a></li>
|
||||
<li><a href="folding.html">Accent folding</a></li>
|
||||
<li><a href="multiple.html">Multiple values</a></li>
|
||||
<li><a href="multiple-remote.html">Multiple, remote</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,114 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<geonames style="MEDIUM">
|
||||
<totalResultsCount>6987</totalResultsCount>
|
||||
<geoname>
|
||||
<name>London</name>
|
||||
<lat>51.5084152563931</lat>
|
||||
<lng>-0.125532746315002</lng>
|
||||
<geonameId>2643743</geonameId>
|
||||
<countryCode>GB</countryCode>
|
||||
<countryName>United Kingdom</countryName>
|
||||
|
||||
<fcl>P</fcl>
|
||||
<fcode>PPLC</fcode>
|
||||
</geoname>
|
||||
<geoname>
|
||||
<name>London</name>
|
||||
<lat>42.983389283</lat>
|
||||
<lng>-81.233042387</lng>
|
||||
<geonameId>6058560</geonameId>
|
||||
<countryCode>CA</countryCode>
|
||||
<countryName>Canada</countryName>
|
||||
|
||||
<fcl>P</fcl>
|
||||
<fcode>PPL</fcode>
|
||||
</geoname>
|
||||
<geoname>
|
||||
<name>East London</name>
|
||||
<lat>-33.0152850934643</lat>
|
||||
<lng>27.9116249084473</lng>
|
||||
<geonameId>1006984</geonameId>
|
||||
<countryCode>ZA</countryCode>
|
||||
<countryName>South Africa</countryName>
|
||||
|
||||
<fcl>P</fcl>
|
||||
<fcode>PPL</fcode>
|
||||
</geoname>
|
||||
<geoname>
|
||||
<name>City</name>
|
||||
<lat>51.5133363996235</lat>
|
||||
<lng>-0.0890064239501953</lng>
|
||||
<geonameId>2643744</geonameId>
|
||||
<countryCode>GB</countryCode>
|
||||
<countryName>United Kingdom</countryName>
|
||||
|
||||
<fcl>A</fcl>
|
||||
<fcode>ADM2</fcode>
|
||||
</geoname>
|
||||
<geoname>
|
||||
<name>London</name>
|
||||
<lat>37.1289771</lat>
|
||||
<lng>-84.0832646</lng>
|
||||
<geonameId>4298960</geonameId>
|
||||
<countryCode>US</countryCode>
|
||||
<countryName>United States</countryName>
|
||||
|
||||
<fcl>P</fcl>
|
||||
<fcode>PPL</fcode>
|
||||
</geoname>
|
||||
<geoname>
|
||||
<name>The Tower of London</name>
|
||||
<lat>51.5082349601834</lat>
|
||||
<lng>-0.0763034820556641</lng>
|
||||
<geonameId>6286786</geonameId>
|
||||
<countryCode>GB</countryCode>
|
||||
<countryName>United Kingdom</countryName>
|
||||
|
||||
<fcl>S</fcl>
|
||||
<fcode>CSTL</fcode>
|
||||
</geoname>
|
||||
<geoname>
|
||||
<name>London Reefs</name>
|
||||
<lat>8.85</lat>
|
||||
<lng>112.5333333</lng>
|
||||
<geonameId>1879967</geonameId>
|
||||
<countryCode> </countryCode>
|
||||
<countryName> </countryName>
|
||||
|
||||
<fcl>U</fcl>
|
||||
<fcode>RFSU</fcode>
|
||||
</geoname>
|
||||
<geoname>
|
||||
<name>Greater London</name>
|
||||
<lat>51.5</lat>
|
||||
<lng>-0.1666667</lng>
|
||||
<geonameId>2648110</geonameId>
|
||||
<countryCode>GB</countryCode>
|
||||
<countryName>United Kingdom</countryName>
|
||||
|
||||
<fcl>A</fcl>
|
||||
<fcode>ADM2</fcode>
|
||||
</geoname>
|
||||
<geoname>
|
||||
<name>London</name>
|
||||
<lat>46.1666667</lat>
|
||||
<lng>6.0166667</lng>
|
||||
<geonameId>2661811</geonameId>
|
||||
<countryCode>CH</countryCode>
|
||||
<countryName>Switzerland</countryName>
|
||||
|
||||
<fcl>H</fcl>
|
||||
<fcode>STM</fcode>
|
||||
</geoname>
|
||||
<geoname>
|
||||
<name>London Borough of Islington</name>
|
||||
<lat>51.5333333</lat>
|
||||
<lng>-0.1333333</lng>
|
||||
<geonameId>3333156</geonameId>
|
||||
<countryCode>GB</countryCode>
|
||||
<countryName>United Kingdom</countryName>
|
||||
|
||||
<fcl>A</fcl>
|
||||
<fcode>ADM2</fcode>
|
||||
</geoname>
|
||||
</geonames>
|
|
@ -0,0 +1,79 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Scrollable results</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.ui-autocomplete {
|
||||
max-height: 100px;
|
||||
overflow-y: auto;
|
||||
/* prevent horizontal scrollbar */
|
||||
overflow-x: hidden;
|
||||
/* add padding to account for vertical scrollbar */
|
||||
padding-right: 20px;
|
||||
}
|
||||
/* IE 6 doesn't support max-height
|
||||
* we use height instead, but this forces the menu to always be this tall
|
||||
*/
|
||||
* html .ui-autocomplete {
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
var availableTags = [
|
||||
"ActionScript",
|
||||
"AppleScript",
|
||||
"Asp",
|
||||
"BASIC",
|
||||
"C",
|
||||
"C++",
|
||||
"Clojure",
|
||||
"COBOL",
|
||||
"ColdFusion",
|
||||
"Erlang",
|
||||
"Fortran",
|
||||
"Groovy",
|
||||
"Haskell",
|
||||
"Java",
|
||||
"JavaScript",
|
||||
"Lisp",
|
||||
"Perl",
|
||||
"PHP",
|
||||
"Python",
|
||||
"Ruby",
|
||||
"Scala",
|
||||
"Scheme"
|
||||
];
|
||||
$( "#tags" ).autocomplete({
|
||||
source: availableTags
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="ui-widget">
|
||||
<label for="tags">Tags: </label>
|
||||
<input id="tags" />
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>When displaying a long list of options, you can simply set the max-height for the autocomplete menu to prevent the menu from growing too large. Try typing "a" or "s" above to get a long list of results that you can scroll through.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,84 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Multiple, remote</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
function split( val ) {
|
||||
return val.split( /,\s*/ );
|
||||
}
|
||||
function extractLast( term ) {
|
||||
return split( term ).pop();
|
||||
}
|
||||
|
||||
$( "#birds" )
|
||||
// don't navigate away from the field on tab when selecting an item
|
||||
.bind( "keydown", function( event ) {
|
||||
if ( event.keyCode === $.ui.keyCode.TAB &&
|
||||
$( this ).data( "autocomplete" ).menu.active ) {
|
||||
event.preventDefault();
|
||||
}
|
||||
})
|
||||
.autocomplete({
|
||||
source: function( request, response ) {
|
||||
$.getJSON( "search.php", {
|
||||
term: extractLast( request.term )
|
||||
}, response );
|
||||
},
|
||||
search: function() {
|
||||
// custom minLength
|
||||
var term = extractLast( this.value );
|
||||
if ( term.length < 2 ) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
focus: function() {
|
||||
// prevent value inserted on focus
|
||||
return false;
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
var terms = split( this.value );
|
||||
// remove the current input
|
||||
terms.pop();
|
||||
// add the selected item
|
||||
terms.push( ui.item.value );
|
||||
// add placeholder to get the comma-and-space at the end
|
||||
terms.push( "" );
|
||||
this.value = terms.join( ", " );
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="ui-widget">
|
||||
<label for="birds">Birds: </label>
|
||||
<input id="birds" size="50" />
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Usage: Enter at least two characters to get bird name suggestions. Select a value to continue adding more names.</p>
|
||||
<p>This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,99 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Multiple values</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
var availableTags = [
|
||||
"ActionScript",
|
||||
"AppleScript",
|
||||
"Asp",
|
||||
"BASIC",
|
||||
"C",
|
||||
"C++",
|
||||
"Clojure",
|
||||
"COBOL",
|
||||
"ColdFusion",
|
||||
"Erlang",
|
||||
"Fortran",
|
||||
"Groovy",
|
||||
"Haskell",
|
||||
"Java",
|
||||
"JavaScript",
|
||||
"Lisp",
|
||||
"Perl",
|
||||
"PHP",
|
||||
"Python",
|
||||
"Ruby",
|
||||
"Scala",
|
||||
"Scheme"
|
||||
];
|
||||
function split( val ) {
|
||||
return val.split( /,\s*/ );
|
||||
}
|
||||
function extractLast( term ) {
|
||||
return split( term ).pop();
|
||||
}
|
||||
|
||||
$( "#tags" )
|
||||
// don't navigate away from the field on tab when selecting an item
|
||||
.bind( "keydown", function( event ) {
|
||||
if ( event.keyCode === $.ui.keyCode.TAB &&
|
||||
$( this ).data( "autocomplete" ).menu.active ) {
|
||||
event.preventDefault();
|
||||
}
|
||||
})
|
||||
.autocomplete({
|
||||
minLength: 0,
|
||||
source: function( request, response ) {
|
||||
// delegate back to autocomplete, but extract the last term
|
||||
response( $.ui.autocomplete.filter(
|
||||
availableTags, extractLast( request.term ) ) );
|
||||
},
|
||||
focus: function() {
|
||||
// prevent value inserted on focus
|
||||
return false;
|
||||
},
|
||||
select: function( event, ui ) {
|
||||
var terms = split( this.value );
|
||||
// remove the current input
|
||||
terms.pop();
|
||||
// add the selected item
|
||||
terms.push( ui.item.value );
|
||||
// add placeholder to get the comma-and-space at the end
|
||||
terms.push( "" );
|
||||
this.value = terms.join( ", " );
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="ui-widget">
|
||||
<label for="tags">Tag programming languages: </label>
|
||||
<input id="tags" size="50" />
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Usage: Type something, eg. "j" to see suggestions for tagging with programming languages. Select a value, then continue typing to add more.</p>
|
||||
<p>This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,86 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Remote JSONP datasource</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
|
||||
#city { width: 25em; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
function log( message ) {
|
||||
$( "<div/>" ).text( message ).prependTo( "#log" );
|
||||
$( "#log" ).attr( "scrollTop", 0 );
|
||||
}
|
||||
|
||||
$( "#city" ).autocomplete({
|
||||
source: function( request, response ) {
|
||||
$.ajax({
|
||||
url: "http://ws.geonames.org/searchJSON",
|
||||
dataType: "jsonp",
|
||||
data: {
|
||||
featureClass: "P",
|
||||
style: "full",
|
||||
maxRows: 12,
|
||||
name_startsWith: request.term
|
||||
},
|
||||
success: function( data ) {
|
||||
response( $.map( data.geonames, function( item ) {
|
||||
return {
|
||||
label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
|
||||
value: item.name
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
minLength: 2,
|
||||
select: function( event, ui ) {
|
||||
log( ui.item ?
|
||||
"Selected: " + ui.item.label :
|
||||
"Nothing selected, input was " + this.value);
|
||||
},
|
||||
open: function() {
|
||||
$( this ).removeClass( "ui-corner-all" ).addClass( "ui-corner-top" );
|
||||
},
|
||||
close: function() {
|
||||
$( this ).removeClass( "ui-corner-top" ).addClass( "ui-corner-all" );
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="ui-widget">
|
||||
<label for="city">Your city: </label>
|
||||
<input id="city" />
|
||||
Powered by <a href="http://geonames.org">geonames.org</a>
|
||||
</div>
|
||||
|
||||
<div class="ui-widget" style="margin-top:2em; font-family:Arial">
|
||||
Result:
|
||||
<div id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are cities, displayed when at least two characters are entered into the field.</p>
|
||||
<p>In this case, the datasource is the <a href="http://geonames.org">geonames.org webservice</a>. While only the city name itself ends up in the input after selecting an element, more info is displayed in the suggestions to help find the right entry. That data is also available in callbacks, as illustrated by the Result area below the input.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Remote with caching</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
var cache = {},
|
||||
lastXhr;
|
||||
$( "#birds" ).autocomplete({
|
||||
minLength: 2,
|
||||
source: function( request, response ) {
|
||||
var term = request.term;
|
||||
if ( term in cache ) {
|
||||
response( cache[ term ] );
|
||||
return;
|
||||
}
|
||||
|
||||
lastXhr = $.getJSON( "search.php", request, function( data, status, xhr ) {
|
||||
cache[ term ] = data;
|
||||
if ( xhr === lastXhr ) {
|
||||
response( data );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="ui-widget">
|
||||
<label for="birds">Birds: </label>
|
||||
<input id="birds" />
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are bird names, displayed when at least two characters are entered into the field.</p>
|
||||
<p>Similar to the remote datasource demo, though this adds some local caching to improve performance. The cache here saves just one query, and could be extended to cache multiple values, one for each term.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - Remote datasource</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
function log( message ) {
|
||||
$( "<div/>" ).text( message ).prependTo( "#log" );
|
||||
$( "#log" ).attr( "scrollTop", 0 );
|
||||
}
|
||||
|
||||
$( "#birds" ).autocomplete({
|
||||
source: "search.php",
|
||||
minLength: 2,
|
||||
select: function( event, ui ) {
|
||||
log( ui.item ?
|
||||
"Selected: " + ui.item.value + " aka " + ui.item.id :
|
||||
"Nothing selected, input was " + this.value );
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="ui-widget">
|
||||
<label for="birds">Birds: </label>
|
||||
<input id="birds" />
|
||||
</div>
|
||||
|
||||
<div class="ui-widget" style="margin-top:2em; font-family:Arial">
|
||||
Result:
|
||||
<div id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are bird names, displayed when at least two characters are entered into the field.</p>
|
||||
<p>The datasource is a server-side script which returns JSON data, specified via a simple URL for the source-option. In addition, the minLength-option is set to 2 to avoid queries that would return too many results and the select-event is used to display some feedback.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,640 @@
|
|||
<?php
|
||||
|
||||
$q = strtolower($_GET["term"]);
|
||||
if (!$q) return;
|
||||
$items = array(
|
||||
"Great Bittern"=>"Botaurus stellaris",
|
||||
"Little Grebe"=>"Tachybaptus ruficollis",
|
||||
"Black-necked Grebe"=>"Podiceps nigricollis",
|
||||
"Little Bittern"=>"Ixobrychus minutus",
|
||||
"Black-crowned Night Heron"=>"Nycticorax nycticorax",
|
||||
"Purple Heron"=>"Ardea purpurea",
|
||||
"White Stork"=>"Ciconia ciconia",
|
||||
"Spoonbill"=>"Platalea leucorodia",
|
||||
"Red-crested Pochard"=>"Netta rufina",
|
||||
"Common Eider"=>"Somateria mollissima",
|
||||
"Red Kite"=>"Milvus milvus",
|
||||
"Hen Harrier"=>"Circus cyaneus",
|
||||
"Montagu`s Harrier"=>"Circus pygargus",
|
||||
"Black Grouse"=>"Tetrao tetrix",
|
||||
"Grey Partridge"=>"Perdix perdix",
|
||||
"Spotted Crake"=>"Porzana porzana",
|
||||
"Corncrake"=>"Crex crex",
|
||||
"Common Crane"=>"Grus grus",
|
||||
"Avocet"=>"Recurvirostra avosetta",
|
||||
"Stone Curlew"=>"Burhinus oedicnemus",
|
||||
"Common Ringed Plover"=>"Charadrius hiaticula",
|
||||
"Kentish Plover"=>"Charadrius alexandrinus",
|
||||
"Ruff"=>"Philomachus pugnax",
|
||||
"Common Snipe"=>"Gallinago gallinago",
|
||||
"Black-tailed Godwit"=>"Limosa limosa",
|
||||
"Common Redshank"=>"Tringa totanus",
|
||||
"Sandwich Tern"=>"Sterna sandvicensis",
|
||||
"Common Tern"=>"Sterna hirundo",
|
||||
"Arctic Tern"=>"Sterna paradisaea",
|
||||
"Little Tern"=>"Sternula albifrons",
|
||||
"Black Tern"=>"Chlidonias niger",
|
||||
"Barn Owl"=>"Tyto alba",
|
||||
"Little Owl"=>"Athene noctua",
|
||||
"Short-eared Owl"=>"Asio flammeus",
|
||||
"European Nightjar"=>"Caprimulgus europaeus",
|
||||
"Common Kingfisher"=>"Alcedo atthis",
|
||||
"Eurasian Hoopoe"=>"Upupa epops",
|
||||
"Eurasian Wryneck"=>"Jynx torquilla",
|
||||
"European Green Woodpecker"=>"Picus viridis",
|
||||
"Crested Lark"=>"Galerida cristata",
|
||||
"White-headed Duck"=>"Oxyura leucocephala",
|
||||
"Pale-bellied Brent Goose"=>"Branta hrota",
|
||||
"Tawny Pipit"=>"Anthus campestris",
|
||||
"Whinchat"=>"Saxicola rubetra",
|
||||
"European Stonechat"=>"Saxicola rubicola",
|
||||
"Northern Wheatear"=>"Oenanthe oenanthe",
|
||||
"Savi`s Warbler"=>"Locustella luscinioides",
|
||||
"Sedge Warbler"=>"Acrocephalus schoenobaenus",
|
||||
"Great Reed Warbler"=>"Acrocephalus arundinaceus",
|
||||
"Bearded Reedling"=>"Panurus biarmicus",
|
||||
"Red-backed Shrike"=>"Lanius collurio",
|
||||
"Great Grey Shrike"=>"Lanius excubitor",
|
||||
"Woodchat Shrike"=>"Lanius senator",
|
||||
"Common Raven"=>"Corvus corax",
|
||||
"Yellowhammer"=>"Emberiza citrinella",
|
||||
"Ortolan Bunting"=>"Emberiza hortulana",
|
||||
"Corn Bunting"=>"Emberiza calandra",
|
||||
"Great Cormorant"=>"Phalacrocorax carbo",
|
||||
"Hawfinch"=>"Coccothraustes coccothraustes",
|
||||
"Common Shelduck"=>"Tadorna tadorna",
|
||||
"Bluethroat"=>"Luscinia svecica",
|
||||
"Grey Heron"=>"Ardea cinerea",
|
||||
"Barn Swallow"=>"Hirundo rustica",
|
||||
"Hooded Crow"=>"Corvus cornix",
|
||||
"Dunlin"=>"Calidris alpina",
|
||||
"Eurasian Pied Flycatcher"=>"Ficedula hypoleuca",
|
||||
"Eurasian Nuthatch"=>"Sitta europaea",
|
||||
"Short-toed Tree Creeper"=>"Certhia brachydactyla",
|
||||
"Wood Lark"=>"Lullula arborea",
|
||||
"Tree Pipit"=>"Anthus trivialis",
|
||||
"Eurasian Hobby"=>"Falco subbuteo",
|
||||
"Marsh Warbler"=>"Acrocephalus palustris",
|
||||
"Wood Sandpiper"=>"Tringa glareola",
|
||||
"Tawny Owl"=>"Strix aluco",
|
||||
"Lesser Whitethroat"=>"Sylvia curruca",
|
||||
"Barnacle Goose"=>"Branta leucopsis",
|
||||
"Common Goldeneye"=>"Bucephala clangula",
|
||||
"Western Marsh Harrier"=>"Circus aeruginosus",
|
||||
"Common Buzzard"=>"Buteo buteo",
|
||||
"Sanderling"=>"Calidris alba",
|
||||
"Little Gull"=>"Larus minutus",
|
||||
"Eurasian Magpie"=>"Pica pica",
|
||||
"Willow Warbler"=>"Phylloscopus trochilus",
|
||||
"Wood Warbler"=>"Phylloscopus sibilatrix",
|
||||
"Great Crested Grebe"=>"Podiceps cristatus",
|
||||
"Eurasian Jay"=>"Garrulus glandarius",
|
||||
"Common Redstart"=>"Phoenicurus phoenicurus",
|
||||
"Blue-headed Wagtail"=>"Motacilla flava",
|
||||
"Common Swift"=>"Apus apus",
|
||||
"Marsh Tit"=>"Poecile palustris",
|
||||
"Goldcrest"=>"Regulus regulus",
|
||||
"European Golden Plover"=>"Pluvialis apricaria",
|
||||
"Eurasian Bullfinch"=>"Pyrrhula pyrrhula",
|
||||
"Common Whitethroat"=>"Sylvia communis",
|
||||
"Meadow Pipit"=>"Anthus pratensis",
|
||||
"Greylag Goose"=>"Anser anser",
|
||||
"Spotted Flycatcher"=>"Muscicapa striata",
|
||||
"European Greenfinch"=>"Carduelis chloris",
|
||||
"Common Greenshank"=>"Tringa nebularia",
|
||||
"Great Spotted Woodpecker"=>"Dendrocopos major",
|
||||
"Greater Canada Goose"=>"Branta canadensis",
|
||||
"Mistle Thrush"=>"Turdus viscivorus",
|
||||
"Great Black-backed Gull"=>"Larus marinus",
|
||||
"Goosander"=>"Mergus merganser",
|
||||
"Great Egret"=>"Casmerodius albus",
|
||||
"Northern Goshawk"=>"Accipiter gentilis",
|
||||
"Dunnock"=>"Prunella modularis",
|
||||
"Stock Dove"=>"Columba oenas",
|
||||
"Common Wood Pigeon"=>"Columba palumbus",
|
||||
"Eurasian Woodcock"=>"Scolopax rusticola",
|
||||
"House Sparrow"=>"Passer domesticus",
|
||||
"Common House Martin"=>"Delichon urbicum",
|
||||
"Red Knot"=>"Calidris canutus",
|
||||
"Western Jackdaw"=>"Corvus monedula",
|
||||
"Brambling"=>"Fringilla montifringilla",
|
||||
"Northern Lapwing"=>"Vanellus vanellus",
|
||||
"European Reed Warbler"=>"Acrocephalus scirpaceus",
|
||||
"Lesser Black-backed Gull"=>"Larus fuscus",
|
||||
"Little Egret"=>"Egretta garzetta",
|
||||
"Little Stint"=>"Calidris minuta",
|
||||
"Common Linnet"=>"Carduelis cannabina",
|
||||
"Mute Swan"=>"Cygnus olor",
|
||||
"Common Cuckoo"=>"Cuculus canorus",
|
||||
"Black-headed Gull"=>"Larus ridibundus",
|
||||
"Greater White-fronted Goose"=>"Anser albifrons",
|
||||
"Great Tit"=>"Parus major",
|
||||
"Redwing"=>"Turdus iliacus",
|
||||
"Gadwall"=>"Anas strepera",
|
||||
"Fieldfare"=>"Turdus pilaris",
|
||||
"Tufted Duck"=>"Aythya fuligula",
|
||||
"Crested Tit"=>"Lophophanes cristatus",
|
||||
"Willow Tit"=>"Poecile montanus",
|
||||
"Eurasian Coot"=>"Fulica atra",
|
||||
"Common Blackbird"=>"Turdus merula",
|
||||
"Smew"=>"Mergus albellus",
|
||||
"Common Sandpiper"=>"Actitis hypoleucos",
|
||||
"Sand Martin"=>"Riparia riparia",
|
||||
"Purple Sandpiper"=>"Calidris maritima",
|
||||
"Northern Pintail"=>"Anas acuta",
|
||||
"Blue Tit"=>"Cyanistes caeruleus",
|
||||
"European Goldfinch"=>"Carduelis carduelis",
|
||||
"Eurasian Whimbrel"=>"Numenius phaeopus",
|
||||
"Common Reed Bunting"=>"Emberiza schoeniclus",
|
||||
"Eurasian Tree Sparrow"=>"Passer montanus",
|
||||
"Rook"=>"Corvus frugilegus",
|
||||
"European Robin"=>"Erithacus rubecula",
|
||||
"Bar-tailed Godwit"=>"Limosa lapponica",
|
||||
"Dark-bellied Brent Goose"=>"Branta bernicla",
|
||||
"Eurasian Oystercatcher"=>"Haematopus ostralegus",
|
||||
"Eurasian Siskin"=>"Carduelis spinus",
|
||||
"Northern Shoveler"=>"Anas clypeata",
|
||||
"Eurasian Wigeon"=>"Anas penelope",
|
||||
"Eurasian Sparrow Hawk"=>"Accipiter nisus",
|
||||
"Icterine Warbler"=>"Hippolais icterina",
|
||||
"Common Starling"=>"Sturnus vulgaris",
|
||||
"Long-tailed Tit"=>"Aegithalos caudatus",
|
||||
"Ruddy Turnstone"=>"Arenaria interpres",
|
||||
"Mew Gull"=>"Larus canus",
|
||||
"Common Pochard"=>"Aythya ferina",
|
||||
"Common Chiffchaff"=>"Phylloscopus collybita",
|
||||
"Greater Scaup"=>"Aythya marila",
|
||||
"Common Kestrel"=>"Falco tinnunculus",
|
||||
"Garden Warbler"=>"Sylvia borin",
|
||||
"Eurasian Collared Dove"=>"Streptopelia decaocto",
|
||||
"Eurasian Skylark"=>"Alauda arvensis",
|
||||
"Common Chaffinch"=>"Fringilla coelebs",
|
||||
"Common Moorhen"=>"Gallinula chloropus",
|
||||
"Water Pipit"=>"Anthus spinoletta",
|
||||
"Mallard"=>"Anas platyrhynchos",
|
||||
"Winter Wren"=>"Troglodytes troglodytes",
|
||||
"Common Teal"=>"Anas crecca",
|
||||
"Green Sandpiper"=>"Tringa ochropus",
|
||||
"White Wagtail"=>"Motacilla alba",
|
||||
"Eurasian Curlew"=>"Numenius arquata",
|
||||
"Song Thrush"=>"Turdus philomelos",
|
||||
"European Herring Gull"=>"Larus argentatus",
|
||||
"Grey Plover"=>"Pluvialis squatarola",
|
||||
"Carrion Crow"=>"Corvus corone",
|
||||
"Coal Tit"=>"Periparus ater",
|
||||
"Spotted Redshank"=>"Tringa erythropus",
|
||||
"Blackcap"=>"Sylvia atricapilla",
|
||||
"Egyptian Vulture"=>"Neophron percnopterus",
|
||||
"Razorbill"=>"Alca torda",
|
||||
"Alpine Swift"=>"Apus melba",
|
||||
"Long-legged Buzzard"=>"Buteo rufinus",
|
||||
"Audouin`s Gull"=>"Larus audouinii",
|
||||
"Balearic Shearwater"=>"Puffinus mauretanicus",
|
||||
"Upland Sandpiper"=>"Bartramia longicauda",
|
||||
"Greater Spotted Eagle"=>"Aquila clanga",
|
||||
"Ring Ouzel"=>"Turdus torquatus",
|
||||
"Yellow-browed Warbler"=>"Phylloscopus inornatus",
|
||||
"Blue Rock Thrush"=>"Monticola solitarius",
|
||||
"Buff-breasted Sandpiper"=>"Tryngites subruficollis",
|
||||
"Jack Snipe"=>"Lymnocryptes minimus",
|
||||
"White-rumped Sandpiper"=>"Calidris fuscicollis",
|
||||
"Ruddy Shelduck"=>"Tadorna ferruginea",
|
||||
"Cetti's Warbler"=>"Cettia cetti",
|
||||
"Citrine Wagtail"=>"Motacilla citreola",
|
||||
"Roseate Tern"=>"Sterna dougallii",
|
||||
"Black-legged Kittiwake"=>"Rissa tridactyla",
|
||||
"Pygmy Cormorant"=>"Phalacrocorax pygmeus",
|
||||
"Booted Eagle"=>"Aquila pennata",
|
||||
"Lesser White-fronted Goose"=>"Anser erythropus",
|
||||
"Little Bunting"=>"Emberiza pusilla",
|
||||
"Eleonora's Falcon"=>"Falco eleonorae",
|
||||
"European Serin"=>"Serinus serinus",
|
||||
"Twite"=>"Carduelis flavirostris",
|
||||
"Yellow-legged Gull"=>"Larus michahellis",
|
||||
"Gyr Falcon"=>"Falco rusticolus",
|
||||
"Greenish Warbler"=>"Phylloscopus trochiloides",
|
||||
"Red-necked Phalarope"=>"Phalaropus lobatus",
|
||||
"Mealy Redpoll"=>"Carduelis flammea",
|
||||
"Glaucous Gull"=>"Larus hyperboreus",
|
||||
"Great Skua"=>"Stercorarius skua",
|
||||
"Great Bustard"=>"Otis tarda",
|
||||
"Velvet Scoter"=>"Melanitta fusca",
|
||||
"Pine Grosbeak"=>"Pinicola enucleator",
|
||||
"House Crow"=>"Corvus splendens",
|
||||
"Hume`s Leaf Warbler"=>"Phylloscopus humei",
|
||||
"Great Northern Loon"=>"Gavia immer",
|
||||
"Long-tailed Duck"=>"Clangula hyemalis",
|
||||
"Lapland Longspur"=>"Calcarius lapponicus",
|
||||
"Northern Gannet"=>"Morus bassanus",
|
||||
"Eastern Imperial Eagle"=>"Aquila heliaca",
|
||||
"Little Auk"=>"Alle alle",
|
||||
"Lesser Spotted Woodpecker"=>"Dendrocopos minor",
|
||||
"Iceland Gull"=>"Larus glaucoides",
|
||||
"Parasitic Jaeger"=>"Stercorarius parasiticus",
|
||||
"Bewick`s Swan"=>"Cygnus bewickii",
|
||||
"Little Bustard"=>"Tetrax tetrax",
|
||||
"Little Crake"=>"Porzana parva",
|
||||
"Baillon`s Crake"=>"Porzana pusilla",
|
||||
"Long-tailed Jaeger"=>"Stercorarius longicaudus",
|
||||
"King Eider"=>"Somateria spectabilis",
|
||||
"Greater Short-toed Lark"=>"Calandrella brachydactyla",
|
||||
"Houbara Bustard"=>"Chlamydotis undulata",
|
||||
"Curlew Sandpiper"=>"Calidris ferruginea",
|
||||
"Common Crossbill"=>"Loxia curvirostra",
|
||||
"European Shag"=>"Phalacrocorax aristotelis",
|
||||
"Horned Grebe"=>"Podiceps auritus",
|
||||
"Common Quail"=>"Coturnix coturnix",
|
||||
"Bearded Vulture"=>"Gypaetus barbatus",
|
||||
"Lanner Falcon"=>"Falco biarmicus",
|
||||
"Middle Spotted Woodpecker"=>"Dendrocopos medius",
|
||||
"Pomarine Jaeger"=>"Stercorarius pomarinus",
|
||||
"Red-breasted Merganser"=>"Mergus serrator",
|
||||
"Eurasian Black Vulture"=>"Aegypius monachus",
|
||||
"Eurasian Dotterel"=>"Charadrius morinellus",
|
||||
"Common Nightingale"=>"Luscinia megarhynchos",
|
||||
"Northern willow warbler"=>"Phylloscopus trochilus acredula",
|
||||
"Manx Shearwater"=>"Puffinus puffinus",
|
||||
"Northern Fulmar"=>"Fulmarus glacialis",
|
||||
"Eurasian Eagle Owl"=>"Bubo bubo",
|
||||
"Orphean Warbler"=>"Sylvia hortensis",
|
||||
"Melodious Warbler"=>"Hippolais polyglotta",
|
||||
"Pallas's Leaf Warbler"=>"Phylloscopus proregulus",
|
||||
"Atlantic Puffin"=>"Fratercula arctica",
|
||||
"Black-throated Loon"=>"Gavia arctica",
|
||||
"Bohemian Waxwing"=>"Bombycilla garrulus",
|
||||
"Marsh Sandpiper"=>"Tringa stagnatilis",
|
||||
"Great Snipe"=>"Gallinago media",
|
||||
"Squacco Heron"=>"Ardeola ralloides",
|
||||
"Long-eared Owl"=>"Asio otus",
|
||||
"Caspian Tern"=>"Hydroprogne caspia",
|
||||
"Red-breasted Goose"=>"Branta ruficollis",
|
||||
"Red-throated Loon"=>"Gavia stellata",
|
||||
"Common Rosefinch"=>"Carpodacus erythrinus",
|
||||
"Red-footed Falcon"=>"Falco vespertinus",
|
||||
"Ross's Goose"=>"Anser rossii",
|
||||
"Red Phalarope"=>"Phalaropus fulicarius",
|
||||
"Pied Wagtail"=>"Motacilla yarrellii",
|
||||
"Rose-coloured Starling"=>"Sturnus roseus",
|
||||
"Rough-legged Buzzard"=>"Buteo lagopus",
|
||||
"Saker Falcon"=>"Falco cherrug",
|
||||
"European Roller"=>"Coracias garrulus",
|
||||
"Short-toed Eagle"=>"Circaetus gallicus",
|
||||
"Peregrine Falcon"=>"Falco peregrinus",
|
||||
"Merlin"=>"Falco columbarius",
|
||||
"Snow Goose"=>"Anser caerulescens",
|
||||
"Snowy Owl"=>"Bubo scandiacus",
|
||||
"Snow Bunting"=>"Plectrophenax nivalis",
|
||||
"Common Grasshopper Warbler"=>"Locustella naevia",
|
||||
"Golden Eagle"=>"Aquila chrysaetos",
|
||||
"Black-winged Stilt"=>"Himantopus himantopus",
|
||||
"Steppe Eagle"=>"Aquila nipalensis",
|
||||
"Pallid Harrier"=>"Circus macrourus",
|
||||
"European Storm-petrel"=>"Hydrobates pelagicus",
|
||||
"Horned Lark"=>"Eremophila alpestris",
|
||||
"Eurasian Treecreeper"=>"Certhia familiaris",
|
||||
"Taiga Bean Goose"=>"Anser fabalis",
|
||||
"Temminck`s Stint"=>"Calidris temminckii",
|
||||
"Terek Sandpiper"=>"Xenus cinereus",
|
||||
"Tundra Bean Goose"=>"Anser serrirostris",
|
||||
"European Turtle Dove"=>"Streptopelia turtur",
|
||||
"Leach`s Storm-petrel"=>"Oceanodroma leucorhoa",
|
||||
"Eurasian Griffon Vulture"=>"Gyps fulvus",
|
||||
"Paddyfield Warbler"=>"Acrocephalus agricola",
|
||||
"Osprey"=>"Pandion haliaetus",
|
||||
"Firecrest"=>"Regulus ignicapilla",
|
||||
"Water Rail"=>"Rallus aquaticus",
|
||||
"European Honey Buzzard"=>"Pernis apivorus",
|
||||
"Eurasian Golden Oriole"=>"Oriolus oriolus",
|
||||
"Whooper Swan"=>"Cygnus cygnus",
|
||||
"Two-barred Crossbill"=>"Loxia leucoptera",
|
||||
"White-tailed Eagle"=>"Haliaeetus albicilla",
|
||||
"Atlantic Murre"=>"Uria aalge",
|
||||
"Garganey"=>"Anas querquedula",
|
||||
"Black Redstart"=>"Phoenicurus ochruros",
|
||||
"Common Scoter"=>"Melanitta nigra",
|
||||
"Rock Pipit"=>"Anthus petrosus",
|
||||
"Lesser Spotted Eagle"=>"Aquila pomarina",
|
||||
"Cattle Egret"=>"Bubulcus ibis",
|
||||
"White-winged Black Tern"=>"Chlidonias leucopterus",
|
||||
"Black Stork"=>"Ciconia nigra",
|
||||
"Mediterranean Gull"=>"Larus melanocephalus",
|
||||
"Black Kite"=>"Milvus migrans",
|
||||
"Yellow Wagtail"=>"Motacilla flavissima",
|
||||
"Red-necked Grebe"=>"Podiceps grisegena",
|
||||
"Gull-billed Tern"=>"Gelochelidon nilotica",
|
||||
"Pectoral Sandpiper"=>"Calidris melanotos",
|
||||
"Barred Warbler"=>"Sylvia nisoria",
|
||||
"Red-throated Pipit"=>"Anthus cervinus",
|
||||
"Grey Wagtail"=>"Motacilla cinerea",
|
||||
"Richard`s Pipit"=>"Anthus richardi",
|
||||
"Black Woodpecker"=>"Dryocopus martius",
|
||||
"Little Ringed Plover"=>"Charadrius dubius",
|
||||
"Whiskered Tern"=>"Chlidonias hybrida",
|
||||
"Lesser Redpoll"=>"Carduelis cabaret",
|
||||
"Pallas' Bunting"=>"Emberiza pallasi",
|
||||
"Ferruginous Duck"=>"Aythya nyroca",
|
||||
"Whistling Swan"=>"Cygnus columbianus",
|
||||
"Black Brant"=>"Branta nigricans",
|
||||
"Marbled Teal"=>"Marmaronetta angustirostris",
|
||||
"Canvasback"=>"Aythya valisineria",
|
||||
"Redhead"=>"Aythya americana",
|
||||
"Lesser Scaup"=>"Aythya affinis",
|
||||
"Steller`s Eider"=>"Polysticta stelleri",
|
||||
"Spectacled Eider"=>"Somateria fischeri",
|
||||
"Harlequin Duck"=>"Histronicus histrionicus",
|
||||
"Black Scoter"=>"Melanitta americana",
|
||||
"Surf Scoter"=>"Melanitta perspicillata",
|
||||
"Barrow`s Goldeneye"=>"Bucephala islandica",
|
||||
"Falcated Duck"=>"Anas falcata",
|
||||
"American Wigeon"=>"Anas americana",
|
||||
"Blue-winged Teal"=>"Anas discors",
|
||||
"American Black Duck"=>"Anas rubripes",
|
||||
"Baikal Teal"=>"Anas formosa",
|
||||
"Green-Winged Teal"=>"Anas carolinensis",
|
||||
"Hazel Grouse"=>"Bonasa bonasia",
|
||||
"Rock Partridge"=>"Alectoris graeca",
|
||||
"Red-legged Partridge"=>"Alectoris rufa",
|
||||
"Yellow-billed Loon"=>"Gavia adamsii",
|
||||
"Cory`s Shearwater"=>"Calonectris borealis",
|
||||
"Madeiran Storm-Petrel"=>"Oceanodroma castro",
|
||||
"Great White Pelican"=>"Pelecanus onocrotalus",
|
||||
"Dalmatian Pelican"=>"Pelecanus crispus",
|
||||
"American Bittern"=>"Botaurus lentiginosus",
|
||||
"Glossy Ibis"=>"Plegadis falcinellus",
|
||||
"Spanish Imperial Eagle"=>"Aquila adalberti",
|
||||
"Lesser Kestrel"=>"Falco naumanni",
|
||||
"Houbara Bustard"=>"Chlamydotis undulata",
|
||||
"Crab-Plover"=>"Dromas ardeola",
|
||||
"Cream-coloured Courser"=>"Cursorius cursor",
|
||||
"Collared Pratincole"=>"Glareola pratincola",
|
||||
"Black-winged Pratincole"=>"Glareola nordmanni",
|
||||
"Killdeer"=>"Charadrius vociferus",
|
||||
"Lesser Sand Plover"=>"Charadrius mongolus",
|
||||
"Greater Sand Plover"=>"Charadrius leschenaultii",
|
||||
"Caspian Plover"=>"Charadrius asiaticus",
|
||||
"American Golden Plover"=>"Pluvialis dominica",
|
||||
"Pacific Golden Plover"=>"Pluvialis fulva",
|
||||
"Sharp-tailed Sandpiper"=>"Calidris acuminata",
|
||||
"Broad-billed Sandpiper"=>"Limicola falcinellus",
|
||||
"Spoon-Billed Sandpiper"=>"Eurynorhynchus pygmaeus",
|
||||
"Short-Billed Dowitcher"=>"Limnodromus griseus",
|
||||
"Long-billed Dowitcher"=>"Limnodromus scolopaceus",
|
||||
"Hudsonian Godwit"=>"Limosa haemastica",
|
||||
"Little Curlew"=>"Numenius minutus",
|
||||
"Lesser Yellowlegs"=>"Tringa flavipes",
|
||||
"Wilson`s Phalarope"=>"Phalaropus tricolor",
|
||||
"Pallas`s Gull"=>"Larus ichthyaetus",
|
||||
"Laughing Gull"=>"Larus atricilla",
|
||||
"Franklin`s Gull"=>"Larus pipixcan",
|
||||
"Bonaparte`s Gull"=>"Larus philadelphia",
|
||||
"Ring-billed Gull"=>"Larus delawarensis",
|
||||
"American Herring Gull"=>"Larus smithsonianus",
|
||||
"Caspian Gull"=>"Larus cachinnans",
|
||||
"Ivory Gull"=>"Pagophila eburnea",
|
||||
"Royal Tern"=>"Sterna maxima",
|
||||
"Brünnich`s Murre"=>"Uria lomvia",
|
||||
"Crested Auklet"=>"Aethia cristatella",
|
||||
"Parakeet Auklet"=>"Cyclorrhynchus psittacula",
|
||||
"Tufted Puffin"=>"Lunda cirrhata",
|
||||
"Laughing Dove"=>"Streptopelia senegalensis",
|
||||
"Great Spotted Cuckoo"=>"Clamator glandarius",
|
||||
"Great Grey Owl"=>"Strix nebulosa",
|
||||
"Tengmalm`s Owl"=>"Aegolius funereus",
|
||||
"Red-Necked Nightjar"=>"Caprimulgus ruficollis",
|
||||
"Chimney Swift"=>"Chaetura pelagica",
|
||||
"Green Bea-Eater"=>"Merops orientalis",
|
||||
"Grey-headed Woodpecker"=>"Picus canus",
|
||||
"Lesser Short-Toed Lark"=>"Calandrella rufescens",
|
||||
"Eurasian Crag Martin"=>"Hirundo rupestris",
|
||||
"Red-rumped Swallow"=>"Cecropis daurica",
|
||||
"Blyth`s Pipit"=>"Anthus godlewskii",
|
||||
"Pechora Pipit"=>"Anthus gustavi",
|
||||
"Grey-headed Wagtail"=>"Motacilla thunbergi",
|
||||
"Yellow-Headed Wagtail"=>"Motacilla lutea",
|
||||
"White-throated Dipper"=>"Cinclus cinclus",
|
||||
"Rufous-Tailed Scrub Robin"=>"Cercotrichas galactotes",
|
||||
"Thrush Nightingale"=>"Luscinia luscinia",
|
||||
"White-throated Robin"=>"Irania gutturalis",
|
||||
"Caspian Stonechat"=>"Saxicola maura variegata",
|
||||
"Western Black-eared Wheatear"=>"Oenanthe hispanica",
|
||||
"Rufous-tailed Rock Thrush"=>"Monticola saxatilis",
|
||||
"Red-throated Thrush/Black-throated"=>"Turdus ruficollis",
|
||||
"American Robin"=>"Turdus migratorius",
|
||||
"Zitting Cisticola"=>"Cisticola juncidis",
|
||||
"Lanceolated Warbler"=>"Locustella lanceolata",
|
||||
"River Warbler"=>"Locustella fluviatilis",
|
||||
"Blyth`s Reed Warbler"=>"Acrocephalus dumetorum",
|
||||
"Caspian Reed Warbler"=>"Acrocephalus fuscus",
|
||||
"Aquatic Warbler"=>"Acrocephalus paludicola",
|
||||
"Booted Warbler"=>"Acrocephalus caligatus",
|
||||
"Marmora's Warbler"=>"Sylvia sarda",
|
||||
"Dartford Warbler"=>"Sylvia undata",
|
||||
"Subalpine Warbler"=>"Sylvia cantillans",
|
||||
"Ménétries's Warbler"=>"Sylvia mystacea",
|
||||
"Rüppel's Warbler"=>"Sylvia rueppelli",
|
||||
"Asian Desert Warbler"=>"Sylvia nana",
|
||||
"Western Orphean Warbler"=>"Sylvia hortensis hortensis",
|
||||
"Arctic Warbler"=>"Phylloscopus borealis",
|
||||
"Radde`s Warbler"=>"Phylloscopus schwarzi",
|
||||
"Western Bonelli`s Warbler"=>"Phylloscopus bonelli",
|
||||
"Red-breasted Flycatcher"=>"Ficedula parva",
|
||||
"Eurasian Penduline Tit"=>"Remiz pendulinus",
|
||||
"Daurian Shrike"=>"Lanius isabellinus",
|
||||
"Long-Tailed Shrike"=>"Lanius schach",
|
||||
"Lesser Grey Shrike"=>"Lanius minor",
|
||||
"Southern Grey Shrike"=>"Lanius meridionalis",
|
||||
"Masked Shrike"=>"Lanius nubicus",
|
||||
"Spotted Nutcracker"=>"Nucifraga caryocatactes",
|
||||
"Daurian Jackdaw"=>"Corvus dauuricus",
|
||||
"Purple-Backed Starling"=>"Sturnus sturninus",
|
||||
"Red-Fronted Serin"=>"Serinus pusillus",
|
||||
"Arctic Redpoll"=>"Carduelis hornemanni",
|
||||
"Scottish Crossbill"=>"Loxia scotica",
|
||||
"Parrot Crossbill"=>"Loxia pytyopsittacus",
|
||||
"Black-faced Bunting"=>"Emberiza spodocephala",
|
||||
"Pink-footed Goose"=>"Anser brachyrhynchus",
|
||||
"Black-winged Kite"=>"Elanus caeruleus",
|
||||
"European Bee-eater"=>"Merops apiaster",
|
||||
"Sabine`s Gull"=>"Larus sabini",
|
||||
"Sooty Shearwater"=>"Puffinus griseus",
|
||||
"Lesser Canada Goose"=>"Branta hutchinsii",
|
||||
"Ring-necked Duck"=>"Aythya collaris",
|
||||
"Greater Flamingo"=>"Phoenicopterus roseus",
|
||||
"Iberian Chiffchaff"=>"Phylloscopus ibericus",
|
||||
"Ashy-headed Wagtail"=>"Motacilla cinereocapilla",
|
||||
"Stilt Sandpiper"=>"Calidris himantopus",
|
||||
"Siberian Stonechat"=>"Saxicola maurus",
|
||||
"Greater Yellowlegs"=>"Tringa melanoleuca",
|
||||
"Forster`s Tern"=>"Sterna forsteri",
|
||||
"Dusky Warbler"=>"Phylloscopus fuscatus",
|
||||
"Cirl Bunting"=>"Emberiza cirlus",
|
||||
"Olive-backed Pipit"=>"Anthus hodgsoni",
|
||||
"Sociable Lapwing"=>"Vanellus gregarius",
|
||||
"Spotted Sandpiper"=>"Actitis macularius",
|
||||
"Baird`s Sandpiper"=>"Calidris bairdii",
|
||||
"Rustic Bunting"=>"Emberiza rustica",
|
||||
"Yellow-browed Bunting"=>"Emberiza chrysophrys",
|
||||
"Great Shearwater"=>"Puffinus gravis",
|
||||
"Bonelli`s Eagle"=>"Aquila fasciata",
|
||||
"Calandra Lark"=>"Melanocorypha calandra",
|
||||
"Sardinian Warbler"=>"Sylvia melanocephala",
|
||||
"Ross's Gull"=>"Larus roseus",
|
||||
"Yellow-Breasted Bunting"=>"Emberiza aureola",
|
||||
"Pine Bunting"=>"Emberiza leucocephalos",
|
||||
"Black Guillemot"=>"Cepphus grylle",
|
||||
"Pied-billed Grebe"=>"Podilymbus podiceps",
|
||||
"Soft-plumaged Petrel"=>"Pterodroma mollis",
|
||||
"Bulwer's Petrel"=>"Bulweria bulwerii",
|
||||
"White-Faced Storm-Petrel"=>"Pelagodroma marina",
|
||||
"Pallas’s Fish Eagle"=>"Haliaeetus leucoryphus",
|
||||
"Sandhill Crane"=>"Grus canadensis",
|
||||
"Macqueen’s Bustard"=>"Chlamydotis macqueenii",
|
||||
"White-tailed Lapwing"=>"Vanellus leucurus",
|
||||
"Great Knot"=>"Calidris tenuirostris",
|
||||
"Semipalmated Sandpiper"=>"Calidris pusilla",
|
||||
"Red-necked Stint"=>"Calidris ruficollis",
|
||||
"Slender-billed Curlew"=>"Numenius tenuirostris",
|
||||
"Bridled Tern"=>"Onychoprion anaethetus",
|
||||
"Pallas’s Sandgrouse"=>"Syrrhaptes paradoxus",
|
||||
"European Scops Owl"=>"Otus scops",
|
||||
"Northern Hawk Owl"=>"Surnia ulula",
|
||||
"White-Throated Needletail"=>"Hirundapus caudacutus",
|
||||
"Belted Kingfisher"=>"Ceryle alcyon",
|
||||
"Blue-cheeked Bee-eater"=>"Merops persicus",
|
||||
"Black-headed Wagtail"=>"Motacilla feldegg",
|
||||
"Northern Mockingbird"=>"Mimus polyglottos",
|
||||
"Alpine Accentor"=>"Prunella collaris",
|
||||
"Red-flanked Bluetail"=>"Tarsiger cyanurus",
|
||||
"Isabelline Wheatear"=>"Oenanthe isabellina",
|
||||
"Pied Wheatear"=>"Oenanthe pleschanka",
|
||||
"Eastern Black-eared Wheatear"=>"Oenanthe melanoleuca",
|
||||
"Desert Wheatear"=>"Oenanthe deserti",
|
||||
"White`s Thrush"=>"Zoothera aurea",
|
||||
"Siberian Thrush"=>"Zoothera sibirica",
|
||||
"Eyebrowed Thrush"=>"Turdus obscurus",
|
||||
"Dusky Thrush"=>"Turdus eunomus",
|
||||
"Black-throated Thrush"=>"Turdus atrogularis",
|
||||
"Pallas`s Grasshopper Warbler"=>"Locustella certhiola",
|
||||
"Spectacled Warbler"=>"Sylvia conspicillata",
|
||||
"Two-barred Warbler"=>"Phylloscopus plumbeitarsus",
|
||||
"Eastern Bonelli’s Warbler"=>"Phylloscopus orientalis",
|
||||
"Collared Flycatcher"=>"Ficedula albicollis",
|
||||
"Wallcreeper"=>"Tichodroma muraria",
|
||||
"Turkestan Shrike"=>"Lanius phoenicuroides",
|
||||
"Steppe Grey Shrike"=>"Lanius pallidirostris",
|
||||
"Spanish Sparrow"=>"Passer hispaniolensis",
|
||||
"Red-eyed Vireo"=>"Vireo olivaceus",
|
||||
"Myrtle Warbler"=>"Dendroica coronata",
|
||||
"White-crowned Sparrow"=>"Zonotrichia leucophrys",
|
||||
"White-throated Sparrow"=>"Zonotrichia albicollis",
|
||||
"Cretzschmar`s Bunting"=>"Emberiza caesia",
|
||||
"Chestnut Bunting"=>"Emberiza rutila",
|
||||
"Red-headed Bunting"=>"Emberiza bruniceps",
|
||||
"Black-headed Bunting"=>"Emberiza melanocephala",
|
||||
"Indigo Bunting"=>"Passerina cyanea",
|
||||
"Balearic Woodchat Shrike"=>"Lanius senator badius",
|
||||
"Demoiselle Crane"=>"Grus virgo",
|
||||
"Chough"=>"Pyrrhocorax pyrrhocorax",
|
||||
"Red-Billed Chough"=>"Pyrrhocorax graculus",
|
||||
"Elegant Tern"=>"Sterna elegans",
|
||||
"Chukar"=>"Alectoris chukar",
|
||||
"Yellow-Billed Cuckoo"=>"Coccyzus americanus",
|
||||
"American Sandwich Tern"=>"Sterna sandvicensis acuflavida",
|
||||
"Olive-Tree Warbler"=>"Hippolais olivetorum",
|
||||
"Eastern Olivaceous Warbler"=>"Acrocephalus pallidus",
|
||||
"Indian Cormorant"=>"Phalacrocorax fuscicollis",
|
||||
"Spur-Winged Lapwing"=>"Vanellus spinosus",
|
||||
"Yelkouan Shearwater"=>"Puffinus yelkouan",
|
||||
"Trumpeter Finch"=>"Bucanetes githagineus",
|
||||
"Red Grouse"=>"Lagopus scoticus",
|
||||
"Rock Ptarmigan"=>"Lagopus mutus",
|
||||
"Long-Tailed Cormorant"=>"Phalacrocorax africanus",
|
||||
"Double-crested Cormorant"=>"Phalacrocorax auritus",
|
||||
"Magnificent Frigatebird"=>"Fregata magnificens",
|
||||
"Naumann's Thrush"=>"Turdus naumanni",
|
||||
"Oriental Pratincole"=>"Glareola maldivarum",
|
||||
"Bufflehead"=>"Bucephala albeola",
|
||||
"Snowfinch"=>"Montifrigilla nivalis",
|
||||
"Ural owl"=>"Strix uralensis",
|
||||
"Spanish Wagtail"=>"Motacilla iberiae",
|
||||
"Song Sparrow"=>"Melospiza melodia",
|
||||
"Rock Bunting"=>"Emberiza cia",
|
||||
"Siberian Rubythroat"=>"Luscinia calliope",
|
||||
"Pallid Swift"=>"Apus pallidus",
|
||||
"Eurasian Pygmy Owl"=>"Glaucidium passerinum",
|
||||
"Madeira Little Shearwater"=>"Puffinus baroli",
|
||||
"House Finch"=>"Carpodacus mexicanus",
|
||||
"Green Heron"=>"Butorides virescens",
|
||||
"Solitary Sandpiper"=>"Tringa solitaria",
|
||||
"Heuglin's Gull"=>"Larus heuglini"
|
||||
);
|
||||
|
||||
function array_to_json( $array ){
|
||||
|
||||
if( !is_array( $array ) ){
|
||||
return false;
|
||||
}
|
||||
|
||||
$associative = count( array_diff( array_keys($array), array_keys( array_keys( $array )) ));
|
||||
if( $associative ){
|
||||
|
||||
$construct = array();
|
||||
foreach( $array as $key => $value ){
|
||||
|
||||
// We first copy each key/value pair into a staging array,
|
||||
// formatting each key and value properly as we go.
|
||||
|
||||
// Format the key:
|
||||
if( is_numeric($key) ){
|
||||
$key = "key_$key";
|
||||
}
|
||||
$key = "\"".addslashes($key)."\"";
|
||||
|
||||
// Format the value:
|
||||
if( is_array( $value )){
|
||||
$value = array_to_json( $value );
|
||||
} else if( !is_numeric( $value ) || is_string( $value ) ){
|
||||
$value = "\"".addslashes($value)."\"";
|
||||
}
|
||||
|
||||
// Add to staging array:
|
||||
$construct[] = "$key: $value";
|
||||
}
|
||||
|
||||
// Then we collapse the staging array into the JSON form:
|
||||
$result = "{ " . implode( ", ", $construct ) . " }";
|
||||
|
||||
} else { // If the array is a vector (not associative):
|
||||
|
||||
$construct = array();
|
||||
foreach( $array as $value ){
|
||||
|
||||
// Format the value:
|
||||
if( is_array( $value )){
|
||||
$value = array_to_json( $value );
|
||||
} else if( !is_numeric( $value ) || is_string( $value ) ){
|
||||
$value = "'".addslashes($value)."'";
|
||||
}
|
||||
|
||||
// Add to staging array:
|
||||
$construct[] = $value;
|
||||
}
|
||||
|
||||
// Then we collapse the staging array into the JSON form:
|
||||
$result = "[ " . implode( ", ", $construct ) . " ]";
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
$result = array();
|
||||
foreach ($items as $key=>$value) {
|
||||
if (strpos(strtolower($key), $q) !== false) {
|
||||
array_push($result, array("id"=>$value, "label"=>$key, "value" => strip_tags($key)));
|
||||
}
|
||||
if (count($result) > 11)
|
||||
break;
|
||||
}
|
||||
echo array_to_json($result);
|
||||
|
||||
?>
|
|
@ -0,0 +1,72 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Autocomplete - XML data parsed once</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.autocomplete.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
function log( message ) {
|
||||
$( "<div/>" ).text( message ).prependTo( "#log" );
|
||||
$( "#log" ).attr( "scrollTop", 0 );
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: "london.xml",
|
||||
dataType: "xml",
|
||||
success: function( xmlResponse ) {
|
||||
var data = $( "geoname", xmlResponse ).map(function() {
|
||||
return {
|
||||
value: $( "name", this ).text() + ", " +
|
||||
( $.trim( $( "countryName", this ).text() ) || "(unknown country)" ),
|
||||
id: $( "geonameId", this ).text()
|
||||
};
|
||||
}).get();
|
||||
$( "#birds" ).autocomplete({
|
||||
source: data,
|
||||
minLength: 0,
|
||||
select: function( event, ui ) {
|
||||
log( ui.item ?
|
||||
"Selected: " + ui.item.value + ", geonameId: " + ui.item.id :
|
||||
"Nothing selected, input was " + this.value );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div class="ui-widget">
|
||||
<label for="birds">London matches: </label>
|
||||
<input id="birds" />
|
||||
</div>
|
||||
|
||||
<div class="ui-widget" style="margin-top:2em; font-family:Arial">
|
||||
Result:
|
||||
<div id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>This demo shows how to retrieve some XML data, parse it using jQuery's methods, then provide it to the autocomplete as the datasource.</p>
|
||||
<p>This should also serve as a reference on how to parse a remote XML datasource - the parsing would just happen for each request within the source-callback.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Button - Checkboxes</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#check" ).button();
|
||||
$( "#format" ).buttonset();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
#format { margin-top: 2em; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<input type="checkbox" id="check" /><label for="check">Toggle</label>
|
||||
|
||||
<div id="format">
|
||||
<input type="checkbox" id="check1" /><label for="check1">B</label>
|
||||
<input type="checkbox" id="check2" /><label for="check2">I</label>
|
||||
<input type="checkbox" id="check3" /><label for="check3">U</label>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>A checkbox is styled as a toggle button with the button widget. The label element associated with the checkbox is used for the button text.</p>
|
||||
<p>This demo also demonstrates three checkboxes styled as a button set by calling <code>.buttonset()</code> on a common container.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Button - Default functionality</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "button, input:submit, a", ".demo" ).button();
|
||||
$( "a", ".demo" ).click(function() { return false; });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<button>A button element</button>
|
||||
|
||||
<input type="submit" value="A submit button"/>
|
||||
|
||||
<a href="#">An anchor</a>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Examples of the markup that can be used for buttons: A button element, an input of type submit and an anchor.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Button - Icons</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( ".demo button:first" ).button({
|
||||
icons: {
|
||||
primary: "ui-icon-locked"
|
||||
},
|
||||
text: false
|
||||
}).next().button({
|
||||
icons: {
|
||||
primary: "ui-icon-locked"
|
||||
}
|
||||
}).next().button({
|
||||
icons: {
|
||||
primary: "ui-icon-gear",
|
||||
secondary: "ui-icon-triangle-1-s"
|
||||
}
|
||||
}).next().button({
|
||||
icons: {
|
||||
primary: "ui-icon-gear",
|
||||
secondary: "ui-icon-triangle-1-s"
|
||||
},
|
||||
text: false
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<button>Button with icon only</button>
|
||||
<button>Button with icon on the left</button>
|
||||
<button>Button with two icons</button>
|
||||
<button>Button with two icons and no text</button>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Some buttons with various combinations of text and icons, here specified via metadata.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Button Demos</title>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demos-nav">
|
||||
<h4>Examples</h4>
|
||||
<ul>
|
||||
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
|
||||
<li><a href="radio.html">Radios</a></li>
|
||||
<li><a href="checkbox.html">Checkboxes</a></li>
|
||||
<li><a href="icons.html">Icons</a></li>
|
||||
<li><a href="toolbar.html">Toolbar</a></li>
|
||||
<li><a href="splitbutton.html">Split Button</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Button - Radios</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#radio" ).buttonset();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<form>
|
||||
<div id="radio">
|
||||
<input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
|
||||
<input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label>
|
||||
<input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>A set of three radio buttons transformed into a button set.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,55 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Button - Split button</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#rerun" )
|
||||
.button()
|
||||
.click(function() {
|
||||
alert( "Running the last action" );
|
||||
})
|
||||
.next()
|
||||
.button( {
|
||||
text: false,
|
||||
icons: {
|
||||
primary: "ui-icon-triangle-1-s"
|
||||
}
|
||||
})
|
||||
.click(function() {
|
||||
alert( "Could display a menu to select an action" );
|
||||
})
|
||||
.parent()
|
||||
.buttonset();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div>
|
||||
<button id="rerun">Run last action</button>
|
||||
<button id="select">Select an action</button>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>An example of a split button built with two buttons: A plan button with just text, one with only a primary icon and no text. Both are grouped together in a set.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
120
public/javascripts/jquery/jquery-ui/development-bundle/demos/button/toolbar.html
Executable file
|
@ -0,0 +1,120 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Button - Toolbar</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#toolbar {
|
||||
padding: 10px 4px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#beginning" ).button({
|
||||
text: false,
|
||||
icons: {
|
||||
primary: "ui-icon-seek-start"
|
||||
}
|
||||
});
|
||||
$( "#rewind" ).button({
|
||||
text: false,
|
||||
icons: {
|
||||
primary: "ui-icon-seek-prev"
|
||||
}
|
||||
});
|
||||
$( "#play" ).button({
|
||||
text: false,
|
||||
icons: {
|
||||
primary: "ui-icon-play"
|
||||
}
|
||||
})
|
||||
.click(function() {
|
||||
var options;
|
||||
if ( $( this ).text() === "play" ) {
|
||||
options = {
|
||||
label: "pause",
|
||||
icons: {
|
||||
primary: "ui-icon-pause"
|
||||
}
|
||||
};
|
||||
} else {
|
||||
options = {
|
||||
label: "play",
|
||||
icons: {
|
||||
primary: "ui-icon-play"
|
||||
}
|
||||
};
|
||||
}
|
||||
$( this ).button( "option", options );
|
||||
});
|
||||
$( "#stop" ).button({
|
||||
text: false,
|
||||
icons: {
|
||||
primary: "ui-icon-stop"
|
||||
}
|
||||
})
|
||||
.click(function() {
|
||||
$( "#play" ).button( "option", {
|
||||
label: "play",
|
||||
icons: {
|
||||
primary: "ui-icon-play"
|
||||
}
|
||||
});
|
||||
});
|
||||
$( "#forward" ).button({
|
||||
text: false,
|
||||
icons: {
|
||||
primary: "ui-icon-seek-next"
|
||||
}
|
||||
});
|
||||
$( "#end" ).button({
|
||||
text: false,
|
||||
icons: {
|
||||
primary: "ui-icon-seek-end"
|
||||
}
|
||||
});
|
||||
$( "#shuffle" ).button();
|
||||
$( "#repeat" ).buttonset();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<span id="toolbar" class="ui-widget-header ui-corner-all">
|
||||
<button id="beginning">go to beginning</button>
|
||||
<button id="rewind">rewind</button>
|
||||
<button id="play">play</button>
|
||||
<button id="stop">stop</button>
|
||||
<button id="forward">fast forward</button>
|
||||
<button id="end">go to end</button>
|
||||
|
||||
<input type="checkbox" id="shuffle" /><label for="shuffle">Shuffle</label>
|
||||
|
||||
<span id="repeat">
|
||||
<input type="radio" id="repeat0" name="repeat" checked="checked" /><label for="repeat0">No Repeat</label>
|
||||
<input type="radio" id="repeat1" name="repeat" /><label for="repeat1">Once</label>
|
||||
<input type="radio" id="repeatall" name="repeat" /><label for="repeatall">All</label>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>
|
||||
A mediaplayer toolbar. Take a look at the underlying markup: A few button elements,
|
||||
an input of type checkbox for the Shuffle button, and three inputs of type radio for the Repeat options.
|
||||
</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Populate alternate field</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker({
|
||||
altField: "#alternate",
|
||||
altFormat: "DD, d MM, yy"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker"> <input type="text" id="alternate" size="30"/></p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Populate an alternate field with its own date format whenever a date is selected using the <code>altField</code> and <code>altFormat</code> options. This feature could be used to present a human-friendly date for user selection, while passing a more computer-friendly date through for further processing.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,58 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Animations</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.effects.core.js"></script>
|
||||
<script src="../../ui/jquery.effects.blind.js"></script>
|
||||
<script src="../../ui/jquery.effects.bounce.js"></script>
|
||||
<script src="../../ui/jquery.effects.clip.js"></script>
|
||||
<script src="../../ui/jquery.effects.drop.js"></script>
|
||||
<script src="../../ui/jquery.effects.fold.js"></script>
|
||||
<script src="../../ui/jquery.effects.slide.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker();
|
||||
$( "#anim" ).change(function() {
|
||||
$( "#datepicker" ).datepicker( "option", "showAnim", $( this ).val() );
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker" size="30"/></p>
|
||||
|
||||
<p>Animations:<br />
|
||||
<select id="anim">
|
||||
<option value="show">Show (default)</option>
|
||||
<option value="slideDown">Slide down</option>
|
||||
<option value="fadeIn">Fade in</option>
|
||||
<option value="blind">Blind (UI Effect)</option>
|
||||
<option value="bounce">Bounce (UI Effect)</option>
|
||||
<option value="clip">Clip (UI Effect)</option>
|
||||
<option value="drop">Drop (UI Effect)</option>
|
||||
<option value="fold">Fold (UI Effect)</option>
|
||||
<option value="slide">Slide (UI Effect)</option>
|
||||
<option value="">None</option>
|
||||
</select>
|
||||
</p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Use different animations when opening or closing the datepicker. Choose an animation from the dropdown, then click on the input to see its effect. You can use one of the three standard animations or any of the UI Effects.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Display button bar</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker({
|
||||
showButtonPanel: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker"></p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Display a button for selecting Today's date and a Done button for closing the calendar with the boolean <code>showButtonPanel</code> option. Each button is enabled by default when the bar is displayed, but can be turned off with additional options. Button text is customizable.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,47 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Format date</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker();
|
||||
$( "#format" ).change(function() {
|
||||
$( "#datepicker" ).datepicker( "option", "dateFormat", $( this ).val() );
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker" size="30"/></p>
|
||||
|
||||
<p>Format options:<br />
|
||||
<select id="format">
|
||||
<option value="mm/dd/yy">Default - mm/dd/yy</option>
|
||||
<option value="yy-mm-dd">ISO 8601 - yy-mm-dd</option>
|
||||
<option value="d M, y">Short - d M, y</option>
|
||||
<option value="d MM, y">Medium - d MM, y</option>
|
||||
<option value="DD, d MM, yy">Full - DD, d MM, yy</option>
|
||||
<option value="'day' d 'of' MM 'in the year' yy">With text - 'day' d 'of' MM 'in the year' yy</option>
|
||||
</select>
|
||||
</p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Display date feedback in a variety of ways. Choose a date format from the dropdown, then click on the input and select a date to see it in that format.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Select a Date Range</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
var dates = $( "#from, #to" ).datepicker({
|
||||
defaultDate: "+1w",
|
||||
changeMonth: true,
|
||||
numberOfMonths: 3,
|
||||
onSelect: function( selectedDate ) {
|
||||
var option = this.id == "from" ? "minDate" : "maxDate",
|
||||
instance = $( this ).data( "datepicker" ),
|
||||
date = $.datepicker.parseDate(
|
||||
instance.settings.dateFormat ||
|
||||
$.datepicker._defaults.dateFormat,
|
||||
selectedDate, instance.settings );
|
||||
dates.not( this ).datepicker( "option", option, date );
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<label for="from">From</label>
|
||||
<input type="text" id="from" name="from"/>
|
||||
<label for="to">to</label>
|
||||
<input type="text" id="to" name="to"/>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Select the date range to search for.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Default functionality</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker"></p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay. Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as the input's value.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Display month & year menus</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker({
|
||||
changeMonth: true,
|
||||
changeYear: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker"></p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Show month and year dropdowns in place of the static month/year header to facilitate navigation through large timeframes. Add the boolean <code>changeMonth</code> and <code>changeYear</code> options.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Icon trigger</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker({
|
||||
showOn: "button",
|
||||
buttonImage: "images/calendar.gif",
|
||||
buttonImageOnly: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker"></p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Click the icon next to the input field to show the datepicker. Set the datepicker to open on focus (default behavior), on icon click, or both.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 269 B |
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker Demos</title>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demos-nav">
|
||||
<h4>Examples</h4>
|
||||
<ul>
|
||||
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
|
||||
<li><a href="date-formats.html">Format date</a></li>
|
||||
<li><a href="min-max.html">Restrict date range</a></li>
|
||||
<li><a href="localization.html">Localize calendar</a></li>
|
||||
<li><a href="alt-field.html">Populate alternate field</a></li>
|
||||
<li><a href="inline.html">Display inline</a></li>
|
||||
<li><a href="buttonbar.html">Display button bar</a></li>
|
||||
<li><a href="dropdown-month-year.html">Display month & year menus</a></li>
|
||||
<li><a href="other-months.html">Dates in other months</a></li>
|
||||
<li><a href="show-week.html">Show week of the year</a></li>
|
||||
<li><a href="multiple-calendars.html">Display multiple months</a></li>
|
||||
<li><a href="icon-trigger.html">Icon trigger</a></li>
|
||||
<li><a href="animation.html">Animations</a></li>
|
||||
<li><a href="date-range.html">Date Range</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Display inline</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
Date: <div id="datepicker"></div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Display the datepicker embedded in the page instead of in an overlay. Simply call .datepicker() on a div instead of an input.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,162 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Localize calendar</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-af.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-ar.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-ar-DZ.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-az.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-bg.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-bs.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-ca.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-cs.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-da.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-de.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-el.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-en-AU.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-en-GB.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-en-NZ.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-eo.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-es.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-et.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-eu.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-fa.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-fi.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-fo.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-fr.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-fr-CH.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-gl.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-he.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-hr.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-hu.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-hy.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-id.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-is.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-it.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-ja.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-ko.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-kz.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-lt.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-lv.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-ml.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-ms.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-nl.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-no.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-pl.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-pt.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-pt-BR.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-rm.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-ro.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-ru.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-sk.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-sl.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-sq.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-sr.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-sr-SR.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-sv.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-ta.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-th.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-tj.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-tr.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-uk.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-vi.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-zh-CN.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-zh-HK.js"></script>
|
||||
<script src="../../ui/i18n/jquery.ui.datepicker-zh-TW.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$.datepicker.setDefaults( $.datepicker.regional[ "" ] );
|
||||
$( "#datepicker" ).datepicker( $.datepicker.regional[ "fr" ] );
|
||||
$( "#locale" ).change(function() {
|
||||
$( "#datepicker" ).datepicker( "option",
|
||||
$.datepicker.regional[ $( this ).val() ] );
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker"/>
|
||||
<select id="locale">
|
||||
<option value="af">Afrikaans</option>
|
||||
<option value="sq">Albanian (Gjuha shqipe)</option>
|
||||
<option value="ar-DZ">Algerian Arabic</option>
|
||||
<option value="ar">Arabic (‫(لعربي</option>
|
||||
<option value="hy">Armenian (Հայերեն)</option>
|
||||
<option value="az">Azerbaijani (Azərbaycan dili)</option>
|
||||
<option value="eu">Basque (Euskara)</option>
|
||||
<option value="bs">Bosnian (Bosanski)</option>
|
||||
<option value="bg">Bulgarian (български език)</option>
|
||||
<option value="ca">Catalan (Català)</option>
|
||||
<option value="zh-HK">Chinese Hong Kong (繁體中文)</option>
|
||||
<option value="zh-CN">Chinese Simplified (简体中文)</option>
|
||||
<option value="zh-TW">Chinese Traditional (繁體中文)</option>
|
||||
<option value="hr">Croatian (Hrvatski jezik)</option>
|
||||
<option value="cs">Czech (čeština)</option>
|
||||
<option value="da">Danish (Dansk)</option>
|
||||
<option value="nl">Dutch (Nederlands)</option>
|
||||
<option value="en-AU">English/Australia</option>
|
||||
<option value="en-NZ">English/New Zealand</option>
|
||||
<option value="en-GB">English/UK</option>
|
||||
<option value="eo">Esperanto</option>
|
||||
<option value="et">Estonian (eesti keel)</option>
|
||||
<option value="fo">Faroese (føroyskt)</option>
|
||||
<option value="fa">Farsi/Persian (‫(فارسی</option>
|
||||
<option value="fi">Finnish (suomi)</option>
|
||||
<option value="fr" selected="selected">French (Français)</option>
|
||||
<option value="fr-CH">French/Swiss (Français de Suisse)</option>
|
||||
<option value="gl">Galician</option>
|
||||
<option value="de">German (Deutsch)</option>
|
||||
<option value="el">Greek (Ελληνικά)</option>
|
||||
<option value="he">Hebrew (‫(עברית</option>
|
||||
<option value="hu">Hungarian (Magyar)</option>
|
||||
<option value="is">Icelandic (Õslenska)</option>
|
||||
<option value="id">Indonesian (Bahasa Indonesia)</option>
|
||||
<option value="it">Italian (Italiano)</option>
|
||||
<option value="ja">Japanese (日本語)</option>
|
||||
<option value="ko">Korean (한국어)</option>
|
||||
<option value="kz">Kazakhstan (Kazakh)</option>
|
||||
<option value="lv">Latvian (Latvieöu Valoda)</option>
|
||||
<option value="lt">Lithuanian (lietuviu kalba)</option>
|
||||
<option value="ml">Malayalam</option>
|
||||
<option value="ms">Malaysian (Bahasa Malaysia)</option>
|
||||
<option value="no">Norwegian (Norsk)</option>
|
||||
<option value="pl">Polish (Polski)</option>
|
||||
<option value="pt">Portuguese (Português)</option>
|
||||
<option value="pt-BR">Portuguese/Brazilian (Português)</option>
|
||||
<option value="rm">Rhaeto-Romanic (Romansh)</option>
|
||||
<option value="ro">Romanian (Română)</option>
|
||||
<option value="ru">Russian (Русский)</option>
|
||||
<option value="sr">Serbian (српски језик)</option>
|
||||
<option value="sr-SR">Serbian (srpski jezik)</option>
|
||||
<option value="sk">Slovak (Slovencina)</option>
|
||||
<option value="sl">Slovenian (Slovenski Jezik)</option>
|
||||
<option value="es">Spanish (Español)</option>
|
||||
<option value="sv">Swedish (Svenska)</option>
|
||||
<option value="ta">Tamil (தமிழ்)</option>
|
||||
<option value="th">Thai (ภาษาไทย)</option>
|
||||
<option value="tj">Tajikistan</option>
|
||||
<option value="tr">Turkish (Türkçe)</option>
|
||||
<option value="uk">Ukranian (Українська)</option>
|
||||
<option value="vi">Vietnamese (Tiếng Việt)</option>
|
||||
</select></p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Localize the datepicker calendar language and format (English / Western formatting is the default). The datepicker includes built-in support for languages that read right-to-left, such as Arabic and Hebrew.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Restrict date range</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker({ minDate: -20, maxDate: "+1M +10D" });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker"></p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Restrict the range of selectable dates with the <code>minDate</code> and <code>maxDate</code> options. Set the beginning and end dates as actual dates (new Date(2009, 1 - 1, 26)), as a numeric offset from today (-20), or as a string of periods and units ('+1M +10D'). For the last, use 'D' for days, 'W' for weeks, 'M' for months, or 'Y' for years.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Display multiple months</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker({
|
||||
numberOfMonths: 3,
|
||||
showButtonPanel: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker"></p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Set the <code>numberOfMonths</code> option to an integer of 2 or more to show multiple months in a single datepicker.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,37 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Dates in other months</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker({
|
||||
showOtherMonths: true,
|
||||
selectOtherMonths: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker"></p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>The datepicker can show dates that come from other than the main month
|
||||
being displayed. These other dates can also be made selectable.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Datepicker - Show week of the year</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.datepicker.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#datepicker" ).datepicker({
|
||||
showWeek: true,
|
||||
firstDay: 1
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<p>Date: <input type="text" id="datepicker"></p>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>The datepicker can show the week of the year. The default calculation follows
|
||||
the ISO 8601 definition: the week starts on Monday, the first week of the year
|
||||
contains the first Thursday of the year. This means that some days from one
|
||||
year may be placed into weeks 'belonging' to another year.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,334 @@
|
|||
body {
|
||||
font-size: 62.5%;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* Site
|
||||
-------------------------------- */
|
||||
|
||||
body {
|
||||
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
|
||||
}
|
||||
|
||||
/* Layout
|
||||
-------------------------------- */
|
||||
|
||||
.layout-grid {
|
||||
width: 960px;
|
||||
}
|
||||
|
||||
.layout-grid td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.layout-grid td.left-nav {
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.layout-grid td.normal {
|
||||
border-left: 1px solid #eee;
|
||||
padding: 20px 24px;
|
||||
font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
|
||||
}
|
||||
|
||||
.layout-grid td.demos {
|
||||
background: url('/images/demos_bg.jpg') no-repeat;
|
||||
height: 337px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Normal
|
||||
-------------------------------- */
|
||||
|
||||
.normal h3,
|
||||
.normal h4 {
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.normal h3 {
|
||||
padding: 0 0 9px;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
.normal h4 {
|
||||
padding-bottom: 21px;
|
||||
border-bottom: 1px dashed #999;
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.normal p {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* Demos */
|
||||
|
||||
.demos-nav, .demos-nav dt, .demos-nav dd, .demos-nav ul, .demos-nav li {
|
||||
margin: 0;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
.demos-nav {
|
||||
float: left;
|
||||
width: 170px;
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.demos-nav dt,
|
||||
.demos-nav h4 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font: normal 1.1em "Trebuchet MS", "Helvetica", "Arial", "Verdana", "sans-serif";
|
||||
color: #e87b10;
|
||||
}
|
||||
|
||||
.demos-nav dt,
|
||||
.demos-nav h4 {
|
||||
margin-top: 1.5em;
|
||||
margin-bottom: 0;
|
||||
padding-left: 8px;
|
||||
padding-bottom:5px;
|
||||
line-height: 1.2em;
|
||||
border-bottom: 1px solid #F4F4F4;
|
||||
}
|
||||
|
||||
.demos-nav dd a,
|
||||
.demos-nav li a {
|
||||
border-bottom: 1px solid #F4F4F4;
|
||||
display:block;
|
||||
padding: 4px 3px 4px 8px;
|
||||
font-size: 90%;
|
||||
text-decoration: none;
|
||||
color: #555 ;
|
||||
margin:2px 0;
|
||||
height:13px;
|
||||
}
|
||||
|
||||
.demos-nav dd a:hover,
|
||||
.demos-nav dd a:focus,
|
||||
.demos-nav dd a:hover,
|
||||
.demos-nav dd a:focus {
|
||||
background: #f3f3f3;
|
||||
color:#000;
|
||||
-moz-border-radius: 5px; -webkit-border-radius: 5px;
|
||||
}
|
||||
.demos-nav dd a.selected {
|
||||
background: #555;
|
||||
color:#ffffff;
|
||||
-moz-border-radius: 5px; -webkit-border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* new styles for demo pages, added by Filament 12.29.08
|
||||
eventually we should convert the font sizes to ems -- using px for now to minimize style conflicts
|
||||
*/
|
||||
|
||||
.normal h3.demo-header { font-size:32px; padding:0 0 5px; border-bottom:1px solid #eee; text-transform: capitalize; }
|
||||
.normal h4.demo-subheader { font-size:10px; text-transform: uppercase; color:#999; padding:8px 0 3px; border:0; margin:0; }
|
||||
.normal a:link,
|
||||
.normal a:visited { color:#1b75bb; text-decoration:none; }
|
||||
.normal a:hover,
|
||||
.normal a:active { color:#0b559b; }
|
||||
|
||||
#demo-config { padding:20px 0 0; }
|
||||
|
||||
#demo-frame { float:left; width:540px; height:380px; border:1px solid #ddd; overflow: auto; position: relative; }
|
||||
#demo-frame h3, #demo-frame h4 { padding: 0; font-weight: bold; font-size: 1em; }
|
||||
|
||||
#demo-config-menu { float:right; width:180px; }
|
||||
#demo-config-menu h4 { font-size:13px; color:#666; font-weight:normal; border:0; padding-left:18px; }
|
||||
|
||||
#demo-config-menu ul { list-style: none; padding: 0; margin: 0; }
|
||||
|
||||
#demo-config-menu li { font-size:12px; padding:0 0 0 10px; margin:3px 0; zoom: 1; }
|
||||
|
||||
#demo-config-menu li a:link,
|
||||
#demo-config-menu li a:visited { display:block; padding:1px 8px 4px; border-bottom:1px dotted #b3b3b3; }
|
||||
* html #demo-config-menu li a:link,
|
||||
* html #demo-config-menu li a:visited { padding:1px 8px 2px; }
|
||||
#demo-config-menu li a:hover,
|
||||
#demo-config-menu li a:active { background-color:#f6f6f6; }
|
||||
|
||||
#demo-config-menu li.demo-config-on { background: url(images/demo-config-on-tile.gif) repeat-x left center; }
|
||||
|
||||
#demo-config-menu li.demo-config-on a:link,
|
||||
#demo-config-menu li.demo-config-on a:visited,
|
||||
#demo-config-menu li.demo-config-on a:hover,
|
||||
#demo-config-menu li.demo-config-on a:active { background: url(images/demo-config-on.gif) no-repeat left; padding-left:18px; color:#fff; border:0; margin-left:-10px; margin-top: 0px; margin-bottom: 0px; }
|
||||
|
||||
#demo-source, #demo-notes {
|
||||
clear: both;
|
||||
padding: 20px 0 0;
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
#demo-notes { width:520px; color:#333; font-size: 1em; }
|
||||
#demo-notes p code, .demo-description p code { padding: 0; font-weight: bold; }
|
||||
#demo-source pre, #demo-source code { padding: 0; }
|
||||
code, pre { padding:8px 0 8px 20px ; font-size: 1.2em; line-height:130%; }
|
||||
|
||||
#demo-source a:link,
|
||||
#demo-source a:visited,
|
||||
#demo-source a:hover,
|
||||
#demo-source a:active { font-size:12px; padding-left:13px; background-position: left center; background-repeat: no-repeat; }
|
||||
|
||||
#demo-source a.source-open:link,
|
||||
#demo-source a.source-open:visited,
|
||||
#demo-source a.source-open:hover,
|
||||
#demo-source a.source-open:active { background-image: url(images/demo-spindown-open.gif); }
|
||||
|
||||
#demo-source a.source-closed:link,
|
||||
#demo-source a.source-closed:visited,
|
||||
#demo-source a.source-closed:hover,
|
||||
#demo-source a.source-closed:active { background-image: url(images/demo-spindown-closed.gif); }
|
||||
|
||||
div.demo {
|
||||
padding:12px;
|
||||
font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif";
|
||||
}
|
||||
|
||||
div.demo h3.docs { clear:left; font-size:12px; font-weight:normal; padding:0 0 1em; margin:0; }
|
||||
|
||||
div.demo-description {
|
||||
clear:both;
|
||||
padding:12px;
|
||||
font-family: "Trebuchet MS", "Arial", "Helvetica", "Verdana", "sans-serif";
|
||||
font-size: 1.3em;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
.ui-draggable, .ui-droppable {
|
||||
background-position: top left;
|
||||
}
|
||||
|
||||
.left-nav .demos-nav {
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#demo-link { font-size:11px; padding-top: 6px; clear: both; overflow: hidden; }
|
||||
#demo-link a span.ui-icon { float:left; margin-right:3px; }
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
#widget-docs .ui-widget { font-family: Trebuchet MS,Verdana,Arial,sans-serif; font-size: 1em; }
|
||||
#widget-docs .ui-widget input, #widget-docs .ui-widget select, #widget-docs .ui-widget textarea, #widget-docs .ui-widget button { font-family: Trebuchet MS,Verdana,Arial,sans-serif; font-size: 1em; }
|
||||
#widget-docs .ui-widget-header { border: 1px solid #ffffff; background: #464646 url(images/464646_40x100_textures_01_flat_100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
|
||||
#widget-docs .ui-widget-header a { color: #ffffff; }
|
||||
#widget-docs .ui-widget-content { border: 1px solid #ffffff; background: #ffffff url(images/ffffff_40x100_textures_01_flat_75.png) 50% 50% repeat-x; color: #222222; }
|
||||
#widget-docs .ui-widget-content a { color: #222222; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
#widget-docs .ui-state-default, #widget-docs .ui-widget-content #widget-docs .ui-state-default { border: 1px solid #666666; background: #555555 url(images/555555_40x100_textures_03_highlight_soft_75.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; outline: none; }
|
||||
#widget-docs .ui-state-default a { color: #ffffff; text-decoration: none; outline: none; }
|
||||
#widget-docs .ui-state-hover, #widget-docs .ui-widget-content #widget-docs .ui-state-hover, #widget-docs .ui-state-focus, #widget-docs .ui-widget-content #widget-docs .ui-state-focus { border: 1px solid #666666; background: #444444 url(images/444444_40x100_textures_03_highlight_soft_60.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; outline: none; }
|
||||
#widget-docs .ui-state-hover a { color: #ffffff; text-decoration: none; outline: none; }
|
||||
#widget-docs .ui-state-active, #widget-docs .ui-widget-content #widget-docs .ui-state-active { border: 1px solid #666666; background: #ffffff url(images/ffffff_40x100_textures_01_flat_65.png) 50% 50% repeat-x; font-weight: normal; color: #F6921E; outline: none; }
|
||||
#widget-docs .ui-state-active a { color: #F6921E; outline: none; text-decoration: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
#widget-docs .ui-state-highlight, #widget-docs .ui-widget-content #widget-docs .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/fbf9ee_40x100_textures_02_glass_55.png) 50% 50% repeat-x; color: #363636; }
|
||||
#widget-docs .ui-state-error, #widget-docs .ui-widget-content #widget-docs .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/fef1ec_40x100_textures_05_inset_soft_95.png) 50% bottom repeat-x; color: #cd0a0a; }
|
||||
#widget-docs .ui-state-error-text, #widget-docs .ui-widget-content #widget-docs .ui-state-error-text { color: #cd0a0a; }
|
||||
#widget-docs .ui-state-disabled, #widget-docs .ui-widget-content #widget-docs .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
#widget-docs .ui-priority-primary, #widget-docs .ui-widget-content #widget-docs .ui-priority-primary { font-weight: bold; }
|
||||
#widget-docs .ui-priority-secondary, #widget-docs .ui-widget-content #widget-docs .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
#demo-frame-wrapper .ui-icon, #widget-docs .ui-icon { width: 16px; height: 16px; background-image: url(images/222222_256x240_icons_icons.png); }
|
||||
#widget-docs .ui-widget-content .ui-icon {background-image: url(images/222222_256x240_icons_icons.png); }
|
||||
#widget-docs .ui-widget-header .ui-icon {background-image: url(images/222222_256x240_icons_icons.png); }
|
||||
#widget-docs .ui-state-default .ui-icon { background-image: url(images/888888_256x240_icons_icons.png); }
|
||||
#widget-docs .ui-state-hover .ui-icon, #widget-docs .ui-state-focus .ui-icon {background-image: url(images/454545_256x240_icons_icons.png); }
|
||||
#widget-docs .ui-state-active .ui-icon {background-image: url(images/454545_256x240_icons_icons.png); }
|
||||
#widget-docs .ui-state-highlight .ui-icon {background-image: url(images/2e83ff_256x240_icons_icons.png); }
|
||||
#widget-docs .ui-state-error .ui-icon, #widget-docs .ui-state-error-text .ui-icon {background-image: url(images/cd0a0a_256x240_icons_icons.png); }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
#widget-docs .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; }
|
||||
#widget-docs .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; }
|
||||
#widget-docs .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; }
|
||||
#widget-docs .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
|
||||
#widget-docs .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; }
|
||||
#widget-docs .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
|
||||
#widget-docs .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; }
|
||||
#widget-docs .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; }
|
||||
#widget-docs .ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; }
|
||||
|
||||
/* Overlays */
|
||||
#widget-docs .ui-widget-overlay { background: #aaaaaa url(images/aaaaaa_40x100_textures_01_flat_0.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
|
||||
#widget-docs .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/aaaaaa_40x100_textures_01_flat_0.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; }
|
||||
|
||||
/*
|
||||
----------------------------------*/
|
||||
|
||||
#widget-docs { margin:20px 0 0; border: none; }
|
||||
|
||||
#widget-docs h2, #widget-docs h3, #widget-docs h4, #widget-docs p, #widget-docs ul, #widget-docs code { margin:0; padding:0; }
|
||||
#widget-docs code { display:block; color:#444; font-size:.9em; margin:0 0 1em; }
|
||||
#widget-docs code strong { color:#000; }
|
||||
#widget-docs p { margin:0 3em 1.2em 0; }
|
||||
#widget-docs p.intro { font-size:13px; color:#666; line-height:1.3; }
|
||||
#widget-docs ul { list-style-type: none; }
|
||||
|
||||
#widget-docs h2 { font-size:16px; margin:1.2em 0 .5em; }
|
||||
#widget-docs h3 { font-size:14px; color:#e6820E; margin:1.5em 0 .5em; }
|
||||
.normal #widget-docs h4 { font-size:12px; color:#000; border:0; margin:0 0 .5em; }
|
||||
|
||||
#docs-overview-main { width:400px; }
|
||||
#docs-overview-sidebar { float:right; width:200px; }
|
||||
#docs-overview-sidebar a span { color:#666; }
|
||||
#widget-docs #docs-overview-main p { margin-right:0; }
|
||||
#widget-docs #docs-overview-sidebar h4 { padding-left:0; }
|
||||
|
||||
.docs-list-header { float:left; width:100%; margin:10px 0 0; border-bottom:1px solid #eee; }
|
||||
#widget-docs .docs-list-header h2 { float:left; margin:0; }
|
||||
#widget-docs .docs-list-header p { float:right; margin:5px 0; font-size:11px; }
|
||||
|
||||
.docs-list { float:left; width:100%; padding:0 0 10px; }
|
||||
.docs-list .param-header { float:left; clear:left; width:100%; padding:8px 0; border-top:1px solid #eee; }
|
||||
#widget-docs .param-header h3, #widget-docs .param-header p { margin:0; float:left; }
|
||||
#widget-docs .param-header h3 { width:50%; }
|
||||
#widget-docs .param-header h3 span { background: url(images/demo-spindown-closed.gif) no-repeat left; padding-left:13px; }
|
||||
#widget-docs .param-open .param-header h3 span { background: url(images/demo-spindown-open.gif) no-repeat left; }
|
||||
#widget-docs .param-header p { width:24%; }
|
||||
#widget-docs .param-header p.param-type span { background: url(images/icon-docs-info.gif) no-repeat left; cursor:pointer; border-bottom:1px dashed #ccc; padding-left:15px; }
|
||||
|
||||
.param-details { padding-left:13px; }
|
||||
.param-args { margin:0 0 1.5em; border-top:1px dotted #ccc;}
|
||||
.param-args td { padding:3px 30px 3px 5px; border-bottom:1px dotted #ccc; }
|
||||
|
||||
|
||||
/* overrides for ui-tab styles */
|
||||
#widget-docs ul.ui-tabs-nav { padding:0 0 0 8px; }
|
||||
#widget-docs .ui-tabs-nav li { margin:5px 5px 0 0; }
|
||||
|
||||
#widget-docs .ui-tabs-nav li a:link,
|
||||
#widget-docs .ui-tabs-nav li a:visited,
|
||||
#widget-docs .ui-tabs-nav li a:hover,
|
||||
#widget-docs .ui-tabs-nav li a:active { font-size:14px; padding:4px 1.2em 3px; color:#fff; }
|
||||
|
||||
#widget-docs .ui-tabs-nav li.ui-tabs-selected a:link,
|
||||
#widget-docs .ui-tabs-nav li.ui-tabs-selected a:visited,
|
||||
#widget-docs .ui-tabs-nav li.ui-tabs-selected a:hover,
|
||||
#widget-docs .ui-tabs-nav li.ui-tabs-selected a:active { color:#e6820E; }
|
||||
|
||||
#widget-docs .ui-tabs-panel { padding:20px 9px; font-size:12px; line-height:1.4; color:#000; }
|
||||
|
||||
#widget-docs .ui-widget-content a:link,
|
||||
#widget-docs .ui-widget-content a:visited { color:#1b75bb; text-decoration:none; }
|
||||
#widget-docs .ui-widget-content a:hover,
|
||||
#widget-docs .ui-widget-content a:active { color:#0b559b; }
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Dialog - Animation</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.resizable.js"></script>
|
||||
<script src="../../ui/jquery.ui.dialog.js"></script>
|
||||
<script src="../../ui/jquery.effects.core.js"></script>
|
||||
<script src="../../ui/jquery.effects.blind.js"></script>
|
||||
<script src="../../ui/jquery.effects.explode.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
// increase the default animation speed to exaggerate the effect
|
||||
$.fx.speeds._default = 1000;
|
||||
$(function() {
|
||||
$( "#dialog" ).dialog({
|
||||
autoOpen: false,
|
||||
show: "blind",
|
||||
hide: "explode"
|
||||
});
|
||||
|
||||
$( "#opener" ).click(function() {
|
||||
$( "#dialog" ).dialog( "open" );
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="dialog" title="Basic dialog">
|
||||
<p>This is an animated dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
|
||||
</div>
|
||||
|
||||
<button id="opener">Open Dialog</button>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Dialogs may be animated by specifying an effect for the show and/or hide properties. You must include the individual effects file for any effects you would like to use.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Dialog - Default functionality</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.resizable.js"></script>
|
||||
<script src="../../ui/jquery.ui.dialog.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#dialog" ).dialog();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="dialog" title="Basic dialog">
|
||||
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
|
||||
</div>
|
||||
|
||||
<!-- Sample page content to illustrate the layering of the dialog -->
|
||||
<div class="hiddenInViewSource" style="padding:20px;">
|
||||
<p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>
|
||||
<form>
|
||||
<input value="text input" /><br />
|
||||
<input type="checkbox" />checkbox<br />
|
||||
<input type="radio" />radio<br />
|
||||
<select>
|
||||
<option>select</option>
|
||||
</select><br /><br />
|
||||
<textarea>textarea</textarea><br />
|
||||
</form>
|
||||
</div><!-- End sample page content -->
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>The basic dialog window is an overlay positioned within the viewport and is protected from page content (like select elements) shining through with an iframe. It has a title bar and a content area, and can be moved, resized and closed with the 'x' icon by default.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Dialog Demos</title>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demos-nav">
|
||||
<h4>Examples</h4>
|
||||
<ul>
|
||||
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
|
||||
<li><a href="animated.html">Animated dialog</a></li>
|
||||
<li><a href="modal.html">Modal dialog</a></li>
|
||||
<li><a href="modal-message.html">Modal message</a></li>
|
||||
<li><a href="modal-confirmation.html">Modal confirmation</a></li>
|
||||
<li><a href="modal-form.html">Modal form</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Dialog - Modal confirmation</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.dialog.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
|
||||
$( "#dialog:ui-dialog" ).dialog( "destroy" );
|
||||
|
||||
$( "#dialog-confirm" ).dialog({
|
||||
resizable: false,
|
||||
height:140,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Delete all items": function() {
|
||||
$( this ).dialog( "close" );
|
||||
},
|
||||
Cancel: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="dialog-confirm" title="Empty the recycle bin?">
|
||||
<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>These items will be permanently deleted and cannot be recovered. Are you sure?</p>
|
||||
</div>
|
||||
|
||||
<!-- Sample page content to illustrate the layering of the dialog -->
|
||||
<div class="hiddenInViewSource" style="padding:20px;">
|
||||
<p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>
|
||||
<form>
|
||||
<input value="text input" /><br />
|
||||
<input type="checkbox" />checkbox<br />
|
||||
<input type="radio" />radio<br />
|
||||
<select>
|
||||
<option>select</option>
|
||||
</select><br /><br />
|
||||
<textarea>textarea</textarea><br />
|
||||
</form>
|
||||
</div><!-- End sample page content -->
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Confirm an action that may be destructive or important. Set the <code>modal</code> option to true, and specify primary and secondary user actions with the <code>buttons</code> option.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,167 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Dialog - Modal form</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.resizable.js"></script>
|
||||
<script src="../../ui/jquery.ui.dialog.js"></script>
|
||||
<script src="../../ui/jquery.effects.core.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
body { font-size: 62.5%; }
|
||||
label, input { display:block; }
|
||||
input.text { margin-bottom:12px; width:95%; padding: .4em; }
|
||||
fieldset { padding:0; border:0; margin-top:25px; }
|
||||
h1 { font-size: 1.2em; margin: .6em 0; }
|
||||
div#users-contain { width: 350px; margin: 20px 0; }
|
||||
div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
|
||||
div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
|
||||
.ui-dialog .ui-state-error { padding: .3em; }
|
||||
.validateTips { border: 1px solid transparent; padding: 0.3em; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
|
||||
$( "#dialog:ui-dialog" ).dialog( "destroy" );
|
||||
|
||||
var name = $( "#name" ),
|
||||
email = $( "#email" ),
|
||||
password = $( "#password" ),
|
||||
allFields = $( [] ).add( name ).add( email ).add( password ),
|
||||
tips = $( ".validateTips" );
|
||||
|
||||
function updateTips( t ) {
|
||||
tips
|
||||
.text( t )
|
||||
.addClass( "ui-state-highlight" );
|
||||
setTimeout(function() {
|
||||
tips.removeClass( "ui-state-highlight", 1500 );
|
||||
}, 500 );
|
||||
}
|
||||
|
||||
function checkLength( o, n, min, max ) {
|
||||
if ( o.val().length > max || o.val().length < min ) {
|
||||
o.addClass( "ui-state-error" );
|
||||
updateTips( "Length of " + n + " must be between " +
|
||||
min + " and " + max + "." );
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function checkRegexp( o, regexp, n ) {
|
||||
if ( !( regexp.test( o.val() ) ) ) {
|
||||
o.addClass( "ui-state-error" );
|
||||
updateTips( n );
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
$( "#dialog-form" ).dialog({
|
||||
autoOpen: false,
|
||||
height: 300,
|
||||
width: 350,
|
||||
modal: true,
|
||||
buttons: {
|
||||
"Create an account": function() {
|
||||
var bValid = true;
|
||||
allFields.removeClass( "ui-state-error" );
|
||||
|
||||
bValid = bValid && checkLength( name, "username", 3, 16 );
|
||||
bValid = bValid && checkLength( email, "email", 6, 80 );
|
||||
bValid = bValid && checkLength( password, "password", 5, 16 );
|
||||
|
||||
bValid = bValid && checkRegexp( name, /^[a-z]([0-9a-z_])+$/i, "Username may consist of a-z, 0-9, underscores, begin with a letter." );
|
||||
// From jquery.validate.js (by joern), contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
|
||||
bValid = bValid && checkRegexp( email, /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i, "eg. ui@jquery.com" );
|
||||
bValid = bValid && checkRegexp( password, /^([0-9a-zA-Z])+$/, "Password field only allow : a-z 0-9" );
|
||||
|
||||
if ( bValid ) {
|
||||
$( "#users tbody" ).append( "<tr>" +
|
||||
"<td>" + name.val() + "</td>" +
|
||||
"<td>" + email.val() + "</td>" +
|
||||
"<td>" + password.val() + "</td>" +
|
||||
"</tr>" );
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
},
|
||||
Cancel: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
},
|
||||
close: function() {
|
||||
allFields.val( "" ).removeClass( "ui-state-error" );
|
||||
}
|
||||
});
|
||||
|
||||
$( "#create-user" )
|
||||
.button()
|
||||
.click(function() {
|
||||
$( "#dialog-form" ).dialog( "open" );
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="dialog-form" title="Create new user">
|
||||
<p class="validateTips">All form fields are required.</p>
|
||||
|
||||
<form>
|
||||
<fieldset>
|
||||
<label for="name">Name</label>
|
||||
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
|
||||
<label for="email">Email</label>
|
||||
<input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all" />
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all" />
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="users-contain" class="ui-widget">
|
||||
<h1>Existing Users:</h1>
|
||||
<table id="users" class="ui-widget ui-widget-content">
|
||||
<thead>
|
||||
<tr class="ui-widget-header ">
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Password</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>John Doe</td>
|
||||
<td>john.doe@example.com</td>
|
||||
<td>johndoe1</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button id="create-user">Create new user</button>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Use a modal dialog to require that the user enter data during a multi-step process. Embed form markup in the content area, set the <code>modal</code> option to true, and specify primary and secondary user actions with the <code>buttons</code> option.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Dialog - Modal message</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.button.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.resizable.js"></script>
|
||||
<script src="../../ui/jquery.ui.dialog.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
|
||||
$( "#dialog:ui-dialog" ).dialog( "destroy" );
|
||||
|
||||
$( "#dialog-message" ).dialog({
|
||||
modal: true,
|
||||
buttons: {
|
||||
Ok: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="dialog-message" title="Download complete">
|
||||
<p>
|
||||
<span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
|
||||
Your files have downloaded successfully into the My Downloads folder.
|
||||
</p>
|
||||
<p>
|
||||
Currently using <b>36% of your storage space</b>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Sample page content to illustrate the layering of the dialog -->
|
||||
<div class="hiddenInViewSource" style="padding:20px;">
|
||||
<p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>
|
||||
<form>
|
||||
<input value="text input" /><br />
|
||||
<input type="checkbox" />checkbox<br />
|
||||
<input type="radio" />radio<br />
|
||||
<select>
|
||||
<option>select</option>
|
||||
</select><br /><br />
|
||||
<textarea>textarea</textarea><br />
|
||||
</form>
|
||||
</div><!-- End sample page content -->
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Use a modal dialog to explicitly acknowledge information or an action before continuing their work. Set the <code>modal</code> option to true, and specify a primary action (Ok) with the <code>buttons</code> option.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Dialog - Basic modal</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<script src="../../ui/jquery.ui.position.js"></script>
|
||||
<script src="../../ui/jquery.ui.resizable.js"></script>
|
||||
<script src="../../ui/jquery.ui.dialog.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<script>
|
||||
$(function() {
|
||||
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
|
||||
$( "#dialog:ui-dialog" ).dialog( "destroy" );
|
||||
|
||||
$( "#dialog-modal" ).dialog({
|
||||
height: 140,
|
||||
modal: true
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="dialog-modal" title="Basic modal dialog">
|
||||
<p>Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.</p>
|
||||
</div>
|
||||
|
||||
<!-- Sample page content to illustrate the layering of the dialog -->
|
||||
<div class="hiddenInViewSource" style="padding:20px;">
|
||||
<p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>
|
||||
<form>
|
||||
<input value="text input" /><br />
|
||||
<input type="checkbox" />checkbox<br />
|
||||
<input type="radio" />radio<br />
|
||||
<select>
|
||||
<option>select</option>
|
||||
</select><br /><br />
|
||||
<textarea>textarea</textarea><br />
|
||||
</form>
|
||||
</div><!-- End sample page content -->
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>A modal dialog prevents the user from interacting with the rest of the page until it is closed.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable - Constrain movement</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.draggable { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
|
||||
#draggable, #draggable2 { margin-bottom:20px; }
|
||||
#draggable { cursor: n-resize; }
|
||||
#draggable2 { cursor: e-resize; }
|
||||
#containment-wrapper { width: 95%; height:150px; border:2px solid #ccc; padding: 10px; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable({ axis: "y" });
|
||||
$( "#draggable2" ).draggable({ axis: "x" });
|
||||
|
||||
$( "#draggable3" ).draggable({ containment: "#containment-wrapper", scroll: false });
|
||||
$( "#draggable4" ).draggable({ containment: "#demo-frame" });
|
||||
$( "#draggable5" ).draggable({ containment: "parent" });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<h3 class="docs">Constrain movement along an axis:</h3>
|
||||
|
||||
<div id="draggable" class="draggable ui-widget-content">
|
||||
<p>I can be dragged only vertically</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable2" class="draggable ui-widget-content">
|
||||
<p>I can be dragged only horizontally</p>
|
||||
</div>
|
||||
|
||||
<h3 class="docs">Or to within another DOM element:</h3>
|
||||
<div id="containment-wrapper">
|
||||
<div id="draggable3" class="draggable ui-widget-content">
|
||||
<p>I'm contained within the box</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable4" class="draggable ui-widget-content">
|
||||
<p>I'm contained within the box's parent</p>
|
||||
</div>
|
||||
|
||||
<div class="draggable ui-widget-content">
|
||||
<p id="draggable5" class="ui-widget-header">I'm contained within my parent</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Constrain the movement of each draggable by defining the boundaries of the draggable area. Set the <code>axis</code> option to limit the draggable's path to the x- or y-axis, or use the <code>containment</code> option to specify a parent DOM element or a jQuery selector, like 'document.'</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable - Cursor style</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#draggable, #draggable2, #draggable3 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable({ cursorAt: { cursor: "move", top: 56, left: 56 } });
|
||||
$( "#draggable2" ).draggable({ cursorAt: { cursor: "crosshair", top: -5, left: -5 } });
|
||||
$( "#draggable3" ).draggable({ cursorAt: { bottom: 0 } });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="draggable" class="ui-widget-content">
|
||||
<p>I will always stick to the center (relative to the mouse)</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable2" class="ui-widget-content">
|
||||
<p>My cursor is at left -5 and top -5</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable3" class="ui-widget-content">
|
||||
<p>My cursor position is only controlled for the 'bottom' value</p>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Position the cursor while dragging the object. By default the cursor appears in the center of the dragged object; use the <code>cursorAt</code> option to specify another location relative to the draggable (specify a pixel value from the top, right, bottom, and/or left). Customize the cursor's appearance by supplying the <code>cursor</code> option with a valid CSS cursor value: default, move, pointer, crosshair, etc.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable - Default functionality</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#draggable { width: 150px; height: 150px; padding: 0.5em; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="draggable" class="ui-widget-content">
|
||||
<p>Drag me around</p>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Enable draggable functionality on any DOM element. Move the draggable object by clicking on it with the mouse and dragging it anywhere within the viewport.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,45 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable - Delay start</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#draggable, #draggable2 { width: 120px; height: 120px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable({ distance: 20 });
|
||||
$( "#draggable2" ).draggable({ delay: 1000 });
|
||||
$( ".ui-draggable" ).disableSelection();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="draggable" class="ui-widget-content">
|
||||
<p>Only if you drag me by 20 pixels, the dragging will start</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable2" class="ui-widget-content">
|
||||
<p>Regardless of the distance, you have to drag and wait for 1000ms before dragging starts</p>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Delay the start of dragging for a number of milliseconds with the <code>delay</code> option; prevent dragging until the cursor is held down and dragged a specifed number of pixels with the <code>distance</code> option. </p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable - Events</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#draggable { width: 16em; padding: 0 1em; }
|
||||
#draggable ul li { margin: 1em 0; padding: 0.5em 0; } * html #draggable ul li { height: 1%; }
|
||||
#draggable ul li span.ui-icon { float: left; }
|
||||
#draggable ul li span.count { font-weight: bold; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
var $start_counter = $( "#event-start" ),
|
||||
$drag_counter = $( "#event-drag" ),
|
||||
$stop_counter = $( "#event-stop" ),
|
||||
counts = [ 0, 0, 0 ];
|
||||
|
||||
$( "#draggable" ).draggable({
|
||||
start: function() {
|
||||
counts[ 0 ]++;
|
||||
updateCounterStatus( $start_counter, counts[ 0 ] );
|
||||
},
|
||||
drag: function() {
|
||||
counts[ 1 ]++;
|
||||
updateCounterStatus( $drag_counter, counts[ 1 ] );
|
||||
},
|
||||
stop: function() {
|
||||
counts[ 2 ]++;
|
||||
updateCounterStatus( $stop_counter, counts[ 2 ] );
|
||||
}
|
||||
});
|
||||
|
||||
function updateCounterStatus( $event_counter, new_count ) {
|
||||
// first update the status visually...
|
||||
if ( !$event_counter.hasClass( "ui-state-hover" ) ) {
|
||||
$event_counter.addClass( "ui-state-hover" )
|
||||
.siblings().removeClass( "ui-state-hover" );
|
||||
}
|
||||
// ...then update the numbers
|
||||
$( "span.count", $event_counter ).text( new_count );
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="draggable" class="ui-widget ui-widget-content">
|
||||
|
||||
<p>Drag me to trigger the chain of events.</p>
|
||||
|
||||
<ul class="ui-helper-reset">
|
||||
<li id="event-start" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-play"></span>"start" invoked <span class="count">0</span>x</li>
|
||||
<li id="event-drag" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-arrow-4"></span>"drag" invoked <span class="count">0</span>x</li>
|
||||
<li id="event-stop" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-stop"></span>"stop" invoked <span class="count">0</span>x</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Layer functionality onto the draggable using the <code>start</code>, <code>drag</code>, and <code>stop</code> events. Start is fired at the start of the drag; drag during the drag; and stop when dragging stops.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,50 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable - Handles</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
|
||||
#draggable p { cursor: move; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable({ handle: "p" });
|
||||
$( "#draggable2" ).draggable({ cancel: "p.ui-widget-header" });
|
||||
$( "div, p" ).disableSelection();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="draggable" class="ui-widget-content">
|
||||
<p class="ui-widget-header">I can be dragged only by this handle</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable2" class="ui-widget-content">
|
||||
<p>You can drag me around…</p>
|
||||
<p class="ui-widget-header">…but you can't drag me by this handle.</p>
|
||||
</div>
|
||||
|
||||
<!-- ADD CANCEL DEMO -->
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Allow dragging only when the cursor is over a specific part of the draggable. Use the <code>handle</code> option to specify the jQuery selector of an element (or group of elements) used to drag the object.</p>
|
||||
<p>Or prevent dragging when the cursor is over a specific element (or group of elements) within the draggable. Use the <code>cancel</code> option to specify a jQuery selector over which to "cancel" draggable functionality.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable Demos</title>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demos-nav">
|
||||
<h4>Examples</h4>
|
||||
<ul>
|
||||
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
|
||||
<li><a href="events.html">Events</a></li>
|
||||
<li><a href="constrain-movement.html">Constrain movement</a></li>
|
||||
<li><a href="delay-start.html">Delay start</a></li>
|
||||
<li><a href="snap-to.html">Snap to element or grid</a></li>
|
||||
<li><a href="scroll.html">Auto-scroll</a></li>
|
||||
<li><a href="revert.html">Revert position</a></li>
|
||||
<li><a href="visual-feedback.html">Visual feedback</a></li>
|
||||
<li><a href="handle.html">Drag handle</a></li>
|
||||
<li><a href="cursor-style.html">Cursor style</a></li>
|
||||
<li><a href="sortable.html">Draggable + Sortable</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable - Revert position</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#draggable, #draggable2 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable({ revert: true });
|
||||
$( "#draggable2" ).draggable({ revert: true, helper: "clone" });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="draggable" class="ui-widget-content">
|
||||
<p>Revert the original</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable2" class="ui-widget-content">
|
||||
<p>Revert the helper</p>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Return the draggable (or it's helper) to its original location when dragging stops with the boolean <code>revert</code> option.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,51 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable - Auto-scroll</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#draggable, #draggable2, #draggable3 { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable({ scroll: true });
|
||||
$( "#draggable2" ).draggable({ scroll: true, scrollSensitivity: 100 });
|
||||
$( "#draggable3" ).draggable({ scroll: true, scrollSpeed: 100 });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="draggable" class="ui-widget-content">
|
||||
<p>Scroll set to true, default settings</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable2" class="ui-widget-content">
|
||||
<p>scrollSensitivity set to 100</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable3" class="ui-widget-content">
|
||||
<p>scrollSpeed set to 100</p>
|
||||
</div>
|
||||
|
||||
<div style='height: 5000px; width: 1px;'></div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Automatically scroll the document when the draggable is moved beyond the viewport. Set the <code>scroll</code> option to true to enable auto-scrolling, and fine-tune when scrolling is triggered and its speed with the <code>scrollSensitivity</code> and <code>scrollSpeed</code> options.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,68 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable - Snap to element or grid</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.draggable { width: 90px; height: 80px; padding: 5px; float: left; margin: 0 10px 10px 0; font-size: .9em; }
|
||||
.ui-widget-header p, .ui-widget-content p { margin: 0; }
|
||||
#snaptarget { height: 140px; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable({ snap: true });
|
||||
$( "#draggable2" ).draggable({ snap: ".ui-widget-header" });
|
||||
$( "#draggable3" ).draggable({ snap: ".ui-widget-header", snapMode: "outer" });
|
||||
$( "#draggable4" ).draggable({ grid: [ 20,20 ] });
|
||||
$( "#draggable5" ).draggable({ grid: [ 80, 80 ] });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="snaptarget" class="ui-widget-header">
|
||||
<p>I'm a snap target</p>
|
||||
</div>
|
||||
|
||||
<br clear="both" />
|
||||
|
||||
<div id="draggable" class="draggable ui-widget-content">
|
||||
<p>Default (snap: true), snaps to all other draggable elements</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable2" class="draggable ui-widget-content">
|
||||
<p>I only snap to the big box</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable3" class="draggable ui-widget-content">
|
||||
<p>I only snap to the outer edges of the big box</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable4" class="draggable ui-widget-content">
|
||||
<p>I snap to a 20 x 20 grid</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable5" class="draggable ui-widget-content">
|
||||
<p>I snap to a 80 x 80 grid</p>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Snap the draggable to the inner or outer boundaries of a DOM element. Use the <code>snap</code>, <code>snapMode</code> (inner, outer, both), and <code>snapTolerance</code> (distance in pixels the draggable must be from the element when snapping is invoked) options. </p>
|
||||
<p>Or snap the draggable to a grid. Set the dimensions of grid cells (height and width in pixels) with the <code>grid</code> option.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable + Sortable</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<script src="../../ui/jquery.ui.sortable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
.demo ul { list-style-type: none; margin: 0; padding: 0; margin-bottom: 10px; }
|
||||
.demo li { margin: 5px; padding: 5px; width: 150px; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#sortable" ).sortable({
|
||||
revert: true
|
||||
});
|
||||
$( "#draggable" ).draggable({
|
||||
connectToSortable: "#sortable",
|
||||
helper: "clone",
|
||||
revert: "invalid"
|
||||
});
|
||||
$( "ul, li" ).disableSelection();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<ul>
|
||||
<li id="draggable" class="ui-state-highlight">Drag me down</li>
|
||||
</ul>
|
||||
|
||||
<ul id="sortable">
|
||||
<li class="ui-state-default">Item 1</li>
|
||||
<li class="ui-state-default">Item 2</li>
|
||||
<li class="ui-state-default">Item 3</li>
|
||||
<li class="ui-state-default">Item 4</li>
|
||||
<li class="ui-state-default">Item 5</li>
|
||||
</ul>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Draggables are built to interact seamlessly with <a href="#">sortables</a>.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Draggable - Visual feedback</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#draggable, #draggable2, #draggable3, #set div { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
|
||||
#draggable, #draggable2, #draggable3 { margin-bottom:20px; }
|
||||
#set { clear:both; float:left; width: 368px; height: 120px; }
|
||||
p { clear:both; margin:0; padding:1em 0; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable({ helper: "original" });
|
||||
$( "#draggable2" ).draggable({ opacity: 0.7, helper: "clone" });
|
||||
$( "#draggable3" ).draggable({
|
||||
cursor: "move",
|
||||
cursorAt: { top: -12, left: -20 },
|
||||
helper: function( event ) {
|
||||
return $( "<div class='ui-widget-header'>I'm a custom helper</div>" );
|
||||
}
|
||||
});
|
||||
$( "#set div" ).draggable({ stack: "#set div" });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<h3 class="docs">With helpers:</h3>
|
||||
|
||||
<div id="draggable" class="ui-widget-content">
|
||||
<p>Original</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable2" class="ui-widget-content">
|
||||
<p>Semi-transparent clone</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable3" class="ui-widget-content">
|
||||
<p>Custom helper (in combination with cursorAt)</p>
|
||||
</div>
|
||||
|
||||
<h3 class="docs">Stacked:</h3>
|
||||
<div id="set">
|
||||
<div class="ui-widget-content">
|
||||
<p>We are draggables..</p>
|
||||
</div>
|
||||
|
||||
<div class="ui-widget-content">
|
||||
<p>..whose z-indexes are controlled automatically..</p>
|
||||
</div>
|
||||
|
||||
<div class="ui-widget-content">
|
||||
<p>..with the stack option.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Provide feedback to users as they drag an object in the form of a helper. The <code>helper</code> option accepts the values 'original' (the draggable object moves with the cursor), 'clone' (a duplicate of the draggable moves with the cursor), or a function that returns a DOM element (that element is shown near the cursor during drag). Control the helper's transparency with the <code>opacity</code> option.</p>
|
||||
<p>To clarify which draggable is in play, bring the draggable in motion to front. Use the <code>zIndex</code> option to set a higher z-index for the helper, if in play, or use the <code>stack</code> option to ensure that the last item dragged will appear on top of others in the same group on drag stop.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Droppable - Accept</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<script src="../../ui/jquery.ui.droppable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
|
||||
#draggable, #draggable-nonvalid { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable, #draggable-nonvalid" ).draggable();
|
||||
$( "#droppable" ).droppable({
|
||||
accept: "#draggable",
|
||||
activeClass: "ui-state-hover",
|
||||
hoverClass: "ui-state-active",
|
||||
drop: function( event, ui ) {
|
||||
$( this )
|
||||
.addClass( "ui-state-highlight" )
|
||||
.find( "p" )
|
||||
.html( "Dropped!" );
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="draggable-nonvalid" class="ui-widget-content">
|
||||
<p>I'm draggable but can't be dropped</p>
|
||||
</div>
|
||||
|
||||
<div id="draggable" class="ui-widget-content">
|
||||
<p>Drag me to my target</p>
|
||||
</div>
|
||||
|
||||
<div id="droppable" class="ui-widget-header">
|
||||
<p>accept: '#draggable'</p>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Specify using the <code>accept</code> option which element (or group of elements) is accepted by the target droppable.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery UI Droppable - Default functionality</title>
|
||||
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
|
||||
<script src="../../jquery-1.5.1.js"></script>
|
||||
<script src="../../ui/jquery.ui.core.js"></script>
|
||||
<script src="../../ui/jquery.ui.widget.js"></script>
|
||||
<script src="../../ui/jquery.ui.mouse.js"></script>
|
||||
<script src="../../ui/jquery.ui.draggable.js"></script>
|
||||
<script src="../../ui/jquery.ui.droppable.js"></script>
|
||||
<link rel="stylesheet" href="../demos.css">
|
||||
<style>
|
||||
#draggable { width: 100px; height: 100px; padding: 0.5em; float: left; margin: 10px 10px 10px 0; }
|
||||
#droppable { width: 150px; height: 150px; padding: 0.5em; float: left; margin: 10px; }
|
||||
</style>
|
||||
<script>
|
||||
$(function() {
|
||||
$( "#draggable" ).draggable();
|
||||
$( "#droppable" ).droppable({
|
||||
drop: function( event, ui ) {
|
||||
$( this )
|
||||
.addClass( "ui-state-highlight" )
|
||||
.find( "p" )
|
||||
.html( "Dropped!" );
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="demo">
|
||||
|
||||
<div id="draggable" class="ui-widget-content">
|
||||
<p>Drag me to my target</p>
|
||||
</div>
|
||||
|
||||
<div id="droppable" class="ui-widget-header">
|
||||
<p>Drop here</p>
|
||||
</div>
|
||||
|
||||
</div><!-- End demo -->
|
||||
|
||||
|
||||
|
||||
<div class="demo-description">
|
||||
<p>Enable any DOM element to be droppable, a target for draggable elements.</p>
|
||||
</div><!-- End demo-description -->
|
||||
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 22 KiB |