5/07/2010

SharePoint: List View Styles


The following applies to SharePoint 2007, 2010, 2013, 2016 and SharePoint Online.

Note to 2013 and later users… Selecting any view but "Default" will hide the new command bar at the top of the list/library.
image



List View Styles

If you have been to one of my classes then you know that “If I had written SharePoint…” is one of my often used phrases. Some of these are “big” items, but most are little things that make using SharePoint just a little nicer.  One of those is how the list of Styles is displayed in the View Edit page. See all of that empty space on the left?  It sure would be nice if they had given us little screen captures of what these styles look like so we don’t to try every one of them to find the one we like. Well… they didn’t. So I went and collected screen captures of each Style.

(Make sure you read or scroll to the end as see what the Preview Pane style does!)

   image

Several Lists and Libraries have special Styles

First a note, we are talking about the Standard View here. Calendar views for example do not have optional Styles. Standard Views for calendar lists do have styles. (All Events is a standard view).
Most lists, like Custom Lists and Announcements have these styles:
   image
Picture Libraries add Picture Library Details and Document Details and removes the two Boxed styles:
   image
Document, Wiki and most other libraries add Document Details and removes the two Boxed styles.
   image



Default

This is the default “All Items” view
   Default

Basic Table

Just adds some lines…
   Basic Table

Boxed, no labels

Kind of like mailing labels. This could be a problem if you have non-obvious fields.  For example, which of the dates below is the Create date?
   Boxed, no labels

Boxed

   Boxed

Document Details

This one is basically “Boxed” with the addition of file type icons and a properties button.
   image

 

Newsletter

This looks just like “Basic Table”. Exactly like “Basic Table” for my Announcements list.
   Newsletter

Newsletter, no lines

This looks just like “Default”, so maybe the default is “Newsletter, no lines”!
   Newsletter, no lines

Shaded

Anybody remember “green bar” paper?
   Shaded

Preview Pane

Now this one is kind of cool! The first screen before is when you first display the view. Down the left side of the view you will find the titles of the Announcements, on the right, a “form” to display the data. Click or mouse-over any one item and you will see that data. This is a great way to show a lot of data in a small amount of space.
   Preview Page - no item selected
   image
This is really cool when used with a Picture Library! Slide your mouse down across the left hand column of image names and see all of the details on the right. The only other thing I changed below was to add the Thumbnail field to the view.
  

image

For Developers...

Each view style has an ID number:


0
Basic Table
6
Picture Library Details
7
No name
8
No name
9
No name
12
Boxed, no labels
13
Boxed
14
Document Details
15
Newsletter
16
Newsletter, no lines
17
Shaded
18
Issues Boxed
19
Issues Boxed, no labels
20
Preview Pane



.

4/21/2010

SharePoint Q&A with the MVP Experts

 

Stop in to the MSDN Online chat rooms on April 27th and 28th and ask questions of SharePoint MVPs, or just hang around and listen in to see what you might learn…

April 27, 2010
4:00 - 5:00 P.M. Pacific Time  (7 PM for us in Cincinnati!)

April 28, 2010
9:00 - 10:00 A.M. Pacific Time (12 noon for us in Cincinnati!)

 

Go here for details: http://msdn.microsoft.com/en-us/chats/default.aspx

“Do you have tough technical questions regarding SharePoint for which you're seeking answers? Do you want to tap into the deep knowledge of the talented Microsoft Most Valuable Professionals? The SharePoint MVPs are the same people you see in the technical community as authors, speakers, user group leaders and answerers in the MSDN forums. By popular demand, we have brought these experts together as a collective group to answer your questions live. So please join us and bring on the questions! This chat will cover WSS, MOSS and the SharePoint 2010. Topics include setup and administration, design, development and general questions.”

Think you are good at scripting? Want to go to TechEd?

 

VBScript?  PowerShell?  Go see how good you are and maybe get to go to TechEd!

 

First go and read this: http://blogs.technet.com/heyscriptingguy/archive/2010/04/21/may-we-suggest-attend-tech-ed-north-american-2010-in-new-orleans.aspx

 

Then click the picture below and go and sign up for the 2010 Scripting Games!

 

2010 Scripting Games

3/12/2010

SharePoint: Hiding the Checked Out Icon from Anonymous Users

 

When document has been checked out, SharePoint will overlay a little icon to show the checked out status. When a user moves their mouse over the icon it will display a popup with the name of the user who has it checked out.

 

      image +   image   =     image

 

And when they mouse over they see:

    image

 

 

Anonymous users can see it too!

You may not want to display it to most users, but very likely not to read only and anonymous users. 

 

 

Hiding it:

There is no out of the box way to turn off this icon, so we need a trick to hide it.  You could use JavaScript or JQuery, but best bet is to use a tiny piece of Cascading Style Sheet (CSS) code.

The code to display the icon looks like this:

      <img src="/_layouts/images/checkoutoverlay.gif" class="ms-vb-icon-overlay" ...

The CSS looks like this:

     <STYLE>
        .ms-vb-icon-overlay { display:none }
     </STYLE>

The only problem with this is that it hides the icon from everyone. A better solution would be to hide it from selected users.

 

So what we do is:

  • Add a style to hide it from all users  (display:none)
  • Add a SPSecurityTrimmedControl to then show it for any user with appropriate permissions (the example below uses the “AddListItems” permission)

 

<style>
    .ms-vb-icon-overlay
    {
      display:none
    }
</style>
 
<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="AddListItems">
  <style>
    .ms-vb-icon-overlay
    {
      display:inline
    }
  </style>
</SharePoint:SPSecurityTrimmedControl>

 

  • If you want this for just a single page, put this CSS in a Content Editor Web Part on that page
  • If you want this for an entire site then add this to your master page somewhere after where SharePoint add its CSS links (SharePoint:CssLink and SharePoint:Theme tags)
<SharePoint:CssLink runat="server"/>
<SharePoint:Theme runat="server"/>
 
    <style>
       <!-- your CSS goes here -->
    </style>

 

 

What might go wrong? 

SharePoint might be using the ms-vb-icon-overlay style for something other than checkout status. I've not run across it yet, but ...

 

 

If you want to hide the icon from everyone on every site on the server?

As a "hack" you can find the icon on the server ("checkoutoverlay.gif") and
  - delete it  (seems to work fine - no red x's)
  - rename it (a better plan)
  - back it up and replace it with a 1x1 transparent GIF (best plan)

This would need to be done on each web front end server (and added to your disaster recovery plan ;-)  )

The file is here:
   _layouts/images/checkoutoverlay.gif

 

.

SharePoint: Strike Out Canceled Events in the Calendar

 

This article is for SharePoint 2007. For SharePoint 2010 you can use the following steps to customize the columns of the calendar, and then use JavaScript from the Color Calendar article.

 

Moving or deleting an event in a calendar is not always the best way to make sure people notice the change. Sometimes it’s better to “cancel” a meeting and then create a new meeting than just moving it in the calendar. The SharePoint calendar list does not have a built in way to do this. So… yet another JavaScript trick!

 

Here’s what we want to do:

image

 

By the way, the following is just a variation of an earlier article on how to color code a calendar. The “big change” is an IF statement to make the formatting conditional. By expanding the calculated column’s formula a bit you can have both color coded and canceled events.

 

The basic steps are:

  • Add a column to the calendar list to indicate that the event has been canceled 
  • Add a calculated column to create the HTML to display the formatted cancelation message. This can be done with HTML or CSS. This example just uses "<s>  text   </s>"
  • Add the new column to the calendar view
  • SharePoint will convert the "<" character into "&lt;" so we need to add a little JavaScript to convert it back. The easiest way to add the JavaScript is with a Content Editor Web Part

Detailed steps:

  • Create or open a calendar
  • Add a new column named "Canceled" (Settings, List Settings) – most likely type will be "Choice" with choices like "No” and “Yes" with a default of “No”
  • Add a new column named "CalendarText"
    1. Column Type is Calculated
    2. Equation is:
      =IF(Canceled="Yes", "<s>" & Title & "</s>", Title )
                   
    3. Data type returned = single line of text
  • If you want to also change the color, then add a FONT or SPAN tag:
    =IF(Canceled="Yes", "<font color=’gray’><s>" & Title & "</s></font>", Title )

  • Modify the existing view, or create a new view such as "Calendar with cancel"
    1. Change the field used for the “Month View Title” AND “Day View Title” AND “Week View Title” to "CalendarText"
                                image_thumb
    2. Save and exit (The HTML for "<s>" will now be displayed. The JavaScript below will be needed to fix the HTML tags)
  • Add a Content Editor web part
    1. Site Actions, Site Settings, Edit Page
    2. Add a Content Editor web part and move it below the calendar web part
    3. Click in the web part click Edit, Modify Shared Web Part
    4. Click Source Editor
  • Paste this JavaScript:

<script type="text/javascript" language="javascript"> 
var x = document.getElementsByTagName("TD") 
var i=0; 
for (i=0;i<x.length;i++) 
{ 
  if (x[i].className.substring(0,6)=="ms-cal") 
  { 
    x[i].innerHTML= x[i].innerHTML.replace(/&lt;/g,'<').replace(/&gt;/g,'>') 
  } 
} 
</script>  

  • Click Save, OK, Exit Edit Mode
  • Add a new calendar item and select a status – canceled events should now be crossed out. 

 

.

3/11/2010

SharePoint 2010: What’s New in Surveys

 

Note: the following is for the November 2009 Beta 2. In this release surveys do not have a ribbon in all screens and retain most of the look and feel of 2007.

 

What’s new?

Almost nothing! The exercise of comparing the two versions almost seems a waste of time due to the few changes, but I have had a number of questions from folks hoping for many new features in surveys. Remember this is the beta and the final release may still have changes.

 

No changes:

  • Settings, Title, description and navigation
  • Audience targeting settings
  • Delete this survey
  • Save as template
  • Manage permissions (new ribbon, but core features are unchanged)
  • RSS settings

New, but common to most SharePoint 2010 lists and libraries - while useful in other lists these often do not add value to surveys

  • Validation Settings
  • Rating Settings
  • Metadata navigation settings
  • Per-location view settings
  • Generate file plan report
  • Form settings

Changed, but common to most SharePoint lists and libraries:

  • Information management policy settings
  • Advanced - Some new wording, and the addition of two new but common items: “Offline Client Availability” and “Dialogs”.

Survey Questions:

  • All the old question types are still there
  • “Business Data” has been replaced with “External Data”
  • New! Managed Metadata

Survey Questions – details…

  • “Enforce unique values” – Interesting new option! This is really useful for lists where each item must have a unique value (I.e. each item is for one State and two items for the state is not allowed). This will have limited value for surveys.
  • “Column Validation”  (only available for Single line of text, Choice, Number, Currency, Date & Time) – used to validate the entered data against a rule (formula) – Example:  “[Amount] > 25” – the formula can reference the current field or any other field in the same item (row / survey response)
  • Currency now has more currency types…
  • Lookup
    • can now display multiple columns from the lookup list – BUT they are not displayed in the survey or the results (this is really a feature for columns in lists)
    • can enforce relational integrity (not of much value to a survey)
  • Yes/No is just as bad as before! (just a bare checkbox that defaults to Yes)
  • Person or Group now allows multiple selection (2007 only lets you select a single user)

 

.

3/07/2010

SharePoint 2010 Available May 12th?

 

 

This says so:

http://sharepoint.microsoft.com/businessproductivity/proof/pages/2010-launch-events.aspx#fbid=vUy2lbxfiO5

“Watch Stephen Elop, President of the Microsoft Business Division, announce the launch of Office 2010 and SharePoint 2010 on May 12, 2010 at 11 a.m. EST.”

 

and so does this:

http://blogs.technet.com/office2010/archive/2010/03/04/get-office-today-or-tomorrow.aspx

For businesses, we will launch the 2010 set of products, including Office 2010, SharePoint 2010, Visio 2010, and Project 2010 worldwide on May 12.”

 

Cool!

Are you ready?

 

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.