Skip to content
Browse files

jQuery 1.6 support.

  • Loading branch information...
1 parent 4b17402 commit b796cc57bd1eb0557849ece88c5794b70656f5cd @scottgonzalez scottgonzalez committed Jul 29, 2011
View
2 demos/autocomplete/remote-jsonp.html
@@ -18,7 +18,7 @@
$(function() {
function log( message ) {
$( "<div/>" ).text( message ).prependTo( "#log" );
- $( "#log" ).attr( "scrollTop", 0 );
+ $( "#log" ).scrollTop( 0 );
}
$( "#city" ).autocomplete({
View
2 demos/autocomplete/remote.html
@@ -17,7 +17,7 @@
$(function() {
function log( message ) {
$( "<div/>" ).text( message ).prependTo( "#log" );
- $( "#log" ).attr( "scrollTop", 0 );
+ $( "#log" ).scrollTop( 0 );
}
$( "#birds" ).autocomplete({
View
2 demos/autocomplete/xml.html
@@ -17,7 +17,7 @@
$(function() {
function log( message ) {
$( "<div/>" ).text( message ).prependTo( "#log" );
- $( "#log" ).attr( "scrollTop", 0 );
+ $( "#log" ).scrollTop( 0 );
}
$.ajax({
View
8,936 tests/jquery-1.6.1.js
8,936 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
8,981 tests/jquery-1.6.2.js
8,981 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
8,865 tests/jquery-1.6.js
8,865 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
10 tests/unit/button/button_options.js
@@ -9,24 +9,24 @@ test("disabled, explicity value", function() {
$("#radio01").button({ disabled: false });
same(false, $("#radio01").button("option", "disabled"),
"disabled option set to false");
- same(false, $("#radio01").attr("disabled"), "element is disabled");
+ same(false, $("#radio01").propAttr("disabled"), "element is disabled");
$("#radio02").button({ disabled: true });
same(true, $("#radio02").button("option", "disabled"),
"disabled option set to true");
- same(true, $("#radio02").attr("disabled"), "element is not disabled");
+ same(true, $("#radio02").propAttr("disabled"), "element is not disabled");
});
test("disabled, null", function() {
$("#radio01").button({ disabled: null });
same(false, $("#radio01").button("option", "disabled"),
"disabled option set to false");
- same(false, $("#radio01").attr("disabled"), "element is disabled");
+ same(false, $("#radio01").propAttr("disabled"), "element is disabled");
- $("#radio02").attr("disabled", "disabled").button({ disabled: null });
+ $("#radio02").propAttr("disabled", true).button({ disabled: null });
same(true, $("#radio02").button("option", "disabled"),
"disabled option set to true");
- same(true, $("#radio02").attr("disabled"), "element is not disabled");
+ same(true, $("#radio02").propAttr("disabled"), "element is not disabled");
});
test("text false without icon", function() {
View
8 tests/unit/core/core.html
@@ -107,14 +107,6 @@ <h2 id="qunit-userAgent"></h2>
<span id="spanTabindex-50" tabindex="-50">.</span>
</div>
- <div>
- <input id="inputTabindexfoo" tabindex="foo" />
- <input id="inputTabindex3foo" tabindex="3foo" />
-
- <span id="spanTabindexfoo" tabindex="foo">.</span>
- <span id="spanTabindex3foo" tabindex="3foo">.</span>
- </div>
-
<div id="zIndex100" style="z-index: 100; position: absolute">
<div id="zIndexAutoWithParent">.</div>
</div>
View
18 tests/unit/core/selector.js
@@ -147,15 +147,6 @@ test("focusable - not natively focusable with various tabindex", function() {
isFocusable('#spanTabindex-50', 'span, tabindex -50');
});
-test("focusable - invalid tabindex", function() {
- expect(4);
-
- isFocusable('#inputTabindexfoo', 'input, tabindex foo');
- isFocusable('#inputTabindex3foo', 'input, tabindex 3foo');
- isNotFocusable('#spanTabindexfoo', 'span tabindex foo');
- isNotFocusable('#spanTabindex3foo', 'span, tabindex 3foo');
-});
-
test("focusable - area elements", function() {
isNotFocusable('#areaCoordsNoHref', 'coords but no href');
isFocusable('#areaCoordsHref', 'coords and href');
@@ -233,15 +224,6 @@ test("tabbable - not natively tabbable with various tabindex", function() {
isNotTabbable('#spanTabindex-50', 'span, tabindex -50');
});
-test("tabbable - invalid tabindex", function() {
- expect(4);
-
- isTabbable('#inputTabindexfoo', 'input, tabindex foo');
- isTabbable('#inputTabindex3foo', 'input, tabindex 3foo');
- isNotTabbable('#spanTabindexfoo', 'span tabindex foo');
- isNotTabbable('#spanTabindex3foo', 'span, tabindex 3foo');
-});
-
test("tabbable - area elements", function() {
isNotTabbable('#areaCoordsNoHref', 'coords but no href');
isTabbable('#areaCoordsHref', 'coords and href');
View
6 tests/unit/datepicker/datepicker_methods.js
@@ -111,15 +111,15 @@ test('enableDisable', function() {
var dp = $('.ui-datepicker-inline', inl);
ok(!inl.datepicker('isDisabled'), 'Enable/disable inline - initially marked as enabled');
ok(!dp.children().is('.ui-state-disabled'), 'Enable/disable inline - not visually disabled initially');
- ok(!dp.find('select').attr('disabled'), 'Enable/disable inline - form element enabled initially');
+ ok(!dp.find('select').propAttr('disabled'), 'Enable/disable inline - form element enabled initially');
inl.datepicker('disable');
ok(inl.datepicker('isDisabled'), 'Enable/disable inline - now marked as disabled');
ok(dp.children().is('.ui-state-disabled'), 'Enable/disable inline - visually disabled');
- ok(dp.find('select').attr('disabled'), 'Enable/disable inline - form element disabled');
+ ok(dp.find('select').propAttr('disabled'), 'Enable/disable inline - form element disabled');
inl.datepicker('enable');
ok(!inl.datepicker('isDisabled'), 'Enable/disable inline - now marked as enabled');
ok(!dp.children().is('.ui-state-disabled'), 'Enable/disable inline - not visiually disabled');
- ok(!dp.find('select').attr('disabled'), 'Enable/disable inline - form element enabled');
+ ok(!dp.find('select').propAttr('disabled'), 'Enable/disable inline - form element enabled');
inl.datepicker('destroy');
});
View
2 tests/unit/datepicker/datepicker_options.js
@@ -692,7 +692,7 @@ test('callbacks', function() {
ok(day21.is('.ui-datepicker-unselectable'), 'Before show day - unselectable 21');
ok(day20.is('.day10'), 'Before show day - CSS 20');
ok(!day21.is('.day10'), 'Before show day - CSS 21');
- ok(day20.attr('title') == '', 'Before show day - title 20');
+ ok(!day20.attr('title'), 'Before show day - title 20');
ok(day21.attr('title') == 'Divisble by 3', 'Before show day - title 21');
inp.datepicker('hide').datepicker('destroy');
});
View
4 tests/unit/widget/widget_core.js
@@ -162,12 +162,12 @@ test( "_getCreateOptions()", function() {
options: {
option1: "valuex",
option2: "valuex",
- option3: "value3",
+ option3: "value3"
},
_getCreateOptions: function() {
return {
option1: "override1",
- option2: "overideX",
+ option2: "overideX"
};
},
_create: function() {
View
2 tests/visual/autocomplete/autocomplete.html
@@ -21,7 +21,7 @@
function log(message) {
$("<div/>").text(message).prependTo("#log");
- $("#log").attr("scrollTop", 0);
+ $("#log").scrollTop(0);
}
function enable() {
View
2 ui/jquery.ui.autocomplete.js
@@ -48,7 +48,7 @@ $.widget( "ui.autocomplete", {
"aria-haspopup": "true"
})
.bind( "keydown.autocomplete", function( event ) {
- if ( self.options.disabled || self.element.attr( "readonly" ) ) {
+ if ( self.options.disabled || self.element.propAttr( "readOnly" ) ) {
return;
}
View
18 ui/jquery.ui.button.js
@@ -56,7 +56,7 @@ $.widget( "ui.button", {
.bind( "reset.button", formResetHandler );
if ( typeof this.options.disabled !== "boolean" ) {
- this.options.disabled = this.element.attr( "disabled" );
+ this.options.disabled = this.element.propAttr( "disabled" );
}
this._determineButtonType();
@@ -153,7 +153,7 @@ $.widget( "ui.button", {
return false;
}
$( this ).addClass( "ui-state-active" );
- self.buttonElement.attr( "aria-pressed", true );
+ self.buttonElement.attr( "aria-pressed", "true" );
var radio = self.element[ 0 ];
radioGroup( radio )
@@ -162,7 +162,7 @@ $.widget( "ui.button", {
return $( this ).button( "widget" )[ 0 ];
})
.removeClass( "ui-state-active" )
- .attr( "aria-pressed", false );
+ .attr( "aria-pressed", "false" );
});
} else {
this.buttonElement
@@ -272,9 +272,9 @@ $.widget( "ui.button", {
$.Widget.prototype._setOption.apply( this, arguments );
if ( key === "disabled" ) {
if ( value ) {
- this.element.attr( "disabled", true );
+ this.element.propAttr( "disabled", true );
} else {
- this.element.removeAttr( "disabled" );
+ this.element.propAttr( "disabled", false );
}
return;
}
@@ -291,22 +291,22 @@ $.widget( "ui.button", {
if ( $( this ).is( ":checked" ) ) {
$( this ).button( "widget" )
.addClass( "ui-state-active" )
- .attr( "aria-pressed", true );
+ .attr( "aria-pressed", "true" );
} else {
$( this ).button( "widget" )
.removeClass( "ui-state-active" )
- .attr( "aria-pressed", false );
+ .attr( "aria-pressed", "false" );
}
});
} else if ( this.type === "checkbox" ) {
if ( this.element.is( ":checked" ) ) {
this.buttonElement
.addClass( "ui-state-active" )
- .attr( "aria-pressed", true );
+ .attr( "aria-pressed", "true" );
} else {
this.buttonElement
.removeClass( "ui-state-active" )
- .attr( "aria-pressed", false );
+ .attr( "aria-pressed", "false" );
}
}
},
View
2 ui/jquery.ui.core.js
@@ -58,6 +58,8 @@ $.extend( $.ui, {
// plugins
$.fn.extend({
+ propAttr: $.fn.prop || $.fn.attr,
+
_focus: $.fn.focus,
focus: function( delay, fn ) {
return typeof delay === "number" ?
View
2 ui/jquery.ui.dialog.js
@@ -306,7 +306,7 @@ $.widget("ui.dialog", {
//Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
// http://ui.jquery.com/bugs/ticket/3193
- saveScroll = { scrollTop: self.element.attr('scrollTop'), scrollLeft: self.element.attr('scrollLeft') };
+ saveScroll = { scrollTop: self.element.scrollTop(), scrollLeft: self.element.scrollLeft() };
$.ui.dialog.maxZ += 1;
self.uiDialog.css('z-index', $.ui.dialog.maxZ);
self.element.attr(saveScroll);
View
4 ui/jquery.ui.slider.js
@@ -502,10 +502,10 @@ $.widget( "ui.slider", $.ui.mouse, {
if ( value ) {
this.handles.filter( ".ui-state-focus" ).blur();
this.handles.removeClass( "ui-state-hover" );
- this.handles.attr( "disabled", "disabled" );
+ this.handles.propAttr( "disabled", true );
this.element.addClass( "ui-disabled" );
} else {
- this.handles.removeAttr( "disabled" );
+ this.handles.propAttr( "disabled", false );
this.element.removeClass( "ui-disabled" );
}
break;

0 comments on commit b796cc5

Please sign in to comment.
Something went wrong with that request. Please try again.