SharePoint 2013 Calendar not displaying correctly with IE11

SharePoint and other geeky stuff

Been working on my SharePoint Dev machine where I needed to add a calendar to my site. Wrote the code, everything looked good. I then VPN onto the client’s machine to upload the code to their QA environment. Soon as I looked at the calendar, I notice that it was displaying funny and not working as expected. After ensuring I had indeed uploaded the latest code, I decided to go back to basics and create an out of the box site and add a calendar to the site. Again the calendar didn’t look right.

Non Working Calendar

I jumped on the web front end, and used IE11 from there and the same site appeared correctly.

From my machine I checked with Chrome, Safari, Firefox and all appear correctly, but for some reason my IE didn’t work. It was the first time I’ve had a case of “It doesn’t work on…

View original post 599 more words


How to refresh List View in SharePoint 2013 using JavaScript

One of the short tip to refresh the list view using JavaScript code is as below:

// Set Ajax refresh context
var evtAjax = {
  currentCtx: ctx,
  csrAjaxRefresh: true
// Initiate Ajax Refresh on the list
AJAXRefreshView(evtAjax, SP.UI.DialogResult.OK);

You can place this code after completing your operation on list item or on success method. Where ctx is the current site context.

var ctx = SP.ClientContext.get_current();

This code usually helps in Client Side Rendering (CSR) / JSLink.

Keep SharePointing!

How to verify if the Page is in Edit mode using JavaScript in SharePoint 2013

Hi Guyz,

In one of my project there was need to have a specific edit mode functionality to be implemented, so there might be lot of approaches we can have but I found some of the below approaches that we can implement to verify if the page is in edit mode using JavaScript.

For Publishing Page
SharePoint default input called MSOLayout_InDesignMode is there. If the value is 1 then page is in edit mode else it is in display mode.

var inDesignMode = document.forms[MSOWebPartPageFormName].MSOLayout_InDesignMode.value;

if (inDesignMode == "1")
   // page is in edit mode
   // page is in browse mode

This will refer to value of the following html input control, which is rendering on the page when it is in edit mode:

<input id="MSOLayout_InDesignMode" name="MSOLayout_InDesignMode" type="hidden" value="1" />

For Wiki Pages
Same as above another default input _wikiPageMode parameter will be used. If the value is Edit page is in edit mode else in display mode.

var wikiInEditMode = document.forms[MSOWebPartPageFormName]._wikiPageMode.value;
if (wikiInEditMode == "Edit")
   // wiki page is in edit mode
   // wiki page is not in edit mode

Custom Code Snippets
Also you can place some snippet control to master page or page layout if you have customized it and place following snippets:

<PublishingWebControls:EditModePanel ID="EditModelPanel1" runat="server" PageDisplayMode="Edit">
    <h1>You are in EDIT mode</h1>
    <!-- Place you're javascript for execute only in edit mode -->

<PublishingWebControls:EditModePanel ID="EditModelPanel2" runat="server" PageDisplayMode="Display">
    <h1>You are in DISPLAY mode</h1>
    <!-- Place you're javascript for execute only in display mode -->


Enable “Sign In As Different User” in SharePoint 2013

In SharePoint 2010, there was a option available for signing as a different user. But in SharePoint 2013, that option has been removed.

Without Sign In option

I don’t know why Microsoft has removed this precious feature, but there are some workarounds to get back that feature.

Workaround 1:

  • Start Internet Explorer by using the Run as different user option, and then go to the SharePoint site.
    Note: The Run as different user option is visible if you hold the Shift key when you right-click a program icon.
  • Access the SharePoint site by using the the URL as http://siteurl/_layouts/15/closeConnection.aspx?loginasanotheruser=true
    Important: This option uses an unsupported browser feature which is unreliable and causes other issues. Currently this option does not work in IE 10 and Safari.

Workaround 2:

  • Go to the location C:\Program Files\Common Files\microsoft shared\Web ServerExtensions\15\TEMPLATE\CONTROLTEMPLATES
    There will be file called Welcome.ascx
  • Open welcome.ascx in Visual Studio or in Notepad and add the following code and save.<SharePoint:MenuItemTemplate runat="server" ID="ID_LoginAsDifferentUser" Text="<%$Resources:wss,personalactions_loginasdifferentuser%>" Description="<%$Resources:wss,personalactions_loginasdifferentuserdescription%>" MenuGroupId="100" Sequence="100" UseShortId="true" />Edit Welcome.ascx
  • Once you save this file, the feature will be enabled.
    With Link

Very simple workarounds to get back this feature.


Add Breadcrumb with SharePoint 2013 Design Manager

Greetings Guyz,

One day i was in need to have my custom breadcrumb with Design Manager feature in SharePoint 2013, so i dug into it and found that there is one snippet code to add breadcrumb in our HTML page of master layout. We just need to put below snippet to our any of the master page or page layout where you want to place the breadcrumb.

<div id="breadcrumb">
<!--MS:<ASP:SITEMAPPATH runat="server" sitemapproviders="SPSiteMapProvider,SPXmlContentMapProvider" rendercurrentnodeaslink="false" hideinteriorrootnodes="true" RootNodeStyle-CssClass="bc-root">-->
<!--MS:<ASP:IMAGE id="Image1" runat="Server" imageurl="/_catalogs/masterpage/images/breadcrumb_line.png">-->

Through above snippet we can have custom breadcrumb. Now to fulfill your requirement to have the actual branding you can create or update CSS classes or write some scripts using jQuery.

Blog more, Help more..!