Updated the following article to include SharePoint, 2007, 2010, 2013, 2016 and SharePoint Online.
http://techtrainingnotes.blogspot.com/2011/06/sharepoint-how-to-change-default-home.html
SharePoint, PowerShell, .Net and other stuff I spend too much time on...
Updated the following article to include SharePoint, 2007, 2010, 2013, 2016 and SharePoint Online.
http://techtrainingnotes.blogspot.com/2011/06/sharepoint-how-to-change-default-home.html
This article applies to SharePoint Online, SharePoint 2013 and 2016.
Let's start with a couple "did you knows"…
As part of your SharePoint governance or best practices you may want to limit who can use some of the more advanced customization features of SharePoint 2013 and 2016. JS Link, is after all, JavaScript programming and it can cause issues for daily support and the upgrade to future versions of SharePoint.
Before we get into locking down just JS Link, let's address the "did you knows". You may want to think about changing the permissions of Site Pages, Site Assets and a few other libraries to read only for all users except for Site Owners. Those libraries really should not be open for all to edit.
JS Link is a really cool technology introduced with SharePoint 2013 to let us customize web parts, views and list forms without "un-ghosting" pages using SharePoint Designer. It lets us create a JavaScript text file, store it in a library, and then link it to a web part or a form. If you are a developer, you can also use JS Link with Site Columns and Site Content Types. One of the benefits of JS Link is that the customization file can be created once, stored in a library and then be linked into many web parts and forms. When you need a change in the future, you only need to edit a single JavaScript file and not dozens or hundreds of web parts.
For web parts, JS Link is added in the Miscellaneous section of the web part properties panel.
As SharePoint does not have a "switch" where we can just turn off the use of JS Link, we will need to come up with a CSS or JavaScript solution. If you add the following CSS to your master page (lots of ways to do this) then the JS Link box will be hidden.
<style type="text/css"> input[id$="_JSLink_EDITOR"] { display:none; } label[for$="_JSLink_EDITOR"] { display:none; } </style>
While we are at it, you may also want to hide the XSL Link option too:
<style type="text/css"> input[id$="_JSLink_EDITOR"] { display:none; } label[for$="_JSLink_EDITOR"] { display:none; } input[id$="_XslLink_EDITOR"] { display:none; } label[for$="_XslLink_EDITOR"] { display:none; } </style>
If you want some users to still be able to edit the JS Link and XSL Link options then we can give those back using a SharePoint Security Trimmed Control. You just need to pick a permission that is unique that that group of users such as Add and Customize Pages. In the example below we take away JS Link from all users, and then give it back to select users.
<style type="text/css"> input[id$="_JSLink_EDITOR"] { display:none; } label[for$="_JSLink_EDITOR"] { display:none; } input[id$="_XslLink_EDITOR"] { display:none; } label[for$="_XslLink_EDITOR"] { display:none; } </style>
<Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="AddAndCustomizePages"> <!-- Let owners and designers see the JSLink options --> <style type="text/css"> input[id$="_JSLink_EDITOR"] { display:inline; } label[for$="_JSLink_EDITOR"] { display:inline; } input[id$="_XslLink_EDITOR"] { display:inline; } label[for$="_XslLink_EDITOR"] { display:inline; } </style> </SharePoint:SPSecurityTrimmedControl>
.
As you are probably aware by now… SharePoint Online is a member of the "change of the day" club. My Tree View is missing in my online sites!
In my on-premises SharePoint 2013 I can go to Settings, Site Settings and there turn on/off the Tree View navigation control.
On-line? No Tree View for me… Oh, there it is…. Navigation Elements.
What's a "Navigation Element" anyway? If I had to rename it, I would have called it "Quick View or Tree View".
This is great fun for people like me who write courseware for SharePoint.
Another day… another change…………………………………
.
You just created a new subsite. You broke inheritance. You removed all of the inherited permissions. You gave only three people access.
Can anyone else see this site?
Yup…
When a new Site Collection is created the server administrator can assign people to two roles named Primary Owner and Secondary Owner. These two users can see and change everything in site collection, unless some permission has been denied by Web Application level user policies.
These two Site Collection Administrators can add as many other people to the list of Site Collection Administrators as they like. Only the Primary and Secondary will receive site alert emails, all of these admins have Full Control over everything in the Site Collection. For more interesting things about these extra admins, see: http://techtrainingnotes.blogspot.com/2012/12/fun-and-games-with-site-collection.html.
Server administrators can define Web Application level policies and broadly give or remove permissions. These policies overrule anything done at the Site Collection or subsite levels. Here's a few examples:
In SharePoint 2013 Online, users given the "Edit" permission level can share the site or anything in any list or library in the site where they have that permission level. All they have to do is click one of the many "Share" buttons or links. This one should really scare you! All they have to do is click the Share at the top of the page, and they have shared the entire site without site owner approval. If they click Share on a document or list item, then they have broken inheritance on that item, and then shared it! The same user in SharePoint on-premises is only creating an "access request". See how to hide the share buttons here: http://techtrainingnotes.blogspot.com/2015/08/hiding-evil-sharepoint-2013-share.html
A bit odd, while the user with the "Edit" permission can "share" a full site or a single list item, then cannot share a list or library. If they guess the URL to "Permissions for this document library" they get "access denied".
SharePoint Online/Office 365 vs. On Premises:
On Premises | Online | |
Member clicks the site level Share button | Creates an "access request" – site owner needs to approve | Adds new user to the Members group with usually has the Edit permission level |
Member clicks the list or library item Share button | Creates an "access request" – site owner needs to approve. If approved, breaks inheritance and adds permissions for the new user. | Breaks inheritance and adds permissions for the new user. |
Member guesses the URL to the People and Groups page… | Can only see the list of users in the groups. | Can remove users from groups! |
So… Consider editing the "Edit" permission level and removing the "Manage Lists" permission!
.
My public Office 365 subscription shares resources with many other subscriptions. Somebody must be uploading a lot of stuff today!
And I was not even uploading anything! Just navigating around the tenant administration pages. Hopefully in a few minutes the SharePoint Online automation will move me, or someone else, to another server…
In the mean time, refreshing the page usually works, and sometimes I just have to wait a few minutes.I am a tenant after all. I don't own the building.
.
.
This article has three possible titles:
The problem: You have a user who has Full Control, but who is not a member of the Site Owners group.
Shouldn't they be able to do anything a member of the Owners group can do? Turns out they cannot see the "Access Requests" link in Site Permissions page.
Members of the Site Owners group see:
While the Full Control only user sees:
(Just typing "Full Control only user" is weird! "Only" has Full Control?)
Two groups of people:
Notice that "users with Full Control" is not in that list, and that the word "associated" is in there.
You can create many "owners" groups and give them all Full Control and they still won't be able to see the Access Requests link. The magic owners group must be "associated" to a special property. The SharePoint web site (the SPWeb object) has three properties that identify the three default special groups: AssociatedMemberGroup, AssociatedOwnerGroup and AssociatedVisitorGroup. The group associated with the AssociatedOwnerGroup gets the "magic sauce" to let its users see the Access Requests link!
SharePoint 2007 had a nice option in the People and Groups page to set the associated groups:
To set the associated groups in SharePoint 2010, 2013 and Office 365 you will have to visit the page that's normally displayed when you create a new subsite with unique permissions; http://yourserver/sites/yoursite/_layouts/permsetup.aspx. This page has the title of "Set Up Groups for this Site". Here you can select from existing groups or create new groups and associate them to the three "magic groups".
An interesting side effect of the above page it when you add an owners group that does not have Full Control this page gives the group Full Control.
$web = Get-SPWeb "http://buckeyespug.maxsp2013.com"; $groups = $web.SiteGroups; $group = $groups.GetByName("The New Owners Group"); $web.AssociatedOwnerGroup = $group; $web.Update();
SPSite site = new SPSite("http://buckeyespug.maxsp2013.com"); SPWeb web = site.RootWeb; SPGroupCollection groups = web.SiteGroups; SPGroup group = groups.GetByName("The New Owners Group"); web.AssociatedOwnerGroup = group; web.Update();
Visit the http://yourserver/sites/yoursite/_layouts/permsetup.aspx page!
According to this article you can also directly grant permissions to the Access Requests lists. (The list won't exist until you have your first access request created.)
http://rwcchen.blogspot.com/2013/10/sharepoint-2013-update-access-requests.html
If you want to create the three default groups automatically call the SPWeb.CreateDefaultAssociatedGroups method, or if you are not a developer just visit the http://yourserver/sites/yoursite/_layouts/permsetup.aspx page.
.
More changes in Office 365 / SharePoint Online…
In SharePoint 2007 the menu for user options was called the Welcome menu and displayed the word "Welcome" follow by the user's name. In SharePoint 2010 word "Welcome" disappeared and only the user's name was displayed. (The help desk would ask the user to "click on your name".) SharePoint 2013 was the same as 2010, until recently. Now there is a picture of the user, or just a generic icon. ("Will the help desk now have to say "click your face"?)
To make room for the "face" they had to double the height of the Suite Bar. Hope this did not mess up your branding…
Also note the addition of Tasks. This does not take you to your SharePoint task list, it takes you to Outlook. While you are here, note the behavior of the Suite Bar when then browser is resized. Menu items disappear and are now available from the "…" menu:
SharePoint Online will not support the Tags and Notes social tagging features after November 1st. Recommended replacement??? Yammer! (I have no idea how to tag a document in a SharePoint library from within Yammer…)
You can download your existing tags and notes into a CSV file, but I have no idea what you can do with them!
The following is from this support article: https://support.office.com/Article/77851bd5-6d5e-42fe-9bf6-d7c17eeb771f
Item | Description of change |
Tags & Notes button on ribbon | Still visible but disabled. |
Note Board and Tag Cloud web parts in the web part gallery | Still visible and enabled. The web parts will show up as blank when added to a page. |
Note Board and Tag Cloud web parts embedded in a page | Page will display a blank space in the area previously occupied by the web parts. Edit the page to remove the web parts. |
Social tags | Social tags will no longer appear in the tags refiner. The refiner will still display hashtags. |
Tags and notes listed on personal sites | The area that previously listed tags and notes will be blank. |
Many users never found Office on Demand. It is a link on the user's OneDrive site that does a just in time install of an Office product and runs it as an ActiveX control. This was a handy way of using Office 2013 on a PC with an older version of Office without impacting the old install. Office on Demand can no longer be demanded ( ) after November 1st.
More info and options here: http://community.office365.com/en-us/f/172/t/259931.aspx
Ready, Shoot, Aim!
.
I'll be speaking at the Cincinnati User Group this Thursday, 10/24/13. See you there!
The Cincinnati SharePoint User Group will now be meeting on the 4th Thursday of each month. The next meeting is 10/24/2013. Same location and same time, just a different day!
Speaker: Mike Smith
MVP SharePoint, Senior instructor at MAX Technical Training, Computer professional (computer nut) since 1980, Courseware author, Book author (SharePoint 2007 & 2010 Customization for the Site Owner), Speaker at SharePoint events, toy airplane pilot..
Topic: Using PowerShell, and a web service call or two, to Administer SharePoint Office 365
In this presentation we will combine the recently released SharePoint Online Management Shell PowerShell module, the Microsoft Online Services PowerShell module and a few PowerShell web services calls to management SharePoint Online. By the end of the session we will have a complete script to create a SharePoint classroom or team collaboration environment in the cloud!
We will use the Microsoft Online Services to add users, passwords and manage licenses.
We will use the SharePoint Online Management Shell to create Site Collections, add users and add groups.
We will use web services to create subsites, lists and libraries.
And of course... there will be food, door prizes and networking!
There are many good reasons to use Content Types… if you can get people to use them, and then leave them alone. :-)
When creating a new list item based on a Content Type the user needs to select the Content Type from the New dropdown. Once selected, the Content Type should generally not be changed. Changing it is too easy as the user is offered the choice every time they edit the item.
Preventing this is pretty easy as all we need to do is hide the first row of the edit form's HTML table. The following JavaScript will do this for us and will work in both SharePoint 2007, SharePoint 2010 and SharePoint Online / Office 365:
<script> var ttnTables = document.getElementsByTagName("TABLE") for (var i=0;i<ttnTables.length;i++) { if (ttnTables[i].className=="ms-formtable") { ttnTables[i].rows[0].style.display="none"; } } </script>
Now the Content Type is hidden on the edit form.
The only problem with this solution is that it also prevents the site owner from changing the Content Types. We need to only run the above code for non site owners. To do this we will use the SPSecurityTrimmedControl and set the PermissionString to a suitable value, such as ManageWeb.
<!-- default value --> <script type="text/javascript"> var canChangeContentType = false; </script> <Sharepoint:SPSecurityTrimmedControl runat="server" PermissionsString="ManageWeb"> <!--text for users who have the ManageWeb permission --> <script type="text/javascript"> canChangeContentType = true; </script> </SharePoint:SPSecurityTrimmedControl> <script type="text/javascript"> if (canChangeContentType == false) { var ttnTables = document.getElementsByTagName("TABLE") for (var i=0;i<ttnTables.length;i++) { if (ttnTables[i].className=="ms-formtable") { ttnTables[i].rows[0].style.display="none"; } } } </script>
A user with permissions to create private views can create a DataSheet view with the Content Type column displayed and then edit the Content Type.
SharePoint 2007
SharePoint 2010
.
Many of my Site Owner customization tips require adding CSS and JavaScript to individual pages, the Content Editor Web Part or to the master page. Instead of repeating those steps over and over I'll link to this page in the future. (This is an expansion of an earlier article found here.)
Where you put the JavaScript or CSS largely depends on what it does and if it needs to interact with a single list, a single page or an entire site. Here are some possibilities:
CSS is typically added inside of a <STYLE> block. The following will change the title of a 2007 site:
<!—the following overrides the SharePoint ms-sitietile Core CSS class --> <style type="text/css"> .ms-sitetitle { color:blue; font-size:30pt; } </style>
CSS can also be stored in a file in a library and linked:
<link rel="stylesheet" type="text/css" href="/sites/training/shared documents/mycustom.css" />
JavaScript is typically added inside of a <SCRIPT> block. The following will add a border around the site's icon:
<script type="text/javascript"> var siteImage = document.getElementById('GlobalTitleAreaImage'); if (siteImage != null) { siteImage.style.border = 'dashed'; } </script>
JavaScript can also be stored in a file in a library and linked:
<script type="text/javascript" language="javascript" src="/sites/training/shared documents/mycustom.js"></script>
The CEWP in SharePoint 2007 is a simple web part that includes four options to add content:
1. Display any web part page, click Site Actions, Edit Page then Add a web part:
1. Click the web part's edit button then select Modify Shared Web Part, then click the Source Editor button
2. Or, if you have linked to a text file, then just open that text file directly from a library, make your edits and then save. No need to open the CEWP.
Tip: You can open linked code files from within SharePoint Designer by just expanding the library's folder and double-clicking the file. You will then be able to use SharePoint Designer's JavaScript, HTML and CSS editors with their color coding and auto completion features.
The CEWP will often be used to store code and will not need a title or title bar displayed on the page.
In 2010 it’s now just called "Content Editor" and is in the Media and Content section of Add a Web Part:
The page with the new web part:
How do you add HTML?
When you add this web part you get a "wiki style" editor for normal rich text editing. When you use the web part's edit dropdown and click Edit Web Part you will find that the Source Editor button is gone! So how do you add your JavaScript and CSS? You could just click the HTML button in the Ribbon (), but read on for some fun issues with this option…
When you add CSS or JavaScript you may get this nice little message:
Consider this trivial example:
Each time you go back into the HTML editor and click OK it adds another blank line after the script tag and removes line breaks elsewhere!
It has even sometimes changes the capitalization. In one of my edits it changed color:red to COLOR:red. Who knows why…
The fix? Just link to your code!
Both 2007 and 2010 offer the option to link from the CEWP to a text file with your content. To avoid the problem with the random edits made by 2010 just upload a text file containing the code to a library. Then in the CEWP just click the Edit Web Part option in the dropdown and add the link to the code file. This has added benefit of using any HTML, CSS and JavaScript editor such as Visual Studio or SharePoint Designer to edit your code.
1. If the CEWP includes displayable text, the just click anywhere in the web part to open up the editor ribbon and start typing.
2. If you have linked to a text file, then just open that text file from the library, make your edits and then save. No need to open the CEWP during each edit, just refresh the page to see the changes.
Tip: You can open linked code files from within SharePoint Designer. Click All Files, click the "push pin" to expand the list of files, expand the library, and double-click your file. You will then be able to use SharePoint Designer's JavaScript, HTML and CSS editors with their color coding and auto completion features.
You can easily reuse many CEWP customizations by exporting the web part to a file and then uploading it into another site. As the CEWP is just a container for text (HTML, JavaScript, CSS, etc) it will have few external dependencies and should be reusable in other pages and sites.
A few watch outs:
Almost everything you can do with the CEWP can also be done by adding your customizations directly to the page using SharePoint Designer.
Advantages of direct page edits:
Disadvantages:
To add code directly to a page:
Add your JavaScript code between the end tag for the Web Part Zone and the end tag for the PlaceHolderMain content tag (</asp:Content). (See chapter 6 of my book - "Editing a SharePoint Page")
JavaScript and CSS that impacts every page in the site needs to be added to the master page. CSS will typically be added in the <HEAD> section of the page. Links to JavaScript libraries will also be added to the <HEAD> section. JavaScript blocks will typically be added just before the </BODY> tag at the end of the master page.
For CSS, your custom styles can be added just after these two controls:
<Sharepoint:CssLink runat="server"/>
<SharePoint:Theme runat="server"/>
Steps:
Steps:
A simple embedded script like the following will run as soon as the browser loads it.
<script type="text/javascript"> alert('hello world!'); </script>
If the script is in the middle of the page, like it would be when loaded using a Content Editor Web Part, then the script will run before the page has been fully created by the browser. Most JavaScript for SharePoint projects will need to run after the HTML that it's going to interact with has been fully loaded, and quite often, after the entire page as been loaded.
To see how to deal with JavaScript running at the wrong time in SharePoint see Chapter 5's section on "Controlling when JavaScript Runs" in my book.
Error
The Web site address "/workflowtasks" is already in use.
I checked and View All Site Content does not list this subsite. But... it does list a
list named "Workflow Tasks". That should not be a problem as the URL for
lists always include "/Lists/".
http://intranet.contoso.com/Lists/Workflowtasks
So why can’t I create a subsite named “workflowtasks”? When the publishing feature is enabled it creates a special list in the root of the site (i.e. no "/Lists/") named "workflowtasks".
(Why would you ever create a subsite named “Workflowlists”? Because in one of my SharePoint workflow classes step one of the lab said “create a subsite named “Workflowlists”!)
The following is a list of a few of the names that cannot be used as subsites of a Publishing template based site:
The following are names used in almost every SharePoint site for folders. Some are found in every subsite while a few are only found in top level sites.
Error
The Web site address "/Shared Documents" is already in use"
Try to create a subsite named "Lists"...
Error
Cannot create a Web at "/lists" because a folder already exists at this
location.
Open your site in SharePoint Designer. In 2007 all of the folder and root level list and library names are displayed in the left panel. In 2010 click on “All Files”. (If you don’t see “All Files” then your Site Collection Administrator or you server administrator may have removed your “Allow Site Owners and Designers to See the Hidden URL structure of their Web Site” permission.)
A sample All Files in SharePoint Designer 2010:
.
The Cincinnati SharePoint User Group meets the first Thursday of every month at 6:00 PM at MAX Technical Training in Mason, Ohio (directions). The next meeting is 2/2/2012.
February is our "Lighting Round" meeting where everyone is welcome to submit a proposal to speak for anywhere from 5 to 15 minutes. These have been a lot of fun in the past and no matter your interest in SharePoint, there will be something interesting! (Think “SharePoint Saturday in 90 minutes”)
If you have never spoken at a SharePoint user group meeting before, this is just about the easiest way to get started. Pick your favorite aspect of SharePoint, or the latest cool SharePoint related thing you have done, and tell us about it. You don't even need slides, and if you do create slides, you probably won't need more than five or so. Keep it short, keep it interesting and have fun! (And when you are done, you can put "User group speaker" on your resume and be well on your way to SharePoint Saturday fame!)
We are looking for topics like these:
But… no sales pitches!
To get the ball rolling I will start us out with this little presentation...
How to Give Back to the SharePoint Community with a Blog and the MSDN Forums
In 10 minutes we will create a blog site, do a little customization, setup an automatic Twitter feed and configure Google Analytics so you will know if anyone is reading your blog.
In the next 5 minutes we will setup an MSDN Forums account and start answering questions!
Send us a one paragraph topic proposal and your estimate of presentation length. If you don’t know how to reach me or someone in the user group then just post a reply to this article with your email address and I’ll get back to you. Don’t worry about your email address as I will keep your reply unpublished and private.
Mike
p.s. If there’s anyone reading this from “vendor land” and you would like to make a door prize donation to the Cincinnati SharePoint User Group, or even sponsor a meeting, please contact me.
.
A recent question in the MSDN forums got me to looking again at the limitations on the use of certain column types in calculations or lookups. The list of column types that can be used in lookups is quite limited, but with a trick using a calculated column we can add four more to the list.
For my test I added all of the following columns to a custom list. These include the basic columns plus a few variations of options including each type of calculated column.
I then added a Calculated column. This is the list of fields offered for use in a calculation:
Not included in this list were these columns:
I then added a lookup column to another list to see which column types could be used for lookups. Here’s what shows up:
The only column types available for lookups are:
And when a lookup has been selected, here is the list of columns that can also be displayed from the lookup list:
Or, just these types:
So, these are excluded from lookups:
If you look back at the types that did show up in the list for lookup columns you will find:
And if you go back to the list of types that can be used in calculated columns you will see that we can create calculated columns for some of the missing lookup types, as long as the calculation returns “Single line of text”!
With a calculation we now get to:
Yes / No
Choice (Drop-down or Radio Buttons, but not checkbox)
External Data (and external data additional columns)
Currency (but without the currency ($) symbol)
The calculation for Choice and External data is pretty straight forward:
=[fieldname]
The currency type will just return the value, with commas and decimal points. You may want to add the currency symbol.
=[fieldname]
or
=”$” & [fieldname]
The Yes / No is a bit of a problem as the simple calculation just returns a 0 or 1. To get the words Yes and No you will need to do just a little more work:
= if( [yesnofieldname], “Yes”, “No” )
Remember for all of these you will still need to set the "data type returned" to "Single line of text".
SharePoint Columns – Features and limitations
http://www.sharepointusecases.com/index.php/2011/07/sharepoint-columns-features-and-limitations/
Create list relationships by using unique and lookup columns
Column types and options
SharePoint 2007 Supported Lookup Column Types
http://sharepoint.nauplius.net/2010/09/sharepoint-2007-supported-lookup-column.html
.
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…
.
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:
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:
Steps:
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:
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>
.
.
December 2011 CU for SharePoint 2010 has been released
Go here and see the links to the details for what’s included:
December 2011 CU for SharePoint 2007 has been released
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
.
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.
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:
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:
.