From baca5e37ccd13bb96ae98c864990d4c2203ea94f Mon Sep 17 00:00:00 2001 From: Josh McCarty Date: Fri, 27 Dec 2013 16:47:58 -0700 Subject: [PATCH] Creating release for 2013.02 --- jquery.SPServices-2013.01.min.js | 21 - ...2013.01.js => jquery.SPServices-2013.02.js | 416 +++++++----------- jquery.SPServices-2013.02.min.js | 21 + 3 files changed, 171 insertions(+), 287 deletions(-) delete mode 100644 jquery.SPServices-2013.01.min.js rename jquery.SPServices-2013.01.js => jquery.SPServices-2013.02.js (93%) create mode 100644 jquery.SPServices-2013.02.min.js diff --git a/jquery.SPServices-2013.01.min.js b/jquery.SPServices-2013.01.min.js deleted file mode 100644 index 69025ad..0000000 --- a/jquery.SPServices-2013.01.min.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * SPServices - Work with SharePoint's Web Services using jQuery - * Version 2013.01 - * @requires jQuery v1.5 or greater - jQuery 1.7+ recommended - * - * Copyright (c) 2009-2013 Sympraxis Consulting LLC - * Examples and docs at: - * http://spservices.codeplex.com - * Licensed under the MIT license: - * http://www.opensource.org/licenses/mit-license.php - */ -/* - * @description Work with SharePoint's Web Services using jQuery - * @type jQuery - * @name SPServices - * @category Plugins/SPServices - * @author Sympraxis Consulting LLC/marc.anderson@sympraxisconsulting.com - */ -/* jshint undef: true */ -/* global _spUserId, _spPageContextInfo, GipAddSelectedItems, GipRemoveSelectedItems, GipGetGroupData */ -(function(ak){var aa="2013.01";var Q="/";var ah="Column not found on page";var ac="http://schemas.microsoft.com/sharepoint";var B={};var b="Alerts";var u="Authentication";var am="Copy";var G="Forms";var ar="Lists";var l="Meetings";var C="People";var f="Permissions";var g="PublishedLinksService";var ai="Search";var A="SPSearch";var ag="SharePointDiagnostics";var Z="SiteData";var aA="Sites";var J="SocialDataService";var ae="SpellCheck";var n="TaxonomyClientService";var k="usergroup";var K="UserProfileService";var E="Versions";var ay="Views";var e="WebPartPages";var av="Webs";var F="Workflow";var ao=new ao();var O=0;var x=["listName","description"];var U=[];U.GetAlerts=[b,false];U.DeleteAlerts=[b,true];U.Mode=[u,false];U.Login=[u,false];U.CopyIntoItems=[am,true];U.CopyIntoItemsLocal=[am,true];U.GetItem=[am,false];U.GetForm=[G,false];U.GetFormCollection=[G,false];U.AddAttachment=[ar,true];U.AddDiscussionBoardItem=[ar,true];U.AddList=[ar,true];U.AddListFromFeature=[ar,true];U.ApplyContentTypeToList=[ar,true];U.CheckInFile=[ar,true];U.CheckOutFile=[ar,true];U.CreateContentType=[ar,true];U.DeleteAttachment=[ar,true];U.DeleteContentType=[ar,true];U.DeleteContentTypeXmlDocument=[ar,true];U.DeleteList=[ar,true];U.GetAttachmentCollection=[ar,false];U.GetList=[ar,false];U.GetListAndView=[ar,false];U.GetListCollection=[ar,false];U.GetListContentType=[ar,false];U.GetListContentTypes=[ar,false];U.GetListItemChanges=[ar,false];U.GetListItemChangesSinceToken=[ar,false];U.GetListItems=[ar,false];U.GetVersionCollection=[ar,false];U.UndoCheckOut=[ar,true];U.UpdateContentType=[ar,true];U.UpdateContentTypesXmlDocument=[ar,true];U.UpdateContentTypeXmlDocument=[ar,true];U.UpdateList=[ar,true];U.UpdateListItems=[ar,true];U.AddMeeting=[l,true];U.CreateWorkspace=[l,true];U.RemoveMeeting=[l,true];U.SetWorkSpaceTitle=[l,true];U.ResolvePrincipals=[C,false];U.SearchPrincipals=[C,false];U.AddPermission=[f,true];U.AddPermissionCollection=[f,true];U.GetPermissionCollection=[f,true];U.RemovePermission=[f,true];U.RemovePermissionCollection=[f,true];U.UpdatePermission=[f,true];U.GetLinks=[g,true];U.GetPortalSearchInfo=[ai,false];U.GetQuerySuggestions=[ai,false];U.GetSearchMetadata=[ai,false];U.Query=[ai,false];U.QueryEx=[ai,false];U.Registration=[ai,false];U.Status=[ai,false];U.SPQuery=[A,false];U.SPQueryEx=[A,false];U.SPRegistration=[A,false];U.SPStatus=[A,false];U.SendClientScriptErrorReport=[ag,true];U.GetAttachments=[Z,false];U.EnumerateFolder=[Z,false];U.SiteDataGetList=[Z,false];U.SiteDataGetListCollection=[Z,false];U.SiteDataGetSite=[Z,false];U.SiteDataGetSiteUrl=[Z,false];U.SiteDataGetWeb=[Z,false];U.CreateWeb=[aA,true];U.DeleteWeb=[aA,false];U.GetSite=[aA,false];U.GetSiteTemplates=[aA,false];U.AddComment=[J,true];U.AddTag=[J,true];U.AddTagByKeyword=[J,true];U.CountCommentsOfUser=[J,false];U.CountCommentsOfUserOnUrl=[J,false];U.CountCommentsOnUrl=[J,false];U.CountRatingsOnUrl=[J,false];U.CountTagsOfUser=[J,false];U.DeleteComment=[J,true];U.DeleteRating=[J,true];U.DeleteTag=[J,true];U.DeleteTagByKeyword=[J,true];U.DeleteTags=[J,true];U.GetAllTagTerms=[J,false];U.GetAllTagTermsForUrlFolder=[J,false];U.GetAllTagUrls=[J,false];U.GetAllTagUrlsByKeyword=[J,false];U.GetCommentsOfUser=[J,false];U.GetCommentsOfUserOnUrl=[J,false];U.GetCommentsOnUrl=[J,false];U.GetRatingAverageOnUrl=[J,false];U.GetRatingOfUserOnUrl=[J,false];U.GetRatingOnUrl=[J,false];U.GetRatingsOfUser=[J,false];U.GetRatingsOnUrl=[J,false];U.GetSocialDataForFullReplication=[J,false];U.GetTags=[J,true];U.GetTagsOfUser=[J,true];U.GetTagTerms=[J,true];U.GetTagTermsOfUser=[J,true];U.GetTagTermsOnUrl=[J,true];U.GetTagUrlsOfUser=[J,true];U.GetTagUrlsOfUserByKeyword=[J,true];U.GetTagUrls=[J,true];U.GetTagUrlsByKeyword=[J,true];U.SetRating=[J,true];U.UpdateComment=[J,true];U.SpellCheck=[ae,false];U.AddTerms=[n,true];U.GetChildTermsInTerm=[n,false];U.GetChildTermsInTermSet=[n,false];U.GetKeywordTermsByGuids=[n,false];U.GetTermsByLabel=[n,false];U.GetTermSets=[n,false];U.AddGroup=[k,true];U.AddGroupToRole=[k,true];U.AddRole=[k,true];U.AddRoleDef=[k,true];U.AddUserCollectionToGroup=[k,true];U.AddUserCollectionToRole=[k,true];U.AddUserToGroup=[k,true];U.AddUserToRole=[k,true];U.GetAllUserCollectionFromWeb=[k,false];U.GetGroupCollection=[k,false];U.GetGroupCollectionFromRole=[k,false];U.GetGroupCollectionFromSite=[k,false];U.GetGroupCollectionFromUser=[k,false];U.GetGroupCollectionFromWeb=[k,false];U.GetGroupInfo=[k,false];U.GetRoleCollection=[k,false];U.GetRoleCollectionFromGroup=[k,false];U.GetRoleCollectionFromUser=[k,false];U.GetRoleCollectionFromWeb=[k,false];U.GetRoleInfo=[k,false];U.GetRolesAndPermissionsForCurrentUser=[k,false];U.GetRolesAndPermissionsForSite=[k,false];U.GetUserCollection=[k,false];U.GetUserCollectionFromGroup=[k,false];U.GetUserCollectionFromRole=[k,false];U.GetUserCollectionFromSite=[k,false];U.GetUserCollectionFromWeb=[k,false];U.GetUserInfo=[k,false];U.GetUserLoginFromEmail=[k,false];U.RemoveGroup=[k,true];U.RemoveGroupFromRole=[k,true];U.RemoveRole=[k,true];U.RemoveUserCollectionFromGroup=[k,true];U.RemoveUserCollectionFromRole=[k,true];U.RemoveUserCollectionFromSite=[k,true];U.RemoveUserFromGroup=[k,true];U.RemoveUserFromRole=[k,true];U.RemoveUserFromSite=[k,true];U.RemoveUserFromWeb=[k,true];U.UpdateGroupInfo=[k,true];U.UpdateRoleDefInfo=[k,true];U.UpdateRoleInfo=[k,true];U.UpdateUserInfo=[k,true];U.AddColleague=[K,true];U.AddLink=[K,true];U.AddMembership=[K,true];U.AddPinnedLink=[K,true];U.CreateMemberGroup=[K,true];U.CreateUserProfileByAccountName=[K,true];U.GetCommonColleagues=[K,false];U.GetCommonManager=[K,false];U.GetCommonMemberships=[K,false];U.GetInCommon=[K,false];U.GetPropertyChoiceList=[K,false];U.GetUserColleagues=[K,false];U.GetUserLinks=[K,false];U.GetUserMemberships=[K,false];U.GetUserPinnedLinks=[K,false];U.GetUserProfileByGuid=[K,false];U.GetUserProfileByIndex=[K,false];U.GetUserProfileByName=[K,false];U.GetUserProfileCount=[K,false];U.GetUserProfileSchema=[K,false];U.ModifyUserPropertyByAccountName=[K,true];U.RemoveAllColleagues=[K,true];U.RemoveAllLinks=[K,true];U.RemoveAllMemberships=[K,true];U.RemoveAllPinnedLinks=[K,true];U.RemoveColleague=[K,true];U.RemoveLink=[K,true];U.RemoveMembership=[K,true];U.RemovePinnedLink=[K,true];U.UpdateColleaguePrivacy=[K,true];U.UpdateLink=[K,true];U.UpdateMembershipPrivacy=[K,true];U.UpdatePinnedLink=[K,true];U.DeleteAllVersions=[E,true];U.DeleteVersion=[E,true];U.GetVersions=[E,false];U.RestoreVersion=[E,true];U.AddView=[ay,true];U.DeleteView=[ay,true];U.GetView=[ay,false];U.GetViewHtml=[ay,false];U.GetViewCollection=[ay,false];U.UpdateView=[ay,true];U.UpdateViewHtml=[ay,true];U.AddWebPart=[e,true];U.AddWebPartToZone=[e,true];U.GetWebPart2=[e,false];U.GetWebPartPage=[e,false];U.GetWebPartProperties=[e,false];U.GetWebPartProperties2=[e,false];U.CreateContentType=[av,true];U.GetColumns=[av,false];U.GetContentType=[av,false];U.GetContentTypes=[av,false];U.GetCustomizedPageStatus=[av,false];U.GetListTemplates=[av,false];U.GetObjectIdFromUrl=[av,false];U.GetWeb=[av,false];U.GetWebCollection=[av,false];U.GetAllSubWebCollection=[av,false];U.UpdateColumns=[av,true];U.UpdateContentType=[av,true];U.WebUrlFromPageUrl=[av,false];U.AlterToDo=[F,true];U.GetTemplatesForItem=[F,false];U.GetToDosForItem=[F,false];U.GetWorkflowDataForItem=[F,false];U.GetWorkflowTaskData=[F,false];U.StartWorkflow=[F,true];var T={};T.header="";T.footer="";T.payload="";var ab;ak.fn.SPServices=function(aC){var aE=ak.extend({},ak.fn.SPServices.defaults,aC);for(var aD=0;aD";ab=ac+"/soap/2002/1/alerts/";break;case l:T.opheader+="xmlns='"+ac+"/soap/meetings/' >";ab=ac+"/soap/meetings/";break;case f:T.opheader+="xmlns='"+ac+"/soap/directory/' >";ab=ac+"/soap/directory/";break;case g:T.opheader+="xmlns='http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService/' >";ab="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService/";break;case ai:T.opheader+="xmlns='urn:Microsoft.Search' >";ab="urn:Microsoft.Search/";break;case ag:T.opheader+="xmlns='"+ac+"/diagnostics/' >";ab="http://schemas.microsoft.com/sharepoint/diagnostics/";break;case J:T.opheader+="xmlns='http://microsoft.com/webservices/SharePointPortalServer/SocialDataService' >";ab="http://microsoft.com/webservices/SharePointPortalServer/SocialDataService/";break;case ae:T.opheader+="xmlns='http://schemas.microsoft.com/sharepoint/publishing/spelling/' >";ab="http://schemas.microsoft.com/sharepoint/publishing/spelling/SpellCheck";break;case n:T.opheader+="xmlns='"+ac+"/taxonomy/soap/' >";ab=ac+"/taxonomy/soap/";break;case k:T.opheader+="xmlns='"+ac+"/soap/directory/' >";ab=ac+"/soap/directory/";break;case K:T.opheader+="xmlns='http://microsoft.com/webservices/SharePointPortalServer/UserProfileService' >";ab="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/";break;case e:T.opheader+="xmlns='http://microsoft.com/sharepoint/webpartpages' >";ab="http://microsoft.com/sharepoint/webpartpages/";break;case F:T.opheader+="xmlns='"+ac+"/soap/workflow/' >";ab=ac+"/soap/workflow/";break;default:T.opheader+="xmlns='"+ac+"/soap/'>";ab=ac+"/soap/";break}ab+=aE.operation;T.opfooter="";var aG="_vti_bin/"+U[aE.operation][0]+".asmx";if(aE.webURL.charAt(aE.webURL.length-1)===Q){aG=aE.webURL+aG}else{if(aE.webURL.length>0){aG=aE.webURL+Q+aG}else{aG=ak().SPServices.SPGetCurrentSite()+Q+aG}}T.payload="";switch(aE.operation){case"GetAlerts":break;case"DeleteAlerts":T.payload+="";for(aD=0;aD";break;case"Mode":break;case"Login":ap(aE,["username","password"]);break;case"CopyIntoItems":ap(aE,["SourceUrl"]);T.payload+="";for(aD=0;aD";ap(aE,["Fields","Stream","Results"]);break;case"CopyIntoItemsLocal":ap(aE,["SourceUrl"]);T.payload+="";for(aD=0;aD";break;case"GetItem":ap(aE,["Url","Fields","Stream"]);break;case"GetForm":ap(aE,["listName","formUrl"]);break;case"GetFormCollection":ap(aE,["listName"]);break;case"AddAttachment":ap(aE,["listName","listItemID","fileName","attachment"]);break;case"AddDiscussionBoardItem":ap(aE,["listName","message"]);break;case"AddList":ap(aE,["listName","description","templateID"]);break;case"AddListFromFeature":ap(aE,["listName","description","featureID","templateID"]);break;case"ApplyContentTypeToList":ap(aE,["webUrl","contentTypeId","listName"]);break;case"CheckInFile":ap(aE,["pageUrl","comment","CheckinType"]);break;case"CheckOutFile":ap(aE,["pageUrl","checkoutToLocal","lastmodified"]);break;case"CreateContentType":ap(aE,["listName","displayName","parentType","fields","contentTypeProperties","addToView"]);break;case"DeleteAttachment":ap(aE,["listName","listItemID","url"]);break;case"DeleteContentType":ap(aE,["listName","contentTypeId"]);break;case"DeleteContentTypeXmlDocument":ap(aE,["listName","contentTypeId","documentUri"]);break;case"DeleteList":ap(aE,["listName"]);break;case"GetAttachmentCollection":ap(aE,["listName",["listItemID","ID"]]);break;case"GetList":ap(aE,["listName"]);break;case"GetListAndView":ap(aE,["listName","viewName"]);break;case"GetListCollection":break;case"GetListContentType":ap(aE,["listName","contentTypeId"]);break;case"GetListContentTypes":ap(aE,["listName"]);break;case"GetListItems":ap(aE,["listName","viewName",["query","CAMLQuery"],["viewFields","CAMLViewFields"],["rowLimit","CAMLRowLimit"],["queryOptions","CAMLQueryOptions"]]);break;case"GetListItemChanges":ap(aE,["listName","viewFields","since","contains"]);break;case"GetListItemChangesSinceToken":ap(aE,["listName","viewName","query","viewFields","rowLimit","queryOptions","changeToken","contains"]);break;case"GetVersionCollection":ap(aE,["strlistID","strlistItemID","strFieldName"]);break;case"UndoCheckOut":ap(aE,["pageUrl"]);break;case"UpdateContentType":ap(aE,["listName","contentTypeId","contentTypeProperties","newFields","updateFields","deleteFields","addToView"]);break;case"UpdateContentTypesXmlDocument":ap(aE,["listName","newDocument"]);break;case"UpdateContentTypeXmlDocument":ap(aE,["listName","contentTypeId","newDocument"]);break;case"UpdateList":ap(aE,["listName","listProperties","newFields","updateFields","deleteFields","listVersion"]);break;case"UpdateListItems":ap(aE,["listName"]);if(typeof aE.updates!=="undefined"&&aE.updates.length>0){ap(aE,["updates"])}else{T.payload+="";for(aD=0;aD"+L(aE.valuepairs[aD][1])+""}if(aE.batchCmd!=="New"){T.payload+=""+aE.ID+""}T.payload+=""}break;case"AddMeeting":ap(aE,["organizerEmail","uid","sequence","utcDateStamp","title","location","utcDateStart","utcDateEnd","nonGregorian"]);break;case"CreateWorkspace":ap(aE,["title","templateName","lcid","timeZoneInformation"]);break;case"RemoveMeeting":ap(aE,["recurrenceId","uid","sequence","utcDateStamp","cancelMeeting"]);break;case"SetWorkspaceTitle":ap(aE,["title"]);break;case"ResolvePrincipals":ap(aE,["principalKeys","principalType","addToUserInfoList"]);break;case"SearchPrincipals":ap(aE,["searchText","maxResults","principalType"]);break;case"AddPermission":ap(aE,["objectName","objectType","permissionIdentifier","permissionType","permissionMask"]);break;case"AddPermissionCollection":ap(aE,["objectName","objectType","permissionsInfoXml"]);break;case"GetPermissionCollection":ap(aE,["objectName","objectType"]);break;case"RemovePermission":ap(aE,["objectName","objectType","permissionIdentifier","permissionType"]);break;case"RemovePermissionCollection":ap(aE,["objectName","objectType","memberIdsXml"]);break;case"UpdatePermission":ap(aE,["objectName","objectType","permissionIdentifier","permissionType","permissionMask"]);break;case"GetLinks":break;case"GetPortalSearchInfo":T.opheader="<"+aE.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";ab="http://microsoft.com/webservices/OfficeServer/QueryService/"+aE.operation;break;case"GetQuerySuggestions":T.opheader="<"+aE.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";ab="http://microsoft.com/webservices/OfficeServer/QueryService/"+aE.operation;T.payload+=au("queryXml",h(aE.queryXml));break;case"GetSearchMetadata":T.opheader="<"+aE.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";ab="http://microsoft.com/webservices/OfficeServer/QueryService/"+aE.operation;break;case"Query":T.payload+=au("queryXml",h(aE.queryXml));break;case"QueryEx":T.opheader="<"+aE.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";ab="http://microsoft.com/webservices/OfficeServer/QueryService/"+aE.operation;T.payload+=au("queryXml",h(aE.queryXml));break;case"Registration":T.payload+=au("registrationXml",h(aE.registrationXml));break;case"Status":break;case"SPQuery":T.payload+=au("queryXml",h(aE.queryXml));break;case"SPQueryEx":T.opheader="<"+aE.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";ab="http://microsoft.com/webservices/OfficeServer/QueryService/"+aE.operation;T.payload+=au("queryXml",h(aE.queryXml));break;case"SendClientScriptErrorReport":ap(aE,["message","file","line","client","stack","team","originalFile"]);break;case"EnumerateFolder":ap(aE,["strFolderUrl"]);break;case"GetAttachments":ap(aE,["strListName","strItemId"]);break;case"SiteDataGetList":ap(aE,["strListName"]);T=j(T,aE.operation);break;case"SiteDataGetListCollection":T=j(T,aE.operation);break;case"SiteDataGetSite":T=j(T,aE.operation);break;case"SiteDataGetSiteUrl":ap(aE,["Url"]);T=j(T,aE.operation);break;case"SiteDataGetWeb":T=j(T,aE.operation);break;case"CreateWeb":ap(aE,["url","title","description","templateName","language","languageSpecified","locale","localeSpecified","collationLocale","collationLocaleSpecified","uniquePermissions","uniquePermissionsSpecified","anonymous","anonymousSpecified","presence","presenceSpecified"]);break;case"DeleteWeb":ap(aE,["url"]);break;case"GetSite":ap(aE,["SiteUrl"]);break;case"GetSiteTemplates":ap(aE,["LCID","TemplateList"]);break;case"AddComment":ap(aE,["url","comment","isHighPriority","title"]);break;case"AddTag":ap(aE,["url","termID","title","isPrivate"]);break;case"AddTagByKeyword":ap(aE,["url","keyword","title","isPrivate"]);break;case"CountCommentsOfUser":ap(aE,["userAccountName"]);break;case"CountCommentsOfUserOnUrl":ap(aE,["userAccountName","url"]);break;case"CountCommentsOnUrl":ap(aE,["url"]);break;case"CountRatingsOnUrl":ap(aE,["url"]);break;case"CountTagsOfUser":ap(aE,["userAccountName"]);break;case"DeleteComment":ap(aE,["url","lastModifiedTime"]);break;case"DeleteRating":ap(aE,["url"]);break;case"DeleteTag":ap(aE,["url","termID"]);break;case"DeleteTagByKeyword":ap(aE,["url","keyword"]);break;case"DeleteTags":ap(aE,["url"]);break;case"GetAllTagTerms":ap(aE,["maximumItemsToReturn"]);break;case"GetAllTagTermsForUrlFolder":ap(aE,["urlFolder","maximumItemsToReturn"]);break;case"GetAllTagUrls":ap(aE,["termID"]);break;case"GetAllTagUrlsByKeyword":ap(aE,["keyword"]);break;case"GetCommentsOfUser":ap(aE,["userAccountName","maximumItemsToReturn","startIndex"]);break;case"GetCommentsOfUserOnUrl":ap(aE,["userAccountName","url"]);break;case"GetCommentsOnUrl":ap(aE,["url","maximumItemsToReturn","startIndex"]);if(typeof aE.excludeItemsTime!=="undefined"&&aE.excludeItemsTime.length>0){T.payload+=au("excludeItemsTime",aE.excludeItemsTime)}break;case"GetRatingAverageOnUrl":ap(aE,["url"]);break;case"GetRatingOfUserOnUrl":ap(aE,["userAccountName","url"]);break;case"GetRatingOnUrl":ap(aE,["url"]);break;case"GetRatingsOfUser":ap(aE,["userAccountName"]);break;case"GetRatingsOnUrl":ap(aE,["url"]);break;case"GetSocialDataForFullReplication":ap(aE,["userAccountName"]);break;case"GetTags":ap(aE,["url"]);break;case"GetTagsOfUser":ap(aE,["userAccountName","maximumItemsToReturn","startIndex"]);break;case"GetTagTerms":ap(aE,["maximumItemsToReturn"]);break;case"GetTagTermsOfUser":ap(aE,["userAccountName","maximumItemsToReturn"]);break;case"GetTagTermsOnUrl":ap(aE,["url","maximumItemsToReturn"]);break;case"GetTagUrls":ap(aE,["termID"]);break;case"GetTagUrlsByKeyword":ap(aE,["keyword"]);break;case"GetTagUrlsOfUser":ap(aE,["termID","userAccountName"]);break;case"GetTagUrlsOfUserByKeyword":ap(aE,["keyword","userAccountName"]);break;case"SetRating":ap(aE,["url","rating","title","analysisDataEntry"]);break;case"UpdateComment":ap(aE,["url","lastModifiedTime","comment","isHighPriority"]);break;case"SpellCheck":ap(aE,["chunksToSpell","declaredLanguage","useLad"]);break;case"AddTerms":ap(aE,["sharedServiceId","termSetId","lcid","newTerms"]);break;case"GetChildTermsInTerm":ap(aE,["sspId","lcid","termId","termSetId"]);break;case"GetChildTermsInTermSet":ap(aE,["sspId","lcid","termSetId"]);break;case"GetKeywordTermsByGuids":ap(aE,["termIds","lcid"]);break;case"GetTermsByLabel":ap(aE,["label","lcid","matchOption","resultCollectionSize","termIds","addIfNotFound"]);break;case"GetTermSets":ap(aE,["sharedServiceId","termSetId","lcid","clientTimeStamps","clientVersions"]);break;case"AddGroup":ap(aE,["groupName","ownerIdentifier","ownerType","defaultUserLoginName","description"]);break;case"AddGroupToRole":ap(aE,["groupName","roleName"]);break;case"AddRole":ap(aE,["roleName","description","permissionMask"]);break;case"AddRoleDef":ap(aE,["roleName","description","permissionMask"]);break;case"AddUserCollectionToGroup":ap(aE,["groupName","usersInfoXml"]);break;case"AddUserCollectionToRole":ap(aE,["roleName","usersInfoXml"]);break;case"AddUserToGroup":ap(aE,["groupName","userName","userLoginName","userEmail","userNotes"]);break;case"AddUserToRole":ap(aE,["roleName","userName","userLoginName","userEmail","userNotes"]);break;case"GetAllUserCollectionFromWeb":break;case"GetGroupCollection":ap(aE,["groupNamesXml"]);break;case"GetGroupCollectionFromRole":ap(aE,["roleName"]);break;case"GetGroupCollectionFromSite":break;case"GetGroupCollectionFromUser":ap(aE,["userLoginName"]);break;case"GetGroupCollectionFromWeb":break;case"GetGroupInfo":ap(aE,["groupName"]);break;case"GetRoleCollection":ap(aE,["roleNamesXml"]);break;case"GetRoleCollectionFromGroup":ap(aE,["groupName"]);break;case"GetRoleCollectionFromUser":ap(aE,["userLoginName"]);break;case"GetRoleCollectionFromWeb":break;case"GetRoleInfo":ap(aE,["roleName"]);break;case"GetRolesAndPermissionsForCurrentUser":break;case"GetRolesAndPermissionsForSite":break;case"GetUserCollection":ap(aE,["userLoginNamesXml"]);break;case"GetUserCollectionFromGroup":ap(aE,["groupName"]);break;case"GetUserCollectionFromRole":ap(aE,["roleName"]);break;case"GetUserCollectionFromSite":break;case"GetUserCollectionFromWeb":break;case"GetUserInfo":ap(aE,["userLoginName"]);break;case"GetUserLoginFromEmail":ap(aE,["emailXml"]);break;case"RemoveGroup":ap(aE,["groupName"]);break;case"RemoveGroupFromRole":ap(aE,["roleName","groupName"]);break;case"RemoveRole":ap(aE,["roleName"]);break;case"RemoveUserCollectionFromGroup":ap(aE,["groupName","userLoginNamesXml"]);break;case"RemoveUserCollectionFromRole":ap(aE,["roleName","userLoginNamesXml"]);break;case"RemoveUserCollectionFromSite":ap(aE,["userLoginNamesXml"]);break;case"RemoveUserFromGroup":ap(aE,["groupName","userLoginName"]);break;case"RemoveUserFromRole":ap(aE,["roleName","userLoginName"]);break;case"RemoveUserFromSite":ap(aE,["userLoginName"]);break;case"RemoveUserFromWeb":ap(aE,["userLoginName"]);break;case"UpdateGroupInfo":ap(aE,["oldGroupName","groupName","ownerIdentifier","ownerType","description"]);break;case"UpdateRoleDefInfo":ap(aE,["oldRoleName","roleName","description","permissionMask"]);break;case"UpdateRoleInfo":ap(aE,["oldRoleName","roleName","description","permissionMask"]);break;case"UpdateUserInfo":ap(aE,["userLoginName","userName","userEmail","userNotes"]);break;case"AddColleague":ap(aE,["accountName","colleagueAccountName","group","privacy","isInWorkGroup"]);break;case"AddLink":ap(aE,["accountName","name","url","group","privacy"]);break;case"AddMembership":ap(aE,["accountName","membershipInfo","group","privacy"]);break;case"AddPinnedLink":ap(aE,["accountName","name","url"]);break;case"CreateMemberGroup":ap(aE,["membershipInfo"]);break;case"CreateUserProfileByAccountName":ap(aE,["accountName"]);break;case"GetCommonColleagues":ap(aE,["accountName"]);break;case"GetCommonManager":ap(aE,["accountName"]);break;case"GetCommonMemberships":ap(aE,["accountName"]);break;case"GetInCommon":ap(aE,["accountName"]);break;case"GetPropertyChoiceList":ap(aE,["propertyName"]);break;case"GetUserColleagues":ap(aE,["accountName"]);break;case"GetUserLinks":ap(aE,["accountName"]);break;case"GetUserMemberships":ap(aE,["accountName"]);break;case"GetUserPinnedLinks":ap(aE,["accountName"]);break;case"GetUserProfileByGuid":ap(aE,["guid"]);break;case"GetUserProfileByIndex":ap(aE,["index"]);break;case"GetUserProfileByName":if(typeof aE.accountName!=="undefined"&&aE.accountName.length>0){ap(aE,[["AccountName","accountName"]])}else{ap(aE,["AccountName"])}break;case"GetUserProfileCount":break;case"GetUserProfileSchema":break;case"ModifyUserPropertyByAccountName":ap(aE,["accountName","newData"]);break;case"RemoveAllColleagues":ap(aE,["accountName"]);break;case"RemoveAllLinks":ap(aE,["accountName"]);break;case"RemoveAllMemberships":ap(aE,["accountName"]);break;case"RemoveAllPinnedLinks":ap(aE,["accountName"]);break;case"RemoveColleague":ap(aE,["accountName","colleagueAccountName"]);break;case"RemoveLink":ap(aE,["accountName","id"]);break;case"RemoveMembership":ap(aE,["accountName","sourceInternal","sourceReference"]);break;case"RemovePinnedLink":ap(aE,["accountName","id"]);break;case"UpdateColleaguePrivacy":ap(aE,["accountName","colleagueAccountName","newPrivacy"]);break;case"UpdateLink":ap(aE,["accountName","data"]);break;case"UpdateMembershipPrivacy":ap(aE,["accountName","sourceInternal","sourceReference","newPrivacy"]);break;case"UpdatePinnedLink ":ap(aE,["accountName","data"]);break;case"DeleteAllVersions":ap(aE,["fileName"]);break;case"DeleteVersion":ap(aE,["fileName","fileVersion"]);break;case"GetVersions":ap(aE,["fileName"]);break;case"RestoreVersion":ap(aE,["fileName","fileVersion"]);break;case"AddView":ap(aE,["listName","viewName","viewFields","query","rowLimit","rowLimit","type","makeViewDefault"]);break;case"DeleteView":ap(aE,["listName","viewName"]);break;case"GetView":ap(aE,["listName","viewName"]);break;case"GetViewCollection":ap(aE,["listName"]);break;case"GetViewHtml":ap(aE,["listName","viewName"]);break;case"UpdateView":ap(aE,["listName","viewName","viewProperties","query","viewFields","aggregations","formats","rowLimit"]);break;case"UpdateViewHtml":ap(aE,["listName","viewName","viewProperties","toolbar","viewHeader","viewBody","viewFooter","viewEmpty","rowLimitExceeded","query","viewFields","aggregations","formats","rowLimit"]);break;case"AddWebPart":ap(aE,["pageUrl","webPartXml","storage"]);break;case"AddWebPartToZone":ap(aE,["pageUrl","webPartXml","storage","zoneId","zoneIndex"]);break;case"GetWebPart2":ap(aE,["pageUrl","storageKey","storage","behavior"]);break;case"GetWebPartPage":ap(aE,["documentName","behavior"]);break;case"GetWebPartProperties":ap(aE,["pageUrl","storage"]);break;case"GetWebPartProperties2":ap(aE,["pageUrl","storage","behavior"]);break;case"Webs.CreateContentType":ap(aE,["displayName","parentType","newFields","contentTypeProperties"]);break;case"GetColumns":ap(aE,["webUrl"]);break;case"GetContentType":ap(aE,["contentTypeId"]);break;case"GetContentTypes":break;case"GetCustomizedPageStatus":ap(aE,["fileUrl"]);break;case"GetListTemplates":break;case"GetObjectIdFromUrl":ap(aE,["objectUrl"]);break;case"GetWeb":ap(aE,[["webUrl","webURL"]]);break;case"GetWebCollection":break;case"GetAllSubWebCollection":break;case"UpdateColumns":ap(aE,["newFields","updateFields","deleteFields"]);break;case"Webs.UpdateContentType":ap(aE,["contentTypeId","contentTypeProperties","newFields","updateFields","deleteFields"]);break;case"WebUrlFromPageUrl":ap(aE,[["pageUrl","pageURL"]]);break;case"AlterToDo":ap(aE,["item","todoId","todoListId","taskData"]);break;case"GetTemplatesForItem":ap(aE,["item"]);break;case"GetToDosForItem":ap(aE,["item"]);break;case"GetWorkflowDataForItem":ap(aE,["item"]);break;case"GetWorkflowTaskData":ap(aE,["item","listId","taskId"]);break;case"StartWorkflow":ap(aE,["item","templateId","workflowParameters"]);break;default:break}var aH=T.header+T.opheader+T.payload+T.opfooter+T.footer;var aF;if(aE.cacheXML){aF=B[aH]}var aB=ak.isFunction(aE.completefunc);if(typeof aF==="undefined"){B[aH]=ak.ajax({url:aG,async:aB?false:aE.async,beforeSend:function(i){if(U[aE.operation][1]){i.setRequestHeader("SOAPAction",ab)}},type:"POST",data:aH,dataType:"xml",contentType:"text/xml;charset='utf-8'",complete:function(aI,i){if(aB){aE.completefunc(aI,i)}}});return B[aH]}else{if(aB){aE.completefunc(aF,null)}return aF}};ak.fn.SPServices.defaults={cacheXML:false,operation:"",webURL:"",makeViewDefault:false,CAMLViewName:"",CAMLQuery:"",CAMLViewFields:"",CAMLRowLimit:0,CAMLQueryOptions:"",batchCmd:"Update",valuepairs:[],DestinationUrls:[],behavior:"Version3",storage:"Shared",objectType:"List",cancelMeeting:true,nonGregorian:false,fClaim:false,recurrenceId:0,sequence:0,maximumItemsToReturn:0,startIndex:0,isHighPriority:false,isPrivate:false,rating:1,maxResults:10,principalType:"User",async:true,completefunc:null};ak.fn.SPServices.SPGetCurrentSite=function(){if(ao.thisSite.length>0){return ao.thisSite}var i=T.header+""+location.protocol+"//"+location.host+location.pathname+""+T.footer;ak.ajax({async:false,url:"/_vti_bin/Webs.asmx",type:"POST",data:i,dataType:"xml",contentType:'text/xml;charset="utf-8"',complete:function(aB){ao.thisSite=ak(aB.responseXML).find("WebUrlFromPageUrlResult").text()}});return ao.thisSite};ak.fn.SPServices.SPCascadeDropdowns=function(aJ){var aB=ak.extend({},{relationshipWebURL:"",relationshipList:"",relationshipListParentColumn:"",relationshipListChildColumn:"",relationshipListSortColumn:"",parentColumn:"",childColumn:"",listName:ak().SPServices.SPListNameFromUrl(),CAMLQuery:"",CAMLQueryOptions:"FALSE",promptText:"",noneText:"(None)",simpleChild:false,selectSingleOption:false,matchOnId:false,completefunc:null,debug:false},aJ);var aD=false;var aH="SPServices.SPCascadeDropdowns";var aE=new aq(aB.parentColumn);if(aE.Obj.html()===null&&aB.debug){X(aH,"parentColumn: "+aB.parentColumn,ah);return}var i=new aq(aB.childColumn);if(i.Obj.html()===null&&aB.debug){X(aH,"childColumn: "+aB.childColumn,ah);return}if(aB.simpleChild===true&&i.Type==="C"){ak().SPServices.SPComplexToSimpleDropdown({columnName:aB.childColumn});i=new aq(aB.childColumn)}var aI,aG;ak().SPServices({operation:"GetList",async:false,cacheXML:true,listName:aB.listName,completefunc:function(aK){ak(aK.responseXML).find("Fields").each(function(){ak(this).find("Field[DisplayName='"+aB.childColumn+"']").each(function(){aI=(ak(this).attr("Required")==="TRUE")?true:false;aG=ak(this).attr("StaticName");return false})})}});var aF={opt:aB,childSelect:i,childColumnStatic:aG,childColumnRequired:aI};var aC=aE.Obj.data("SPCascadeDropdownsChildColumns");if(typeof aC==="undefined"){aE.Obj.data("SPCascadeDropdownsChildColumns",[aF])}else{aC.push(aF);aE.Obj.data("SPCascadeDropdownsChildColumns",aC);aD=true}if(!aD){switch(aE.Type){case"S":aE.Obj.bind("change",function(){ax(aB.parentColumn,aE)});break;case"C":ak("input[id='"+aE.Obj.attr("optHid")+"']").bind("propertychange",function(){ax(aB.parentColumn,aE)});break;case"M":aE.Obj.bind("dblclick",function(){ax(aB.parentColumn,aE)});aE.Obj.closest("span").find("select[id$='SelectResult']").bind("dblclick",function(){ax(aB.parentColumn,aE)});aE.Obj.closest("span").find("button").each(function(){ak(this).bind("click",function(){ax(aB.parentColumn,aE)})});break;default:break}}ax(aB.parentColumn,aE)};function ax(aL,aF){var aM="";var aE;var aH=null;var aC;var aI;var i;var aK;var aG;var aJ;var aD;var aB=aF.Obj.data("SPCascadeDropdownsChildColumns");ak(aB).each(function(){var aP=this.opt;var aO=this.childSelect;var aT=this.childColumnStatic;var aU=this.childColumnRequired;var aR;aE=c(aF,aP.matchOnId);var aS=aE.join(";#");if(aF.Obj.data("SPCascadeDropdown_Selected_"+aT)===aS){return}aF.Obj.data("SPCascadeDropdown_Selected_"+aT,aS);aH=c(aO,true);if(aO.Type==="M"){aC=new az(aO.Obj);aI=aC.MultiLookupPickerdata;i=aC.master;aR=aO.Obj.closest("span").find("select[ID$='SelectResult']")}var aQ=(aP.relationshipListSortColumn.length>0)?aP.relationshipListSortColumn:aP.relationshipListChildColumn;var aN="";if(aP.CAMLQuery.length>0){aN+=""}if(aE.length===0){aN+=""}else{if(aE.length===1){aN+="":"'/>")+L(aE[0])+""}else{var aV=(aE.length>2)?true:false;for(O=0;O<(aE.length-1);O++){aN+=""}for(O=0;O":"'/>")+L(aE[O])+"";if(O>0&&(O<(aE.length-1))&&aV){aN+=""}}aN+=""}}if(aP.CAMLQuery.length>0){aN+=aP.CAMLQuery+""}aN+="";aN+="";ak().SPServices({operation:"GetListItems",async:false,webURL:aP.relationshipWebURL,listName:aP.relationshipList,CAMLQuery:aN,CAMLViewFields:"",CAMLRowLimit:0,CAMLQueryOptions:aP.CAMLQueryOptions,completefunc:function(aW){ak(aW.responseXML).find("errorstring").each(function(){var aY="SPServices.SPCascadeDropdowns";var aX=ak(this).text();if(aP.debug&&aX==="One or more field types are not installed properly. Go to the list settings page to delete these fields."){X(aY,"relationshipListParentColumn: "+aP.relationshipListParentColumn+" or relationshipListChildColumn: "+aP.relationshipListChildColumn,"Not found in relationshipList "+aP.relationshipList)}else{if(aP.debug&&aX==="Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."){X(aY,"relationshipList: "+aP.relationshipList,"List not found")}}return});switch(aO.Type){case"S":ak(aO.Obj).find("option").remove();if(!aU&&(aP.promptText.length>0)){aO.Obj.append("")}else{if(!aU){aO.Obj.append("")}}break;case"C":aM=aU?"":aP.noneText+"|0";aO.Obj.attr("value","");break;case"M":ak(aO.Obj).find("option").remove();aK="";break;default:break}aG=parseFloat(ak(aW.responseXML).SPFilterNode("rs:data").attr("ItemCount"));ak(aW.responseXML).SPFilterNode("z:row").each(function(){var aY={};var aX=ak(this).attr("ows_"+aP.relationshipListChildColumn);if(typeof aX!=="undefined"&&aX.indexOf(";#")>0){aY=new m(aX)}else{aY.id=ak(this).attr("ows_ID");aY.value=aX}if(isNaN(aY.id)){aY.id=ak(this).attr("ows_ID")}aJ=aY.id;aD=aY.value;switch(aO.Type){case"S":var aZ=(ak(this).attr("ows_ID")===aH[0])?" selected='selected'":"";aO.Obj.append(""+aY.value+"");break;case"C":if(aY.id===aH[0]){aO.Obj.attr("value",aY.value)}aM=aM+((aM.length>0)?"|":"")+aY.value+"|"+aY.id;break;case"M":aO.Obj.append("");aK+=aY.id+"|t"+aY.value+"|t |t |t";break;default:break}});switch(aO.Type){case"S":aO.Obj.trigger("change");if(aG===1&&aP.selectSingleOption===true){ak(aO.Obj).find("option[value!='0']:first").attr("selected","selected")}break;case"C":aO.Obj.attr("choices",aM);if(aG===1&&aP.selectSingleOption===true){ak(aO.Obj).attr("value",aD);ak("input[id='"+aO.Obj.attr("optHid")+"']").val(aJ)}if(aO.Obj.val()===""){ak("input[id='"+aO.Obj.attr("optHid")+"']").val("")}break;case"M":i.data="";aI.attr("value",aK);ak(aR).find("option").each(function(){var aY=ak(this);var aX=ak(this).html();ak(this).attr("selected","selected");ak(aO.Obj).find("option").filter(function(){return ak(this).text()===aX.replace(/&/,"&")}).each(function(){if(ak(this).html()===aX){aY.removeAttr("selected")}})});GipRemoveSelectedItems(i);ak(aO.Obj).find("option").each(function(){var aX=ak(this);ak(aR).find("option").each(function(){if(ak(this).html()===aX.html()){aX.remove()}})});GipAddSelectedItems(i);i.data=GipGetGroupData(aK);aO.Obj.trigger("dblclick");break;default:break}}});if(aP.completefunc!==null){aP.completefunc()}})}ak.fn.SPServices.SPComplexToSimpleDropdown=function(aJ){var i=ak.extend({},{columnName:"",completefunc:null,debug:false},aJ);var aC=new aq(i.columnName);if(aC.Obj.html()===null&&i.debug){X("SPServices.SPComplexToSimpleDropdown","columnName: "+i.columnName,ah);return}if(aC.Type!=="C"){return}var aH=ak(aC.Obj).attr("choices").split("|");var aD=ak(aC.Obj).attr("optHid");var aI=ak("input[id='"+aD+"']");var aB=ak("input[id='"+aD+"']").val();var aE=ad("SPComplexToSimpleDropdown",i.columnName);var aG="";ak(aC.Obj).closest("td").prepend(aG);ak(aC.Obj).closest("span").find("img").remove();ak(aC.Obj).closest("span").find("input").hide();ak("#"+aE).change(function(){var aK=ak(this).val();aI.val(aK);ak(aC.Obj).val(ak(this).find("option[value='"+(aK!=="0"?aK:"")+"']").html())});ak("#"+aE).trigger("change");if(i.completefunc!==null){i.completefunc()}};ak.fn.SPServices.SPDisplayRelatedInfo=function(aB){var aD=ak.extend({},{columnName:"",relatedWebURL:"",relatedList:"",relatedListColumn:"",relatedColumns:[],displayFormat:"table",headerCSSClass:"ms-vh2",rowCSSClass:"ms-vb",CAMLQuery:"",numChars:0,matchType:"Eq",matchOnId:false,completefunc:null,debug:false},aB);var i;var aC=[];var aG;var aF="SPServices.SPDisplayRelatedInfo";var aE=new aq(aD.columnName);if(aE.Obj.html()===null&&aD.debug){X(aF,"columnName: "+aD.columnName,ah);return}i=ad("SPDisplayRelatedInfo",aD.columnName);ak().SPServices({operation:"GetList",async:false,cacheXML:true,webURL:aD.relatedWebURL,listName:aD.relatedList,completefunc:function(aH){ak(aH.responseXML).find("faultcode").each(function(){if(aD.debug){X(aF,"relatedList: "+aD.relatedList,"List not found");return}});aG=ak(aH.responseXML).find("List");aC[aD.relatedListColumn]=ak(aH.responseXML).find("Fields > Field[Name='"+aD.relatedColumn+"']");for(O=0;O Field[Name='"+aD.relatedColumns[O]+"']")}}});switch(aE.Type){case"S":aE.Obj.bind("change",function(){af(aD,i,aG,aC)});break;case"C":ak("input[id='"+aE.Obj.attr("optHid")+"']").bind("propertychange",function(){af(aD,i,aG,aC)});break;case"M":if(aD.debug){X(aF,"columnName: "+aD.columnName,"Multi-select columns not supported by this function")}break;default:break}af(aD,i,aG,aC)};function af(aC,aG,aI,aD){var aJ=null;var aF="SPServices.SPDisplayRelatedInfo";var aE=new aq(aC.columnName);aJ=c(aE,aC.matchOnId);if(aE.Type==="C"&&aC.numChars>0&&aJ[0].length");var i="";if(aC.CAMLQuery.length>0){i+=""}var aB=aD[aC.relatedListColumn].attr("Type");if(aB==="Lookup"){i+="":"'/>")+L(aJ[0])+""}else{i+="":aC.relatedListColumn+"'/>")+L(aJ[0])+""}if(aC.CAMLQuery.length>0){i+=aC.CAMLQuery+""}i+="";var aH=" ";for(O=0;O"}ak().SPServices({operation:"GetListItems",async:false,webURL:aC.relatedWebURL,listName:aC.relatedList,CAMLQuery:i,CAMLViewFields:""+aH+"",CAMLRowLimit:0,completefunc:function(aL){ak(aL.responseXML).find("errorstring").each(function(){var aM=ak(this).text();if(aC.debug&&aM==="One or more field types are not installed properly. Go to the list settings page to delete these fields."){X(aF,"relatedListColumn: "+aC.relatedListColumn,"Column not found in relatedList "+aC.relatedList)}else{if(aC.debug&&aM==="Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."){X(aF,"relatedList: "+aC.relatedList,"List not found")}}return});var aK;switch(aC.displayFormat){case"table":aK="";aK+="";for(O=0;O"+aD[aC.relatedColumns[O]].attr("DisplayName")+""}aK+="";ak(aL.responseXML).SPFilterNode("z:row").each(function(){aK+="";for(O=0;O"+W(aI,aD[aC.relatedColumns[O]],ak(this).attr("ows_"+aC.relatedColumns[O]),aC)+""}aK+=""});aK+="
";break;case"list":aK="";ak(aL.responseXML).SPFilterNode("z:row").each(function(){for(O=0;O"+aD[aC.relatedColumns[O]].attr("DisplayName")+"";aK+="";aK+=""}});aK+="
"+W(aI,aD[aC.relatedColumns[O]],ak(this).attr("ows_"+aC.relatedColumns[O]),aC)+"
";break;default:break}ak("#"+aG).html(aK)}});if(aC.completefunc!==null){aC.completefunc()}}ak.fn.SPServices.SPFilterDropdown=function(aN){var aC=ak.extend({},{relationshipWebURL:"",relationshipList:"",relationshipListColumn:"",relationshipListSortColumn:"",relationshipListSortAscending:true,columnName:"",listName:ak().SPServices.SPListNameFromUrl(),promptText:"",noneText:"(None)",CAMLQuery:"",CAMLQueryOptions:"FALSE",completefunc:null,debug:false},aN);var aM="";var aL=null;var aF;var aG;var aB;var aK;var aJ;var aI="SPServices.SPFilterDropdown";var aH=new aq(aC.columnName);if(aH.Obj.html()===null&&aC.debug){X(aI,"columnName: "+aC.columnName,ah);return}aL=c(aH,true);var aE=(aC.relationshipListSortColumn.length>0)?aC.relationshipListSortColumn:aC.relationshipListColumn;var aD=(aC.relationshipListSortAscending===true)?"":"Ascending='FALSE'";var i="";if(aC.CAMLQuery.length>0){i+=aC.CAMLQuery}i+="";ak().SPServices({operation:"GetList",async:false,cacheXML:true,listName:aC.listName,completefunc:function(aO){ak(aO.responseXML).find("Fields").each(function(){ak(this).find("Field[DisplayName='"+aC.columnName+"']").each(function(){aJ=(ak(this).attr("Required")==="TRUE")?true:false;return false})})}});ak().SPServices({operation:"GetListItems",async:false,webURL:aC.relationshipWebURL,listName:aC.relationshipList,CAMLQuery:i,CAMLViewFields:"",CAMLRowLimit:0,CAMLQueryOptions:aC.CAMLQueryOptions,completefunc:function(aP){ak(aP.responseXML).find("errorstring").each(function(){var aQ=ak(this).text();if(aC.debug&&aQ==="One or more field types are not installed properly. Go to the list settings page to delete these fields."){X(aI,"relationshipListColumn: "+aC.relationshipListColumn,"Not found in relationshipList "+aC.relationshipList)}else{if(aC.debug&&aQ==="Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."){X(aI,"relationshipList: "+aC.relationshipList,"List not found")}}return});switch(aH.Type){case"S":ak(aH.Obj).find("option").remove();if(!aJ&&(aC.promptText.length>0)){aH.Obj.append("")}else{if(!aJ){aH.Obj.append("")}}break;case"C":aM=aJ?"":aC.noneText+"|0";aH.Obj.attr("value","");break;case"M":ak(aH.Obj).find("option").remove();aK="";break;default:break}ak(aP.responseXML).SPFilterNode("z:row").each(function(){var aR={};var aQ=ak(this).attr("ows_"+aC.relationshipListColumn);if(typeof aQ!=="undefined"&&aQ.indexOf(";#")>0){aR=new m(aQ)}else{aR.id=ak(this).attr("ows_ID");aR.value=aQ}if(isNaN(aR.id)){aR.id=ak(this).attr("ows_ID")}switch(aH.Type){case"S":var aS=(ak(this).attr("ows_ID")===aL[0])?" selected='selected'":"";aH.Obj.append(""+aR.value+"");break;case"C":if(aR.id===aL[0]){aH.Obj.attr("value",aR.value)}aM=aM+((aM.length>0)?"|":"")+aR.value+"|"+aR.id;break;case"M":aH.Obj.append("");aK+=aR.id+"|t"+aR.value+"|t |t |t";break;default:break}});switch(aH.Type){case"S":aH.Obj.trigger("change");break;case"C":aH.Obj.attr("choices",aM);aH.Obj.trigger("propertychange");break;case"M":aF=new az(aH.Obj);aG=aF.MultiLookupPickerdata;aB=aF.master;var aO=aH.Obj.closest("span").find("select[ID$='SelectResult']");aB.data="";aG.attr("value",aK);ak(aO).find("option").each(function(){var aQ=ak(this);ak(this).attr("selected","selected");ak(aH.Obj).find("option").each(function(){if(ak(this).html()===aQ.html()){aQ.removeAttr("selected")}})});GipRemoveSelectedItems(aB);ak(aH.Obj).find("option").each(function(){var aQ=ak(this);ak(aO).find("option").each(function(){if(ak(this).html()===aQ.html()){aQ.remove()}})});GipAddSelectedItems(aB);aB.data=GipGetGroupData(aK);aH.Obj.trigger("dblclick");break;default:break}}});if(aC.completefunc!==null){aC.completefunc()}};ak.fn.SPServices.SPDebugXMLHttpResult=function(aC){var aE=ak.extend({},{node:null,indent:0},aC);var aD;var aG=3;var aF=4;var aB="";aB+="";if(aE.node.nodeName==="DisplayPattern"){aB+=""}else{if(!aE.node.hasChildNodes()){aB+="";if(aE.node.attributes){aB+=""}}else{if(aE.node.hasChildNodes()&&aE.node.firstChild.nodeType===aF){aB+=""}else{if(aE.node.hasChildNodes()&&aE.node.firstChild.nodeType===aG){aB+=""}else{aB+="";if(aE.node.attributes){aB+=""}aB+=""}}}}aB+="
"+aE.node.nodeName+"
"+aE.node.nodeName+""+((aE.node.nodeValue!==null)?N(aE.node.nodeValue):" ")+"
"+s(aE.node)+"
"+aE.node.nodeName+"
"+aE.node.nodeName+""+N(aE.node.firstChild.nodeValue)+"
"+aE.node.nodeName+"
"+s(aE.node)+"
";for(aD=0;aD
";return aB};ak.fn.SPServices.SPGetCurrentUser=function(aE){var aG=ak.extend({},{webURL:"",fieldName:"Name",fieldNames:{},debug:false},aE);if(aG.fieldName==="ID"&&typeof ao.thisUserId!=="undefined"){return ao.thisUserId}var aC="";var aF={};var aH=aG.fieldNames.length>0?aG.fieldNames.length:1;var aD;var aB=aG.webURL.length>0?aG.webURL:ak().SPServices.SPGetCurrentSite();ak.ajax({async:false,url:aB+"/_layouts/userdisp.aspx?Force=True&"+new Date().getTime(),complete:function(aI){aD=aI}});for(O=0;O1){i=RegExp('FieldInternalName="'+aG.fieldNames[O]+'"',"gi")}else{i=RegExp('FieldInternalName="'+aG.fieldName+'"',"gi")}ak(aD.responseText).find("table.ms-formtable td[id^='SPField']").each(function(){if(i.test(ak(this).html())){switch(ak(this).attr("id")){case"SPFieldText":aC=ak(this).text();break;case"SPFieldNote":aC=ak(this).find("div").html();break;case"SPFieldURL":aC=ak(this).find("img").attr("src");break;default:aC=ak(this).text();break}return false}})}if(aG.fieldNames[O]!=="ID"){aC=(typeof aC!=="undefined")?aC.replace(/(^[\s\xA0]+|[\s\xA0]+$)/g,""):null}if(aH>1){aF[aG.fieldNames[O]]=aC}}return(aH>1)?aF:aC};ak.fn.SPServices.SPLookupAddNew=function(aI){var aD=ak.extend({},{lookupColumn:"",promptText:"Add new {0}",newWindow:false,ContentTypeID:"",completefunc:null,debug:false},aI);var aF="SPServices.SPLookupAddNew";var aC=new aq(aD.lookupColumn);if(aC.Obj.html()===null&&aD.debug){X(aF,"lookupColumn: "+aD.lookupColumn,ah);return}var i="";var aH="";var aB="";ak().SPServices({operation:"GetList",async:false,cacheXML:true,listName:ak().SPServices.SPListNameFromUrl(),completefunc:function(aJ){ak(aJ.responseXML).find("Field[DisplayName='"+aD.lookupColumn+"']").each(function(){aB=ak(this).attr("StaticName");ak().SPServices({operation:"GetList",async:false,cacheXML:true,listName:ak(this).attr("List"),completefunc:function(aK){ak(aK.responseXML).find("List").each(function(){aH=ak(this).attr("WebFullUrl");aH=aH!==Q?aH+Q:aH})}});i=D(ak(this).attr("List"),"NewForm");return false})}});if(aH.length===0&&aD.debug){X(aF,"lookupColumn: "+aD.lookupColumn,"This column does not appear to be a lookup column");return}if(i.length>0){var aG=aH+i;aG+=aD.newWindow?((aD.ContentTypeID.length>0)?"?ContentTypeID="+aD.ContentTypeID:"")+"' target='_blank'":"?"+((aD.ContentTypeID.length>0)?"ContentTypeID="+aD.ContentTypeID+"&":"")+"Source="+z(location.href)+"'";var aE="
"+aC+"";if(aD.CAMLQuery.length>0){i+=aD.CAMLQuery+""}i+="";ak().SPServices({operation:"GetListItems",async:false,webURL:aD.webURL,listName:aD.listName,CAMLQuery:i,CAMLViewFields:"",CAMLRowLimit:1,CAMLQueryOptions:"",completefunc:function(aF){ak(aF.responseXML).SPFilterNode("z:row").each(function(){aE=ak(this).attr("ows_ID")})}});return aE};ak.fn.SPServices.SPRequireUnique=function(aB){var aC=ak.extend({},{columnStaticName:"Title",duplicateAction:0,ignoreCase:false,initMsg:"This value must be unique.",initMsgCSSClass:"ms-vb",errMsg:"This value is not unique.",errMsgCSSClass:"ms-formvalidation",showDupes:false,completefunc:null},aB);var aG=ak().SPServices.SPGetQueryString();var aH=aG.ID;ao.thisList=ak().SPServices.SPListNameFromUrl();var aF="{1}
";var aE=aF.replace(/\{0\}/g,aC.initMsgCSSClass).replace(/\{1\}/g,aC.initMsg);var aD=ak().SPServices.SPGetDisplayFromStatic({listName:ao.thisList,columnStaticName:aC.columnStaticName});var i=ak("input[Title='"+aD+"']");ak(i).parent().append(aE);ak(i).blur(function(){var aK=[];var aL=ak(this).attr("value");if(aL.length===0){return false}ak().SPServices({operation:"GetListItems",async:false,listName:ao.thisList,CAMLQuery:"",CAMLViewFields:"",CAMLRowLimit:0,completefunc:function(aN){var aM=aC.ignoreCase?aL.toUpperCase():aL;ak(aN.responseXML).SPFilterNode("z:row").each(function(){var aO=aC.ignoreCase?ak(this).attr("ows_"+aC.columnStaticName).toUpperCase():ak(this).attr("ows_"+aC.columnStaticName);if((aM===aO)&&(ak(this).attr("ows_ID")!==aH)){aK.push([ak(this).attr("ows_ID"),ak(this).attr("ows_"+aC.columnStaticName)])}})}});var aJ=aC.initMsg;ak("span#SPRequireUnique"+aC.columnStaticName).html(aJ).attr("class",aC.initMsgCSSClass);ak("input[value='OK']:disabled, input[value='Save']:disabled").removeAttr("disabled");if(aK.length>0){aJ=aC.errMsg;ak("span#SPRequireUnique"+aC.columnStaticName).html(aJ).attr("class",aC.errMsgCSSClass);if(aC.duplicateAction===1){ak("input[Title='"+aC.columnDisplayName+"']").focus();ak("input[value='OK'], input[value='Save']").attr("disabled","disabled")}if(aC.showDupes){var aI=" "+aK.length+" duplicate item"+(aK.length>1?"s":"")+": ";for(O=0;O"+aK[O][1]+"
"}ak("span#SPRequireUnique"+aC.columnStaticName).append(aI)}}});if(aC.completefunc!==null){aC.completefunc()}};ak.fn.SPServices.SPGetDisplayFromStatic=function(aB){var aC=ak.extend({},{webURL:"",listName:"",columnStaticName:"",columnStaticNames:{}},aB);var i="";var aD={};var aE=aC.columnStaticNames.length>0?aC.columnStaticNames.length:1;ak().SPServices({operation:"GetList",async:false,cacheXML:true,webURL:aC.webURL,listName:aC.listName,completefunc:function(aF){if(aE>1){for(O=0;O1)?aD:i};ak.fn.SPServices.SPGetStaticFromDisplay=function(i){var aC=ak.extend({},{webURL:"",listName:"",columnDisplayName:"",columnDisplayNames:{}},i);var aB="";var aD={};var aE=aC.columnDisplayNames.length>0?aC.columnDisplayNames.length:1;ak().SPServices({operation:"GetList",async:false,cacheXML:true,webURL:aC.webURL,listName:aC.listName,completefunc:function(aF){if(aE>1){for(O=0;O1)?aD:aB};ak.fn.SPServices.SPRedirectWithID=function(aC){var aD=ak.extend({},{redirectUrl:"",qsParamName:"ID"},aC);ao.thisList=ak().SPServices.SPListNameFromUrl();var aH=ak().SPServices.SPGetQueryString();var aG=aH.ID;var aF=aH.List;var aB=aH.RootFolder;var aE=aH.ContentTypeId;if(typeof aH.ID==="undefined"){aG=ak().SPServices.SPGetLastItemId({listName:ao.thisList});ak("form[name='aspnetForm']").each(function(){var aJ=(location.href.indexOf("?")>0)?location.href.substring(0,location.href.indexOf("?")):location.href;var aK=(typeof aH.Source==="string")?"Source="+aH.Source.replace(/\//g,"%2f").replace(/:/g,"%3a"):"";var aI=[];if(typeof aF!=="undefined"){aI.push("List="+aF)}if(typeof aB!=="undefined"){aI.push("RootFolder="+aB)}if(typeof aE!=="undefined"){aI.push("ContentTypeId="+aE)}var aL=aJ+((aI.length>0)?("?"+aI.join("&")+"&"):"?")+"Source="+aJ+"?ID="+aG+((aK.length>0)?("%26RealSource="+aH.Source):"")+((typeof aH.RedirectURL==="string")?("%26RedirectURL="+aH.RedirectURL):"");ak(this).attr("action",aL)})}else{while(aH.ID===aG){aG=ak().SPServices.SPGetLastItemId({listName:ao.thisList})}var i=(typeof aH.RedirectURL==="string")?aH.RedirectURL:aD.redirectUrl;location.href=i+(i.indexOf("?")>0)?"&":"?"+aD.qsParamName+"="+aG+((typeof aH.RealSource==="string")?("&Source="+aH.RealSource):"")}};ak.fn.SPServices.SPSetMultiSelectSizes=function(aL){var i=ak.extend({},{multiSelectColumn:"",minWidth:0,maxWidth:0,debug:false},aL);var aG="SPServices.SPSetMultiSelectSizes";var aE=new aq(i.multiSelectColumn);if(aE.Obj.html()===null&&i.debug){X(aG,"multiSelectColumn: "+i.multiSelectColumn,ah);return}if(aE.Type!=="M"&&i.debug){X(aG,"multiSelectColumn: "+i.multiSelectColumn,"Column is not multi-select.");return}var aF=aE.Obj;var aJ=aF.closest("span").find("select[ID$='SelectResult']");var aH=ad("SPSetMultiSelectSizes",i.multiSelectColumn);var aI=aF.closest("span");aI.append("");var aD=aI.find("> select");aD.css({width:"auto",height:0,visibility:"hidden"});aD.append(aF.find("option").clone());aD.append(aJ.find("option").clone());var aB=aD.width()+5;var aK=aB;if(i.minWidth>0||i.maxWidth>0){if(aBi.maxWidth){aK=i.maxWidth}}var aC=aB;aF.css("width",aC+"px").parent().css("width",aK+"px");aJ.css("width",aC+"px").parent().css("width",aK+"px");if(i.maxWidth===0||i.maxWidth>aK){aF.parent().css("overflow-x","hidden");aJ.parent().css("overflow-x","hidden")}aD.remove()};ak.fn.SPServices.SPScriptAudit=function(aC){var aD=ak.extend({},{webURL:"",listName:"",outputId:"",auditForms:true,auditViews:true,auditPages:true,auditPagesListName:"Pages",showHiddenLists:false,showNoScript:false,showSrc:true},aC);var aB=[["New","NewForm.aspx",false],["Display","DispForm.aspx",false],["Edit","EditForm.aspx",false]];var aE;ak("#"+aD.outputId).append(""+(aD.showSrc?"":"")+"
ListPage ClassPage TypePageScript References
");ak("#SPScriptAudit th").attr("class","ms-vh2-nofilter");if(aD.auditForms||aD.auditViews){ak().SPServices({operation:"GetListCollection",webURL:aD.webURL,async:false,completefunc:function(aG){ak(aG.responseXML).find("List").each(function(){aE=ak(this);if((aD.listName.length===0)||(aE.attr("Title")===aD.listName)){if((aD.showHiddenLists&&aE.attr("Hidden")==="False")||!aD.showHiddenLists){if(aD.auditForms){ak().SPServices({operation:"GetListContentTypes",webURL:aD.webURL,listName:aE.attr("ID"),async:false,completefunc:function(aH){ak(aH.responseXML).find("ContentType").each(function(){if(ak(this).attr("ID").substring(0,6)!=="0x0120"){var aJ=ak(this).find("FormUrls");for(O=0;O0)?aD.webURL:ak().SPServices.SPGetCurrentSite())+Q+ak(this).text());aB[O][2]=true});if(!aB[O][2]){var aI=aE.attr("DefaultViewUrl");aw(aD,aE,"Form",aB[O][0],aI.substring(0,aI.lastIndexOf(Q)+1)+aB[O][1])}}for(O=0;OFolder",CAMLViewFields:"",CAMLRowLimit:0,completefunc:function(aG){ak(aG.responseXML).SPFilterNode("z:row").each(function(){var aJ=ak(this).attr("ows_FileRef").split(";#")[1];var aH=ak(this).attr("ows_Title");var aI=(typeof aH!=="undefined")?aH:"";if(aJ.indexOf(".aspx")>0){aw(aD,aE,"Page",aI,Q+aJ)}})}})}}ak("#SPScriptAudit tr[class='ms-alternating']:even").removeAttr("class")};function aw(aB,aC,aJ,aF,aD){var aG=0;var aI=0;var aE={};aE.type=[];aE.src=[];aE.script=[];var aH=RegExp("","gi");ak.ajax({type:"GET",url:aD,dataType:"text",async:false,success:function(aP){var aO;while(aO=aH.exec(aP)){var aK=aj(aO,"language");var aQ=aj(aO,"type");var aM=aj(aO,"src");if(aM!==null&&aM.length>0&&!al(aM)){aE.type.push((aK!==null&&aK.length>0)?aK:aQ);aE.src.push(aM);aI++}}if((!aB.showNoScript&&(aE.type.length>0))||aB.showNoScript){var aN=aD.substring(0,aD.lastIndexOf(Q)+1);var aL=""+aC.attr("Title")+((aC.attr("Hidden")==="True")?"(Hidden)":"")+""+aJ+""+aF+""+R(aD)+"";if(aB.showSrc){var i;aL+="";for(aG=0;aG";aL+=""}aL+="
"+aE.type[aG]+""+R(aE.src[aG])+"
"}ak("#SPScriptAudit").append(aL)}}})}function aj(aD,aB){var aC;var i=RegExp(aB+"=(\"([^\"]*)\")|('([^']*)')","gi");if(aC=i.exec(aD)){return aC[2]}return null}function al(aD){var aC;var aB=["WebResource.axd","_layouts"];for(aC=0;aC-1){return true}}return false}ak.fn.SPServices.SPArrangeChoices=function(aC){var aD=ak.extend({},{listName:ak().SPServices.SPListNameFromUrl(),columnName:"",perRow:99,randomize:false},aC);var aF=false;var aE=[];var aB;var i=ak().SPServices({operation:"GetList",async:false,cacheXML:true,listName:aD.listName});i.done(function(){aF=(ak(i.responseXML).find("Field[DisplayName='"+aD.columnName+"']").attr("FillInChoice")==="TRUE")?true:false;var aK=y(aD.columnName);var aI=ak(aK).find("tr").length;var aH=0;var aJ;var aG;ak(aK).find("tr").each(function(aL){aH++;if(aF&&aH===(aI-1)){aJ=ak(this).find("td").html()}else{if(aF&&aH===aI){aG=ak(this).find("td").html()}else{aE.push(ak(this).html())}}});if(aD.randomize){aE.sort(p)}aB="";for(O=0;O"}}aB+="";if(aF){aB+=""+aJ+aG+""}ak(aK).find("tr").remove();ak(aK).find("table").append(aB)})};ak.fn.SPServices.SPAutocomplete=function(aC){var aD=ak.extend({},{WebURL:"",sourceList:"",sourceColumn:"",columnName:"",CAMLQuery:"",CAMLQueryOptions:"",CAMLRowLimit:0,filterType:"BeginsWith",numChars:0,ignoreCase:false,highlightClass:"",uniqueVals:false,maxHeight:99999,slideDownSpeed:"fast",processingIndicator:"_layouts/images/REFRESH.GIF",debug:false},aC);var aF;var aB=ak("input[Title='"+aD.columnName+"']");ak("input[Title='"+aD.columnName+"']").css("position","");var aG=aB.attr("ID");var aE=aB.css("color");var aH=aB.css("width");if(aB.html()===null&&aD.debug){X("SPServices.SPAutocomplete","columnName: "+aD.columnName,"Column is not an input control or is not found on page");return}aB.closest("span").find("br").remove();aB.wrap("
");var i=ad("SPAutocomplete",aD.columnName);aB.after("
");ak("#"+i).css("width",aH);ak(aB).keyup(function(){var aQ=ak(this).val();ak("#"+i).hide();if(aQ.length";if(aD.CAMLQuery.length>0){aI+=""}aI+="<"+aD.filterType+">"+aQ+"";if(aD.CAMLQuery.length>0){aI+=aD.CAMLQuery+""}aI+="";ak().SPServices({operation:"GetListItems",async:false,webURL:aD.WebURL,listName:aD.sourceList,CAMLQuery:aI,CAMLQueryOptions:aD.CAMLQueryOptions,CAMLViewFields:"",CAMLRowLimit:aD.CAMLRowLimit,completefunc:function(aT){var aS=aD.ignoreCase?aQ.toUpperCase():aQ;ak(aT.responseXML).SPFilterNode("z:row").each(function(){var aV=ak(this).attr("ows_"+aD.sourceColumn);var aW=aD.ignoreCase?ak(this).attr("ows_"+aD.sourceColumn).toUpperCase():ak(this).attr("ows_"+aD.sourceColumn);if(aD.filterType==="Contains"){var aU=aW.indexOf(aS);if((aU>=0)&&(!aD.uniqueVals||(ak.inArray(aV,aP)===-1))){aP.push(ak(this).attr("ows_"+aD.sourceColumn))}}else{if(aS===aW.substr(0,aS.length)&&(!aD.uniqueVals||(ak.inArray(aV,aP)===-1))){aP.push(ak(this).attr("ows_"+aD.sourceColumn))}}})}});var aL="";for(O=0;O0){var aK=RegExp(aQ,aD.ignoreCase?"gi":"g");var aN=aP[O].match(aK);var aM=0;for(aF=0;aF"+aN[aF]+"";aP[O]=aP[O].substr(0,aO)+aR+aP[O].substr(aJ);aM=aO+aR.length}}aL+="
  • "+aP[O]+"
  • "}ak("#"+i).html(aL);ak("#"+i+" li").click(function(){ak("#"+i).fadeOut(aD.slideUpSpeed);ak("#"+aG).val(ak(this).text())}).mouseover(function(){var aS={cursor:"hand",color:"#ffffff",background:"#3399ff"};ak(this).css(aS)}).mouseout(function(){var aS={cursor:"inherit",color:aE,background:"transparent"};ak(this).css(aS)});if(aP.length>0){ak("#"+i).slideDown(aD.slideDownSpeed)}aB.css("background-image","")})};ak.fn.SPServices.SPGetQueryString=function(){var aG={};var aF;var aB=location.search.substring(1,location.search.length);var aC=aB.split("&");var aE=/^([^=]+)=(.*)/i;for(var aD=0;aD2){aG[aF[1]]=unescape(aF[2]).replace(/\+/g," ")}}}return aG};ak.fn.SPServices.SPListNameFromUrl=function(i){var aB=ak.extend({},{listName:""},i);if(aB.listName.length>0){ao.thisList=aB.listName;return ao.thisList}else{if(ao.thisList.length>0){return ao.thisList}}var aD=location.href;var aC=aD.substring(0,aD.indexOf(".aspx"));var aE=decodeURIComponent(aC.substring(0,aC.lastIndexOf(Q)+1)).toUpperCase();ak().SPServices({operation:"GetListCollection",async:false,completefunc:function(aF){ak(aF.responseXML).find("List").each(function(){var aG=ak(this).attr("DefaultViewUrl");var aH=aG.substring(0,aG.lastIndexOf(Q)+1).toUpperCase();if(aE.indexOf(aH)>0){ao.thisList=ak(this).attr("ID");return false}})}});return ao.thisList};ak.fn.SPServices.SPUpdateMultipleListItems=function(aD){var aF=ak.extend({},{webURL:"",listName:"",CAMLQuery:"",batchCmd:"Update",valuepairs:[],completefunc:null,folder:"",debug:false},aD);var aE;var aH=[];var aG=[];ak().SPServices({operation:"GetListItems",async:false,webURL:aF.webURL,listName:aF.listName,CAMLQuery:aF.CAMLQuery,CAMLQueryOptions:""+((aF.folder.length>0)?""+aF.folder+"":"")+"",completefunc:function(i){ak(i.responseXML).SPFilterNode("z:row").each(function(){aH.push(ak(this).attr("ows_ID"));var aI=ak(this).attr("ows_FileRef");aI="/"+aI.substring(aI.indexOf(";#")+2);aG.push(aI)})}});var aB;var aC="";for(aE=0;aE";for(aB=0;aB"+L(aF.valuepairs[aB][1])+""}aC+=""+aH[aE]+"";if(aG[aE].length>0){aC+=""+aG[aE]+""}aC+=""}aC+="";ak().SPServices({operation:"UpdateListItems",async:false,webURL:aF.webURL,listName:aF.listName,updates:aC,completefunc:function(i){if(aF.completefunc!==null){aF.completefunc(i)}}})};ak.fn.SPServices.SPConvertDateToISO=function(i){var aB=ak.extend({},{dateToConvert:new Date(),dateOffset:"-05:00"},i);var aC="";var aD=aB.dateToConvert;aC+=aD.getFullYear()+"-";aC+=t(aD.getMonth()+1)+"-";aC+=t(aD.getDate());aC+="T"+t(aD.getHours())+":";aC+=t(aD.getMinutes())+":";aC+=t(aD.getSeconds())+"Z"+aB.dateOffset;return aC};ak.fn.SPFilterNode=function(i){return this.find("*").filter(function(){return this.nodeName===i})};ak.fn.SPXmlToJson=function(i){var aC=ak.extend({},{mapping:{},includeAllAttrs:false,removeOws:true},i);var aD;var aB=[];this.each(function(){var aH={};var aJ=this.attributes;ak.each(aC.mapping,function(){aH[this.mappedName]=""});for(aD=0;aD0){aB.html(aD.valueToSet)}if(aD.checkNames){i.click()}var aF=ak.trim(aB.text());var aE=[];aB.children("span").each(function(){var aJ=ak(this).find("div[data]").attr("data");var aH={};if(typeof aJ!=="undefined"){var aK=ak.parseXML(aJ);var aI=ak(aK);aI.find("DictionaryEntry").each(function(){var aL=ak(this).find("Key").text();var aM=ak(this).find("Value").text();aH[aL]=aM});aE.push(aH)}else{ak().SPServices({operation:"GetUserInfo",async:false,cacheXML:true,userLoginName:ak(this).attr("title"),completefunc:function(aL){ak(aL.responseXML).find("User").each(function(){ak.each(this.attributes,function(aN,aP){var aM=aP.name;var aO=aP.value;aH[aM]=aO});aE.push(aH)})}})}});return{row:aG,contents:aB,currentValue:aF,checkNames:i,dictionaryEntries:aE}};ak.fn.SPFindPeoplePicker=function(i){return ak().SPServices.SPFindPeoplePicker(i)};ak.fn.SPServices.SPFindMMSPicker=function(aD){var aF=ak.extend({},{MMSDisplayName:""},aD);var aC=[];var aB=ak("div[title='"+aF.MMSDisplayName+"']");var aI=aB.closest("td").find("input[type='hidden']");var aH=aI.val().split(";");for(var aE=0;aE0?aD.relatedWebURL:ak().SPServices.SPGetCurrentSite();switch(aI.attr("Type")){case"Text":aK=aN;break;case"URL":switch(aI.attr("Format")){case"Hyperlink":aK="
    "+aN.substring(aN.search(",")+1)+"";break;case"Image":aK=""+aN.substring(aN.search(",")+1)+"";break;default:aK=aN;break}break;case"User":case"UserMulti":var aB=aN.split(";#");for(aJ=0;aJ"+aB[aJ+1]+"")}aK=aL.join(", ");break;case"Calculated":var aG=aN.split(";#");aK=aG[1];break;case"Number":aF=aI.attr("Decimals");aK=typeof aF==="undefined"?parseFloat(aN).toString():parseFloat(aN).toFixed(aF).toString();break;case"Currency":aF=aI.attr("Decimals");aK=typeof aF==="undefined"?parseFloat(aN).toFixed(2).toString():parseFloat(aN).toFixed(aF).toString();break;case"Lookup":switch(aI.attr("Name")){case"FileRef":aH=aM.attr("BaseType")==="1"?aM.attr("RootFolder")+Q+"Forms/DispForm.aspx":aM.attr("RootFolder")+Q+"DispForm.aspx";aK=""+aN.substring(aN.search(";#")+2)+"";break;case"FileDirRef":aH=Q+aN.substring(aN.search(";#")+2);aK=""+aN.substring(aN.search(";#")+2)+"";break;default:aH=D(aI.attr("List"),"DisplayForm");aK=""+aN.substring(aN.search(";#")+2)+"";break}break;case"LookupMulti":aH=D(aI.attr("List"),"DisplayForm");aK="";if(aN.length>0){var aC=aN.split(";#");for(aJ=0;aJ"+aC[(aJ*2)+1]+"")}}aK=aL.join(", ");break;case"File":R=aN.substring(aN.search(";#")+2);aK=""+R+"";break;case"Counter":aK=aN;break;case"DateTime":aK=aN;break;default:aK=aN;break}return aK}function s(aD){var aC;var aB="";for(aC=0;aC"}aB+="
    "+aC+""+aD.attributes.item(aC).nodeName+""+N(aD.attributes.item(aC).nodeValue)+"
    ";return aB}function aq(i){if((this.Obj=ak("select[Title='"+i+"']")).length===1){this.Type="S"}else{if((this.Obj=ak("input[Title='"+i+"']")).length===1){this.Type="C"}else{if((this.Obj=ak("select[ID$='SelectCandidate'][Title^='"+i+" ']")).length===1){this.Type="M"}else{if((this.Obj=ak("select[ID$='SelectCandidate'][Title$=': "+i+"']")).length===1){this.Type="M"}else{if((this.Obj=ak("select[ID$='SelectCandidate'][Title$='\""+i+"\".']")).length===1){this.Type="M"}else{if((this.Obj=ak("select[ID$='SelectCandidate'][Title$=' "+i+"']")).length===1){this.Type="M"}else{this.Type=null}}}}}}}function az(aD){this.MultiLookupPickerdata=aD.closest("span").find("input[id*='MultiLookup'][id$='data']");var aB=this.MultiLookupPickerdata.attr("id");var aC=aB.indexOf("Multi");var i=aB.substr(aC);var aE=aB.substr(0,aC)+i.substr(0,i.indexOf("_")+1)+"m";this.master=window[aE]}function c(aD,aB){var i=[];switch(aD.Type){case"S":if(aB){i.push(aD.Obj.find("option:selected").val()||[])}else{i.push(aD.Obj.find("option:selected").text()||[])}break;case"C":if(aB){i.push(ak("input[id='"+aD.Obj.attr("optHid")+"']").val()||[])}else{i.push(aD.Obj.attr("value")||[])}break;case"M":var aC=aD.Obj.closest("span").find("select[ID$='SelectResult']");ak(aC).find("option").each(function(){i.push(ak(this).html())});break;default:break}return i}function X(aB,aD,aC){var i="Error in function
    "+aB+"
    Parameter
    "+aD+"
    Message
    "+aC+"

    Click to continue
    ";V(i)}function V(aF){var aC="position:absolute;width:300px;height:150px;padding:10px;background-color:#000000;color:#ffffff;z-index:30;font-family:'Arial';font-size:12px;display:none;";ak("#aspnetForm").parent().append("
    "+aF);var i=ak("#SPServices_msgBox").height();var aE=ak("#SPServices_msgBox").width();var aD=(ak(window).width()/2)-(aE/2)+"px";var aB=(ak(window).height()/2)-(i/2)-100+"px";ak("#SPServices_msgBox").css({border:"5px #C02000 solid",left:aD,top:aB}).show().fadeTo("slow",0.75).click(function(){ak(this).fadeOut("3000",function(){ak(this).remove()})})}function ad(i,aB){return i+"_"+ak().SPServices.SPGetStaticFromDisplay({listName:ak().SPServices.SPListNameFromUrl(),columnDisplayName:aB})}function D(i,aC){var aB;ak().SPServices({operation:"GetFormCollection",async:false,listName:i,completefunc:function(aD){aB=ak(aD.responseXML).find("Form[Type='"+aC+"']").attr("Url")}});return aB}function ap(aD,aB){var aC;for(aC=0;aC"+i+""}function p(){return(Math.round(Math.random())-0.5)}function N(i){return((i.indexOf("http")===0)||(i.indexOf(Q)===0))?""+i+"":i}function R(i){return i.substring(i.lastIndexOf(Q)+1,i.length)}var Y={"&":"&",'"':""","<":"<",">":">"};var H={"&":"&",""":'"',"<":"<",">":">"};function h(i){return i.replace(/([\&"<>])/g,function(aC,aB){return Y[aB]})}function I(i){return i.replace(/("|<|>|&)/g,function(aC,aB){return H[aB]})}function L(i){if(typeof i==="string"){return i.replace(/&(?![a-zA-Z]{1,8};)/g,"&")}else{return i}}function z(i){return i.replace(/&/g,"%26")}function m(i){var aB=i.split(";#");this.id=aB[0];this.value=aB[1]}function t(i){return i<10?"0"+i:i}})(jQuery); diff --git a/jquery.SPServices-2013.01.js b/jquery.SPServices-2013.02.js similarity index 93% rename from jquery.SPServices-2013.01.js rename to jquery.SPServices-2013.02.js index bb40ffb..b10678d 100644 --- a/jquery.SPServices-2013.01.js +++ b/jquery.SPServices-2013.02.js @@ -1,7 +1,7 @@ /* * SPServices - Work with SharePoint's Web Services using jQuery - * Version 2013.01 - * @requires jQuery v1.5 or greater - jQuery 1.7+ recommended + * Version 2013.02 + * @requires jQuery v1.8 or greater - jQuery 1.10.x recommended * * Copyright (c) 2009-2013 Sympraxis Consulting LLC * Examples and docs at: @@ -24,13 +24,15 @@ "use strict"; // Version info - var VERSION = "2013.01"; // TODO: Update version + var VERSION = "2012.02"; // TODO: Update version // String constants // General var SLASH = "/"; var TXTColumnNotFound = "Column not found on page"; var SCHEMASharePoint = "http://schemas.microsoft.com/sharepoint"; + var multiLookupPrefix = "MultiLookupPicker"; + var multiLookupPrefix2013 = "MultiLookup"; // Caching var promisesCache = {}; @@ -46,7 +48,6 @@ var PERMISSIONS = "Permissions"; var PUBLISHEDLINKSSERVICE = "PublishedLinksService"; var SEARCH = "Search"; - var SPSEARCH = "SPSearch"; var SHAREPOINTDIAGNOSTICS = "SharePointDiagnostics"; var SITEDATA = "SiteData"; var SITES = "Sites"; @@ -62,7 +63,7 @@ var WORKFLOW = "Workflow"; // Global variables - var SPServicesContext = new SPServicesContext(); // Variable to hold the current context as we figure it out + var currentContext = new SPServicesContext(); // Variable to hold the current context as we figure it out var i = 0; // Generic loop counter var encodeOptionList = ["listName", "description"]; // Used to encode options which may contain special characters @@ -71,7 +72,7 @@ // WSops.OpName = [WebService, needs_SOAPAction]; // OpName The name of the Web Service operation -> These names are unique // WebService The name of the WebService this operation belongs to - // needs_SOAPAction Boolean indicating whether the operation needs to have the SOAPAction passed in the setRequestHeaderfunction. + // needs_SOAPAction Boolean indicating whether the operatio needs to have the SOAPAction passed in the setRequestHeaderfunction. // true if the operation does a write, else false var WSops = []; @@ -143,11 +144,6 @@ WSops.Registration = [SEARCH, false]; WSops.Status = [SEARCH, false]; - WSops.SPQuery = [SPSEARCH, false]; - WSops.SPQueryEx = [SPSEARCH, false]; - WSops.SPRegistration = [SPSEARCH, false]; - WSops.SPStatus = [SPSEARCH, false]; - WSops.SendClientScriptErrorReport = [SHAREPOINTDIAGNOSTICS,true]; WSops.GetAttachments = [SITEDATA, false]; @@ -650,16 +646,6 @@ case "Status": break; - // SPSEARCH OPERATIONS - case "SPQuery": - SOAPEnvelope.payload += wrapNode("queryXml", encodeXml(opt.queryXml)); - break; - case "SPQueryEx": - SOAPEnvelope.opheader = "<" + opt.operation + " xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>"; - SOAPAction = "http://microsoft.com/webservices/OfficeServer/QueryService/" + opt.operation; - SOAPEnvelope.payload += wrapNode("queryXml", encodeXml(opt.queryXml)); - break; - // SHAREPOINTDIAGNOSTICS OPERATIONS case "SendClientScriptErrorReport": addToPayload(opt, ["message", "file", "line", "client", "stack", "team", "originalFile"]); @@ -1207,9 +1193,6 @@ cachedPromise = promisesCache[msg]; } - // If we don't have a completefunc, then we won't attempt to call it - var thisHasCompletefunc = $.isFunction(opt.completefunc); - if(typeof cachedPromise === "undefined") { // Finally, make the Ajax call @@ -1217,7 +1200,7 @@ // The relative URL for the AJAX call url: ajaxURL, // By default, the AJAX calls are asynchronous. You can specify false to require a synchronous call. - async: thisHasCompletefunc ? false : opt.async, + async: opt.async, // Before sending the msg, need to send the request header beforeSend: function (xhr) { // If we need to pass the SOAPAction, do so @@ -1235,18 +1218,32 @@ contentType: "text/xml;charset='utf-8'", complete: function(xData, Status) { // When the call is complete, call the completefunc if there is one - if(thisHasCompletefunc) { + if($.isFunction(opt.completefunc)) { opt.completefunc(xData, Status); + } } }); +/* spservicesPromise.then( + function() { + // Cache the promise if requested + if(opt.cacheXML) { + promisesCache[msg] = spservicesPromise; + } + }, + function() { + // TODO: Allow for fail function + } + ); +*/ // Return the promise +// return spservicesPromise; return promisesCache[msg]; } else { // Call the completefunc if there is one - if(thisHasCompletefunc) { + if($.isFunction(opt.completefunc)) { opt.completefunc(cachedPromise, null); } // Return the cached promise @@ -1260,7 +1257,7 @@ // we allow for all in a standardized way. $.fn.SPServices.defaults = { - cacheXML: false, // If true, we'll cache the XML results for the call + cacheXML: false, // If true, we'll cache the XML results with jQuery's .data() function operation: "", // The Web Service operation webURL: "", // URL of the target Web makeViewDefault: false, // true to make the view the default view for the list @@ -1304,13 +1301,15 @@ $.fn.SPServices.SPGetCurrentSite = function() { // We've already determined the current site... - if(SPServicesContext.thisSite.length > 0) { - return SPServicesContext.thisSite; + if(currentContext.thisSite.length > 0) { + return currentContext.thisSite; } // If we still don't know the current site, we call WebUrlFromPageUrlResult. var msg = SOAPEnvelope.header + - "" + location.protocol + "//" + location.host + location.pathname + "" + + "" + + ((location.href.indexOf("?") > 0) ? location.href.substr(0, location.href.indexOf("?")) : location.href) + + "" + SOAPEnvelope.footer; $.ajax({ async: false, // Need this to be synchronous so we're assured of a valid value @@ -1319,12 +1318,12 @@ data: msg, dataType: "xml", contentType: "text/xml;charset=\"utf-8\"", - complete: function (xData) { - SPServicesContext.thisSite = $(xData.responseXML).find("WebUrlFromPageUrlResult").text(); + complete: function (xData, Status) { + currentContext.thisSite = $(xData.responseXML).find("WebUrlFromPageUrlResult").text(); } }); - return SPServicesContext.thisSite; // Return the URL + return currentContext.thisSite; // Return the URL }; // End $.fn.SPServices.SPGetCurrentSite @@ -1428,18 +1427,19 @@ // Multi-select hybrid case "M": // Handle the dblclick on the candidate select - parentSelect.Obj.bind("dblclick", function() { + $(parentSelect.master.candidateControl).bind("dblclick", function() { cascadeDropdown(opt.parentColumn, parentSelect); }); // Handle the dblclick on the selected values - parentSelect.Obj.closest("span").find("select[id$='SelectResult']").bind("dblclick", function() { + $(parentSelect.master.resultControl).bind("dblclick", function() { cascadeDropdown(opt.parentColumn, parentSelect); }); - // Handle a button click - parentSelect.Obj.closest("span").find("button").each(function() { - $(this).bind("click", function() { + // Handle button clicks + $(parentSelect.master.addControl).bind("click", function() { + cascadeDropdown(opt.parentColumn, parentSelect); + }); + $(parentSelect.master.removeControl).bind("click", function() { cascadeDropdown(opt.parentColumn, parentSelect); - }); }); break; default: @@ -1455,9 +1455,6 @@ var choices = ""; var parentSelectSelected; var childSelectSelected = null; - var MultiLookupElements; - var MultiLookupPickerdata; - var master; var newMultiLookupPickerdata; var numChildOptions; var firstChildOptionId; @@ -1472,7 +1469,6 @@ var childSelect = this.childSelect; var childColumnStatic = this.childColumnStatic; var childColumnRequired = this.childColumnRequired; - var currentSelection; // Get the parent column selection(s) parentSelectSelected = getDropdownSelected(parentSelect, opt.matchOnId); @@ -1490,15 +1486,6 @@ // Get the current child column selection(s) childSelectSelected = getDropdownSelected(childSelect, true); - // Find the important bits of the multi-select - if(childSelect.Type === "M") { - - MultiLookupElements = new MultiLookupPicker(childSelect.Obj); - MultiLookupPickerdata = MultiLookupElements.MultiLookupPickerdata; - master = MultiLookupElements.master; - currentSelection = childSelect.Obj.closest("span").find("select[ID$='SelectResult']"); - } - // When the parent column's selected option changes, get the matching items from the relationship list // Get the list items which match the current selection var sortColumn = (opt.relationshipListSortColumn.length > 0) ? opt.relationshipListSortColumn : opt.relationshipListChildColumn; @@ -1593,7 +1580,7 @@ break; case "M": // Remove all of the existing options - $(childSelect.Obj).find("option").remove(); + $(childSelect.master.candidateControl).find("option").remove(); newMultiLookupPickerdata = ""; break; default: @@ -1642,7 +1629,7 @@ choices = choices + ((choices.length > 0) ? "|" : "") + thisOption.value + "|" + thisOption.id; break; case "M": - childSelect.Obj.append(""); + $(childSelect.master.candidateControl).append(""); newMultiLookupPickerdata += thisOption.id + "|t" + thisOption.value + "|t |t |t"; break; default: @@ -1675,40 +1662,33 @@ break; case "M": // Clear the master - master.data = ""; - MultiLookupPickerdata.attr("value", newMultiLookupPickerdata); + childSelect.master.data = ""; + childSelect.MultiLookupPickerdata.attr("value", newMultiLookupPickerdata); // Clear any prior selections that are no longer valid or aren't selected - $(currentSelection).find("option").each(function() { + $(childSelect.master.resultControl).find("option").each(function() { var thisSelected = $(this); - var thisValue = $(this).html(); - $(this).attr("selected", "selected"); - $(childSelect.Obj).find("option").filter(function() { - return $(this).text() === thisValue.replace(/&/, "&"); - }).each(function() { - if($(this).html() === thisValue) { - thisSelected.removeAttr("selected"); - } + thisSelected.prop("selected", true); + $(childSelect.master.candidateControl).find("option[value='" + thisSelected.val() + "']").each(function() { + thisSelected.prop("selected", false); }); }); - GipRemoveSelectedItems(master); + GipRemoveSelectedItems(childSelect.master); // Hide any options in the candidate list which are already selected - $(childSelect.Obj).find("option").each(function() { + $(childSelect.master.candidateControl).find("option").each(function() { var thisSelected = $(this); - $(currentSelection).find("option").each(function() { - if($(this).html() === thisSelected.html()) { - thisSelected.remove(); - } + $(childSelect.master.resultControl).find("option[value='" + thisSelected.val() + "']").each(function() { + thisSelected.remove(); }); }); - GipAddSelectedItems(master); + GipAddSelectedItems(childSelect.master); // Set master.data to the newly allowable values - master.data = GipGetGroupData(newMultiLookupPickerdata); + childSelect.master.data = GipGetGroupData(newMultiLookupPickerdata); // Trigger a dblclick so that the child will be cascaded if it is a multiselect. - childSelect.Obj.trigger("dblclick"); + $(childSelect.master.candidateControl).trigger("dblclick"); break; default: @@ -1720,7 +1700,7 @@ if(opt.completefunc !== null) { opt.completefunc(); } - }); // childColumns each + }); // $(childColumns).each(function() } // End cascadeDropdown @@ -1833,7 +1813,6 @@ // Get info about the related list relatedListXML = $(xData.responseXML).find("List"); // Save the information about each column requested - relatedColumnsXML[opt.relatedListColumn] = $(xData.responseXML).find("Fields > Field[Name='" + opt.relatedColumn + "']"); for (i=0; i < opt.relatedColumns.length; i++) { relatedColumnsXML[opt.relatedColumns[i]] = $(xData.responseXML).find("Fields > Field[Name='" + opt.relatedColumns[i] + "']"); } @@ -2018,9 +1997,6 @@ var choices = ""; var columnSelectSelected = null; - var MultiLookupElements; - var MultiLookupPickerdata; - var master; var newMultiLookupPickerdata; var columnColumnRequired; var thisFunction = "SPServices.SPFilterDropdown"; @@ -2109,7 +2085,7 @@ break; case "M": // Remove all of the existing options - $(columnSelect.Obj).find("option").remove(); + $(columnSelect.master.candidateControl).find("option").remove(); newMultiLookupPickerdata = ""; break; default: @@ -2151,7 +2127,7 @@ choices = choices + ((choices.length > 0) ? "|" : "") + thisOption.value + "|" + thisOption.id; break; case "M": - columnSelect.Obj.append(""); + $(columnSelect.master.candidateControl).append(""); newMultiLookupPickerdata += thisOption.id + "|t" + thisOption.value + "|t |t |t"; break; default: @@ -2168,42 +2144,36 @@ columnSelect.Obj.trigger("propertychange"); break; case "M": - // Find the important bits of the multi-select - MultiLookupElements = new MultiLookupPicker(columnSelect.Obj); - MultiLookupPickerdata = MultiLookupElements.MultiLookupPickerdata; - master = MultiLookupElements.master; - - var currentSelection = columnSelect.Obj.closest("span").find("select[ID$='SelectResult']"); - // Clear the master - master.data = ""; - MultiLookupPickerdata.attr("value", newMultiLookupPickerdata); + columnSelect.master.data = ""; + + columnSelect.MultiLookupPickerdata.attr("value", newMultiLookupPickerdata); // Clear any prior selections that are no longer valid - $(currentSelection).find("option").each(function() { + $(columnSelect.master.resultControl).find("option").each(function() { var thisSelected = $(this); $(this).attr("selected", "selected"); - $(columnSelect.Obj).find("option").each(function() { + $(columnSelect.master.candidateControl).find("option").each(function() { if($(this).html() === thisSelected.html()) { thisSelected.removeAttr("selected"); } }); }); - GipRemoveSelectedItems(master); + GipRemoveSelectedItems(columnSelect.master); // Hide any options in the candidate list which are already selected - $(columnSelect.Obj).find("option").each(function() { + $(columnSelect.master.candidateControl).find("option").each(function() { var thisSelected = $(this); - $(currentSelection).find("option").each(function() { + $(columnSelect.master.resultControl).find("option").each(function() { if($(this).html() === thisSelected.html()) { thisSelected.remove(); } }); }); - GipAddSelectedItems(master); + GipAddSelectedItems(columnSelect.master); // Set master.data to the newly allowable values - master.data = GipGetGroupData(newMultiLookupPickerdata); + columnSelect.master.data = GipGetGroupData(newMultiLookupPickerdata); // Trigger a dblclick so that the child will be cascaded if it is a multiselect. - columnSelect.Obj.trigger("dblclick"); + $(columnSelect.master.candidateControl).trigger("dblclick"); break; default: @@ -2284,8 +2254,8 @@ }, options); // The current user's ID is reliably available in an existing JavaScript variable - if(opt.fieldName === "ID" && typeof SPServicesContext.thisUserId !== "undefined") { - return SPServicesContext.thisUserId; + if(opt.fieldName === "ID" && typeof currentContext.thisUserId !== "undefined") { + return currentContext.thisUserId; } var thisField = ""; @@ -2301,7 +2271,7 @@ // Force parameter forces redirection to a page that displays the information as stored in the UserInfo table rather than My Site. // Adding the extra Query String parameter with the current date/time forces the server to view this as a new request. url: thisWeb + "/_layouts/userdisp.aspx?Force=True&" + new Date().getTime(), - complete: function (xData) { + complete: function (xData, Status) { thisUserDisp = xData; } }); @@ -2310,7 +2280,7 @@ // The current user's ID is reliably available in an existing JavaScript variable if(opt.fieldNames[i] === "ID") { - thisField = SPServicesContext.thisUserId; + thisField = currentContext.thisUserId; } else { var thisTextValue; if(fieldCount > 1) { @@ -2384,7 +2354,7 @@ async: false, cacheXML: true, listName: $().SPServices.SPListNameFromUrl(), - completefunc: function (xData) { + completefunc: function (xData, Status) { $(xData.responseXML).find("Field[DisplayName='" + opt.lookupColumn + "']").each(function() { lookupColumnStaticName = $(this).attr("StaticName"); // Use GetList for the Lookup column's list to determine the list's URL @@ -2393,7 +2363,7 @@ async: false, cacheXML: true, listName: $(this).attr("List"), - completefunc: function (xData) { + completefunc: function (xData, Status) { $(xData.responseXML).find("List").each(function() { lookupListUrl = $(this).attr("WebFullUrl"); // Need to handle when list is in the root site @@ -2451,7 +2421,7 @@ webURL: opt.webURL, async: false, userLoginName: (opt.userAccount !== "") ? opt.userAccount : $().SPServices.SPGetCurrentUser(), - completefunc: function (xData) { + completefunc: function (xData, Status) { $(xData.responseXML).find("User").each(function() { userId = $(this).attr("ID"); }); @@ -2506,7 +2476,7 @@ // Get the current item's ID from the Query String var queryStringVals = $().SPServices.SPGetQueryString(); var thisID = queryStringVals.ID; - SPServicesContext.thisList = $().SPServices.SPListNameFromUrl(); + currentContext.thisList = $().SPServices.SPListNameFromUrl(); // Set the messages based on the options provided var msg = "{1}
    "; @@ -2514,7 +2484,7 @@ // We need the DisplayName var columnDisplayName = $().SPServices.SPGetDisplayFromStatic({ - listName: SPServicesContext.thisList, + listName: currentContext.thisList, columnStaticName: opt.columnStaticName }); var columnObj = $("input[Title='" + columnDisplayName + "']"); @@ -2530,7 +2500,7 @@ $().SPServices({ operation: "GetListItems", async: false, - listName: SPServicesContext.thisList, + listName: currentContext.thisList, // Make sure we get all the items, ignoring any filters on the default view. CAMLQuery: "", // Filter based on columnStaticName's value @@ -2655,7 +2625,7 @@ // parameter name than ID. Specify that name here, if needed. }, options); - SPServicesContext.thisList = $().SPServices.SPListNameFromUrl(); + currentContext.thisList = $().SPServices.SPListNameFromUrl(); var queryStringVals = $().SPServices.SPGetQueryString(); var lastID = queryStringVals.ID; var QSList = queryStringVals.List; @@ -2666,7 +2636,7 @@ // original Source. if(typeof queryStringVals.ID === "undefined") { lastID = $().SPServices.SPGetLastItemId({ - listName: SPServicesContext.thisList + listName: currentContext.thisList }); $("form[name='aspnetForm']").each(function() { // This page... @@ -2702,15 +2672,13 @@ } else { while(queryStringVals.ID === lastID) { lastID = $().SPServices.SPGetLastItemId({ - listName: SPServicesContext.thisList + listName: currentContext.thisList }); } // If there is a RedirectURL parameter on the Query String, then redirect there instead of the value // specified in the options (opt.redirectUrl) var thisRedirectUrl = (typeof queryStringVals.RedirectURL === "string") ? queryStringVals.RedirectURL : opt.redirectUrl; - location.href = thisRedirectUrl + - (thisRedirectUrl.indexOf("?") > 0) ? "&" : "?" + - opt.qsParamName + "=" + lastID + + location.href = thisRedirectUrl + "?" + opt.qsParamName + "=" + lastID + ((typeof queryStringVals.RealSource === "string") ? ("&Source=" + queryStringVals.RealSource) : ""); } }; // End $.fn.SPServices.SPRedirectWithID @@ -2733,15 +2701,10 @@ if(thisMultiSelect.Obj.html() === null && opt.debug) { errBox(thisFunction, "multiSelectColumn: " + opt.multiSelectColumn, TXTColumnNotFound);return;} if(thisMultiSelect.Type !== "M" && opt.debug) { errBox(thisFunction, "multiSelectColumn: " + opt.multiSelectColumn, "Column is not multi-select.");return;} - var possibleValues = thisMultiSelect.Obj; - var selectedValues = possibleValues.closest("span").find("select[ID$='SelectResult']"); - // Create a temporary clone of the select to use to determine the appropriate width settings. // We'll append it to the end of the enclosing span. var cloneId = genContainerId("SPSetMultiSelectSizes", opt.multiSelectColumn); - var enclosingSpan = possibleValues.closest("span"); - enclosingSpan.append(""); - var cloneObj = enclosingSpan.find("> select"); + var cloneObj = $("").appendTo(thisMultiSelect.container); cloneObj.css({ "width": "auto", // We want the clone to resize its width based on the contents "height": 0, // Just to keep the page clean while we are using the clone @@ -2749,9 +2712,13 @@ }) // Add all the values to the cloned select. First the left (possible values) select... - cloneObj.append(possibleValues.find("option").clone()); + $(thisMultiSelect.master.candidateControl).find("option").each(function() { + cloneObj.append(""); + }); // ...then the right (selected values) select (in case some values have already been selected) - cloneObj.append(selectedValues.find("option").clone()); + $(thisMultiSelect.master.resultControl).find("option").each(function() { + cloneObj.append(""); + }); // We'll add 5px for a little padding on the right. var divWidth = cloneObj.width() + 5; @@ -2770,13 +2737,8 @@ var selectWidth = divWidth; // Set the new widths - possibleValues.css("width", selectWidth + "px").parent().css("width", newDivWidth + "px"); - selectedValues.css("width", selectWidth + "px").parent().css("width", newDivWidth + "px"); - // If the new widths are wide enough, remove the x scroll bar - if(opt.maxWidth === 0 || opt.maxWidth > newDivWidth) { - possibleValues.parent().css("overflow-x", "hidden"); - selectedValues.parent().css("overflow-x", "hidden"); - } + $(thisMultiSelect.master.candidateControl).css("width", selectWidth + "px").parent().css("width", newDivWidth + "px"); + $(thisMultiSelect.master.resultControl).css("width", selectWidth + "px").parent().css("width", newDivWidth + "px"); // Remove the select's clone, since we're done with it cloneObj.remove(); @@ -2824,7 +2786,7 @@ operation: "GetListCollection", webURL: opt.webURL, async: false, // Need this to be synchronous so we're assured of a valid value - completefunc: function (xData) { + completefunc: function (xData, Status) { $(xData.responseXML).find("List").each(function() { listXml = $(this); @@ -2841,7 +2803,7 @@ webURL: opt.webURL, listName: listXml.attr("ID"), async: false, // Need this to be synchronous so we're assured of a valid value - completefunc: function (xData) { + completefunc: function (xData, Status) { $(xData.responseXML).find("ContentType").each(function() { // Don't deal with folders if($(this).attr("ID").substring(0,6) !== "0x0120") { @@ -2878,7 +2840,7 @@ webURL: opt.webURL, listName: listXml.attr("ID"), async: false, // Need this to be synchronous so we're assured of a valid value - completefunc: function (xData) { + completefunc: function (xData, Status) { $(xData.responseXML).find("View").each(function() { SPScriptAuditPage(opt, listXml, "View", $(this).attr("DisplayName"), $(this).attr("Url")); }); @@ -2912,7 +2874,7 @@ cacheXML: true, webURL: opt.webURL, listName: listsArray[i], - completefunc: function (xData) { + completefunc: function (xData, Status) { $(xData.responseXML).find("List").each(function() { listXml = $(this); }); @@ -3044,22 +3006,23 @@ listName: opt.listName }); - // When the promise is available... + // when the promise is available... thisGetList.done(function() { - - // Figure out if we need to handle fill in choices - columnFillInChoice = ($(thisGetList.responseXML).find("Field[DisplayName='" + opt.columnName + "']").attr("FillInChoice") === "TRUE") ? true : false; + $(thisGetList.responseXML).find("Field[DisplayName='" + opt.columnName + "']").each(function() { + // Determine whether columnName allows a fill-in choice + columnFillInChoice = ($(this).attr("FillInChoice") === "TRUE") ? true : false; + // Stop looking;we're done + return false; + }); - // Find the column in the form var thisFormField = findFormField(opt.columnName); var totalChoices = $(thisFormField).find("tr").length; var choiceNumber = 0; var fillinPrompt; var fillinInput; - // Collect all of the choices - $(thisFormField).find("tr").each(function(i) { + $(thisFormField).find("tr").each(function() { choiceNumber++; // If this is the fill-in prompt, save it... if(columnFillInChoice && choiceNumber === (totalChoices - 1)) { @@ -3072,6 +3035,7 @@ columnOptions.push($(this).html()); } }); + out = ""; // If randomize is true, randomly sort the options if(opt.randomize) { @@ -3079,7 +3043,6 @@ } // Add all of the options to the out string - out = ""; for(i=0; i < columnOptions.length; i++) { out += columnOptions[i]; // If we've already got perRow columnOptions in the row, close off the row @@ -3087,11 +3050,11 @@ out += ""; } } - out += ""; + out += ""; // If we are allowing a fill-in choice, add that option in a separate row at the bottom if(columnFillInChoice) { - out += "" + fillinPrompt + fillinInput + ""; + out += "" + fillinPrompt + fillinInput + ""; } // Remove the existing rows... @@ -3107,7 +3070,7 @@ $.fn.SPServices.SPAutocomplete = function (options) { var opt = $.extend({}, { - WebURL: "", // [Optional] The name of the Web (site) which contains the sourceList + webURL: "", // [Optional] The name of the Web (site) which contains the sourceList sourceList: "", // The name of the list which contains the values sourceColumn: "", // The static name of the column which contains the values columnName: "", // The display name of the column in the form @@ -3129,8 +3092,7 @@ // Find the input control for the column and save some of its attributes var columnObj = $("input[Title='" + opt.columnName + "']"); - $("input[Title='" + opt.columnName + "']").css("position", ""); - var columnObjId = columnObj.attr("ID"); + columnObj.css("position", ""); var columnObjColor = columnObj.css("color"); var columnObjWidth = columnObj.css("width"); @@ -3146,11 +3108,11 @@ columnObj.wrap("
    "); // Create a div to contain the matching values and add it to the DOM - var containerId = genContainerId("SPAutocomplete", opt.columnName); + var containerId = genContainerId("SPAutocomplete", opt.columnName); columnObj.after("
    "); // Set the width to match the width of the input control - $("#" + containerId).css("width", columnObjWidth); + $("#" + containerId).css("width", columnObjWidth); // Handle keypresses $(columnObj).keyup(function () { @@ -3181,7 +3143,7 @@ if(opt.CAMLQuery.length > 0) { camlQuery += ""; } - camlQuery += "<" + opt.filterType + ">" + columnValue + ""; + camlQuery += "<" + opt.filterType + ">" + columnValue + ""; if(opt.CAMLQuery.length > 0) { camlQuery += opt.CAMLQuery + ""; } @@ -3230,7 +3192,7 @@ // If a highlightClass has been supplied, wrap a span around each match if(opt.highlightClass.length > 0) { // Set up Regex based on whether we want to ignore case - var thisRegex = RegExp(columnValue, opt.ignoreCase ? "gi" : "g"); + var thisRegex = new RegExp(columnValue, opt.ignoreCase ? "gi" : "g"); // Look for all occurrences var matches = matchArray[i].match(thisRegex); var startLoc = 0; @@ -3252,7 +3214,7 @@ // Set up hehavior for the available values in the list element $("#" + containerId + " li").click(function () { $("#" + containerId).fadeOut(opt.slideUpSpeed); - $("#" + columnObjId).val($(this).text()); + columnObj.val($(this).text()); }).mouseover(function () { var mouseoverCss = { "cursor": "hand", @@ -3310,11 +3272,11 @@ // Has the list name or GUID been passed in? if(opt.listName.length > 0) { - SPServicesContext.thisList = opt.listName; - return SPServicesContext.thisList; + currentContext.thisList = opt.listName; + return currentContext.thisList; // Do we already know the current list? - } else if(SPServicesContext.thisList.length > 0) { - return SPServicesContext.thisList; + } else if(currentContext.thisList.length > 0) { + return currentContext.thisList; } // Parse out the list's root URL from the current location or the passed url @@ -3326,12 +3288,12 @@ $().SPServices({ operation: "GetListCollection", async: false, - completefunc: function(xData) { + completefunc: function(xData, Status) { $(xData.responseXML).find("List").each(function() { var defaultViewUrl = $(this).attr("DefaultViewUrl"); var listCollList = defaultViewUrl.substring(0, defaultViewUrl.lastIndexOf(SLASH) + 1).toUpperCase(); if(listPath.indexOf(listCollList) > 0) { - SPServicesContext.thisList = $(this).attr("ID"); + currentContext.thisList = $(this).attr("ID"); return false; } }); @@ -3339,7 +3301,7 @@ }); // Return the list GUID (ID) - return SPServicesContext.thisList; + return currentContext.thisList; }; // End $.fn.SPServices.SPListNameFromUrl @@ -3353,7 +3315,6 @@ batchCmd: "Update", // The operation to perform. By default, Update. valuepairs: [], // Valuepairs for the update in the form [[fieldname1, fieldvalue1], [fieldname2, fieldvalue2]...] completefunc: null, // Function to call on completion of rendering the change. - folder: "", // If specified, we will look only at items in that folder debug: false // If true, show error messages;if false, run silent }, options); @@ -3368,9 +3329,7 @@ webURL: opt.webURL, listName: opt.listName, CAMLQuery: opt.CAMLQuery, - CAMLQueryOptions: "" + - ((opt.folder.length > 0) ? "" + opt.folder + "" : "") + - "", + CAMLQueryOptions: "", completefunc: function(xData) { $(xData.responseXML).SPFilterNode("z:row").each(function() { itemsToUpdate.push($(this).attr("ows_ID")); @@ -3406,37 +3365,13 @@ completefunc: function(xData) { // If present, call completefunc when all else is done if(opt.completefunc !== null) { - opt.completefunc(xData); + opt.completefunc(xData, Status); } } }); }; // End $.fn.SPServices.SPUpdateMultipleListItems - - // Convert a JavaScript date to the ISO 8601 format required by SharePoint to update list items - $.fn.SPServices.SPConvertDateToISO = function (options) { - - var opt = $.extend({}, { - dateToConvert: new Date(), // The JavaScript date we'd like to convert. If no date is passed, the function returns the current date/time - dateOffset: "-05:00" // The time zone offset requested. Default is EST - }, options); - - //Generate ISO 8601 date/time formatted string - var s = ""; - var d = opt.dateToConvert; - s += d.getFullYear() + "-"; - s += pad(d.getMonth() + 1) + "-"; - s += pad(d.getDate()); - s += "T" + pad(d.getHours()) + ":"; - s += pad(d.getMinutes()) + ":"; - s += pad(d.getSeconds()) + "Z" + opt.dateOffset; - //Return the ISO8601 date string - return s; - - }; // End $.fn.SPServices.SPConvertDateToISO - - // This method for finding specific nodes in the returned XML was developed by Steve Workman. See his blog post // http://www.steveworkman.com/html5-2/javascript/2011/improving-javascript-xml-node-finding-performance-by-2000/ // for performance details. @@ -3531,6 +3466,9 @@ case "Calc": colValue = calcToJsonObject(v); break; + case "Attachments": + colValue = lookupToJsonObject(v); + break; default: // All other objectTypes will be simple strings colValue = stringToJsonObject(v); @@ -3639,8 +3577,7 @@ // contents - The element which contains the current value // currentValue - The current value if it is set // checkNames - The Check Names image (in case you'd like to click it at some point) - - $.fn.SPServices.SPFindPeoplePicker = function(options) { + $.fn.SPFindPeoplePicker = function(options) { var opt = $.extend({}, { peoplePickerDisplayName: "", // The displayName of the People Picker on the form @@ -3713,50 +3650,7 @@ }); return {row: thisRow, contents: thisContents, currentValue: thisCurrentValue, checkNames: thisCheckNames, dictionaryEntries: dictionaryEntries}; - - }; // End $.fn.SPServices.SPFindPeoplePicker - - // Mistakenly released previously outside the SPServices namespace. This takes care of offering both. - $.fn.SPFindPeoplePicker = function(options) { - return $().SPServices.SPFindPeoplePicker(options); - }; // End $.fn.SPFindPeoplePicker - - - - // Find a People Picker in the page - // Returns references to: - // row - The TR which contains the People Picker (useful if you'd like to hide it at some point) - // contents - The element which contains the current value - // currentValue - The current value if it is set - // checkNames - The Check Names image (in case you'd like to click it at some point) - $.fn.SPServices.SPFindMMSPicker = function(options) { - - var opt = $.extend({}, { - MMSDisplayName: "" // The displayName of the MMS Picker on the form - }, options); - - var thisTerms = []; - - // Find the div for the column which contains the entered data values - var thisDiv = $("div[title='" + opt.MMSDisplayName + "']"); - var thisHiddenInput = thisDiv.closest("td").find("input[type='hidden']"); - var thisTermArray = thisHiddenInput.val().split(";"); - - for(var i=0; i < thisTermArray.length; i++) { - var thisOne = thisTermArray[i].split("|"); - thisTerms.push({ - value: thisOne[0], - guid: thisOne[1] - }); - - } - - return { - terms: thisTerms - }; - - }; // End $.fn.SPServices.SPFindMMSPicker - + }; // Return the current version of SPServices as a string $.fn.SPServices.Version = function () { @@ -3774,12 +3668,12 @@ // SharePoint 2010 gives us a context variable if(typeof _spPageContextInfo !== "undefined") { - this.thisSite = _spPageContextInfo.webServerRelativeUrl; + this.thisSite = _spPageContextInfo.webAbsoluteUrl; this.thisList = _spPageContextInfo.pageListId; this.thisUserId = _spPageContextInfo.userId; - // In SharePoint 2007, we know the site and UserId + // In SharePoint 2007, we know the UserID only } else { - this.thisSite = (typeof L_Menu_BaseUrl !== "undefined") ? L_Menu_BaseUrl : ""; + this.thisSite = ""; this.thisList = ""; this.thisUserId = (typeof _spUserId !== "undefined") ? _spUserId : undefined; } @@ -3951,28 +3845,18 @@ } else { this.Type = null; } + + if(this.Type === "M") { + // Find the important bits of the multiselect control + this.container = this.Obj.closest("span"); + this.MultiLookupPickerdata = this.container.find("input[id$='" + multiLookupPrefix + "_data'], input[id$='" + multiLookupPrefix2013 + "_data']"); + var addButtonId = this.container.find("[id$='AddButton']").attr("id"); + this.master = + window[addButtonId.replace(/AddButton/, multiLookupPrefix + "_m")] || // SharePoint 2007 + window[addButtonId.replace(/AddButton/, multiLookupPrefix2013 + "_m")]; // SharePoint 2013 + } } // End of function DropdownCtl - - - // Find the MultiLookupPickerdata input element. The structures are slightly different in 2013 vs. prior versions. - function MultiLookupPicker(o) { - - // Find input element that contains 'MultiLookup' and ends with 'data'. This holds all available values. - this.MultiLookupPickerdata = o.closest("span").find("input[id*='MultiLookup'][id$='data']"); - - // The ids in 2013 are different than prior versions, so we need to parse them out. - var thisMultiLookupPickerdataId = this.MultiLookupPickerdata.attr("id"); - var thisIdEndLoc = thisMultiLookupPickerdataId.indexOf("Multi"); - var thisIdEnd = thisMultiLookupPickerdataId.substr(thisIdEndLoc); - var thisMasterId = thisMultiLookupPickerdataId.substr(0, thisIdEndLoc) + thisIdEnd.substr(0, thisIdEnd.indexOf("_") + 1) + "m"; - - this.master = window[thisMasterId]; - - } // End of function MultiLookupPicker - - - // Returns the selected value(s) for a dropdown in an array. Expects a dropdown object as returned by the DropdownCtl function. // If matchOnId is true, returns the ids rather than the text values for the selection options(s). function getDropdownSelected(columnSelect, matchOnId) { @@ -3991,13 +3875,16 @@ if(matchOnId) { columnSelectSelected.push($("input[id='"+ columnSelect.Obj.attr("optHid") + "']").val() || []); } else { - columnSelectSelected.push(columnSelect.Obj.attr("value") || []); + columnSelectSelected.push(columnSelect.Obj.val() || []); } break; case "M": - var columnSelections = columnSelect.Obj.closest("span").find("select[ID$='SelectResult']"); - $(columnSelections).find("option").each(function() { - columnSelectSelected.push($(this).html()); + $(columnSelect.master.resultControl).find("option").each(function() { + if(matchOnId) { + columnSelectSelected.push($(this).val()); + } else { + columnSelectSelected.push($(this).html()); + } }); break; default: @@ -4047,7 +3934,7 @@ operation: "GetFormCollection", async: false, listName: l, - completefunc: function (xData) { + completefunc: function (xData, Status) { u = $(xData.responseXML).find("Form[Type='" + f + "']").attr("Url"); } }); @@ -4099,7 +3986,7 @@ }); return thisFormBody; } // End of function findFormField - + // The SiteData operations have the same names as other Web Service operations. To make them easy to call and unique, I'm using // the SiteData prefix on their names. This function replaces that name with the right name in the SOAPEnvelope. function siteDataFixSOAPEnvelope(SOAPEnvelope, siteDataOperation) { @@ -4176,8 +4063,5 @@ this.value = spl[1]; } - function pad(n) { - return n < 10 ? "0" + n : n; - } })(jQuery); \ No newline at end of file diff --git a/jquery.SPServices-2013.02.min.js b/jquery.SPServices-2013.02.min.js new file mode 100644 index 0000000..3699d09 --- /dev/null +++ b/jquery.SPServices-2013.02.min.js @@ -0,0 +1,21 @@ +/* + * SPServices - Work with SharePoint's Web Services using jQuery + * Version 2013.02 + * @requires jQuery v1.8 or greater - jQuery 1.10.x recommended + * + * Copyright (c) 2009-2013 Sympraxis Consulting LLC + * Examples and docs at: + * http://spservices.codeplex.com + * Licensed under the MIT license: + * http://www.opensource.org/licenses/mit-license.php + */ +/* + * @description Work with SharePoint's Web Services using jQuery + * @type jQuery + * @name SPServices + * @category Plugins/SPServices + * @author Sympraxis Consulting LLC/marc.anderson@sympraxisconsulting.com + */ +/* jshint undef: true */ +/* global _spUserId, _spPageContextInfo, GipAddSelectedItems, GipRemoveSelectedItems, GipGetGroupData */ +(function(ak){var Z="2012.02";var P="/";var ah="Column not found on page";var ab="http://schemas.microsoft.com/sharepoint";var an="MultiLookupPicker";var g="MultiLookup";var A={};var b="Alerts";var u="Authentication";var am="Copy";var F="Forms";var at="Lists";var m="Meetings";var B="People";var f="Permissions";var h="PublishedLinksService";var ai="Search";var ag="SharePointDiagnostics";var Y="SiteData";var aA="Sites";var I="SocialDataService";var ae="SpellCheck";var o="TaxonomyClientService";var l="usergroup";var J="UserProfileService";var D="Versions";var az="Views";var e="WebPartPages";var aw="Webs";var E="Workflow";var ac=new ap();var N=0;var x=["listName","description"];var T=[];T.GetAlerts=[b,false];T.DeleteAlerts=[b,true];T.Mode=[u,false];T.Login=[u,false];T.CopyIntoItems=[am,true];T.CopyIntoItemsLocal=[am,true];T.GetItem=[am,false];T.GetForm=[F,false];T.GetFormCollection=[F,false];T.AddAttachment=[at,true];T.AddDiscussionBoardItem=[at,true];T.AddList=[at,true];T.AddListFromFeature=[at,true];T.ApplyContentTypeToList=[at,true];T.CheckInFile=[at,true];T.CheckOutFile=[at,true];T.CreateContentType=[at,true];T.DeleteAttachment=[at,true];T.DeleteContentType=[at,true];T.DeleteContentTypeXmlDocument=[at,true];T.DeleteList=[at,true];T.GetAttachmentCollection=[at,false];T.GetList=[at,false];T.GetListAndView=[at,false];T.GetListCollection=[at,false];T.GetListContentType=[at,false];T.GetListContentTypes=[at,false];T.GetListItemChanges=[at,false];T.GetListItemChangesSinceToken=[at,false];T.GetListItems=[at,false];T.GetVersionCollection=[at,false];T.UndoCheckOut=[at,true];T.UpdateContentType=[at,true];T.UpdateContentTypesXmlDocument=[at,true];T.UpdateContentTypeXmlDocument=[at,true];T.UpdateList=[at,true];T.UpdateListItems=[at,true];T.AddMeeting=[m,true];T.CreateWorkspace=[m,true];T.RemoveMeeting=[m,true];T.SetWorkSpaceTitle=[m,true];T.ResolvePrincipals=[B,false];T.SearchPrincipals=[B,false];T.AddPermission=[f,true];T.AddPermissionCollection=[f,true];T.GetPermissionCollection=[f,true];T.RemovePermission=[f,true];T.RemovePermissionCollection=[f,true];T.UpdatePermission=[f,true];T.GetLinks=[h,true];T.GetPortalSearchInfo=[ai,false];T.GetQuerySuggestions=[ai,false];T.GetSearchMetadata=[ai,false];T.Query=[ai,false];T.QueryEx=[ai,false];T.Registration=[ai,false];T.Status=[ai,false];T.SendClientScriptErrorReport=[ag,true];T.GetAttachments=[Y,false];T.EnumerateFolder=[Y,false];T.SiteDataGetList=[Y,false];T.SiteDataGetListCollection=[Y,false];T.SiteDataGetSite=[Y,false];T.SiteDataGetSiteUrl=[Y,false];T.SiteDataGetWeb=[Y,false];T.CreateWeb=[aA,true];T.DeleteWeb=[aA,false];T.GetSite=[aA,false];T.GetSiteTemplates=[aA,false];T.AddComment=[I,true];T.AddTag=[I,true];T.AddTagByKeyword=[I,true];T.CountCommentsOfUser=[I,false];T.CountCommentsOfUserOnUrl=[I,false];T.CountCommentsOnUrl=[I,false];T.CountRatingsOnUrl=[I,false];T.CountTagsOfUser=[I,false];T.DeleteComment=[I,true];T.DeleteRating=[I,true];T.DeleteTag=[I,true];T.DeleteTagByKeyword=[I,true];T.DeleteTags=[I,true];T.GetAllTagTerms=[I,false];T.GetAllTagTermsForUrlFolder=[I,false];T.GetAllTagUrls=[I,false];T.GetAllTagUrlsByKeyword=[I,false];T.GetCommentsOfUser=[I,false];T.GetCommentsOfUserOnUrl=[I,false];T.GetCommentsOnUrl=[I,false];T.GetRatingAverageOnUrl=[I,false];T.GetRatingOfUserOnUrl=[I,false];T.GetRatingOnUrl=[I,false];T.GetRatingsOfUser=[I,false];T.GetRatingsOnUrl=[I,false];T.GetSocialDataForFullReplication=[I,false];T.GetTags=[I,true];T.GetTagsOfUser=[I,true];T.GetTagTerms=[I,true];T.GetTagTermsOfUser=[I,true];T.GetTagTermsOnUrl=[I,true];T.GetTagUrlsOfUser=[I,true];T.GetTagUrlsOfUserByKeyword=[I,true];T.GetTagUrls=[I,true];T.GetTagUrlsByKeyword=[I,true];T.SetRating=[I,true];T.UpdateComment=[I,true];T.SpellCheck=[ae,false];T.AddTerms=[o,true];T.GetChildTermsInTerm=[o,false];T.GetChildTermsInTermSet=[o,false];T.GetKeywordTermsByGuids=[o,false];T.GetTermsByLabel=[o,false];T.GetTermSets=[o,false];T.AddGroup=[l,true];T.AddGroupToRole=[l,true];T.AddRole=[l,true];T.AddRoleDef=[l,true];T.AddUserCollectionToGroup=[l,true];T.AddUserCollectionToRole=[l,true];T.AddUserToGroup=[l,true];T.AddUserToRole=[l,true];T.GetAllUserCollectionFromWeb=[l,false];T.GetGroupCollection=[l,false];T.GetGroupCollectionFromRole=[l,false];T.GetGroupCollectionFromSite=[l,false];T.GetGroupCollectionFromUser=[l,false];T.GetGroupCollectionFromWeb=[l,false];T.GetGroupInfo=[l,false];T.GetRoleCollection=[l,false];T.GetRoleCollectionFromGroup=[l,false];T.GetRoleCollectionFromUser=[l,false];T.GetRoleCollectionFromWeb=[l,false];T.GetRoleInfo=[l,false];T.GetRolesAndPermissionsForCurrentUser=[l,false];T.GetRolesAndPermissionsForSite=[l,false];T.GetUserCollection=[l,false];T.GetUserCollectionFromGroup=[l,false];T.GetUserCollectionFromRole=[l,false];T.GetUserCollectionFromSite=[l,false];T.GetUserCollectionFromWeb=[l,false];T.GetUserInfo=[l,false];T.GetUserLoginFromEmail=[l,false];T.RemoveGroup=[l,true];T.RemoveGroupFromRole=[l,true];T.RemoveRole=[l,true];T.RemoveUserCollectionFromGroup=[l,true];T.RemoveUserCollectionFromRole=[l,true];T.RemoveUserCollectionFromSite=[l,true];T.RemoveUserFromGroup=[l,true];T.RemoveUserFromRole=[l,true];T.RemoveUserFromSite=[l,true];T.RemoveUserFromWeb=[l,true];T.UpdateGroupInfo=[l,true];T.UpdateRoleDefInfo=[l,true];T.UpdateRoleInfo=[l,true];T.UpdateUserInfo=[l,true];T.AddColleague=[J,true];T.AddLink=[J,true];T.AddMembership=[J,true];T.AddPinnedLink=[J,true];T.CreateMemberGroup=[J,true];T.CreateUserProfileByAccountName=[J,true];T.GetCommonColleagues=[J,false];T.GetCommonManager=[J,false];T.GetCommonMemberships=[J,false];T.GetInCommon=[J,false];T.GetPropertyChoiceList=[J,false];T.GetUserColleagues=[J,false];T.GetUserLinks=[J,false];T.GetUserMemberships=[J,false];T.GetUserPinnedLinks=[J,false];T.GetUserProfileByGuid=[J,false];T.GetUserProfileByIndex=[J,false];T.GetUserProfileByName=[J,false];T.GetUserProfileCount=[J,false];T.GetUserProfileSchema=[J,false];T.ModifyUserPropertyByAccountName=[J,true];T.RemoveAllColleagues=[J,true];T.RemoveAllLinks=[J,true];T.RemoveAllMemberships=[J,true];T.RemoveAllPinnedLinks=[J,true];T.RemoveColleague=[J,true];T.RemoveLink=[J,true];T.RemoveMembership=[J,true];T.RemovePinnedLink=[J,true];T.UpdateColleaguePrivacy=[J,true];T.UpdateLink=[J,true];T.UpdateMembershipPrivacy=[J,true];T.UpdatePinnedLink=[J,true];T.DeleteAllVersions=[D,true];T.DeleteVersion=[D,true];T.GetVersions=[D,false];T.RestoreVersion=[D,true];T.AddView=[az,true];T.DeleteView=[az,true];T.GetView=[az,false];T.GetViewHtml=[az,false];T.GetViewCollection=[az,false];T.UpdateView=[az,true];T.UpdateViewHtml=[az,true];T.AddWebPart=[e,true];T.AddWebPartToZone=[e,true];T.GetWebPart2=[e,false];T.GetWebPartPage=[e,false];T.GetWebPartProperties=[e,false];T.GetWebPartProperties2=[e,false];T.CreateContentType=[aw,true];T.GetColumns=[aw,false];T.GetContentType=[aw,false];T.GetContentTypes=[aw,false];T.GetCustomizedPageStatus=[aw,false];T.GetListTemplates=[aw,false];T.GetObjectIdFromUrl=[aw,false];T.GetWeb=[aw,false];T.GetWebCollection=[aw,false];T.GetAllSubWebCollection=[aw,false];T.UpdateColumns=[aw,true];T.UpdateContentType=[aw,true];T.WebUrlFromPageUrl=[aw,false];T.AlterToDo=[E,true];T.GetTemplatesForItem=[E,false];T.GetToDosForItem=[E,false];T.GetWorkflowDataForItem=[E,false];T.GetWorkflowTaskData=[E,false];T.StartWorkflow=[E,true];var S={};S.header="";S.footer="";S.payload="";var aa;ak.fn.SPServices=function(aB){var aD=ak.extend({},ak.fn.SPServices.defaults,aB);for(var aC=0;aC";aa=ab+"/soap/2002/1/alerts/";break;case m:S.opheader+="xmlns='"+ab+"/soap/meetings/' >";aa=ab+"/soap/meetings/";break;case f:S.opheader+="xmlns='"+ab+"/soap/directory/' >";aa=ab+"/soap/directory/";break;case h:S.opheader+="xmlns='http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService/' >";aa="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService/";break;case ai:S.opheader+="xmlns='urn:Microsoft.Search' >";aa="urn:Microsoft.Search/";break;case ag:S.opheader+="xmlns='"+ab+"/diagnostics/' >";aa="http://schemas.microsoft.com/sharepoint/diagnostics/";break;case I:S.opheader+="xmlns='http://microsoft.com/webservices/SharePointPortalServer/SocialDataService' >";aa="http://microsoft.com/webservices/SharePointPortalServer/SocialDataService/";break;case ae:S.opheader+="xmlns='http://schemas.microsoft.com/sharepoint/publishing/spelling/' >";aa="http://schemas.microsoft.com/sharepoint/publishing/spelling/SpellCheck";break;case o:S.opheader+="xmlns='"+ab+"/taxonomy/soap/' >";aa=ab+"/taxonomy/soap/";break;case l:S.opheader+="xmlns='"+ab+"/soap/directory/' >";aa=ab+"/soap/directory/";break;case J:S.opheader+="xmlns='http://microsoft.com/webservices/SharePointPortalServer/UserProfileService' >";aa="http://microsoft.com/webservices/SharePointPortalServer/UserProfileService/";break;case e:S.opheader+="xmlns='http://microsoft.com/sharepoint/webpartpages' >";aa="http://microsoft.com/sharepoint/webpartpages/";break;case E:S.opheader+="xmlns='"+ab+"/soap/workflow/' >";aa=ab+"/soap/workflow/";break;default:S.opheader+="xmlns='"+ab+"/soap/'>";aa=ab+"/soap/";break}aa+=aD.operation;S.opfooter="";var aF="_vti_bin/"+T[aD.operation][0]+".asmx";if(aD.webURL.charAt(aD.webURL.length-1)===P){aF=aD.webURL+aF}else{if(aD.webURL.length>0){aF=aD.webURL+P+aF}else{aF=ak().SPServices.SPGetCurrentSite()+P+aF}}S.payload="";switch(aD.operation){case"GetAlerts":break;case"DeleteAlerts":S.payload+="";for(aC=0;aC";break;case"Mode":break;case"Login":aq(aD,["username","password"]);break;case"CopyIntoItems":aq(aD,["SourceUrl"]);S.payload+="";for(aC=0;aC";aq(aD,["Fields","Stream","Results"]);break;case"CopyIntoItemsLocal":aq(aD,["SourceUrl"]);S.payload+="";for(aC=0;aC";break;case"GetItem":aq(aD,["Url","Fields","Stream"]);break;case"GetForm":aq(aD,["listName","formUrl"]);break;case"GetFormCollection":aq(aD,["listName"]);break;case"AddAttachment":aq(aD,["listName","listItemID","fileName","attachment"]);break;case"AddDiscussionBoardItem":aq(aD,["listName","message"]);break;case"AddList":aq(aD,["listName","description","templateID"]);break;case"AddListFromFeature":aq(aD,["listName","description","featureID","templateID"]);break;case"ApplyContentTypeToList":aq(aD,["webUrl","contentTypeId","listName"]);break;case"CheckInFile":aq(aD,["pageUrl","comment","CheckinType"]);break;case"CheckOutFile":aq(aD,["pageUrl","checkoutToLocal","lastmodified"]);break;case"CreateContentType":aq(aD,["listName","displayName","parentType","fields","contentTypeProperties","addToView"]);break;case"DeleteAttachment":aq(aD,["listName","listItemID","url"]);break;case"DeleteContentType":aq(aD,["listName","contentTypeId"]);break;case"DeleteContentTypeXmlDocument":aq(aD,["listName","contentTypeId","documentUri"]);break;case"DeleteList":aq(aD,["listName"]);break;case"GetAttachmentCollection":aq(aD,["listName",["listItemID","ID"]]);break;case"GetList":aq(aD,["listName"]);break;case"GetListAndView":aq(aD,["listName","viewName"]);break;case"GetListCollection":break;case"GetListContentType":aq(aD,["listName","contentTypeId"]);break;case"GetListContentTypes":aq(aD,["listName"]);break;case"GetListItems":aq(aD,["listName","viewName",["query","CAMLQuery"],["viewFields","CAMLViewFields"],["rowLimit","CAMLRowLimit"],["queryOptions","CAMLQueryOptions"]]);break;case"GetListItemChanges":aq(aD,["listName","viewFields","since","contains"]);break;case"GetListItemChangesSinceToken":aq(aD,["listName","viewName","query","viewFields","rowLimit","queryOptions","changeToken","contains"]);break;case"GetVersionCollection":aq(aD,["strlistID","strlistItemID","strFieldName"]);break;case"UndoCheckOut":aq(aD,["pageUrl"]);break;case"UpdateContentType":aq(aD,["listName","contentTypeId","contentTypeProperties","newFields","updateFields","deleteFields","addToView"]);break;case"UpdateContentTypesXmlDocument":aq(aD,["listName","newDocument"]);break;case"UpdateContentTypeXmlDocument":aq(aD,["listName","contentTypeId","newDocument"]);break;case"UpdateList":aq(aD,["listName","listProperties","newFields","updateFields","deleteFields","listVersion"]);break;case"UpdateListItems":aq(aD,["listName"]);if(typeof aD.updates!=="undefined"&&aD.updates.length>0){aq(aD,["updates"])}else{S.payload+="";for(aC=0;aC"+K(aD.valuepairs[aC][1])+""}if(aD.batchCmd!=="New"){S.payload+=""+aD.ID+""}S.payload+=""}break;case"AddMeeting":aq(aD,["organizerEmail","uid","sequence","utcDateStamp","title","location","utcDateStart","utcDateEnd","nonGregorian"]);break;case"CreateWorkspace":aq(aD,["title","templateName","lcid","timeZoneInformation"]);break;case"RemoveMeeting":aq(aD,["recurrenceId","uid","sequence","utcDateStamp","cancelMeeting"]);break;case"SetWorkspaceTitle":aq(aD,["title"]);break;case"ResolvePrincipals":aq(aD,["principalKeys","principalType","addToUserInfoList"]);break;case"SearchPrincipals":aq(aD,["searchText","maxResults","principalType"]);break;case"AddPermission":aq(aD,["objectName","objectType","permissionIdentifier","permissionType","permissionMask"]);break;case"AddPermissionCollection":aq(aD,["objectName","objectType","permissionsInfoXml"]);break;case"GetPermissionCollection":aq(aD,["objectName","objectType"]);break;case"RemovePermission":aq(aD,["objectName","objectType","permissionIdentifier","permissionType"]);break;case"RemovePermissionCollection":aq(aD,["objectName","objectType","memberIdsXml"]);break;case"UpdatePermission":aq(aD,["objectName","objectType","permissionIdentifier","permissionType","permissionMask"]);break;case"GetLinks":break;case"GetPortalSearchInfo":S.opheader="<"+aD.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";aa="http://microsoft.com/webservices/OfficeServer/QueryService/"+aD.operation;break;case"GetQuerySuggestions":S.opheader="<"+aD.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";aa="http://microsoft.com/webservices/OfficeServer/QueryService/"+aD.operation;S.payload+=av("queryXml",j(aD.queryXml));break;case"GetSearchMetadata":S.opheader="<"+aD.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";aa="http://microsoft.com/webservices/OfficeServer/QueryService/"+aD.operation;break;case"Query":S.payload+=av("queryXml",j(aD.queryXml));break;case"QueryEx":S.opheader="<"+aD.operation+" xmlns='http://microsoft.com/webservices/OfficeServer/QueryService'>";aa="http://microsoft.com/webservices/OfficeServer/QueryService/"+aD.operation;S.payload+=av("queryXml",j(aD.queryXml));break;case"Registration":S.payload+=av("registrationXml",j(aD.registrationXml));break;case"Status":break;case"SendClientScriptErrorReport":aq(aD,["message","file","line","client","stack","team","originalFile"]);break;case"EnumerateFolder":aq(aD,["strFolderUrl"]);break;case"GetAttachments":aq(aD,["strListName","strItemId"]);break;case"SiteDataGetList":aq(aD,["strListName"]);S=k(S,aD.operation);break;case"SiteDataGetListCollection":S=k(S,aD.operation);break;case"SiteDataGetSite":S=k(S,aD.operation);break;case"SiteDataGetSiteUrl":aq(aD,["Url"]);S=k(S,aD.operation);break;case"SiteDataGetWeb":S=k(S,aD.operation);break;case"CreateWeb":aq(aD,["url","title","description","templateName","language","languageSpecified","locale","localeSpecified","collationLocale","collationLocaleSpecified","uniquePermissions","uniquePermissionsSpecified","anonymous","anonymousSpecified","presence","presenceSpecified"]);break;case"DeleteWeb":aq(aD,["url"]);break;case"GetSite":aq(aD,["SiteUrl"]);break;case"GetSiteTemplates":aq(aD,["LCID","TemplateList"]);break;case"AddComment":aq(aD,["url","comment","isHighPriority","title"]);break;case"AddTag":aq(aD,["url","termID","title","isPrivate"]);break;case"AddTagByKeyword":aq(aD,["url","keyword","title","isPrivate"]);break;case"CountCommentsOfUser":aq(aD,["userAccountName"]);break;case"CountCommentsOfUserOnUrl":aq(aD,["userAccountName","url"]);break;case"CountCommentsOnUrl":aq(aD,["url"]);break;case"CountRatingsOnUrl":aq(aD,["url"]);break;case"CountTagsOfUser":aq(aD,["userAccountName"]);break;case"DeleteComment":aq(aD,["url","lastModifiedTime"]);break;case"DeleteRating":aq(aD,["url"]);break;case"DeleteTag":aq(aD,["url","termID"]);break;case"DeleteTagByKeyword":aq(aD,["url","keyword"]);break;case"DeleteTags":aq(aD,["url"]);break;case"GetAllTagTerms":aq(aD,["maximumItemsToReturn"]);break;case"GetAllTagTermsForUrlFolder":aq(aD,["urlFolder","maximumItemsToReturn"]);break;case"GetAllTagUrls":aq(aD,["termID"]);break;case"GetAllTagUrlsByKeyword":aq(aD,["keyword"]);break;case"GetCommentsOfUser":aq(aD,["userAccountName","maximumItemsToReturn","startIndex"]);break;case"GetCommentsOfUserOnUrl":aq(aD,["userAccountName","url"]);break;case"GetCommentsOnUrl":aq(aD,["url","maximumItemsToReturn","startIndex"]);if(typeof aD.excludeItemsTime!=="undefined"&&aD.excludeItemsTime.length>0){S.payload+=av("excludeItemsTime",aD.excludeItemsTime)}break;case"GetRatingAverageOnUrl":aq(aD,["url"]);break;case"GetRatingOfUserOnUrl":aq(aD,["userAccountName","url"]);break;case"GetRatingOnUrl":aq(aD,["url"]);break;case"GetRatingsOfUser":aq(aD,["userAccountName"]);break;case"GetRatingsOnUrl":aq(aD,["url"]);break;case"GetSocialDataForFullReplication":aq(aD,["userAccountName"]);break;case"GetTags":aq(aD,["url"]);break;case"GetTagsOfUser":aq(aD,["userAccountName","maximumItemsToReturn","startIndex"]);break;case"GetTagTerms":aq(aD,["maximumItemsToReturn"]);break;case"GetTagTermsOfUser":aq(aD,["userAccountName","maximumItemsToReturn"]);break;case"GetTagTermsOnUrl":aq(aD,["url","maximumItemsToReturn"]);break;case"GetTagUrls":aq(aD,["termID"]);break;case"GetTagUrlsByKeyword":aq(aD,["keyword"]);break;case"GetTagUrlsOfUser":aq(aD,["termID","userAccountName"]);break;case"GetTagUrlsOfUserByKeyword":aq(aD,["keyword","userAccountName"]);break;case"SetRating":aq(aD,["url","rating","title","analysisDataEntry"]);break;case"UpdateComment":aq(aD,["url","lastModifiedTime","comment","isHighPriority"]);break;case"SpellCheck":aq(aD,["chunksToSpell","declaredLanguage","useLad"]);break;case"AddTerms":aq(aD,["sharedServiceId","termSetId","lcid","newTerms"]);break;case"GetChildTermsInTerm":aq(aD,["sspId","lcid","termId","termSetId"]);break;case"GetChildTermsInTermSet":aq(aD,["sspId","lcid","termSetId"]);break;case"GetKeywordTermsByGuids":aq(aD,["termIds","lcid"]);break;case"GetTermsByLabel":aq(aD,["label","lcid","matchOption","resultCollectionSize","termIds","addIfNotFound"]);break;case"GetTermSets":aq(aD,["sharedServiceId","termSetId","lcid","clientTimeStamps","clientVersions"]);break;case"AddGroup":aq(aD,["groupName","ownerIdentifier","ownerType","defaultUserLoginName","description"]);break;case"AddGroupToRole":aq(aD,["groupName","roleName"]);break;case"AddRole":aq(aD,["roleName","description","permissionMask"]);break;case"AddRoleDef":aq(aD,["roleName","description","permissionMask"]);break;case"AddUserCollectionToGroup":aq(aD,["groupName","usersInfoXml"]);break;case"AddUserCollectionToRole":aq(aD,["roleName","usersInfoXml"]);break;case"AddUserToGroup":aq(aD,["groupName","userName","userLoginName","userEmail","userNotes"]);break;case"AddUserToRole":aq(aD,["roleName","userName","userLoginName","userEmail","userNotes"]);break;case"GetAllUserCollectionFromWeb":break;case"GetGroupCollection":aq(aD,["groupNamesXml"]);break;case"GetGroupCollectionFromRole":aq(aD,["roleName"]);break;case"GetGroupCollectionFromSite":break;case"GetGroupCollectionFromUser":aq(aD,["userLoginName"]);break;case"GetGroupCollectionFromWeb":break;case"GetGroupInfo":aq(aD,["groupName"]);break;case"GetRoleCollection":aq(aD,["roleNamesXml"]);break;case"GetRoleCollectionFromGroup":aq(aD,["groupName"]);break;case"GetRoleCollectionFromUser":aq(aD,["userLoginName"]);break;case"GetRoleCollectionFromWeb":break;case"GetRoleInfo":aq(aD,["roleName"]);break;case"GetRolesAndPermissionsForCurrentUser":break;case"GetRolesAndPermissionsForSite":break;case"GetUserCollection":aq(aD,["userLoginNamesXml"]);break;case"GetUserCollectionFromGroup":aq(aD,["groupName"]);break;case"GetUserCollectionFromRole":aq(aD,["roleName"]);break;case"GetUserCollectionFromSite":break;case"GetUserCollectionFromWeb":break;case"GetUserInfo":aq(aD,["userLoginName"]);break;case"GetUserLoginFromEmail":aq(aD,["emailXml"]);break;case"RemoveGroup":aq(aD,["groupName"]);break;case"RemoveGroupFromRole":aq(aD,["roleName","groupName"]);break;case"RemoveRole":aq(aD,["roleName"]);break;case"RemoveUserCollectionFromGroup":aq(aD,["groupName","userLoginNamesXml"]);break;case"RemoveUserCollectionFromRole":aq(aD,["roleName","userLoginNamesXml"]);break;case"RemoveUserCollectionFromSite":aq(aD,["userLoginNamesXml"]);break;case"RemoveUserFromGroup":aq(aD,["groupName","userLoginName"]);break;case"RemoveUserFromRole":aq(aD,["roleName","userLoginName"]);break;case"RemoveUserFromSite":aq(aD,["userLoginName"]);break;case"RemoveUserFromWeb":aq(aD,["userLoginName"]);break;case"UpdateGroupInfo":aq(aD,["oldGroupName","groupName","ownerIdentifier","ownerType","description"]);break;case"UpdateRoleDefInfo":aq(aD,["oldRoleName","roleName","description","permissionMask"]);break;case"UpdateRoleInfo":aq(aD,["oldRoleName","roleName","description","permissionMask"]);break;case"UpdateUserInfo":aq(aD,["userLoginName","userName","userEmail","userNotes"]);break;case"AddColleague":aq(aD,["accountName","colleagueAccountName","group","privacy","isInWorkGroup"]);break;case"AddLink":aq(aD,["accountName","name","url","group","privacy"]);break;case"AddMembership":aq(aD,["accountName","membershipInfo","group","privacy"]);break;case"AddPinnedLink":aq(aD,["accountName","name","url"]);break;case"CreateMemberGroup":aq(aD,["membershipInfo"]);break;case"CreateUserProfileByAccountName":aq(aD,["accountName"]);break;case"GetCommonColleagues":aq(aD,["accountName"]);break;case"GetCommonManager":aq(aD,["accountName"]);break;case"GetCommonMemberships":aq(aD,["accountName"]);break;case"GetInCommon":aq(aD,["accountName"]);break;case"GetPropertyChoiceList":aq(aD,["propertyName"]);break;case"GetUserColleagues":aq(aD,["accountName"]);break;case"GetUserLinks":aq(aD,["accountName"]);break;case"GetUserMemberships":aq(aD,["accountName"]);break;case"GetUserPinnedLinks":aq(aD,["accountName"]);break;case"GetUserProfileByGuid":aq(aD,["guid"]);break;case"GetUserProfileByIndex":aq(aD,["index"]);break;case"GetUserProfileByName":if(typeof aD.accountName!=="undefined"&&aD.accountName.length>0){aq(aD,[["AccountName","accountName"]])}else{aq(aD,["AccountName"])}break;case"GetUserProfileCount":break;case"GetUserProfileSchema":break;case"ModifyUserPropertyByAccountName":aq(aD,["accountName","newData"]);break;case"RemoveAllColleagues":aq(aD,["accountName"]);break;case"RemoveAllLinks":aq(aD,["accountName"]);break;case"RemoveAllMemberships":aq(aD,["accountName"]);break;case"RemoveAllPinnedLinks":aq(aD,["accountName"]);break;case"RemoveColleague":aq(aD,["accountName","colleagueAccountName"]);break;case"RemoveLink":aq(aD,["accountName","id"]);break;case"RemoveMembership":aq(aD,["accountName","sourceInternal","sourceReference"]);break;case"RemovePinnedLink":aq(aD,["accountName","id"]);break;case"UpdateColleaguePrivacy":aq(aD,["accountName","colleagueAccountName","newPrivacy"]);break;case"UpdateLink":aq(aD,["accountName","data"]);break;case"UpdateMembershipPrivacy":aq(aD,["accountName","sourceInternal","sourceReference","newPrivacy"]);break;case"UpdatePinnedLink ":aq(aD,["accountName","data"]);break;case"DeleteAllVersions":aq(aD,["fileName"]);break;case"DeleteVersion":aq(aD,["fileName","fileVersion"]);break;case"GetVersions":aq(aD,["fileName"]);break;case"RestoreVersion":aq(aD,["fileName","fileVersion"]);break;case"AddView":aq(aD,["listName","viewName","viewFields","query","rowLimit","rowLimit","type","makeViewDefault"]);break;case"DeleteView":aq(aD,["listName","viewName"]);break;case"GetView":aq(aD,["listName","viewName"]);break;case"GetViewCollection":aq(aD,["listName"]);break;case"GetViewHtml":aq(aD,["listName","viewName"]);break;case"UpdateView":aq(aD,["listName","viewName","viewProperties","query","viewFields","aggregations","formats","rowLimit"]);break;case"UpdateViewHtml":aq(aD,["listName","viewName","viewProperties","toolbar","viewHeader","viewBody","viewFooter","viewEmpty","rowLimitExceeded","query","viewFields","aggregations","formats","rowLimit"]);break;case"AddWebPart":aq(aD,["pageUrl","webPartXml","storage"]);break;case"AddWebPartToZone":aq(aD,["pageUrl","webPartXml","storage","zoneId","zoneIndex"]);break;case"GetWebPart2":aq(aD,["pageUrl","storageKey","storage","behavior"]);break;case"GetWebPartPage":aq(aD,["documentName","behavior"]);break;case"GetWebPartProperties":aq(aD,["pageUrl","storage"]);break;case"GetWebPartProperties2":aq(aD,["pageUrl","storage","behavior"]);break;case"Webs.CreateContentType":aq(aD,["displayName","parentType","newFields","contentTypeProperties"]);break;case"GetColumns":aq(aD,["webUrl"]);break;case"GetContentType":aq(aD,["contentTypeId"]);break;case"GetContentTypes":break;case"GetCustomizedPageStatus":aq(aD,["fileUrl"]);break;case"GetListTemplates":break;case"GetObjectIdFromUrl":aq(aD,["objectUrl"]);break;case"GetWeb":aq(aD,[["webUrl","webURL"]]);break;case"GetWebCollection":break;case"GetAllSubWebCollection":break;case"UpdateColumns":aq(aD,["newFields","updateFields","deleteFields"]);break;case"Webs.UpdateContentType":aq(aD,["contentTypeId","contentTypeProperties","newFields","updateFields","deleteFields"]);break;case"WebUrlFromPageUrl":aq(aD,[["pageUrl","pageURL"]]);break;case"AlterToDo":aq(aD,["item","todoId","todoListId","taskData"]);break;case"GetTemplatesForItem":aq(aD,["item"]);break;case"GetToDosForItem":aq(aD,["item"]);break;case"GetWorkflowDataForItem":aq(aD,["item"]);break;case"GetWorkflowTaskData":aq(aD,["item","listId","taskId"]);break;case"StartWorkflow":aq(aD,["item","templateId","workflowParameters"]);break;default:break}var aG=S.header+S.opheader+S.payload+S.opfooter+S.footer;var aE;if(aD.cacheXML){aE=A[aG]}if(typeof aE==="undefined"){A[aG]=ak.ajax({url:aF,async:aD.async,beforeSend:function(i){if(T[aD.operation][1]){i.setRequestHeader("SOAPAction",aa)}},type:"POST",data:aG,dataType:"xml",contentType:"text/xml;charset='utf-8'",complete:function(aH,i){if(ak.isFunction(aD.completefunc)){aD.completefunc(aH,i)}}});return A[aG]}else{if(ak.isFunction(aD.completefunc)){aD.completefunc(aE,null)}return aE}};ak.fn.SPServices.defaults={cacheXML:false,operation:"",webURL:"",makeViewDefault:false,CAMLViewName:"",CAMLQuery:"",CAMLViewFields:"",CAMLRowLimit:0,CAMLQueryOptions:"",batchCmd:"Update",valuepairs:[],DestinationUrls:[],behavior:"Version3",storage:"Shared",objectType:"List",cancelMeeting:true,nonGregorian:false,fClaim:false,recurrenceId:0,sequence:0,maximumItemsToReturn:0,startIndex:0,isHighPriority:false,isPrivate:false,rating:1,maxResults:10,principalType:"User",async:true,completefunc:null};ak.fn.SPServices.SPGetCurrentSite=function(){if(ac.thisSite.length>0){return ac.thisSite}var i=S.header+""+((location.href.indexOf("?")>0)?location.href.substr(0,location.href.indexOf("?")):location.href)+""+S.footer;ak.ajax({async:false,url:"/_vti_bin/Webs.asmx",type:"POST",data:i,dataType:"xml",contentType:'text/xml;charset="utf-8"',complete:function(aC,aB){ac.thisSite=ak(aC.responseXML).find("WebUrlFromPageUrlResult").text()}});return ac.thisSite};ak.fn.SPServices.SPCascadeDropdowns=function(aJ){var aB=ak.extend({},{relationshipWebURL:"",relationshipList:"",relationshipListParentColumn:"",relationshipListChildColumn:"",relationshipListSortColumn:"",parentColumn:"",childColumn:"",listName:ak().SPServices.SPListNameFromUrl(),CAMLQuery:"",CAMLQueryOptions:"FALSE",promptText:"",noneText:"(None)",simpleChild:false,selectSingleOption:false,matchOnId:false,completefunc:null,debug:false},aJ);var aD=false;var aH="SPServices.SPCascadeDropdowns";var aE=new ar(aB.parentColumn);if(aE.Obj.html()===null&&aB.debug){W(aH,"parentColumn: "+aB.parentColumn,ah);return}var i=new ar(aB.childColumn);if(i.Obj.html()===null&&aB.debug){W(aH,"childColumn: "+aB.childColumn,ah);return}if(aB.simpleChild===true&&i.Type==="C"){ak().SPServices.SPComplexToSimpleDropdown({columnName:aB.childColumn});i=new ar(aB.childColumn)}var aI,aG;ak().SPServices({operation:"GetList",async:false,cacheXML:true,listName:aB.listName,completefunc:function(aK){ak(aK.responseXML).find("Fields").each(function(){ak(this).find("Field[DisplayName='"+aB.childColumn+"']").each(function(){aI=(ak(this).attr("Required")==="TRUE")?true:false;aG=ak(this).attr("StaticName");return false})})}});var aF={opt:aB,childSelect:i,childColumnStatic:aG,childColumnRequired:aI};var aC=aE.Obj.data("SPCascadeDropdownsChildColumns");if(typeof aC==="undefined"){aE.Obj.data("SPCascadeDropdownsChildColumns",[aF])}else{aC.push(aF);aE.Obj.data("SPCascadeDropdownsChildColumns",aC);aD=true}if(!aD){switch(aE.Type){case"S":aE.Obj.bind("change",function(){ay(aB.parentColumn,aE)});break;case"C":ak("input[id='"+aE.Obj.attr("optHid")+"']").bind("propertychange",function(){ay(aB.parentColumn,aE)});break;case"M":ak(aE.master.candidateControl).bind("dblclick",function(){ay(aB.parentColumn,aE)});ak(aE.master.resultControl).bind("dblclick",function(){ay(aB.parentColumn,aE)});ak(aE.master.addControl).bind("click",function(){ay(aB.parentColumn,aE)});ak(aE.master.removeControl).bind("click",function(){ay(aB.parentColumn,aE)});break;default:break}}ay(aB.parentColumn,aE)};function ay(aI,aD){var aJ="";var aC;var aF=null;var aH;var aE;var aG;var aB;var i=aD.Obj.data("SPCascadeDropdownsChildColumns");ak(i).each(function(){var aO=this.opt;var aM=this.childSelect;var aR=this.childColumnStatic;var aN=this.childColumnRequired;aC=c(aD,aO.matchOnId);var aL=aC.join(";#");if(aD.Obj.data("SPCascadeDropdown_Selected_"+aR)===aL){return}aD.Obj.data("SPCascadeDropdown_Selected_"+aR,aL);aF=c(aM,true);var aQ=(aO.relationshipListSortColumn.length>0)?aO.relationshipListSortColumn:aO.relationshipListChildColumn;var aK="";if(aO.CAMLQuery.length>0){aK+=""}if(aC.length===0){aK+=""}else{if(aC.length===1){aK+="":"'/>")+K(aC[0])+""}else{var aP=(aC.length>2)?true:false;for(N=0;N<(aC.length-1);N++){aK+=""}for(N=0;N":"'/>")+K(aC[N])+"";if(N>0&&(N<(aC.length-1))&&aP){aK+=""}}aK+=""}}if(aO.CAMLQuery.length>0){aK+=aO.CAMLQuery+""}aK+="";aK+="";ak().SPServices({operation:"GetListItems",async:false,webURL:aO.relationshipWebURL,listName:aO.relationshipList,CAMLQuery:aK,CAMLViewFields:"",CAMLRowLimit:0,CAMLQueryOptions:aO.CAMLQueryOptions,completefunc:function(aS){ak(aS.responseXML).find("errorstring").each(function(){var aU="SPServices.SPCascadeDropdowns";var aT=ak(this).text();if(aO.debug&&aT==="One or more field types are not installed properly. Go to the list settings page to delete these fields."){W(aU,"relationshipListParentColumn: "+aO.relationshipListParentColumn+" or relationshipListChildColumn: "+aO.relationshipListChildColumn,"Not found in relationshipList "+aO.relationshipList)}else{if(aO.debug&&aT==="Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."){W(aU,"relationshipList: "+aO.relationshipList,"List not found")}}return});switch(aM.Type){case"S":ak(aM.Obj).find("option").remove();if(!aN&&(aO.promptText.length>0)){aM.Obj.append("")}else{if(!aN){aM.Obj.append("")}}break;case"C":aJ=aN?"":aO.noneText+"|0";aM.Obj.attr("value","");break;case"M":ak(aM.master.candidateControl).find("option").remove();aH="";break;default:break}aE=parseFloat(ak(aS.responseXML).SPFilterNode("rs:data").attr("ItemCount"));ak(aS.responseXML).SPFilterNode("z:row").each(function(){var aU={};var aT=ak(this).attr("ows_"+aO.relationshipListChildColumn);if(typeof aT!=="undefined"&&aT.indexOf(";#")>0){aU=new n(aT)}else{aU.id=ak(this).attr("ows_ID");aU.value=aT}if(isNaN(aU.id)){aU.id=ak(this).attr("ows_ID")}aG=aU.id;aB=aU.value;switch(aM.Type){case"S":var aV=(ak(this).attr("ows_ID")===aF[0])?" selected='selected'":"";aM.Obj.append(""+aU.value+"");break;case"C":if(aU.id===aF[0]){aM.Obj.attr("value",aU.value)}aJ=aJ+((aJ.length>0)?"|":"")+aU.value+"|"+aU.id;break;case"M":ak(aM.master.candidateControl).append("");aH+=aU.id+"|t"+aU.value+"|t |t |t";break;default:break}});switch(aM.Type){case"S":aM.Obj.trigger("change");if(aE===1&&aO.selectSingleOption===true){ak(aM.Obj).find("option[value!='0']:first").attr("selected","selected")}break;case"C":aM.Obj.attr("choices",aJ);if(aE===1&&aO.selectSingleOption===true){ak(aM.Obj).attr("value",aB);ak("input[id='"+aM.Obj.attr("optHid")+"']").val(aG)}if(aM.Obj.val()===""){ak("input[id='"+aM.Obj.attr("optHid")+"']").val("")}break;case"M":aM.master.data="";aM.MultiLookupPickerdata.attr("value",aH);ak(aM.master.resultControl).find("option").each(function(){var aT=ak(this);aT.prop("selected",true);ak(aM.master.candidateControl).find("option[value='"+aT.val()+"']").each(function(){aT.prop("selected",false)})});GipRemoveSelectedItems(aM.master);ak(aM.master.candidateControl).find("option").each(function(){var aT=ak(this);ak(aM.master.resultControl).find("option[value='"+aT.val()+"']").each(function(){aT.remove()})});GipAddSelectedItems(aM.master);aM.master.data=GipGetGroupData(aH);ak(aM.master.candidateControl).trigger("dblclick");break;default:break}}});if(aO.completefunc!==null){aO.completefunc()}})}ak.fn.SPServices.SPComplexToSimpleDropdown=function(aJ){var i=ak.extend({},{columnName:"",completefunc:null,debug:false},aJ);var aC=new ar(i.columnName);if(aC.Obj.html()===null&&i.debug){W("SPServices.SPComplexToSimpleDropdown","columnName: "+i.columnName,ah);return}if(aC.Type!=="C"){return}var aH=ak(aC.Obj).attr("choices").split("|");var aD=ak(aC.Obj).attr("optHid");var aI=ak("input[id='"+aD+"']");var aB=ak("input[id='"+aD+"']").val();var aE=ad("SPComplexToSimpleDropdown",i.columnName);var aG="";ak(aC.Obj).closest("td").prepend(aG);ak(aC.Obj).closest("span").find("img").remove();ak(aC.Obj).closest("span").find("input").hide();ak("#"+aE).change(function(){var aK=ak(this).val();aI.val(aK);ak(aC.Obj).val(ak(this).find("option[value='"+(aK!=="0"?aK:"")+"']").html())});ak("#"+aE).trigger("change");if(i.completefunc!==null){i.completefunc()}};ak.fn.SPServices.SPDisplayRelatedInfo=function(aB){var aD=ak.extend({},{columnName:"",relatedWebURL:"",relatedList:"",relatedListColumn:"",relatedColumns:[],displayFormat:"table",headerCSSClass:"ms-vh2",rowCSSClass:"ms-vb",CAMLQuery:"",numChars:0,matchType:"Eq",matchOnId:false,completefunc:null,debug:false},aB);var i;var aC=[];var aG;var aF="SPServices.SPDisplayRelatedInfo";var aE=new ar(aD.columnName);if(aE.Obj.html()===null&&aD.debug){W(aF,"columnName: "+aD.columnName,ah);return}i=ad("SPDisplayRelatedInfo",aD.columnName);ak().SPServices({operation:"GetList",async:false,cacheXML:true,webURL:aD.relatedWebURL,listName:aD.relatedList,completefunc:function(aH){ak(aH.responseXML).find("faultcode").each(function(){if(aD.debug){W(aF,"relatedList: "+aD.relatedList,"List not found");return}});aG=ak(aH.responseXML).find("List");for(N=0;N Field[Name='"+aD.relatedColumns[N]+"']")}}});switch(aE.Type){case"S":aE.Obj.bind("change",function(){af(aD,i,aG,aC)});break;case"C":ak("input[id='"+aE.Obj.attr("optHid")+"']").bind("propertychange",function(){af(aD,i,aG,aC)});break;case"M":if(aD.debug){W(aF,"columnName: "+aD.columnName,"Multi-select columns not supported by this function")}break;default:break}af(aD,i,aG,aC)};function af(aC,aG,aI,aD){var aJ=null;var aF="SPServices.SPDisplayRelatedInfo";var aE=new ar(aC.columnName);aJ=c(aE,aC.matchOnId);if(aE.Type==="C"&&aC.numChars>0&&aJ[0].length
    ");var i="";if(aC.CAMLQuery.length>0){i+=""}var aB=aD[aC.relatedListColumn].attr("Type");if(aB==="Lookup"){i+="":"'/>")+K(aJ[0])+""}else{i+="":aC.relatedListColumn+"'/>")+K(aJ[0])+""}if(aC.CAMLQuery.length>0){i+=aC.CAMLQuery+""}i+="";var aH=" ";for(N=0;N"}ak().SPServices({operation:"GetListItems",async:false,webURL:aC.relatedWebURL,listName:aC.relatedList,CAMLQuery:i,CAMLViewFields:""+aH+"",CAMLRowLimit:0,completefunc:function(aL){ak(aL.responseXML).find("errorstring").each(function(){var aM=ak(this).text();if(aC.debug&&aM==="One or more field types are not installed properly. Go to the list settings page to delete these fields."){W(aF,"relatedListColumn: "+aC.relatedListColumn,"Column not found in relatedList "+aC.relatedList)}else{if(aC.debug&&aM==="Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."){W(aF,"relatedList: "+aC.relatedList,"List not found")}}return});var aK;switch(aC.displayFormat){case"table":aK="";aK+="";for(N=0;N"+aD[aC.relatedColumns[N]].attr("DisplayName")+""}aK+="";ak(aL.responseXML).SPFilterNode("z:row").each(function(){aK+="";for(N=0;N"+V(aI,aD[aC.relatedColumns[N]],ak(this).attr("ows_"+aC.relatedColumns[N]),aC)+""}aK+=""});aK+="
    ";break;case"list":aK="";ak(aL.responseXML).SPFilterNode("z:row").each(function(){for(N=0;N"+aD[aC.relatedColumns[N]].attr("DisplayName")+"";aK+="";aK+=""}});aK+="
    "+V(aI,aD[aC.relatedColumns[N]],ak(this).attr("ows_"+aC.relatedColumns[N]),aC)+"
    ";break;default:break}ak("#"+aG).html(aK)}});if(aC.completefunc!==null){aC.completefunc()}}ak.fn.SPServices.SPFilterDropdown=function(aK){var aB=ak.extend({},{relationshipWebURL:"",relationshipList:"",relationshipListColumn:"",relationshipListSortColumn:"",relationshipListSortAscending:true,columnName:"",listName:ak().SPServices.SPListNameFromUrl(),promptText:"",noneText:"(None)",CAMLQuery:"",CAMLQueryOptions:"FALSE",completefunc:null,debug:false},aK);var aJ="";var aI=null;var aH;var aG;var aF="SPServices.SPFilterDropdown";var aE=new ar(aB.columnName);if(aE.Obj.html()===null&&aB.debug){W(aF,"columnName: "+aB.columnName,ah);return}aI=c(aE,true);var aD=(aB.relationshipListSortColumn.length>0)?aB.relationshipListSortColumn:aB.relationshipListColumn;var aC=(aB.relationshipListSortAscending===true)?"":"Ascending='FALSE'";var i="";if(aB.CAMLQuery.length>0){i+=aB.CAMLQuery}i+="";ak().SPServices({operation:"GetList",async:false,cacheXML:true,listName:aB.listName,completefunc:function(aL){ak(aL.responseXML).find("Fields").each(function(){ak(this).find("Field[DisplayName='"+aB.columnName+"']").each(function(){aG=(ak(this).attr("Required")==="TRUE")?true:false;return false})})}});ak().SPServices({operation:"GetListItems",async:false,webURL:aB.relationshipWebURL,listName:aB.relationshipList,CAMLQuery:i,CAMLViewFields:"",CAMLRowLimit:0,CAMLQueryOptions:aB.CAMLQueryOptions,completefunc:function(aL){ak(aL.responseXML).find("errorstring").each(function(){var aM=ak(this).text();if(aB.debug&&aM==="One or more field types are not installed properly. Go to the list settings page to delete these fields."){W(aF,"relationshipListColumn: "+aB.relationshipListColumn,"Not found in relationshipList "+aB.relationshipList)}else{if(aB.debug&&aM==="Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."){W(aF,"relationshipList: "+aB.relationshipList,"List not found")}}return});switch(aE.Type){case"S":ak(aE.Obj).find("option").remove();if(!aG&&(aB.promptText.length>0)){aE.Obj.append("")}else{if(!aG){aE.Obj.append("")}}break;case"C":aJ=aG?"":aB.noneText+"|0";aE.Obj.attr("value","");break;case"M":ak(aE.master.candidateControl).find("option").remove();aH="";break;default:break}ak(aL.responseXML).SPFilterNode("z:row").each(function(){var aN={};var aM=ak(this).attr("ows_"+aB.relationshipListColumn);if(typeof aM!=="undefined"&&aM.indexOf(";#")>0){aN=new n(aM)}else{aN.id=ak(this).attr("ows_ID");aN.value=aM}if(isNaN(aN.id)){aN.id=ak(this).attr("ows_ID")}switch(aE.Type){case"S":var aO=(ak(this).attr("ows_ID")===aI[0])?" selected='selected'":"";aE.Obj.append(""+aN.value+"");break;case"C":if(aN.id===aI[0]){aE.Obj.attr("value",aN.value)}aJ=aJ+((aJ.length>0)?"|":"")+aN.value+"|"+aN.id;break;case"M":ak(aE.master.candidateControl).append("");aH+=aN.id+"|t"+aN.value+"|t |t |t";break;default:break}});switch(aE.Type){case"S":aE.Obj.trigger("change");break;case"C":aE.Obj.attr("choices",aJ);aE.Obj.trigger("propertychange");break;case"M":aE.master.data="";aE.MultiLookupPickerdata.attr("value",aH);ak(aE.master.resultControl).find("option").each(function(){var aM=ak(this);ak(this).attr("selected","selected");ak(aE.master.candidateControl).find("option").each(function(){if(ak(this).html()===aM.html()){aM.removeAttr("selected")}})});GipRemoveSelectedItems(aE.master);ak(aE.master.candidateControl).find("option").each(function(){var aM=ak(this);ak(aE.master.resultControl).find("option").each(function(){if(ak(this).html()===aM.html()){aM.remove()}})});GipAddSelectedItems(aE.master);aE.master.data=GipGetGroupData(aH);ak(aE.master.candidateControl).trigger("dblclick");break;default:break}}});if(aB.completefunc!==null){aB.completefunc()}};ak.fn.SPServices.SPDebugXMLHttpResult=function(aC){var aE=ak.extend({},{node:null,indent:0},aC);var aD;var aG=3;var aF=4;var aB="";aB+="";if(aE.node.nodeName==="DisplayPattern"){aB+=""}else{if(!aE.node.hasChildNodes()){aB+="";if(aE.node.attributes){aB+=""}}else{if(aE.node.hasChildNodes()&&aE.node.firstChild.nodeType===aF){aB+=""}else{if(aE.node.hasChildNodes()&&aE.node.firstChild.nodeType===aG){aB+=""}else{aB+="";if(aE.node.attributes){aB+=""}aB+=""}}}}aB+="
    "+aE.node.nodeName+"
    "+aE.node.nodeName+""+((aE.node.nodeValue!==null)?M(aE.node.nodeValue):" ")+"
    "+t(aE.node)+"
    "+aE.node.nodeName+"
    "+aE.node.nodeName+""+M(aE.node.firstChild.nodeValue)+"
    "+aE.node.nodeName+"
    "+t(aE.node)+"
    ";for(aD=0;aD
    ";return aB};ak.fn.SPServices.SPGetCurrentUser=function(aE){var aG=ak.extend({},{webURL:"",fieldName:"Name",fieldNames:{},debug:false},aE);if(aG.fieldName==="ID"&&typeof ac.thisUserId!=="undefined"){return ac.thisUserId}var aC="";var aF={};var aH=aG.fieldNames.length>0?aG.fieldNames.length:1;var aD;var aB=aG.webURL.length>0?aG.webURL:ak().SPServices.SPGetCurrentSite();ak.ajax({async:false,url:aB+"/_layouts/userdisp.aspx?Force=True&"+new Date().getTime(),complete:function(aJ,aI){aD=aJ}});for(N=0;N1){i=RegExp('FieldInternalName="'+aG.fieldNames[N]+'"',"gi")}else{i=RegExp('FieldInternalName="'+aG.fieldName+'"',"gi")}ak(aD.responseText).find("table.ms-formtable td[id^='SPField']").each(function(){if(i.test(ak(this).html())){switch(ak(this).attr("id")){case"SPFieldText":aC=ak(this).text();break;case"SPFieldNote":aC=ak(this).find("div").html();break;case"SPFieldURL":aC=ak(this).find("img").attr("src");break;default:aC=ak(this).text();break}return false}})}if(aG.fieldNames[N]!=="ID"){aC=(typeof aC!=="undefined")?aC.replace(/(^[\s\xA0]+|[\s\xA0]+$)/g,""):null}if(aH>1){aF[aG.fieldNames[N]]=aC}}return(aH>1)?aF:aC};ak.fn.SPServices.SPLookupAddNew=function(aI){var aD=ak.extend({},{lookupColumn:"",promptText:"Add new {0}",newWindow:false,ContentTypeID:"",completefunc:null,debug:false},aI);var aF="SPServices.SPLookupAddNew";var aC=new ar(aD.lookupColumn);if(aC.Obj.html()===null&&aD.debug){W(aF,"lookupColumn: "+aD.lookupColumn,ah);return}var i="";var aH="";var aB="";ak().SPServices({operation:"GetList",async:false,cacheXML:true,listName:ak().SPServices.SPListNameFromUrl(),completefunc:function(aK,aJ){ak(aK.responseXML).find("Field[DisplayName='"+aD.lookupColumn+"']").each(function(){aB=ak(this).attr("StaticName");ak().SPServices({operation:"GetList",async:false,cacheXML:true,listName:ak(this).attr("List"),completefunc:function(aM,aL){ak(aM.responseXML).find("List").each(function(){aH=ak(this).attr("WebFullUrl");aH=aH!==P?aH+P:aH})}});i=C(ak(this).attr("List"),"NewForm");return false})}});if(aH.length===0&&aD.debug){W(aF,"lookupColumn: "+aD.lookupColumn,"This column does not appear to be a lookup column");return}if(i.length>0){var aG=aH+i;aG+=aD.newWindow?((aD.ContentTypeID.length>0)?"?ContentTypeID="+aD.ContentTypeID:"")+"' target='_blank'":"?"+((aD.ContentTypeID.length>0)?"ContentTypeID="+aD.ContentTypeID+"&":"")+"Source="+z(location.href)+"'";var aE="
    "+aC+"";if(aD.CAMLQuery.length>0){i+=aD.CAMLQuery+""}i+="";ak().SPServices({operation:"GetListItems",async:false,webURL:aD.webURL,listName:aD.listName,CAMLQuery:i,CAMLViewFields:"",CAMLRowLimit:1,CAMLQueryOptions:"",completefunc:function(aF){ak(aF.responseXML).SPFilterNode("z:row").each(function(){aE=ak(this).attr("ows_ID")})}});return aE};ak.fn.SPServices.SPRequireUnique=function(aB){var aC=ak.extend({},{columnStaticName:"Title",duplicateAction:0,ignoreCase:false,initMsg:"This value must be unique.",initMsgCSSClass:"ms-vb",errMsg:"This value is not unique.",errMsgCSSClass:"ms-formvalidation",showDupes:false,completefunc:null},aB);var aG=ak().SPServices.SPGetQueryString();var aH=aG.ID;ac.thisList=ak().SPServices.SPListNameFromUrl();var aF="{1}
    ";var aE=aF.replace(/\{0\}/g,aC.initMsgCSSClass).replace(/\{1\}/g,aC.initMsg);var aD=ak().SPServices.SPGetDisplayFromStatic({listName:ac.thisList,columnStaticName:aC.columnStaticName});var i=ak("input[Title='"+aD+"']");ak(i).parent().append(aE);ak(i).blur(function(){var aK=[];var aL=ak(this).attr("value");if(aL.length===0){return false}ak().SPServices({operation:"GetListItems",async:false,listName:ac.thisList,CAMLQuery:"",CAMLViewFields:"",CAMLRowLimit:0,completefunc:function(aN){var aM=aC.ignoreCase?aL.toUpperCase():aL;ak(aN.responseXML).SPFilterNode("z:row").each(function(){var aO=aC.ignoreCase?ak(this).attr("ows_"+aC.columnStaticName).toUpperCase():ak(this).attr("ows_"+aC.columnStaticName);if((aM===aO)&&(ak(this).attr("ows_ID")!==aH)){aK.push([ak(this).attr("ows_ID"),ak(this).attr("ows_"+aC.columnStaticName)])}})}});var aJ=aC.initMsg;ak("span#SPRequireUnique"+aC.columnStaticName).html(aJ).attr("class",aC.initMsgCSSClass);ak("input[value='OK']:disabled, input[value='Save']:disabled").removeAttr("disabled");if(aK.length>0){aJ=aC.errMsg;ak("span#SPRequireUnique"+aC.columnStaticName).html(aJ).attr("class",aC.errMsgCSSClass);if(aC.duplicateAction===1){ak("input[Title='"+aC.columnDisplayName+"']").focus();ak("input[value='OK'], input[value='Save']").attr("disabled","disabled")}if(aC.showDupes){var aI=" "+aK.length+" duplicate item"+(aK.length>1?"s":"")+": ";for(N=0;N"+aK[N][1]+"
    "}ak("span#SPRequireUnique"+aC.columnStaticName).append(aI)}}});if(aC.completefunc!==null){aC.completefunc()}};ak.fn.SPServices.SPGetDisplayFromStatic=function(aB){var aC=ak.extend({},{webURL:"",listName:"",columnStaticName:"",columnStaticNames:{}},aB);var i="";var aD={};var aE=aC.columnStaticNames.length>0?aC.columnStaticNames.length:1;ak().SPServices({operation:"GetList",async:false,cacheXML:true,webURL:aC.webURL,listName:aC.listName,completefunc:function(aF){if(aE>1){for(N=0;N1)?aD:i};ak.fn.SPServices.SPGetStaticFromDisplay=function(i){var aC=ak.extend({},{webURL:"",listName:"",columnDisplayName:"",columnDisplayNames:{}},i);var aB="";var aD={};var aE=aC.columnDisplayNames.length>0?aC.columnDisplayNames.length:1;ak().SPServices({operation:"GetList",async:false,cacheXML:true,webURL:aC.webURL,listName:aC.listName,completefunc:function(aF){if(aE>1){for(N=0;N1)?aD:aB};ak.fn.SPServices.SPRedirectWithID=function(aC){var aD=ak.extend({},{redirectUrl:"",qsParamName:"ID"},aC);ac.thisList=ak().SPServices.SPListNameFromUrl();var aH=ak().SPServices.SPGetQueryString();var aG=aH.ID;var aF=aH.List;var aB=aH.RootFolder;var aE=aH.ContentTypeId;if(typeof aH.ID==="undefined"){aG=ak().SPServices.SPGetLastItemId({listName:ac.thisList});ak("form[name='aspnetForm']").each(function(){var aJ=(location.href.indexOf("?")>0)?location.href.substring(0,location.href.indexOf("?")):location.href;var aK=(typeof aH.Source==="string")?"Source="+aH.Source.replace(/\//g,"%2f").replace(/:/g,"%3a"):"";var aI=[];if(typeof aF!=="undefined"){aI.push("List="+aF)}if(typeof aB!=="undefined"){aI.push("RootFolder="+aB)}if(typeof aE!=="undefined"){aI.push("ContentTypeId="+aE)}var aL=aJ+((aI.length>0)?("?"+aI.join("&")+"&"):"?")+"Source="+aJ+"?ID="+aG+((aK.length>0)?("%26RealSource="+aH.Source):"")+((typeof aH.RedirectURL==="string")?("%26RedirectURL="+aH.RedirectURL):"");ak(this).attr("action",aL)})}else{while(aH.ID===aG){aG=ak().SPServices.SPGetLastItemId({listName:ac.thisList})}var i=(typeof aH.RedirectURL==="string")?aH.RedirectURL:aD.redirectUrl;location.href=i+"?"+aD.qsParamName+"="+aG+((typeof aH.RealSource==="string")?("&Source="+aH.RealSource):"")}};ak.fn.SPServices.SPSetMultiSelectSizes=function(aI){var i=ak.extend({},{multiSelectColumn:"",minWidth:0,maxWidth:0,debug:false},aI);var aF="SPServices.SPSetMultiSelectSizes";var aE=new ar(i.multiSelectColumn);if(aE.Obj.html()===null&&i.debug){W(aF,"multiSelectColumn: "+i.multiSelectColumn,ah);return}if(aE.Type!=="M"&&i.debug){W(aF,"multiSelectColumn: "+i.multiSelectColumn,"Column is not multi-select.");return}var aG=ad("SPSetMultiSelectSizes",i.multiSelectColumn);var aD=ak("").appendTo(aE.container);aD.css({width:"auto",height:0,visibility:"hidden"});ak(aE.master.candidateControl).find("option").each(function(){aD.append("")});ak(aE.master.resultControl).find("option").each(function(){aD.append("")});var aB=aD.width()+5;var aH=aB;if(i.minWidth>0||i.maxWidth>0){if(aBi.maxWidth){aH=i.maxWidth}}var aC=aB;ak(aE.master.candidateControl).css("width",aC+"px").parent().css("width",aH+"px");ak(aE.master.resultControl).css("width",aC+"px").parent().css("width",aH+"px");aD.remove()};ak.fn.SPServices.SPScriptAudit=function(aC){var aD=ak.extend({},{webURL:"",listName:"",outputId:"",auditForms:true,auditViews:true,auditPages:true,auditPagesListName:"Pages",showHiddenLists:false,showNoScript:false,showSrc:true},aC);var aB=[["New","NewForm.aspx",false],["Display","DispForm.aspx",false],["Edit","EditForm.aspx",false]];var aE;ak("#"+aD.outputId).append(""+(aD.showSrc?"":"")+"
    ListPage ClassPage TypePageScript References
    ");ak("#SPScriptAudit th").attr("class","ms-vh2-nofilter");if(aD.auditForms||aD.auditViews){ak().SPServices({operation:"GetListCollection",webURL:aD.webURL,async:false,completefunc:function(aH,aG){ak(aH.responseXML).find("List").each(function(){aE=ak(this);if((aD.listName.length===0)||(aE.attr("Title")===aD.listName)){if((aD.showHiddenLists&&aE.attr("Hidden")==="False")||!aD.showHiddenLists){if(aD.auditForms){ak().SPServices({operation:"GetListContentTypes",webURL:aD.webURL,listName:aE.attr("ID"),async:false,completefunc:function(aJ,aI){ak(aJ.responseXML).find("ContentType").each(function(){if(ak(this).attr("ID").substring(0,6)!=="0x0120"){var aL=ak(this).find("FormUrls");for(N=0;N0)?aD.webURL:ak().SPServices.SPGetCurrentSite())+P+ak(this).text());aB[N][2]=true});if(!aB[N][2]){var aK=aE.attr("DefaultViewUrl");ax(aD,aE,"Form",aB[N][0],aK.substring(0,aK.lastIndexOf(P)+1)+aB[N][1])}}for(N=0;NFolder",CAMLViewFields:"",CAMLRowLimit:0,completefunc:function(aG){ak(aG.responseXML).SPFilterNode("z:row").each(function(){var aJ=ak(this).attr("ows_FileRef").split(";#")[1];var aH=ak(this).attr("ows_Title");var aI=(typeof aH!=="undefined")?aH:"";if(aJ.indexOf(".aspx")>0){ax(aD,aE,"Page",aI,P+aJ)}})}})}}ak("#SPScriptAudit tr[class='ms-alternating']:even").removeAttr("class")};function ax(aB,aC,aJ,aF,aD){var aG=0;var aI=0;var aE={};aE.type=[];aE.src=[];aE.script=[];var aH=RegExp("","gi");ak.ajax({type:"GET",url:aD,dataType:"text",async:false,success:function(aP){var aO;while(aO=aH.exec(aP)){var aK=aj(aO,"language");var aQ=aj(aO,"type");var aM=aj(aO,"src");if(aM!==null&&aM.length>0&&!al(aM)){aE.type.push((aK!==null&&aK.length>0)?aK:aQ);aE.src.push(aM);aI++}}if((!aB.showNoScript&&(aE.type.length>0))||aB.showNoScript){var aN=aD.substring(0,aD.lastIndexOf(P)+1);var aL=""+aC.attr("Title")+((aC.attr("Hidden")==="True")?"(Hidden)":"")+""+aJ+""+aF+""+Q(aD)+"";if(aB.showSrc){var i;aL+="";for(aG=0;aG";aL+=""}aL+="
    "+aE.type[aG]+""+Q(aE.src[aG])+"
    "}ak("#SPScriptAudit").append(aL)}}})}function aj(aD,aB){var aC;var i=RegExp(aB+"=(\"([^\"]*)\")|('([^']*)')","gi");if(aC=i.exec(aD)){return aC[2]}return null}function al(aD){var aC;var aB=["WebResource.axd","_layouts"];for(aC=0;aC-1){return true}}return false}ak.fn.SPServices.SPArrangeChoices=function(aC){var aD=ak.extend({},{listName:ak().SPServices.SPListNameFromUrl(),columnName:"",perRow:99,randomize:false},aC);var aF=false;var aE=[];var aB;var i=ak().SPServices({operation:"GetList",async:false,cacheXML:true,listName:aD.listName});i.done(function(){ak(i.responseXML).find("Field[DisplayName='"+aD.columnName+"']").each(function(){aF=(ak(this).attr("FillInChoice")==="TRUE")?true:false;return false});var aK=y(aD.columnName);var aI=ak(aK).find("tr").length;var aH=0;var aJ;var aG;ak(aK).find("tr").each(function(){aH++;if(aF&&aH===(aI-1)){aJ=ak(this).find("td").html()}else{if(aF&&aH===aI){aG=ak(this).find("td").html()}else{aE.push(ak(this).html())}}});aB="";if(aD.randomize){aE.sort(q)}for(N=0;N"}}aB+="";if(aF){aB+=""+aJ+aG+""}ak(aK).find("tr").remove();ak(aK).find("table").append(aB)})};ak.fn.SPServices.SPAutocomplete=function(aC){var aD=ak.extend({},{webURL:"",sourceList:"",sourceColumn:"",columnName:"",CAMLQuery:"",CAMLQueryOptions:"",CAMLRowLimit:0,filterType:"BeginsWith",numChars:0,ignoreCase:false,highlightClass:"",uniqueVals:false,maxHeight:99999,slideDownSpeed:"fast",processingIndicator:"_layouts/images/REFRESH.GIF",debug:false},aC);var aF;var aB=ak("input[Title='"+aD.columnName+"']");aB.css("position","");var aE=aB.css("color");var aG=aB.css("width");if(aB.html()===null&&aD.debug){W("SPServices.SPAutocomplete","columnName: "+aD.columnName,"Column is not an input control or is not found on page");return}aB.closest("span").find("br").remove();aB.wrap("
    ");var i=ad("SPAutocomplete",aD.columnName);aB.after("
    ");ak("#"+i).css("width",aG);ak(aB).keyup(function(){var aP=ak(this).val();ak("#"+i).hide();if(aP.length";if(aD.CAMLQuery.length>0){aH+=""}aH+="<"+aD.filterType+">"+aP+"";if(aD.CAMLQuery.length>0){aH+=aD.CAMLQuery+""}aH+="";ak().SPServices({operation:"GetListItems",async:false,webURL:aD.WebURL,listName:aD.sourceList,CAMLQuery:aH,CAMLQueryOptions:aD.CAMLQueryOptions,CAMLViewFields:"",CAMLRowLimit:aD.CAMLRowLimit,completefunc:function(aS){var aR=aD.ignoreCase?aP.toUpperCase():aP;ak(aS.responseXML).SPFilterNode("z:row").each(function(){var aU=ak(this).attr("ows_"+aD.sourceColumn);var aV=aD.ignoreCase?ak(this).attr("ows_"+aD.sourceColumn).toUpperCase():ak(this).attr("ows_"+aD.sourceColumn);if(aD.filterType==="Contains"){var aT=aV.indexOf(aR);if((aT>=0)&&(!aD.uniqueVals||(ak.inArray(aU,aO)===-1))){aO.push(ak(this).attr("ows_"+aD.sourceColumn))}}else{if(aR===aV.substr(0,aR.length)&&(!aD.uniqueVals||(ak.inArray(aU,aO)===-1))){aO.push(ak(this).attr("ows_"+aD.sourceColumn))}}})}});var aK="";for(N=0;N0){var aJ=new RegExp(aP,aD.ignoreCase?"gi":"g");var aM=aO[N].match(aJ);var aL=0;for(aF=0;aF"+aM[aF]+"";aO[N]=aO[N].substr(0,aN)+aQ+aO[N].substr(aI);aL=aN+aQ.length}}aK+="
  • "+aO[N]+"
  • "}ak("#"+i).html(aK);ak("#"+i+" li").click(function(){ak("#"+i).fadeOut(aD.slideUpSpeed);aB.val(ak(this).text())}).mouseover(function(){var aR={cursor:"hand",color:"#ffffff",background:"#3399ff"};ak(this).css(aR)}).mouseout(function(){var aR={cursor:"inherit",color:aE,background:"transparent"};ak(this).css(aR)});if(aO.length>0){ak("#"+i).slideDown(aD.slideDownSpeed)}aB.css("background-image","")})};ak.fn.SPServices.SPGetQueryString=function(){var aG={};var aF;var aB=location.search.substring(1,location.search.length);var aC=aB.split("&");var aE=/^([^=]+)=(.*)/i;for(var aD=0;aD2){aG[aF[1]]=unescape(aF[2]).replace(/\+/g," ")}}}return aG};ak.fn.SPServices.SPListNameFromUrl=function(i){var aB=ak.extend({},{listName:""},i);if(aB.listName.length>0){ac.thisList=aB.listName;return ac.thisList}else{if(ac.thisList.length>0){return ac.thisList}}var aD=location.href;var aC=aD.substring(0,aD.indexOf(".aspx"));var aE=decodeURIComponent(aC.substring(0,aC.lastIndexOf(P)+1)).toUpperCase();ak().SPServices({operation:"GetListCollection",async:false,completefunc:function(aG,aF){ak(aG.responseXML).find("List").each(function(){var aH=ak(this).attr("DefaultViewUrl");var aI=aH.substring(0,aH.lastIndexOf(P)+1).toUpperCase();if(aE.indexOf(aI)>0){ac.thisList=ak(this).attr("ID");return false}})}});return ac.thisList};ak.fn.SPServices.SPUpdateMultipleListItems=function(aD){var aF=ak.extend({},{webURL:"",listName:"",CAMLQuery:"",batchCmd:"Update",valuepairs:[],completefunc:null,debug:false},aD);var aE;var aH=[];var aG=[];ak().SPServices({operation:"GetListItems",async:false,webURL:aF.webURL,listName:aF.listName,CAMLQuery:aF.CAMLQuery,CAMLQueryOptions:"",completefunc:function(i){ak(i.responseXML).SPFilterNode("z:row").each(function(){aH.push(ak(this).attr("ows_ID"));var aI=ak(this).attr("ows_FileRef");aI="/"+aI.substring(aI.indexOf(";#")+2);aG.push(aI)})}});var aB;var aC="";for(aE=0;aE";for(aB=0;aB"+K(aF.valuepairs[aB][1])+""}aC+=""+aH[aE]+"";if(aG[aE].length>0){aC+=""+aG[aE]+""}aC+=""}aC+="";ak().SPServices({operation:"UpdateListItems",async:false,webURL:aF.webURL,listName:aF.listName,updates:aC,completefunc:function(i){if(aF.completefunc!==null){aF.completefunc(i,Status)}}})};ak.fn.SPFilterNode=function(i){return this.find("*").filter(function(){return this.nodeName===i})};ak.fn.SPXmlToJson=function(i){var aC=ak.extend({},{mapping:{},includeAllAttrs:false,removeOws:true},i);var aD;var aB=[];this.each(function(){var aH={};var aJ=this.attributes;ak.each(aC.mapping,function(){aH[this.mappedName]=""});for(aD=0;aD0){aB.html(aD.valueToSet)}if(aD.checkNames){i.click()}var aF=ak.trim(aB.text());var aE=[];aB.children("span").each(function(){var aJ=ak(this).find("div[data]").attr("data");var aH={};if(typeof aJ!=="undefined"){var aK=ak.parseXML(aJ);var aI=ak(aK);aI.find("DictionaryEntry").each(function(){var aL=ak(this).find("Key").text();var aM=ak(this).find("Value").text();aH[aL]=aM});aE.push(aH)}else{ak().SPServices({operation:"GetUserInfo",async:false,cacheXML:true,userLoginName:ak(this).attr("title"),completefunc:function(aL){ak(aL.responseXML).find("User").each(function(){ak.each(this.attributes,function(aN,aP){var aM=aP.name;var aO=aP.value;aH[aM]=aO});aE.push(aH)})}})}});return{row:aG,contents:aB,currentValue:aF,checkNames:i,dictionaryEntries:aE}};ak.fn.SPServices.Version=function(){return Z};function ap(){if(typeof _spPageContextInfo!=="undefined"){this.thisSite=_spPageContextInfo.webAbsoluteUrl;this.thisList=_spPageContextInfo.pageListId;this.thisUserId=_spPageContextInfo.userId}else{this.thisSite="";this.thisList="";this.thisUserId=(typeof _spUserId!=="undefined")?_spUserId:undefined}}function V(aM,aI,aN,aD){if(typeof aN==="undefined"){return""}var aJ;var aK="";var aH;var aF;var aL=[];var aE=aD.relatedWebURL.length>0?aD.relatedWebURL:ak().SPServices.SPGetCurrentSite();switch(aI.attr("Type")){case"Text":aK=aN;break;case"URL":switch(aI.attr("Format")){case"Hyperlink":aK="
    "+aN.substring(aN.search(",")+1)+"";break;case"Image":aK=""+aN.substring(aN.search(",")+1)+"";break;default:aK=aN;break}break;case"User":case"UserMulti":var aB=aN.split(";#");for(aJ=0;aJ"+aB[aJ+1]+"")}aK=aL.join(", ");break;case"Calculated":var aG=aN.split(";#");aK=aG[1];break;case"Number":aF=aI.attr("Decimals");aK=typeof aF==="undefined"?parseFloat(aN).toString():parseFloat(aN).toFixed(aF).toString();break;case"Currency":aF=aI.attr("Decimals");aK=typeof aF==="undefined"?parseFloat(aN).toFixed(2).toString():parseFloat(aN).toFixed(aF).toString();break;case"Lookup":switch(aI.attr("Name")){case"FileRef":aH=aM.attr("BaseType")==="1"?aM.attr("RootFolder")+P+"Forms/DispForm.aspx":aM.attr("RootFolder")+P+"DispForm.aspx";aK=""+aN.substring(aN.search(";#")+2)+"";break;case"FileDirRef":aH=P+aN.substring(aN.search(";#")+2);aK=""+aN.substring(aN.search(";#")+2)+"";break;default:aH=C(aI.attr("List"),"DisplayForm");aK=""+aN.substring(aN.search(";#")+2)+"";break}break;case"LookupMulti":aH=C(aI.attr("List"),"DisplayForm");aK="";if(aN.length>0){var aC=aN.split(";#");for(aJ=0;aJ"+aC[(aJ*2)+1]+"")}}aK=aL.join(", ");break;case"File":Q=aN.substring(aN.search(";#")+2);aK=""+Q+"";break;case"Counter":aK=aN;break;case"DateTime":aK=aN;break;default:aK=aN;break}return aK}function t(aD){var aC;var aB="";for(aC=0;aC"}aB+="
    "+aC+""+aD.attributes.item(aC).nodeName+""+M(aD.attributes.item(aC).nodeValue)+"
    ";return aB}function ar(aB){if((this.Obj=ak("select[Title='"+aB+"']")).length===1){this.Type="S"}else{if((this.Obj=ak("input[Title='"+aB+"']")).length===1){this.Type="C"}else{if((this.Obj=ak("select[ID$='SelectCandidate'][Title^='"+aB+" ']")).length===1){this.Type="M"}else{if((this.Obj=ak("select[ID$='SelectCandidate'][Title$=': "+aB+"']")).length===1){this.Type="M"}else{if((this.Obj=ak("select[ID$='SelectCandidate'][Title$='\""+aB+"\".']")).length===1){this.Type="M"}else{if((this.Obj=ak("select[ID$='SelectCandidate'][Title$=' "+aB+"']")).length===1){this.Type="M"}else{this.Type=null}}}}}}if(this.Type==="M"){this.container=this.Obj.closest("span");this.MultiLookupPickerdata=this.container.find("input[id$='"+an+"_data'], input[id$='"+g+"_data']");var i=this.container.find("[id$='AddButton']").attr("id");this.master=window[i.replace(/AddButton/,an+"_m")]||window[i.replace(/AddButton/,g+"_m")]}}function c(aC,aB){var i=[];switch(aC.Type){case"S":if(aB){i.push(aC.Obj.find("option:selected").val()||[])}else{i.push(aC.Obj.find("option:selected").text()||[])}break;case"C":if(aB){i.push(ak("input[id='"+aC.Obj.attr("optHid")+"']").val()||[])}else{i.push(aC.Obj.val()||[])}break;case"M":ak(aC.master.resultControl).find("option").each(function(){if(aB){i.push(ak(this).val())}else{i.push(ak(this).html())}});break;default:break}return i}function W(aB,aD,aC){var i="Error in function
    "+aB+"
    Parameter
    "+aD+"
    Message
    "+aC+"

    Click to continue
    ";U(i)}function U(aF){var aC="position:absolute;width:300px;height:150px;padding:10px;background-color:#000000;color:#ffffff;z-index:30;font-family:'Arial';font-size:12px;display:none;";ak("#aspnetForm").parent().append("
    "+aF);var i=ak("#SPServices_msgBox").height();var aE=ak("#SPServices_msgBox").width();var aD=(ak(window).width()/2)-(aE/2)+"px";var aB=(ak(window).height()/2)-(i/2)-100+"px";ak("#SPServices_msgBox").css({border:"5px #C02000 solid",left:aD,top:aB}).show().fadeTo("slow",0.75).click(function(){ak(this).fadeOut("3000",function(){ak(this).remove()})})}function ad(i,aB){return i+"_"+ak().SPServices.SPGetStaticFromDisplay({listName:ak().SPServices.SPListNameFromUrl(),columnDisplayName:aB})}function C(i,aC){var aB;ak().SPServices({operation:"GetFormCollection",async:false,listName:i,completefunc:function(aE,aD){aB=ak(aE.responseXML).find("Form[Type='"+aC+"']").attr("Url")}});return aB}function aq(aD,aB){var aC;for(aC=0;aC"+i+""}function q(){return(Math.round(Math.random())-0.5)}function M(i){return((i.indexOf("http")===0)||(i.indexOf(P)===0))?""+i+"":i}function Q(i){return i.substring(i.lastIndexOf(P)+1,i.length)}var X={"&":"&",'"':""","<":"<",">":">"};var G={"&":"&",""":'"',"<":"<",">":">"};function j(i){return i.replace(/([\&"<>])/g,function(aC,aB){return X[aB]})}function H(i){return i.replace(/("|<|>|&)/g,function(aC,aB){return G[aB]})}function K(i){if(typeof i==="string"){return i.replace(/&(?![a-zA-Z]{1,8};)/g,"&")}else{return i}}function z(i){return i.replace(/&/g,"%26")}function n(i){var aB=i.split(";#");this.id=aB[0];this.value=aB[1]}})(jQuery);