From 48bcea8f650c8558d28452cf025ab7107fab8ef7 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Thu, 24 Jul 2014 13:46:24 +0000 Subject: [PATCH] Use client-side templates names according to directory structure --- src/build.xml | 39 +---------- src/mibew/js/compiled/chat/layouts/chat.js | 2 +- .../js/compiled/chat/layouts/invitation.js | 2 +- .../js/compiled/chat/layouts/leave_message.js | 2 +- src/mibew/js/compiled/chat/layouts/survey.js | 2 +- .../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 | 4 +- .../leave_message_description.js | 2 +- .../leave_message/leave_message_form.js | 2 +- .../leave_message_sent_description.js | 2 +- .../chat/model_views/messages/message.js | 2 +- .../chat/model_views/messages/message_form.js | 2 +- .../chat/model_views/status/base_status.js | 2 +- .../chat/model_views/status/message.js | 2 +- .../chat/model_views/status/typing.js | 2 +- .../chat/model_views/survey/survey_form.js | 4 +- src/mibew/js/compiled/chat_app.js | 48 +++++++------- .../collection_views/threads_collection.js | 4 +- .../users/model_views/queued_thread.js | 8 +-- src/mibew/js/compiled/users_app.js | 12 ++-- src/mibew/js/source/chat/layouts/chat.js | 2 +- .../js/source/chat/layouts/invitation.js | 2 +- .../js/source/chat/layouts/leave_message.js | 2 +- src/mibew/js/source/chat/layouts/survey.js | 2 +- .../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 +- .../leave_message_description.js | 2 +- .../leave_message/leave_message_form.js | 2 +- .../leave_message_sent_description.js | 2 +- .../chat/model_views/messages/message.js | 2 +- .../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/model_views/survey/survey_form.js | 2 +- .../js/source/default/model_views/control.js | 2 +- .../js/source/default/model_views/message.js | 2 +- .../collection_views/threads_collection.js | 2 +- .../collection_views/visitors_collection.js | 2 +- .../js/source/users/model_views/agent.js | 2 +- .../js/source/users/model_views/no_threads.js | 2 +- .../source/users/model_views/no_visitors.js | 2 +- .../source/users/model_views/queued_thread.js | 2 +- .../source/users/model_views/status_panel.js | 2 +- .../js/source/users/model_views/visitor.js | 2 +- .../client_side/templates.js | 64 +++++++++---------- .../client_side/users_app.tpl.js | 56 ++++++++-------- src/tools/flat_cp | 39 ----------- 62 files changed, 155 insertions(+), 227 deletions(-) delete mode 100755 src/tools/flat_cp diff --git a/src/build.xml b/src/build.xml index 0f2eeef8..ca9fb3df 100644 --- a/src/build.xml +++ b/src/build.xml @@ -11,29 +11,6 @@ - Flatten templates directory structure - - - - - - - - - - - - - - - - - - - - - Compile templates @@ -41,9 +18,9 @@ - + - + - + Remove temporary files - - - - - - - - diff --git a/src/mibew/js/compiled/chat/layouts/chat.js b/src/mibew/js/compiled/chat/layouts/chat.js index f46ec940..7b9da289 100644 --- a/src/mibew/js/compiled/chat/layouts/chat.js +++ b/src/mibew/js/compiled/chat/layouts/chat.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,c){a.Layouts.Chat=c.Marionette.Layout.extend({template:Handlebars.templates.chat_layout,regions:{controlsRegion:"#controls-region",avatarRegion:"#avatar-region",messagesRegion:{selector:"#messages-region",regionType:a.Regions.Messages},statusRegion:"#status-region",messageFormRegion:"#message-form-region"},serializeData:function(){var b=a.Objects.Models;return{page:b.page.toJSON(),user:b.user.toJSON()}}})})(Mibew,Backbone); +(function(a,c){a.Layouts.Chat=c.Marionette.Layout.extend({template:Handlebars.templates["chat/layout"],regions:{controlsRegion:"#controls-region",avatarRegion:"#avatar-region",messagesRegion:{selector:"#messages-region",regionType:a.Regions.Messages},statusRegion:"#status-region",messageFormRegion:"#message-form-region"},serializeData:function(){var b=a.Objects.Models;return{page:b.page.toJSON(),user:b.user.toJSON()}}})})(Mibew,Backbone); diff --git a/src/mibew/js/compiled/chat/layouts/invitation.js b/src/mibew/js/compiled/chat/layouts/invitation.js index 656568a4..7dc17d45 100644 --- a/src/mibew/js/compiled/chat/layouts/invitation.js +++ b/src/mibew/js/compiled/chat/layouts/invitation.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Layouts.Invitation=b.Marionette.Layout.extend({template:Handlebars.templates.invitation_layout,regions:{messagesRegion:{selector:"#invitation-messages-region",regionType:a.Regions.Messages}}})})(Mibew,Backbone); +(function(a,b){a.Layouts.Invitation=b.Marionette.Layout.extend({template:Handlebars.templates["invitation/layout"],regions:{messagesRegion:{selector:"#invitation-messages-region",regionType:a.Regions.Messages}}})})(Mibew,Backbone); diff --git a/src/mibew/js/compiled/chat/layouts/leave_message.js b/src/mibew/js/compiled/chat/layouts/leave_message.js index c700013e..ce1ae0d9 100644 --- a/src/mibew/js/compiled/chat/layouts/leave_message.js +++ b/src/mibew/js/compiled/chat/layouts/leave_message.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Layouts.LeaveMessage=b.Marionette.Layout.extend({template:Handlebars.templates.leave_message_layout,regions:{leaveMessageFormRegion:"#content-wrapper",descriptionRegion:"#description-region"},serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone); +(function(a,b){a.Layouts.LeaveMessage=b.Marionette.Layout.extend({template:Handlebars.templates["leave_message/layout"],regions:{leaveMessageFormRegion:"#content-wrapper",descriptionRegion:"#description-region"},serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone); diff --git a/src/mibew/js/compiled/chat/layouts/survey.js b/src/mibew/js/compiled/chat/layouts/survey.js index 7345a9e5..fb3e31f7 100644 --- a/src/mibew/js/compiled/chat/layouts/survey.js +++ b/src/mibew/js/compiled/chat/layouts/survey.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Layouts.Survey=b.Marionette.Layout.extend({template:Handlebars.templates.survey_layout,regions:{surveyFormRegion:"#content-wrapper"},serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone); +(function(a,b){a.Layouts.Survey=b.Marionette.Layout.extend({template:Handlebars.templates["survey/layout"],regions:{surveyFormRegion:"#content-wrapper"},serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone); diff --git a/src/mibew/js/compiled/chat/model_views/avatar.js b/src/mibew/js/compiled/chat/model_views/avatar.js index ad7c281d..d4076901 100644 --- a/src/mibew/js/compiled/chat/model_views/avatar.js +++ b/src/mibew/js/compiled/chat/model_views/avatar.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b,c){a.Views.Avatar=b.Marionette.ItemView.extend({template:c.templates.chat_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/mibew/js/compiled/chat/model_views/controls/close.js b/src/mibew/js/compiled/chat/model_views/controls/close.js index 614c144c..950f116a 100644 --- a/src/mibew/js/compiled/chat/model_views/controls/close.js +++ b/src/mibew/js/compiled/chat/model_views/controls/close.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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("Are you sure want to leave chat?");(!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("Are you sure want to leave chat?");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_); diff --git a/src/mibew/js/compiled/chat/model_views/controls/history.js b/src/mibew/js/compiled/chat/model_views/controls/history.js index d73fc7e8..fe7fd151 100644 --- a/src/mibew/js/compiled/chat/model_views/controls/history.js +++ b/src/mibew/js/compiled/chat/model_views/controls/history.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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,_); +(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/mibew/js/compiled/chat/model_views/controls/redirect.js b/src/mibew/js/compiled/chat/model_views/controls/redirect.js index 57c97c89..5d512edb 100644 --- a/src/mibew/js/compiled/chat/model_views/controls/redirect.js +++ b/src/mibew/js/compiled/chat/model_views/controls/redirect.js @@ -5,5 +5,5 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(b,e,f){b.Views.RedirectControl=b.Views.Control.extend({template:e.templates.chat_controls_redirect,events:f.extend({},b.Views.Control.prototype.events,{click:"redirect"}),initialize:function(){b.Objects.Models.user.on("change",this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},redirect:function(){var a=b.Objects.Models.user;if(a.get("isAgent")&&a.get("canPost")&&(a=this.model.get("link"))){var c=b.Objects.Models.page.get("style"), +(function(b,e,f){b.Views.RedirectControl=b.Views.Control.extend({template:e.templates["chat/controls/redirect"],events:f.extend({},b.Views.Control.prototype.events,{click:"redirect"}),initialize:function(){b.Objects.Models.user.on("change",this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},redirect:function(){var a=b.Objects.Models.user;if(a.get("isAgent")&&a.get("canPost")&&(a=this.model.get("link"))){var c=b.Objects.Models.page.get("style"), d="";c&&(d=(-1===a.indexOf("?")?"?":"&")+"style="+c);window.location.href=a.replace(/\&\;/g,"&")+d}}})})(Mibew,Handlebars,_); diff --git a/src/mibew/js/compiled/chat/model_views/controls/refresh.js b/src/mibew/js/compiled/chat/model_views/controls/refresh.js index f4930327..a927dacf 100644 --- a/src/mibew/js/compiled/chat/model_views/controls/refresh.js +++ b/src/mibew/js/compiled/chat/model_views/controls/refresh.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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,_); +(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/mibew/js/compiled/chat/model_views/controls/secure_mode.js b/src/mibew/js/compiled/chat/model_views/controls/secure_mode.js index 36e74c80..9042817d 100644 --- a/src/mibew/js/compiled/chat/model_views/controls/secure_mode.js +++ b/src/mibew/js/compiled/chat/model_views/controls/secure_mode.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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,_); +(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/mibew/js/compiled/chat/model_views/controls/send_mail.js b/src/mibew/js/compiled/chat/model_views/controls/send_mail.js index 5ddc6c26..fc52085e 100644 --- a/src/mibew/js/compiled/chat/model_views/controls/send_mail.js +++ b/src/mibew/js/compiled/chat/model_views/controls/send_mail.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(b,d,f){b.Views.SendMailControl=b.Views.Control.extend({template:d.templates.chat_controls_send_mail,events:f.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"),e="";c&&(e=(-1===a.indexOf("?")?"?":"&")+"style="+c);a=a.replace(/\&\;/g,"&")+e;a=window.open(a,"ForwardMail",d);null!==a&&(a.focus(),a.opener=window)}}})})(Mibew,Handlebars,_); +(function(b,d,f){b.Views.SendMailControl=b.Views.Control.extend({template:d.templates["chat/controls/send_mail"],events:f.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"),e="";c&&(e=(-1===a.indexOf("?")?"?":"&")+"style="+c);a=a.replace(/\&\;/g,"&")+e;a=window.open(a,"ForwardMail",d);null!==a&&(a.focus(),a.opener=window)}}})})(Mibew,Handlebars,_); diff --git a/src/mibew/js/compiled/chat/model_views/controls/sound.js b/src/mibew/js/compiled/chat/model_views/controls/sound.js index 9061a05e..195f29d5 100644 --- a/src/mibew/js/compiled/chat/model_views/controls/sound.js +++ b/src/mibew/js/compiled/chat/model_views/controls/sound.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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.toggle()}})})(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.toggle()}})})(Mibew,Handlebars,_); diff --git a/src/mibew/js/compiled/chat/model_views/controls/user_name.js b/src/mibew/js/compiled/chat/model_views/controls/user_name.js index 852323bb..73c465cf 100644 --- a/src/mibew/js/compiled/chat/model_views/controls/user_name.js +++ b/src/mibew/js/compiled/chat/model_views/controls/user_name.js @@ -5,5 +5,5 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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,_); +(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/mibew/js/compiled/chat/model_views/leave_message/leave_message_description.js b/src/mibew/js/compiled/chat/model_views/leave_message/leave_message_description.js index 250396a1..37bcb580 100644 --- a/src/mibew/js/compiled/chat/model_views/leave_message/leave_message_description.js +++ b/src/mibew/js/compiled/chat/model_views/leave_message/leave_message_description.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b,c){a.Views.LeaveMessageDescription=b.Marionette.ItemView.extend({template:c.templates.leave_message_description,serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone,Handlebars); +(function(a,b,c){a.Views.LeaveMessageDescription=b.Marionette.ItemView.extend({template:c.templates["leave_message/description"],serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone,Handlebars); diff --git a/src/mibew/js/compiled/chat/model_views/leave_message/leave_message_form.js b/src/mibew/js/compiled/chat/model_views/leave_message/leave_message_form.js index 86a15e05..a7a2e797 100644 --- a/src/mibew/js/compiled/chat/model_views/leave_message/leave_message_form.js +++ b/src/mibew/js/compiled/chat/model_views/leave_message/leave_message_form.js @@ -5,5 +5,5 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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()); +(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/mibew/js/compiled/chat/model_views/leave_message/leave_message_sent_description.js b/src/mibew/js/compiled/chat/model_views/leave_message/leave_message_sent_description.js index be691265..62d00862 100644 --- a/src/mibew/js/compiled/chat/model_views/leave_message/leave_message_sent_description.js +++ b/src/mibew/js/compiled/chat/model_views/leave_message/leave_message_sent_description.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b,c){a.Views.LeaveMessageSentDescription=b.Marionette.ItemView.extend({template:c.templates.leave_message_sent_description,serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone,Handlebars); +(function(a,b,c){a.Views.LeaveMessageSentDescription=b.Marionette.ItemView.extend({template:c.templates["leave_message/sent_description"],serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone,Handlebars); diff --git a/src/mibew/js/compiled/chat/model_views/messages/message.js b/src/mibew/js/compiled/chat/model_views/messages/message.js index a4ff7279..b6b5c160 100644 --- a/src/mibew/js/compiled/chat/model_views/messages/message.js +++ b/src/mibew/js/compiled/chat/model_views/messages/message.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Views.Message=a.Views.Message.extend({template:b.templates.chat_message})})(Mibew,Handlebars); +(function(a,b){a.Views.Message=a.Views.Message.extend({template:b.templates["chat/message"]})})(Mibew,Handlebars); diff --git a/src/mibew/js/compiled/chat/model_views/messages/message_form.js b/src/mibew/js/compiled/chat/model_views/messages/message_form.js index e3f101e7..e05f5365 100644 --- a/src/mibew/js/compiled/chat/model_views/messages/message_form.js +++ b/src/mibew/js/compiled/chat/model_views/messages/message_form.js @@ -5,7 +5,7 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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"}, +(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/mibew/js/compiled/chat/model_views/status/base_status.js b/src/mibew/js/compiled/chat/model_views/status/base_status.js index 71b1cbd5..19b80d0a 100644 --- a/src/mibew/js/compiled/chat/model_views/status/base_status.js +++ b/src/mibew/js/compiled/chat/model_views/status/base_status.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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); +(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/mibew/js/compiled/chat/model_views/status/message.js b/src/mibew/js/compiled/chat/model_views/status/message.js index 235050e4..b2ee34c3 100644 --- a/src/mibew/js/compiled/chat/model_views/status/message.js +++ b/src/mibew/js/compiled/chat/model_views/status/message.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Views.StatusMessage=a.Views.Status.extend({template:b.templates.chat_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/mibew/js/compiled/chat/model_views/status/typing.js b/src/mibew/js/compiled/chat/model_views/status/typing.js index 14994263..5bd9e692 100644 --- a/src/mibew/js/compiled/chat/model_views/status/typing.js +++ b/src/mibew/js/compiled/chat/model_views/status/typing.js @@ -5,4 +5,4 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Views.StatusTyping=a.Views.Status.extend({template:b.templates.chat_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/mibew/js/compiled/chat/model_views/survey/survey_form.js b/src/mibew/js/compiled/chat/model_views/survey/survey_form.js index cafa63c2..fc849292 100644 --- a/src/mibew/js/compiled/chat/model_views/survey/survey_form.js +++ b/src/mibew/js/compiled/chat/model_views/survey/survey_form.js @@ -5,5 +5,5 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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,_); +(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/mibew/js/compiled/chat_app.js b/src/mibew/js/compiled/chat_app.js index bc836663..5c177fd5 100644 --- a/src/mibew/js/compiled/chat_app.js +++ b/src/mibew/js/compiled/chat_app.js @@ -172,7 +172,7 @@ arguments:{"return":{messages:"messages",lastId:"lastId"},references:{},threadId You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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); +(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); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). @@ -187,28 +187,28 @@ changeGroupDescription:function(){var a=this.ui.groupSelect.prop("selectedIndex" You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b,c){a.Views.Avatar=b.Marionette.ItemView.extend({template:c.templates.chat_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); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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("Are you sure want to leave chat?");(!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("Are you sure want to leave chat?");(!1===b||confirm(b))&&this.model.closeThread()}})})(Mibew,Handlebars,_); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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,_); +(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,_); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(b,e,f){b.Views.RedirectControl=b.Views.Control.extend({template:e.templates.chat_controls_redirect,events:f.extend({},b.Views.Control.prototype.events,{click:"redirect"}),initialize:function(){b.Objects.Models.user.on("change",this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},redirect:function(){var a=b.Objects.Models.user;if(a.get("isAgent")&&a.get("canPost")&&(a=this.model.get("link"))){var c=b.Objects.Models.page.get("style"), +(function(b,e,f){b.Views.RedirectControl=b.Views.Control.extend({template:e.templates["chat/controls/redirect"],events:f.extend({},b.Views.Control.prototype.events,{click:"redirect"}),initialize:function(){b.Objects.Models.user.on("change",this.render,this)},serializeData:function(){var a=this.model.toJSON();a.user=b.Objects.Models.user.toJSON();return a},redirect:function(){var a=b.Objects.Models.user;if(a.get("isAgent")&&a.get("canPost")&&(a=this.model.get("link"))){var c=b.Objects.Models.page.get("style"), d="";c&&(d=(-1===a.indexOf("?")?"?":"&")+"style="+c);window.location.href=a.replace(/\&\;/g,"&")+d}}})})(Mibew,Handlebars,_); /* Copyright 2005-2014 the original author or authors. @@ -216,50 +216,50 @@ d="";c&&(d=(-1===a.indexOf("?")?"?":"&")+"style="+c);window.location.href=a.repl You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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,_); +(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,_); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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,_); +(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,_); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(b,d,f){b.Views.SendMailControl=b.Views.Control.extend({template:d.templates.chat_controls_send_mail,events:f.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"),e="";c&&(e=(-1===a.indexOf("?")?"?":"&")+"style="+c);a=a.replace(/\&\;/g,"&")+e;a=window.open(a,"ForwardMail",d);null!==a&&(a.focus(),a.opener=window)}}})})(Mibew,Handlebars,_); +(function(b,d,f){b.Views.SendMailControl=b.Views.Control.extend({template:d.templates["chat/controls/send_mail"],events:f.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"),e="";c&&(e=(-1===a.indexOf("?")?"?":"&")+"style="+c);a=a.replace(/\&\;/g,"&")+e;a=window.open(a,"ForwardMail",d);null!==a&&(a.focus(),a.opener=window)}}})})(Mibew,Handlebars,_); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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.toggle()}})})(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.toggle()}})})(Mibew,Handlebars,_); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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,_); +(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,_); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b,c){a.Views.LeaveMessageDescription=b.Marionette.ItemView.extend({template:c.templates.leave_message_description,serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone,Handlebars); +(function(a,b,c){a.Views.LeaveMessageDescription=b.Marionette.ItemView.extend({template:c.templates["leave_message/description"],serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone,Handlebars); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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()); +(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,_); /* Copyright 2005-2014 the original author or authors. @@ -267,21 +267,21 @@ a.name=this.ui.name.val()||"";a.email=this.ui.email.val()||"";a.message=this.ui. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b,c){a.Views.LeaveMessageSentDescription=b.Marionette.ItemView.extend({template:c.templates.leave_message_sent_description,serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone,Handlebars); +(function(a,b,c){a.Views.LeaveMessageSentDescription=b.Marionette.ItemView.extend({template:c.templates["leave_message/sent_description"],serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone,Handlebars); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Views.Message=a.Views.Message.extend({template:b.templates.chat_message})})(Mibew,Handlebars); +(function(a,b){a.Views.Message=a.Views.Message.extend({template:b.templates["chat/message"]})})(Mibew,Handlebars); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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"}, +(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); @@ -291,22 +291,22 @@ disableInput:function(){this.ui.message.attr("disabled","disabled")},clearInput: You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Views.StatusMessage=a.Views.Status.extend({template:b.templates.chat_status_message})})(Mibew,Handlebars); +(function(a,b){a.Views.StatusMessage=a.Views.Status.extend({template:b.templates["chat/status/message"]})})(Mibew,Handlebars); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Views.StatusTyping=a.Views.Status.extend({template:b.templates.chat_status_typing})})(Mibew,Handlebars); +(function(a,b){a.Views.StatusTyping=a.Views.Status.extend({template:b.templates["chat/status/typing"]})})(Mibew,Handlebars); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(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,_); +(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,_); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). @@ -334,28 +334,28 @@ disableInput:function(){this.ui.message.attr("disabled","disabled")},clearInput: You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,c){a.Layouts.Chat=c.Marionette.Layout.extend({template:Handlebars.templates.chat_layout,regions:{controlsRegion:"#controls-region",avatarRegion:"#avatar-region",messagesRegion:{selector:"#messages-region",regionType:a.Regions.Messages},statusRegion:"#status-region",messageFormRegion:"#message-form-region"},serializeData:function(){var b=a.Objects.Models;return{page:b.page.toJSON(),user:b.user.toJSON()}}})})(Mibew,Backbone); +(function(a,c){a.Layouts.Chat=c.Marionette.Layout.extend({template:Handlebars.templates["chat/layout"],regions:{controlsRegion:"#controls-region",avatarRegion:"#avatar-region",messagesRegion:{selector:"#messages-region",regionType:a.Regions.Messages},statusRegion:"#status-region",messageFormRegion:"#message-form-region"},serializeData:function(){var b=a.Objects.Models;return{page:b.page.toJSON(),user:b.user.toJSON()}}})})(Mibew,Backbone); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Layouts.Invitation=b.Marionette.Layout.extend({template:Handlebars.templates.invitation_layout,regions:{messagesRegion:{selector:"#invitation-messages-region",regionType:a.Regions.Messages}}})})(Mibew,Backbone); +(function(a,b){a.Layouts.Invitation=b.Marionette.Layout.extend({template:Handlebars.templates["invitation/layout"],regions:{messagesRegion:{selector:"#invitation-messages-region",regionType:a.Regions.Messages}}})})(Mibew,Backbone); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Layouts.LeaveMessage=b.Marionette.Layout.extend({template:Handlebars.templates.leave_message_layout,regions:{leaveMessageFormRegion:"#content-wrapper",descriptionRegion:"#description-region"},serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone); +(function(a,b){a.Layouts.LeaveMessage=b.Marionette.Layout.extend({template:Handlebars.templates["leave_message/layout"],regions:{leaveMessageFormRegion:"#content-wrapper",descriptionRegion:"#description-region"},serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(a,b){a.Layouts.Survey=b.Marionette.Layout.extend({template:Handlebars.templates.survey_layout,regions:{surveyFormRegion:"#content-wrapper"},serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone); +(function(a,b){a.Layouts.Survey=b.Marionette.Layout.extend({template:Handlebars.templates["survey/layout"],regions:{surveyFormRegion:"#content-wrapper"},serializeData:function(){return{page:a.Objects.Models.page.toJSON()}}})})(Mibew,Backbone); /* Copyright 2005-2014 the original author or authors. Licensed under the Apache License, Version 2.0 (the "License"). diff --git a/src/mibew/js/compiled/users/collection_views/threads_collection.js b/src/mibew/js/compiled/users/collection_views/threads_collection.js index de3828dd..3b72ad99 100644 --- a/src/mibew/js/compiled/users/collection_views/threads_collection.js +++ b/src/mibew/js/compiled/users/collection_views/threads_collection.js @@ -8,5 +8,5 @@ (function(d,h,k){d.Views.ThreadsCollection=d.Views.CompositeBase.extend({template:h.templates.threads_collection,itemView:d.Views.QueuedThread,itemViewContainer:"#threads-container",emptyView:d.Views.NoThreads,className:"threads-collection",collectionEvents:{sort:"render","sort:field":"createSortField",add:"threadAdded"},itemViewOptions:function(a){return{tagName:d.Objects.Models.page.get("threadTag"),collection:a.get("controls")}},initialize:function(){window.setInterval(k.bind(this.updateTimers, this),2E3);this.on("itemview:before:render",this.updateStyles,this);this.on("composite:collection:rendered",this.updateTimers,this)},updateStyles:function(a){var b=this.collection,c=a.model,d=this;if(c.id){var e=this.getQueueCode(c),f=!1,g=!1,b=b.filter(function(a){return d.getQueueCode(a)==e});0\n \n ')}function k(a,e){var c,f;return c=""+('\n \n ')}function l(a,e){var c,f;return c=""+("\n \n \n \n ')}function t(a,e){var c,f;return c=""+('\n \n ')}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var n, m="function",h=this.escapeExpression,s=this;c='\n
\n \n
'});v.chat_avatar=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g=this.escapeExpression; -return(c=e["if"].call(a,a&&a.imageLink,{hash:{},inverse:this.program(3,function(a,e){return'
'},b),fn:this.program(1,function(a,c){var b,d;b=''},b),data:b}))||0===c?c:""});v.chat_controls_close=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k;c=e.helperMissing; -d=this.escapeExpression;return a=""+('
')});v.chat_controls_history=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k;c=e.helperMissing;d=this.escapeExpression;return a=""+('
')});v.chat_controls_redirect=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k=e.helperMissing,l=this.escapeExpression;return(g=e["if"].call(a,(g=a&&a.user,null==g||!1===g?g:g.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(a,c){var b,d,s;return b=""+('\n
\n')},b),data:b}))||0===g?g:""});v.chat_controls_refresh=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k;c=e.helperMissing;d=this.escapeExpression;return a=""+('
')});v.chat_controls_secure_mode=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,c.helpers);return'
'}); -v.chat_controls_send_mail=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k;c=e.helperMissing;d=this.escapeExpression;return a=""+('
')});v.chat_controls_sound=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g=e.helperMissing,k=this.escapeExpression; -return(c=e["if"].call(a,a&&a.enabled,{hash:{},inverse:this.program(3,function(a,c){var b,d,h;return b=""+('\n
\n')},b),fn:this.program(1,function(a,c){var b,d,h;return b=""+('\n
\n')},b),data:b}))||0===c?c:""});v.chat_controls_user_name=u(function(c,a,e,d,b){function g(a,c){var b,d,f,h;return b=""+('\n
\n \n ')}function k(a,c){var b,d,f,h;return b=""+('\n '+n((d=(d=a&&a.user,null==d||!1===d?d:d.name),typeof d===t?d.apply(a):d))+'\n \n ')}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var l,t="function",n=this.escapeExpression,m=e.helperMissing,h=this;return(l=e["if"].call(a,(l=a&&a.user,null==l||!1===l?l:l.canChangeName),{hash:{},inverse:h.program(6,function(a,c){var b,d,f,h;return b=""+("\n"+n((f=e.l10n||a&&a.l10n,h={hash:{},data:c},f?f.call(a,"You are",h):m.call(a,"l10n","You are",h)))+" "+n((d=(d=a&&a.user,null==d||!1===d?d:d.name),typeof d===t?d.apply(a):d))+"\n")},b),fn:h.program(1,function(a, -c){var d,b,f;d=""+('\n '+n((b=e.l10n||a&&a.l10n,f={hash:{},data:c},b?b.call(a,"You are",f):m.call(a,"l10n","You are",f)))+"\n ");if((b=e["if"].call(a,a&&a.nameInput,{hash:{},inverse:h.program(4,k,c),fn:h.program(2,g,c),data:c}))||0===b)d+=b;return d+"\n"},b),data:b}))||0===l?l:""});v.chat_layout=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);d=this.merge(d,c.partials);b=b||{};var g,k,l=e.helperMissing,t=this.escapeExpression; -c="\n";if((d=this.invokePartial(d._logo,"_logo",a,e,d,b))||0===d)c+=d;c+='\n\n\n
\n
\n \n
\n
\n
\n\n\n
\n
\n ';if((d=e.unless.call(a,(d=a&&a.user,null==d||!1===d?d:d.isAgent),{hash:{},inverse:this.noop,fn:this.program(1,function(a,c){return'\n
\n '}, -b),data:b}))||0===d)c+=d;return c+='\n \n
\n \n
\n
\n
\n\n\n
\n\n\n'});v.chat_message=u(function(c,a,e,d,b){this.compilerInfo= -[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k,l=this.escapeExpression,t=e.helperMissing;c=""+(""+l((g=e.formatTime||a&&a.formatTime,k={hash:{},data:b},g?g.call(a,a&&a.created,k):t.call(a,"formatTime",a&&a.created,k)))+" \n");if((g=e["if"].call(a,a&&a.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,c){var b,d;b="";(d=e.name)? -d=d.call(a,{hash:{},data:c}):(d=a&&a.name,d="function"===typeof d?d.call(a,{hash:{},data:c}):d);return b+=l(d)+": "},b),data:b}))||0===g)c+=g;c+="\n";if((g=e["if"].call(a,a&&a.allowFormatting,{hash:{},inverse:this.program(5,function(a,c){var d,b;return l((d=e.apply||a&&a.apply,b={hash:{},data:c},d?d.call(a,a&&a.message,"urlReplace, nl2br",b):t.call(a, -"apply",a&&a.message,"urlReplace, nl2br",b)))},b),fn:this.program(3,function(a,c){var d,b;return l((d=e.apply||a&&a.apply,b={hash:{},data:c},d?d.call(a,a&&a.message,"urlReplace, nl2br, allowTags",b):t.call(a,"apply",a&&a.message,"urlReplace, nl2br, allowTags",b)))},b),data:b}))||0===g)c+=g;return c+"
"});v.chat_message_form=u(function(c,a,e,d,b){function g(a,c){var d,b,f;d=""+('\n \n "}function k(a,c){var d,b;return d=""+("\n \n ")}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers); -b=b||{};var l,t="function",n=this.escapeExpression,m=e.helperMissing,h=this;c='
\n';if((l=e["if"].call(a,(l=a&&a.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:h.noop,fn:h.program(1,function(a,c){return'\n
\n \n
\n'},b),data:b}))||0===l)c+=l;c+='\n
\n\n
\n';if((l=e["if"].call(a,(l=a&&a.user, -null==l||!1===l?l:l.canPost),{hash:{},inverse:h.noop,fn:h.program(3,function(a,c){var d,b,f,w;d='\n
\n
\n ';if((b=e["if"].call(a,(b=a&&a.user,null==b||!1===b?b:b.isAgent),{hash:{},inverse:h.noop,fn:h.program(4,g,c),data:c}))||0===b)d+=b;return d+='\n
\n '+n((f=e.l10n||a&&a.l10n,w={hash:{},data:c},f?f.call(a,"chat.window.send_message_short_and_shortcut",w):m.call(a,"l10n","chat.window.send_message_short_and_shortcut",w)))+"\n
\n"},b),data:b}))||0===l)c+=l;return c+'\n
\n
'});v.chat_status_base=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};c=this.escapeExpression;(e=e.title)?a=e.call(a,{hash:{},data:b}):(e=a&&a.title,a="function"===typeof e?e.call(a,{hash:{}, -data:b}):e);return c(a)});v.chat_status_message=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};c=this.escapeExpression;(e=e.message)?a=e.call(a,{hash:{},data:b}):(e=a&&a.message,a="function"===typeof e?e.call(a,{hash:{},data:b}):e);return c(a)});v.chat_status_typing=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k;c=e.helperMissing;d=this.escapeExpression;return d((g=e.l10n||a&&a.l10n,k={hash:{},data:b},g?g.call(a, -"Remote user is typing...",k):c.call(a,"l10n","Remote user is typing...",k)))});v.default_control=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};d=this.escapeExpression;c="";(e=e.title)?a=e.call(a,{hash:{},data:b}):(e=a&&a.title,a="function"===typeof e?e.call(a,{hash:{},data:b}):e);return c+=d(a)+""});v.invitation_layout=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,c.helpers);return'
'}); -v.leave_message_description=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k,l;c=e.helperMissing;d=this.escapeExpression;return a=""+('
\n \n '+
-d((k=e.l10n||a&&a.l10n,l={hash:{},data:b},k?k.call(a,\n \n
\n
'+d((k=e.l10n||a&&a.l10n,l={hash:{},data:b},k?k.call(a,"Sorry. None of the support team is available at the moment.
Please leave a message and someone will get back to you shortly.",l):c.call(a,"l10n","Sorry. None of the support team is available at the moment.
Please leave a message and someone will get back to you shortly.",l)))+"
")});v.leave_message_form= +(f=a&&a.page,null==f||!1===f?f:f.mibewHost),{hash:{},inverse:s.program(4,k,c),fn:s.program(2,g,c),data:c}))||0===f)b+=f;return b+"\n "},b),data:b}))||0===n)c+=n;return c+='\n  \n
'+h((n=(n=a&&a.page,null==n||!1===n?n:n.title),typeof n===m?n.apply(a):n))+'
\n
 
\n \n'});v["chat/avatar"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g=this.escapeExpression; +return(c=e["if"].call(a,a&&a.imageLink,{hash:{},inverse:this.program(3,function(a,e){return'
'},b),fn:this.program(1,function(a,c){var b,d;b=''},b),data:b}))||0===c?c:""});v["chat/controls/close"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k;c=e.helperMissing; +d=this.escapeExpression;return a=""+('
')});v["chat/controls/history"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k;c=e.helperMissing;d=this.escapeExpression;return a=""+('
')});v["chat/controls/redirect"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k=e.helperMissing,l=this.escapeExpression;return(g=e["if"].call(a,(g=a&&a.user,null==g||!1===g?g:g.canPost),{hash:{},inverse:this.noop,fn:this.program(1,function(a,c){var b,d,s;return b=""+('\n
\n')},b),data:b}))||0===g?g:""});v["chat/controls/refresh"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k;c=e.helperMissing;d=this.escapeExpression;return a=""+('
')});v["chat/controls/secure_mode"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,c.helpers);return'
'}); +v["chat/controls/send_mail"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k;c=e.helperMissing;d=this.escapeExpression;return a=""+('
')});v["chat/controls/sound"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g=e.helperMissing, +k=this.escapeExpression;return(c=e["if"].call(a,a&&a.enabled,{hash:{},inverse:this.program(3,function(a,c){var b,d,h;return b=""+('\n
\n')},b),fn:this.program(1,function(a,c){var b,d,h;return b=""+('\n
\n')},b),data:b}))||0===c?c:""});v["chat/controls/user_name"]=u(function(c,a,e,d,b){function g(a,c){var b,d,f,h;return b=""+('\n
\n \n ')}function k(a,c){var b,d,f,h;return b=""+('\n '+n((d=(d=a&&a.user,null==d||!1===d?d:d.name),typeof d===t?d.apply(a):d))+'\n \n ')}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var l,t="function",n=this.escapeExpression,m=e.helperMissing,h=this;return(l=e["if"].call(a,(l=a&&a.user,null==l||!1===l?l:l.canChangeName),{hash:{},inverse:h.program(6,function(a,c){var b,d,f,h;return b=""+("\n"+n((f=e.l10n||a&&a.l10n,h={hash:{},data:c},f?f.call(a,"You are",h):m.call(a,"l10n","You are",h)))+" "+n((d=(d=a&&a.user,null==d||!1===d?d:d.name),typeof d===t?d.apply(a):d))+"\n")}, +b),fn:h.program(1,function(a,c){var d,b,f;d=""+('\n '+n((b=e.l10n||a&&a.l10n,f={hash:{},data:c},b?b.call(a,"You are",f):m.call(a,"l10n","You are",f)))+"\n ");if((b=e["if"].call(a,a&&a.nameInput,{hash:{},inverse:h.program(4,k,c),fn:h.program(2,g,c),data:c}))||0===b)d+=b;return d+"\n"},b),data:b}))||0===l?l:""});v["chat/layout"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);d=this.merge(d,c.partials);b=b||{};var g, +k,l=e.helperMissing,t=this.escapeExpression;c="\n";if((d=this.invokePartial(d._logo,"_logo",a,e,d,b))||0===d)c+=d;c+='\n\n\n
\n
\n \n
\n
\n
\n\n\n
\n
\n ';if((d=e.unless.call(a,(d=a&&a.user,null==d||!1===d?d:d.isAgent),{hash:{},inverse:this.noop, +fn:this.program(1,function(a,c){return'\n
\n '},b),data:b}))||0===d)c+=d;return c+='\n \n
\n \n
\n
\n
\n\n\n
\n\n\n'}); +v["chat/message"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k,l=this.escapeExpression,t=e.helperMissing;c=""+(""+l((g=e.formatTime||a&&a.formatTime,k={hash:{},data:b},g?g.call(a,a&&a.created,k):t.call(a,"formatTime",a&&a.created,k)))+" \n");if((g=e["if"].call(a,a&&a.name,{hash:{},inverse:this.noop,fn:this.program(1,function(a,c){var b,d;b="";(d=e.name)?d=d.call(a,{hash:{},data:c}):(d=a&&a.name,d="function"===typeof d?d.call(a,{hash:{},data:c}):d);return b+=l(d)+": "},b),data:b}))||0===g)c+=g;c+="\n";if((g=e["if"].call(a,a&&a.allowFormatting,{hash:{},inverse:this.program(5,function(a,c){var d,b;return l((d=e.apply||a&&a.apply,b={hash:{},data:c},d? +d.call(a,a&&a.message,"urlReplace, nl2br",b):t.call(a,"apply",a&&a.message,"urlReplace, nl2br",b)))},b),fn:this.program(3,function(a,c){var d,b;return l((d=e.apply||a&&a.apply,b={hash:{},data:c},d?d.call(a,a&&a.message,"urlReplace, nl2br, allowTags",b):t.call(a,"apply",a&&a.message,"urlReplace, nl2br, allowTags",b)))},b),data:b}))||0===g)c+=g;return c+"
"});v["chat/message_form"]=u(function(c,a,e,d,b){function g(a,c){var d,b,f;d=""+('\n \n "}function k(a,c){var d,b;return d=""+("\n \n ")}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e, +c.helpers);b=b||{};var l,t="function",n=this.escapeExpression,m=e.helperMissing,h=this;c='
\n';if((l=e["if"].call(a,(l=a&&a.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:h.noop,fn:h.program(1,function(a,c){return'\n
\n \n
\n'},b),data:b}))||0===l)c+=l;c+='\n
\n\n
\n';if((l=e["if"].call(a,(l= +a&&a.user,null==l||!1===l?l:l.canPost),{hash:{},inverse:h.noop,fn:h.program(3,function(a,c){var d,b,f,w;d='\n
\n
\n ';if((b=e["if"].call(a,(b=a&&a.user,null==b||!1===b?b:b.isAgent),{hash:{},inverse:h.noop,fn:h.program(4,g,c),data:c}))||0===b)d+=b;return d+='\n
\n '+n((f=e.l10n||a&&a.l10n,w={hash:{},data:c},f?f.call(a,"chat.window.send_message_short_and_shortcut",w):m.call(a,"l10n","chat.window.send_message_short_and_shortcut",w)))+"\n
\n"},b),data:b}))||0===l)c+=l;return c+'\n
\n
'});v["chat/status/base"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};c=this.escapeExpression;(e=e.title)?a=e.call(a,{hash:{},data:b}):(e=a&&a.title,a="function"===typeof e?e.call(a,{hash:{}, +data:b}):e);return c(a)});v["chat/status/message"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};c=this.escapeExpression;(e=e.message)?a=e.call(a,{hash:{},data:b}):(e=a&&a.message,a="function"===typeof e?e.call(a,{hash:{},data:b}):e);return c(a)});v["chat/status/typing"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k;c=e.helperMissing;d=this.escapeExpression;return d((g=e.l10n||a&&a.l10n,k={hash:{},data:b}, +g?g.call(a,"Remote user is typing...",k):c.call(a,"l10n","Remote user is typing...",k)))});v.default_control=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};d=this.escapeExpression;c="";(e=e.title)?a=e.call(a,{hash:{},data:b}):(e=a&&a.title,a="function"===typeof e?e.call(a,{hash:{},data:b}):e);return c+=d(a)+""});v["invitation/layout"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];this.merge(e,c.helpers);return'
'}); +v["leave_message/description"]=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var g,k,l;c=e.helperMissing;d=this.escapeExpression;return a=""+('
\n \n '+
+d((k=e.l10n||a&&a.l10n,l={hash:{},data:b},k?k.call(a,\n \n
\n
'+d((k=e.l10n||a&&a.l10n,l={hash:{},data:b},k?k.call(a,"Sorry. None of the support team is available at the moment.
Please leave a message and someone will get back to you shortly.",l):c.call(a,"l10n","Sorry. None of the support team is available at the moment.
Please leave a message and someone will get back to you shortly.",l)))+"
")});v["leave_message/form"]= u(function(c,a,e,d,b){function g(a,c){var d,b;d=''}function k(a,c){var b,d;b=""+('\n \n "}function l(a,b){return'selected="selected"'}function t(a,b){return" (offline)"}function n(a,b){var d;return(d=e["if"].call(a,a&&a.selected,{hash:{},inverse:q.noop, fn:q.program(15,m,b),data:b}))||0===d?d:""}function m(a,b){var d;return p((d=a&&a.description,typeof d===r?d.apply(a):d))}this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);b=b||{};var h,s,r="function",p=this.escapeExpression,q=this,f=e.helperMissing;c=""+('
\n \n \n \n \n ';if((h=e.unless.call(a,a&&a.showEmail,{hash:{},inverse:q.noop,fn:q.program(1,function(a,b){var d,c;d='\n "+p((d=e.l1 data:b}))||0===h)c+=h;c+="/>\n \n ";if((h=e["if"].call(a,a&&a.showEmail,{hash:{},inverse:q.noop,fn:q.program(19,function(a,d){var b,c,g;b=""+("\n \n "+p((c=e.l10n||a&&a.l10n,g={hash:{},data:d},c?c.call(a,"Email:",g):f.call(a,"l10n","Email:",g)))+'\n \n \n '}, b),data:b}))||0===h)c+=h;c+="\n ";if((h=e["if"].call(a,a&&a.showMessage,{hash:{},inverse:q.noop,fn:q.program(21,function(a,c){var d,b,g;d=""+("\n \n "+p((b=e.l10n||a&&a.l10n,g={hash:{},data:c},b?b.call(a,"Initial Question:",g):f.call(a,"l10n","Initial Question:",g)))+'\n \n \n "},b),data:b}))||0===h)c+=h;return c+='\n \n '+p((d=e.l10n||a&&a.l10n,s={hash:{},data:b},d?d.call(a,"Start Chat",s):f.call(a,"l10n","Start Chat",s)))+'\n
 
\n\n
Loading...
'}); -v.survey_layout=u(function(c,a,e,d,b){this.compilerInfo=[4,">= 1.0.0"];e=this.merge(e,c.helpers);d=this.merge(d,c.partials);b=b||{};var g,k,l=e.helperMissing,t=this.escapeExpression;c="\n";if((d=this.invokePartial(d._logo,"_logo",a,e,d,b))||0===d)c+=d;return c+='\n\n\n
\n
\n
\n = 1.0.0"];e=this.merge(e,c.helpers);d=this.merge(d,c.partials);b=b||{};var g,k,l=e.helperMissing,t=this.escapeExpression;c="\n";if((d=this.invokePartial(d._logo,"_logo",a,e,d,b))||0===d)c+=d;return c+='\n\n\n\n\n\n
'})})(); diff --git a/src/mibew/styles/pages/default/templates_compiled/client_side/users_app.tpl.js b/src/mibew/styles/pages/default/templates_compiled/client_side/users_app.tpl.js index 91630d2d..26f98755 100644 --- a/src/mibew/styles/pages/default/templates_compiled/client_side/users_app.tpl.js +++ b/src/mibew/styles/pages/default/templates_compiled/client_side/users_app.tpl.js @@ -4,31 +4,31 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 */ -(function(){var l=Handlebars.template,m=Handlebars.templates=Handlebars.templates||{};m.visitor=l(function(c,a,f,b,d){function g(a,b){return"-"}this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,c.helpers);d=d||{};var e,n,p=f.helperMissing,k=this.escapeExpression;c='\n ';if((b=f.unless.call(a,a&&a.invitationInfo,{hash:{},inverse:this.program(3,function(a,b){var c;(c=f.userName)?c=c.call(a,{hash:{},data:b}):(c=a&&a.userName,c="function"===typeof c?c.call(a,{hash:{},data:b}):c); -return k(c)},d),fn:this.program(1,function(a,b){var c,e,d;c=""+('
');(e=f.userName)?e=e.call(a,{hash:{},data:b}):(e=a&&a.userName,e="function"===typeof e?e.call(a,{hash:{},data:b}):e);return c+=k(e)+""},d),data:d}))||0===b)c+=b;c+='\n\n\n
\n
\n
\n
\n\n';if((b=f["if"].call(a,a&&a.userIp,{hash:{},inverse:this.program(7,function(a,b){var c;(c=f.remote)?c=c.call(a,{hash:{},data:b}):(c=a&&a.remote,c="function"===typeof c?c.call(a,{hash:{},data:b}):c);return k(c)},d),fn:this.program(5,function(a,b){var c,e;c=''; -(e=f.remote)?e=e.call(a,{hash:{},data:b}):(e=a&&a.remote,e="function"===typeof e?e.call(a,{hash:{},data:b}):e);return c+=k(e)+""},d),data:d}))||0===b)c+=b;c+='\n\n\n';if((b=f["if"].call(a,a&&a.invitationInfo,{hash:{},inverse:this.program(11,g,d),fn:this.program(9,function(a,b){var c;return k((c=(c=a&&a.invitationInfo,null==c||!1===c?c:c.agentName),"function"===typeof c?c.apply(a):c))},d),data:d}))||0===b)c+=b;c+='\n';if((b=f["if"].call(a,a&&a.invitationInfo,{hash:{},inverse:this.program(11,g,d),fn:this.program(13,function(a,b){var c,e;return c=""+('')},d),data:d}))||0===b)c+=b;c+='\n';(e=f.invitations)?b=e.call(a,{hash:{},data:d}):(e=a&&a.invitations,b="function"===typeof e?e.call(a,{hash:{},data:d}):e);c+=k(b)+" / ";(e=f.chats)?b=e.call(a,{hash:{},data:d}):(e=a&&a.chats,b="function"===typeof e?e.call(a,{hash:{},data:d}):e);c+=k(b)+'\n';(e=f.userAgent)?b=e.call(a,{hash:{},data:d}):(e=a&&a.userAgent, -b="function"===typeof e?e.call(a,{hash:{},data:d}):e);return c+=k(b)+""});m.visitors_collection=l(function(c,a,f,b,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,c.helpers);d=d||{};var g,e;c=f.helperMissing;b=this.escapeExpression;return a=""+('\n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n
'+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Name",e):c.call(a,"l10n","Name",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g? -g.call(a,"Actions",e):c.call(a,"l10n","Actions",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Visitor's address",e):c.call(a,"l10n","Visitor's address",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"First seen",e):c.call(a,"l10n","First seen",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Last seen",e):c.call(a,"l10n","Last seen",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Invited by", -e):c.call(a,"l10n","Invited by",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Invitation time",e):c.call(a,"l10n","Invitation time",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Invitations / Chats",e):c.call(a,"l10n","Invitations / Chats",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Misc",e):c.call(a,"l10n","Misc",e)))+'
')});m.agent= -l(function(c,a,f,b,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,c.helpers);d=d||{};var g=f.helperMissing,e=this.escapeExpression;c='';(b=f.name)?b=b.call(a,{hash:{},data:d}):(b=a&&a.name,b="function"===typeof b?b.call(a,{hash:{},data:d}):b);c+=e(b);if((b=f.unless.call(a,a&&a.isLast,{hash:{},inverse:this.noop,fn:this.program(9,function(a,b){return","},d),data:d}))||0===b)c+=b;return c});m.no_threads= -l(function(c,a,f,b,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,c.helpers);d=d||{};var g,e;c=f.helperMissing;b=this.escapeExpression;return a=""+(''+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"The list of visitors waiting is empty",e):c.call(a,"l10n","The list of visitors waiting is empty",e)))+"")});m.no_visitors=l(function(c,a,f,b,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,c.helpers);d=d||{};var g,e;c=f.helperMissing;b=this.escapeExpression; -return a=""+(''+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"There are no visitors ready to chat on your site at present time",e):c.call(a,"l10n","There are no visitors ready to chat on your site at present time",e)))+"")});m.queued_thread=l(function(c,a,f,b,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,c.helpers);d=d||{};var g=f.helperMissing,e=this.escapeExpression;c='\n \n ";if((b=f["if"].call(a,a&&a.firstMessage,{hash:{},inverse:this.noop,fn:this.program(7,function(a,b){var c,d;c='"},d),data:d}))||0===b)c+=b;c+='\n\n\n
\n ';if((b=f["if"].call(a,a&&a.canOpen,{hash:{},inverse:this.noop,fn:this.program(9,function(a,b){var c, -d,h;return c=""+('\n
\n ')},d),data:d}))||0===b)c+=b;c+="\n ";if((b=f["if"].call(a,a&&a.canView,{hash:{},inverse:this.noop,fn:this.program(11,function(a,b){var c,d,h;return c=""+('\n
\n ')},d),data:d}))||0===b)c+=b;c+="\n ";if((b=f["if"].call(a,a&&a.tracked,{hash:{},inverse:this.noop,fn:this.program(13,function(a,b){var c,d,h;return c=""+('\n
\n ')}, -d),data:d}))||0===b)c+=b;c+="\n ";if((b=f["if"].call(a,a&&a.canBan,{hash:{},inverse:this.noop,fn:this.program(15,function(a,b){var c,d,h;return c=""+('\n
\n ')},d),data:d}))||0===b)c+=b;c+='\n
\n
\n\n';if((b=f["if"].call(a, -a&&a.userIp,{hash:{},inverse:this.program(19,function(a,b){var c;(c=f.remote)?c=c.call(a,{hash:{},data:b}):(c=a&&a.remote,c="function"===typeof c?c.call(a,{hash:{},data:b}):c);return e(c)},d),fn:this.program(17,function(a,c){var b,d;b='';(d=f.remote)?d=d.call(a,{hash:{},data:c}):(d=a&&a.remote,d="function"===typeof d?d.call(a,{hash:{},data:c}):d);return b+=e(d)+""},d),data:d}))||0===b)c+=b;c+='\n';(b=f.stateDesc)? -b=b.call(a,{hash:{},data:d}):(b=a&&a.stateDesc,b="function"===typeof b?b.call(a,{hash:{},data:d}):b);c+=e(b)+'\n';(b=f.agentName)?b=b.call(a,{hash:{},data:d}):(b=a&&a.agentName,b="function"===typeof b?b.call(a,{hash:{},data:d}):b);c+=e(b)+'\n\n';if((b= -f.unless.call(a,a&&a.chatting,{hash:{},inverse:this.program(23,function(a,c){return"-"},d),fn:this.program(21,function(a,c){var b,d;b=''},d),data:d}))||0===b)c+=b;c+='\n';if((b=f["if"].call(a,a&&a.ban,{hash:{},inverse:this.program(27,function(a,c){var b;(b=f.userAgent)?b=b.call(a,{hash:{}, -data:c}):(b=a&&a.userAgent,b="function"===typeof b?b.call(a,{hash:{},data:c}):b);return e(b)},d),fn:this.program(25,function(a,b){var c;return e((c=(c=a&&a.ban,null==c||!1===c?c:c.reason),"function"===typeof c?c.apply(a):c))},d),data:d}))||0===b)c+=b;return c+""});m.status_panel=l(function(c,a,f,b,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,c.helpers);d=d||{};var g=f.helperMissing,e=this.escapeExpression;c='
';(b=f.message)?b=b.call(a,{hash:{},data:d}):(b=a&&a.message, -b="function"===typeof b?b.call(a,{hash:{},data:d}):b);c+=e(b);if((b=f["if"].call(a,(b=a&&a.agent,null==b||!1===b?b:b.away),{hash:{},inverse:this.program(3,function(a,c){var b,d;return e((b=f.l10n||a&&a.l10n,d={hash:{},data:c},b?b.call(a,"Up to date",d):g.call(a,"l10n","Up to date",d)))},d),fn:this.program(1,function(a,c){var b,d;return e((b=f.l10n||a&&a.l10n,d={hash:{},data:c},b?b.call(a,"Away",d):g.call(a,"l10n","Away",d)))},d),data:d}))||0===b)c+=b;c+='
"});m.threads_collection=l(function(c, -a,f,b,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,c.helpers);d=d||{};var g,e;c=f.helperMissing;b=this.escapeExpression;return a=""+('\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n\n
'+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Name",e):c.call(a,"l10n","Name",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Actions",e):c.call(a,"l10n","Actions",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Visitor's address", -e):c.call(a,"l10n","Visitor's address",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"State",e):c.call(a,"l10n","State",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Operator",e):c.call(a,"l10n","Operator",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Total time",e):c.call(a,"l10n","Total time",e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Waiting time",e):c.call(a,"l10n","Waiting time", -e)))+""+b((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Misc",e):c.call(a,"l10n","Misc",e)))+'
')})})(); +(function(){var l=Handlebars.template,m=Handlebars.templates=Handlebars.templates||{};m.agent=l(function(b,a,f,c,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,b.helpers);d=d||{};var g=f.helperMissing,e=this.escapeExpression;b='';(c=f.name)?c=c.call(a,{hash:{},data:d}):(c=a&&a.name,c="function"===typeof c?c.call(a,{hash:{},data:d}):c);b+=e(c);if((c=f.unless.call(a,a&&a.isLast,{hash:{},inverse:this.noop,fn:this.program(9, +function(a,c){return","},d),data:d}))||0===c)b+=c;return b});m.no_threads=l(function(b,a,f,c,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,b.helpers);d=d||{};var g,e;b=f.helperMissing;c=this.escapeExpression;return a=""+(''+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"The list of visitors waiting is empty",e):b.call(a,"l10n","The list of visitors waiting is empty",e)))+"")});m.no_visitors=l(function(b,a,f,c,d){this.compilerInfo=[4,">= 1.0.0"]; +f=this.merge(f,b.helpers);d=d||{};var g,e;b=f.helperMissing;c=this.escapeExpression;return a=""+(''+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"There are no visitors ready to chat on your site at present time",e):b.call(a,"l10n","There are no visitors ready to chat on your site at present time",e)))+"")});m.queued_thread=l(function(b,a,f,c,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,b.helpers);d=d||{};var g=f.helperMissing,e=this.escapeExpression; +b='\n \n ";if((c=f["if"].call(a,a&&a.firstMessage,{hash:{},inverse:this.noop,fn:this.program(7, +function(a,c){var b,h;b='"},d),data:d}))||0===c)b+=c;b+='\n\n\n
\n '; +if((c=f["if"].call(a,a&&a.canOpen,{hash:{},inverse:this.noop,fn:this.program(9,function(a,c){var b,h,d;return b=""+('\n
\n ')},d),data:d}))||0===c)b+=c;b+="\n ";if((c=f["if"].call(a,a&&a.canView,{hash:{},inverse:this.noop,fn:this.program(11,function(a,c){var b, +d,n;return b=""+('\n
\n ')},d),data:d}))||0===c)b+=c;b+="\n ";if((c=f["if"].call(a,a&&a.tracked,{hash:{},inverse:this.noop,fn:this.program(13,function(a,c){var b,d,n;return b=""+('\n
\n ')},d),data:d}))||0===c)b+=c;b+="\n ";if((c=f["if"].call(a,a&&a.canBan,{hash:{},inverse:this.noop,fn:this.program(15,function(a,c){var b,d,n;return b=""+('\n
\n ')},d),data:d}))||0===c)b+=c;b+='\n
\n
\n\n'; +if((c=f["if"].call(a,a&&a.userIp,{hash:{},inverse:this.program(19,function(a,c){var b;(b=f.remote)?b=b.call(a,{hash:{},data:c}):(b=a&&a.remote,b="function"===typeof b?b.call(a,{hash:{},data:c}):b);return e(b)},d),fn:this.program(17,function(a,c){var b,d;b='';(d=f.remote)?d=d.call(a,{hash:{},data:c}):(d=a&&a.remote,d="function"===typeof d?d.call(a,{hash:{},data:c}):d);return b+=e(d)+""},d),data:d}))||0===c)b+=c;b+='\n'; +(c=f.stateDesc)?c=c.call(a,{hash:{},data:d}):(c=a&&a.stateDesc,c="function"===typeof c?c.call(a,{hash:{},data:d}):c);b+=e(c)+'\n';(c=f.agentName)?c=c.call(a,{hash:{},data:d}):(c=a&&a.agentName,c="function"===typeof c?c.call(a,{hash:{},data:d}):c);b+=e(c)+'\n\n'; +if((c=f.unless.call(a,a&&a.chatting,{hash:{},inverse:this.program(23,function(a,c){return"-"},d),fn:this.program(21,function(a,c){var b,d;b=''},d),data:d}))||0===c)b+=c;b+='\n';if((c=f["if"].call(a,a&&a.ban,{hash:{},inverse:this.program(27,function(a,c){var b;(b=f.userAgent)?b=b.call(a,{hash:{}, +data:c}):(b=a&&a.userAgent,b="function"===typeof b?b.call(a,{hash:{},data:c}):b);return e(b)},d),fn:this.program(25,function(a,c){var b;return e((b=(b=a&&a.ban,null==b||!1===b?b:b.reason),"function"===typeof b?b.apply(a):b))},d),data:d}))||0===c)b+=c;return b+""});m.status_panel=l(function(b,a,f,c,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,b.helpers);d=d||{};var g=f.helperMissing,e=this.escapeExpression;b='
';(c=f.message)?c=c.call(a,{hash:{},data:d}):(c=a&&a.message, +c="function"===typeof c?c.call(a,{hash:{},data:d}):c);b+=e(c);if((c=f["if"].call(a,(c=a&&a.agent,null==c||!1===c?c:c.away),{hash:{},inverse:this.program(3,function(a,c){var b,d;return e((b=f.l10n||a&&a.l10n,d={hash:{},data:c},b?b.call(a,"Up to date",d):g.call(a,"l10n","Up to date",d)))},d),fn:this.program(1,function(a,b){var c,d;return e((c=f.l10n||a&&a.l10n,d={hash:{},data:b},c?c.call(a,"Away",d):g.call(a,"l10n","Away",d)))},d),data:d}))||0===c)b+=c;b+='
"});m.threads_collection=l(function(b, +a,f,c,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,b.helpers);d=d||{};var g,e;b=f.helperMissing;c=this.escapeExpression;return a=""+('\n\n\n \n \n \n \n \n \n \n \n\n\n\n\n\n
'+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Name",e):b.call(a,"l10n","Name",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Actions",e):b.call(a,"l10n","Actions",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Visitor's address", +e):b.call(a,"l10n","Visitor's address",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"State",e):b.call(a,"l10n","State",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Operator",e):b.call(a,"l10n","Operator",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Total time",e):b.call(a,"l10n","Total time",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Waiting time",e):b.call(a,"l10n","Waiting time", +e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Misc",e):b.call(a,"l10n","Misc",e)))+'
')});m.visitor=l(function(b,a,f,c,d){function g(a,c){return"-"}this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,b.helpers);d=d||{};var e,l,m=f.helperMissing,k=this.escapeExpression;b='\n ';if((c=f.unless.call(a,a&&a.invitationInfo,{hash:{},inverse:this.program(3,function(a,c){var b;(b=f.userName)? +b=b.call(a,{hash:{},data:c}):(b=a&&a.userName,b="function"===typeof b?b.call(a,{hash:{},data:c}):b);return k(b)},d),fn:this.program(1,function(a,b){var c,d,e;c=""+('');(d=f.userName)?d=d.call(a,{hash:{},data:b}):(d=a&&a.userName,d="function"===typeof d?d.call(a,{hash:{},data:b}):d);return c+=k(d)+""},d),data:d}))||0===c)b+= +c;b+='\n\n\n
\n
\n
\n
\n\n';if((c=f["if"].call(a,a&&a.userIp,{hash:{},inverse:this.program(7,function(a,b){var c;(c=f.remote)?c=c.call(a, +{hash:{},data:b}):(c=a&&a.remote,c="function"===typeof c?c.call(a,{hash:{},data:b}):c);return k(c)},d),fn:this.program(5,function(a,c){var b,d;b='';(d=f.remote)?d=d.call(a,{hash:{},data:c}):(d=a&&a.remote,d="function"===typeof d?d.call(a,{hash:{},data:c}):d);return b+=k(d)+""},d),data:d}))||0===c)b+=c;b+='\n\n\n';if((c=f["if"].call(a,a&&a.invitationInfo,{hash:{},inverse:this.program(11,g,d),fn:this.program(9,function(a,c){var b;return k((b=(b=a&&a.invitationInfo,null==b||!1===b?b:b.agentName),"function"===typeof b? +b.apply(a):b))},d),data:d}))||0===c)b+=c;b+='\n';if((c=f["if"].call(a,a&&a.invitationInfo,{hash:{},inverse:this.program(11,g,d),fn:this.program(13,function(a,b){var c,d;return c=""+('')},d),data:d}))||0===c)b+=c;b+='\n';(e=f.invitations)?c=e.call(a,{hash:{},data:d}):(e=a&&a.invitations,c="function"===typeof e? +e.call(a,{hash:{},data:d}):e);b+=k(c)+" / ";(e=f.chats)?c=e.call(a,{hash:{},data:d}):(e=a&&a.chats,c="function"===typeof e?e.call(a,{hash:{},data:d}):e);b+=k(c)+'\n';(e=f.userAgent)?c=e.call(a,{hash:{},data:d}):(e=a&&a.userAgent,c="function"===typeof e?e.call(a,{hash:{},data:d}):e);return b+=k(c)+""});m.visitors_collection=l(function(b,a,f,c,d){this.compilerInfo=[4,">= 1.0.0"];f=this.merge(f,b.helpers);d=d||{};var g,e;b=f.helperMissing;c=this.escapeExpression;return a= +""+('\n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n
'+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Name",e):b.call(a,"l10n","Name",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Actions",e):b.call(a,"l10n","Actions",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Visitor's address",e):b.call(a,"l10n","Visitor's address",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g? +g.call(a,"First seen",e):b.call(a,"l10n","First seen",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Last seen",e):b.call(a,"l10n","Last seen",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Invited by",e):b.call(a,"l10n","Invited by",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Invitation time",e):b.call(a,"l10n","Invitation time",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a, +"Invitations / Chats",e):b.call(a,"l10n","Invitations / Chats",e)))+""+c((g=f.l10n||a&&a.l10n,e={hash:{},data:d},g?g.call(a,"Misc",e):b.call(a,"l10n","Misc",e)))+'
')})})(); diff --git a/src/tools/flat_cp b/src/tools/flat_cp deleted file mode 100755 index be226a36..00000000 --- a/src/tools/flat_cp +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -# -# Copy file and flatten its name by replace '/' by '_'. For more -# details see examples below. -# -# Usage: -# -# flat_cp [from] [to_dir] [cut_from] -# from - source file -# to_dir - target file -# cut_from - part of source file path. Only part after -# cut_from will be used for target file name. -# -# Examples: -# If execute the command: -# -# $ flat cp /home/user/application/templates/controls/radio \ -# /home/user/application/compiled_templates "templates" -# -# the file from '/home/user/application/templates/controls/radio' -# will be copied to '/home/user/application/compiled_templates/controls_radio' -# - -source_file=$1 -cut_from=$(sed "s/\/\{1,\}$//" <<< "$3") - -if [ $cut_from ] -then - cut_from=$(sed "s/\//\\\\\//g" <<< "$cut_from") - target_file_name=$(sed "s/^\(.*\)$cut_from\/\(.*\)$/\2/" <<< "$source_file") -else - target_file_name=$source_file -fi - -target_file_name=$(sed "s/\//_/g" <<< "$target_file_name") -target_file=$(sed "s/\/\{0,1\}$//" <<< "$2")"/"$target_file_name - -cp $source_file $target_file \ No newline at end of file