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