Thursday, May 25, 2006

Handy Bookmarklet for SharePoint

Some of my projects have forced me into some interesting dilemmas with SharePoint. For example, we are currently replacing the default list item editor web part with a custom list item editor that we wrote in-house. By default, SharePoint does not give the user an option to modify/add/remove web parts on this page. In order to do this, you have to append the querystring &toolpaneview=2 to the url. As with my previous post, it'’s not hard but it can be a tedious chore every time you want to change the configuration of this custom web part.

Thus enters another handy bookmarklet. I have a written bookmarklet that dynamically loads a script tag that points to a js file that I have loaded on my webserver. When this bookmarklet is activated, it highlights web parts with a dotted red border. This allows the user to see what items on a page are web parts. The user can then click on one of the web parts which the bookmarklet will cause the clicked web part to go into edit mode (just as if the 'Modify Shared Webpart' link had been clicked).

This handy little bookmarklet has saved my team and me a ton of extra clicking. It is an awesome little piece of code for making your experience in SharePoint a little bit more enjoyable.

There are two parts that are needed to get this work.
  1. The bookmarklet (only contains javascript to dynamically load the real heavy lifting javascript)
  2. The javascript file that does all the work.

I have the bookmarklet loaded to a publicly available server so feel free to use it. You just need to add the following to a bookmark in your browser:




If you have any suggestions for improvement please let me know and I'll see if I can integrate the improvements.

No comments: