<!-- Main content -->
<div class="content-wrapper">
    <!-- Dashboard content -->
    <div class="row">

        <div class="col-lg-4">
            <!-- Daily sales -->
            <div class="panel panel-flat">
               
                <div class="table-responsive">
                    <table class="table text-nowrap">
                        <thead>
                            <tr>
                                <th>My Transport Locations</th>  
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>

                            <?
                            foreach ($result_list as $rect) {
                                ?>
                                <tr>
                                    <td>
                                        <div class="media-body">
                                            <div class="heading">
                                                <b><?= $rect['loc_name'] ?></b>,<br> <?= $rect['street'] ?>,<br><?= $rect['city'] ?>,<?= $rect['state'] ?> <?= $rect['zipcode'] ?>
                                            </div>


                                        </div>
                                    </td>
                                    <td style="width: 90px;">

                                        <div class="btn-group btn-group-xs" role="group">
                                            <button type="button" class="btn btn-primary" id="accs<?= $rect['id'] ?>" onclick="configureDevice(<?= $rect['id'] ?>,<?= $rect['agent_id'] ?>);" >Configure</button>                                                  
                                        </div>

                                    </td>
                                </tr>  
                                <?
                            }
                            ?>
                        </tbody>
                    </table>
                </div>

            </div>
            <!-- /daily sales -->

        </div>

        <div class="col-lg-4">
          
            <div id ="device_list">
                <div class="panel panel-flat">
                    <div class="panel-heading">
                        <h6 class="panel-title">Device List</h6>
                        <div class="heading-elements">

                        </div>
                    </div>

                    <div class="panel-body">
                        <div id="sales-heatmap"></div>
                    </div>

                    <div class="table-responsive">



                    </div>
                </div>                
            </div>
        </div>
        
        <div class="col-lg-4">
            <!-- Daily sales -->
         

                <div class="panel panel-flat">
                    
                    
                    <div class="panel-heading">
                        <div id="device_form">   
                        <h6 class="panel-title">Add Edit Device</h6>
                        <div class="heading-elements">

                        </div>
                    </div>

                    <div class="panel-body">
                        <div id="sales-heatmap"></div>
                    </div>

                    <div class="table-responsive">



                    </div>
                </div>             

            </div>



            <!-- /daily sales -->

        </div>
    </div>
    <!-- /dashboard content -->
</div>
<!-- /main content -->

<script type="text/javascript">
<!--
    function configureDevice(locID,agent_id) {
      //  alert(locID);
      //  return false;
      
     

          
            $('#accs' + locID).prop('disabled', true);
            $.ajax({
                url: "/transp/listdevices?proc=NCOMPLETE&locID=" + locID + "&agent_id=" + agent_id 
            }).done(function (data) {
                $('#device_list').html(data);             
                $('#accs' + locID).prop('disabled', false);
            });
            return false;
            
            
    }
  
// -->
</script>
<!--
vi:ts=2
