This file contains hidden or 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
| var TemplatePicker = TemplatePicker || {}; | |
| TemplatePicker.Config = { | |
| client_id: <INSERT CLIENT ID GUID>, | |
| redirect_base_uri: <INSERT THE URL OF THE APP> | |
| }; |
This file contains hidden or 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
| function getWindowLocation() { | |
| var caller = ''; | |
| ['protocol','//','hostname','pathname'].forEach(function(item, i) { | |
| caller += item === '//' ? item : window.location[item]; | |
| }); | |
| return caller; | |
| } |
This file contains hidden or 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
| function getParentWindowLocation() { | |
| document.domain = 'sharepoint.com'; | |
| var caller = ''; | |
| ['protocol','//','hostname','pathname'].forEach(function(item, i) { | |
| caller += item === '//' ? item : window.parent.location[item]; | |
| }); | |
| return caller; |
This file contains hidden or 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
| (function($) { | |
| //...insert code as required. | |
| })(jQuery); |
This file contains hidden or 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
| jQuery.getScript(getBaseUrl() + '/_layouts/15/sp.taxonomy.js', function () { | |
| var context = new SP.ClientContext.get_current(); | |
| var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context); | |
| var termStore = session.getDefaultSiteCollectionTermStore(); | |
| var groups = termStore.get_groups(); | |
| var termSets = []; | |
| context.load(groups); |
This file contains hidden or 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
| <entry> | |
| <id>https://arup.sharepoint.com/_api/SP.AppTile49d8c71a-25bd-4325-ac19-71e8411be2ae</id> | |
| <category term="SP.AppTile" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> | |
| <link rel="edit" href="SP.AppTile49d8c71a-25bd-4325-dc19-31e8412ae5ae"/> | |
| <title/> | |
| <updated>2016-03-10T12:22:48Z</updated> | |
| <author> | |
| <name/> | |
| </author> | |
| <content type="application/xml"> |
This file contains hidden or 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
| getUserById: function (id) { | |
| var self = this; | |
| return new Promise( function( resolve, reject ){ | |
| if ( id ){ | |
| var context = new SP.ClientContext.get_current(); | |
| var userInfoList = context.get_web().get_siteUserInfoList(); | |
| var query = new SP.CamlQuery(); |