sharepoint 2010 怎样在Ribbon区加入功能button
2017-08-17 16:19
218 查看
继续前面的一篇博客,sharepoint 2010 怎样在列表中加入功能菜单操作项。这次主要是记录下,在Ribbon区域加入功能button。比如加入收藏button。例如以下图所看到的:
1。
还是一样。加入一个空元素,CollectionRibbonItem
改动XML文件代码,在<elements></elements>标签中。加入CustomAction,
<CustomAction
Id="Ribbon.Library.Actions.AddAButton"
Location="CommandUI.Ribbon"
RegistrationId="101"
RegistrationType="List"
Title="Add a Ribbon Button">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.Library.Share.Controls._children">
<ButtonId="Ribbon.Library.Share.NewRibbonButton"
Command="NewRibbonButtonCommand"
Image16by16="/_layouts/15/2052/images/formatmap16x16.png"
Image32by32="/_layouts/15/2052/images/formatmap32x32.png"
LabelText="收藏"
TemplateAlias="o2" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="NewRibbonButtonCommand"
EnabledScript="javascript:SetEnableRibbonSubscribe();"
CommandAction="javascript:alert('Hello, world');" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
2。
部署到站点上,就能够了。
參考资料:https://msdn.microsoft.com/zh-cn/library/ee537543.aspx
广州京微信息科技有限公司,.微软sharepoint解决方式提供商。
1。
还是一样。加入一个空元素,CollectionRibbonItem
改动XML文件代码,在<elements></elements>标签中。加入CustomAction,
<CustomAction
Id="Ribbon.Library.Actions.AddAButton"
Location="CommandUI.Ribbon"
RegistrationId="101"
RegistrationType="List"
Title="Add a Ribbon Button">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.Library.Share.Controls._children">
<ButtonId="Ribbon.Library.Share.NewRibbonButton"
Command="NewRibbonButtonCommand"
Image16by16="/_layouts/15/2052/images/formatmap16x16.png"
Image32by32="/_layouts/15/2052/images/formatmap32x32.png"
LabelText="收藏"
TemplateAlias="o2" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="NewRibbonButtonCommand"
EnabledScript="javascript:SetEnableRibbonSubscribe();"
CommandAction="javascript:alert('Hello, world');" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
2。
部署到站点上,就能够了。
參考资料:https://msdn.microsoft.com/zh-cn/library/ee537543.aspx
广州京微信息科技有限公司,.微软sharepoint解决方式提供商。
相关文章推荐
- sharepoint 2010 搜索功能介绍 -- 金大昊(jindahao)
- SharePoint 2010 技巧系列 - 启用文档库接收邮件功能
- SharePoint 2010怎样把BI带到一个新的高度--by iLync
- asp.net中怎样实现设为首页和加入收藏的功能我用的是用LinkButton控件 点击Text为设为首页的LinkButton实现
- SharePoint 2010 加入项目到用户/欢迎菜单
- 使用SharePoint 2010的PowerShell完成Object Model编程才能完成的功能的一个实例
- SharePoint 2010在FireFox浏览器中的功能限制
- 在SharePoint 2010管理中心配置发送到连接功能
- sharepoint 2010 如何给文档库或自定义列表添加评论功能
- 在Android系统中如何给应用增加分享功能,怎样将应用加入系统的分享选择列表?
- SharePoint 2010 技巧系列: 文档管理的自动分发功能
- 怎样在Sharepoint 2010中定制开发SharePoint Designer Workflows Activities
- SharePoint 2010实现文档管理功能(一)准备
- SharePoint【学习笔记】-- SharePoint 2010 启用Form认证并增加用户注册功能
- SharePoint 2010 文档管理系列之星级评论功能
- SharePoint 2010的Form认证的用户注册功能
- 怎样在SharePoint 2010网站中启用匿名访问
- Powershell 功能函数大全(Sharepoint 2013/2010)
- sharepoint 2010 如何给文档库或自定义列表添加评论功能
- sharepoint 2010 重写SaveButton 的一些方法