appHomepageCreate.jsp
4.79 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
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@page import="com.weaver.formmodel.mobile.ui.manager.MobileAppHomepageManager"%>
<%@page import="com.weaver.formmodel.util.NumberHelper"%>
<%@page import="com.weaver.formmodel.mobile.ui.model.AppHomepage"%>
<%@page import="com.weaver.formmodel.util.StringHelper"%>
<%@ include file="/mobilemode/init.jsp"%>
<%
int subCompanyId=-1;
if(mmdetachable.equals("1")){
subCompanyId=Util.getIntValue(Util.null2String(session.getAttribute("mobilemode_defaultSubCompanyId")),-1);
if(subCompanyId == -1){
subCompanyId = user.getUserSubCompany1();
}
}
int operatelevel = getCheckRightSubCompanyParam("MobileModeSet:All",user,mmdetachable ,subCompanyId);//权限等级-> 2完全控制 1 编辑 0 只读
if(operatelevel < 1){
response.sendRedirect("/notice/noright.jsp");
return;
}
MobileAppHomepageManager mobileAppHomepageManager=MobileAppHomepageManager.getInstance();
int id=NumberHelper.string2Int(request.getParameter("id"),0);
int appid=NumberHelper.string2Int(request.getParameter("appid"),0);
AppHomepage appHomepage = mobileAppHomepageManager.getAppHomepage(id);
String err=Util.null2String(request.getParameter("err"));
String refresh = Util.null2o(request.getParameter("refresh"));
%>
<HTML><HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style>
*{
font: 12px Microsoft YaHei;
}
html,body{
height: 100%;
margin: 0px;
padding: 0px;
overflow: hidden;
}
.e8_tblForm{
width: 100%;
margin: 0 0;
border-collapse: collapse;
}
.e8_tblForm .e8_tblForm_label{
vertical-align: middle;
border-bottom: 1px solid #e6e6e6;
padding: 5px 5px 5px 10px;
}
.e8_tblForm .e8_tblForm_field{
border-bottom: 1px solid #e6e6e6;
padding: 5px 7px;
background-color: #f8f8f8;
}
.e8_label_desc{
color: #aaa;
}
.loading{
position:absolute;
left:45%;
background:#ffffff;
top:40%;
padding:8px;
z-index:20001;
height:auto;
border:1px solid #ccc;
}
#pagenameTip{
color:red;
font-size: 12px;
font-family: 'Microsoft YaHei', Arial;
display: none;
}
</style>
<script type="text/javascript">
if('<%=refresh%>'=='1'){
//parent.refreshWithAppBaseCreated();
}
</script>
<script>
function onSave(){
var pagenameObj = document.getElementById("pagename");
var pagenameV = pagenameObj.value;
if($.trim(pagenameV) == ""){
$("#pagenameTip").show();
pagenameObj.focus();
return;
}
$(".loading").show();
document.frmMain.action = jionActionUrl("com.weaver.formmodel.mobile.ui.servlet.MobileAppHomepageAction", "action=create");
document.frmMain.submit();
}
function onClose(){
top.closeTopDialog();
}
function checkInput(eleId){
var v = $("#" + eleId).val();
if($.trim(v) != ""){
$("#" + eleId + "Span").html("");
$("#" + eleId + "Tip").hide();
}else{
$("#" + eleId + "Span").html("<img align='absMiddle' src='/images/BacoError_wev8.gif'/>");
}
}
</script>
</HEAD>
<body>
<FORM id=weaver name=frmMain method=post target="_self">
<input type=hidden name=id value="<%=id%>">
<input type=hidden name=appid value="<%=appid%>">
<table class="e8_tblForm">
<tr>
<td class="e8_tblForm_label" width="20%"><%=SystemEnv.getHtmlLabelName(195,user.getLanguage())%></td><!-- 名称 -->
<td class="e8_tblForm_field">
<% String pagename = Util.null2String(appHomepage.getPagename()); %>
<input type="text" style="width:80%;" id="pagename" name="pagename" value="<%=pagename %>" onchange="checkInput('pagename');"/>
<span id="pagenameSpan">
<% if(pagename.trim().equals("")){ %>
<img align="absMiddle" src="/images/BacoError_wev8.gif" />
<% } %>
</span>
<span id="pagenameTip"><%=SystemEnv.getHtmlLabelName(125393,user.getLanguage())%><!-- 请填写名称 --></span>
</td>
</tr>
<tr>
<td class="e8_tblForm_label" width="20%" style="vertical-align: top;"><%=SystemEnv.getHtmlLabelName(433,user.getLanguage())%></td><!-- 描述 -->
<td class="e8_tblForm_field">
<textarea name="pagedesc" id="pagedesc" style="font-family: 'Microsoft YaHei', Arial;width: 80%;height:50px;overflow:auto;"><%=Util.null2String(appHomepage.getPagedesc()) %></textarea>
</td>
</tr>
<tr>
<td class="e8_tblForm_label" width="20%" style="vertical-align: top;"><%=SystemEnv.getHtmlLabelName(127550,user.getLanguage())%><!-- 是否为首页 --></td>
<td class="e8_tblForm_field">
<%="1".equals(StringHelper.null2String(appHomepage.getIshomepage()))?SystemEnv.getHtmlLabelName(82677,user.getLanguage()):SystemEnv.getHtmlLabelName(82676,user.getLanguage())%><!-- "是":"否" -->
</td>
</tr>
</TABLE>
</FORM>
<div class="e8_zDialog_bottom">
<button type="button" class="e8_btn_submit" onclick="onSave()"><%=SystemEnv.getHtmlLabelName(86,user.getLanguage())%><!-- 保存 --></button>
<button type="button" class="e8_btn_cancle" onclick="onClose()"><%=SystemEnv.getHtmlLabelName(32694,user.getLanguage())%><!-- 取消 --></button>
</div>
</body>
</html>