aboutsummaryrefslogtreecommitdiffstats
path: root/demos/functional/datepicker/demo
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-06-07 17:35:27 +0000
committerRichard Worth <rdworth@gmail.com>2008-06-07 17:35:27 +0000
commit3524ef0c26f8760615c01217045c72f9bb20dde9 (patch)
treed7fa5208fb99d2f7d074706f1eed86a6a4b53acd /demos/functional/datepicker/demo
parent2ac4aa61e5167d9aa427b70fc5f1ad9b934fdf3c (diff)
downloadjquery-ui-3524ef0c26f8760615c01217045c72f9bb20dde9.tar.gz
jquery-ui-3524ef0c26f8760615c01217045c72f9bb20dde9.zip
removed extra level ui folder
Diffstat (limited to 'demos/functional/datepicker/demo')
-rw-r--r--demos/functional/datepicker/demo/img/active-bg.gifbin0 -> 89 bytes
-rw-r--r--demos/functional/datepicker/demo/img/ar.gifbin0 -> 863 bytes
-rw-r--r--demos/functional/datepicker/demo/img/au.gifbin0 -> 941 bytes
-rw-r--r--demos/functional/datepicker/demo/img/br.gifbin0 -> 925 bytes
-rw-r--r--demos/functional/datepicker/demo/img/calendar.gifbin0 -> 269 bytes
-rw-r--r--demos/functional/datepicker/demo/img/calendar2.gifbin0 -> 1035 bytes
-rw-r--r--demos/functional/datepicker/demo/img/cn.gifbin0 -> 856 bytes
-rw-r--r--demos/functional/datepicker/demo/img/dark-bg.gifbin0 -> 85 bytes
-rw-r--r--demos/functional/datepicker/demo/img/hover-bg.gifbin0 -> 89 bytes
-rw-r--r--demos/functional/datepicker/demo/img/id.gifbin0 -> 840 bytes
-rw-r--r--demos/functional/datepicker/demo/img/ie.gifbin0 -> 875 bytes
-rw-r--r--demos/functional/datepicker/demo/img/ke.gifbin0 -> 948 bytes
-rw-r--r--demos/functional/datepicker/demo/img/lb.gifbin0 -> 903 bytes
-rw-r--r--demos/functional/datepicker/demo/img/next.gifbin0 -> 98 bytes
-rw-r--r--demos/functional/datepicker/demo/img/normal-bg.gifbin0 -> 110 bytes
-rw-r--r--demos/functional/datepicker/demo/img/nz.gifbin0 -> 925 bytes
-rw-r--r--demos/functional/datepicker/demo/img/prev.gifbin0 -> 97 bytes
-rw-r--r--demos/functional/datepicker/demo/img/se.gifbin0 -> 892 bytes
-rw-r--r--demos/functional/datepicker/demo/img/tab.pngbin0 -> 1717 bytes
-rw-r--r--demos/functional/datepicker/demo/img/us.gifbin0 -> 896 bytes
-rw-r--r--demos/functional/datepicker/demo/img/za.gifbin0 -> 900 bytes
-rw-r--r--demos/functional/datepicker/demo/jquery.localisation.js64
-rw-r--r--demos/functional/datepicker/demo/ui.datepicker.alt.css158
-rw-r--r--demos/functional/datepicker/demo/ui.datepicker.demo.css53
-rw-r--r--demos/functional/datepicker/demo/ui.datepicker.demo.js81
25 files changed, 356 insertions, 0 deletions
diff --git a/demos/functional/datepicker/demo/img/active-bg.gif b/demos/functional/datepicker/demo/img/active-bg.gif
new file mode 100644
index 000000000..d608c5469
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/active-bg.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/ar.gif b/demos/functional/datepicker/demo/img/ar.gif
new file mode 100644
index 000000000..f34c90f5c
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/ar.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/au.gif b/demos/functional/datepicker/demo/img/au.gif
new file mode 100644
index 000000000..db005b4c7
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/au.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/br.gif b/demos/functional/datepicker/demo/img/br.gif
new file mode 100644
index 000000000..8b8bf147d
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/br.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/calendar.gif b/demos/functional/datepicker/demo/img/calendar.gif
new file mode 100644
index 000000000..d0abaa7c0
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/calendar.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/calendar2.gif b/demos/functional/datepicker/demo/img/calendar2.gif
new file mode 100644
index 000000000..519a1fd4a
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/calendar2.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/cn.gif b/demos/functional/datepicker/demo/img/cn.gif
new file mode 100644
index 000000000..5482753d6
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/cn.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/dark-bg.gif b/demos/functional/datepicker/demo/img/dark-bg.gif
new file mode 100644
index 000000000..1dea48a8f
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/dark-bg.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/hover-bg.gif b/demos/functional/datepicker/demo/img/hover-bg.gif
new file mode 100644
index 000000000..fbf94fc2c
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/hover-bg.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/id.gif b/demos/functional/datepicker/demo/img/id.gif
new file mode 100644
index 000000000..d7f4ab8a3
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/id.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/ie.gif b/demos/functional/datepicker/demo/img/ie.gif
new file mode 100644
index 000000000..827c498d2
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/ie.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/ke.gif b/demos/functional/datepicker/demo/img/ke.gif
new file mode 100644
index 000000000..e352177c7
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/ke.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/lb.gif b/demos/functional/datepicker/demo/img/lb.gif
new file mode 100644
index 000000000..f204918fe
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/lb.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/next.gif b/demos/functional/datepicker/demo/img/next.gif
new file mode 100644
index 000000000..be0959b1b
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/next.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/normal-bg.gif b/demos/functional/datepicker/demo/img/normal-bg.gif
new file mode 100644
index 000000000..bdb506869
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/normal-bg.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/nz.gif b/demos/functional/datepicker/demo/img/nz.gif
new file mode 100644
index 000000000..86b89cb27
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/nz.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/prev.gif b/demos/functional/datepicker/demo/img/prev.gif
new file mode 100644
index 000000000..95d840f47
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/prev.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/se.gif b/demos/functional/datepicker/demo/img/se.gif
new file mode 100644
index 000000000..7301c598e
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/se.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/tab.png b/demos/functional/datepicker/demo/img/tab.png
new file mode 100644
index 000000000..01c8ab417
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/tab.png
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/us.gif b/demos/functional/datepicker/demo/img/us.gif
new file mode 100644
index 000000000..39c472e26
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/us.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/img/za.gif b/demos/functional/datepicker/demo/img/za.gif
new file mode 100644
index 000000000..197cbd888
--- /dev/null
+++ b/demos/functional/datepicker/demo/img/za.gif
Binary files differ
diff --git a/demos/functional/datepicker/demo/jquery.localisation.js b/demos/functional/datepicker/demo/jquery.localisation.js
new file mode 100644
index 000000000..b11e37835
--- /dev/null
+++ b/demos/functional/datepicker/demo/jquery.localisation.js
@@ -0,0 +1,64 @@
+/* http://keith-wood.name/localisation.html
+ Localisation assistance for jQuery v1.0.2.
+ Written by Keith Wood (kbwood@iprimus.com.au) June 2007.
+ Under the Creative Commons Licence http://creativecommons.org/licenses/by/3.0/
+ Share or Remix it but please Attribute the author. */
+
+(function($) { // Hide scope, no $ conflict
+
+/* Load applicable localisation package(s) for one or more jQuery packages.
+ Assumes that the localisations are named <base>-<lang>.js
+ and loads them in order from least to most specific.
+ For example, $.localise('jquery-calendar');
+ with the browser set to 'en-US' would attempt to load
+ jquery-calendar-en.js and jquery-calendar-en-US.js.
+ Also accepts an array of package names to process.
+ Optionally specify whether or not to include the base file,
+ the desired language, and/or the timeout period, e.g.
+ $.localise(['jquery-calendar', 'jquery-timeentry'],
+ {loadBase: true; language: 'en-AU', timeout: 300}); */
+$.localise = function(pkg, settings) {
+ var saveSettings = {async: $.ajaxSettings.async, timeout: $.ajaxSettings.timeout};
+ $.ajaxSetup({async: false, timeout: (settings && settings.timeout ? settings.timeout : 500)});
+ var localiseOne = function(pkg, lang) {
+ if (settings && settings.loadBase) {
+ $.getScript(pkg + '.js');
+ }
+ if (lang.length >= 2) {
+ $.getScript(pkg + '-' + lang.substring(0, 2) + '.js');
+ }
+ if (lang.length >= 5) {
+ $.getScript(pkg + '-' + lang.substring(0, 5) + '.js');
+ }
+ };
+ var lang = normaliseLang(settings && settings.language ? settings.language : $.defaultLanguage);
+ if (isArray(pkg)) {
+ for (i = 0; i < pkg.length; i++) {
+ localiseOne(pkg[i], lang);
+ }
+ }
+ else {
+ localiseOne(pkg, lang);
+ }
+ $.ajaxSetup(saveSettings);
+};
+
+/* Retrieve the default language set for the browser. */
+$.defaultLanguage = normaliseLang(navigator.language ? navigator.language /* Mozilla */ :
+ navigator.userLanguage /* IE */);
+
+/* Ensure language code is in the format aa-AA. */
+function normaliseLang(lang) {
+ lang = lang.replace(/_/, '-').toLowerCase();
+ if (lang.length > 3) {
+ lang = lang.substring(0, 3) + lang.substring(3).toUpperCase();
+ }
+ return lang;
+}
+
+/* Determine whether an object is an array. */
+function isArray(a) {
+ return (a.constructor && a.constructor.toString().match(/\Array\(\)/));
+}
+
+})(jQuery);
diff --git a/demos/functional/datepicker/demo/ui.datepicker.alt.css b/demos/functional/datepicker/demo/ui.datepicker.alt.css
new file mode 100644
index 000000000..d07a6e7bf
--- /dev/null
+++ b/demos/functional/datepicker/demo/ui.datepicker.alt.css
@@ -0,0 +1,158 @@
+/* Alternate UI date picker styles */
+#ui-datepicker-div, .ui-datepicker-inline {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 14px;
+ padding: 0;
+ margin: 0;
+ background: #d8d8d8 url(../img/dark-bg.gif) repeat;
+ color: #008;
+ width: 220px;
+}
+#ui-datepicker-div {
+ display: none;
+ border: 1px solid #008;
+ z-index: 9999; /*must have*/
+}
+.ui-datepicker-inline {
+ float: left;
+ display: block;
+ border: 0;
+}
+.ui-datepicker-dialog {
+ padding: 5px !important;
+ border: 4px ridge #88c !important;
+}
+button.ui-datepicker-trigger {
+ width: 25px;
+}
+img.ui-datepicker-trigger {
+ margin: 2px;
+ vertical-align: middle;
+}
+.ui-datepicker-prompt {
+ float: left;
+ padding: 2px;
+ xbackground: #d8d8d8 url(../img/dark-bg.gif) repeat;
+ background: transparent;
+ color: #008;
+}
+* html .ui-datepicker-prompt {
+ width: 185px;
+}
+.ui-datepicker-control, .ui-datepicker-links, .ui-datepicker-header, .ui-datepicker {
+ clear: both;
+ float: left;
+ width: 100%;
+}
+.ui-datepicker-control, .ui-datepicker-links {
+ font-weight: bold;
+ font-size: 80%;
+ letter-spacing: 1px;
+}
+
+.ui-datepicker-links label { /* disabled links */
+ padding: 2px 5px;
+ color: #88c;
+}
+.ui-datepicker-clear, .ui-datepicker-prev {
+ float: left;
+ width: 34%;
+}
+.ui-datepicker-current {
+ float: left;
+ width: 30%;
+ text-align: center;
+}
+.ui-datepicker-close, .ui-datepicker-next {
+ float: right;
+ width: 34%;
+ text-align: right;
+}
+.ui-datepicker-header {
+ padding: 1px 0 3px;
+
+ text-align: center;
+ font-weight: bold;
+ height: 1.3em;
+}
+.ui-datepicker-header select {
+ background: #d8d8d8 url(../img/dark-bg.gif) repeat;
+ color: #008;
+ border: 0px;
+ font-weight: bold;
+}
+.ui-datepicker {
+ background: #f8f8f8 url(../img/normal-bg.gif) repeat;
+ color: #008;
+ text-align: center;
+ font-size: 100%;
+}
+.ui-datepicker a {
+ display: block;
+ width: 100%;
+}
+.ui-datepicker-titleRow {
+ background: #d8d8d8 url(../img/dark-bg.gif) repeat;
+}
+.ui-datepicker-weekEndCell {
+ background: #d8d8d8 url(../img/dark-bg.gif) repeat;
+}
+.ui-datepicker-daysCellOver {
+ background: #3c75c4 url(../img/active-bg.gif) repeat;
+}
+.ui-datepicker-unselectable {
+ color: #88c;
+}
+.ui-datepicker-today {
+ font-weight: bold;
+}
+.ui-datepicker-currentDay {
+ background: #3c75c4 url(../img/active-bg.gif) repeat;
+}
+
+/* ________ CALENDAR LINKS _______
+
+** Reset link properties and then override them with !important */
+#ui-datepicker-div a, .ui-datepicker-inline a {
+ cursor: pointer;
+ margin: 0;
+ padding: 0;
+ background: none;
+ color: #000;
+}
+.ui-datepicker-control a, .ui-datepicker-links a {
+ padding: 2px 5px !important;
+}
+.ui-datepicker-control a:hover {
+ background: #9dbae1 url(../img/hover-bg.gif) repeat !important;
+}
+.ui-datepicker-links a:hover, .ui-datepicker-titleRow a:hover {
+ background: #9dbae1 url(../img/hover-bg.gif) repeat !important;
+}
+
+/* ___________ MULTIPLE MONTHS _________*/
+
+.ui-datepicker-multi .datepicker {
+ border: 1px solid #008;
+}
+.ui-datepicker-oneMonth {
+ float: left;
+ width: 220px;
+}
+.ui-datepicker-newRow {
+ clear: left;
+}
+
+/* ___________ IE6 IFRAME FIX ________ */
+
+.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*/
+} \ No newline at end of file
diff --git a/demos/functional/datepicker/demo/ui.datepicker.demo.css b/demos/functional/datepicker/demo/ui.datepicker.demo.css
new file mode 100644
index 000000000..2920d857f
--- /dev/null
+++ b/demos/functional/datepicker/demo/ui.datepicker.demo.css
@@ -0,0 +1,53 @@
+#tab_menu1 { margin:0.5em 0 0 0; padding:0; font-size:1em; }
+.tab_group1 { clear:left; padding-top:0; display:none; }
+.demoLabel { float: left; width: 18em; }
+.ar_day { color: white !important; background: #eee url(img/ar.gif) no-repeat center !important; }
+.au_day { color: blue !important; background: #eee url(img/au.gif) no-repeat center !important; }
+.br_day { color: green !important; background: #eee url(img/br.gif) no-repeat center !important; }
+.cn_day { color: red !important; background: #eee url(img/cn.gif) no-repeat center !important; }
+.id_day { color: white !important; background: #eee url(img/id.gif) no-repeat center !important; }
+.ie_day { color: white !important; background: #eee url(img/ie.gif) no-repeat center !important; }
+.ke_day { color: red !important; background: #eee url(img/ke.gif) no-repeat center !important; }
+.lb_day { color: white !important; background: #eee url(img/lb.gif) no-repeat center !important; }
+.nz_day { color: blue !important; background: #eee url(img/nz.gif) no-repeat center !important; }
+.se_day { color: blue !important; background: #eee url(img/se.gif) no-repeat center !important; }
+.us_day { color: white !important; background: #eee url(img/us.gif) no-repeat center !important; }
+.za_day { color: green !important; background: #eee url(img/za.gif) no-repeat center !important; }
+code { font-size: 13px; font-family: Verdana, Arial, Helvetica, sans-serif; }
+pre { clear: both; padding-left: 2em; background: #eee; }
+#embedButton { width: 7em; }
+#embedButton + img { position: relative; left: -21px; top: -1px; }
+.tabs {
+ list-style: none;
+}
+.tabs li {
+ float: left;
+}
+.tabs li a {
+ display:block;
+ padding: 0.4em .75em;
+ margin: 0;
+ border-left: 1px solid #fff;
+ border-right: 1px solid #ddd;
+ cursor: pointer;
+ cursor: hand;
+ text-decoration: none;
+ color: #eee;
+ border-top: 1px solid #F9F9F9;
+ background: #78A5CE;
+}
+.tabs li a:hover, .tabs li a.over {
+ border-top: 1px solid #000;
+ background: #333;
+}
+.tab_group1 h3 {
+ font-weight: bold;
+ margin-top:15px;
+ border-bottom: 1px solid #ddd;
+}
+.nextFeature {
+ margin-top: 15px;
+}
+ol li {
+ margin-top: 1em;
+} \ No newline at end of file
diff --git a/demos/functional/datepicker/demo/ui.datepicker.demo.js b/demos/functional/datepicker/demo/ui.datepicker.demo.js
new file mode 100644
index 000000000..3d7d9b640
--- /dev/null
+++ b/demos/functional/datepicker/demo/ui.datepicker.demo.js
@@ -0,0 +1,81 @@
+// Initialise the date picker demonstrations
+$(document).ready(function () {
+ // initialize tab interface
+ tabs.init();
+ // reset defaults to English
+ $.datepicker.setDefaults($.datepicker.regional['']);
+ // replace script tags with HTML code
+ $(".demojs").each(function () {
+ $(this).before( '<pre><code class="javascript">' +
+ $(this).html().replace(/</g, '&lt;') + "</code></pre>" );
+ eval( $(this).html() );
+ });
+ // Localization
+ if ($.browser.safari)
+ $('.languageSelect,.l10nDatepicker,#frFullFormat').attr({ disabled: 'disabled' });
+ else
+ $('.languageSelect').change(localise);
+ // Stylesheets
+ $('#altStyle').datepicker({buttonImage: 'demo/img/calendar2.gif',
+ prevText: '<img src="demo/img/prev.gif" style="vertical-align: middle;"/> Prev',
+ nextText: 'Next <img src="demo/img/next.gif" style="vertical-align: middle;"/>'});
+ $('#button3').click(function() {
+ $(this).datepicker('dialog', $('#altDialog').val(),
+ setAltDateFromDialog, {prompt: 'Choose a date', speed: '',
+ prevText: '<img src="demo/img/prev.gif" style="vertical-align: middle;"/> Prev',
+ nextText: 'Next <img src="demo/img/next.gif" style="vertical-align: middle;"/>'});
+ });
+});
+
+// Load and apply a localisation package for the date picker
+function localise() {
+ var input = $('input', this.parentNode.parentNode);
+ var date = $(input).datepicker('getDate');
+ var language = $(this).val();
+ $.localise('../../../source/i18n/ui.datepicker', {language: language});
+ $(input).datepicker('change', $.datepicker.regional[language]);
+ $.datepicker.setDefaults($.datepicker.regional['']); // Reset for general usage
+ if (date) {
+ $(input).datepicker('setDate', date);
+ input.val($.datepicker.formatDate(
+ $.datepicker.regional[language].dateFormat, date));
+ }
+}
+
+// Demonstrate a callback from inline configuration
+function showDay(input) {
+ var date = $(input).datepicker('getDate');
+ $('#inlineDay').html(date ? $.datepicker.formatDate('DD', date) : 'blank');
+}
+
+// Display a date selected in a "dialog"
+function setAltDateFromDialog(date) {
+ $('#altDialog').val(date);
+}
+
+// Custom Tabs written by Marc Grabanski
+var tabs =
+{
+ init : function ()
+ {
+ // Setup tabs
+ $("div[@class^=tab_group]").hide();
+ $("div[@class^=tab_group]:first").show().id;
+ $("ul[@id^=tab_menu] a:eq(0)").addClass('over');
+
+ // Slide visible up and clicked one down
+ $("ul[@id^=tab_menu] a").each(function(i){
+ $(this).click(function () {
+ $("ul[@id^=tab_menu] a.over").removeClass('over');
+ $(this).addClass('over');
+ $("div[@class^=tab_group]:visible").hide();
+ $( $(this).attr("href") ).fadeIn();
+ tabs.stylesheet = $(this).attr("href") == "#styles" ? 'alt' : 'default';
+ $('link').each(function() {
+ this.disabled = (this.title != '' && this.title != tabs.stylesheet);
+ });
+ return false;
+ });
+ });
+ }
+}