Sunday, January 10, 2016

how to hide master page style in list ,libraries and pages or popups ,IsDlg=0, IsDlg=1?


When user add URL  IsDlg=0, IsDlg=1
Add &IsDlg=1

hidden Ribbon bar 
Add &IsDlg=0

but there’s no scroll bars


<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

<script type="text/javascript">

_spBodyOnLoadFunctionNames.push("hideItAll");

function hideItAll(){
    if(window.location.search.toLowerCase().indexOf("isdlg=1") > 0){
        $("#s4-ribbonrow").hide(); //ribbon bar

        //because the bar joins us late in the game, we need to throw CSS in to hide it
        $("head").append("<style>#Hero-WPQ2 { display:none }</style>");

        $("#CSRListViewControlDivWPQ2").hide(); //views and search bar
    }
}
</script>

No comments:

Post a Comment