diff --git a/js/rt-html-abs-v2.js b/js/rt-html-abs-v2.js new file mode 100644 index 0000000..1bcd74f --- /dev/null +++ b/js/rt-html-abs-v2.js @@ -0,0 +1,32 @@ +function callActionSMS(element) { + const actionData = { + actionID: parseInt(element.getAttribute('data-action-id')), + defaultMsg: element.getAttribute('data-msg'), + orderNumber: parseInt(element.getAttribute('data-order')), + phone: act_sms, + type: element.getAttribute('data-type') + }; + App.callActionButton(JSON.stringify(actionData)); +} + +function callActionCP(element) { + const actionData = { + actionID: parseInt(element.getAttribute('data-action-id')), + orderNumber: parseInt(element.getAttribute('data-order')), + isVideoCall: element.getAttribute('data-video') === 'true', + isCallOut: element.getAttribute('data-callout') === 'true', + type: act_call_cloudphone, + phone: element.getAttribute('data-phone') + }; + App.callActionButton(JSON.stringify(actionData)); +} + +function callActionCALL(element) { + const actionData = { + actionID: parseInt(element.getAttribute('data-action-id')), + orderNumber: parseInt(element.getAttribute('data-order')), + type: act_call, + phone: element.getAttribute('data-phone') + }; + App.callActionButton(JSON.stringify(actionData)); +} \ No newline at end of file