<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Kbase.admin._default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">




    

 <table width="100%">
     <tr valign="top">
         <td width="200px" >

             <div style="border-right:solid 1px #888; min-height:600px; margin:0 10px 0 10px">

           
         <b>知识库分类   <a  href="###" onclick="Pop('Kb_Cat_AddEdit.aspx', 500, 400, '增加子分类');return false;">新增</a></b>
              

         <div id="thetree">
    <asp:TreeView runat="server" ID="tree1"
         ExpandDepth="2"

         ImageSet="Arrows"
        >
        <SelectedNodeStyle Font-Bold="true" BackColor="Red" />
        <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
        <NodeStyle Font-Names="Verdana" Font-Size="9pt" ForeColor="Black" 
            HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="0px" />
        <ParentNodeStyle Font-Bold="False" />
        <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px" VerticalPadding="0px" />
    </asp:TreeView> 


       </div>

                <div style="font-size:11px; margin:10px; color:#a0a0a0">
                   提示：鼠标右键可以建立分类
                </div>

  </div>

         </td>

         <td>
          
              <iframe src="<%=url %>" width="100%"  onload="resizeIframe(this)"  height="720px"  name="main" frameborder="0" ></iframe>


             <script>
                 function resizeIframe(obj) {
                     obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 'px';
                 }
             </script>
         </td>
     </tr>
 </table>


  

   








    <script> 

        // 菜单操作

        $(function () {

            $.contextMenu({

                selector: "#thetree a",


                items: {
                    "addsub": { name: "增加子分类" }, 
                    "update": { name: "更新分类名称" },
                    "sep1": "---------",
                    "addkb": { name: "添加新文章" },
                    "sep2": "---------",
                    "order": { name: "分类排序" },
                },

                 

                callback: function (key, options) { 
                     
                    if (key == "addsub") {
                        var id = $(this).attr("href"); 
                        id = id.replace("kb_lists.aspx?id=", "");
                        Pop('Kb_Cat_AddEdit.aspx?pid=' + id, 500, 400, '增加子分类');
                    }

                    if (key == "update") {
                        var id = $(this).attr("href");
                        id = id.replace("kb_lists.aspx?id=", "");
                        Pop('Kb_Cat_AddEdit.aspx?treeid=' + id, 500, 400, '修改分类');
                    }
                    

                    if (key == "addkb") {
                        var id = $(this).attr("href");
                        id = id.replace("kb_lists.aspx?id=", "");
                        window.open("kb_new.aspx?catid="+id,"main");
                    }

                    if (key == "order") {
                        var id = $(this).attr("href");
                        id = id.replace("kb_lists.aspx?id=", "");
                        Pop('KB_Order.aspx?treeid=' + id, 650, 550, '分类排序');
                  
                    }

                  
                }

             

              

            });

        });

    </script>



</asp:Content>
