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
$(document).ready(function(){ | |
$("BODY").append('<div id="dialog-message" title="In Progress">\ | |
<div id="progressbar"></div>\ | |
</div>'); | |
}); | |
function ShowDialog() { | |
$( "#dialog-message" ).dialog({ | |
dialogClass: "no-close", | |
modal: true |
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
var SourceList = "SourceList"; | |
var DestinationList = "DestinationList"; | |
$(document).ready(function() { | |
exec(); | |
$("#myBtn").click(exec); | |
}); | |
function exec() { | |
var sourceId = 12; | |
var sourceAttachmentUrl = _spPageContextInfo.webServerRelativeUrl + "/_api/web/lists/getbytitle('" + SourceList + "')/Items('" + sourceId + "')/Attachmentfiles"; |
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
function PreSaveAction(){ | |
var status = $("[Title~='Status']").val(); | |
if (status == "Final"){ | |
var groupName = "XXX Owners" | |
PermissionManager.BreakInheritance().then(function(data){ | |
console.log("Permission Inheritance Breaked with roles and groups"); | |
}).fail(function(error){ | |
console.log(error); | |
}).then(function (){ |
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
String.prototype.replaceAll = function(search, replacement) { | |
var target = this; | |
return target.replace(new RegExp(search, 'g'), replacement); | |
}; | |
Array.prototype.contains = function(v) { | |
for(var i = 0; i < this.length; i++) { | |
if(this[i] === v) return true; | |
} | |
return false; |
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
$(document).ready(function() { | |
//SP.SOD.executeOrDelayUntilScriptLoaded(AddCustomUserAction, "sp.js"); | |
SP.SOD.executeOrDelayUntilScriptLoaded(DeleteCustomActions, "sp.js"); | |
}); | |
function DeleteCustomActions() { | |
var listTitle = "Pension Files"; | |
context = new SP.ClientContext(); | |
var web = context.get_web(); | |
var list = context.get_web().get_lists().getByTitle(listTitle); |
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
https://xxx.sharepoint.com/sites/Site/Web/_api/SP.UserProfiles.PeopleManager/GetMyProperties | |
SharePoint Navigation: _spPageContextInfo.webAbsoluteUrl + '/_api/web/Navigation/GetNodeById(1040)/Children | |
Quick Launch: _spPageContextInfo.webAbsoluteUrl + '/_api/Web/Navigation/GetNodeById(1031)/Children | |
QuickLaunch EndPoint :/_api/web/Navigation/QuickLaunch | |
TopNavigation EndPoint: /_api/web/Navigation/TopNavigationbar | |
Filters on List/Libraray: /_api/web/lists?$filter=IsCatalog eq false and Hidden eq false and BaseType eq 1&$Select=Title,DocumentTemplateUrl |
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
$(document).ready(function(){ | |
$.when(checkPermissions()).then(function(isOnlyContributor){ | |
if (isOnlyContributor){ | |
setInterval(HideSiteContents, 1000); | |
} | |
}); | |
}); | |
function HideSiteContents(){ | |
console.log($("SPAN:contains('Site contents')").length + " called"); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Net; | |
using System.Xml.Linq; | |
using System.IO; | |
using System.Security; | |
using System.Xml; |
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
if (typeof console == "undefined") { this.console = {log: function() {}}; }//If browser doesn't support console.log | |
//OTO = One Time Object | |
var rClientContext;//A context OTO used everywhere | |
var rWeb;//A web OTO used | |
var rCurrentUser;// A user OTO | |
$(document).ready(function(){ | |
rClientContext = SP.ClientContext.get_current(); | |
rWeb = rClientContext.get_web(); |
NewerOlder