Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <button class="btn btn-default btn-rounded btn-sm product_detail" id="<?=$record->serviceId;?>" data-toggle="tooltip" title="View Product" >
- <span class="fa fa-eye"></span>
- </button>
- <div class="modal fade" id="header-modal" aria-hidden="true"></div>
- <script>
- $('body').delegate('.product_detail', 'click', function() {
- var serviceId = $(this).attr('serviceId');
- $.ajax({
- type: "POST",
- url: "<?= base_url();?>service/popup",
- data: {serviceId: serviceId},
- dataType: "json",
- success: function(data) {
- $("#header-modal").html("<div class='modal-dialog modal-lg'>"+
- "<div class='modal-content'>" +
- "<div class='modal-header'>" +
- "<button type='' class='close' data-dismiss='modal' aria-hidden='true'><i class='icons-office-52'>Close</i></button>" +
- "<h4 class='modal-title'><strong>Product Detail</strong></h4>" +
- "</div>" +
- "<div class='modal-body' id='modal_body'>" +
- "</div>" +
- "<div class='modal-footer'> " +
- "<button type='button' class='btn btn-danger btn-embossed bnt-square' data-dismiss='modal'>Cancle</button>" +
- "</div>" +
- "</div>"+
- "</div>"
- );
- $('#header-modal').modal('show');
- }
- });
- });
- </script>
- public function popup()
- {
- $serviceId = $this->input->post('serviceId');
- $data['serviceInfo'] = $this->product->getServiceById($serviceId);
- echo json_encode($data);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement