You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/general-development/social-feed-rest-api-reference-for-sharepoint.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3048,7 +3048,7 @@ The following response example represents the unlocked thread. The **Attributes*
3048
3048
> [!NOTE]
3049
3049
> The values of thread and post **Id** properties are too long to send in a URL, so you have to send them in the request body. As a result, even read-only operations that are logically **GET** requests must be sent as **POST** requests. For example, to get a thread, you have to send a **POST** request and pass the thread **Id** as an entity in the request body.
3050
3050
3051
-
```js
3051
+
```javascript
3052
3052
var endpoint = siteUrl +'/_api/social.feed/post';
3053
3053
var postId ='1.655c70c348374d48839daabc24a360f0.82baa3bdfa2f481a8185802eb9c6c6cd.5d227a6fa3894f0c9dde26876b71d619.0c37852b34d0418e91c62ac25af4be5b.4316bdaa94bf4984be5dfea1ba96954e.26.26.S-1-5-21-2127521184-1604012920-1887927527-66602';
3054
3054
@@ -3083,7 +3083,7 @@ $.ajax({
3083
3083
3084
3084
3085
3085
3086
-
```js
3086
+
```javascript
3087
3087
var endpoint =<site url>+'/_api/social.feed/my/feed/post';
Copy file name to clipboardExpand all lines: docs/solution-guidance/Localize-UI-elements-sample-app-for-SharePoint.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@ The following figure shows the start page for Scenario 1.
119
119
120
120
The **AddJSLink** method is part of the JavaScriptExtensions.cs file in **OfficeDevPnP.Core**. **AddJSLink** requires that you supply a string representing the identifier to assign to the custom action, and a string containing a semicolon delimited list of URLs to the JavaScript files that you want to add to the host web. Note that this code sample adds a reference to Scripts\scenario1.js, which adds a status bar message to the host web.
> SharePoint uses Minimal Download Strategy to reduce the amount of data the browser downloads when users navigate between pages on a SharePoint site. In scenario1.js, the following code ensures that whether Minimal Download Strategy is used on your SharePoint site, the **RemoteManager_Inject** method is always called to run the JavaScript code to add the status bar message to the host web. For more information, see [Minimal Download Strategy overview](../general-development/minimal-download-strategy-overview.md).
> Some JavaScript files may depend on other JavaScript files to be loaded first before they can run and complete successfully. The following code construct from **RemoteManager_Inject** uses the **loadScript** function in scenario1.js to first load jQuery, and then continue running the remaining JavaScript code.
152
152
>
153
-
> ```js
153
+
> ```javascript
154
154
var jQuery ="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.2.min.js";
155
155
// Load jQuery first, and then continue running the rest of the code.
156
156
loadScript(jQuery, function () {
@@ -195,7 +195,7 @@ Similar to Scenario 1, **btnSubmit\_Click** in scenario2.aspx.cs calls **AddJsLi
195
195
196
196
- Replaces **my quicklaunch entry** with the value of the **quickLauch\_Scenario2** variable read from the JavaScript resource file.
197
197
198
-
```js
198
+
```javascript
199
199
functionRemoteManager_Inject() {
200
200
201
201
var jQuery ="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.2.min.js";
Copy file name to clipboardExpand all lines: docs/solution-guidance/create-ux-controls-by-using-sharepoint-provider-hosted-add-ins.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ The Scripts folder of the Core.PeoplePickerWeb project contains app.js and peopl
51
51
52
52
The app.js file then creates and configures a people picker control.
53
53
54
-
```js
54
+
```javascript
55
55
//Make a people picker control.
56
56
//1. context = SharePoint Client Context object
57
57
//2. $('#spanAdministrators') = SPAN that will 'host' the people picker control
@@ -70,7 +70,7 @@ peoplePicker.Initialize();
70
70
71
71
The people picker control queries the **ClientPeoplePickerWebServiceInterface** object in the JSOM library to initiate searches for users whose names match the character strings entered.
72
72
73
-
```js
73
+
```javascript
74
74
if (searchText.length>=parent.GetMinimalCharactersBeforeSearching()) {
75
75
resultDisplay ='Searching...';
76
76
if (typeof resultsSearching !='undefined') {
@@ -122,7 +122,7 @@ When you choose the **Setup term store** button, the add-in:
122
122
123
123
The following code in the **TaxonomyHelper** class verifies that the required languages are enabled, and if they're not, it enables them.
124
124
125
-
```js
125
+
```javascript
126
126
var languages =newint[] { 1031, 1033, 1036, 1053 };
Finally, the following code in the same **TaxonomyHelper** class creates each new term, along with labels for the German, French, and Swedish languages. It also sets a value for the **\_Sys\_Nav\_SimpleLinkUrl** property, which is equivalent to the **Simple Link or Header** property in the Term Store Management Tool. In this case, the URL for each term points back to the root site.
144
144
145
-
```js
145
+
```javascript
146
146
var term =termSet.CreateTerm(termName, 1033, Guid.NewGuid());
147
147
term.CreateLabel(termNameGerman, 1031, false);
148
148
term.CreateLabel(termNameFrench, 1036, false);
@@ -156,7 +156,7 @@ Next, the add-in inserts the topnav.js file into the root folder of the host sit
156
156
157
157
The following code in the topnav.js file uses JSOM to check for the user's preferred language.
158
158
159
-
```js
159
+
```javascript
160
160
var targetUser ="i:0#.f|membership|"+_spPageContextInfo.userLoginName;
161
161
context =newSP.ClientContext.get_current();
162
162
var peopleManager =newSP.UserProfiles.PeopleManager(context);
@@ -167,7 +167,7 @@ var userProperty = peopleManager.getUserProfilePropertyFor(targetUser, "SPS-MUIL
167
167
168
168
The add-in then determines whether the user's language preference matches one of the enabled languages. If it finds a match, the following code gets the terms and the associated labels for the user's preferred language.
169
169
170
-
```js
170
+
```javascript
171
171
while (termEnumerator.moveNext()) {
172
172
var currentTerm =termEnumerator.get_current();
173
173
var label =currentTerm.getDefaultLabel(lcid);
@@ -181,7 +181,7 @@ while (termEnumerator.moveNext()) {
181
181
182
182
Finally, the following code in the topnav.js file inserts links that contain the terms into the top navigational element of the host site.
183
183
184
-
```js
184
+
```javascript
185
185
html +="<ul style='margin-top: 0px; margin-bottom: 0px;'>"
186
186
for (var i in termItems) {
187
187
var term = termItems[i];
@@ -230,7 +230,7 @@ The Scripts folder of the Core.TaxonomyPicker project contains app.js and taxono
230
230
231
231
The app.js file then creates and configures a taxonomy picker control.
232
232
233
-
```js
233
+
```javascript
234
234
// Load scripts for calling taxonomy APIs.
235
235
$.getScript(layoutsRoot +'init.js',
236
236
function () {
@@ -247,7 +247,7 @@ The app.js file then creates and configures a taxonomy picker control.
247
247
248
248
The taxonomy picker control uses the following code to open a **TaxonomySession** instance in the JSOM to load all the terms from the term store.
249
249
250
-
```js
250
+
```javascript
251
251
// Get the taxonomy session by using CSOM.
252
252
var taxSession =SP.Taxonomy.TaxonomySession.getTaxonomySession(spContext);
253
253
//Use the default term store...this could be extended here to support additional term stores.
0 commit comments