SocialIMPcSysSetting.jsp
30.5 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
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="weaver.file.Prop" %>
<%@ page import="weaver.social.im.SocialImLogin"%>
<%@ page import="net.sf.json.*"%>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title><%=SystemEnv.getHtmlLabelName(774, user.getLanguage())%></title><!-- 系统设置 -->
<link rel="stylesheet" href="/social/css/im_pc_wev8.css" type="text/css" />
<style type="text/css">
* {
padding: 0;
margin: 0;
}
#e-message-version-check span:active {
background: #00A9FF;color:#fff;
}
#e-message-version-check span {
font-size: 12px;color: #666;display: inline-block;border: 1px solid #d2d2d2;width: 112px;text-align: center;border-radius: 4px;cursor: pointer;
}
</style>
</head>
<body>
<div class="pcSysSetTab">
<ul class="sysItems">
<li class="active" name="#tabs-1"><%=SystemEnv.getHtmlLabelName(674, user.getLanguage())%></li><!-- 登录 -->
<li name="#tabs-2"><%=SystemEnv.getHtmlLabelName(126885, user.getLanguage())%></li><!-- 主面板 -->
<li name="#tabs-3"><%=SystemEnv.getHtmlLabelName(126886, user.getLanguage())%></li><!-- 热键 -->
<li name="#tabs-4"><%=SystemEnv.getHtmlLabelName(127109, user.getLanguage())%></li><!-- 消息和提醒 -->
<li name="#tabs-5"><%=SystemEnv.getHtmlLabelName(130690, user.getLanguage())%></li><!-- 文件传输 -->
<li name="#tabs-6"><%=SystemEnv.getHtmlLabelName(131198, user.getLanguage())%></li><!-- 关于 -->
</ul>
<div class="sysSetContent">
<div id="tabs-1" style="display: block;">
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(33396, user.getLanguage())%></div><!-- 设置项 -->
<div class="contentInfo">
<input type="checkbox" id="autoLogin" name="autoLogin" /><%=SystemEnv.getHtmlLabelName(24701, user.getLanguage())%><!-- 自动登录 -->
</div>
<div id="autoStartup_div" class="contentInfo" style="display: none;">
<input type="checkbox" id="autoStartup" name="autoStartup" /><%=SystemEnv.getHtmlLabelName(126887, user.getLanguage())%><!-- 开机时自动启动e-message -->
</div>
</div>
<div id="tabs-2">
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(126888, user.getLanguage())%></div><!-- 关闭主面板时 -->
<div class="contentInfo">
<input type="radio" name="confirmQuit" value="1"/><%=SystemEnv.getHtmlLabelName(126889, user.getLanguage())%><!-- 最小化到托盘 -->
</div>
<div class="contentInfo">
<input type="radio" name="confirmQuit" value="2"/><%=SystemEnv.getHtmlLabelName(126890, user.getLanguage())%><!-- 退出程序 -->
</div>
<div class="contentTitle" data-role="latestChats"><%="退出时"%></div><!-- 退出时 -->
<div class="contentInfo">
<input type="checkbox" id="saveLatestChats" name="saveLatestChats" value="1" data-role="latestChats"/><%="保存当前聊天窗口"%><!--保存当前聊天窗口 -->
</div>
</div>
<div id="tabs-3">
<div class="contentTitle" style="text-align: center; color: red;"><%=SystemEnv.getHtmlLabelName(127115, user.getLanguage())%></div><!-- 若不能使用,请尝试其他组合键 -->
<div class="contentTitle" id="screenshot_msg"><%=SystemEnv.getHtmlLabelName(126866, user.getLanguage())%></div><!-- 截图 -->
<div class="contentInfo" id="screenshot_div">
<select id="screenshot_ctrl_1" notBeauty=true>
</select>
+
<select id="screenshot_ctrl_2">
<% for(int i = 65; i < 91; i ++) { %>
<option value="<%=(char)i %>"><%=(char)i %></option>
<% } %>
</select>
</div>
<br/>
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(126891, user.getLanguage())%></div><!-- 展示聊天窗口 -->
<div class="contentInfo">
<select id="openAndHideWin_ctrl_1" notBeauty=true>
</select>
+
<select id="openAndHideWin_ctrl_2">
<% for(int i = 65; i < 91; i ++) { %>
<option value="<%=(char)i %>"><%=(char)i %></option>
<% } %>
</select>
</div>
<br/>
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(130682, user.getLanguage())%></div><!-- 关闭所有聊天窗口 -->
<div class="contentInfo">
<select id="closeAllChatWin_ctrl_1" notBeauty=true>
</select>
+
<select id="closeAllChatWin_ctrl_2">
<% for(int i = 65; i < 91; i ++) { %>
<option value="<%=(char)i %>"><%=(char)i %></option>
<% } %>
</select>
</div>
<br/>
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(130714, user.getLanguage())%></div><!-- 关闭当前聊天窗口 -->
<div class="contentInfo">
<select id="closeChatWin_ctrl_1" notBeauty=true>
</select>
+
<select id="closeChatWin_ctrl_2">
<% for(int i = 65; i < 91; i ++) { %>
<option value="<%=(char)i %>"><%=(char)i %></option>
<% } %>
</select>
</div>
</div>
<div id="tabs-4">
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(19085, user.getLanguage())%></div><!-- 消息提醒 -->
<div class="contentInfo">
<input type="checkbox" id="newMsg" name="newMsg" /><%=SystemEnv.getHtmlLabelName(127110, user.getLanguage())%><!-- 消息到达直接弹出窗口 -->
</div>
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(23042, user.getLanguage())%></div><!-- 流程提醒 -->
<div class="contentInfo">
<input type="checkbox" id="wfRemind" name="wfRemind"/><%=SystemEnv.getHtmlLabelName(127111, user.getLanguage())%><!-- 开启流程提醒 -->
</div>
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(131338, user.getLanguage())%></div><!-- 文档提醒 type =21 -->
<div class="contentInfo">
<input type="checkbox" id="docRemind" name="docRemind"/><%=SystemEnv.getHtmlLabelName(131339, user.getLanguage())%><!-- 新文档阅读提醒-->
</div>
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(18845, user.getLanguage())%></div><!-- 邮件提醒 -->
<div class="contentInfo">
<input type="checkbox" id="mailRemind" name="mailRemind"/><%=SystemEnv.getHtmlLabelName(127112, user.getLanguage())%><!-- 开启邮件提醒 -->
</div>
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(127113, user.getLanguage())%></div><!-- 提示音设置 -->
<div class="contentInfo">
<input type="checkbox" id="audioSet_all" name="audioSet_all"/><%=SystemEnv.getHtmlLabelName(127114, user.getLanguage())%><!-- 关闭所有提示音 -->
</div>
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(131438, user.getLanguage())%></div><!-- 提醒弹窗设置 -->
<div class="contentInfo">
<%=SystemEnv.getHtmlLabelName(131439, user.getLanguage())%><input type="text" id="popWinAutoCloseSec" style="width:60px; margin: 0 5px;"
onkeyup="this.value=this.value.replace(/\D/g,'')"
onafterpaste="this.value=this.value.replace(/\D/g,'')" maxlength="5" size="14" name="popWinAutoCloseSec"/>s <div title="<%=SystemEnv.getHtmlLabelName(131440, user.getLanguage())%>"
style="float: right;text-overflow: ellipsis;width: 215px;white-space: nowrap;overflow: hidden;"> (<%=SystemEnv.getHtmlLabelName(131440, user.getLanguage())%>)</div>
<!-- 自动关闭时间 --><!-- 不填写或填写0代表不自动关闭 -->
</div>
</div>
<div id="tabs-5">
<div class="contentTitle"><%=SystemEnv.getHtmlLabelName(130691, user.getLanguage())%>:</div><!-- 设置项 -->
<div class="contentInfo">
<input id="defaultDlPath" name="defaultDlPath" class='InputStyle DlpathInput' readonly='readonly'/>
<input type='button' id='changeDlpathBtn' class='DlpathBtn' value="<%=SystemEnv.getHtmlLabelName(130699, user.getLanguage())%>">
</div>
<span id="dlPathErrorTip" style="color: palevioletred"></span>
</div>
<div id="tabs-6">
<div class="contentTitle"></div>
<div class="contentInfo">
<div style="margin-top: 67px;margin-left: 126px;">
<img src="/social/images/social_system_version.png" draggable="false">
<div style="margin-left: -12px;font-size: 20px;color: #333333;margin-top: -7px;">e-message</div>
<div id="e-message-version" style="margin-left: -25px;margin-top:3px;"><span style="font-size: 12px;color: #666666;">
<%=SystemEnv.getHtmlLabelName(131199, user.getLanguage())%></span>
</div>
<div id="e-message-version-check" style="margin-left: -12px;">
<%String silent = Prop.getPropValue("Emessage4upgrade", "silent");
if ("1".equals(silent)) {}else{%>
<span><%=SystemEnv.getHtmlLabelName(32396, user.getLanguage())%></span><!-- 检查更新 -->
<%}%>
</div>
</div>
<div style="margin-top:98px;margin-left:48px"><span style="font-size:12px;color:#b1b1b1"><%=SystemEnv.getHtmlLabelName(131197, user.getLanguage())%>  ©  Shanghai Weaver Network Co., Ltd</span></div>
</div>
</div>
</div>
</div>
<!-- 底部按钮组 -->
<div id="zDialog_div_bottom" class="zDialog_div_bottom">
<wea:layout>
<wea:group context="" attributes="{groupDisplay:none}">
<wea:item type="toolbar">
<input type="button" value="<%=SystemEnv.getHtmlLabelName(826, user.getLanguage())%>" id="zd_btn_confirm" class="zd_btn_cancle" ><!-- 确定 -->
<!-- <input type="button" value="<%=SystemEnv.getHtmlLabelName(25432, user.getLanguage())%>" id="zd_btn_apply" class="zd_btn_cancle" > 应用 -->
<input type="button" value="<%=SystemEnv.getHtmlLabelName(201, user.getLanguage())%>" id="zd_btn_cancle" class="zd_btn_cancle" ><!-- 取消 -->
</wea:item>
</wea:group>
</wea:layout>
</div>
</body>
<script type="text/javascript">
var localconfig = parent.PcMainUtils.localconfig;
var platform = parent.PcMainUtils.platform;
var openerWin = top.topWin.Dialog._Array[0].currentWindow;
var _electron = null;
var eleFlag = true;
if(typeof openerWin ==='undefined'){
eleFlag = false;
}else{
_electron = openerWin.Electron;
}
$(function(){
$('.sysItems li').click(function(){
$(this).addClass('active').siblings().removeClass('active');
$('.sysSetContent > div').hide();
var theItemName = $(this).attr('name');
$(theItemName).show();
// 如果是文件传输路径,进行目录权限检测
if (theItemName === '#tabs-5') {
checkDlPathAccess();
}
});
$('#zd_btn_apply').click(function(){
saveConfig();
});
$('#zd_btn_cancle').click(function(){
parent.DragUtils.restoreDrags();
parent.getDialog(window).close();
});
$('#zd_btn_confirm').click(function(){
saveConfig(function(){
$('#zd_btn_cancle').click();
});
});
$('#changeDlpathBtn').click(function(){
try{
if(eleFlag){
var e_dialog = _electron.remote.dialog;
if(e_dialog){
e_dialog.showOpenDialog(_electron.currentWindow, {properties : ['openDirectory']}, function(choosed){
if(choosed) {
var srcPath = choosed[0]
$('#defaultDlPath').val(srcPath);
checkDlPathAccess();
}
});
}
}else{
parent.nwdialog.setContext(parent.document.getElementById("downloadFrame").contentWindow.document);
parent.nwdialog.folderBrowserDialog(function(choosed){
if(choosed) {
var srcPath = choosed;
$('#defaultDlPath').val(srcPath);
}
});
}
}catch(err){
console.error("更换目录失败", err);
}
});
$('#e-message-version-check span').click(function(){
try{
parent.UpdateChecker.check();
}catch(err){
console.error("检查更新异常", err);
}
});
// 初始化默认页面
$('[notbeauty="true"]').removeAttr('notbeauty');
if(parent.PcMainUtils.isWindows()) {
$('#autoStartup_div').show();
localconfig.validAutoStartup(platform, function(err, exist){
$('#autoStartup').trigger('checked', exist);
});
if(parent.ClientSet.ifSendPicOrScreenShots == '0') {
initControlSelect('screenshot_ctrl_1');
} else {
$('#screenshot_msg').hide();
$('#screenshot_div').hide();
}
initControlSelect('openAndHideWin_ctrl_1');
initControlSelect('closeAllChatWin_ctrl_1');
initControlSelect('closeChatWin_ctrl_1');
} else if(parent.PcMainUtils.isOSX()) {
$('#screenshot_msg').hide();
$('#screenshot_div').hide();
initControlSelect('openAndHideWin_ctrl_1');
initControlSelect('closeAllChatWin_ctrl_1');
initControlSelect('closeChatWin_ctrl_1');
} else if (!eleFlag) {
$('div[data-role="latestChats"]').hide()
}
__jNiceNamespace__.beautySelect();
// 获得设置值,并设置
var config = parent.PcSysSettingUtils.getConfig();
var confirmQuit = config.mainPanel.noLongerRemind ? (config.mainPanel.alwaysQuit ? 2 : 1) : null;
var autoLogin = config.login.autoLogin;
var defaultDlPath = config.download.defaultPath;
var popWinAutoCloseSec = config.msgAndRemind.popWinAutoCloseSec;
if(!config.shortcut.closeAllChatWin){
config.shortcut.closeAllChatWin = platform.OSX?'COMMAND+CONTROL+C':'CTRL+ALT+C';
}
if(!config.shortcut.closeChatWin){
config.shortcut.closeChatWin = platform.OSX?'CONTROL+C':'ALT+C';
}
$('#autoLogin').trigger('checked', autoLogin);
if(confirmQuit != null) {
$('[name="confirmQuit"][value="' + confirmQuit + '"]').trigger('checked', true);
}
if(parent.PcMainUtils.isWindows() && parent.ClientSet.ifSendPicOrScreenShots == '0') {
var screenshotArr = getShortcutArr(config.shortcut.screenshot);
$('#screenshot_ctrl_1').selectbox('change', screenshotArr[0]);
$('#screenshot_ctrl_2').selectbox('change', screenshotArr[1]);
}
var openAndHideWinArr = getShortcutArr(config.shortcut.openAndHideWin);
$('#openAndHideWin_ctrl_1').selectbox('change', openAndHideWinArr[0]);
$('#openAndHideWin_ctrl_2').selectbox('change', openAndHideWinArr[1]);
var closeAllChatWinArr = getShortcutArr(config.shortcut.closeAllChatWin);
$('#closeAllChatWin_ctrl_1').selectbox('change', closeAllChatWinArr[0]);
$('#closeAllChatWin_ctrl_2').selectbox('change', closeAllChatWinArr[1]);
var closeChatWinArr = getShortcutArr(config.shortcut.closeChatWin);
$('#closeChatWin_ctrl_1').selectbox('change', closeChatWinArr[0]);
$('#closeChatWin_ctrl_2').selectbox('change', closeChatWinArr[1]);
$('#newMsg').trigger('checked', config.msgAndRemind.newMsg);
$('#wfRemind').trigger('checked', config.msgAndRemind.wfRemind);
$('#docRemind').trigger('checked', typeof config.msgAndRemind.docRemind =="undefined"? true: config.msgAndRemind.docRemind);
$('#mailRemind').trigger('checked', config.msgAndRemind.mailRemind);
$('#audioSet_all').trigger('checked', config.msgAndRemind.audioSet_all);
$('#saveLatestChats').trigger('checked', config.mainPanel.saveLatestChats);
$('#popWinAutoCloseSec').val(typeof popWinAutoCloseSec == "undefined"? "180": popWinAutoCloseSec);
$('#defaultDlPath').val(defaultDlPath);
getEmessageVersion();//设置版本
});
// 保存配置信息
function saveConfig(callback) {
var config = parent.PcSysSettingUtils.getConfig();
if(parent.PcMainUtils.isWindows()) {
// 自启动
localconfig.validAutoStartup(platform, function(err, exist){
if($('#autoStartup').is(':checked') != exist) {
if($('#autoStartup').is(':checked')) {
localconfig.setAppAutoStartup(platform, function(err, flag){
if(!flag) {
$('#autoStartup').trigger('checked', false);
console.error('设置开机自启动失败');
console.error(e);
// 设置开机自启动失败
parent.IM_Ext.showMsg('<%=SystemEnv.getHtmlLabelName(126893, user.getLanguage())%>');
}
})
} else {
localconfig.cancelAppAutoStartup(platform, function(err, flag){
if(!flag) {
$('#autoStartup').trigger('checked', true);
console.error('取消自启动失败');
console.error(err);
// 取消开机自启动失败
parent.IM_Ext.showMsg('<%=SystemEnv.getHtmlLabelName(126898, user.getLanguage())%>');
}
});
}
}
});
}
// 是否自动登陆
config.login.autoLogin = $('#autoLogin').is(':checked');
var confirmQuit = $('input[name="confirmQuit"]:checked').val();
if(confirmQuit) {
config.mainPanel.noLongerRemind = true;
config.mainPanel.alwaysQuit = confirmQuit == 1 ? false : true;
}
// 快捷键
// 截图
if(parent.PcMainUtils.isWindows() && parent.ClientSet.ifSendPicOrScreenShots == '0') {
var screenshotNew = getShortcutKey('screenshot');
var screenshotFlag = true;
if(screenshotNew != config.shortcut.screenshot) {
if(!parent.PcGlobalShortcutUtils.isRegistered(screenshotNew)) {
if(parent.PcGlobalShortcutUtils.execRegister(config.shortcut.screenshot, screenshotNew, parent.GlobalShortMethods.SCREENSHOT)) {
config.shortcut.screenshot = screenshotNew;
parent.pcWindowConfig.shortcut.screenshot = screenshotNew;
parent.PcGlobalShortcutUtils.setScreenshotTitle();
} else {
screenshotFlag = false;
// 热键设置失败
parent.IM_Ext.showMsg('<%=SystemEnv.getHtmlLabelName(126900, user.getLanguage())%>');
}
} else {
screenshotFlag = false;
// 截图热键设置失败, 键位被占用
parent.IM_Ext.showMsg('<%=SystemEnv.getHtmlLabelName(126866, user.getLanguage()) + SystemEnv.getHtmlLabelName(126900, user.getLanguage()) + ","%>' + screenshotNew + '<%=SystemEnv.getHtmlLabelName(126903, user.getLanguage())%>');
}
}
if(!screenshotFlag) {
$('#screenshot_ctrl_2').selectbox('change', getShortcutArr(config.shortcut.screenshot)[1]);
}
}
// 隐藏和呼出
var openAndHideWinNew = getShortcutKey('openAndHideWin');
var openAndHideWinFlag = true;
if(openAndHideWinNew != config.shortcut.openAndHideWin) {
if(!parent.PcGlobalShortcutUtils.isRegistered(openAndHideWinNew)) {
if(parent.PcGlobalShortcutUtils.execRegister(config.shortcut.openAndHideWin, openAndHideWinNew, parent.GlobalShortMethods.OPENANDHIDEWIN)) {
config.shortcut.openAndHideWin = openAndHideWinNew;
} else {
openAndHideWinFlag = false;
// 热键设置失败
parent.IM_Ext.showMsg('<%=SystemEnv.getHtmlLabelName(126900, user.getLanguage())%>');
}
} else {
openAndHideWinFlag = false;
// 呼出和隐藏热键设置失败, 键位被占用
parent.IM_Ext.showMsg('<%=SystemEnv.getHtmlLabelName(126891, user.getLanguage()) + SystemEnv.getHtmlLabelName(126900, user.getLanguage()) + ","%>' + openAndHideWinNew + '<%=SystemEnv.getHtmlLabelName(126903, user.getLanguage())%>');
}
}
if(!screenshotFlag) {
$('#openAndHideWin_ctrl_2').selectbox('change', getShortcutArr(config.shortcut.openAndHideWin)[1]);
}
// 关闭所有聊天窗口
var closeAllChatWinNew = getShortcutKey('closeAllChatWin');
var closeAllChatWinFlag = true;
if(closeAllChatWinNew != config.shortcut.closeAllChatWin) {
if(!parent.PcGlobalShortcutUtils.isRegistered(closeAllChatWinNew)) {
if(parent.PcGlobalShortcutUtils.execRegister(config.shortcut.closeAllChatWin, closeAllChatWinNew, parent.GlobalShortMethods.CLOSEALLCHATWIN)) {
config.shortcut.closeAllChatWin = closeAllChatWinNew;
} else {
closeAllChatWinFlag = false;
// 热键设置失败
parent.IM_Ext.showMsg('<%=SystemEnv.getHtmlLabelName(126900, user.getLanguage())%>');
}
} else {
closeAllChatWinFlag = false;
// 呼出和隐藏热键设置失败, 键位被占用
parent.IM_Ext.showMsg('<%=SystemEnv.getHtmlLabelName(126891, user.getLanguage()) + SystemEnv.getHtmlLabelName(126900, user.getLanguage()) + ","%>' + closeAllChatWinNew + '<%=SystemEnv.getHtmlLabelName(126903, user.getLanguage())%>');
}
}
if(!screenshotFlag) {
$('#closeAllChatWin_ctrl_2').selectbox('change', getShortcutArr(config.shortcut.closeAllChatWin)[1]);
}
// 关闭当前聊天窗口
var closeChatWinNew = getShortcutKey('closeChatWin');
var closeChatWinFlag = true;
if(closeChatWinNew != config.shortcut.closeChatWin) {
if(!parent.PcGlobalShortcutUtils.isRegistered(closeChatWinNew)) {
if(parent.PcGlobalShortcutUtils.execRegister(config.shortcut.closeChatWin, closeChatWinNew, parent.GlobalShortMethods.CLOSECHATWIN)) {
config.shortcut.closeChatWin = closeChatWinNew;
} else {
closeChatWinFlag = false;
// 热键设置失败
parent.IM_Ext.showMsg('<%=SystemEnv.getHtmlLabelName(126900, user.getLanguage())%>');
}
} else {
closeChatWinFlag = false;
// 呼出和隐藏热键设置失败, 键位被占用
parent.IM_Ext.showMsg('<%=SystemEnv.getHtmlLabelName(126891, user.getLanguage()) + SystemEnv.getHtmlLabelName(126900, user.getLanguage()) + ","%>' + closeChatWinNew + '<%=SystemEnv.getHtmlLabelName(126903, user.getLanguage())%>');
}
}
if(!screenshotFlag) {
$('#closeChatWin_ctrl_2').selectbox('change', getShortcutArr(config.shortcut.closeChatWin)[1]);
}
// 消息和提示
config.msgAndRemind.newMsg = $('#newMsg').is(':checked');
config.msgAndRemind.wfRemind = $('#wfRemind').is(':checked');
config.msgAndRemind.docRemind = $('#docRemind').is(':checked');
config.msgAndRemind.mailRemind = $('#mailRemind').is(':checked');
config.msgAndRemind.audioSet_all = $('#audioSet_all').is(':checked');
config.msgAndRemind.popWinAutoCloseSec = $('#popWinAutoCloseSec').val();
// 文件传输路径
config.download.defaultPath = $.trim($("#defaultDlPath").val());
// 是否保存窗口状态
if(eleFlag) {
config.mainPanel.saveLatestChats = $('#saveLatestChats').is(':checked');
}
// 保存配置
parent.PcSysSettingUtils.saveConfig(config);
setTimeout(function(){
typeof callback === 'function' && callback();
}, 200);
}
function initControlSelect(id){
var ctrl_1 = document.getElementById(id);
if(parent.PcMainUtils.isWindows()) {
ctrl_1.options.add(new Option("ALT","ALT"));
ctrl_1.options.add(new Option("CTRL","CTRL"));
ctrl_1.options.add(new Option("CTRL+ALT","CTRL+ALT"));
} else if(parent.PcMainUtils.isOSX()) {
ctrl_1.options.add(new Option("COMMAND","COMMAND"));
ctrl_1.options.add(new Option("CONTROL","CONTROL"));
ctrl_1.options.add(new Option("COMMAND+CONTROL","COMMAND+CONTROL"));
}
}
function getShortcutArr(shortcutKey) {
var resutl = [];
var index = shortcutKey.lastIndexOf('+');
resutl[0] = shortcutKey.substring(0, index);
resutl[1] = shortcutKey.substring(index + 1);
return resutl;
}
function getShortcutKey(prefix) {
return $('#' + prefix + '_ctrl_1').selectbox('option').val() + '+' + $('#' + prefix + '_ctrl_2').selectbox('option').val();
}
function getEmessageVersion(){
<%JSONObject jObject = JSONObject.fromObject(SocialImLogin.getBuildVersion());%>
var data = <%=jObject.toString()%>;
var version =":"+data.version+".";
var c_version = parent.PcMainUtils.getVersion();
if(parent.PcMainUtils.isWindows()) {
if(eleFlag){
version += c_version.buildVersion+"(Windows)";
}else{
version+= data.xpbuildVersion+" (Win XP)";
$("#e-message-version-check").hide();
}
} else if(parent.PcMainUtils.isOSX()) {
version += c_version.osxBuildVersion+"(Mac Os)";
}
$("#e-message-version span").append(version);
}
function checkDlPathAccess(emptyInput) {
var defaultDlPath = $('#defaultDlPath').val();
parent.PcMainUtils.checkAccess(defaultDlPath, function (isAccess, err) {
if (!isAccess) {
if (emptyInput) {
setTimeout(function () {
$('#defaultDlPath').val('');
}, 200);
}
$('#dlPathErrorTip').text(parent.social_i18n("DirNoAccess"));
} else {
$('#dlPathErrorTip').text("");
}
});
}
</script>
</html>