Code Duplication    Length = 42-44 lines in 2 locations

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

@@ 6379-6422 (lines=44) @@
6376
		return ret;
6377
	},
6378
6379
	cleanData: function( elems ) {
6380
		var data, id,
6381
			cache = jQuery.cache,
6382
			special = jQuery.event.special,
6383
			deleteExpando = jQuery.support.deleteExpando;
6384
6385
		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
6386
			if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
6387
				continue;
6388
			}
6389
6390
			id = elem[ jQuery.expando ];
6391
6392
			if ( id ) {
6393
				data = cache[ id ];
6394
6395
				if ( data && data.events ) {
6396
					for ( var type in data.events ) {
6397
						if ( special[ type ] ) {
6398
							jQuery.event.remove( elem, type );
6399
6400
						// This is a shortcut to avoid jQuery.event.remove's overhead
6401
						} else {
6402
							jQuery.removeEvent( elem, type, data.handle );
6403
						}
6404
					}
6405
6406
					// Null the DOM reference to avoid IE6/7/8 leak (#7054)
6407
					if ( data.handle ) {
6408
						data.handle.elem = null;
6409
					}
6410
				}
6411
6412
				if ( deleteExpando ) {
6413
					delete elem[ jQuery.expando ];
6414
6415
				} else if ( elem.removeAttribute ) {
6416
					elem.removeAttribute( jQuery.expando );
6417
				}
6418
6419
				delete cache[ id ];
6420
			}
6421
		}
6422
	}
6423
});
6424
6425
function evalScript( i, elem ) {

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

@@ 5587-5628 (lines=42) @@
5584
		return ret;
5585
	},
5586
5587
	cleanData: function( elems ) {
5588
		var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special,
5589
			deleteExpando = jQuery.support.deleteExpando;
5590
5591
		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
5592
			if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
5593
				continue;
5594
			}
5595
5596
			id = elem[ jQuery.expando ];
5597
5598
			if ( id ) {
5599
				data = cache[ id ] && cache[ id ][ internalKey ];
5600
5601
				if ( data && data.events ) {
5602
					for ( var type in data.events ) {
5603
						if ( special[ type ] ) {
5604
							jQuery.event.remove( elem, type );
5605
5606
						// This is a shortcut to avoid jQuery.event.remove's overhead
5607
						} else {
5608
							jQuery.removeEvent( elem, type, data.handle );
5609
						}
5610
					}
5611
5612
					// Null the DOM reference to avoid IE6/7/8 leak (#7054)
5613
					if ( data.handle ) {
5614
						data.handle.elem = null;
5615
					}
5616
				}
5617
5618
				if ( deleteExpando ) {
5619
					delete elem[ jQuery.expando ];
5620
5621
				} else if ( elem.removeAttribute ) {
5622
					elem.removeAttribute( jQuery.expando );
5623
				}
5624
5625
				delete cache[ id ];
5626
			}
5627
		}
5628
	}
5629
});
5630
5631
function evalScript( i, elem ) {