質問編集履歴
2
画像を添付しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
現在勉強の為、自力でDocker上にスケジューラを作成しようと奮闘しています。
|
2
2
|
カレンダーが必要だったので、[fullcalendar](https://fullcalendar.io/)を利用して実装しています。イベント登録の時に、モーダルウィンドウを付けたらイベントの登録が行いやすくなると考え、カレンダーの時間項目を触るとモーダルウィンドウが表示されるようにしたいのですが、そこで意図しない動きをしてしまい、3日ほど調べていましたが解決できそうになかったので、質問致しました。
|
3
3
|
fullcalendarはJavaScript側でDOMContentLoadedを利用して下記のように中身を宣言しております。
|
4
|
+

|
4
5
|
```HTML
|
5
6
|
<div id='calendar'></div>
|
6
7
|
```
|
1
HTMLの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -67,4 +67,69 @@
|
|
67
67
|
div id='calendar' data-toggle="modal" data-target="#exampleModal" data-whatever="@calendar"></div>
|
68
68
|
```
|
69
69
|
なんとか時間の欄があるところをクリックした場合のみ、モーダルウィンドウを表示出来るようにならないでしょうか?
|
70
|
-
つたない質問で申し訳ございませんが、お答え頂けると幸いです。
|
70
|
+
つたない質問で申し訳ございませんが、お答え頂けると幸いです。
|
71
|
+
|
72
|
+
```HTML全体
|
73
|
+
<html>
|
74
|
+
<head>
|
75
|
+
<!--Javascript用API呼び出し-->
|
76
|
+
<link href="{% static '/modules/fullcalendar/main.min.css' %}" rel='stylesheet' />
|
77
|
+
<script src="{% static '/modules/fullcalendar/main.min.js' %}"></script>
|
78
|
+
|
79
|
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
|
80
|
+
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
81
|
+
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
82
|
+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
|
83
|
+
|
84
|
+
<!--Googleで提供されるAjax用API-->
|
85
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
86
|
+
|
87
|
+
<script type="text/javascript" src="{% static '/js/calendar.js' %}"></script>
|
88
|
+
<style>
|
89
|
+
/* fullcalendar */
|
90
|
+
body {
|
91
|
+
margin: 0;
|
92
|
+
padding: 0;
|
93
|
+
font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
|
94
|
+
font-size: 14px;
|
95
|
+
}
|
96
|
+
|
97
|
+
#calendar {
|
98
|
+
max-width: 1100px;
|
99
|
+
margin: 50px auto;
|
100
|
+
}
|
101
|
+
</style>
|
102
|
+
</head>
|
103
|
+
<body>
|
104
|
+
<div id='calendar' data-toggle="modal" data-target="#exampleModal" data-whatever="@calendar"></div>
|
105
|
+
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
106
|
+
<div class="modal-dialog" role="document">
|
107
|
+
<div class="modal-content">
|
108
|
+
<div class="modal-header">
|
109
|
+
<h5 class="modal-title" id="exampleModalLabel">New Event</h5>
|
110
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
111
|
+
<span aria-hidden="true">×</span>
|
112
|
+
</button>
|
113
|
+
</div>
|
114
|
+
<div class="modal-body">
|
115
|
+
<form>
|
116
|
+
<div class="form-group">
|
117
|
+
<label for="recipient-name" class="col-form-label">start time</label>
|
118
|
+
<input type="text" class="form-control" id="recipient-name">
|
119
|
+
</div>
|
120
|
+
<div class="form-group">
|
121
|
+
<label for="message-text" class="col-form-label">end time</label>
|
122
|
+
<textarea class="form-control" id="message-text"></textarea>
|
123
|
+
</div>
|
124
|
+
</form>
|
125
|
+
</div>
|
126
|
+
<div class="modal-footer">
|
127
|
+
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
128
|
+
<button type="button" class="btn btn-primary">Send message</button>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
</body>
|
134
|
+
</html>
|
135
|
+
```
|