mirror of
https://github.com/brmlab/brmbar.git
synced 2025-06-09 13:54:00 +02:00
uncommitted changes from other people... again
This commit is contained in:
parent
6749b2c97a
commit
e04d614e15
5 changed files with 32 additions and 5 deletions
|
@ -100,8 +100,17 @@ Item {
|
|||
}
|
||||
|
||||
function chargeCredit() {
|
||||
var balance = shop.chargeCredit(amount, userdbid)
|
||||
status_text.setStatus("Charged! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
var balance=0
|
||||
if (!isNaN(amount)) {
|
||||
if(amount>=0) {
|
||||
balance = shop.chargeCredit(amount, userdbid)
|
||||
status_text.setStatus("Charged "+amount+"! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
} else {
|
||||
balance = shop.withdrawCredit((amount*(-1)), userdbid)
|
||||
status_text.setStatus("Withdrawn "+amount+"! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
}
|
||||
}
|
||||
loadPage("MainPage")
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,8 +100,17 @@ Item {
|
|||
}
|
||||
|
||||
function withdrawCredit() {
|
||||
var balance = shop.withdrawCredit(amount, userdbid)
|
||||
status_text.setStatus("Withdrawn! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
var balance=0
|
||||
if (!isNaN(amount)) {
|
||||
amount=(amount*1)
|
||||
if(amount>=0) {
|
||||
balance = shop.withdrawCredit(amount, userdbid)
|
||||
status_text.setStatus("Withdrawn "+amount+"! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
} else {
|
||||
balance = shop.chargeCredit((amount*(-1)),userdbid)
|
||||
status_text.setStatus("Charged "+amount+"! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
}
|
||||
}
|
||||
loadPage("MainPage")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue