SPSEMEA Demo site and showcase

February 3rd, 2010 | Categories: JavaScript, jquery, SharePoint

I’ve prepared a SPSEMEA Demo site that you can simply upload to your (http://[siteUrl]/_catalogs/wt) Site template gallery.

You can download the .stp from CodePlex

After you’ve uploaded the file to the Site template gallery you can create a subsite (English language) and from Custom you can select the uploaded template.

Below’s a brief overview where you can find tricks. How it’s done – check for Content Editor WebParts in that page (using a “PageView=Shared&ToolPaneView=2” parameters in url (more info here)). All the files containing code are in a document library Sys.

image

Let’s see the samples:


1. HTML in List Description BugFix

Team Discussion list default view

image image

The code is IN the content editor webpart. You can find if you click the “Edit Source” button.

 

2. Toggle QuickLaunch

Calendar list default view

image image

Full code in showHideQuickLaunch.html

3. List View Quick Search

Customers list default view

image image

Full code in ListQuickFilterWebPart.html

4. Expose Weekends in List View

Duty Roster list default view

image image

Full code in HighLightWeekendsInLV.html

5. Alphabet List quick navigation

Customers list default view

image image

Full code in alphabetFilter.html
Note that you can configure the filter values in an array filterValues.

 

6. Attaching Events to Form Fields

Tasks list in New form

image

Full code in updateTaskPercentages.html
If you change the task status to “Completed” it will automatically populate the “% Complete” field to value 100.
If you change the task status to “Not started” it will clear the value in “% Complete” field.
If you have entered value in “% Complete” field before, then change status to Completed (which sets it to 100%) and then back to any other, it will remember your input and return the value.

This webpart should also be added to EditForm, but in the demo it’s just in newform for demo purposes.

 

7. List Form Live Validation

Tasks list in New form

image

Full code in validateCompletedTask.html

If you set the Status field to “Completed”, leave the “Hours used” field empty, and try submitting the form (click OK), it will display a validation message below the “Hours used” – withoud submitting the form.

This webpart should also be added in EditForm to be working there also.

8. ERTE – Embed Flash in SharePoint Content

This example is already explained in http://www.sharepointboris.net/erte. There is no example in the stp site. But you can quickly create a blog subsite and add webparts there.

image image

image

Note that you can add the ERTE without modifying the Master page. It’s prepared to be used in a webpart also.

image

You need to make this on every page that needs the script:

1. New form for adding posts
2. Edit form for editing posts
3. HomePage where posts are displayed
4. Disp form for displaying particular post
5. Any other page that will be displaying blog posts with embeddable content.

Please keep track of latest version on http://erte.codeplex.com

 

9. Ajax AutoSuggest using SharePoint’s Web Services

Duty roster list in New form

image image

Full code in EmployeeAutoSuggest.html

Note if autosuggest won’t trigger what might help is to edit the page and exit edit mode. If it still doesn’t work, place the Employee field in second place in the form.

10. Update List Items – comments to Announcements

Announcements list in Display form

image image

Full code in AjaxComments.html

This webpart reads and writes to Comments list.

X. To sum it all up

THe above post was not intended to show an in-depth code and how the examples are made. It is just to showcase what demos are included. You can view all the sources and adapt them to your needs.

Just a reminder – all the sources are included in the stp (in the Document Library sys) or they can be downloaded from my CodePlex site here.

I’m planning to record or maybe even have live for each of the examples (and an intro) explaining each of the demo more in-depth. Would you be interested to participate online in a 1-2 hour session? Please let me know in comments to this post.