在SharePoint 2010中显示与特定用户相关的横幅幻灯片
Show slides of a banner that relate to specific users in SharePoint 2010
我在财务部门工作,但我的经理要求我为我们的团队创建一个网站。我对HTML或Javascript几乎一无所知,对SharePoint2010略知一二。我设法创建了大部分内容,但有一个问题正在折磨我。我需要创建一个旋转横幅或选项卡式内容,这样当不同的用户登录时,他们就会看到不同的幻灯片或选项卡。例如,如果经理A登录,他应该看到客户的幻灯片或选项卡,以及这些客户的每日报告链接。当经理B登录时,他只能看到他的客户等。经理A看不到经理B的客户,反之亦然。
我现在的最佳猜测是为所有经理的所有客户创建选项卡,然后根据当前用户隐藏选项卡,但我不知道如何实现隐藏部分。任何帮助都将不胜感激!谢谢
第页。S.到目前为止,我有一个旋转横幅的代码在这里:
<div class="pageTitle">
News & Announcements
</div>
<div class="OuterLeft">
<div class="InnerLeft1" style="width:292px; margin-right:15px; float:left;"><menu class="ms-SrvMenuUI">
<ie:menuitem id="MSOMenu_Help" iconsrc="/_layouts/images/HelpIcon.gif" onmenuclick="MSOWebPartPage_SetNewWindowLocation(MenuWebPart.getAttribute('helpLink'), MenuWebPart.getAttribute('helpMode'))" text="Help" type="option" style="display:none">
</ie:menuitem>
</menu></div>
<div class="InnerLeft2" style="width:292px; float:left;"></div>
<div class="InnerLeftBottom">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td id="MSOZoneCell_WebPartWPQ5" valign="top" class="s4-wpcell-plain"><table class="s4-wpTopTable" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top"><div WebPartID="0a0ee8ca-3783-456b-a7b2-3cdaf55f5a25" HasPers="false" id="WebPartWPQ5" width="100%" class="ms-WPBody noindex" allowDelete="false" style="" >
<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<head>
<link rel="stylesheet" href="/RotatingBanner/css/slider3.css">
<script src="/RotatingBanner/js/jquery.min.js" type="text/javascript"></script>
<script src="/RotatingBanner/js/jquery.cycle.all.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {
jQuery('.fp-slides').cycle({
fx: 'scrollHorz',
timeout: 5000,
delay: 0,
speed: 400,
next: '.fp-next',
prev: '.fp-prev',
pager: '.fp-pager',
continuous: 0,
sync: 1,
pause: 1,
pauseOnPagerHover: 1,
cleartype: true,
cleartypeNoBg: true
});
});
</script>
<!--[if gte mso 9]><xml>
<mso:CustomDocumentProperties>
<mso:Keywords msdt:dt="string"></mso:Keywords>
<mso:_Author msdt:dt="string"></mso:_Author>
<mso:wic_System_Copyright msdt:dt="string"></mso:wic_System_Copyright>
<mso:_Comments msdt:dt="string"></mso:_Comments>
</mso:CustomDocumentProperties>
</xml><![endif]-->
<title></title></head>
<body>
<!-- Featured Content Slider Started -->
<div class="fp-slider clearfix">
<div class="fp-slides-container clearfix">
<div style="overflow: hidden;" class="fp-slides">
<!-- Slide 2 Code Start -->
<div style="position: absolute; top: 0px; left: -610px; display: none; z-index: 5; opacity: 1;" class="fp-slides-items">
<div class="fp-thumbnail">
<img src="/RotatingBanner/images/President's-Perspective_600x250.png" />
</div>
<div class="fp-content-wrap">
<div class="fp-content">
<h3 class="fp-title"><a href="https://us-intranet.milliman.com/ceoblog/default.aspx" style="color:#fff;">Risk management: We are not alone</a> </h3>
<p>Discussions at a recent conference show that consulting firms like Milliman face a variety of similar risk-related issues. <a href="https://us-intranet.milliman.com/ceoblog/default.aspx" style="color:#fff;">continue reading »</a></p>
</div>
<div class="fp-prev-next-wrap clearfix">
<a class="fp-next" href="#fp-next"></a>
<a class="fp-prev" href="#fp-prev"></a>
</div>
</div>
</div>
<!-- Slide 2 Code End -->
<!-- Slide 1 Code Start -->
<div style="position: absolute; top: 0px; left: -610px; display: none; z-index: 5; opacity: 1;" class="fp-slides-items">
<div class="fp-thumbnail">
<img src="/RotatingBanner/images/connectlogo-01.png" />
</div>
<div class="fp-content-wrap">
<div class="fp-content">
<h3 class="fp-title"><a href="/Pages/MillimanConnect.aspx" style="color:#fff;">OneNote to rule them all</a> </h3>
<p>Deborah Wolf of the Knowledge Management team discusses the versatile OneNote note-taking tool and shows how Milliman practices are using it to better track and share information. <a href="/Pages/MillimanConnect.aspx" style="color:#fff;">continue reading »</a></p>
</div>
<div class="fp-prev-next-wrap clearfix">
<a class="fp-next" href="#fp-next"></a>
<a class="fp-prev" href="#fp-prev"></a>
</div>
</div>
</div>
<!-- Slide 2 Code End -->
<!-- Slide 4 Code Start -->
<div style="position: absolute; top: 0px; left: 0px; display: block; z-index: 6; opacity: 1; width: 600px; height: 249px;" class="fp-slides-items">
<div class="fp-thumbnail">
<img src="https://us-intranet.milliman.com/RotatingBanner/images/Insight.jpg" />
</div>
<div class="fp-content-wrap">
<div class="fp-content">
<h3 class="fp-title"><a href="http://us.milliman.com/insight/" style="color:#fff;">Insight: Telematics, microinsurance, longevity plans, and more</a> </h3>
<p>Read Milliman's latest thought leadership pieces on the updated Insight page.
<a href="http://us.milliman.com/insight/" style="color:#fff;">continue reading »</a></p>
</div>
<div class="fp-prev-next-wrap clearfix">
<a class="fp-next" href="#fp-next"></a>
<a class="fp-prev" href="#fp-prev"></a></div>
</div>
</div>
<!-- Slide 4 Code End -->
<!-- Slide 4 Code Start -->
<div style="position: absolute; top: 0px; left: 0px; display: block; z-index: 6; opacity: 1; width: 600px; height: 249px;" class="fp-slides-items">
<div class="fp-thumbnail">
<img src="/RotatingBanner/images/MMI.jpg" />
</div>
<div class="fp-content-wrap">
<div class="fp-content">
<h3 class="fp-title"><a href="http://us.milliman.com/uploadedFiles/insight/Periodicals/mmi/2015-MMI.pdf" style="color:#fff;">
2015 Milliman Medical Index</a> </h3>
<p>Healthcare costs for the typical American family of four reached $24,671 in 2015.
<a href="http://us.milliman.com/uploadedFiles/insight/Periodicals/mmi/2015-MMI.pdf" style="color:#fff;">continue reading »</a></p>
</div>
<div class="fp-prev-next-wrap clearfix">
<a class="fp-next" href="#fp-next"></a>
<a class="fp-prev" href="#fp-prev"></a></div>
</div>
</div>
<!-- Slide 4 Code End -->
</div>
<div class="fp-nav">
<span class="fp-pager"></span></div>
</div>
<div style="clear: both;">
<!-- Featured Content Slider End -->
</div>
<div style="padding: 0 10px;">
<div style="position:relative;float:left;width:280px;">
<a href="/Lists/News%20Article%20Archive">View News Article Archives »</a>
</div>
<div style="position:relative;float:right;width:280px;text-align:right;">
<a href="mailto:newsbreak@milliman.com?subject=News%20Idea%20for%20Milliman%20Intranet%20and%20Newsbreak" >Submit a News Idea »</a>
</div>
</div>
</div>
<br clear="all"/>
</body>
</div>
</div>
</div>
<br clear="all"/>
</body>
</body>
</html>
</body>
</html>
/>
</body>
</body>
</html>
</body>
</html>
</div></td>
</tr>
</table><div class="ms-PartSpacingVertical"></div></td>
</tr>
用一种简单的方法可以做到这一点,这只是我给的一个片段
<head>
<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(init,'sp.js');
var currentUser;
function init(){
this.clientContext = new SP.ClientContext.get_current();
this.oWeb = clientContext.get_web();
currentUser = this.oWeb.get_currentUser();
this.clientContext.load(currentUser);
this.clientContext.executeQueryAsync(Function.createDelegate(this,this.onQuerySucceeded), Function.createDelegate(this,this.onQueryFailed));
}
function onQuerySucceeded() {
if(currentUser.get_loginName() == "manager a")
{
document.getElementById('managerA').style.display = 'block';
}
else if(currentUser.get_loginName() == "manager b")
{
document.getElementById('managerB').style.display = 'block';
}
}
</script>
</head>
<body>
<div id="managerA" style="display:none">
//manager A links and content
</div>
<div id="managerB" style="display:none">
//manager B links and content
</div>
</body>
相关文章:
- 幻灯片滚动javascript不起作用
- 让文本输入幻灯片显示输入时的新文本输入?然后向后滑动
- 从远程脚本获取用户IP
- 如何通过自己获得Chrome扩展的用户反馈/错误报告
- d3基于用户选择动态更新节点
- 同步调用,直到用户通过angular验证为访问者
- 创建具有可变长度幻灯片显示的幻灯片
- 使用javascript搜索具有用户输入的数组
- 如何使用jquery确定用户是否年满18岁
- Meteor-添加用户自定义字段的方法不起作用
- 如何根据用户的浏览器宽度动态居中 easySlider 幻灯片
- 如何使用javascript/jquery在html中创建用户可控的幻灯片放映
- 如何允许用户指定使用Ajax加载内容的幻灯片编号和URL地址
- 如何制作一个内容滑块,当用户垂直滚动或单击底部导航选项卡时显示下一张幻灯片
- 如何在网页上制作用户控制的幻灯片
- 在Powerpoint中根据用户输入动态更改幻灯片
- 当用户到达最后一张幻灯片时重定向
- 跟踪用户观看在线图像幻灯片的时间
- 在SharePoint 2010中显示与特定用户相关的横幅幻灯片
- jQuery 滑块“slide”事件:如何确定用户的幻灯片方向