From 862e23e79cb07d933946c20ac521e821998136d5 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Fri, 12 Jul 2013 13:53:37 +0000 Subject: [PATCH] Add 'answer' button to invitation --- src/messenger/webim/js/compiled/widget.js | 12 ++++++------ src/messenger/webim/js/source/widget.js | 10 ++++++++++ src/messenger/webim/locales/en/properties | 1 + src/messenger/webim/locales/ru/properties | 1 + .../webim/styles/invitations/default/invite.css | 5 +++++ src/messenger/webim/view/invitation_themes.php | 1 + src/messenger/webim/widget.php | 3 ++- 7 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/messenger/webim/js/compiled/widget.js b/src/messenger/webim/js/compiled/widget.js index 5c0613fa..bae97b3b 100644 --- a/src/messenger/webim/js/compiled/widget.js +++ b/src/messenger/webim/js/compiled/widget.js @@ -8,11 +8,11 @@ var Mibew={}; (function(b){b.Objects={};b.Widget=function(a){this.requestedScripts={};this.handlers=[];this.handlersDependences={};this.requestURL=a.requestURL;this.requestTimeout=a.requestTimeout;this.visitorCookieName=a.visitorCookieName;this.inviteStyle=a.inviteStyle;this.locale=a.locale;this.dataToSend={};var c=document.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("href",a.inviteStyle);document.getElementsByTagName("head")[0].appendChild(c)};b.Widget.prototype.makeRequest= function(){var a=b.Utils.readCookie(this.visitorCookieName);this.dataToSend.entry=escape(document.referrer);this.dataToSend.locale=this.locale;this.dataToSend.rnd=Math.random();!1!==a?this.dataToSend.user_id=a:this.dataToSend.user_id&&delete this.dataToSend.user_id;this.doLoadScript(this.requestURL+"?"+this.getQuery(),"responseScript");this.dataToSend={}};b.Widget.prototype.getQuery=function(){var a=[],c;for(c in this.dataToSend)this.dataToSend.hasOwnProperty(c)&&a.push(c+"="+this.dataToSend[c]); -return a.join("&")};b.Widget.prototype.sendToServer=function(a){for(var c in a)if(a.hasOwnProperty(c)){var b=a[c];"string"!==typeof b&&"number"!==typeof b||("string"===typeof b&&(b=encodeURIComponent(b)),this.dataToSend[c]=b)}};b.Widget.prototype.onResponse=function(a){var c=a.load,d=a.handlers,e=a.data;a=a.dependences;var j=this,f;for(f in c)c.hasOwnProperty(f)&&!(f in this.requestedScripts)&&(this.requestedScripts[f]={},this.requestedScripts[f].url=c[f],this.requestedScripts[f].status="loading", -this.loadScript(f));for(var h in a)a.hasOwnProperty(h)&&(h in this.handlersDependences||(this.handlersDependences[h]=a[h]));for(c=0;c