21. (続き)
//複数のWebパーツに問題が出るときに必要な処理
ExecuteOrDelayUntilScriptLoaded(function(){
varoldRenderListView=RenderListView;
RenderListView=function(ctx,webPartID){
//Check the context of the currently rendering List view
if(ctx.ListTitle=="カレンダー"){
//Override the BaseViewIDif it's the one we want.
ctx.BaseViewID=99;
}
//now call the original RenderListViewwith the updated ctxobject if applicable
oldRenderListView(ctx,webPartID);
}},"ClientTemplates.js");
23. (さらにさらに続き)
//ダウンロード最小化戦略の対応
//CSR-override for MDS enabled site
RegisterModuleInit("/_catalogs/masterpage/eventjslink.js",RenderMyDisplayTemplate);
//CSR-override for MDS disabled site (because we need to call the entry point function in this case whereas it is not needed for anonymous functions)
RenderMyDisplayTemplate();