From: Daniele Cinti Date: Thu, 24 Aug 2017 13:26:05 +0000 (+0200) Subject: Built xcally-motion-dialpad from commit 6ceb65c.|1.0.93 X-Git-Tag: 1.0.93 X-Git-Url: http://repos.xcallymotion.com/base/%22angular-material.themes.css/%22javascript:;/%22avatar.png//%22https:?a=commitdiff_plain;h=70511d3e05308d2981b4079591c16c1e3f60d373;p=dialpad.git Built xcally-motion-dialpad from commit 6ceb65c.|1.0.93 --- diff --git a/app.2f80ec19.js b/app.2f80ec19.js deleted file mode 100644 index 28a8be9..0000000 --- a/app.2f80ec19.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function config(e){e.html5Mode(!0)}function IndexController(e,n,o,t,s){function a(e){r.host=e.returnValue["/Motion/Host"]}function i(e){r.online&&e.number&&(r.phone=e.number,r.dial())}function c(e){switch(f){case"salesforce-lightning":sforce.opencti.screenPop({type:u.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}});break;case"salesforce-classic":sforce.interaction.cti.screenPop("00001002",!0);break;case"salesforce-desk":desk.interaction.cti.screenPop(e.recordId.toString(),"object=case");break;default:console.log("unknown integration")}}function l(e,o){n.parent.postMessage({id:"salesforce-classic"===f?"scc_widget_SoftphoneIframe":null,className:"salesforce-lightning"===f?"openctiSoftPhone":null,tag:"salesforce-desk"===f?"iframe":null,uniqueid:o,options:{url:e}},"*")}var r=this,u=null,d=null,f=null,p={},g=null;r.phone="",r.inCall=!1,r.compose=function(e){r.phone=r.phone.concat(e)},r.remove=function(){r.phone=r.phone.substring(0,r.phone.length-1)},r.hangup=function(){var e=Date.now();p[e]=function(){r.inCall=!1},l("http://localhost:9888/api/hangup",e)},r.dial=function(){var e=Date.now();p[e]=function(){r.inCall=!0},l("http://localhost:9888/api/originate/"+r.phone,e)},t.search().mode&&"lightning"===t.search().mode.toLowerCase()?(f="salesforce-lightning",d="js/salesforce/lightning.js"):t.search().type&&"desk"===t.search().type.toLowerCase()?(f="salesforce-desk",d="js/salesforce/interaction-desk.js"):(f="salesforce-classic",d="js/salesforce/interaction.js"),angular.element(document.createElement("base")).href=window.location.pathname,s.loadScript(d).then(function(){switch(console.log("Script loaded succesfully",f),f){case"salesforce-lightning":sforce.opencti.getCallCenterSettings({callback:a}),sforce.opencti.enableClickToDial(),sforce.opencti.onClickToDial({listener:i});break;case"salesforce-classic":sforce.interaction.cti.getCallCenterSettings({callback:a}),sforce.interaction.cti.enableClickToDial(),sforce.interaction.cti.onClickToDial({listener:i});break;case"salesforce-desk":r.host=t.search().host,desk.ready(function(e){desk.interaction.cti.enableClickToDial(),desk.interaction.cti.onClickToDial(i)});break;default:console.log("unknown integration")}}).catch(function(e){console.error(e)}),o(function(){var e=Date.now();p[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);r.id=n.id,r.username=n.username,r.displayName=n.displayName,r.internal=n.internal,r.online=!0,g||r.host&&r.id&&((g=io(r.host,{query:{id:r.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",c),g.on("trigger:desk:display",c)),g&&g.disconnected&&g.connect()}else r.online=!1},l("http://localhost:9888/api/agent",e)},2e3),o(function(){var e=Date.now();p[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);r.inCall=!!n.length}else r.inCall=!1},l("http://localhost:9888/api/calls",e)},2e3),n.addEventListener("message",function(n){var o=n.data;p[o.uniqueid]&&(p[o.uniqueid](o),delete p[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.95253532.js b/app.95253532.js new file mode 100644 index 0000000..79ed27d --- /dev/null +++ b/app.95253532.js @@ -0,0 +1 @@ +"use strict";function config(e){e.html5Mode(!0)}function IndexController(e,n,o,t,s){function i(e){r.host=e.returnValue["/Motion/Host"]}function a(e){r.online&&e.number&&(r.phone=e.number,r.dial())}function c(e){switch(console.log(e),d){case"salesforce-lightning":sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}});break;case"salesforce-classic":sforce.interaction.screenPop(e.recordId,!0);break;case"salesforce-desk":desk.interaction.screenPop(e.recordId.toString(),"object=case");break;default:console.log("unknown integration")}}function l(e,o){n.parent.postMessage({id:"salesforce-classic"===d?"scc_widget_SoftphoneIframe":null,tag:"salesforce-desk"===d?"iframe":null,className:"salesforce-lightning"===d?"openctiSoftPhone":null,uniqueid:o,options:{url:e}},"*")}var r=this,u=null,d=null,f={},p=null;r.phone="",r.inCall=!1,r.compose=function(e){r.phone=r.phone.concat(e)},r.remove=function(){r.phone=r.phone.substring(0,r.phone.length-1)},r.hangup=function(){var e=Date.now();f[e]=function(){r.inCall=!1},l("http://localhost:9888/api/hangup",e)},r.dial=function(){var e=Date.now();f[e]=function(){r.inCall=!0},l("http://localhost:9888/api/originate/"+r.phone,e)},t.search().mode&&"lightning"===t.search().mode.toLowerCase()?(d="salesforce-lightning",u="js/salesforce/lightning.js"):t.search().type&&"desk"===t.search().type.toLowerCase()?(d="salesforce-desk",u="js/salesforce/interaction-desk.js"):(d="salesforce-classic",u="js/salesforce/interaction.js"),angular.element(document.createElement("base")).href=window.location.pathname,s.loadScript(u).then(function(){switch(console.log("Script loaded succesfully",d),d){case"salesforce-lightning":sforce.opencti.getCallCenterSettings({callback:i}),sforce.opencti.enableClickToDial(),sforce.opencti.onClickToDial({listener:a});break;case"salesforce-classic":sforce.interaction.cti.getCallCenterSettings(function(e){r.host=JSON.parse(e.result)["/Motion/Host"]}),sforce.interaction.cti.enableClickToDial(),sforce.interaction.cti.onClickToDial(a);break;case"salesforce-desk":r.host=t.search().host,desk.ready(function(e){desk.interaction.cti.enableClickToDial(),desk.interaction.cti.onClickToDial(a)});break;default:console.log("unknown integration")}}).catch(function(e){console.error(e)}),o(function(){var e=Date.now();f[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);r.id=n.id,r.username=n.username,r.displayName=n.displayName,r.internal=n.internal,r.online=!0,p||r.host&&r.id&&(console.log("host",r.host),console.log("id",r.id),(p=io(r.host,{query:{id:r.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",c),p.on("trigger:desk:display",c)),p&&p.disconnected&&p.connect()}else r.online=!1},l("http://localhost:9888/api/agent",e)},2e3),o(function(){var e=Date.now();f[e]=function(e){if(e.response&&e.response.status>=200&&e.response.status<300){var n=JSON.parse(e.response.message);r.inCall=!!n.length}else r.inCall=!1},l("http://localhost:9888/api/calls",e)},2e3),n.addEventListener("message",function(n){var o=n.data;f[o.uniqueid]&&(f[o.uniqueid](o),delete f[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 7d608b0..9ac75d6 100644 --- a/index.html +++ b/index.html @@ -59,7 +59,7 @@ document.write(""); - +