mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 21:02:17 +02:00
Merge pull request #14055 from davidkelly/dk/18147
Do not have active buy button on invalidated items
This commit is contained in:
commit
3bbc01477e
1 changed files with 8 additions and 1 deletions
|
@ -316,12 +316,16 @@
|
|||
if ($this.text() === buyString || $this.text() === getString) {
|
||||
return;
|
||||
}
|
||||
if ($this.text() === 'invalidated') {
|
||||
return;
|
||||
}
|
||||
$this.data('initialHtml', $this.html());
|
||||
|
||||
var cost = $(this).parent().siblings().text();
|
||||
if (parseInt(cost) > 0) {
|
||||
$this.text(buyString);
|
||||
} else {
|
||||
}
|
||||
if (parseInt(cost) == 0) {
|
||||
$this.text(getString);
|
||||
}
|
||||
});
|
||||
|
@ -333,6 +337,9 @@
|
|||
|
||||
|
||||
$('.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'),
|
||||
$(this).closest('.grid-item').find('.item-title').text(),
|
||||
$(this).closest('.grid-item').find('.creator').find('.value').text(),
|
||||
|
|
Loading…
Reference in a new issue