Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing PR comments #6

Merged
merged 2 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions Libraries/Hotcakes.Commerce.Dnn/Web/HotcakesModuleBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private bool IsScriptResourcesAdded
{
get
{
return Page.Items[IsScriptResourcesAddedKey] != null && (bool) Page.Items[IsScriptResourcesAddedKey];
return Page.Items[IsScriptResourcesAddedKey] != null && (bool)Page.Items[IsScriptResourcesAddedKey];
}
set { Page.Items[IsScriptResourcesAddedKey] = value; }
}
Expand Down Expand Up @@ -151,42 +151,20 @@ protected void RegisterStyleSheet(string path)

protected void RegisterViewScript(string path, int order = 0)
{
if (!string.IsNullOrEmpty(path))
{
ClientResourceManager.RegisterScript(Page, ResolveUrl(HccApp.ViewsVirtualPath + "/Scripts/" + path),
FileOrder.Js.DefaultPriority + 10 + order);
}
else
{
throw new ArgumentNullException(nameof(path));
}
ClientResourceManager.RegisterScript(Page, ResolveUrl(HccApp.ViewsVirtualPath + "/Scripts/" + path),
FileOrder.Js.DefaultPriority + 10 + order);
}

protected void RegisterScript(string path, int order = 0)
{
if (!string.IsNullOrEmpty(path))
{

ClientResourceManager.RegisterScript(Page, ResolveUrl(ScriptsBasePath + path),
FileOrder.Js.DefaultPriority + order);
}
else
{
throw new ArgumentNullException(nameof(path));
}
}

protected void RegisterScriptExternal(string path, int order = 0)
{
if (!string.IsNullOrEmpty(path))
{
ClientResourceManager.RegisterScript(Page, ResolveUrl(path),
FileOrder.Js.DefaultPriority + order);
}
else
{
throw new ArgumentNullException(nameof(path));
}
}

protected void RegisterUnobtrusiveValidateScripts()
Expand Down Expand Up @@ -225,7 +203,7 @@ protected virtual void InitializeScriptManager()
}

var scriptResource = string.Format(" {1} var hcc = hcc || {{}}; hcc.l10n = {0};", json, analyticsScript);
ScriptManager.RegisterClientScriptBlock(this, typeof (HotcakesModuleBase), "ScriptResources",
ScriptManager.RegisterClientScriptBlock(this, typeof(HotcakesModuleBase), "ScriptResources",
scriptResource, true);

IsScriptResourcesAdded = true;
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Hotcakes.Payment/Hotcakes.Payment.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\References\Dnn\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="paypal_base">
<HintPath>..\..\References\Misc\paypal_base.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\References\Dnn\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PayPalCheckoutSdk, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\PayPalCheckoutSdk.1.0.4\lib\netstandard2.0\PayPalCheckoutSdk.dll</HintPath>
</Reference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected override string RenderView()
{
if (!string.IsNullOrEmpty(Request.QueryString["action"]))
{
_action = Request.QueryString["action"];
_action = Request.QueryString["action"].ToLower();
}

if (_action == IndexAction || _action == PaymentErrorAction)
Expand Down