2/24/2011

SharePoint: Prevent the Closing of web parts

 

The following works in both SharePoint 2007 and 2010.

 

If you have worked with SharePoint for a while you probably have learned that in most cases Closing a web part is “bad” and Deleting a web part is “good”.  (Do a web search on “SharePoint web part close vs delete”.)

 

So how can you prevent the closing of a web part?

How about five ways…

 

1) Every time you add a web part go to the Advanced section of the properties panel and uncheckmark “Allow Close”  (too much work)

image

 

2) Add a little JavaScript to prevent the Close:

image

 

3) Add a little JavaScript to disable the Close Option

image

 

4) Add a little JavaScript to hide the Close Option (probably the best choice)

image

 

5) Add a CSS style to hide the Close option (easy to do, but it leaves a blank line)

image

 

 

I prefer #4!

 

 

The JavaScript to prevent the close and display a popup:

Add the following to your site’s master page just before the </BODY> tag (A SharePoint Designer task!) or in a Content Editor Web Part (last one on the page) if you just want this for a single page.

<script>
  // JavaScript to block the closing of web parts
  // TechTrainingNotes.blogspot.com

  var oldClose = MSOLayout_RemoveWebPart;
  MSOLayout_RemoveWebPart = function (x)
  {
    alert("Closing of web parts has been disabled");
  }
</script>

 

 

The JavaScript to Disable or Hide the Close option:

Add the following to your site’s master page just before the </BODY> tag (A SharePoint Designer task!) or in a Content Editor Web Part (last one on the page) if you just want this for a single page.

<script>
// hide or disable the web part Close option
// TechTrainingNotes.blogspot.com

_spBodyOnLoadFunctionNames.push('hideWebPartClose');

function hideWebPartClose()
{
  var x = document.getElementById("MSOMenu_Close")

  // uncomment the next line to just disable (gray out)
  // x.disabled=true

  // uncomment the next line to hide the close option
  x.hidden=true

}
</script>

 

The CSS to hide the Close option:

Add this to your master page, your linked style sheet file or to a Content Editor Web Part.

<style>
  #MSOMenu_Close
  {
    display:none
  }
</style>

 

.

2/23/2011

SharePoint Cincy 2011 presenter list has been posted

 

Register now!  There is limited space available at the METS Center.

image

 

Speakers

The speaker list is not complete yet. See here for the current list: http://www.sharepointcincy.com/presenter-information

KEYNOTE SESSIONS:

  • Microsoft Executive, Fred Studer, has P&L responsibility for a $6B portfolio of Information Worker (IW) products.  Come hear Fred discuss the strategic importance and future direction of SharePoint.

  • Kroger IT leader, Catherine Allshouse, will share how they use SharePoint to deliver as many as 2 million customer interactions/day on Kroger’s websites.

 

One SharePoint MCM, at least two SharePoint MVPs and at least one MCT!

And a lot of Microsoft Certified “fill in the blank”  (too long to list)

 

Sessions

The session list is not complete yet, but these are currently listed sessions:

 

(Up-to-date list here: http://www.sharepointcincy.com/session-information)

Breakout Session Tracks/Topics

Core topics/sessions are confirmed, remaining sessions will be added based on demand/input from Registrants.

TRACK 1: Driving Business Value With SharePoint

Subject:  Top 10 Ways to Leverage the Value of your SharePoint Investment
Presenter:   Steve Caravajal – Microsoft Corporation, Principal Architect

Subject:  SharePoint Governance
Presenter:   Mike Smith– MAX Technical Training, Senior Instructor and SharePoint MVP

Subject:  Key “Lessons Learned” from Successful SharePoint Projects
Presenter:   TBD


TRACK 2: SharePoint Development and Site Customization

Subject:  Does it Make Sense to Use SharePoint 2010 as an Application Development Platform?
Presenter:   Mario Fulan – ICC, SharePoint Practice Leader and SharePoint MCM

Subject:  How to Develop and Deploy SharePoint Applications and Solutions
Presenter:   Matthew Tallman – Sogeti USA, Manager Enterprise Collaboration Group

Subject:  Integrating Applications with the SharePoint Platform using Business Connectivity Services (BCS)
Presenter:   Jonathan Mast – SharePoint911, Senior SharePoint Developer


TRACK 3: SharePoint Implementation and Administration

Subject:  SharePoint Administration – Deep Dive
Presenter:   Shane Young – SharePoint911, Principal Consultant and SharePoint MVP

Subject:  SharePoint Disaster Recovery and High Availability
Presenter:   Sean McDonough – Idera, SharePoint Products Manager

Subject:  SharePoint Sizing and Capacity Planning
Presenter:   Shane Young – SharePoint911, Principal Consultant and SharePoint MVP


TRACK 4: Business Intelligence and Data Management

Subject:  Data Visualization and Business Intelligence Solutions Using SharePoint 2010
Presenter:   Raveen Rajavarma – Ascendum, SharePoint Practice Leader

Subject:  Case Study: SharePoint’s Role in P&G’s Business Intelligence Solutions
Presenter:   Pat Kern– Procter & Gamble, IT Director

Subject:  Implementing Dashboard Solutions using PerformancePoint Services and SQL Reporting Services in SharePoint 2010
Presenter:   TBD

 

 

.

SharePoint 2010: What does the web part checkbox do?

 

Here’s a question for everyone… What does the checkbox in the web part title bar do?

image

 

In user interface design, checkboxes generally imply the ability to select more than one item at a time, but you can only check one web part at a time:

image

 

Clicking the checkbox while the page is in Edit mode does reveal the web part ribbon tab, but then so does clicking in the title bar of the web part:

image

 

The checkbox might be the hint that that web part is selected, but so does the border that’s added when you click on the title bar.

image

 

Clicking an item in a list web part checkmarks the item, highlights the time, checkmarks the web part and adds a border around the web part!

image

 

 

So… Why the check box?

  • Like an appendix, every web part just has one?
     
  • It’s was part of a planed multi-select feature that was not completed by release time?
     
  • It’s a secret?
     
  • Someone on the SharePoint team thought that it was just cool?
     

If you know… please post a comment below!

 

.

2/20/2011

SharePoint 2010: Color Coded Calendars (updated!)

 

As I’m working on my customization book I am revisiting every one of my past “quick tips”. As I do so I am often finding a better way to do something. I ran into some issues working around the asynchronous loading of calendar events with the article below. After digging more into the code behind the calendar pages in 2010 I have found a much better way to trigger the color coding code, which fixed a few other issues along the way. 

 

The original article, with the updates is here: http://techtrainingnotes.blogspot.com/2010/06/sharepoint-2010-color-coded-calendars.html

 

(An article may be written and published, but seems it is never finished!)

.

2/10/2011

InfoPath 2010: "The following url is not valid"

 

There are bugs, and then there are DUMB bugs!

 

When you try to publish an InfoPath 2010 form to SharePoint, InfoPath may display this error: “The following url is not valid”, even if the URL is valid. The cause?  This Microsoft article says its because InfoPath ignores your URL and instead checks to see if there is a root level site collection. In other words, if you entered http://yourserver/sites/site1, InfoPath checks to see if http://yourserver is a valid site collection. There’s no “rule” that says you must have a root level site collection in SharePoint.

The fix, according to Microsoft… create a root site collection! 

 

DUMB!

 

Did it work? Yes, and the odd thing is I created a site collection without granting the users access permissions and InfoPath was now happy in spite of permissions.

 

For more info see: http://support.microsoft.com/kb/981854

 

 

And while talking about DUMB bugs…

How about this one… try to publish from InfoPath to a server that requires authentication… you get a popup for the username and password with a popup about “Getting site content types”.  You can’t authenticate without cancelling the “getting” of content types. You can’t get content types without authenticating.

DUMB!

Actually this is dumb, but unlikely. In this example the user was in the Member group, but was not a site owner. The first time the wizard asked for credentials it was to confirm that the site existed. The second time was because the user did not have rights to publish. Still… it’s a dumb bug.

 

image

 

.

2/05/2011

SharePoint 2010 Updated IT Pro CHM Help Files Available

 

The Microsoft SharePoint IT Pro documentation team has release a fresh copy of the SharePoint TechNet content as .CHM help files.

 

SharePoint Server: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=3629425d-1505-456e-89e2-ede95f75ffe5&displaylang=en

 

SharePoint Foundation: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c8cf1631-0f48-4a02-a18d-54b04eb7f0a7&displaylang=en

 

Links to CHM files for FAST, Office, Project Server and others: http://blogs.technet.com/b/tothesharepoint/archive/2011/02/04/new-downloads-it-pro-compiled-html-help-files-for-sharepoint-and-related-products.aspx

 

.

KSCEHYK4QFDX

SharePoint Cincy – Major SharePoint Event Coming to Cincinnati!

 

About time!

We now have our own local event!

 

Northern Kentucky University’s Center for Applied Informatics and MAX Technical Training are bringing a major SharePoint event to the Cincinnati area! SharePoint Cincy will be held at the METS Center located in Erlanger, KY. The METS center is near the Cincinnati airport (CVG) and has lots of free parking.

 

See the site for the agenda, speakers and registration: http://www.sharepointcincy.com

 

image

 

Are you, or do you know a SharePoint “guru”?

Are you a SharePoint guru who would like to speak at SharePoint Cincy?  Click here and summit a proposal. Do you have a recommendation for a speaker or a topic?  Then click here and tell us about it!

 

image

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.