]> source.dussan.org Git - jquery-ui.git/commitdiff
Form: Rename from `.form()` to `._form()` since its not for public use
authorScott González <scott.gonzalez@gmail.com>
Tue, 11 Oct 2016 13:59:32 +0000 (09:59 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 11 Oct 2016 14:15:04 +0000 (10:15 -0400)
Fixes #15074
Closes gh-1760

tests/unit/core/core.js
ui/form-reset-mixin.js
ui/form.js
ui/widgets/checkboxradio.js

index 9d00d61b65f6f882872019dbfb0e82c9fd67a917..770ea41387407f5fa987fbb82f55aecc10ab4510 100644 (file)
@@ -180,7 +180,7 @@ QUnit.test( "Labels", function( assert ) {
                        QUnit.test( name + this.id.replace( /_/g, " " ), function( assert ) {
                                var ready = assert.async();
                                assert.expect( 1 );
-                               var form = input.form();
+                               var form = input._form();
 
                                // If input has a form the value should reset to "" if not it should be "changed"
                                var value = form.length ? "" : "changed";
index a14c82ee664c566fb007e31a1ee1c394299e2831..5d182186ad9ec08dc8ba7d357c8bae6c8aeea9a6 100644 (file)
@@ -42,7 +42,7 @@ return $.ui.formResetMixin = {
        },
 
        _bindFormResetHandler: function() {
-               this.form = this.element.form();
+               this.form = this.element._form();
                if ( !this.form.length ) {
                        return;
                }
index cfb4bd280df046f6602d73c88b41d473fc12f9f1..fb0a3c6cf00c4eb34ababda49a82ee12a7a4e5c0 100644 (file)
@@ -13,7 +13,7 @@
 // Support: IE8 Only
 // IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
 // with a string, so we need to find the proper form.
-return $.fn.form = function() {
+return $.fn._form = function() {
        return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
 };
 
index 19ae9281108b807003188632df0b498bc7a9c609..228c9fab94400fb1cf5ed77d38b89597a08ebb05 100644 (file)
@@ -161,7 +161,7 @@ $.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
 
                        // Not inside a form, check all inputs that also are not inside a form
                        group = $( nameSelector ).filter( function() {
-                               return $( this ).form().length === 0;
+                               return $( this )._form().length === 0;
                        } );
                }