createNewMecToTab.jsp
2.68 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
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import="com.weaver.formmodel.util.StringHelper"%>
<%@page import="com.weaver.formmodel.mobile.plugin.PluginCenter"%>
<%@page import="com.weaver.formmodel.mobile.plugin.Plugin"%>
<%@ include file="/mobilemode/init.jsp"%>
<%
PluginCenter pluginCenter = PluginCenter.getInstance();
List<Plugin> plugins = pluginCenter.loadPlugin();
%>
<HTML><HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" rel="stylesheet" href="/mobilemode/css/mec/mec_design_wev8.css" />
<style>
*{
font: 12px Microsoft YaHei;
}
html,body{
height: 100%;
margin: 0px;
padding: 0px;
overflow: hidden;
}
#mec_item_container {
width: 470px;
background-color: #fff;
padding: 0px 5px 8px 5px;
color: #222222;
}
.mec_item {
border: 1px solid #fff;
}
.item_sel {
border: 1px solid rgb(114,173,9);
background-color: #f5f5f5;
}
.mec_node em{
margin-left: 5px;
}
.mec_node span{
width: 50px;
}
</style>
<script>
$(document).ready(function () {
$(".mec_item").click(function(){
if(!$(this).hasClass("item_sel")){
$(this).addClass("item_sel");
}else{
$(this).removeClass("item_sel");
}
});
});
function returnResult(){
var mecTypes = [];
$(".item_sel", $("#mec_item_container")).each(function(i){
var mt = {};
mt["mec_type"] = $(".mec_node",$(this)).attr("mec_type");
mecTypes.push(mt);
});
if(top && top.callTopDlgHookFn){
var result = {
"mecTypes" : $.isEmptyObject(mecTypes) ? "" : JSON.stringify(mecTypes)
};
top.callTopDlgHookFn(result);
}
onClose();
}
function onOK(){
returnResult();
}
function onClose(){
top.closeTopDialog();
}
</script>
</HEAD>
<body class="style_language_<%=user.getLanguage() %>">
<div style="padding: 10px 12px;overflow-x:hidden;overflow-y: auto;height:240px">
<div id="mec_item_container">
<% for(int i = 0; i < plugins.size(); i++){
Plugin plugin = plugins.get(i);
if(!plugin.isEnabled()){
continue;
}
%>
<div class="mec_item">
<div class="mec_node" id="<%=plugin.getId() %>" mec="true" mec_init="false" mec_type="<%=plugin.getId() %>">
<em class="<%=plugin.getId() %>"></em>
<span><%=SystemEnv.getHtmlLabelName(Util.getIntValue(plugin.getText()), user.getLanguage()) %></span>
</div>
</div>
<% } %>
</div>
</div>
<div class="e8_zDialog_bottom" style="position: absolute;right: 5px;bottom:-5px;margin-right: 16px;">
<button type="button" class="e8_btn_submit" onclick="onOK()"><%=SystemEnv.getHtmlLabelName(83446,user.getLanguage())%><!-- 确定 --></button>
<button type="button" class="e8_btn_cancle" onclick="onClose()"><%=SystemEnv.getHtmlLabelName(31129,user.getLanguage())%><!-- 取消 --></button>
</div>
</body>
</html>