Download presentation
Presentation is loading. Please wait.
Published byEzra Fleming Modified over 9 years ago
1
Deep Dive on SharePoint Ribbon Development and Extensibility Chris O’Brien SharePoint MVP Independent OSP433
5
tab ribbon group {template} control contextual tab group contextual tab
7
demo Chris O’Brien SharePoint MVP Independent Customizing the SharePoint Ribbon
11
Command UI Handler – code sample <CommandUIHandler Command="MyCommandName" CommandAction="javascript:doSomething();" EnabledScript="javascript:checkSomething();" />
13
Page component – code sample canHandleCommand: function myCheckFunction (commandID) { return (commandID === "MyCommand") ? true : false; }, handleCommand: function myHandleFunction (commandID, properties, sequence) { if (commandID === "MyCommand") { // do stuff here.. }
14
Advantages Easy to create Easy to manage Great for simple commands Disadvantages If complex, hard to manage Lots of JavaScript can be hard to manage Not cached on the client Not reusable outside of the definition Command Handler Analyzed
15
Advantages External JS library Easier to manage & debug Can be minified Allows for greater control over commands Enable/disable command Block loss of focus Reusable across customizations Disadvantages Poor JavaScript dev tools Must be added to the page More work (build, register & initialize on page) All OO JavaScript
16
Global Commands Always available when on a page (if CanExecute says it is available) Focused Command Only available at specific times, e.g. when web part has focus Example: Content Editor Web Part controls
17
demo Chris O’Brien SharePoint MVP Independent Ribbon commands
20
SplitButton Easy default plus sub-menu ToggleButton Off or on Spinner Select within a range
22
demo Chris O’Brien SharePoint MVP Independent Advanced ribbon customizations
25
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 DelayUntilScriptLoaded() Deal with JS dependencies
27
Chris O’Brien : ribbon samples - http://bit.ly/utr2g8 (adding a tab/group/button, cool controls [SplitButton, ToggleButton, Spinner], static/dynamic FlyoutAnchor samples) Andrew Connell : ribbon samples - http://bit.ly/uVKABO (contextual tabs, commands explained, async processing, dialogs)
29
Session OSP337 - Branding and Customizing My Sites with Microsoft SharePoint Server 2010 Exam – 70-576 PRO: Designing and Developing Microsoft SharePoint 2010 Applications Find Me Later At – TLC 10am Thursday
30
The Business Collaboration Platform for the Enterprise & the Internet The capabilities of SharePoint 2010 provide a powerful business collaboration platform
32
Connect. Share. Discuss. http://northamerica.msteched.com Learning Microsoft Certification & Training Resources www.microsoft.com/learning TechNet Resources for IT Professionals http://microsoft.com/technet Resources for Developers http://microsoft.com/msdn
33
Required Slide Complete an evaluation on CommNet and enter to win!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.