Advertisement
Guest User

Untitled

a guest
Mar 15th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. <button class="btn btn-default btn-rounded btn-sm product_detail" id="<?=$record->serviceId;?>" data-toggle="tooltip" title="View Product" >
  2. <span class="fa fa-eye"></span>
  3. </button>
  4.  
  5. <div class="modal fade" id="header-modal" aria-hidden="true"></div>
  6.  
  7. <script>
  8. $('body').delegate('.product_detail', 'click', function() {
  9. var serviceId = $(this).attr('serviceId');
  10. $.ajax({
  11. type: "POST",
  12. url: "<?= base_url();?>service/popup",
  13. data: {serviceId: serviceId},
  14. dataType: "json",
  15. success: function(data) {
  16. $("#header-modal").html("<div class='modal-dialog modal-lg'>"+
  17. "<div class='modal-content'>" +
  18. "<div class='modal-header'>" +
  19. "<button type='' class='close' data-dismiss='modal' aria-hidden='true'><i class='icons-office-52'>Close</i></button>" +
  20. "<h4 class='modal-title'><strong>Product Detail</strong></h4>" +
  21. "</div>" +
  22. "<div class='modal-body' id='modal_body'>" +
  23.  
  24. "</div>" +
  25. "<div class='modal-footer'> " +
  26. "<button type='button' class='btn btn-danger btn-embossed bnt-square' data-dismiss='modal'>Cancle</button>" +
  27. "</div>" +
  28. "</div>"+
  29. "</div>"
  30. );
  31. $('#header-modal').modal('show');
  32. }
  33. });
  34.  
  35. });
  36. </script>
  37.  
  38. public function popup()
  39. {
  40. $serviceId = $this->input->post('serviceId');
  41. $data['serviceInfo'] = $this->product->getServiceById($serviceId);
  42.  
  43. echo json_encode($data);
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement