- Timestamp:
- 02/01/23 22:35:56 (22 months ago)
- Branches:
- master
- Children:
- cc52b09
- Parents:
- 044bd76
- Location:
- src/main
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/edu/gjoko/schedlr/controllers/HomePageController.java
r044bd76 r9280859 1 1 package edu.gjoko.schedlr.controllers; 2 2 3 import edu.gjoko.schedlr.entity.Search; 3 4 import org.springframework.stereotype.Controller; 4 5 import org.springframework.ui.Model; 5 6 import org.springframework.web.bind.annotation.GetMapping; 7 import org.springframework.web.bind.annotation.ModelAttribute; 6 8 import org.springframework.web.bind.annotation.PostMapping; 7 9 … … 10 12 11 13 @GetMapping(name = "/homepage") 12 public String getHomePageTemplate(Model model) { 14 public String getHomePageTemplate(Model model, @ModelAttribute("search")Search search ) { 15 model.addAttribute("search", search); 13 16 return "homepage"; 14 17 } 15 18 16 19 @PostMapping(name = "/homepage") 17 public String postHomePageTemplate(Model model) { 20 public String postHomePageTemplate(Model model, @ModelAttribute("search")Search search) { 21 model.addAttribute("search", search); 22 return "homepage"; 23 } 24 25 @GetMapping("/search") 26 public String getAppointments(Model model, @ModelAttribute("search")Search search) { 27 model.addAttribute("search", search); 18 28 return "homepage"; 19 29 } -
src/main/resources/static/js/homepage.js
r044bd76 r9280859 45 45 right: 'prev,next today' 46 46 }, 47 editable: true,47 editable: false, 48 48 edit: function (start, end, allDay) { 49 49 50 50 }, 51 51 firstDay: 1, // 1(Monday) this can be changed to 0(Sunday) for the USA system 52 selectable: true,52 selectable: false, 53 53 defaultView: 'agendaWeek', 54 54 … … 82 82 calendar.fullCalendar('unselect'); 83 83 }, 84 droppable: true, // this allows things to be dropped onto the calendar !!!84 droppable: false, // this allows things to be dropped onto the calendar !!! 85 85 drop: function(date, allDay) { // this function is called when something is dropped 86 86 -
src/main/resources/templates/homepage.html
r044bd76 r9280859 7 7 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> 8 8 9 <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet" /> 10 <!-- Google Fonts --> 11 <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" /> 12 <!-- MDB --> 13 <link href="https://cdnjs.cloudflare.com/ajax/libs/mdb-ui-kit/5.0.0/mdb.min.css" rel="stylesheet" /> 9 14 10 15 <link href='css/fullcalendar.css' rel='stylesheet'/> 11 16 <link href='css/fullcalendar.print.css' rel='stylesheet' media='print'/> 17 <link href="css/homepage.css" rel="stylesheet" /> 12 18 </head> 13 19 <body> … … 15 21 <div id='calendar'></div> 16 22 <div style='clear:both'></div> 23 </div> 24 25 <div class=""> 26 <div class="card"> 27 <div class="card-body py-5 px-md-5"> 28 <form th:action="@{/search}" method="get" th:object="${search}"> 29 <div> 30 <label for="student-birth-date">Date of search:</label> 31 <input type="date" th:field="${search.date}" id="student-birth-date"/> 32 </div> 33 <div> 34 <button type="submit" class="button">Search</button> 35 </div> 36 </form> 37 </div> 38 </div> 17 39 </div> 18 40 <script src='js/jquery-1.10.2.js' type="text/javascript"></script>
Note:
See TracChangeset
for help on using the changeset viewer.