Basic localizations added, livescreen fix
This commit is contained in:
parent
b790d6e4ff
commit
cc07f53cfe
|
|
@ -1,6 +1,6 @@
|
||||||
@model ProductAssignToAuctionViewModel
|
@model ProductAssignToAuctionViewModel
|
||||||
<div class="auction-settings-box">
|
<div class="auction-settings-box">
|
||||||
<h3>@T("Plugins.Misc.AuctionPlugin.AssignToAuction")</h3>
|
<h3>@T("Plugins.Misc.AuctionPlugin.Admin.AssignToAuction")</h3>
|
||||||
|
|
||||||
<div id="assignAuctionContainer">
|
<div id="assignAuctionContainer">
|
||||||
<h3>Assign Product to Auction</h3>
|
<h3>Assign Product to Auction</h3>
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<input type="hidden" id="startingPrice" value="@Model.StartingPrice" />
|
<input type="hidden" id="startingPrice" value="@Model.StartingPrice" />
|
||||||
<input type="hidden" id="bidPrice" value="@Model.StartingPrice" />
|
<input type="hidden" id="bidPrice" value="@Model.StartingPrice" />
|
||||||
|
|
||||||
<label for="auctionDropdown">@T("Plugins.Misc.AuctionPlugin.SelectAuction")</label>
|
<label for="auctionDropdown">@T("Plugins.Misc.AuctionPlugin.Admin.SelectAuction")</label>
|
||||||
<select id="auctionDropdown" class="form-control">
|
<select id="auctionDropdown" class="form-control">
|
||||||
<option value="">Select an auction...</option>
|
<option value="">Select an auction...</option>
|
||||||
@foreach (var auction in ViewBag.Auctions as List<Nop.Plugin.Misc.AuctionPlugin.Domains.Entities.Auction>)
|
@foreach (var auction in ViewBag.Auctions as List<Nop.Plugin.Misc.AuctionPlugin.Domains.Entities.Auction>)
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
}
|
}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<button id="assignAuctionButton" class="btn btn-primary mt-2">@T("Plugins.Misc.AuctionPlugin.AssignToAuctionButton")</button>
|
<button id="assignAuctionButton" class="btn btn-primary mt-2">@T("Plugins.Misc.AuctionPlugin.Admin.AssignToAuctionButton")</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,9 @@
|
||||||
|
|
||||||
var audio = new Audio('../Plugins/Misc.AuctionPlugin/Content/ding.mp3');
|
var audio = new Audio('../Plugins/Misc.AuctionPlugin/Content/ding.mp3');
|
||||||
audio.play();
|
audio.play();
|
||||||
//console.log(data);
|
console.log(data);
|
||||||
var myObject = JSON.parse(data);
|
var myObject = JSON.parse(data);
|
||||||
//console.log(myObject);
|
console.log(myObject);
|
||||||
|
|
||||||
var auctionDto = myObject.auctionDto;
|
var auctionDto = myObject.auctionDto;
|
||||||
var productToAuctionDto = auctionDto.productToAuctionDtos[0];
|
var productToAuctionDto = auctionDto.productToAuctionDtos[0];
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,16 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-8 col-12">
|
<div class="col-md-8 col-12">
|
||||||
<h1 class="card-title">@Model.ActiveProductDetails.Name</h1>
|
<h1 class="card-title">@Model.ActiveProductDetails.Name</h1>
|
||||||
<h2 class="text-muted mb-3">Created by: <span class="font-weight-bold">@Model.ActiveProductDetails.ProductManufacturers.FirstOrDefault().Name</span></h2>
|
@if(Model.ActiveProductDetails.ProductManufacturers != null)
|
||||||
|
{
|
||||||
|
if(Model.ActiveProductDetails.ProductManufacturers.FirstOrDefault() != null)
|
||||||
|
{
|
||||||
|
if(!string.IsNullOrEmpty(Model.ActiveProductDetails.ProductManufacturers.FirstOrDefault().Name))
|
||||||
|
{
|
||||||
|
<h2 class="text-muted mb-3">Created by: <span class="font-weight-bold">@Model.ActiveProductDetails.ProductManufacturers.FirstOrDefault().Name</span></h2>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 col-12">
|
<div class="col-md-4 col-12">
|
||||||
<h3 class="text-end"> Item no.: @Model.CurrentProductToAuction.SortIndex </h3>
|
<h3 class="text-end"> Item no.: @Model.CurrentProductToAuction.SortIndex </h3>
|
||||||
|
|
|
||||||
|
|
@ -60,18 +60,18 @@
|
||||||
console.log("isActive: " + isActive);
|
console.log("isActive: " + isActive);
|
||||||
productItem.prepend('<div id="' +
|
productItem.prepend('<div id="' +
|
||||||
publicInfoOverlayId +
|
publicInfoOverlayId +
|
||||||
'" class="bg-success p-1 text-white text-center" style="position: absolute; width: calc(100% - 1rem); height: 50px; z-index: 1;"><p class="m-0"><i class="fa-solid fa-gavel"> ' +
|
'" class="bg-success p-1 text-white text-center" style="position: absolute; width: calc(100% - 1rem); height: 50px; z-index: 1;"><p class="m-0"><i class="fa-solid fa-gavel"></i> ' +
|
||||||
'LIVE RIGTH NOW' +
|
'@T("Plugins.Misc.AuctionPlugin.LiveNow")' +
|
||||||
'</i></p><span>' +
|
'</p><span>' +
|
||||||
"No.: " + productToAuctionDto.sortIndex +
|
"No.: " + productToAuctionDto.sortIndex +
|
||||||
'</span></div>');
|
'</span></div>');
|
||||||
} else {
|
} else {
|
||||||
console.log("isActive: " + isActive);
|
console.log("isActive: " + isActive);
|
||||||
productItem.prepend('<div id="' +
|
productItem.prepend('<div id="' +
|
||||||
publicInfoOverlayId +
|
publicInfoOverlayId +
|
||||||
'" class="bg-primary p-1 text-white text-center" style="position: absolute; width: calc(100% - 1rem); height: 50px; z-index: 1;"><p class="m-0"><i class="fa-solid fa-gavel"> ' +
|
'" class="bg-primary p-1 text-white text-center" style="position: absolute; width: calc(100% - 1rem); height: 50px; z-index: 1;"><p class="m-0"><i class="fa-solid fa-gavel"></i> ' +
|
||||||
resultDate.toLocaleString() +
|
resultDate.toLocaleString() +
|
||||||
'</i></p><span>' +
|
'</p><span>' +
|
||||||
"No.: " + productToAuctionDto.sortIndex +
|
"No.: " + productToAuctionDto.sortIndex +
|
||||||
'</span></div>');
|
'</span></div>');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@
|
||||||
|
|
||||||
var title = auctionStatus switch
|
var title = auctionStatus switch
|
||||||
{
|
{
|
||||||
AuctionStatus.Sold => lastBidIsMine ? "You're the winner!" : "Sold",
|
AuctionStatus.Sold => lastBidIsMine ? @T("Plugins.Misc.AuctionPlugin.YouWin") : @T("Plugins.Misc.AuctionPlugin.Sold"),
|
||||||
AuctionStatus.NotSold => "Finished",
|
AuctionStatus.NotSold => @T("Plugins.Misc.AuctionPlugin.Finished"),
|
||||||
_ => lastBidIsMine ? "Your bid is leading" : "Place a bid!"
|
_ => lastBidIsMine ? @T("Plugins.Misc.AuctionPlugin.YourBidLeading") : @T("Plugins.Misc.AuctionPlugin.PlaceABid")
|
||||||
};
|
};
|
||||||
|
|
||||||
<div class="d-flex justify-content-between" id="otherAuctionItems">
|
<div class="d-flex justify-content-between" id="otherAuctionItems">
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">@(string.IsNullOrEmpty(Model.LastProductUrl) ? "Start of list" : "Back to last")</h5>
|
<h5 class="card-title">@(string.IsNullOrEmpty(Model.LastProductUrl) ? @T("Plugins.Misc.AuctionPlugin.StartOfList") : @T("Plugins.Misc.AuctionPlugin.BackToLast"))</h5>
|
||||||
<p class="card-text">@(string.IsNullOrEmpty(Model.LastProductName) ? "---" : Model.LastProductName)</p>
|
<p class="card-text">@(string.IsNullOrEmpty(Model.LastProductName) ? "---" : Model.LastProductName)</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">@(string.IsNullOrEmpty(Model.NextProductUrl) ? "End of list" : "Coming up next...")</h5>
|
<h5 class="card-title">@(string.IsNullOrEmpty(Model.NextProductUrl) ? @T("Plugins.Misc.AuctionPlugin.EndOfList") : @T("Plugins.Misc.AuctionPlugin.ComingUp"))</h5>
|
||||||
<p class="card-text">@(string.IsNullOrEmpty(Model.NextProductName) ? "---" : Model.NextProductName)</p>
|
<p class="card-text">@(string.IsNullOrEmpty(Model.NextProductName) ? "---" : Model.NextProductName)</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -58,6 +58,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="publicProductBidBox" class="p-3 @bgClass text-white">
|
<div id="publicProductBidBox" class="p-3 @bgClass text-white">
|
||||||
|
<h3>Item no.: @Model.AuctionDto.ProductToAuctionDtos.FirstOrDefault().SortIndex</h3>
|
||||||
<h4 id="bidBoxTitle">@title</h4>
|
<h4 id="bidBoxTitle">@title</h4>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -73,7 +74,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button id="signalRBidButton" class="btn btn-success" style="text-transform: uppercase;" type="button" @(!bidButtonActive ? "disabled" : string.Empty)>
|
<button id="signalRBidButton" class="btn btn-success" style="text-transform: uppercase;" type="button" @(!bidButtonActive ? "disabled" : string.Empty)>
|
||||||
Bid @($"{Model.NextBidPrice:c}")
|
@T("Plugins.Misc.AuctionPlugin.BidButtonPrefix") @($"{Model.NextBidPrice:c}")
|
||||||
</button>
|
</button>
|
||||||
@* <button id="bidButton" class="btn btn-success">
|
@* <button id="bidButton" class="btn btn-success">
|
||||||
|
|
||||||
|
|
@ -130,7 +131,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<p>No access to admin level buttons</p>
|
// <p>No access to admin level buttons</p>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -140,7 +141,7 @@
|
||||||
<h4>This item is under auction!</h4>
|
<h4>This item is under auction!</h4>
|
||||||
<div id="bidBoxGuestMessage" class="d-flex justify-content-between mb-3">
|
<div id="bidBoxGuestMessage" class="d-flex justify-content-between mb-3">
|
||||||
|
|
||||||
<p>Please log in or register to participate!</p>
|
<p>@T("Plugins.Misc.AuctionPlugin.PleaseLogInOrRegister")</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
@ -343,7 +344,7 @@
|
||||||
list = bidBox.classList;
|
list = bidBox.classList;
|
||||||
list.add("bg-success");
|
list.add("bg-success");
|
||||||
list.remove("bg-primary");
|
list.remove("bg-primary");
|
||||||
bidButtonElement.textContent = "Good job";
|
bidButtonElement.textContent = "@(T("Plugins.Misc.AuctionPlugin.GoodJob"))";
|
||||||
bidBoxTitle.textContent = productToAuction.auctionStatus == AuctionStatus.Sold ? "You're the winner!" : "Your bid is leading!";
|
bidBoxTitle.textContent = productToAuction.auctionStatus == AuctionStatus.Sold ? "You're the winner!" : "Your bid is leading!";
|
||||||
if (bidBoxPageViewModel.IsAdmin) {
|
if (bidBoxPageViewModel.IsAdmin) {
|
||||||
console.log("I AM WEASEL!!! " + bidBoxPageViewModel.IsAdmin);
|
console.log("I AM WEASEL!!! " + bidBoxPageViewModel.IsAdmin);
|
||||||
|
|
@ -359,7 +360,7 @@
|
||||||
list.add("bg-primary");
|
list.add("bg-primary");
|
||||||
list.remove("bg-success");
|
list.remove("bg-success");
|
||||||
bidBoxTitle.textContent = productToAuction.auctionStatus == AuctionStatus.Sold ? "Sold" : "Place a bid!";
|
bidBoxTitle.textContent = productToAuction.auctionStatus == AuctionStatus.Sold ? "Sold" : "Place a bid!";
|
||||||
bidButtonElement.textContent = "Bid " + HUFFormatter.format(bidBoxPageViewModel.NextBidPrice);
|
bidButtonElement.textContent = "@(T("Plugins.Misc.AuctionPlugin.BidButtonPrefix")) " + HUFFormatter.format(bidBoxPageViewModel.NextBidPrice);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue