Skip to content

Instantly share code, notes, and snippets.

@vgrem
Last active December 21, 2015 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vgrem/6253326 to your computer and use it in GitHub Desktop.
Save vgrem/6253326 to your computer and use it in GitHub Desktop.
Handler for List form links in SharePoint 2010
//Handler for List form links in SharePoint 2010
// (from CORE.js)
function _EditLink2(elm, ctxNum)
{ULSrLq:;
var fn=function()
{ULSrLq:;
var url=GetGotoLinkUrl(elm);
if (url==null)
return;
var ctxT=window["ctx"+ctxNum];
if (ctxT !=null && ctxT.clvp !=null)
{
var clvp=ctxT.clvp;
if (FV4UI() && !ctxT.NavigateForFormsPages) //check if Dialogs option (NavigateForFormsPages property of ContextInfo) is set to 'No'
{
PreventDefaultNavigation();
clvp.ShowPopup(url); //open form in modal dialog boxes
return false;
}
}
GoToLink(elm); //navigate using href attribute of link
}
EnsureScript("inplview", typeof(inplview), fn);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment