Add plus minus ram handler for 512MB option
This commit is contained in:
parent
e1ce017ec8
commit
db20e3cbe7
1 changed files with 10 additions and 2 deletions
|
@ -148,14 +148,22 @@
|
||||||
var data = $(this).data('minus');
|
var data = $(this).data('minus');
|
||||||
|
|
||||||
if (cardPricing[data].value > cardPricing[data].min) {
|
if (cardPricing[data].value > cardPricing[data].min) {
|
||||||
cardPricing[data].value = Number(cardPricing[data].value) - cardPricing[data].interval;
|
if(data === 'ram' && cardPricing[data].value === 1){
|
||||||
|
cardPricing[data].value = 0.5;
|
||||||
|
} else {
|
||||||
|
cardPricing[data].value = Number(cardPricing[data].value) - cardPricing[data].interval;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_fetchPricing();
|
_fetchPricing();
|
||||||
});
|
});
|
||||||
$('.fa-plus-circle.right').click(function(event) {
|
$('.fa-plus-circle.right').click(function(event) {
|
||||||
var data = $(this).data('plus');
|
var data = $(this).data('plus');
|
||||||
if (cardPricing[data].value < cardPricing[data].max) {
|
if (cardPricing[data].value < cardPricing[data].max) {
|
||||||
cardPricing[data].value = Number(cardPricing[data].value) + cardPricing[data].interval;
|
if(data === 'ram' && cardPricing[data].value === 0.5){
|
||||||
|
cardPricing[data].value = 1;
|
||||||
|
} else {
|
||||||
|
cardPricing[data].value = Number(cardPricing[data].value) + cardPricing[data].interval;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_fetchPricing();
|
_fetchPricing();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue