几个小知识
1、js调用sharepoint自己上传
var options = {
url: finalUrl + "/_layouts/RteUploadDialog.aspx?LCID=2052&Dialog=UploadImage&UseDivDialog=true&Source=" + window.location.href + "&seed=0.5107540191200195&IsDlg=1&from=WordConvert",
width: 400,
height: 300,
title: "上传",
dialogReturnValueCallback: onWordDialogClose
};
SP.UI.ModalDialog.showModalDialog(options);
}
2、js查询列表
var list = oWebSite.get_lists().getByTitle("审批人列表");
fieldCollection = list.get_fields();
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml("<View><ViewFields>" +
"<FieldRef Name=\"Title\" /><FieldRef Name=\"ApprovalSection\" /><FieldRef Name=\"ApproveAccount\" /></ViewFields></View>");
listItemCollection = list.getItems(camlQuery);
clientContext.load(fieldCollection);
clientContext.load(listItemCollection);
clientContext.executeQueryAsync(Function.createDelegate(this, this.onSearchListSucceeded), Function.createDelegate(this, this.onSearchListFailed));
3、根据权限进行相应的操作
<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl3" runat="server" AuthenticationRestrictions="AnonymousUsersOnly"><script type="text/javascript">
document.getElementById("customlogon").style.display = "inline";
</script></Sharepoint:SPSecurityTrimmedControl>