Skip to content

Commit 38e54c5

Browse files
committed
Upgraded to **OnTopic Library 4.0.0**
In addition to updating to the latest version of the assemblies via **NuGet**, this also requires making quite a few updates to accommodate recent changes to the API, such as the migration from `Ignia.Topics` to `OnTopic`; the introduction of the `OnTopic.Attributes` and `OnTopic.Metadata` namespaces; and even, in some cases, the moving of `GetValue()` from `Topic` to `Attributes` (a change made quite some time ago, but which doesn't seem to have made it into the master repository for the **OnTopic Editor**). This also includes upgrading the projects to use **.NET Framework 4.8** (needed to support the **OnTopic Library**, which uses **.NET Standard 2.0**) as well as a later version of **C#** (needed to support e.g. null coalescense operators, for example). Also deleted a seemingly redundant and unnecessary copy of `/Scripts/ckeditor` in preference for `/Common/Scripts/ckeditor`, which removes a lot of clutter from the `csproj`.
1 parent 48a657e commit 38e54c5

27 files changed

Lines changed: 142 additions & 397 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ FakesAssemblies/
201201
**/Common/Scripts/ckeditor
202202
**/Common/Scripts/Vendor
203203
**/Images/Vendor/jQueryUI
204+
**/Common/Global/
204205

205206
# Excluded secret files
206207
**/Configuration/connectionStrings.config

OnTopic.Editor.Web.Host/OnTopic.Editor.Web.Host.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
77
<ProductVersion>
88
</ProductVersion>
9+
<LangVersion>6</LangVersion>
910
<SchemaVersion>2.0</SchemaVersion>
1011
<ProjectGuid>{5CEBC2AE-7A33-4F8A-B45F-29BEFB56E013}</ProjectGuid>
1112
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
@@ -56,6 +57,9 @@
5657
<Reference Include="OnTopic.Data.Sql, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
5758
<HintPath>..\packages\OnTopic.Data.Sql.4.0.0\lib\netstandard2.0\OnTopic.Data.Sql.dll</HintPath>
5859
</Reference>
60+
<Reference Include="OnTopic.Web, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
61+
<HintPath>..\packages\OnTopic.Web.4.0.0-alpha.2\lib\net48\OnTopic.Web.dll</HintPath>
62+
</Reference>
5963
<Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
6064
<HintPath>..\packages\System.ComponentModel.Annotations.4.6.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
6165
</Reference>
@@ -123,7 +127,9 @@
123127
<ItemGroup>
124128
<Content Include="Common\Templates\Page.aspx" />
125129
<Content Include="Global.asax" />
126-
<Content Include="Web.config" />
130+
<Content Include="Web.config">
131+
<SubType>Designer</SubType>
132+
</Content>
127133
</ItemGroup>
128134
<ItemGroup>
129135
<Compile Include="Common\Templates\Layout.master.cs">

OnTopic.Editor.Web.Host/Web.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
<system.codedom>
3131
<compilers>
3232
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
33-
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
3433
</compilers>
3534
</system.codedom>
3635

OnTopic.Editor.Web.Host/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<package id="OnTopic" version="4.0.0" targetFramework="net48" />
77
<package id="OnTopic.Data.Caching" version="4.0.0" targetFramework="net48" />
88
<package id="OnTopic.Data.Sql" version="4.0.0" targetFramework="net48" />
9+
<package id="OnTopic.Web" version="4.0.0-alpha.2" targetFramework="net48" />
910
<package id="System.ComponentModel.Annotations" version="4.6.0" targetFramework="net48" />
1011
<package id="System.Data.DataSetExtensions" version="4.5.0" targetFramework="net48" />
1112
<package id="System.Data.SqlClient" version="4.7.0" targetFramework="net48" />

OnTopic.Editor.Web/Client/Sitemap.xml.aspx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<%@ OutputCache CacheProfile="Server" %>
44

5-
<%@ Import nameSpace="Ignia.Topics" %>
5+
<%@ Import nameSpace="OnTopic" %>
66

77
<script runat="server">
88

OnTopic.Editor.Web/Client/Topics.Json.aspx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<%@ Page Language="C#" ContentType="application/json" %>
22

33
<%@ Import NameSpace="System.Linq" %>
4-
<%@ Import NameSpace="Topics=Ignia.Topics" %>
4+
<%@ Import NameSpace="Topics=OnTopic" %>
5+
<%@ Import Namespace="OnTopic.Attributes" %>
56

67
<Script runat="server">
78
@@ -469,7 +470,7 @@
469470
/*--------------------------------------------------------------------------------------------------------------------------
470471
| Loop through Topic's Attributes and add their values to the list
471472
\-------------------------------------------------------------------------------------------------------------------------*/
472-
foreach (Topics.AttributeValue attributeValue in topic.Attributes) {
473+
foreach (AttributeValue attributeValue in topic.Attributes) {
473474
attributeValues.Add(topic.Attributes.GetValue(attributeValue.Key));
474475
}
475476

OnTopic.Editor.Web/Client/Topics.xml.aspx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<%@ Page Language="C#" %>
22

3-
<%@ Import nameSpace="Ignia.Topics" %>
3+
<%@ Import nameSpace="OnTopic" %>
44

55
<script runat="server">
66
@@ -58,7 +58,7 @@
5858
Response.Write(AddNodeToOutput(topicRoot, 1));
5959
}
6060
else {
61-
foreach (Topic topic in topicRoot.Values) {
61+
foreach (Topic topic in topicRoot.Children) {
6262
Response.Write(AddNodeToOutput(topic, 1));
6363
}
6464
}
@@ -81,9 +81,9 @@
8181
_isFirstNode = false;
8282
}
8383
84-
output += indent + "<item id=\"" + topic.ID + "\" text=\"" + HttpUtility.HtmlAttributeEncode(topic.Key) + "\" " + initializer + ">\n";
84+
output += indent + "<item id=\"" + topic.Id + "\" text=\"" + HttpUtility.HtmlAttributeEncode(topic.Key) + "\" " + initializer + ">\n";
8585
86-
foreach (Topic childNode in topic.Values) {
86+
foreach (Topic childNode in topic.Children) {
8787
output += AddNodeToOutput(childNode, indentLevel+1);
8888
}
8989

OnTopic.Editor.Web/Common/Controls/Boolean.ascx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<%@ Control Language="C#" ClassName="Boolean" Inherits="Ignia.Topics.Web.Editor.AttributeTypeControl" %>
1+
<%@ Control Language="C#" ClassName="Boolean" Inherits="OnTopic.Web.Editor.AttributeTypeControl" %>
22

3-
<%@ Import Namespace="Ignia.Topics" %>
3+
<%@ Import Namespace="OnTopic" %>
44

55
<Script RunAt="Server">
66

OnTopic.Editor.Web/Common/Controls/DateTimeSelector.ascx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<%@ Control Language="C#" ClassName="DateTimeSelector" Inherits="Ignia.Topics.Web.Editor.AttributeTypeControl" %>
1+
<%@ Control Language="C#" ClassName="DateTimeSelector" Inherits="OnTopic.Web.Editor.AttributeTypeControl" %>
22

3-
<%@ Import Namespace="Ignia.Topics" %>
3+
<%@ Import Namespace="OnTopic" %>
44
<%@ Import Namespace="System" %>
55
<%@ Import Namespace="System.Web" %>
66
<%@ Import Namespace="System.Web.UI" %>

OnTopic.Editor.Web/Common/Controls/File.ascx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<%@ Control Language="C#" ClassName="File" Inherits="Ignia.Topics.Web.Editor.AttributeTypeControl" %>
1+
<%@ Control Language="C#" ClassName="File" Inherits="OnTopic.Web.Editor.AttributeTypeControl" %>
22

3-
<%@ Import Namespace="Ignia.Topics" %>
3+
<%@ Import Namespace="OnTopic" %>
44
<%@ Import Namespace="System.IO" %>
55

66
<Script RunAt="Server">

0 commit comments

Comments
 (0)