質問編集履歴
1
HTMLコード追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -37,3 +37,211 @@
|
|
37
37
|
JavaScriptの初心者で初歩的な質問で申し訳ありませんが、
|
38
38
|
|
39
39
|
よろしくお願いいたします。
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
HTMLコード追加
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
<!DOCTYPE html>
|
48
|
+
|
49
|
+
<html>
|
50
|
+
|
51
|
+
<head>
|
52
|
+
|
53
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
54
|
+
|
55
|
+
<title>jq.Schedule学習</title>
|
56
|
+
|
57
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
<script src="https://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript" language="javascript"></script>
|
62
|
+
|
63
|
+
<script src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js" type="text/javascript" language="javascript"></script>
|
64
|
+
|
65
|
+
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
<script type="text/javascript" src="jq.schedule.js"></script>
|
70
|
+
|
71
|
+
<link rel="stylesheet" type="text/css" href="style.css" />
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet" media="screen">
|
76
|
+
|
77
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/2.3.2/js/bootstrap.min.js"></script>
|
78
|
+
|
79
|
+
<style>
|
80
|
+
|
81
|
+
body {
|
82
|
+
|
83
|
+
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
</style>
|
88
|
+
|
89
|
+
<script type="text/javascript">
|
90
|
+
|
91
|
+
jQuery(document).ready(function(){
|
92
|
+
|
93
|
+
var $sc = jQuery("#schedule").timeSchedule({
|
94
|
+
|
95
|
+
startTime: "10:00", // schedule start time(HH:ii)
|
96
|
+
|
97
|
+
endTime: "24:00", // schedule end time(HH:ii)
|
98
|
+
|
99
|
+
widthTime:60 * 10, // cell timestamp example 10 minutes
|
100
|
+
|
101
|
+
timeLineY:60, // height(px)
|
102
|
+
|
103
|
+
verticalScrollbar:20, // scrollbar (px)
|
104
|
+
|
105
|
+
timeLineBorder:2, // border(top and bottom)
|
106
|
+
|
107
|
+
debug:"#debug", // debug string output elements
|
108
|
+
|
109
|
+
rows : {
|
110
|
+
|
111
|
+
'1' : {
|
112
|
+
|
113
|
+
title : '会議1',
|
114
|
+
|
115
|
+
schedule:[
|
116
|
+
|
117
|
+
{
|
118
|
+
|
119
|
+
start:'10:10',
|
120
|
+
|
121
|
+
end:'12:00',
|
122
|
+
|
123
|
+
text:'Text Area',
|
124
|
+
|
125
|
+
data:{
|
126
|
+
|
127
|
+
}
|
128
|
+
|
129
|
+
},
|
130
|
+
|
131
|
+
{
|
132
|
+
|
133
|
+
start:'11:00',
|
134
|
+
|
135
|
+
end:'14:00',
|
136
|
+
|
137
|
+
text:'Text Area',
|
138
|
+
|
139
|
+
data:{
|
140
|
+
|
141
|
+
}
|
142
|
+
|
143
|
+
}
|
144
|
+
|
145
|
+
]
|
146
|
+
|
147
|
+
},
|
148
|
+
|
149
|
+
'2' : {
|
150
|
+
|
151
|
+
title : '会議2',
|
152
|
+
|
153
|
+
schedule:[
|
154
|
+
|
155
|
+
{
|
156
|
+
|
157
|
+
start:'16:00',
|
158
|
+
|
159
|
+
end:'17:00',
|
160
|
+
|
161
|
+
text:'Text Area',
|
162
|
+
|
163
|
+
data:{
|
164
|
+
|
165
|
+
}
|
166
|
+
|
167
|
+
}
|
168
|
+
|
169
|
+
]
|
170
|
+
|
171
|
+
}
|
172
|
+
|
173
|
+
},
|
174
|
+
|
175
|
+
change: function(node,data){
|
176
|
+
|
177
|
+
alert("change event");
|
178
|
+
|
179
|
+
},
|
180
|
+
|
181
|
+
init_data: function(node,data){
|
182
|
+
|
183
|
+
},
|
184
|
+
|
185
|
+
click: function(node,data){
|
186
|
+
|
187
|
+
alert("click event");
|
188
|
+
|
189
|
+
},
|
190
|
+
|
191
|
+
append: function(node,data){
|
192
|
+
|
193
|
+
},
|
194
|
+
|
195
|
+
time_click: function(time,data){
|
196
|
+
|
197
|
+
alert("time click event");
|
198
|
+
|
199
|
+
},
|
200
|
+
|
201
|
+
});
|
202
|
+
|
203
|
+
});
|
204
|
+
|
205
|
+
</script>
|
206
|
+
|
207
|
+
</head>
|
208
|
+
|
209
|
+
<body>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<div style="padding: 0 0 40px;">
|
214
|
+
|
215
|
+
<div id="schedule"></div>
|
216
|
+
|
217
|
+
</div>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
<script type="text/javascript">
|
222
|
+
|
223
|
+
$("#schedule").addScheduleData({
|
224
|
+
|
225
|
+
start:'16:00',
|
226
|
+
|
227
|
+
end:'17:00',
|
228
|
+
|
229
|
+
text:'会議1',
|
230
|
+
|
231
|
+
click: function(node, data) {
|
232
|
+
|
233
|
+
console.log('click event')
|
234
|
+
|
235
|
+
}
|
236
|
+
|
237
|
+
});
|
238
|
+
|
239
|
+
</script>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
</body>
|
244
|
+
|
245
|
+
</html>
|
246
|
+
|
247
|
+
```
|