Code Duplication    Length = 21-21 lines in 2 locations

api/js/etemplate/test/jquery.js 1 location

@@ 7067-7087 (lines=21) @@
7064
		return jQuery.param( this.serializeArray() );
7065
	},
7066
7067
	serializeArray: function() {
7068
		return this.map(function(){
7069
			return this.elements ? jQuery.makeArray( this.elements ) : this;
7070
		})
7071
		.filter(function(){
7072
			return this.name && !this.disabled &&
7073
				( this.checked || rselectTextarea.test( this.nodeName ) ||
7074
					rinput.test( this.type ) );
7075
		})
7076
		.map(function( i, elem ){
7077
			var val = jQuery( this ).val();
7078
7079
			return val == null ?
7080
				null :
7081
				jQuery.isArray( val ) ?
7082
					jQuery.map( val, function( val, i ){
7083
						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
7084
					}) :
7085
					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
7086
		}).get();
7087
	}
7088
});
7089
7090
// Attach a bunch of functions for handling common AJAX events

api/js/egw_action/test/js/jquery.js 1 location

@@ 6180-6200 (lines=21) @@
6177
		return jQuery.param( this.serializeArray() );
6178
	},
6179
6180
	serializeArray: function() {
6181
		return this.map(function(){
6182
			return this.elements ? jQuery.makeArray( this.elements ) : this;
6183
		})
6184
		.filter(function(){
6185
			return this.name && !this.disabled &&
6186
				( this.checked || rselectTextarea.test( this.nodeName ) ||
6187
					rinput.test( this.type ) );
6188
		})
6189
		.map(function( i, elem ){
6190
			var val = jQuery( this ).val();
6191
6192
			return val == null ?
6193
				null :
6194
				jQuery.isArray( val ) ?
6195
					jQuery.map( val, function( val, i ){
6196
						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6197
					}) :
6198
					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
6199
		}).get();
6200
	}
6201
});
6202
6203
// Attach a bunch of functions for handling common AJAX events