www.sharepointnutsandbolts.com @ChrisO_Brien Real World SharePoint 2010 http://uk.linkedin.com/in/chrisobrienmvp How Does it Work? tab contextual tab group contextual tab ribbon control group {template}

Download Report

Transcript www.sharepointnutsandbolts.com @ChrisO_Brien Real World SharePoint 2010 http://uk.linkedin.com/in/chrisobrienmvp How Does it Work? tab contextual tab group contextual tab ribbon control group {template}

www.sharepointnutsandbolts.com
@ChrisO_Brien
Real World SharePoint 2010
http://uk.linkedin.com/in/chrisobrienmvp
How Does it Work?
tab
contextual tab group
contextual tab
ribbon
control
group
{template}
Key ribbon locations
Ribbon.WikiPageTab
Ribbon.DocLibListFormEdit
Ribbon.ListForm.Display
Ribbon.ListForm.Edit
Command Handler Analyzed
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
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
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
SplitButton
ToggleButton
Spinner
• Easy default plus
sub-menu
• Off or on
• Select within a
range
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
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)
Session OSP337 - Branding and Customizing My Sites with Microsoft
SharePoint Server 2010
The Business Collaboration Platform for the Enterprise & the Internet
The capabilities of SharePoint 2010
provide a powerful business
collaboration platform
Manage Resources
Maximize Portfolio Returns
Keep Teams Productive
Improve SharePoint ROI
www.sharepoint.microsoft.com
www.microsoft.com/project
http://northamerica.msteched.com
www.microsoft.com/learning
http://microsoft.com/technet
http://microsoft.com/msdn