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
Array.prototype.slice.call(document.querySelectorAll("#onetidMngCytpeRptrTable a")).forEach(function(a) { a.setAttribute("href", "\u002fsites\u002fcontentTypeHub/_layouts/15/ManageContentType.aspx?ctype=" + a.getAttribute("id").replace("LinkEditType", "")); }); |
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
using Microsoft.SharePoint.Client; | |
using Microsoft.SharePoint.Client.Utilities; | |
using System.Collections.Generic; | |
public static class Email | |
{ | |
public static void Send(ClientContext ctx, string[] to, string subject, string body, bool html = false) | |
{ | |
var properties = new EmailProperties(); | |
properties.To = to; |
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() { | |
var allResults = [], | |
queryText = encodeURIComponent("#ext# contentclass:spspeople"), | |
rowLimit = 500, | |
selectProperties = ["AccountName", "PreferredName", "WorkEmail"]; | |
function chunk (arr, len) { | |
var chunks = [], | |
i = 0, | |
n = arr.length; |
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
using UnityEngine; | |
using System; | |
[Serializable] | |
public class Collectable : PolymorphicObject | |
{ | |
public string Name; | |
} |
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
// make calls against SPO using a user access token passed from ADAL.js | |
// credit to Kirk Evans: https://blogs.msdn.microsoft.com/kaevans/2014/04/15/calling-o365-apis-from-your-web-api-on-behalf-of-a-user/ | |
using System; | |
using System.Web.Http; | |
using System.Configuration; | |
using System.Threading.Tasks; | |
using Microsoft.IdentityModel.Clients.ActiveDirectory; | |
using System.Globalization; | |
using System.Net.Http; |
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
/* | |
============================================================================== | |
Animated scroll-to-section | |
------------------------------------------------------------------------------ | |
Fancy animated scroll override for native browser scroll-to hyperlinks | |
which reference named anchor tags within the current page. | |
Requires jQuery. | |
============================================================================== | |
Sections should be defined in page content like so: |
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
<!--Views\Shared\User.cshtml--> | |
@model MyNamespace.ViewModels.User | |
<div>@Model.Name</div> | |
<!-- | |
This is a very basic example, obviously you'd have more complex nested HTML | |
and more properties in use for it to be worth using a component like this | |
--> |
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
/* | |
Load non-minified version of JS if debug=1 is present in window.location.search. | |
This JS file can either be referenced in a master page with a <script> tag or via Custom Action. | |
Use of document.write ensures the script is inserted immediately below this one, synchronously. | |
For version string to successfully cache bust, the reference to this script also needs a query string that is updated each time this script is updated. | |
*/ | |
(function() { | |
var minUrl = "/script.min.js", | |
debugUrl = "/script.js", |
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
// define a global function to execute | |
function $_global_onMDSPageLoad() { | |
// code to execute on page load goes here | |
} | |
ExecuteOrDelayUntilScriptLoaded(function () { | |
if (typeof asyncDeltaManager != "undefined") | |
asyncDeltaManager.add_pageLoaded($_global_onMDSPageLoad); // execute on MDS page load | |
else | |
$_global_onMDSPageLoad(); // execute on non-MDS page load |