如何在SharePoint中添加使用CustomAction色带项目2010如何在Sharepoint 2010中使用CustomAction添加功能区项目?
2
A
回答
3
以下是名为“测试行动1”色带项目(按钮)添加到步骤在SharePoint 2010中使用CustomAction的TemplateType = 10003的列表
1.添加一个新元素并添加以下代码。请注意,有两个CustomActions。一个添加功能区按钮,另一个添加JavaScript文件。
RegistrationId与ListTemplateType相同。
有关默认服务器功能区定制位置的列表,请参阅this article。
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction ShowInLists="TRUE" Id="TestAction1" RegistrationType="List" RegistrationId="10003" Location="CommandUI.Ribbon">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListItem.Actions.Controls._children">
<Button Id="Ribbon.ListItem.Actions.TestAction1" Alt="Test Action 1" Sequence="10" Image32by32="/_layouts/images/ACTIONSEDITPAGE.PNG" Command="Test_Action1" LabelText="Test Action 1" TemplateAlias="o2"/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler Command="Test_Action1" CommandAction="javascript:TestAction1();" />
</CommandUIHandlers>
</CommandUIExtension>
</CustomAction>
<CustomAction Id="Test.Ribbon.TestScript" Location="ScriptLink" ScriptSrc="~/_layouts/SPTest/TestJScript1.js" />
</Elements>
2.映射Layouts文件夹并添加TestJScript1.js文件。
function TestAction1() {
alert("This the test action 1");
}
查看示例项目结构
3
相关问题
- 1. 在Sharepoint 2010中添加更改项目订单功能区
- 2. 在SharePoint 2010中添加上传功能
- 3. 如何在Outlook 2010新项目功能区部分中添加条目?
- 4. 如何将HTML元素添加到SharePoint 2010功能区
- 5. CustomAction与回传在SharePoint 2010
- 6. SharePoint 2010功能区控件
- 7. 以编程方式添加到SharePoint 2010功能区后禁用功能区按钮功能区
- 8. Sharepoint 2007和2010中功能的区别
- 9. SharePoint 2010功能
- 10. 使用VB.NET将项目添加到功能区下拉菜单
- 11. 使用Visual C++ 2010不能“添加新项目...”项目使用Visual C++ 2010时
- 12. 刷新Sharepoint 2010功能区选项卡中的控件
- 13. 如何使用SharePoint Designer在SharePoint中添加Web部件区域
- 14. Sharepoint 2010 - 自定义功能区
- 15. Sharepoint 2010功能区粘贴命令
- 16. 使用Sharepoint 2010中的功能区更改链接的颜色?
- 17. 如何在sharepoint List中添加多个lookup值。在sharepoint中添加项目时
- 18. 将选项卡添加到Outlook 2010功能区?
- 19. 在机会中添加项目功能
- 20. sharepoint 2010在异步回发中添加新项目链接
- 21. 如何在SharePoint 2010上查看项目
- 22. 如何在任何项目中添加望远镜功能?
- 23. 在SharePoint功能区菜单中添加日期控件
- 24. SharePoint 2010 - 网站分析 - 分析功能区 - 缺少功能
- 25. 在Excel 2010中添加基本功能区的VBA代码?
- 26. 在模块化项目中使用添加功能
- 27. 如何在JavaScript中实现“添加新项目”功能?
- 28. 在SharePoint 2010中自定义功能区控件
- 29. 在SharePoint 2010中调试功能激活
- 30. 如何将自定义图标添加到Sharepoint 2010中的功能