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

    "+"Click to continue
    ";V(i)}function V(aI){var aF="position:absolute;width:300px;height:150px;padding:10px;background-color:#000000;color:#ffffff;z-index:30;font-family:'Arial';font-size:12px;display:none;";am("#aspnetForm").parent().append("
    "+aI);var i=am("#SPServices_msgBox").height();var aH=am("#SPServices_msgBox").width();var aG=(am(window).width()/2)-(aH/2)+"px";var aE=(am(window).height()/2)-(i/2)-100+"px";am("#SPServices_msgBox").css({border:"5px #C02000 solid",left:aG,top:aE}).show().fadeTo("slow",0.75).click(function(){am(this).fadeOut("3000",function(){am(this).remove()})})}function af(i,aE){return i+"_"+am().SPServices.SPGetStaticFromDisplay({listName:am().SPServices.SPListNameFromUrl(),columnDisplayName:aE})}function D(i,aF){var aE;am().SPServices({operation:"GetFormCollection",async:false,listName:i,completefunc:function(aG){aE=am(aG.responseXML).find("Form[Type='"+aF+"']").attr("Url")}});return aE}function av(aG,aE){var aF;for(aF=0;aF"+i+""}function q(){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 Z={"&":"&",'"':""","<":"<",">":">"};var H={"&":"&",""":'"',"<":"<",">":">"};function j(i){return i.replace(/([\&"<>])/g,function(aF,aE){return Z[aE]})}function I(i){return i.replace(/("|<|>|&)/g,function(aF,aE){return H[aE]})}function L(i){if(typeof i==="string"){return i.replace(/&(?![a-zA-Z]{1,8};)/g,"&")}else{return i}}function A(i){return i.replace(/&/g,"%26")}function n(i){var aE=i.split(";#");this.id=aE[0];this.value=aE[1]}function u(i){return i<10?"0"+i:i}am.expr[":"].regex=function(aJ,aG,aF){var aK=aF[3].split(","),aE=/^(data|css):/,i={method:aK[0].match(aE)?aK[0].split(":")[0]:"attr",property:aK.shift().replace(aE,"")},aI="ig",aH=new RegExp(aK.join("").replace(/^\s+|\s+$/g,""),aI);return aH.test(jQuery(aJ)[i.method](i.property))}})(jQuery); diff --git a/ajax/libs/jquery.SPServices/2014.01/license.txt b/ajax/libs/jquery.SPServices/2014.01/license.txt new file mode 100644 index 000000000..adb89559f --- /dev/null +++ b/ajax/libs/jquery.SPServices/2014.01/license.txt @@ -0,0 +1,7 @@ +Copyright (c) 2009-2014 Sympraxis Consulting LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/ajax/libs/jquery.SPServices/package.json b/ajax/libs/jquery.SPServices/package.json index b7132574b..58bde7888 100755 --- a/ajax/libs/jquery.SPServices/package.json +++ b/ajax/libs/jquery.SPServices/package.json @@ -1,7 +1,7 @@ { "name": "jquery.SPServices", "filename": "jquery.SPServices.min.js", - "version": "2013.02a", + "version": "2014.01", "description": "SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.", "homepage": "http://spservices.codeplex.com/", "keywords": [ From 39472878440dfedb35f9d169c8d513139c7d1b59 Mon Sep 17 00:00:00 2001 From: Josh McCarty Date: Thu, 27 Feb 2014 13:23:07 -0700 Subject: [PATCH 02/14] Removed license.txt --- ajax/libs/jquery.SPServices/2014.01/license.txt | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 ajax/libs/jquery.SPServices/2014.01/license.txt diff --git a/ajax/libs/jquery.SPServices/2014.01/license.txt b/ajax/libs/jquery.SPServices/2014.01/license.txt deleted file mode 100644 index adb89559f..000000000 --- a/ajax/libs/jquery.SPServices/2014.01/license.txt +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2009-2014 Sympraxis Consulting LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file From 72c2011c91d3ea8057e0bc1362d264223d01fec2 Mon Sep 17 00:00:00 2001 From: Michael Cordingley Date: Fri, 28 Feb 2014 10:21:47 -0500 Subject: [PATCH 03/14] Bumping version to 0.1.6 --- .../0.1.6/backbone.obscura.js | 902 ++++++++++++++++++ .../0.1.6/backbone.obscura.min.js | 1 + ajax/libs/backbone.obscura/package.json | 2 +- 3 files changed, 904 insertions(+), 1 deletion(-) create mode 100644 ajax/libs/backbone.obscura/0.1.6/backbone.obscura.js create mode 100644 ajax/libs/backbone.obscura/0.1.6/backbone.obscura.min.js diff --git a/ajax/libs/backbone.obscura/0.1.6/backbone.obscura.js b/ajax/libs/backbone.obscura/0.1.6/backbone.obscura.js new file mode 100644 index 000000000..2d2073047 --- /dev/null +++ b/ajax/libs/backbone.obscura/0.1.6/backbone.obscura.js @@ -0,0 +1,902 @@ +(function(root, factory) { + if(typeof exports === 'object') { + module.exports = factory(require('underscore'), require('backbone')); + } + else if(typeof define === 'function' && define.amd) { + define(['underscore', 'backbone'], factory); + } + else { + root.Backbone.Obscura = factory(root._, root.Backbone); + } +}(this, function(_, Backbone) { +var require=function(name){return {"backbone":Backbone,"underscore":_}[name];}; +require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0; i -= 1) { + if (this.contains(this.superset().at(i))) { + filteredIndex = this.indexOf(this.superset().at(i)) + 1; + break; + } + } + filteredIndex = filteredIndex || 0; + + this._collection.add(model, { at: filteredIndex }); + } + } else { + if (this._collection.get(model.cid)) { + this._collection.remove(model); + } + } + this.length = this._collection.length; +} + +// This fires on 'change:[attribute]' events. We only want to +// remove this model if it fails the test, but not add it if +// it does. If we remove it, it will prevent the 'change' +// events from being forwarded, and if we add it, it will cause +// an unneccesary 'change' event to be forwarded without the +// 'change:[attribute]' that goes along with it. +function onModelAttributeChange(model) { + // reset the cached results + this._filterResultCache[model.cid] = {}; + + if (!execFilterOnModel.call(this, model)) { + if (this._collection.get(model.cid)) { + this._collection.remove(model); + } + } +} + +function onAll(eventName, model, value) { + if (eventName.slice(0, 7) === "change:") { + onModelAttributeChange.call(this, arguments[1]); + } +} + +function onModelRemove(model) { + if (this.contains(model)) { + this._collection.remove(model); + } + this.length = this._collection.length; +} + +function Filtered(superset) { + // Save a reference to the original collection + this._superset = superset; + + // The idea is to keep an internal backbone collection with the filtered + // set, and expose limited functionality. + this._collection = new Backbone.Collection(superset.toArray()); + proxyCollection(this._collection, this); + + // Set up the filter data structures + this.resetFilters(); + + this.listenTo(this._superset, 'reset sort', execFilter); + this.listenTo(this._superset, 'add change', onAddChange); + this.listenTo(this._superset, 'remove', onModelRemove); + this.listenTo(this._superset, 'all', onAll); +} + +var methods = { + + defaultFilterName: '__default', + + filterBy: function(filterName, filter) { + // Allow the user to skip the filter name if they're only using one filter + if (!filter) { + filter = filterName; + filterName = this.defaultFilterName; + } + + addFilter.call(this, filterName, createFilter(filter)); + + execFilter.call(this); + return this; + }, + + removeFilter: function(filterName) { + if (!filterName) { + filterName = this.defaultFilterName; + } + + removeFilter.call(this, filterName); + + execFilter.call(this); + return this; + }, + + resetFilters: function() { + this._filters = {}; + invalidateCache.call(this); + + this.trigger('filtered:reset'); + + execFilter.call(this); + return this; + }, + + superset: function() { + return this._superset; + }, + + refilter: function(arg) { + if (typeof arg === "object" && arg.cid) { + // is backbone model, refilter that one + onAddChange.call(this, arg); + } else { + // refilter everything + invalidateCache.call(this); + execFilter.call(this); + } + + return this; + }, + + getFilters: function() { + return _.keys(this._filters); + }, + + hasFilter: function(name) { + return _.contains(this.getFilters(), name); + }, + + destroy: function() { + this.stopListening(); + this._collection.reset([]); + this._superset = this._collection; + this.length = 0; + + this.trigger('filtered:destroy'); + } + +}; + +// Build up the prototype +_.extend(Filtered.prototype, methods, Backbone.Events); + +module.exports = Filtered; + + +},{"./src/create-filter.js":5,"backbone":false,"backbone-collection-proxy":3,"underscore":false}],5:[function(require,module,exports){ +var _ = require('underscore'); + +// Converts a key and value into a function that accepts a model +// and returns a boolean. +function convertKeyValueToFunction(key, value) { + return function(model) { + return model.get(key) === value; + }; +} + +// Converts a key and an associated filter function into a function +// that accepts a model and returns a boolean. +function convertKeyFunctionToFunction(key, fn) { + return function(model) { + return fn(model.get(key)); + }; +} + +function createFilterObject(filterFunction, keys) { + // Make sure the keys value is either an array or null + if (!_.isArray(keys)) { + keys = null; + } + return { fn: filterFunction, keys: keys }; +} + +// Accepts an object in the form of: +// +// { +// key: value, +// key: function(val) { ... } +// } +// +// and turns it into a function that accepts a model an returns a +// boolean + a list of the keys that the function depends on. +function createFilterFromObject(filterObj) { + var keys = _.keys(filterObj); + + var filterFunctions = _.map(keys, function(key) { + var val = filterObj[key]; + if (_.isFunction(val)) { + return convertKeyFunctionToFunction(key, val); + } + return convertKeyValueToFunction(key, val); + }); + + // Iterate through each of the generated filter functions. If any + // are false, kill the computation and return false. The function + // is only true if all of the subfunctions are true. + var filterFunction = function(model) { + for (var i = 0; i < filterFunctions.length; i++) { + if (!filterFunctions[i](model)) { + return false; + } + } + return true; + }; + + return createFilterObject(filterFunction, keys); +} + +// Expects one of the following: +// +// - A filter function that accepts a model + (optional) array of +// keys to listen to changes for or null) +// - An object describing a filter +function createFilter(filter, keys) { + // This must go first because _.isObject(fn) === true + if (_.isFunction(filter)) { + return createFilterObject(filter, keys); + } + + // If the filter is an object describing a filter, generate the + // appropriate function. + if (_.isObject(filter)) { + return createFilterFromObject(filter); + } +} + +module.exports = createFilter; + + +},{"underscore":false}],6:[function(require,module,exports){ + +var _ = require('underscore'); +var Backbone = require('backbone'); +var proxyCollection = require('backbone-collection-proxy'); + +function getPageLimits() { + var start = this.getPage() * this.getPerPage(); + var end = start + this.getPerPage(); + return [start, end]; +} + +function updatePagination() { + var pages = getPageLimits.call(this); + this._collection.reset(this.superset().slice(pages[0], pages[1])); +} + +function updateNumPages() { + var currentNumPages = this._totalPages; + var length = this.superset().length; + var perPage = this.getPerPage(); + + // If the # of objects can be exactly divided by the number + // of pages, it would leave an empty last page if we took + // the floor. + var totalPages = length % perPage === 0 ? + (length / perPage) : Math.floor(length / perPage) + 1; + + var numPagesChanged = this._totalPages !== totalPages; + this._totalPages = totalPages; + + if (numPagesChanged) { + this.trigger('paginated:change:numPages', { numPages: totalPages }); + } + + // Test to see if we are past the last page, and if so, + // move back. Return true so that we can test to see if + // this happened. + if (this.getPage() >= totalPages) { + this.setPage(totalPages - 1); + return true; + } +} + +function recalculatePagination() { + if (updateNumPages.call(this)) { return; } + updatePagination.call(this); +} + +// Given two arrays of backbone models, with at most one model added +// and one model removed from each, return the model in arrayA that +// is not in arrayB or undefined. +function difference(arrayA, arrayB) { + var maxLength = _.max([ arrayA.length, arrayB.length ]); + + for (var i = 0, j = 0; i < maxLength; i += 1, j += 1) { + if (arrayA[i] !== arrayB[j]) { + if (arrayB[i-1] === arrayA[i]) { + j -= 1; + } else if (arrayB[i+1] === arrayA[i]) { + j += 1; + } else { + return arrayA[i]; + } + } + } +} + +function onAddRemove(model, collection, options) { + if (updateNumPages.call(this)) { return; } + + var pages = getPageLimits.call(this); + var start = pages[0], end = pages[1]; + + // We are only adding and removing at most one model at a time, + // so we can find just those two models. We could probably rewrite + // `collectionDifference` to only make on pass instead of two. This + // is a bottleneck on the total size of collections. I was getting + // slow unit tests around 30,000 models / page in Firefox. + var toAdd = difference(this.superset().slice(start, end), this._collection.toArray()); + var toRemove = difference(this._collection.toArray(), this.superset().slice(start, end)); + + if (toRemove) { + this._collection.remove(toRemove); + } + + if (toAdd) { + this._collection.add(toAdd, { + at: this.superset().indexOf(toAdd) - start + }); + } +} + +function Paginated(superset, options) { + // Save a reference to the original collection + this._superset = superset; + + // The idea is to keep an internal backbone collection with the paginated + // set, and expose limited functionality. + this._collection = new Backbone.Collection(superset.toArray()); + this._page = 0; + this.setPerPage((options && options.perPage) ? options.perPage : null); + + proxyCollection(this._collection, this); + + this.listenTo(this._superset, 'add remove', onAddRemove); + this.listenTo(this._superset, 'reset sort', recalculatePagination); +} + +var methods = { + + removePagination: function() { + this.setPerPage(null); + return this; + }, + + setPerPage: function(perPage) { + this._perPage = perPage; + recalculatePagination.call(this); + this.setPage(0); + + this.trigger('paginated:change:perPage', { + perPage: perPage, + numPages: this.getNumPages() + }); + + return this; + }, + + setPage: function(page) { + // The lowest page we could set + var lowerLimit = 0; + // The highest page we could set + var upperLimit = this.getNumPages() - 1; + + // If the page is higher or lower than these limits, + // set it to the limit. + page = page > lowerLimit ? page : lowerLimit; + page = page < upperLimit ? page : upperLimit; + page = page < 0 ? 0 : page; + + this._page = page; + updatePagination.call(this); + + this.trigger('paginated:change:page', { page: page }); + return this; + }, + + getPerPage: function() { + return this._perPage || this.superset().length || 1; + }, + + getNumPages: function() { + return this._totalPages; + }, + + getPage: function() { + return this._page; + }, + + hasNextPage: function() { + return this.getPage() < this.getNumPages() - 1; + }, + + hasPrevPage: function() { + return this.getPage() > 0; + }, + + nextPage: function() { + this.movePage(1); + return this; + }, + + prevPage: function() { + this.movePage(-1); + return this; + }, + + firstPage: function() { + this.setPage(0); + }, + + lastPage: function() { + this.setPage(this.getNumPages() - 1); + }, + + movePage: function(delta) { + this.setPage(this.getPage() + delta); + return this; + }, + + superset: function() { + return this._superset; + }, + + destroy: function() { + this.stopListening(); + this._collection.reset([]); + this._superset = this._collection; + this._page = 0; + this._totalPages = 0; + this.length = 0; + + this.trigger('paginated:destroy'); + } + +}; + +// Build up the prototype +_.extend(Paginated.prototype, methods, Backbone.Events); + +module.exports = Paginated; + + +},{"backbone":false,"backbone-collection-proxy":3,"underscore":false}],7:[function(require,module,exports){ + +var _ = require('underscore'); +var Backbone =require('backbone'); +var proxyCollection = require('backbone-collection-proxy'); +var reverseSortedIndex = require('./src/reverse-sorted-index.js'); + +function lookupIterator(value) { + return _.isFunction(value) ? value : function(obj){ return obj.get(value); }; +} + +function modelInsertIndex(model) { + if (!this._comparator) { + return this._superset.indexOf(model); + } else { + if (!this._reverse) { + return _.sortedIndex(this._collection.toArray(), model, lookupIterator(this._comparator)); + } else { + return reverseSortedIndex(this._collection.toArray(), model, lookupIterator(this._comparator)); + } + } +} + +function onAdd(model) { + var index = modelInsertIndex.call(this, model); + this._collection.add(model, { at: index }); +} + +function onRemove(model) { + if (this.contains(model)) { + this._collection.remove(model); + } +} + +function onChange(model) { + if (this.contains(model) && this._collection.indexOf(model) !== modelInsertIndex.call(this, model)) { + this._collection.remove(model); + onAdd.call(this, model); + } +} + +function sort() { + if (!this._comparator) { + this._collection.reset(this._superset.toArray()); + return; + } + + var newOrder = this._superset.sortBy(this._comparator); + this._collection.reset(this._reverse ? newOrder.reverse() : newOrder); +} + +function Sorted(superset) { + // Save a reference to the original collection + this._superset = superset; + this._reverse = false; + this._comparator = null; + + // The idea is to keep an internal backbone collection with the paginated + // set, and expose limited functionality. + this._collection = new Backbone.Collection(superset.toArray()); + proxyCollection(this._collection, this); + + this.listenTo(this._superset, 'add', onAdd); + this.listenTo(this._superset, 'remove', onRemove); + this.listenTo(this._superset, 'change', onChange); + this.listenTo(this._superset, 'reset', sort); +} + +var methods = { + + setSort: function(comparator, direction) { + this._reverse = direction === 'desc' ? true : false; + this._comparator = comparator; + + sort.call(this); + + if (!comparator) { + this.trigger('sorted:remove'); + } else { + this.trigger('sorted:add'); + } + + return this; + }, + + reverseSort: function() { + this._reverse = !this._reverse; + sort.call(this); + + return this; + }, + + removeSort: function() { + this.setSort(); + return this; + }, + + superset: function() { + return this._superset; + }, + + destroy: function() { + this.stopListening(); + this._collection.reset([]); + this._superset = this._collection; + this.length = 0; + + this.trigger('sorted:destroy'); + } + +}; + +// Build up the prototype +_.extend(Sorted.prototype, methods, Backbone.Events); + +module.exports = Sorted; + + +},{"./src/reverse-sorted-index.js":8,"backbone":false,"backbone-collection-proxy":3,"underscore":false}],8:[function(require,module,exports){ + +var _ = require('underscore'); + +// Underscore provides a .sortedIndex function that works +// when sorting ascending based on a function or a key, but there's no +// way to do the same thing when sorting descending. This is a slight +// modification of the underscore / backbone code to do the same thing +// but descending. + +function lookupIterator(value) { + return _.isFunction(value) ? value : function(obj){ return obj[value]; }; +} + +function reverseSortedIndex(array, obj, iterator, context) { + iterator = iterator == null ? _.identity : lookupIterator(iterator); + var value = iterator.call(context, obj); + var low = 0, high = array.length; + while (low < high) { + var mid = (low + high) >>> 1; + iterator.call(context, array[mid]) < value ? high = mid : low = mid + 1; + } + return low; +} + +module.exports = reverseSortedIndex; + +},{"underscore":false}],9:[function(require,module,exports){ +var _ = require('underscore'); + +function proxyEvents(from, eventNames) { + _.each(eventNames, function(eventName) { + this.listenTo(from, eventName, function() { + var args = _.toArray(arguments); + args.unshift(eventName); + this.trigger.apply(this, args); + }); + }, this); +} + +module.exports = proxyEvents; + +},{"underscore":false}]},{},[]) +return require('obscura'); + +})); + diff --git a/ajax/libs/backbone.obscura/0.1.6/backbone.obscura.min.js b/ajax/libs/backbone.obscura/0.1.6/backbone.obscura.min.js new file mode 100644 index 000000000..f5b0e0efe --- /dev/null +++ b/ajax/libs/backbone.obscura/0.1.6/backbone.obscura.min.js @@ -0,0 +1 @@ +(function(a,b){if(typeof exports==='object'){module.exports=b(require('underscore'),require('backbone'))}else if(typeof define==='function'&&define.amd){define(['underscore','backbone'],b)}else{a.Backbone.Obscura=b(a._,a.Backbone)}}(this,function(_,v){var w=function(a){return{"backbone":v,"underscore":_}[a]};w=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof w=="function"&&w;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof w=="function"&&w;for(var o=0;o=0;i-=1){if(this.contains(this.superset().at(i))){c=this.indexOf(this.superset().at(i))+1;break}}c=c||0;this._collection.add(a,{at:c})}}else{if(this._collection.get(a.cid)){this._collection.remove(a)}}this.length=this._collection.length}function onModelAttributeChange(a){this._filterResultCache[a.cid]={};if(!execFilterOnModel.call(this,a)){if(this._collection.get(a.cid)){this._collection.remove(a)}}}function onAll(a,b,c){if(a.slice(0,7)==="change:"){onModelAttributeChange.call(this,arguments[1])}}function onModelRemove(a){if(this.contains(a)){this._collection.remove(a)}this.length=this._collection.length}function Filtered(a){this._superset=a;this._collection=new g.Collection(a.toArray());h(this._collection,this);this.resetFilters();this.listenTo(this._superset,'reset sort',execFilter);this.listenTo(this._superset,'add change',onAddChange);this.listenTo(this._superset,'remove',onModelRemove);this.listenTo(this._superset,'all',onAll)}var k={defaultFilterName:'__default',filterBy:function(a,b){if(!b){b=a;a=this.defaultFilterName}addFilter.call(this,a,j(b));execFilter.call(this);return this},removeFilter:function(a){if(!a){a=this.defaultFilterName}removeFilter.call(this,a);execFilter.call(this);return this},resetFilters:function(){this._filters={};invalidateCache.call(this);this.trigger('filtered:reset');execFilter.call(this);return this},superset:function(){return this._superset},refilter:function(a){if(typeof a==="object"&&a.cid){onAddChange.call(this,a)}else{invalidateCache.call(this);execFilter.call(this)}return this},getFilters:function(){return _.keys(this._filters)},hasFilter:function(a){return _.contains(this.getFilters(),a)},destroy:function(){this.stopListening();this._collection.reset([]);this._superset=this._collection;this.length=0;this.trigger('filtered:destroy')}};_.extend(Filtered.prototype,k,g.Events);e.exports=Filtered},{"./src/create-filter.js":5,"backbone":false,"backbone-collection-proxy":3,"underscore":false}],5:[function(g,h,j){var _=g('underscore');function convertKeyValueToFunction(b,c){return function(a){return a.get(b)===c}}function convertKeyFunctionToFunction(b,c){return function(a){return c(a.get(b))}}function createFilterObject(a,b){if(!_.isArray(b)){b=null}return{fn:a,keys:b}}function createFilterFromObject(c){var d=_.keys(c);var e=_.map(d,function(a){var b=c[a];if(_.isFunction(b)){return convertKeyFunctionToFunction(a,b)}return convertKeyValueToFunction(a,b)});var f=function(a){for(var i=0;i=d){this.setPage(d-1);return true}}function recalculatePagination(){if(updateNumPages.call(this)){return}updatePagination.call(this)}function difference(a,b){var c=_.max([a.length,b.length]);for(var i=0,j=0;ib?a:b;a=a0},nextPage:function(){this.movePage(1);return this},prevPage:function(){this.movePage(-1);return this},firstPage:function(){this.setPage(0)},lastPage:function(){this.setPage(this.getNumPages()-1)},movePage:function(a){this.setPage(this.getPage()+a);return this},superset:function(){return this._superset},destroy:function(){this.stopListening();this._collection.reset([]);this._superset=this._collection;this._page=0;this._totalPages=0;this.length=0;this.trigger('paginated:destroy')}};_.extend(Paginated.prototype,o,m.Events);k.exports=Paginated},{"backbone":false,"backbone-collection-proxy":3,"underscore":false}],7:[function(c,d,e){var _=c('underscore');var f=c('backbone');var g=c('backbone-collection-proxy');var h=c('./src/reverse-sorted-index.js');function lookupIterator(b){return _.isFunction(b)?b:function(a){return a.get(b)}}function modelInsertIndex(a){if(!this._comparator){return this._superset.indexOf(a)}else{if(!this._reverse){return _.sortedIndex(this._collection.toArray(),a,lookupIterator(this._comparator))}else{return h(this._collection.toArray(),a,lookupIterator(this._comparator))}}}function onAdd(a){var b=modelInsertIndex.call(this,a);this._collection.add(a,{at:b})}function onRemove(a){if(this.contains(a)){this._collection.remove(a)}}function onChange(a){if(this.contains(a)&&this._collection.indexOf(a)!==modelInsertIndex.call(this,a)){this._collection.remove(a);onAdd.call(this,a)}}function sort(){if(!this._comparator){this._collection.reset(this._superset.toArray());return}var a=this._superset.sortBy(this._comparator);this._collection.reset(this._reverse?a.reverse():a)}function Sorted(a){this._superset=a;this._reverse=false;this._comparator=null;this._collection=new f.Collection(a.toArray());g(this._collection,this);this.listenTo(this._superset,'add',onAdd);this.listenTo(this._superset,'remove',onRemove);this.listenTo(this._superset,'change',onChange);this.listenTo(this._superset,'reset',sort)}var i={setSort:function(a,b){this._reverse=b==='desc'?true:false;this._comparator=a;sort.call(this);if(!a){this.trigger('sorted:remove')}else{this.trigger('sorted:add')}return this},reverseSort:function(){this._reverse=!this._reverse;sort.call(this);return this},removeSort:function(){this.setSort();return this},superset:function(){return this._superset},destroy:function(){this.stopListening();this._collection.reset([]);this._superset=this._collection;this.length=0;this.trigger('sorted:destroy')}};_.extend(Sorted.prototype,i,f.Events);d.exports=Sorted},{"./src/reverse-sorted-index.js":8,"backbone":false,"backbone-collection-proxy":3,"underscore":false}],8:[function(h,i,j){var _=h('underscore');function lookupIterator(b){return _.isFunction(b)?b:function(a){return a[b]}}function reverseSortedIndex(a,b,c,d){c=c==null?_.identity:lookupIterator(c);var e=c.call(d,b);var f=0,high=a.length;while(f>>1;c.call(d,a[g]) Date: Sun, 2 Mar 2014 11:05:16 -0700 Subject: [PATCH 04/14] Rename jquery.SPServices-2014.01.min.js to jquery.SPServices.min.js --- ...{jquery.SPServices-2014.01.min.js => jquery.SPServices.min.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ajax/libs/jquery.SPServices/2014.01/{jquery.SPServices-2014.01.min.js => jquery.SPServices.min.js} (100%) diff --git a/ajax/libs/jquery.SPServices/2014.01/jquery.SPServices-2014.01.min.js b/ajax/libs/jquery.SPServices/2014.01/jquery.SPServices.min.js similarity index 100% rename from ajax/libs/jquery.SPServices/2014.01/jquery.SPServices-2014.01.min.js rename to ajax/libs/jquery.SPServices/2014.01/jquery.SPServices.min.js From 6ca58fcfa5e70b244391fc4b4ed08212e1bd97c9 Mon Sep 17 00:00:00 2001 From: Jason Hafer Date: Sun, 2 Mar 2014 16:21:57 -0500 Subject: [PATCH 05/14] Create bootstrap-markdown.js --- .../2.2.1/js/bootstrap-markdown.js | 1007 +++++++++++++++++ 1 file changed, 1007 insertions(+) create mode 100644 ajax/libs/bootstrap-markdown/2.2.1/js/bootstrap-markdown.js diff --git a/ajax/libs/bootstrap-markdown/2.2.1/js/bootstrap-markdown.js b/ajax/libs/bootstrap-markdown/2.2.1/js/bootstrap-markdown.js new file mode 100644 index 000000000..e556ecbc3 --- /dev/null +++ b/ajax/libs/bootstrap-markdown/2.2.1/js/bootstrap-markdown.js @@ -0,0 +1,1007 @@ +/* =================================================== + * bootstrap-markdown.js v2.2.1 + * http://github.com/toopay/bootstrap-markdown + * =================================================== + * Copyright 2013 Taufan Aditya + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + +!function ($) { + + "use strict"; // jshint ;_; + + + /* MARKDOWN CLASS DEFINITION + * ========================== */ + + var Markdown = function (element, options) { + // Class Properties + this.$ns = 'bootstrap-markdown' + this.$element = $(element) + this.$editable = {el:null, type:null,attrKeys:[], attrValues:[], content:null} + this.$options = $.extend(true, {}, $.fn.markdown.defaults, options) + this.$oldContent = null + this.$isPreview = false + this.$editor = null + this.$textarea = null + this.$handler = [] + this.$callback = [] + this.$nextTab = [] + + this.showEditor() + } + + Markdown.prototype = { + + constructor: Markdown + + , __alterButtons: function(name,alter) { + var handler = this.$handler, isAll = (name == 'all'),that = this + + $.each(handler,function(k,v) { + var halt = true + if (isAll) { + halt = false + } else { + halt = v.indexOf(name) < 0 + } + + if (halt == false) { + alter(that.$editor.find('button[data-handler="'+v+'"]')) + } + }) + } + + , __buildButtons: function(buttonsArray, container) { + var i, + ns = this.$ns, + handler = this.$handler, + callback = this.$callback + + for (i=0;i', { + 'class': 'btn-group' + }) + + for (z=0;z ' + +btnText + +'') + + // Register handler and callback + handler.push(buttonHandler) + callback.push(button.callback) + } + + // Attach the button group into container dom + container.append(btnGroupContainer) + } + } + + return container + } + , __setListener: function() { + // Set size and resizable Properties + var hasRows = typeof this.$textarea.attr('rows') != 'undefined', + maxRows = this.$textarea.val().split("\n").length > 5 ? this.$textarea.val().split("\n").length : '5', + rowsVal = hasRows ? this.$textarea.attr('rows') : maxRows + + this.$textarea.attr('rows',rowsVal) + this.$textarea.css('resize','none') + + this.$textarea + .on('focus', $.proxy(this.focus, this)) + .on('keypress', $.proxy(this.keypress, this)) + .on('keyup', $.proxy(this.keyup, this)) + + if (this.eventSupported('keydown')) { + this.$textarea.on('keydown', $.proxy(this.keydown, this)) + } + + // Re-attach markdown data + this.$textarea.data('markdown',this) + } + + , __handle: function(e) { + var target = $(e.currentTarget), + handler = this.$handler, + callback = this.$callback, + handlerName = target.attr('data-handler'), + callbackIndex = handler.indexOf(handlerName), + callbackHandler = callback[callbackIndex] + + // Trigger the focusin + $(e.currentTarget).focus() + + callbackHandler(this) + + // Unless it was the save handler, + // focusin the textarea + if (handlerName.indexOf('cmdSave') < 0) { + this.$textarea.focus() + } + + e.preventDefault() + } + + , showEditor: function() { + var instance = this, + textarea, + ns = this.$ns, + container = this.$element, + originalHeigth = container.css('height'), + originalWidth = container.css('width'), + editable = this.$editable, + handler = this.$handler, + callback = this.$callback, + options = this.$options, + editor = $( '
    ', { + 'class': 'md-editor', + click: function() { + instance.focus() + } + }) + + // Prepare the editor + if (this.$editor == null) { + // Create the panel + var editorHeader = $('
    ', { + 'class': 'md-header btn-toolbar' + }) + + // Build the main buttons + if (options.buttons.length > 0) { + editorHeader = this.__buildButtons(options.buttons, editorHeader) + } + + // Build the additional buttons + if (options.additionalButtons.length > 0) { + editorHeader = this.__buildButtons(options.additionalButtons, editorHeader) + } + + editor.append(editorHeader) + + // Wrap the textarea + if (container.is('textarea')) { + container.before(editor) + textarea = container + textarea.addClass('md-input') + editor.append(textarea) + } else { + var rawContent = (typeof toMarkdown == 'function') ? toMarkdown(container.html()) : container.html(), + currentContent = $.trim(rawContent) + + // This is some arbitrary content that could be edited + textarea = $('