json dialog parser fixed x5
This commit is contained in:
parent
9b42cafd9b
commit
3136e4bbc8
@ -163,6 +163,11 @@ function chipMove(body) {
|
|||||||
moveChips();
|
moveChips();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function actionButtonClicked(action) {
|
||||||
|
action = atob(action);
|
||||||
|
console.log(action);
|
||||||
|
}
|
||||||
|
|
||||||
function showDialog(body) {
|
function showDialog(body) {
|
||||||
let title = body.dialogTitle;
|
let title = body.dialogTitle;
|
||||||
let descr = body.dialogDescription;
|
let descr = body.dialogDescription;
|
||||||
@ -171,7 +176,7 @@ function showDialog(body) {
|
|||||||
let html_btns = '';
|
let html_btns = '';
|
||||||
for(let i = 0; i < btns.length; i++) {
|
for(let i = 0; i < btns.length; i++) {
|
||||||
let btn = btns[i];
|
let btn = btns[i];
|
||||||
html_btns += '<div id="buybtn" onclick="actionButtonClicked(\''+JSON.stringify(btn.onclickAction)+'\')" class="btn '+btn.buttonColor.toLowerCase()+'">'+btn.buttonText+'</div>';
|
html_btns += '<div id="buybtn" onclick="actionButtonClicked(\''+btoa(JSON.stringify(btn.onclickAction))+'\')" class="btn '+btn.buttonColor.toLowerCase()+'">'+btn.buttonText+'</div>';
|
||||||
}
|
}
|
||||||
$("#twobtns").html(html_btns);
|
$("#twobtns").html(html_btns);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user