From 583477337441935b2ad72acbab487986dbec2cc6 Mon Sep 17 00:00:00 2001 From: Daniele Cinti Date: Thu, 17 Aug 2017 15:00:04 +0200 Subject: [PATCH] Built xcally-motion-dialpad from commit 9260cae.|1.0.76 --- app.31cff224.js | 1 + app.e5f550cc.js | 1 - index.html | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 app.31cff224.js delete mode 100644 app.e5f550cc.js diff --git a/app.31cff224.js b/app.31cff224.js new file mode 100644 index 0000000..3b45d7b --- /dev/null +++ b/app.31cff224.js @@ -0,0 +1 @@ +"use strict";function config(e){e.html5Mode(!0)}function IndexController(e,n,o,i,a){function t(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function l(e,o){n.parent.postMessage({id:c.lightning?null:"scc_widget_SoftphoneIframe",className:c.lightning?"openctiSoftPhone":null,uniqueid:o,options:{url:e}},"*")}var s,c=this;console.log("$location",i.search()),c.phone="",c.inCall=!1,c.version=null,c.uriVersion=null,i.search().mode&&"lightning"===i.search().mode.toLowerCase()?(c.version="salesforce-lightning",c.uriVersion="js/salesforce/lightning.js"):i.search().type&&"desk"===i.search().type.toLowerCase()?(c.version="salesforce-desk",c.uriVersion="js/salesforce/interaction-desk.js"):(c.version="salesforce-classic",c.uriVersion="js/salesforce/interaction.js"),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},l("http://localhost:9888/api/hangup",e)},c.dial=function(){var e=Date.now();c.callbacks[e]=function(){c.inCall=!0},l("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,s||c.host&&c.id&&(s=io(c.host,{query:{id:c.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",t),s&&s.disconnected&&s.connect()}else c.online=!1},l("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},l("http://localhost:9888/api/calls",e)},angular.element(document.createElement("base")).href=window.location.pathname,a.loadScript(c.uriVersion).then(function(){switch(console.log("Script loaded succesfully",c.version),c.version){case"salesforce-lightning":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())}});break;case"salesforce-classic":sforce.interaction.cti.getCallCenterSettings({callback:function(e){c.host=e.returnValue["/Motion/Host"]}}),sforce.interaction.cti.enableClickToDial({callback:function(e){console.log("enableClickToDial")}}),sforce.interaction.cti.onClickToDial({listener:function(e){c.online&&e.number&&(c.phone=e.number,c.dial())}});break;case"salesforce-desk":c.host=i.search().host,desk.ready(function(e){desk.interaction.cti.enableClickToDial(function(e){console.log("enableClickToDial")}),desk.interaction.cti.onClickToDial(function(e){c.online&&e.number&&(c.phone=e.number,c.dial())})});break;default:console.log("unknown integration")}}).catch(function(e){console.error(e)}),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)}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.e5f550cc.js b/app.e5f550cc.js deleted file mode 100644 index 84fd556..0000000 --- a/app.e5f550cc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function config(e){e.html5Mode(!0)}function IndexController(e,n,o,i,a){function t(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function l(e,o){n.parent.postMessage({id:c.lightning?null:"scc_widget_SoftphoneIframe",className:c.lightning?"openctiSoftPhone":null,uniqueid:o,options:{url:e}},"*")}var s,c=this;console.log("$location",i.search()),c.phone="",c.inCall=!1,c.version=null,c.uriVersion=null,i.search().mode&&"lightning"===i.search().mode.toLowerCase()?(c.version="salesforce-lightning",c.uriVersion="js/salesforce/lightning.js"):i.search().type&&"desk"===i.search().type.toLowerCase()?(c.version="salesforce-desk",c.uriVersion="js/salesforce/interaction-desk.js"):(c.version="salesforce-classic",c.uriVersion="js/salesforce/interaction.js"),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},l("http://localhost:9888/api/hangup",e)},c.dial=function(){var e=Date.now();c.callbacks[e]=function(){c.inCall=!0},l("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,s||c.host&&c.id&&(s=io(c.host,{query:{id:c.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",t),s&&s.disconnected&&s.connect()}else c.online=!1},l("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},l("http://localhost:9888/api/calls",e)},angular.element(document.createElement("base")).href=window.location.pathname,a.loadScript(c.uriVersion).then(function(){switch(console.log("Script loaded succesfully",c.version),c.version){case"salesforce-lightning":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())}});break;case"salesforce-classic":sforce.interaction.cti.getCallCenterSettings({callback:function(e){c.host=e.returnValue["/Motion/Host"]}}),sforce.interaction.cti.enableClickToDial({callback:function(e){console.log("enableClickToDial")}}),sforce.interaction.cti.onClickToDial({listener:function(e){c.online&&e.number&&(c.phone=e.number,c.dial())}});break;case"salesforce-desk":c.host=i.search().host,desk.ready(function(e){desk.interaction.cti.enableClickToDial(function(e){console.log("enableClickToDial")}),desk.interaction.cti.onClickToDial(function(e){c.online&&e.number&&(c.phone=e.number,c.dial())})})}}).catch(function(e){console.error(e)}),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)}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 837e0e3..c7eb34b 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@ document.write(""); - + -- 1.7.1