zoukankan      html  css  js  c++  java
  • sharepoint 2010 怎样在Ribbon区加入功能button

    继续前面的一篇博客,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解决方式提供商。

  • 相关阅读:
    LIPS的历史
    语法分析生成器 LEX
    Effective JAVA 中有关Exception的几条建议
    Code Reading chap10
    Code Reading chap8
    Code Reading chap7
    Code Reading chap11
    Code Reading chap9
    软件设计中的抽象层次
    Invalid bound statement (not found) @Update注解写的怎么还报错!
  • 原文地址:https://www.cnblogs.com/brucemengbm/p/7382370.html
Copyright © 2011-2022 走看看