
<div id="screen[index]" style="width: 100%;height:100%">     
    <div class="kt-portlet kt-portlet--mobile">
                    <div class="kt-portlet__body kt-portlet__body--fit">
                        <!--begin: Datatable -->
                        <div class="kt-datatable kt-datatable--default kt-datatable--brand kt-datatable--loaded" style="">
                            <table class="kt-datatable__table" style="min-height: 600px;" id="service_table_data">
                                <thead class="kt-datatable__head">
                                    <tr class="dnd-moved kt-datatable__row" style="left: 0px;">
                                        <th data-field="svcid" class="kt-datatable__cell" id="col_svcid" style="display: none;">
                                            ID<span><i class="fa"></i></span>
                                        </th>
                                        <th width="10%" data-field="svcnumber" class="kt-datatable__cell" name="service_sort_column" id="col_svcnumber" onclick="sortColumn(this,'col_svcnumber','desc');" style="vertical-align:top;">
                                           <span> Service # <i class="fa fa-sort-up"></i></span>
                                        </th>
                                        <th width="10%" data-field="jobnumber" class="kt-datatable__cell" name="service_sort_column" id="col_jobnumber" onclick="sortTable(this,2);" style="vertical-align:top;">
                                            <span>Job # <i class="fa"></i></span>
                                        </th>
                                        <th width="8%" data-field="svcdate" class="kt-datatable__cell" name="service_sort_column" id="col_svcdate" onclick="sortColumn(this,'col_svcdate','asc');" style="vertical-align:top;">
                                            <span>Service Date<i class="fa"></i></span>
                                        </th>
                                        <th width="15%" data-field="customer" class="kt-datatable__cell" name="service_sort_column" id="col_customer" onclick="sortTable(this,4);" style="vertical-align:top;">
                                            <span>Customer Name<i class="fa"></i></span>
                                        </th>
                                        <th width="20%" data-field="svctitle" class="kt-datatable__cell" name="service_sort_column" id="col_svctitle" onclick="sortColumn(this,'col_svctitle','asc');" style="vertical-align:top;">
                                            <span>Title<i class="fa"></i></span>
                                        </th>
                                        <th width="5%" data-field="svctype" class="kt-datatable__cell" name="service_sort_column" id="col_svctype" onclick="sortColumn(this,'col_svctype','asc');" style="vertical-align:top;">
                                            <span>Type<i class="fa"></i></span>
                                        </th>
                                        <th width="10%" data-field="svcstatus" class="kt-datatable__cell" name="service_sort_column" id="col_svcstatus" onclick="sortColumn(this,'col_svcstatus','asc');" style="vertical-align:top;">
                                            <span>Status<i class="fa"></i></span>
                                        </th>
                                        <th width="10%" data-field="svcby" class="kt-datatable__cell" name="service_sort_column" id="col_svcby" onclick="sortColumn(this,'col_svcby','asc');" style="min-width:110px;vertical-align:top;" >
                                            <span>Service By<i class="fa"></i></span>
                                        </th>
                                        <th width="10%" data-field="filter" class="kt-datatable__cell"  id="col_filter">
                                            <div>

                                            <button type="button" class="btn btn-default btn-sm btn-icon btn-icon-md" id="btnFilterColumn" onclick="filterRow('activity_row_filter',this,true);"><i class="fa fa-filter"></i></button>
                                            <button type="button" class="btn btn-success btn-sm btn-icon btn-icon-md" id="btnNewService" onclick="showAddActivity()"><i class="fa fa-plus"></i>
                                            </button>
                                            </div>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody class="kt-datatable__body" style="" id="service-list-table">
                                    <tr data-row="activity-rows-0" class="dnd-moved kt-datatable__row" style="left: 0px;" id="activity_row_filter">
                                        <td data-field="id" class="kt-datatable__cell" id="col_id" style="display: none;">&nbsp;</td>
                                        <td width="10%" data-field="svcnumber" class="kt-datatable__cell" id="col_svcnumber">
                                            <input type="text" class="form-control" name="service_input_filter" id="txtcolsvcnumber" onkeyup="filterData(this,1);" />
                                        </td>
                                        <td width="10%" data-field="jobnumber" class="kt-datatable__cell" id="col_jobnumber">
                                            <input type="text" class="form-control" name="service_input_filter" id="txtcoljobnumber" onkeyup="filterData(this,2);" />
                                        </td>
                                        <td width="8%" data-field="svcdate" class="kt-datatable__cell" id="col_svcdate">
                                            <input type="text" class="form-control" name="service_input_filter" id="txtcolsvcdate" onkeyup="filterData(this,3);" />
                                        </td>
                                        <td width="15%" data-field="customer" class="kt-datatable__cell" id="col_customer">
                                            <input type="text" class="form-control" name="service_input_filter" id="txtcolcustomer" onkeyup="filterData(this,4);" />
                                        </td>
                                        <td width="20%" data-field="svctitle" class="kt-datatable__cell" id="col_svctitle">
                                            <input type="text" class="form-control" name="service_input_filter" id="txtcolsvctitle" onkeyup="filterData(this,5);" />
                                        </td>
                                        <td width="5%" data-field="svctype" class="kt-datatable__cell" id="col_svctype">
                                            <input type="text" class="form-control" name="service_input_filter" id="txtcolsvctype" onkeyup="filterData(this,6);" />
                                        </td>
                                        <td width="10%" data-field="svcstatus" class="kt-datatable__cell" id="col_svcstatus">
                                            <input type="text" class="form-control" name="service_input_filter" id="txtcolsvcstatus" onkeyup="filterData(this,7);" />
                                        </td>
                                        <td width="10%" data-field="svcby" class="kt-datatable__cell" id="col_svcby" style="min-width:110px">
                                            <input type="text" class="form-control" name="service_input_filter" id="txtcolsvcby" onkeyup="filterData(this,8);" />
                                        </td>
                                        <td data-field="filter" class="kt-datatable__cell" style="width: 50px;" id="col_filter">&nbsp;</td>
                                        <td data-field="new" class="kt-datatable__cell" id="col_new">&nbsp;</td>
                                    </tr>
                                </tbody>
                            </table>                            
                        </div>
                    </div>                  

                <!--end::body-->
    </div>

     <!--end::Portlet-->
    <div class="modal fade" id="uploadDocActivityView" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel">Document Detail</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="flaticon-times"></i></button>
                </div>
                <div class="modal-body">
                    <div id="modaluploadDocActivityContent">
                    </div>
                </div>
                <div class="modal-footer">
                    <div id="modaluploadDocActivityButtonContent">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- email message-->
    <div class="modal fade" id="emailActivityModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
        <div class="modal-dialog modal-lg" role="document">
            <div class="modal-content">
                <div class="modal-header" id="modalConfirmationMessageHeaderContent">
                    <h5 class="modal-title" id="modalemailActivityModalTitle">Message</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="flaticon-times"></i></button>
                </div>
                <div class="modal-body">
                    <div id="modalemailActivityModalContent">
                        <input type="text" class="form-control" id="activity_id_email" style="display:none;">
                        <div class="row" style="margin-left:5%;margin-right:5%;margin-bottom:5px;">
                            <label  for="" class="col-md-3 control-label">Cust. Rep.</label>
                            <div class="col-md-9" >
                                <p id="labelActivityCustRep"></p>
                            </div>
                        </div>
                        <div class="row" style="margin-left:5%;margin-right:5%;margin-bottom:5px;">
                            <label  for="" class="col-md-3 control-label" style="padding-top:7px;">Email To</label>
                            <div class="col-md-9" >
                                <input type="text" class="form-control" id="activityEmailTo">
                            </div>
                        </div>
                        <div class="row" style="margin-left:5%;margin-right:5%;margin-bottom:5px;">
                            <label  for="" class="col-md-3 control-label" style="padding-top:7px;">Email CC</label>
                            <div class="col-md-9" >
                                <input type="text" class="form-control" id="activityEmailCC">
                            </div>
                        </div>
                        <div class="row" style="margin-left:5%;margin-right:5%;">
                            <textarea data-provide="markdown" class="form-control" name="markdown" id="activityEmailRemarks" cols="30" rows="10"></textarea>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <div id="emailActivityModalButtonContent">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
                        <button type="button" id="btnSendEmailApproval" class="btn btn-success" onclick="sendEmailApproval()">Send Email</button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade" id="activityLoadingModal" tabindex="-1" data-backdrop="static" data-keyboard="false">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title" id="modalLoadingTitle">Processing...</h4>
                </div>
                <div class="modal-body">
                    <div class="progress progress-striped active">
                        <div class="progress-bar" role="progressbar" aria-valuenow="70" aria-valuemin="0" aria-valuemax="100" style="width:100%">
                            <span class="sr-only">70% Complete</span>
                          </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- button to trigger the things -->
    <button id="activatebuttonscreen[index]" onclick='reactivatescreen[index]();' style="display: none;">activate screen button</button>
</div>
<div id="screen[index]a" > 
    
</div>
<div id="screen[index]a" > 
    
</div>
<!-- the function index that you want to run -->
<script>
$(document).ready(function () {
    filterRow('activity_row_filter',this,false);
    filterActivity();
});
</script>
<script type="text/javascript">
    function reactivatescreen[index]() {
        swal2("activation screen [index]");
    }
</script>
