-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
171 lines (165 loc) · 8.68 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
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
<head>
<script src="timeline3/js/timeline.js"></script>
<script src="manipulations.js"></script>
</head>
<body>
<link rel="stylesheet" id="timelinetheme" href="timeline3/css/timeline.css">
<div id="Timeline">
<script src="init.js"></script>
</div>
<div id="button-element" style="top: 200px;right: 30px;position: absolute;z-index: 999;">
<input type="button" value="新建" class="tl-blue-button" onclick="addSlide();">
<input type="button" value="编辑" class="tl-blue-button" onclick="editSlide();">
<input type="button" value="删除" class="tl-red-button" onclick="deleteSlide()">
<li class="list-father">...
<ul class="list-son">
<li><input type="button" value="纪元" class="tl-blue-button" onclick="eraPanelShow();"
style="margin-left: 40px;"></li>
<li><input type="button" value="切换全屏" class="tl-blue-button" onclick="setFullscreen();"
style="margin-left: 13px;"></li>
<li><input type="button" value="分组重命名" class="tl-blue-button" onclick="groupRename()"></li>
<li><input type="button" value="浏览器打开" class="tl-red-button"
onclick="window.open(window.location.href+`?blockid=${window.baseid}`)"></li>
<li><input type="button" value="刷新时间线" class="tl-red-button" onclick="timelineReload()"></li>
<li><input type="button" value="时间线设置" class="tl-red-button" onclick="timelineSettingsShow()"></li>
</ul>
</li>
</div>
<div id="light" class="white_content">
<div id="date_area">
<b>开始日期:</b>
<input type="number" name="" id="start_year" value="" class="tl-year-field" />年
<input type="number" name="" id="start_month" value="" min="1" max="12" class="tl-md-field" />月
<input type="number" name="" id="start_day" value="" min="1" max="31" class="tl-md-field" />日
<input type="number" name="" id="start_hour" value="" min="0" max="23" class="tl-md-field" />时
<input type="number" name="" id="start_minute" value="" min="0" max="59" class="tl-md-field" />分
<input type="number" name="" id="start_second" value="" min="0" max="59" class="tl-md-field" />秒</br>
<div class="tl-block"></div>
结束日期:
<input type="number" name="" id="end_year" value="" class="tl-year-field" />年
<input type="number" name="" id="end_month" value="" min="1" max="12" class="tl-md-field" />月
<input type="number" name="" id="end_day" value="" min="1" max="31" class="tl-md-field" />日
<input type="number" name="" id="end_hour" value="" min="0" max="23" class="tl-md-field" />时
<input type="number" name="" id="end_minute" value="" min="0" max="59" class="tl-md-field" />分
<input type="number" name="" id="end_second" value="" min="0" max="59" class="tl-md-field" />秒</br>
</div>
<div class="tl-block"></div>
<div>
<span style="padding-left: 32px;"><b>标题:</b></span>
<input type="text" name="" id="slide_title" value="" class="tl-text-field" /></br>
</div>
<div class="tl-block"></div>
<div>
<span style="padding-left: 32px;">分组:</span>
<input id="input_group" list="group_list" class="tl-text-field"/>
<datalist id="group_list">
</datalist>
</div>
<div class="tl-block"></div>
<div>
<span style="padding-left: 32px;vertical-align: top;">描述:</span>
<textarea name="" id="slide_contents" rows="5" class="tl-text-field"></textarea></br>
</div>
<div class="tl-block"></div>
背景图片:<input type="text" name="" id="slide_background" class="tl-text-field" style="margin-left: 3px;" /></br>
<div class="tl-block"></div>
思源块 id:<input type="text" name="" id="slide_blockid" class="tl-text-field" style="margin-left: 2px;" /></br>
<div class="tl-block"></div>
<div class="tl-block"></div>
<!-- 确认、取消按钮 -->
<div class="tl_button" style="text-align: right;">
<button onclick="confirmCancel()" id="confirm_button_cancel" class="tl-red-button"
style="margin-right: 30px; font-size: 16px;">取消</button>
<button onclick="confirmYes()" id="confirm_button_yes" class="tl-blue-button"
style="font-size: 16px;">确认</button>
</div>
</div>
<div id="tl_era_panel" class="tl_era_panel">
<div id="vote">
<div id="era-item">
<input type="number" class="tl-year-field" id="start_date" name="era_start_date" />
年 ~
<input type="number" class="tl-year-field" id="end_date" name="era_end_date" />
年:
<input type="text" class="tl-era-title-field" placeholder="纪元名称" name="era_title" />
<button id="del-era-item">-</button>
<div class="tl-block"></div>
</div>
<div id="position-sign"></div>
</div>
<button id="button" class="tl-blue-button" onclick="eraInputAdd()" style="margin-top: -2px;">添加</button>
<div class="tl_button" style="text-align: right;">
<button onclick="eraConfirmCancel()" id="confirm_button_cancel" class="tl-red-button"
style="margin-right: 30px;font-size: 16px;">取消</button>
<button onclick="eraConfirmYes()" id="confirm_button_yes" class="tl-blue-button"
style="font-size: 16px;">确认</button>
</div>
</div>
<div id="tl_settings_panel" class="tl_era_panel">
时间线高度:<input type="number" id="timenav_height_percentage" min="0" max="101" class="tl-md-field"
style="width: 64px;" />%
<div class="tl-block"></div>
时间线起始位置:
<select name="" id="start_location" class="tl-text-field" style="width: 100px;">
<option value="0">第一项</option>
<option value="1">最后一项</option>
</select>
<div class="tl-block"></div>
时间轴位置:
<select name="" id="timenav_position" class="tl-text-field" style="width: 100px;">
<option value="0">上方</option>
<option value="1">下方</option>
</select>
<div class="tl_button" style="text-align: right;">
<button onclick="tlsettingsConfirmCancel()" id="confirm_button_cancel" class="tl-red-button"
style="margin-right: 30px;font-size: 16px;">取消</button>
<button onclick="tlsettingsConfirmYes()" id="confirm_button_yes" class="tl-blue-button"
style="font-size: 16px;">确认</button>
</div>
</div>
<div id="tl_group_rename_panel" class="tl_era_panel">
<div class="tl-block"></div>
重命名
<select id="group_select" class="tl-text-field" style="width: 40%;" >
</select>
为
<input id="group_renamed" class="tl-text-field" style="width: 40%;" />
<div class="tl-block"></div>
<div class="tl_button" style="text-align: right;">
<button onclick="groupConfirmCancel()" id="confirm_button_cancel" class="tl-red-button"
style="margin-right: 30px;font-size: 16px;">取消</button>
<button onclick="groupConfirmYes()" id="confirm_button_yes" class="tl-blue-button"
style="font-size: 16px;">确认</button>
</div>
</div>
<div id="fade" class="black_overlay"></div>
<script>
// 开始日期填入默认值
var init_date = new Date();
document.getElementById("start_year").value = init_date.getFullYear();
document.getElementById("start_month").value = init_date.getMonth() + 1;
document.getElementById("start_day").value = init_date.getDate();
</script>
<script>
// 鼠标滚轮调整日期时禁用滚轮
var box = document.getElementById("date_area")
function onMouseWheel(ev) {
return false;
}
addEvent(box, 'mousewheel', onMouseWheel);
addEvent(box, 'DOMMouseScroll', onMouseWheel);
function addEvent(obj, xEvent, fn) {
if (obj.attachEvent) {
obj.attachEvent('on' + xEvent, fn);
} else {
obj.addEventListener(xEvent, fn, false);
}
}
box.addEventListener('mouseover', function () {
box.onMouseWheel = () => {
return true;
}
})
</script>
</body>
</html>