{% load i18n %}


<style> 
    .word-wrap{
        width: 100%;white-space: normal;word-wrap: break-word;word-break: break-all;
    }

    #tb tbody td:nth-child(8){
        padding:2px;
    }


   

</style>



<script type="text/javascript">
    $(document).ready(function(){    
        var page_length=10; 

        var table=$('#tb').DataTable({
            dom: 'Bfrtip',
            autoWidth: true,
            pageLength: page_length,
            buttons: [{extend:'excelHtml5',text: '导出到Excel'}],   
            language:lng,
            //order: {{order|safe}},
            data:{{data|safe}},
            
            //columnDefs: [{"targets": [0, 10 ], "visible": false }],
            //createdRow: function ( row, data, index) {
            //    $(row).attr('obj_id', data[10]);
            //    if(parseInt(data[4])>0){
            //        $('td',row).eq(0).addClass("details-control");
            //    };
            //}
        });

       

        table.columns().every( function () {                        
            var that = this;             
            $('input', this.footer() ).on( 'keyup change clear', function () {
                if ( that.search() !== this.value ) {
                    that.search( this.value ).draw();
                }
            });
        });





        $('#tb').on("click","td a",function(event){
            event.preventDefault();    
            $.RefreshContent($(this).attr('href'));            
        });      

       

        $(".btn-obj-add").click(function () { 
            event.preventDefault();
            $.RefreshContent($(this).attr('href'));        
        })

        $('#tb').on("click","tbody td a",function(event){
            event.preventDefault();    
            $.RefreshContent($(this).attr('href'));            
        });      

        
    });
</script>



<ol class="breadcrumb">
        <li>企业管理</li>
        <li>第三方跳转</li>     
</ol>



<div class="title_right">
    <div class="pull-right">
        <span class='input-group'>
            <a type="button" class='btn btn-obj-add l-a create-btn' href='{{murl}}'>
                <span class='glyphicon glyphicon-plus' style='padding-right:5px;'></span>{% trans '新建' %}
            </a>
        </span>
    </div>
</div>        



<div class="col-md-12 col-sm-12 col-xs-12">
    <div class="x_panel">
        <div  class="table-responsive">
            <table id='tb'  class="table table-striped table-bordered" cellspacing="0" width="100%">
            <thead>
                {% for c in clmns %}
                    <th>{{c}}</th>
                {% endfor %}
            </thead>
            <tbody></tbody>
            <tfoot>
                {% for c in clmns %}                   
                    <th><input type="text" placeholder="{{c}}"></th>                    
                {% endfor %}            
            </tfoot>
            </table>
        </div>
    </div>
</div>
