Sharepoint 2010: Sample CSS to customise Site Actions button

By peter.stilgoe









Sample CSS to customise the ‘Site Actions’ buttons in Sharepoint 2010

/* Site Actions Menu */
.ms-siteactionsmenu{
border:1px solid transparent;
background-color:#F2F2F4;
}
.ms-siteactionsmenu .ms-menu-a span{
color:#000000;
}
.ms-siteactionsmenu .ms-siteactionsmenuhover {
background-color:#FFFFFF;
color:#ffffff;
}

Share

Leggi tutto

Sharepoint Designer could not save the list changes to the server

By peter.stilgoe









When using Sharepoint Designer 2010 to create custom aspx list forms I was getting the error:

‘sharepoint designer could not save the list changes to the server’

I had a look on the net but couldnt really find anything relating to do with this.

I seem to have solved it by going to my list and removing duplicate column names that werent being used ie.

Consultant

Consultant #Used in CT ‘Consultant’#

I was using a custom content type so I deleted all the columns that weren’t ‘Used by’ my custom content type. Once I had done this I was them able to create custom forms as expected in SPD 2010.

Hopefully this will help some people if theyre getting similar problems!




Share

Leggi tutto

How to display ‘anything’ in Sharepoint 2010 pop up / modal window

By peter.stilgoe









Display a website:

<a onclick="javascript:NewItem2(event, &quot;http://www.bing.com&quot;);
javascript:return false;" href="http://www.bing.com/" target="_self">Show Bing In Modal Window</a>

Display a image:

<a onclick="javascript:NewItem2(event, &quot;http://sitename/Images/image.png&quot;);
javascript:return false;" href="/images/image.png/" target="_self">Show Image</a>

Display flash:

<a onclick="javascript:NewItem2(event, &quot;http://www.microsoft.com/games/gamesforwindows/games/madagascar2/Mad2_Final_ENU.swf&quot;);
javascript:return false;" href="http://www.microsoft.com/games/gamesforwindows/games/madagascar2/Mad2_Final_ENU.swf" target="_self">Flash Game</a>

Thanks to Erik @ http://erikswenson.blogspot.com/2010/09/ways-to-extend-sharepoint-modal-window.html




Share

Leggi tutto

Sharepoint 2010: Custom master page messes up positioning of your pop dialog boxes

By peter.stilgoe









When you apply a custom master page you may find that it knocks out the positioning of your dialog boxes & you can no longer see the OK & Cancel buttons beacuse they have been knocked down the page. This is because now your new masterpage shiny banner (in my case) is also displaying in the dialog box. To stop this happening is nice & easy thanks to Microsoft:

Simply add ‘s4-notdlg’ to the class ie.


becomes




Share

Leggi tutto

Sharepoint 2010: How to hide the quick launch menu

By peter.stilgoe









To hide the quick launch menu in Sharepoint 2010 add a content editor webpart (CEWP) at the bottom of your page with the following code in it:

Share

Leggi tutto

One of the better ways of implementing Jquery in your Sharepoint environment

By peter.stilgoe









1. Open up SharePoint Portal and click on Site Actions -> Site Settings -> All Site Settings option

2. Under “Site Administration“group option, Click on “Content and Structure” link

3. From top menu Click “New” List option to create a list of type “Document Library”.

4. Let’s Configure document library further…. Let’s name it as “JavaLib”
[ Note: The name of the document library could be any name you like, I like the name JavaLib as we will use this library to organize all JavaScript’s related resources]

5. (Best Practices) Now, We can configure the JavaLib with additional columns, Versioning and Security so that it can return us a favors like versioning and auto advancing to new versions (if needed).

5.1. Add a column “Script Version” as Single Line of Text to JavaLib

Having “Script version” column becomes very informative when one has lots of developers.

5.2. Configure versioning with 10 Major & 10 Minor Versions

Versioning will allow you to rollback to previous version if there is a bug/known defects without having all other pages needing a modification.

5.3. Set Library security as Read Only to Everyone and Contribute to DevGroup

Limiting who can upload new items (scripts) will help establish controlled processes and release changes using major versions.

6. Let’s download most current JQuery version 1.3.2 from http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js to the desktop

7. Now, Let’s upload jquery.1.3.2.min.js file from our desktop to our JavaLib library.

Note: After uploading the file, Please make sure you change the Name from Jquery-1.3.2.min.js to Jquery and Title as Jquery-1.3.2.min.js and Script version as 1.3.2. This will help us in future if other revisions are available then you do not have to update all webparts with new framework urls.

8. Now we have JQuery available in our environment, with correct control security & versioning in place.

Thanks to Hemendra Patel over @ http://hemsoft.blogspot.com/2009/06/first-look-at-jquery-sharepoint.html

Share

Leggi tutto