FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixed issues relatives to the Dashboard module navigation by stetard · Pull Request #91 · DNNCommunity/DNN.Repository · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cs  (7) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
38 changes: 18 additions & 20 deletions About.ascx.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using DotNetNuke.Abstractions;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Services.Localization;
using Microsoft.Extensions.DependencyInjection;

//
// DotNetNuke® - http://www.dotnetnuke.com
// Copyright (c) 2002-2005
Expand All @@ -27,11 +25,6 @@

using System.Web;
using System.Web.UI.WebControls;
using System.IO;
using DotNetNuke;
using DotNetNuke.Services.Localization;
using DotNetNuke.Common;
using DotNetNuke.Entities.Portals;

namespace DotNetNuke.Modules.Repository
{
Expand Down Expand Up @@ -77,12 +70,14 @@ private void Page_Init(System.Object sender, System.EventArgs e)
InitializeComponent();
}

#endregion
#endregion

#region "Event Handlers"
protected INavigationManager navigationManager;

#region "Event Handlers"

private void Page_Load(System.Object sender, System.EventArgs e)

private void Page_Load(System.Object sender, System.EventArgs e)
{
// Obtain PortalSettings from Current Context
PortalSettings _portalSettings = (PortalSettings)HttpContext.Current.Items["PortalSettings"];
Expand All @@ -98,16 +93,19 @@ private void Page_Load(System.Object sender, System.EventArgs e)

private void btnCancel_Click(object sender, System.EventArgs e)
{
HttpContext.Current.Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(), true);
}
Response.Redirect(navigationManager.NavigateURL(), true);

}
public AboutRepository()
{
Load += Page_Load;
Init += Page_Init;
}

#endregion
navigationManager = DependencyProvider.GetRequiredService<INavigationManager>();
}

#endregion

}
}

}
48 changes: 27 additions & 21 deletions DashboardSettings.ascx.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
using DotNetNuke;
using DotNetNuke.Abstractions;
using DotNetNuke.Common;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Modules.Definitions;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Entities.Tabs;
using DotNetNuke.Security;
using DotNetNuke.Services.Exceptions;
using DotNetNuke.Services.Installer.Packages;
using DotNetNuke.Services.Localization;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;

//
// DotNetNuke® - http://www.dotnetnuke.com
// Copyright (c) 2002-2005
Expand All @@ -27,18 +40,6 @@

using System.Web;
using System.Web.UI.WebControls;
using System.IO;
using DotNetNuke;
using DotNetNuke.Security;
using DotNetNuke.Entities.Tabs;
using DotNetNuke.Common;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Services.Exceptions;
using DotNetNuke.Services.Localization;
using DotNetNuke.Entities.Modules.Definitions;
using System.Collections.Generic;
using DotNetNuke.Services.Installer.Packages;

namespace DotNetNuke.Modules.Repository
{
Expand All @@ -51,10 +52,13 @@ public class DashboardSettings : Entities.Modules.ModuleSettingsBase
protected TextBox txtRowCount;

protected System.Web.UI.WebControls.Label lblMessage;

protected INavigationManager navigationManager;

#region " Web Form Designer Generated Code "

//This call is required by the Web Form Designer.
[System.Diagnostics.DebuggerStepThrough()]
//This call is required by the Web Form Designer.
[System.Diagnostics.DebuggerStepThrough()]

private void InitializeComponent()
{
Expand Down Expand Up @@ -166,20 +170,22 @@ public override void UpdateSettings()
}

// Redirect back to the portal home page
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(), true);
//Module failed to load
} catch (Exception exc) {
Response.Redirect(navigationManager.NavigateURL(), true);
//Module failed to load
} catch (Exception exc) {
lblMessage.Text = exc.Message;
}
}
public DashboardSettings()
{
Load += Page_Load;
Init += Page_Init;
}

#endregion
navigationManager = DependencyProvider.GetRequiredService<INavigationManager>();
}

#endregion

}
}

}
53 changes: 30 additions & 23 deletions EditComment.ascx.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
using DotNetNuke;
using DotNetNuke.Abstractions;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Security;
using DotNetNuke.Services.Exceptions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;

//
// DotNetNuke® - http://www.dotnetnuke.com
// Copyright (c) 2002-2005
Expand All @@ -26,11 +31,7 @@
// DEALINGS IN THE SOFTWARE.

using System.IO;
using DotNetNuke;
using DotNetNuke.Services.Exceptions;
using DotNetNuke.Security;
using DotNetNuke.Common;
using DotNetNuke.Common.Utilities;
using System.Linq;

namespace DotNetNuke.Modules.Repository
{
Expand Down Expand Up @@ -83,12 +84,14 @@ protected System.Web.UI.WebControls.LinkButton cmdDelete {
}

}
#endregion
#endregion

protected INavigationManager navigationManager;

#region "Private Members"
#region "Private Members"


private int ItemId;
private int ItemId;
#endregion

#region " Web Form Designer Generated Code "
Expand Down Expand Up @@ -134,8 +137,9 @@ private void Page_Load(System.Object sender, System.EventArgs e)
}

} else {
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(), true);
}
Response.Redirect(navigationManager.NavigateURL(), true);

}
} else {
cmdDelete.Visible = false;
}
Expand All @@ -160,9 +164,10 @@ private void cmdUpdate_Click(object sender, EventArgs e)
objRepositoryComments.UpdateRepositoryComment(ItemId, ModuleId, objComment.CreatedByUser, objComment.Comment);

// Redirect back to the portal home page
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(), true);
Response.Redirect(navigationManager.NavigateURL(), true);

}

}
//Module failed to load
} catch (Exception exc) {
Exceptions.ProcessModuleLoadException(this, exc);
Expand All @@ -178,30 +183,32 @@ private void cmdDelete_Click(object sender, EventArgs e)
}

// Redirect back to the portal home page
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(), true);
//Module failed to load
} catch (Exception exc) {
Response.Redirect(navigationManager.NavigateURL(), true);
//Module failed to load
} catch (Exception exc) {
Exceptions.ProcessModuleLoadException(this, exc);
}
}

private void cmdCancel_Click(object sender, EventArgs e)
{
try {
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(), true);
//Module failed to load
} catch (Exception exc) {
Response.Redirect(navigationManager.NavigateURL(), true);
//Module failed to load
} catch (Exception exc) {
Exceptions.ProcessModuleLoadException(this, exc);
}
}
public EditComment()
{
Load += Page_Load;
Init += Page_Init;
}

#endregion
navigationManager = DependencyProvider.GetRequiredService<INavigationManager>();
}

#endregion

}
}

}
12 changes: 9 additions & 3 deletions Form.ascx.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using DotNetNuke.Abstractions;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Entities.Users;
Expand All @@ -8,6 +9,7 @@
using DotNetNuke.Services.Mail;
using DotNetNuke.UI.UserControls;
using DotNetNuke.UI.WebControls;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.VisualBasic;
using System;
using System.Collections;
Expand Down Expand Up @@ -49,6 +51,8 @@ public class Form : Entities.Modules.PortalModuleBase
protected System.Web.UI.WebControls.Panel pnlContent;
#endregion

protected INavigationManager navigationManager;

#region "Private Members"


Expand Down Expand Up @@ -149,7 +153,7 @@ private void Page_Load(System.Object sender, System.EventArgs e)
// we can do if anonymous uploads are allowed
if (Request.Params["HTTP_REFERER"] == null)
{
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL("Access Denied"), true);
Response.Redirect(navigationManager.NavigateURL("Access Denied"), true);
}
}
else
Expand All @@ -159,7 +163,7 @@ private void Page_Load(System.Object sender, System.EventArgs e)
// as configured by the module admin
if (!PortalSecurity.IsInRoles(UploadRoles))
{
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL("Access Denied"), true);
Response.Redirect(navigationManager.NavigateURL("Access Denied"), true);
}

}
Expand Down Expand Up @@ -213,7 +217,7 @@ private void Page_Load(System.Object sender, System.EventArgs e)
// has passed the requirements, if not, kick em out
if (!bCanDelete)
{
Response.Redirect(DotNetNuke.Common.Globals.NavigateURL("Access Denied"), true);
Response.Redirect(navigationManager.NavigateURL("Access Denied"), true);
}

// load and parse the input form from the form.html/form.xml templates for the current skin
Expand Down Expand Up @@ -1507,6 +1511,8 @@ public Form()
{
Load += Page_Load;
Init += Page_Init;

navigationManager = DependencyProvider.GetRequiredService<INavigationManager>();
}

#endregion
Expand Down
Loading

Back | FazBrowse Home | New Git URL