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
'use strict'; | |
var context = SP.ClientContext.get_current() | |
(function () { | |
var request = new SP.WebRequestInfo(); | |
var response; | |
$(document).ready(function () { | |
request.set_url("http://services.odata.org/Northwind/Northwind.svc/Categories"); | |
request.set_method("GET"); |
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
<div> | |
<p id="categories"> | |
initializing... | |
</p> | |
</div> |
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
rjeshns.getUserProperty = function (profileProperty) { | |
var deferred = $.Deferred(); | |
var clientContext = new SP.ClientContext.get_current(); | |
var peopleManager = new SP.UserProfiles.PeopleManager(clientContext); | |
var personProperties = peopleManager.getMyProperties(); | |
clientContext.load(personProperties); | |
clientContext.executeQueryAsync( | |
Function.createDelegate(this, |
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="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function () { | |
var userid = _spPageContextInfo.userId; | |
function GetCurrentUser() { | |
var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/getuserbyid(" + userid + ")"; | |
var requestHeaders = { "accept" : "application/json;odata=verbose" }; | |
$.ajax({ | |
url : requestUri, | |
contentType : "application/json;odata=verbose", |
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
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll" | |
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" | |
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Publishing.dll" | |
$siteUrl = "https://YOUR SITE URL" | |
# - use appropriate login methods | |
#$username = Read-Host -Prompt "Enter Username" | |
#$password = Read-Host -Prompt "Enter password" -AsSecureString | |
#$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password) |
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
<%-- The following 4 lines are ASP.NET directives needed when using SharePoint components --%> | |
<%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" MasterPageFile="~masterurl/default.master" Language="C#" %> | |
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> | |
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> | |
<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> | |
<asp:Content ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> | |
<script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jqu |
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 resources = []; | |
resources.PageTitle = "localisation échantillon"; | |
resources.HeaderText = "Bonjour le monde!"; | |
resources.ParaText = "Ceci est une unité de héros simple, un composant simple jumbotron style pour appeler une attention particulière aux contenus ou informations sélectionnée."; | |
resources.BtnTextLearnMore = "Apprendre encore plus"; |
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
localizer.Init({ | |
defaultLang: 'fr-FR', | |
cache: 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
var exportExcel = function () { | |
var selecteditems = SP.ListOperation.Selection.getSelectedItems(); | |
currentListGuid = SP.ListOperation.Selection.getSelectedList(); | |
var context = SP.ClientContext.get_current(); | |
currentSite = context.get_site(); | |
currentWeb = context.get_web(); | |
var currentList = currentWeb.get_lists().getById(currentListGuid); |
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 aAlert = function() { | |
alert('hi there'); | |
} |
OlderNewer