Skip to content
Closed
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
10 changes: 0 additions & 10 deletions src/Libraries/Nop.Services/Html/CodeFormatter/CodeFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ protected CodeFormat()
regPreproc = r.Replace(regPreproc, @"|");

if (regPreproc.Length == 0)
{
regPreproc = "(?!.*)_{37}(?<!.*)"; //use something quite impossible...
}

//build a master regex with capturing groups
var regAll = new StringBuilder();
Expand Down Expand Up @@ -132,9 +130,7 @@ protected override string MatchEval(Match match)
while ((line = reader.ReadLine()) != null)
{
if (sb.Length > 0)
{
sb.Append('\n');
}

sb.Append("<span class=\"rem\">");
sb.Append(line);
Expand All @@ -145,19 +141,13 @@ protected override string MatchEval(Match match)
}

if (match.Groups[2].Success) //string literal
{
return "<span class=\"str\">" + match + "</span>";
}

if (match.Groups[3].Success) //preprocessor keyword
{
return "<span class=\"preproc\">" + match + "</span>";
}

if (match.Groups[4].Success) //keyword
{
return "<span class=\"kwrd\">" + match + "</span>";
}

return string.Empty; //none of the above
}
Expand Down
15 changes: 0 additions & 15 deletions src/Libraries/Nop.Services/Html/CodeFormatter/HtmlFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ protected string AttributeMatchEval(Match match)
protected override string MatchEval(Match match)
{
if (match.Groups[1].Success) //JavaScript code
{
//string s = match.ToString();
return _jsf.FormatSubCode(match.ToString());
}

if (match.Groups[2].Success) //comment
{
Expand All @@ -121,34 +118,22 @@ protected override string MatchEval(Match match)
}

if (match.Groups[3].Success) //asp tag
{
return "<span class=\"asp\">" + match + "</span>";
}

if (match.Groups[4].Success) //asp C# code
{
return _csf.FormatSubCode(match.ToString());
}

if (match.Groups[5].Success) //tag delimiter
{
return "<span class=\"kwrd\">" + match + "</span>";
}

if (match.Groups[6].Success) //html tagname
{
return "<span class=\"html\">" + match + "</span>";
}

if (match.Groups[7].Success) //attributes
{
return _attributeRegex.Replace(match.ToString(), AttributeMatchEval);
}

if (match.Groups[8].Success) //entity
{
return "<span class=\"attr\">" + match + "</span>";
}

return match.ToString();
}
Expand Down
4 changes: 0 additions & 4 deletions src/Libraries/Nop.Services/Html/CodeFormatter/SourceFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,9 @@ protected string FormatCode(string source, bool lineNumbers,
{
i++;
if (alternate && i % 2 == 1)
{
sb.Append("<pre class=\"alt\">");
}
else
{
sb.Append("<pre>");
}

if (lineNumbers)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@
@await Component.InvokeAsync(typeof(StoreScopeConfigurationViewComponent))

@if (Model.IsConfigured)
{
@await Component.InvokeAsync(typeof(SettingModeViewComponent))
}

<script>
$(function () {
if ($('#@Html.IdFor(model => model.SetCredentialsManually)').length > 0) {
if ($('#@Html.IdFor(model => model.SetCredentialsManually)').length > 0)
$('#@Html.IdFor(model => model.SetCredentialsManually)').click(toggleCredentials);
}
if ($('#@Html.IdFor(model => model.UseSandbox)').length > 0) {

if ($('#@Html.IdFor(model => model.UseSandbox)').length > 0)
$('#@Html.IdFor(model => model.UseSandbox)').change(toggleUseSandbox);
}

$('#@Html.IdFor(model => model.UseApplePay)').change(toggleUseApplePay);
toggleCredentials();
toggleUseSandbox();
Expand Down Expand Up @@ -478,6 +476,4 @@
<nop-alert asp-alert-id="signUpFailed" />

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("~/Plugins/Payments.PayPalCommerce/Views/Admin/_Configure.Tour.cshtml")
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,4 @@
</div>

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("~/Plugins/Tax.FixedOrByCountryStateZip/Views/_FixedRate.Tour.cshtml")
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,13 @@ private static Assembly AddApplicationParts(ApplicationPartManager applicationPa
catch (FileLoadException)
{
if (useUnsafeLoadAssembly)
{
//if an application has been copied from the web, it is flagged by Windows as being a web application,
//even if it resides on the local computer.You can change that designation by changing the file properties,
//or you can use the<loadFromRemoteSources> element to grant the assembly full trust.As an alternative,
//you can use the UnsafeLoadFrom method to load a local assembly that the operating system has flagged as
//having been loaded from the web.
//see http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
assembly = Assembly.UnsafeLoadFrom(assemblyFile);
}
else
throw;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,4 @@
<nop-delete-confirmation asp-model-id="@Model.Id" asp-button-id="emailAccount-delete" />

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("_Edit.Tour")
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,4 @@
</script>

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("_List.Tour")
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@
</div>
<script>
function renderColumnConfigure(data, type, row, meta) {
if (row.ConfigurationUrl && row.ConfigurationUrl.length > 0) {
if (row.ConfigurationUrl && row.ConfigurationUrl.length > 0)
return '<a class="btn btn-default" href="' + row.ConfigurationUrl + '"><i class="fas fa-gear"></i>@T("Admin.Configuration.Payment.Methods.Configure").Text</a>';
} else {
else
return '';
}

}
</script>
</div>
Expand All @@ -134,6 +134,4 @@
</section>

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("_Methods.Tour")
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,8 @@
@await Html.PartialAsync("_CreateOrUpdate", Model)
</form>
@if (!Model.IsLoggedInAsVendor)
{
//product editor settings modal
@await Html.PartialAsync("_ProductEditorSettingsModal", Model)
}

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("_Create.Tour")
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@
<div class="checkbox form-check">
<label class="form-check-label">
<span>
<input type="radio" name="@Html.NameFor(x => x.StoreInformationSettings.DefaultStoreTheme)" value="@theme.SystemName" @if (theme.SystemName.Equals(Model.StoreInformationSettings.DefaultStoreTheme, StringComparison.InvariantCultureIgnoreCase)) { <text> checked="checked" </text> }/>
@theme.FriendlyName
</span>
<input type="radio" name="@Html.NameFor(x => x.StoreInformationSettings.DefaultStoreTheme)" value="@theme.SystemName" @if (theme.SystemName.Equals(Model.StoreInformationSettings.DefaultStoreTheme, StringComparison.InvariantCultureIgnoreCase))
{
<text> checked="checked" </text>
}/>
@theme.FriendlyName
</span>
<img src="@Url.Content(theme.PreviewImageUrl)" alt="@theme.PreviewText" title="@theme.PreviewText">
</label>
</div>
Expand Down Expand Up @@ -107,6 +110,4 @@
</div>

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("_GeneralCommon.Common.Tour")
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,4 @@
</section>

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("_Providers.Tour")
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,10 @@
}

function renderColumnConfigure(data, type, row, meta) {
if (row.ConfigurationUrl && row.ConfigurationUrl.length > 0) {
if (row.ConfigurationUrl && row.ConfigurationUrl.length > 0)
return '<a class="btn btn-default" href="' + row.ConfigurationUrl + '"><i class="fas fa-gear"></i>@T("Admin.Configuration.Tax.Providers.Configure").Text</a>';
} else {
else
return '';
}
}
</script>
</div>
Expand All @@ -95,6 +94,4 @@
</form>

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("_Providers.Tour")
}
2 changes: 0 additions & 2 deletions src/Presentation/Nop.Web/Areas/Admin/Views/Topic/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,4 @@
<nop-delete-confirmation asp-model-id="@Model.Id" asp-button-id="topic-delete" />

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("_Edit.Tour")
}
2 changes: 0 additions & 2 deletions src/Presentation/Nop.Web/Areas/Admin/Views/Topic/List.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,4 @@
</script>

@if (await Html.IsTourActiveAsync())
{
@await Html.PartialAsync("_List.Tour")
}
Loading