MenuStylePriviewH.jsp
5.41 KB
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
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<jsp:useBean id="mhsc" class="weaver.page.style.MenuHStyleCominfo" scope="page" />
<%
if(!HrmUserVarify.checkUserRight("homepage:Maint", user)){
response.sendRedirect("/notice/noright.jsp");
return;
}
String styleid =Util.null2String(request.getParameter("styleid"));
String titlename = SystemEnv.getHtmlLabelName(22914,user.getLanguage())+":"+SystemEnv.getHtmlLabelName(93,user.getLanguage());
%>
<html>
<head>
<!--Base Css And Js-->
<link href="/css/Weaver_wev8.css" type="text/css" rel=stylesheet>
<link href="/page/maint/style/common_wev8.css" type="text/css" rel=stylesheet>
<link href="/js/jquery/plugins/menu/menuh/menuh_wev8.css" type="text/css" rel=stylesheet>
<SCRIPT language="javascript" src="/js/weaver_wev8.js"></script>
<SCRIPT language="javascript" src="/js/jquery/jquery_wev8.js"></script>
<!--For Menu-->
<SCRIPT language="javascript" src="/js/jquery/plugins/menu/menuh/menuh_wev8.js"></script>
<style id="styleMenu">
<%=mhsc.getCss(styleid)%>
</style>
</head>
<body id="myBody">
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{"+SystemEnv.getHtmlLabelName(1290,user.getLanguage())+",javascript:onBack(),_self} " ;
RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<table width="100%">
<tr style="height:30px;"><td colspan="1"></td></tr>
<tr>
<td width="100%">
<div style="width:95%;height:100%;position:relative;" id="divPreview">
<fieldset>
<legend><%=SystemEnv.getHtmlLabelName(22974,user.getLanguage())%><!--预览区--></legend>
<div class="menuhContainer" id="menuhContainer" cornerTop='<%=mhsc.getCornerTop(styleid) %>' cornerTopRadian='<%=mhsc.getCornerTopRadian(styleid) %>' cornerBottom='<%=mhsc.getCornerBottomRadian(styleid) %>' cornerBottomRadian='<%=mhsc.getCornerBottomRadian(styleid) %>'>
<span id="menuh" class="menuh" >
<ul>
<li><a href="#" class="main">Menu1</a></li>
<li><a href="#" class="main">Menu2</a><ul>
<li><a href="#" class="sub">Menu2-1</a></li>
<li><a href="#" class="sub">Menu2-2</a><ul>
<li><a href="#" class="sub">Menu2-2-1</a></li>
<li><a href="#" class="sub">Menu2-2-2</a></li>
<li><a href="#" class="sub">Menu2-2-3</a></li>
</ul>
</li>
</ul>
</li>
<li ><a href="#" class="main">Menu3</a></li>
</ul>
<br style="clear: left" />
</span>
</div>
</fieldset>
</div>
<div style="clear:both"></div>
</td>
</tr>
</table>
</body>
</html>
<script language="javascript">
$(document).ready(function(){
menuh.arrowimages.down[1]="<%=mhsc.getIconMainDown(styleid)%>";
menuh.arrowimages.right[1]="<%=mhsc.getIconSubDown(styleid)%>";
menuh.init({
mainmenuid: "menuh",
contentsource: "markup"
})
$('.radian').each(function(){
var cValue="";
if(this.name=="cornerTopRadian"){
cValue="<%=mhsc.getCornerTopRadian(styleid)%>"
} else if(this.name=="cornerBottomRadian"){
cValue="<%=mhsc.getCornerBottomRadian(styleid)%>"
}
this.value=cValue;
$(this).bind("blur",function(){
var prevObj=this.previousSibling.previousSibling.previousSibling ;
if(prevObj.value=="Right") { //直角
$("."+(prevObj.parentNode.r_id)).uncornerById(prevObj.loc);
} else { //圆角
$("."+(prevObj.parentNode.r_id)).uncornerById(prevObj.loc);
$("."+(prevObj.parentNode.r_id)).corner("Round "+prevObj.loc+" "+this.value,prevObj.loc);
}
});
});
$(".corner").each(function(){
var cornerTop="<%=mhsc.getCornerTop(styleid)%>"
var cornerBottom="<%=mhsc.getCornerBottom(styleid)%>"
var r_id=this.r_id;
var cValue="";
var cPos="";
if(this.pos=="top") {
cValue=cornerTop;
cPos="top";
} else {
cValue=cornerBottom;
cPos="bottom";
}
for(var i=0;i<this.children.length;i++){
var child=this.children[i];
//alert(child);
$(child).bind("click",function(){
if(this.checked){
if(this.value=="Right") { //直角
$("."+r_id).uncornerById(cPos);
} else { //圆角
$("."+r_id).uncornerById(cPos);
var cValueRadian=$(this).parent().children("INPUT.radian").val();
//alert(cValueRadian);
//alert(r_id)
$("."+r_id).corner(" "+this.value+" "+cPos+" "+cValueRadian,cPos);
}
}
});
if(child.value==cValue){
child.checked=true;
$(child).trigger("click");
}
}
});
});
/*当主菜单和子菜单的图标发生更改时,处理图标的是否显示判断*/
$(".downarrowclass").bind('error',function(){
if($(this).attr("src")==''){
$(this).hide();
}
})
$(".downarrowclass").bind('load',function(){
if($(this).attr("src")!=''){
$(this).show();
}
})
$(".rightarrowclass").bind('error',function(){
if($(this).attr("src")==''){
$(this).hide();
}
})
$(".rightarrowclass").bind('load',function(){
if($(this).attr("src")!=''){
$(this).show();
}
})
window.onscroll=function(){
$("#divPreview").css("top",document.body.scrollTop);
};
function onBack(){
location.href='/page/maint/style/MenuStyleList.jsp';
}
</script>