Code Duplication    Length = 34-34 lines in 2 locations

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

@@ 1666-1699 (lines=34) @@
1663
	for (var q=0; q<j.length; q++) { if (this.itemPull[j[q]]["complex"]) { this._addSubMenuPolygon(id, this.itemPull[j[q]]["id"]); } }
1664
}
1665
/* inner: add single subpolygon/item/separator */
1666
dhtmlXMenuObject.prototype._renderSublevelPolygon = function(id, parentId) {
1667
	var s = document.createElement("DIV");
1668
	s.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_Polygon "+(this._rtl?"dir_right":"");
1669
	s.dir = "ltr";
1670
	s.oncontextmenu = function(e) { e = e||event; e.returnValue = false; e.cancelBubble = true; return false; }
1671
	s.id = "polygon_" + parentId;
1672
	s.onclick = function(e) { e = e || event; e.cancelBubble = true; }
1673
	s.style.display = "none";
1674
	document.body.insertBefore(s, document.body.firstChild);
1675
	//
1676
	var tbl = document.createElement("TABLE");
1677
	tbl.className = "dhtmlxMebu_SubLevelArea_Tbl";
1678
	tbl.cellSpacing = 0;
1679
	tbl.cellPadding = 0;
1680
	tbl.border = 0;
1681
	var tbd = document.createElement("TBODY");
1682
	tbl.appendChild(tbd);
1683
	s.appendChild(tbl);
1684
	s.tbl = tbl;
1685
	s.tbd = tbd;
1686
	// polygon
1687
	this.idPull[s.id] = s;
1688
	if (this.sxDacProc != null) {
1689
		this.idPull["sxDac_" + parentId] = new this.sxDacProc(s, s.className);
1690
		if (_isIE) {
1691
			this.idPull["sxDac_" + parentId]._setSpeed(this.dacSpeedIE);
1692
			this.idPull["sxDac_" + parentId]._setCustomCycle(this.dacCyclesIE);
1693
		} else {
1694
			this.idPull["sxDac_" + parentId]._setSpeed(this.dacSpeed);
1695
			this.idPull["sxDac_" + parentId]._setCustomCycle(this.dacCycles);
1696
		}
1697
	}
1698
	return s;
1699
}
1700
dhtmlXMenuObject.prototype._renderSublevelItem = function(id, pos) {
1701
	var main_self = this;
1702
	

api/js/dhtmlxMenu/sources/dhtmlxmenu.js 1 location

@@ 1634-1667 (lines=34) @@
1631
	for (var q=0; q<j.length; q++) { if (this.itemPull[j[q]]["complex"]) { this._addSubMenuPolygon(id, this.itemPull[j[q]]["id"]); } }
1632
}
1633
/* inner: add single subpolygon/item/separator */
1634
dhtmlXMenuObject.prototype._renderSublevelPolygon = function(id, parentId) {
1635
	var s = document.createElement("DIV");
1636
	s.className = "dhtmlxMenu_"+this.skin+"_SubLevelArea_Polygon "+(this._rtl?"dir_right":"");
1637
	s.dir = "ltr";
1638
	s.oncontextmenu = function(e) { e = e||event; e.returnValue = false; e.cancelBubble = true; return false; }
1639
	s.id = "polygon_" + parentId;
1640
	s.onclick = function(e) { e = e || event; e.cancelBubble = true; }
1641
	s.style.display = "none";
1642
	document.body.insertBefore(s, document.body.firstChild);
1643
	//
1644
	var tbl = document.createElement("TABLE");
1645
	tbl.className = "dhtmlxMebu_SubLevelArea_Tbl";
1646
	tbl.cellSpacing = 0;
1647
	tbl.cellPadding = 0;
1648
	tbl.border = 0;
1649
	var tbd = document.createElement("TBODY");
1650
	tbl.appendChild(tbd);
1651
	s.appendChild(tbl);
1652
	s.tbl = tbl;
1653
	s.tbd = tbd;
1654
	// polygon
1655
	this.idPull[s.id] = s;
1656
	if (this.sxDacProc != null) {
1657
		this.idPull["sxDac_" + parentId] = new this.sxDacProc(s, s.className);
1658
		if (_isIE) {
1659
			this.idPull["sxDac_" + parentId]._setSpeed(this.dacSpeedIE);
1660
			this.idPull["sxDac_" + parentId]._setCustomCycle(this.dacCyclesIE);
1661
		} else {
1662
			this.idPull["sxDac_" + parentId]._setSpeed(this.dacSpeed);
1663
			this.idPull["sxDac_" + parentId]._setCustomCycle(this.dacCycles);
1664
		}
1665
	}
1666
	return s;
1667
}
1668
dhtmlXMenuObject.prototype._renderSublevelItem = function(id, pos) {
1669
	var main_self = this;
1670