{% load i18n %}

<script type="text/javascript">
    $(document).ready(function(){
        var table=$('#tb').DataTable({            
            dom: 'Bfrtip',
            autoWidth: false,
            buttons: [{extend:'excelHtml5',text:'导出到Excel'}],           
            language:lng,           
            data:{{data|safe}},
            destroy:true,
        });      
        
        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 a').click(function(){
            event.stopPropagation(); 
            event.preventDefault();
            var url=$(this).attr('href');
            
            var url=$(this).attr('href');
            var tt=$(this).closest('tr').find('td:nth-child(1)').text()+":";            
            $.OpenUrlCfmDlg(url,tt,'保存','取消');

        });

        /*
        $('#tb a').click(function(){
            event.stopPropagation(); 
            event.preventDefault();
            var url=$(this).attr('href');
            $.ajax({
                type:'GET',
                //processData: false,
                //contentType: 'application/json; charset=utf-8',
                url:url,
                success: function (html) { 
                    $('#cgroup_edit').html(html);  
                    return;
                },
                error: function(XMLHttpRequest, textStatus, errorThrown) {
                    alert('连接服务器失败');
                    return;
                }
            });   
        });
        */

    });
</script>


<style>
  
   
</style>






<ol class="breadcrumb">
    <li>{% trans "系统菜单" %}</li>
    <li>{% trans "功能组别" %}</li>   
</ol>


<div class="clearfix"></div>









<div class='x_panel' id='chart-main'>
    <div>
    
        <table id="tb" class="table table-striped table-bordered dt-responsive nowrap" 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>
