From: Daniele Cinti Date: Tue, 18 Jul 2017 08:47:19 +0000 (+0200) Subject: Built xcally-motion-dialpad from commit 7f8e441.|1.0.17 X-Git-Tag: 1.0.17 X-Git-Url: http://repos.xcallymotion.com/base/%22angular-material.themes.css/%22javascript:;/%22my-avatar.png//%27?a=commitdiff_plain;h=bdc97405628db16714672865d45326977d8bce7f;p=dialpad.git Built xcally-motion-dialpad from commit 7f8e441.|1.0.17 --- diff --git a/app.6d1e51fb.js b/app.6d1e51fb.js deleted file mode 100644 index 510d5a3..0000000 --- a/app.6d1e51fb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function IndexController(e,n,o,t){function a(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function l(e,o){n.parent.postMessage({uniqueid:o,options:{url:e}},"*")}var s,i=this;console.log("$stateParams",t),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},l("http://localhost:9888/api/hangup",e)},i.dial=function(){var e=Date.now();i.callbacks[e]=function(){i.inCall=!0},l("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,s||i.host&&i.id&&(s=io(i.host,{query:{id:i.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",a),s&&s.disconnected&&s.connect()}else i.online=!1},l("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},l("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){i.online&&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","$stateParams"];var motion=angular.module("motion",["ngMaterial","ui.router"]);motion.controller("IndexController",IndexController); \ No newline at end of file diff --git a/app.7272c9ba.js b/app.7272c9ba.js new file mode 100644 index 0000000..86d34d6 --- /dev/null +++ b/app.7272c9ba.js @@ -0,0 +1 @@ +"use strict";function IndexController(e,n,o,a,t){function l(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function s(e,o){n.parent.postMessage({uniqueid:o,options:{url:e}},"*")}var i,c=this;console.log("$stateParams",a),console.log("$location",t.search()),c.phone="",c.inCall=!1,c.callbacks={},c.compose=function(e){c.phone=c.phone.concat(e)},c.remove=function(){c.phone=c.phone.substring(0,c.phone.length-1)},c.hangup=function(){var e=Date.now();c.callbacks[e]=function(){c.inCall=!1},s("http://localhost:9888/api/hangup",e)},c.dial=function(){var e=Date.now();c.callbacks[e]=function(){c.inCall=!0},s("http://localhost:9888/api/originate/"+c.phone,e)},c.keepalive=function(){var e=Date.now();c.callbacks[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);c.id=n.id,c.displayName=n.displayName,c.internal=n.internal,c.online=!0,i||c.host&&c.id&&(i=io(c.host,{query:{id:c.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",l),i&&i.disconnected&&i.connect()}else c.online=!1},s("http://localhost:9888/api/agent",e)},c.checkStatus=function(){var e=Date.now();c.callbacks[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);c.inCall=!!n.length}else c.inCall=!1},s("http://localhost:9888/api/calls",e)},sforce.opencti.getCallCenterSettings({callback:function(e){c.host=e.returnValue["/Motion/Host"]}}),sforce.opencti.enableClickToDial({callback:function(e){console.log("enableClickToDial")}}),sforce.opencti.onClickToDial({listener:function(e){c.online&&e.number&&(c.phone=e.number,c.dial())}}),o(c.keepalive,2e3),o(c.checkStatus,2e3),n.addEventListener("message",function(n){var o=n.data;c.callbacks[o.uniqueid]&&(c.callbacks[o.uniqueid](o),delete c.callbacks[o.uniqueid],e.$apply())},!1)}IndexController.$inject=["$scope","$window","$interval","$stateParams","$location"];var motion=angular.module("motion",["ngMaterial","ui.router"]);motion.controller("IndexController",IndexController); \ No newline at end of file diff --git a/index.html b/index.html index d1a0057..e401b34 100644 --- a/index.html +++ b/index.html @@ -52,7 +52,7 @@ - +