Archive

Latest Posts

Using JSLink to Build a Project Registry

What We Did I was recently involved in building a Project Registry solution to help a local registered charity with managing their multiple cross-department projects. The Craigdarroch Castle Historical Museum Society’s Executive Director, John Hughes, asked itgroove to help him prepare the organization to manage their project portfolio, which was growing significantly over the next …

Read on

Infinite Scrolling in SharePoint Quick Tip

If you’re trying to set up an infinite scrolling script in SharePoint, you may run into issues calculating the height of the document and comparing it to how far the user has scrolled. This is due to how SharePoint overrides typical scrolling behaviour to allow the ribbon to stay put at the top of the …

Read on

Responsive UI Package for SharePoint on-premises (2013 and 2016)

If you’re like me and get a lot of requests to make SharePoint sites responsive (it is 2016 afterall!), here’s a great read and some excellent resources courtesy of the SP Patterns & Practices team to make your life a little easier: http://dev.office.com/blogs/announcing-responsive-ui-package-for-sharepoint-on-premises-2013-2016 Looking for the SharePoint Online version? That can be found in the …

Read on

Dynamically Resize SharePoint Modal Dialogs

My colleague Alec and I ran into an issue today where SharePoint was having difficulty rendering modal dialogs at the correct size. The dialogs were too small for the content they contained, and therefore some undesired scroll bars appeared. Nobody wants that! Thanks to Chad Schroeder’s post for a nifty little fix: Add that to …

Read on

Office Online Inline

Recently on a project we needed a way to display PDFs inline on a page within a “document viewer” we were building. Basically there is a table of contents driven by a library going down the left hand side and when the user chooses a document we wanted to render it in a panel on …

Read on

SP.Context Execution Order

We’ve hit a number of problems recently when using JSOM in SharePoint Online. Often when we try to execute a query we get strange errors such as “b is undefined”. It all relates to the SharePoint libraries we need not being available to us when we try to execute the commands. After some trial and …

Read on

SharePoint JavaScript Working with Hyperlink Fields

When using JSOM to retrieve SharePoint items (and their columns) getting a value is usually pretty straightforward. The following should look familiar: itemVariable.get_item(‘abc’) where abc is the internal name of the column. (Remember the good old _x0020_ for spaces). But if you try to do the same on a Hyperlink column you will be returned …

Read on

JavaScript that Waits for the SharePoint API’s to be Ready

I’ve run into this countless times in SharePoint where I need the browser DOM to be ready, but also at the same time, SharePoint isn’t yet ready to perform operations against its APIs. The problem with using something like jQuery’s ready method is that will only get you a browser DOM that is ready, but …

Read on

Detecting Edit Mode with JavaScript / CSS

One challenge we often need to overcome working with Publishing mode in SharePoint is quickly and effectively knowing if a page is in edit mode. This lets us apply different CSS styles or quite often disable functionality that is not needed in Edit Mode. (Especially surrounding Responsive Design). While SharePoint gives some great MasterPage level …

Read on

The Little JavaScript Gifts from SharePoint

Ever needed to quickly figure out what web application you are in using JavaScript? Or get the site collection URL? SharePoint has a fantastic somewhat little know JavaScript object declared in the MasterPage. _spPageContextInfo This object contains a ton of useful contextual information that can be accessed simply by referencing it: <script type=”text/javascript”> var loginName …

Read on