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

        <!-- Basic modal -->
        <div id="modal_theme_primary" class="modal fade">
            <div class="modal-dialog">
                <div class="modal-content" id="modal-content">

                    <div class="map-container map-symbol-custom">
                        <?php echo $map['html']; ?>
                    </div>
                    <div id="directionsDiv" style="margin-top:15px"></div>

                </div>
            </div>
        </div>
        <!-- /basic modal -->

        <div class="col-lg-6">
            <!-- Daily sales -->
            <div class="panel panel-flat">
                <div class="panel-heading">
                    <h6 class="panel-title">Pending Transport Request</h6>
                   
                </div>

                

                <?
                include 'extra/transport_list.php';
                ?>                
            </div>
            <!-- /daily sales -->

        </div>

        <div class="col-lg-6">
            <!-- Daily sales -->
            <div class="panel panel-flat">
                  <div id ="action_panel"> 
                      
                        <div class="table-responsive">                  
                                <? include 'extra/notes_form.php'; ?>
                    </div>
                </div>
            </div>
            <!-- /daily sales -->

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



<script type="text/javascript">
<!--

    function transportSelected(line_id, agent) {

        $('#accs' + line_id).prop('disabled', true);
        $.ajax({
            url: "/transp/traspsel?proc=DETAIL&transport_id=" + line_id + "&agent_id=" + agent
        }).done(function (data) {
            $('#action_panel').html(data);
            $('#accs' + line_id).prop('disabled', false);
        });

        return false;
    }

var loaded_data = new Array();
function showTranspModal(transport_id) {
	if (typeof event !== 'undefined') {
		event.preventDefault();
	}
	//  alert(transport_id);
	// collect data - either from forms or from data variables
	var id = $(this).data('id');

	// load the modal content with a loader gif and message
	$('#modal-content').html('Loading...');

	// show modal window
	$('#modal_theme_primary').modal('show');
	//alert(5);
	// do the ajax bit
	var post_data = {
    'transport_id': transport_id,
	};
	//alert(6);
	$.ajax({
		url: "/dash/transp_modal?transport_id=" + transport_id
	}).done(function (data) {
		//alert(data);
		//alert(7);
		$('#modal-content').html(data);
		//initialize_map();
		var myLatlng = new google.maps.LatLng(33.7489954, -84.3879824);
		var myOptions = {
			zoom: 13,
			center: myLatlng,
			mapTypeId: google.maps.MapTypeId.ROADMAP};
		map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
		directionsDisplay.setMap(map);
		directionsDisplay.setPanel(document.getElementById("directionsDiv"));

		fitMapToBounds_map();

		calcRoute(loaded_data[0], loaded_data[1]);
		//alert(loaded_data[0]);
	});
	return false;	
}

// -->
</script>
<!--
vi:ts=2
-->

