Sunday, October 12, 2014

#SharePoint | Ribbon tabs missing after view customization

Problem:
It appears that once we customize a view (e.g. add a webpart), the "Documents" and "Library" tabs will now be hidden from the ribbon until you manually click the list view webpart.





Solution:
There is a way to invoke the ribbon through JavaScript by identifying the containing webpart.
This will automatically pick the "Documents" tab, so we will also be tweaking that so we can try to create an almost seamless behaviour as before by choosing the "Browse" tab instead.
One caveat of this approach is that we need to wait until the ribbon has loaded in order to run our code.



This was possible thanks to a few posts in stack exchange,
http://sharepoint.stackexchange.com/questions/73174/items-and-list-tabs-in-ribbon-dont-show-after-editing-page

http://sharepoint.stackexchange.com/questions/49003/showing-the-tab-on-button-click

No comments:

Post a Comment