-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
82 lines (75 loc) · 2.65 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Ext JS Calendar Sample</title>
<link rel="stylesheet" type="text/css" href="resources/css/calendar.css" />
<link rel="stylesheet" type="text/css" href="resources/css/examples.css" />
<!-- GC -->
<script type="text/javascript" src="extjs/shared/include-ext.js"></script>
<script type="text/javascript">
Ext.Loader.setConfig({
enabled: true,
paths: {
'Ext.calendar': 'src'
}
});
Ext.require([
//'Ext.diag.layout.Context',
//'Ext.diag.layout.ContextItem',
'Ext.calendar.App'
]);
Ext.onReady(function(){
// launch the app:
Ext.create('Ext.calendar.App');
// update the header logo date:
document.getElementById('logo-body').innerHTML = new Date().getDate();
});
var nw =require('nw.gui');
var win = nw.Window.get();
win.on('close', function() {
this.hide(); // Pretend to be closed already
console.log("We're closing...");
this.close(true); // then close it forcely
});
var tray = new nw.Tray({ title: '提醒小日历', icon: 'icon.png' ,click:function(){
win.show();
}});
// Give it a menu
var menu = new nw.Menu();
menu.append(new nw.MenuItem({ type: 'normal', label: '设置' ,click:function(){
win.show();
}}));
menu.append(new nw.MenuItem({ type: 'normal', label: '帮助' ,click:function(){
}}));
menu.append(new nw.MenuItem({ type: 'normal', label: '退出' ,click:function(){
nw.App.quit();
}}));
tray.menu = menu;
var nwNotify = require('nw-notify');
nwNotify.setTemplatePath('notification.html');
nwNotify.setConfig({
displayTime: 7000
});
var num = 0;
function handleClick(event) {
console.log('User clicked notification ' + event.id + '. Closing it immediately.');
event.closeNotification();
}
</script>
</head>
<body>
<div style="display:none;">
<div id="app-header-content">
<div id="app-logo">
<div class="logo-top"> </div>
<div id="logo-body"> </div>
<div class="logo-bottom"> </div>
</div>
<h1>Ext JS Calendar</h1>
<span id="app-msg" class="x-hidden"></span>
</div>
</div>
</body>
</html>