| @@ 10098-10124 (lines=27) @@ | ||
| 10095 | serialize: function() { |
|
| 10096 | return jQuery.param( this.serializeArray() ); |
|
| 10097 | }, |
|
| 10098 | serializeArray: function() { |
|
| 10099 | return this.map( function() { |
|
| 10100 | ||
| 10101 | // Can add propHook for "elements" to filter or add form elements |
|
| 10102 | var elements = jQuery.prop( this, "elements" ); |
|
| 10103 | return elements ? jQuery.makeArray( elements ) : this; |
|
| 10104 | } ) |
|
| 10105 | .filter( function() { |
|
| 10106 | var type = this.type; |
|
| 10107 | ||
| 10108 | // Use .is(":disabled") so that fieldset[disabled] works |
|
| 10109 | return this.name && !jQuery( this ).is( ":disabled" ) && |
|
| 10110 | rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && |
|
| 10111 | ( this.checked || !rcheckableType.test( type ) ); |
|
| 10112 | } ) |
|
| 10113 | .map( function( i, elem ) { |
|
| 10114 | var val = jQuery( this ).val(); |
|
| 10115 | ||
| 10116 | return val == null ? |
|
| 10117 | null : |
|
| 10118 | jQuery.isArray( val ) ? |
|
| 10119 | jQuery.map( val, function( val ) { |
|
| 10120 | return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; |
|
| 10121 | } ) : |
|
| 10122 | { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; |
|
| 10123 | } ).get(); |
|
| 10124 | } |
|
| 10125 | } ); |
|
| 10126 | ||
| 10127 | ||
| @@ 9004-9030 (lines=27) @@ | ||
| 9001 | serialize: function() { |
|
| 9002 | return jQuery.param( this.serializeArray() ); |
|
| 9003 | }, |
|
| 9004 | serializeArray: function() { |
|
| 9005 | return this.map( function() { |
|
| 9006 | ||
| 9007 | // Can add propHook for "elements" to filter or add form elements |
|
| 9008 | var elements = jQuery.prop( this, "elements" ); |
|
| 9009 | return elements ? jQuery.makeArray( elements ) : this; |
|
| 9010 | } ) |
|
| 9011 | .filter( function() { |
|
| 9012 | var type = this.type; |
|
| 9013 | ||
| 9014 | // Use .is( ":disabled" ) so that fieldset[disabled] works |
|
| 9015 | return this.name && !jQuery( this ).is( ":disabled" ) && |
|
| 9016 | rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && |
|
| 9017 | ( this.checked || !rcheckableType.test( type ) ); |
|
| 9018 | } ) |
|
| 9019 | .map( function( i, elem ) { |
|
| 9020 | var val = jQuery( this ).val(); |
|
| 9021 | ||
| 9022 | return val == null ? |
|
| 9023 | null : |
|
| 9024 | jQuery.isArray( val ) ? |
|
| 9025 | jQuery.map( val, function( val ) { |
|
| 9026 | return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; |
|
| 9027 | } ) : |
|
| 9028 | { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; |
|
| 9029 | } ).get(); |
|
| 9030 | } |
|
| 9031 | } ); |
|
| 9032 | ||
| 9033 | ||
| @@ 8484-8509 (lines=26) @@ | ||
| 8481 | serialize: function() { |
|
| 8482 | return jQuery.param( this.serializeArray() ); |
|
| 8483 | }, |
|
| 8484 | serializeArray: function() { |
|
| 8485 | return this.map(function() { |
|
| 8486 | // Can add propHook for "elements" to filter or add form elements |
|
| 8487 | var elements = jQuery.prop( this, "elements" ); |
|
| 8488 | return elements ? jQuery.makeArray( elements ) : this; |
|
| 8489 | }) |
|
| 8490 | .filter(function() { |
|
| 8491 | var type = this.type; |
|
| 8492 | ||
| 8493 | // Use .is( ":disabled" ) so that fieldset[disabled] works |
|
| 8494 | return this.name && !jQuery( this ).is( ":disabled" ) && |
|
| 8495 | rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && |
|
| 8496 | ( this.checked || !rcheckableType.test( type ) ); |
|
| 8497 | }) |
|
| 8498 | .map(function( i, elem ) { |
|
| 8499 | var val = jQuery( this ).val(); |
|
| 8500 | ||
| 8501 | return val == null ? |
|
| 8502 | null : |
|
| 8503 | jQuery.isArray( val ) ? |
|
| 8504 | jQuery.map( val, function( val ) { |
|
| 8505 | return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; |
|
| 8506 | }) : |
|
| 8507 | { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; |
|
| 8508 | }).get(); |
|
| 8509 | } |
|
| 8510 | }); |
|
| 8511 | ||
| 8512 | ||