Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
s7_spruge_k
calendar
Commits
1736b4f7
Commit
1736b4f7
authored
Jun 19, 2019
by
Martins Berzins
Browse files
Deleted isAllDayEvent as if we never had it in the first place ;)
parent
bbf80b86
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
66 deletions
+2
-66
src/main/java/com/example/calendar/models/Event.java
src/main/java/com/example/calendar/models/Event.java
+2
-18
src/main/resources/templates/addNewEvent.html
src/main/resources/templates/addNewEvent.html
+0
-8
src/main/resources/templates/viewEvent.html
src/main/resources/templates/viewEvent.html
+0
-20
src/main/resources/templates/viewEventEdit.html
src/main/resources/templates/viewEventEdit.html
+0
-20
No files found.
src/main/java/com/example/calendar/models/Event.java
View file @
1736b4f7
...
...
@@ -37,8 +37,6 @@ public class Event{
private
int
event_ID
;
@Column
(
name
=
"EventType"
)
private
EventType
eventType
;
@Column
(
name
=
"IsAllDayEvent"
)
private
boolean
isAllDayEvent
;
@ManyToOne
@JoinColumn
(
name
=
"ID_c"
)
private
Calendar
calendar
;
...
...
@@ -46,12 +44,11 @@ public class Event{
//Constructor, all parameters
public
Event
(
String
name
,
String
description
,
LocalDate
startDate
,
LocalTime
startTime
,
EventType
eventType
,
boolean
isAllDayEvent
)
{
public
Event
(
String
name
,
String
description
,
LocalDate
startDate
,
LocalTime
startTime
,
EventType
eventType
)
{
setName
(
name
);
setDescription
(
description
);
setStartDate
(
startDate
);
setStartTime
(
startTime
);
setIsAllDayEvent
(
isAllDayEvent
);
this
.
eventType
=
eventType
;
}
...
...
@@ -99,13 +96,6 @@ public class Event{
this
.
eventType
=
eventType
;
}
public
boolean
getIsAllDayEvent
()
{
return
isAllDayEvent
;
}
public
void
setIsAllDayEvent
(
boolean
isAllDayEvent
)
{
this
.
isAllDayEvent
=
isAllDayEvent
;
}
public
LocalTime
getStartTime
()
{
return
startTime
;
...
...
@@ -119,7 +109,7 @@ public class Event{
@Override
public
String
toString
()
{
return
"Event [name="
+
name
+
", description="
+
description
+
", startDate="
+
startDate
+
", startTime="
+
startTime
+
", event_ID="
+
event_ID
+
", eventType="
+
eventType
+
", isAllDayEvent="
+
isAllDayEvent
+
startTime
+
", event_ID="
+
event_ID
+
", eventType="
+
eventType
+
", isAllDayEvent="
+
"]"
;
}
...
...
@@ -136,12 +126,6 @@ public class Event{
this
.
calendar
=
calendar
;
}
public
void
setAllDayEvent
(
boolean
isAllDayEvent
)
{
this
.
isAllDayEvent
=
isAllDayEvent
;
}
/*Comparator for sorting the list by Student Name*/
public
static
Comparator
<
Event
>
eventDateComp
=
new
Comparator
<
Event
>()
{
...
...
src/main/resources/templates/addNewEvent.html
View file @
1736b4f7
...
...
@@ -86,14 +86,6 @@ a:hover {
<div
class=
"col-sm-5"
th:classappend=
"${#fields.hasErrors('*')} ? 'has-error' : ''"
>
Date:
<input
id=
"datePicker"
type=
"date"
th:field=
"*{startDate}"
/>
<p
class=
"alert alert-danger"
th:if=
"${#fields.hasErrors('startDate')}"
th:errors=
"*{startDate}"
></p></div>
<div
class=
"col-sm-4"
>
Time:
<input
id=
"timePicker"
type=
"time"
th:field=
"*{startTime}"
/></div>
<div
class=
"col-sm-3"
>
<div
class=
"form-check"
>
<input
name=
"isAllDayEvent"
th:field=
"*{isAllDayEvent}"
class=
"form-check-input"
type=
"checkbox"
value=
""
id=
"defaultCheck1"
>
<label
class=
"form-check-label"
for=
"defaultCheck1"
>
All day event?
</label>
</div>
</div>
</div>
<br>
<button
class=
"btn btn-lg btn-primary btn-block"
type=
"submit"
>
Add
</button><br>
</form>
...
...
src/main/resources/templates/viewEvent.html
deleted
100644 → 0
View file @
bbf80b86
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<Head><title>
View event
</title></Head>
<body>
<h2>
View event
</h2>
<table>
<tr>
<td
th:text =
"'currentEvent: | ' + ${currentEvent.getName()}"
/>
<td
th:text =
"'Desc: ' + ${currentEvent.getDescription()}"
/>
<td
th:text =
"${currentEvent.getStartDate()}"
/>
<td
th:text =
"${currentEvent.getStartTime()}"
/>
<td
th:text =
"${currentEvent.getIsAllDayEvent()}"
/>
<td
th:text =
"${currentEvent.getCalendar().getName()}"
/>
</table>
<button
type=
"button"
>
Edit
</button>
<button
type=
"button"
>
Delete
</button>
<button
type=
"button"
>
Return
</button>
</body>
</html>
\ No newline at end of file
src/main/resources/templates/viewEventEdit.html
deleted
100644 → 0
View file @
bbf80b86
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
>
<Head><title>
View event (edit mode)
</title></Head>
<body>
<h2>
View event (edit mode)
</h2>
<table>
<tr>
<td
th:text =
"'currentEvent: | ' + ${currentEvent.getName()}"
/>
<td
th:text =
"'Desc: ' + ${currentEvent.getDescription()}"
/>
<td
th:text =
"${currentEvent.getStartDate()}"
/>
<td
th:text =
"${currentEvent.getStartTime()}"
/>
<td
th:text =
"${currentEvent.getIsAllDayEvent()}"
/>
<td
th:text =
"${currentEvent.getCalendar().getName()}"
/>
</table>
<button
type=
"button"
>
Save
</button>
<button
type=
"button"
>
Return
</button>
<button
type=
"button"
>
Delete
</button>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment