Saturday, October 31, 2009

Update: Really Small SharePoint Calendar

I really was not that happy with the look of the first calendar so after some modifications and a bit of CSS magic I have come up with a really good looking small calendar. At least I think so…

Basically I have replaced the text of an event item with a color coded box. The benefit that you get out of this is that you don’t have to try and read the even within the small calendar but if you hover over and click on the color block you get the list Item display.

  • Orange is for single event items (8am-10am, etc)
  • Green is for full day events or repeat events

Another nice feature to this is that I have also simplified the visual indicator when there are more then two event items in one day. Instead of seeing the arrow and text all you see is the arrow. Once you click on the arrow it will show the other blocks of events (Right image).

image image

Here is the CSS Code: Download Here

  1. Simply place a content editor web part on the same page as the calendar
  2. Paste the code from the file above into the source of the content editor web part.
  3. Hide the Content editor web part on the page.

If you plan on making this a more global style this is an example of how the large calendar would look like.

image

Leave a comment and let me know how it works for you!

Friday, October 30, 2009

How to create a really small SharePoint Calendar

Well I guess I did not do my research enough and found a site that had an even smaller SharePoint calendar by just modifying the CSS. http://pathtosharepoint.wordpress.com/2008/10/06/tiny-sharepoint-calendar-1/

With these styles below you can drastically transform your SharePoint Calendar view into a tiny box. Yes there is limited functionality but if you have been looking for something like this with no custom code you got it!

  (Left) No events                     (Right) Events populated

image

image

Copy this CSS code below and past it into your custom CSS!

/* Remove week blocks */
.ms-cal-weekempty {display:none;}
.ms-cal-week {display:none;}
.ms-cal-weekB {display:none;}
.ms-cal-weekB {display:none;}

/* Shrink cells */
.ms-cal-workitem2B {display:none;}
.ms-cal-noworkitem2B {display:none;}
.ms-cal-nodataBtm2 {display:none;}
.ms-cal-todayitem2B {display:none;}
.ms-cal-workitem {font-size:0px;}
.ms-cal-muworkitem {font-size:0px;}
.ms-cal-noworkitem {font-size:0px;}
.ms-cal-nodataMid {font-size:0px;}
.ms-cal-todayitem {font-size:0px;}

/* thin out header */
.ms-cal-nav {display:none;}
.ms-cal-nav-buttonsltr {display:none;}
.ms-cal-navheader {padding:0px;spacing:0px;}
.ms-calheader IMG {width:15px;}

/* Abbreviate weekdays */
.ms-cal-weekday {letter-spacing:6px; width:22px; overflow: hidden;}

/* Adds border to bottom */
#CalViewTable1{
border-bottom: 1px #6f9dd9 solid;
}

Enjoy!

Wednesday, October 21, 2009

How to Shrink a SharePoint Calendar View

Have you ever needed to add a Event Calendar to your Team Site with the calendar view but you didn’t because it basically took up the whole site? Well just today I was messing around with this and came up with some interesting results.

If you look at the code for a calendar view everything looks fine except for a hidden shared class at the very top of the calendar right below the webpart title.

image This image is 742 pixels wide and forces the calendar view to be minimally that width. With the CSS below you can now hide that image and allow the calendar to fit within your team site with no problems at all. By making these changes you will not change the look of the full view of the calendar when you click on the event list. The screenshot below was taken with 1024x768 resolution.

image Here is the CSS:

.ms-calheader img{
display: none;
}

#CalViewTable12 img{
display: inline;
}

.ms-cal-nav-buttonsltr{
white-space: nowrap;
}

Full Calendar View with styles applied:

image

Enjoy!

Monday, August 3, 2009

SharePoint Reusable Content

I can pretty much say I know my way around SharePoint… But every once in a while you learn about a feature that you never knew was there… Most of the time its those annoying bugs that we call “features” but are true head against the wall things that make you go hmmmm… But this time its a good thing…

I was tasked with finding a way to create a header and footer for a publishing site. This header and footer would be consistent across all pages within the content area of the site. My First thought was ok I need a custom page layout, but this would not work since it needs to be easily updated via the SharePoint Interface.

So after some investigation I found out that SharePoint has a built in feature called “Reusable Content”

Basically all you need to do is simply edit the page of your publishing site and click on a content editor control. If you look at the image below there is a icon next to the image icon.

image The icon is not very obvious hence the reason why I never noticed it before… But if you click on this button you get the following list.

image

This is basically a list of all the reusable content that resides within that site collection.

If you don’t see what you like you can simply open up the list via the “Open List” button on the toolbar.

From that list you can now create either Reusable HTML or Text.

image 

New Reusable HTML form:

image

Once you have edited your content and choosen it from the list you will see the Reusable content within a grey boxed in area within the content.

image

So, how many other people out there never knew this feature was there? Am I the only one? Leave a comment with your experiences.

Thursday, June 4, 2009

SharePoint Branding Build Test Checklist

During the creation of the CSS, Master Pages, and Page layouts its critical to stay on top of your Front End Development testing.

As you know many classes in SharePoint are shared classes so when you make a modification to one element you have to test, test, test.

Below are some helpful things to review before giving that oh so critical demo… Hopefully these will help you out during your development process and testing.

  • Create and test all OOTB SharePoint templates
    1. Publishing Sites
      • Publishing Toolbar
      • Page Layouts (All that are available)
    2. My Sites
      • My Profile
        • Organization Hierarchy web part
        • In Common with you web part
    3. Team Sites
    4. Meeting Workspaces
    5. Blog
      • Unique Quick Launch
      • Post date, title, content, and links
    6. Wiki
      • Functional Links (Edit, History, Incoming Links)
      • Unique Quick Launch (Recent Changes)
      • Last Modified
    7. Search
      • People search drop down options
      • Search Results
      • Advanced Search Link
      • Advanced Search Page
    8. Central Administration
      • Don’t spend to much time on these
  • Test as many SharePoint functions as you can
    1. Fly Out Menu’s/Drop Downs
      • My Links
      • Top Navigation
      • Site Actions
      • Modify Web Part
      • Quick Launch if enabled
      • Multi Tier/level if enabled
      • Document Item Drop Down
    2. Button Hovers
      • Search/Go
      • Global Links (Top Links like My Links)
      • SPLink (Welcome & Console Toolbar Buttons)
      • Toolbar View Button
    3. Quick Launch
      • Headers
      • List Items
      • Selected headers/Items
      • Tree View
    4. Breadcrumbs
      • Text
      • Hyperlinks
      • Carrots “>”
    5. Toolbars
    6. Calendar
      • Date Picker
      • Month View
      • Week View
      • Day View
      • Current Day Indicators
    7. Lists/Libraries
      • Datasheet View
      • Alternating item shade (ms-alternating)
    8. Webpart
      • Chrome/Title
      • Border color/width if selected (ms-WPBorder)
      • Separator Lines
    9. Edit Page
      • Webpart Zone Colors
      • Drag and Drop Style
      • Webpart Chrome/Title’s
      • Advanced Webpart Gallery and Options
    10. Admin Pages
      • Site Settings
      • List Forms
        • Form Background (ms-authoringcontrols)
      • Upload Document
      • Error Pages
    11. OOTB Themes
      • If you are going to allow OOTB themes you will have to test, test, and triple test that all themes work and function as expected with your custom design…
    12. Fonts/Colors
      • Stick to system Fonts so that everyone gets the same experience. (Verdana, Tahoma, Arial, Etc)
      • Page Titles
      • Body Content
      • Hyperlinks
      • Hover Text
      • Visited State
    13. Images
      • Teamsite Default Image
      • Social Meeting Workspace Image
    14. Customization/3rd Party
      • Its kinda a given but any custom web parts, 3rd Party or custom controls implemented will need to have branding applied or tested before deployment onto prod servers.

I’m sure there are some that I missed but drop me a comment if you have some that I missed and I will add to the list above.

Thursday, May 14, 2009

Rounded Corners in SharePoint

Rounded corners have become a staple in website design. But they come with a price. Don't get me wrong I really like the look of them and they really help soften the look of the site.

In most cases you can create this look by using the method below. Later on in this post I will highlight some of the things you can do and some of the things not technically possible without major custom development.

Design 1: Rounded corners to frame a site:

  1. Open up your master page and add 1 <div> tag right before the ms-main table to represent the site container (This is used to position the site and give it its width)
  2. Add 4 more <div> tags before the ms-main table to represent your 4 corners (top left, top right, bottom left, bottom right)
  3. <div id="xyz-content-corner-tl">
    <div id="xyz-content-corner-tr">
    <div id="xyz-content-corner-bl">
    <div id="xyz-content-corner-br">
  4. Add in the following to CSS attributes to represent the 4 corners

#xyz-content-corner-tl{
background-image: url(/_layouts/images/xyz/xyz_content_corner_tl.gif);
background-position:left top;
background-repeat: no-repeat;
background-color: #ffffff;
}
#xyz--content-corner-tr{
background-image: url(/_layouts/images/xyz/xyz_content_corner_tr.gif);
background-position:right top;
background-repeat: no-repeat;
}
#xyz--content-corner-bl{
background-image: url(/_layouts/images/xyz/xyz_content_corner_bl.gif);
background-position:left bottom;
background-repeat: no-repeat;
height: 100%;
}
#xyz--content-corner-br{
background-image: url(/_layouts/images/xyz/xyz_content_corner_br.gif);
background-position:right bottom;
background-repeat: no-repeat;
height: 100%;
}

Example: Please note that the shadow effect is a bit more complex and requires two more <div> tags to represent the right side repeat and the bottom repeat.

image

Design 2: Rounded corners to frame content

  1. This approach can achieved the same way as per above with 4 <div> tags but just needs to included around the <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server"> control within the master page.

Example:

image

Design 3: Rounded corners around individual web parts

  1. Now this one has some tricky elements that I am still trying to work out.
  2. My Original thought was to use the approach above and simply add the 4 <div> tags around each individual webpart zone in a page layout. But there is a catch…
  3. Normally webpart zones are wrapped in a <td> that has an id of "_invisibleIfEmpty" There is some java script that basically hides that zone from rendering on the page if there is no content in it.
  4. However if you place those 4 div tags within that <td> you would assume that it would still hide that zone. But no basically its like a buffer and that JavaScript no longer thinks that zone is empty and it shows it on the page even if there is no webpart in that zone. So you end up with something like below: Notice that below the two web parts on the right there are two empty white containers with nothing in them.

Example:

image

So all in all its fairly easy to add in rounded corners to different areas within your design by using the approach above but there is still a need to have individual web parts with a container all for themselves.

If anyone out there has any ideas on either modifying the JavaScript to ignore the div tags and hide the empty zones or have any other approaches that have worked for them please don't hesitate to comment.

Thanks!

Thursday, April 9, 2009

IA and Branding Process Presentation [Video]

Click to watch the video presentation (36MB WMV), thanks to my friend Paul Galvin for taking the video.

Update: For some reason the link was not good. I have updated it and it should work now.