7/7/2010 Tom Brauch and the nice guys over at FPWeb.net are hosting the sharejPoint.com website free of charge. They do so because they feel that non-profit sites like sharejPoint that promote free, open source solutions are a great benefit for the SharePoint community. We have finally updated the master template to include the above banner and have also added the banner below to the right-hand side of this blog page. Which banner do you like better? 1/18/2010Download jPoint-0.8 here. Release Notes - jPoint-0.8.zip - Recommended download
- jPoint.mins.js - minified jPoint 0.8.js file to be used in production
- jPointLoader.js - explanation below
- jPoint-0.8.js -expanded version for learning and debugging
This is the first version of jPoint that has been labeled, "Beta". It is more robust, feature complete, and the foundation has been laid for an enterprise framework. Functions were added to the Form class and a few functions under the Lists and List object were re-named for better readability and easier understanding. jPointLoader was improved to better manage the scripts on the page and to allow the developer more flexibility on how to reference jQuery and jPoint while giving ultimate control and governance to central IT who manages the central javascript document library. A new template, called jPart.Template, allows developers to paste their code inside to create a deployable and user configurable webpart, which we call a jPart. jPoint 0.8 Summary of Updates jPoint is now in Beta jPointLoader has been improved: - View the comments in the file to understand how IT can centrally manage the file path variables while giving developers some flexibility when moving from dev to production.
- Better management of multiple scripts on the page because jParts are referenced more generically by position rather than by a specific name.
jPointLoader Parameters - Parameters can now be added to the end of the src attribute in the script tag to dictate the source of either jQuery or jPoint files. Parameters include:
- jQueryPath, jQueryFile, jPointPath, jPointFile, and jQueryForceLoad and jPointForceLoad
- IF IT has left the file path variables empty, then developers can use parameters to determine the location of the jQuery and jPoint files.
<!-- Example where developer wants to use a particular version of jPoint and is okay with loading jquery from Google's servers [default]. -->
<script scr="//sharejpoint.googlecode.com/files/jPointLoader.js?jPointFile=jPoint-0.7.js"></script>
<!-- Example where developer is already using jquery on the enterprise server and has downloaded jPoint library to a development site -->
<script scr="/servername/development/ScriptLibrary/jPointLoader.js?jQueryPath=/servername/CentralScriptLibrary/jquery/"></script>
- Note: Only the first jPointLoader reference from on a page with multiple jParts is searched to grab the parameters.
jPart Template
- A new template has been created so you can write code and create a jPart in 3 easy steps.
- Plug your code into the body of the jPart-Template.js where it says "jPart user code goes here"
- Fill out showConfigDefaults array, which determine what settings the user can change for your script.
- Save the file with a new name and you have just created a jPart script file. To deploy this script to a SharePoint page, simply reference jPointLoader.js and your new jPart file from a Form Web Part.
Newly Added Public Functions
- jP.Form.field(HTMLElemOrJqueryObj) //returns the jPoint field that contains the passed in HTML element or jQuery object
- jP.Form[<FieldName>].find(expr) //returns a jQuery object of the element inside of a jPoint field item that matches expr. expr can be itemrow, itemlabel, itemdata, or itemfield
- jP.Form[<FieldName>].inputs(expr) //same as .find("iteminputs") except that expr can be ":visible" to further filter the returned jQuery object
- jP.Lists.getList( [<SiteURL>] , ListName) has replaced now deprecated setSPObject(siteURL, listName)
- jP.Lists[<ListName>].getSchema() has replaced now deprecated getSPListFields()
- jP.Lists[<ListName>].getSPItemByID(listItemID) has replaced getSPItemID
11/12/2009
In the previous versions of jPoint, the jQuery based library that makes building javascript solutions a lot easier by abstracting a lot of the low-level SharePoint intricacies such as cross browser compatibility, manipulating the HTML mess in Forms, and in particular, the nuances of the different SharePoint web services, required the application developer to iterate through the data returned from the web service as jQueryData. In this 0.7 release, you can now reference the data as an Items object. Let’s say you want to get the last message from a chat list (assuming the default view has messages ordered by descending ID). You would be able to write:
jP.Lists.setSPObject(siteURL, “chat”); //adds chat list (as Uppercase) to the Lists object
jP.Lists[“CHAT”].getSPView(); //adds the items from the default view to the Lists.CHAT object
var chatMessage = jP.Lists[“CHAT”].Items[0].message;
Below are the rest of the highlights of the 0.7 release.
Major jPoint.Lists Object Updates:When using getSPItem, getSPItemsWithQuery, getSPView, getSPViewCollection, getPictures, updateItem, addItem, and deleteItem, jPoint.Lists["<listname>"] will have the following objects populated depending on current context
- ListName - name of last list used
- FieldCount - count of fields
- ItemCount - count of items
- Items - array of item object [{fld11:val11,fld12:val12,...},{fld21:val21,fld22:val22,...},...]
- fields are based on xml response and might not be uniform across rows, so check before use
- xmlDoc - xml document response from webservice call
- JQueryData - row data as jQuery object
- total - count of rs:\\data nodes if exist
- nextPage - key for paging if rs:\\data exist
Improved Public Functions:
- jP.Form.readForm() - identification of form fields for dispform.aspx
- jP.Form.<FieldName>.val() - reading of value from fields with no input element to support dispform.aspx
- jP.strip(str) - remove special hex encoded characters
- jP.Lists[<ListName>].getSPListFields() - save additional information into list object
- jP.Lists[<ListName>].udpateItem(itemid) - process response data to save information into list object
- jP.Lists[<ListName>].getSPItem, getSPItemsWithQuery, getSPView, getSPViewCollection, getPictures - Return list object
Improved Private Functions:
- getSPItemData(listObj) - use processResponseData to save information
- getSPItems(listObj, rowLimit) - use processResponseData to save information
- getSPViewItems(listObj) - get default view dynamically
- buildModifyContent(listName, data) - handling when data[i].ID is not null
Newly Added Public Functions:
- deleteItem(id) - delete SPList item
- getSPViewCollection() - populate jPoint object with list view collection
- filterItems(filterField, filterValue) - filter the list items where filterField contains filterValue
- getItemsFieldData(fieldNames) - extract a subset of Items for specified fields
Newly Added Private Functions:
- processResonseData(listObj, data) - populate jPoint.Lists.{listname} and jPoint.Lists with list information to process list web service all uniformly
- saveListObjects(listObj, responseData) - populate jPoint.Lists.{listname} and jPoint.Lists with list information
- getResultItems(respData) - convert response data into array of item objects
- getColumns(items) - get complete list of columns from items array
- buildDeleteContent(listName, id) - construct xml body for deleting SPItem from a specified list
11/11/2009To use jPart.TextCounter for your SharePoint blog comment body field do the following:
For remote hosted javascript
Open to the page where you see the Add Comment section
Add a Content Editor webpart to the bottom and paste the following code into the source
<script type="text/javascript" src="//sharejpoint.googlecode.com/files/jPointLoader-0.7-expanded.js" ></script>
<script type="text/javascript" src="//www.sharejpoint.com/src/jPoint/webparts/jPart.TextCounter.js"></script>
Click the jPart Edit button and customize as follows:
- Replace SiteURL with the location of your blog
- Change other options if you like
- Click Update
- Done
For hosting the script files locally
Download from CodePlex the complete jPoint-0.7.zip
- http://jpoint.codeplex.com
- Click Downloads tab
- Unzip
Place the src directory content into a SharePoint library.
- example /site/lib/src where lib is the SharePoint library and src is a subdirectory
Download the text counter jPart
- http://www.sharejpoint.com/src/jPoint/webparts/jPart.TextCounter.js
- Place file in /site/lib/src/webparts/
Update /site/lib/src/ jPointLoader-0.7-expanded.js
Change
if (typeof jWebpart.prototype.IncludePath === "undefined") jWebpart.prototype.IncludePath = "" //empty string here will cause default path to Google CDN to be used. local file location example: "/src/jpoint/";
if (typeof jWebpart.prototype.JQueryFile === "undefined") jWebpart.prototype.JQueryFile = ""; //empty string here will cause default path to Google CDN to be used
To
if (typeof jWebpart.prototype.IncludePath === "undefined") jWebpart.prototype.IncludePath = "/site/lib/src/" //empty string here will cause default path to Google CDN to be used. local file location example: "/src/jpoint/";
if (typeof jWebpart.prototype.JQueryFile === "undefined") jWebpart.prototype.JQueryFile = "/site/lib/src/jquery.js"; //empty string here will cause default path to Google CDN to be used
Add the jPart to the comment page as above, but this time paste these lines of code into the webpart
<script type="text/javascript" src="/site/lib/src/jPointLoader-0.7-expanded.js" ></script>
<script type="text/javascript" src="/site/lib/src /webparts/jPart.TextCounter.js"></script>
Continue to configure as above.
10/18/2009
A YouTube video / screencast has been published on The jPoint Project.
In 6 minutes, the video introduces The jPoint Project (hosted at http://jPoint.codeplex.com and http://www.sharejPoint.com). jPoint is an open source javascript API and script deployment framework for Sharepoint. It leverages the speed and agility of jQuery to manipulate Sharepoint forms and pages, to communicate to Sharepoint webservices, and to build jParts. See the video to see what jParts are and to discover how jPoint can make your Sharepoint scripting solutions a lot easier.
The last 3 minutes is a silent demo previewing the next video The jPoint Project will publish. Subscribe to our RSS feed and follow @sharejPoint on Twitter to be notified of updates. 10/10/2009
What is jPoint?
- jP is an open source javascript API and script deployment framework for Sharepoint
- It leverages the speed and agility of jQuery.
- It is used to manipulate Sharepoint forms and pages, communicate to Sharepoint webservices, and to build jParts
What are jParts?
- jParts are content editor webparts with scripts
- They are like jQuery plugins for Sharepoint
- They are configurable which means you do not need a developer to deploy a custom solution for your particular site
- Check out the Examples and the jParts Repository links on the left-hand side
Who is jPoint for?
- Sharepoint javascripters develop against the jPoint API to create jParts
- Power users and Sharepoint administrators use jParts to enhance their users' Sharepoint experiences
- Sharepoint developers can further customize jParts or use several jParts together to create a mashup
What can jPoint do?
- Allow scripts (jParts) to be deployed to Sharepoint pages by non-technical admin users
- Manage your javascript solutions in your Sharepoint environment from a central location
- Manipulate your form pages (i.e. hide, auto-populate, disable fields, etc)
- Ajaxify your webpart pages (i.e. auto-saves, list auto-refreshes, etc)
- Allow you to create a feedback form and chatrooms throughout your sites
Can you show me some examples?
I am interested in contributing to the Open Source jPoint project. How can I get involved?
- If you would like to be a contributor to the project, email will.lawrence [at] sharejpoint.com
- If you have Sharepoint script solutions that you want to jPoint-ize and turn into jParts, email will.lawrence [at] sharejpoint.com
- Other ways to stay involved is by joining the Discussions on codeplex, subscribing to our blogs feed, following @sharejPoint for updates on twitter, and simply spreading the word on jPoint.
|
|
|
|