<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/Guide.master"
    Inherits="PowerEasy.Module.General.WebSite.Admin.Contents.CategoryGuide" Codebehind="CategoryGuide.aspx.cs"
    Title="网站节点管理向导" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CphTitle" runat="Server">
    网站节点管理<span class="refresh" onclick="location.reload();"></span>
</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="Gosearch(this);"  onblur="outsearch(this);" onfocus="this.className='Searchinputtext_focus';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 type="text/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", "");
            }
        }
        function outsearch(obj) {
            if ($(obj).prop("value") == "") {
//                $(".searchb").show();
                //                $(".searcha").hide();
                $("#SearchA").css("display", "none");
                $("#SearchB").css("display", "block");
                $(obj).prop("value", "快速搜索节点");
            }
        }
        function offsearch(obj) {
            $(".searchb").show();
            $(".searcha").hide();
            $("#CphTitle_Search").prop("value", "快速搜索节点");
            document.getElementById('treedata').innerHTML = tree;
        }
        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 = "";
            }
        }
        function DoContextMenu(event) {
            event.returnValue = false;
        }
    </script>
</asp:Content>
