/Home /Archive /Syndicate /Blog /Support /About /Contact  
All Visual Basic Feeds in one place!





Ever get frustrated when looking at a SharePoint calendar and for a particular month you've clicked expand all then move to a different   month and find that you're back in collapsed view.

Well you can change this by making some modifications to the CORE.JS file but keep in mind that you migh t have to redo this customization following any SharePoint service packs that you might apply.

There's basically 2 functions  that  you need to change

  • GetMonthView -  called whenever you click the Expand All or Collapse all buttons.
  • MoveToViewDate  - called when you navigate to a new month

Here's the new code that you'd need in those functions

function GetMonthView(str)
{
 //Added by Andy Bonner to memorize state
 SetCookie('ExpandCollapse',str,'');
 //Added by Andy Bonner to memorize state


 var wUrl=window.location.href;
 var ExpWeek=document.getElementById("ExpandedWeeksId");
 if(ExpWeek!=null)
  ExpWeek.value=str;
 else
  return ;
 SubmitFormPost(wUrl, true);
}


function MoveToViewDate(strdate, view_type)
{
 //Added by Andy Bonner to keep expanded or collapsed state
 var ExpCol = GetCookie('ExpandCollapse');
 if(ExpCol != null)
 {
  var ExpWeek=document.getElementById("ExpandedWeeksId");
  if(ExpWeek!=null)
   ExpWeek.value=ExpCol;
 }
 //Added by Andy Bonner to keep expanded or collapsed state



 var wUrl=window.location.href;
 if (strdate !=null)
  wUrl=StURLSetVar2(wUrl,"CalendarDate",escapeProperly(strdate));
 if (view_type !=null)
  wUrl=StURLSetVar2(wUrl,"CalendarPeriod",view_type);
 SubmitFormPost(wUrl, true);
}

© 2005 Serge Baranovsky. All rights reserved.
All feed content is property of original publisher. Designated trademarks and brands are the property of their respective owners.

This site is maintained by SubMain(), a division of vbCity.com, LLC