From aeb6f46b938378080be044843652e9fa8c72c101 Mon Sep 17 00:00:00 2001 From: Daniele Cinti Date: Wed, 16 Aug 2017 17:39:11 +0200 Subject: [PATCH] Built xcally-motion-dialpad from commit d97975e.|1.0.57 --- app.af46a279.js | 1 - app.d804b825.js | 1 + index.html | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 app.af46a279.js create mode 100644 app.d804b825.js diff --git a/app.af46a279.js b/app.af46a279.js deleted file mode 100644 index 7f29f88..0000000 --- a/app.af46a279.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function config(n){n.html5Mode(!0)}function IndexController(n,e,o,t,i){function l(n){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:n.recordId}})}function a(n,o){console.log("$window.parent",e.parent),e.parent.postMessage({id:s.lightning?null:"cti_widget_window",className:s.lightning?"openctiSoftPhone":null,uniqueid:o,options:{url:n}},"*")}var c,s=this;console.log("$location",t.search()),s.phone="",s.inCall=!1,s.lightning=t.search().mode&&"lightning"===t.search().mode.toLowerCase(),s.callbacks={},s.compose=function(n){s.phone=s.phone.concat(n)},s.remove=function(){s.phone=s.phone.substring(0,s.phone.length-1)},s.hangup=function(){var n=Date.now();s.callbacks[n]=function(){s.inCall=!1},a("http://localhost:9888/api/hangup",n)},s.dial=function(){var n=Date.now();s.callbacks[n]=function(){s.inCall=!0},a("http://localhost:9888/api/originate/"+s.phone,n)},s.keepalive=function(){var n=Date.now();s.callbacks[n]=function(n){if(n.response&&n.response.status>=200&&n.response.status<300){var e=JSON.parse(n.response.message);s.id=e.id,s.displayName=e.displayName,s.internal=e.internal,s.online=!0,c||s.host&&s.id&&(c=io(s.host,{query:{id:s.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",l),c&&c.disconnected&&c.connect()}else s.online=!1},a("http://localhost:9888/api/agent",n)},s.checkStatus=function(){var n=Date.now();s.callbacks[n]=function(n){if(n.response&&n.response.status>=200&&n.response.status<300){var e=JSON.parse(n.response.message);s.inCall=!!e.length}else s.inCall=!1},console.log("checkStatus"),a("http://localhost:9888/api/calls",n)},angular.element(document.createElement("base")).href=window.location.pathname,i.loadScript(s.lightning?"js/salesforce/lightning.js":"js/salesforce/interaction.js").then(function(){console.log("Script loaded succesfully"),s.lightning?sforce.opencti.getCallCenterSettings({callback:function(n){s.host=n.returnValue["/Motion/Host"]}}):sforce.interaction.cti.getCallCenterSettings({callback:function(n){s.host=n.returnValue["/Motion/Host"]}}),s.lightning?sforce.opencti.enableClickToDial({callback:function(n){console.log("enableClickToDial")}}):sforce.interaction.cti.enableClickToDial({callback:function(n){console.log("enableClickToDial")}}),s.lightning?sforce.opencti.onClickToDial({listener:function(n){s.online&&n.number&&(s.phone=n.number,s.dial())}}):sforce.interaction.cti.onClickToDial({listener:function(n){s.online&&n.number&&(s.phone=n.number,s.dial())}})}).catch(function(n){console.error(n)}),o(s.keepalive,2e3),o(s.checkStatus,2e3),e.addEventListener("message",function(e){var o=e.data;s.callbacks[o.uniqueid]&&(s.callbacks[o.uniqueid](o),delete s.callbacks[o.uniqueid],n.$apply())},!1)}config.$inject=["$locationProvider"],IndexController.$inject=["$scope","$window","$interval","$location","angularLoad"];var motion=angular.module("motion",["ngMaterial","angularLoad"]);motion.config(config),motion.controller("IndexController",IndexController); \ No newline at end of file diff --git a/app.d804b825.js b/app.d804b825.js new file mode 100644 index 0000000..54c462f --- /dev/null +++ b/app.d804b825.js @@ -0,0 +1 @@ +"use strict";function config(n){n.html5Mode(!0)}function IndexController(n,e,o,t,i){function l(n){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:n.recordId}})}function a(n,o){console.log("$window.parent",e.parent),e.parent.parent.postMessage({id:s.lightning?null:"cti_widget_window",className:s.lightning?"openctiSoftPhone":null,uniqueid:o,options:{url:n}},"*")}var c,s=this;console.log("$location",t.search()),s.phone="",s.inCall=!1,s.lightning=t.search().mode&&"lightning"===t.search().mode.toLowerCase(),s.callbacks={},s.compose=function(n){s.phone=s.phone.concat(n)},s.remove=function(){s.phone=s.phone.substring(0,s.phone.length-1)},s.hangup=function(){var n=Date.now();s.callbacks[n]=function(){s.inCall=!1},a("http://localhost:9888/api/hangup",n)},s.dial=function(){var n=Date.now();s.callbacks[n]=function(){s.inCall=!0},a("http://localhost:9888/api/originate/"+s.phone,n)},s.keepalive=function(){var n=Date.now();s.callbacks[n]=function(n){if(n.response&&n.response.status>=200&&n.response.status<300){var e=JSON.parse(n.response.message);s.id=e.id,s.displayName=e.displayName,s.internal=e.internal,s.online=!0,c||s.host&&s.id&&(c=io(s.host,{query:{id:s.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",l),c&&c.disconnected&&c.connect()}else s.online=!1},a("http://localhost:9888/api/agent",n)},s.checkStatus=function(){var n=Date.now();s.callbacks[n]=function(n){if(n.response&&n.response.status>=200&&n.response.status<300){var e=JSON.parse(n.response.message);s.inCall=!!e.length}else s.inCall=!1},console.log("checkStatus"),a("http://localhost:9888/api/calls",n)},angular.element(document.createElement("base")).href=window.location.pathname,i.loadScript(s.lightning?"js/salesforce/lightning.js":"js/salesforce/interaction.js").then(function(){console.log("Script loaded succesfully"),s.lightning?sforce.opencti.getCallCenterSettings({callback:function(n){s.host=n.returnValue["/Motion/Host"]}}):sforce.interaction.cti.getCallCenterSettings({callback:function(n){s.host=n.returnValue["/Motion/Host"]}}),s.lightning?sforce.opencti.enableClickToDial({callback:function(n){console.log("enableClickToDial")}}):sforce.interaction.cti.enableClickToDial({callback:function(n){console.log("enableClickToDial")}}),s.lightning?sforce.opencti.onClickToDial({listener:function(n){s.online&&n.number&&(s.phone=n.number,s.dial())}}):sforce.interaction.cti.onClickToDial({listener:function(n){s.online&&n.number&&(s.phone=n.number,s.dial())}})}).catch(function(n){console.error(n)}),o(s.keepalive,2e3),o(s.checkStatus,2e3),e.addEventListener("message",function(e){var o=e.data;s.callbacks[o.uniqueid]&&(s.callbacks[o.uniqueid](o),delete s.callbacks[o.uniqueid],n.$apply())},!1)}config.$inject=["$locationProvider"],IndexController.$inject=["$scope","$window","$interval","$location","angularLoad"];var motion=angular.module("motion",["ngMaterial","angularLoad"]);motion.config(config),motion.controller("IndexController",IndexController); \ No newline at end of file diff --git a/index.html b/index.html index ceedb46..d9149ba 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@ document.write(""); - + -- 1.7.1