Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <a id="USE_THIS_TO_DELETE CONCRETE ROW" th:href="@{#fac-{fid} (fid=${faculty.id})}" href="#" class="list-group-item" data-toggle="collapse">
- <span class= "glyphicon-toggle">
- <i class="glyphicon glyphicon-chevron-right"></i> [[${faculty.name}]]
- <span class="badge badge-default badge-pill">[[${countSpecialities.get('__${faculty.id}__')}]]</span>
- </span>
- <span class="pull-right">
- <span class="btn btn-xs btn-info" onclick="alert('Action1 -> Play');">
- <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
- </span>
- <span class="btn btn-xs btn-danger" th:onclick="'javascript:deleteFaculty(\'' + ${faculty.id} + '\');'">
- <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
- </span>
- </span>
- </a>
- @DeleteMapping("/courses/{id}/faculty")
- public String deleteCourse(Model model, @PathVariable Long id) {
- facultyService.deleteFaculty(id);
- return "courses";
- }
- function deleteFaculty(id){
- var txt;
- if (confirm("Are you sure you want to delete?") == true) {
- console.log(id);
- alert(id);
- $("#row").remove()
- } else {
- "You pressed Cancel!";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement