mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 04:18:12 +02:00
Do not have active buy button on invalidated items
This commit is contained in:
parent
ea7bc26ad8
commit
fe9b972c80
1 changed files with 8 additions and 1 deletions
|
@ -316,12 +316,16 @@
|
||||||
if ($this.text() === buyString || $this.text() === getString) {
|
if ($this.text() === buyString || $this.text() === getString) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ($this.text() === 'invalidated') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
$this.data('initialHtml', $this.html());
|
$this.data('initialHtml', $this.html());
|
||||||
|
|
||||||
var cost = $(this).parent().siblings().text();
|
var cost = $(this).parent().siblings().text();
|
||||||
if (parseInt(cost) > 0) {
|
if (parseInt(cost) > 0) {
|
||||||
$this.text(buyString);
|
$this.text(buyString);
|
||||||
} else {
|
}
|
||||||
|
if (parseInt(cost) == 0) {
|
||||||
$this.text(getString);
|
$this.text(getString);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -333,6 +337,9 @@
|
||||||
|
|
||||||
|
|
||||||
$('.grid-item').find('#price-or-edit').find('a').on('click', function () {
|
$('.grid-item').find('#price-or-edit').find('a').on('click', function () {
|
||||||
|
if ($(this).closest('.grid-item').find('.price').text() === 'invalidated') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
buyButtonClicked($(this).closest('.grid-item').attr('data-item-id'),
|
buyButtonClicked($(this).closest('.grid-item').attr('data-item-id'),
|
||||||
$(this).closest('.grid-item').find('.item-title').text(),
|
$(this).closest('.grid-item').find('.item-title').text(),
|
||||||
$(this).closest('.grid-item').find('.creator').find('.value').text(),
|
$(this).closest('.grid-item').find('.creator').find('.value').text(),
|
||||||
|
|
Loading…
Reference in a new issue