r3547 committed - Merged in trunk r3508:3546.
Revision: 3547
Author: scott.gonzalez
Date: Mon Dec 28 19:02:57 2009
Log: Merged in trunk r3508:3546.
http://code.google.com/p/jquery-ui/source/detail?r=3547
Modified:
/branches/dev/build/build.xml
/branches/dev/tests/unit/datepicker/datepicker_options.js
/branches/dev/tests/unit/sortable/sortable_events.js
/branches/dev/tests/unit/tabs/tabs.html
/branches/dev/tests/unit/tabs/tabs_core.js
/branches/dev/tests/unit/tabs/tabs_options.js
/branches/dev/ui/jquery.ui.mouse.js
/branches/dev/ui/jquery.ui.position.js
/branches/dev/ui/jquery.ui.tabs.js
=======================================
--- /branches/dev/build/build.xml Wed Dec 16 10:33:56 2009
+++ /branches/dev/build/build.xml Mon Dec 28 19:02:57 2009
@@ -33,7 +33,7 @@
<property name="concatenated" value="jquery-ui" />
<property name="concatenated.i18n" value="jquery-ui-i18n" />
- <property name="core.files" value="jquery.ui.core.js,
jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js,
jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.effects.core.js" />
+ <property name="core.files" value="jquery.ui.core.js,
jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js,
jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js,
jquery.ui.sortable.js, jquery.effects.core.js" />
<property description="YUI Compressor" name="yui-jar"
value="${build.dir}/yuicompressor-2.4.2.jar" />
=======================================
--- /branches/dev/tests/unit/datepicker/datepicker_options.js Wed Dec 16
10:33:56 2009
+++ /branches/dev/tests/unit/datepicker/datepicker_options.js Mon Dec 28
19:02:57 2009
@@ -510,13 +510,17 @@
equals(alt.val(), '', 'Alt field - alt - ctrl+end');
// Verify alt field is updated on keyup
alt.val('');
- inp.val('06/04/2008').datepicker('show');
- inp.simulate('keyup', {keyCode: $.simulate.VK_ENTER});
+ inp.val('06/04/200').datepicker('show');
+ inp.simulate('keydown', {charCode: '8'.charCodeAt(0)});
+ inp.simulate('keypress', {charCode: '8'.charCodeAt(0)});
+ inp.simulate('keyup', {charCode: '8'.charCodeAt(0)});
equals(inp.val(), '06/04/2008', 'Alt field - dp - manual entry');
equals(alt.val(), '2008-06-04', 'Alt field - manual entry');
// Verify alt field is not updated on keyup if date is invalid
- inp.val('12/04/');
- inp.simulate('keyup', {keyCode: $.simulate.VK_ENTER});
+ inp.val('12/04');
+ inp.simulate('keydown', {charCode: '/'.charCodeAt(0)});
+ inp.simulate('keypress', {charCode: '/'.charCodeAt(0)});
+ inp.simulate('keyup', {charCode: '/'.charCodeAt(0)});
equals(inp.val(), '12/04/', 'Alt field - dp - manual entry incomplete');
equals(alt.val(), '2008-06-04', 'Alt field - manual entry - not updated');
});
=======================================
--- /branches/dev/tests/unit/sortable/sortable_events.js Thu Feb 5
23:39:52 2009
+++ /branches/dev/tests/unit/sortable/sortable_events.js Mon Dec 28
19:02:57 2009
@@ -16,7 +16,6 @@
ok(hash.helper, 'UI hash includes: helper');
ok(hash.placeholder, 'UI hash includes: placeholder');
ok(hash.position && (hash.position.top && hash.position.left), 'UI hash
includes: position');
- ok(hash.absolutePosition && (hash.absolutePosition.top &&
hash.absolutePosition.left), 'UI hash includes: absolutePosition');
ok(hash.offset && (hash.offset.top && hash.offset.left), 'UI hash
includes: offset');
ok(hash.item, 'UI hash includes: item');
ok(!hash.sender, 'UI hash does not include: sender');
@@ -35,7 +34,6 @@
ok(hash.helper, 'UI hash includes: helper');
ok(hash.placeholder, 'UI hash includes: placeholder');
ok(hash.position && (hash.position.top && hash.position.left), 'UI hash
includes: position');
- ok(hash.absolutePosition && (hash.absolutePosition.top &&
hash.absolutePosition.left), 'UI hash includes: absolutePosition');
ok(hash.offset && (hash.offset.top && hash.offset.left), 'UI hash
includes: offset');
ok(hash.item, 'UI hash includes: item');
ok(!hash.sender, 'UI hash does not include: sender');
@@ -59,7 +57,6 @@
ok(hash.helper, 'UI hash includes: helper');
ok(hash.placeholder, 'UI hash includes: placeholder');
ok(hash.position && (hash.position.top && hash.position.left), 'UI hash
includes: position');
- ok(hash.absolutePosition && (hash.absolutePosition.top &&
hash.absolutePosition.left), 'UI hash includes: absolutePosition');
ok(hash.offset && (hash.offset.top && hash.offset.left), 'UI hash
includes: offset');
ok(hash.item, 'UI hash includes: item');
ok(!hash.sender, 'UI hash does not include: sender');
@@ -77,7 +74,6 @@
ok(hash.helper, 'UI hash includes: helper');
ok(hash.placeholder, 'UI hash includes: placeholder');
ok(hash.position && (hash.position.top && hash.position.left), 'UI hash
includes: position');
- ok(hash.absolutePosition && (hash.absolutePosition.top &&
hash.absolutePosition.left), 'UI hash includes: absolutePosition');
ok(hash.offset && (hash.offset.top && hash.offset.left), 'UI hash
includes: offset');
ok(hash.item, 'UI hash includes: item');
ok(!hash.sender, 'UI hash does not include: sender');
@@ -95,7 +91,6 @@
ok(!hash.helper, 'UI should not include: helper');
ok(hash.placeholder, 'UI hash includes: placeholder');
ok(hash.position && (hash.position.top && hash.position.left), 'UI hash
includes: position');
- ok(hash.absolutePosition && (hash.absolutePosition.top &&
hash.absolutePosition.left), 'UI hash includes: absolutePosition');
ok(hash.offset && (hash.offset.top && hash.offset.left), 'UI hash
includes: offset');
ok(hash.item, 'UI hash includes: item');
ok(!hash.sender, 'UI hash does not include: sender');
@@ -119,7 +114,6 @@
ok(!hash.helper, 'UI hash should not include: helper');
ok(hash.placeholder, 'UI hash includes: placeholder');
ok(hash.position && (hash.position.top && hash.position.left), 'UI hash
includes: position');
- ok(hash.absolutePosition && (hash.absolutePosition.top &&
hash.absolutePosition.left), 'UI hash includes: absolutePosition');
ok(hash.offset && (hash.offset.top && hash.offset.left), 'UI hash
includes: offset');
ok(hash.item, 'UI hash includes: item');
ok(!hash.sender, 'UI hash does not include: sender');
=======================================
--- /branches/dev/tests/unit/tabs/tabs.html Wed Dec 16 17:36:20 2009
+++ /branches/dev/tests/unit/tabs/tabs.html Mon Dec 28 19:02:57 2009
@@ -42,6 +42,34 @@
<div id="colon:test"></div>
<div style="height: 300px;" id="inline-style"></div>
</div>
+ <div id="tabs3">
+ <div>
+ <ul id="tabs3-list">
+ <li><a href="#tabs3-1">1</a></li>
+ </ul>
+ </div>
+ </div>
+ <div id="tabs4">
+ <ul id="tabs4-list">
+ <li><a href="#tabs4-1">1</a></li>
+ </ul>
+ <ol>
+ <li><a href="#tabs4-1">1</a></li>
+ </ol>
+ </div>
+ <div id="tabs4a">
+ <ol id="tabs4a-list">
+ <li><a href="#tabs4a-1">1</a></li>
+ </ol>
+ <ul>
+ <li><a href="#tabs4a-1">1</a></li>
+ </ul>
+ </div>
+ <div id="tabs5">
+ <div>
+ <ul id="tabs5-list"></ul>
+ </div>
+ </div>
</div>
</body>
</html>
=======================================
--- /branches/dev/tests/unit/tabs/tabs_core.js Wed Feb 18 13:44:34 2009
+++ /branches/dev/tests/unit/tabs/tabs_core.js Mon Dec 28 19:02:57 2009
@@ -7,6 +7,24 @@
module("tabs: core");
+test('navigation markup', function() {
+ el = $('#tabs3').tabs();
+ ok($('#tabs3-list').hasClass('ui-tabs-nav'), 'custom markup; allow list
to be any descendant');
+ el.tabs('destroy');
+
+ el = $('#tabs4').tabs();
+ ok($('#tabs4-list').hasClass('ui-tabs-nav'), 'first list found becomes
nav - ul');
+ el.tabs('destroy');
+
+ el = $('#tabs4a').tabs();
+ ok($('#tabs4a-list').hasClass('ui-tabs-nav'), 'first list found becomes
nav - ol');
+ el.tabs('destroy');
+
+ el = $('#tabs5').tabs();
+ ok($('#tabs5-list').hasClass('ui-tabs-nav'), 'empty list can be used');
+ el.tabs('destroy');
+});
+
test('ajax', function() {
expect(4);
stop();
@@ -34,6 +52,5 @@
});
});
-
-
+
})(jQuery);
=======================================
--- /branches/dev/tests/unit/tabs/tabs_options.js Wed Nov 18 10:13:25 2009
+++ /branches/dev/tests/unit/tabs/tabs_options.js Mon Dec 28 19:02:57 2009
@@ -63,22 +63,6 @@
});
-// deprecated... shadows collapsible
-test('deselectable (deprecated)', function() {
- expect(4);
-
- el = $('#tabs1');
-
- el.tabs({ deselectable: true });
- equals(el.tabs('option', 'collapsible'), true, 'option set');
- ok(el.is('.ui-tabs-collapsible'), 'extra class "ui-tabs-collapsible"
attached');
- el.tabs('select', 0);
- equals($('div.ui-tabs-hide', '#tabs1').length, 3, 'all panels should be
hidden');
- el.tabs('option', 'deselectable', false);
- ok(el.is(':not(.ui-tabs-collapsible)'), 'extra
class "ui-tabs-collapsible" not attached');
-
-});
-
test('disabled', function() {
ok(false, "missing test - untested code is broken code.");
});
=======================================
--- /branches/dev/ui/jquery.ui.mouse.js Tue Dec 22 19:37:18 2009
+++ /branches/dev/ui/jquery.ui.mouse.js Mon Dec 28 19:02:57 2009
@@ -32,12 +32,6 @@
return false;
}
});
-
- // Prevent text selection in IE
- if ($.browser.msie) {
- this._mouseUnselectable = this.element.attr('unselectable');
- this.element.attr('unselectable', 'on');
- }
this.started = false;
},
@@ -46,10 +40,6 @@
// other instances of mouse
_mouseDestroy: function() {
this.element.unbind('.'+this.widgetName);
-
- // Restore text selection in IE
- ($.browser.msie
- && this.element.attr('unselectable', this._mouseUnselectable));
},
_mouseDown: function(event) {
=======================================
--- /branches/dev/ui/jquery.ui.position.js Wed Dec 16 10:33:56 2009
+++ /branches/dev/ui/jquery.ui.position.js Mon Dec 28 19:02:57 2009
@@ -36,7 +36,7 @@
targetWidth = target.width();
targetHeight = target.height();
basePosition = { top: 0, left: 0 };
- } else if ('scrollTo' in options.of && options.of.document) {
+ } else if (options.of.scrollTo && options.of.document) {
targetWidth = target.width();
targetHeight = target.height();
basePosition = { top: target.scrollTop(), left: target.scrollLeft() };
=======================================
--- /branches/dev/ui/jquery.ui.tabs.js Tue Dec 22 20:08:03 2009
+++ /branches/dev/ui/jquery.ui.tabs.js Mon Dec 28 19:02:57 2009
@@ -87,8 +87,7 @@
_tabify: function(init) {
- // use $('li:first').parent() so we can find the first ul/ol in DOM order
- this.list = this.element.find('li:first').parent();
+ this.list = this.element.find('ol,ul').eq(0);
this.lis = $('li:has(a[href])', this.list);
this.anchors = this.lis.map(function() { return $('a', this)[0]; });
this.panels = $([]);
--