r2452 - Merged trunk r2398:2451.

r2452 - Merged trunk r2398:2451.

Author: scott.gonzalez
Date: Tue Apr 14 17:19:43 2009
New Revision: 2452
Added:
branches/dev/widget-factory/demos/dialog/animated.html (contents,
props changed)
- copied, changed from r2451, /trunk/demos/dialog/animated.html

branches/dev/widget-factory/tests/visual/slider/slider_method_disable.html
(contents, props changed)
- copied, changed from r2451,
/trunk/tests/visual/slider/slider_method_disable.html
branches/dev/widget-factory/ui/i18n/ui.datepicker-et.js
- copied unchanged from r2451, /trunk/ui/i18n/ui.datepicker-et.js
Modified:
branches/dev/widget-factory/demos/datepicker/localization.html
branches/dev/widget-factory/demos/dialog/index.html
branches/dev/widget-factory/demos/index.html
branches/dev/widget-factory/tests/unit/datepicker/datepicker_core.js
branches/dev/widget-factory/tests/unit/datepicker/datepicker_options.js
branches/dev/widget-factory/themes/base/ui.datepicker.css
branches/dev/widget-factory/ui/i18n/ui.datepicker-ar.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-bg.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-ca.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-cs.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-da.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-de.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-el.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-eo.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-es.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-fa.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-fi.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-fr.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-he.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-hr.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-hu.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-hy.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-id.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-is.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-it.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-ja.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-ko.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-lt.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-lv.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-ms.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-nl.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-no.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-pl.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-pt-BR.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-ro.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-ru.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-sk.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-sl.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-sq.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-sr-SR.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-sr.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-sv.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-th.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-tr.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-uk.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-zh-CN.js
branches/dev/widget-factory/ui/i18n/ui.datepicker-zh-TW.js
branches/dev/widget-factory/ui/ui.datepicker.js
branches/dev/widget-factory/ui/ui.dialog.js
branches/dev/widget-factory/ui/ui.progressbar.js
branches/dev/widget-factory/ui/ui.slider.js
Log:
Merged trunk r2398:2451.
Modified: branches/dev/widget-factory/demos/datepicker/localization.html
==============================================================================
--- branches/dev/widget-factory/demos/datepicker/localization.html    
(original)
+++ branches/dev/widget-factory/demos/datepicker/localization.html    Tue Apr
14 17:19:43 2009
@@ -15,6 +15,7 @@
    <script type="text/javascript"
src="../../ui/i18n/ui.datepicker-el.js"></script>
    <script type="text/javascript"
src="../../ui/i18n/ui.datepicker-eo.js"></script>
    <script type="text/javascript"
src="../../ui/i18n/ui.datepicker-es.js"></script>
+    <script type="text/javascript"
src="../../ui/i18n/ui.datepicker-et.js"></script>
    <script type="text/javascript"
src="../../ui/i18n/ui.datepicker-fa.js"></script>
    <script type="text/javascript"
src="../../ui/i18n/ui.datepicker-fi.js"></script>
    <script type="text/javascript"
src="../../ui/i18n/ui.datepicker-fr.js"></script>
@@ -50,11 +51,10 @@
    <link type="text/css" href="../demos.css" rel="stylesheet" />
    <script type="text/javascript">
    $(function() {
-        $.datepicker.setDefaults($.extend({showMonthAfterYear: false},
$.datepicker.regional['']));
+        $.datepicker.setDefaults($.datepicker.regional['']);
        $("#datepicker").datepicker($.datepicker.regional['fr']);
        $("#locale").change(function() {
-            $('#datepicker').datepicker('option', $.extend({showMonthAfterYear:
false},
-                $.datepicker.regional[$(this).val()]));
+            $('#datepicker').datepicker('option',
$.datepicker.regional[$(this).val()]);
        });
    });
    </script>
@@ -77,6 +77,7 @@
        <option value="da">Danish (Dansk)</option>
        <option value="nl">Dutch (Nederlands)</option>
        <option value="eo">Esperanto</option>
+        <option value="et">Estonian (eesti keel)</option>
        <option value="fa">Farsi/Persian
(&#8235;(&#1601;&#1575;&#1585;&#1587;&#1740;</option>
        <option value="fi">Finnish (suomi)</option>
        <option value="fr" selected="selected">French (Fran&ccedil;ais)</option>
Copied: branches/dev/widget-factory/demos/dialog/animated.html (from r2451,
/trunk/demos/dialog/animated.html)
==============================================================================
Modified: branches/dev/widget-factory/demos/dialog/index.html
==============================================================================
--- branches/dev/widget-factory/demos/dialog/index.html    (original)
+++ branches/dev/widget-factory/demos/dialog/index.html    Tue Apr 14 17:19:43
2009
@@ -10,6 +10,7 @@
    <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>
Modified: branches/dev/widget-factory/demos/index.html
==============================================================================
--- branches/dev/widget-factory/demos/index.html    (original)
+++ branches/dev/widget-factory/demos/index.html    Tue Apr 14 17:19:43 2009
@@ -41,6 +41,7 @@
    <script type="text/javascript"
src="../ui/i18n/ui.datepicker-el.js"></script>
    <script type="text/javascript"
src="../ui/i18n/ui.datepicker-eo.js"></script>
    <script type="text/javascript"
src="../ui/i18n/ui.datepicker-es.js"></script>
+    <script type="text/javascript"
src="../ui/i18n/ui.datepicker-et.js"></script>
    <script type="text/javascript"
src="../ui/i18n/ui.datepicker-fa.js"></script>
    <script type="text/javascript"
src="../ui/i18n/ui.datepicker-fi.js"></script>
    <script type="text/javascript"
src="../ui/i18n/ui.datepicker-fr.js"></script>
Modified:
branches/dev/widget-factory/tests/unit/datepicker/datepicker_core.js
==============================================================================
--- branches/dev/widget-factory/tests/unit/datepicker/datepicker_core.js    
(original)
+++ branches/dev/widget-factory/tests/unit/datepicker/datepicker_core.js    
Tue Apr 14 17:19:43 2009
@@ -24,11 +24,16 @@
    same(a1, a2, message);
}
+function addMonths(date, offset) {
+    var maxDay = 32 - new Date(date.getFullYear(), date.getMonth() + offset,
32).getDate();
+    date.setDate(Math.min(date.getDate(), maxDay));
+    date.setMonth(date.getMonth() + offset);
+    return date;
+}
+
function init(id, options) {
    $.datepicker.setDefaults($.datepicker.regional['']);
-    var inp = $(id);
-    inp.datepicker($.extend({duration: ''}, options || {}));
-    return inp;
+    return $(id).datepicker($.extend({duration: ''}, options || {}));
}
var PROP_NAME = 'datepicker';
@@ -38,9 +43,9 @@
module("datepicker: core");
test('baseStructure', function() {
-    var dp = $('#ui-datepicker-div');
    var inp = init('#inp');
    inp.focus();
+    var dp = $('#ui-datepicker-div');
    var iframe = ($.browser.msie && parseInt($.browser.version) < 7);
    ok(dp.is(':visible'), 'Structure - datepicker visible');
    ok(!dp.is('.ui-datepicker-rtl'), 'Structure - not right-to-left');
@@ -94,26 +99,32 @@
    inp = init('#inp', {numberOfMonths: 2});
    inp.focus();
    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');
+    equals(dp.children().length, 3 + (iframe ? 1 : 0), 'Structure multi [2] -
child count');
+    var child = dp.children(':first');
+    ok(child.is('div.ui-datepicker-group') &&
child.is('div.ui-datepicker-group-first'), 'Structure multi [2] - first
month division');
+    child = dp.children(':eq(1)');
+    ok(child.is('div.ui-datepicker-group') &&
child.is('div.ui-datepicker-group-last'), 'Structure multi [2] - second
month division');
+    child = dp.children(':eq(2)');
+    ok(child.is('div.ui-datepicker-row-break'), 'Structure multi [2] - row
break');
    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, 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-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-group') &&
month.is('div.ui-datepicker-group-last'), 'Structure multi [2,2] - fourth
month division');
+    equals(dp.children().length, 6 + (iframe ? 1 : 0), 'Structure multi [2,2]
- child count');
+    child = dp.children(':first');
+    ok(child.is('div.ui-datepicker-group') &&
child.is('div.ui-datepicker-group-first'), 'Structure multi [2,2] - first
month division');
+    child = dp.children(':eq(1)');
+    ok(child.is('div.ui-datepicker-group') &&
child.is('div.ui-datepicker-group-last'), 'Structure multi [2,2] - second
month division');
+    child = dp.children(':eq(2)');
+    ok(child.is('div.ui-datepicker-row-break'), 'Structure multi [2,2] - row
break');
+    child = dp.children(':eq(3)');
+    ok(child.is('div.ui-datepicker-group') &&
child.is('div.ui-datepicker-group-first'), 'Structure multi [2,2] - third
month division');
+    child = dp.children(':eq(4)');
+    ok(child.is('div.ui-datepicker-group') &&
child.is('div.ui-datepicker-group-last'), 'Structure multi [2,2] - fourth
month division');
+    child = dp.children(':eq(5)');
+    ok(child.is('div.ui-datepicker-row-break'), 'Structure multi [2,2] - row
break');
    inp.datepicker('hide').datepicker('destroy');
    
    // Inline
@@ -126,7 +137,7 @@
    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)');
+    var table = dp.children(':eq(1)');
    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');
@@ -136,11 +147,13 @@
    inl = init('#inl', {numberOfMonths: 2});
    dp = inl.children();
    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');
+    equals(dp.children().length, 3 + (iframe ? 1 : 0), 'Structure inline
multi - child count');
+    child = dp.children(':first');
+    ok(child.is('div.ui-datepicker-group') &&
child.is('div.ui-datepicker-group-first'), 'Structure inline multi - first
month division');
+    child = dp.children(':eq(1)');
+    ok(child.is('div.ui-datepicker-group') &&
child.is('div.ui-datepicker-group-last'), 'Structure inline multi - second
month division');
+    child = dp.children(':eq(2)');
+    ok(child.is('div.ui-datepicker-row-break'), 'Structure inline multi - row
break');
    inl.datepicker('destroy');
});
Modified:
branches/dev/widget-factory/tests/unit/datepicker/datepicker_options.js
==============================================================================
--- branches/dev/widget-factory/tests/unit/datepicker/datepicker_options.js    
(original)
+++ branches/dev/widget-factory/tests/unit/datepicker/datepicker_options.js    
Tue Apr 14 17:19:43 2009
@@ -18,6 +18,7 @@
test('option', function() {
    var inp = init('#inp');
    var inst = $.data(inp[0], PROP_NAME);
+    // Set option
    equals(inst.settings.showOn, null, 'Initial setting showOn');
    equals($.datepicker._get(inst, 'showOn'), 'focus', 'Initial instance
showOn');
    equals($.datepicker._defaults.showOn, 'focus', 'Initial default showOn');
@@ -33,6 +34,16 @@
    equals(inst.settings.showOn, null, 'Clear setting showOn');
    equals($.datepicker._get(inst, 'showOn'), 'focus', 'Restore instance
showOn');
    equals($.datepicker._defaults.showOn, 'focus', 'Retain default showOn');
+    // Get option
+    inp = init('#inp');
+    equals(inp.datepicker('option', 'showOn'), 'focus', 'Initial setting
showOn');
+    inp.datepicker('option', 'showOn', 'button');
+    equals(inp.datepicker('option', 'showOn'), 'button', 'Change instance
showOn');
+    inp.datepicker('option', 'showOn', undefined);
+    equals(inp.datepicker('option', 'showOn'), 'focus', 'Reset instance
showOn');
+    same(inp.datepicker('option', 'all'), {duration: ''}, 'Get instance
settings');
+    same(inp.datepicker('option', 'defaults'), $.datepicker._defaults,
+        'Get default settings');
});
test('change', function() {
@@ -176,13 +187,12 @@
    inp.datepicker('option', {defaultDate: ' -1 m '}).
        datepicker('hide').val('').datepicker('show').
        simulate('keydown', {keyCode: $.simulate.VK_ENTER});
-    date = new Date();
-    date.setMonth(date.getMonth() - 1);
+    date = addMonths(new Date(), -1);
    equalsDate(inp.datepicker('getDate'), date, 'Default date -1 m');
    inp.datepicker('option', {defaultDate: '+2M'}).
        datepicker('hide').val('').datepicker('show').
        simulate('keydown', {keyCode: $.simulate.VK_ENTER});
-    date.setMonth(date.getMonth() + 3);
+    date = addMonths(new Date(), 2);
    equalsDate(inp.datepicker('getDate'), date, 'Default date +2M');
    inp.datepicker('option', {defaultDate: '-2y'}).
        datepicker('hide').val('').datepicker('show').
@@ -198,8 +208,7 @@
    inp.datepicker('option', {defaultDate: '+1M +10d'}).
        datepicker('hide').val('').datepicker('show').
        simulate('keydown', {keyCode: $.simulate.VK_ENTER});
-    date = new Date();
-    date.setMonth(date.getMonth() + 1);
+    date = addMonths(new Date(), 1);
    date.setDate(date.getDate() + 10);
    equalsDate(inp.datepicker('getDate'), date, 'Default date +1M +10d');
    date = new Date(2007, 1 - 1, 26);
@@ -234,7 +243,8 @@
    equals(dp.find('.ui-datepicker-prev').text(), 'Prev', 'Navigation prev -
default');
    equals(dp.find('.ui-datepicker-current').text(), 'Today', 'Navigation
current - default');
    equals(dp.find('.ui-datepicker-next').text(), 'Next', 'Navigation next -
default');
-    inp.datepicker('hide').datepicker('option', {navigationAsDateFormat:
true, prevText: '< M', currentText: 'MM', nextText: 'M