Code Duplication    Length = 21-21 lines in 2 locations

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

@@ 6141-6161 (lines=21) @@
6138
	insertBefore: "before",
6139
	insertAfter: "after",
6140
	replaceAll: "replaceWith"
6141
}, function( name, original ) {
6142
	jQuery.fn[ name ] = function( selector ) {
6143
		var ret = [],
6144
			insert = jQuery( selector ),
6145
			parent = this.length === 1 && this[0].parentNode;
6146
6147
		if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
6148
			insert[ original ]( this[0] );
6149
			return this;
6150
6151
		} else {
6152
			for ( var i = 0, l = insert.length; i < l; i++ ) {
6153
				var elems = ( i > 0 ? this.clone(true) : this ).get();
6154
				jQuery( insert[i] )[ original ]( elems );
6155
				ret = ret.concat( elems );
6156
			}
6157
6158
			return this.pushStack( ret, name, insert.selector );
6159
		}
6160
	};
6161
});
6162
6163
function getAll( elem ) {
6164
	if ( typeof elem.getElementsByTagName !== "undefined" ) {

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

@@ 5422-5442 (lines=21) @@
5419
	insertBefore: "before",
5420
	insertAfter: "after",
5421
	replaceAll: "replaceWith"
5422
}, function( name, original ) {
5423
	jQuery.fn[ name ] = function( selector ) {
5424
		var ret = [],
5425
			insert = jQuery( selector ),
5426
			parent = this.length === 1 && this[0].parentNode;
5427
5428
		if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
5429
			insert[ original ]( this[0] );
5430
			return this;
5431
5432
		} else {
5433
			for ( var i = 0, l = insert.length; i < l; i++ ) {
5434
				var elems = (i > 0 ? this.clone(true) : this).get();
5435
				jQuery( insert[i] )[ original ]( elems );
5436
				ret = ret.concat( elems );
5437
			}
5438
5439
			return this.pushStack( ret, name, insert.selector );
5440
		}
5441
	};
5442
});
5443
5444
jQuery.extend({
5445
	clone: function( elem, dataAndEvents, deepDataAndEvents ) {