From: Daniele Cinti Date: Wed, 23 Aug 2017 16:21:48 +0000 (+0200) Subject: Built xcally-motion-dialpad from commit 4de37fe.|1.0.90 X-Git-Tag: 1.0.90 X-Git-Url: http://repos.xcallymotion.com/base/%22https:/wiki.xcallymotion.com/display/XMV//%22?a=commitdiff_plain;h=957f9a1545f4578d9947bb8803f530b6c2099986;p=dialpad.git Built xcally-motion-dialpad from commit 4de37fe.|1.0.90 --- diff --git a/app.a9c70aec.js b/app.c322f463.js similarity index 71% rename from app.a9c70aec.js rename to app.c322f463.js index 75a71c8..0317cfa 100644 --- a/app.a9c70aec.js +++ b/app.c322f463.js @@ -1 +1 @@ -"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,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),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),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 +"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 78f6cf5..fe0b672 100644 --- a/index.html +++ b/index.html @@ -59,7 +59,7 @@ document.write(""); - +