From 24570ee38cbb15990d7d9b89beaea421b9c50078 Mon Sep 17 00:00:00 2001 From: Trung Le Date: Sun, 8 Dec 2024 18:58:28 -0800 Subject: [PATCH] Create rt-html-abs-v2.js --- js/rt-html-abs-v2.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 js/rt-html-abs-v2.js 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