Decks
Cards
Store
IN USA!
Forum
Help
Welcome to MTG Vault!
Register
Login
Discussion Forum
Forum Home
MTG Vault Bugs & Suggestions
[Fixed] Sideboard card quantity
When I change the number of cards on my sideboard the total number of cards on sideboard is updated on the main decks header instead of sideboards header.
This seems to be a javascript bug which I tracked to /js/vault.edit-deck.js
in function UpdateCardQuantity. Here's a snippet of the faulty part.
Note the last instruction. The update is always made to #count, never to #sideboard-count
else {
//location.reload();
$('#' + deckGroupChar + response.d.id).text(response.d.quantity);
//take away the current quantity
var cardCount
if (deckGroupId == 0) {
cardCount = parseInt($('#count').text(), 10) - originalVal;
}
else {
cardCount = parseInt($('#sideboard-count').text(), 10) - originalVal;
}
//add on the new quant
$('#count').text(cardCount + response.d.quantity);
}
Here's my suggested fix.
else {
//location.reload();
$('#' + deckGroupChar + response.d.id).text(response.d.quantity);
//take away the current quantity
var cardCount
if (deckGroupId == 0) {
cardCount = parseInt($('#count').text(), 10) - originalVal;
$('#count').text(cardCount + response.d.quantity);
}
else {
cardCount = parseInt($('#sideboard-count').text(), 10) - originalVal;
$('#sideboard-count').text(cardCount + response.d.quantity);
}
}
Dankirk
128 posts
Posted 09 January 2013 at 12:32
Permalink
1 reply
Login to post a comment
Ian
140 posts
Brilliant thanks. Fixed :)
0
Posted 09 January 2013 at 21:20
Permalink
Username:
Password:
Remember Me
Forgot your password
?
Don't have an account yet?
Register now
!
No notifications!