');
content.append(newCloud);
newCloud.fadeIn();
content.animate({
scrollTop: newCloud.offset().top
}, 400);
notify(false);
cloudCount++
parent.postMessage(cloudCount, "*")
}
function showResponse(message){
let newCloud = $('
' + decodeURIComponent(message) + '
');
content.append(newCloud);
newCloud.fadeIn();
content.animate({
scrollTop: newCloud.offset().top
}, 400);
notify(true);
}
function showActions(actions){
const actionsArray = decodeURIComponent(actions).split("|");
let token = "";
let buttons = "";
let text = "";
let side = "";
$.each(actionsArray, (index, val)=>{
if(index==0){
token = val;
}else{
buttons += "";
}
});
let newCloud = $('
' + buttons + '
');
content.append(newCloud);
newCloud.fadeIn();
content.animate({
scrollTop: newCloud.offset().top
}, 400);
newCloud.find('button').on('click', ()=>{
$('.iframeGET').attr('src', serverPath + 'control.html?display='+token);
});
}
function showHtml(token){
switch(token){
case "plans_1":
side = "empty";
text = "";
break;
case "pull_1":
side = "left";
text = "Ricordati di non avvicinarti eccessivamente.";
break;
case "monit_1":
side = "left";
text = "TEMA 3 COMPETENZE DI VENDITA - REGOLA#1
"+
"Non rispondere a domande non fatte
"+
"Il cliente chiede di un prodotto. È meglio limitarsi a domandare cosa il cliente voglia sapere del prodotto. "+
"Ad esempio, colore, materiale, taglia."+
"";
break;
}
if(tokenOnce.indexOf(token) < 0){
let newCloud = $('