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: Samples/Core.Jsom.Navigation/readme.md
+81-67
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,12 @@ None
14
14
### Solution ###
15
15
Solution | Author(s)
16
16
---------|----------
17
-
Core.Jsom.Navigation | Pete Filicetti
17
+
Core.Jsom.Navigation | Pete Filicetti (**Microsoft**)
18
18
19
19
### Version history ###
20
20
Version | Date | Comments
21
21
---------| -----| --------
22
-
1.0 | September 17, 2014 | Initial release
22
+
1.0 | September 17th 2014 | Initial release
23
23
24
24
### Disclaimer ###
25
25
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
@@ -38,111 +38,125 @@ The following code shows how to initialize the URLs needed for operation.
38
38
39
39
Code snippet:
40
40
41
-
var hostWebUrl = decodeURIComponent(getQueryStringParameter('SPHostUrl'));
42
-
var appWebUrl = decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
41
+
```JavaScript
42
+
var hostWebUrl =decodeURIComponent(getQueryStringParameter('SPHostUrl'));
43
+
var appWebUrl =decodeURIComponent(getQueryStringParameter('SPAppWebUrl'));
43
44
44
-
coreNavigation.initialize(appWebUrl, hostWebUrl);
45
+
coreNavigation.initialize(appWebUrl, hostWebUrl);
46
+
```
45
47
46
48
## Add a node to top navigation ##
47
49
Description:
48
50
The following code shows how to call the function to add a node to the top level navigation.
$("#statusMessage").html('Deleted quick launch nodes \'Parent\' and \'Child\'');
121
+
})
122
+
.fail(
123
+
function(message) {
124
+
$("#statusMessage").html('Failed to delete quick launch nodes \'Parent\' and \'Child\': '+ message);
125
+
});
126
+
```
117
127
118
128
## Delete all quick launch nodes ##
119
129
Description:
120
130
The following code shows how to call the function to delete all quick launch nodes.
121
131
122
132
Code snippet:
123
133
124
-
coreNavigation.deleteAllQuickLaunchNodes()
125
-
.done(
126
-
function() {
127
-
$("#statusMessage").html('Deleted all quick launch nodes');
128
-
})
129
-
.fail(
130
-
function(message) {
131
-
$("#statusMessage").html('Failed to delete all quick launch nodes: ' + message);
132
-
});
134
+
```JavaScript
135
+
coreNavigation.deleteAllQuickLaunchNodes()
136
+
.done(
137
+
function() {
138
+
$("#statusMessage").html('Deleted all quick launch nodes');
139
+
})
140
+
.fail(
141
+
function(message) {
142
+
$("#statusMessage").html('Failed to delete all quick launch nodes: '+ message);
143
+
});
144
+
```
133
145
134
146
## Update navigation inheritance ##
135
147
Description:
136
148
The following code shows how to call the function to update navigation inheritance. *Note: the example shows how to set inheritance to true, passing false to the function sets inheritance to false.*
137
149
138
150
Code snippet:
139
151
140
-
coreNavigation.updateNavigationInheritance(true)
141
-
.done(
142
-
function() {
143
-
$("#statusMessage").html('Navigation inheritance set to true');
144
-
})
145
-
.fail(
146
-
function(message) {
147
-
$("#statusMessage").html('Failed to set navigation inheritance to true: ' + message);
148
-
});
152
+
```JavaScript
153
+
coreNavigation.updateNavigationInheritance(true)
154
+
.done(
155
+
function() {
156
+
$("#statusMessage").html('Navigation inheritance set to true');
157
+
})
158
+
.fail(
159
+
function(message) {
160
+
$("#statusMessage").html('Failed to set navigation inheritance to true: '+ message);
0 commit comments