Merge pull request #14055 from davidkelly/dk/18147

Do not have active buy button on invalidated items
This commit is contained in:
John Conklin II 2018-10-01 16:50:53 -07:00 committed by GitHub
commit 3bbc01477e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(),