Skip to content

Commit c5e72ed

Browse files
committed
Merge remote-tracking branch 'contributor/samples-new' into dev
2 parents 6f93faf + 94e32c8 commit c5e72ed

28 files changed

+13321
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.30723.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Jsom.Navigation", "Core.Jsom.Navigation\Core.Jsom.Navigation.csproj", "{01A54DA0-3FB5-4AEC-9E9F-65D13C921919}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Documentation", "Documentation", "{E4548921-1669-4A75-9FD4-CFE4835742ED}"
9+
ProjectSection(SolutionItems) = preProject
10+
readme.md = readme.md
11+
EndProjectSection
12+
EndProject
13+
Global
14+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
15+
Debug|Any CPU = Debug|Any CPU
16+
Release|Any CPU = Release|Any CPU
17+
EndGlobalSection
18+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19+
{01A54DA0-3FB5-4AEC-9E9F-65D13C921919}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{01A54DA0-3FB5-4AEC-9E9F-65D13C921919}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{01A54DA0-3FB5-4AEC-9E9F-65D13C921919}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
22+
{01A54DA0-3FB5-4AEC-9E9F-65D13C921919}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{01A54DA0-3FB5-4AEC-9E9F-65D13C921919}.Release|Any CPU.Build.0 = Release|Any CPU
24+
{01A54DA0-3FB5-4AEC-9E9F-65D13C921919}.Release|Any CPU.Deploy.0 = Release|Any CPU
25+
EndGlobalSection
26+
GlobalSection(SolutionProperties) = preSolution
27+
HideSolutionNode = FALSE
28+
EndGlobalSection
29+
EndGlobal
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
3+
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"
4+
Name="CoreJsomNavigation"
5+
ProductID="{7b61e09e-b475-4145-9b8f-e9203d615824}"
6+
Version="1.0.0.0"
7+
SharePointMinVersion="16.0.0.0"
8+
>
9+
<Properties>
10+
<Title>Office 365 Developer PnP JSOM Navigation Sample</Title>
11+
<StartPage>~appWebUrl/Pages/Default.aspx?{StandardTokens}</StartPage>
12+
</Properties>
13+
14+
<AppPrincipal>
15+
<Internal />
16+
</AppPrincipal>
17+
<AppPermissionRequests>
18+
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="Manage" />
19+
</AppPermissionRequests>
20+
</App>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
button { width: 200px; }
2+
3+
.div-status { margin-top: 50px; }
4+
5+
.label-status { font-weight: bold }
6+
7+
.message-status { font-style: italic; }
8+
9+
.td-warning {
10+
color: red;
11+
font-weight: bold;
12+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
3+
<Module Name="Content">
4+
<File Path="Content\App.css" Url="Content/App.css" ReplaceContent="TRUE" />
5+
</Module>
6+
</Elements>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ProjectItem Type="Microsoft.VisualStudio.SharePoint.Module" DefaultFile="Elements.xml" SupportedTrustLevels="All" SupportedDeploymentScopes="Web, Site" xmlns="http://schemas.microsoft.com/VisualStudio/2010/SharePointTools/SharePointProjectItemModel">
3+
<Files>
4+
<ProjectItemFile Source="Elements.xml" Target="Content\" Type="ElementManifest" />
5+
<ProjectItemFile Source="App.css" Target="Content\" Type="ElementFile" />
6+
</Files>
7+
</ProjectItem>
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{01A54DA0-3FB5-4AEC-9E9F-65D13C921919}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>Core.Jsom.Navigation</RootNamespace>
11+
<AssemblyName>Core.Jsom.Navigation</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<TargetOfficeVersion>16.0</TargetOfficeVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<ProjectTypeGuids>{C1CDDADD-2546-481F-9697-4EA41081F2FC};{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
16+
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
17+
<MinimumOfficeToolsVersion>12.1</MinimumOfficeToolsVersion>
18+
<IncludeAssemblyInPackage>False</IncludeAssemblyInPackage>
19+
<ProjectMode>SharePointApp</ProjectMode>
20+
<AppFeaturePartId>{15693767-a649-446b-8827-1eadaa3758aa}</AppFeaturePartId>
21+
<WspPartId>{5b9a6509-55df-44a9-9055-1c78f3ead875}</WspPartId>
22+
<WorkflowPartId>{8e2a4171-ca88-4889-b0ed-0b835997bd27}</WorkflowPartId>
23+
<CspkgPartId>{a164cd81-84af-4c98-bcb2-3c414ef5b254}</CspkgPartId>
24+
<SqlPackagePartId>{57bfcc30-5f26-40ba-82e9-52b0c82221e4}</SqlPackagePartId>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
27+
<DebugSymbols>true</DebugSymbols>
28+
<DebugType>full</DebugType>
29+
<Optimize>false</Optimize>
30+
<OutputPath>bin\Debug\</OutputPath>
31+
<DefineConstants>DEBUG;TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
<UseVSHostingProcess>false</UseVSHostingProcess>
35+
</PropertyGroup>
36+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
37+
<DebugType>pdbonly</DebugType>
38+
<Optimize>true</Optimize>
39+
<OutputPath>bin\Release\</OutputPath>
40+
<DefineConstants>TRACE</DefineConstants>
41+
<ErrorReport>prompt</ErrorReport>
42+
<WarningLevel>4</WarningLevel>
43+
<UseVSHostingProcess>false</UseVSHostingProcess>
44+
</PropertyGroup>
45+
<ItemGroup>
46+
<None Include="packages.config" />
47+
<None Include="Pages\SharePointProjectItem.spdata">
48+
<SharePointProjectItemId>{7b61e09e-b475-4145-9b8f-e9203d615824}</SharePointProjectItemId>
49+
</None>
50+
<Content Include="Pages\Elements.xml" />
51+
<Content Include="Pages\Default.aspx" />
52+
</ItemGroup>
53+
<ItemGroup>
54+
<None Include="Scripts\jquery-1.9.1.min.map" />
55+
<None Include="Scripts\SharePointProjectItem.spdata">
56+
<SharePointProjectItemId>{57bfcc30-5f26-40ba-82e9-52b0c82221e4}</SharePointProjectItemId>
57+
</None>
58+
<Content Include="Scripts\Common.js" />
59+
<Content Include="Scripts\Elements.xml" />
60+
<Content Include="Scripts\App.js" />
61+
<Content Include="Scripts\jquery-1.9.1.intellisense.js" />
62+
<Content Include="Scripts\jquery-1.9.1.js" />
63+
<Content Include="Scripts\jquery-1.9.1.min.js" />
64+
<Content Include="Scripts\OfficeDevPnP.Core.Navigation.js" />
65+
<Content Include="Scripts\_references.js" />
66+
</ItemGroup>
67+
<ItemGroup>
68+
<None Include="Content\SharePointProjectItem.spdata">
69+
<SharePointProjectItemId>{10e0ab6c-c588-477d-a69b-59e9bd5d5b1e}</SharePointProjectItemId>
70+
</None>
71+
<Content Include="Content\Elements.xml" />
72+
<Content Include="Content\App.css" />
73+
</ItemGroup>
74+
<ItemGroup>
75+
<Content Include="Images\AppIcon.png">
76+
<OpcRelationship>manifest-icon</OpcRelationship>
77+
</Content>
78+
<Content Include="Images\Elements.xml" />
79+
<None Include="Images\SharePointProjectItem.spdata">
80+
<SharePointProjectItemId>{e607f7f7-e87d-448e-8294-2f30a632f2c2}</SharePointProjectItemId>
81+
</None>
82+
</ItemGroup>
83+
<ItemGroup>
84+
<None Include="Package\Package.package">
85+
<PackageId>{f07c41e7-ff4e-404f-909c-f486253c5104}</PackageId>
86+
</None>
87+
<None Include="Package\Package.Template.xml">
88+
<DependentUpon>Package.package</DependentUpon>
89+
</None>
90+
<None Include="Features\Feature1\Feature1.feature">
91+
<FeatureId>{ad2a80ac-f0e0-44b9-8a21-4d616a555cd4}</FeatureId>
92+
</None>
93+
<None Include="Features\Feature1\Feature1.Template.xml">
94+
<DependentUpon>Feature1.feature</DependentUpon>
95+
</None>
96+
</ItemGroup>
97+
<ItemGroup>
98+
<AppManifestFile Include="AppManifest.xml">
99+
<SubType>Designer</SubType>
100+
</AppManifestFile>
101+
</ItemGroup>
102+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
103+
<PropertyGroup>
104+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
105+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
106+
</PropertyGroup>
107+
<Import Project="$(VSToolsPath)\SharePointTools\Microsoft.VisualStudio.SharePoint.targets" Condition="'$(VSToolsPath)' != ''" />
108+
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<Feature xmlns="http://schemas.microsoft.com/sharepoint/">
3+
</Feature>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<feature xmlns:dm0="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" dslVersion="1.0.0.0" Id="ad2a80ac-f0e0-44b9-8a21-4d616a555cd4" description="SharePoint App Feature" featureId="ad2a80ac-f0e0-44b9-8a21-4d616a555cd4" imageUrl="" solutionId="00000000-0000-0000-0000-000000000000" title="Core.Jsom.Navigation Feature1" version="" deploymentPath="$SharePoint.Project.FileNameWithoutExtension$_$SharePoint.Feature.FileNameWithoutExtension$" xmlns="http://schemas.microsoft.com/VisualStudio/2008/SharePointTools/FeatureModel">
3+
<projectItems>
4+
<projectItemReference itemId="7b61e09e-b475-4145-9b8f-e9203d615824" />
5+
<projectItemReference itemId="57bfcc30-5f26-40ba-82e9-52b0c82221e4" />
6+
<projectItemReference itemId="10e0ab6c-c588-477d-a69b-59e9bd5d5b1e" />
7+
<projectItemReference itemId="e607f7f7-e87d-448e-8294-2f30a632f2c2" />
8+
</projectItems>
9+
</feature>
Loading
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
3+
<Module Name="Images">
4+
<File Path="Images\AppIcon.png" Url="Images/AppIcon.png" ReplaceContent="TRUE" />
5+
</Module>
6+
</Elements>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ProjectItem Type="Microsoft.VisualStudio.SharePoint.Module" DefaultFile="Elements.xml" SupportedTrustLevels="All" SupportedDeploymentScopes="Web, Site" xmlns="http://schemas.microsoft.com/VisualStudio/2010/SharePointTools/SharePointProjectItemModel">
3+
<Files>
4+
<ProjectItemFile Source="Elements.xml" Target="Images\" Type="ElementManifest" />
5+
<ProjectItemFile Source="AppIcon.png" Target="Images\" Type="ElementFile" />
6+
</Files>
7+
</ProjectItem>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Solution xmlns="http://schemas.microsoft.com/sharepoint/">
3+
</Solution>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package dslVersion="1.0.0.0"
3+
Id="f07c41e7-ff4e-404f-909c-f486253c5104"
4+
solutionId="f07c41e7-ff4e-404f-909c-f486253c5104"
5+
xmlns="http://schemas.microsoft.com/VisualStudio/2008/SharePointTools/PackageModel"
6+
name="Core.Jsom.Navigation"
7+
sharePointProductVersion="16.0">
8+
<features>
9+
<featureReference itemId="ad2a80ac-f0e0-44b9-8a21-4d616a555cd4" />
10+
</features>
11+
</package>
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<%-- The following 4 lines are ASP.NET directives needed when using SharePoint components --%>
2+
3+
<%@ Page Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" MasterPageFile="~masterurl/default.master" Language="C#" %>
4+
5+
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
6+
<%@ Register TagPrefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
7+
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
8+
9+
<%-- The markup and script in the following Content element will be placed in the <head> of the page --%>
10+
<asp:Content ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
11+
<script type="text/javascript" src="../Scripts/jquery-1.9.1.min.js"></script>
12+
<script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>
13+
<script type="text/javascript" src="/_layouts/15/sp.js"></script>
14+
<script type="text/javascript" src="/_layouts/15/SP.RequestExecutor.js"></script>
15+
16+
<meta name="WebPartPageExpansion" content="full" />
17+
18+
<!-- Add your CSS styles to the following file -->
19+
<link rel="Stylesheet" type="text/css" href="../Content/App.css" />
20+
21+
<!-- Add your JavaScript to the following file -->
22+
<script type="text/javascript" src="../Scripts/Common.js"></script>
23+
<script type="text/javascript" src="../Scripts/OfficeDevPnP.Core.Navigation.js"></script>
24+
<script type="text/javascript" src="../Scripts/App.js"></script>
25+
</asp:Content>
26+
27+
<%-- The markup in the following Content element will be placed in the TitleArea of the page --%>
28+
<asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
29+
Office 365 Developer PnP JSOM Navigation Sample
30+
</asp:Content>
31+
32+
<%-- The markup and script in the following Content element will be placed in the <body> of the page --%>
33+
<asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server">
34+
<table>
35+
<thead></thead>
36+
<tbody>
37+
<tr>
38+
<td>This will add a node named 'Test' to the top nav.</td>
39+
<td>
40+
<button id="addTopNavNodeButton" onclick="navApp.addTopNavNode();" type="submit">Add Top Nav Navigation Node</button></td>
41+
</tr>
42+
<tr>
43+
<td colspan="2">
44+
<hr />
45+
</td>
46+
</tr>
47+
<tr>
48+
<td>The will delete the node named 'Test' created in the step above.</td>
49+
<td>
50+
<button id="deleteTopNavNodeButton" onclick="navApp.deleteTopNavNode();" type="submit">Delete Top Nav Navigation Node</button></td>
51+
</tr>
52+
<tr>
53+
<td colspan="2">
54+
<hr />
55+
</td>
56+
</tr>
57+
<tr>
58+
<td>This will add a node named 'Parent' and a node named 'Child' to the quick launch.
59+
</td>
60+
<td>
61+
<button id="addQuickLaunchNodesButton" onclick="navApp.addQuickLaunchNodes();" type="submit">Add Quick Launch Nodes</button>
62+
</td>
63+
</tr>
64+
<tr>
65+
<td colspan="2">
66+
<hr />
67+
</td>
68+
</tr>
69+
<tr>
70+
<td>This will delete the nodes 'Parent' and 'Child' created in the step above.
71+
</td>
72+
<td>
73+
<button id="deleteQuickLaunchNodesButton" onclick="navApp.deleteQuickLaunchNodes();" type="submit">Delete Quick Launch Nodes</button>
74+
</td>
75+
</tr>
76+
<tr>
77+
<td colspan="2">
78+
<hr />
79+
</td>
80+
</tr>
81+
<tr>
82+
<td class="td-warning">This will delete all quick launch nodes.</td>
83+
<td>
84+
<button id="deleteAllQuickLaunchNodesButton" onclick="navApp.deleteAllQuickLaunchNodes();" type="submit">Delete All Quick Launch Nodes</button></td>
85+
</tr>
86+
<tr>
87+
<td colspan="2">
88+
<hr />
89+
</td>
90+
</tr>
91+
<tr>
92+
<td>Sets navigation inheriteance to true.</td>
93+
<td>
94+
<button id="updateNavigationInheritanceTrueButton" onclick="navApp.updateNavigationInheritanceTrue();" type="submit">Set Navigation Inheritance to true</button></td>
95+
</tr>
96+
<tr>
97+
<td colspan="2">
98+
<hr />
99+
</td>
100+
</tr>
101+
<tr>
102+
<td>Sets navigation inheriteance to false.</td>
103+
<td>
104+
<button id="updateNavigationInheritanceFalseButton" onclick="navApp.updateNavigationInheritanceFalse();" type="submit">Set Navigation Inheritance to false</button></td>
105+
</tr>
106+
</tbody>
107+
</table>
108+
109+
<div id="statusArea" class="div-status">
110+
<label class="label-status">Status: </label>
111+
<label id="statusMessage" class="message-status"></label>
112+
</div>
113+
114+
</asp:Content>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
3+
<Module Name="Pages">
4+
<File Path="Pages\Default.aspx" Url="Pages/Default.aspx" ReplaceContent="TRUE" />
5+
</Module>
6+
</Elements>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ProjectItem Type="Microsoft.VisualStudio.SharePoint.Module" DefaultFile="Elements.xml" SupportedTrustLevels="All" SupportedDeploymentScopes="Web, Site" xmlns="http://schemas.microsoft.com/VisualStudio/2010/SharePointTools/SharePointProjectItemModel">
3+
<Files>
4+
<ProjectItemFile Source="Elements.xml" Target="Pages\" Type="ElementManifest" />
5+
<ProjectItemFile Source="Default.aspx" Target="Pages\" Type="ElementFile" />
6+
</Files>
7+
</ProjectItem>

0 commit comments

Comments
 (0)