Built xcally-motion-dialpad from commit 7f8e441.|1.0.23 1.0.23
authorDaniele Cinti <daniele.cinti@xcally.com>
Tue, 18 Jul 2017 10:20:59 +0000 (12:20 +0200)
committerDaniele Cinti <daniele.cinti@xcally.com>
Tue, 18 Jul 2017 10:20:59 +0000 (12:20 +0200)
app.338e7919.js [deleted file]
app.4a8d2b66.js [new file with mode: 0644]
index.html

diff --git a/app.338e7919.js b/app.338e7919.js
deleted file mode 100644 (file)
index 4e59dec..0000000
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";function config(n){n.html5Mode(!0)}function IndexController(n,e,o,t){function a(n){sforce.opencti.screenPop({type:sforce.opencti.SCREENPOP_TYPE.SOBJECT,params:{recordId:n.recordId}})}function i(n,o){e.parent.postMessage({uniqueid:o,options:{url:n}},"*")}var l,c=this;console.log("$location",t.search()),c.phone="",c.inCall=!1,c.callbacks={},c.compose=function(n){c.phone=c.phone.concat(n)},c.remove=function(){c.phone=c.phone.substring(0,c.phone.length-1)},c.hangup=function(){var n=Date.now();c.callbacks[n]=function(){c.inCall=!1},i("http://localhost:9888/api/hangup",n)},c.dial=function(){var n=Date.now();c.callbacks[n]=function(){c.inCall=!0},i("http://localhost:9888/api/originate/"+c.phone,n)},c.keepalive=function(){var n=Date.now();c.callbacks[n]=function(n){if(n.response&&n.response.status>=200&&n.response.status<300){var e=JSON.parse(n.response.message);c.id=e.id,c.displayName=e.displayName,c.internal=e.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",n)},c.checkStatus=function(){var n=Date.now();c.callbacks[n]=function(n){if(n.response&&n.response.status>=200&&n.response.status<300){var e=JSON.parse(n.response.message);c.inCall=!!e.length}else c.inCall=!1},i("http://localhost:9888/api/calls",n)},sforce.opencti.getCallCenterSettings({callback:function(n){c.host=n.returnValue["/Motion/Host"]}}),sforce.opencti.enableClickToDial({callback:function(n){console.log("enableClickToDial")}}),sforce.opencti.onClickToDial({listener:function(n){c.online&&n.number&&(c.phone=n.number,c.dial())}}),o(c.keepalive,2e3),o(c.checkStatus,2e3),e.addEventListener("message",function(e){var o=e.data;c.callbacks[o.uniqueid]&&(c.callbacks[o.uniqueid](o),delete c.callbacks[o.uniqueid],n.$apply())},!1)}config.$inject=["$locationProvider"],IndexController.$inject=["$scope","$window","$interval","$location"];var motion=angular.module("motion",["ngMaterial"]);motion.config(config),motion.controller("IndexController",IndexController);
\ No newline at end of file
diff --git a/app.4a8d2b66.js b/app.4a8d2b66.js
new file mode 100644 (file)
index 0000000..5173937
--- /dev/null
@@ -0,0 +1 @@
+"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("base"));e.href=window.location.pathname,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
index afd1d29..1ab072f 100644 (file)
 
   <script src="vendor.621f9edf.js"></script>
 
-  <script type="text/javascript">
-    document.write("<base href='" + window.location.pathname + "' />");
-  </script>
+  <div dial-scripts></div>
 
-  <script src="app.338e7919.js"></script>
+  <script src="app.4a8d2b66.js"></script>
 
 </body>
 </html>