<%@ Page Language="C#" MasterPageFile="~/Admin/Guide.master" AutoEventWireup="true"
    Inherits="PowerEasy.Module.General.WebSite.Admin.Contents.NodeTree" Title="节点树" Codebehind="NodeTree.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CphTitle" runat="Server">

<script language="javascript">
    var oldvalue;
    function beginsearch(obj) {
        if ($(obj).prop("value") == "快速搜索节点") {
            //$("#SearchA").show();
           // $("#SearchB").hide();
            $("#SearchA").css("display", "block");
            $("#SearchB").css("display", "none");
            $(obj).prop("value", "");
        }
        return true;
    }
    function outsearch(obj) {
        if ($(obj).prop("value") == "") {
            $("#SearchA").css("display", "none");
            $("#SearchB").css("display", "block");
           // $("#SearchA").hide();
            //$("#SearchB").show();
            $(obj).prop("value", "快速搜索节点");
        }
        return true;
    }
    function offsearch(obj) {
        $(".searchb").show();
        $(".searcha").hide();
      $("#CphTitle_Search").prop("value", "快速搜索节点");
        document.getElementById('treedata').innerHTML = tree;
        return true;
    }
    function Gosearch(obj) {
        if ($(obj).prop("value") != "") {
            if ($(obj).prop("value") != oldvalue) {
                var newXmlSrc = XmlSrc + "&IsSearch=true&NodeName=" + encodeURI($(obj).prop("value"));
                var newtree = new WebFXLoadTree(RootText, newXmlSrc, RootAction, "", rootIcon, rootIcon, RootTarget);
                $("#treedata").html(newtree.toString());
                oldvalue = $(obj).prop("value");
            }
        } else {
        document.getElementById('treedata').innerHTML = tree;
        oldvalue = "";
      }
      return true;
    }
</script>
    　<pe:ExtendedLiteral ID="LblNavigationLink" HtmlEncode="false" runat="server" Text=""></pe:ExtendedLiteral>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphSubMenu" runat="Server">
    <div class="guideexpand">　
<input ID="CphTitle_Search"  class="Searchinputtext" onmouseover="this.className='Searchinputtext_hover';" onmouseout="this.className='Searchinputtext';" onkeyup="return Gosearch(this);"  onblur="return outsearch(this);" onfocus="this.className='Searchinputtext_focus';return beginsearch(this);" value="快速搜索节点" />
    <a id="SearchB" class="searchb" ></a>
    <a id="SearchA" class="searcha" style="" onclick="offsearch();" ></a>   
    </div>
    <table style="width: 100%; height: 100%;" oncontextmenu="DoContextMenu(event)">
        <tr>
            <td valign="top">
                <div style="text-align: left">
                    <table>
                        <tr>
                            <td align="left">
                                <pe:XLoadTree ID="XLoadNodeTree" RootIcon="WebSite" runat="server">
                                </pe:XLoadTree>
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
    </table>
    
    <script language="javascript" type="text/javascript">
<!--
function DoContextMenu(event)
{
    event.returnValue = false;
}

    function going(type,id,nodeId,Iseshop,filePath,linkUrl)
    {
        var contentFilePath = "Content.aspx";
        
        if (filePath != "")
        {
            contentFilePath = filePath;
        }
        if(Iseshop=="2")
        {
            contentFilePath="../Shop/"+filePath;
        }
        switch (type)
        {
            case "manageinfo":            
                var url = contentFilePath + "?NodeId=" + nodeId + "&ModelID=" + id;
                JumpToMainRight(url);
                break;
            case "addcontent":            
                var url = contentFilePath + "?Action=add&NodeId=" + nodeId + "&ModelID=" + id;
                JumpToMainRight(url);
                break;
            case "setNode":
                var url = "Category.aspx?Action=Modify&NodeID=" + nodeId;
                JumpToMainRight(url);
                break;
            case "htmlManage":
                var url = "ContentHtml.aspx?NodeID=" + nodeId;
                JumpToMainRight(url);
                break;
            case "signin":
                 var url = "ContentSignin.aspx?NodeID=" + nodeId;
                JumpToMainRight(url);
                break;
            case "recycle":
                var url = "ContentRecycle.aspx?NodeID=" + nodeId;
                JumpToMainRight(url);
                break;
            case "preview":
                window.open(linkUrl, "_blank");
                break;
            case "sitepublish":
                var url = "CreateHtmlSingle.aspx?NodeID=" + nodeId;
                JumpToMainRight(url);
            case "showinfo":
                JumpToMainRight(linkUrl);
                break;
            case "dbshowinfo":
                JumpToMainRight(linkUrl);
                var url = "NodeInfoManageGuide.aspx?NodeID=" + nodeId;
                JumpToMainLeft(url);
                break;
        }
    }

    function Reflash_main_right(t)
    {
        var url = "SpecialInfosManage.aspx";
        JumpToMainRight(url);
    }
//-->
    </script>

</asp:Content>
