Skip to content

Instantly share code, notes, and snippets.

@BasantPandey
Created August 12, 2016 05:27
Show Gist options
  • Save BasantPandey/03f7bb8abf0f0cbafde8ff264e1cb49e to your computer and use it in GitHub Desktop.
Save BasantPandey/03f7bb8abf0f0cbafde8ff264e1cb49e to your computer and use it in GitHub Desktop.
var InitCommon= InitCommon || (function(){
var SearchVerticalClickFix = function SearchVerticalClickFix(){
if (typeof(STSNavigate) != 'undefined') {
STSNavigate = function(a) {
a=GetAbsoluteUrl(a);if(ajaxNavigate.get_search().indexOf("IsDlg=1")!=-1)if(a.indexOf("?")!=-1)if(String(a.match(RegExp("&$")))!="&")a=a+"&IsDlg=1";else a=a+"IsDlg=1";else a=a+"?IsDlg=1";var framed;try{var test = window.frameElement}catch(frameException){framed = true;}; if((!framed && window.frameElement!=null)||typeof SPUpdatePage==="undefined"||typeof SPUpdatePage!=="undefined"&&SPUpdatePage(a))if(isPortalTemplatePage(a))window.top.location.href=STSPageUrlValidation(a);else window.location.href=STSPageUrlValidation(a)
};
}
};
var init= function init(){
SearchVerticalClickFix();
}
return{
init:init
}
})();
$(document).ready(function() {
InitCommon.init();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment