|
Subclass |
Manipulates lists and list items (retrieve, save, delete) |
|
|
Subclass |
Manipulates fields on a form (get/set, hide, disable) |
|
|
Subclass |
Manipulates webparts on a page (overwrite script vars) |
|
|
--- |
The base jPoint class has utility functions and helpful variables |
The main purpose of Lists is to interact with the lists.asmx web service. It abstracts the web service and does a lot of the heavy lifting for the jPoint API developer. The main function that will be used is setSPObject() and from there, you can work with a specific List. The Lists class can contain a collection of List Item objects so you can have jP.Lists.Announcements and jP.Lists.Tasks.
|
List |
Subclass |
Manipulates SP List items (retrieve, save, delete) |
|
setSPObject |
Function |
Creates a List Item |
|
[list name] |
Variable |
List Collection array that has been created from setSPObject calls |
|
Items |
Variable |
List Item Collection array created from last List operation |
|
FieldCount |
Variable |
Length of Items array created from last List operation |
The main purpose of Form is to tag and manipulate the fields on a form page or form webpart. It is important for this functionality to be cross-browser compatible and to work not only on the Form pages (NewForm.aspx, DispForm.aspx, and EditForm.aspx), but also custom webpart pages that contain a Form webpart.
|
readForm |
Function |
Detects WSS form fields and populates the Form variables |
|
Id |
Variable |
0 if a new, unsaved form, value of item’s id otherwise |
|
Schema |
Variable |
Object populated from lists.asmx -> GetListContentType |
|
AutoSaveInterval |
Variable |
Not yet implemented in jPoint-0.3. |
|
ItemNames |
Variable |
Array of the form field’s internal names |
|
Items |
Variable |
Array of DOM elements pointing to each field |
|
FieldCount |
Variable |
Length of Items array |
The main purpose of Webparts is to update the script on the page so that on the next page refresh, the new script is able to run. This class uses the WebPartPages.asmx web service.
|
Save |
Function |
Replaces contents of jPart (script webpart) that is on the page |
|
getPageWebPartProperties |
Function |
Wrapper for web service that helps identify jPart
on the page |
|
updatejPartProperties |
Function |
Replaces local jPart properities
required for easy deployment |
The jPoint core consists of utility functions and helpful variables that describe the jPoint class.
|
Function |
Borrowed from jQuery to extend core jPoint
class |
|
|
Function |
Manage jPart (content editor webpart w/ script) setup |
|
|
Function |
Loads javascript files asynchronously or
synchronously |
|
|
Function |
Gets and sets base class SiteURL |
|
|
Function |
Gets and sets base class ListURL |
|
|
Function |
Removes white space and specials chars from a string |
|
|
Function |
Compares two strings after stripping |
|
|
Variable |
Version number |
Method
jPoint.extend( [deep], target, object1, [object] )
Overview
This method copies the jQuery extend method. See http://docs.jquery.com/Utilities/jQuery.extend.
Returns
Modified object
Method
jPoint.config( myjOptions )
Overview
This method starts the configuration webpart process
Arguments
myjOptions is a JSON object
· myjOptions.Local
o myjOptions.Local is comprised of jPart developer defined JSON objects
· myjOptions.Plugin
o myjOptions.Plugin.Name
o myjOptions.Plugin.Version
o myjOptions.Plugin.Origin
o myjOptions.Plugin.Description
o myjOptions.Plugin.Developer
Returns
Nothing
Method
jPoint.getScript( fileURL, [blocking], [callback] )
Overview
Setup after jQuery's getScript with the exception of an extra parameter, blocking, to load javascript files. See http://docs.jquery.com/Ajax/jQuery.getScript. Loads, and executes, a local JavaScript file using an HTTP GET request.
Arguments
fileURL is the URL of the file to load.
blocking (optional, defaults to False) loads file asynchronously if False, synchronously if True.
callback (optional) is a function to be called after script is called (AND loaded in case blocking is True).
Returns
True if jQuery's getScript was succesfully called, otherwise False. Return value of True does not mean script has been retrieved, only that call was made.
purpose: Get: returns value of jPoint.SiteURL
jPoint.valSiteURL( [value] )
Overview
Getter/Setter. Get: returns value of jPoint.SiteURL. Set: sets value of jPoint.SiteURL with ‘value’ parameter.
Certain functions in jPoint need this variable set. If the developer does not set the variable manually, jPoint tries to figure out the current site.
Arguments
value (Optional). If not present, function is Getter, else function is Setter and value is String representing siteURL.
Returns
If value is not present, function returns Sharepoint’s javascript variable, L_Menu_BaseUrl, representing the siteURL.
If value is present, function just returns value.
jPoint.valListURL( [value] )
Overview
Getter/Setter. Get: returns value of the current List. Set: sets value of jPoint.ListName with ‘value’ parameter.
Certain functions in jPoint need this variable set. If the developer does not set the variable manually, jPoint tries to figure out the current list by looking for the part of the URL after “/Lists/”.
Arguments
value (Optional). If not present, function is Getter, else function is Setter and value is String representing listName.
Returns
If value is not present, function returns the part of URL after “/Lists/” else jPoint.ListName or “”.
If value is present, function just returns value.
jPoint.strip( str )
Overview
Strips the whitespace and special characters from the String str. It is used within jPoint to collapse a Form or List field display name or List name so that the name can be assigned as a variable to the parent class.
Arguments
str is a String.
Returns
str with whitespace and special characters stripped out
* purpose: compares two names to see if they are the same except for whitespace and special characters to abstract away from encoding and decoding strings
* Used primarly to compare display names of URL parameters and Sharepoint fields
* input: name1 and name2 are strings
* visibility: public
* return: true or false
jPoint.sameNames( name1, name2 )
Overview
Compares two names to see if they are the same except for whitespace and special characters to abstract away from encoding and decoding strings. It is used primarily to compare the display names of Form fields and URL parameters.
Arguments
name1 and name2 are type String.
Returns
True if strings are equal or are equal once stripped (see jPoint.strip), else False.
Variable
Overview
Contains a String of the version of jPoint currently being used.