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 rejectDocument(docId) | |
{ | |
jQuery.ajax({ | |
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('Resource Library')/items(" + docId + ")/file/deny('Rejected')", | |
type: "POST", | |
headers: { | |
"accept": "application/json;odata=verbose", | |
"X-RequestDigest": jQuery("#__REQUESTDIGEST").val() | |
}, |
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
############ | |
# | |
# From: | |
# http://www.sharepointpals.com/post/How-to-Add-WebPart-to-the-Publishing-Page-using-PowerShell-in-SharePoint-2013 | |
# | |
# | |
############ | |
# Add PowerShell Snapin | |
$snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'} |
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
#In the dw-start.sh script, change the DWCMD definition to read: | |
# | |
#DWCMD="screen -dm -S direwolf bash -c 'rtl_fm -f 144.39M - | direwolf -c sdr.conf -r 24000 -D 1 -'" | |
# | |
# | |
# And then, as that command is ran via cron, you can access that screen via: | |
# | |
# screen -r direwolf | |
# |
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
// Information bar | |
// https://msdn.microsoft.com/en-us/pnp_articles/customize-your-sharepoint-site-ui-by-using-javascript | |
// | |
function RemoteManager_Inject() { | |
loadScript(jQuery, function () { | |
$(document).ready(function () { | |
var message = "<img src='/_Layouts/Images/STS_ListItem_43216.gif' align='absmiddle'> <font color='#AA0000'>JavaScript customization is <i>fun</i>!</font>" | |
// Execute status setter only after SP.JS has been loaded |
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
//Lookup Column: Allow multiple values | |
// jQuery Select: | |
jQuery("select[title='Vehicle']") ; | |
// read selected options | |
jQuery("select[title='Vehicle'] option:selected").text() ; | |
// Hide one of the OPTIONS in the drop down selector (addressed via value, NOT text): | |
jQuery("select[title='Vehicle'] option[value='2']").remove() | |
// Hide the field and its label from view | |
jQuery("select[title='Vehicle']").closest('tr').hide() |
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 newEnrollment(firstName, lastName, email, team, classNameId ) | |
{ | |
var item = { | |
"__metadata": { "type": "SP.Data.EnrolleesListItem" }, // <=="type" derived from the target Lists name - getbytitle('Enrollees') = "SP.Data.EnrolleesListItem" | |
"Title": firstName, | |
"LastName": lastName, | |
"Team": team, | |
"Email": email, | |
"ClassNameId": classNameId |
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 openApproveModal(docId) | |
{ | |
//NavigateToApproveRejectAspx(event, '' + _spPageContextInfo.webAbsoluteUrl + '/_layouts/15/approve.aspx?List={4DBD7524-4A5F-49BF-B105-F139B4CA8983}&ID=' + docId + '&RootFolder=' + fileFolderEncoded + '' ) | |
fileName = jQuery("#" + docId + " a")[0].pathname ; | |
fileNameEncoded = fileName.replace(/\//g,"%2F") ; | |
fileFolderEncoded = fileName.replace(fileName.split('/')[fileName.split('/').length-1],"").slice(0,-1).replace(/\//g,"%2F") ; | |
var url = _spPageContextInfo.webAbsoluteUrl + '/_layouts/15/approve.aspx?List={' + listId + '}&ID=' + docId + '&RootFolder=' + fileFolderEncoded |
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 newEnrollment(firstName, lastName, email, team, classNameId ) | |
{ | |
var item = { | |
"__metadata": { "type": "SP.Data.EnrolleesListItem" }, | |
"Title": firstName, | |
"LastName": lastName, | |
"Team": team, | |
"Email": email, | |
"ClassNameId": classNameId | |
}; |
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 removeEnrollment(userId,listItemID) | |
{ | |
var removeUserFromClass = jQuery.ajax({ | |
//url: webUrl + "_api/web/lists/getbytitle('" + classesListName + "')/items?'" + classesColumns + "'&$filter=Title eq '" + lookup + "'" , | |
url: webUrl + "_api/web/lists/getbytitle('Enrollees')/items(" + listItemID + ")", | |
method: "POST", | |
headers: | |
{ | |
"X-RequestDigest": $("#__REQUESTDIGEST").val(), | |
"IF-MATCH": "*", |