PageSourceSearch

https://www.3rd-wing.net/style_images/1/folder_js_skin/ips_menu_html.js

js 3rd-wing.net collected 2026-10-02 18:19:37 UTC 2,883 bytes, 102 lines download raw bytes

1/*-------------------------------------------------------------------------*/
2// IPS BASIC MENU CLASS (EXTENSION: BUILD SIMPLE MENU)
3// (c) 2005 Invision Power Services, Inc
4// Assumes that "ips_menu.js" has been loaded
5/*-------------------------------------------------------------------------*/
6
7//----------------------------------
8// INIT some CSS classes
9//----------------------------------
10
11var css_mainwrap     = 'popupmenu';
12var css_menusep      = 'popupmenu-item';
13var css_menusep_last = 'popupmenu-item-last';
14
15//----------------------------------
16// INIT some images
17//----------------------------------
18
19var img_item   = "<img src='" + ipb_var_image_url + "/menu_item.gif' border='0' alt='V' style='vertical-align:middle' />";
20var img_action = "<img src='" + ipb_var_image_url + "/menu_item2.gif' border='0' alt='V' />";
21
22/*-------------------------------------------------------------------------*/
23// Return formed image
24/*-------------------------------------------------------------------------*/
25
26function make_image( img )
27{
28	return "<img src='" + ipb_var_image_url + "/" + img + "' border='0' alt='-' class='ipd' />";
29}
30
31/*-------------------------------------------------------------------------*/
32// menu_build_menu
33// cid: ID of opener object (img, div, etc)
34// menuinput: Array of menu entries | Variable of menu HTML
35// complexmenu: Treat as HTML stream if true, else treat as array of HTML
36/*-------------------------------------------------------------------------*/
37
38function menu_build_menu(cid, menuinput, complexmenu)
39{
40	var html = "\n<div class='" + css_mainwrap + "' id='" + cid + "_menu' style='display:none;z-index:100'>\n";
41	
42	if ( ! complexmenu )
43	{
44		len = parseInt(menuinput.length);
45		
46		if ( len > 0 )
47		{
48			for( var i in menuinput )
49			{
50				t = parseInt(i) + 1;
51				
52				thisclass = ( t == len ) ? css_menusep_last : css_menusep;
53				
54				if ( menuinput[i].match( /^--NODIV--/ ) )
55				{
56					html += menuinput[i].replace( /^--NODIV--/, '' );
57				}
58				else
59				{
60					html += "<div class='" + thisclass + "'>\n" + menuinput[i] + "\n</div>\n";
61				}
62			}
63		}
64	}
65	else
66	{
67		html += menuinput;
68	}
69	
70	html += "\n</div>\n";
71	
72	//----------------------------------
73	// Workaround for IE bug which shows
74	// select boxes and other windows GUI
75	// over divs. Write iframe
76	//----------------------------------
77	
78	if ( is_ie )
79	{
80		html += "\n"+'<iframe id="if_' + cid + '" src="' + ipb_var_image_url + '/iframe.html" scrolling="no" frameborder="1" style="position:absolute;top:0px;left:0px;display:none;"></iframe>'+"\n";
81	}
82	
83	//----------------------------------
84	// Write the html
85	//----------------------------------
86	
87	if ( html != '' )
88	{
89		document.open();
90		document.writeln( html );
91		document.close();
92	}
93	
94	//----------------------------------
95	// Register and init
96	//----------------------------------
97	
98	menu_register( cid );
99}
100
101
102

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.