SocialIMRemindSun.jsp
2.71 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
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/remindsun_wev8.css">
<title></title>
<script type="text/javascript">
var options = {};
var electron = require("electron");
window.onload= function () {
// hrruntime(100);
electron.ipcRenderer.on("sun-remind",function (event, args) {
options = args;
var remindMsg = options.userName +"<br>" +options.deptName +"<br>";
if(options.remoteType == 3){
remindMsg += "<b>请求远程控制您的电脑</b>";
}else if(options.remoteType == 7){
remindMsg += "<b>邀请您远程他/她的电脑</b>";
}
document.getElementsByClassName("center-right")[0].innerHTML =remindMsg;
});
}
/*
* acceptRemote 接收远程
* */
function acceptRemote() {
var args = {
event : 'sun-accept-remote',
args :options
};
electron.ipcRenderer.send('send-to-mainChatWin', args);
// window.close();
}
/*
* refuseRemote 拒绝远程
* */
function refuseRemote() {
var args = {
event : 'sun-refuse-remote',
args :options
};
electron.ipcRenderer.send('send-to-mainChatWin', args);
// window.close();
}
/*
* 提醒窗口的跑秒方法
* */
function hrruntime(n) {
n -= 0.1;
document.getElementById("bottom-hr").style.width = n + "%";
if (n > 0) {
setTimeout("hrruntime(" + n + ")", 100);
} else {
window.close();
}
}
</script>
</head>
<body>
<div class="remind">
<!--窗口顶部-->
<div class="header clear can-drag">
<div id="remindTitle" class="header-title">
<div class="header-title-targetname">远程控制消息提示</div>
</div>
<div class="header-close no-drag" title="关闭" onclick="window.close()"></div>
</div>
<!--窗口中间空白显示部分-->
<div class="center">
<div class="center-left"><img src="/social/icon/40322_usericon.jpg" class ="center-left-head"></div>
<div class="center-right">邀请您远程控制他/她的电脑</div>
</div>
<!--窗口底部-->
<hr id = "bottom-hr" class="bottom-hr">
<div class="bottom">
<div class="bottom-right" onclick="refuseRemote()">
拒绝
</div>
<div class="bottom-left" onclick="acceptRemote()">
接受
</div>
</div>
</div>
</body>
</html>