From: Daniele Cinti Date: Thu, 17 Aug 2017 12:45:28 +0000 (+0200) Subject: Built xcally-motion-dialpad from commit 9260cae.|1.0.68 X-Git-Tag: 1.0.68 X-Git-Url: http://repos.xcallymotion.com/base/%22http:/www.gravatar.com/avatar/%7B%7Bhash%7D%7D//%22https:?a=commitdiff_plain;h=71007a5f6ba80f9dea8d2c8e2599d40f35b1b9ed;p=dialpad.git Built xcally-motion-dialpad from commit 9260cae.|1.0.68 --- diff --git a/app.2e58a9b8.js b/app.2e58a9b8.js new file mode 100644 index 0000000..bc38df4 --- /dev/null +++ b/app.2e58a9b8.js @@ -0,0 +1 @@ +"use strict";function config(e){e.html5Mode(!0)}function IndexController(e,n,o,i,a){function l(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function t(e,o){n.parent.postMessage({id:s.lightning?null:"scc_widget_SoftphoneIframe",className:s.lightning?"openctiSoftPhone":null,uniqueid:o,options:{url:e}},"*")}var c,s=this;console.log("$location",i.search()),s.phone="",s.inCall=!1,s.version=null,s.uriVersion=null,i.search().mode&&"lightning"===i.search().mode.toLowerCase()?(s.version="salesforce-lightning",s.uriVersion="js/salesforce/lightning.js"):i.search().type&&"desk"===i.search().type.toLowerCase()?(s.version="salesforce-desk",s.uriVersion="js/salesforce/interaction-desk.js"):(s.version="salesforce-classic",s.uriVersion="js/salesforce/interaction.js"),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},t("http://localhost:9888/api/hangup",e)},s.dial=function(){var e=Date.now();s.callbacks[e]=function(){s.inCall=!0},t("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},t("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},t("http://localhost:9888/api/calls",e)},angular.element(document.createElement("base")).href=window.location.pathname,a.loadScript(s.uriVersion).then(function(){switch(console.log("Script loaded succesfully",s.version),s.version){case"salesforce-lightning":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())}});break;case"salesforce-classic":sforce.interaction.cti.getCallCenterSettings({callback:function(e){s.host=e.returnValue["/Motion/Host"]}}),sforce.interaction.cti.enableClickToDial({callback:function(e){console.log("enableClickToDial")}}),sforce.interaction.cti.onClickToDial({listener:function(e){s.online&&e.number&&(s.phone=e.number,s.dial())}});break;case"salesforce-desk":s.host=i.search().host,desk.ready({callback:function(e){console.log("Salesforce Desk ready")}}),desk.interaction.cti.enableClickToDial({callback:function(e){console.log("enableClickToDial")}}),desk.interaction.cti.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.513ce079.js b/app.513ce079.js deleted file mode 100644 index e37f94b..0000000 --- a/app.513ce079.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function config(e){e.html5Mode(!0)}function IndexController(e,n,o,i,l){function a(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function s(e,o){n.parent.postMessage({id:c.lightning?null:"scc_widget_SoftphoneIframe",className:c.lightning?"openctiSoftPhone":null,uniqueid:o,options:{url:e}},"*")}var t,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},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,t||c.host&&c.id&&(t=io(c.host,{query:{id:c.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",a),t&&t.disconnected&&t.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)},angular.element(document.createElement("base")).href=window.location.pathname,l.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({callback:function(e){console.log("Salesforce Desk ready")}}),desk.enableClickToDial({callback:function(e){console.log("enableClickToDial")}}),desk.onClickToDial({listener: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 7d38c35..12bbad8 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@ document.write(""); - +