12/29/2011

SharePoint Exams 70-667 and 70-667 Being Updated for Office 365

 

If you have been preparing for the SharePoint administrator exams, you are about to get a surprise! The exam’s web page has this little tidbit…

70-667 and 70-668 will be updated for SharePoint 2010 SP1 and Office 365 in January, 2012.
http://www.microsoft.com/learning/en/us/exam.aspx?id=70-667

They don’t list a date, so assuming January 1st…take the exam tomorrow or Saturday, or start brushing up on Office 365 and SharePoint Online.

As the web page does not have an updated “Overview” or “Sills Measured”, you may have some extra time. It would not be fair to update the exam on the 1st and not tell us what’s in it.

Post a reply if you have any news on dates…

 

.

12/24/2011

SharePoint: Displaying PDFs from a Dropdown Menu

Browsing the MSDN SharePoint forums can really bring up some interesting ideas. Recently there was a question about how to display collections of PDF files in a web page. The question included a link to an article on embedding PDFs in SharePoint 2007 by Sharon Richardson. Sharon’s approach used an <embed> tag.

The <embed> tag’s SRC attribute is not updateable by JavaScript and I did not want a hard coded PDF file. I got to playing around with this and worked up a solution that uses an <IFRAME> and borrows some JavaScript from an article I wrote a while back. The JavaScript was used to convert a Links List into an HTML dropdown list (<SELECT>). Here I will use it to convert a library into a dropdown list and a PDF viewer.

Note: Displaying PDFs in SharePoint requires two things:

  • Your users must have a PDF viewer installed that can display PDFs in a browser
  • For SharePoint 2010 your server administrator much change “Browser File Handling” from Strict to Permissive for your web application (see here and here)

Another Note: :-)   This can also display pictures from a library! Just change step 4 below to include the proper file extensions.

 

2010? 2007?

This example was tested in SharePoint 2010, but should work just fine in 2007.

 

The result should look something like this:

   image

 

Steps:

  1. Add a web part part for the document library that contains the PDFs
     
  2. Edit the web part and in the properties panel click “Edit the current view”
     
  3. In the view page select just one column:  Name (linked to document)
  4. Configure the Filter section to select your files (my example just looks for “.PDF”)
     image
     
  5. Save the view
     
  6. Open Notepad and paste the JavaScript from below
     
  7. For initial testing you may want to comment out the line that starts with “x[i].parentNode.” (just add two slashes:  “// x[i].parentNode.”) – this line hides the library web part
     
  8. Edit the “var LibrarySummaryName = ” line to add your web part’s summary name
    To find the Summary name:
    1. Display the page with the web part
    2. Use the browser’s view source option to display the page’s HTML
    3. Search for “source=” and find the title of your web part (Note be sure to include all of the text including any spaces or periods that might be at the end)
       
  9. Edit the height and width attributes of the IFRAME tag to suit your needs (In pixels or percent)
     
  10. Save the file as “PDFdrowdown.html” or similar
     
  11. Upload the Notepad file to a library (Site Pages, Site Assets, or any library you have for miscellaneous site files)
    Note: You can now click the dropdown on this document and edit the file in SharePoint Designer
     
  12. Go to the library with the script file, right-click the filename and click “Copy Shortcut” (you will paste this into the Content Editor Web Part)
     
  13. Add a Content Editor Web Part and move it below the PDF library web part (important!)
     
  14. Edit this web part an paste the URL just copied into the Content Link box
     
  15. You should now be able to test the dropdown and display PDF files in the IFRAME area
     
  16. Final steps are:
    1. if you added them, remove the comment slashed added to the “x[i].parentNode.” line
    2. Edit the Content Editor Web Part and change the “Chrome” to none to hide the web part’s title

 

Hide the Toolbar and the Scrollbars!

To hide the scroll bars, just append options to the end of the URL like this:

Before:

    PDFcontrol1.src=url;

After:

    PDFcontrol1.src=url + "#toolbar=0&navpanes=0&scrollbar=0";

Page 8 of this file has other examples of what you can do with URL parameters for PDF files: http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf#page=8

The results should now look like this:

image

 

 

The JavaScript

<!-- the dropdown list for the libray items -->
<br/>
Select a PDF to view:
<select name="PDFSelect" id="PDFSelect"
  onchange="javascript:LoadPDFtoIFRAME(PDFSelect.options[PDFSelect.selectedIndex].value)">
  <option>Jump to ...</option>
</select>
<br/><br/>

<iframe id="PDFiframe" src=""  height="600" width="400"></iframe>


<script>
// CEWP trick from techtrainingnotes.blogspot.com! 
// techtrainingnotes.blogspot.com/2011/12/sharepoint-displaying-pdfs-from.html

var LibrarySummaryName = "Shared Documents Share a document with the team by adding it to this document library."

function LoadPDFtoIFRAME(url)
{
    var PDFcontrol1 = document.getElementById("PDFiframe");
    PDFcontrol1.src=url
    
    // to hide the toolbar and the scroll bars change the above line to:
    // PDFcontrol1.src=url + "#toolbar=0&navpanes=0&scrollbar=0";
}


//code to hide the links list and populate the select list

//Find the library and hide it
var x = document.getElementsByTagName("TABLE") // find all of the Tables 
var Library;
var i=0;
for ( i=0; i<x.length; i++ ) 
{
  if (x[i].summary == LibrarySummaryName)
  {
    //
    Library = x[i];

    //hide the links list web part (tables in tables in tables ...)
    // Note: while testing, you may want to comment out the next line
    x[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.display="none";
    break;
   } 
}

if (Library)
{
  //Copy all of the links from the link list to the select list
  var ToList = document.getElementById("PDFSelect");

  var links = Library.getElementsByTagName("A"); // find all of the links
  for ( i=0; i<links.length; i++ ) 
  {
    if (links[i].onfocus)
    {
      if (links[i].onfocus.toString().indexOf("OnLink(this)") > -1)
        { ToList.options[ToList.length]             = new Option(links[i].innerHTML, links[i].href); }
    }
  }
}
else
{
  alert("Library web part named '" + LibrarySummaryName + "' not found")
}
</script>

 

.

 

 

 

.

12/19/2011

December 2011 CU for SharePoint 2007 and 2010 has been released

 

December 2011 CU for SharePoint 2010 has been released

Go here and see the links to the details for what’s included:

http://blogs.technet.com/b/stefan_gossner/archive/2011/12/14/december-2011-cu-for-sharepoint-2010-has-been-released.aspx

 

December 2011 CU for SharePoint 2007 has been released

http://blogs.technet.com/b/stefan_gossner/archive/2011/12/17/december-2011-cu-for-sharepoint-2007-has-been-released.aspx

 

Steve Caravajal says there’s good news for Apple iPad users wanting access to SharePoint BI content:

http://blogs.msdn.com/b/scaravajal/archive/2011/12/19/sharepoint-bi-on-the-ipad.aspx

Follow the link on Steve’s page to the TechNet article with all of the details!

 

And just in case you missed the SharePoint Online November 2011 Update announcement:

http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=1002

 

.

12/18/2011

SharePoint: Change the color of a web part column

 

Over in my article on color coding lists I got this question:

“Can you post a snippet of code that shows how to apply color to a particular column - the entire column (i.e., column 7)”

Well, here’s two possible solutions. And you can change anything about the column by changing the CSS. Set the text to bold, change the font family or font size, or add borders.

 

Change the color of a web part column using CSS

This is the more elegant solution, but it will not work with Internet Explorer 6, so it will not work for SharePoint 2007, or where you still have IE 6 users.

Note: the line starting with “table[“ and ending with “td + td + td” is all one line.

<style>

table[summary="Shared Documents Share a document with the team by adding it to this
document library."].ms-listviewtable tr + tr td:first-child + td + td + td { background:orange; } </style>

Steps:

  1. Add this style to a Content Editor Web Part
    or edit the page in SharePoint Designer and add it just before the end of the PlaceHoldMain area.
     
  2. Edit the text in “summary=” section to add the name of your list web part. To find the name, display the page with the web part in a browser and search for “summary=” and copy the text between the quotes.
     
  3. Edit the “td + td + td” to select your column (one td per column)
    If you want to color more than one column, copy the entire selector and adjust the number of td’s. Something like this:  (note the comma)

    table[summary="Shared Documents Share a document with the team by adding it to this document library."].ms-listviewtable tr + tr td:first-child + td + td + td ,
    table[summary="Shared Documents Share a document with the team by adding it to this document library."].ms-listviewtable tr + tr td:first-child + td + td + td + td + td  
    {
       background:orange;
    }

Change the color of a web part column using JavaScript

This solution should work for all browser versions (crossing fingers…), but you will need to test it in the browsers used by your visitors. This probably could be reduced to one line using jQuery.

Note: the line starting with “var webpartName”“ and ending with “library.” is all one line.

<script>

// from TechTrainingNotes.blogspot.com

// The web part name can be found by viewing the source of the page and
// searching for "summary="
var webpartName = "Shared Documents Share a document with the team by adding it 
to this document library."
; // first column is 0 // in SP 2010 the first column may be check boxes var columnToChange = 5; // find the web part's table var allTables = document.getElementsByTagName("TABLE"); for (var i=1;i<allTables.length;i++) { if (allTables[i].summary == webpartName) { // loop through the rows to change the column // set j=0 to include the column heading or j=1 to skip the heading var theTable = allTables[i]; for (var j=0; j<theTable.rows.length; j++) { // any style attribute of the cell can now be changed theTable.rows[j].cells[columnToChange].style.background="yellow"; } } } </script>

Steps:

  1. Add this JavaScript to a Content Editor Web Part and move the web part below the web part to add the color to
       or
    edit the page in SharePoint Designer and add the JavaScript just before the end of the PlaceHolderMain area.
     
  2. Edit the text in “webpartName =” section to add the name of your list web part. Display the page with the web part in a browser and search for “summary=” and copy the text between the quotes.
     
  3. Edit the column number to change (var columnToChange = 5; ). The first column is column 0.

    If you want to change multiple columns it might be easier to hard code the column numbers. For example, to change columns 2, 5 and 8: (remember to count from zero)

    Change:
      theTable.rows[j].cells[columnToChange].style.background="yellow";
    To:
      theTable.rows[j].cells[2].style.background="yellow";
      theTable.rows[j].cells[5].style.background="yellow";
      theTable.rows[j].cells[8].style.background="yellow";  
     
  4. To change the color of the column heading, change the FOR counter to zero:
         for (var i=0;i<allTables.length;i++)

 

 

.

12/17/2011

Review: Amazon Fire

So what does this have to do with SharePoint, .NET or other technologies I cover in this blog? Three things I guess… I read SharePoint books using an older Kindle, I wrote a book that cannot be ported to the old Kindle (at least not without starting over), and I’m starting to play with portable devices to access SharePoint sites. (If you are in a hurry, scroll down to the SharePoint section or to the final comments…)

 

I bought a Fire!

When I published my first book a number of people asked me why I didn’t have it available as a Kindle edition. The first reason was that I could not find a good way to get a book with hundreds of screen captures, blocks of code and tables into the Kindle format. Amazon offers a service to convert books to Kindle format, but when I sent them my book for a quote, they said they could not do it! I then checked the reviews of other technology books and saw that many of these books available for the Kindle actually got a lot of low ratings because of the issues with Kindle version of the book.

So along comes the Fire… I bought an Amazon Fire to see how it would do with more complex formats, and I’m actually pleased with how it deals with PDFs. The use of finger gestures to zoom in and zoom out make browsing a larger than the screen document pretty easy to do. So my first impression was good!

Then I started using it… and found some issues.

Opening the box…

Inside is a Fire, a charger brick and a little piece of paper that shows you how to turn it on. That’s all there is.  After you turn it on you will find that there is a help document on the “bookshelf”.  You will also need Google or Bing!

Is the Fire a good book reader?

For me, no.

Buttons: The old Kindle had buttons on the side to go between pages. You could hold the device in one hand, read, and click to see the next page. The Fire has no buttons, except for the power button. You have to swipe your finger across the screen. So you will need two hands to read a book and getting finger prints on the screen is unavoidable.

The screen: On the plus side, while the Fire is the same size as the old Kindle, the Fire has no keyboard, so more of the surface is used as the screen. On the negative side is the shinny new screen. The old Kindle has a matte screen that simply had no glare. It looked like paper. The Fire has a high gloss screen that always has reflections of something on it. You are always moving it around trying to move the glare off of the part of the screen that you are trying to read.

The user interface: The old Kindle is a pain to navigate. It took a while to learn which button did what and how to get around the menus. The Fire’s user interface is all touch. Drag this, tap that, guess what to do next. The primary interface for content is a “bookshelf” where you drag your finger to scroll across the books, and then… still not sure… do something to open the item. it seems that I always drag too far. I drag as slow as I can, stop when my item is fully displayed, lift my finger, and… it scrolls to the next item! It’s a game just to select one book. Just for fun I hand the Fire to people and ask them to open a certain book… and they can’t to it the first time!

I have problems (and maybe just me) with most of the user interface. I’m always selecting the wrong item, not able to scroll when I want, and constantly chasing the screen as it often randomly moves from where I just tapped or zoomed. I even have problems with basic “clicks”. I often have to tap a button, even the Fire’s basic back button, two or three times to get it to work.

Is the Fire a good video player?

This is where the new screen really shines, if you can get past the shine/glare problem. The color and brightness are great. Movies really look good! It even has stereo! It has stereo, but both speakers are on the same end of the device.The video is always displayed horizontally, so depending on how you were holding the device when you started the video, both speakers are on the left or both are on the right! Who would have ever thought that was a good idea! Headphones are mandatory if you plan to watch movies.

Movies from Amazon Prime play non-stop with no problems. The user interface for selecting a movie is not well thought out. After scrolling though a bunch of movies, clicking on an interesting one and then going back to browse some more, they take you back to the top of the list. There’s not even a visible scrollbar so you guess how far down the list you were the last time. The movies are frequently randomly are repeated in the list. (to make it look like there are a lot of movies available?) Also, like the bookshelf navigation, I have a hard time getting it to scroll to just where I want without overshooting.

I downloaded the NetFlix app to continue watching a movie I had started on my PC. The user interface is much better than the one from Prime, in fact, very much like the web based version. The only problem… the Fire constantly drops the wireless connection while watching a NetFlix video. It never drops the wireless (or at least it quietly buffers and reconnects) when watching Amazon movies. Hmmm…

(If you plan to watch movies from Amazon, then the cost of the Fire is $200 plus $79 a year for Prime.)

Is the Fire a good web browser?

The Fire’s web browser is not IE, FireFox or anything else you have ever heard of. It’s an Amazon exclusive called “Silk”. See here for more info: http://amazonsilk.wordpress.com/2011/09/28/introducing-amazon-silk/

Well, let’s start with the wireless features. The Fire is very slow to connect to wireless when first turned on. It often drops the connection and often when a web page times out, I find that the connection has dropped. In parts of my house where laptops and cell phones have no problem with wireless, the Fire will not connect. (weak receiver?)

You will always have problems with some web sites when trying to navigate and scroll with any touch device. With a device like the Fire you will often have to zoom in and zoom out, but with the Fire when I zoom the browser zooms and then moves off to some other part of the page. I’m always zooming and then dragging back to where I started.

Other things:

  • No support for Silverlight, but Flash is built in
  • DHTML popups won’t always go away (JavaScript bugs?)
  • Basic navigation is inconsistent – I often have to click the back button two or three times (maybe it does not like me)
  • Pages with nested DIVs will not scroll properly when the device is held horizontally (but strangely work just fine when held vertically)
  • Downloads go to a Notification list and once an item has been opened once, it disappears from the list. Finding these files is fun… download an app named File Manager and then click on everything until you stumble across /sdcard/download.

Other notes… you may want to do a search on Amazon Silk and privacy as there seems to be some concern about the server side processing of your web requests.

 

Is the Fire good for SharePoint?

Basic browsing: The Amazon Silk browser does a good job on rendering a SharePoint site, as long as the device is held to display the page in a vertical format. When in the horizontal format you cannot scroll down a page!

As pointed out above, I have problems selecting items in the Fire, and this carries into Silk. Trying to select a document’s dropdown list in a library is a real test of patience.

ActiveX Controls and Office Integration: There is no Office on the Fire so none of the Office integration, presence detection, or features like Windows Explorer View (duh) and upload multiple are available.

Silverlight: Silk does not support Silverlight. Attempts to visit a page with a Silverlight control displays the Silverlight download button, which takes you to a blank page. (A file was downloaded, but can’t be opened – also, the file is hidden in a folder that cannot be accessed without downloading a File Manger app.) SharePoint’s pages that use Silverlight will fallback to a non-Silverlight page, but the lack of Silverlight support may be a problem for your pages that depend on custom Silverlight controls.

Microsoft Office Documents: The Fire does not include Word, Excel or PowerPoint. There is an Office compatible view only tool named QuickOffice installed. A full verion of QuickOffice can be purchased and you can buy other Office file viewers from the Amazon Android app store. You cannot open the files directly from SharePoint, but you can download them to the Fire and then open them. After accepting a 10 page license agreement  :-)  from QuickOffice the documents displayed fine, although the fonts, images and word wrap were strange in the PowerPoint files that I downloaded.

Office Web Apps:

Excel: If you open an Excel file with View in Browser or Edit in Browser you will only have access to the content that fits on the screen. There are no scrollbars and you cannot scroll using finger drags. Working with any kind of a popup such as the color picker or the number format is “iffy” at best. If you zoom in to carefully click a ribbon button and that button opens a popup off of the screen, you cannot scroll over to the popup area without the popup closing. (the drag is interpreted as a click)  Bottom line, if the Excel file is small enough to fit the screen and you can do most of your work zoomed all the way out, then you will have some success.

Word: Word documents take a long time to load. A document that loads in less than a second in Internet Explorer takes at least minute, and sometimes just displays a blank area where the document should be. And sometimes it just displays “Script Not Responding” and a button to “Restart Browser”. Clicking this restart button closes all of your browser tabs!

PowerPoint: I could not get PowerPoint to work consistently. It often just displays the “download Silverlight for a better experience” message and then eventually displays the “Script Not Responding” message. When it does work, it is quite slow. It also cannot be scrolled if displayed horizontally.

When I clicked the “Start Slideshow” button and waited, waited, waited and waited, it finally displayed the slides and did a decent job of rendering the animations… except… when displayed vertically the slide was clipped off on the right and when displayed horizontally it was clipped off on the bottom.

 

Is the Fire a good Android?

You will need to ask someone else as I don’t own another Android device and don’t tend to download “apps” and games. My son downloaded Angry Birds and had fun with that. The only app I downloaded was NetFlix. When using NetFlix the Fire constantly drops the wireless connection making watching NetFlix too painful.

 

Nitpicks

  • Wireless: I wish I could mark the neighbors’ wireless networks as hidden to reduce the clutter. There is a Save and Forget button, but they don’t seem to do anything.
  • Wireless: The Fire is slow to connect to even when reconnecting to the last wireless used
  • No camera
  • No microphone
  • Speakers are of minimal value
  • Heavier than the old Kindle
  • Fingerprints… cannot be avoided…

  

In Summary…

Is the Fire a good book reader?   Not for me.

Is the Fire a good web browser?  Not for the sites I visit.

Is the Fire good for movies?  Yes, if the glare is not a problem and you only use Amazon Prime as your source of movies.

Is the Fire good for SharePoint sites? No.

What’s the Fire best for?   Buying books and apps from Amazon.   :-)

Should you give a Fire to someone who is not already Android savvy?   Questionable… 

What am I going to do with it?  Give it to someone else as a Christmas present! And maybe borrow it back when I’m ready to test publish my next book.

 

Future…

Do a web search on “Amazon Fire Complaints” and “Amazon Fire Update”. There may be some fixes for the problems I described in the near future.

 

.

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.