Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.35 KB | None | 0 0
  1.         <a id="USE_THIS_TO_DELETE CONCRETE ROW" th:href="@{#fac-{fid} (fid=${faculty.id})}" href="#"    class="list-group-item" data-toggle="collapse">
  2.                    
  3.                     <span class= "glyphicon-toggle">
  4.                         <i class="glyphicon glyphicon-chevron-right"></i> [[${faculty.name}]]
  5.                         <span class="badge badge-default badge-pill">[[${countSpecialities.get('__${faculty.id}__')}]]</span>
  6.                    </span>
  7.                    
  8.                     <span class="pull-right">
  9.                         <span class="btn btn-xs btn-info" onclick="alert('Action1 -> Play');">
  10.                              <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
  11.                         </span>
  12.                         <span class="btn btn-xs btn-danger"  th:onclick="'javascript:deleteFaculty(\'' + ${faculty.id} + '\');'">
  13.                             <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
  14.                         </span>
  15.                     </span>
  16.                    
  17.                 </a>
  18.  
  19.  
  20.  
  21.     @DeleteMapping("/courses/{id}/faculty")
  22.     public String deleteCourse(Model model, @PathVariable Long id) {
  23.         facultyService.deleteFaculty(id);
  24.         return "courses";
  25.     }
  26.  
  27. function deleteFaculty(id){
  28.    
  29.      var txt;
  30.         if (confirm("Are you sure you want to delete?") == true) {
  31.                console.log(id);
  32.     alert(id);
  33.     $("#row").remove()
  34.         } else {
  35.             "You pressed Cancel!";
  36.         }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement