SlideShare a Scribd company logo
(with credit to Andrew Connell)
www.sharepointnutsandbolts.com

 @ChrisO_Brien

Real World SharePoint 2010

   http://uk.linkedin.com/in/chrisobrienmvp
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
contextual tab group
         tab
                                          contextual tab




ribbon




            group               control
         {template}
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
Advantages                   Disadvantages

• Easy to create              • If complex, hard to manage
• Easy to manage              • Lots of JavaScript can be
• Great for simple commands     hard to manage
                              • Not cached on the client
                              • Not reusable outside of the
                                definition
Advantages                    Disadvantages

• External JS library          • Poor JavaScript dev tools
• Easier to manage & debug     • Must be added to the page
• Can be minified              • More work (build, register &
• Allows for greater control     initialize on page)
  over commands                • All OO JavaScript
  • Enable/disable command
  • Block loss of focus
• Reusable across
  customizations
Global Commands                Focused Command

• Always available when on a   • Only available at specific times,
  page                           e.g. when web part has focus
• (if CanExecute says it is    • Example: Content Editor Web
  available)                     Part controls
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SplitButton           ToggleButton   Spinner
• Easy default plus   • Off or on    • Select within a
  sub-menu                             range
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
Server side:
SPRibbon.MakeTabAvailable   For contextual tab
SPList.UserCustomActions    Target an individual list


JavaScript:
RefreshCommandUI()          Refresh ribbon, e.g. in async
                            callback
SP.SOD.ExecuteOr            Deal with JS dependencies
DelayUntilScriptLoaded()
SharePoint Ribbon Deep Dive
http://bit.ly/utr2g8




http://bit.ly/uVKABO
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive

More Related Content

SharePoint Ribbon Deep Dive

  • 1. (with credit to Andrew Connell)
  • 2. www.sharepointnutsandbolts.com @ChrisO_Brien Real World SharePoint 2010 http://uk.linkedin.com/in/chrisobrienmvp
  • 5. contextual tab group tab contextual tab ribbon group control {template}
  • 14. Advantages Disadvantages • Easy to create • If complex, hard to manage • Easy to manage • Lots of JavaScript can be • Great for simple commands hard to manage • Not cached on the client • Not reusable outside of the definition
  • 15. Advantages Disadvantages • External JS library • Poor JavaScript dev tools • Easier to manage & debug • Must be added to the page • Can be minified • More work (build, register & • Allows for greater control initialize on page) over commands • All OO JavaScript • Enable/disable command • Block loss of focus • Reusable across customizations
  • 16. Global Commands Focused Command • Always available when on a • Only available at specific times, page e.g. when web part has focus • (if CanExecute says it is • Example: Content Editor Web available) Part controls
  • 20. SplitButton ToggleButton Spinner • Easy default plus • Off or on • Select within a sub-menu range
  • 29. Server side: SPRibbon.MakeTabAvailable For contextual tab SPList.UserCustomActions Target an individual list JavaScript: RefreshCommandUI() Refresh ribbon, e.g. in async callback SP.SOD.ExecuteOr Deal with JS dependencies DelayUntilScriptLoaded()

Editor's Notes

  1. Parent control won’t appear.Error “MenuSections can only have children of type MenuItem, Gallery or GroupPopup. - will get error below”No options appearOtherwise no options appear!