Skip to content

Commit

Permalink
Fixed issues with upgrades, updated readme, release notes, fixed EVS …
Browse files Browse the repository at this point in the history
…reported warnings
  • Loading branch information
valadas committed Jun 29, 2018
1 parent 1eeec21 commit c35d7d0
Show file tree
Hide file tree
Showing 14 changed files with 151 additions and 28 deletions.
7 changes: 6 additions & 1 deletion BuildScripts/ModulePackage.Targets
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,16 @@
<CreateItem Include="**\*.SqlDataProvider">
<Output TaskParameter="Include" ItemName="SqlDataProviderFiles" />
</CreateItem>
<CreateItem Include="**\Cleanup.*.*.*.txt">
<Output TaskParameter="Include" ItemName="CleanupFiles" />
</CreateItem>

<!-- Grab files for install setup -->
<Copy SourceFiles="$(MSBuildProjectDirectory)\bin\$(AssemblyName).dll" DestinationFolder="$(MSBuildProjectDirectory)\Package\bin"/>
<Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)" />
<Copy SourceFiles="@(PackageManifestFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
<Copy SourceFiles="@(PackageTxtFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
<Copy SourceFiles="@(PackageTxtFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
<Copy SourceFiles="@(CleanupFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />

<!-- Create the install resources.zip file -->
<Copy SourceFiles="@(InstallInclude)" DestinationFolder="$(MSBuildProjectDirectory)\ResourcesZip\%(RecursiveDir)" />
Expand All @@ -158,6 +162,7 @@
<Copy SourceFiles="@(SqlDataProviderFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)" />
<Copy SourceFiles="@(PackageManifestFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
<Copy SourceFiles="@(PackageTxtFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />
<Copy SourceFiles="@(CleanupFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" />

<!-- Create the sources resources.zip file -->
<Copy SourceFiles="@(SourceInclude)" DestinationFolder="$(MSBuildProjectDirectory)\ResourcesZip\%(RecursiveDir)" />
Expand Down
16 changes: 16 additions & 0 deletions Cleanup.07.00.00.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
bin\DotNetNuke.Modules.Links.pdb
App_Code\Links\Providers\DataProviders\SqlDataProvider\SqlDataProvider.vb
App_Code\Links\Providers\DataProviders\SqlDataProvider
App_Code\Links\Providers\DataProviders
App_Code\Links\Providers
App_Code\Links\Consts.vb
App_Code\Links\DataProvider.vb
App_Code\Links\Enums.vb
App_Code\Links\LinksController.vb
App_Code\Links\LinksFriend.vb
App_Code\Links\LinksInfo.vb
App_Code\Links\Utils.vb
App_Code\Links
DesktopModules\Links\EditLinks.ascx.vb
DesktopModules\Links\Links.ascx.vb
DesktopModules\Links\Settings.ascx.vb
1 change: 1 addition & 0 deletions Components/FeatureController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public void ImportModule(int moduleID, string content, string version, int userI

link.CreatedDate = DateTime.Now;
link.CreatedByUser = userId;
LinkController.DeleteLinkIfItExistsForModule(moduleID, link);
LinkController.AddLink(link);

// url tracking
Expand Down
2 changes: 2 additions & 0 deletions Components/Link.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ public class Link
[IgnoreColumn]
public string ImageURL { get; set; }

[ReadOnlyColumn]
public bool TrackClicks { get; set; }

[ReadOnlyColumn]
public bool NewWindow { get; set; }

[IgnoreColumn]
Expand Down
11 changes: 11 additions & 0 deletions Components/LinkController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,16 @@ public static string ConvertUrlType(TabType tabType)
}
}
}

public static void DeleteLinkIfItExistsForModule(int moduleId, Link link)
{
foreach (var oldLink in GetLinks(moduleId))
{
if (oldLink.Title == link.Title && oldLink.Url == link.Url)
{
DeleteLink(link.ItemId, moduleId);
}
}
}
}
}
43 changes: 33 additions & 10 deletions DNN_Links.dnn
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,31 @@
<email>[email protected]</email>
</owner>
<license src="License.htm" />
<releaseNotes src="ReleaseNotes.htm" />
<releaseNotes src="ReleaseNotes.htm" />
<azureCompatible>true</azureCompatible>
<dependencies>
<dependency type="coreVersion">07.02.00</dependency>
</dependencies>
<components>
<component type="Config">
<config>
<configFile>web.config</configFile>
<install>
<configuration>
<nodes>
<node path="/configuration/system.web/compilation/codeSubDirectories/add[@directoryName='Links']" action="remove" />
</nodes>
</configuration>
</install>
<uninstall>
<configuration>
<nodes />
</configuration>
</uninstall>
</config>
</component>
<component type="Cleanup" version="07.00.00" fileName="Cleanup.07.00.00.txt">
</component>
<component type="Script">
<scripts>
<basePath>DesktopModules\Links</basePath>
Expand Down Expand Up @@ -124,18 +147,18 @@
<attributes>
<businessControllerClass>DotNetNuke.Modules.Links.Components.FeatureController</businessControllerClass>
<desktopModuleID>[DESKTOPMODULEID]</desktopModuleID>
<upgradeVersionsList>03.01.00,03.03.00,03.03.06,04.00.00,04.00.01,04.01.00,04.01.01</upgradeVersionsList>
<upgradeVersionsList>03.01.00,03.03.00,03.03.06,04.00.00,04.00.01,04.01.00,04.01.01,07.00.00</upgradeVersionsList>
</attributes>
</eventMessage>
</component>
<component type="Assembly">
<assemblies>
<assembly>
<name>DotNetNuke.Modules.Links.dll</name>
<path>bin</path>
</assembly>
</assemblies>
</component>
<component type="Assembly">
<assemblies>
<assembly>
<name>DotNetNuke.Modules.Links.dll</name>
<path>bin</path>
</assembly>
</assemblies>
</component>
</components>
</package>
</packages>
Expand Down
20 changes: 20 additions & 0 deletions Dnn.Links.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,67 +47,83 @@
<ItemGroup>
<Reference Include="ClientDependency.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Bundle.9.2.0.366\lib\ClientDependency.Core.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DNN.Integration.Test.Framework, Version=9.2.0.366, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Bundle.9.2.0.366\lib\DNN.Integration.Test.Framework.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke, Version=9.2.0.73, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Core.9.2.0.73\lib\net40\DotNetNuke.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.HttpModules, Version=9.2.0.366, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Bundle.9.2.0.366\lib\DotNetNuke.HttpModules.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.Instrumentation, Version=9.2.0.101, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Instrumentation.9.2.0.101\lib\net40\DotNetNuke.Instrumentation.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.Log4Net, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Instrumentation.9.2.0.101\lib\net40\DotNetNuke.Log4Net.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.Modules.DigitalAssets, Version=9.2.0.366, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Bundle.9.2.0.366\lib\DotNetNuke.Modules.DigitalAssets.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.Tests.Utilities, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Bundle.9.2.0.366\lib\DotNetNuke.Tests.Utilities.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.Web, Version=9.2.0.101, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Web.9.2.0.101\lib\net40\DotNetNuke.Web.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.Web.Client, Version=9.2.0.101, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Web.Client.9.2.0.101\lib\net40\DotNetNuke.Web.Client.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.Web.Deprecated, Version=9.2.0.101, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Web.Deprecated.9.2.0.101\lib\net40\DotNetNuke.Web.Deprecated.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.Web.Mvc, Version=9.2.0.101, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Web.Mvc.9.2.0.101\lib\net45\DotNetNuke.Web.Mvc.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.WebControls, Version=2.4.0.598, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Bundle.9.2.0.366\lib\DotNetNuke.WebControls.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="DotNetNuke.WebUtility, Version=4.2.1.783, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Web.9.2.0.101\lib\net40\DotNetNuke.WebUtility.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.ApplicationBlocks.Data, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Core.9.2.0.73\lib\net40\Microsoft.ApplicationBlocks.Data.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.4.5.6\lib\net40\Newtonsoft.Json.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System" />
Expand All @@ -117,17 +133,20 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.AspNet.WebApi.Client.4.0.20710.0\lib\net40\System.Net.Http.Formatting.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System.Net.Http.WebRequest" />
<Reference Include="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" />
<Reference Include="System.Xml" />
<Reference Include="Telerik.Web.UI, Version=2013.2.717.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4, processorArchitecture=MSIL">
<HintPath>packages\DotNetNuke.Web.Deprecated.9.2.0.101\lib\net40\Telerik.Web.UI.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
</ItemGroup>
Expand Down Expand Up @@ -168,6 +187,7 @@
<None Include="BuildScripts\ModulePackage.Targets">
<SubType>Designer</SubType>
</None>
<Content Include="Cleanup.07.00.00.txt" />
<Content Include="DNN_Links.dnn">
<SubType>Designer</SubType>
</Content>
Expand Down
8 changes: 4 additions & 4 deletions Links.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
AutoEventWireup="true" Explicit="True" Codebehind="Links.ascx.cs" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
<asp:Panel ID="pnlList" runat="server" CssClass="link_module">
<asp:Repeater ID="lstLinks" runat="server">
<asp:Panel ID="pnlList" runat="server" CssClass="link_module" >
<asp:Repeater ID="lstLinks" runat="server" OnItemDataBound="lstLinks_ItemDataBound">
<HeaderTemplate>
<ul id="ulHeader" class="linklist">
<ul id="ulHeader" class="linklist <%# Horizontal %>" >
</HeaderTemplate>
<ItemTemplate>
<li id="itemLi" class="linkitem <%# Horizontal %>" <%# NoWrap %>>
<asp:HyperLink ID="editLink" NavigateUrl='<%= EditURL("ItemID",Eval("ItemID")) %>'
<asp:HyperLink ID="editLink" NavigateUrl='<% EditURL("ItemID",Eval("ItemID")) %>'
Visible="<%# IsEditable %>" runat="server">
<asp:Image ID="editLinkImage" ImageUrl="~/images/edit.gif" AlternateText="Edit" Visible="<%# IsEditable %>"
runat="server" />
Expand Down
16 changes: 8 additions & 8 deletions Links.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ public string NoWrap
{
get
{
if (Settings["nowrap"].ToString() != "W")
if (Settings.ContainsKey("nowrap") && Settings["nowrap"].ToString() != "W")
return "style=\"white-space: nowrap\"";

return string.Empty;
Expand All @@ -424,7 +424,7 @@ public string Horizontal
{
string result = string.Empty;

if (System.Convert.ToString(Settings[SettingName.Direction]) == Consts.DirectionHorizontal)
if (Settings.ContainsKey(SettingName.Direction) && System.Convert.ToString(Settings[SettingName.Direction]) == Consts.DirectionHorizontal)
result = "Horizontal";

return result;
Expand Down Expand Up @@ -1023,18 +1023,18 @@ protected void lstLinks_ItemDataBound(object sender, System.Web.UI.WebControls.R
{
var link = e.Item.DataItem as Link;

if (e.Item.ItemType == ListItemType.Header)
{
var header = e.Item.FindControl("ulHeader") as HtmlControl;
header.Attributes["class"] += " " + Horizontal;
}
//if (e.Item.ItemType == ListItemType.Header)
//{
// var header = e.Item.FindControl("ulHeader") as HtmlControl;
// header.Attributes["class"] += " " + Horizontal;
//}
if (e.Item.ItemType == ListItemType.Item | e.Item.ItemType == ListItemType.AlternatingItem)
{
HtmlAnchor linkHyp = (HtmlAnchor)e.Item.FindControl("linkHyp");
Label lblMoreInfo = (Label)e.Item.FindControl("lblMoreInfo");
Panel pnlDescription = (Panel)e.Item.FindControl("pnlDescription");
var lbldescrdiv = e.Item.FindControl("lbldescrdiv") as Label;
var spnSelect = e.Item.FindControl("spnSelect") as HtmlElement;
var spnSelect = e.Item.FindControl("spnSelect");
var radToolTip = e.Item.FindControl("radToolTip") as RadToolTip;

lblMoreInfo.Attributes.Add("onclick", "toggleVisibility('" + pnlDescription.ClientID + "')");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ AS

DELETE
FROM {databaseOwner}{objectQualifier}Links
WHERE ItemID = @ItemId AND ModuleID = @ModuleId
WHERE ItemID = @ItemId AND ModuleID = @ModuleId
GO
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,5 @@ SET CreatedByUser = @UserId,
ViewOrder = @ViewOrder,
Description = @Description,
RefreshInterval = @RefreshInterval
WHERE ItemId = @ItemId
WHERE ItemId = @ItemId
GO
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,5 @@ SET CreatedByUser = @UserId,
Description = @Description,
RefreshInterval = @RefreshInterval,
GrantRoles = @GrantRoles
WHERE ItemId = @ItemId
WHERE ItemId = @ItemId
GO
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# DNN.Links
DNN Links is a basic module used for displaying navigational links on your DNN site.

## Compatibility
| Dnn Links version | Min Tested Dnn version | Max Tested Dnn version |
| -------------------------:| ----------------------:| ----------------------:|
| Included or use 06.02.02 | 00.00.00 | 08.00.04 |
| 06.02.03 | 07.02.00 | 09.01.01 |
| 07.00.00 | 07.02.00 | 09.02.00 |

## Building the module from source and submitting pull requests
1. Install Dnn (latest stable version) from https://github.com/dnnsoftware/Dnn.Platform/releases
2. Fork this repository to your own github account
3. Clone your fork to the Dnn DesktopModules folder
4. Important, the project name id Dnn.Links, but the deployment directory is just Links (more later)
5. Build the project in release mode using Visual Studio, this will create the installable packages in the Install/ folder of Dnn.Links folder
6. Install one of the zip packages using the Dnn extension installer as any other module
7. In Visual Studio, create a new branch to isolate your changes.
8. In Visual studio, to test any changes, you need to build in debug mode, this will compile and copy all files from Dnn.Announcements (the source code) to Announcements (the deployment folder). To debug, use the attach to process feature and attach it to the w3wp process that matches the running site.
9. Commit and push your changes with clear descritions, then in github, create a pull request from the branch you created to the Dnn.Community repository, again please add a good description of the changes. You can also mention issues with #issueNumber to automatically associate your pull request with existing issues.
Loading

0 comments on commit c35d7d0

Please sign in to comment.