From: Daniele Cinti Date: Mon, 17 Jul 2017 13:24:19 +0000 (+0200) Subject: Built xcally-motion-dialpad from commit 805e9fa.|1.0.8 X-Git-Tag: 1.0.8 X-Git-Url: http://repos.xcallymotion.com/base/%22angular-material.themes.css//%22my-avatar.png/%22?a=commitdiff_plain;h=26dafef6869371e7494ec7e76713c4bf5ecc7f32;p=dialpad.git Built xcally-motion-dialpad from commit 805e9fa.|1.0.8 --- diff --git a/app.7ac39636.js b/app.7ac39636.js new file mode 100644 index 0000000..6ebaeed --- /dev/null +++ b/app.7ac39636.js @@ -0,0 +1 @@ +"use strict";function IndexController(e,n,o){function a(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function t(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},t("http://localhost:9888/api/hangup",e)},s.dial=function(){var e=Date.now();s.callbacks[e]=function(){s.inCall=!0},t("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",a),l&&l.disconnected&&l.connect()}else s.online=!1},t("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},t("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({callback:function(e){console.log("data",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.8a1b4e25.js b/app.8a1b4e25.js deleted file mode 100644 index 20ff4ce..0000000 --- a/app.8a1b4e25.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 s,l=this;l.phone="",l.inCall=!1,l.callbacks={},l.compose=function(e){l.phone=l.phone.concat(e)},l.remove=function(){l.phone=l.phone.substring(0,l.phone.length-1)},l.hangup=function(){var e=Date.now();l.callbacks[e]=function(){l.inCall=!1},a("http://localhost:9888/api/hangup",e)},l.dial=function(){var e=Date.now();l.callbacks[e]=function(){l.inCall=!0},a("http://localhost:9888/api/originate/"+l.phone,e)},l.keepalive=function(){var e=Date.now();l.callbacks[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);l.id=n.id,l.displayName=n.displayName,l.internal=n.internal,l.online=!0,s||l.host&&l.id&&(s=io(l.host,{query:{id:l.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",t),s&&s.disconnected&&s.connect()}else l.online=!1},a("http://localhost:9888/api/agent",e)},l.checkStatus=function(){var e=Date.now();l.callbacks[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);l.inCall=!!n.length}else l.inCall=!1},a("http://localhost:9888/api/calls",e)},sforce.opencti.getCallCenterSettings({callback:function(e){l.host=e.returnValue["/Motion/Host"]}}),o(l.keepalive,2e3),o(l.checkStatus,2e3),n.addEventListener("message",function(n){var o=n.data;l.callbacks[o.uniqueid]&&(l.callbacks[o.uniqueid](o),delete l.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 6a7c7cd..3d09aa1 100644 --- a/index.html +++ b/index.html @@ -52,7 +52,7 @@ - +