{layout:default} {class:Shop.Admin.cms.NodeList}
<lbhead>
    <title><%=Tag("结点配置")%>-<%=site.title%></title>
</lbhead>
<lbpath>
    <h3 class="text-themecolor m-b-0 m-t-0"><%=Tag("结点配置")%></h3>
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="<%=site.AdminPath %>/Ajax/ajax_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a></li>
        <li class="breadcrumb-item active"><%=Tag("结点配置")%></li>
    </ol>
</lbpath>
<lbbody>
    <div class="col-12">
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col-12">
                        <%if (PageReturnMsg == ""){%>
                        <button class="btn btn-info" onclick="Node_Edit(0,0);"><i class="ti-plus"></i> <%=Tag("添加")%></button>
                        <%}%>
                    </div>
                </div>
                <div class="table-responsive">
                    <table class="table m-t-10 table-hover no-wrap">
                        <thead>
                            <tr class="no-wrap">
                                <th>
                                    <%=Tag("代码")%>
                                </th>
                                <th>
                                    <%=Tag("排序")%>
                                </th>
                                <th>
                                    <%=Tag("名称")%>
                                </th>
                                <th>
                                    <%=Tag("类型")%>
                                </th>
                                <th>
                                    <%=Tag("多语言")%>
                                </th>
                                <th>
                                    <%=Tag("内容")%>
                                </th>
                                <th>
                                    <%=Tag("操作")%>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <%=GetTreeString(0,0) %>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</lbbody>
<lbscripts>
    <script>
        function Node_Edit(pid, id) {
            $("#EditModal").modal("show");
            var title_ = "<%=Tag("编辑结点")%>";
            if (id == 0)
                var title_ = "<%=Tag("添加结点")%>";
            $.ajax({
                url: "node_edit_window.aspx",
                type: "GET",
                cache: false,
                data: {id: id,pid: pid,title: title_},
            }).done(function(result){
                $("#EditModal .modal-content").html(result);
            });
        }
        function Node_Del(id) {
            $("#Modal-Confirm").modal("show");
            $("#Confirm-Content").html("<%=Tag("确认要删除吗？")%>");
            $("#Modal-Confirm .btn-success.btn-ok").attr("onclick", "Node_DelObj("+ id +");");
        }
        function Node_DelObj(id) {
            $('#Modal-Confirm').hide('show');
            var url = "<%=site.AdminPath %>/ajax/ajax_node.aspx?__Action=Node_Del&id="+ id;
            RequestAjax(url,"",function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
    </script>
</lbscripts>