From: Daniele Cinti Date: Mon, 17 Jul 2017 13:33:21 +0000 (+0200) Subject: Built xcally-motion-dialpad from commit 805e9fa.|1.0.10 X-Git-Tag: 1.0.10 X-Git-Url: http://repos.xcallymotion.com/%27%20e.replace%28///pen//%2C?a=commitdiff_plain;h=dfad2512dd0ca3d227d3494e36bab3658bdc4364;p=dialpad.git Built xcally-motion-dialpad from commit 805e9fa.|1.0.10 --- diff --git a/app.9c215114.js b/app.9c215114.js deleted file mode 100644 index 5ff4df9..0000000 --- a/app.9c215114.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function IndexController(e,n,o){function t(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function a(e,o){n.parent.postMessage({uniqueid:o,options:{url:e}},"*")}var l,s=this;s.phone="",s.inCall=!1,s.callbacks={},s.compose=function(e){s.phone=s.phone.concat(e)},s.remove=function(){s.phone=s.phone.substring(0,s.phone.length-1)},s.hangup=function(){var e=Date.now();s.callbacks[e]=function(){s.inCall=!1},a("http://localhost:9888/api/hangup",e)},s.dial=function(){var e=Date.now();s.callbacks[e]=function(){s.inCall=!0},a("http://localhost:9888/api/originate/"+s.phone,e)},s.keepalive=function(){var e=Date.now();s.callbacks[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);s.id=n.id,s.displayName=n.displayName,s.internal=n.internal,s.online=!0,l||s.host&&s.id&&(l=io(s.host,{query:{id:s.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",t),l&&l.disconnected&&l.connect()}else s.online=!1},a("http://localhost:9888/api/agent",e)},s.checkStatus=function(){var e=Date.now();s.callbacks[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);s.inCall=!!n.length}else s.inCall=!1},a("http://localhost:9888/api/calls",e)},sforce.opencti.getCallCenterSettings({callback:function(e){s.host=e.returnValue["/Motion/Host"]}}),sforce.opencti.enableClickToDial({callback:function(e){console.log("enableClickToDial")}}),sforce.opencti.onClickToDial({listener:function(e){console.log("number",e)}}),o(s.keepalive,2e3),o(s.checkStatus,2e3),n.addEventListener("message",function(n){var o=n.data;s.callbacks[o.uniqueid]&&(s.callbacks[o.uniqueid](o),delete s.callbacks[o.uniqueid],e.$apply())},!1)}IndexController.$inject=["$scope","$window","$interval"];var motion=angular.module("motion",["ngMaterial"]);motion.controller("IndexController",IndexController); \ No newline at end of file diff --git a/app.c15e40ec.js b/app.c15e40ec.js new file mode 100644 index 0000000..84e1664 --- /dev/null +++ b/app.c15e40ec.js @@ -0,0 +1 @@ +"use strict";function IndexController(e,n,o){function t(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function a(e,o){n.parent.postMessage({uniqueid:o,options:{url:e}},"*")}var l,i=this;i.phone="",i.inCall=!1,i.callbacks={},i.compose=function(e){i.phone=i.phone.concat(e)},i.remove=function(){i.phone=i.phone.substring(0,i.phone.length-1)},i.hangup=function(){var e=Date.now();i.callbacks[e]=function(){i.inCall=!1},a("http://localhost:9888/api/hangup",e)},i.dial=function(){var e=Date.now();i.callbacks[e]=function(){i.inCall=!0},a("http://localhost:9888/api/originate/"+i.phone,e)},i.keepalive=function(){var e=Date.now();i.callbacks[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);i.id=n.id,i.displayName=n.displayName,i.internal=n.internal,i.online=!0,l||i.host&&i.id&&(l=io(i.host,{query:{id:i.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",t),l&&l.disconnected&&l.connect()}else i.online=!1},a("http://localhost:9888/api/agent",e)},i.checkStatus=function(){var e=Date.now();i.callbacks[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);i.inCall=!!n.length}else i.inCall=!1},a("http://localhost:9888/api/calls",e)},sforce.opencti.getCallCenterSettings({callback:function(e){i.host=e.returnValue["/Motion/Host"]}}),sforce.opencti.enableClickToDial({callback:function(e){console.log("enableClickToDial")}}),sforce.opencti.onClickToDial({listener:function(e){e.number&&(i.phone=e.number,i.dial())}}),o(i.keepalive,2e3),o(i.checkStatus,2e3),n.addEventListener("message",function(n){var o=n.data;i.callbacks[o.uniqueid]&&(i.callbacks[o.uniqueid](o),delete i.callbacks[o.uniqueid],e.$apply())},!1)}IndexController.$inject=["$scope","$window","$interval"];var motion=angular.module("motion",["ngMaterial"]);motion.controller("IndexController",IndexController); \ No newline at end of file diff --git a/index.html b/index.html index 9ac90c1..8c57400 100644 --- a/index.html +++ b/index.html @@ -52,7 +52,7 @@ - +