From: Daniele Cinti Date: Tue, 18 Jul 2017 12:26:24 +0000 (+0200) Subject: Built xcally-motion-dialpad from commit 7f8e441.|1.0.29 X-Git-Tag: 1.0.29 X-Git-Url: http://repos.xcallymotion.com/base//%22https:/wiki.xcallymotion.com/display/XMV/Cookie?a=commitdiff_plain;h=9a814d592a6f01e282d6f04052b14029a3931743;p=dialpad.git Built xcally-motion-dialpad from commit 7f8e441.|1.0.29 --- diff --git a/app.5a69ac67.js b/app.5a69ac67.js deleted file mode 100644 index b2de5e4..0000000 --- a/app.5a69ac67.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";function config(e){e.html5Mode(!0)}function dialScripts(e){return console.log("$myloc",e),{restrict:"EA",link:function(e,n){return function(){n.empty();var e=angular.element(document.createElement("script"));e.text="text",n.append(e)}}}}function IndexController(e,n,o,t){function a(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function i(e,o){n.parent.postMessage({uniqueid:o,options:{url:e}},"*")}var l,c=this;console.log("$location",t.search()),c.phone="",c.inCall=!1,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},i("http://localhost:9888/api/hangup",e)},c.dial=function(){var e=Date.now();c.callbacks[e]=function(){c.inCall=!0},i("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,l||c.host&&c.id&&(l=io(c.host,{query:{id:c.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",a),l&&l.disconnected&&l.connect()}else c.online=!1},i("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},i("http://localhost:9888/api/calls",e)},angular.element(document.createElement("base")).href=window.location.pathname,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())}}),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"],dialScripts.$inject=["$location"],IndexController.$inject=["$scope","$window","$interval","$location"];var motion=angular.module("motion",["ngMaterial"]);motion.config(config),motion.directive("dialScripts",dialScripts),motion.controller("IndexController",IndexController); \ No newline at end of file diff --git a/app.5dee00dc.js b/app.5dee00dc.js new file mode 100644 index 0000000..d3971c0 --- /dev/null +++ b/app.5dee00dc.js @@ -0,0 +1 @@ +"use strict";function config(e){e.html5Mode(!0)}function dialScripts(e){return console.log("$myloc",e.search()),{restrict:"EA",link:function(e,n){return function(){n.empty();var e=angular.element(document.createElement("script"));e.text="text",n.append(e)}}}}function IndexController(e,n,o,t){function a(e){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:e.recordId}})}function i(e,o){n.parent.postMessage({uniqueid:o,options:{url:e}},"*")}var l,c=this;console.log("$location",t.search()),c.phone="",c.inCall=!1,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},i("http://localhost:9888/api/hangup",e)},c.dial=function(){var e=Date.now();c.callbacks[e]=function(){c.inCall=!0},i("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,l||c.host&&c.id&&(l=io(c.host,{query:{id:c.id},autoConnect:!1,transports:["websocket","polling"]})).on("trigger:salesforce:display",a),l&&l.disconnected&&l.connect()}else c.online=!1},i("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},i("http://localhost:9888/api/calls",e)},angular.element(document.createElement("base")).href=window.location.pathname,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())}}),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"],dialScripts.$inject=["$location"],IndexController.$inject=["$scope","$window","$interval","$location"];var motion=angular.module("motion",["ngMaterial"]);motion.config(config),motion.directive("dialScripts",dialScripts),motion.controller("IndexController",IndexController); \ No newline at end of file diff --git a/index.html b/index.html index b559a95..7b63e4b 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@ document.write(""); - +