r1187 - in branches/dev/slider: release tests tests/static tests/visual themes/base ui
Author: rdworth
Date: Fri Dec 19 17:34:36 2008
New Revision: 1187
Modified:
branches/dev/slider/release/build.xml
branches/dev/slider/tests/datepicker.js
branches/dev/slider/tests/dialog.js
branches/dev/slider/tests/static/accordion.html
branches/dev/slider/tests/static/all.html
branches/dev/slider/tests/static/datepicker.html
branches/dev/slider/tests/static/dialog.html
branches/dev/slider/tests/static/highlight_error.html
branches/dev/slider/tests/static/icons.html
branches/dev/slider/tests/static/overlay.html
branches/dev/slider/tests/static/progressbar.html
branches/dev/slider/tests/static/slider.html
branches/dev/slider/tests/static/tabs.html
branches/dev/slider/tests/visual/datepicker.html
branches/dev/slider/tests/visual/dialog.html
branches/dev/slider/themes/base/ui.accordion.css
branches/dev/slider/themes/base/ui.slider.css
branches/dev/slider/themes/base/ui.tabs.css
branches/dev/slider/themes/base/ui.theme.css
branches/dev/slider/ui/ui.datepicker.js
branches/dev/slider/ui/ui.dialog.js
branches/dev/slider/ui/ui.sortable.js
Log:
/branches/dev/slider: merged dev/slider branch up to trunk rev1186
Modified: branches/dev/slider/release/build.xml
==============================================================================
--- branches/dev/slider/release/build.xml (original)
+++ branches/dev/slider/release/build.xml Fri Dec 19 17:34:36 2008
@@ -17,10 +17,8 @@
<target name="load.properties">
<property file="ant.properties" />
- <property name="current.version" value="1.6pre" />
- <property name="release.version" value="1.6" />
+ <loadfile srcFile="../version.txt" property="release.version" />
<property name="release.filename" value="jquery.ui-${release.version}" />
-
<property name="dist.dir" value="dist/${release.filename}/" />
<property name="build.dir" value="build" />
@@ -42,13 +40,10 @@
<target name="replace-version" depends="load.properties">
<replaceregexp match="@VERSION" replace="${release.version}" flags="g"
byline="true">
<fileset dir="${dist.dir}/ui/" includes="*.js"/>
+ <fileset dir="${dist.dir}/ui/packed/" includes="*.js"/>
+ <fileset dir="${dist.dir}/ui/minified/" includes="*.js"/>
</replaceregexp>
<echo message="Replaced all @VERSION to ${release.version}." />
-
- <replaceregexp match="${current.version}" replace="${release.version}"
flags="g" byline="true">
- <fileset dir="${dist.dir}/" includes="version.txt"/>
- </replaceregexp>
- <echo message="Update version to ${release.version} into version.txt." />
</target>
<target description="Zip the package" name="zip">
@@ -89,6 +84,8 @@
<fileset dir="${src.dir}/" includes="ui.*.js, effects.*.js" />
<arg line="-jar" />
<arg path="${yui-jar}" />
+ <arg value="--charset" />
+ <arg value="UTF-8" />
<srcfile />
<arg line="-o" />
<mapper type="glob" from="*.js" to="${min.folder}/*.min.js" />
@@ -101,6 +98,8 @@
<fileset dir="${src.dir}/i18n/" includes="ui.*.js" />
<arg line="-jar" />
<arg path="${yui-jar}" />
+ <arg value="--charset" />
+ <arg value="UTF-8" />
<srcfile />
<arg line="-o" />
<mapper type="glob" from="*.js" to="${min.folder}/i18n/*.min.js" />
Modified: branches/dev/slider/tests/datepicker.js
==============================================================================
--- branches/dev/slider/tests/datepicker.js (original)
+++ branches/dev/slider/tests/datepicker.js Fri Dec 19 17:34:36 2008
@@ -226,125 +226,102 @@
ok(dp.is(':visible'), 'Structure - datepicker visible');
ok(!dp.is('.ui-datepicker-rtl'), 'Structure - not right-to-left');
ok(!dp.is('.ui-datepicker-multi'), 'Structure - not multi-month');
- equals(dp.children().length, 4 + (iframe ? 1 : 0), 'Structure - child
count');
- var control = dp.children(':first');
- ok(control.is('div.ui-datepicker-control'), 'Structure - control
division');
- equals(control.children().length, 2, 'Structure - control child count');
- ok(control.children(':first').is('div.ui-datepicker-clear'),
- 'Structure - clear division');
- ok(control.children(':last').is('div.ui-datepicker-close'),
- 'Structure - close division');
- var links = dp.children(':eq(1)');
- ok(links.is('div.ui-datepicker-links'), 'Structure - links division');
- equals(links.children().length, 3, 'Structure - links child count');
- ok(links.children(':first').is('div.ui-datepicker-prev') &&
- links.children(':first').html() != '',
- 'Structure - prev division');
- ok(links.children(':eq(1)').is('div.ui-datepicker-current') &&
- links.children(':eq(1)').html() != '',
- 'Structure - current division');
- ok(links.children(':last').is('div.ui-datepicker-next') &&
- links.children(':last').html() != '',
- 'Structure - next division');
- var month = dp.children(':eq(2)');
- ok(month.is('div.ui-datepicker-one-month') &&
month.is('div.ui-datepicker-new-row'),
- 'Structure - month division');
- var header = month.children(':first');
- ok(header.is('div.ui-datepicker-header'), 'Structure - month header
division');
- equals(header.children().length, 2, 'Structure - month header child
count');
- ok(header.children(':first').is('select.ui-datepicker-new-month'),
- 'Structure - new month select');
- ok(header.children(':last').is('select.ui-datepicker-new-year'),
- 'Structure - new year select');
- var table = month.children(':eq(1)');
- ok(table.is('table.ui-datepicker'), 'Structure - month table');
+ equals(dp.children().length, 2 + (iframe ? 1 : 0), 'Structure - child
count');
+
+ var header = dp.children(':first');
+ ok(header.is('div.ui-datepicker-header'), 'Structure - header division');
+ equals(header.children().length, 3, 'Structure - header child count');
+ ok(header.children(':first').is('a.ui-datepicker-prev') &&
header.children(':first').html() != '', 'Structure - prev link');
+ ok(header.children(':eq(1)').is('a.ui-datepicker-next') &&
header.children(':eq(1)').html() != '', 'Structure - next link');
+
+ var title = header.children(':last');
+ ok(title.is('div.ui-datepicker-title') && title.html() != '','Structure -
title division');
+ equals(title.children().length, 2, 'Structure - title child count');
+ ok(title.children(':first').is('span.ui-datepicker-month') &&
title.children(':first').text() != '', 'Structure - month text')
+ ok(title.children(':last').is('span.ui-datepicker-year') &&
title.children(':last').text() != '', 'Structure - year text')
+
+ var table = dp.children(':eq(1)');
+ ok(table.is('table.ui-datepicker-calendar'), 'Structure - month table');
ok(table.children(':first').is('thead'), 'Structure - month table thead');
- var titles = table.children(':first').children(':first');
- ok(titles.is('tr.ui-datepicker-title-row'), 'Structure - month table
title row');
- equals(titles.find('a').length, 7, 'Structure - month table title links');
+ var thead = table.children(':first').children(':first');
+ ok(thead.is('tr'), 'Structure - month table title row');
+ equals(thead.find('th').length, 7, 'Structure - month table title cells');
ok(table.children(':eq(1)').is('tbody'), 'Structure - month table body');
- ok(table.children(':eq(1)').children('tr').length >= 4,
- 'Structure - month table week count');
+ ok(table.children(':eq(1)').children('tr').length >= 4, 'Structure -
month table week count');
var week = table.children(':eq(1)').children(':first');
- ok(week.is('tr.ui-datepicker-days-row'), 'Structure - month table week
row');
+ ok(week.is('tr'), 'Structure - month table week row');
equals(week.children().length, 7, 'Structure - week child count');
- ok(week.children(':first').is('td.ui-datepicker-days-cell') &&
- week.children(':first').is('.ui-datepicker-week-end-cell') &&
- !week.children(':first').is('.ui-datepicker-week-col'),
- 'Structure - month table first day cell');
- ok(week.children(':eq(1)').is('td.ui-datepicker-days-cell') &&
- !week.children(':eq(1)').is('.ui-datepicker-week-end-cell'),
- 'Structure - month table second day cell');
- ok(dp.children('.ui-datepicker-status').length == 0, 'Structure -
status');
+ ok(week.children(':first').is('td.ui-datepicker-week-end'), 'Structure -
month table first day cell');
+ ok(week.children(':last').is('td.ui-datepicker-week-end'), 'Structure -
month table second day cell');
ok(dp.children('iframe').length == (iframe ? 1 : 0), 'Structure -
iframe');
inp.datepicker('hide').datepicker('destroy');
+
+ // Editable month/year and button panel
+ inp = init('#inp', {changeMonth: true, changeYear: true, showButtonPanel:
true});
+ inp.focus();
+
+ var title = dp.find('div.ui-datepicker-title');
+ ok(title.children(':first').is('select.ui-datepicker-month'), 'Structure
- month selector');
+ ok(title.children(':last').is('select.ui-datepicker-year'), 'Structure -
year selector');
+
+ var panel = dp.children(':last');
+ ok(panel.is('div.ui-datepicker-buttonpane'), 'Structure - button panel
division');
+ equals(panel.children().length, 2, 'Structure - button panel child
count');
+
ok(panel.children(':first').is('button.ui-datepicker-current'), 'Structure
- today button');
+ ok(panel.children(':last').is('button.ui-datepicker-close'), 'Structure -
close button');
+ inp.datepicker('hide').datepicker('destroy');
+
// Multi-month 2
inp = init('#inp', {numberOfMonths: 2});
inp.focus();
- ok(dp.is('.ui-datepicker-multi'), 'Structure multi - multi-month');
- equals(dp.children().length, 5 + (iframe ? 1 : 0), 'Structure multi -
child count');
- month = dp.children(':eq(2)');
- ok(month.is('div.ui-datepicker-one-month') &&
month.is('div.ui-datepicker-new-row'),
- 'Structure multi - first month division');
- month = dp.children(':eq(3)');
- ok(month.is('div.ui-datepicker-one-month')
&& !month.is('div.ui-datepicker-new-row'),
- 'Structure multi - second month division');
+ ok(dp.is('.ui-datepicker-multi'), 'Structure multi [2] - multi-month');
+ equals(dp.children().length, 2 + (iframe ? 1 : 0), 'Structure multi [2] -
child count');
+ month = dp.children(':first');
+ ok(month.is('div.ui-datepicker-group') &&
month.is('div.ui-datepicker-group-first'), 'Structure multi [2] - first
month division');
+ month = dp.children(':eq(1)');
+ ok(month.is('div.ui-datepicker-group') &&
month.is('div.ui-datepicker-group-last'), 'Structure multi [2] - second
month division');
inp.datepicker('hide').datepicker('destroy');
+
// Multi-month [2, 2]
inp = init('#inp', {numberOfMonths: [2, 2]});
inp.focus();
ok(dp.is('.ui-datepicker-multi'), 'Structure multi - multi-month');
- equals(dp.children().length, 7 + (iframe ? 1 : 0), 'Structure multi -
child count');
+ equals(dp.children().length, 4 + (iframe ? 1 : 0), 'Structure multi [2,2]
- child count');
+ month = dp.children(':first');
+ ok(month.is('div.ui-datepicker-group') &&
month.is('div.ui-datepicker-group-first'), 'Structure multi [2,2] - first
month division');
+ month = dp.children(':eq(1)');
+ ok(month.is('div.ui-datepicker-group') &&
month.is('div.ui-datepicker-group-last'), 'Structure multi [2,2] - second
month division');
month = dp.children(':eq(2)');
- ok(month.is('div.ui-datepicker-one-month') &&
month.is('div.ui-datepicker-new-row'),
- 'Structure multi - first month division');
+ ok(month.is('div.ui-datepicker-group') &&
month.is('div.ui-datepicker-group-first'), 'Structure multi [2,2] - third
month division');
month = dp.children(':eq(3)');
- ok(month.is('div.ui-datepicker-one-month')
&& !month.is('div.ui-datepicker-new-row'),
- 'Structure multi - second month division');
- month = dp.children(':eq(4)');
- ok(month.is('div.ui-datepicker-one-month') &&
month.is('div.ui-datepicker-new-row'),
- 'Structure multi - third month division');
- month = dp.children(':eq(5)');
- ok(month.is('div.ui-datepicker-one-month')
&& !month.is('div.ui-datepicker-new-row'),
- 'Structure multi - fourth month division');
+ ok(month.is('div.ui-datepicker-group') &&
month.is('div.ui-datepicker-group-last'), 'Structure multi [2,2] - fourth
month division');
inp.datepicker('hide').datepicker('destroy');
+
// Inline
var inl = init('#inl');
dp = inl.children();
ok(dp.is('.ui-datepicker-inline'), 'Structure inline - main div');
ok(!dp.is('.ui-datepicker-rtl'), 'Structure inline - not right-to-left');
ok(!dp.is('.ui-datepicker-multi'), 'Structure inline - not multi-month');
- equals(dp.children().length, 3, 'Structure inline - child count');
- var links = dp.children(':first');
- ok(links.is('div.ui-datepicker-links'), 'Structure inline - links
division');
- equals(links.children().length, 3, 'Structure inline - links child
count');
- var month = dp.children(':eq(1)');
- ok(month.is('div.ui-datepicker-one-month') &&
month.is('div.ui-datepicker-new-row'),
- 'Structure inline - month division');
- var header = month.children(':first');
- ok(header.is('div.ui-datepicker-header'), 'Structure inline - month
header division');
- equals(header.children().length, 2, 'Structure inline - month header
child count');
+ equals(dp.children().length, 2, 'Structure inline - child count');
+ var header = dp.children(':first');
+ ok(header.is('div.ui-datepicker-header'), 'Structure inline - header
division');
+ equals(header.children().length, 3, 'Structure inline - header child
count');
var table = month.children(':eq(1)');
- ok(table.is('table.ui-datepicker'), 'Structure inline - month table');
+ ok(table.is('table.ui-datepicker-calendar'), 'Structure inline - month
table');
ok(table.children(':first').is('thead'), 'Structure inline - month table
thead');
ok(table.children(':eq(1)').is('tbody'), 'Structure inline - month table
body');
- ok(dp.children('.ui-datepicker-status').length == 0, 'Structure inline -
status');
inl.datepicker('destroy');
+
// Inline multi-month
inl = init('#inl', {numberOfMonths: 2});
dp = inl.children();
- ok(dp.is('.ui-datepicker-inline'), 'Structure inline multi - main div');
- ok(dp.is('.ui-datepicker-multi'), 'Structure inline multi - not
multi-month');
- equals(dp.children().length, 4, 'Structure inline multi - child count');
- var links = dp.children(':first');
- ok(links.is('div.ui-datepicker-links'), 'Structure inline multi - links
division');
- equals(links.children().length, 3, 'Structure inline multi - links child
count');
- var month = dp.children(':eq(1)');
- ok(month.is('div.ui-datepicker-one-month') &&
month.is('div.ui-datepicker-new-row'),
- 'Structure inline multi - first month division');
- month = dp.children(':eq(2)');
- ok(month.is('div.ui-datepicker-one-month')
&& !month.is('div.ui-datepicker-new-row'),
- 'Structure inline multi - second month division');
+ ok(dp.is('.ui-datepicker-inline') &&
dp.is('.ui-datepicker-multi'), 'Structure inline multi - main div');
+ equals(dp.children().length, 2 + (iframe ? 1 : 0), 'Structure multi -
child count');
+ month = dp.children(':first');
+ ok(month.is('div.ui-datepicker-group') &&
month.is('div.ui-datepicker-group-first'), 'Structure multi - first month
division');
+ month = dp.children(':eq(1)');
+ ok(month.is('div.ui-datepicker-group') &&
month.is('div.ui-datepicker-group-last'), 'Structure multi - second month
division');
inl.datepicker('destroy');
});
@@ -352,112 +329,56 @@
var dp = $('#ui-datepicker-div');
// Check right-to-left localisation
var inp = init('#inp', $.datepicker.regional['he']);
+ inp.data('showButtonPanel.datepicker',true);
inp.focus();
var iframe = ($.browser.msie && parseInt($.browser.version) < 7);
ok(dp.is('.ui-datepicker-rtl'), 'Structure RTL - right-to-left');
- var links = dp.children(':eq(1)');
- ok(links.is('div.ui-datepicker-links'), 'Structure - links division');
- equals(links.children().length, 3, 'Structure - links child count');
- ok(links.children(':first').is('div.ui-datepicker-next'),
- 'Structure - next division');
- ok(links.children(':eq(1)').is('div.ui-datepicker-current'),
- 'Structure - current division');
- ok(links.children(':last').is('div.ui-datepicker-prev'),
- 'Structure - prev division');
- inp.datepicker('hide').datepicker('destroy');
- // Close at bottom
- inp = init('#inp', {closeAtTop: false});
- inp.focus();
- equals(dp.children().length, 4 + (iframe ? 1 : 0),
- 'Structure close at bottom - child count');
- ok(dp.children(':first').is('div.ui-datepicker-links'),
- 'Structure close at bottom - links division');
- ok(dp.children(':last').prev().is('div.ui-datepicker-control'),
- 'Structure close at bottom - control division');
- inp.datepicker('hide').datepicker('destroy');
- // Mandatory
- inp = init('#inp', {mandatory: true});
- inp.focus();
- var control = dp.children(':first');
- ok(control.is('div.ui-datepicker-control'),
- 'Structure mandatory - control division');
- equals(control.children().length, 1, 'Structure mandatory - control child
count');
- ok(control.children(':first').is('div.ui-datepicker-close'),
- 'Structure mandatory - close division');
+ var header = dp.children(':first');
+ ok(header.is('div.ui-datepicker-header'), 'Structure RTL - header
division');
+ equals(header.children().length, 3, 'Structure RTL - header child count');
+ ok(header.children(':first').is('a.ui-datepicker-next'), 'Structure RTL -
prev link');
+ ok(header.children(':eq(1)').is('a.ui-datepicker-prev'), 'Structure RTL -
next link');
+ var panel = dp.children(':last');
+ ok(panel.is('div.ui-datepicker-buttonpane'), 'Structure RTL - button
division');
+ equals(panel.children().length, 2, 'Structure RTL - button panel child
count');
+ ok(panel.children(':first').is('button.ui-datepicker-close'), 'Structure
RTL - close button');
+ ok(panel.children(':last').is('button.ui-datepicker-current'), 'Structure
RTL - today button');
inp.datepicker('hide').datepicker('destroy');
+
// Hide prev/next
- inp = init('#inp', {hideIfNoPrevNext: true,
- minDate: new Date(2008, 2 - 1, 4), maxDate: new Date(2008, 2 - 1, 14)});
+ inp = init('#inp', {hideIfNoPrevNext: true, minDate: new Date(2008, 2 -
1, 4), maxDate: new Date(2008, 2 - 1, 14)});
inp.val('02/10/2008').focus();
- var links = dp.children(':eq(1)');
- ok(links.is('div.ui-datepicker-links'),
- 'Structure hide prev/next - links division');
- equals(links.children().length, 2, 'Structure hide prev/next - links
child count');
- ok(links.children(':first').is('div.ui-datepicker-prev') &&
- links.children(':first').html() == '',
- 'Structure hide prev/next - prev division');
- ok(links.children(':last').is('div.ui-datepicker-next') &&
- links.children(':last').html() == '',
- 'Structure hide prev/next - next division');
+ var header = dp.children(':first');
+ ok(header.is('div.ui-datepicker-header'), 'Structure hide prev/next -
header division');
+ equals(header.children().length, 1, 'Structure hide prev/next - links
child count');
+ ok(header.children(':first').is('div.ui-datepicker-title'), 'Structure
hide prev/next - title division');
inp.datepicker('hide').datepicker('destroy');
- // Can't change month
- inp = init('#inp', {changeMonth: false});
+
+ // Changeable Month with read-only year
+ inp = init('#inp', {changeMonth: true});
inp.focus();
- var header = dp.children(':eq(2)').children(':first');
- equals(header.children().length, 1, 'Structure change month - header
child count');
- ok(header.children(':last').is('select.ui-datepicker-new-year'),
- 'Structure change month - new year select');
+ var title = dp.children(':first').children(':last');
+ equals(title.children().length, 2, 'Structure changeable month - title
child count');
+ ok(title.children(':first').is('select.ui-datepicker-month'), 'Structure
changeable month - month selector');
+ ok(title.children(':last').is('span.ui-datepicker-year'), 'Structure
changeable month - read-only year');
inp.datepicker('hide').datepicker('destroy');
- // Can't change year
- inp = init('#inp', {changeYear: false});
+
+ // Changeable year with read-only month
+ inp = init('#inp', {changeYear: true});
inp.focus();
- var header = dp.children(':eq(2)').children(':first');
- equals(header.children().length, 1, 'Structure change year - header child
count');
- ok(header.children(':first').is('select.ui-datepicker-new-month'),
- 'Structure change year - new month select');
+ var title = dp.children(':first').children(':last');
+ equals(title.children().length, 2, 'Structure changeable year - title
child count');
+ ok(title.children(':first').is('span.ui-datepicker-month'), 'Structure
changeable year - read-only month');
+ ok(title.children(':last').is('select.ui-datepicker-year'), 'Structure
changeable year - year selector');
inp.datepicker('hide').datepicker('destroy');
- // Can't change first day of week
+
+ // Read-only first day of week
inp = init('#inp', {changeFirstDay: false});
inp.focus();
- var titles = dp.find('.ui-datepicker-title-row');
- equals(titles.children().length, 7, 'Structure change first day - titles
child count');
- equals(titles.find('a').length, 0, 'Structure change first day - titles
links count');
+ var thead = dp.find('.ui-datepicker-calendar thead tr');
+ equals(thead.children().length, 7, 'Structure read-only first day - thead
child count');
+ equals(thead.find('a').length, 0, 'Structure read-only first day - thead
links count');
inp.datepicker('hide').datepicker('destroy');
- // Show weeks
- inp = init('#inp', {showWeeks: true});
- inp.focus();
- titles = dp.find('.ui-datepicker-title-row');
- equals(titles.children().length, 8, 'Structure show weeks - titles child
count');
- var week = dp.find('.ui-datepicker-days-row:first');
- equals(week.children().length, 8, 'Structure show weeks - week child
count');
- ok(week.children(':first').is('td.ui-datepicker-week-col'),
- 'Structure show weeks - week column');
- inp.datepicker('hide').datepicker('destroy');
- // Show status
- inp = init('#inp', {showStatus: true});
- inp.focus();
- equals(dp.children().length, 6 + (iframe ? 1 : 0),
- 'Structure show status - datepicker child count');
- ok(dp.children(':last').prev().is('div.ui-datepicker-status'),
- 'Structure show status - status division');
- inp.datepicker('hide').datepicker('destroy');
- // Inline
- var inl = init('#inl', {showStatus: true, hideIfNoPrevNext: true,
- minDate: new Date(2008, 2 - 1, 4), maxDate: new Date(2008, 2 - 1, 14)});
- dp = inl.children();
- ok(dp.is('.ui-datepicker-inline'), 'Structure inline - main div');
- ok(!dp.is('.ui-datepicker-rtl'), 'Structure inline - not right-to-left');
- ok(!dp.is('.ui-datepicker-multi'), 'Structure inline - not multi-month');
- equals(dp.children().length, 5, 'Structure inline - child count');
- var links = dp.children(':first');
- ok(links.is('div.ui-datepicker-links'), 'Structure inline - links
division');
- equals(links.children().children().length, 0, 'Structure inline - links
child count')