From: Daniele Cinti Date: Wed, 16 Aug 2017 15:31:35 +0000 (+0200) Subject: Built xcally-motion-dialpad from commit d97975e.|1.0.53 X-Git-Tag: 1.0.53 X-Git-Url: http://repos.xcallymotion.com/base//%22?a=commitdiff_plain;h=cb393640d6d8da48d3e39e1e4f11dcc7283b5fba;p=dialpad.git Built xcally-motion-dialpad from commit d97975e.|1.0.53 --- diff --git a/app.27cae05d.js b/app.98292e6c.js similarity index 51% rename from app.27cae05d.js rename to app.98292e6c.js index acc4a38..c07b091 100644 --- a/app.27cae05d.js +++ b/app.98292e6c.js @@ -1 +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){e.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},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 +"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){e.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 24a0c43..7084e58 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@ document.write(""); - +