-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
128 lines (128 loc) · 4.18 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
<!DOCTYPE html>
<!--
/*
* INTER-Mediator
* Copyright (c) INTER-Mediator Directive Committee (http://inter-mediator.org)
* This project started at the end of 2009 by Masayuki Nii [email protected].
*
* INTER-Mediator is supplied under MIT License.
* Please see the full license for details:
* https://github.com/INTER-Mediator/INTER-Mediator/blob/master/dist-docs/License.txt
*/ -->
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Sample BBS (INTER-Mediator)</title>
<script type="text/javascript" src="index_context.php"></script>
<script type="text/javascript">
INTERMediatorOnPage.processingBeforePostOnlyContext = function (node) {
const dtString = INTERMediatorLib.dateTimeStringISO()
let nodeIds = INTERMediatorOnPage.getNodeIdsHavingTargetFromNode(node, 'message@postdt')
if (nodeIds.length > 0) {
document.getElementById(nodeIds[0]).value = dtString
}
nodeIds = INTERMediatorOnPage.getNodeIdsHavingTargetFromNode(node, 'comment@message')
if (nodeIds.length > 0) {
const aNode = node.parentNode.parentNode.parentNode
nodeIds = INTERMediatorOnPage.getNodeIdsHavingTargetFromNode(aNode, 'message@id')
const idValue = document.getElementById(nodeIds[0]).value
INTERMediator.additionalFieldValueOnNewRecord = {}
INTERMediator.additionalFieldValueOnNewRecord['comment'] = [
{field: 'groupname', value: idValue},
{field: 'postdt', value: dtString}
]
}
return true
}
</script>
<style>
TEXTAREA {
width: 400px;
height: 60px;
}
</style>
</head>
<body>
<header>
<p class="logo"><img src="../../images/logo_t-100.png" alt=""></p>
</header>
<div id="wrapper">
<h1>test title</h1>
<table>
<tbody data-im-control="post">
<tr>
<th>From:</th>
<td>
<input type="text" data-im="message@user">
<input type="hidden" data-im="message@postdt">
</td>
</tr>
<tr>
<td colspan="2">
<textarea data-im="message@message"></textarea>
<button data-im-control="post">投稿</button>
</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<td colspan="4">
<hr/>
</td>
</tr>
<tr>
<th>From:</th>
<td data-im="message@user"></td>
<th>Date:</th>
<td data-im="message@postdt"></td>
</tr>
<tr>
<td colspan="4" data-im="message@message@innerHTML"
style="background-color: #CCCCCC"></td>
</tr>
<tr>
<td style="width: 50px; background-color: gray">Comment</td>
<td colspan="3">
<input type="hidden" data-im="message@id"/>
<table>
<tbody data-im-control="post">
<tr>
<th>From:</th>
<td>
<input type="text" data-im="comment@user">
</td>
</tr>
<tr>
<td colspan="2"><textarea data-im="comment@message"></textarea>
<button data-im-control="post">投稿</button>
</td>
</tr>
</tbody>
</table>
<table>
<tbody>
<tr>
<th>From:</th>
<td data-im="comment@user"></td>
<th>Date:</th>
<td data-im="comment@postdt"></td>
</tr>
<tr>
<td colspan="4" data-im="comment@message@innerHTML"
style="background-color: #CCCCCC"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<footer>
<small>INTER-Mediator ©2021</small>
</footer>
</body>
</html>