<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="KnowledageInfoTree.ascx.cs" Inherits="InformationCenterTreeByJquery.ControlTemplates.InformationCenterTreeByJquery.KnowledageInfoTree" %>
<SharePoint:ScriptLink ID="ScriptLink1" runat="server" Name="sp.js" Localizable="false" LoadAfterUI="true" />
<script type="text/javascript" language="javascript">
var clientContext;
var targetWeb;
_spBodyOnLoadFunctionNames.push("getLists()");
function getLists() {
var clientContext = new SP.ClientContext();
var oWebSite = clientContext.get_web();
listCollection = oWebSite.get_lists();
clientContext.load(listCollection);
clientContext.executeQueryAsync(Function.createDelegate(this, this.CreateTree), Function.createDelegate(this, this.onGetListsFailed));
}
var listsEnumerator;
function onGetListsSucceeded() {
listsEnumerator = listCollection.getEnumerator();
var str = "";
while (listsEnumerator.moveNext()) {
var objList = listsEnumerator.get_current();
var listTitle = objList.get_title();
var docLibName = '文档库名称';
alert(listTitle + "()" + docLibName);
if (listTitle == docLibName)
{
//输出文档库默认视图路劲
alert(objList.get_defaultViewUrl());
}
}
}
function onGetListsFailed(sender, args) {
}