Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:if isTrue="{!and(v.phone, v.isShowCall) }">
- <div class="{!'o-call' + (v.isDetailShow ? '' : ' pull-right')}" >
- <c:SL_OmnigageTerminalComponent
- isShowCall = "{!v.isShowCall}"
- phone = "{!v.phone}" />
- </div>
- </aura:if>
- var recordId = event.getParam("recId");
- var lstTicker = event.getParam("lstTickers");
- var lstRecorid = event.getParam("lstofRecords");
- var index = event.getParam('index');
- if (lstRecorid != undefined && index != undefined) {
- component.set('v.isShowCall', true);
- component.set('v.phone', records[index]['phone']);
- }
- <aura:component >
- <aura:attribute name="terminalId" type="String"
- default="C9U3vWY9YQPDTLYeqGzaP4" />
- <aura:attribute name="isShowCall" type="Boolean" Default="false" />
- <aura:attribute name="phone" type="String"/>
- <aura:attribute name="url" type="String" default="
- {!$Resource.OmnigageTerminalResource}" />
- <ltng:require scripts="{!$Resource.OmnigageTerminalResource +
- '/assets/omnigage-terminal-api.js'}"
- afterScriptsLoaded="{!c.doInit}" />
- <div id="lightning-terminal">
- </div>
- </aura:component>
- ({
- doInit: function(component) {
- console.log('phone in Omnigage:::',component.get('v.phone'));
- console.log('isShowCall in Omnigage:::',component.get('v.isShowCall'));
- // let TerminalId = $A.get("$Label.c.OmnigageterminalId");
- // Access JavaScript API
- var Omnigage = window.Omnigage;
- let t = Omnigage.terminal;
- // Define Terminal configuration - see documentation for more options
- t.config({
- terminalId: component.get('v.terminalId'),
- // terminalId: TerminalId,
- url: component.get('v.url') + '/index.html',
- isAnchored: true,
- appendTo: 'lightning-terminal',
- height: '400px',
- width: '350px',
- position: 'left'
- });
- var terminal = document.getElementById('lightning-terminal');
- terminal.style.bottom = "0px";
- // Define ready handle to execute code after Terminal is initialized
- t.ready(function() {
- t.show('dialer');
- t.inputs({
- to: component.get('v.phone'),
- voiceTemplate: null
- });
- });
- // Initialize Terminal
- t.init();
- console.log('t values::::',t);
- let t11 = Omnigage.terminal;
- console.log('t11',t11);
- },
- // closelog: function(component, event) {
- // Omnigage.terminal.close();
- // }
Add Comment
Please, Sign In to add comment