daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest Jul 18th, 2018 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <aura:if isTrue="{!and(v.phone, v.isShowCall)  }">
  2.         <div class="{!'o-call' + (v.isDetailShow ? '' : ' pull-right')}" >
  3.             <c:SL_OmnigageTerminalComponent
  4.                 isShowCall = "{!v.isShowCall}"
  5.                 phone      = "{!v.phone}" />
  6.         </div>
  7.     </aura:if>
  8.    
  9. var recordId = event.getParam("recId");
  10.     var lstTicker = event.getParam("lstTickers");
  11.     var lstRecorid = event.getParam("lstofRecords");
  12.     var index = event.getParam('index');
  13.     if (lstRecorid != undefined && index != undefined) {
  14.         component.set('v.isShowCall', true);
  15.         component.set('v.phone', records[index]['phone']);
  16.        }
  17.    
  18. <aura:component >
  19. <aura:attribute name="terminalId" type="String"
  20. default="C9U3vWY9YQPDTLYeqGzaP4" />
  21. <aura:attribute name="isShowCall" type="Boolean" Default="false" />
  22. <aura:attribute name="phone" type="String"/>
  23. <aura:attribute name="url" type="String" default="
  24. {!$Resource.OmnigageTerminalResource}" />
  25. <ltng:require scripts="{!$Resource.OmnigageTerminalResource +
  26. '/assets/omnigage-terminal-api.js'}"
  27.  afterScriptsLoaded="{!c.doInit}" />
  28.  
  29.  <div id="lightning-terminal">
  30.  </div>
  31.  </aura:component>
  32.    
  33. ({
  34. doInit: function(component) {
  35.     console.log('phone in Omnigage:::',component.get('v.phone'));
  36.     console.log('isShowCall in Omnigage:::',component.get('v.isShowCall'));
  37.     // let TerminalId = $A.get("$Label.c.OmnigageterminalId");
  38.  
  39.     // Access JavaScript API
  40.     var Omnigage = window.Omnigage;
  41.     let t = Omnigage.terminal;
  42.     // Define Terminal configuration - see documentation for more options
  43.     t.config({
  44.         terminalId: component.get('v.terminalId'),
  45.         // terminalId: TerminalId,
  46.         url: component.get('v.url') + '/index.html',
  47.         isAnchored: true,
  48.         appendTo: 'lightning-terminal',
  49.         height: '400px',
  50.         width: '350px',
  51.         position: 'left'
  52.     });
  53.     var terminal = document.getElementById('lightning-terminal');
  54.     terminal.style.bottom = "0px";
  55.     // Define ready handle to execute code after Terminal is initialized
  56.     t.ready(function() {
  57.         t.show('dialer');
  58.         t.inputs({
  59.             to: component.get('v.phone'),
  60.             voiceTemplate: null
  61.         });
  62.     });
  63.     // Initialize Terminal
  64.     t.init();
  65.     console.log('t values::::',t);
  66.     let t11 = Omnigage.terminal;
  67.     console.log('t11',t11);
  68.  
  69. },
  70.  
  71. // closelog: function(component, event) {
  72. //     Omnigage.terminal.close();
  73. // }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top