TreeShowNew.jsp
20.8 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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="weaver.conn.*"%>
<%@ page import="weaver.hrm.company.*"%>
<%@ page import="weaver.hrm.resource.*"%>
<%@ page import="weaver.workrelate.util.CommonTransUtil" %>
<jsp:useBean id="ResourceComInfo" class="weaver.hrm.resource.ResourceComInfo" scope="page" />
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="cmutil" class="weaver.workrelate.util.CommonTransUtil" scope="page"/>
<%@ include file="/spa/workrelate/static/index.html" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" href="/workrelate/js/jit/base.css" rel="stylesheet" />
<link type="text/css" href="/workrelate/js/jit/Spacetree.css" rel="stylesheet" />
<style type="text/css">
html,body{background: #fff;}
#center-container{cursor: move;}
#right-container{width: 130px;height: auto;border-right: 1px #EFEFEF solid;border-bottom: 1px #EFEFEF solid;overflow: hidden;
top: 0px;left: 0px;right: auto;bottom: auto;}
.root,.box{width: 140px;height: 60px;text-align: left;font-size: 12px;background: url(/workrelate/images/trans.png) repeat;}
.root{text-align: center;line-height: 60px;}
.datatable{width: 100%;table-layout: fixed;margin: 0px;}
.info1,.info{line-height: 20px;empty-cells: show;word-break: keep-all;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;
padding-left: 4px;padding-right: 4px;color: #333333;}
.info1{text-align: right;color: #838383;}
.info3 a{float: right;}
.mytop {
float: left;
width: 75px;
text-overflow: ellipsis;
overflow: hidden;
text-align: left;
}
</style>
<%
String condtype = Util.null2String(request.getParameter("condtype"));
String hrmid = Util.null2String(request.getParameter("hrmid"));
String pgId = Util.null2String(request.getParameter("pgId"));
if(hrmid.equals("") || hrmid.equals("0")) hrmid = user.getUID()+"";
boolean showall = false;
String rootname = "";
boolean openCompanyGoal = true;
if(condtype.equals("2")){
rootname = SystemEnv.getHtmlLabelName(506155,user.getLanguage());//泛微目标总纲
if(user.getUID()==2){
showall = true;
}else{
rs.executeSql("select goalmaint,iscgoal from GM_BaseSetting");
if(rs.next()){
String goalmaint = Util.null2String(rs.getString("goalmaint"));
int iscgoal = Util.getIntValue(rs.getString("iscgoal"),0);
if(goalmaint.indexOf(","+user.getUID()+",")>-1){
showall = true;
}else if(iscgoal==1){
showall = true;
}
}
hrmid = "";
rs.executeSql("select hrmid from GM_RightSetting where orgid=1 and type=1");
while(rs.next()){
hrmid += "," + Util.null2String(rs.getString(1));
}
if(hrmid.length()==0){
openCompanyGoal = false;
}
if(!hrmid.equals("")) hrmid = hrmid.substring(1);
}
}else{
showall = true;
rootname = SystemEnv.getHtmlLabelName(509157,user.getLanguage()).replace("${code}",ResourceComInfo.getLastname(hrmid));
}
String str = "";
String nodeStr = "";
if(!openCompanyGoal){
str ="var json = {id: '-1',name: '<div class=\"root\">"+SystemEnv.getHtmlLabelName(509158,user.getLanguage())+"</div>',data: {},children: []}";
nodeStr = "var pgId = null;";
}else {
int period = Util.getIntValue(request.getParameter("period"),3);
int periody = Util.getIntValue(request.getParameter("periody"),Integer.parseInt(TimeUtil.getCurrentDateString().substring(0,4)));
int periodm = Util.getIntValue(request.getParameter("periodm"),Integer.parseInt(TimeUtil.getCurrentDateString().substring(5,7)));
int periods = Util.getIntValue(request.getParameter("periods"),Integer.parseInt(TimeUtil.getCurrentSeason()));
String datefrom = "";
String dateto = "";
if(period==1){//月度
datefrom = TimeUtil.getYearMonthFirstDay(periody,periodm);
dateto = TimeUtil.getYearMonthEndDay(periody,periodm);
}else if(period==2){//季度
if(periods==1){
datefrom = TimeUtil.getYearMonthFirstDay(periody,1);
dateto = TimeUtil.getYearMonthEndDay(periody,3);
}else if(periods==2){
datefrom = TimeUtil.getYearMonthFirstDay(periody,4);
dateto = TimeUtil.getYearMonthEndDay(periody,6);
}else if(periods==3){
datefrom = TimeUtil.getYearMonthFirstDay(periody,7);
dateto = TimeUtil.getYearMonthEndDay(periody,9);
}else if(periods==4){
datefrom = TimeUtil.getYearMonthFirstDay(periody,10);
dateto = TimeUtil.getYearMonthEndDay(periody,12);
}
}else if(period==3){//年度
datefrom = TimeUtil.getYearMonthFirstDay(periody,1);
dateto = TimeUtil.getYearMonthEndDay(periody,12);
}else if(period==4){//三年
datefrom = com.weaver.general.TimeUtil.getYearMonthFirstDay(periody,1);
dateto = com.weaver.general.TimeUtil.getYearMonthEndDay(periody+3,12);
}else if(period==5){//五年
datefrom = com.weaver.general.TimeUtil.getYearMonthFirstDay(periody,1);
dateto = com.weaver.general.TimeUtil.getYearMonthEndDay(periody+5,12);
}
if(showall && "".equals(pgId)){
str = (String)staticobj.getRecordFromObj("GM_GOALSHOW","GM_GOAL_"+hrmid+"_"+period+"_"+datefrom+"_"+dateto+"_"+showall+"_"+condtype+"_"+user.getLanguage()+"_"+user.getUID());
nodeStr = "var pgId = null;";
}
if(str==null || "".equals(str)){
Map<String,String> result = this.getInfo(hrmid,period,datefrom,dateto,showall,pgId,user);
str = "var json = {";
str += "id: '-1',";
str += "name: '"+"<div class=\"root\">"+rootname+""+"</div>"+"',";
str += "data: {},";
if(showall){
str += "children: [";
str += result.get("jsonstr");
str += "]";
}
str += "}";
if("".equals(result.get("currentNodeId"))){
nodeStr = "var pgId = null;";
}else {
nodeStr = "var pgId = '"+result.get("currentNodeId")+"';";
}
staticobj.putRecordToObj("GM_GOALSHOW","GM_GOAL_"+hrmid+"_"+period+"_"+datefrom+"_"+dateto+"_"+showall+"_"+condtype+"_"+user.getLanguage()+"_"+user.getUID(),str);
}
}
%>
<%@ include file="/secondwev/common/head.jsp" %>
</head>
<body onload="init(json,pgId);">
<script type="text/javascript">
<%--console.log(<%=nodeStr%>)--%>
<%=str%>
<%=nodeStr%>
var show = "#F5D8B6";//"#DFA46A";//展开颜色
var showinfo1 = "#b67434";
var showinfo2 = "#fbeee0";
var showinfo3 = "#ffffff";
var showinfo33 = "#d69a60";
var hassub = "#D1E3F7";//"#91B6DF";//含下级颜色
var hassubinfo1 = "#668bb5";
var hassubinfo2 = "#ffffff";
var hassubinfo3 = "#ffffff";
var hassubinfo33 = "#6196D1";
var nosub = "#F2F2F2";//"#F9F9F9";//不含下级颜色
var nosubinfo1 = "#9d9d9d";
var nosubinfo2 = "#333333";
var nosubinfo3 = "#E84C4C";
var nosubinfo33 = "#f2f2f2";
var cinit = 1;
<%if(condtype.equals("2")){%>cinit = 1;<%}%>
</script>
<script language="javascript" type="text/javascript" src="/workrelate/js/jit/jit.js"></script>
<script language="javascript" type="text/javascript" src="/workrelate/js/jit/excanvas.js"></script>
<script language="javascript" type="text/javascript" src="/workrelate/js/jit/spacetree.js"></script>
<div id="center-container">
<div id="infovis"></div>
</div>
<div id="right-container" style="">
<table class="tableStyle">
<tr>
<td>
<div id="log"></div>
</td>
</tr>
</table>
<div style="width: 100%;line-height: 40px;height: 40px;font-size: 14px;color: #23A4FF;text-align: center;"><%=SystemEnv.getHtmlLabelName(33862,user.getLanguage())%></div>
<table style="">
<tr>
<td>
<label for="r-top"><%=SystemEnv.getHtmlLabelName(31276,user.getLanguage())%></label>
</td>
<td>
<input type="radio" id="r-top" name="orientation" value="top" />
</td>
</tr>
<tr>
<td>
<label for="r-bottom"><%=SystemEnv.getHtmlLabelName(23010,user.getLanguage())%></label>
</td>
<td>
<input type="radio" id="r-bottom" name="orientation" value="bottom" />
</td>
</tr>
<tr>
<td>
<label for="r-left"><%=SystemEnv.getHtmlLabelName(22986,user.getLanguage())%></label>
</td>
<td>
<input type="radio" id="r-left" name="orientation" checked="checked" value="left" />
</td>
</tr>
<tr>
<td>
<label for="r-right"><%=SystemEnv.getHtmlLabelName(22988,user.getLanguage())%></label>
</td>
<td>
<input type="radio" id="r-right" name="orientation" value="right" />
</td>
</tr>
<tr>
</tr>
</table>
</div>
<div id="bg" style='display:none;z-index:10000;width:100%;height:100%;position: absolute;top: 0px;bottom: 0px;left: 0px;right: 0px;background: url(/workrelate/images/bg_ahp.png) repeat;' align='center'>
</div>
<div id="detail" style="width: 540px;height: auto;position: absolute;z-index: 10001;display: none;border: 1px #F2F2F2 solid;
border-radius: 4px;-moz-border-radius: 4px;-webkit-border-radius: 4px;">
<div id="" style="width: 100%;height: 40px;position: relative;background: #F2F2F2;border-bottom: 1px #E8E8E8 solid;display: none;">
<div style="position: absolute;left: 0px;line-height: 40px;margin-left: 5px;font-weight: bold;"><%=SystemEnv.getHtmlLabelName(509167,user.getLanguage())%></div>
<div style="width: 30px;height: 40px;background: url('../images/btn_close.png') center no-repeat;cursor: pointer;
position: absolute;right: 0px;" title="<%=SystemEnv.getHtmlLabelName(309,user.getLanguage())%>" onclick="closeDetail()"></div>
</div>
<div style="width: 30px;height: 40px;background: url('../images/btn_close.png') center no-repeat;cursor: pointer;
position: absolute;right: 2px;" title="<%=SystemEnv.getHtmlLabelName(309,user.getLanguage())%>" onclick="closeDetail()"></div>
<iframe id="detailframe" style="width:100%;height:100%;" frameborder="0"></iframe>
</div>
<script type="text/javascript">
$(document).ready(function(){
$(".jNiceRadio").click(function(){
changeOperation($(this).parent().find("input[type='radio']"));
});
});
function showDetail(dataid){
var goalid = $("#box"+dataid).attr("_goalid");
//openOperateWindow("Main.jsp?showdetail=1&goalid="+goalid);
var width = $(window).width();
var height = $(window).height();
var w = Math.round(width*0.6);
var h = Math.round(height*0.8);
var left = (width-w)/2;
var top = (height-h)/2;
openOperateWindow("/spa/workrelate/static/index.html#/main/workrelate/goal/goalDetail?id="+goalid);
}
//
function addSubGoal(dataid) {
var goalid = $("#box"+dataid).attr("_goalid");
parent.window.addNodeGoal(goalid);
// var goalname = $("#box"+dataid).attr("_goalname");
//openOperateWindow("/spa/workrelate/static/index.html#/main/workrelate/goal/goalAdd?parentid="+goalid);
}
function closeDetail(){
$("#detail").fadeOut(500,function(){
$("#bg").hide();
$("#detailframe").attr("src","");
});
}
function openOperateWindow(url){
//openFullWindowHaveBar(url);
var redirectUrl = url ;
var width = screen.width ;
var height = screen.height ;
var top = 0;
//alert(height+'-'+top);
var left =0;
// var width = 910 ;
// var height = 500 ;
var szFeatures = "" ;
szFeatures +="top="+top+"," ;
szFeatures +="left="+left+"," ;
szFeatures +="width="+width+"," ;
szFeatures +="height="+height+"," ;
//szFeatures +="directories=no," ;
szFeatures +="status=yes,toolbar=no,location=no," ;
//szFeatures +="menubar=no," ;
szFeatures +="scrollbars=yes," ;
szFeatures +="resizable=yes" ;
window.open(redirectUrl,"",szFeatures) ;
}
</script>
</body>
</html>
<%!
String currentNodeId = ""; //全局的当前点击节点
private Map<String,String> getInfo(String userid,int period,String datefrom,String dateto,boolean showall,String pgId,User user) throws Exception{
if("".equals(pgId)){
currentNodeId = "";
}
Map<String,String> result = new HashMap();
if(userid.equals("")){
result.put("jsonstr","");
return result;
}
StringBuffer nowNode = new StringBuffer();
RecordSet rs = new RecordSet();
StringBuffer sql = new StringBuffer();
sql.append("select t1.id,t1.name,t1.status,t1.creater,t1.principalid,t1.attribute,t1.target,t1.tunit,t2.orgId,t2.type"
+" from GM_GoalInfo t1 left join GM_RightSetting t2 on t1.principalid=t2.hrmId"
+" where (t1.deleted=0 or t1.deleted is null) and t1.principalid in ("+userid+")"
+" and not exists(select 1 from GM_GoalInfo t3 where t1.parentid=t3.id and t3.principalid in ("+userid+"))"
);
if(period!=0){
sql.append(" and t1.period="+period);
}
if(!datefrom.equals("")){
sql.append(" and t1.enddate>='"+datefrom+"'");
}
if(!dateto.equals("")){
sql.append(" and t1.enddate<='"+dateto+"'");
}
sql.append(" order by t1.showorder,t1.id");
String goalname = "";
double target = 0;
String tunit = "";
String orgid = "";
int type = 0;
rs.executeSql(sql.toString());
String dataid = "";
String goalid = "";
String principalid = "";
// String currentNodeId = "";
String status = "";
while(rs.next()){
goalname = Util.null2String(rs.getString("name"));
principalid = Util.null2String(rs.getString("principalid"));
target = Util.getDoubleValue(rs.getString("target"),0);
tunit = Util.null2String(rs.getString("tunit"));
orgid = Util.null2String(rs.getString("orgId"));
type = Util.getIntValue(rs.getString("type"),0);
dataid = String.valueOf(UUID.randomUUID());
goalid = Util.null2String(rs.getString("id"));;
status = Util.null2String(rs.getString("status"));
if(goalid.equals(pgId)){
currentNodeId = dataid;
}
nowNode.append("{");
nowNode.append("id: '" + dataid + "',");
nowNode.append("name: '<div id=\"box"+dataid+"\" class=\"box\" _goalid=\""+goalid+"\" _goalname=\""+goalname+"\">" + this.getGoalTitle(principalid,goalname,target,tunit,orgid,type,dataid,goalid,user,status) + "</div>',");
nowNode.append("data: {},");
if(showall){
Map<String,String> subNode = this.getTree(Util.null2String(rs.getString("id")),period,datefrom,dateto,pgId,user);
if(currentNodeId.equals("")){
currentNodeId = subNode.get("currentNodeId");
}
nowNode.append("children: [" + subNode.get("jsonstr") + "]");
}
nowNode.append("},");
}
String jsonstr = nowNode.toString();
result.put("currentNodeId",currentNodeId);
if (jsonstr.lastIndexOf(",") != -1) {
result.put("jsonstr",jsonstr.substring(0, jsonstr.length() - 1));
return result;
}
result.put("jsonstr",jsonstr);
return result;
}
private Map<String,String> getTree(String supid,int period,String datefrom,String dateto,String pgId,User user) throws Exception{
if("".equals(pgId)){
currentNodeId = "";
}
Map<String,String> result = new HashMap<>();
StringBuffer nowNode = new StringBuffer();
RecordSet rs = new RecordSet();
StringBuffer sql = new StringBuffer();
sql.append("select t1.id,t1.name,t1.status,t1.creater,t1.principalid,t1.attribute,t1.target,t1.tunit,t2.orgId,t2.type"
+" from GM_GoalInfo t1 left join GM_RightSetting t2 on t1.principalid=t2.hrmId"
+" where (t1.deleted=0 or t1.deleted is null) and t1.id<>"+supid+" and t1.parentid="+supid);
if(period!=0){
sql.append(" and t1.period="+period);
}
if(!datefrom.equals("")){
sql.append(" and t1.enddate>='"+datefrom+"'");
}
if(!dateto.equals("")){
sql.append(" and t1.enddate<='"+dateto+"'");
}
sql.append(" order by t1.showorder,t1.id");
String userid = "";
String goalname = "";
double target = 0;
String tunit = "";
String orgid = "";
int type = 0;
rs.executeSql(sql.toString());
String dataid = "";
String goalid = "";
String status = "";
while(rs.next()){
userid = Util.null2String(rs.getString("principalid"));
goalname = Util.null2String(rs.getString("name"));
target = Util.getDoubleValue(rs.getString("target"),0);
tunit = Util.null2String(rs.getString("tunit"));
orgid = Util.null2String(rs.getString("orgId"));
type = Util.getIntValue(rs.getString("type"),0);
dataid = String.valueOf(UUID.randomUUID());
goalid = Util.null2String(rs.getString("id"));
status = Util.null2String(rs.getString("status"));
if(goalid.equals(pgId)){
currentNodeId = dataid;
}
nowNode.append("{");
nowNode.append("id: '" + dataid + "',");
nowNode.append("name: '<div id=\"box"+dataid+"\" class=\"box\" _goalid=\""+goalid+"\" _goalname=\""+goalname+"\">" + this.getGoalTitle(userid,goalname,target,tunit,orgid,type,dataid,goalid,user,status) + "</div>',");
nowNode.append("data: {},");
nowNode.append("children: [" + this.getTree(Util.null2String(rs.getString("id")),period,datefrom,dateto,pgId,user).get("jsonstr") + "]");
nowNode.append("},");
}
String jsonstr = nowNode.toString();
result.put("currentNodeId",currentNodeId);
if (jsonstr.lastIndexOf(",") != -1) {
result.put("jsonstr",jsonstr.substring(0, jsonstr.length() - 1));
return result;
}
result.put("jsonstr",jsonstr);
return result;
}
private String getGoalTitle(String userid,String goalname,double target,String tunit,String orgid,int type,String dataid,String goalid,User user,String status) throws Exception{
StringBuffer title = new StringBuffer();
String orgname = "";
String titleinfo = "";
ResourceComInfo ResourceComInfo = new ResourceComInfo();
if(!orgid.equals("")){
if(type==1){
CompanyComInfo CompanyComInfo = new CompanyComInfo();
orgname = CompanyComInfo.getCompanyname(orgid);
}else if(type==2){
SubCompanyComInfo SubCompanyComInfo = new SubCompanyComInfo();
orgname = SubCompanyComInfo.getSubCompanyname(orgid);
}else if(type==3){
DepartmentComInfo DepartmentComInfo = new DepartmentComInfo();
orgname = DepartmentComInfo.getDepartmentname(orgid);
}
titleinfo = orgname+"["+ResourceComInfo.getLastname(userid)+"]\\n";
}else{
orgname = ResourceComInfo.getLastname(userid);
titleinfo = orgname + "\\n";
}
titleinfo += goalname;
if(target!=0){
titleinfo += "\\n"+target;
if(!tunit.equals("")){
titleinfo += " "+tunit;
}
}
boolean canCreate = true;
if(!goalid.equals("") && !goalid.equals("0")){
CommonTransUtil cmutil = new CommonTransUtil();
if(cmutil.getGoalRight(goalid,user)<2){
RecordSet rs = new RecordSet();
rs.execute("select id from GM_GoalPartner tp where tp.goalid="+goalid+" and tp.partnerid="+user.getUID());
if(!rs.next()){
canCreate = false;
}
}
}
title.append("<table class=\"datatable\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" title=\""+titleinfo+"\">");
title.append("<tr><td class=\"info1\">");
// if(canCreate){
// title.append("<img width=\"20px\" style=\"position: absolute;left: 0px;\" src=\"../images/addGoal.png\" onClick=javascript:addSubGoal(\""+dataid+"\") title=\""+SystemEnv.getHtmlLabelName(508560,user.getLanguage())+"\" alt=\""+SystemEnv.getHtmlLabelName(508560,user.getLanguage())+"\" />");
// }
if(status.equals("2")){
title.append("<span class=\"mytop\">"+SystemEnv.getHtmlLabelName(23774,user.getLanguage())+"</span>");
}else if(status.equals("3")){
title.append("<span class=\"mytop\">"+SystemEnv.getHtmlLabelName(1981,user.getLanguage())+"</span>");
}else{
title.append("<span class=\"mytop\">"+SystemEnv.getHtmlLabelName(1960,user.getLanguage())+"</span>");
}
title.append("<span>"+orgname+"</span>");
title.append("</a></td></tr>");
title.append("<tr><td class=\"info info2\" >"+goalname+"</td></tr>");
// if(status.equals("2")){
// title.append("<tr><td class=\"info info2\" title=\""+goalname+":\""+SystemEnv.getHtmlLabelName(23774,user.getLanguage())+"\" style=\"color: rgb(82, 196, 26);\" >"+goalname+"</td></tr>");
// }else if(status.equals("3")){
// title.append("<tr><td class=\"info info2\" title=\""+goalname+":\""+SystemEnv.getHtmlLabelName(1981,user.getLanguage())+"\" style=\"color: rgb(104, 110, 113);\" >"+goalname+"</td></tr>");
// }else{
// title.append("<tr><td class=\"info info2\" title=\""+goalname+":\""+SystemEnv.getHtmlLabelName(1960,user.getLanguage())+"\" style=\"color: rgb(100, 186, 255);\">"+goalname+"</td></tr>");
// }
title.append("<tr><td class=\"info info3\">");
if(target!=0){
title.append(target);
if(!tunit.equals("")){
title.append(" "+tunit);
}
}
// title.append("<a href=javascript:showDetail(\""+dataid+"\")>"+SystemEnv.getHtmlLabelName(33564,user.getLanguage())+"</a>");
title.append("<img width=\"18px\" style=\"float:right;margin-top: 2px;\" onClick=javascript:showDetail(\""+dataid+"\") width=\"20px\" src=\"../images/viewGoal.png\" title=\""+SystemEnv.getHtmlLabelName(33564,user.getLanguage())+"\" />");
if(canCreate){
title.append("<img style=\"float:right\" width=\"20px\" src=\"../images/addGoal.png\" onClick=javascript:addSubGoal(\""+dataid+"\") title=\""+SystemEnv.getHtmlLabelName(508560,user.getLanguage())+"\" alt=\""+SystemEnv.getHtmlLabelName(508560,user.getLanguage())+"\" />");
}
title.append("</td></tr>");
title.append("</table>");
return title.toString();
}
%>