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
{ | |
"schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", | |
"hideSelection": true, | |
"hideColumnHeader": true, | |
"rowFormatter": { | |
"elmType": "div", | |
"attributes": { | |
"class": "sp-row-card" | |
}, | |
"children": [ |
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 observer = new MutationObserver(function (mutations) { | |
mutations.forEach(function (mutation) { | |
if (mutation.target.className === "ms-List-cell" || mutation.target.className === "ms-List-surface") { | |
var customBody = document.getElementsByClassName('customBody'); | |
for (var i = 0, len = customBody.length | 0; i < len; i = i + 1 | 0) { | |
var ret; | |
customBody[i].innerHTML = customBody[i].textContent; | |
ret = truncate(customBody[i].textContent, 100); | |
customBody[i].innerText = ret; |
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
SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function() { | |
function getBaseHtml(ctx) { | |
return SPClientTemplates["_defaultTemplates"].Fields.default.all.all[ctx.CurrentFieldSchema.FieldType][ctx.BaseViewID](ctx); | |
} | |
function init() { | |
var overrideCtx = {}; | |
overrideCtx.Templates = {}; | |
overrideCtx.Templates.Fields = { | |
'DocIcon': { |
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
{ | |
"$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json", | |
"debugMode": true, | |
"elmType": "div", | |
"style": { | |
"height": "10px" | |
}, | |
"children": [ | |
{ | |
"elmType": "span", |
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 () { | |
var htmlColumnContext = {}; | |
htmlColumnContext.Templates = {}; | |
htmlColumnContext.Templates.Fields = { | |
"field1": { | |
"View": field1ViewTemplate | |
}, | |
"field2": { | |
"View": field2ViewTemplate | |
}, |
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
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script> | |
<script> | |
$(document).ready( function () { | |
$('h3:contains("Body")').parent().append('<p><a href="https://servername/sitename/Doclib/manual.pdf" target="_blank" style="font-weight:normal; text-decoration: underline; color:blue">マニュアルへのリンク</a></p>'); | |
}); | |
</script> |
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(){ | |
var setArea = $('#loadarea'), | |
loadNum = 1, // 読み込む個数 | |
loadTxt = 'Now Loading...', // Loading中の表示テキスト | |
fadeSpeed = 500; // フェードスピード | |
var onclickStr; | |
var txt; | |
$.ajax({ | |
url: "/[your site]/_api/web/lists/getbytitle('test')/items?$select=*", |
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.executeFunc('sp.js', 'SP.ClientContext', SetCurrentUserInfo); | |
}); | |
function SetCurrentUserInfo() { | |
$.ajax({ | |
url: _spPageContextInfo.webAbsoluteUrl + "/_api/SP.UserProfiles.PeopleManager/GetMyProperties", | |
contentType: "application/json;odata=verbose", | |
headers: { "accept": "application/json;odata=verbose" }, | |
success: onSuccess, |
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
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | |
Function UserSource([string]$userName) | |
{ | |
if($userName.split("\").count -gt 1) | |
{ | |
$userName.split("\")[0] | |
} | |
elseif ($userName.split(":").count -gt 1) | |
{ | |
$userName.split(":")[0] |
NewerOlder