-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mouse_Over_Menu_Example.dwp
186 lines (97 loc) · 3.59 KB
/
Mouse_Over_Menu_Example.dwp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?xml version="1.0" encoding="utf-8"?>
<WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/WebPart/v2">
<Title>Mouse Over Menu Example</Title>
<FrameType>TitleBarOnly</FrameType>
<Description>Use for formatted text, tables, and images.</Description>
<IsIncluded>true</IsIncluded>
<ZoneID>Right</ZoneID>
<PartOrder>1</PartOrder>
<FrameState>Normal</FrameState>
<Height />
<Width>225px</Width>
<AllowRemove>true</AllowRemove>
<AllowZoneChange>true</AllowZoneChange>
<AllowMinimize>true</AllowMinimize>
<AllowConnect>true</AllowConnect>
<AllowEdit>true</AllowEdit>
<AllowHide>true</AllowHide>
<IsVisible>true</IsVisible>
<DetailLink />
<HelpLink />
<HelpMode>Modeless</HelpMode>
<Dir>Default</Dir>
<PartImageSmall />
<MissingAssembly />
<PartImageLarge>/_layouts/images/mscontl.gif</PartImageLarge>
<IsIncludedFilter />
<Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
<TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName>
<ContentLink xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
<Content xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor"><![CDATA[<menu id="menu_WPQ_" class="ms-SrvMenuUI"></menu>
<SPAN class="ms-HoverCellInActive"
style="CURSOR: hand"
onmouseover="MainMenu(this);"
onmouseout="this.className='ms-HoverCellInActive'"
nowrap valign="bottom"
>
<IMG SRC="/_layouts/images/Menu1.gif" border="0" />
</SPAN>
<script type="Text/JavaScript" language="JavaScript">
// Generate dynamic menu example
// [email protected] MindsharpBlogs.com/Todd
// CopyRight © 2006, All Rights Reserved
// Last updated 03/24/2006
// Please don't delete this header
var IMG_PATH = "/_layouts/images/";
var SEP = ", ";
var menu = document.getElementById("menu_WPQ_");
function MainMenu(span)
{
try
{
this.className = "ms-HoverCellActiveDark";
var options = new Array(8);
options[0] = "http://www.altavista.com, AltaVista";
options[1] = "http://web.ask.com, Ask";
options[2] = "http://www.google.com, Google";
options[3] = "http://www.hotbot.com, HotBot";
options[4] = "http://search.lycos.com, Lycos";
options[5] = "http://search.msn.com, MSN";
options[6] = "http://www.search.com, CNet";
options[7] = "http://search.yahoo.com, Yahoo!";
//Define a WSS dynamic smart menu
if(menu)
{
//Add an option
CAMOpt(menu, "option1",
"document.location.href=\"http://wss1\";",
IMG_PATH + "aca16.gif", "Menu tooltip is broken");
//Add a Seperator
CAMSep(menu);
//Add a submenu with two options
var opts = CASubM(menu, "More Options",
IMG_PATH + "active.gif", "submenu tooltip also broken");
var opts11 = CASubM(opts, "Option 1.1",
IMG_PATH + "acl16.gif", "");
CAMOpt(opts, "Option 1.2",
"document.location.href=\"http://sps1\";",
IMG_PATH + "acl16.gif", "");
for(var i=0; i<options.length; i++)
{
option = options[i].split(SEP);
optionUrl = option[0];
optionName = option[1];
CAMOpt(opts11, optionName,
"document.location.href=\"" + optionUrl + "\";","", "");
}
}
OMenuInt(menu_WPQ_, span, 0, 0, 0);
}
catch(e)
{
alert(e.Message);
}
}
</script>]]></Content>
<PartStorage xmlns="http://schemas.microsoft.com/WebPart/v2/ContentEditor" />
</WebPart>