From a32cf9128b7a5b8b8e98e03d687f155f9e24de27 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Fri, 1 Mar 2013 13:38:12 +0000 Subject: [PATCH] Update structure of Chat Handlebars templates. Recompile templates. --- .../js/compiled/chat/model_views/avatar.js | 2 +- .../chat/model_views/controls/close.js | 2 +- .../chat/model_views/controls/history.js | 2 +- .../chat/model_views/controls/redirect.js | 2 +- .../chat/model_views/controls/refresh.js | 2 +- .../chat/model_views/controls/secure_mode.js | 2 +- .../chat/model_views/controls/send_mail.js | 2 +- .../chat/model_views/controls/sound.js | 2 +- .../chat/model_views/controls/user_name.js | 2 +- .../chat/model_views/messages/message.js | 8 ++ .../chat/model_views/messages/message_form.js | 8 +- .../chat/model_views/status/base_status.js | 2 +- .../chat/model_views/status/message.js | 2 +- .../chat/model_views/status/typing.js | 2 +- src/messenger/webim/js/compiled/chat_app.js | 39 ++++--- .../js/source/chat/model_views/avatar.js | 2 +- .../source/chat/model_views/controls/close.js | 2 +- .../chat/model_views/controls/history.js | 2 +- .../chat/model_views/controls/redirect.js | 2 +- .../chat/model_views/controls/refresh.js | 2 +- .../chat/model_views/controls/secure_mode.js | 2 +- .../chat/model_views/controls/send_mail.js | 2 +- .../source/chat/model_views/controls/sound.js | 2 +- .../chat/model_views/controls/user_name.js | 2 +- .../chat/model_views/messages/message.js | 25 ++++ .../chat/model_views/messages/message_form.js | 2 +- .../chat/model_views/status/base_status.js | 2 +- .../source/chat/model_views/status/message.js | 2 +- .../source/chat/model_views/status/typing.js | 2 +- .../{ => chat}/avatar.handlebars | 0 .../controls/close.handlebars} | 0 .../controls/history.handlebars} | 0 .../controls/redirect.handlebars} | 0 .../controls/refresh.handlebars} | 0 .../controls/secure_mode.handlebars} | 0 .../controls/send_mail.handlebars} | 0 .../controls/sound.handlebars} | 0 .../controls/user_name.handlebars} | 0 .../layout.handlebars} | 0 .../{ => chat}/message.handlebars | 0 .../{ => chat}/message_form.handlebars | 0 .../status/base.handlebars} | 0 .../status/message.handlebars} | 0 .../status/typing.handlebars} | 0 .../description.handlebars} | 0 .../form.handlebars} | 0 .../layout.handlebars} | 0 .../sent_description.handlebars} | 0 .../form.handlebars} | 0 .../layout.handlebars} | 0 .../dialogs/default/js/compiled/templates.js | 109 +++++++++--------- 51 files changed, 140 insertions(+), 99 deletions(-) create mode 100644 src/messenger/webim/js/compiled/chat/model_views/messages/message.js create mode 100644 src/messenger/webim/js/source/chat/model_views/messages/message.js rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{ => chat}/avatar.handlebars (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{close_control.handlebars => chat/controls/close.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{history_control.handlebars => chat/controls/history.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{redirect_control.handlebars => chat/controls/redirect.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{refresh_control.handlebars => chat/controls/refresh.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{secure_mode_control.handlebars => chat/controls/secure_mode.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{send_mail_control.handlebars => chat/controls/send_mail.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{sound_control.handlebars => chat/controls/sound.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{user_name_control.handlebars => chat/controls/user_name.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{chat_layout.handlebars => chat/layout.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{ => chat}/message.handlebars (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{ => chat}/message_form.handlebars (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{status.handlebars => chat/status/base.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{status_message.handlebars => chat/status/message.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{status_typing.handlebars => chat/status/typing.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{leave_message_description.handlebars => leave_message/description.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{leave_message_form.handlebars => leave_message/form.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{leave_message_layout.handlebars => leave_message/layout.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{leave_message_sent_description.handlebars => leave_message/sent_description.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{survey_form.handlebars => survey/form.handlebars} (100%) rename src/messenger/webim/styles/dialogs/default/handlebars_templates/{survey_layout.handlebars => survey/layout.handlebars} (100%) diff --git a/src/messenger/webim/js/compiled/chat/model_views/avatar.js b/src/messenger/webim/js/compiled/chat/model_views/avatar.js index 9b00491b..f417b8a7 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/avatar.js +++ b/src/messenger/webim/js/compiled/chat/model_views/avatar.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b,c){a.Views.Avatar=b.Marionette.ItemView.extend({template:c.templates.avatar,className:"avatar",modelEvents:{change:"render"}})})(Mibew,Backbone,Handlebars); +(function(a,b,c){a.Views.Avatar=b.Marionette.ItemView.extend({template:c.templates.chat_avatar,className:"avatar",modelEvents:{change:"render"}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/model_views/controls/close.js b/src/messenger/webim/js/compiled/chat/model_views/controls/close.js index d50d809c..36044f14 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/controls/close.js +++ b/src/messenger/webim/js/compiled/chat/model_views/controls/close.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,c,d){a.Views.CloseControl=a.Views.Control.extend({template:c.templates.close_control,events:d.extend({},a.Views.Control.prototype.events,{click:"closeThread"}),closeThread:function(){var b=a.Localization.get("chat.close.confirmation");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_); +(function(a,c,d){a.Views.CloseControl=a.Views.Control.extend({template:c.templates.chat_controls_close,events:d.extend({},a.Views.Control.prototype.events,{click:"closeThread"}),closeThread:function(){var b=a.Localization.get("chat.close.confirmation");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/model_views/controls/history.js b/src/messenger/webim/js/compiled/chat/model_views/controls/history.js index 4cd989f8..85271e4f 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/controls/history.js +++ b/src/messenger/webim/js/compiled/chat/model_views/controls/history.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b,d,e){b.Views.HistoryControl=b.Views.Control.extend({template:d.templates.history_control,events:e.extend({},b.Views.Control.prototype.events,{click:"showHistory"}),showHistory:function(){var c=b.Objects.Models.user,a=this.model.get("link");c.get("isAgent")&&a&&(c=this.model.get("windowParams"),a=a.replace("&","&","g"),a=window.open(a,"UserHistory",c),null!==a&&(a.focus(),a.opener=window))}})})(Mibew,Handlebars,_); +(function(b,d,e){b.Views.HistoryControl=b.Views.Control.extend({template:d.templates.chat_controls_history,events:e.extend({},b.Views.Control.prototype.events,{click:"showHistory"}),showHistory:function(){var c=b.Objects.Models.user,a=this.model.get("link");c.get("isAgent")&&a&&(c=this.model.get("windowParams"),a=a.replace("&","&","g"),a=window.open(a,"UserHistory",c),null!==a&&(a.focus(),a.opener=window))}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/model_views/controls/redirect.js b/src/messenger/webim/js/compiled/chat/model_views/controls/redirect.js index dc425879..3935d615 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/controls/redirect.js +++ b/src/messenger/webim/js/compiled/chat/model_views/controls/redirect.js @@ -5,5 +5,5 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,d,e){a.Views.RedirectControl=a.Views.Control.extend({template:d.templates.redirect_control,events:e.extend({},a.Views.Control.prototype.events,{click:"redirect"}),initialize:function(){a.Objects.Models.user.on("change",this.render,this)},serializeData:function(){var b=this.model.toJSON();b.user=a.Objects.Models.user.toJSON();return b},redirect:function(){var b=a.Objects.Models.user;if(b.get("isAgent")&&b.get("canPost")&&(b=this.model.get("link"))){var c=a.Objects.Models.page.get("style"); +(function(a,d,e){a.Views.RedirectControl=a.Views.Control.extend({template:d.templates.chat_controls_redirect,events:e.extend({},a.Views.Control.prototype.events,{click:"redirect"}),initialize:function(){a.Objects.Models.user.on("change",this.render,this)},serializeData:function(){var b=this.model.toJSON();b.user=a.Objects.Models.user.toJSON();return b},redirect:function(){var b=a.Objects.Models.user;if(b.get("isAgent")&&b.get("canPost")&&(b=this.model.get("link"))){var c=a.Objects.Models.page.get("style"); window.location.href=b.replace(/\&\;/g,"&")+(c?"&style="+c:"")}}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/model_views/controls/refresh.js b/src/messenger/webim/js/compiled/chat/model_views/controls/refresh.js index 0b35088e..ed31813b 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/controls/refresh.js +++ b/src/messenger/webim/js/compiled/chat/model_views/controls/refresh.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b,c){a.Views.RefreshControl=a.Views.Control.extend({template:b.templates.refresh_control,events:c.extend({},a.Views.Control.prototype.events,{click:"refresh"}),refresh:function(){this.model.refresh()}})})(Mibew,Handlebars,_); +(function(a,b,c){a.Views.RefreshControl=a.Views.Control.extend({template:b.templates.chat_controls_refresh,events:c.extend({},a.Views.Control.prototype.events,{click:"refresh"}),refresh:function(){this.model.refresh()}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/model_views/controls/secure_mode.js b/src/messenger/webim/js/compiled/chat/model_views/controls/secure_mode.js index 81f57712..024ca5db 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/controls/secure_mode.js +++ b/src/messenger/webim/js/compiled/chat/model_views/controls/secure_mode.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,d,e){a.Views.SecureModeControl=a.Views.Control.extend({template:d.templates.secure_mode_control,events:e.extend({},a.Views.Control.prototype.events,{click:"secure"}),secure:function(){var b=this.model.get("link");if(b){var c=a.Objects.Models.page.get("style");window.location.href=b.replace(/\&\;/g,"&")+(c?"&style="+c:"")}}})})(Mibew,Handlebars,_); +(function(a,d,e){a.Views.SecureModeControl=a.Views.Control.extend({template:d.templates.chat_controls_secure_mode,events:e.extend({},a.Views.Control.prototype.events,{click:"secure"}),secure:function(){var b=this.model.get("link");if(b){var c=a.Objects.Models.page.get("style");window.location.href=b.replace(/\&\;/g,"&")+(c?"&style="+c:"")}}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/model_views/controls/send_mail.js b/src/messenger/webim/js/compiled/chat/model_views/controls/send_mail.js index efafae8e..746a46a5 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/controls/send_mail.js +++ b/src/messenger/webim/js/compiled/chat/model_views/controls/send_mail.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b,d,e){b.Views.SendMailControl=b.Views.Control.extend({template:d.templates.send_mail_control,events:e.extend({},b.Views.Control.prototype.events,{click:"sendMail"}),sendMail:function(){var a=this.model.get("link"),c=b.Objects.Models.page;if(a){var d=this.model.get("windowParams"),c=c.get("style"),a=a.replace(/\&\;/g,"&")+(c?"&style="+c:""),a=window.open(a,"ForwardMail",d);null!==a&&(a.focus(),a.opener=window)}}})})(Mibew,Handlebars,_); +(function(b,d,e){b.Views.SendMailControl=b.Views.Control.extend({template:d.templates.chat_controls_send_mail,events:e.extend({},b.Views.Control.prototype.events,{click:"sendMail"}),sendMail:function(){var a=this.model.get("link"),c=b.Objects.Models.page;if(a){var d=this.model.get("windowParams"),c=c.get("style"),a=a.replace(/\&\;/g,"&")+(c?"&style="+c:""),a=window.open(a,"ForwardMail",d);null!==a&&(a.focus(),a.opener=window)}}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/model_views/controls/sound.js b/src/messenger/webim/js/compiled/chat/model_views/controls/sound.js index 251d0196..4e09c1fe 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/controls/sound.js +++ b/src/messenger/webim/js/compiled/chat/model_views/controls/sound.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b,c){a.Views.SoundControl=a.Views.Control.extend({template:b.templates.sound_control,events:c.extend({},a.Views.Control.prototype.events,{click:"toggle"}),toggle:function(){this.model.set({enabled:!this.model.get("enabled")})}})})(Mibew,Handlebars,_); +(function(a,b,c){a.Views.SoundControl=a.Views.Control.extend({template:b.templates.chat_controls_sound,events:c.extend({},a.Views.Control.prototype.events,{click:"toggle"}),toggle:function(){this.model.set({enabled:!this.model.get("enabled")})}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/model_views/controls/user_name.js b/src/messenger/webim/js/compiled/chat/model_views/controls/user_name.js index 4db5a437..11cd0717 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/controls/user_name.js +++ b/src/messenger/webim/js/compiled/chat/model_views/controls/user_name.js @@ -5,5 +5,5 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b,c,d){b.Views.UserNameControl=b.Views.Control.extend({template:c.templates.user_name_control,events:d.extend({},b.Views.Control.prototype.events,{"click .user-name-control-set":"changeName","click .user-name-control-change":"showNameInput","keydown #user-name-control-input":"inputKeyDown"}),ui:{nameInput:"#user-name-control-input"},initialize:function(){b.Objects.Models.user.on("change:name",this.hideNameInput,this);this.nameInput=b.Objects.Models.user.get("defaultName")},serializeData:function(){var a= +(function(b,c,d){b.Views.UserNameControl=b.Views.Control.extend({template:c.templates.chat_controls_user_name,events:d.extend({},b.Views.Control.prototype.events,{"click .user-name-control-set":"changeName","click .user-name-control-change":"showNameInput","keydown #user-name-control-input":"inputKeyDown"}),ui:{nameInput:"#user-name-control-input"},initialize:function(){b.Objects.Models.user.on("change:name",this.hideNameInput,this);this.nameInput=b.Objects.Models.user.get("defaultName")},serializeData:function(){var a= this.model.toJSON();a.user=b.Objects.Models.user.toJSON();a.nameInput=this.nameInput;return a},inputKeyDown:function(a){a=a.which;(13==a||10==a)&&this.changeName()},hideNameInput:function(){this.nameInput=!1;this.render()},showNameInput:function(){this.nameInput=!0;this.render()},changeName:function(){var a=this.ui.nameInput.val();this.model.changeName(a)}})})(Mibew,Handlebars,_); diff --git a/src/messenger/webim/js/compiled/chat/model_views/messages/message.js b/src/messenger/webim/js/compiled/chat/model_views/messages/message.js new file mode 100644 index 00000000..7cd5112e --- /dev/null +++ b/src/messenger/webim/js/compiled/chat/model_views/messages/message.js @@ -0,0 +1,8 @@ +/* + This file is part of Mibew Messenger project. + http://mibew.org + + Copyright (c) 2005-2011 Mibew Messenger Community + License: http://mibew.org/license.php +*/ +(function(a,b){a.Views.Message=a.Views.Message.extend({template:b.templates.chat_message})})(Mibew,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/model_views/messages/message_form.js b/src/messenger/webim/js/compiled/chat/model_views/messages/message_form.js index 33bcaeef..3c7042b7 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/messages/message_form.js +++ b/src/messenger/webim/js/compiled/chat/model_views/messages/message_form.js @@ -5,7 +5,7 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b,d,e){b.Views.MessageForm=d.Marionette.ItemView.extend({template:e.templates.message_form,events:{"click #send-message":"postMessage","keydown #message-input":"messageKeyDown","keyup #message-input":"checkUserTyping","change #message-input":"checkUserTyping","change #predefined":"selectPredefinedAnswer","focus #message-input":"setFocus","blur #message-input":"dropFocus"},modelEvents:{change:"render"},ui:{message:"#message-input",send:"#send-message",predefinedAnswer:"#predefined"},initialize:function(){b.Objects.Models.user.on("change:canPost", -this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},postMessage:function(){var a=this.ui.message.val();""!=a&&(this.disableInput(),this.model.postMessage(a));b.Objects.Collections.messages.on("multiple:add",this.postMessageComplete,this)},messageKeyDown:function(a){var c=a.which;a=a.ctrlKey;(13==c&&(a||this.model.get("ignoreCtrl"))||10==c)&&this.postMessage()},enableInput:function(){this.ui.message.removeAttr("disabled")},disableInput:function(){this.ui.message.attr("disabled", -"disabled")},clearInput:function(){this.ui.message.val("").change()},postMessageComplete:function(){this.clearInput();this.enableInput();this.focused&&this.ui.focus();b.Objects.Collections.messages.off("multiple:add",this.postMessageComplete,this)},selectPredefinedAnswer:function(){var a=this.ui.message,c=this.ui.predefinedAnswer,b=c.get(0).selectedIndex;b&&(a.val(this.model.get("predefinedAnswers")[b-1].full).change(),a.focus(),c.get(0).selectedIndex=0)},checkUserTyping:function(){var a=b.Objects.Models.user, -c=""!=this.ui.message.val();c!=a.get("typing")&&a.set({typing:c})},setFocus:function(){this.focused=!0},dropFocus:function(){this.focused=!1}})})(Mibew,Backbone,Handlebars); +(function(b,d,e){b.Views.MessageForm=d.Marionette.ItemView.extend({template:e.templates.chat_message_form,events:{"click #send-message":"postMessage","keydown #message-input":"messageKeyDown","keyup #message-input":"checkUserTyping","change #message-input":"checkUserTyping","change #predefined":"selectPredefinedAnswer","focus #message-input":"setFocus","blur #message-input":"dropFocus"},modelEvents:{change:"render"},ui:{message:"#message-input",send:"#send-message",predefinedAnswer:"#predefined"}, +initialize:function(){b.Objects.Models.user.on("change:canPost",this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},postMessage:function(){var a=this.ui.message.val();""!=a&&(this.disableInput(),this.model.postMessage(a));b.Objects.Collections.messages.on("multiple:add",this.postMessageComplete,this)},messageKeyDown:function(a){var c=a.which;a=a.ctrlKey;(13==c&&(a||this.model.get("ignoreCtrl"))||10==c)&&this.postMessage()},enableInput:function(){this.ui.message.removeAttr("disabled")}, +disableInput:function(){this.ui.message.attr("disabled","disabled")},clearInput:function(){this.ui.message.val("").change()},postMessageComplete:function(){this.clearInput();this.enableInput();this.focused&&this.ui.focus();b.Objects.Collections.messages.off("multiple:add",this.postMessageComplete,this)},selectPredefinedAnswer:function(){var a=this.ui.message,c=this.ui.predefinedAnswer,b=c.get(0).selectedIndex;b&&(a.val(this.model.get("predefinedAnswers")[b-1].full).change(),a.focus(),c.get(0).selectedIndex= +0)},checkUserTyping:function(){var a=b.Objects.Models.user,c=""!=this.ui.message.val();c!=a.get("typing")&&a.set({typing:c})},setFocus:function(){this.focused=!0},dropFocus:function(){this.focused=!1}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/model_views/status/base_status.js b/src/messenger/webim/js/compiled/chat/model_views/status/base_status.js index d49244b5..039adc13 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/status/base_status.js +++ b/src/messenger/webim/js/compiled/chat/model_views/status/base_status.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b,c){a.Views.Status=b.Marionette.ItemView.extend({template:c.templates.status,className:"status",modelEvents:{change:"render"},onBeforeRender:function(){this.model.get("visible")?this.$el.show():this.$el.hide()}})})(Mibew,Backbone,Handlebars); +(function(a,b,c){a.Views.Status=b.Marionette.ItemView.extend({template:c.templates.chat_status_base,className:"status",modelEvents:{change:"render"},onBeforeRender:function(){this.model.get("visible")?this.$el.show():this.$el.hide()}})})(Mibew,Backbone,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/model_views/status/message.js b/src/messenger/webim/js/compiled/chat/model_views/status/message.js index 04a2bc1f..4ef8d64b 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/status/message.js +++ b/src/messenger/webim/js/compiled/chat/model_views/status/message.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b){a.Views.StatusMessage=a.Views.Status.extend({template:b.templates.status_message})})(Mibew,Handlebars); +(function(a,b){a.Views.StatusMessage=a.Views.Status.extend({template:b.templates.chat_status_message})})(Mibew,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat/model_views/status/typing.js b/src/messenger/webim/js/compiled/chat/model_views/status/typing.js index b3606320..e5f3ac3d 100644 --- a/src/messenger/webim/js/compiled/chat/model_views/status/typing.js +++ b/src/messenger/webim/js/compiled/chat/model_views/status/typing.js @@ -5,4 +5,4 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b){a.Views.StatusTyping=a.Views.Status.extend({template:b.templates.status_typing})})(Mibew,Handlebars); +(function(a,b){a.Views.StatusTyping=a.Views.Status.extend({template:b.templates.chat_status_typing})})(Mibew,Handlebars); diff --git a/src/messenger/webim/js/compiled/chat_app.js b/src/messenger/webim/js/compiled/chat_app.js index a8054b4a..cc789d30 100644 --- a/src/messenger/webim/js/compiled/chat_app.js +++ b/src/messenger/webim/js/compiled/chat_app.js @@ -157,7 +157,7 @@ a);this.trigger("multiple:add");return a}})})(Mibew,Backbone,_); Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b,c){a.Views.Status=b.Marionette.ItemView.extend({template:c.templates.status,className:"status",modelEvents:{change:"render"},onBeforeRender:function(){this.model.get("visible")?this.$el.show():this.$el.hide()}})})(Mibew,Backbone,Handlebars); +(function(a,b,c){a.Views.Status=b.Marionette.ItemView.extend({template:c.templates.chat_status_base,className:"status",modelEvents:{change:"render"},onBeforeRender:function(){this.model.get("visible")?this.$el.show():this.$el.hide()}})})(Mibew,Backbone,Handlebars); /* This file is part of Mibew Messenger project. http://mibew.org @@ -172,28 +172,28 @@ a=this.model.get("groups").descriptions||[];this.ui.groupDescription.text(a[b]|| Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b,c){a.Views.Avatar=b.Marionette.ItemView.extend({template:c.templates.avatar,className:"avatar",modelEvents:{change:"render"}})})(Mibew,Backbone,Handlebars); +(function(a,b,c){a.Views.Avatar=b.Marionette.ItemView.extend({template:c.templates.chat_avatar,className:"avatar",modelEvents:{change:"render"}})})(Mibew,Backbone,Handlebars); /* This file is part of Mibew Messenger project. http://mibew.org Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,c,d){a.Views.CloseControl=a.Views.Control.extend({template:c.templates.close_control,events:d.extend({},a.Views.Control.prototype.events,{click:"closeThread"}),closeThread:function(){var b=a.Localization.get("chat.close.confirmation");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_); +(function(a,c,d){a.Views.CloseControl=a.Views.Control.extend({template:c.templates.chat_controls_close,events:d.extend({},a.Views.Control.prototype.events,{click:"closeThread"}),closeThread:function(){var b=a.Localization.get("chat.close.confirmation");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_); /* This file is part of Mibew Messenger project. http://mibew.org Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b,d,e){b.Views.HistoryControl=b.Views.Control.extend({template:d.templates.history_control,events:e.extend({},b.Views.Control.prototype.events,{click:"showHistory"}),showHistory:function(){var c=b.Objects.Models.user,a=this.model.get("link");c.get("isAgent")&&a&&(c=this.model.get("windowParams"),a=a.replace("&","&","g"),a=window.open(a,"UserHistory",c),null!==a&&(a.focus(),a.opener=window))}})})(Mibew,Handlebars,_); +(function(b,d,e){b.Views.HistoryControl=b.Views.Control.extend({template:d.templates.chat_controls_history,events:e.extend({},b.Views.Control.prototype.events,{click:"showHistory"}),showHistory:function(){var c=b.Objects.Models.user,a=this.model.get("link");c.get("isAgent")&&a&&(c=this.model.get("windowParams"),a=a.replace("&","&","g"),a=window.open(a,"UserHistory",c),null!==a&&(a.focus(),a.opener=window))}})})(Mibew,Handlebars,_); /* This file is part of Mibew Messenger project. http://mibew.org Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,d,e){a.Views.RedirectControl=a.Views.Control.extend({template:d.templates.redirect_control,events:e.extend({},a.Views.Control.prototype.events,{click:"redirect"}),initialize:function(){a.Objects.Models.user.on("change",this.render,this)},serializeData:function(){var b=this.model.toJSON();b.user=a.Objects.Models.user.toJSON();return b},redirect:function(){var b=a.Objects.Models.user;if(b.get("isAgent")&&b.get("canPost")&&(b=this.model.get("link"))){var c=a.Objects.Models.page.get("style"); +(function(a,d,e){a.Views.RedirectControl=a.Views.Control.extend({template:d.templates.chat_controls_redirect,events:e.extend({},a.Views.Control.prototype.events,{click:"redirect"}),initialize:function(){a.Objects.Models.user.on("change",this.render,this)},serializeData:function(){var b=this.model.toJSON();b.user=a.Objects.Models.user.toJSON();return b},redirect:function(){var b=a.Objects.Models.user;if(b.get("isAgent")&&b.get("canPost")&&(b=this.model.get("link"))){var c=a.Objects.Models.page.get("style"); window.location.href=b.replace(/\&\;/g,"&")+(c?"&style="+c:"")}}})})(Mibew,Handlebars,_); /* This file is part of Mibew Messenger project. @@ -201,35 +201,35 @@ window.location.href=b.replace(/\&\;/g,"&")+(c?"&style="+c:"")}}})})(Mibew,Ha Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b,c){a.Views.RefreshControl=a.Views.Control.extend({template:b.templates.refresh_control,events:c.extend({},a.Views.Control.prototype.events,{click:"refresh"}),refresh:function(){this.model.refresh()}})})(Mibew,Handlebars,_); +(function(a,b,c){a.Views.RefreshControl=a.Views.Control.extend({template:b.templates.chat_controls_refresh,events:c.extend({},a.Views.Control.prototype.events,{click:"refresh"}),refresh:function(){this.model.refresh()}})})(Mibew,Handlebars,_); /* This file is part of Mibew Messenger project. http://mibew.org Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,d,e){a.Views.SecureModeControl=a.Views.Control.extend({template:d.templates.secure_mode_control,events:e.extend({},a.Views.Control.prototype.events,{click:"secure"}),secure:function(){var b=this.model.get("link");if(b){var c=a.Objects.Models.page.get("style");window.location.href=b.replace(/\&\;/g,"&")+(c?"&style="+c:"")}}})})(Mibew,Handlebars,_); +(function(a,d,e){a.Views.SecureModeControl=a.Views.Control.extend({template:d.templates.chat_controls_secure_mode,events:e.extend({},a.Views.Control.prototype.events,{click:"secure"}),secure:function(){var b=this.model.get("link");if(b){var c=a.Objects.Models.page.get("style");window.location.href=b.replace(/\&\;/g,"&")+(c?"&style="+c:"")}}})})(Mibew,Handlebars,_); /* This file is part of Mibew Messenger project. http://mibew.org Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b,d,e){b.Views.SendMailControl=b.Views.Control.extend({template:d.templates.send_mail_control,events:e.extend({},b.Views.Control.prototype.events,{click:"sendMail"}),sendMail:function(){var a=this.model.get("link"),c=b.Objects.Models.page;if(a){var d=this.model.get("windowParams"),c=c.get("style"),a=a.replace(/\&\;/g,"&")+(c?"&style="+c:""),a=window.open(a,"ForwardMail",d);null!==a&&(a.focus(),a.opener=window)}}})})(Mibew,Handlebars,_); +(function(b,d,e){b.Views.SendMailControl=b.Views.Control.extend({template:d.templates.chat_controls_send_mail,events:e.extend({},b.Views.Control.prototype.events,{click:"sendMail"}),sendMail:function(){var a=this.model.get("link"),c=b.Objects.Models.page;if(a){var d=this.model.get("windowParams"),c=c.get("style"),a=a.replace(/\&\;/g,"&")+(c?"&style="+c:""),a=window.open(a,"ForwardMail",d);null!==a&&(a.focus(),a.opener=window)}}})})(Mibew,Handlebars,_); /* This file is part of Mibew Messenger project. http://mibew.org Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b,c){a.Views.SoundControl=a.Views.Control.extend({template:b.templates.sound_control,events:c.extend({},a.Views.Control.prototype.events,{click:"toggle"}),toggle:function(){this.model.set({enabled:!this.model.get("enabled")})}})})(Mibew,Handlebars,_); +(function(a,b,c){a.Views.SoundControl=a.Views.Control.extend({template:b.templates.chat_controls_sound,events:c.extend({},a.Views.Control.prototype.events,{click:"toggle"}),toggle:function(){this.model.set({enabled:!this.model.get("enabled")})}})})(Mibew,Handlebars,_); /* This file is part of Mibew Messenger project. http://mibew.org Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b,c,d){b.Views.UserNameControl=b.Views.Control.extend({template:c.templates.user_name_control,events:d.extend({},b.Views.Control.prototype.events,{"click .user-name-control-set":"changeName","click .user-name-control-change":"showNameInput","keydown #user-name-control-input":"inputKeyDown"}),ui:{nameInput:"#user-name-control-input"},initialize:function(){b.Objects.Models.user.on("change:name",this.hideNameInput,this);this.nameInput=b.Objects.Models.user.get("defaultName")},serializeData:function(){var a= +(function(b,c,d){b.Views.UserNameControl=b.Views.Control.extend({template:c.templates.chat_controls_user_name,events:d.extend({},b.Views.Control.prototype.events,{"click .user-name-control-set":"changeName","click .user-name-control-change":"showNameInput","keydown #user-name-control-input":"inputKeyDown"}),ui:{nameInput:"#user-name-control-input"},initialize:function(){b.Objects.Models.user.on("change:name",this.hideNameInput,this);this.nameInput=b.Objects.Models.user.get("defaultName")},serializeData:function(){var a= this.model.toJSON();a.user=b.Objects.Models.user.toJSON();a.nameInput=this.nameInput;return a},inputKeyDown:function(a){a=a.which;(13==a||10==a)&&this.changeName()},hideNameInput:function(){this.nameInput=!1;this.render()},showNameInput:function(){this.nameInput=!0;this.render()},changeName:function(){var a=this.ui.nameInput.val();this.model.changeName(a)}})})(Mibew,Handlebars,_); /* This file is part of Mibew Messenger project. @@ -259,24 +259,31 @@ a.email=this.ui.email.val()||"";a.message=this.ui.message.val()||"";this.model.g Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(b,d,e){b.Views.MessageForm=d.Marionette.ItemView.extend({template:e.templates.message_form,events:{"click #send-message":"postMessage","keydown #message-input":"messageKeyDown","keyup #message-input":"checkUserTyping","change #message-input":"checkUserTyping","change #predefined":"selectPredefinedAnswer","focus #message-input":"setFocus","blur #message-input":"dropFocus"},modelEvents:{change:"render"},ui:{message:"#message-input",send:"#send-message",predefinedAnswer:"#predefined"},initialize:function(){b.Objects.Models.user.on("change:canPost", -this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},postMessage:function(){var a=this.ui.message.val();""!=a&&(this.disableInput(),this.model.postMessage(a));b.Objects.Collections.messages.on("multiple:add",this.postMessageComplete,this)},messageKeyDown:function(a){var c=a.which;a=a.ctrlKey;(13==c&&(a||this.model.get("ignoreCtrl"))||10==c)&&this.postMessage()},enableInput:function(){this.ui.message.removeAttr("disabled")},disableInput:function(){this.ui.message.attr("disabled", -"disabled")},clearInput:function(){this.ui.message.val("").change()},postMessageComplete:function(){this.clearInput();this.enableInput();this.focused&&this.ui.focus();b.Objects.Collections.messages.off("multiple:add",this.postMessageComplete,this)},selectPredefinedAnswer:function(){var a=this.ui.message,c=this.ui.predefinedAnswer,b=c.get(0).selectedIndex;b&&(a.val(this.model.get("predefinedAnswers")[b-1].full).change(),a.focus(),c.get(0).selectedIndex=0)},checkUserTyping:function(){var a=b.Objects.Models.user, -c=""!=this.ui.message.val();c!=a.get("typing")&&a.set({typing:c})},setFocus:function(){this.focused=!0},dropFocus:function(){this.focused=!1}})})(Mibew,Backbone,Handlebars); +(function(a,b){a.Views.Message=a.Views.Message.extend({template:b.templates.chat_message})})(Mibew,Handlebars); /* This file is part of Mibew Messenger project. http://mibew.org Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b){a.Views.StatusMessage=a.Views.Status.extend({template:b.templates.status_message})})(Mibew,Handlebars); +(function(b,d,e){b.Views.MessageForm=d.Marionette.ItemView.extend({template:e.templates.chat_message_form,events:{"click #send-message":"postMessage","keydown #message-input":"messageKeyDown","keyup #message-input":"checkUserTyping","change #message-input":"checkUserTyping","change #predefined":"selectPredefinedAnswer","focus #message-input":"setFocus","blur #message-input":"dropFocus"},modelEvents:{change:"render"},ui:{message:"#message-input",send:"#send-message",predefinedAnswer:"#predefined"}, +initialize:function(){b.Objects.Models.user.on("change:canPost",this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},postMessage:function(){var a=this.ui.message.val();""!=a&&(this.disableInput(),this.model.postMessage(a));b.Objects.Collections.messages.on("multiple:add",this.postMessageComplete,this)},messageKeyDown:function(a){var c=a.which;a=a.ctrlKey;(13==c&&(a||this.model.get("ignoreCtrl"))||10==c)&&this.postMessage()},enableInput:function(){this.ui.message.removeAttr("disabled")}, +disableInput:function(){this.ui.message.attr("disabled","disabled")},clearInput:function(){this.ui.message.val("").change()},postMessageComplete:function(){this.clearInput();this.enableInput();this.focused&&this.ui.focus();b.Objects.Collections.messages.off("multiple:add",this.postMessageComplete,this)},selectPredefinedAnswer:function(){var a=this.ui.message,c=this.ui.predefinedAnswer,b=c.get(0).selectedIndex;b&&(a.val(this.model.get("predefinedAnswers")[b-1].full).change(),a.focus(),c.get(0).selectedIndex= +0)},checkUserTyping:function(){var a=b.Objects.Models.user,c=""!=this.ui.message.val();c!=a.get("typing")&&a.set({typing:c})},setFocus:function(){this.focused=!0},dropFocus:function(){this.focused=!1}})})(Mibew,Backbone,Handlebars); /* This file is part of Mibew Messenger project. http://mibew.org Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(a,b){a.Views.StatusTyping=a.Views.Status.extend({template:b.templates.status_typing})})(Mibew,Handlebars); +(function(a,b){a.Views.StatusMessage=a.Views.Status.extend({template:b.templates.chat_status_message})})(Mibew,Handlebars); +/* + This file is part of Mibew Messenger project. + http://mibew.org + Copyright (c) 2005-2011 Mibew Messenger Community + License: http://mibew.org/license.php +*/ +(function(a,b){a.Views.StatusTyping=a.Views.Status.extend({template:b.templates.chat_status_typing})})(Mibew,Handlebars); /* This file is part of Mibew Messenger project. http://mibew.org diff --git a/src/messenger/webim/js/source/chat/model_views/avatar.js b/src/messenger/webim/js/source/chat/model_views/avatar.js index ad888ea3..77e764ed 100644 --- a/src/messenger/webim/js/source/chat/model_views/avatar.js +++ b/src/messenger/webim/js/source/chat/model_views/avatar.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.avatar, + template: Handlebars.templates.chat_avatar, /** * Class name for view's DOM element diff --git a/src/messenger/webim/js/source/chat/model_views/controls/close.js b/src/messenger/webim/js/source/chat/model_views/controls/close.js index 60fdb45d..b0260460 100644 --- a/src/messenger/webim/js/source/chat/model_views/controls/close.js +++ b/src/messenger/webim/js/source/chat/model_views/controls/close.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.close_control, + template: Handlebars.templates.chat_controls_close, /** * Map ui events to view methods diff --git a/src/messenger/webim/js/source/chat/model_views/controls/history.js b/src/messenger/webim/js/source/chat/model_views/controls/history.js index f338d1c5..15e7d5b7 100644 --- a/src/messenger/webim/js/source/chat/model_views/controls/history.js +++ b/src/messenger/webim/js/source/chat/model_views/controls/history.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.history_control, + template: Handlebars.templates.chat_controls_history, /** * Map ui events to view methods diff --git a/src/messenger/webim/js/source/chat/model_views/controls/redirect.js b/src/messenger/webim/js/source/chat/model_views/controls/redirect.js index 55a3993a..5ee55c12 100644 --- a/src/messenger/webim/js/source/chat/model_views/controls/redirect.js +++ b/src/messenger/webim/js/source/chat/model_views/controls/redirect.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.redirect_control, + template: Handlebars.templates.chat_controls_redirect, /** * Map ui events to view methods diff --git a/src/messenger/webim/js/source/chat/model_views/controls/refresh.js b/src/messenger/webim/js/source/chat/model_views/controls/refresh.js index 1bc9ec8c..cbc4c1e2 100644 --- a/src/messenger/webim/js/source/chat/model_views/controls/refresh.js +++ b/src/messenger/webim/js/source/chat/model_views/controls/refresh.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.refresh_control, + template: Handlebars.templates.chat_controls_refresh, /** * Map ui events to view methods diff --git a/src/messenger/webim/js/source/chat/model_views/controls/secure_mode.js b/src/messenger/webim/js/source/chat/model_views/controls/secure_mode.js index df755020..07bed396 100644 --- a/src/messenger/webim/js/source/chat/model_views/controls/secure_mode.js +++ b/src/messenger/webim/js/source/chat/model_views/controls/secure_mode.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.secure_mode_control, + template: Handlebars.templates.chat_controls_secure_mode, /** * Map ui events to view methods diff --git a/src/messenger/webim/js/source/chat/model_views/controls/send_mail.js b/src/messenger/webim/js/source/chat/model_views/controls/send_mail.js index 79ccc110..b15c6cc6 100644 --- a/src/messenger/webim/js/source/chat/model_views/controls/send_mail.js +++ b/src/messenger/webim/js/source/chat/model_views/controls/send_mail.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.send_mail_control, + template: Handlebars.templates.chat_controls_send_mail, /** * Map ui events to view methods diff --git a/src/messenger/webim/js/source/chat/model_views/controls/sound.js b/src/messenger/webim/js/source/chat/model_views/controls/sound.js index 5d268259..8c7fef68 100644 --- a/src/messenger/webim/js/source/chat/model_views/controls/sound.js +++ b/src/messenger/webim/js/source/chat/model_views/controls/sound.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.sound_control, + template: Handlebars.templates.chat_controls_sound, /** * Map ui events to view methods diff --git a/src/messenger/webim/js/source/chat/model_views/controls/user_name.js b/src/messenger/webim/js/source/chat/model_views/controls/user_name.js index 969193f7..2b44be2b 100644 --- a/src/messenger/webim/js/source/chat/model_views/controls/user_name.js +++ b/src/messenger/webim/js/source/chat/model_views/controls/user_name.js @@ -15,7 +15,7 @@ * Template function * @type Function */ - template: Handlebars.templates.user_name_control, + template: Handlebars.templates.chat_controls_user_name, /** * Map ui events to view methods diff --git a/src/messenger/webim/js/source/chat/model_views/messages/message.js b/src/messenger/webim/js/source/chat/model_views/messages/message.js new file mode 100644 index 00000000..1baaec02 --- /dev/null +++ b/src/messenger/webim/js/source/chat/model_views/messages/message.js @@ -0,0 +1,25 @@ +/** + * @preserve This file is part of Mibew Messenger project. + * http://mibew.org + * + * Copyright (c) 2005-2011 Mibew Messenger Community + * License: http://mibew.org/license.php + */ + +(function(Mibew, Handlebars) { + + /** + * @class Represents message view + */ + Mibew.Views.Message = Mibew.Views.Message.extend( + /** @lends Mibew.Views.Message.prototype */ + { + /** + * Template function + * @type Function + */ + template: Handlebars.templates.chat_message + } + ); + +})(Mibew, Handlebars); \ No newline at end of file diff --git a/src/messenger/webim/js/source/chat/model_views/messages/message_form.js b/src/messenger/webim/js/source/chat/model_views/messages/message_form.js index 29c1c64a..3f233a82 100644 --- a/src/messenger/webim/js/source/chat/model_views/messages/message_form.js +++ b/src/messenger/webim/js/source/chat/model_views/messages/message_form.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.message_form, + template: Handlebars.templates.chat_message_form, /** * UI events hash. diff --git a/src/messenger/webim/js/source/chat/model_views/status/base_status.js b/src/messenger/webim/js/source/chat/model_views/status/base_status.js index af1e7856..f27e8df4 100644 --- a/src/messenger/webim/js/source/chat/model_views/status/base_status.js +++ b/src/messenger/webim/js/source/chat/model_views/status/base_status.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.status, + template: Handlebars.templates.chat_status_base, /** * Class name for view's DOM element diff --git a/src/messenger/webim/js/source/chat/model_views/status/message.js b/src/messenger/webim/js/source/chat/model_views/status/message.js index 00fa8c4a..785f1cc5 100644 --- a/src/messenger/webim/js/source/chat/model_views/status/message.js +++ b/src/messenger/webim/js/source/chat/model_views/status/message.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.status_message + template: Handlebars.templates.chat_status_message } ); diff --git a/src/messenger/webim/js/source/chat/model_views/status/typing.js b/src/messenger/webim/js/source/chat/model_views/status/typing.js index 1e7ef1ad..e61fe3f6 100644 --- a/src/messenger/webim/js/source/chat/model_views/status/typing.js +++ b/src/messenger/webim/js/source/chat/model_views/status/typing.js @@ -18,7 +18,7 @@ * Template function * @type Function */ - template: Handlebars.templates.status_typing + template: Handlebars.templates.chat_status_typing } ); diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/avatar.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/avatar.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/avatar.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/avatar.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/close_control.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/close.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/close_control.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/close.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/history_control.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/history.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/history_control.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/history.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/redirect_control.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/redirect.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/redirect_control.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/redirect.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/refresh_control.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/refresh.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/refresh_control.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/refresh.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/secure_mode_control.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/secure_mode.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/secure_mode_control.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/secure_mode.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/send_mail_control.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/send_mail.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/send_mail_control.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/send_mail.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/sound_control.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/sound.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/sound_control.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/sound.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/user_name_control.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/user_name.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/user_name_control.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/controls/user_name.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat_layout.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/layout.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/chat_layout.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/layout.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/message.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/message.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/message.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/message.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/message_form.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/message_form.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/message_form.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/message_form.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/status.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/status/base.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/status.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/status/base.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/status_message.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/status/message.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/status_message.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/status/message.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/status_typing.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/status/typing.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/status_typing.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/chat/status/typing.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message_description.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/description.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message_description.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/description.handlebars 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 similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message_form.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/form.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message_layout.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/layout.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message_layout.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/layout.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message_sent_description.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/sent_description.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message_sent_description.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/leave_message/sent_description.handlebars 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 similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/survey_form.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/survey/form.handlebars diff --git a/src/messenger/webim/styles/dialogs/default/handlebars_templates/survey_layout.handlebars b/src/messenger/webim/styles/dialogs/default/handlebars_templates/survey/layout.handlebars similarity index 100% rename from src/messenger/webim/styles/dialogs/default/handlebars_templates/survey_layout.handlebars rename to src/messenger/webim/styles/dialogs/default/handlebars_templates/survey/layout.handlebars 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 738ff4b6..0281befe 100644 --- a/src/messenger/webim/styles/dialogs/default/js/compiled/templates.js +++ b/src/messenger/webim/styles/dialogs/default/js/compiled/templates.js @@ -4,57 +4,58 @@ Copyright (c) 2005-2011 Mibew Messenger Community License: http://mibew.org/license.php */ -(function(){var r=Handlebars.template,s=Handlebars.templates=Handlebars.templates||{};s.user_name_control=r(function(a,e,f,b,c){function j(a,b){var d,g,c;d=""+('\n
\n \n '}function k(a,b){var d,g,c;c={hash:{},data:b};d='\n '+h((g=(g=a.user,null==g||!1===g?g:g.name),typeof g===p?g.apply(a):g))+'\n \n '}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var l,p="function",h=this.escapeExpression,m=f.helperMissing,n=this;return(a=f["if"].call(e,(l=e.user,null==l||!1===l?l:l.canChangeName),{hash:{},inverse:n.program(6,function(a,b){var d,g;d={hash:{},data:b};return d="\n"+(h((g=f.L10n,g?g.call(a,"chat.client.name",d):m.call(a,"L10n","chat.client.name",d)))+" "+h((g=(g=a.user,null==g||!1===g?g:g.name),typeof g===p?g.apply(a): -g))+"\n")},c),fn:n.program(1,function(a,b){var d,g;d={hash:{},data:b};d='\n '+(h((g=f.L10n,g?g.call(a,"chat.client.name",d):m.call(a,"L10n","chat.client.name",d)))+"\n ");if((g=f["if"].call(a,a.nameInput,{hash:{},inverse:n.program(4,k,b),fn:n.program(2,j,b),data:b}))||0===g)d+=g;return d+="\n"},c),data:c}))||0===a?a:""});s.status_typing=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j;a=f.helperMissing;b=this.escapeExpression; -c={hash:{},data:c};return b((j=f.L10n,j?j.call(e,"typing.remote",c):a.call(e,"L10n","typing.remote",c)))});s.leave_message_form=r(function(a,e,f,b,c){function j(a,b){var c,d;c=''}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var k,l="function",p=this.escapeExpression,h=this,m=f.helperMissing;a=""+('
\n \n \n \n ';if((b=f.unless.call(e,e.groups,{hash:{},inverse:h.noop,fn:h.program(1,function(a,b){var c;return(c=f["if"].call(a,a.groupId,{hash:{}, -inverse:h.noop,fn:h.program(2,j,b),data:b}))||0===c?c:""},c),data:c}))||0===b)a+=b;b={hash:{},data:c};a=a+'\n\n
\n\n \n \n \n \n \n \n \n \n \n ';if((b=f["if"].call(e,e.groups,{hash:{},inverse:h.noop,fn:h.program(4,function(a,b){var c, -d,g;g={hash:{},data:b};c='\n \n \n \n \n \n \n \n \n "},c),data:c}))||0===b)a+=b;a+="\n \n \n \n \n ";if((b=f["if"].call(e,e.showCaptcha,{hash:{},inverse:h.noop,fn:h.program(6,function(){return'\n \n \n \n \n '},c),data:c}))||0===b)a+=b;a+='\n
'+(p((k=f.L10n,k?k.call(e,"form.field.email",b):m.call(e,"L10n","form.field.email",b)))+':
';b={hash:{},data:c};a+=p((k=f.L10n,k?k.call(e,"form.field.name",b):m.call(e,"L10n","form.field.name",b)))+':
'+(p((d=f.L10n,d?d.call(a,"form.field.department",g):m.call(a,"L10n","form.field.department",g)))+'
';g={hash:{},data:b};return c+=p((d=f.L10n,d?d.call(a,"form.field.department.description", -g):m.call(a,"L10n","form.field.department.description",g)))+''+p((d=(d=a.groups,null==d||!1===d?d:d.defaultDescription),typeof d===l?d.apply(a):d))+"
";b={hash:{},data:c};a+=p((k=f.L10n,k?k.call(e,"form.field.message",b):m.call(e,"L10n","form.field.message",b)))+':\n \n
\n '; -b={hash:{},data:c};return a+=p((k=f.L10n,k?k.call(e,"mailthread.perform",b):m.call(e,"L10n","mailthread.perform",b)))+'\n
 
\n
'});s.leave_message_layout=r(function(a,e,f,b,c){function j(a){var d;return a=""+('\n \n ')}function k(a){var d;return a=""+("\n \n \n \n ')}function l(a){var d;return a=""+("\n \n \n \n ')}function p(a){var d;return a=""+('\n \n ')}this.compilerInfo= -[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var h,m="function",n=this.escapeExpression,q=this;a='\n
\n \n
\n\n\n
\n
\n
\n
\n\n\n
'}); -s.avatar=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j=this.escapeExpression;return(a=f["if"].call(e,e.imageLink,{hash:{},inverse:this.program(3,function(){return'
'},c),fn:this.program(1,function(a,b){var c,e;c=''},c),data:c}))||0===a?a:""});s.close_control=r(function(a,e,f,b, -c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j;a=f.helperMissing;b=this.escapeExpression;c={hash:{},data:c};return e='
')});s.history_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j;a=f.helperMissing;b=this.escapeExpression;c={hash:{},data:c};return e='
')});s.status_message=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};a=this.escapeExpression;(f=f.message)?f=f.call(e,{hash:{},data:c}):(f=e.message,f="function"===typeof f?f.apply(e):f);return a(f)});s.survey_form=r(function(a,e,f,b,c){function j(a,b){var c,d;c=''}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var k,l="function",p=this.escapeExpression,h=this,m=f.helperMissing;a=""+('
\n \n \n \n \n ';if((b=f.unless.call(e,e.showEmail,{hash:{},inverse:h.noop,fn:h.program(1,function(a,b){var c,d;c=''},c),data:c}))||0===b)a+=b;a+="\n "; -if((b=f.unless.call(e,e.groups,{hash:{},inverse:h.noop,fn:h.program(3,function(a,b){var c;return(c=f["if"].call(a,a.groupId,{hash:{},inverse:h.noop,fn:h.program(4,j,b),data:b}))||0===c?c:""},c),data:c}))||0===b)a+=b;a+="\n ";if((b=f.unless.call(e,e.showMessage,{hash:{},inverse:h.noop,fn:h.program(6,function(a,b){var c,d;c=''},c),data:c}))||0===b)a+= -b;a+='\n\n
\n\n \n ';if((b=f["if"].call(e,e.groups,{hash:{},inverse:h.noop,fn:h.program(8,function(a,b){var c,d,g;g={hash:{},data:b};c="\n \n \n \n \n \n \n \n \n "},c),data:c}))||0===b)a+=b;b={hash:{},data:c};a=a+"\n \n \n \n \n ";if((b=f["if"].call(e,e.showEmail,{hash:{},inverse:h.noop,fn:h.program(12,function(a,c){var b,d;b={hash:{},data:c};b="\n \n \n \n \n '},c),data:c}))||0===b)a+=b;a+="\n ";if((b=f["if"].call(e,e.showMessage,{hash:{},inverse:h.noop,fn:h.program(14,function(a,b){var c,d;c={hash:{},data:b};c="\n \n \n \n \n "},c),data:c}))||0===b)a+=b;a+='\n
"+(p((d=f.L10n,d?d.call(a,"form.field.department",g):m.call(a,"L10n","form.field.department",g)))+'
"; -g={hash:{},data:b};return c+=p((d=f.L10n,d?d.call(a,"form.field.department.description",g):m.call(a,"L10n","form.field.department.description",g)))+''+p((d=(d=a.groups,null==d||!1===d?d:d.defaultDescription),typeof d===l?d.apply(a):d))+"
"+(p((k=f.L10n,k?k.call(e,"presurvey.name",b):m.call(e,"L10n","presurvey.name",b)))+'
"+(p((d=f.L10n,d?d.call(a,"presurvey.mail",b):m.call(a,"L10n", -"presurvey.mail",b)))+'
"+(p((d=f.L10n,d?d.call(a,"presurvey.question",c):m.call(a, -"L10n","presurvey.question",c)))+'
\n ';b={hash:{},data:c};return a+=p((k=f.L10n,k?k.call(e,"presurvey.submit",b):m.call(e,"L10n","presurvey.submit", -b)))+'\n
 
\n
'});s.chat_layout=r(function(a,e,f,b,c){function j(d){var a;return d=""+('\n \n ')}function k(a){var g;return a=""+("\n \n \n \n ')}function l(a){var g;return a=""+("\n \n \n \n ')}function p(a){var g;return a=""+('\n \n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var h,m,n="function",q=this.escapeExpression,t=this;b=f.helperMissing; -a='\n
\n \n
\n\n\n
\n
\n \n
\n
\n
\n\n\n
\n
\n '; -if((m=f.unless.call(e,(h=e.user,null==h||!1===h?h:h.isAgent),{hash:{},inverse:t.noop,fn:t.program(11,function(){return'\n
\n '},c),data:c}))||0===m)a+=m;c={hash:{},data:c};return a=a+'\n \n
\n \n
\n
\n
\n\n\n
\n\n\n')});s.secure_mode_control=r(function(){this.compilerInfo=[2,">= 1.0.0-rc.3"];return'
'});s.sound_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j=f.helperMissing,k=this.escapeExpression;return(a=f["if"].call(e,e.enabled,{hash:{},inverse:this.program(3,function(a,b){var c, -e;c={hash:{},data:b};return c='\n
\n')},c),fn:this.program(1,function(a,c){var b,e;b={hash:{},data:c};return b='\n
\n')},c),data:c}))||0=== -a?a:""});s.message=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=this.escapeExpression,l=f.helperMissing;a={hash:{},data:c};a=""+(k((j=f.formatTime,j?j.call(e,e.created,a):l.call(e,"formatTime",e.created,a)))+" \n");if((j=f["if"].call(e,e.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c,e;c="";(e=f.name)? -e=e.call(a,{hash:{},data:b}):(e=a.name,e="function"===typeof e?e.apply(a):e);return c+=k(e)+": "},c),data:c}))||0===j)a+=j;a+="\n";if((j=f["if"].call(e,e.allowFormatting,{hash:{},inverse:this.program(5,function(a,c){var b,e;e={hash:{},data:c};return k((b=f.apply,b?b.call(a,a.message,"urlReplace, nl2br",e):l.call(a,"apply",a.message,"urlReplace, nl2br",e)))},c),fn:this.program(3, -function(a,c){var b,e;e={hash:{},data:c};return k((b=f.apply,b?b.call(a,a.message,"urlReplace, nl2br, allowTags",e):l.call(a,"apply",a.message,"urlReplace, nl2br, allowTags",e)))},c),data:c}))||0===j)a+=j;return a+="
"});s.message_form=r(function(a,e,f,b,c){function j(a,b){var d,g;d={hash:{},data:b};d='\n \n "}function k(a){var b;return a=""+("\n \n ")}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var l,p="function",h=this.escapeExpression,m=f.helperMissing,n=this;a='
\n';if((b=f["if"].call(e, -(l=e.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:n.noop,fn:n.program(1,function(){return'\n
\n \n
\n'},c),data:c}))||0===b)a+=b;a+='\n
\n\n
\n';if((b=f["if"].call(e,(l=e.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:n.noop,fn:n.program(3,function(a,b){var d,g,c;d='\n
\n
\n '; -if((c=f["if"].call(a,(g=a.user,null==g||!1===g?g:g.isAgent),{hash:{},inverse:n.noop,fn:n.program(4,j,b),data:b}))||0===c)d+=c;c={hash:{},data:b};d=d+'\n
\n ');c={hash:{},data:b};return d+=h((g=f.L10n,g?g.call(a,"chat.window.send_message_short_and_shortcut",c):m.call(a,"L10n","chat.window.send_message_short_and_shortcut", -c)))+"\n
\n"},c),data:c}))||0===b)a+=b;return a+'\n
\n
'});s.send_mail_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j;a=f.helperMissing;b=this.escapeExpression;c={hash:{},data:c};return e='
')});s.survey_layout=r(function(a,e,f,b,c){function j(a){var b; -return a=""+('\n \n ')}function k(a){var b;return a=""+("\n \n \n \n ')}function l(a){var b;return a=""+("\n \n \n \n ')} -function p(a){var b;return a=""+('\n \n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var h,m,n="function",q=this.escapeExpression,r=this;b=f.helperMissing;a='\n
\n \n
\n\n\n
\n
\n
\n ';m={hash:{},data:c};a+=q((h=f.L10n,h?h.call(e,\n
\n
';m={hash:{},data:c};return a+=q((h=f.L10n,h?h.call(e,"presurvey.intro",m):b.call(e,"L10n","presurvey.intro",m)))+'
\n
\n
\n\n\n
'}); -s.leave_message_description=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=f.helperMissing,l=this.escapeExpression;b={hash:{},data:c};a='
\n \n ');
-b={hash:{},data:c};a+=l((j=f.L10n,j?j.call(e,\n \n
\n
';b={hash:{},data:c};return a+=l((j=f.L10n,j?j.call(e,"leavemessage.descr",b):k.call(e,"L10n","leavemessage.descr",b)))+"
"});s.refresh_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j;a=f.helperMissing;b=this.escapeExpression;c={hash:{},data:c};return e='
')});s.redirect_control=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=f.helperMissing,l=this.escapeExpression;return(a=f["if"].call(e,(j=e.user,null==j||!1===j?j:j.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c,e;c={hash:{},data:b};return c='\n
\n')},c),data:c}))||0===a?a:""});s.status=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};a=this.escapeExpression;(f=f.title)?f=f.call(e,{hash:{},data:c}):(f=e.title,f="function"===typeof f?f.apply(e):f);return a(f)});s.leave_message_sent_description=r(function(a,e,f,b,c){this.compilerInfo=[2,">= 1.0.0-rc.3"];f=f||a.helpers;c=c||{};var j,k=f.helperMissing,l=this.escapeExpression;b={hash:{},data:c}; -a='
\n \n ');b={hash:{},data:c};a+=l((j=f.L10n,j?j.call(e,\n \n
\n
'; -b={hash:{},data:c};return a+=l((j=f.L10n,j?j.call(e,"leavemessage.sent.message",b):k.call(e,"L10n","leavemessage.sent.message",b)))+"
"})})(); +(function(){var r=Handlebars.template,s=Handlebars.templates=Handlebars.templates||{};s.chat_avatar=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j=this.escapeExpression;return(a=g["if"].call(c,c.imageLink,{hash:{},inverse:this.program(3,function(){return'
'},f),fn:this.program(1,function(a,b){var f,c;f=''},f),data:f}))||0===a?a:""});s.chat_controls_close=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j;a=g.helperMissing;b=this.escapeExpression;f={hash:{},data:f};return c='
')});s.chat_controls_history=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j;a=g.helperMissing; +b=this.escapeExpression;f={hash:{},data:f};return c='
')});s.chat_controls_redirect=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j,k=g.helperMissing,l=this.escapeExpression;return(a=g["if"].call(c,(j=c.user,null==j||!1===j?j:j.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(a,b){var c,f; +c={hash:{},data:b};return c='\n
\n')},f),data:f}))||0===a?a:""});s.chat_controls_refresh=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j;a=g.helperMissing;b=this.escapeExpression;f={hash:{},data:f};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(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j;a=g.helperMissing;b=this.escapeExpression;f={hash:{},data:f};return c='
')});s.chat_controls_sound=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j=g.helperMissing,k=this.escapeExpression;return(a=g["if"].call(c,c.enabled,{hash:{},inverse:this.program(3,function(a,b){var c,f;c={hash:{},data:b};return c='\n
\n')},f),fn:this.program(1,function(a, +b){var c,f;c={hash:{},data:b};return c='\n
\n')},f),data:f}))||0===a?a:""});s.chat_controls_user_name=r(function(a,c,g,b,f){function j(a,c){var e,d,b;e=""+('\n
\n \n '}function k(a,b){var e,d,c;c={hash:{},data:b};e='\n '+h((d=(d=a.user,null==d||!1=== +d?d:d.name),typeof d===p?d.apply(a):d))+'\n \n '}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var l,p="function",h=this.escapeExpression,m=g.helperMissing,n=this;return(a=g["if"].call(c,(l=c.user,null==l||!1===l?l:l.canChangeName),{hash:{},inverse:n.program(6,function(a,c){var e,d; +e={hash:{},data:c};return e="\n"+(h((d=g.L10n,d?d.call(a,"chat.client.name",e):m.call(a,"L10n","chat.client.name",e)))+" "+h((d=(d=a.user,null==d||!1===d?d:d.name),typeof d===p?d.apply(a):d))+"\n")},f),fn:n.program(1,function(a,c){var e,d;e={hash:{},data:c};e='\n '+(h((d=g.L10n,d?d.call(a,"chat.client.name",e):m.call(a,"L10n","chat.client.name",e)))+"\n ");if((d=g["if"].call(a,a.nameInput,{hash:{},inverse:n.program(4,k,c),fn:n.program(2,j,c), +data:c}))||0===d)e+=d;return e+="\n"},f),data:f}))||0===a?a:""});s.chat_layout=r(function(a,c,g,b,f){function j(e){var d;return e=""+('\n \n ')}function k(e){var d;return e=""+("\n \n \n \n ')}function l(e){var d;return e=""+("\n \n \n \n ')}function p(e){var d;return e=""+('\n \n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var h,m,n="function",q=this.escapeExpression,t=this;b=g.helperMissing; +a='\n
\n \n
\n\n\n
\n
\n \n
\n
\n
\n\n\n
\n
\n '; +if((m=g.unless.call(c,(h=c.user,null==h||!1===h?h:h.isAgent),{hash:{},inverse:t.noop,fn:t.program(11,function(){return'\n
\n '},f),data:f}))||0===m)a+=m;f={hash:{},data:f};return a=a+'\n \n
\n \n
\n
\n
\n\n\n
\n\n\n')});s.chat_message=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j,k=this.escapeExpression,l=g.helperMissing;a={hash:{},data:f};a=""+(k((j=g.formatTime,j?j.call(c,c.created,a):l.call(c,"formatTime",c.created,a)))+" \n");if((j=g["if"].call(c,c.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a, +c){var b,f;b="";(f=g.name)?f=f.call(a,{hash:{},data:c}):(f=a.name,f="function"===typeof f?f.apply(a):f);return b+=k(f)+": "},f),data:f}))||0===j)a+=j;a+="\n";if((j=g["if"].call(c,c.allowFormatting,{hash:{},inverse:this.program(5,function(a,c){var b, +f;f={hash:{},data:c};return k((b=g.apply,b?b.call(a,a.message,"urlReplace, nl2br",f):l.call(a,"apply",a.message,"urlReplace, nl2br",f)))},f),fn:this.program(3,function(a,c){var b,f;f={hash:{},data:c};return k((b=g.apply,b?b.call(a,a.message,"urlReplace, nl2br, allowTags",f):l.call(a,"apply",a.message,"urlReplace, nl2br, allowTags",f)))},f),data:f}))||0===j)a+=j;return a+="
"});s.chat_message_form=r(function(a,c,g,b,f){function j(a,c){var e,d;e={hash:{},data:c};e='\n \n "}function k(a){var c;return a=""+("\n \n ")}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g|| +a.helpers;f=f||{};var l,p="function",h=this.escapeExpression,m=g.helperMissing,n=this;a='
\n';if((b=g["if"].call(c,(l=c.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:n.noop,fn:n.program(1,function(){return'\n
\n \n
\n'},f),data:f}))||0===b)a+=b;a+='\n
\n\n
\n';if((b=g["if"].call(c,(l=c.user, +null==l||!1===l?l:l.canPost),{hash:{},inverse:n.noop,fn:n.program(3,function(a,c){var e,d,b;e='\n
\n
\n ';if((b=g["if"].call(a,(d=a.user,null==d||!1===d?d:d.isAgent),{hash:{},inverse:n.noop,fn:n.program(4,j,c),data:c}))||0===b)e+=b;b={hash:{},data:c};e=e+'\n
\n ');b={hash:{},data:c};return e+=h((d=g.L10n,d?d.call(a,"chat.window.send_message_short_and_shortcut",b):m.call(a,"L10n","chat.window.send_message_short_and_shortcut",b)))+"\n
\n"},f),data:f}))||0===b)a+=b;return a+'\n
\n
'});s.chat_status_base=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};a=this.escapeExpression;(g=g.title)?g=g.call(c,{hash:{},data:f}):(g=c.title,g="function"===typeof g?g.apply(c):g);return a(g)}); +s.chat_status_message=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};a=this.escapeExpression;(g=g.message)?g=g.call(c,{hash:{},data:f}):(g=c.message,g="function"===typeof g?g.apply(c):g);return a(g)});s.chat_status_typing=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j;a=g.helperMissing;b=this.escapeExpression;f={hash:{},data:f};return b((j=g.L10n,j?j.call(c,"typing.remote",f):a.call(c,"L10n","typing.remote",f)))});s.leave_message_description= +r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j,k=g.helperMissing,l=this.escapeExpression;b={hash:{},data:f};a='
\n \n ');b={hash:{},data:f};a+=
+l((j=g.L10n,j?j.call(c,\n \n
\n
';b={hash:{},data:f};return a+=l((j=g.L10n,j?j.call(c,"leavemessage.descr",b):k.call(c,"L10n","leavemessage.descr",b)))+"
"});s.leave_message_form=r(function(a,c,g,b,f){function j(a,c){var b,e;b=''}this.compilerInfo= +[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var k,l="function",p=this.escapeExpression,h=this,m=g.helperMissing;a=""+('
\n \n \n \n ';if((b=g.unless.call(c,c.groups,{hash:{},inverse:h.noop,fn:h.program(1,function(a,c){var b;return(b=g["if"].call(a,a.groupId,{hash:{},inverse:h.noop,fn:h.program(2,j,c),data:c}))||0===b?b:""},f),data:f}))||0===b)a+=b;b={hash:{},data:f};a=a+'\n\n
\n\n \n \n \n \n \n \n \n \n \n ';if((b=g["if"].call(c,c.groups,{hash:{},inverse:h.noop,fn:h.program(4,function(a,c){var b,e,d;d={hash:{},data:c};b='\n \n \n \n \n \n \n \n \n "},f),data:f}))|| +0===b)a+=b;a+="\n \n \n \n \n ";if((b=g["if"].call(c,c.showCaptcha,{hash:{},inverse:h.noop,fn:h.program(6, +function(){return'\n \n \n \n \n '},f),data:f}))||0===b)a+=b;a+='\n
'+(p((k=g.L10n,k?k.call(c, +"form.field.email",b):m.call(c,"L10n","form.field.email",b)))+':
';b={hash:{},data:f};a+=p((k=g.L10n,k?k.call(c,"form.field.name",b):m.call(c,"L10n","form.field.name",b)))+':
'+(p((e=g.L10n,e?e.call(a,"form.field.department",d):m.call(a,"L10n","form.field.department",d)))+'
';d={hash:{},data:c};return b+=p((e=g.L10n,e?e.call(a,"form.field.department.description",d):m.call(a,"L10n","form.field.department.description",d)))+''+p((e=(e=a.groups,null==e||!1===e?e:e.defaultDescription),typeof e===l?e.apply(a):e))+"
";b={hash:{},data:f};a+=p((k=g.L10n,k?k.call(c,"form.field.message",b):m.call(c,"L10n","form.field.message",b)))+':\n \n
\n ';b={hash:{},data:f};return a+=p((k=g.L10n,k?k.call(c,"mailthread.perform",b):m.call(c,"L10n","mailthread.perform",b)))+'\n
 
\n
'}); +s.leave_message_layout=r(function(a,c,g,b,f){function j(a){var e;return a=""+('\n \n ')}function k(a){var e;return a=""+("\n \n \n \n ')}function l(a){var e;return a=""+("\n \n \n \n ')}function p(a){var e;return a=""+('\n \n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var h,m="function",n=this.escapeExpression,q=this;a='\n
\n \n
\n\n\n
\n
\n
\n
\n\n\n
'}); +s.leave_message_sent_description=r(function(a,c,g,b,f){this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var j,k=g.helperMissing,l=this.escapeExpression;b={hash:{},data:f};a='
\n \n ');b={hash:{},data:f};a+=l((j=g.L10n,j?j.call(c,\n \n
\n
';b={hash:{},data:f};return a+=l((j=g.L10n,j?j.call(c,"leavemessage.sent.message",b):k.call(c,"L10n","leavemessage.sent.message",b)))+"
"});s.survey_form=r(function(a,c,g,b,f){function j(a,c){var b,e;b=''}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var k,l="function",p=this.escapeExpression,h=this,m=g.helperMissing;a=""+('
\n \n \n \n \n ';if((b=g.unless.call(c,c.showEmail,{hash:{},inverse:h.noop,fn:h.program(1,function(a,c){var b,e;b=''},f),data:f}))||0===b)a+=b;a+="\n "; +if((b=g.unless.call(c,c.groups,{hash:{},inverse:h.noop,fn:h.program(3,function(a,c){var b;return(b=g["if"].call(a,a.groupId,{hash:{},inverse:h.noop,fn:h.program(4,j,c),data:c}))||0===b?b:""},f),data:f}))||0===b)a+=b;a+="\n ";if((b=g.unless.call(c,c.showMessage,{hash:{},inverse:h.noop,fn:h.program(6,function(a,c){var b,e;b=''},f),data:f}))||0===b)a+= +b;a+='\n\n
\n\n \n ';if((b=g["if"].call(c,c.groups,{hash:{},inverse:h.noop,fn:h.program(8,function(a,b){var c,e,d;d={hash:{},data:b};c="\n \n \n \n \n \n \n \n \n "},f),data:f}))||0===b)a+=b;b={hash:{},data:f};a=a+"\n \n \n \n \n ";if((b=g["if"].call(c,c.showEmail,{hash:{},inverse:h.noop,fn:h.program(12,function(a,c){var b,e;b={hash:{},data:c};b="\n \n \n \n \n '},f),data:f}))||0===b)a+=b;a+="\n ";if((b=g["if"].call(c,c.showMessage,{hash:{},inverse:h.noop,fn:h.program(14,function(a,c){var b,e;b={hash:{},data:c};b="\n \n \n \n \n "},f),data:f}))||0===b)a+=b;a+='\n
"+(p((e=g.L10n,e?e.call(a,"form.field.department",d):m.call(a,"L10n","form.field.department",d)))+'
"; +d={hash:{},data:b};return c+=p((e=g.L10n,e?e.call(a,"form.field.department.description",d):m.call(a,"L10n","form.field.department.description",d)))+''+p((e=(e=a.groups,null==e||!1===e?e:e.defaultDescription),typeof e===l?e.apply(a):e))+"
"+(p((k=g.L10n,k?k.call(c,"presurvey.name",b):m.call(c,"L10n","presurvey.name",b)))+'
"+(p((e=g.L10n,e?e.call(a,"presurvey.mail",b):m.call(a,"L10n", +"presurvey.mail",b)))+'
"+(p((e=g.L10n,e?e.call(a,"presurvey.question",b):m.call(a, +"L10n","presurvey.question",b)))+'
\n ';b={hash:{},data:f};return a+=p((k=g.L10n,k?k.call(c,"presurvey.submit",b):m.call(c,"L10n","presurvey.submit", +b)))+'\n
 
\n
'});s.survey_layout=r(function(a,c,g,b,f){function j(a){var d;return a=""+('\n \n ')}function k(a){var d;return a=""+("\n \n \n \n ')}function l(a){var d;return a=""+("\n \n \n \n ')}function p(a){var d;return a=""+('\n \n ')}this.compilerInfo=[2,">= 1.0.0-rc.3"];g=g||a.helpers;f=f||{};var h,m,n="function",q=this.escapeExpression,r=this;b=g.helperMissing; +a='\n
\n \n
\n\n\n
\n
\n
\n ';m={hash:{},data:f};a+=q((h=g.L10n,h?h.call(c,\n
\n
';m={hash:{},data:f};return a+=q((h=g.L10n,h?h.call(c,"presurvey.intro",m):b.call(c, +"L10n","presurvey.intro",m)))+'
\n
\n
\n\n\n
'})})();