From d9629c4d520b65c7cc8e39be95943e4d4bf7248b Mon Sep 17 00:00:00 2001 From: Daniele Cinti Date: Wed, 16 Aug 2017 12:19:51 +0200 Subject: [PATCH] Built xcally-motion-dialpad from commit 7f8e441.|1.0.37 --- app.0e3c41af.js | 1 - app.eaea06bc.js | 1 + index.html | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 app.0e3c41af.js create mode 100644 app.eaea06bc.js diff --git a/app.0e3c41af.js b/app.0e3c41af.js deleted file mode 100644 index 939d399..0000000 --- a/app.0e3c41af.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function config(e){e.html5Mode(!0)}function IndexController(e,n,o,t,a){function l(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function i(e,o){n.parent.postMessage({uniqueid:o,options:{url:e}},"*")}var c,s=this;console.log("$location",t.search()),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},i("http://localhost:9888/api/hangup",e)},s.dial=function(){var e=Date.now();s.callbacks[e]=function(){s.inCall=!0},i("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,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},i("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},i("http://localhost:9888/api/calls",e)},angular.element(document.createElement("base")).href=window.location.pathname,a.loadScript("lightning"===t.search().mode.toLowerCase()?"js/salesforce/lightning.js":"js/salesforce/interaction.js").then(function(){console.log("Script loaded succesfully"),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){s.online&&e.number&&(s.phone=e.number,s.dial())}})}).catch(function(e){console.error(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)}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.eaea06bc.js b/app.eaea06bc.js new file mode 100644 index 0000000..2840139 --- /dev/null +++ b/app.eaea06bc.js @@ -0,0 +1 @@ +"use strict";function config(e){e.html5Mode(!0)}function IndexController(e,n,o,a,t){function l(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function i(e,o){n.parent.postMessage({uniqueid:o,options:{url:e}},"*")}var c,s=this;console.log("$location",a.search()),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},i("http://localhost:9888/api/hangup",e)},s.dial=function(){var e=Date.now();s.callbacks[e]=function(){s.inCall=!0},i("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,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},i("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},i("http://localhost:9888/api/calls",e)},angular.element(document.createElement("base")).href=window.location.pathname,t.loadScript(a.search().mode&&"lightning"===a.search().mode.toLowerCase()?"js/salesforce/lightning.js":"js/salesforce/interaction.js").then(function(){console.log("Script loaded succesfully"),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){s.online&&e.number&&(s.phone=e.number,s.dial())}})}).catch(function(e){console.error(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)}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 3c103d7..1b7da8b 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@ document.write(""); - + -- 1.7.1