Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Remove unused scripts

KrzysztofPajak458d6b322ce2
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/AddressAttribute/_CreateOrUpdateValue.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/AddressAttribute/_CreateOrUpdateValue.cshtml
index 316164b4f..25efefe1b 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/AddressAttribute/_CreateOrUpdateValue.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/AddressAttribute/_CreateOrUpdateValue.cshtml
@@ -4,14 +4,6 @@
<input asp-for="Id" type="hidden" />
<input asp-for="AddressAttributeId" type="hidden" />
-@if (ViewBag.RefreshPage == true)
-{
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
-}
<vc:admin-widget widget-zone="address_attribute_value_details_top" additional-data="Model" />
@{ Func<int, HelperResult>
template = @<div class="form-body">
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/CheckoutAttribute/_CreateOrUpdateValue.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/CheckoutAttribute/_CreateOrUpdateValue.cshtml
index 17e7a6ca0..d0012fee6 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/CheckoutAttribute/_CreateOrUpdateValue.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/CheckoutAttribute/_CreateOrUpdateValue.cshtml
@@ -8,14 +8,6 @@
<input asp-for="CheckoutAttributeId" type="hidden" />
<input asp-for="DisplayColorSquaresRgb" type="hidden" />
-@if (ViewBag.RefreshPage == true)
-{
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
-}
<vc:admin-widget widget-zone="checkout_attribute_top" additional-data="Model" />
@{ Func<int, HelperResult>
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/ContactAttribute/_CreateOrUpdateValue.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/ContactAttribute/_CreateOrUpdateValue.cshtml
index 4497bf48e..4f37c86c4 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/ContactAttribute/_CreateOrUpdateValue.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/ContactAttribute/_CreateOrUpdateValue.cshtml
@@ -9,14 +9,6 @@
<input asp-for="ContactAttributeId" type="hidden" />
<input asp-for="DisplayColorSquaresRgb" type="hidden" />
-@if (ViewBag.RefreshPage == true)
-{
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
-}
<vc:admin-widget widget-zone="contact_attribute_top" additional-data="Model" />
@{ Func<int, HelperResult>
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Country/_CreateOrUpdateState.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Country/_CreateOrUpdateState.cshtml
index 77a0c060e..e35eabdc0 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Country/_CreateOrUpdateState.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Country/_CreateOrUpdateState.cshtml
@@ -5,14 +5,6 @@
<input asp-for="Id" type="hidden" />
<input asp-for="CountryId" type="hidden" />
<vc:admin-widget widget-zone="country_state_details_top" additional-data="Model" />
-@if (ViewBag.RefreshPage == true)
-{
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
-}
@{ Func<int, HelperResult>
template = @<div class="form-body">
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/CustomerAttribute/_CreateOrUpdateValue.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/CustomerAttribute/_CreateOrUpdateValue.cshtml
index 111adc032..dc1c64ad2 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/CustomerAttribute/_CreateOrUpdateValue.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/CustomerAttribute/_CreateOrUpdateValue.cshtml
@@ -4,14 +4,6 @@
<input asp-for="Id" type="hidden" />
<input asp-for="CustomerAttributeId" type="hidden" />
<vc:admin-widget widget-zone="customer_attribute_values_details_top" additional-data="Model" />
-@if (ViewBag.RefreshPage == true)
-{
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
-}
@{ Func<int, HelperResult>
template = @<div class="form-body">
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/InteractiveForm/_CreateOrUpdateAttributeValue.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/InteractiveForm/_CreateOrUpdateAttributeValue.cshtml
index d71e4a2e1..73e357a5f 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/InteractiveForm/_CreateOrUpdateAttributeValue.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/InteractiveForm/_CreateOrUpdateAttributeValue.cshtml
@@ -6,15 +6,6 @@
<input asp-for="FormId" type="hidden" />
<input asp-for="AttributeId" type="hidden" />
-@if (ViewBag.RefreshPage == true)
-{
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
-}
-
@{ Func<int, HelperResult>
template = @<div class="form-body">
<div class="form-group">
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/ProductAttributeConditionPopup.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/ProductAttributeConditionPopup.cshtml
index a64a2a925..cd0736df5 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/ProductAttributeConditionPopup.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/ProductAttributeConditionPopup.cshtml
@@ -156,19 +156,7 @@
</div>
</div>
-
- @if (ViewBag.RefreshPage == true)
- {
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
- }
-
-
-
-<script>
+ <script>
var mfp = $.magnificPopup.instance;
$("#ProductAttributeConditionPopup").submit(function (e) {
e.preventDefault();
@@ -210,6 +198,6 @@
$("#@Html.IdFor(model => model.EnableCondition)").click(toggleEnableCondition);
toggleEnableCondition();
-</script>
+ </script>
</form>
\ No newline at end of file
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/SimilarProductAddPopup.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/SimilarProductAddPopup.cshtml
index 46f09ee1d..aa162ae67 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/SimilarProductAddPopup.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/SimilarProductAddPopup.cshtml
@@ -91,14 +91,6 @@
</div>
</div>
</div>
- @if (ViewBag.RefreshPage == true)
- {
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
- }
<script>
var mfp = $.magnificPopup.instance;
$("#SimilarProductAddPopup").submit(function (e) {
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/_CreateOrUpdateTierPrice.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/_CreateOrUpdateTierPrice.cshtml
index ae258734e..b0374f1bc 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/_CreateOrUpdateTierPrice.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Product/_CreateOrUpdateTierPrice.cshtml
@@ -4,68 +4,60 @@
<input asp-for="Id" type="hidden" />
<input asp-for="ProductId" type="hidden" />
-@if (ViewBag.RefreshPage == true)
-{
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
-}
- <div class="form-horizontal">
- <vc:admin-widget widget-zone="product_details_tier_price_top" additional-data="Model" />
- <div class="form-body">
- <div class="form-group">
- <admin-label asp-for="Quantity" class="col-sm-3 control-label" />
- <div class="col-md-9 col-sm-9">
- <admin-input asp-for="Quantity" />
- <span asp-validation-for="Quantity"></span>
- </div>
+<div class="form-horizontal">
+ <vc:admin-widget widget-zone="product_details_tier_price_top" additional-data="Model" />
+ <div class="form-body">
+ <div class="form-group">
+ <admin-label asp-for="Quantity" class="col-sm-3 control-label" />
+ <div class="col-md-9 col-sm-9">
+ <admin-input asp-for="Quantity" />
+ <span asp-validation-for="Quantity"></span>
</div>
- <div class="form-group">
- <admin-label asp-for="Price" class="col-sm-3 control-label" />
- <div class="col-md-9 col-sm-9">
- <admin-input asp-for="Price" />
- <span asp-validation-for="Price"></span>
- </div>
+ </div>
+ <div class="form-group">
+ <admin-label asp-for="Price" class="col-sm-3 control-label" />
+ <div class="col-md-9 col-sm-9">
+ <admin-input asp-for="Price" />
+ <span asp-validation-for="Price"></span>
</div>
- <div class="form-group">
- <admin-label asp-for="CurrencyCode" class="col-sm-3 control-label" />
- <div class="col-md-9 col-sm-9">
- <admin-select asp-for="CurrencyCode" asp-items="Model.AvailableCurrencies" />
- <span asp-validation-for="CurrencyCode"></span>
- </div>
+ </div>
+ <div class="form-group">
+ <admin-label asp-for="CurrencyCode" class="col-sm-3 control-label" />
+ <div class="col-md-9 col-sm-9">
+ <admin-select asp-for="CurrencyCode" asp-items="Model.AvailableCurrencies" />
+ <span asp-validation-for="CurrencyCode"></span>
</div>
- <div class="form-group">
- <admin-label asp-for="StoreId" class="col-sm-3 control-label" />
- <div class="col-md-9 col-sm-9">
- <admin-select asp-for="StoreId" asp-items="Model.AvailableStores" />
- <span asp-validation-for="StoreId"></span>
- </div>
+ </div>
+ <div class="form-group">
+ <admin-label asp-for="StoreId" class="col-sm-3 control-label" />
+ <div class="col-md-9 col-sm-9">
+ <admin-select asp-for="StoreId" asp-items="Model.AvailableStores" />
+ <span asp-validation-for="StoreId"></span>
</div>
- <div class="form-group">
- <admin-label asp-for="CustomerGroupId" class="col-sm-3 control-label" />
- <div class="col-md-9 col-sm-9">
- <admin-select asp-for="CustomerGroupId" asp-items="Model.AvailableCustomerGroups" />
- <span asp-validation-for="CustomerGroupId"></span>
- </div>
+ </div>
+ <div class="form-group">
+ <admin-label asp-for="CustomerGroupId" class="col-sm-3 control-label" />
+ <div class="col-md-9 col-sm-9">
+ <admin-select asp-for="CustomerGroupId" asp-items="Model.AvailableCustomerGroups" />
+ <span asp-validation-for="CustomerGroupId"></span>
</div>
- <div class="form-group">
- <admin-label asp-for="StartDateTime" class="col-sm-3 control-label" />
- <div class="col-md-9 col-sm-9">
- <admin-input asp-for="StartDateTime" />
- <span asp-validation-for="StartDateTime"></span>
- </div>
+ </div>
+ <div class="form-group">
+ <admin-label asp-for="StartDateTime" class="col-sm-3 control-label" />
+ <div class="col-md-9 col-sm-9">
+ <admin-input asp-for="StartDateTime" />
+ <span asp-validation-for="StartDateTime"></span>
</div>
- <div class="form-group">
- <admin-label asp-for="EndDateTime" class="col-sm-3 control-label" />
- <div class="col-md-9 col-sm-9">
- <admin-input asp-for="EndDateTime" />
- <span asp-validation-for="EndDateTime"></span>
- </div>
+ </div>
+ <div class="form-group">
+ <admin-label asp-for="EndDateTime" class="col-sm-3 control-label" />
+ <div class="col-md-9 col-sm-9">
+ <admin-input asp-for="EndDateTime" />
+ <span asp-validation-for="EndDateTime"></span>
</div>
</div>
- <vc:admin-widget widget-zone="product_details_tier_price_bottom" additional-data="Model" />
</div>
+ <vc:admin-widget widget-zone="product_details_tier_price_bottom" additional-data="Model" />
+</div>
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/ProductAttribute/_CreateOrUpdatePredefinedProductAttributeValue.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/ProductAttribute/_CreateOrUpdatePredefinedProductAttributeValue.cshtml
index 158ee5a85..18374fba1 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/ProductAttribute/_CreateOrUpdatePredefinedProductAttributeValue.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/ProductAttribute/_CreateOrUpdatePredefinedProductAttributeValue.cshtml
@@ -5,14 +5,6 @@
<input asp-for="Id" type="hidden" />
<input asp-for="ProductAttributeId" type="hidden" />
-@if (ViewBag.RefreshPage == true)
-{
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
-}
<vc:admin-widget widget-zone="product_attribute_predefined_values_details_top" additional-data="Model" />
@{ Func<int, HelperResult>
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/SpecificationAttribute/_CreateOrUpdateOption.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/SpecificationAttribute/_CreateOrUpdateOption.cshtml
index f7b057fec..8decc1396 100644
--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/SpecificationAttribute/_CreateOrUpdateOption.cshtml
+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/SpecificationAttribute/_CreateOrUpdateOption.cshtml
@@ -11,15 +11,6 @@
}
}
-@if (ViewBag.RefreshPage == true)
-{
- <script>
- try {window.opener.document.forms['@(Context.Request.Query["formId"])'].@(Context.Request.Query["btnId"]).click();}
- catch (e){}
- window.close();
- </script>
-}
-
<script>
$("#@Html.IdFor(model => model.EnableColorSquaresRgb)").click(toggleEnableColorSquaresRgb);