site.js is already included in _Layout
This commit is contained in:
parent
93c7687b06
commit
6a154f2f90
|
@ -43,8 +43,3 @@
|
|||
<h2>Carousel is empty</h2>
|
||||
}
|
||||
}
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script src="~/js/ultimate_script.js"></script>
|
||||
}
|
||||
|
|
|
@ -44,8 +44,3 @@
|
|||
<h2>No products to show</h2>
|
||||
}
|
||||
}
|
||||
|
||||
@section Scripts
|
||||
{
|
||||
<script src="~/js/ultimate_script.js"></script>
|
||||
}
|
||||
|
|
|
@ -36,11 +36,3 @@
|
|||
</div><!-- /.col-lg-9 -->
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
<environment include="Development">
|
||||
<script src="~/js/Product.js"></script>
|
||||
</environment>
|
||||
<environment exclude="Development">
|
||||
<script src="~/js/Product.min.js"></script>
|
||||
</environment>
|
||||
}
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
function Buy(Product_id, urlAction, outElementId, locale) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: urlAction,
|
||||
data: { Product_id: Product_id },
|
||||
dataType: "text",
|
||||
success: function (price_total) {
|
||||
ChangeTotalPriceInformation(outElementId, locale, price_total);
|
||||
},
|
||||
error: function (req, status, error) {
|
||||
$(outElementId).text('error during buying expensive stuff');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ChangeTotalPriceInformation(outElementId, locale, price_total) {
|
||||
$(outElementId).text(parseFloat(price_total).toLocaleString(locale,
|
||||
{
|
||||
style: "currency",
|
||||
currency: "EUR",
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2
|
||||
}));
|
||||
}
|
|
@ -1,4 +1,28 @@
|
|||
// Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
|
||||
// for details on configuring this project to bundle and minify static web assets.
|
||||
function Buy(Product_id, urlAction, outElementId, locale) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: urlAction,
|
||||
data: { Product_id: Product_id },
|
||||
dataType: "text",
|
||||
success: function (price_total) {
|
||||
ChangeTotalPriceInformation(outElementId, locale, price_total);
|
||||
},
|
||||
error: function (req, status, error) {
|
||||
$(outElementId).text('error during buying expensive stuff');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Write your JavaScript code.
|
||||
function ChangeTotalPriceInformation(outElementId, locale, price_total) {
|
||||
$(outElementId).text(parseFloat(price_total).toLocaleString(locale,
|
||||
{
|
||||
style: "currency",
|
||||
currency: "EUR",
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2
|
||||
}));
|
||||
}
|
||||
|
||||
function item_deletion_confirmation() {
|
||||
return confirm("Delete the item?");
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
function item_deletion_confirmation() {
|
||||
return confirm("Delete the item?");
|
||||
}
|
Reference in New Issue