This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Part 4. | |
* update the forms for each target site, one at a time. | |
* @param is an array of objects, each of which | |
*/ | |
var UpdateForms = function(targetSites) { | |
var siteIndex = 0; | |
var formIndex = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Part 3. | |
* create new target forms for each target site. | |
* a) get source file content (from .txt files) | |
* b) get web part ID for each form | |
* c) create new form with the web part ID's, listGuids, and siteURL | |
* @param is an array of objects, each containing the subsite URL, list name, and the list GUID specified to that site. | |
*/ | |
function GetListAndFormData(targetSites) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Part 2. | |
* Filter down array of subsite URL's and return the ones that have the specified list. | |
* @param is an array of strings, each of which is a subsite URL. | |
*/ | |
function GetListGuidsForSubsites(sites) { | |
var targetSites = []; | |
var siteIndex = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of how to initialize the script. | |
var init = function() { | |
var listName = 'Appointments'; | |
var sourceFilePath = "https://example.sharepoint.com/assets"; | |
var sourceFiles = [ | |
{ filePath: sourceFilePath + '/NewForm.txt', title: 'NewForm' }, | |
{ filePath: sourceFilePath + '/EditForm.txt', title: 'EditForm' }, | |
{ filePath: sourceFilePath + '/DispForm.txt', title: 'DispForm' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Part 1. | |
// Collect all URL's of subsites in a site collection | |
function GetSubSiteUrls() { | |
// borrowed from Vadim Gremyachev: https://sharepoint.stackexchange.com/questions/137996/get-all-subsites-and-rootweb-of-a-site-collection-using-jsom#answer-137998 | |
function enumWebs(propertiesToRetrieve, success, error) { | |
var ctx = new SP.ClientContext.get_current(); | |
var rootWeb = ctx.get_site().get_rootWeb(); | |
var result = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @name SPCalendarPro | |
* Version 1.3.2 | |
* No dependencies! | |
* @description An ultra lightweight JavaScript library to easily manage SharePoint calendar events. | |
* @documentation https://sharepointhacks.com/sp-calendar-pro | |
* @author Sam Perrow sam.perrow399@gmail.com | |
* | |
* Copyright 2018 Sam Perrow (email : sam.perrow399@gmail.com) | |
* Licensed under the MIT license: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get recurring calendar events | |
var events = []; // this is the global variable I am using to store the events data. | |
function getCalendarEvents(listName, async) { | |
// set up the CAML query. returns single and recurring events by default, unless otherwise specified. | |
var camlQuery = "<query>" + | |
"<Query>" + | |
"<Where>" + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get recurring calendar events | |
var events = []; // this is the global variable I am using to store the events data. | |
function getCalendarEvents(listName, asyn) { | |
// set up the CAML query. returns single and recurring events by default, unless otherwise specified. | |
var camlQuery = "<query>" + | |
"<Query>" + | |
"<Where>" + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:value-of select=@EventDate/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:value-of select="ddwrt:FormatDateTime(string(@EventDate),1037, 'yyyy-MM-dd hh:mm:ss')"/> |
NewerOlder