mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:29:01 +02:00
Merge pull request #14557 from zfox23/MS20215_soldOutFix
Fix MS20215: Fix incorrect display of unavailable items on Marketplace main page
This commit is contained in:
commit
1aa93c1d86
1 changed files with 30 additions and 10 deletions
|
@ -251,19 +251,39 @@
|
||||||
$(this).closest('.col-xs-3').attr("class", 'col-xs-6');
|
$(this).closest('.col-xs-3').attr("class", 'col-xs-6');
|
||||||
|
|
||||||
var priceElement = $(this).find('.price');
|
var priceElement = $(this).find('.price');
|
||||||
priceElement.css({
|
var available = true;
|
||||||
"padding": "3px 5px",
|
|
||||||
"height": "40px",
|
if (priceElement.text() === 'invalidated' ||
|
||||||
"background": "linear-gradient(#00b4ef, #0093C5)",
|
priceElement.text() === 'sold out' ||
|
||||||
"color": "#FFF",
|
priceElement.text() === 'not for sale') {
|
||||||
"font-weight": "600",
|
available = false;
|
||||||
"line-height": "34px"
|
priceElement.css({
|
||||||
});
|
"padding": "3px 5px 10px 5px",
|
||||||
|
"height": "40px",
|
||||||
|
"background": "linear-gradient(#a2a2a2, #fefefe)",
|
||||||
|
"color": "#000",
|
||||||
|
"font-weight": "600",
|
||||||
|
"line-height": "34px"
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
priceElement.css({
|
||||||
|
"padding": "3px 5px",
|
||||||
|
"height": "40px",
|
||||||
|
"background": "linear-gradient(#00b4ef, #0093C5)",
|
||||||
|
"color": "#FFF",
|
||||||
|
"font-weight": "600",
|
||||||
|
"line-height": "34px"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (parseInt(cost) > 0) {
|
if (parseInt(cost) > 0) {
|
||||||
priceElement.css({ "width": "auto" });
|
priceElement.css({ "width": "auto" });
|
||||||
priceElement.html('<span class="hifi-glyph hifi-glyph-hfc" style="filter:invert(1);background-size:20px;' +
|
|
||||||
'width:20px;height:20px;position:relative;top:5px;"></span> ' + cost);
|
if (available) {
|
||||||
|
priceElement.html('<span class="hifi-glyph hifi-glyph-hfc" style="filter:invert(1);background-size:20px;' +
|
||||||
|
'width:20px;height:20px;position:relative;top:5px;"></span> ' + cost);
|
||||||
|
}
|
||||||
|
|
||||||
priceElement.css({ "min-width": priceElement.width() + 30 });
|
priceElement.css({ "min-width": priceElement.width() + 30 });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue