From 0b5c5d5aba9c7cc8a1a7362ee987244a081c27c1 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Mon, 4 Mar 2013 10:50:40 +0000 Subject: [PATCH] Add ajax loader for Survey and LeaveMessage chat modules --- .../leave_message/leave_message_form.js | 4 +- .../model_views/survey/base_survey_form.js | 4 +- .../chat/model_views/survey/survey_form.js | 4 +- src/messenger/webim/js/compiled/chat_app.js | 12 +-- .../leave_message/leave_message_form.js | 4 +- .../model_views/survey/base_survey_form.js | 35 ++++++- .../chat/model_views/survey/survey_form.js | 2 + .../webim/styles/dialogs/default/chat.css | 5 +- .../leave_message/form.handlebars | 3 +- .../survey/form.handlebars | 3 +- .../dialogs/default/images/ajax-loader.gif | Bin 0 -> 1924 bytes .../dialogs/default/js/compiled/templates.js | 98 +++++++++--------- 12 files changed, 106 insertions(+), 68 deletions(-) create mode 100644 src/messenger/webim/styles/dialogs/default/images/ajax-loader.gif diff --git a/src/messenger/webim/js/compiled/chat/model_views/leave_message/leave_message_form.js b/src/messenger/webim/js/compiled/chat/model_views/leave_message/leave_message_form.js index e8e5551d..d2b4ae8c 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/leave_message/leave_message_form.js +++ b/src/messenger/webim/js/compiled/chat/model_views/leave_message/leave_message_form.js @@ -5,5 +5,5 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(d,e,b){var c=d.Views.BaseSurveyForm;d.Views.LeaveMessageForm=c.extend({template:e.templates.leave_message_form,events:b.extend({},c.prototype.events,{"click #send-message":"submitForm"}),ui:b.extend({},c.prototype.ui,{captcha:'input[name="captcha"]',captchaImg:"#captcha-img"}),modelEvents:b.extend({},c.prototype.modelEvents,{"submit:error":"showError submitError"}),submitForm:function(){var a={};this.model.get("groups")&&(a.groupId=this.ui.groupSelect.val());a.name=this.ui.name.val()||""; -a.email=this.ui.email.val()||"";a.message=this.ui.message.val()||"";this.model.get("showCaptcha")&&(a.captcha=this.ui.captcha.val()||"");this.model.set(a,{validate:!0});this.model.submit()},submitError:function(a,c){if(c.code==a.ERROR_WRONG_CAPTCHA&&a.get("showCaptcha")){var b=this.ui.captchaImg.attr("src"),b=b.replace(/\?d\=[0-9]+/,"");this.ui.captchaImg.attr("src",b+"?d="+(new Date).getTime())}}})})(Mibew,Handlebars,_); +(function(d,e,b){var c=d.Views.BaseSurveyForm;d.Views.LeaveMessageForm=c.extend({template:e.templates.leave_message_form,events:b.extend({},c.prototype.events,{"click #send-message":"submitForm"}),ui:b.extend({},c.prototype.ui,{captcha:'input[name="captcha"]',captchaImg:"#captcha-img"}),modelEvents:b.extend({},c.prototype.modelEvents,{"submit:error":"hideAjaxLoader showError submitError"}),submitForm:function(){this.showAjaxLoader();var a={};this.model.get("groups")&&(a.groupId=this.ui.groupSelect.val()); +a.name=this.ui.name.val()||"";a.email=this.ui.email.val()||"";a.message=this.ui.message.val()||"";this.model.get("showCaptcha")&&(a.captcha=this.ui.captcha.val()||"");this.model.set(a,{validate:!0});this.model.submit()},submitError:function(a,c){if(c.code==a.ERROR_WRONG_CAPTCHA&&a.get("showCaptcha")){var b=this.ui.captchaImg.attr("src"),b=b.replace(/\?d\=[0-9]+/,"");this.ui.captchaImg.attr("src",b+"?d="+(new Date).getTime())}}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/model_views/survey/base_survey_form.js b/src/messenger/webim/js/compiled/chat/model_views/survey/base_survey_form.js index a0ef4d16..803c80e3 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/survey/base_survey_form.js +++ b/src/messenger/webim/js/compiled/chat/model_views/survey/base_survey_form.js @@ -5,5 +5,5 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(c,d){c.Views.BaseSurveyForm=d.Marionette.ItemView.extend({events:{'change select[name="group"]':"changeGroupDescription","submit form":"preventSubmit"},ui:{groupSelect:'select[name="group"]',groupDescription:"#groupDescription",name:'input[name="name"]',email:'input[name="email"]',message:'textarea[name="message"]',errors:".errors"},modelEvents:{invalid:"showError","submit:error":"showError"},preventSubmit:function(a){a.preventDefault()},changeGroupDescription:function(){var a=this.ui.groupSelect.prop("selectedIndex"), -a=this.model.get("groups")[a].description||"";this.ui.groupDescription.text(a)},showError:function(a,b){this.ui.errors.html("string"==typeof b?b:b.message)}})})(Mibew,Backbone); +(function(c,d){c.Views.BaseSurveyForm=d.Marionette.ItemView.extend({events:{'change select[name="group"]':"changeGroupDescription","submit form":"preventSubmit"},ui:{groupSelect:'select[name="group"]',groupDescription:"#groupDescription",name:'input[name="name"]',email:'input[name="email"]',message:'textarea[name="message"]',errors:".errors",ajaxLoader:"#ajax-loader"},modelEvents:{invalid:"hideAjaxLoader showError","submit:error":"hideAjaxLoader showError"},preventSubmit:function(a){a.preventDefault()}, +changeGroupDescription:function(){var a=this.ui.groupSelect.prop("selectedIndex"),a=this.model.get("groups")[a].description||"";this.ui.groupDescription.text(a)},showError:function(a,b){this.ui.errors.html("string"==typeof b?b:b.message)},serializeData:function(){var a=this.model.toJSON();a.page=c.Objects.Models.page.toJSON();return a},showAjaxLoader:function(){this.ui.ajaxLoader.show()},hideAjaxLoader:function(){this.ui.ajaxLoader.hide()}})})(Mibew,Backbone); diff --git a/src/messenger/webim/js/compiled/chat/model_views/survey/survey_form.js b/src/messenger/webim/js/compiled/chat/model_views/survey/survey_form.js index 149c93ef..d03690c5 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/survey/survey_form.js +++ b/src/messenger/webim/js/compiled/chat/model_views/survey/survey_form.js @@ -5,5 +5,5 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b,d,e){var c=b.Views.BaseSurveyForm;b.Views.SurveyForm=c.extend({template:d.templates.survey_form,events:e.extend({},c.prototype.events,{"click #submit-survey":"submitForm"}),submitForm:function(){var a={};this.model.get("groups")&&(a.groupId=this.ui.groupSelect.val());this.model.get("canChangeName")&&(a.name=this.ui.name.val()||"");this.model.get("showEmail")&&(a.email=this.ui.email.val()||"");this.model.get("showMessage")&&(a.message=this.ui.message.val()||"");this.model.set(a,{validate:!0}); -this.model.submit()}})})(Mibew,Handlebars,_); +(function(b,d,e){var c=b.Views.BaseSurveyForm;b.Views.SurveyForm=c.extend({template:d.templates.survey_form,events:e.extend({},c.prototype.events,{"click #submit-survey":"submitForm"}),submitForm:function(){this.showAjaxLoader();var a={};this.model.get("groups")&&(a.groupId=this.ui.groupSelect.val());this.model.get("canChangeName")&&(a.name=this.ui.name.val()||"");this.model.get("showEmail")&&(a.email=this.ui.email.val()||"");this.model.get("showMessage")&&(a.message=this.ui.message.val()||"");this.model.set(a, +{validate:!0});this.model.submit()}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat_app.js b/src/messenger/webim/js/compiled/chat_app.js index 4cde48c5..837aa60c 100644 --- a/src/messenger/webim/js/compiled/chat_app.js +++ b/src/messenger/webim/js/compiled/chat_app.js @@ -164,8 +164,8 @@ a);this.trigger("multiple:add");return a}})})(Mibew,Backbone,_); Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(c,d){c.Views.BaseSurveyForm=d.Marionette.ItemView.extend({events:{'change select[name="group"]':"changeGroupDescription","submit form":"preventSubmit"},ui:{groupSelect:'select[name="group"]',groupDescription:"#groupDescription",name:'input[name="name"]',email:'input[name="email"]',message:'textarea[name="message"]',errors:".errors"},modelEvents:{invalid:"showError","submit:error":"showError"},preventSubmit:function(a){a.preventDefault()},changeGroupDescription:function(){var a=this.ui.groupSelect.prop("selectedIndex"), -a=this.model.get("groups")[a].description||"";this.ui.groupDescription.text(a)},showError:function(a,b){this.ui.errors.html("string"==typeof b?b:b.message)}})})(Mibew,Backbone); +(function(c,d){c.Views.BaseSurveyForm=d.Marionette.ItemView.extend({events:{'change select[name="group"]':"changeGroupDescription","submit form":"preventSubmit"},ui:{groupSelect:'select[name="group"]',groupDescription:"#groupDescription",name:'input[name="name"]',email:'input[name="email"]',message:'textarea[name="message"]',errors:".errors",ajaxLoader:"#ajax-loader"},modelEvents:{invalid:"hideAjaxLoader showError","submit:error":"hideAjaxLoader showError"},preventSubmit:function(a){a.preventDefault()}, +changeGroupDescription:function(){var a=this.ui.groupSelect.prop("selectedIndex"),a=this.model.get("groups")[a].description||"";this.ui.groupDescription.text(a)},showError:function(a,b){this.ui.errors.html("string"==typeof b?b:b.message)},serializeData:function(){var a=this.model.toJSON();a.page=c.Objects.Models.page.toJSON();return a},showAjaxLoader:function(){this.ui.ajaxLoader.show()},hideAjaxLoader:function(){this.ui.ajaxLoader.hide()}})})(Mibew,Backbone); /* This file is part of Mibew Messenger project. http://mibew.org @@ -244,8 +244,8 @@ this.model.toJSON();a.user=b.Objects.Models.user.toJSON();a.nameInput=this.nameI Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(d,e,b){var c=d.Views.BaseSurveyForm;d.Views.LeaveMessageForm=c.extend({template:e.templates.leave_message_form,events:b.extend({},c.prototype.events,{"click #send-message":"submitForm"}),ui:b.extend({},c.prototype.ui,{captcha:'input[name="captcha"]',captchaImg:"#captcha-img"}),modelEvents:b.extend({},c.prototype.modelEvents,{"submit:error":"showError submitError"}),submitForm:function(){var a={};this.model.get("groups")&&(a.groupId=this.ui.groupSelect.val());a.name=this.ui.name.val()||""; -a.email=this.ui.email.val()||"";a.message=this.ui.message.val()||"";this.model.get("showCaptcha")&&(a.captcha=this.ui.captcha.val()||"");this.model.set(a,{validate:!0});this.model.submit()},submitError:function(a,c){if(c.code==a.ERROR_WRONG_CAPTCHA&&a.get("showCaptcha")){var b=this.ui.captchaImg.attr("src"),b=b.replace(/\?d\=[0-9]+/,"");this.ui.captchaImg.attr("src",b+"?d="+(new Date).getTime())}}})})(Mibew,Handlebars,_); +(function(d,e,b){var c=d.Views.BaseSurveyForm;d.Views.LeaveMessageForm=c.extend({template:e.templates.leave_message_form,events:b.extend({},c.prototype.events,{"click #send-message":"submitForm"}),ui:b.extend({},c.prototype.ui,{captcha:'input[name="captcha"]',captchaImg:"#captcha-img"}),modelEvents:b.extend({},c.prototype.modelEvents,{"submit:error":"hideAjaxLoader showError submitError"}),submitForm:function(){this.showAjaxLoader();var a={};this.model.get("groups")&&(a.groupId=this.ui.groupSelect.val()); +a.name=this.ui.name.val()||"";a.email=this.ui.email.val()||"";a.message=this.ui.message.val()||"";this.model.get("showCaptcha")&&(a.captcha=this.ui.captcha.val()||"");this.model.set(a,{validate:!0});this.model.submit()},submitError:function(a,c){if(c.code==a.ERROR_WRONG_CAPTCHA&&a.get("showCaptcha")){var b=this.ui.captchaImg.attr("src"),b=b.replace(/\?d\=[0-9]+/,"");this.ui.captchaImg.attr("src",b+"?d="+(new Date).getTime())}}})})(Mibew,Handlebars,_); /* This file is part of Mibew Messenger project. http://mibew.org @@ -290,8 +290,8 @@ disableInput:function(){this.ui.message.attr("disabled","disabled")},clearInput: Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b,d,e){var c=b.Views.BaseSurveyForm;b.Views.SurveyForm=c.extend({template:d.templates.survey_form,events:e.extend({},c.prototype.events,{"click #submit-survey":"submitForm"}),submitForm:function(){var a={};this.model.get("groups")&&(a.groupId=this.ui.groupSelect.val());this.model.get("canChangeName")&&(a.name=this.ui.name.val()||"");this.model.get("showEmail")&&(a.email=this.ui.email.val()||"");this.model.get("showMessage")&&(a.message=this.ui.message.val()||"");this.model.set(a,{validate:!0}); -this.model.submit()}})})(Mibew,Handlebars,_); +(function(b,d,e){var c=b.Views.BaseSurveyForm;b.Views.SurveyForm=c.extend({template:d.templates.survey_form,events:e.extend({},c.prototype.events,{"click #submit-survey":"submitForm"}),submitForm:function(){this.showAjaxLoader();var a={};this.model.get("groups")&&(a.groupId=this.ui.groupSelect.val());this.model.get("canChangeName")&&(a.name=this.ui.name.val()||"");this.model.get("showEmail")&&(a.email=this.ui.email.val()||"");this.model.get("showMessage")&&(a.message=this.ui.message.val()||"");this.model.set(a, +{validate:!0});this.model.submit()}})})(Mibew,Handlebars,_); /* This file is part of Mibew Messenger project. http://mibew.org diff --git a/src/messenger/webim/js/source/chat/model_views/leave_message/leave_message_form.js b/src/messenger/webim/js/source/chat/model_views/leave_message/leave_message_form.js index 08fb6214..f40a1f18 100644 --- a/src/messenger/webim/js/source/chat/model_views/leave_message/leave_message_form.js +++ b/src/messenger/webim/js/source/chat/model_views/leave_message/leave_message_form.js @@ -56,7 +56,7 @@ {}, BaseView.prototype.modelEvents, { - 'submit:error': 'showError submitError' + 'submit:error': 'hideAjaxLoader showError submitError' } ), @@ -64,6 +64,8 @@ * Update model fields and call model.submit() method. */ submitForm: function() { + this.showAjaxLoader(); + // Update model fields var values = {}; diff --git a/src/messenger/webim/js/source/chat/model_views/survey/base_survey_form.js b/src/messenger/webim/js/source/chat/model_views/survey/base_survey_form.js index 8a3263d8..bc1ecf81 100644 --- a/src/messenger/webim/js/source/chat/model_views/survey/base_survey_form.js +++ b/src/messenger/webim/js/source/chat/model_views/survey/base_survey_form.js @@ -33,7 +33,8 @@ name: 'input[name="name"]', email: 'input[name="email"]', message: 'textarea[name="message"]', - errors: '.errors' + errors: '.errors', + ajaxLoader: '#ajax-loader' }, /** @@ -41,8 +42,8 @@ * @type Object */ modelEvents: { - 'invalid': 'showError', - 'submit:error': 'showError' + 'invalid': 'hideAjaxLoader showError', + 'submit:error': 'hideAjaxLoader showError' }, /** @@ -76,6 +77,34 @@ } // TODO: Think about moving this to template this.ui.errors.html(errorMessage); + }, + + /** + * Override Backbone.Marionette.ItemView.serializeData to pass some + * extra fields to template. + * + * Pass page data to template. + * + * @returns {Object} Template data + */ + serializeData: function() { + var data = this.model.toJSON(); + data.page = Mibew.Objects.Models.page.toJSON(); + return data; + }, + + /** + * Shows ajax loader + */ + showAjaxLoader: function() { + this.ui.ajaxLoader.show(); + }, + + /** + * Hide ajax loader + */ + hideAjaxLoader: function() { + this.ui.ajaxLoader.hide(); } } ); diff --git a/src/messenger/webim/js/source/chat/model_views/survey/survey_form.js b/src/messenger/webim/js/source/chat/model_views/survey/survey_form.js index e670c74d..9482cbaa 100644 --- a/src/messenger/webim/js/source/chat/model_views/survey/survey_form.js +++ b/src/messenger/webim/js/source/chat/model_views/survey/survey_form.js @@ -42,6 +42,8 @@ * method. */ submitForm: function() { + this.showAjaxLoader(); + var values = {}; // Update group id diff --git a/src/messenger/webim/styles/dialogs/default/chat.css b/src/messenger/webim/styles/dialogs/default/chat.css index 124e403a..1d988f21 100644 --- a/src/messenger/webim/styles/dialogs/default/chat.css +++ b/src/messenger/webim/styles/dialogs/default/chat.css @@ -453,7 +453,10 @@ ul li { .wndbr input { border: 1px solid #BBC4C4; } -#sound-region { +#ajax-loader { display: none; + position: absolute; + top: 200px; + left: 250px; } /* ----- */ \ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/form.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/form.handlebars index e2fe15a8..30b1127d 100644 --- a/src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/form.handlebars +++ b/src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/form.handlebars @@ -48,4 +48,5 @@ {{L10n "mailthread.perform"}}
 
- \ No newline at end of file + +
Loading...
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/survey/form.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/survey/form.handlebars index 9a04eeac..e3ffa2d4 100644 --- a/src/messenger/webim/styles/dialogs/default/handlebars_templates/survey/form.handlebars +++ b/src/messenger/webim/styles/dialogs/default/handlebars_templates/survey/form.handlebars @@ -45,4 +45,5 @@ {{L10n "presurvey.submit"}}
 
- \ No newline at end of file + +
Loading...
\ No newline at end of file diff --git a/src/messenger/webim/styles/dialogs/default/images/ajax-loader.gif b/src/messenger/webim/styles/dialogs/default/images/ajax-loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..524a4c86bbcc943cce99fc71f46ae53efd6ee29a GIT binary patch literal 1924 zcmciDSx{3~90u?RH>$=Sx5pEl!}Qm1Op}@wBiC-99$q24Fm*1s0L&aS;7`f z$O6UyM)p870U{K%ED5p%6fL5FB9yIIhg#cCeJKs`sTHTrblUTJ@0@#o-#6!f_WF43 za$!5$^*voGK9G(XHQy&0YTElV}88e9VXbzzs+?)MDv zr+Xaq+`iSxbdBLD_77`%+(~Bq$uP{hi1=^}lg&II6~heM8WDXe284YBz!8SG99H&O z`6vj`ukZCy+}`zKux&ZSju#eDN)W7Pq?cEB4P}@V!F<0x*Roj8*alR5a{6C zB0I)E=YT$vW#U!U=(yH&%suH4xE9$Nf+0QFDyQu+bY>9p(uk>I>?&2=PSXc!-0H> z0a#XkEjnLvl4YH-wZOd=P;5+2^;KClHM*%$4L7#8)l>+o+T})IUq7kKelYBeei)}A zj9h3TjoREHKE>VBcMOzH-JR?i*DlHzdgf+ckv^2DtamaqIf`KTYSp_QYcIc`POf7# zPG#Ak%u2SP*;yt&99zq;H5YdT)F1Xd@JS~~e?_Z_^Yz{{%6KZZ*W6D33JTjgRyypnD7Mp|p_Vi5}ulZv4=!8e&|_CKX*!JAnF!7j6~w9 z#KCu4d_S>ohkfA?O4uvS%_T>&SQg?I@;2CnD__^Q2v5Sh`7c#n*neYu>G$@!kQyt5 zbu10cN<&2j*(Xy02%1IDrxbed1pt~$&!h56{JfzoXrcu)4^mO7sBch`j4{+B1PFXO z9wq^r1H1@o2^@Rb_73^3sIMP;#a1imxnEAWE$QIg%5U{w)l|93pC(REj33&xD2m#Lx-IVu{`V2E;Ms zV)y4;RsgByuyjfaEf$%?1>kvXWFdvdLW#%{4-}8fcZmwhF3gqtSzS!e$jss;E7grn z&2P(X1hd)?eSvFDhwLxHh=|45{$LqaOYL#)wK0GqYw=JmWK6R;UwyqvuU=5jHO)*f ztv+TxxWN=I!|~$%mJoVcdZ0hU1y#6oh_rmP3 P&HyBA0J*N*fyVVGRPZTU literal 0 HcmV?d00001 diff --git a/src/messenger/webim/styles/dialogs/default/js/compiled/templates.js b/src/messenger/webim/styles/dialogs/default/js/compiled/templates.js index de671152..0ae2cf01 100644 --- a/src/messenger/webim/styles/dialogs/default/js/compiled/templates.js +++ b/src/messenger/webim/styles/dialogs/default/js/compiled/templates.js @@ -4,60 +4,60 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(){var r=Handlebars.template,s=Handlebars.templates=Handlebars.templates||{};s.chat_avatar=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g=this.escapeExpression;return(b=f["if"].call(c,c.imageLink,{hash:{},inverse:this.program(3,function(){return'
'},d),fn:this.program(1,function(b,a){var d,c;d=''},d),data:d}))||0===b?b:""});s.chat_controls_close=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g;b=f.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return c='
')});s.chat_controls_history=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g;b=f.helperMissing; -a=this.escapeExpression;d={hash:{},data:d};return c='
')});s.chat_controls_redirect=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g,q=f.helperMissing,p=this.escapeExpression;return(b=f["if"].call(c,(g=c.user,null==g||!1===g?g:g.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(b,a){var c,d; -c={hash:{},data:a};return c='\n
\n')},d),data:d}))||0===b?b:""});s.chat_controls_refresh=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g;b=f.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return c='
')});s.chat_controls_secure_mode=r(function(){this.compilerInfo=[2,">= 1.0.0-rc.3"];return'
'});s.chat_controls_send_mail=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g;b=f.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return c='
')});s.chat_controls_sound=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g=f.helperMissing,q=this.escapeExpression;return(b=f["if"].call(c,c.enabled,{hash:{},inverse:this.program(3,function(b,a){var c,d;c={hash:{},data:a};return c='\n
\n')},d),fn:this.program(1,function(b, -a){var c,d;c={hash:{},data:a};return c='\n
\n')},d),data:d}))||0===b?b:""});s.chat_controls_user_name=r(function(b,c,f,a,d){function g(b,c){var j,e,a;j=""+('\n
= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};var g=this.escapeExpression;return(b=f["if"].call(d,d.imageLink,{hash:{},inverse:this.program(3,function(){return'
'},c),fn:this.program(1,function(b,a){var d,c;d=''},c),data:c}))||0===b?b:""});s.chat_controls_close=r(function(b,d,f,a,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};var g;b=f.helperMissing;a=this.escapeExpression;c={hash:{},data:c};return d='
')});s.chat_controls_history=r(function(b,d,f,a,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};var g;b=f.helperMissing; +a=this.escapeExpression;c={hash:{},data:c};return d='
')});s.chat_controls_redirect=r(function(b,d,f,a,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};var g,q=f.helperMissing,p=this.escapeExpression;return(b=f["if"].call(d,(g=d.user,null==g||!1===g?g:g.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(b,a){var c,d; +c={hash:{},data:a};return c='\n
\n')},c),data:c}))||0===b?b:""});s.chat_controls_refresh=r(function(b,d,f,a,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};var g;b=f.helperMissing;a=this.escapeExpression;c={hash:{},data:c};return d='
')});s.chat_controls_secure_mode=r(function(){this.compilerInfo=[2,">= 1.0.0-rc.3"];return'
'});s.chat_controls_send_mail=r(function(b,d,f,a,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};var g;b=f.helperMissing;a=this.escapeExpression;c={hash:{},data:c};return d='
')});s.chat_controls_sound=r(function(b,d,f,a,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};var g=f.helperMissing,q=this.escapeExpression;return(b=f["if"].call(d,d.enabled,{hash:{},inverse:this.program(3,function(b,a){var c,d;c={hash:{},data:a};return c='\n
\n')},c),fn:this.program(1,function(b, +a){var c,d;c={hash:{},data:a};return c='\n
\n')},c),data:c}))||0===b?b:""});s.chat_controls_user_name=r(function(b,d,f,a,c){function g(b,c){var j,e,a;j=""+('\n
\n \n '}function q(b,a){var j,e,c;c={hash:{},data:a};j='\n '+h((e=(e=b.user,null==e||!1=== -e?e:e.name),typeof e===t?e.apply(b):e))+'\n \n '}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var p,t="function",h=this.escapeExpression,l=f.helperMissing,k=this;return(b=f["if"].call(c,(p=c.user,null==p||!1===p?p:p.canChangeName),{hash:{},inverse:k.program(6,function(b,c){var j,e; -j={hash:{},data:c};return j="\n"+(h((e=f.L10n,e?e.call(b,"chat.client.name",j):l.call(b,"L10n","chat.client.name",j)))+" "+h((e=(e=b.user,null==e||!1===e?e:e.name),typeof e===t?e.apply(b):e))+"\n")},d),fn:k.program(1,function(b,c){var j,e;j={hash:{},data:c};j='\n '+(h((e=f.L10n,e?e.call(b,"chat.client.name",j):l.call(b,"L10n","chat.client.name",j)))+"\n ");if((e=f["if"].call(b,b.nameInput,{hash:{},inverse:k.program(4,q,c),fn:k.program(2,g,c), -data:c}))||0===e)j+=e;return j+="\n"},d),data:d}))||0===b?b:""});s.chat_layout=r(function(b,c,f,a,d){function g(j){var e;return j=""+('\n \n ')}function q(j){var e;return j=""+("\n \n '}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};var p,t="function",h=this.escapeExpression,l=f.helperMissing,k=this;return(b=f["if"].call(d,(p=d.user,null==p||!1===p?p:p.canChangeName),{hash:{},inverse:k.program(6,function(b,c){var j,e; +j={hash:{},data:c};return j="\n"+(h((e=f.L10n,e?e.call(b,"chat.client.name",j):l.call(b,"L10n","chat.client.name",j)))+" "+h((e=(e=b.user,null==e||!1===e?e:e.name),typeof e===t?e.apply(b):e))+"\n")},c),fn:k.program(1,function(b,c){var j,e;j={hash:{},data:c};j='\n '+(h((e=f.L10n,e?e.call(b,"chat.client.name",j):l.call(b,"L10n","chat.client.name",j)))+"\n ");if((e=f["if"].call(b,b.nameInput,{hash:{},inverse:k.program(4,q,c),fn:k.program(2,g,c), +data:c}))||0===e)j+=e;return j+="\n"},c),data:c}))||0===b?b:""});s.chat_layout=r(function(b,d,f,a,c){function g(j){var e;return j=""+('\n \n ')}function q(j){var e;return j=""+("\n \n \n \n ')}function p(j){var e;return j=""+("\n \n \n \n ')}function t(j){var e;return j=""+('\n \n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var h,l,k="function",m=this.escapeExpression,n=this;a=f.helperMissing; -b='\n
\n \n
\n\n\n
\n
\n \n
\n
\n
\n\n\n
\n
\n '; -if((l=f.unless.call(c,(h=c.user,null==h||!1===h?h:h.isAgent),{hash:{},inverse:n.noop,fn:n.program(11,function(){return'\n
\n '},d),data:d}))||0===l)b+=l;d={hash:{},data:d};return b=b+'\n \n
\n \n
\n
\n
\n\n\n
\n\n\n')});s.chat_message=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g,q=this.escapeExpression,p=f.helperMissing;b={hash:{},data:d};b=""+(q((g=f.formatTime,g?g.call(c,c.created,b):p.call(c,"formatTime",c.created,b)))+" \n");if((g=f["if"].call(c,c.name,{hash:{},inverse:this.noop,fn:this.program(1,function(b, -c){var a,d;a="";(d=f.name)?d=d.call(b,{hash:{},data:c}):(d=b.name,d="function"===typeof d?d.apply(b):d);return a+=q(d)+": "},d),data:d}))||0===g)b+=g;b+="\n";if((g=f["if"].call(c,c.allowFormatting,{hash:{},inverse:this.program(5,function(b,c){var a, -d;d={hash:{},data:c};return q((a=f.apply,a?a.call(b,b.message,"urlReplace, nl2br",d):p.call(b,"apply",b.message,"urlReplace, nl2br",d)))},d),fn:this.program(3,function(b,c){var a,d;d={hash:{},data:c};return q((a=f.apply,a?a.call(b,b.message,"urlReplace, nl2br, allowTags",d):p.call(b,"apply",b.message,"urlReplace, nl2br, allowTags",d)))},d),data:d}))||0===g)b+=g;return b+="
"});s.chat_message_form=r(function(b,c,f,a,d){function g(b,c){var j,e;j={hash:{},data:c};j='\n \n \n ");if((e=f.each.call(b,b.predefinedAnswers,{hash:{},inverse:k.noop,fn:k.program(5,q,c),data:c}))||0===e)j+=e;return j+="\n \n "}function q(b){var c;return b=""+("\n \n ")}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f|| -b.helpers;d=d||{};var p,r="function",h=this.escapeExpression,l=f.helperMissing,k=this;b='
\n';if((a=f["if"].call(c,(p=c.user,null==p||!1===p?p:p.canPost),{hash:{},inverse:k.noop,fn:k.program(1,function(){return'\n
\n \n
\n'},d),data:d}))||0===a)b+=a;b+='\n
\n\n
\n';if((a=f["if"].call(c,(p=c.user, +b.helpers;c=c||{};var p,r="function",h=this.escapeExpression,l=f.helperMissing,k=this;b='
\n';if((a=f["if"].call(d,(p=d.user,null==p||!1===p?p:p.canPost),{hash:{},inverse:k.noop,fn:k.program(1,function(){return'\n
\n \n
\n'},c),data:c}))||0===a)b+=a;b+='\n
\n\n
\n';if((a=f["if"].call(d,(p=d.user, null==p||!1===p?p:p.canPost),{hash:{},inverse:k.noop,fn:k.program(3,function(b,c){var j,e,a;j='\n
\n
\n ';if((a=f["if"].call(b,(e=b.user,null==e||!1===e?e:e.isAgent),{hash:{},inverse:k.noop,fn:k.program(4,g,c),data:c}))||0===a)j+=a;a={hash:{},data:c};j=j+'\n
\n ');a={hash:{},data:c};return j+=h((e=f.L10n,e?e.call(b,"chat.window.send_message_short_and_shortcut",a):l.call(b,"L10n","chat.window.send_message_short_and_shortcut",a)))+"\n
\n"},d),data:d}))||0===a)b+=a;return b+'\n
\n
'});s.chat_status_base=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};b=this.escapeExpression;(f=f.title)?f=f.call(c,{hash:{},data:d}):(f=c.title,f="function"===typeof f?f.apply(c):f);return b(f)}); -s.chat_status_message=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};b=this.escapeExpression;(f=f.message)?f=f.call(c,{hash:{},data:d}):(f=c.message,f="function"===typeof f?f.apply(c):f);return b(f)});s.chat_status_typing=r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g;b=f.helperMissing;a=this.escapeExpression;d={hash:{},data:d};return a((g=f.L10n,g?g.call(c,"typing.remote",d):b.call(c,"L10n","typing.remote",d)))});s.leave_message_description= -r(function(b,c,f,a,d){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;d=d||{};var g,q=f.helperMissing,p=this.escapeExpression;a={hash:{},data:d};b='
\n \n ');a={hash:{},data:d};b+=
-p((g=f.L10n,g?g.call(c,\n \n
\n
';a={hash:{},data:d};return b+=p((g=f.L10n,g?g.call(c,"leavemessage.descr",a):q.call(c,"L10n","leavemessage.descr",a)))+"
"});s.leave_message_form=r(function(b,c,f,a,d){function g(e,b){var c,a;c=''}function q(e, +a)))+'">');a={hash:{},data:c};return j+=h((e=f.L10n,e?e.call(b,"chat.window.send_message_short_and_shortcut",a):l.call(b,"L10n","chat.window.send_message_short_and_shortcut",a)))+"\n
\n"},c),data:c}))||0===a)b+=a;return b+'\n
\n
'});s.chat_status_base=r(function(b,d,f,a,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};b=this.escapeExpression;(f=f.title)?f=f.call(d,{hash:{},data:c}):(f=d.title,f="function"===typeof f?f.apply(d):f);return b(f)}); +s.chat_status_message=r(function(b,d,f,a,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};b=this.escapeExpression;(f=f.message)?f=f.call(d,{hash:{},data:c}):(f=d.message,f="function"===typeof f?f.apply(d):f);return b(f)});s.chat_status_typing=r(function(b,d,f,a,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};var g;b=f.helperMissing;a=this.escapeExpression;c={hash:{},data:c};return a((g=f.L10n,g?g.call(d,"typing.remote",c):b.call(d,"L10n","typing.remote",c)))});s.leave_message_description= +r(function(b,d,f,a,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||b.helpers;c=c||{};var g,q=f.helperMissing,p=this.escapeExpression;a={hash:{},data:c};b='
\n \n ');a={hash:{},data:c};b+=
+p((g=f.L10n,g?g.call(d,\n \n
\n
';a={hash:{},data:c};return b+=p((g=f.L10n,g?g.call(d,"leavemessage.descr",a):q.call(d,"L10n","leavemessage.descr",a)))+"
"});s.leave_message_form=r(function(b,d,f,a,c){function g(e,b){var c,a;c=''}function q(e, b){var c,a,j;c=""+('\n