Code Duplication    Length = 34-34 lines in 2 locations

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

@@ 2157-2190 (lines=34) @@
2154
};
2155
2156
//menu
2157
(function(){
2158
	dhtmlx.extend_api("dhtmlXMenuObject",{
2159
		_init:function(obj){
2160
			return [obj.parent, obj.skin];
2161
		},
2162
		align:"setAlign",
2163
		top_text:"setTopText",
2164
		context:"renderAsContextMenu",
2165
		icon_path:"setIconsPath",
2166
		open_mode:"setOpenMode",
2167
		rtl:"setRTL",
2168
		skin:"setSkin",
2169
		dynamic:"enableDynamicLoading",
2170
		xml:"loadXML",
2171
		items:"items",
2172
		overflow:"setOverflowHeight"
2173
	},{
2174
		items:function(arr,parent){
2175
			var pos = 100000;
2176
			var lastItemId = null;
2177
			for (var i=0; i < arr.length; i++) {
2178
				var item=arr[i];
2179
				if (item.type == "separator") {
2180
					this.addNewSeparator(lastItemId, pos, item.id);
2181
					lastItemId = item.id;
2182
				} else {
2183
					this.addNewChild(parent, pos, item.id, item.text, item.disabled, item.img, item.img_disabled);
2184
					lastItemId = item.id;
2185
					if (item.items) this.items(item.items,item.id);
2186
				}
2187
			}
2188
		}
2189
	});
2190
})();

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

@@ 2133-2166 (lines=34) @@
2130
};
2131
2132
//menu
2133
(function(){
2134
	dhtmlx.extend_api("dhtmlXMenuObject",{
2135
		_init:function(obj){
2136
			return [obj.parent, obj.skin];
2137
		},
2138
		align:"setAlign",
2139
		top_text:"setTopText",
2140
		context:"renderAsContextMenu",
2141
		icon_path:"setIconsPath",
2142
		open_mode:"setOpenMode",
2143
		rtl:"setRTL",
2144
		skin:"setSkin",
2145
		dynamic:"enableDynamicLoading",
2146
		xml:"loadXML",
2147
		items:"items",
2148
		overflow:"setOverflowHeight"
2149
	},{
2150
		items:function(arr,parent){
2151
			var pos = 100000;
2152
			var lastItemId = null;
2153
			for (var i=0; i < arr.length; i++) {
2154
				var item=arr[i];
2155
				if (item.type == "separator") {
2156
					this.addNewSeparator(lastItemId, pos, item.id);
2157
					lastItemId = item.id;
2158
				} else {
2159
					this.addNewChild(parent, pos, item.id, item.text, item.disabled, item.img, item.img_disabled);
2160
					lastItemId = item.id;
2161
					if (item.items) this.items(item.items,item.id);
2162
				}
2163
			}
2164
		}
2165
	});
2166
})();
2167
2168
// terrace
2169
dhtmlXMenuObject.prototype._improveTerraceSkin = function() {