Listing table now stays when organizing results.

Changed default results organization order.
This commit is contained in:
Harrison Deng 2021-05-23 15:23:32 -05:00
parent 549d9d7e99
commit d6dbe55e46
4 changed files with 5 additions and 6 deletions

View File

@ -239,7 +239,7 @@
</div>
</div>
<div>
@if (!organizing && listings.Count > 0)
@if (listings.Count > 0)
{
<div class="table-responsive">
<table class="table">

View File

@ -26,7 +26,7 @@ namespace MultiShop.Server.Controllers
ShopOptions options = configuration.GetSection(ShopOptions.Shop).Get<ShopOptions>();
foreach (string file in Directory.EnumerateFiles(options.Directory))
{
if (Path.GetExtension(file).ToLower().Equals(".dll") && !options.Disabled.Contains(Path.GetFileNameWithoutExtension(file))) {
if (Path.GetExtension(file).ToLower().Equals(".dll") && !(options.Disabled != null && options.Disabled.Contains(Path.GetFileNameWithoutExtension(file)))) {
yield return Path.GetFileNameWithoutExtension(file);
}
}
@ -40,7 +40,7 @@ namespace MultiShop.Server.Controllers
string shopPath = Path.Join(options.Directory, shopModuleName);
shopPath += ".dll";
if (!System.IO.File.Exists(shopPath)) return NotFound();
if (options.Disabled.Contains(shopModuleName)) return Forbid();
if (options.Disabled != null && options.Disabled.Contains(shopModuleName)) return Forbid();
return File(new FileStream(shopPath, FileMode.Open), "application/shop-dll");
}
}

View File

@ -2,7 +2,6 @@
"Shops": {
"Directory": "modules",
"Disabled": [
"MultiShop.Shop.BanggoodModule"
]
},
"ConnectionStrings": {

View File

@ -24,9 +24,9 @@ namespace MultiShop.Shared
public enum Category
{
RatingPriceRatio,
Price,
Purchases,
Reviews,
Purchases,
Price,
}
}
}